aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/Kconfig3
-rw-r--r--arch/alpha/kernel/module.c3
-rw-r--r--arch/alpha/kernel/pci_iommu.c32
-rw-r--r--arch/alpha/kernel/ptrace.c4
-rw-r--r--arch/alpha/kernel/smp.c6
-rw-r--r--arch/alpha/kernel/srmcons.c2
-rw-r--r--arch/alpha/kernel/sys_marvel.c2
-rw-r--r--arch/alpha/kernel/time.c2
-rw-r--r--arch/alpha/kernel/traps.c1
-rw-r--r--arch/alpha/kernel/vmlinux.lds.S10
-rw-r--r--arch/alpha/lib/checksum.c1
-rw-r--r--arch/alpha/lib/csum_ipv6_magic.S51
-rw-r--r--arch/alpha/lib/ev6-csum_ipv6_magic.S42
-rw-r--r--arch/alpha/mm/fault.c22
-rw-r--r--arch/arm/Kconfig10
-rw-r--r--arch/arm/boot/.gitignore3
-rw-r--r--arch/arm/boot/compressed/.gitignore1
-rw-r--r--arch/arm/boot/compressed/Makefile13
-rw-r--r--arch/arm/boot/compressed/head-xscale.S5
-rw-r--r--arch/arm/boot/compressed/head.S99
-rw-r--r--arch/arm/common/locomo.c11
-rw-r--r--arch/arm/common/sa1111.c13
-rw-r--r--arch/arm/common/sharpsl_pm.c2
-rw-r--r--arch/arm/configs/badge4_defconfig1
-rw-r--r--arch/arm/configs/clps7500_defconfig1
-rw-r--r--arch/arm/configs/footbridge_defconfig1
-rw-r--r--arch/arm/configs/neponset_defconfig1
-rw-r--r--arch/arm/configs/picotux200_defconfig1
-rw-r--r--arch/arm/configs/rpc_defconfig1
-rw-r--r--arch/arm/configs/s3c2410_defconfig1
-rw-r--r--arch/arm/kernel/calls.S2
-rw-r--r--arch/arm/kernel/head-common.S40
-rw-r--r--arch/arm/kernel/head.S7
-rw-r--r--arch/arm/kernel/process.c69
-rw-r--r--arch/arm/kernel/ptrace.c15
-rw-r--r--arch/arm/kernel/setup.c6
-rw-r--r--arch/arm/kernel/sys_arm.c13
-rw-r--r--arch/arm/kernel/traps.c23
-rw-r--r--arch/arm/kernel/vmlinux.lds.S1
-rw-r--r--arch/arm/mach-at91/board-csb337.c10
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c130
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c64
-rw-r--r--arch/arm/mach-at91/clock.c5
-rw-r--r--arch/arm/mach-at91/pm.c15
-rw-r--r--arch/arm/mach-davinci/Makefile3
-rw-r--r--arch/arm/mach-davinci/board-evm.c2
-rw-r--r--arch/arm/mach-davinci/clock.c323
-rw-r--r--arch/arm/mach-davinci/clock.h33
-rw-r--r--arch/arm/mach-davinci/gpio.c286
-rw-r--r--arch/arm/mach-davinci/io.c6
-rw-r--r--arch/arm/mach-davinci/mux.c41
-rw-r--r--arch/arm/mach-davinci/psc.c87
-rw-r--r--arch/arm/mach-davinci/time.c2
-rw-r--r--arch/arm/mach-imx/generic.c118
-rw-r--r--arch/arm/mach-imx/time.c122
-rw-r--r--arch/arm/mach-iop13xx/pci.c3
-rw-r--r--arch/arm/mach-iop13xx/setup.c217
-rw-r--r--arch/arm/mach-iop13xx/tpmi.c32
-rw-r--r--arch/arm/mach-iop32x/glantank.c2
-rw-r--r--arch/arm/mach-iop32x/iq31244.c5
-rw-r--r--arch/arm/mach-iop32x/iq80321.c3
-rw-r--r--arch/arm/mach-iop32x/n2100.c12
-rw-r--r--arch/arm/mach-iop33x/iq80331.c3
-rw-r--r--arch/arm/mach-iop33x/iq80332.c3
-rw-r--r--arch/arm/mach-ixp4xx/Kconfig16
-rw-r--r--arch/arm/mach-ixp4xx/Makefile4
-rw-r--r--arch/arm/mach-ixp4xx/common.c2
-rw-r--r--arch/arm/mach-ixp4xx/gateway7001-pci.c63
-rw-r--r--arch/arm/mach-ixp4xx/gateway7001-setup.c108
-rw-r--r--arch/arm/mach-ixp4xx/gtwx5715-pci.c8
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-setup.c96
-rw-r--r--arch/arm/mach-ixp4xx/wg302v2-pci.c63
-rw-r--r--arch/arm/mach-ixp4xx/wg302v2-setup.c109
-rw-r--r--arch/arm/mach-ks8695/Makefile2
-rw-r--r--arch/arm/mach-ks8695/gpio.c218
-rw-r--r--arch/arm/mach-omap1/time.c1
-rw-r--r--arch/arm/mach-pxa/clock.c15
-rw-r--r--arch/arm/mach-pxa/corgi.c7
-rw-r--r--arch/arm/mach-pxa/devices.h11
-rw-r--r--arch/arm/mach-pxa/dma.c44
-rw-r--r--arch/arm/mach-pxa/generic.c93
-rw-r--r--arch/arm/mach-pxa/generic.h6
-rw-r--r--arch/arm/mach-pxa/idp.c3
-rw-r--r--arch/arm/mach-pxa/irq.c106
-rw-r--r--arch/arm/mach-pxa/lpd270.c3
-rw-r--r--arch/arm/mach-pxa/lubbock.c3
-rw-r--r--arch/arm/mach-pxa/mainstone.c3
-rw-r--r--arch/arm/mach-pxa/pm.c47
-rw-r--r--arch/arm/mach-pxa/poodle.c3
-rw-r--r--arch/arm/mach-pxa/pxa25x.c62
-rw-r--r--arch/arm/mach-pxa/pxa27x.c82
-rw-r--r--arch/arm/mach-pxa/spitz.c7
-rw-r--r--arch/arm/mach-pxa/time.c9
-rw-r--r--arch/arm/mach-pxa/tosa.c4
-rw-r--r--arch/arm/mach-pxa/trizeps4.c3
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c59
-rw-r--r--arch/arm/mach-s3c2440/mach-anubis.c145
-rw-r--r--arch/arm/mach-s3c2440/mach-osiris.c96
-rw-r--r--arch/arm/mach-sa1100/neponset.c15
-rw-r--r--arch/arm/mach-sa1100/pm.c9
-rw-r--r--arch/arm/mach-sa1100/time.c24
-rw-r--r--arch/arm/mach-versatile/pci.c5
-rw-r--r--arch/arm/mm/fault.c40
-rw-r--r--arch/arm/mm/ioremap.c10
-rw-r--r--arch/arm/mm/mmu.c4
-rw-r--r--arch/arm/oprofile/op_model_mpcore.c2
-rw-r--r--arch/arm/plat-iop/Makefile2
-rw-r--r--arch/arm/plat-iop/adma.c209
-rw-r--r--arch/arm/plat-omap/timer32k.c2
-rw-r--r--arch/arm/plat-s3c24xx/dma.c2
-rw-r--r--arch/arm/vfp/entry.S4
-rw-r--r--arch/arm/vfp/vfpmodule.c5
-rw-r--r--arch/arm26/Kconfig3
-rw-r--r--arch/arm26/defconfig1
-rw-r--r--arch/arm26/kernel/ptrace.c15
-rw-r--r--arch/arm26/kernel/traps.c1
-rw-r--r--arch/arm26/mm/fault.c30
-rw-r--r--arch/arm26/mm/init.c3
-rw-r--r--arch/arm26/mm/memc.c4
-rw-r--r--arch/avr32/Kconfig25
-rw-r--r--arch/avr32/boards/atngw100/setup.c3
-rw-r--r--arch/avr32/boards/atstk1000/Kconfig53
-rw-r--r--arch/avr32/boards/atstk1000/atstk1002.c51
-rw-r--r--arch/avr32/configs/atngw100_defconfig152
-rw-r--r--arch/avr32/configs/atstk1002_defconfig180
-rw-r--r--arch/avr32/kernel/ptrace.c13
-rw-r--r--arch/avr32/kernel/setup.c4
-rw-r--r--arch/avr32/kernel/traps.c3
-rw-r--r--arch/avr32/mach-at32ap/Makefile1
-rw-r--r--arch/avr32/mach-at32ap/at32ap.c31
-rw-r--r--arch/avr32/mach-at32ap/at32ap7000.c352
-rw-r--r--arch/avr32/mach-at32ap/cpufreq.c112
-rw-r--r--arch/avr32/mach-at32ap/extint.c200
-rw-r--r--arch/avr32/mach-at32ap/pm.h112
-rw-r--r--arch/avr32/mach-at32ap/sm.h242
-rw-r--r--arch/avr32/mm/cache.c14
-rw-r--r--arch/avr32/mm/fault.c25
-rw-r--r--arch/blackfin/Kconfig100
-rw-r--r--arch/blackfin/Makefile23
-rw-r--r--arch/blackfin/boot/Makefile3
-rw-r--r--arch/blackfin/configs/BF533-EZKIT_defconfig251
-rw-r--r--arch/blackfin/configs/BF533-STAMP_defconfig110
-rw-r--r--arch/blackfin/configs/BF537-STAMP_defconfig116
-rw-r--r--arch/blackfin/configs/BF548-EZKIT_defconfig (renamed from arch/blackfin/defconfig)587
-rw-r--r--arch/blackfin/configs/BF561-EZKIT_defconfig202
-rw-r--r--arch/blackfin/configs/PNAV-10_defconfig130
-rw-r--r--arch/blackfin/kernel/Makefile7
-rw-r--r--arch/blackfin/kernel/asm-offsets.c7
-rw-r--r--arch/blackfin/kernel/bfin_dma_5xx.c257
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c25
-rw-r--r--arch/blackfin/kernel/bfin_ksyms.c5
-rw-r--r--arch/blackfin/kernel/cacheinit.c66
-rw-r--r--arch/blackfin/kernel/cplbinit.c433
-rw-r--r--arch/blackfin/kernel/dma-mapping.c13
-rw-r--r--arch/blackfin/kernel/dualcore_test.c6
-rw-r--r--arch/blackfin/kernel/entry.S5
-rw-r--r--arch/blackfin/kernel/fixed_code.S132
-rw-r--r--arch/blackfin/kernel/flat.c55
-rw-r--r--arch/blackfin/kernel/irqchip.c4
-rw-r--r--arch/blackfin/kernel/kgdb.c421
-rw-r--r--arch/blackfin/kernel/module.c32
-rw-r--r--arch/blackfin/kernel/process.c75
-rw-r--r--arch/blackfin/kernel/ptrace.c6
-rw-r--r--arch/blackfin/kernel/setup.c398
-rw-r--r--arch/blackfin/kernel/signal.c10
-rw-r--r--arch/blackfin/kernel/sys_bfin.c8
-rw-r--r--arch/blackfin/kernel/time.c4
-rw-r--r--arch/blackfin/kernel/traps.c200
-rw-r--r--arch/blackfin/kernel/vmlinux.lds.S170
-rw-r--r--arch/blackfin/lib/divsi3.S3
-rw-r--r--arch/blackfin/lib/ins.S4
-rw-r--r--arch/blackfin/lib/memchr.S2
-rw-r--r--arch/blackfin/lib/memcmp.S7
-rw-r--r--arch/blackfin/lib/memcpy.S15
-rw-r--r--arch/blackfin/lib/memmove.S19
-rw-r--r--arch/blackfin/lib/memset.S2
-rw-r--r--arch/blackfin/lib/modsi3.S2
-rw-r--r--arch/blackfin/lib/outs.S3
-rw-r--r--arch/blackfin/lib/smulsi3_highpart.S2
-rw-r--r--arch/blackfin/lib/strcmp.c3
-rw-r--r--arch/blackfin/lib/strcpy.c3
-rw-r--r--arch/blackfin/lib/strncmp.c3
-rw-r--r--arch/blackfin/lib/strncpy.c3
-rw-r--r--arch/blackfin/lib/udivsi3.S2
-rw-r--r--arch/blackfin/lib/umodsi3.S4
-rw-r--r--arch/blackfin/lib/umulsi3_highpart.S2
-rw-r--r--arch/blackfin/mach-bf533/Makefile4
-rw-r--r--arch/blackfin/mach-bf533/boards/cm_bf533.c16
-rw-r--r--arch/blackfin/mach-bf533/boards/ezkit.c10
-rw-r--r--arch/blackfin/mach-bf533/boards/generic_board.c6
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c30
-rw-r--r--arch/blackfin/mach-bf533/cpu.c3
-rw-r--r--arch/blackfin/mach-bf533/dma.c95
-rw-r--r--arch/blackfin/mach-bf533/head.S35
-rw-r--r--arch/blackfin/mach-bf533/ints-priority.c4
-rw-r--r--arch/blackfin/mach-bf537/Makefile2
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537.c16
-rw-r--r--arch/blackfin/mach-bf537/boards/eth_mac.c5
-rw-r--r--arch/blackfin/mach-bf537/boards/generic_board.c38
-rw-r--r--arch/blackfin/mach-bf537/boards/pnav10.c56
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c79
-rw-r--r--arch/blackfin/mach-bf537/dma.c115
-rw-r--r--arch/blackfin/mach-bf537/head.S41
-rw-r--r--arch/blackfin/mach-bf537/ints-priority.c4
-rw-r--r--arch/blackfin/mach-bf548/Kconfig316
-rw-r--r--arch/blackfin/mach-bf548/Makefile9
-rw-r--r--arch/blackfin/mach-bf548/boards/Makefile5
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c114
-rw-r--r--arch/blackfin/mach-bf548/boards/led.S172
-rw-r--r--arch/blackfin/mach-bf548/cpu.c159
-rw-r--r--arch/blackfin/mach-bf548/dma.c156
-rw-r--r--arch/blackfin/mach-bf548/gpio.c323
-rw-r--r--arch/blackfin/mach-bf548/head.S512
-rw-r--r--arch/blackfin/mach-bf548/ints-priority.c137
-rw-r--r--arch/blackfin/mach-bf561/Makefile2
-rw-r--r--arch/blackfin/mach-bf561/boards/cm_bf561.c36
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c33
-rw-r--r--arch/blackfin/mach-bf561/boards/generic_board.c6
-rw-r--r--arch/blackfin/mach-bf561/boards/tepla.c6
-rw-r--r--arch/blackfin/mach-bf561/coreb.c18
-rw-r--r--arch/blackfin/mach-bf561/dma.c131
-rw-r--r--arch/blackfin/mach-bf561/head.S39
-rw-r--r--arch/blackfin/mach-bf561/ints-priority.c4
-rw-r--r--arch/blackfin/mach-common/Makefile4
-rw-r--r--arch/blackfin/mach-common/cache.S30
-rw-r--r--arch/blackfin/mach-common/cacheinit.S89
-rw-r--r--arch/blackfin/mach-common/cplbhdlr.S4
-rw-r--r--arch/blackfin/mach-common/cplbinfo.c15
-rw-r--r--arch/blackfin/mach-common/cplbmgr.S1
-rw-r--r--arch/blackfin/mach-common/entry.S90
-rw-r--r--arch/blackfin/mach-common/interrupt.S12
-rw-r--r--arch/blackfin/mach-common/ints-priority-dc.c15
-rw-r--r--arch/blackfin/mach-common/ints-priority-sc.c407
-rw-r--r--arch/blackfin/mach-common/lock.S4
-rw-r--r--arch/blackfin/mach-common/pm.c6
-rw-r--r--arch/blackfin/mm/blackfin_sram.c118
-rw-r--r--arch/blackfin/mm/init.c57
-rw-r--r--arch/blackfin/oprofile/common.c6
-rw-r--r--arch/blackfin/oprofile/op_model_bf533.c6
-rw-r--r--arch/blackfin/oprofile/timer_int.c3
-rw-r--r--arch/cris/arch-v10/defconfig1
-rw-r--r--arch/cris/arch-v10/drivers/pcf8563.c4
-rw-r--r--arch/cris/arch-v10/kernel/ptrace.c21
-rw-r--r--arch/cris/arch-v10/vmlinux.lds.S2
-rw-r--r--arch/cris/arch-v32/drivers/cryptocop.c8
-rw-r--r--arch/cris/arch-v32/drivers/i2c.c8
-rw-r--r--arch/cris/arch-v32/drivers/pcf8563.c12
-rw-r--r--arch/cris/arch-v32/drivers/pci/dma.c6
-rw-r--r--arch/cris/arch-v32/kernel/ptrace.c7
-rw-r--r--arch/cris/arch-v32/vmlinux.lds.S7
-rw-r--r--arch/cris/mm/fault.c23
-rw-r--r--arch/frv/Makefile2
-rw-r--r--arch/frv/kernel/entry.S4
-rw-r--r--arch/frv/kernel/gdb-stub.c12
-rw-r--r--arch/frv/kernel/ptrace.c16
-rw-r--r--arch/frv/kernel/setup.c17
-rw-r--r--arch/frv/kernel/vmlinux.lds.S5
-rw-r--r--arch/frv/mm/fault.c23
-rw-r--r--arch/h8300/Kconfig3
-rw-r--r--arch/h8300/Makefile7
-rw-r--r--arch/h8300/boot/compressed/Makefile4
-rw-r--r--arch/h8300/boot/compressed/head.S2
-rw-r--r--arch/h8300/boot/compressed/vmlinux.lds32
-rw-r--r--arch/h8300/boot/compressed/vmlinux.scr9
-rw-r--r--arch/h8300/kernel/Makefile3
-rw-r--r--arch/h8300/kernel/entry.S (renamed from arch/h8300/platform/h8s/entry.S)302
-rw-r--r--arch/h8300/kernel/ints.c256
-rw-r--r--arch/h8300/kernel/ptrace.c7
-rw-r--r--arch/h8300/kernel/signal.c6
-rw-r--r--arch/h8300/platform/h8300h/Makefile2
-rw-r--r--arch/h8300/platform/h8300h/entry.S332
-rw-r--r--arch/h8300/platform/h8s/Makefile2
-rw-r--r--arch/i386/Kconfig42
-rw-r--r--arch/i386/Kconfig.cpu11
-rw-r--r--arch/i386/Makefile4
-rw-r--r--arch/i386/boot/.gitignore2
-rw-r--r--arch/i386/boot/Makefile48
-rw-r--r--arch/i386/boot/a20.c161
-rw-r--r--arch/i386/boot/apm.c97
-rw-r--r--arch/i386/boot/bitops.h45
-rw-r--r--arch/i386/boot/boot.h296
-rw-r--r--arch/i386/boot/bootsect.S98
-rw-r--r--arch/i386/boot/cmdline.c97
-rw-r--r--arch/i386/boot/code16gcc.h15
-rw-r--r--arch/i386/boot/compressed/Makefile7
-rw-r--r--arch/i386/boot/compressed/head.S6
-rw-r--r--arch/i386/boot/compressed/relocs.c3
-rw-r--r--arch/i386/boot/copy.S101
-rw-r--r--arch/i386/boot/cpu.c69
-rw-r--r--arch/i386/boot/cpucheck.c267
-rw-r--r--arch/i386/boot/edd.S231
-rw-r--r--arch/i386/boot/edd.c196
-rw-r--r--arch/i386/boot/header.S283
-rw-r--r--arch/i386/boot/main.c161
-rw-r--r--arch/i386/boot/mca.c43
-rw-r--r--arch/i386/boot/memory.c99
-rw-r--r--arch/i386/boot/pm.c170
-rw-r--r--arch/i386/boot/pmjump.S54
-rw-r--r--arch/i386/boot/printf.c307
-rw-r--r--arch/i386/boot/setup.S1075
-rw-r--r--arch/i386/boot/setup.ld54
-rw-r--r--arch/i386/boot/string.c52
-rw-r--r--arch/i386/boot/tools/build.c162
-rw-r--r--arch/i386/boot/tty.c112
-rw-r--r--arch/i386/boot/version.c23
-rw-r--r--arch/i386/boot/vesa.h79
-rw-r--r--arch/i386/boot/video-bios.c125
-rw-r--r--arch/i386/boot/video-vesa.c284
-rw-r--r--arch/i386/boot/video-vga.c260
-rw-r--r--arch/i386/boot/video.S2043
-rw-r--r--arch/i386/boot/video.c461
-rw-r--r--arch/i386/boot/video.h152
-rw-r--r--arch/i386/boot/voyager.c46
-rw-r--r--arch/i386/defconfig265
-rw-r--r--arch/i386/kernel/Makefile1
-rw-r--r--arch/i386/kernel/acpi/boot.c53
-rw-r--r--arch/i386/kernel/acpi/sleep.c12
-rw-r--r--arch/i386/kernel/acpi/wakeup.S39
-rw-r--r--arch/i386/kernel/alternative.c14
-rw-r--r--arch/i386/kernel/apic.c10
-rw-r--r--arch/i386/kernel/apm.c2
-rw-r--r--arch/i386/kernel/asm-offsets.c29
-rw-r--r--arch/i386/kernel/cpu/Makefile3
-rw-r--r--arch/i386/kernel/cpu/addon_cpuid_features.c50
-rw-r--r--arch/i386/kernel/cpu/amd.c8
-rw-r--r--arch/i386/kernel/cpu/common.c4
-rw-r--r--arch/i386/kernel/cpu/cpufreq/Kconfig31
-rw-r--r--arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c17
-rw-r--r--arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c6
-rw-r--r--arch/i386/kernel/cpu/cpufreq/gx-suspmod.c4
-rw-r--r--arch/i386/kernel/cpu/cpufreq/longhaul.c216
-rw-r--r--arch/i386/kernel/cpu/cpufreq/longhaul.h12
-rw-r--r--arch/i386/kernel/cpu/cpufreq/powernow-k8.c29
-rw-r--r--arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c276
-rw-r--r--arch/i386/kernel/cpu/cpufreq/speedstep-ich.c4
-rw-r--r--arch/i386/kernel/cpu/intel_cacheinfo.c79
-rw-r--r--arch/i386/kernel/cpu/mcheck/non-fatal.c4
-rw-r--r--arch/i386/kernel/cpu/mcheck/therm_throt.c6
-rw-r--r--arch/i386/kernel/cpu/mtrr/cyrix.c4
-rw-r--r--arch/i386/kernel/cpu/mtrr/generic.c14
-rw-r--r--arch/i386/kernel/cpu/mtrr/main.c11
-rw-r--r--arch/i386/kernel/cpu/perfctr-watchdog.c65
-rw-r--r--arch/i386/kernel/cpu/proc.c21
-rw-r--r--arch/i386/kernel/cpu/rise.c52
-rw-r--r--arch/i386/kernel/e820.c34
-rw-r--r--arch/i386/kernel/efi.c2
-rw-r--r--arch/i386/kernel/entry.S95
-rw-r--r--arch/i386/kernel/geode.c155
-rw-r--r--arch/i386/kernel/head.S13
-rw-r--r--arch/i386/kernel/hpet.c98
-rw-r--r--arch/i386/kernel/i8253.c32
-rw-r--r--arch/i386/kernel/init_task.c2
-rw-r--r--arch/i386/kernel/io_apic.c27
-rw-r--r--arch/i386/kernel/irq.c10
-rw-r--r--arch/i386/kernel/nmi.c8
-rw-r--r--arch/i386/kernel/paravirt.c37
-rw-r--r--arch/i386/kernel/pci-dma.c27
-rw-r--r--arch/i386/kernel/process.c85
-rw-r--r--arch/i386/kernel/ptrace.c39
-rw-r--r--arch/i386/kernel/quirks.c5
-rw-r--r--arch/i386/kernel/reboot.c9
-rw-r--r--arch/i386/kernel/reboot_fixups.c13
-rw-r--r--arch/i386/kernel/setup.c25
-rw-r--r--arch/i386/kernel/smp.c5
-rw-r--r--arch/i386/kernel/smpboot.c20
-rw-r--r--arch/i386/kernel/smpcommon.c8
-rw-r--r--arch/i386/kernel/syscall_table.S1
-rw-r--r--arch/i386/kernel/sysenter.c4
-rw-r--r--arch/i386/kernel/time.c50
-rw-r--r--arch/i386/kernel/traps.c29
-rw-r--r--arch/i386/kernel/tsc.c36
-rw-r--r--arch/i386/kernel/verify_cpu.S94
-rw-r--r--arch/i386/kernel/vmi.c4
-rw-r--r--arch/i386/kernel/vmiclock.c8
-rw-r--r--arch/i386/kernel/vmlinux.lds.S8
-rw-r--r--arch/i386/kernel/vsyscall-note.S52
-rw-r--r--arch/i386/lib/Makefile2
-rw-r--r--arch/i386/lib/string.c257
-rw-r--r--arch/i386/mach-es7000/es7000plat.c48
-rw-r--r--arch/i386/mach-generic/es7000.c2
-rw-r--r--arch/i386/mach-visws/traps.c4
-rw-r--r--arch/i386/mach-voyager/voyager_thread.c2
-rw-r--r--arch/i386/math-emu/fpu_entry.c2
-rw-r--r--arch/i386/mm/fault.c28
-rw-r--r--arch/i386/mm/init.c16
-rw-r--r--arch/i386/mm/ioremap.c2
-rw-r--r--arch/i386/mm/pageattr.c50
-rw-r--r--arch/i386/mm/pgtable.c6
-rw-r--r--arch/i386/pci/acpi.c32
-rw-r--r--arch/i386/pci/common.c13
-rw-r--r--arch/i386/pci/fixup.c9
-rw-r--r--arch/i386/pci/mmconfig-shared.c48
-rw-r--r--arch/i386/video/Makefile1
-rw-r--r--arch/i386/video/fbdev.c32
-rw-r--r--arch/i386/xen/Kconfig11
-rw-r--r--arch/i386/xen/Makefile4
-rw-r--r--arch/i386/xen/enlighten.c1144
-rw-r--r--arch/i386/xen/events.c591
-rw-r--r--arch/i386/xen/features.c29
-rw-r--r--arch/i386/xen/manage.c143
-rw-r--r--arch/i386/xen/mmu.c564
-rw-r--r--arch/i386/xen/mmu.h60
-rw-r--r--arch/i386/xen/multicalls.c90
-rw-r--r--arch/i386/xen/multicalls.h45
-rw-r--r--arch/i386/xen/setup.c111
-rw-r--r--arch/i386/xen/smp.c404
-rw-r--r--arch/i386/xen/time.c593
-rw-r--r--arch/i386/xen/vdso.h4
-rw-r--r--arch/i386/xen/xen-asm.S291
-rw-r--r--arch/i386/xen/xen-head.S36
-rw-r--r--arch/i386/xen/xen-ops.h71
-rw-r--r--arch/ia64/Kconfig16
-rw-r--r--arch/ia64/configs/bigsur_defconfig2
-rw-r--r--arch/ia64/configs/gensparse_defconfig2
-rw-r--r--arch/ia64/configs/sim_defconfig2
-rw-r--r--arch/ia64/configs/sn2_defconfig2
-rw-r--r--arch/ia64/configs/tiger_defconfig322
-rw-r--r--arch/ia64/configs/zx1_defconfig2
-rw-r--r--arch/ia64/defconfig338
-rw-r--r--arch/ia64/hp/common/sba_iommu.c20
-rw-r--r--arch/ia64/hp/sim/boot/fw-emu.c5
-rw-r--r--arch/ia64/hp/sim/simserial.c4
-rw-r--r--arch/ia64/ia32/binfmt_elf32.c67
-rw-r--r--arch/ia64/ia32/ia32_entry.S2
-rw-r--r--arch/ia64/ia32/ia32_support.c2
-rw-r--r--arch/ia64/kernel/asm-offsets.c35
-rw-r--r--arch/ia64/kernel/cyclone.c46
-rw-r--r--arch/ia64/kernel/efi.c1
-rw-r--r--arch/ia64/kernel/entry.S2
-rw-r--r--arch/ia64/kernel/fsys.S181
-rw-r--r--arch/ia64/kernel/fsyscall_gtod_data.h23
-rw-r--r--arch/ia64/kernel/gate.S1
-rw-r--r--arch/ia64/kernel/iosapic.c652
-rw-r--r--arch/ia64/kernel/irq.c2
-rw-r--r--arch/ia64/kernel/irq_ia64.c317
-rw-r--r--arch/ia64/kernel/kprobes.c7
-rw-r--r--arch/ia64/kernel/mca.c60
-rw-r--r--arch/ia64/kernel/mca_asm.S12
-rw-r--r--arch/ia64/kernel/mca_drv_asm.S6
-rw-r--r--arch/ia64/kernel/msi_ia64.c23
-rw-r--r--arch/ia64/kernel/process.c3
-rw-r--r--arch/ia64/kernel/setup.c19
-rw-r--r--arch/ia64/kernel/smp.c2
-rw-r--r--arch/ia64/kernel/smpboot.c4
-rw-r--r--arch/ia64/kernel/time.c97
-rw-r--r--arch/ia64/kernel/traps.c1
-rw-r--r--arch/ia64/kernel/unwind.c16
-rw-r--r--arch/ia64/kernel/vmlinux.lds.S1
-rw-r--r--arch/ia64/lib/checksum.c1
-rw-r--r--arch/ia64/mm/fault.c26
-rw-r--r--arch/ia64/mm/hugetlbpage.c3
-rw-r--r--arch/ia64/mm/tlb.c2
-rw-r--r--arch/ia64/pci/pci.c22
-rw-r--r--arch/ia64/sn/kernel/io_acpi_init.c17
-rw-r--r--arch/ia64/sn/kernel/io_init.c20
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c3
-rw-r--r--arch/ia64/sn/kernel/sn2/timer.c29
-rw-r--r--arch/ia64/sn/kernel/tiocx.c2
-rw-r--r--arch/ia64/sn/kernel/xp_nofault.S3
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_provider.c9
-rw-r--r--arch/ia64/sn/pci/tioca_provider.c4
-rw-r--r--arch/ia64/sn/pci/tioce_provider.c4
-rw-r--r--arch/m32r/Kconfig3
-rw-r--r--arch/m32r/kernel/ptrace.c19
-rw-r--r--arch/m32r/kernel/vmlinux.lds.S5
-rw-r--r--arch/m32r/m32104ut/defconfig.m32104ut1
-rw-r--r--arch/m32r/mm/fault.c23
-rw-r--r--arch/m68k/Kconfig10
-rw-r--r--arch/m68k/apollo/config.c4
-rw-r--r--arch/m68k/apollo/dn_ints.c2
-rw-r--r--arch/m68k/atari/atakeyb.c9
-rw-r--r--arch/m68k/bvme6000/config.c2
-rw-r--r--arch/m68k/kernel/head.S2
-rw-r--r--arch/m68k/kernel/ptrace.c8
-rw-r--r--arch/m68k/kernel/setup.c1
-rw-r--r--arch/m68k/kernel/sun3-head.S2
-rw-r--r--arch/m68k/kernel/time.c2
-rw-r--r--arch/m68k/kernel/traps.c1
-rw-r--r--arch/m68k/kernel/vmlinux-std.lds1
-rw-r--r--arch/m68k/kernel/vmlinux-sun3.lds2
-rw-r--r--arch/m68k/lib/checksum.c1
-rw-r--r--arch/m68k/mac/config.c7
-rw-r--r--arch/m68k/mac/macints.c4
-rw-r--r--arch/m68k/mm/fault.c21
-rw-r--r--arch/m68k/mm/init.c2
-rw-r--r--arch/m68k/mm/sun3kmap.c2
-rw-r--r--arch/m68k/mvme147/config.c2
-rw-r--r--arch/m68k/mvme16x/config.c2
-rw-r--r--arch/m68k/q40/q40ints.c2
-rw-r--r--arch/m68k/sun3/sun3ints.c2
-rw-r--r--arch/m68k/sun3x/prom.c2
-rw-r--r--arch/m68knommu/Kconfig4
-rw-r--r--arch/m68knommu/kernel/Makefile4
-rw-r--r--arch/m68knommu/kernel/asm-offsets.c5
-rw-r--r--arch/m68knommu/kernel/irq.c82
-rw-r--r--arch/m68knommu/kernel/m68k_ksyms.c2
-rw-r--r--arch/m68knommu/kernel/process.c2
-rw-r--r--arch/m68knommu/kernel/ptrace.c17
-rw-r--r--arch/m68knommu/kernel/setup.c106
-rw-r--r--arch/m68knommu/kernel/traps.c5
-rw-r--r--arch/m68knommu/mm/memory.c100
-rw-r--r--arch/m68knommu/platform/5307/Makefile2
-rw-r--r--arch/m68knommu/platform/5307/entry.S42
-rw-r--r--arch/m68knommu/platform/5307/ints.c279
-rw-r--r--arch/m68knommu/platform/5307/timers.c10
-rw-r--r--arch/m68knommu/platform/5307/vectors.c29
-rw-r--r--arch/m68knommu/platform/68328/entry.S10
-rw-r--r--arch/m68knommu/platform/68328/ints.c130
-rw-r--r--arch/m68knommu/platform/68360/entry.S6
-rw-r--r--arch/m68knommu/platform/68360/ints.c233
-rw-r--r--arch/mips/Kconfig241
-rw-r--r--arch/mips/Kconfig.debug2
-rw-r--r--arch/mips/Makefile84
-rw-r--r--arch/mips/au1000/common/gpio.c124
-rw-r--r--arch/mips/au1000/common/platform.c2
-rw-r--r--arch/mips/au1000/common/setup.c9
-rw-r--r--arch/mips/au1000/common/time.c29
-rw-r--r--arch/mips/au1000/pb1100/init.c2
-rw-r--r--arch/mips/au1000/pb1200/board_setup.c9
-rw-r--r--arch/mips/au1000/pb1500/board_setup.c2
-rw-r--r--arch/mips/basler/excite/excite_setup.c1
-rw-r--r--arch/mips/cobalt/pci.c1
-rw-r--r--arch/mips/configs/atlas_defconfig4
-rw-r--r--arch/mips/configs/bigsur_defconfig4
-rw-r--r--arch/mips/configs/capcella_defconfig4
-rw-r--r--arch/mips/configs/cobalt_defconfig502
-rw-r--r--arch/mips/configs/db1000_defconfig4
-rw-r--r--arch/mips/configs/db1100_defconfig4
-rw-r--r--arch/mips/configs/db1200_defconfig4
-rw-r--r--arch/mips/configs/db1500_defconfig4
-rw-r--r--arch/mips/configs/db1550_defconfig4
-rw-r--r--arch/mips/configs/ddb5477_defconfig4
-rw-r--r--arch/mips/configs/decstation_defconfig4
-rw-r--r--arch/mips/configs/e55_defconfig4
-rw-r--r--arch/mips/configs/emma2rh_defconfig7
-rw-r--r--arch/mips/configs/ev64120_defconfig985
-rw-r--r--arch/mips/configs/excite_defconfig4
-rw-r--r--arch/mips/configs/fulong_defconfig1765
-rw-r--r--arch/mips/configs/ip22_defconfig4
-rw-r--r--arch/mips/configs/ip27_defconfig4
-rw-r--r--arch/mips/configs/ip32_defconfig4
-rw-r--r--arch/mips/configs/jazz_defconfig6
-rw-r--r--arch/mips/configs/jmr3927_defconfig4
-rw-r--r--arch/mips/configs/lasat200_defconfig1118
-rw-r--r--arch/mips/configs/malta_defconfig4
-rw-r--r--arch/mips/configs/mipssim_defconfig37
-rw-r--r--arch/mips/configs/mpc30x_defconfig4
-rw-r--r--arch/mips/configs/msp71xx_defconfig (renamed from arch/mips/configs/ocelot_3_defconfig)972
-rw-r--r--arch/mips/configs/ocelot_c_defconfig982
-rw-r--r--arch/mips/configs/ocelot_defconfig4
-rw-r--r--arch/mips/configs/pb1100_defconfig4
-rw-r--r--arch/mips/configs/pb1500_defconfig4
-rw-r--r--arch/mips/configs/pb1550_defconfig4
-rw-r--r--arch/mips/configs/pnx8550-jbs_defconfig4
-rw-r--r--arch/mips/configs/pnx8550-stb810_defconfig4
-rw-r--r--arch/mips/configs/qemu_defconfig6
-rw-r--r--arch/mips/configs/rbhma4200_defconfig4
-rw-r--r--arch/mips/configs/rbhma4500_defconfig945
-rw-r--r--arch/mips/configs/rm200_defconfig6
-rw-r--r--arch/mips/configs/sb1250-swarm_defconfig4
-rw-r--r--arch/mips/configs/sead_defconfig4
-rw-r--r--arch/mips/configs/tb0219_defconfig4
-rw-r--r--arch/mips/configs/tb0226_defconfig4
-rw-r--r--arch/mips/configs/tb0287_defconfig4
-rw-r--r--arch/mips/configs/workpad_defconfig4
-rw-r--r--arch/mips/configs/wrppmc_defconfig4
-rw-r--r--arch/mips/configs/yosemite_defconfig6
-rw-r--r--arch/mips/ddb5xxx/ddb5477/Makefile3
-rw-r--r--arch/mips/ddb5xxx/ddb5477/ddb5477-platform.c49
-rw-r--r--arch/mips/dec/prom/console.c32
-rw-r--r--arch/mips/dec/prom/init.c5
-rw-r--r--arch/mips/dec/reset.c10
-rw-r--r--arch/mips/defconfig4
-rw-r--r--arch/mips/emma2rh/markeins/setup.c24
-rw-r--r--arch/mips/gt64120/ev64120/Kconfig3
-rw-r--r--arch/mips/gt64120/ev64120/Makefile9
-rw-r--r--arch/mips/gt64120/ev64120/irq.c116
-rw-r--r--arch/mips/gt64120/ev64120/promcon.c48
-rw-r--r--arch/mips/gt64120/ev64120/reset.c45
-rw-r--r--arch/mips/gt64120/ev64120/serialGT.c212
-rw-r--r--arch/mips/gt64120/ev64120/setup.c99
-rw-r--r--arch/mips/gt64120/momenco_ocelot/Makefile2
-rw-r--r--arch/mips/gt64120/momenco_ocelot/ocelot-platform.c46
-rw-r--r--arch/mips/gt64120/wrppmc/setup.c5
-rw-r--r--arch/mips/jazz/Makefile2
-rw-r--r--arch/mips/jazz/jazz-platform.c60
-rw-r--r--arch/mips/jazz/setup.c2
-rw-r--r--arch/mips/kernel/8250-platform.c47
-rw-r--r--arch/mips/kernel/Makefile19
-rw-r--r--arch/mips/kernel/branch.c5
-rw-r--r--arch/mips/kernel/cpu-probe.c83
-rw-r--r--arch/mips/kernel/entry.S2
-rw-r--r--arch/mips/kernel/genex.S2
-rw-r--r--arch/mips/kernel/head.S10
-rw-r--r--arch/mips/kernel/irq-mv6434x.c111
-rw-r--r--arch/mips/kernel/linux32.c10
-rw-r--r--arch/mips/kernel/mips-mt-fpaff.c176
-rw-r--r--arch/mips/kernel/mips-mt.c205
-rw-r--r--arch/mips/kernel/pcspeaker.c (renamed from arch/mips/kernel/i8253.c)0
-rw-r--r--arch/mips/kernel/proc.c2
-rw-r--r--arch/mips/kernel/process.c18
-rw-r--r--arch/mips/kernel/ptrace.c18
-rw-r--r--arch/mips/kernel/r4k_switch.S9
-rw-r--r--arch/mips/kernel/scall32-o32.S6
-rw-r--r--arch/mips/kernel/scall64-64.S4
-rw-r--r--arch/mips/kernel/scall64-n32.S6
-rw-r--r--arch/mips/kernel/scall64-o32.S6
-rw-r--r--arch/mips/kernel/setup.c16
-rw-r--r--arch/mips/kernel/signal32.c62
-rw-r--r--arch/mips/kernel/signal_n32.c6
-rw-r--r--arch/mips/kernel/smp-mt.c16
-rw-r--r--arch/mips/kernel/smp.c15
-rw-r--r--arch/mips/kernel/smtc-asm.S3
-rw-r--r--arch/mips/kernel/smtc.c12
-rw-r--r--arch/mips/kernel/syscall.c5
-rw-r--r--arch/mips/kernel/time.c49
-rw-r--r--arch/mips/kernel/traps.c135
-rw-r--r--arch/mips/kernel/unaligned.c41
-rw-r--r--arch/mips/kernel/vmlinux.lds.S5
-rw-r--r--arch/mips/kernel/vpe.c4
-rw-r--r--arch/mips/lasat/Kconfig15
-rw-r--r--arch/mips/lasat/Makefile14
-rw-r--r--arch/mips/lasat/at93c.c148
-rw-r--r--arch/mips/lasat/at93c.h18
-rw-r--r--arch/mips/lasat/ds1603.c183
-rw-r--r--arch/mips/lasat/ds1603.h33
-rw-r--r--arch/mips/lasat/image/Makefile53
-rw-r--r--arch/mips/lasat/image/head.S31
-rw-r--r--arch/mips/lasat/image/romscript.normal23
-rw-r--r--arch/mips/lasat/interrupt.c130
-rw-r--r--arch/mips/lasat/lasat_board.c279
-rw-r--r--arch/mips/lasat/lasat_models.h63
-rw-r--r--arch/mips/lasat/picvue.c240
-rw-r--r--arch/mips/lasat/picvue.h48
-rw-r--r--arch/mips/lasat/picvue_proc.c186
-rw-r--r--arch/mips/lasat/prom.c117
-rw-r--r--arch/mips/lasat/prom.h5
-rw-r--r--arch/mips/lasat/reset.c69
-rw-r--r--arch/mips/lasat/setup.c182
-rw-r--r--arch/mips/lasat/sysctl.c441
-rw-r--r--arch/mips/lasat/sysctl.h24
-rw-r--r--arch/mips/lemote/lm2e/Makefile7
-rw-r--r--arch/mips/lemote/lm2e/bonito-irq.c74
-rw-r--r--arch/mips/lemote/lm2e/dbg_io.c146
-rw-r--r--arch/mips/lemote/lm2e/irq.c145
-rw-r--r--arch/mips/lemote/lm2e/mem.c23
-rw-r--r--arch/mips/lemote/lm2e/pci.c93
-rw-r--r--arch/mips/lemote/lm2e/prom.c104
-rw-r--r--arch/mips/lemote/lm2e/reset.c41
-rw-r--r--arch/mips/lemote/lm2e/setup.c134
-rw-r--r--arch/mips/lib-32/Makefile23
-rw-r--r--arch/mips/lib-32/dump_tlb.c242
-rw-r--r--arch/mips/lib-32/r3k_dump_tlb.c182
-rw-r--r--arch/mips/lib-32/watch.S60
-rw-r--r--arch/mips/lib-64/Makefile23
-rw-r--r--arch/mips/lib-64/dump_tlb.c216
-rw-r--r--arch/mips/lib-64/watch.S57
-rw-r--r--arch/mips/lib/Makefile21
-rw-r--r--arch/mips/lib/dump_tlb.c101
-rw-r--r--arch/mips/lib/r3k_dump_tlb.c63
-rw-r--r--arch/mips/lib/ucmpdi2.c2
-rw-r--r--arch/mips/lib/uncached.c1
-rw-r--r--arch/mips/math-emu/cp1emu.c53
-rw-r--r--arch/mips/math-emu/dsemul.c12
-rw-r--r--arch/mips/mips-boards/atlas/atlas_int.c13
-rw-r--r--arch/mips/mips-boards/atlas/atlas_setup.c3
-rw-r--r--arch/mips/mips-boards/generic/display.c24
-rw-r--r--arch/mips/mips-boards/generic/init.c62
-rw-r--r--arch/mips/mips-boards/generic/pci.c20
-rw-r--r--arch/mips/mips-boards/generic/time.c142
-rw-r--r--arch/mips/mips-boards/malta/Makefile3
-rw-r--r--arch/mips/mips-boards/malta/malta_int.c56
-rw-r--r--arch/mips/mips-boards/malta/malta_platform.c65
-rw-r--r--arch/mips/mips-boards/malta/malta_setup.c10
-rw-r--r--arch/mips/mips-boards/sead/sead_int.c2
-rw-r--r--arch/mips/mips-boards/sead/sead_setup.c5
-rw-r--r--arch/mips/mips-boards/sim/sim_int.c2
-rw-r--r--arch/mips/mipssim/Makefile (renamed from arch/mips/mips-boards/sim/Makefile)0
-rw-r--r--arch/mips/mipssim/sim_cmdline.c (renamed from arch/mips/mips-boards/sim/sim_cmdline.c)0
-rw-r--r--arch/mips/mipssim/sim_console.c (renamed from arch/mips/mips-boards/sim/sim_console.c)2
-rw-r--r--arch/mips/mipssim/sim_int.c88
-rw-r--r--arch/mips/mipssim/sim_mem.c (renamed from arch/mips/mips-boards/sim/sim_mem.c)2
-rw-r--r--arch/mips/mipssim/sim_platform.c (renamed from arch/mips/mips-boards/sim/sim_platform.c)0
-rw-r--r--arch/mips/mipssim/sim_setup.c (renamed from arch/mips/mips-boards/sim/sim_setup.c)11
-rw-r--r--arch/mips/mipssim/sim_smp.c (renamed from arch/mips/mips-boards/sim/sim_smp.c)18
-rw-r--r--arch/mips/mipssim/sim_time.c (renamed from arch/mips/mips-boards/sim/sim_time.c)37
-rw-r--r--arch/mips/mm/Makefile1
-rw-r--r--arch/mips/mm/c-r4k.c54
-rw-r--r--arch/mips/mm/c-sb1.c2
-rw-r--r--arch/mips/mm/cache.c10
-rw-r--r--arch/mips/mm/dma-default.c5
-rw-r--r--arch/mips/mm/fault.c23
-rw-r--r--arch/mips/mm/tlb-r4k.c23
-rw-r--r--arch/mips/mm/tlbex.c8
-rw-r--r--arch/mips/momentum/ocelot_3/Makefile8
-rw-r--r--arch/mips/momentum/ocelot_3/irq.c109
-rw-r--r--arch/mips/momentum/ocelot_3/platform.c208
-rw-r--r--arch/mips/momentum/ocelot_3/prom.c189
-rw-r--r--arch/mips/momentum/ocelot_3/reset.c59
-rw-r--r--arch/mips/momentum/ocelot_3/setup.c398
-rw-r--r--arch/mips/momentum/ocelot_c/Makefile8
-rw-r--r--arch/mips/momentum/ocelot_c/cpci-irq.c100
-rw-r--r--arch/mips/momentum/ocelot_c/dbg_io.c121
-rw-r--r--arch/mips/momentum/ocelot_c/irq.c107
-rw-r--r--arch/mips/momentum/ocelot_c/platform.c183
-rw-r--r--arch/mips/momentum/ocelot_c/prom.c183
-rw-r--r--arch/mips/momentum/ocelot_c/reset.c58
-rw-r--r--arch/mips/momentum/ocelot_c/setup.c362
-rw-r--r--arch/mips/momentum/ocelot_c/uart-irq.c91
-rw-r--r--arch/mips/oprofile/op_model_mipsxx.c7
-rw-r--r--arch/mips/pci/Makefile12
-rw-r--r--arch/mips/pci/fixup-atlas.c2
-rw-r--r--arch/mips/pci/fixup-au1000.c2
-rw-r--r--arch/mips/pci/fixup-capcella.c2
-rw-r--r--arch/mips/pci/fixup-cobalt.c12
-rw-r--r--arch/mips/pci/fixup-emma2rh.c2
-rw-r--r--arch/mips/pci/fixup-excite.c2
-rw-r--r--arch/mips/pci/fixup-ip32.c2
-rw-r--r--arch/mips/pci/fixup-jmr3927.c2
-rw-r--r--arch/mips/pci/fixup-lm2e.c242
-rw-r--r--arch/mips/pci/fixup-malta.c2
-rw-r--r--arch/mips/pci/fixup-mpc30x.c2
-rw-r--r--arch/mips/pci/fixup-ocelot-c.c41
-rw-r--r--arch/mips/pci/fixup-ocelot3.c41
-rw-r--r--arch/mips/pci/fixup-pmcmsp.c216
-rw-r--r--arch/mips/pci/fixup-pnx8550.c2
-rw-r--r--arch/mips/pci/fixup-rbtx4927.c2
-rw-r--r--arch/mips/pci/fixup-sni.c2
-rw-r--r--arch/mips/pci/fixup-tb0219.c2
-rw-r--r--arch/mips/pci/fixup-tb0226.c2
-rw-r--r--arch/mips/pci/fixup-tb0287.c2
-rw-r--r--arch/mips/pci/fixup-tx4938.c2
-rw-r--r--arch/mips/pci/fixup-vr4133.c2
-rw-r--r--arch/mips/pci/fixup-wrppmc.c2
-rw-r--r--arch/mips/pci/fixup-yosemite.c2
-rw-r--r--arch/mips/pci/ops-bonito64.c88
-rw-r--r--arch/mips/pci/ops-marvell.c93
-rw-r--r--arch/mips/pci/ops-nile4.c147
-rw-r--r--arch/mips/pci/ops-pmcmsp.c994
-rw-r--r--arch/mips/pci/ops-tx4938.c80
-rw-r--r--arch/mips/pci/pci-bcm1480.c3
-rw-r--r--arch/mips/pci/pci-dac.c79
-rw-r--r--arch/mips/pci/pci-ddb5477.c2
-rw-r--r--arch/mips/pci/pci-ev64120.c22
-rw-r--r--arch/mips/pci/pci-ip27.c2
-rw-r--r--arch/mips/pci/pci-lasat.c91
-rw-r--r--arch/mips/pci/pci-ocelot-c.c145
-rw-r--r--arch/mips/pci/pci-sb1250.c2
-rw-r--r--arch/mips/pci/pci.c2
-rw-r--r--arch/mips/philips/pnx8550/common/platform.c2
-rw-r--r--arch/mips/philips/pnx8550/common/proc.c30
-rw-r--r--arch/mips/pmc-sierra/Kconfig46
-rw-r--r--arch/mips/pmc-sierra/msp71xx/Makefile11
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_elb.c (renamed from arch/mips/momentum/ocelot_c/ocelot_c_fpga.h)53
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_hwbutton.c179
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_irq.c124
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c134
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c109
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_pci.c (renamed from arch/mips/momentum/ocelot_3/ocelot_3_fpga.h)57
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_prom.c566
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_serial.c1
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_setup.c256
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_time.c94
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_usb.c150
-rw-r--r--arch/mips/pmc-sierra/yosemite/setup.c1
-rw-r--r--arch/mips/pmc-sierra/yosemite/smp.c2
-rw-r--r--arch/mips/qemu/q-irq.c2
-rw-r--r--arch/mips/sgi-ip22/ip22-reset.c6
-rw-r--r--arch/mips/sgi-ip27/ip27-berr.c1
-rw-r--r--arch/mips/sgi-ip27/ip27-memory.c2
-rw-r--r--arch/mips/sgi-ip32/ip32-platform.c52
-rw-r--r--arch/mips/sgi-ip32/ip32-setup.c36
-rw-r--r--arch/mips/sibyte/bcm1480/setup.c1
-rw-r--r--arch/mips/sibyte/cfe/setup.c6
-rw-r--r--arch/mips/sibyte/sb1250/setup.c1
-rw-r--r--arch/mips/sibyte/swarm/time.c244
-rw-r--r--arch/mips/sni/Makefile2
-rw-r--r--arch/mips/sni/a20r.c39
-rw-r--r--arch/mips/sni/ds1216.c81
-rw-r--r--arch/mips/sni/pcimt.c44
-rw-r--r--arch/mips/sni/pcit.c26
-rw-r--r--arch/mips/sni/rm200.c36
-rw-r--r--arch/mips/sni/setup.c33
-rw-r--r--arch/mips/sni/sniprom.c5
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c19
-rw-r--r--arch/mips/tx4938/common/Makefile2
-rw-r--r--arch/mips/tx4938/common/rtc_rx5c348.c192
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/Makefile2
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/irq.c6
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/setup.c306
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c261
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c164
-rw-r--r--arch/mips/vr41xx/common/Makefile2
-rw-r--r--arch/mips/vr41xx/common/giu.c122
-rw-r--r--arch/mips/vr41xx/common/rtc.c117
-rw-r--r--arch/mips/vr41xx/common/siu.c120
-rw-r--r--arch/parisc/hpux/fs.c5
-rw-r--r--arch/parisc/kernel/entry.S40
-rw-r--r--arch/parisc/kernel/firmware.c4
-rw-r--r--arch/parisc/kernel/hardware.c14
-rw-r--r--arch/parisc/kernel/hpmc.S5
-rw-r--r--arch/parisc/kernel/irq.c26
-rw-r--r--arch/parisc/kernel/pci-dma.c94
-rw-r--r--arch/parisc/kernel/perf.c18
-rw-r--r--arch/parisc/kernel/process.c4
-rw-r--r--arch/parisc/kernel/processor.c14
-rw-r--r--arch/parisc/kernel/ptrace.c13
-rw-r--r--arch/parisc/kernel/setup.c5
-rw-r--r--arch/parisc/kernel/signal32.h2
-rw-r--r--arch/parisc/kernel/smp.c8
-rw-r--r--arch/parisc/kernel/sys_parisc32.c13
-rw-r--r--arch/parisc/kernel/syscall.S12
-rw-r--r--arch/parisc/kernel/syscall_table.S16
-rw-r--r--arch/parisc/kernel/time.c2
-rw-r--r--arch/parisc/kernel/traps.c12
-rw-r--r--arch/parisc/kernel/unwind.c49
-rw-r--r--arch/parisc/kernel/vmlinux.lds.S7
-rw-r--r--arch/parisc/math-emu/dbl_float.h4
-rw-r--r--arch/parisc/math-emu/dfsqrt.c2
-rw-r--r--arch/parisc/math-emu/sfsqrt.c2
-rw-r--r--arch/parisc/math-emu/sgl_float.h4
-rw-r--r--arch/parisc/mm/fault.c23
-rw-r--r--arch/parisc/mm/init.c10
-rw-r--r--arch/powerpc/Kconfig283
-rw-r--r--arch/powerpc/Makefile11
-rw-r--r--arch/powerpc/boot/44x.c45
-rw-r--r--arch/powerpc/boot/44x.h3
-rw-r--r--arch/powerpc/boot/Makefile99
-rw-r--r--arch/powerpc/boot/crt0.S1
-rw-r--r--arch/powerpc/boot/cuboot-83xx.c13
-rw-r--r--arch/powerpc/boot/cuboot-85xx.c13
-rw-r--r--arch/powerpc/boot/cuboot-ebony.c16
-rw-r--r--arch/powerpc/boot/cuboot.c35
-rw-r--r--arch/powerpc/boot/cuboot.h14
-rw-r--r--arch/powerpc/boot/dcr.h37
-rw-r--r--arch/powerpc/boot/dts/ebony.dts12
-rw-r--r--arch/powerpc/boot/dts/holly.dts52
-rw-r--r--arch/powerpc/boot/dts/mpc7448hpc2.dts33
-rw-r--r--arch/powerpc/boot/dts/mpc8272ads.dts42
-rw-r--r--arch/powerpc/boot/dts/mpc832x_mds.dts16
-rw-r--r--arch/powerpc/boot/dts/mpc832x_rdb.dts16
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitx.dts10
-rw-r--r--arch/powerpc/boot/dts/mpc834x_mds.dts10
-rw-r--r--arch/powerpc/boot/dts/mpc836x_mds.dts16
-rw-r--r--arch/powerpc/boot/dts/mpc8540ads.dts147
-rw-r--r--arch/powerpc/boot/dts/mpc8541cds.dts90
-rw-r--r--arch/powerpc/boot/dts/mpc8544ds.dts18
-rw-r--r--arch/powerpc/boot/dts/mpc8548cds.dts108
-rw-r--r--arch/powerpc/boot/dts/mpc8555cds.dts90
-rw-r--r--arch/powerpc/boot/dts/mpc8560ads.dts148
-rw-r--r--arch/powerpc/boot/dts/mpc8568mds.dts66
-rw-r--r--arch/powerpc/boot/dts/mpc8641_hpcn.dts151
-rw-r--r--arch/powerpc/boot/dts/mpc866ads.dts31
-rw-r--r--arch/powerpc/boot/dts/mpc885ads.dts54
-rw-r--r--arch/powerpc/boot/dts/prpmc2800.dts2
-rw-r--r--arch/powerpc/boot/dts/ps3.dts68
-rw-r--r--arch/powerpc/boot/ebony.c19
-rw-r--r--arch/powerpc/boot/main.c2
-rw-r--r--arch/powerpc/boot/of.c212
-rw-r--r--arch/powerpc/boot/of.h21
-rw-r--r--arch/powerpc/boot/ofconsole.c45
-rw-r--r--arch/powerpc/boot/oflib.c202
-rw-r--r--arch/powerpc/boot/ops.h4
-rw-r--r--arch/powerpc/boot/ps3-head.S82
-rw-r--r--arch/powerpc/boot/ps3-hvcall.S186
-rw-r--r--arch/powerpc/boot/ps3.c161
-rw-r--r--arch/powerpc/boot/serial.c2
-rw-r--r--arch/powerpc/boot/stdio.c10
-rw-r--r--arch/powerpc/boot/types.h4
-rwxr-xr-xarch/powerpc/boot/wrapper59
-rw-r--r--arch/powerpc/boot/zImage.ps3.lds.S50
-rw-r--r--arch/powerpc/configs/cell_defconfig246
-rw-r--r--arch/powerpc/configs/celleb_defconfig169
-rw-r--r--arch/powerpc/configs/chrp32_defconfig353
-rw-r--r--arch/powerpc/configs/ebony_defconfig138
-rw-r--r--arch/powerpc/configs/g5_defconfig342
-rw-r--r--arch/powerpc/configs/holly_defconfig131
-rw-r--r--arch/powerpc/configs/iseries_defconfig36
-rw-r--r--arch/powerpc/configs/linkstation_defconfig384
-rw-r--r--arch/powerpc/configs/lite5200_defconfig182
-rw-r--r--arch/powerpc/configs/maple_defconfig248
-rw-r--r--arch/powerpc/configs/mpc7448_hpc2_defconfig212
-rw-r--r--arch/powerpc/configs/mpc8272_ads_defconfig293
-rw-r--r--arch/powerpc/configs/mpc8313_rdb_defconfig310
-rw-r--r--arch/powerpc/configs/mpc832x_mds_defconfig176
-rw-r--r--arch/powerpc/configs/mpc832x_rdb_defconfig229
-rw-r--r--arch/powerpc/configs/mpc834x_itx_defconfig265
-rw-r--r--arch/powerpc/configs/mpc834x_itxgp_defconfig232
-rw-r--r--arch/powerpc/configs/mpc834x_mds_defconfig195
-rw-r--r--arch/powerpc/configs/mpc836x_mds_defconfig176
-rw-r--r--arch/powerpc/configs/mpc8540_ads_defconfig201
-rw-r--r--arch/powerpc/configs/mpc8544_ds_defconfig193
-rw-r--r--arch/powerpc/configs/mpc8560_ads_defconfig201
-rw-r--r--arch/powerpc/configs/mpc8568mds_defconfig191
-rw-r--r--arch/powerpc/configs/mpc85xx_cds_defconfig206
-rw-r--r--arch/powerpc/configs/mpc8641_hpcn_defconfig200
-rw-r--r--arch/powerpc/configs/mpc866_ads_defconfig213
-rw-r--r--arch/powerpc/configs/mpc885_ads_defconfig222
-rw-r--r--arch/powerpc/configs/pasemi_defconfig58
-rw-r--r--arch/powerpc/configs/pmac32_defconfig375
-rw-r--r--arch/powerpc/configs/ppc64_defconfig460
-rw-r--r--arch/powerpc/configs/prpmc2800_defconfig98
-rw-r--r--arch/powerpc/configs/ps3_defconfig131
-rw-r--r--arch/powerpc/configs/pseries_defconfig387
-rw-r--r--arch/powerpc/kernel/Makefile7
-rw-r--r--arch/powerpc/kernel/cputable.c35
-rw-r--r--arch/powerpc/kernel/crash.c67
-rw-r--r--arch/powerpc/kernel/head_32.S122
-rw-r--r--arch/powerpc/kernel/head_64.S4
-rw-r--r--arch/powerpc/kernel/io.c12
-rw-r--r--arch/powerpc/kernel/irq.c72
-rw-r--r--arch/powerpc/kernel/isa-bridge.c271
-rw-r--r--arch/powerpc/kernel/kprobes.c11
-rw-r--r--arch/powerpc/kernel/lparcfg.c3
-rw-r--r--arch/powerpc/kernel/misc_32.S10
-rw-r--r--arch/powerpc/kernel/misc_64.S26
-rw-r--r--arch/powerpc/kernel/of_device.c122
-rw-r--r--arch/powerpc/kernel/of_platform.c93
-rw-r--r--arch/powerpc/kernel/pci-common.c457
-rw-r--r--arch/powerpc/kernel/pci_32.c510
-rw-r--r--arch/powerpc/kernel/pci_64.c752
-rw-r--r--arch/powerpc/kernel/ppc_ksyms.c5
-rw-r--r--arch/powerpc/kernel/process.c14
-rw-r--r--arch/powerpc/kernel/prom.c278
-rw-r--r--arch/powerpc/kernel/prom_init.c4
-rw-r--r--arch/powerpc/kernel/ptrace-common.h161
-rw-r--r--arch/powerpc/kernel/ptrace.c345
-rw-r--r--arch/powerpc/kernel/ptrace32.c239
-rw-r--r--arch/powerpc/kernel/rtas_flash.c2
-rw-r--r--arch/powerpc/kernel/rtas_pci.c7
-rw-r--r--arch/powerpc/kernel/setup-common.c21
-rw-r--r--arch/powerpc/kernel/setup_32.c12
-rw-r--r--arch/powerpc/kernel/signal.c180
-rw-r--r--arch/powerpc/kernel/signal.h55
-rw-r--r--arch/powerpc/kernel/signal_32.c191
-rw-r--r--arch/powerpc/kernel/signal_64.c192
-rw-r--r--arch/powerpc/kernel/sys_ppc32.c16
-rw-r--r--arch/powerpc/kernel/sysfs.c5
-rw-r--r--arch/powerpc/kernel/time.c66
-rw-r--r--arch/powerpc/kernel/traps.c3
-rw-r--r--arch/powerpc/kernel/udbg.c8
-rw-r--r--arch/powerpc/kernel/vdso.c2
-rw-r--r--arch/powerpc/kernel/vdso32/gettimeofday.S4
-rw-r--r--arch/powerpc/kernel/vdso64/gettimeofday.S7
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S13
-rw-r--r--arch/powerpc/lib/rheap.c48
-rw-r--r--arch/powerpc/mm/44x_mmu.c1
-rw-r--r--arch/powerpc/mm/4xx_mmu.c1
-rw-r--r--arch/powerpc/mm/Makefile3
-rw-r--r--arch/powerpc/mm/fault.c33
-rw-r--r--arch/powerpc/mm/fsl_booke_mmu.c1
-rw-r--r--arch/powerpc/mm/hash_native_64.c27
-rw-r--r--arch/powerpc/mm/hash_utils_64.c2
-rw-r--r--arch/powerpc/mm/hugetlbpage.c2
-rw-r--r--arch/powerpc/mm/imalloc.c313
-rw-r--r--arch/powerpc/mm/init_32.c1
-rw-r--r--arch/powerpc/mm/init_64.c4
-rw-r--r--arch/powerpc/mm/mem.c3
-rw-r--r--arch/powerpc/mm/mmu_context_32.c1
-rw-r--r--arch/powerpc/mm/mmu_decl.h17
-rw-r--r--arch/powerpc/mm/pgtable_32.c123
-rw-r--r--arch/powerpc/mm/pgtable_64.c206
-rw-r--r--arch/powerpc/mm/ppc_mmu_32.c7
-rw-r--r--arch/powerpc/mm/stab.c4
-rw-r--r--arch/powerpc/mm/tlb_32.c3
-rw-r--r--arch/powerpc/mm/tlb_64.c57
-rw-r--r--arch/powerpc/oprofile/Kconfig7
-rw-r--r--arch/powerpc/oprofile/Makefile4
-rw-r--r--arch/powerpc/oprofile/cell/pr_util.h97
-rw-r--r--arch/powerpc/oprofile/cell/spu_profiler.c221
-rw-r--r--arch/powerpc/oprofile/cell/spu_task_sync.c484
-rw-r--r--arch/powerpc/oprofile/cell/vma_map.c287
-rw-r--r--arch/powerpc/oprofile/common.c51
-rw-r--r--arch/powerpc/oprofile/op_model_7450.c14
-rw-r--r--arch/powerpc/oprofile/op_model_cell.c607
-rw-r--r--arch/powerpc/oprofile/op_model_fsl_booke.c11
-rw-r--r--arch/powerpc/oprofile/op_model_pa6t.c12
-rw-r--r--arch/powerpc/oprofile/op_model_power4.c25
-rw-r--r--arch/powerpc/oprofile/op_model_rs64.c10
-rw-r--r--arch/powerpc/platforms/52xx/efika.c13
-rw-r--r--arch/powerpc/platforms/52xx/lite5200.c2
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pci.c18
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pm.c8
-rw-r--r--arch/powerpc/platforms/82xx/Kconfig2
-rw-r--r--arch/powerpc/platforms/82xx/mpc82xx_ads.c17
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig2
-rw-r--r--arch/powerpc/platforms/83xx/Makefile2
-rw-r--r--arch/powerpc/platforms/83xx/mpc8313_rdb.c8
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_mds.c7
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_rdb.c7
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_itx.c9
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_mds.c56
-rw-r--r--arch/powerpc/platforms/83xx/mpc836x_mds.c7
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h34
-rw-r--r--arch/powerpc/platforms/83xx/pci.c18
-rw-r--r--arch/powerpc/platforms/83xx/usb.c181
-rw-r--r--arch/powerpc/platforms/85xx/misc.c32
-rw-r--r--arch/powerpc/platforms/85xx/mpc8544_ds.c15
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx.h2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c32
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c116
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c28
-rw-r--r--arch/powerpc/platforms/85xx/pci.c11
-rw-r--r--arch/powerpc/platforms/86xx/Kconfig2
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx.h11
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c27
-rw-r--r--arch/powerpc/platforms/86xx/pci.c67
-rw-r--r--arch/powerpc/platforms/8xx/m8xx_setup.c5
-rw-r--r--arch/powerpc/platforms/8xx/mpc885ads_setup.c188
-rw-r--r--arch/powerpc/platforms/Kconfig39
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype221
-rw-r--r--arch/powerpc/platforms/apus/Kconfig130
-rw-r--r--arch/powerpc/platforms/cell/Kconfig10
-rw-r--r--arch/powerpc/platforms/cell/Makefile6
-rw-r--r--arch/powerpc/platforms/cell/axon_msi.c445
-rw-r--r--arch/powerpc/platforms/cell/cbe_cpufreq.c191
-rw-r--r--arch/powerpc/platforms/cell/cbe_cpufreq.h24
-rw-r--r--arch/powerpc/platforms/cell/cbe_cpufreq_pervasive.c115
-rw-r--r--arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c148
-rw-r--r--arch/powerpc/platforms/cell/cbe_regs.c7
-rw-r--r--arch/powerpc/platforms/cell/cbe_thermal.c25
-rw-r--r--arch/powerpc/platforms/cell/io-workarounds.c2
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c345
-rw-r--r--arch/powerpc/platforms/cell/spu_manage.c4
-rw-r--r--arch/powerpc/platforms/cell/spu_syscalls.c17
-rw-r--r--arch/powerpc/platforms/cell/spufs/backing_ops.c6
-rw-r--r--arch/powerpc/platforms/cell/spufs/context.c57
-rw-r--r--arch/powerpc/platforms/cell/spufs/coredump.c2
-rw-r--r--arch/powerpc/platforms/cell/spufs/fault.c51
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c306
-rw-r--r--arch/powerpc/platforms/cell/spufs/gang.c6
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c206
-rw-r--r--arch/powerpc/platforms/cell/spufs/run.c81
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c816
-rw-r--r--arch/powerpc/platforms/cell/spufs/spu_restore.c8
-rw-r--r--arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped480
-rw-r--r--arch/powerpc/platforms/cell/spufs/spu_save.c2
-rw-r--r--arch/powerpc/platforms/cell/spufs/spufs.h113
-rw-r--r--arch/powerpc/platforms/cell/spufs/switch.c90
-rw-r--r--arch/powerpc/platforms/cell/spufs/syscalls.c34
-rw-r--r--arch/powerpc/platforms/celleb/Makefile2
-rw-r--r--arch/powerpc/platforms/chrp/Kconfig1
-rw-r--r--arch/powerpc/platforms/chrp/Makefile3
-rw-r--r--arch/powerpc/platforms/chrp/pci.c7
-rw-r--r--arch/powerpc/platforms/embedded6xx/Kconfig2
-rw-r--r--arch/powerpc/platforms/embedded6xx/holly.c2
-rw-r--r--arch/powerpc/platforms/embedded6xx/linkstation.c10
-rw-r--r--arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c9
-rw-r--r--arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h5
-rw-r--r--arch/powerpc/platforms/iseries/call_hpt.h9
-rw-r--r--arch/powerpc/platforms/iseries/htab.c8
-rw-r--r--arch/powerpc/platforms/iseries/pci.c7
-rw-r--r--arch/powerpc/platforms/iseries/setup.c6
-rw-r--r--arch/powerpc/platforms/maple/pci.c41
-rw-r--r--arch/powerpc/platforms/pasemi/Kconfig9
-rw-r--r--arch/powerpc/platforms/pasemi/Makefile1
-rw-r--r--arch/powerpc/platforms/pasemi/electra_ide.c96
-rw-r--r--arch/powerpc/platforms/pasemi/idle.c1
-rw-r--r--arch/powerpc/platforms/pasemi/iommu.c8
-rw-r--r--arch/powerpc/platforms/pasemi/pci.c24
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c2
-rw-r--r--arch/powerpc/platforms/powermac/Kconfig1
-rw-r--r--arch/powerpc/platforms/powermac/low_i2c.c23
-rw-r--r--arch/powerpc/platforms/powermac/pci.c46
-rw-r--r--arch/powerpc/platforms/powermac/setup.c16
-rw-r--r--arch/powerpc/platforms/powermac/smp.c1
-rw-r--r--arch/powerpc/platforms/ps3/Kconfig62
-rw-r--r--arch/powerpc/platforms/ps3/Makefile1
-rw-r--r--arch/powerpc/platforms/ps3/device-init.c785
-rw-r--r--arch/powerpc/platforms/ps3/htab.c31
-rw-r--r--arch/powerpc/platforms/ps3/interrupt.c273
-rw-r--r--arch/powerpc/platforms/ps3/mm.c632
-rw-r--r--arch/powerpc/platforms/ps3/os-area.c4
-rw-r--r--arch/powerpc/platforms/ps3/platform.h43
-rw-r--r--arch/powerpc/platforms/ps3/repository.c586
-rw-r--r--arch/powerpc/platforms/ps3/setup.c105
-rw-r--r--arch/powerpc/platforms/ps3/smp.c18
-rw-r--r--arch/powerpc/platforms/ps3/spu.c19
-rw-r--r--arch/powerpc/platforms/ps3/system-bus.c562
-rw-r--r--arch/powerpc/platforms/ps3/time.c2
-rw-r--r--arch/powerpc/platforms/pseries/Makefile2
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c19
-rw-r--r--arch/powerpc/platforms/pseries/eeh_cache.c5
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c6
-rw-r--r--arch/powerpc/platforms/pseries/eeh_sysfs.c87
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c17
-rw-r--r--arch/powerpc/platforms/pseries/pci_dlpar.c9
-rw-r--r--arch/powerpc/platforms/pseries/plpar_wrappers.h15
-rw-r--r--arch/powerpc/platforms/pseries/pseries.h2
-rw-r--r--arch/powerpc/platforms/pseries/reconfig.c2
-rw-r--r--arch/powerpc/platforms/pseries/setup.c4
-rw-r--r--arch/powerpc/platforms/pseries/xics.c63
-rw-r--r--arch/powerpc/sysdev/Makefile7
-rw-r--r--arch/powerpc/sysdev/axonram.c381
-rw-r--r--arch/powerpc/sysdev/fsl_pcie.c171
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c22
-rw-r--r--arch/powerpc/sysdev/indirect_pci.c44
-rw-r--r--arch/powerpc/sysdev/mpc8xx_pic.h11
-rw-r--r--arch/powerpc/sysdev/mv64x60_dev.c28
-rw-r--r--arch/powerpc/sysdev/mv64x60_pci.c7
-rw-r--r--arch/powerpc/sysdev/pmi.c51
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc.c2
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc_fast.c8
-rw-r--r--arch/powerpc/sysdev/rtc_cmos_setup.c49
-rw-r--r--arch/powerpc/sysdev/timer.c14
-rw-r--r--arch/powerpc/sysdev/tsi108_dev.c33
-rw-r--r--arch/powerpc/sysdev/tsi108_pci.c10
-rw-r--r--arch/powerpc/xmon/xmon.c2
-rw-r--r--arch/ppc/8260_io/enet.c4
-rw-r--r--arch/ppc/8260_io/fcc_enet.c4
-rw-r--r--arch/ppc/8xx_io/enet.c4
-rw-r--r--arch/ppc/8xx_io/fec.c2
-rw-r--r--arch/ppc/Kconfig6
-rw-r--r--arch/ppc/configs/ev64260_defconfig1
-rw-r--r--arch/ppc/configs/mpc8540_ads_defconfig1
-rw-r--r--arch/ppc/configs/mpc8548_cds_defconfig1
-rw-r--r--arch/ppc/configs/mpc8555_cds_defconfig1
-rw-r--r--arch/ppc/configs/mpc8560_ads_defconfig1
-rw-r--r--arch/ppc/configs/radstone_ppc7d_defconfig1
-rw-r--r--arch/ppc/configs/stx_gp3_defconfig1
-rw-r--r--arch/ppc/configs/sycamore_defconfig1
-rw-r--r--arch/ppc/kernel/misc.S8
-rw-r--r--arch/ppc/kernel/pci.c6
-rw-r--r--arch/ppc/kernel/ppc_ksyms.c1
-rw-r--r--arch/ppc/kernel/setup.c2
-rw-r--r--arch/ppc/kernel/traps.c3
-rw-r--r--arch/ppc/kernel/vmlinux.lds.S5
-rw-r--r--arch/ppc/mm/fault.c23
-rw-r--r--arch/ppc/mm/tlb.c1
-rw-r--r--arch/ppc/platforms/4xx/bamboo.c1
-rw-r--r--arch/ppc/platforms/4xx/bubinga.c1
-rw-r--r--arch/ppc/platforms/4xx/cpci405.c1
-rw-r--r--arch/ppc/platforms/4xx/ebony.c1
-rw-r--r--arch/ppc/platforms/4xx/luan.c1
-rw-r--r--arch/ppc/platforms/4xx/ocotea.c1
-rw-r--r--arch/ppc/platforms/4xx/taishan.c1
-rw-r--r--arch/ppc/platforms/4xx/yucca.c1
-rw-r--r--arch/ppc/platforms/85xx/sbc8560.c1
-rw-r--r--arch/ppc/platforms/chestnut.c1
-rw-r--r--arch/ppc/platforms/ev64260.c1
-rw-r--r--arch/ppc/platforms/prep_setup.c3
-rw-r--r--arch/ppc/platforms/radstone_ppc7d.c1
-rw-r--r--arch/ppc/platforms/spruce.c1
-rw-r--r--arch/ppc/syslib/Makefile1
-rw-r--r--arch/ppc/syslib/ibm_ocp.c1
-rw-r--r--arch/ppc/syslib/indirect_pci.c134
-rw-r--r--arch/ppc/syslib/mv64x60.c1
-rw-r--r--arch/ppc/syslib/qspan_pci.c4
-rw-r--r--arch/ppc/syslib/virtex_devices.c38
-rw-r--r--arch/ppc/syslib/virtex_devices.h7
-rw-r--r--arch/s390/Makefile2
-rw-r--r--arch/s390/appldata/appldata_base.c5
-rw-r--r--arch/s390/crypto/crypt_s390.h2
-rw-r--r--arch/s390/defconfig110
-rw-r--r--arch/s390/kernel/dis.c7
-rw-r--r--arch/s390/kernel/early.c45
-rw-r--r--arch/s390/kernel/entry.S15
-rw-r--r--arch/s390/kernel/entry64.S15
-rw-r--r--arch/s390/kernel/ipl.c29
-rw-r--r--arch/s390/kernel/process.c6
-rw-r--r--arch/s390/kernel/ptrace.c11
-rw-r--r--arch/s390/kernel/setup.c1
-rw-r--r--arch/s390/kernel/smp.c63
-rw-r--r--arch/s390/kernel/stacktrace.c26
-rw-r--r--arch/s390/kernel/time.c4
-rw-r--r--arch/s390/kernel/traps.c12
-rw-r--r--arch/s390/kernel/vmlinux.lds.S7
-rw-r--r--arch/s390/kernel/vtime.c4
-rw-r--r--arch/s390/lib/Makefile4
-rw-r--r--arch/s390/lib/uaccess_pt.c23
-rw-r--r--arch/s390/mm/fault.c30
-rw-r--r--arch/sh/Kconfig451
-rw-r--r--arch/sh/Kconfig.debug5
-rw-r--r--arch/sh/Makefile107
-rw-r--r--arch/sh/boards/dreamcast/setup.c3
-rw-r--r--arch/sh/boards/hp6xx/mach.c46
-rw-r--r--arch/sh/boards/hp6xx/setup.c3
-rw-r--r--arch/sh/boards/landisk/setup.c3
-rw-r--r--arch/sh/boards/lboxre2/setup.c3
-rw-r--r--arch/sh/boards/mpc1211/pci.c2
-rw-r--r--arch/sh/boards/mpc1211/setup.c3
-rw-r--r--arch/sh/boards/renesas/edosk7705/setup.c3
-rw-r--r--arch/sh/boards/renesas/hs7751rvoip/setup.c3
-rw-r--r--arch/sh/boards/renesas/r7780rp/Kconfig6
-rw-r--r--arch/sh/boards/renesas/r7780rp/setup.c57
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/setup.c6
-rw-r--r--arch/sh/boards/renesas/sh7710voipgw/setup.c3
-rw-r--r--arch/sh/boards/renesas/systemh/setup.c3
-rw-r--r--arch/sh/boards/saturn/Makefile8
-rw-r--r--arch/sh/boards/saturn/io.c26
-rw-r--r--arch/sh/boards/saturn/irq.c118
-rw-r--r--arch/sh/boards/saturn/setup.c31
-rw-r--r--arch/sh/boards/saturn/smp.c68
-rw-r--r--arch/sh/boards/se/7206/setup.c3
-rw-r--r--arch/sh/boards/se/7300/setup.c3
-rw-r--r--arch/sh/boards/se/73180/setup.c7
-rw-r--r--arch/sh/boards/se/7343/setup.c3
-rw-r--r--arch/sh/boards/se/7619/setup.c3
-rw-r--r--arch/sh/boards/se/770x/irq.c124
-rw-r--r--arch/sh/boards/se/770x/setup.c3
-rw-r--r--arch/sh/boards/se/7722/irq.c87
-rw-r--r--arch/sh/boards/se/7722/setup.c8
-rw-r--r--arch/sh/boards/se/7751/irq.c59
-rw-r--r--arch/sh/boards/se/7751/setup.c3
-rw-r--r--arch/sh/boards/se/7780/irq.c45
-rw-r--r--arch/sh/boards/se/7780/setup.c3
-rw-r--r--arch/sh/boards/sh03/setup.c31
-rw-r--r--arch/sh/boards/shmin/setup.c33
-rw-r--r--arch/sh/boards/snapgear/setup.c31
-rw-r--r--arch/sh/boards/superh/microdev/irq.c1
-rw-r--r--arch/sh/boards/superh/microdev/setup.c3
-rw-r--r--arch/sh/boards/titan/setup.c25
-rw-r--r--arch/sh/boards/unknown/Makefile6
-rw-r--r--arch/sh/boards/unknown/setup.c21
-rw-r--r--arch/sh/cchips/Kconfig6
-rw-r--r--arch/sh/cchips/hd6446x/Makefile2
-rw-r--r--arch/sh/cchips/hd6446x/hd64461.c (renamed from arch/sh/cchips/hd6446x/hd64461/setup.c)1
-rw-r--r--arch/sh/cchips/hd6446x/hd64461/Makefile6
-rw-r--r--arch/sh/cchips/hd6446x/hd64461/io.c150
-rw-r--r--arch/sh/cchips/voyagergx/irq.c13
-rw-r--r--arch/sh/configs/dreamcast_defconfig338
-rw-r--r--arch/sh/configs/landisk_defconfig2
-rw-r--r--arch/sh/configs/lboxre2_defconfig2
-rw-r--r--arch/sh/configs/r7780mp_defconfig1223
-rw-r--r--arch/sh/configs/r7780rp_defconfig2
-rw-r--r--arch/sh/configs/r7785rp_defconfig296
-rw-r--r--arch/sh/configs/rts7751r2d_defconfig8
-rw-r--r--arch/sh/configs/se7206_defconfig272
-rw-r--r--arch/sh/configs/se7619_defconfig215
-rw-r--r--arch/sh/configs/se7722_defconfig291
-rw-r--r--arch/sh/configs/se7750_defconfig2
-rw-r--r--arch/sh/configs/se7780_defconfig1
-rw-r--r--arch/sh/configs/shx3_defconfig756
-rw-r--r--arch/sh/drivers/dma/Kconfig20
-rw-r--r--arch/sh/drivers/heartbeat.c2
-rw-r--r--arch/sh/drivers/pci/Kconfig1
-rw-r--r--arch/sh/drivers/pci/Makefile1
-rw-r--r--arch/sh/drivers/pci/ops-sh4.c2
-rw-r--r--arch/sh/drivers/pci/pci-st40.c2
-rw-r--r--arch/sh/drivers/pci/pci.c2
-rw-r--r--arch/sh/drivers/push-switch.c2
-rw-r--r--arch/sh/kernel/Makefile9
-rw-r--r--arch/sh/kernel/cf-enabler.c6
-rw-r--r--arch/sh/kernel/cpu/clock.c16
-rw-r--r--arch/sh/kernel/cpu/init.c15
-rw-r--r--arch/sh/kernel/cpu/irq/Makefile1
-rw-r--r--arch/sh/kernel/cpu/irq/intc.c405
-rw-r--r--arch/sh/kernel/cpu/irq/intc2.c63
-rw-r--r--arch/sh/kernel/cpu/irq/ipr.c59
-rw-r--r--arch/sh/kernel/cpu/sh2/entry.S1
-rw-r--r--arch/sh/kernel/cpu/sh2/probe.c13
-rw-r--r--arch/sh/kernel/cpu/sh2/setup-sh7619.c26
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-sh7206.c26
-rw-r--r--arch/sh/kernel/cpu/sh3/entry.S21
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7705.c40
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7709.c112
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7710.c42
-rw-r--r--arch/sh/kernel/cpu/sh4/Makefile4
-rw-r--r--arch/sh/kernel/cpu/sh4/clock-sh4-202.c2
-rw-r--r--arch/sh/kernel/cpu/sh4/probe.c8
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh7750.c249
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh7760.c41
-rw-r--r--arch/sh/kernel/cpu/sh4/sq.c3
-rw-r--r--arch/sh/kernel/cpu/sh4a/Makefile2
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7722.c15
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-shx3.c135
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c185
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7780.c216
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7785.c18
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-shx3.c85
-rw-r--r--arch/sh/kernel/cpufreq.c215
-rw-r--r--arch/sh/kernel/head.S3
-rw-r--r--arch/sh/kernel/irq.c17
-rw-r--r--arch/sh/kernel/machvec.c130
-rw-r--r--arch/sh/kernel/process.c18
-rw-r--r--arch/sh/kernel/ptrace.c24
-rw-r--r--arch/sh/kernel/setup.c217
-rw-r--r--arch/sh/kernel/sh_bios.c3
-rw-r--r--arch/sh/kernel/sh_ksyms.c45
-rw-r--r--arch/sh/kernel/signal.c12
-rw-r--r--arch/sh/kernel/syscalls.S7
-rw-r--r--arch/sh/kernel/timers/timer-tmu.c8
-rw-r--r--arch/sh/kernel/topology.c49
-rw-r--r--arch/sh/kernel/traps.c11
-rw-r--r--arch/sh/kernel/vmlinux.lds.S26
-rw-r--r--arch/sh/lib/div64-generic.c9
-rw-r--r--arch/sh/lib/div64.S6
-rw-r--r--arch/sh/math-emu/math.c18
-rw-r--r--arch/sh/mm/Kconfig101
-rw-r--r--arch/sh/mm/Makefile5
-rw-r--r--arch/sh/mm/fault.c68
-rw-r--r--arch/sh/mm/init.c107
-rw-r--r--arch/sh/mm/ioremap.c1
-rw-r--r--arch/sh/mm/numa.c92
-rw-r--r--arch/sh/mm/pg-dma.c95
-rw-r--r--arch/sh/mm/pmb.c2
-rw-r--r--arch/sh/tools/Makefile1
-rw-r--r--arch/sh/tools/mach-types2
-rw-r--r--arch/sh64/configs/cayman_defconfig158
-rw-r--r--arch/sh64/kernel/head.S2
-rw-r--r--arch/sh64/kernel/pci_sh5.c12
-rw-r--r--arch/sh64/kernel/ptrace.c17
-rw-r--r--arch/sh64/kernel/signal.c1
-rw-r--r--arch/sh64/kernel/syscalls.S1
-rw-r--r--arch/sh64/kernel/vmlinux.lds.S6
-rw-r--r--arch/sh64/lib/c-checksum.c1
-rw-r--r--arch/sh64/mm/fault.c24
-rw-r--r--arch/sh64/mm/ioremap.c2
-rw-r--r--arch/sparc/Kconfig12
-rw-r--r--arch/sparc/kernel/ebus.c5
-rw-r--r--arch/sparc/kernel/entry.S14
-rw-r--r--arch/sparc/kernel/irq.c27
-rw-r--r--arch/sparc/kernel/irq.h68
-rw-r--r--arch/sparc/kernel/of_device.c227
-rw-r--r--arch/sparc/kernel/pcic.c1
-rw-r--r--arch/sparc/kernel/process.c8
-rw-r--r--arch/sparc/kernel/prom.c304
-rw-r--r--arch/sparc/kernel/setup.c65
-rw-r--r--arch/sparc/kernel/smp.c12
-rw-r--r--arch/sparc/kernel/sparc_ksyms.c2
-rw-r--r--arch/sparc/kernel/sun4c_irq.c15
-rw-r--r--arch/sparc/kernel/sun4d_irq.c6
-rw-r--r--arch/sparc/kernel/sun4d_smp.c1
-rw-r--r--arch/sparc/kernel/sun4m_irq.c74
-rw-r--r--arch/sparc/kernel/sun4m_smp.c2
-rw-r--r--arch/sparc/kernel/systbls.S9
-rw-r--r--arch/sparc/kernel/tick14.c6
-rw-r--r--arch/sparc/kernel/time.c4
-rw-r--r--arch/sparc/kernel/traps.c1
-rw-r--r--arch/sparc/kernel/vmlinux.lds.S5
-rw-r--r--arch/sparc/mm/fault.c22
-rw-r--r--arch/sparc/mm/init.c3
-rw-r--r--arch/sparc/mm/srmmu.c6
-rw-r--r--arch/sparc/mm/sun4c.c8
-rw-r--r--arch/sparc/prom/console.c116
-rw-r--r--arch/sparc/prom/misc.c4
-rw-r--r--arch/sparc64/Kconfig40
-rw-r--r--arch/sparc64/defconfig175
-rw-r--r--arch/sparc64/kernel/Makefile7
-rw-r--r--arch/sparc64/kernel/auxio.c2
-rw-r--r--arch/sparc64/kernel/ds.c1246
-rw-r--r--arch/sparc64/kernel/ebus.c5
-rw-r--r--arch/sparc64/kernel/entry.S67
-rw-r--r--arch/sparc64/kernel/head.S1
-rw-r--r--arch/sparc64/kernel/hvtramp.S140
-rw-r--r--arch/sparc64/kernel/irq.c253
-rw-r--r--arch/sparc64/kernel/isa.c5
-rw-r--r--arch/sparc64/kernel/ldc.c2373
-rw-r--r--arch/sparc64/kernel/mdesc.c815
-rw-r--r--arch/sparc64/kernel/of_device.c262
-rw-r--r--arch/sparc64/kernel/pci.c98
-rw-r--r--arch/sparc64/kernel/pci_common.c12
-rw-r--r--arch/sparc64/kernel/pci_sabre.c17
-rw-r--r--arch/sparc64/kernel/pci_sun4v.c4
-rw-r--r--arch/sparc64/kernel/power.c72
-rw-r--r--arch/sparc64/kernel/process.c27
-rw-r--r--arch/sparc64/kernel/prom.c290
-rw-r--r--arch/sparc64/kernel/sbus.c54
-rw-r--r--arch/sparc64/kernel/setup.c94
-rw-r--r--arch/sparc64/kernel/signal.c15
-rw-r--r--arch/sparc64/kernel/smp.c293
-rw-r--r--arch/sparc64/kernel/sparc64_ksyms.c20
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c12
-rw-r--r--arch/sparc64/kernel/sysfs.c295
-rw-r--r--arch/sparc64/kernel/systbls.S11
-rw-r--r--arch/sparc64/kernel/time.c163
-rw-r--r--arch/sparc64/kernel/traps.c1
-rw-r--r--arch/sparc64/kernel/vio.c443
-rw-r--r--arch/sparc64/kernel/viohs.c822
-rw-r--r--arch/sparc64/kernel/vmlinux.lds.S6
-rw-r--r--arch/sparc64/lib/Makefile2
-rw-r--r--arch/sparc64/lib/delay.c46
-rw-r--r--arch/sparc64/mm/fault.c24
-rw-r--r--arch/sparc64/mm/tsb.c3
-rw-r--r--arch/sparc64/prom/console.c85
-rw-r--r--arch/sparc64/prom/misc.c17
-rw-r--r--arch/sparc64/prom/p1275.c1
-rw-r--r--arch/sparc64/prom/tree.c21
-rw-r--r--arch/sparc64/solaris/socksys.c3
-rw-r--r--arch/um/Kconfig1
-rw-r--r--arch/um/Kconfig.debug9
-rw-r--r--arch/um/Makefile2
-rw-r--r--arch/um/config.release333
-rw-r--r--arch/um/defconfig4
-rw-r--r--arch/um/drivers/chan_kern.c23
-rw-r--r--arch/um/drivers/chan_user.c78
-rw-r--r--arch/um/drivers/cow_sys.h2
-rw-r--r--arch/um/drivers/daemon_user.c4
-rw-r--r--arch/um/drivers/fd.c2
-rw-r--r--arch/um/drivers/harddog_user.c2
-rw-r--r--arch/um/drivers/line.c66
-rw-r--r--arch/um/drivers/mcast_user.c2
-rw-r--r--arch/um/drivers/mconsole_user.c5
-rw-r--r--arch/um/drivers/net_user.c4
-rw-r--r--arch/um/drivers/pcap_user.c2
-rw-r--r--arch/um/drivers/port_user.c4
-rw-r--r--arch/um/drivers/pty.c78
-rw-r--r--arch/um/drivers/slip_user.c4
-rw-r--r--arch/um/drivers/slirp_user.c2
-rw-r--r--arch/um/drivers/ssl.c10
-rw-r--r--arch/um/drivers/stderr_console.c1
-rw-r--r--arch/um/drivers/stdio_console.c9
-rw-r--r--arch/um/drivers/tty.c2
-rw-r--r--arch/um/drivers/ubd_kern.c9
-rw-r--r--arch/um/drivers/ubd_user.c6
-rw-r--r--arch/um/drivers/xterm.c174
-rw-r--r--arch/um/drivers/xterm_kern.c49
-rw-r--r--arch/um/include/chan_kern.h2
-rw-r--r--arch/um/include/chan_user.h5
-rw-r--r--arch/um/include/common-offsets.h4
-rw-r--r--arch/um/include/os.h6
-rw-r--r--arch/um/include/um_malloc.h12
-rw-r--r--arch/um/kernel/exitcode.c39
-rw-r--r--arch/um/kernel/irq.c1
-rw-r--r--arch/um/kernel/process.c16
-rw-r--r--arch/um/kernel/ptrace.c18
-rw-r--r--arch/um/kernel/trap.c29
-rw-r--r--arch/um/os-Linux/aio.c11
-rw-r--r--arch/um/os-Linux/drivers/ethertap_user.c6
-rw-r--r--arch/um/os-Linux/drivers/tuntap_user.c2
-rw-r--r--arch/um/os-Linux/helper.c23
-rw-r--r--arch/um/os-Linux/main.c8
-rw-r--r--arch/um/os-Linux/sigio.c23
-rw-r--r--arch/um/os-Linux/skas/mem.c13
-rw-r--r--arch/um/os-Linux/skas/process.c15
-rw-r--r--arch/um/os-Linux/start_up.c7
-rw-r--r--arch/um/os-Linux/user_syms.c20
-rw-r--r--arch/v850/kernel/ptrace.c14
-rw-r--r--arch/x86_64/Kconfig20
-rw-r--r--arch/x86_64/Makefile3
-rw-r--r--arch/x86_64/boot/.gitignore2
-rw-r--r--arch/x86_64/boot/Makefile136
-rw-r--r--arch/x86_64/boot/bootsect.S98
-rw-r--r--arch/x86_64/boot/compressed/Makefile9
-rw-r--r--arch/x86_64/boot/compressed/head.S6
-rw-r--r--arch/x86_64/boot/install.sh2
-rw-r--r--arch/x86_64/boot/mtools.conf.in17
-rw-r--r--arch/x86_64/boot/setup.S826
-rw-r--r--arch/x86_64/boot/tools/build.c185
-rw-r--r--arch/x86_64/defconfig288
-rw-r--r--arch/x86_64/ia32/ia32_aout.c2
-rw-r--r--arch/x86_64/ia32/ia32_binfmt.c59
-rw-r--r--arch/x86_64/ia32/ia32entry.S14
-rw-r--r--arch/x86_64/ia32/sys_ia32.c27
-rw-r--r--arch/x86_64/kernel/Makefile2
-rw-r--r--arch/x86_64/kernel/acpi/sleep.c8
-rw-r--r--arch/x86_64/kernel/acpi/wakeup.S32
-rw-r--r--arch/x86_64/kernel/aperture.c4
-rw-r--r--arch/x86_64/kernel/apic.c77
-rw-r--r--arch/x86_64/kernel/cpufreq/Kconfig6
-rw-r--r--arch/x86_64/kernel/e820.c138
-rw-r--r--arch/x86_64/kernel/early-quirks.c1
-rw-r--r--arch/x86_64/kernel/early_printk.c5
-rw-r--r--arch/x86_64/kernel/entry.S13
-rw-r--r--arch/x86_64/kernel/head.S15
-rw-r--r--arch/x86_64/kernel/hpet.c6
-rw-r--r--arch/x86_64/kernel/i8259.c18
-rw-r--r--arch/x86_64/kernel/init_task.c2
-rw-r--r--arch/x86_64/kernel/io_apic.c59
-rw-r--r--arch/x86_64/kernel/irq.c32
-rw-r--r--arch/x86_64/kernel/mce.c247
-rw-r--r--arch/x86_64/kernel/mce_amd.c6
-rw-r--r--arch/x86_64/kernel/mpparse.c21
-rw-r--r--arch/x86_64/kernel/nmi.c8
-rw-r--r--arch/x86_64/kernel/pci-calgary.c570
-rw-r--r--arch/x86_64/kernel/pci-dma.c22
-rw-r--r--arch/x86_64/kernel/pci-gart.c27
-rw-r--r--arch/x86_64/kernel/pci-nommu.c8
-rw-r--r--arch/x86_64/kernel/pci-swiotlb.c2
-rw-r--r--arch/x86_64/kernel/process.c13
-rw-r--r--arch/x86_64/kernel/ptrace.c40
-rw-r--r--arch/x86_64/kernel/reboot.c4
-rw-r--r--arch/x86_64/kernel/setup.c30
-rw-r--r--arch/x86_64/kernel/setup64.c3
-rw-r--r--arch/x86_64/kernel/signal.c7
-rw-r--r--arch/x86_64/kernel/smp.c18
-rw-r--r--arch/x86_64/kernel/tce.c12
-rw-r--r--arch/x86_64/kernel/time.c158
-rw-r--r--arch/x86_64/kernel/traps.c18
-rw-r--r--arch/x86_64/kernel/tsc.c41
-rw-r--r--arch/x86_64/kernel/verify_cpu.S22
-rw-r--r--arch/x86_64/kernel/vmlinux.lds.S35
-rw-r--r--arch/x86_64/kernel/vsyscall.c22
-rw-r--r--arch/x86_64/mm/fault.c35
-rw-r--r--arch/x86_64/mm/init.c18
-rw-r--r--arch/x86_64/mm/k8topology.c13
-rw-r--r--arch/x86_64/mm/numa.c15
-rw-r--r--arch/x86_64/mm/pageattr.c22
-rw-r--r--arch/x86_64/mm/srat.c97
-rw-r--r--arch/x86_64/pci/k8-bus.c6
-rw-r--r--arch/x86_64/vdso/Makefile49
-rw-r--r--arch/x86_64/vdso/vclock_gettime.c120
-rw-r--r--arch/x86_64/vdso/vdso-note.S12
-rw-r--r--arch/x86_64/vdso/vdso-start.S2
-rw-r--r--arch/x86_64/vdso/vdso.S2
-rw-r--r--arch/x86_64/vdso/vdso.lds.S77
-rw-r--r--arch/x86_64/vdso/vextern.h16
-rw-r--r--arch/x86_64/vdso/vgetcpu.c50
-rw-r--r--arch/x86_64/vdso/vma.c139
-rw-r--r--arch/x86_64/vdso/voffset.h1
-rw-r--r--arch/x86_64/vdso/vvar.c12
-rw-r--r--arch/xtensa/kernel/asm-offsets.c1
-rw-r--r--arch/xtensa/kernel/entry.S36
-rw-r--r--arch/xtensa/kernel/head.S19
-rw-r--r--arch/xtensa/kernel/pci.c2
-rw-r--r--arch/xtensa/kernel/ptrace.c17
-rw-r--r--arch/xtensa/kernel/setup.c1
-rw-r--r--arch/xtensa/kernel/signal.c795
-rw-r--r--arch/xtensa/kernel/traps.c1
-rw-r--r--arch/xtensa/kernel/vmlinux.lds.S72
-rw-r--r--arch/xtensa/kernel/xtensa_ksyms.c11
-rw-r--r--arch/xtensa/lib/strncpy_user.S33
-rw-r--r--arch/xtensa/lib/strnlen_user.S33
-rw-r--r--arch/xtensa/mm/fault.c23
-rw-r--r--arch/xtensa/mm/init.c2
-rw-r--r--arch/xtensa/platform-iss/network.c2
1516 files changed, 63314 insertions, 44493 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 79c6e5a24456..2a85dc33907c 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -327,6 +327,9 @@ config PCI_DOMAINS
327 bool 327 bool
328 default y 328 default y
329 329
330config PCI_SYSCALL
331 def_bool PCI
332
330config ALPHA_CORE_AGP 333config ALPHA_CORE_AGP
331 bool 334 bool
332 depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL 335 depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL
diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c
index bd03dc94c72b..026ba9af6d6a 100644
--- a/arch/alpha/kernel/module.c
+++ b/arch/alpha/kernel/module.c
@@ -119,8 +119,7 @@ module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr *sechdrs,
119 } 119 }
120 120
121 nsyms = symtab->sh_size / sizeof(Elf64_Sym); 121 nsyms = symtab->sh_size / sizeof(Elf64_Sym);
122 chains = kmalloc(nsyms * sizeof(struct got_entry), GFP_KERNEL); 122 chains = kcalloc(nsyms, sizeof(struct got_entry), GFP_KERNEL);
123 memset(chains, 0, nsyms * sizeof(struct got_entry));
124 123
125 got->sh_size = 0; 124 got->sh_size = 0;
126 got->sh_addralign = 8; 125 got->sh_addralign = 8;
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
index 28c84e55feb9..6b07f89a72c7 100644
--- a/arch/alpha/kernel/pci_iommu.c
+++ b/arch/alpha/kernel/pci_iommu.c
@@ -207,6 +207,10 @@ iommu_arena_free(struct pci_iommu_arena *arena, long ofs, long n)
207 p[i] = 0; 207 p[i] = 0;
208} 208}
209 209
210/* True if the machine supports DAC addressing, and DEV can
211 make use of it given MASK. */
212static int pci_dac_dma_supported(struct pci_dev *hwdev, u64 mask);
213
210/* Map a single buffer of the indicated size for PCI DMA in streaming 214/* Map a single buffer of the indicated size for PCI DMA in streaming
211 mode. The 32-bit PCI bus mastering address to use is returned. 215 mode. The 32-bit PCI bus mastering address to use is returned.
212 Once the device is given the dma address, the device owns this memory 216 Once the device is given the dma address, the device owns this memory
@@ -897,7 +901,7 @@ iommu_unbind(struct pci_iommu_arena *arena, long pg_start, long pg_count)
897/* True if the machine supports DAC addressing, and DEV can 901/* True if the machine supports DAC addressing, and DEV can
898 make use of it given MASK. */ 902 make use of it given MASK. */
899 903
900int 904static int
901pci_dac_dma_supported(struct pci_dev *dev, u64 mask) 905pci_dac_dma_supported(struct pci_dev *dev, u64 mask)
902{ 906{
903 dma64_addr_t dac_offset = alpha_mv.pci_dac_offset; 907 dma64_addr_t dac_offset = alpha_mv.pci_dac_offset;
@@ -917,32 +921,6 @@ pci_dac_dma_supported(struct pci_dev *dev, u64 mask)
917 921
918 return ok; 922 return ok;
919} 923}
920EXPORT_SYMBOL(pci_dac_dma_supported);
921
922dma64_addr_t
923pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page,
924 unsigned long offset, int direction)
925{
926 return (alpha_mv.pci_dac_offset
927 + __pa(page_address(page))
928 + (dma64_addr_t) offset);
929}
930EXPORT_SYMBOL(pci_dac_page_to_dma);
931
932struct page *
933pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr)
934{
935 unsigned long paddr = (dma_addr & PAGE_MASK) - alpha_mv.pci_dac_offset;
936 return virt_to_page(__va(paddr));
937}
938EXPORT_SYMBOL(pci_dac_dma_to_page);
939
940unsigned long
941pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr)
942{
943 return (dma_addr & ~PAGE_MASK);
944}
945EXPORT_SYMBOL(pci_dac_dma_to_offset);
946 924
947/* Helper for generic DMA-mapping functions. */ 925/* Helper for generic DMA-mapping functions. */
948 926
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c
index 0cd060598f9a..83a781842266 100644
--- a/arch/alpha/kernel/ptrace.c
+++ b/arch/alpha/kernel/ptrace.c
@@ -315,9 +315,7 @@ do_sys_ptrace(long request, long pid, long addr, long data,
315 /* When I and D space are separate, this will have to be fixed. */ 315 /* When I and D space are separate, this will have to be fixed. */
316 case PTRACE_POKETEXT: /* write the word at location addr. */ 316 case PTRACE_POKETEXT: /* write the word at location addr. */
317 case PTRACE_POKEDATA: 317 case PTRACE_POKEDATA:
318 tmp = data; 318 ret = generic_ptrace_pokedata(child, addr, data);
319 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 1);
320 ret = (copied == sizeof(tmp)) ? 0 : -EIO;
321 break; 319 break;
322 320
323 case PTRACE_POKEUSR: /* write the specified register */ 321 case PTRACE_POKEUSR: /* write the specified register */
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index 80cfb758ee2b..b28731437c31 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -65,7 +65,7 @@ enum ipi_message_type {
65}; 65};
66 66
67/* Set to a secondary's cpuid when it comes online. */ 67/* Set to a secondary's cpuid when it comes online. */
68static int smp_secondary_alive __initdata = 0; 68static int smp_secondary_alive __devinitdata = 0;
69 69
70/* Which cpus ids came online. */ 70/* Which cpus ids came online. */
71cpumask_t cpu_online_map; 71cpumask_t cpu_online_map;
@@ -173,7 +173,7 @@ smp_callin(void)
173} 173}
174 174
175/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */ 175/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */
176static int __init 176static int __devinit
177wait_for_txrdy (unsigned long cpumask) 177wait_for_txrdy (unsigned long cpumask)
178{ 178{
179 unsigned long timeout; 179 unsigned long timeout;
@@ -358,7 +358,7 @@ secondary_cpu_start(int cpuid, struct task_struct *idle)
358/* 358/*
359 * Bring one cpu online. 359 * Bring one cpu online.
360 */ 360 */
361static int __init 361static int __devinit
362smp_boot_one_cpu(int cpuid) 362smp_boot_one_cpu(int cpuid)
363{ 363{
364 struct task_struct *idle; 364 struct task_struct *idle;
diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
index 930cedc8be24..783f4e50c111 100644
--- a/arch/alpha/kernel/srmcons.c
+++ b/arch/alpha/kernel/srmcons.c
@@ -289,7 +289,7 @@ srm_console_device(struct console *co, int *index)
289 return srmcons_driver; 289 return srmcons_driver;
290} 290}
291 291
292static int __init 292static int
293srm_console_setup(struct console *co, char *options) 293srm_console_setup(struct console *co, char *options)
294{ 294{
295 return 0; 295 return 0;
diff --git a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c
index 0bcb968cb60a..922143ea1cdb 100644
--- a/arch/alpha/kernel/sys_marvel.c
+++ b/arch/alpha/kernel/sys_marvel.c
@@ -420,7 +420,7 @@ marvel_init_pci(void)
420 io7_clear_errors(io7); 420 io7_clear_errors(io7);
421} 421}
422 422
423static void 423static void __init
424marvel_init_rtc(void) 424marvel_init_rtc(void)
425{ 425{
426 init_rtc_irq(); 426 init_rtc_irq();
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c
index 4748e14a28bc..1dd50d07693c 100644
--- a/arch/alpha/kernel/time.c
+++ b/arch/alpha/kernel/time.c
@@ -144,7 +144,7 @@ irqreturn_t timer_interrupt(int irq, void *dev)
144 return IRQ_HANDLED; 144 return IRQ_HANDLED;
145} 145}
146 146
147void 147void __init
148common_init_rtc(void) 148common_init_rtc(void)
149{ 149{
150 unsigned char x; 150 unsigned char x;
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c
index d6e665d567bd..ec0f05e0d8ff 100644
--- a/arch/alpha/kernel/traps.c
+++ b/arch/alpha/kernel/traps.c
@@ -184,6 +184,7 @@ die_if_kernel(char * str, struct pt_regs *regs, long err, unsigned long *r9_15)
184#endif 184#endif
185 printk("%s(%d): %s %ld\n", current->comm, current->pid, str, err); 185 printk("%s(%d): %s %ld\n", current->comm, current->pid, str, err);
186 dik_show_regs(regs, r9_15); 186 dik_show_regs(regs, r9_15);
187 add_taint(TAINT_DIE);
187 dik_show_trace((unsigned long *)(regs+1)); 188 dik_show_trace((unsigned long *)(regs+1));
188 dik_show_code((unsigned int *)regs->pc); 189 dik_show_code((unsigned int *)regs->pc);
189 190
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index 449e76f118d3..fe13daa5cb2c 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -3,7 +3,7 @@
3OUTPUT_FORMAT("elf64-alpha") 3OUTPUT_FORMAT("elf64-alpha")
4OUTPUT_ARCH(alpha) 4OUTPUT_ARCH(alpha)
5ENTRY(__start) 5ENTRY(__start)
6PHDRS { kernel PT_LOAD ; } 6PHDRS { kernel PT_LOAD; note PT_NOTE; }
7jiffies = jiffies_64; 7jiffies = jiffies_64;
8SECTIONS 8SECTIONS
9{ 9{
@@ -28,6 +28,9 @@ SECTIONS
28 __ex_table : { *(__ex_table) } 28 __ex_table : { *(__ex_table) }
29 __stop___ex_table = .; 29 __stop___ex_table = .;
30 30
31 NOTES :kernel :note
32 .dummy : { *(.dummy) } :kernel
33
31 RODATA 34 RODATA
32 35
33 /* Will be freed after init */ 36 /* Will be freed after init */
@@ -69,10 +72,7 @@ SECTIONS
69 . = ALIGN(8); 72 . = ALIGN(8);
70 SECURITY_INIT 73 SECURITY_INIT
71 74
72 . = ALIGN(8192); 75 PERCPU(8192)
73 __per_cpu_start = .;
74 .data.percpu : { *(.data.percpu) }
75 __per_cpu_end = .;
76 76
77 . = ALIGN(2*8192); 77 . = ALIGN(2*8192);
78 __init_end = .; 78 __init_end = .;
diff --git a/arch/alpha/lib/checksum.c b/arch/alpha/lib/checksum.c
index ab3761c437a8..8698e0746f9f 100644
--- a/arch/alpha/lib/checksum.c
+++ b/arch/alpha/lib/checksum.c
@@ -69,6 +69,7 @@ __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
69 result = (result & 0xffffffff) + (result >> 32); 69 result = (result & 0xffffffff) + (result >> 32);
70 return (__force __wsum)result; 70 return (__force __wsum)result;
71} 71}
72EXPORT_SYMBOL(csum_tcpudp_nofold);
72 73
73/* 74/*
74 * Do a 64-bit checksum on an arbitrary memory area.. 75 * Do a 64-bit checksum on an arbitrary memory area..
diff --git a/arch/alpha/lib/csum_ipv6_magic.S b/arch/alpha/lib/csum_ipv6_magic.S
index e09748dbf2ed..2c2acb96deb6 100644
--- a/arch/alpha/lib/csum_ipv6_magic.S
+++ b/arch/alpha/lib/csum_ipv6_magic.S
@@ -7,6 +7,9 @@
7 * __u32 len, 7 * __u32 len,
8 * unsigned short proto, 8 * unsigned short proto,
9 * unsigned int csum); 9 * unsigned int csum);
10 *
11 * Misalignment handling (which costs 16 instructions / 8 cycles)
12 * added by Ivan Kokshaysky <ink@jurassic.park.msu.ru>
10 */ 13 */
11 14
12 .globl csum_ipv6_magic 15 .globl csum_ipv6_magic
@@ -16,37 +19,57 @@
16csum_ipv6_magic: 19csum_ipv6_magic:
17 .prologue 0 20 .prologue 0
18 21
19 ldq $0,0($16) # e0 : load src & dst addr words 22 ldq_u $0,0($16) # e0 : load src & dst addr words
20 zapnot $20,15,$20 # .. e1 : zero extend incoming csum 23 zapnot $20,15,$20 # .. e1 : zero extend incoming csum
21 extqh $18,1,$4 # e0 : byte swap len & proto while we wait 24 extqh $18,1,$4 # e0 : byte swap len & proto while we wait
22 ldq $1,8($16) # .. e1 : 25 ldq_u $21,7($16) # .. e1 : handle misalignment
23 26
24 extbl $18,1,$5 # e0 : 27 extbl $18,1,$5 # e0 :
25 ldq $2,0($17) # .. e1 : 28 ldq_u $1,8($16) # .. e1 :
26 extbl $18,2,$6 # e0 : 29 extbl $18,2,$6 # e0 :
27 ldq $3,8($17) # .. e1 : 30 ldq_u $22,15($16) # .. e1 :
28 31
29 extbl $18,3,$18 # e0 : 32 extbl $18,3,$18 # e0 :
33 ldq_u $2,0($17) # .. e1 :
30 sra $4,32,$4 # e0 : 34 sra $4,32,$4 # e0 :
35 ldq_u $23,7($17) # .. e1 :
36
37 extql $0,$16,$0 # e0 :
38 ldq_u $3,8($17) # .. e1 :
39 extqh $21,$16,$21 # e0 :
40 ldq_u $24,15($17) # .. e1 :
41
31 sll $5,16,$5 # e0 : 42 sll $5,16,$5 # e0 :
43 or $0,$21,$0 # .. e1 : 1st src word complete
44 extql $1,$16,$1 # e0 :
32 addq $20,$0,$20 # .. e1 : begin summing the words 45 addq $20,$0,$20 # .. e1 : begin summing the words
33 46
34 sll $6,8,$6 # e0 : 47 extqh $22,$16,$22 # e0 :
35 cmpult $20,$0,$0 # .. e1 : 48 cmpult $20,$0,$0 # .. e1 :
36 extwh $19,7,$7 # e0 : 49 sll $6,8,$6 # e0 :
37 or $4,$18,$18 # .. e1 : 50 or $1,$22,$1 # .. e1 : 2nd src word complete
38 51
39 extbl $19,1,$19 # e0 : 52 extql $2,$17,$2 # e0 :
53 or $4,$18,$18 # .. e1 :
54 extqh $23,$17,$23 # e0 :
40 or $5,$6,$5 # .. e1 : 55 or $5,$6,$5 # .. e1 :
41 or $18,$5,$18 # e0 : len complete
42 or $19,$7,$19 # .. e1 :
43 56
44 sll $19,48,$19 # e0 : 57 extql $3,$17,$3 # e0 :
58 or $2,$23,$2 # .. e1 : 1st dst word complete
59 extqh $24,$17,$24 # e0 :
60 or $18,$5,$18 # .. e1 : len complete
61
62 extwh $19,7,$7 # e0 :
63 or $3,$24,$3 # .. e1 : 2nd dst word complete
64 extbl $19,1,$19 # e0 :
45 addq $20,$1,$20 # .. e1 : 65 addq $20,$1,$20 # .. e1 :
46 sra $19,32,$19 # e0 : proto complete 66
67 or $19,$7,$19 # e0 :
47 cmpult $20,$1,$1 # .. e1 : 68 cmpult $20,$1,$1 # .. e1 :
69 sll $19,48,$19 # e0 :
70 nop # .. e0 :
48 71
49 nop # e0 : 72 sra $19,32,$19 # e0 : proto complete
50 addq $20,$2,$20 # .. e1 : 73 addq $20,$2,$20 # .. e1 :
51 cmpult $20,$2,$2 # e0 : 74 cmpult $20,$2,$2 # e0 :
52 addq $20,$3,$20 # .. e1 : 75 addq $20,$3,$20 # .. e1 :
@@ -84,7 +107,7 @@ csum_ipv6_magic:
84 extwl $0,2,$1 # e0 : fold 17-bit value 107 extwl $0,2,$1 # e0 : fold 17-bit value
85 zapnot $0,3,$0 # .. e1 : 108 zapnot $0,3,$0 # .. e1 :
86 addq $0,$1,$0 # e0 : 109 addq $0,$1,$0 # e0 :
87 not $0,$0 # e1 : and complement. 110 not $0,$0 # .. e1 : and complement.
88 111
89 zapnot $0,3,$0 # e0 : 112 zapnot $0,3,$0 # e0 :
90 ret # .. e1 : 113 ret # .. e1 :
diff --git a/arch/alpha/lib/ev6-csum_ipv6_magic.S b/arch/alpha/lib/ev6-csum_ipv6_magic.S
index de1948a69118..fc0bc399f872 100644
--- a/arch/alpha/lib/ev6-csum_ipv6_magic.S
+++ b/arch/alpha/lib/ev6-csum_ipv6_magic.S
@@ -46,6 +46,10 @@
46 * add the 3 low ushorts together, generating a uint 46 * add the 3 low ushorts together, generating a uint
47 * a final add of the 2 lower ushorts 47 * a final add of the 2 lower ushorts
48 * truncating the result. 48 * truncating the result.
49 *
50 * Misalignment handling added by Ivan Kokshaysky <ink@jurassic.park.msu.ru>
51 * The cost is 16 instructions (~8 cycles), including two extra loads which
52 * may cause additional delay in rare cases (load-load replay traps).
49 */ 53 */
50 54
51 .globl csum_ipv6_magic 55 .globl csum_ipv6_magic
@@ -55,25 +59,45 @@
55csum_ipv6_magic: 59csum_ipv6_magic:
56 .prologue 0 60 .prologue 0
57 61
58 ldq $0,0($16) # L : Latency: 3 62 ldq_u $0,0($16) # L : Latency: 3
59 inslh $18,7,$4 # U : 0000000000AABBCC 63 inslh $18,7,$4 # U : 0000000000AABBCC
60 ldq $1,8($16) # L : Latency: 3 64 ldq_u $1,8($16) # L : Latency: 3
61 sll $19,8,$7 # U : U L U L : 0x00000000 00aabb00 65 sll $19,8,$7 # U : U L U L : 0x00000000 00aabb00
62 66
67 and $16,7,$6 # E : src misalignment
68 ldq_u $5,15($16) # L : Latency: 3
63 zapnot $20,15,$20 # U : zero extend incoming csum 69 zapnot $20,15,$20 # U : zero extend incoming csum
64 ldq $2,0($17) # L : Latency: 3 70 ldq_u $2,0($17) # L : U L U L : Latency: 3
65 sll $19,24,$19 # U : U L L U : 0x000000aa bb000000 71
72 extql $0,$6,$0 # U :
73 extqh $1,$6,$22 # U :
74 ldq_u $3,8($17) # L : Latency: 3
75 sll $19,24,$19 # U : U U L U : 0x000000aa bb000000
76
77 cmoveq $6,$31,$22 # E : src aligned?
78 ldq_u $23,15($17) # L : Latency: 3
66 inswl $18,3,$18 # U : 000000CCDD000000 79 inswl $18,3,$18 # U : 000000CCDD000000
80 addl $19,$7,$19 # E : U L U L : <sign bits>bbaabb00
67 81
68 ldq $3,8($17) # L : Latency: 3 82 or $0,$22,$0 # E : 1st src word complete
69 bis $18,$4,$18 # E : 000000CCDDAABBCC 83 extql $1,$6,$1 # U :
70 addl $19,$7,$19 # E : <sign bits>bbaabb00 84 or $18,$4,$18 # E : 000000CCDDAABBCC
71 nop # E : U L U L 85 extqh $5,$6,$5 # U : L U L U
72 86
87 and $17,7,$6 # E : dst misalignment
88 extql $2,$6,$2 # U :
89 or $1,$5,$1 # E : 2nd src word complete
90 extqh $3,$6,$22 # U : L U L U :
91
92 cmoveq $6,$31,$22 # E : dst aligned?
93 extql $3,$6,$3 # U :
73 addq $20,$0,$20 # E : begin summing the words 94 addq $20,$0,$20 # E : begin summing the words
95 extqh $23,$6,$23 # U : L U L U :
96
74 srl $18,16,$4 # U : 0000000000CCDDAA 97 srl $18,16,$4 # U : 0000000000CCDDAA
98 or $2,$22,$2 # E : 1st dst word complete
75 zap $19,0x3,$19 # U : <sign bits>bbaa0000 99 zap $19,0x3,$19 # U : <sign bits>bbaa0000
76 nop # E : L U U L 100 or $3,$23,$3 # E : U L U L : 2nd dst word complete
77 101
78 cmpult $20,$0,$0 # E : 102 cmpult $20,$0,$0 # E :
79 addq $20,$1,$20 # E : 103 addq $20,$1,$20 # E :
diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
index f5862792a167..a0e18da594d9 100644
--- a/arch/alpha/mm/fault.c
+++ b/arch/alpha/mm/fault.c
@@ -148,21 +148,17 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
148 the fault. */ 148 the fault. */
149 fault = handle_mm_fault(mm, vma, address, cause > 0); 149 fault = handle_mm_fault(mm, vma, address, cause > 0);
150 up_read(&mm->mmap_sem); 150 up_read(&mm->mmap_sem);
151 151 if (unlikely(fault & VM_FAULT_ERROR)) {
152 switch (fault) { 152 if (fault & VM_FAULT_OOM)
153 case VM_FAULT_MINOR: 153 goto out_of_memory;
154 current->min_flt++; 154 else if (fault & VM_FAULT_SIGBUS)
155 break; 155 goto do_sigbus;
156 case VM_FAULT_MAJOR:
157 current->maj_flt++;
158 break;
159 case VM_FAULT_SIGBUS:
160 goto do_sigbus;
161 case VM_FAULT_OOM:
162 goto out_of_memory;
163 default:
164 BUG(); 156 BUG();
165 } 157 }
158 if (fault & VM_FAULT_MAJOR)
159 current->maj_flt++;
160 else
161 current->min_flt++;
166 return; 162 return;
167 163
168 /* Something tried to access memory that isn't in our memory map. 164 /* Something tried to access memory that isn't in our memory map.
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 50d9f3e4e0f1..a44c6da9bf83 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -241,6 +241,9 @@ config ARCH_H720X
241 241
242config ARCH_IMX 242config ARCH_IMX
243 bool "IMX" 243 bool "IMX"
244 select GENERIC_GPIO
245 select GENERIC_TIME
246 select GENERIC_CLOCKEVENTS
244 help 247 help
245 Support for Motorola's i.MX family of processors (MX1, MXL). 248 Support for Motorola's i.MX family of processors (MX1, MXL).
246 249
@@ -308,6 +311,7 @@ config ARCH_L7200
308 311
309config ARCH_KS8695 312config ARCH_KS8695
310 bool "Micrel/Kendin KS8695" 313 bool "Micrel/Kendin KS8695"
314 select GENERIC_GPIO
311 help 315 help
312 Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based 316 Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based
313 System-on-Chip devices. 317 System-on-Chip devices.
@@ -384,6 +388,7 @@ config ARCH_DAVINCI
384 bool "TI DaVinci" 388 bool "TI DaVinci"
385 select GENERIC_TIME 389 select GENERIC_TIME
386 select GENERIC_CLOCKEVENTS 390 select GENERIC_CLOCKEVENTS
391 select GENERIC_GPIO
387 help 392 help
388 Support for TI's DaVinci platform. 393 Support for TI's DaVinci platform.
389 394
@@ -531,6 +536,9 @@ config PCI
531 information about which PCI hardware does work under Linux and which 536 information about which PCI hardware does work under Linux and which
532 doesn't. 537 doesn't.
533 538
539config PCI_SYSCALL
540 def_bool PCI
541
534# Select the host bridge type 542# Select the host bridge type
535config PCI_HOST_VIA82C505 543config PCI_HOST_VIA82C505
536 bool 544 bool
@@ -1034,6 +1042,8 @@ source "drivers/mmc/Kconfig"
1034 1042
1035source "drivers/rtc/Kconfig" 1043source "drivers/rtc/Kconfig"
1036 1044
1045source "drivers/dma/Kconfig"
1046
1037endmenu 1047endmenu
1038 1048
1039source "fs/Kconfig" 1049source "fs/Kconfig"
diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore
index 171a0853caf8..ce1c5ff746e7 100644
--- a/arch/arm/boot/.gitignore
+++ b/arch/arm/boot/.gitignore
@@ -1,2 +1,5 @@
1Image 1Image
2zImage 2zImage
3xipImage
4bootpImage
5uImage
diff --git a/arch/arm/boot/compressed/.gitignore b/arch/arm/boot/compressed/.gitignore
index aefee20cbf98..b15f927a5926 100644
--- a/arch/arm/boot/compressed/.gitignore
+++ b/arch/arm/boot/compressed/.gitignore
@@ -1 +1,2 @@
1piggy.gz 1piggy.gz
2font.c
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index adddc7131685..a1f1691b67fe 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -6,15 +6,13 @@
6 6
7HEAD = head.o 7HEAD = head.o
8OBJS = misc.o 8OBJS = misc.o
9FONTC = drivers/video/console/font_acorn_8x8.c 9FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c
10
11FONT = $(addprefix ../../../../drivers/video/console/, font_acorn_8x8.o)
12 10
13# 11#
14# Architecture dependencies 12# Architecture dependencies
15# 13#
16ifeq ($(CONFIG_ARCH_ACORN),y) 14ifeq ($(CONFIG_ARCH_ACORN),y)
17OBJS += ll_char_wr.o $(FONT) 15OBJS += ll_char_wr.o font.o
18endif 16endif
19 17
20ifeq ($(CONFIG_ARCH_SHARK),y) 18ifeq ($(CONFIG_ARCH_SHARK),y)
@@ -73,7 +71,7 @@ endif
73 71
74SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ 72SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
75 73
76targets := vmlinux vmlinux.lds piggy.gz piggy.o $(FONT) \ 74targets := vmlinux vmlinux.lds piggy.gz piggy.o font.o font.c \
77 head.o misc.o $(OBJS) 75 head.o misc.o $(OBJS)
78EXTRA_CFLAGS := -fpic 76EXTRA_CFLAGS := -fpic
79EXTRA_AFLAGS := 77EXTRA_AFLAGS :=
@@ -105,7 +103,10 @@ $(obj)/piggy.gz: $(obj)/../Image FORCE
105 103
106$(obj)/piggy.o: $(obj)/piggy.gz FORCE 104$(obj)/piggy.o: $(obj)/piggy.gz FORCE
107 105
108CFLAGS_font_acorn_8x8.o := -Dstatic= 106CFLAGS_font.o := -Dstatic=
107
108$(obj)/font.c: $(FONTC)
109 $(call cmd,shipped)
109 110
110$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config 111$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config
111 @sed "$(SEDFLAGS)" < $< > $@ 112 @sed "$(SEDFLAGS)" < $< > $@
diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S
index 73c5d9e0201c..236bbe578312 100644
--- a/arch/arm/boot/compressed/head-xscale.S
+++ b/arch/arm/boot/compressed/head-xscale.S
@@ -41,11 +41,6 @@ __XScale_start:
41 mov r7, #MACH_TYPE_COTULLA_IDP 41 mov r7, #MACH_TYPE_COTULLA_IDP
42#endif 42#endif
43 43
44#ifdef CONFIG_MACH_GTWX5715
45 mov r7, #(MACH_TYPE_GTWX5715 & 0xff)
46 orr r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00)
47#endif
48
49#ifdef CONFIG_ARCH_IXP2000 44#ifdef CONFIG_ARCH_IXP2000
50 mov r1, #-1 45 mov r1, #-1
51 mov r0, #0xd6000000 46 mov r0, #0xd6000000
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 2568d311be21..d7fb5ee1637e 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -247,7 +247,7 @@ not_relocated: mov r0, #0
247 mov r3, r7 247 mov r3, r7
248 bl decompress_kernel 248 bl decompress_kernel
249 249
250 add r0, r0, #127 250 add r0, r0, #127 + 128 @ alignment + stack
251 bic r0, r0, #127 @ align the kernel length 251 bic r0, r0, #127 @ align the kernel length
252/* 252/*
253 * r0 = decompressed kernel length 253 * r0 = decompressed kernel length
@@ -269,6 +269,7 @@ not_relocated: mov r0, #0
269 stmia r1!, {r9 - r14} 269 stmia r1!, {r9 - r14}
270 cmp r2, r3 270 cmp r2, r3
271 blo 1b 271 blo 1b
272 add sp, r1, #128 @ relocate the stack
272 273
273 bl cache_clean_flush 274 bl cache_clean_flush
274 add pc, r5, r0 @ call relocation code 275 add pc, r5, r0 @ call relocation code
@@ -435,6 +436,28 @@ __armv4_mmu_cache_on:
435 mcr p15, 0, r0, c8, c7, 0 @ flush I,D TLBs 436 mcr p15, 0, r0, c8, c7, 0 @ flush I,D TLBs
436 mov pc, r12 437 mov pc, r12
437 438
439__armv7_mmu_cache_on:
440 mov r12, lr
441 mrc p15, 0, r11, c0, c1, 4 @ read ID_MMFR0
442 tst r11, #0xf @ VMSA
443 blne __setup_mmu
444 mov r0, #0
445 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
446 tst r11, #0xf @ VMSA
447 mcrne p15, 0, r0, c8, c7, 0 @ flush I,D TLBs
448 mrc p15, 0, r0, c1, c0, 0 @ read control reg
449 orr r0, r0, #0x5000 @ I-cache enable, RR cache replacement
450 orr r0, r0, #0x003c @ write buffer
451 orrne r0, r0, #1 @ MMU enabled
452 movne r1, #-1
453 mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer
454 mcrne p15, 0, r1, c3, c0, 0 @ load domain access control
455 mcr p15, 0, r0, c1, c0, 0 @ load control register
456 mrc p15, 0, r0, c1, c0, 0 @ and read it back
457 mov r0, #0
458 mcr p15, 0, r0, c7, c5, 4 @ ISB
459 mov pc, r12
460
438__arm6_mmu_cache_on: 461__arm6_mmu_cache_on:
439 mov r12, lr 462 mov r12, lr
440 bl __setup_mmu 463 bl __setup_mmu
@@ -476,6 +499,7 @@ __common_mmu_cache_on:
476 */ 499 */
477 .align 5 500 .align 5
478reloc_start: add r9, r5, r0 501reloc_start: add r9, r5, r0
502 sub r9, r9, #128 @ do not copy the stack
479 debug_reloc_start 503 debug_reloc_start
480 mov r1, r4 504 mov r1, r4
4811: 5051:
@@ -486,6 +510,7 @@ reloc_start: add r9, r5, r0
486 510
487 cmp r5, r9 511 cmp r5, r9
488 blo 1b 512 blo 1b
513 add sp, r1, #128 @ relocate the stack
489 debug_reloc_end 514 debug_reloc_end
490 515
491call_kernel: bl cache_clean_flush 516call_kernel: bl cache_clean_flush
@@ -619,11 +644,17 @@ proc_types:
619 b __armv4_mmu_cache_flush 644 b __armv4_mmu_cache_flush
620 645
621 .word 0x0007b000 @ ARMv6 646 .word 0x0007b000 @ ARMv6
622 .word 0x0007f000 647 .word 0x000ff000
623 b __armv4_mmu_cache_on 648 b __armv4_mmu_cache_on
624 b __armv4_mmu_cache_off 649 b __armv4_mmu_cache_off
625 b __armv6_mmu_cache_flush 650 b __armv6_mmu_cache_flush
626 651
652 .word 0x000f0000 @ new CPU Id
653 .word 0x000f0000
654 b __armv7_mmu_cache_on
655 b __armv7_mmu_cache_off
656 b __armv7_mmu_cache_flush
657
627 .word 0 @ unrecognised type 658 .word 0 @ unrecognised type
628 .word 0 659 .word 0
629 mov pc, lr 660 mov pc, lr
@@ -671,6 +702,16 @@ __armv4_mmu_cache_off:
671 mcr p15, 0, r0, c8, c7 @ invalidate whole TLB v4 702 mcr p15, 0, r0, c8, c7 @ invalidate whole TLB v4
672 mov pc, lr 703 mov pc, lr
673 704
705__armv7_mmu_cache_off:
706 mrc p15, 0, r0, c1, c0
707 bic r0, r0, #0x000d
708 mcr p15, 0, r0, c1, c0 @ turn MMU and cache off
709 mov r12, lr
710 bl __armv7_mmu_cache_flush
711 mov r0, #0
712 mcr p15, 0, r0, c8, c7, 0 @ invalidate whole TLB
713 mov pc, r12
714
674__arm6_mmu_cache_off: 715__arm6_mmu_cache_off:
675 mov r0, #0x00000030 @ ARM6 control reg. 716 mov r0, #0x00000030 @ ARM6 control reg.
676 b __armv3_mmu_cache_off 717 b __armv3_mmu_cache_off
@@ -727,6 +768,59 @@ __armv6_mmu_cache_flush:
727 mcr p15, 0, r1, c7, c10, 4 @ drain WB 768 mcr p15, 0, r1, c7, c10, 4 @ drain WB
728 mov pc, lr 769 mov pc, lr
729 770
771__armv7_mmu_cache_flush:
772 mrc p15, 0, r10, c0, c1, 5 @ read ID_MMFR1
773 tst r10, #0xf << 16 @ hierarchical cache (ARMv7)
774 beq hierarchical
775 mov r10, #0
776 mcr p15, 0, r10, c7, c14, 0 @ clean+invalidate D
777 b iflush
778hierarchical:
779 stmfd sp!, {r0-r5, r7, r9-r11}
780 mrc p15, 1, r0, c0, c0, 1 @ read clidr
781 ands r3, r0, #0x7000000 @ extract loc from clidr
782 mov r3, r3, lsr #23 @ left align loc bit field
783 beq finished @ if loc is 0, then no need to clean
784 mov r10, #0 @ start clean at cache level 0
785loop1:
786 add r2, r10, r10, lsr #1 @ work out 3x current cache level
787 mov r1, r0, lsr r2 @ extract cache type bits from clidr
788 and r1, r1, #7 @ mask of the bits for current cache only
789 cmp r1, #2 @ see what cache we have at this level
790 blt skip @ skip if no cache, or just i-cache
791 mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr
792 mcr p15, 0, r10, c7, c5, 4 @ isb to sych the new cssr&csidr
793 mrc p15, 1, r1, c0, c0, 0 @ read the new csidr
794 and r2, r1, #7 @ extract the length of the cache lines
795 add r2, r2, #4 @ add 4 (line length offset)
796 ldr r4, =0x3ff
797 ands r4, r4, r1, lsr #3 @ find maximum number on the way size
798 .word 0xe16f5f14 @ clz r5, r4 - find bit position of way size increment
799 ldr r7, =0x7fff
800 ands r7, r7, r1, lsr #13 @ extract max number of the index size
801loop2:
802 mov r9, r4 @ create working copy of max way size
803loop3:
804 orr r11, r10, r9, lsl r5 @ factor way and cache number into r11
805 orr r11, r11, r7, lsl r2 @ factor index number into r11
806 mcr p15, 0, r11, c7, c14, 2 @ clean & invalidate by set/way
807 subs r9, r9, #1 @ decrement the way
808 bge loop3
809 subs r7, r7, #1 @ decrement the index
810 bge loop2
811skip:
812 add r10, r10, #2 @ increment cache number
813 cmp r3, r10
814 bgt loop1
815finished:
816 mov r10, #0 @ swith back to cache level 0
817 mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr
818 ldmfd sp!, {r0-r5, r7, r9-r11}
819iflush:
820 mcr p15, 0, r10, c7, c5, 0 @ invalidate I+BTB
821 mcr p15, 0, r10, c7, c10, 4 @ drain WB
822 mov pc, lr
823
730__armv4_mmu_cache_flush: 824__armv4_mmu_cache_flush:
731 mov r2, #64*1024 @ default: 32K dcache size (*2) 825 mov r2, #64*1024 @ default: 32K dcache size (*2)
732 mov r11, #32 @ default: 32 byte line size 826 mov r11, #32 @ default: 32 byte line size
@@ -833,6 +927,7 @@ memdump: mov r12, r0
833 mov pc, r10 927 mov pc, r10
834#endif 928#endif
835 929
930 .ltorg
836reloc_end: 931reloc_end:
837 932
838 .align 933 .align
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index cfe6f4650bc9..ae21755872ed 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -60,6 +60,9 @@ struct locomo {
60 unsigned int irq; 60 unsigned int irq;
61 spinlock_t lock; 61 spinlock_t lock;
62 void __iomem *base; 62 void __iomem *base;
63#ifdef CONFIG_PM
64 void *saved_state;
65#endif
63}; 66};
64 67
65struct locomo_dev_info { 68struct locomo_dev_info {
@@ -565,7 +568,7 @@ static int locomo_suspend(struct platform_device *dev, pm_message_t state)
565 if (!save) 568 if (!save)
566 return -ENOMEM; 569 return -ENOMEM;
567 570
568 dev->dev.power.saved_state = (void *) save; 571 lchip->saved_state = save;
569 572
570 spin_lock_irqsave(&lchip->lock, flags); 573 spin_lock_irqsave(&lchip->lock, flags);
571 574
@@ -605,8 +608,8 @@ static int locomo_resume(struct platform_device *dev)
605 struct locomo_save_data *save; 608 struct locomo_save_data *save;
606 unsigned long r; 609 unsigned long r;
607 unsigned long flags; 610 unsigned long flags;
608 611
609 save = (struct locomo_save_data *) dev->dev.power.saved_state; 612 save = lchip->saved_state;
610 if (!save) 613 if (!save)
611 return 0; 614 return 0;
612 615
@@ -628,6 +631,8 @@ static int locomo_resume(struct platform_device *dev)
628 locomo_writel(0x1, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KCMD); 631 locomo_writel(0x1, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KCMD);
629 632
630 spin_unlock_irqrestore(&lchip->lock, flags); 633 spin_unlock_irqrestore(&lchip->lock, flags);
634
635 lchip->saved_state = NULL;
631 kfree(save); 636 kfree(save);
632 637
633 return 0; 638 return 0;
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 798bbfccafb7..eb06d0b2cb74 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -51,6 +51,9 @@ struct sa1111 {
51 int irq; 51 int irq;
52 spinlock_t lock; 52 spinlock_t lock;
53 void __iomem *base; 53 void __iomem *base;
54#ifdef CONFIG_PM
55 void *saved_state;
56#endif
54}; 57};
55 58
56/* 59/*
@@ -822,7 +825,7 @@ static int sa1111_suspend(struct platform_device *dev, pm_message_t state)
822 save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL); 825 save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL);
823 if (!save) 826 if (!save)
824 return -ENOMEM; 827 return -ENOMEM;
825 dev->dev.power.saved_state = save; 828 sachip->saved_state = save;
826 829
827 spin_lock_irqsave(&sachip->lock, flags); 830 spin_lock_irqsave(&sachip->lock, flags);
828 831
@@ -878,7 +881,7 @@ static int sa1111_resume(struct platform_device *dev)
878 unsigned long flags, id; 881 unsigned long flags, id;
879 void __iomem *base; 882 void __iomem *base;
880 883
881 save = (struct sa1111_save_data *)dev->dev.power.saved_state; 884 save = sachip->saved_state;
882 if (!save) 885 if (!save)
883 return 0; 886 return 0;
884 887
@@ -923,7 +926,7 @@ static int sa1111_resume(struct platform_device *dev)
923 926
924 spin_unlock_irqrestore(&sachip->lock, flags); 927 spin_unlock_irqrestore(&sachip->lock, flags);
925 928
926 dev->dev.power.saved_state = NULL; 929 sachip->saved_state = NULL;
927 kfree(save); 930 kfree(save);
928 931
929 return 0; 932 return 0;
@@ -958,8 +961,8 @@ static int sa1111_remove(struct platform_device *pdev)
958 platform_set_drvdata(pdev, NULL); 961 platform_set_drvdata(pdev, NULL);
959 962
960#ifdef CONFIG_PM 963#ifdef CONFIG_PM
961 kfree(pdev->dev.power.saved_state); 964 kfree(sachip->saved_state);
962 pdev->dev.power.saved_state = NULL; 965 sachip->saved_state = NULL;
963#endif 966#endif
964 } 967 }
965 968
diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c
index 3bf3a927ae22..111a7fa5debe 100644
--- a/arch/arm/common/sharpsl_pm.c
+++ b/arch/arm/common/sharpsl_pm.c
@@ -766,9 +766,7 @@ static void sharpsl_apm_get_power_status(struct apm_power_info *info)
766} 766}
767 767
768static struct pm_ops sharpsl_pm_ops = { 768static struct pm_ops sharpsl_pm_ops = {
769 .prepare = pxa_pm_prepare,
770 .enter = corgi_pxa_pm_enter, 769 .enter = corgi_pxa_pm_enter,
771 .finish = pxa_pm_finish,
772 .valid = pm_valid_only_mem, 770 .valid = pm_valid_only_mem,
773}; 771};
774 772
diff --git a/arch/arm/configs/badge4_defconfig b/arch/arm/configs/badge4_defconfig
index 821865f75605..b2bbf217c707 100644
--- a/arch/arm/configs/badge4_defconfig
+++ b/arch/arm/configs/badge4_defconfig
@@ -708,7 +708,6 @@ CONFIG_I2C_ALGOPCF=m
708# I2C Hardware Bus support 708# I2C Hardware Bus support
709# 709#
710CONFIG_I2C_ELEKTOR=m 710CONFIG_I2C_ELEKTOR=m
711# CONFIG_I2C_ISA is not set
712# CONFIG_I2C_PARPORT is not set 711# CONFIG_I2C_PARPORT is not set
713# CONFIG_I2C_PARPORT_LIGHT is not set 712# CONFIG_I2C_PARPORT_LIGHT is not set
714# CONFIG_I2C_STUB is not set 713# CONFIG_I2C_STUB is not set
diff --git a/arch/arm/configs/clps7500_defconfig b/arch/arm/configs/clps7500_defconfig
index af9ae5389131..49e9f9d8b3d1 100644
--- a/arch/arm/configs/clps7500_defconfig
+++ b/arch/arm/configs/clps7500_defconfig
@@ -536,7 +536,6 @@ CONFIG_I2C_ALGOBIT=y
536# I2C Hardware Bus support 536# I2C Hardware Bus support
537# 537#
538# CONFIG_I2C_ELEKTOR is not set 538# CONFIG_I2C_ELEKTOR is not set
539# CONFIG_I2C_ISA is not set
540# CONFIG_I2C_PARPORT is not set 539# CONFIG_I2C_PARPORT is not set
541# CONFIG_I2C_PARPORT_LIGHT is not set 540# CONFIG_I2C_PARPORT_LIGHT is not set
542# CONFIG_I2C_PCA_ISA is not set 541# CONFIG_I2C_PCA_ISA is not set
diff --git a/arch/arm/configs/footbridge_defconfig b/arch/arm/configs/footbridge_defconfig
index 2a612d23120b..299dc22294a0 100644
--- a/arch/arm/configs/footbridge_defconfig
+++ b/arch/arm/configs/footbridge_defconfig
@@ -748,7 +748,6 @@ CONFIG_I2C=m
748# CONFIG_I2C_ELEKTOR is not set 748# CONFIG_I2C_ELEKTOR is not set
749# CONFIG_I2C_I801 is not set 749# CONFIG_I2C_I801 is not set
750# CONFIG_I2C_I810 is not set 750# CONFIG_I2C_I810 is not set
751# CONFIG_I2C_ISA is not set
752# CONFIG_I2C_NFORCE2 is not set 751# CONFIG_I2C_NFORCE2 is not set
753# CONFIG_I2C_PARPORT is not set 752# CONFIG_I2C_PARPORT is not set
754# CONFIG_I2C_PARPORT_LIGHT is not set 753# CONFIG_I2C_PARPORT_LIGHT is not set
diff --git a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponset_defconfig
index e86794a10fc0..92ccdc6492f7 100644
--- a/arch/arm/configs/neponset_defconfig
+++ b/arch/arm/configs/neponset_defconfig
@@ -698,7 +698,6 @@ CONFIG_I2C_ALGOBIT=y
698# I2C Hardware Bus support 698# I2C Hardware Bus support
699# 699#
700# CONFIG_I2C_ELEKTOR is not set 700# CONFIG_I2C_ELEKTOR is not set
701# CONFIG_I2C_ISA is not set
702# CONFIG_I2C_PARPORT_LIGHT is not set 701# CONFIG_I2C_PARPORT_LIGHT is not set
703# CONFIG_I2C_STUB is not set 702# CONFIG_I2C_STUB is not set
704# CONFIG_I2C_PCA_ISA is not set 703# CONFIG_I2C_PCA_ISA is not set
diff --git a/arch/arm/configs/picotux200_defconfig b/arch/arm/configs/picotux200_defconfig
index 339c48953a62..3c0c4f192dc1 100644
--- a/arch/arm/configs/picotux200_defconfig
+++ b/arch/arm/configs/picotux200_defconfig
@@ -735,7 +735,6 @@ CONFIG_I2C_CHARDEV=m
735# I2C Hardware Bus support 735# I2C Hardware Bus support
736# 736#
737CONFIG_I2C_AT91=m 737CONFIG_I2C_AT91=m
738CONFIG_I2C_ISA=m
739# CONFIG_I2C_OCORES is not set 738# CONFIG_I2C_OCORES is not set
740# CONFIG_I2C_PARPORT_LIGHT is not set 739# CONFIG_I2C_PARPORT_LIGHT is not set
741# CONFIG_I2C_STUB is not set 740# CONFIG_I2C_STUB is not set
diff --git a/arch/arm/configs/rpc_defconfig b/arch/arm/configs/rpc_defconfig
index bc091264d354..8452dc8c7cc3 100644
--- a/arch/arm/configs/rpc_defconfig
+++ b/arch/arm/configs/rpc_defconfig
@@ -558,7 +558,6 @@ CONFIG_I2C_ALGOBIT=y
558# 558#
559# I2C Hardware Bus support 559# I2C Hardware Bus support
560# 560#
561# CONFIG_I2C_ISA is not set
562# CONFIG_I2C_PARPORT is not set 561# CONFIG_I2C_PARPORT is not set
563# CONFIG_I2C_PARPORT_LIGHT is not set 562# CONFIG_I2C_PARPORT_LIGHT is not set
564# CONFIG_I2C_STUB is not set 563# CONFIG_I2C_STUB is not set
diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig
index a850da377a29..1d5150e4d6b3 100644
--- a/arch/arm/configs/s3c2410_defconfig
+++ b/arch/arm/configs/s3c2410_defconfig
@@ -826,7 +826,6 @@ CONFIG_I2C_ALGOBIT=m
826# I2C Hardware Bus support 826# I2C Hardware Bus support
827# 827#
828# CONFIG_I2C_ELEKTOR is not set 828# CONFIG_I2C_ELEKTOR is not set
829CONFIG_I2C_ISA=m
830# CONFIG_I2C_OCORES is not set 829# CONFIG_I2C_OCORES is not set
831# CONFIG_I2C_PARPORT is not set 830# CONFIG_I2C_PARPORT is not set
832# CONFIG_I2C_PARPORT_LIGHT is not set 831# CONFIG_I2C_PARPORT_LIGHT is not set
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index 19326d7cdeb3..a98d0c933db0 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -350,7 +350,7 @@
350 CALL(sys_set_robust_list) 350 CALL(sys_set_robust_list)
351 CALL(sys_get_robust_list) 351 CALL(sys_get_robust_list)
352/* 340 */ CALL(sys_splice) 352/* 340 */ CALL(sys_splice)
353 CALL(sys_arm_sync_file_range) 353 CALL(sys_sync_file_range2)
354 CALL(sys_tee) 354 CALL(sys_tee)
355 CALL(sys_vmsplice) 355 CALL(sys_vmsplice)
356 CALL(sys_move_pages) 356 CALL(sys_move_pages)
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index a52da0ddb43d..024a9cf469b4 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -20,7 +20,8 @@ __switch_data:
20 .long _end @ r7 20 .long _end @ r7
21 .long processor_id @ r4 21 .long processor_id @ r4
22 .long __machine_arch_type @ r5 22 .long __machine_arch_type @ r5
23 .long cr_alignment @ r6 23 .long __atags_pointer @ r6
24 .long cr_alignment @ r7
24 .long init_thread_union + THREAD_START_SP @ sp 25 .long init_thread_union + THREAD_START_SP @ sp
25 26
26/* 27/*
@@ -29,6 +30,7 @@ __switch_data:
29 * 30 *
30 * r0 = cp#15 control register 31 * r0 = cp#15 control register
31 * r1 = machine ID 32 * r1 = machine ID
33 * r2 = atags pointer
32 * r9 = processor ID 34 * r9 = processor ID
33 */ 35 */
34 .type __mmap_switched, %function 36 .type __mmap_switched, %function
@@ -47,11 +49,12 @@ __mmap_switched:
47 strcc fp, [r6],#4 49 strcc fp, [r6],#4
48 bcc 1b 50 bcc 1b
49 51
50 ldmia r3, {r4, r5, r6, sp} 52 ldmia r3, {r4, r5, r6, r7, sp}
51 str r9, [r4] @ Save processor ID 53 str r9, [r4] @ Save processor ID
52 str r1, [r5] @ Save machine type 54 str r1, [r5] @ Save machine type
55 str r2, [r6] @ Save atags pointer
53 bic r4, r0, #CR_A @ Clear 'A' bit 56 bic r4, r0, #CR_A @ Clear 'A' bit
54 stmia r6, {r0, r4} @ Save control register values 57 stmia r7, {r0, r4} @ Save control register values
55 b start_kernel 58 b start_kernel
56 59
57/* 60/*
@@ -215,3 +218,34 @@ ENTRY(lookup_machine_type)
215 bl __lookup_machine_type 218 bl __lookup_machine_type
216 mov r0, r5 219 mov r0, r5
217 ldmfd sp!, {r4 - r6, pc} 220 ldmfd sp!, {r4 - r6, pc}
221
222/* Determine validity of the r2 atags pointer. The heuristic requires
223 * that the pointer be aligned, in the first 16k of physical RAM and
224 * that the ATAG_CORE marker is first and present. Future revisions
225 * of this function may be more lenient with the physical address and
226 * may also be able to move the ATAGS block if necessary.
227 *
228 * r8 = machinfo
229 *
230 * Returns:
231 * r2 either valid atags pointer, or zero
232 * r5, r6 corrupted
233 */
234
235 .type __vet_atags, %function
236__vet_atags:
237 tst r2, #0x3 @ aligned?
238 bne 1f
239
240 ldr r5, [r2, #0] @ is first tag ATAG_CORE?
241 subs r5, r5, #ATAG_CORE_SIZE
242 bne 1f
243 ldr r5, [r2, #4]
244 ldr r6, =ATAG_CORE
245 cmp r5, r6
246 bne 1f
247
248 mov pc, lr @ atag pointer is ok
249
2501: mov r2, #0
251 mov pc, lr
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 41f98b4ba2ee..7898cbc9861a 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -29,6 +29,10 @@
29#define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET) 29#define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET)
30#define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET) 30#define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET)
31 31
32#define ATAG_CORE 0x54410001
33#define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2)
34
35
32/* 36/*
33 * swapper_pg_dir is the virtual address of the initial page table. 37 * swapper_pg_dir is the virtual address of the initial page table.
34 * We place the page tables 16K below KERNEL_RAM_VADDR. Therefore, we must 38 * We place the page tables 16K below KERNEL_RAM_VADDR. Therefore, we must
@@ -61,7 +65,7 @@
61 * 65 *
62 * This is normally called from the decompressor code. The requirements 66 * This is normally called from the decompressor code. The requirements
63 * are: MMU = off, D-cache = off, I-cache = dont care, r0 = 0, 67 * are: MMU = off, D-cache = off, I-cache = dont care, r0 = 0,
64 * r1 = machine nr. 68 * r1 = machine nr, r2 = atags pointer.
65 * 69 *
66 * This code is mostly position independent, so if you link the kernel at 70 * This code is mostly position independent, so if you link the kernel at
67 * 0xc0008000, you call this at __pa(0xc0008000). 71 * 0xc0008000, you call this at __pa(0xc0008000).
@@ -85,6 +89,7 @@ ENTRY(stext)
85 bl __lookup_machine_type @ r5=machinfo 89 bl __lookup_machine_type @ r5=machinfo
86 movs r8, r5 @ invalid machine (r5=0)? 90 movs r8, r5 @ invalid machine (r5=0)?
87 beq __error_a @ yes, error 'a' 91 beq __error_a @ yes, error 'a'
92 bl __vet_atags
88 bl __create_page_tables 93 bl __create_page_tables
89 94
90 /* 95 /*
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 5d6e6523598b..93b7f8e22dcc 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -28,6 +28,7 @@
28#include <linux/elfcore.h> 28#include <linux/elfcore.h>
29#include <linux/pm.h> 29#include <linux/pm.h>
30#include <linux/tick.h> 30#include <linux/tick.h>
31#include <linux/utsname.h>
31 32
32#include <asm/leds.h> 33#include <asm/leds.h>
33#include <asm/processor.h> 34#include <asm/processor.h>
@@ -43,6 +44,10 @@ static const char *processor_modes[] = {
43 "UK8_32" , "UK9_32" , "UK10_32", "UND_32" , "UK12_32", "UK13_32", "UK14_32", "SYS_32" 44 "UK8_32" , "UK9_32" , "UK10_32", "UND_32" , "UK12_32", "UK13_32", "UK14_32", "SYS_32"
44}; 45};
45 46
47static const char *isa_modes[] = {
48 "ARM" , "Thumb" , "Jazelle", "ThumbEE"
49};
50
46extern void setup_mm_for_reboot(char mode); 51extern void setup_mm_for_reboot(char mode);
47 52
48static volatile int hlt_counter; 53static volatile int hlt_counter;
@@ -199,16 +204,19 @@ void machine_restart(char * __unused)
199 204
200void __show_regs(struct pt_regs *regs) 205void __show_regs(struct pt_regs *regs)
201{ 206{
202 unsigned long flags = condition_codes(regs); 207 unsigned long flags;
208 char buf[64];
203 209
204 printk("CPU: %d\n", smp_processor_id()); 210 printk("CPU: %d %s (%s %.*s)\n",
211 smp_processor_id(), print_tainted(), init_utsname()->release,
212 (int)strcspn(init_utsname()->version, " "),
213 init_utsname()->version);
205 print_symbol("PC is at %s\n", instruction_pointer(regs)); 214 print_symbol("PC is at %s\n", instruction_pointer(regs));
206 print_symbol("LR is at %s\n", regs->ARM_lr); 215 print_symbol("LR is at %s\n", regs->ARM_lr);
207 printk("pc : [<%08lx>] lr : [<%08lx>] %s\n" 216 printk("pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n"
208 "sp : %08lx ip : %08lx fp : %08lx\n", 217 "sp : %08lx ip : %08lx fp : %08lx\n",
209 instruction_pointer(regs), 218 regs->ARM_pc, regs->ARM_lr, regs->ARM_cpsr,
210 regs->ARM_lr, print_tainted(), regs->ARM_sp, 219 regs->ARM_sp, regs->ARM_ip, regs->ARM_fp);
211 regs->ARM_ip, regs->ARM_fp);
212 printk("r10: %08lx r9 : %08lx r8 : %08lx\n", 220 printk("r10: %08lx r9 : %08lx r8 : %08lx\n",
213 regs->ARM_r10, regs->ARM_r9, 221 regs->ARM_r10, regs->ARM_r9,
214 regs->ARM_r8); 222 regs->ARM_r8);
@@ -218,36 +226,39 @@ void __show_regs(struct pt_regs *regs)
218 printk("r3 : %08lx r2 : %08lx r1 : %08lx r0 : %08lx\n", 226 printk("r3 : %08lx r2 : %08lx r1 : %08lx r0 : %08lx\n",
219 regs->ARM_r3, regs->ARM_r2, 227 regs->ARM_r3, regs->ARM_r2,
220 regs->ARM_r1, regs->ARM_r0); 228 regs->ARM_r1, regs->ARM_r0);
221 printk("Flags: %c%c%c%c", 229
222 flags & PSR_N_BIT ? 'N' : 'n', 230 flags = regs->ARM_cpsr;
223 flags & PSR_Z_BIT ? 'Z' : 'z', 231 buf[0] = flags & PSR_N_BIT ? 'N' : 'n';
224 flags & PSR_C_BIT ? 'C' : 'c', 232 buf[1] = flags & PSR_Z_BIT ? 'Z' : 'z';
225 flags & PSR_V_BIT ? 'V' : 'v'); 233 buf[2] = flags & PSR_C_BIT ? 'C' : 'c';
226 printk(" IRQs o%s FIQs o%s Mode %s%s Segment %s\n", 234 buf[3] = flags & PSR_V_BIT ? 'V' : 'v';
227 interrupts_enabled(regs) ? "n" : "ff", 235 buf[4] = '\0';
236
237 printk("Flags: %s IRQs o%s FIQs o%s Mode %s ISA %s Segment %s\n",
238 buf, interrupts_enabled(regs) ? "n" : "ff",
228 fast_interrupts_enabled(regs) ? "n" : "ff", 239 fast_interrupts_enabled(regs) ? "n" : "ff",
229 processor_modes[processor_mode(regs)], 240 processor_modes[processor_mode(regs)],
230 thumb_mode(regs) ? " (T)" : "", 241 isa_modes[isa_mode(regs)],
231 get_fs() == get_ds() ? "kernel" : "user"); 242 get_fs() == get_ds() ? "kernel" : "user");
232#if CONFIG_CPU_CP15 243#ifdef CONFIG_CPU_CP15
233 { 244 {
234 unsigned int ctrl; 245 unsigned int ctrl;
235 __asm__ ( 246
236 " mrc p15, 0, %0, c1, c0\n" 247 buf[0] = '\0';
237 : "=r" (ctrl));
238 printk("Control: %04X\n", ctrl);
239 }
240#ifdef CONFIG_CPU_CP15_MMU 248#ifdef CONFIG_CPU_CP15_MMU
241 { 249 {
242 unsigned int transbase, dac; 250 unsigned int transbase, dac;
243 __asm__ ( 251 asm("mrc p15, 0, %0, c2, c0\n\t"
244 " mrc p15, 0, %0, c2, c0\n" 252 "mrc p15, 0, %1, c3, c0\n"
245 " mrc p15, 0, %1, c3, c0\n" 253 : "=r" (transbase), "=r" (dac));
246 : "=r" (transbase), "=r" (dac)); 254 snprintf(buf, sizeof(buf), " Table: %08x DAC: %08x",
247 printk("Table: %08X DAC: %08X\n", 255 transbase, dac);
248 transbase, dac); 256 }
249 }
250#endif 257#endif
258 asm("mrc p15, 0, %0, c1, c0\n" : "=r" (ctrl));
259
260 printk("Control: %08x%s\n", ctrl, buf);
261 }
251#endif 262#endif
252} 263}
253 264
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index 6f2f46c2e406..78c9f1a3d41f 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -657,7 +657,6 @@ static int ptrace_setcrunchregs(struct task_struct *tsk, void __user *ufp)
657 657
658long arch_ptrace(struct task_struct *child, long request, long addr, long data) 658long arch_ptrace(struct task_struct *child, long request, long addr, long data)
659{ 659{
660 unsigned long tmp;
661 int ret; 660 int ret;
662 661
663 switch (request) { 662 switch (request) {
@@ -666,12 +665,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
666 */ 665 */
667 case PTRACE_PEEKTEXT: 666 case PTRACE_PEEKTEXT:
668 case PTRACE_PEEKDATA: 667 case PTRACE_PEEKDATA:
669 ret = access_process_vm(child, addr, &tmp, 668 ret = generic_ptrace_peekdata(child, addr, data);
670 sizeof(unsigned long), 0);
671 if (ret == sizeof(unsigned long))
672 ret = put_user(tmp, (unsigned long __user *) data);
673 else
674 ret = -EIO;
675 break; 669 break;
676 670
677 case PTRACE_PEEKUSR: 671 case PTRACE_PEEKUSR:
@@ -683,12 +677,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
683 */ 677 */
684 case PTRACE_POKETEXT: 678 case PTRACE_POKETEXT:
685 case PTRACE_POKEDATA: 679 case PTRACE_POKEDATA:
686 ret = access_process_vm(child, addr, &data, 680 ret = generic_ptrace_pokedata(child, addr, data);
687 sizeof(unsigned long), 1);
688 if (ret == sizeof(unsigned long))
689 ret = 0;
690 else
691 ret = -EIO;
692 break; 681 break;
693 682
694 case PTRACE_POKEUSR: 683 case PTRACE_POKEUSR:
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 650eac1bc0a6..5be2e987b843 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -63,6 +63,8 @@ unsigned int processor_id;
63unsigned int __machine_arch_type; 63unsigned int __machine_arch_type;
64EXPORT_SYMBOL(__machine_arch_type); 64EXPORT_SYMBOL(__machine_arch_type);
65 65
66unsigned int __atags_pointer __initdata;
67
66unsigned int system_rev; 68unsigned int system_rev;
67EXPORT_SYMBOL(system_rev); 69EXPORT_SYMBOL(system_rev);
68 70
@@ -780,7 +782,9 @@ void __init setup_arch(char **cmdline_p)
780 if (mdesc->soft_reboot) 782 if (mdesc->soft_reboot)
781 reboot_setup("s"); 783 reboot_setup("s");
782 784
783 if (mdesc->boot_params) 785 if (__atags_pointer)
786 tags = phys_to_virt(__atags_pointer);
787 else if (mdesc->boot_params)
784 tags = phys_to_virt(mdesc->boot_params); 788 tags = phys_to_virt(mdesc->boot_params);
785 789
786 /* 790 /*
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c
index 1ca2d5174fcb..4d25e49a14f7 100644
--- a/arch/arm/kernel/sys_arm.c
+++ b/arch/arm/kernel/sys_arm.c
@@ -328,16 +328,3 @@ asmlinkage long sys_arm_fadvise64_64(int fd, int advice,
328{ 328{
329 return sys_fadvise64_64(fd, offset, len, advice); 329 return sys_fadvise64_64(fd, offset, len, advice);
330} 330}
331
332/*
333 * Yet more syscall fsckage - we can't fit sys_sync_file_range's
334 * arguments into the available registers with EABI. So, let's
335 * create an ARM specific syscall for this which has _sane_
336 * arguments. (This incidentally also has an ABI-independent
337 * argument layout.)
338 */
339asmlinkage long sys_arm_sync_file_range(int fd, unsigned int flags,
340 loff_t offset, loff_t nbytes)
341{
342 return sys_sync_file_range(fd, offset, nbytes, flags);
343}
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 10ff36e4e414..f2114bcf09d5 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -181,9 +181,7 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
181 181
182void dump_stack(void) 182void dump_stack(void)
183{ 183{
184#ifdef CONFIG_DEBUG_ERRORS
185 __backtrace(); 184 __backtrace();
186#endif
187} 185}
188 186
189EXPORT_SYMBOL(dump_stack); 187EXPORT_SYMBOL(dump_stack);
@@ -204,12 +202,24 @@ void show_stack(struct task_struct *tsk, unsigned long *sp)
204 barrier(); 202 barrier();
205} 203}
206 204
205#ifdef CONFIG_PREEMPT
206#define S_PREEMPT " PREEMPT"
207#else
208#define S_PREEMPT ""
209#endif
210#ifdef CONFIG_SMP
211#define S_SMP " SMP"
212#else
213#define S_SMP ""
214#endif
215
207static void __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs) 216static void __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs)
208{ 217{
209 struct task_struct *tsk = thread->task; 218 struct task_struct *tsk = thread->task;
210 static int die_counter; 219 static int die_counter;
211 220
212 printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter); 221 printk("Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n",
222 str, err, ++die_counter);
213 print_modules(); 223 print_modules();
214 __show_regs(regs); 224 __show_regs(regs);
215 printk("Process %s (pid: %d, stack limit = 0x%p)\n", 225 printk("Process %s (pid: %d, stack limit = 0x%p)\n",
@@ -232,16 +242,23 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
232{ 242{
233 struct thread_info *thread = current_thread_info(); 243 struct thread_info *thread = current_thread_info();
234 244
245 oops_enter();
246
235 console_verbose(); 247 console_verbose();
236 spin_lock_irq(&die_lock); 248 spin_lock_irq(&die_lock);
237 bust_spinlocks(1); 249 bust_spinlocks(1);
238 __die(str, err, thread, regs); 250 __die(str, err, thread, regs);
239 bust_spinlocks(0); 251 bust_spinlocks(0);
252 add_taint(TAINT_DIE);
240 spin_unlock_irq(&die_lock); 253 spin_unlock_irq(&die_lock);
241 254
255 if (in_interrupt())
256 panic("Fatal exception in interrupt");
257
242 if (panic_on_oops) 258 if (panic_on_oops)
243 panic("Fatal exception"); 259 panic("Fatal exception");
244 260
261 oops_exit();
245 do_exit(SIGSEGV); 262 do_exit(SIGSEGV);
246} 263}
247 264
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 2b7a8f5d8cf2..5ff5406666b4 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -66,6 +66,7 @@ SECTIONS
66 . = ALIGN(4096); 66 . = ALIGN(4096);
67 __per_cpu_start = .; 67 __per_cpu_start = .;
68 *(.data.percpu) 68 *(.data.percpu)
69 *(.data.percpu.shared_aligned)
69 __per_cpu_end = .; 70 __per_cpu_end = .;
70#ifndef CONFIG_XIP_KERNEL 71#ifndef CONFIG_XIP_KERNEL
71 __init_begin = _stext; 72 __init_begin = _stext;
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c
index e18a41e61f0c..dde089922e3b 100644
--- a/arch/arm/mach-at91/board-csb337.c
+++ b/arch/arm/mach-at91/board-csb337.c
@@ -23,6 +23,7 @@
23#include <linux/mm.h> 23#include <linux/mm.h>
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <linux/i2c.h>
26#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
27#include <linux/mtd/physmap.h> 28#include <linux/mtd/physmap.h>
28 29
@@ -83,6 +84,13 @@ static struct at91_udc_data __initdata csb337_udc_data = {
83 .pullup_pin = AT91_PIN_PA24, 84 .pullup_pin = AT91_PIN_PA24,
84}; 85};
85 86
87static struct i2c_board_info __initdata csb337_i2c_devices[] = {
88 { I2C_BOARD_INFO("rtc-ds1307", 0x68),
89 .type = "ds1307",
90 },
91};
92
93
86static struct at91_cf_data __initdata csb337_cf_data = { 94static struct at91_cf_data __initdata csb337_cf_data = {
87 /* 95 /*
88 * connector P4 on the CSB 337 mates to 96 * connector P4 on the CSB 337 mates to
@@ -161,6 +169,8 @@ static void __init csb337_board_init(void)
161 at91_add_device_udc(&csb337_udc_data); 169 at91_add_device_udc(&csb337_udc_data);
162 /* I2C */ 170 /* I2C */
163 at91_add_device_i2c(); 171 at91_add_device_i2c();
172 i2c_register_board_info(0, csb337_i2c_devices,
173 ARRAY_SIZE(csb337_i2c_devices));
164 /* Compact Flash */ 174 /* Compact Flash */
165 at91_set_gpio_input(AT91_PIN_PB22, 1); /* IOIS16 */ 175 at91_set_gpio_input(AT91_PIN_PB22, 1); /* IOIS16 */
166 at91_add_device_cf(&csb337_cf_data); 176 at91_add_device_cf(&csb337_cf_data);
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 26ca8ab3f62a..42e172cb0f49 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -27,6 +27,11 @@
27#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
28#include <linux/spi/ads7846.h> 28#include <linux/spi/ads7846.h>
29#include <linux/dm9000.h> 29#include <linux/dm9000.h>
30#include <linux/fb.h>
31#include <linux/gpio_keys.h>
32#include <linux/input.h>
33
34#include <video/atmel_lcdc.h>
30 35
31#include <asm/hardware.h> 36#include <asm/hardware.h>
32#include <asm/setup.h> 37#include <asm/setup.h>
@@ -271,6 +276,127 @@ static struct spi_board_info ek_spi_devices[] = {
271}; 276};
272 277
273 278
279/*
280 * LCD Controller
281 */
282#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
283static struct fb_videomode at91_tft_vga_modes[] = {
284 {
285 .name = "TX09D50VM1CCA @ 60",
286 .refresh = 60,
287 .xres = 240, .yres = 320,
288 .pixclock = KHZ2PICOS(4965),
289
290 .left_margin = 1, .right_margin = 33,
291 .upper_margin = 1, .lower_margin = 0,
292 .hsync_len = 5, .vsync_len = 1,
293
294 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
295 .vmode = FB_VMODE_NONINTERLACED,
296 },
297};
298
299static struct fb_monspecs at91fb_default_monspecs = {
300 .manufacturer = "HIT",
301 .monitor = "TX09D50VM1CCA",
302
303 .modedb = at91_tft_vga_modes,
304 .modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
305 .hfmin = 15000,
306 .hfmax = 64000,
307 .vfmin = 50,
308 .vfmax = 150,
309};
310
311#define AT91SAM9261_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
312 | ATMEL_LCDC_DISTYPE_TFT \
313 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
314
315static void at91_lcdc_power_control(int on)
316{
317 if (on)
318 at91_set_gpio_value(AT91_PIN_PA12, 0); /* power up */
319 else
320 at91_set_gpio_value(AT91_PIN_PA12, 1); /* power down */
321}
322
323/* Driver datas */
324static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
325 .default_bpp = 16,
326 .default_dmacon = ATMEL_LCDC_DMAEN,
327 .default_lcdcon2 = AT91SAM9261_DEFAULT_LCDCON2,
328 .default_monspecs = &at91fb_default_monspecs,
329 .atmel_lcdfb_power_control = at91_lcdc_power_control,
330 .guard_time = 1,
331};
332
333#else
334static struct atmel_lcdfb_info __initdata ek_lcdc_data;
335#endif
336
337
338/*
339 * GPIO Buttons
340 */
341#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
342static struct gpio_keys_button ek_buttons[] = {
343 {
344 .gpio = AT91_PIN_PA27,
345 .keycode = BTN_0,
346 .desc = "Button 0",
347 .active_low = 1,
348 },
349 {
350 .gpio = AT91_PIN_PA26,
351 .keycode = BTN_1,
352 .desc = "Button 1",
353 .active_low = 1,
354 },
355 {
356 .gpio = AT91_PIN_PA25,
357 .keycode = BTN_2,
358 .desc = "Button 2",
359 .active_low = 1,
360 },
361 {
362 .gpio = AT91_PIN_PA24,
363 .keycode = BTN_3,
364 .desc = "Button 3",
365 .active_low = 1,
366 }
367};
368
369static struct gpio_keys_platform_data ek_button_data = {
370 .buttons = ek_buttons,
371 .nbuttons = ARRAY_SIZE(ek_buttons),
372};
373
374static struct platform_device ek_button_device = {
375 .name = "gpio-keys",
376 .id = -1,
377 .num_resources = 0,
378 .dev = {
379 .platform_data = &ek_button_data,
380 }
381};
382
383static void __init ek_add_device_buttons(void)
384{
385 at91_set_gpio_input(AT91_PIN_PB27, 0); /* btn0 */
386 at91_set_deglitch(AT91_PIN_PB27, 1);
387 at91_set_gpio_input(AT91_PIN_PB26, 0); /* btn1 */
388 at91_set_deglitch(AT91_PIN_PB26, 1);
389 at91_set_gpio_input(AT91_PIN_PB25, 0); /* btn2 */
390 at91_set_deglitch(AT91_PIN_PB25, 1);
391 at91_set_gpio_input(AT91_PIN_PB24, 0); /* btn3 */
392 at91_set_deglitch(AT91_PIN_PB24, 1);
393
394 platform_device_register(&ek_button_device);
395}
396#else
397static void __init ek_add_device_buttons(void) {}
398#endif
399
274static void __init ek_board_init(void) 400static void __init ek_board_init(void)
275{ 401{
276 /* Serial */ 402 /* Serial */
@@ -296,6 +422,10 @@ static void __init ek_board_init(void)
296 /* MMC */ 422 /* MMC */
297 at91_add_device_mmc(0, &ek_mmc_data); 423 at91_add_device_mmc(0, &ek_mmc_data);
298#endif 424#endif
425 /* LCD Controller */
426 at91_add_device_lcdc(&ek_lcdc_data);
427 /* Push Buttons */
428 ek_add_device_buttons();
299} 429}
300 430
301MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK") 431MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK")
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index c164c8e58ae6..2a1cc73390b7 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -26,6 +26,9 @@
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
27#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
28#include <linux/spi/ads7846.h> 28#include <linux/spi/ads7846.h>
29#include <linux/fb.h>
30
31#include <video/atmel_lcdc.h>
29 32
30#include <asm/hardware.h> 33#include <asm/hardware.h>
31#include <asm/setup.h> 34#include <asm/setup.h>
@@ -202,6 +205,65 @@ static struct at91_nand_data __initdata ek_nand_data = {
202 205
203 206
204/* 207/*
208 * LCD Controller
209 */
210#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
211static struct fb_videomode at91_tft_vga_modes[] = {
212 {
213 .name = "TX09D50VM1CCA @ 60",
214 .refresh = 60,
215 .xres = 240, .yres = 320,
216 .pixclock = KHZ2PICOS(4965),
217
218 .left_margin = 1, .right_margin = 33,
219 .upper_margin = 1, .lower_margin = 0,
220 .hsync_len = 5, .vsync_len = 1,
221
222 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
223 .vmode = FB_VMODE_NONINTERLACED,
224 },
225};
226
227static struct fb_monspecs at91fb_default_monspecs = {
228 .manufacturer = "HIT",
229 .monitor = "TX09D70VM1CCA",
230
231 .modedb = at91_tft_vga_modes,
232 .modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
233 .hfmin = 15000,
234 .hfmax = 64000,
235 .vfmin = 50,
236 .vfmax = 150,
237};
238
239#define AT91SAM9263_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
240 | ATMEL_LCDC_DISTYPE_TFT \
241 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
242
243static void at91_lcdc_power_control(int on)
244{
245 if (on)
246 at91_set_gpio_value(AT91_PIN_PD12, 0); /* power up */
247 else
248 at91_set_gpio_value(AT91_PIN_PD12, 1); /* power down */
249}
250
251/* Driver datas */
252static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
253 .default_bpp = 16,
254 .default_dmacon = ATMEL_LCDC_DMAEN,
255 .default_lcdcon2 = AT91SAM9263_DEFAULT_LCDCON2,
256 .default_monspecs = &at91fb_default_monspecs,
257 .atmel_lcdfb_power_control = at91_lcdc_power_control,
258 .guard_time = 1,
259};
260
261#else
262static struct atmel_lcdfb_info __initdata ek_lcdc_data;
263#endif
264
265
266/*
205 * AC97 267 * AC97
206 */ 268 */
207static struct atmel_ac97_data ek_ac97_data = { 269static struct atmel_ac97_data ek_ac97_data = {
@@ -230,6 +292,8 @@ static void __init ek_board_init(void)
230 at91_add_device_nand(&ek_nand_data); 292 at91_add_device_nand(&ek_nand_data);
231 /* I2C */ 293 /* I2C */
232 at91_add_device_i2c(); 294 at91_add_device_i2c();
295 /* LCD Controller */
296 at91_add_device_lcdc(&ek_lcdc_data);
233 /* AC97 */ 297 /* AC97 */
234 at91_add_device_ac97(&ek_ac97_data); 298 at91_add_device_ac97(&ek_ac97_data);
235} 299}
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index 06c9a0507d0d..848efb2a4ebf 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -364,19 +364,14 @@ static int at91_clk_show(struct seq_file *s, void *unused)
364{ 364{
365 u32 scsr, pcsr, sr; 365 u32 scsr, pcsr, sr;
366 struct clk *clk; 366 struct clk *clk;
367 unsigned i;
368 367
369 seq_printf(s, "SCSR = %8x\n", scsr = at91_sys_read(AT91_PMC_SCSR)); 368 seq_printf(s, "SCSR = %8x\n", scsr = at91_sys_read(AT91_PMC_SCSR));
370 seq_printf(s, "PCSR = %8x\n", pcsr = at91_sys_read(AT91_PMC_PCSR)); 369 seq_printf(s, "PCSR = %8x\n", pcsr = at91_sys_read(AT91_PMC_PCSR));
371
372 seq_printf(s, "MOR = %8x\n", at91_sys_read(AT91_CKGR_MOR)); 370 seq_printf(s, "MOR = %8x\n", at91_sys_read(AT91_CKGR_MOR));
373 seq_printf(s, "MCFR = %8x\n", at91_sys_read(AT91_CKGR_MCFR)); 371 seq_printf(s, "MCFR = %8x\n", at91_sys_read(AT91_CKGR_MCFR));
374 seq_printf(s, "PLLA = %8x\n", at91_sys_read(AT91_CKGR_PLLAR)); 372 seq_printf(s, "PLLA = %8x\n", at91_sys_read(AT91_CKGR_PLLAR));
375 seq_printf(s, "PLLB = %8x\n", at91_sys_read(AT91_CKGR_PLLBR)); 373 seq_printf(s, "PLLB = %8x\n", at91_sys_read(AT91_CKGR_PLLBR));
376
377 seq_printf(s, "MCKR = %8x\n", at91_sys_read(AT91_PMC_MCKR)); 374 seq_printf(s, "MCKR = %8x\n", at91_sys_read(AT91_PMC_MCKR));
378 for (i = 0; i < 4; i++)
379 seq_printf(s, "PCK%d = %8x\n", i, at91_sys_read(AT91_PMC_PCKR(i)));
380 seq_printf(s, "SR = %8x\n", sr = at91_sys_read(AT91_PMC_SR)); 375 seq_printf(s, "SR = %8x\n", sr = at91_sys_read(AT91_PMC_SR));
381 376
382 seq_printf(s, "\n"); 377 seq_printf(s, "\n");
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index ff8db29e989e..ddf9184d561d 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -53,7 +53,7 @@ static suspend_state_t target_state;
53/* 53/*
54 * Called after processes are frozen, but before we shutdown devices. 54 * Called after processes are frozen, but before we shutdown devices.
55 */ 55 */
56static int at91_pm_prepare(suspend_state_t state) 56static int at91_pm_set_target(suspend_state_t state)
57{ 57{
58 target_state = state; 58 target_state = state;
59 return 0; 59 return 0;
@@ -76,12 +76,11 @@ static int at91_pm_verify_clocks(void)
76 pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n"); 76 pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n");
77 return 0; 77 return 0;
78 } 78 }
79 } else if (cpu_is_at91sam9260()) { 79 } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || cpu_is_at91sam9263()) {
80#warning "Check SAM9260 USB clocks" 80 if ((scsr & (AT91SAM926x_PMC_UHP | AT91SAM926x_PMC_UDP)) != 0) {
81 } else if (cpu_is_at91sam9261()) { 81 pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n");
82#warning "Check SAM9261 USB clocks" 82 return 0;
83 } else if (cpu_is_at91sam9263()) { 83 }
84#warning "Check SAM9263 USB clocks"
85 } 84 }
86 85
87#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS 86#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
@@ -202,7 +201,7 @@ error:
202 201
203static struct pm_ops at91_pm_ops ={ 202static struct pm_ops at91_pm_ops ={
204 .valid = at91_pm_valid_state, 203 .valid = at91_pm_valid_state,
205 .prepare = at91_pm_prepare, 204 .set_target = at91_pm_set_target,
206 .enter = at91_pm_enter, 205 .enter = at91_pm_enter,
207}; 206};
208 207
diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
index a8f88cd29905..99ac2e55774d 100644
--- a/arch/arm/mach-davinci/Makefile
+++ b/arch/arm/mach-davinci/Makefile
@@ -4,7 +4,8 @@
4# 4#
5 5
6# Common objects 6# Common objects
7obj-y := time.o irq.o serial.o io.o id.o psc.o 7obj-y := time.o irq.o clock.o serial.o io.o id.o psc.o \
8 gpio.o mux.o
8 9
9# Board specific 10# Board specific
10obj-$(CONFIG_MACH_DAVINCI_EVM) += board-evm.o 11obj-$(CONFIG_MACH_DAVINCI_EVM) += board-evm.o
diff --git a/arch/arm/mach-davinci/board-evm.c b/arch/arm/mach-davinci/board-evm.c
index 633c12e43044..9e4024c4965f 100644
--- a/arch/arm/mach-davinci/board-evm.c
+++ b/arch/arm/mach-davinci/board-evm.c
@@ -32,6 +32,7 @@
32void __init davinci_psc_init(void); 32void __init davinci_psc_init(void);
33void __init davinci_irq_init(void); 33void __init davinci_irq_init(void);
34void __init davinci_map_common_io(void); 34void __init davinci_map_common_io(void);
35void __init davinci_init_common_hw(void);
35 36
36/* NOR Flash base address set to CS0 by default */ 37/* NOR Flash base address set to CS0 by default */
37#define NOR_FLASH_PHYS 0x02000000 38#define NOR_FLASH_PHYS 0x02000000
@@ -116,6 +117,7 @@ static __init void davinci_evm_init(void)
116 117
117static __init void davinci_evm_irq_init(void) 118static __init void davinci_evm_irq_init(void)
118{ 119{
120 davinci_init_common_hw();
119 davinci_irq_init(); 121 davinci_irq_init();
120} 122}
121 123
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
new file mode 100644
index 000000000000..139ceaa35e24
--- /dev/null
+++ b/arch/arm/mach-davinci/clock.c
@@ -0,0 +1,323 @@
1/*
2 * TI DaVinci clock config file
3 *
4 * Copyright (C) 2006 Texas Instruments.
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
12#include <linux/module.h>
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/errno.h>
16#include <linux/err.h>
17#include <linux/mutex.h>
18#include <linux/platform_device.h>
19
20#include <asm/hardware.h>
21#include <asm/io.h>
22
23#include <asm/arch/psc.h>
24#include "clock.h"
25
26/* PLL/Reset register offsets */
27#define PLLM 0x110
28
29static LIST_HEAD(clocks);
30static DEFINE_MUTEX(clocks_mutex);
31static DEFINE_SPINLOCK(clockfw_lock);
32
33static unsigned int commonrate;
34static unsigned int armrate;
35static unsigned int fixedrate = 27000000; /* 27 MHZ */
36
37extern void davinci_psc_config(unsigned int domain, unsigned int id, char enable);
38
39/*
40 * Returns a clock. Note that we first try to use device id on the bus
41 * and clock name. If this fails, we try to use clock name only.
42 */
43struct clk *clk_get(struct device *dev, const char *id)
44{
45 struct clk *p, *clk = ERR_PTR(-ENOENT);
46 int idno;
47
48 if (dev == NULL || dev->bus != &platform_bus_type)
49 idno = -1;
50 else
51 idno = to_platform_device(dev)->id;
52
53 mutex_lock(&clocks_mutex);
54
55 list_for_each_entry(p, &clocks, node) {
56 if (p->id == idno &&
57 strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
58 clk = p;
59 goto found;
60 }
61 }
62
63 list_for_each_entry(p, &clocks, node) {
64 if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
65 clk = p;
66 break;
67 }
68 }
69
70found:
71 mutex_unlock(&clocks_mutex);
72
73 return clk;
74}
75EXPORT_SYMBOL(clk_get);
76
77void clk_put(struct clk *clk)
78{
79 if (clk && !IS_ERR(clk))
80 module_put(clk->owner);
81}
82EXPORT_SYMBOL(clk_put);
83
84static int __clk_enable(struct clk *clk)
85{
86 if (clk->flags & ALWAYS_ENABLED)
87 return 0;
88
89 davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, clk->lpsc, 1);
90 return 0;
91}
92
93static void __clk_disable(struct clk *clk)
94{
95 if (clk->usecount)
96 return;
97
98 davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, clk->lpsc, 0);
99}
100
101int clk_enable(struct clk *clk)
102{
103 unsigned long flags;
104 int ret = 0;
105
106 if (clk == NULL || IS_ERR(clk))
107 return -EINVAL;
108
109 if (clk->usecount++ == 0) {
110 spin_lock_irqsave(&clockfw_lock, flags);
111 ret = __clk_enable(clk);
112 spin_unlock_irqrestore(&clockfw_lock, flags);
113 }
114
115 return ret;
116}
117EXPORT_SYMBOL(clk_enable);
118
119void clk_disable(struct clk *clk)
120{
121 unsigned long flags;
122
123 if (clk == NULL || IS_ERR(clk))
124 return;
125
126 if (clk->usecount > 0 && !(--clk->usecount)) {
127 spin_lock_irqsave(&clockfw_lock, flags);
128 __clk_disable(clk);
129 spin_unlock_irqrestore(&clockfw_lock, flags);
130 }
131}
132EXPORT_SYMBOL(clk_disable);
133
134unsigned long clk_get_rate(struct clk *clk)
135{
136 if (clk == NULL || IS_ERR(clk))
137 return -EINVAL;
138
139 return *(clk->rate);
140}
141EXPORT_SYMBOL(clk_get_rate);
142
143long clk_round_rate(struct clk *clk, unsigned long rate)
144{
145 if (clk == NULL || IS_ERR(clk))
146 return -EINVAL;
147
148 return *(clk->rate);
149}
150EXPORT_SYMBOL(clk_round_rate);
151
152int clk_set_rate(struct clk *clk, unsigned long rate)
153{
154 if (clk == NULL || IS_ERR(clk))
155 return -EINVAL;
156
157 /* changing the clk rate is not supported */
158 return -EINVAL;
159}
160EXPORT_SYMBOL(clk_set_rate);
161
162int clk_register(struct clk *clk)
163{
164 if (clk == NULL || IS_ERR(clk))
165 return -EINVAL;
166
167 mutex_lock(&clocks_mutex);
168 list_add(&clk->node, &clocks);
169 mutex_unlock(&clocks_mutex);
170
171 return 0;
172}
173EXPORT_SYMBOL(clk_register);
174
175void clk_unregister(struct clk *clk)
176{
177 if (clk == NULL || IS_ERR(clk))
178 return;
179
180 mutex_lock(&clocks_mutex);
181 list_del(&clk->node);
182 mutex_unlock(&clocks_mutex);
183}
184EXPORT_SYMBOL(clk_unregister);
185
186static struct clk davinci_clks[] = {
187 {
188 .name = "ARMCLK",
189 .rate = &armrate,
190 .lpsc = -1,
191 .flags = ALWAYS_ENABLED,
192 },
193 {
194 .name = "UART",
195 .rate = &fixedrate,
196 .lpsc = DAVINCI_LPSC_UART0,
197 },
198 {
199 .name = "EMACCLK",
200 .rate = &commonrate,
201 .lpsc = DAVINCI_LPSC_EMAC_WRAPPER,
202 },
203 {
204 .name = "I2CCLK",
205 .rate = &fixedrate,
206 .lpsc = DAVINCI_LPSC_I2C,
207 },
208 {
209 .name = "IDECLK",
210 .rate = &commonrate,
211 .lpsc = DAVINCI_LPSC_ATA,
212 },
213 {
214 .name = "McBSPCLK",
215 .rate = &commonrate,
216 .lpsc = DAVINCI_LPSC_McBSP,
217 },
218 {
219 .name = "MMCSDCLK",
220 .rate = &commonrate,
221 .lpsc = DAVINCI_LPSC_MMC_SD,
222 },
223 {
224 .name = "SPICLK",
225 .rate = &commonrate,
226 .lpsc = DAVINCI_LPSC_SPI,
227 },
228 {
229 .name = "gpio",
230 .rate = &commonrate,
231 .lpsc = DAVINCI_LPSC_GPIO,
232 },
233 {
234 .name = "AEMIFCLK",
235 .rate = &commonrate,
236 .lpsc = DAVINCI_LPSC_AEMIF,
237 .usecount = 1,
238 }
239};
240
241int __init davinci_clk_init(void)
242{
243 struct clk *clkp;
244 int count = 0;
245 u32 pll_mult;
246
247 pll_mult = davinci_readl(DAVINCI_PLL_CNTRL0_BASE + PLLM);
248 commonrate = ((pll_mult + 1) * 27000000) / 6;
249 armrate = ((pll_mult + 1) * 27000000) / 2;
250
251 for (clkp = davinci_clks; count < ARRAY_SIZE(davinci_clks);
252 count++, clkp++) {
253 clk_register(clkp);
254
255 /* Turn on clocks that have been enabled in the
256 * table above */
257 if (clkp->usecount)
258 clk_enable(clkp);
259 }
260
261 return 0;
262}
263
264#ifdef CONFIG_PROC_FS
265#include <linux/proc_fs.h>
266#include <linux/seq_file.h>
267
268static void *davinci_ck_start(struct seq_file *m, loff_t *pos)
269{
270 return *pos < 1 ? (void *)1 : NULL;
271}
272
273static void *davinci_ck_next(struct seq_file *m, void *v, loff_t *pos)
274{
275 ++*pos;
276 return NULL;
277}
278
279static void davinci_ck_stop(struct seq_file *m, void *v)
280{
281}
282
283static int davinci_ck_show(struct seq_file *m, void *v)
284{
285 struct clk *cp;
286
287 list_for_each_entry(cp, &clocks, node)
288 seq_printf(m,"%s %d %d\n", cp->name, *(cp->rate), cp->usecount);
289
290 return 0;
291}
292
293static struct seq_operations davinci_ck_op = {
294 .start = davinci_ck_start,
295 .next = davinci_ck_next,
296 .stop = davinci_ck_stop,
297 .show = davinci_ck_show
298};
299
300static int davinci_ck_open(struct inode *inode, struct file *file)
301{
302 return seq_open(file, &davinci_ck_op);
303}
304
305static struct file_operations proc_davinci_ck_operations = {
306 .open = davinci_ck_open,
307 .read = seq_read,
308 .llseek = seq_lseek,
309 .release = seq_release,
310};
311
312static int __init davinci_ck_proc_init(void)
313{
314 struct proc_dir_entry *entry;
315
316 entry = create_proc_entry("davinci_clocks", 0, NULL);
317 if (entry)
318 entry->proc_fops = &proc_davinci_ck_operations;
319 return 0;
320
321}
322__initcall(davinci_ck_proc_init);
323#endif /* CONFIG_DEBUG_PROC_FS */
diff --git a/arch/arm/mach-davinci/clock.h b/arch/arm/mach-davinci/clock.h
new file mode 100644
index 000000000000..ed47079a52e4
--- /dev/null
+++ b/arch/arm/mach-davinci/clock.h
@@ -0,0 +1,33 @@
1/*
2 * TI DaVinci clock definitions
3 *
4 * Copyright (C) 2006 Texas Instruments.
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#ifndef __ARCH_ARM_DAVINCI_CLOCK_H
12#define __ARCH_ARM_DAVINCI_CLOCK_H
13
14struct clk {
15 struct list_head node;
16 struct module *owner;
17 const char *name;
18 unsigned int *rate;
19 int id;
20 __s8 usecount;
21 __u8 flags;
22 __u8 lpsc;
23};
24
25/* Clock flags */
26#define RATE_CKCTL 1
27#define RATE_FIXED 2
28#define RATE_PROPAGATES 4
29#define VIRTUAL_CLOCK 8
30#define ALWAYS_ENABLED 16
31#define ENABLE_REG_32BIT 32
32
33#endif
diff --git a/arch/arm/mach-davinci/gpio.c b/arch/arm/mach-davinci/gpio.c
new file mode 100644
index 000000000000..9c67886e7189
--- /dev/null
+++ b/arch/arm/mach-davinci/gpio.c
@@ -0,0 +1,286 @@
1/*
2 * TI DaVinci GPIO Support
3 *
4 * Copyright (c) 2006 David Brownell
5 * Copyright (c) 2007, MontaVista Software, Inc. <source@mvista.com>
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
13#include <linux/errno.h>
14#include <linux/kernel.h>
15#include <linux/list.h>
16#include <linux/module.h>
17#include <linux/clk.h>
18#include <linux/err.h>
19#include <linux/io.h>
20#include <linux/irq.h>
21#include <linux/bitops.h>
22
23#include <asm/arch/irqs.h>
24#include <asm/arch/hardware.h>
25#include <asm/arch/gpio.h>
26
27#include <asm/mach/irq.h>
28
29static DEFINE_SPINLOCK(gpio_lock);
30static DECLARE_BITMAP(gpio_in_use, DAVINCI_N_GPIO);
31
32int gpio_request(unsigned gpio, const char *tag)
33{
34 if (gpio >= DAVINCI_N_GPIO)
35 return -EINVAL;
36
37 if (test_and_set_bit(gpio, gpio_in_use))
38 return -EBUSY;
39
40 return 0;
41}
42EXPORT_SYMBOL(gpio_request);
43
44void gpio_free(unsigned gpio)
45{
46 if (gpio >= DAVINCI_N_GPIO)
47 return;
48
49 clear_bit(gpio, gpio_in_use);
50}
51EXPORT_SYMBOL(gpio_free);
52
53/* create a non-inlined version */
54static struct gpio_controller *__iomem gpio2controller(unsigned gpio)
55{
56 return __gpio_to_controller(gpio);
57}
58
59/*
60 * Assuming the pin is muxed as a gpio output, set its output value.
61 */
62void __gpio_set(unsigned gpio, int value)
63{
64 struct gpio_controller *__iomem g = gpio2controller(gpio);
65
66 __raw_writel(__gpio_mask(gpio), value ? &g->set_data : &g->clr_data);
67}
68EXPORT_SYMBOL(__gpio_set);
69
70
71/*
72 * Read the pin's value (works even if it's set up as output);
73 * returns zero/nonzero.
74 *
75 * Note that changes are synched to the GPIO clock, so reading values back
76 * right after you've set them may give old values.
77 */
78int __gpio_get(unsigned gpio)
79{
80 struct gpio_controller *__iomem g = gpio2controller(gpio);
81
82 return !!(__gpio_mask(gpio) & __raw_readl(&g->in_data));
83}
84EXPORT_SYMBOL(__gpio_get);
85
86
87/*--------------------------------------------------------------------------*/
88
89/*
90 * board setup code *MUST* set PINMUX0 and PINMUX1 as
91 * needed, and enable the GPIO clock.
92 */
93
94int gpio_direction_input(unsigned gpio)
95{
96 struct gpio_controller *__iomem g = gpio2controller(gpio);
97 u32 temp;
98 u32 mask;
99
100 if (!g)
101 return -EINVAL;
102
103 spin_lock(&gpio_lock);
104 mask = __gpio_mask(gpio);
105 temp = __raw_readl(&g->dir);
106 temp |= mask;
107 __raw_writel(temp, &g->dir);
108 spin_unlock(&gpio_lock);
109 return 0;
110}
111EXPORT_SYMBOL(gpio_direction_input);
112
113int gpio_direction_output(unsigned gpio, int value)
114{
115 struct gpio_controller *__iomem g = gpio2controller(gpio);
116 u32 temp;
117 u32 mask;
118
119 if (!g)
120 return -EINVAL;
121
122 spin_lock(&gpio_lock);
123 mask = __gpio_mask(gpio);
124 temp = __raw_readl(&g->dir);
125 temp &= ~mask;
126 __raw_writel(mask, value ? &g->set_data : &g->clr_data);
127 __raw_writel(temp, &g->dir);
128 spin_unlock(&gpio_lock);
129 return 0;
130}
131EXPORT_SYMBOL(gpio_direction_output);
132
133/*
134 * We expect irqs will normally be set up as input pins, but they can also be
135 * used as output pins ... which is convenient for testing.
136 *
137 * NOTE: GPIO0..GPIO7 also have direct INTC hookups, which work in addition
138 * to their GPIOBNK0 irq (but with a bit less overhead). But we don't have
139 * a good way to hook those up ...
140 *
141 * All those INTC hookups (GPIO0..GPIO7 plus five IRQ banks) can also
142 * serve as EDMA event triggers.
143 */
144
145static void gpio_irq_disable(unsigned irq)
146{
147 struct gpio_controller *__iomem g = get_irq_chip_data(irq);
148 u32 mask = __gpio_mask(irq_to_gpio(irq));
149
150 __raw_writel(mask, &g->clr_falling);
151 __raw_writel(mask, &g->clr_rising);
152}
153
154static void gpio_irq_enable(unsigned irq)
155{
156 struct gpio_controller *__iomem g = get_irq_chip_data(irq);
157 u32 mask = __gpio_mask(irq_to_gpio(irq));
158
159 if (irq_desc[irq].status & IRQ_TYPE_EDGE_FALLING)
160 __raw_writel(mask, &g->set_falling);
161 if (irq_desc[irq].status & IRQ_TYPE_EDGE_RISING)
162 __raw_writel(mask, &g->set_rising);
163}
164
165static int gpio_irq_type(unsigned irq, unsigned trigger)
166{
167 struct gpio_controller *__iomem g = get_irq_chip_data(irq);
168 u32 mask = __gpio_mask(irq_to_gpio(irq));
169
170 if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))
171 return -EINVAL;
172
173 irq_desc[irq].status &= ~IRQ_TYPE_SENSE_MASK;
174 irq_desc[irq].status |= trigger;
175
176 __raw_writel(mask, (trigger & IRQ_TYPE_EDGE_FALLING)
177 ? &g->set_falling : &g->clr_falling);
178 __raw_writel(mask, (trigger & IRQ_TYPE_EDGE_RISING)
179 ? &g->set_rising : &g->clr_rising);
180 return 0;
181}
182
183static struct irq_chip gpio_irqchip = {
184 .name = "GPIO",
185 .enable = gpio_irq_enable,
186 .disable = gpio_irq_disable,
187 .set_type = gpio_irq_type,
188};
189
190static void
191gpio_irq_handler(unsigned irq, struct irq_desc *desc)
192{
193 struct gpio_controller *__iomem g = get_irq_chip_data(irq);
194 u32 mask = 0xffff;
195
196 /* we only care about one bank */
197 if (irq & 1)
198 mask <<= 16;
199
200 /* temporarily mask (level sensitive) parent IRQ */
201 desc->chip->ack(irq);
202 while (1) {
203 u32 status;
204 struct irq_desc *gpio;
205 int n;
206 int res;
207
208 /* ack any irqs */
209 status = __raw_readl(&g->intstat) & mask;
210 if (!status)
211 break;
212 __raw_writel(status, &g->intstat);
213 if (irq & 1)
214 status >>= 16;
215
216 /* now demux them to the right lowlevel handler */
217 n = (int)get_irq_data(irq);
218 gpio = &irq_desc[n];
219 while (status) {
220 res = ffs(status);
221 n += res;
222 gpio += res;
223 desc_handle_irq(n - 1, gpio - 1);
224 status >>= res;
225 }
226 }
227 desc->chip->unmask(irq);
228 /* now it may re-trigger */
229}
230
231/*
232 * NOTE: for suspend/resume, probably best to make a sysdev (and class)
233 * with its suspend/resume calls hooking into the results of the set_wake()
234 * calls ... so if no gpios are wakeup events the clock can be disabled,
235 * with outputs left at previously set levels, and so that VDD3P3V.IOPWDN0
236 * can be set appropriately for GPIOV33 pins.
237 */
238
239static int __init davinci_gpio_irq_setup(void)
240{
241 unsigned gpio, irq, bank;
242 struct clk *clk;
243
244 clk = clk_get(NULL, "gpio");
245 if (IS_ERR(clk)) {
246 printk(KERN_ERR "Error %ld getting gpio clock?\n",
247 PTR_ERR(clk));
248 return 0;
249 }
250
251 clk_enable(clk);
252
253 for (gpio = 0, irq = gpio_to_irq(0), bank = IRQ_GPIOBNK0;
254 gpio < DAVINCI_N_GPIO; bank++) {
255 struct gpio_controller *__iomem g = gpio2controller(gpio);
256 unsigned i;
257
258 __raw_writel(~0, &g->clr_falling);
259 __raw_writel(~0, &g->clr_rising);
260
261 /* set up all irqs in this bank */
262 set_irq_chained_handler(bank, gpio_irq_handler);
263 set_irq_chip_data(bank, g);
264 set_irq_data(bank, (void *)irq);
265
266 for (i = 0; i < 16 && gpio < DAVINCI_N_GPIO;
267 i++, irq++, gpio++) {
268 set_irq_chip(irq, &gpio_irqchip);
269 set_irq_chip_data(irq, g);
270 set_irq_handler(irq, handle_simple_irq);
271 set_irq_flags(irq, IRQF_VALID);
272 }
273 }
274
275 /* BINTEN -- per-bank interrupt enable. genirq would also let these
276 * bits be set/cleared dynamically.
277 */
278 __raw_writel(0x1f, (void *__iomem)
279 IO_ADDRESS(DAVINCI_GPIO_BASE + 0x08));
280
281 printk(KERN_INFO "DaVinci: %d gpio irqs\n", irq - gpio_to_irq(0));
282
283 return 0;
284}
285
286arch_initcall(davinci_gpio_irq_setup);
diff --git a/arch/arm/mach-davinci/io.c b/arch/arm/mach-davinci/io.c
index 87fae6fb6ecf..47787ff84a6a 100644
--- a/arch/arm/mach-davinci/io.c
+++ b/arch/arm/mach-davinci/io.c
@@ -17,6 +17,7 @@
17#include <asm/memory.h> 17#include <asm/memory.h>
18 18
19#include <asm/mach/map.h> 19#include <asm/mach/map.h>
20#include <asm/arch/clock.h>
20 21
21extern void davinci_check_revision(void); 22extern void davinci_check_revision(void);
22 23
@@ -49,3 +50,8 @@ void __init davinci_map_common_io(void)
49 */ 50 */
50 davinci_check_revision(); 51 davinci_check_revision();
51} 52}
53
54void __init davinci_init_common_hw(void)
55{
56 davinci_clk_init();
57}
diff --git a/arch/arm/mach-davinci/mux.c b/arch/arm/mach-davinci/mux.c
new file mode 100644
index 000000000000..92d26bd305b7
--- /dev/null
+++ b/arch/arm/mach-davinci/mux.c
@@ -0,0 +1,41 @@
1/*
2 * DaVinci pin multiplexing configurations
3 *
4 * Author: Vladimir Barinov, MontaVista Software, Inc. <source@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#include <linux/io.h>
12#include <linux/spinlock.h>
13
14#include <asm/hardware.h>
15
16#include <asm/arch/mux.h>
17
18/* System control register offsets */
19#define PINMUX0 0x00
20#define PINMUX1 0x04
21
22static DEFINE_SPINLOCK(mux_lock);
23
24void davinci_mux_peripheral(unsigned int mux, unsigned int enable)
25{
26 u32 pinmux, muxreg = PINMUX0;
27
28 if (mux >= DAVINCI_MUX_LEVEL2) {
29 muxreg = PINMUX1;
30 mux -= DAVINCI_MUX_LEVEL2;
31 }
32
33 spin_lock(&mux_lock);
34 pinmux = davinci_readl(DAVINCI_SYSTEM_MODULE_BASE + muxreg);
35 if (enable)
36 pinmux |= (1 << mux);
37 else
38 pinmux &= ~(1 << mux);
39 davinci_writel(pinmux, DAVINCI_SYSTEM_MODULE_BASE + muxreg);
40 spin_unlock(&mux_lock);
41}
diff --git a/arch/arm/mach-davinci/psc.c b/arch/arm/mach-davinci/psc.c
index e1b0050283a6..1334416559ad 100644
--- a/arch/arm/mach-davinci/psc.c
+++ b/arch/arm/mach-davinci/psc.c
@@ -25,39 +25,40 @@
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/hardware.h> 26#include <asm/hardware.h>
27#include <asm/arch/psc.h> 27#include <asm/arch/psc.h>
28#include <asm/arch/mux.h>
28 29
29#define PTCMD __REG(0x01C41120) 30/* PSC register offsets */
30#define PDSTAT __REG(0x01C41200) 31#define EPCPR 0x070
31#define PDCTL1 __REG(0x01C41304) 32#define PTCMD 0x120
32#define EPCPR __REG(0x01C41070) 33#define PTSTAT 0x128
33#define PTSTAT __REG(0x01C41128) 34#define PDSTAT 0x200
35#define PDCTL1 0x304
36#define MDSTAT 0x800
37#define MDCTL 0xA00
34 38
35#define MDSTAT IO_ADDRESS(0x01C41800) 39/* System control register offsets */
36#define MDCTL IO_ADDRESS(0x01C41A00) 40#define VDD3P3V_PWDN 0x48
37
38#define PINMUX0 __REG(0x01c40000)
39#define PINMUX1 __REG(0x01c40004)
40#define VDD3P3V_PWDN __REG(0x01C40048)
41 41
42static void davinci_psc_mux(unsigned int id) 42static void davinci_psc_mux(unsigned int id)
43{ 43{
44 switch (id) { 44 switch (id) {
45 case DAVINCI_LPSC_ATA: 45 case DAVINCI_LPSC_ATA:
46 PINMUX0 |= (1 << 17) | (1 << 16); 46 davinci_mux_peripheral(DAVINCI_MUX_HDIREN, 1);
47 davinci_mux_peripheral(DAVINCI_MUX_ATAEN, 1);
47 break; 48 break;
48 case DAVINCI_LPSC_MMC_SD: 49 case DAVINCI_LPSC_MMC_SD:
49 /* VDD power manupulations are done in U-Boot for CPMAC 50 /* VDD power manupulations are done in U-Boot for CPMAC
50 * so applies to MMC as well 51 * so applies to MMC as well
51 */ 52 */
52 /*Set up the pull regiter for MMC */ 53 /*Set up the pull regiter for MMC */
53 VDD3P3V_PWDN = 0x0; 54 davinci_writel(0, DAVINCI_SYSTEM_MODULE_BASE + VDD3P3V_PWDN);
54 PINMUX1 &= (~(1 << 9)); 55 davinci_mux_peripheral(DAVINCI_MUX_MSTK, 0);
55 break; 56 break;
56 case DAVINCI_LPSC_I2C: 57 case DAVINCI_LPSC_I2C:
57 PINMUX1 |= (1 << 7); 58 davinci_mux_peripheral(DAVINCI_MUX_I2C, 1);
58 break; 59 break;
59 case DAVINCI_LPSC_McBSP: 60 case DAVINCI_LPSC_McBSP:
60 PINMUX1 |= (1 << 10); 61 davinci_mux_peripheral(DAVINCI_MUX_ASP, 1);
61 break; 62 break;
62 default: 63 default:
63 break; 64 break;
@@ -67,33 +68,59 @@ static void davinci_psc_mux(unsigned int id)
67/* Enable or disable a PSC domain */ 68/* Enable or disable a PSC domain */
68void davinci_psc_config(unsigned int domain, unsigned int id, char enable) 69void davinci_psc_config(unsigned int domain, unsigned int id, char enable)
69{ 70{
70 volatile unsigned int *mdstat = (unsigned int *)((int)MDSTAT + 4 * id); 71 u32 epcpr, ptcmd, ptstat, pdstat, pdctl1, mdstat, mdctl, mdstat_mask;
71 volatile unsigned int *mdctl = (unsigned int *)((int)MDCTL + 4 * id);
72 72
73 if (id < 0) 73 if (id < 0)
74 return; 74 return;
75 75
76 mdctl = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE + MDCTL + 4 * id);
76 if (enable) 77 if (enable)
77 *mdctl |= 0x00000003; /* Enable Module */ 78 mdctl |= 0x00000003; /* Enable Module */
78 else 79 else
79 *mdctl &= 0xFFFFFFF2; /* Disable Module */ 80 mdctl &= 0xFFFFFFF2; /* Disable Module */
81 davinci_writel(mdctl, DAVINCI_PWR_SLEEP_CNTRL_BASE + MDCTL + 4 * id);
82
83 pdstat = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE + PDSTAT);
84 if ((pdstat & 0x00000001) == 0) {
85 pdctl1 = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE + PDCTL1);
86 pdctl1 |= 0x1;
87 davinci_writel(pdctl1, DAVINCI_PWR_SLEEP_CNTRL_BASE + PDCTL1);
88
89 ptcmd = 1 << domain;
90 davinci_writel(ptcmd, DAVINCI_PWR_SLEEP_CNTRL_BASE + PTCMD);
80 91
81 if ((PDSTAT & 0x00000001) == 0) { 92 do {
82 PDCTL1 |= 0x1; 93 epcpr = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE +
83 PTCMD = (1 << domain); 94 EPCPR);
84 while ((((EPCPR >> domain) & 1) == 0)); 95 } while ((((epcpr >> domain) & 1) == 0));
85 96
86 PDCTL1 |= 0x100; 97 pdctl1 = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE + PDCTL1);
87 while (!(((PTSTAT >> domain) & 1) == 0)); 98 pdctl1 |= 0x100;
99 davinci_writel(pdctl1, DAVINCI_PWR_SLEEP_CNTRL_BASE + PDCTL1);
100
101 do {
102 ptstat = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE +
103 PTSTAT);
104 } while (!(((ptstat >> domain) & 1) == 0));
88 } else { 105 } else {
89 PTCMD = (1 << domain); 106 ptcmd = 1 << domain;
90 while (!(((PTSTAT >> domain) & 1) == 0)); 107 davinci_writel(ptcmd, DAVINCI_PWR_SLEEP_CNTRL_BASE + PTCMD);
108
109 do {
110 ptstat = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE +
111 PTSTAT);
112 } while (!(((ptstat >> domain) & 1) == 0));
91 } 113 }
92 114
93 if (enable) 115 if (enable)
94 while (!((*mdstat & 0x0000001F) == 0x3)); 116 mdstat_mask = 0x3;
95 else 117 else
96 while (!((*mdstat & 0x0000001F) == 0x2)); 118 mdstat_mask = 0x2;
119
120 do {
121 mdstat = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE +
122 MDSTAT + 4 * id);
123 } while (!((mdstat & 0x0000001F) == mdstat_mask));
97 124
98 if (enable) 125 if (enable)
99 davinci_psc_mux(id); 126 davinci_psc_mux(id);
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index 4d8425de6922..e96a3dcdc1a7 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -285,6 +285,8 @@ static void davinci_set_mode(enum clock_event_mode mode,
285 case CLOCK_EVT_MODE_SHUTDOWN: 285 case CLOCK_EVT_MODE_SHUTDOWN:
286 t->opts = TIMER_OPTS_DISABLED; 286 t->opts = TIMER_OPTS_DISABLED;
287 break; 287 break;
288 case CLOCK_EVT_MODE_RESUME:
289 break;
288 } 290 }
289} 291}
290 292
diff --git a/arch/arm/mach-imx/generic.c b/arch/arm/mach-imx/generic.c
index 1c474cf709ca..a58b678006df 100644
--- a/arch/arm/mach-imx/generic.c
+++ b/arch/arm/mach-imx/generic.c
@@ -28,12 +28,16 @@
28#include <linux/module.h> 28#include <linux/module.h>
29#include <linux/string.h> 29#include <linux/string.h>
30 30
31#include <asm/errno.h>
31#include <asm/arch/imxfb.h> 32#include <asm/arch/imxfb.h>
32#include <asm/hardware.h> 33#include <asm/hardware.h>
33#include <asm/arch/imx-regs.h> 34#include <asm/arch/imx-regs.h>
34 35
35#include <asm/mach/map.h> 36#include <asm/mach/map.h>
36#include <asm/arch/mmc.h> 37#include <asm/arch/mmc.h>
38#include <asm/arch/gpio.h>
39
40unsigned long imx_gpio_alloc_map[(GPIO_PORT_MAX + 1) * 32 / BITS_PER_LONG];
37 41
38void imx_gpio_mode(int gpio_mode) 42void imx_gpio_mode(int gpio_mode)
39{ 43{
@@ -95,6 +99,120 @@ void imx_gpio_mode(int gpio_mode)
95 99
96EXPORT_SYMBOL(imx_gpio_mode); 100EXPORT_SYMBOL(imx_gpio_mode);
97 101
102int imx_gpio_request(unsigned gpio, const char *label)
103{
104 if(gpio >= (GPIO_PORT_MAX + 1) * 32)
105 printk(KERN_ERR "imx_gpio: Attempt to request nonexistent GPIO %d for \"%s\"\n",
106 gpio, label ? label : "?");
107 return -EINVAL;
108
109 if(test_and_set_bit(gpio, imx_gpio_alloc_map)) {
110 printk(KERN_ERR "imx_gpio: GPIO %d already used. Allocation for \"%s\" failed\n",
111 gpio, label ? label : "?");
112 return -EBUSY;
113 }
114
115 return 0;
116}
117
118EXPORT_SYMBOL(imx_gpio_request);
119
120void imx_gpio_free(unsigned gpio)
121{
122 if(gpio >= (GPIO_PORT_MAX + 1) * 32)
123 return;
124
125 clear_bit(gpio, imx_gpio_alloc_map);
126}
127
128EXPORT_SYMBOL(imx_gpio_free);
129
130int imx_gpio_direction_input(unsigned gpio)
131{
132 imx_gpio_mode(gpio| GPIO_IN);
133 return 0;
134}
135
136EXPORT_SYMBOL(imx_gpio_direction_input);
137
138int imx_gpio_direction_output(unsigned gpio, int value)
139{
140 imx_gpio_set_value(gpio, value);
141 imx_gpio_mode(gpio| GPIO_OUT);
142 return 0;
143}
144
145EXPORT_SYMBOL(imx_gpio_direction_output);
146
147int imx_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
148 int alloc_mode, const char *label)
149{
150 const int *p = pin_list;
151 int i;
152 unsigned gpio;
153 unsigned mode;
154
155 for (i = 0; i < count; i++) {
156 gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK);
157 mode = *p & ~(GPIO_PIN_MASK | GPIO_PORT_MASK);
158
159 if (gpio >= (GPIO_PORT_MAX + 1) * 32)
160 goto setup_error;
161
162 if (alloc_mode & IMX_GPIO_ALLOC_MODE_RELEASE)
163 imx_gpio_free(gpio);
164 else if (!(alloc_mode & IMX_GPIO_ALLOC_MODE_NO_ALLOC))
165 if (imx_gpio_request(gpio, label))
166 if (!(alloc_mode & IMX_GPIO_ALLOC_MODE_TRY_ALLOC))
167 goto setup_error;
168
169 if (!(alloc_mode & (IMX_GPIO_ALLOC_MODE_ALLOC_ONLY |
170 IMX_GPIO_ALLOC_MODE_RELEASE)))
171 imx_gpio_mode(gpio | mode);
172
173 p++;
174 }
175 return 0;
176
177setup_error:
178 if(alloc_mode & (IMX_GPIO_ALLOC_MODE_NO_ALLOC |
179 IMX_GPIO_ALLOC_MODE_TRY_ALLOC))
180 return -EINVAL;
181
182 while (p != pin_list) {
183 p--;
184 gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK);
185 imx_gpio_free(gpio);
186 }
187
188 return -EINVAL;
189}
190
191EXPORT_SYMBOL(imx_gpio_setup_multiple_pins);
192
193void __imx_gpio_set_value(unsigned gpio, int value)
194{
195 imx_gpio_set_value_inline(gpio, value);
196}
197
198EXPORT_SYMBOL(__imx_gpio_set_value);
199
200int imx_gpio_to_irq(unsigned gpio)
201{
202 return IRQ_GPIOA(0) + gpio;
203}
204
205EXPORT_SYMBOL(imx_gpio_to_irq);
206
207int imx_irq_to_gpio(unsigned irq)
208{
209 if (irq < IRQ_GPIOA(0))
210 return -EINVAL;
211 return irq - IRQ_GPIOA(0);
212}
213
214EXPORT_SYMBOL(imx_irq_to_gpio);
215
98/* 216/*
99 * get the system pll clock in Hz 217 * get the system pll clock in Hz
100 * 218 *
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
index 6960a9d04217..d86d124aea22 100644
--- a/arch/arm/mach-imx/time.c
+++ b/arch/arm/mach-imx/time.c
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (C) 2000-2001 Deep Blue Solutions 4 * Copyright (C) 2000-2001 Deep Blue Solutions
5 * Copyright (C) 2002 Shane Nay (shane@minirl.com) 5 * Copyright (C) 2002 Shane Nay (shane@minirl.com)
6 * Copyright (C) 2006-2007 Pavel Pisa (ppisa@pikron.com)
6 * 7 *
7 * 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
8 * 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,6 +16,7 @@
15#include <linux/irq.h> 16#include <linux/irq.h>
16#include <linux/time.h> 17#include <linux/time.h>
17#include <linux/clocksource.h> 18#include <linux/clocksource.h>
19#include <linux/clockchips.h>
18 20
19#include <asm/hardware.h> 21#include <asm/hardware.h>
20#include <asm/io.h> 22#include <asm/io.h>
@@ -25,7 +27,8 @@
25/* Use timer 1 as system timer */ 27/* Use timer 1 as system timer */
26#define TIMER_BASE IMX_TIM1_BASE 28#define TIMER_BASE IMX_TIM1_BASE
27 29
28static unsigned long evt_diff; 30static struct clock_event_device clockevent_imx;
31static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED;
29 32
30/* 33/*
31 * IRQ handler for the timer 34 * IRQ handler for the timer
@@ -33,25 +36,20 @@ static unsigned long evt_diff;
33static irqreturn_t 36static irqreturn_t
34imx_timer_interrupt(int irq, void *dev_id) 37imx_timer_interrupt(int irq, void *dev_id)
35{ 38{
39 struct clock_event_device *evt = &clockevent_imx;
36 uint32_t tstat; 40 uint32_t tstat;
41 irqreturn_t ret = IRQ_NONE;
37 42
38 /* clear the interrupt */ 43 /* clear the interrupt */
39 tstat = IMX_TSTAT(TIMER_BASE); 44 tstat = IMX_TSTAT(TIMER_BASE);
40 IMX_TSTAT(TIMER_BASE) = 0; 45 IMX_TSTAT(TIMER_BASE) = 0;
41 46
42 if (tstat & TSTAT_COMP) { 47 if (tstat & TSTAT_COMP) {
43 do { 48 evt->event_handler(evt);
44 49 ret = IRQ_HANDLED;
45 write_seqlock(&xtime_lock);
46 timer_tick();
47 write_sequnlock(&xtime_lock);
48 IMX_TCMP(TIMER_BASE) += evt_diff;
49
50 } while (unlikely((int32_t)(IMX_TCMP(TIMER_BASE)
51 - IMX_TCN(TIMER_BASE)) < 0));
52 } 50 }
53 51
54 return IRQ_HANDLED; 52 return ret;
55} 53}
56 54
57static struct irqaction imx_timer_irq = { 55static struct irqaction imx_timer_irq = {
@@ -70,10 +68,8 @@ static void __init imx_timer_hardware_init(void)
70 */ 68 */
71 IMX_TCTL(TIMER_BASE) = 0; 69 IMX_TCTL(TIMER_BASE) = 0;
72 IMX_TPRER(TIMER_BASE) = 0; 70 IMX_TPRER(TIMER_BASE) = 0;
73 IMX_TCMP(TIMER_BASE) = LATCH - 1;
74 71
75 IMX_TCTL(TIMER_BASE) = TCTL_FRR | TCTL_CLK_PCLK1 | TCTL_IRQEN | TCTL_TEN; 72 IMX_TCTL(TIMER_BASE) = TCTL_FRR | TCTL_CLK_PCLK1 | TCTL_TEN;
76 evt_diff = LATCH;
77} 73}
78 74
79cycle_t imx_get_cycles(void) 75cycle_t imx_get_cycles(void)
@@ -99,11 +95,109 @@ static int __init imx_clocksource_init(void)
99 return 0; 95 return 0;
100} 96}
101 97
98static int imx_set_next_event(unsigned long evt,
99 struct clock_event_device *unused)
100{
101 unsigned long tcmp;
102
103 tcmp = IMX_TCN(TIMER_BASE) + evt;
104 IMX_TCMP(TIMER_BASE) = tcmp;
105
106 return (int32_t)(tcmp - IMX_TCN(TIMER_BASE)) < 0 ? -ETIME : 0;
107}
108
109#ifdef DEBUG
110static const char *clock_event_mode_label[]={
111 [CLOCK_EVT_MODE_PERIODIC] = "CLOCK_EVT_MODE_PERIODIC",
112 [CLOCK_EVT_MODE_ONESHOT] = "CLOCK_EVT_MODE_ONESHOT",
113 [CLOCK_EVT_MODE_SHUTDOWN] = "CLOCK_EVT_MODE_SHUTDOWN",
114 [CLOCK_EVT_MODE_UNUSED] = "CLOCK_EVT_MODE_UNUSED"
115};
116#endif /*DEBUG*/
117
118static void imx_set_mode(enum clock_event_mode mode, struct clock_event_device *evt)
119{
120 unsigned long flags;
121
122 /*
123 * The timer interrupt generation is disabled at least
124 * for enough time to call imx_set_next_event()
125 */
126 local_irq_save(flags);
127 /* Disable interrupt in GPT module */
128 IMX_TCTL(TIMER_BASE) &= ~TCTL_IRQEN;
129 if (mode != clockevent_mode) {
130 /* Set event time into far-far future */
131 IMX_TCMP(TIMER_BASE) = IMX_TCN(TIMER_BASE) - 3;
132 /* Clear pending interrupt */
133 IMX_TSTAT(TIMER_BASE) &= ~TSTAT_COMP;
134 }
135
136#ifdef DEBUG
137 printk(KERN_INFO "imx_set_mode: changing mode from %s to %s\n",
138 clock_event_mode_label[clockevent_mode], clock_event_mode_label[mode]);
139#endif /*DEBUG*/
140
141 /* Remember timer mode */
142 clockevent_mode = mode;
143 local_irq_restore(flags);
144
145 switch (mode) {
146 case CLOCK_EVT_MODE_PERIODIC:
147 printk(KERN_ERR "imx_set_mode: Periodic mode is not supported for i.MX\n");
148 break;
149 case CLOCK_EVT_MODE_ONESHOT:
150 /*
151 * Do not put overhead of interrupt enable/disable into
152 * imx_set_next_event(), the core has about 4 minutes
153 * to call imx_set_next_event() or shutdown clock after
154 * mode switching
155 */
156 local_irq_save(flags);
157 IMX_TCTL(TIMER_BASE) |= TCTL_IRQEN;
158 local_irq_restore(flags);
159 break;
160 case CLOCK_EVT_MODE_SHUTDOWN:
161 case CLOCK_EVT_MODE_UNUSED:
162 case CLOCK_EVT_MODE_RESUME:
163 /* Left event sources disabled, no more interrupts appears */
164 break;
165 }
166}
167
168static struct clock_event_device clockevent_imx = {
169 .name = "imx_timer1",
170 .features = CLOCK_EVT_FEAT_ONESHOT,
171 .shift = 32,
172 .set_mode = imx_set_mode,
173 .set_next_event = imx_set_next_event,
174 .rating = 200,
175};
176
177static int __init imx_clockevent_init(void)
178{
179 clockevent_imx.mult = div_sc(imx_get_perclk1(), NSEC_PER_SEC,
180 clockevent_imx.shift);
181 clockevent_imx.max_delta_ns =
182 clockevent_delta2ns(0xfffffffe, &clockevent_imx);
183 clockevent_imx.min_delta_ns =
184 clockevent_delta2ns(0xf, &clockevent_imx);
185
186 clockevent_imx.cpumask = cpumask_of_cpu(0);
187
188 clockevents_register_device(&clockevent_imx);
189
190 return 0;
191}
192
193
102static void __init imx_timer_init(void) 194static void __init imx_timer_init(void)
103{ 195{
104 imx_timer_hardware_init(); 196 imx_timer_hardware_init();
105 imx_clocksource_init(); 197 imx_clocksource_init();
106 198
199 imx_clockevent_init();
200
107 /* 201 /*
108 * Make irqs happen for the system timer 202 * Make irqs happen for the system timer
109 */ 203 */
diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c
index 9d63d7f260ca..99d94cb1bafd 100644
--- a/arch/arm/mach-iop13xx/pci.c
+++ b/arch/arm/mach-iop13xx/pci.c
@@ -1002,11 +1002,10 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys)
1002 if (nr > 1) 1002 if (nr > 1)
1003 return 0; 1003 return 0;
1004 1004
1005 res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL); 1005 res = kcalloc(2, sizeof(struct resource), GFP_KERNEL);
1006 if (!res) 1006 if (!res)
1007 panic("PCI: unable to alloc resources"); 1007 panic("PCI: unable to alloc resources");
1008 1008
1009 memset(res, 0, sizeof(struct resource) * 2);
1010 1009
1011 /* 'nr' assumptions: 1010 /* 'nr' assumptions:
1012 * ATUX is always 0 1011 * ATUX is always 0
diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c
index bc4871553f6a..bfe0c87e3397 100644
--- a/arch/arm/mach-iop13xx/setup.c
+++ b/arch/arm/mach-iop13xx/setup.c
@@ -25,6 +25,7 @@
25#include <asm/hardware.h> 25#include <asm/hardware.h>
26#include <asm/irq.h> 26#include <asm/irq.h>
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/hardware/iop_adma.h>
28 29
29#define IOP13XX_UART_XTAL 33334000 30#define IOP13XX_UART_XTAL 33334000
30#define IOP13XX_SETUP_DEBUG 0 31#define IOP13XX_SETUP_DEBUG 0
@@ -236,19 +237,143 @@ static unsigned long iq8134x_probe_flash_size(void)
236} 237}
237#endif 238#endif
238 239
240/* ADMA Channels */
241static struct resource iop13xx_adma_0_resources[] = {
242 [0] = {
243 .start = IOP13XX_ADMA_PHYS_BASE(0),
244 .end = IOP13XX_ADMA_UPPER_PA(0),
245 .flags = IORESOURCE_MEM,
246 },
247 [1] = {
248 .start = IRQ_IOP13XX_ADMA0_EOT,
249 .end = IRQ_IOP13XX_ADMA0_EOT,
250 .flags = IORESOURCE_IRQ
251 },
252 [2] = {
253 .start = IRQ_IOP13XX_ADMA0_EOC,
254 .end = IRQ_IOP13XX_ADMA0_EOC,
255 .flags = IORESOURCE_IRQ
256 },
257 [3] = {
258 .start = IRQ_IOP13XX_ADMA0_ERR,
259 .end = IRQ_IOP13XX_ADMA0_ERR,
260 .flags = IORESOURCE_IRQ
261 }
262};
263
264static struct resource iop13xx_adma_1_resources[] = {
265 [0] = {
266 .start = IOP13XX_ADMA_PHYS_BASE(1),
267 .end = IOP13XX_ADMA_UPPER_PA(1),
268 .flags = IORESOURCE_MEM,
269 },
270 [1] = {
271 .start = IRQ_IOP13XX_ADMA1_EOT,
272 .end = IRQ_IOP13XX_ADMA1_EOT,
273 .flags = IORESOURCE_IRQ
274 },
275 [2] = {
276 .start = IRQ_IOP13XX_ADMA1_EOC,
277 .end = IRQ_IOP13XX_ADMA1_EOC,
278 .flags = IORESOURCE_IRQ
279 },
280 [3] = {
281 .start = IRQ_IOP13XX_ADMA1_ERR,
282 .end = IRQ_IOP13XX_ADMA1_ERR,
283 .flags = IORESOURCE_IRQ
284 }
285};
286
287static struct resource iop13xx_adma_2_resources[] = {
288 [0] = {
289 .start = IOP13XX_ADMA_PHYS_BASE(2),
290 .end = IOP13XX_ADMA_UPPER_PA(2),
291 .flags = IORESOURCE_MEM,
292 },
293 [1] = {
294 .start = IRQ_IOP13XX_ADMA2_EOT,
295 .end = IRQ_IOP13XX_ADMA2_EOT,
296 .flags = IORESOURCE_IRQ
297 },
298 [2] = {
299 .start = IRQ_IOP13XX_ADMA2_EOC,
300 .end = IRQ_IOP13XX_ADMA2_EOC,
301 .flags = IORESOURCE_IRQ
302 },
303 [3] = {
304 .start = IRQ_IOP13XX_ADMA2_ERR,
305 .end = IRQ_IOP13XX_ADMA2_ERR,
306 .flags = IORESOURCE_IRQ
307 }
308};
309
310static u64 iop13xx_adma_dmamask = DMA_64BIT_MASK;
311static struct iop_adma_platform_data iop13xx_adma_0_data = {
312 .hw_id = 0,
313 .pool_size = PAGE_SIZE,
314};
315
316static struct iop_adma_platform_data iop13xx_adma_1_data = {
317 .hw_id = 1,
318 .pool_size = PAGE_SIZE,
319};
320
321static struct iop_adma_platform_data iop13xx_adma_2_data = {
322 .hw_id = 2,
323 .pool_size = PAGE_SIZE,
324};
325
326/* The ids are fixed up later in iop13xx_platform_init */
327static struct platform_device iop13xx_adma_0_channel = {
328 .name = "iop-adma",
329 .id = 0,
330 .num_resources = 4,
331 .resource = iop13xx_adma_0_resources,
332 .dev = {
333 .dma_mask = &iop13xx_adma_dmamask,
334 .coherent_dma_mask = DMA_64BIT_MASK,
335 .platform_data = (void *) &iop13xx_adma_0_data,
336 },
337};
338
339static struct platform_device iop13xx_adma_1_channel = {
340 .name = "iop-adma",
341 .id = 0,
342 .num_resources = 4,
343 .resource = iop13xx_adma_1_resources,
344 .dev = {
345 .dma_mask = &iop13xx_adma_dmamask,
346 .coherent_dma_mask = DMA_64BIT_MASK,
347 .platform_data = (void *) &iop13xx_adma_1_data,
348 },
349};
350
351static struct platform_device iop13xx_adma_2_channel = {
352 .name = "iop-adma",
353 .id = 0,
354 .num_resources = 4,
355 .resource = iop13xx_adma_2_resources,
356 .dev = {
357 .dma_mask = &iop13xx_adma_dmamask,
358 .coherent_dma_mask = DMA_64BIT_MASK,
359 .platform_data = (void *) &iop13xx_adma_2_data,
360 },
361};
362
239void __init iop13xx_map_io(void) 363void __init iop13xx_map_io(void)
240{ 364{
241 /* Initialize the Static Page Table maps */ 365 /* Initialize the Static Page Table maps */
242 iotable_init(iop13xx_std_desc, ARRAY_SIZE(iop13xx_std_desc)); 366 iotable_init(iop13xx_std_desc, ARRAY_SIZE(iop13xx_std_desc));
243} 367}
244 368
245static int init_uart = 0; 369static int init_uart;
246static int init_i2c = 0; 370static int init_i2c;
371static int init_adma;
247 372
248void __init iop13xx_platform_init(void) 373void __init iop13xx_platform_init(void)
249{ 374{
250 int i; 375 int i;
251 u32 uart_idx, i2c_idx, plat_idx; 376 u32 uart_idx, i2c_idx, adma_idx, plat_idx;
252 struct platform_device *iop13xx_devices[IQ81340_MAX_PLAT_DEVICES]; 377 struct platform_device *iop13xx_devices[IQ81340_MAX_PLAT_DEVICES];
253 378
254 /* set the bases so we can read the device id */ 379 /* set the bases so we can read the device id */
@@ -294,6 +419,12 @@ void __init iop13xx_platform_init(void)
294 } 419 }
295 } 420 }
296 421
422 if (init_adma == IOP13XX_INIT_ADMA_DEFAULT) {
423 init_adma |= IOP13XX_INIT_ADMA_0;
424 init_adma |= IOP13XX_INIT_ADMA_1;
425 init_adma |= IOP13XX_INIT_ADMA_2;
426 }
427
297 plat_idx = 0; 428 plat_idx = 0;
298 uart_idx = 0; 429 uart_idx = 0;
299 i2c_idx = 0; 430 i2c_idx = 0;
@@ -332,6 +463,56 @@ void __init iop13xx_platform_init(void)
332 } 463 }
333 } 464 }
334 465
466 /* initialize adma channel ids and capabilities */
467 adma_idx = 0;
468 for (i = 0; i < IQ81340_NUM_ADMA; i++) {
469 struct iop_adma_platform_data *plat_data;
470 if ((init_adma & (1 << i)) && IOP13XX_SETUP_DEBUG)
471 printk(KERN_INFO
472 "Adding adma%d to platform device list\n", i);
473 switch (init_adma & (1 << i)) {
474 case IOP13XX_INIT_ADMA_0:
475 iop13xx_adma_0_channel.id = adma_idx++;
476 iop13xx_devices[plat_idx++] = &iop13xx_adma_0_channel;
477 plat_data = &iop13xx_adma_0_data;
478 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
479 dma_cap_set(DMA_XOR, plat_data->cap_mask);
480 dma_cap_set(DMA_DUAL_XOR, plat_data->cap_mask);
481 dma_cap_set(DMA_ZERO_SUM, plat_data->cap_mask);
482 dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
483 dma_cap_set(DMA_MEMCPY_CRC32C, plat_data->cap_mask);
484 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
485 break;
486 case IOP13XX_INIT_ADMA_1:
487 iop13xx_adma_1_channel.id = adma_idx++;
488 iop13xx_devices[plat_idx++] = &iop13xx_adma_1_channel;
489 plat_data = &iop13xx_adma_1_data;
490 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
491 dma_cap_set(DMA_XOR, plat_data->cap_mask);
492 dma_cap_set(DMA_DUAL_XOR, plat_data->cap_mask);
493 dma_cap_set(DMA_ZERO_SUM, plat_data->cap_mask);
494 dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
495 dma_cap_set(DMA_MEMCPY_CRC32C, plat_data->cap_mask);
496 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
497 break;
498 case IOP13XX_INIT_ADMA_2:
499 iop13xx_adma_2_channel.id = adma_idx++;
500 iop13xx_devices[plat_idx++] = &iop13xx_adma_2_channel;
501 plat_data = &iop13xx_adma_2_data;
502 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
503 dma_cap_set(DMA_XOR, plat_data->cap_mask);
504 dma_cap_set(DMA_DUAL_XOR, plat_data->cap_mask);
505 dma_cap_set(DMA_ZERO_SUM, plat_data->cap_mask);
506 dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
507 dma_cap_set(DMA_MEMCPY_CRC32C, plat_data->cap_mask);
508 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
509 dma_cap_set(DMA_PQ_XOR, plat_data->cap_mask);
510 dma_cap_set(DMA_PQ_UPDATE, plat_data->cap_mask);
511 dma_cap_set(DMA_PQ_ZERO_SUM, plat_data->cap_mask);
512 break;
513 }
514 }
515
335#ifdef CONFIG_MTD_PHYSMAP 516#ifdef CONFIG_MTD_PHYSMAP
336 iq8134x_flash_resource.end = iq8134x_flash_resource.start + 517 iq8134x_flash_resource.end = iq8134x_flash_resource.start +
337 iq8134x_probe_flash_size() - 1; 518 iq8134x_probe_flash_size() - 1;
@@ -399,5 +580,35 @@ static int __init iop13xx_init_i2c_setup(char *str)
399 return 1; 580 return 1;
400} 581}
401 582
583static int __init iop13xx_init_adma_setup(char *str)
584{
585 if (str) {
586 while (*str != '\0') {
587 switch (*str) {
588 case '0':
589 init_adma |= IOP13XX_INIT_ADMA_0;
590 break;
591 case '1':
592 init_adma |= IOP13XX_INIT_ADMA_1;
593 break;
594 case '2':
595 init_adma |= IOP13XX_INIT_ADMA_2;
596 break;
597 case ',':
598 case '=':
599 break;
600 default:
601 PRINTK("\"iop13xx_init_adma\" malformed"
602 " at character: \'%c\'", *str);
603 *(str + 1) = '\0';
604 init_adma = IOP13XX_INIT_ADMA_DEFAULT;
605 }
606 str++;
607 }
608 }
609 return 1;
610}
611
612__setup("iop13xx_init_adma", iop13xx_init_adma_setup);
402__setup("iop13xx_init_uart", iop13xx_init_uart_setup); 613__setup("iop13xx_init_uart", iop13xx_init_uart_setup);
403__setup("iop13xx_init_i2c", iop13xx_init_i2c_setup); 614__setup("iop13xx_init_i2c", iop13xx_init_i2c_setup);
diff --git a/arch/arm/mach-iop13xx/tpmi.c b/arch/arm/mach-iop13xx/tpmi.c
index d3dc278213da..2476347ea62f 100644
--- a/arch/arm/mach-iop13xx/tpmi.c
+++ b/arch/arm/mach-iop13xx/tpmi.c
@@ -29,13 +29,15 @@
29#define IOP13XX_TPMI_MMR(dev) IOP13XX_REG_ADDR32_PHYS(0x48000 + (dev << 12)) 29#define IOP13XX_TPMI_MMR(dev) IOP13XX_REG_ADDR32_PHYS(0x48000 + (dev << 12))
30#define IOP13XX_TPMI_MEM(dev) IOP13XX_REG_ADDR32_PHYS(0x60000 + (dev << 13)) 30#define IOP13XX_TPMI_MEM(dev) IOP13XX_REG_ADDR32_PHYS(0x60000 + (dev << 13))
31#define IOP13XX_TPMI_CTRL(dev) IOP13XX_REG_ADDR32_PHYS(0x50000 + (dev << 10)) 31#define IOP13XX_TPMI_CTRL(dev) IOP13XX_REG_ADDR32_PHYS(0x50000 + (dev << 10))
32#define IOP13XX_TPMI_IOP_CTRL(dev) (IOP13XX_TPMI_CTRL(dev) + 0x2000)
32#define IOP13XX_TPMI_MMR_SIZE (SZ_4K - 1) 33#define IOP13XX_TPMI_MMR_SIZE (SZ_4K - 1)
33#define IOP13XX_TPMI_MEM_SIZE (255) 34#define IOP13XX_TPMI_MEM_SIZE (255)
34#define IOP13XX_TPMI_MEM_CTRL (SZ_1K - 1) 35#define IOP13XX_TPMI_MEM_CTRL (SZ_1K - 1)
35#define IOP13XX_TPMI_RESOURCE_MMR 0 36#define IOP13XX_TPMI_RESOURCE_MMR 0
36#define IOP13XX_TPMI_RESOURCE_MEM 1 37#define IOP13XX_TPMI_RESOURCE_MEM 1
37#define IOP13XX_TPMI_RESOURCE_CTRL 2 38#define IOP13XX_TPMI_RESOURCE_CTRL 2
38#define IOP13XX_TPMI_RESOURCE_IRQ 3 39#define IOP13XX_TPMI_RESOURCE_IOP_CTRL 3
40#define IOP13XX_TPMI_RESOURCE_IRQ 4
39 41
40static struct resource iop13xx_tpmi_0_resources[] = { 42static struct resource iop13xx_tpmi_0_resources[] = {
41 [IOP13XX_TPMI_RESOURCE_MMR] = { 43 [IOP13XX_TPMI_RESOURCE_MMR] = {
@@ -53,6 +55,11 @@ static struct resource iop13xx_tpmi_0_resources[] = {
53 .end = IOP13XX_TPMI_CTRL(0) + IOP13XX_TPMI_MEM_CTRL, 55 .end = IOP13XX_TPMI_CTRL(0) + IOP13XX_TPMI_MEM_CTRL,
54 .flags = IORESOURCE_MEM, 56 .flags = IORESOURCE_MEM,
55 }, 57 },
58 [IOP13XX_TPMI_RESOURCE_IOP_CTRL] = {
59 .start = IOP13XX_TPMI_IOP_CTRL(0),
60 .end = IOP13XX_TPMI_IOP_CTRL(0) + IOP13XX_TPMI_MEM_CTRL,
61 .flags = IORESOURCE_MEM,
62 },
56 [IOP13XX_TPMI_RESOURCE_IRQ] = { 63 [IOP13XX_TPMI_RESOURCE_IRQ] = {
57 .start = IRQ_IOP13XX_TPMI0_OUT, 64 .start = IRQ_IOP13XX_TPMI0_OUT,
58 .end = IRQ_IOP13XX_TPMI0_OUT, 65 .end = IRQ_IOP13XX_TPMI0_OUT,
@@ -76,6 +83,11 @@ static struct resource iop13xx_tpmi_1_resources[] = {
76 .end = IOP13XX_TPMI_CTRL(1) + IOP13XX_TPMI_MEM_CTRL, 83 .end = IOP13XX_TPMI_CTRL(1) + IOP13XX_TPMI_MEM_CTRL,
77 .flags = IORESOURCE_MEM, 84 .flags = IORESOURCE_MEM,
78 }, 85 },
86 [IOP13XX_TPMI_RESOURCE_IOP_CTRL] = {
87 .start = IOP13XX_TPMI_IOP_CTRL(1),
88 .end = IOP13XX_TPMI_IOP_CTRL(1) + IOP13XX_TPMI_MEM_CTRL,
89 .flags = IORESOURCE_MEM,
90 },
79 [IOP13XX_TPMI_RESOURCE_IRQ] = { 91 [IOP13XX_TPMI_RESOURCE_IRQ] = {
80 .start = IRQ_IOP13XX_TPMI1_OUT, 92 .start = IRQ_IOP13XX_TPMI1_OUT,
81 .end = IRQ_IOP13XX_TPMI1_OUT, 93 .end = IRQ_IOP13XX_TPMI1_OUT,
@@ -99,6 +111,11 @@ static struct resource iop13xx_tpmi_2_resources[] = {
99 .end = IOP13XX_TPMI_CTRL(2) + IOP13XX_TPMI_MEM_CTRL, 111 .end = IOP13XX_TPMI_CTRL(2) + IOP13XX_TPMI_MEM_CTRL,
100 .flags = IORESOURCE_MEM, 112 .flags = IORESOURCE_MEM,
101 }, 113 },
114 [IOP13XX_TPMI_RESOURCE_IOP_CTRL] = {
115 .start = IOP13XX_TPMI_IOP_CTRL(2),
116 .end = IOP13XX_TPMI_IOP_CTRL(2) + IOP13XX_TPMI_MEM_CTRL,
117 .flags = IORESOURCE_MEM,
118 },
102 [IOP13XX_TPMI_RESOURCE_IRQ] = { 119 [IOP13XX_TPMI_RESOURCE_IRQ] = {
103 .start = IRQ_IOP13XX_TPMI2_OUT, 120 .start = IRQ_IOP13XX_TPMI2_OUT,
104 .end = IRQ_IOP13XX_TPMI2_OUT, 121 .end = IRQ_IOP13XX_TPMI2_OUT,
@@ -122,6 +139,11 @@ static struct resource iop13xx_tpmi_3_resources[] = {
122 .end = IOP13XX_TPMI_CTRL(3) + IOP13XX_TPMI_MEM_CTRL, 139 .end = IOP13XX_TPMI_CTRL(3) + IOP13XX_TPMI_MEM_CTRL,
123 .flags = IORESOURCE_MEM, 140 .flags = IORESOURCE_MEM,
124 }, 141 },
142 [IOP13XX_TPMI_RESOURCE_IOP_CTRL] = {
143 .start = IOP13XX_TPMI_IOP_CTRL(3),
144 .end = IOP13XX_TPMI_IOP_CTRL(3) + IOP13XX_TPMI_MEM_CTRL,
145 .flags = IORESOURCE_MEM,
146 },
125 [IOP13XX_TPMI_RESOURCE_IRQ] = { 147 [IOP13XX_TPMI_RESOURCE_IRQ] = {
126 .start = IRQ_IOP13XX_TPMI3_OUT, 148 .start = IRQ_IOP13XX_TPMI3_OUT,
127 .end = IRQ_IOP13XX_TPMI3_OUT, 149 .end = IRQ_IOP13XX_TPMI3_OUT,
@@ -133,7 +155,7 @@ u64 iop13xx_tpmi_mask = DMA_64BIT_MASK;
133static struct platform_device iop13xx_tpmi_0_device = { 155static struct platform_device iop13xx_tpmi_0_device = {
134 .name = "iop-tpmi", 156 .name = "iop-tpmi",
135 .id = 0, 157 .id = 0,
136 .num_resources = 4, 158 .num_resources = ARRAY_SIZE(iop13xx_tpmi_0_resources),
137 .resource = iop13xx_tpmi_0_resources, 159 .resource = iop13xx_tpmi_0_resources,
138 .dev = { 160 .dev = {
139 .dma_mask = &iop13xx_tpmi_mask, 161 .dma_mask = &iop13xx_tpmi_mask,
@@ -144,7 +166,7 @@ static struct platform_device iop13xx_tpmi_0_device = {
144static struct platform_device iop13xx_tpmi_1_device = { 166static struct platform_device iop13xx_tpmi_1_device = {
145 .name = "iop-tpmi", 167 .name = "iop-tpmi",
146 .id = 1, 168 .id = 1,
147 .num_resources = 4, 169 .num_resources = ARRAY_SIZE(iop13xx_tpmi_1_resources),
148 .resource = iop13xx_tpmi_1_resources, 170 .resource = iop13xx_tpmi_1_resources,
149 .dev = { 171 .dev = {
150 .dma_mask = &iop13xx_tpmi_mask, 172 .dma_mask = &iop13xx_tpmi_mask,
@@ -155,7 +177,7 @@ static struct platform_device iop13xx_tpmi_1_device = {
155static struct platform_device iop13xx_tpmi_2_device = { 177static struct platform_device iop13xx_tpmi_2_device = {
156 .name = "iop-tpmi", 178 .name = "iop-tpmi",
157 .id = 2, 179 .id = 2,
158 .num_resources = 4, 180 .num_resources = ARRAY_SIZE(iop13xx_tpmi_2_resources),
159 .resource = iop13xx_tpmi_2_resources, 181 .resource = iop13xx_tpmi_2_resources,
160 .dev = { 182 .dev = {
161 .dma_mask = &iop13xx_tpmi_mask, 183 .dma_mask = &iop13xx_tpmi_mask,
@@ -166,7 +188,7 @@ static struct platform_device iop13xx_tpmi_2_device = {
166static struct platform_device iop13xx_tpmi_3_device = { 188static struct platform_device iop13xx_tpmi_3_device = {
167 .name = "iop-tpmi", 189 .name = "iop-tpmi",
168 .id = 3, 190 .id = 3,
169 .num_resources = 4, 191 .num_resources = ARRAY_SIZE(iop13xx_tpmi_3_resources),
170 .resource = iop13xx_tpmi_3_resources, 192 .resource = iop13xx_tpmi_3_resources,
171 .dev = { 193 .dev = {
172 .dma_mask = &iop13xx_tpmi_mask, 194 .dma_mask = &iop13xx_tpmi_mask,
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c
index 5776fd884115..2b086ab2668c 100644
--- a/arch/arm/mach-iop32x/glantank.c
+++ b/arch/arm/mach-iop32x/glantank.c
@@ -180,6 +180,8 @@ static void __init glantank_init_machine(void)
180 platform_device_register(&iop3xx_i2c1_device); 180 platform_device_register(&iop3xx_i2c1_device);
181 platform_device_register(&glantank_flash_device); 181 platform_device_register(&glantank_flash_device);
182 platform_device_register(&glantank_serial_device); 182 platform_device_register(&glantank_serial_device);
183 platform_device_register(&iop3xx_dma_0_channel);
184 platform_device_register(&iop3xx_dma_1_channel);
183 185
184 pm_power_off = glantank_power_off; 186 pm_power_off = glantank_power_off;
185} 187}
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c
index d4eefbea1fe6..98cfa1cd6bdb 100644
--- a/arch/arm/mach-iop32x/iq31244.c
+++ b/arch/arm/mach-iop32x/iq31244.c
@@ -298,9 +298,14 @@ static void __init iq31244_init_machine(void)
298 platform_device_register(&iop3xx_i2c1_device); 298 platform_device_register(&iop3xx_i2c1_device);
299 platform_device_register(&iq31244_flash_device); 299 platform_device_register(&iq31244_flash_device);
300 platform_device_register(&iq31244_serial_device); 300 platform_device_register(&iq31244_serial_device);
301 platform_device_register(&iop3xx_dma_0_channel);
302 platform_device_register(&iop3xx_dma_1_channel);
301 303
302 if (is_ep80219()) 304 if (is_ep80219())
303 pm_power_off = ep80219_power_off; 305 pm_power_off = ep80219_power_off;
306
307 if (!is_80219())
308 platform_device_register(&iop3xx_aau_channel);
304} 309}
305 310
306static int __init force_ep80219_setup(char *str) 311static int __init force_ep80219_setup(char *str)
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c
index 8d9f49164a84..18ad29f213b2 100644
--- a/arch/arm/mach-iop32x/iq80321.c
+++ b/arch/arm/mach-iop32x/iq80321.c
@@ -181,6 +181,9 @@ static void __init iq80321_init_machine(void)
181 platform_device_register(&iop3xx_i2c1_device); 181 platform_device_register(&iop3xx_i2c1_device);
182 platform_device_register(&iq80321_flash_device); 182 platform_device_register(&iq80321_flash_device);
183 platform_device_register(&iq80321_serial_device); 183 platform_device_register(&iq80321_serial_device);
184 platform_device_register(&iop3xx_dma_0_channel);
185 platform_device_register(&iop3xx_dma_1_channel);
186 platform_device_register(&iop3xx_aau_channel);
184} 187}
185 188
186MACHINE_START(IQ80321, "Intel IQ80321") 189MACHINE_START(IQ80321, "Intel IQ80321")
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
index d55005d64781..1873bd8cd1b2 100644
--- a/arch/arm/mach-iop32x/n2100.c
+++ b/arch/arm/mach-iop32x/n2100.c
@@ -25,6 +25,7 @@
25#include <linux/serial_core.h> 25#include <linux/serial_core.h>
26#include <linux/serial_8250.h> 26#include <linux/serial_8250.h>
27#include <linux/mtd/physmap.h> 27#include <linux/mtd/physmap.h>
28#include <linux/i2c.h>
28#include <linux/platform_device.h> 29#include <linux/platform_device.h>
29#include <linux/reboot.h> 30#include <linux/reboot.h>
30#include <asm/hardware.h> 31#include <asm/hardware.h>
@@ -199,6 +200,12 @@ static struct platform_device n2100_serial_device = {
199 .resource = &n2100_uart_resource, 200 .resource = &n2100_uart_resource,
200}; 201};
201 202
203static struct i2c_board_info __initdata n2100_i2c_devices[] = {
204 {
205 I2C_BOARD_INFO("rtc-rs5c372", 0x32),
206 .type = "rs5c372b",
207 },
208};
202 209
203/* 210/*
204 * Pull PCA9532 GPIO #8 low to power off the machine. 211 * Pull PCA9532 GPIO #8 low to power off the machine.
@@ -245,6 +252,11 @@ static void __init n2100_init_machine(void)
245 platform_device_register(&iop3xx_i2c0_device); 252 platform_device_register(&iop3xx_i2c0_device);
246 platform_device_register(&n2100_flash_device); 253 platform_device_register(&n2100_flash_device);
247 platform_device_register(&n2100_serial_device); 254 platform_device_register(&n2100_serial_device);
255 platform_device_register(&iop3xx_dma_0_channel);
256 platform_device_register(&iop3xx_dma_1_channel);
257
258 i2c_register_board_info(0, n2100_i2c_devices,
259 ARRAY_SIZE(n2100_i2c_devices));
248 260
249 pm_power_off = n2100_power_off; 261 pm_power_off = n2100_power_off;
250 262
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c
index 2b063180687a..433188ebff2a 100644
--- a/arch/arm/mach-iop33x/iq80331.c
+++ b/arch/arm/mach-iop33x/iq80331.c
@@ -136,6 +136,9 @@ static void __init iq80331_init_machine(void)
136 platform_device_register(&iop33x_uart0_device); 136 platform_device_register(&iop33x_uart0_device);
137 platform_device_register(&iop33x_uart1_device); 137 platform_device_register(&iop33x_uart1_device);
138 platform_device_register(&iq80331_flash_device); 138 platform_device_register(&iq80331_flash_device);
139 platform_device_register(&iop3xx_dma_0_channel);
140 platform_device_register(&iop3xx_dma_1_channel);
141 platform_device_register(&iop3xx_aau_channel);
139} 142}
140 143
141MACHINE_START(IQ80331, "Intel IQ80331") 144MACHINE_START(IQ80331, "Intel IQ80331")
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c
index 7889ce3cb08e..416c09564cc6 100644
--- a/arch/arm/mach-iop33x/iq80332.c
+++ b/arch/arm/mach-iop33x/iq80332.c
@@ -136,6 +136,9 @@ static void __init iq80332_init_machine(void)
136 platform_device_register(&iop33x_uart0_device); 136 platform_device_register(&iop33x_uart0_device);
137 platform_device_register(&iop33x_uart1_device); 137 platform_device_register(&iop33x_uart1_device);
138 platform_device_register(&iq80332_flash_device); 138 platform_device_register(&iq80332_flash_device);
139 platform_device_register(&iop3xx_dma_0_channel);
140 platform_device_register(&iop3xx_dma_1_channel);
141 platform_device_register(&iop3xx_aau_channel);
139} 142}
140 143
141MACHINE_START(IQ80332, "Intel IQ80332") 144MACHINE_START(IQ80332, "Intel IQ80332")
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig
index 060909870b50..61b2dfcb89d6 100644
--- a/arch/arm/mach-ixp4xx/Kconfig
+++ b/arch/arm/mach-ixp4xx/Kconfig
@@ -41,6 +41,22 @@ config ARCH_ADI_COYOTE
41 Engineering Coyote Gateway Reference Platform. For more 41 Engineering Coyote Gateway Reference Platform. For more
42 information on this platform, see <file:Documentation/arm/IXP4xx>. 42 information on this platform, see <file:Documentation/arm/IXP4xx>.
43 43
44config MACH_GATEWAY7001
45 bool "Gateway 7001"
46 select PCI
47 help
48 Say 'Y' here if you want your kernel to support Gateway's
49 7001 Access Point. For more information on this platform,
50 see http://openwrt.org
51
52config MACH_WG302V2
53 bool "Netgear WG302 v2 / WAG302 v2"
54 select PCI
55 help
56 Say 'Y' here if you want your kernel to support Netgear's
57 WG302 v2 or WAG302 v2 Access Points. For more information
58 on this platform, see http://openwrt.org
59
44config ARCH_IXDP425 60config ARCH_IXDP425
45 bool "IXDP425" 61 bool "IXDP425"
46 help 62 help
diff --git a/arch/arm/mach-ixp4xx/Makefile b/arch/arm/mach-ixp4xx/Makefile
index 3b87c47e06cf..77e00ade5585 100644
--- a/arch/arm/mach-ixp4xx/Makefile
+++ b/arch/arm/mach-ixp4xx/Makefile
@@ -13,6 +13,8 @@ obj-pci-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o
13obj-pci-$(CONFIG_MACH_NSLU2) += nslu2-pci.o 13obj-pci-$(CONFIG_MACH_NSLU2) += nslu2-pci.o
14obj-pci-$(CONFIG_MACH_NAS100D) += nas100d-pci.o 14obj-pci-$(CONFIG_MACH_NAS100D) += nas100d-pci.o
15obj-pci-$(CONFIG_MACH_DSMG600) += dsmg600-pci.o 15obj-pci-$(CONFIG_MACH_DSMG600) += dsmg600-pci.o
16obj-pci-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o
17obj-pci-$(CONFIG_MACH_WG302V2) += wg302v2-pci.o
16 18
17obj-y += common.o 19obj-y += common.o
18 20
@@ -24,5 +26,7 @@ obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-setup.o
24obj-$(CONFIG_MACH_NSLU2) += nslu2-setup.o nslu2-power.o 26obj-$(CONFIG_MACH_NSLU2) += nslu2-setup.o nslu2-power.o
25obj-$(CONFIG_MACH_NAS100D) += nas100d-setup.o nas100d-power.o 27obj-$(CONFIG_MACH_NAS100D) += nas100d-setup.o nas100d-power.o
26obj-$(CONFIG_MACH_DSMG600) += dsmg600-setup.o dsmg600-power.o 28obj-$(CONFIG_MACH_DSMG600) += dsmg600-setup.o dsmg600-power.o
29obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
30obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
27 31
28obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o 32obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 8112f726ffa0..23e7fba6d3e1 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -459,6 +459,8 @@ static void ixp4xx_set_mode(enum clock_event_mode mode,
459 default: 459 default:
460 osrt = opts = 0; 460 osrt = opts = 0;
461 break; 461 break;
462 case CLOCK_EVT_MODE_RESUME:
463 break;
462 } 464 }
463 465
464 *IXP4XX_OSRT1 = osrt | opts; 466 *IXP4XX_OSRT1 = osrt | opts;
diff --git a/arch/arm/mach-ixp4xx/gateway7001-pci.c b/arch/arm/mach-ixp4xx/gateway7001-pci.c
new file mode 100644
index 000000000000..6abf568322d3
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/gateway7001-pci.c
@@ -0,0 +1,63 @@
1/*
2 * arch/arch/mach-ixp4xx/gateway7001-pci.c
3 *
4 * PCI setup routines for Gateway 7001
5 *
6 * Copyright (C) 2007 Imre Kaloz <kaloz@openwrt.org>
7 *
8 * based on coyote-pci.c:
9 * Copyright (C) 2002 Jungo Software Technologies.
10 * Copyright (C) 2003 MontaVista Softwrae, Inc.
11 *
12 * Maintainer: Imre Kaloz <kaloz@openwrt.org>
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
17 *
18 */
19
20#include <linux/kernel.h>
21#include <linux/pci.h>
22#include <linux/init.h>
23#include <linux/irq.h>
24
25#include <asm/mach-types.h>
26#include <asm/hardware.h>
27
28#include <asm/mach/pci.h>
29
30void __init gateway7001_pci_preinit(void)
31{
32 set_irq_type(IRQ_IXP4XX_GPIO10, IRQT_LOW);
33 set_irq_type(IRQ_IXP4XX_GPIO11, IRQT_LOW);
34
35 ixp4xx_pci_preinit();
36}
37
38static int __init gateway7001_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
39{
40 if (slot == 1)
41 return IRQ_IXP4XX_GPIO11;
42 else if (slot == 2)
43 return IRQ_IXP4XX_GPIO10;
44 else return -1;
45}
46
47struct hw_pci gateway7001_pci __initdata = {
48 .nr_controllers = 1,
49 .preinit = gateway7001_pci_preinit,
50 .swizzle = pci_std_swizzle,
51 .setup = ixp4xx_setup,
52 .scan = ixp4xx_scan_bus,
53 .map_irq = gateway7001_map_irq,
54};
55
56int __init gateway7001_pci_init(void)
57{
58 if (machine_is_gateway7001())
59 pci_common_init(&gateway7001_pci);
60 return 0;
61}
62
63subsys_initcall(gateway7001_pci_init);
diff --git a/arch/arm/mach-ixp4xx/gateway7001-setup.c b/arch/arm/mach-ixp4xx/gateway7001-setup.c
new file mode 100644
index 000000000000..37876832e141
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/gateway7001-setup.c
@@ -0,0 +1,108 @@
1/*
2 * arch/arm/mach-ixp4xx/gateway7001-setup.c
3 *
4 * Board setup for the Gateway 7001 board
5 *
6 * Copyright (C) 2007 Imre Kaloz <kaloz@openwrt.org>
7 *
8 * based on coyote-setup.c:
9 * Copyright (C) 2003-2005 MontaVista Software, Inc.
10 *
11 * Author: Imre Kaloz <Kaloz@openwrt.org>
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/device.h>
17#include <linux/serial.h>
18#include <linux/tty.h>
19#include <linux/serial_8250.h>
20#include <linux/slab.h>
21
22#include <asm/types.h>
23#include <asm/setup.h>
24#include <asm/memory.h>
25#include <asm/hardware.h>
26#include <asm/irq.h>
27#include <asm/mach-types.h>
28#include <asm/mach/arch.h>
29#include <asm/mach/flash.h>
30
31static struct flash_platform_data gateway7001_flash_data = {
32 .map_name = "cfi_probe",
33 .width = 2,
34};
35
36static struct resource gateway7001_flash_resource = {
37 .flags = IORESOURCE_MEM,
38};
39
40static struct platform_device gateway7001_flash = {
41 .name = "IXP4XX-Flash",
42 .id = 0,
43 .dev = {
44 .platform_data = &gateway7001_flash_data,
45 },
46 .num_resources = 1,
47 .resource = &gateway7001_flash_resource,
48};
49
50static struct resource gateway7001_uart_resource = {
51 .start = IXP4XX_UART2_BASE_PHYS,
52 .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
53 .flags = IORESOURCE_MEM,
54};
55
56static struct plat_serial8250_port gateway7001_uart_data[] = {
57 {
58 .mapbase = IXP4XX_UART2_BASE_PHYS,
59 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
60 .irq = IRQ_IXP4XX_UART2,
61 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
62 .iotype = UPIO_MEM,
63 .regshift = 2,
64 .uartclk = IXP4XX_UART_XTAL,
65 },
66 { },
67};
68
69static struct platform_device gateway7001_uart = {
70 .name = "serial8250",
71 .id = PLAT8250_DEV_PLATFORM,
72 .dev = {
73 .platform_data = gateway7001_uart_data,
74 },
75 .num_resources = 1,
76 .resource = &gateway7001_uart_resource,
77};
78
79static struct platform_device *gateway7001_devices[] __initdata = {
80 &gateway7001_flash,
81 &gateway7001_uart
82};
83
84static void __init gateway7001_init(void)
85{
86 ixp4xx_sys_init();
87
88 gateway7001_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
89 gateway7001_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;
90
91 *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
92 *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
93
94 platform_add_devices(gateway7001_devices, ARRAY_SIZE(gateway7001_devices));
95}
96
97#ifdef CONFIG_MACH_GATEWAY7001
98MACHINE_START(GATEWAY7001, "Gateway 7001 AP")
99 /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
100 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
101 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
102 .map_io = ixp4xx_map_io,
103 .init_irq = ixp4xx_init_irq,
104 .timer = &ixp4xx_timer,
105 .boot_params = 0x0100,
106 .init_machine = gateway7001_init,
107MACHINE_END
108#endif
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-pci.c b/arch/arm/mach-ixp4xx/gtwx5715-pci.c
index a66484b63d36..0d5a42455820 100644
--- a/arch/arm/mach-ixp4xx/gtwx5715-pci.c
+++ b/arch/arm/mach-ixp4xx/gtwx5715-pci.c
@@ -25,17 +25,13 @@
25#include <linux/pci.h> 25#include <linux/pci.h>
26#include <linux/init.h> 26#include <linux/init.h>
27#include <linux/delay.h> 27#include <linux/delay.h>
28#include <linux/irq.h>
29
28#include <asm/mach-types.h> 30#include <asm/mach-types.h>
29#include <asm/hardware.h> 31#include <asm/hardware.h>
30#include <asm/irq.h>
31#include <asm/arch/gtwx5715.h> 32#include <asm/arch/gtwx5715.h>
32#include <asm/mach/pci.h> 33#include <asm/mach/pci.h>
33 34
34extern void ixp4xx_pci_preinit(void);
35extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
36extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys);
37
38
39/* 35/*
40 * The exact GPIO pins and IRQs are defined in arch-ixp4xx/gtwx5715.h 36 * The exact GPIO pins and IRQs are defined in arch-ixp4xx/gtwx5715.h
41 * Slot 0 isn't actually populated with a card connector but 37 * Slot 0 isn't actually populated with a card connector but
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index ec4f07950ec6..d5008d8fc9a5 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -15,6 +15,10 @@
15#include <linux/tty.h> 15#include <linux/tty.h>
16#include <linux/serial_8250.h> 16#include <linux/serial_8250.h>
17#include <linux/slab.h> 17#include <linux/slab.h>
18#include <linux/io.h>
19#include <linux/mtd/mtd.h>
20#include <linux/mtd/nand.h>
21#include <linux/mtd/partitions.h>
18 22
19#include <asm/types.h> 23#include <asm/types.h>
20#include <asm/setup.h> 24#include <asm/setup.h>
@@ -24,6 +28,7 @@
24#include <asm/irq.h> 28#include <asm/irq.h>
25#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
26#include <asm/mach/flash.h> 30#include <asm/mach/flash.h>
31#include <asm/delay.h>
27 32
28static struct flash_platform_data ixdp425_flash_data = { 33static struct flash_platform_data ixdp425_flash_data = {
29 .map_name = "cfi_probe", 34 .map_name = "cfi_probe",
@@ -44,6 +49,77 @@ static struct platform_device ixdp425_flash = {
44 .resource = &ixdp425_flash_resource, 49 .resource = &ixdp425_flash_resource,
45}; 50};
46 51
52#if defined(CONFIG_MTD_NAND_PLATFORM) || \
53 defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
54
55#ifdef CONFIG_MTD_PARTITIONS
56const char *part_probes[] = { "cmdlinepart", NULL };
57
58static struct mtd_partition ixdp425_partitions[] = {
59 {
60 .name = "ixp400 NAND FS 0",
61 .offset = 0,
62 .size = SZ_8M
63 }, {
64 .name = "ixp400 NAND FS 1",
65 .offset = MTDPART_OFS_APPEND,
66 .size = MTDPART_SIZ_FULL
67 },
68};
69#endif
70
71static void
72ixdp425_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
73{
74 struct nand_chip *this = mtd->priv;
75 int offset = (int)this->priv;
76
77 if (ctrl & NAND_CTRL_CHANGE) {
78 if (ctrl & NAND_NCE) {
79 gpio_line_set(IXDP425_NAND_NCE_PIN, IXP4XX_GPIO_LOW);
80 udelay(5);
81 } else
82 gpio_line_set(IXDP425_NAND_NCE_PIN, IXP4XX_GPIO_HIGH);
83
84 offset = (ctrl & NAND_CLE) ? IXDP425_NAND_CMD_BYTE : 0;
85 offset |= (ctrl & NAND_ALE) ? IXDP425_NAND_ADDR_BYTE : 0;
86 this->priv = (void *)offset;
87 }
88
89 if (cmd != NAND_CMD_NONE)
90 writeb(cmd, this->IO_ADDR_W + offset);
91}
92
93static struct platform_nand_data ixdp425_flash_nand_data = {
94 .chip = {
95 .chip_delay = 30,
96 .options = NAND_NO_AUTOINCR,
97#ifdef CONFIG_MTD_PARTITIONS
98 .part_probe_types = part_probes,
99 .partitions = ixdp425_partitions,
100 .nr_partitions = ARRAY_SIZE(ixdp425_partitions),
101#endif
102 },
103 .ctrl = {
104 .cmd_ctrl = ixdp425_flash_nand_cmd_ctrl
105 }
106};
107
108static struct resource ixdp425_flash_nand_resource = {
109 .flags = IORESOURCE_MEM,
110};
111
112static struct platform_device ixdp425_flash_nand = {
113 .name = "gen_nand",
114 .id = -1,
115 .dev = {
116 .platform_data = &ixdp425_flash_nand_data,
117 },
118 .num_resources = 1,
119 .resource = &ixdp425_flash_nand_resource,
120};
121#endif /* CONFIG_MTD_NAND_PLATFORM */
122
47static struct ixp4xx_i2c_pins ixdp425_i2c_gpio_pins = { 123static struct ixp4xx_i2c_pins ixdp425_i2c_gpio_pins = {
48 .sda_pin = IXDP425_SDA_PIN, 124 .sda_pin = IXDP425_SDA_PIN,
49 .scl_pin = IXDP425_SCL_PIN, 125 .scl_pin = IXDP425_SCL_PIN,
@@ -104,6 +180,10 @@ static struct platform_device ixdp425_uart = {
104static struct platform_device *ixdp425_devices[] __initdata = { 180static struct platform_device *ixdp425_devices[] __initdata = {
105 &ixdp425_i2c_controller, 181 &ixdp425_i2c_controller,
106 &ixdp425_flash, 182 &ixdp425_flash,
183#if defined(CONFIG_MTD_NAND_PLATFORM) || \
184 defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
185 &ixdp425_flash_nand,
186#endif
107 &ixdp425_uart 187 &ixdp425_uart
108}; 188};
109 189
@@ -115,6 +195,22 @@ static void __init ixdp425_init(void)
115 ixdp425_flash_resource.end = 195 ixdp425_flash_resource.end =
116 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; 196 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
117 197
198#if defined(CONFIG_MTD_NAND_PLATFORM) || \
199 defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
200 ixdp425_flash_nand_resource.start = IXP4XX_EXP_BUS_BASE(3),
201 ixdp425_flash_nand_resource.end = IXP4XX_EXP_BUS_BASE(3) + 0x10 - 1;
202
203 gpio_line_config(IXDP425_NAND_NCE_PIN, IXP4XX_GPIO_OUT);
204
205 /* Configure expansion bus for NAND Flash */
206 *IXP4XX_EXP_CS3 = IXP4XX_EXP_BUS_CS_EN |
207 IXP4XX_EXP_BUS_STROBE_T(1) | /* extend by 1 clock */
208 IXP4XX_EXP_BUS_CYCLES(0) | /* Intel cycles */
209 IXP4XX_EXP_BUS_SIZE(0) | /* 512bytes addr space*/
210 IXP4XX_EXP_BUS_WR_EN |
211 IXP4XX_EXP_BUS_BYTE_EN; /* 8 bit data bus */
212#endif
213
118 if (cpu_is_ixp43x()) { 214 if (cpu_is_ixp43x()) {
119 ixdp425_uart.num_resources = 1; 215 ixdp425_uart.num_resources = 1;
120 ixdp425_uart_data[1].flags = 0; 216 ixdp425_uart_data[1].flags = 0;
diff --git a/arch/arm/mach-ixp4xx/wg302v2-pci.c b/arch/arm/mach-ixp4xx/wg302v2-pci.c
new file mode 100644
index 000000000000..6588f2c758e2
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/wg302v2-pci.c
@@ -0,0 +1,63 @@
1/*
2 * arch/arch/mach-ixp4xx/wg302v2-pci.c
3 *
4 * PCI setup routines for the Netgear WG302 v2 and WAG302 v2
5 *
6 * Copyright (C) 2007 Imre Kaloz <kaloz@openwrt.org>
7 *
8 * based on coyote-pci.c:
9 * Copyright (C) 2002 Jungo Software Technologies.
10 * Copyright (C) 2003 MontaVista Software, Inc.
11 *
12 * Maintainer: Imre Kaloz <kaloz@openwrt.org>
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
17 *
18 */
19
20#include <linux/kernel.h>
21#include <linux/pci.h>
22#include <linux/init.h>
23#include <linux/irq.h>
24
25#include <asm/mach-types.h>
26#include <asm/hardware.h>
27
28#include <asm/mach/pci.h>
29
30void __init wg302v2_pci_preinit(void)
31{
32 set_irq_type(IRQ_IXP4XX_GPIO8, IRQT_LOW);
33 set_irq_type(IRQ_IXP4XX_GPIO9, IRQT_LOW);
34
35 ixp4xx_pci_preinit();
36}
37
38static int __init wg302v2_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
39{
40 if (slot == 1)
41 return IRQ_IXP4XX_GPIO8;
42 else if (slot == 2)
43 return IRQ_IXP4XX_GPIO9;
44 else return -1;
45}
46
47struct hw_pci wg302v2_pci __initdata = {
48 .nr_controllers = 1,
49 .preinit = wg302v2_pci_preinit,
50 .swizzle = pci_std_swizzle,
51 .setup = ixp4xx_setup,
52 .scan = ixp4xx_scan_bus,
53 .map_irq = wg302v2_map_irq,
54};
55
56int __init wg302v2_pci_init(void)
57{
58 if (machine_is_wg302v2())
59 pci_common_init(&wg302v2_pci);
60 return 0;
61}
62
63subsys_initcall(wg302v2_pci_init);
diff --git a/arch/arm/mach-ixp4xx/wg302v2-setup.c b/arch/arm/mach-ixp4xx/wg302v2-setup.c
new file mode 100644
index 000000000000..f7e09ad804e8
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/wg302v2-setup.c
@@ -0,0 +1,109 @@
1/*
2 * arch/arm/mach-ixp4xx/wg302-setup.c
3 *
4 * Board setup for the Netgear WG302 v2 and WAG302 v2
5 *
6 * Copyright (C) 2007 Imre Kaloz <Kaloz@openwrt.org>
7 *
8 * based on coyote-setup.c:
9 * Copyright (C) 2003-2005 MontaVista Software, Inc.
10 *
11 * Author: Imre Kaloz <kaloz@openwrt.org>
12 *
13 */
14
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/device.h>
18#include <linux/serial.h>
19#include <linux/tty.h>
20#include <linux/serial_8250.h>
21#include <linux/slab.h>
22
23#include <asm/types.h>
24#include <asm/setup.h>
25#include <asm/memory.h>
26#include <asm/hardware.h>
27#include <asm/irq.h>
28#include <asm/mach-types.h>
29#include <asm/mach/arch.h>
30#include <asm/mach/flash.h>
31
32static struct flash_platform_data wg302v2_flash_data = {
33 .map_name = "cfi_probe",
34 .width = 2,
35};
36
37static struct resource wg302v2_flash_resource = {
38 .flags = IORESOURCE_MEM,
39};
40
41static struct platform_device wg302v2_flash = {
42 .name = "IXP4XX-Flash",
43 .id = 0,
44 .dev = {
45 .platform_data = &wg302v2_flash_data,
46 },
47 .num_resources = 1,
48 .resource = &wg302v2_flash_resource,
49};
50
51static struct resource wg302v2_uart_resource = {
52 .start = IXP4XX_UART2_BASE_PHYS,
53 .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
54 .flags = IORESOURCE_MEM,
55};
56
57static struct plat_serial8250_port wg302v2_uart_data[] = {
58 {
59 .mapbase = IXP4XX_UART2_BASE_PHYS,
60 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
61 .irq = IRQ_IXP4XX_UART2,
62 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
63 .iotype = UPIO_MEM,
64 .regshift = 2,
65 .uartclk = IXP4XX_UART_XTAL,
66 },
67 { },
68};
69
70static struct platform_device wg302v2_uart = {
71 .name = "serial8250",
72 .id = PLAT8250_DEV_PLATFORM,
73 .dev = {
74 .platform_data = wg302v2_uart_data,
75 },
76 .num_resources = 1,
77 .resource = &wg302v2_uart_resource,
78};
79
80static struct platform_device *wg302v2_devices[] __initdata = {
81 &wg302v2_flash,
82 &wg302v2_uart,
83};
84
85static void __init wg302v2_init(void)
86{
87 ixp4xx_sys_init();
88
89 wg302v2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
90 wg302v2_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;
91
92 *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
93 *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
94
95 platform_add_devices(wg302v2_devices, ARRAY_SIZE(wg302v2_devices));
96}
97
98#ifdef CONFIG_MACH_WG302V2
99MACHINE_START(WG302V2, "Netgear WG302 v2 / WAG302 v2")
100 /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
101 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
102 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
103 .map_io = ixp4xx_map_io,
104 .init_irq = ixp4xx_init_irq,
105 .timer = &ixp4xx_timer,
106 .boot_params = 0x0100,
107 .init_machine = wg302v2_init,
108MACHINE_END
109#endif
diff --git a/arch/arm/mach-ks8695/Makefile b/arch/arm/mach-ks8695/Makefile
index 56b7d337333a..2a07a281fa8a 100644
--- a/arch/arm/mach-ks8695/Makefile
+++ b/arch/arm/mach-ks8695/Makefile
@@ -3,7 +3,7 @@
3# Makefile for KS8695 architecture support 3# Makefile for KS8695 architecture support
4# 4#
5 5
6obj-y := cpu.o irq.o time.o devices.o 6obj-y := cpu.o irq.o time.o gpio.o devices.o
7obj-m := 7obj-m :=
8obj-n := 8obj-n :=
9obj- := 9obj- :=
diff --git a/arch/arm/mach-ks8695/gpio.c b/arch/arm/mach-ks8695/gpio.c
new file mode 100644
index 000000000000..b1aa3cb3d4a3
--- /dev/null
+++ b/arch/arm/mach-ks8695/gpio.c
@@ -0,0 +1,218 @@
1/*
2 * arch/arm/mach-ks8695/gpio.c
3 *
4 * Copyright (C) 2006 Andrew Victor
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 * 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#include <linux/kernel.h>
21#include <linux/mm.h>
22#include <linux/init.h>
23#include <linux/module.h>
24
25#include <asm/io.h>
26#include <asm/hardware.h>
27#include <asm/mach/irq.h>
28
29#include <asm/arch/regs-gpio.h>
30#include <asm/arch/gpio.h>
31
32/*
33 * Configure a GPIO line for either GPIO function, or its internal
34 * function (Interrupt, Timer, etc).
35 */
36static void __init_or_module ks8695_gpio_mode(unsigned int pin, short gpio)
37{
38 unsigned int enable[] = { IOPC_IOEINT0EN, IOPC_IOEINT1EN, IOPC_IOEINT2EN, IOPC_IOEINT3EN, IOPC_IOTIM0EN, IOPC_IOTIM1EN };
39 unsigned long x, flags;
40
41 if (pin > KS8695_GPIO_5) /* only GPIO 0..5 have internal functions */
42 return;
43
44 local_irq_save(flags);
45
46 x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPC);
47 if (gpio) /* GPIO: set bit to 0 */
48 x &= ~enable[pin];
49 else /* Internal function: set bit to 1 */
50 x |= enable[pin];
51 __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPC);
52
53 local_irq_restore(flags);
54}
55
56
57static unsigned short gpio_irq[] = { KS8695_IRQ_EXTERN0, KS8695_IRQ_EXTERN1, KS8695_IRQ_EXTERN2, KS8695_IRQ_EXTERN3 };
58
59/*
60 * Configure GPIO pin as external interrupt source.
61 */
62int __init_or_module ks8695_gpio_interrupt(unsigned int pin, unsigned int type)
63{
64 unsigned long x, flags;
65
66 if (pin > KS8695_GPIO_3) /* only GPIO 0..3 can generate IRQ */
67 return -EINVAL;
68
69 local_irq_save(flags);
70
71 /* set pin as input */
72 x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
73 x &= ~IOPM_(pin);
74 __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM);
75
76 local_irq_restore(flags);
77
78 /* Set IRQ triggering type */
79 set_irq_type(gpio_irq[pin], type);
80
81 /* enable interrupt mode */
82 ks8695_gpio_mode(pin, 0);
83
84 return 0;
85}
86EXPORT_SYMBOL(ks8695_gpio_interrupt);
87
88
89
90/* .... Generic GPIO interface .............................................. */
91
92/*
93 * Configure the GPIO line as an input.
94 */
95int __init_or_module gpio_direction_input(unsigned int pin)
96{
97 unsigned long x, flags;
98
99 if (pin > KS8695_GPIO_15)
100 return -EINVAL;
101
102 /* set pin to GPIO mode */
103 ks8695_gpio_mode(pin, 1);
104
105 local_irq_save(flags);
106
107 /* set pin as input */
108 x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
109 x &= ~IOPM_(pin);
110 __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM);
111
112 local_irq_restore(flags);
113
114 return 0;
115}
116EXPORT_SYMBOL(gpio_direction_input);
117
118
119/*
120 * Configure the GPIO line as an output, with default state.
121 */
122int __init_or_module gpio_direction_output(unsigned int pin, unsigned int state)
123{
124 unsigned long x, flags;
125
126 if (pin > KS8695_GPIO_15)
127 return -EINVAL;
128
129 /* set pin to GPIO mode */
130 ks8695_gpio_mode(pin, 1);
131
132 local_irq_save(flags);
133
134 /* set line state */
135 x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
136 if (state)
137 x |= (1 << pin);
138 else
139 x &= ~(1 << pin);
140 __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD);
141
142 /* set pin as output */
143 x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
144 x |= IOPM_(pin);
145 __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM);
146
147 local_irq_restore(flags);
148
149 return 0;
150}
151EXPORT_SYMBOL(gpio_direction_output);
152
153
154/*
155 * Set the state of an output GPIO line.
156 */
157void gpio_set_value(unsigned int pin, unsigned int state)
158{
159 unsigned long x, flags;
160
161 if (pin > KS8695_GPIO_15)
162 return;
163
164 local_irq_save(flags);
165
166 /* set output line state */
167 x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
168 if (state)
169 x |= (1 << pin);
170 else
171 x &= ~(1 << pin);
172 __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD);
173
174 local_irq_restore(flags);
175}
176EXPORT_SYMBOL(gpio_set_value);
177
178
179/*
180 * Read the state of a GPIO line.
181 */
182int gpio_get_value(unsigned int pin)
183{
184 unsigned long x;
185
186 if (pin > KS8695_GPIO_15)
187 return -EINVAL;
188
189 x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
190 return (x & (1 << pin)) != 0;
191}
192EXPORT_SYMBOL(gpio_get_value);
193
194
195/*
196 * Map GPIO line to IRQ number.
197 */
198int gpio_to_irq(unsigned int pin)
199{
200 if (pin > KS8695_GPIO_3) /* only GPIO 0..3 can generate IRQ */
201 return -EINVAL;
202
203 return gpio_irq[pin];
204}
205EXPORT_SYMBOL(gpio_to_irq);
206
207
208/*
209 * Map IRQ number to GPIO line.
210 */
211int irq_to_gpio(unsigned int irq)
212{
213 if ((irq < KS8695_IRQ_EXTERN0) || (irq > KS8695_IRQ_EXTERN3))
214 return -EINVAL;
215
216 return (irq - KS8695_IRQ_EXTERN0);
217}
218EXPORT_SYMBOL(irq_to_gpio);
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index 3705d20c4e5c..237651ebae5d 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -156,6 +156,7 @@ static void omap_mpu_set_mode(enum clock_event_mode mode,
156 break; 156 break;
157 case CLOCK_EVT_MODE_UNUSED: 157 case CLOCK_EVT_MODE_UNUSED:
158 case CLOCK_EVT_MODE_SHUTDOWN: 158 case CLOCK_EVT_MODE_SHUTDOWN:
159 case CLOCK_EVT_MODE_RESUME:
159 break; 160 break;
160 } 161 }
161} 162}
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c
index 8f7c90a0593b..34a31caa6f9d 100644
--- a/arch/arm/mach-pxa/clock.c
+++ b/arch/arm/mach-pxa/clock.c
@@ -12,7 +12,6 @@
12 12
13#include <asm/arch/pxa-regs.h> 13#include <asm/arch/pxa-regs.h>
14#include <asm/hardware.h> 14#include <asm/hardware.h>
15#include <asm/semaphore.h>
16 15
17struct clk { 16struct clk {
18 struct list_head node; 17 struct list_head node;
@@ -25,21 +24,21 @@ struct clk {
25}; 24};
26 25
27static LIST_HEAD(clocks); 26static LIST_HEAD(clocks);
28static DECLARE_MUTEX(clocks_sem); 27static DEFINE_MUTEX(clocks_mutex);
29static DEFINE_SPINLOCK(clocks_lock); 28static DEFINE_SPINLOCK(clocks_lock);
30 29
31struct clk *clk_get(struct device *dev, const char *id) 30struct clk *clk_get(struct device *dev, const char *id)
32{ 31{
33 struct clk *p, *clk = ERR_PTR(-ENOENT); 32 struct clk *p, *clk = ERR_PTR(-ENOENT);
34 33
35 down(&clocks_sem); 34 mutex_lock(&clocks_mutex);
36 list_for_each_entry(p, &clocks, node) { 35 list_for_each_entry(p, &clocks, node) {
37 if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { 36 if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
38 clk = p; 37 clk = p;
39 break; 38 break;
40 } 39 }
41 } 40 }
42 up(&clocks_sem); 41 mutex_unlock(&clocks_mutex);
43 42
44 return clk; 43 return clk;
45} 44}
@@ -101,18 +100,18 @@ static struct clk clk_gpio27 = {
101 100
102int clk_register(struct clk *clk) 101int clk_register(struct clk *clk)
103{ 102{
104 down(&clocks_sem); 103 mutex_lock(&clocks_mutex);
105 list_add(&clk->node, &clocks); 104 list_add(&clk->node, &clocks);
106 up(&clocks_sem); 105 mutex_unlock(&clocks_mutex);
107 return 0; 106 return 0;
108} 107}
109EXPORT_SYMBOL(clk_register); 108EXPORT_SYMBOL(clk_register);
110 109
111void clk_unregister(struct clk *clk) 110void clk_unregister(struct clk *clk)
112{ 111{
113 down(&clocks_sem); 112 mutex_lock(&clocks_mutex);
114 list_del(&clk->node); 113 list_del(&clk->node);
115 up(&clocks_sem); 114 mutex_unlock(&clocks_mutex);
116} 115}
117EXPORT_SYMBOL(clk_unregister); 116EXPORT_SYMBOL(clk_unregister);
118 117
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index a1a900d16665..aab27297b3c6 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -44,6 +44,7 @@
44#include <asm/hardware/scoop.h> 44#include <asm/hardware/scoop.h>
45 45
46#include "generic.h" 46#include "generic.h"
47#include "devices.h"
47#include "sharpsl.h" 48#include "sharpsl.h"
48 49
49 50
@@ -368,7 +369,7 @@ MACHINE_START(CORGI, "SHARP Corgi")
368 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 369 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
369 .fixup = fixup_corgi, 370 .fixup = fixup_corgi,
370 .map_io = pxa_map_io, 371 .map_io = pxa_map_io,
371 .init_irq = pxa_init_irq, 372 .init_irq = pxa25x_init_irq,
372 .init_machine = corgi_init, 373 .init_machine = corgi_init,
373 .timer = &pxa_timer, 374 .timer = &pxa_timer,
374MACHINE_END 375MACHINE_END
@@ -380,7 +381,7 @@ MACHINE_START(SHEPHERD, "SHARP Shepherd")
380 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 381 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
381 .fixup = fixup_corgi, 382 .fixup = fixup_corgi,
382 .map_io = pxa_map_io, 383 .map_io = pxa_map_io,
383 .init_irq = pxa_init_irq, 384 .init_irq = pxa25x_init_irq,
384 .init_machine = corgi_init, 385 .init_machine = corgi_init,
385 .timer = &pxa_timer, 386 .timer = &pxa_timer,
386MACHINE_END 387MACHINE_END
@@ -392,7 +393,7 @@ MACHINE_START(HUSKY, "SHARP Husky")
392 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 393 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
393 .fixup = fixup_corgi, 394 .fixup = fixup_corgi,
394 .map_io = pxa_map_io, 395 .map_io = pxa_map_io,
395 .init_irq = pxa_init_irq, 396 .init_irq = pxa25x_init_irq,
396 .init_machine = corgi_init, 397 .init_machine = corgi_init,
397 .timer = &pxa_timer, 398 .timer = &pxa_timer,
398MACHINE_END 399MACHINE_END
diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h
new file mode 100644
index 000000000000..9a6faff8e5a7
--- /dev/null
+++ b/arch/arm/mach-pxa/devices.h
@@ -0,0 +1,11 @@
1extern struct platform_device pxamci_device;
2extern struct platform_device pxaudc_device;
3extern struct platform_device pxafb_device;
4extern struct platform_device ffuart_device;
5extern struct platform_device btuart_device;
6extern struct platform_device stuart_device;
7extern struct platform_device hwuart_device;
8extern struct platform_device pxai2c_device;
9extern struct platform_device pxai2s_device;
10extern struct platform_device pxaficp_device;
11extern struct platform_device pxartc_device;
diff --git a/arch/arm/mach-pxa/dma.c b/arch/arm/mach-pxa/dma.c
index 4440babe7b97..93c4f31f127f 100644
--- a/arch/arm/mach-pxa/dma.c
+++ b/arch/arm/mach-pxa/dma.c
@@ -25,12 +25,15 @@
25 25
26#include <asm/arch/pxa-regs.h> 26#include <asm/arch/pxa-regs.h>
27 27
28static struct dma_channel { 28struct dma_channel {
29 char *name; 29 char *name;
30 pxa_dma_prio prio;
30 void (*irq_handler)(int, void *); 31 void (*irq_handler)(int, void *);
31 void *data; 32 void *data;
32} dma_channels[PXA_DMA_CHANNELS]; 33};
33 34
35static struct dma_channel *dma_channels;
36static int num_dma_channels;
34 37
35int pxa_request_dma (char *name, pxa_dma_prio prio, 38int pxa_request_dma (char *name, pxa_dma_prio prio,
36 void (*irq_handler)(int, void *), 39 void (*irq_handler)(int, void *),
@@ -47,8 +50,9 @@ int pxa_request_dma (char *name, pxa_dma_prio prio,
47 50
48 do { 51 do {
49 /* try grabbing a DMA channel with the requested priority */ 52 /* try grabbing a DMA channel with the requested priority */
50 pxa_for_each_dma_prio (i, prio) { 53 for (i = 0; i < num_dma_channels; i++) {
51 if (!dma_channels[i].name) { 54 if ((dma_channels[i].prio == prio) &&
55 !dma_channels[i].name) {
52 found = 1; 56 found = 1;
53 break; 57 break;
54 } 58 }
@@ -91,7 +95,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
91{ 95{
92 int i, dint = DINT; 96 int i, dint = DINT;
93 97
94 for (i = 0; i < PXA_DMA_CHANNELS; i++) { 98 for (i = 0; i < num_dma_channels; i++) {
95 if (dint & (1 << i)) { 99 if (dint & (1 << i)) {
96 struct dma_channel *channel = &dma_channels[i]; 100 struct dma_channel *channel = &dma_channels[i];
97 if (channel->name && channel->irq_handler) { 101 if (channel->name && channel->irq_handler) {
@@ -109,18 +113,32 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
109 return IRQ_HANDLED; 113 return IRQ_HANDLED;
110} 114}
111 115
112static int __init pxa_dma_init (void) 116int __init pxa_init_dma(int num_ch)
113{ 117{
114 int ret; 118 int i, ret;
115 119
116 ret = request_irq (IRQ_DMA, dma_irq_handler, 0, "DMA", NULL); 120 dma_channels = kzalloc(sizeof(struct dma_channel) * num_ch, GFP_KERNEL);
117 if (ret) 121 if (dma_channels == NULL)
122 return -ENOMEM;
123
124 ret = request_irq(IRQ_DMA, dma_irq_handler, IRQF_DISABLED, "DMA", NULL);
125 if (ret) {
118 printk (KERN_CRIT "Wow! Can't register IRQ for DMA\n"); 126 printk (KERN_CRIT "Wow! Can't register IRQ for DMA\n");
119 return ret; 127 kfree(dma_channels);
120} 128 return ret;
129 }
121 130
122arch_initcall(pxa_dma_init); 131 /* dma channel priorities on pxa2xx processors:
132 * ch 0 - 3, 16 - 19 <--> (0) DMA_PRIO_HIGH
133 * ch 4 - 7, 20 - 23 <--> (1) DMA_PRIO_MEDIUM
134 * ch 8 - 15, 24 - 31 <--> (2) DMA_PRIO_LOW
135 */
136 for (i = 0; i < num_ch; i++)
137 dma_channels[i].prio = min((i & 0xf) >> 2, DMA_PRIO_LOW);
138
139 num_dma_channels = num_ch;
140 return 0;
141}
123 142
124EXPORT_SYMBOL(pxa_request_dma); 143EXPORT_SYMBOL(pxa_request_dma);
125EXPORT_SYMBOL(pxa_free_dma); 144EXPORT_SYMBOL(pxa_free_dma);
126
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index 64b08b744f9f..296539b6359c 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -43,6 +43,7 @@
43#include <asm/arch/irda.h> 43#include <asm/arch/irda.h>
44#include <asm/arch/i2c.h> 44#include <asm/arch/i2c.h>
45 45
46#include "devices.h"
46#include "generic.h" 47#include "generic.h"
47 48
48/* 49/*
@@ -242,7 +243,7 @@ static struct resource pxamci_resources[] = {
242 243
243static u64 pxamci_dmamask = 0xffffffffUL; 244static u64 pxamci_dmamask = 0xffffffffUL;
244 245
245static struct platform_device pxamci_device = { 246struct platform_device pxamci_device = {
246 .name = "pxa2xx-mci", 247 .name = "pxa2xx-mci",
247 .id = -1, 248 .id = -1,
248 .dev = { 249 .dev = {
@@ -281,7 +282,7 @@ static struct resource pxa2xx_udc_resources[] = {
281 282
282static u64 udc_dma_mask = ~(u32)0; 283static u64 udc_dma_mask = ~(u32)0;
283 284
284static struct platform_device udc_device = { 285struct platform_device pxaudc_device = {
285 .name = "pxa2xx-udc", 286 .name = "pxa2xx-udc",
286 .id = -1, 287 .id = -1,
287 .resource = pxa2xx_udc_resources, 288 .resource = pxa2xx_udc_resources,
@@ -307,7 +308,7 @@ static struct resource pxafb_resources[] = {
307 308
308static u64 fb_dma_mask = ~(u64)0; 309static u64 fb_dma_mask = ~(u64)0;
309 310
310static struct platform_device pxafb_device = { 311struct platform_device pxafb_device = {
311 .name = "pxa2xx-fb", 312 .name = "pxa2xx-fb",
312 .id = -1, 313 .id = -1,
313 .dev = { 314 .dev = {
@@ -328,24 +329,24 @@ void __init set_pxa_fb_parent(struct device *parent_dev)
328 pxafb_device.dev.parent = parent_dev; 329 pxafb_device.dev.parent = parent_dev;
329} 330}
330 331
331static struct platform_device ffuart_device = { 332struct platform_device ffuart_device = {
332 .name = "pxa2xx-uart", 333 .name = "pxa2xx-uart",
333 .id = 0, 334 .id = 0,
334}; 335};
335static struct platform_device btuart_device = { 336struct platform_device btuart_device = {
336 .name = "pxa2xx-uart", 337 .name = "pxa2xx-uart",
337 .id = 1, 338 .id = 1,
338}; 339};
339static struct platform_device stuart_device = { 340struct platform_device stuart_device = {
340 .name = "pxa2xx-uart", 341 .name = "pxa2xx-uart",
341 .id = 2, 342 .id = 2,
342}; 343};
343static struct platform_device hwuart_device = { 344struct platform_device hwuart_device = {
344 .name = "pxa2xx-uart", 345 .name = "pxa2xx-uart",
345 .id = 3, 346 .id = 3,
346}; 347};
347 348
348static struct resource i2c_resources[] = { 349static struct resource pxai2c_resources[] = {
349 { 350 {
350 .start = 0x40301680, 351 .start = 0x40301680,
351 .end = 0x403016a3, 352 .end = 0x403016a3,
@@ -357,40 +358,19 @@ static struct resource i2c_resources[] = {
357 }, 358 },
358}; 359};
359 360
360static struct platform_device i2c_device = { 361struct platform_device pxai2c_device = {
361 .name = "pxa2xx-i2c", 362 .name = "pxa2xx-i2c",
362 .id = 0, 363 .id = 0,
363 .resource = i2c_resources, 364 .resource = pxai2c_resources,
364 .num_resources = ARRAY_SIZE(i2c_resources), 365 .num_resources = ARRAY_SIZE(pxai2c_resources),
365}; 366};
366 367
367#ifdef CONFIG_PXA27x
368static struct resource i2c_power_resources[] = {
369 {
370 .start = 0x40f00180,
371 .end = 0x40f001a3,
372 .flags = IORESOURCE_MEM,
373 }, {
374 .start = IRQ_PWRI2C,
375 .end = IRQ_PWRI2C,
376 .flags = IORESOURCE_IRQ,
377 },
378};
379
380static struct platform_device i2c_power_device = {
381 .name = "pxa2xx-i2c",
382 .id = 1,
383 .resource = i2c_power_resources,
384 .num_resources = ARRAY_SIZE(i2c_resources),
385};
386#endif
387
388void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) 368void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info)
389{ 369{
390 i2c_device.dev.platform_data = info; 370 pxai2c_device.dev.platform_data = info;
391} 371}
392 372
393static struct resource i2s_resources[] = { 373static struct resource pxai2s_resources[] = {
394 { 374 {
395 .start = 0x40400000, 375 .start = 0x40400000,
396 .end = 0x40400083, 376 .end = 0x40400083,
@@ -402,16 +382,16 @@ static struct resource i2s_resources[] = {
402 }, 382 },
403}; 383};
404 384
405static struct platform_device i2s_device = { 385struct platform_device pxai2s_device = {
406 .name = "pxa2xx-i2s", 386 .name = "pxa2xx-i2s",
407 .id = -1, 387 .id = -1,
408 .resource = i2s_resources, 388 .resource = pxai2s_resources,
409 .num_resources = ARRAY_SIZE(i2s_resources), 389 .num_resources = ARRAY_SIZE(pxai2s_resources),
410}; 390};
411 391
412static u64 pxaficp_dmamask = ~(u32)0; 392static u64 pxaficp_dmamask = ~(u32)0;
413 393
414static struct platform_device pxaficp_device = { 394struct platform_device pxaficp_device = {
415 .name = "pxa2xx-ir", 395 .name = "pxa2xx-ir",
416 .id = -1, 396 .id = -1,
417 .dev = { 397 .dev = {
@@ -425,42 +405,7 @@ void __init pxa_set_ficp_info(struct pxaficp_platform_data *info)
425 pxaficp_device.dev.platform_data = info; 405 pxaficp_device.dev.platform_data = info;
426} 406}
427 407
428static struct platform_device pxartc_device = { 408struct platform_device pxartc_device = {
429 .name = "sa1100-rtc", 409 .name = "sa1100-rtc",
430 .id = -1, 410 .id = -1,
431}; 411};
432
433static struct platform_device *devices[] __initdata = {
434 &pxamci_device,
435 &udc_device,
436 &pxafb_device,
437 &ffuart_device,
438 &btuart_device,
439 &stuart_device,
440 &pxaficp_device,
441 &i2c_device,
442#ifdef CONFIG_PXA27x
443 &i2c_power_device,
444#endif
445 &i2s_device,
446 &pxartc_device,
447};
448
449static int __init pxa_init(void)
450{
451 int cpuid, ret;
452
453 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
454 if (ret)
455 return ret;
456
457 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
458 cpuid = read_cpuid(CPUID_ID);
459 if (((cpuid >> 4) & 0xfff) == 0x2d0 ||
460 ((cpuid >> 4) & 0xfff) == 0x290)
461 ret = platform_device_register(&hwuart_device);
462
463 return ret;
464}
465
466subsys_initcall(pxa_init);
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
index e54a8dd63c17..91ab2ad8b34b 100644
--- a/arch/arm/mach-pxa/generic.h
+++ b/arch/arm/mach-pxa/generic.h
@@ -12,8 +12,12 @@
12struct sys_timer; 12struct sys_timer;
13 13
14extern struct sys_timer pxa_timer; 14extern struct sys_timer pxa_timer;
15extern void __init pxa_init_irq_low(void);
16extern void __init pxa_init_irq_high(void);
17extern void __init pxa_init_irq_gpio(int gpio_nr);
18extern void __init pxa25x_init_irq(void);
19extern void __init pxa27x_init_irq(void);
15extern void __init pxa_map_io(void); 20extern void __init pxa_map_io(void);
16extern void __init pxa_init_irq(void);
17 21
18extern unsigned int get_clk_frequency_khz(int info); 22extern unsigned int get_clk_frequency_khz(int info);
19 23
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index 64df44043a65..465108da2851 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -38,6 +38,7 @@
38#include <asm/arch/mmc.h> 38#include <asm/arch/mmc.h>
39 39
40#include "generic.h" 40#include "generic.h"
41#include "devices.h"
41 42
42/* TODO: 43/* TODO:
43 * - add pxa2xx_audio_ops_t device structure 44 * - add pxa2xx_audio_ops_t device structure
@@ -152,7 +153,7 @@ static void __init idp_init(void)
152static void __init idp_init_irq(void) 153static void __init idp_init_irq(void)
153{ 154{
154 155
155 pxa_init_irq(); 156 pxa25x_init_irq();
156 157
157 set_irq_type(TOUCH_PANEL_IRQ, TOUCH_PANEL_IRQ_EDGE); 158 set_irq_type(TOUCH_PANEL_IRQ, TOUCH_PANEL_IRQ_EDGE);
158} 159}
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 4619d5fe606c..4b867b0789d5 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -30,12 +30,12 @@
30 30
31static void pxa_mask_low_irq(unsigned int irq) 31static void pxa_mask_low_irq(unsigned int irq)
32{ 32{
33 ICMR &= ~(1 << (irq + PXA_IRQ_SKIP)); 33 ICMR &= ~(1 << irq);
34} 34}
35 35
36static void pxa_unmask_low_irq(unsigned int irq) 36static void pxa_unmask_low_irq(unsigned int irq)
37{ 37{
38 ICMR |= (1 << (irq + PXA_IRQ_SKIP)); 38 ICMR |= (1 << irq);
39} 39}
40 40
41static int pxa_set_wake(unsigned int irq, unsigned int on) 41static int pxa_set_wake(unsigned int irq, unsigned int on)
@@ -67,7 +67,27 @@ static struct irq_chip pxa_internal_chip_low = {
67 .set_wake = pxa_set_wake, 67 .set_wake = pxa_set_wake,
68}; 68};
69 69
70#if PXA_INTERNAL_IRQS > 32 70void __init pxa_init_irq_low(void)
71{
72 int irq;
73
74 /* disable all IRQs */
75 ICMR = 0;
76
77 /* all IRQs are IRQ, not FIQ */
78 ICLR = 0;
79
80 /* only unmasked interrupts kick us out of idle */
81 ICCR = 1;
82
83 for (irq = PXA_IRQ(0); irq <= PXA_IRQ(31); irq++) {
84 set_irq_chip(irq, &pxa_internal_chip_low);
85 set_irq_handler(irq, handle_level_irq);
86 set_irq_flags(irq, IRQF_VALID);
87 }
88}
89
90#ifdef CONFIG_PXA27x
71 91
72/* 92/*
73 * This is for the second set of internal IRQs as found on the PXA27x. 93 * This is for the second set of internal IRQs as found on the PXA27x.
@@ -75,12 +95,12 @@ static struct irq_chip pxa_internal_chip_low = {
75 95
76static void pxa_mask_high_irq(unsigned int irq) 96static void pxa_mask_high_irq(unsigned int irq)
77{ 97{
78 ICMR2 &= ~(1 << (irq - 32 + PXA_IRQ_SKIP)); 98 ICMR2 &= ~(1 << (irq - 32));
79} 99}
80 100
81static void pxa_unmask_high_irq(unsigned int irq) 101static void pxa_unmask_high_irq(unsigned int irq)
82{ 102{
83 ICMR2 |= (1 << (irq - 32 + PXA_IRQ_SKIP)); 103 ICMR2 |= (1 << (irq - 32));
84} 104}
85 105
86static struct irq_chip pxa_internal_chip_high = { 106static struct irq_chip pxa_internal_chip_high = {
@@ -90,6 +110,19 @@ static struct irq_chip pxa_internal_chip_high = {
90 .unmask = pxa_unmask_high_irq, 110 .unmask = pxa_unmask_high_irq,
91}; 111};
92 112
113void __init pxa_init_irq_high(void)
114{
115 int irq;
116
117 ICMR2 = 0;
118 ICLR2 = 0;
119
120 for (irq = PXA_IRQ(32); irq < PXA_IRQ(64); irq++) {
121 set_irq_chip(irq, &pxa_internal_chip_high);
122 set_irq_handler(irq, handle_level_irq);
123 set_irq_flags(irq, IRQF_VALID);
124 }
125}
93#endif 126#endif
94 127
95/* Note that if an input/irq line ever gets changed to an output during 128/* Note that if an input/irq line ever gets changed to an output during
@@ -217,7 +250,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
217 do { 250 do {
218 loop = 0; 251 loop = 0;
219 252
220 mask = GEDR0 & ~3; 253 mask = GEDR0 & GPIO_IRQ_mask[0] & ~3;
221 if (mask) { 254 if (mask) {
222 GEDR0 = mask; 255 GEDR0 = mask;
223 irq = IRQ_GPIO(2); 256 irq = IRQ_GPIO(2);
@@ -233,7 +266,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
233 loop = 1; 266 loop = 1;
234 } 267 }
235 268
236 mask = GEDR1; 269 mask = GEDR1 & GPIO_IRQ_mask[1];
237 if (mask) { 270 if (mask) {
238 GEDR1 = mask; 271 GEDR1 = mask;
239 irq = IRQ_GPIO(32); 272 irq = IRQ_GPIO(32);
@@ -248,7 +281,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
248 loop = 1; 281 loop = 1;
249 } 282 }
250 283
251 mask = GEDR2; 284 mask = GEDR2 & GPIO_IRQ_mask[2];
252 if (mask) { 285 if (mask) {
253 GEDR2 = mask; 286 GEDR2 = mask;
254 irq = IRQ_GPIO(64); 287 irq = IRQ_GPIO(64);
@@ -263,8 +296,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
263 loop = 1; 296 loop = 1;
264 } 297 }
265 298
266#if PXA_LAST_GPIO >= 96 299 mask = GEDR3 & GPIO_IRQ_mask[3];
267 mask = GEDR3;
268 if (mask) { 300 if (mask) {
269 GEDR3 = mask; 301 GEDR3 = mask;
270 irq = IRQ_GPIO(96); 302 irq = IRQ_GPIO(96);
@@ -278,7 +310,6 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
278 } while (mask); 310 } while (mask);
279 loop = 1; 311 loop = 1;
280 } 312 }
281#endif
282 } while (loop); 313 } while (loop);
283} 314}
284 315
@@ -314,64 +345,27 @@ static struct irq_chip pxa_muxed_gpio_chip = {
314 .set_wake = pxa_set_gpio_wake, 345 .set_wake = pxa_set_gpio_wake,
315}; 346};
316 347
317 348void __init pxa_init_irq_gpio(int gpio_nr)
318void __init pxa_init_irq(void)
319{ 349{
320 int irq; 350 int irq, i;
321
322 /* disable all IRQs */
323 ICMR = 0;
324
325 /* all IRQs are IRQ, not FIQ */
326 ICLR = 0;
327 351
328 /* clear all GPIO edge detects */ 352 /* clear all GPIO edge detects */
329 GFER0 = 0; 353 for (i = 0; i < gpio_nr; i += 32) {
330 GFER1 = 0; 354 GFER(i) = 0;
331 GFER2 = 0; 355 GRER(i) = 0;
332 GRER0 = 0; 356 GEDR(i) = GEDR(i);
333 GRER1 = 0; 357 }
334 GRER2 = 0;
335 GEDR0 = GEDR0;
336 GEDR1 = GEDR1;
337 GEDR2 = GEDR2;
338
339#ifdef CONFIG_PXA27x
340 /* And similarly for the extra regs on the PXA27x */
341 ICMR2 = 0;
342 ICLR2 = 0;
343 GFER3 = 0;
344 GRER3 = 0;
345 GEDR3 = GEDR3;
346#endif
347
348 /* only unmasked interrupts kick us out of idle */
349 ICCR = 1;
350 358
351 /* GPIO 0 and 1 must have their mask bit always set */ 359 /* GPIO 0 and 1 must have their mask bit always set */
352 GPIO_IRQ_mask[0] = 3; 360 GPIO_IRQ_mask[0] = 3;
353 361
354 for (irq = PXA_IRQ(PXA_IRQ_SKIP); irq <= PXA_IRQ(31); irq++) {
355 set_irq_chip(irq, &pxa_internal_chip_low);
356 set_irq_handler(irq, handle_level_irq);
357 set_irq_flags(irq, IRQF_VALID);
358 }
359
360#if PXA_INTERNAL_IRQS > 32
361 for (irq = PXA_IRQ(32); irq < PXA_IRQ(PXA_INTERNAL_IRQS); irq++) {
362 set_irq_chip(irq, &pxa_internal_chip_high);
363 set_irq_handler(irq, handle_level_irq);
364 set_irq_flags(irq, IRQF_VALID);
365 }
366#endif
367
368 for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) { 362 for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) {
369 set_irq_chip(irq, &pxa_low_gpio_chip); 363 set_irq_chip(irq, &pxa_low_gpio_chip);
370 set_irq_handler(irq, handle_edge_irq); 364 set_irq_handler(irq, handle_edge_irq);
371 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 365 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
372 } 366 }
373 367
374 for (irq = IRQ_GPIO(2); irq <= IRQ_GPIO(PXA_LAST_GPIO); irq++) { 368 for (irq = IRQ_GPIO(2); irq <= IRQ_GPIO(gpio_nr); irq++) {
375 set_irq_chip(irq, &pxa_muxed_gpio_chip); 369 set_irq_chip(irq, &pxa_muxed_gpio_chip);
376 set_irq_handler(irq, handle_edge_irq); 370 set_irq_handler(irq, handle_edge_irq);
377 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 371 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index e3097664ffe1..26116440a7c9 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -46,6 +46,7 @@
46#include <asm/arch/ohci.h> 46#include <asm/arch/ohci.h>
47 47
48#include "generic.h" 48#include "generic.h"
49#include "devices.h"
49 50
50 51
51static unsigned int lpd270_irq_enabled; 52static unsigned int lpd270_irq_enabled;
@@ -97,7 +98,7 @@ static void __init lpd270_init_irq(void)
97{ 98{
98 int irq; 99 int irq;
99 100
100 pxa_init_irq(); 101 pxa27x_init_irq();
101 102
102 __raw_writew(0, LPD270_INT_MASK); 103 __raw_writew(0, LPD270_INT_MASK);
103 __raw_writew(0, LPD270_INT_STATUS); 104 __raw_writew(0, LPD270_INT_STATUS);
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index 6377b2e29ff0..e70048fd00a5 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -48,6 +48,7 @@
48#include <asm/arch/mmc.h> 48#include <asm/arch/mmc.h>
49 49
50#include "generic.h" 50#include "generic.h"
51#include "devices.h"
51 52
52 53
53#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080) 54#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080)
@@ -103,7 +104,7 @@ static void __init lubbock_init_irq(void)
103{ 104{
104 int irq; 105 int irq;
105 106
106 pxa_init_irq(); 107 pxa25x_init_irq();
107 108
108 /* setup extra lubbock irqs */ 109 /* setup extra lubbock irqs */
109 for (irq = LUBBOCK_IRQ(0); irq <= LUBBOCK_LAST_IRQ; irq++) { 110 for (irq = LUBBOCK_IRQ(0); irq <= LUBBOCK_LAST_IRQ; irq++) {
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index ed99a81b98f3..b02c79c7e6a3 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -46,6 +46,7 @@
46#include <asm/arch/ohci.h> 46#include <asm/arch/ohci.h>
47 47
48#include "generic.h" 48#include "generic.h"
49#include "devices.h"
49 50
50 51
51static unsigned long mainstone_irq_enabled; 52static unsigned long mainstone_irq_enabled;
@@ -89,7 +90,7 @@ static void __init mainstone_init_irq(void)
89{ 90{
90 int irq; 91 int irq;
91 92
92 pxa_init_irq(); 93 pxa27x_init_irq();
93 94
94 /* setup extra Mainstone irqs */ 95 /* setup extra Mainstone irqs */
95 for(irq = MAINSTONE_IRQ(0); irq <= MAINSTONE_IRQ(15); irq++) { 96 for(irq = MAINSTONE_IRQ(0); irq <= MAINSTONE_IRQ(15); irq++) {
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
index 6bf15ae73848..e66dbc26add1 100644
--- a/arch/arm/mach-pxa/pm.c
+++ b/arch/arm/mach-pxa/pm.c
@@ -77,7 +77,6 @@ int pxa_pm_enter(suspend_state_t state)
77{ 77{
78 unsigned long sleep_save[SLEEP_SAVE_SIZE]; 78 unsigned long sleep_save[SLEEP_SAVE_SIZE];
79 unsigned long checksum = 0; 79 unsigned long checksum = 0;
80 struct timespec delta, rtc;
81 int i; 80 int i;
82 extern void pxa_cpu_pm_enter(suspend_state_t state); 81 extern void pxa_cpu_pm_enter(suspend_state_t state);
83 82
@@ -87,11 +86,6 @@ int pxa_pm_enter(suspend_state_t state)
87 iwmmxt_task_disable(NULL); 86 iwmmxt_task_disable(NULL);
88#endif 87#endif
89 88
90 /* preserve current time */
91 rtc.tv_sec = RCNR;
92 rtc.tv_nsec = 0;
93 save_time_delta(&delta, &rtc);
94
95 SAVE(GPLR0); SAVE(GPLR1); SAVE(GPLR2); 89 SAVE(GPLR0); SAVE(GPLR1); SAVE(GPLR2);
96 SAVE(GPDR0); SAVE(GPDR1); SAVE(GPDR2); 90 SAVE(GPDR0); SAVE(GPDR1); SAVE(GPDR2);
97 SAVE(GRER0); SAVE(GRER1); SAVE(GRER2); 91 SAVE(GRER0); SAVE(GRER1); SAVE(GRER2);
@@ -183,10 +177,6 @@ int pxa_pm_enter(suspend_state_t state)
183 177
184 RESTORE(PSTR); 178 RESTORE(PSTR);
185 179
186 /* restore current time */
187 rtc.tv_sec = RCNR;
188 restore_time_delta(&delta, &rtc);
189
190#ifdef DEBUG 180#ifdef DEBUG
191 printk(KERN_DEBUG "*** made it back from resume\n"); 181 printk(KERN_DEBUG "*** made it back from resume\n");
192#endif 182#endif
@@ -200,40 +190,3 @@ unsigned long sleep_phys_sp(void *sp)
200{ 190{
201 return virt_to_phys(sp); 191 return virt_to_phys(sp);
202} 192}
203
204/*
205 * Called after processes are frozen, but before we shut down devices.
206 */
207int pxa_pm_prepare(suspend_state_t state)
208{
209 extern int pxa_cpu_pm_prepare(suspend_state_t state);
210
211 return pxa_cpu_pm_prepare(state);
212}
213
214EXPORT_SYMBOL_GPL(pxa_pm_prepare);
215
216/*
217 * Called after devices are re-setup, but before processes are thawed.
218 */
219int pxa_pm_finish(suspend_state_t state)
220{
221 return 0;
222}
223
224EXPORT_SYMBOL_GPL(pxa_pm_finish);
225
226static struct pm_ops pxa_pm_ops = {
227 .prepare = pxa_pm_prepare,
228 .enter = pxa_pm_enter,
229 .finish = pxa_pm_finish,
230 .valid = pm_valid_only_mem,
231};
232
233static int __init pxa_pm_init(void)
234{
235 pm_set_ops(&pxa_pm_ops);
236 return 0;
237}
238
239device_initcall(pxa_pm_init);
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 34fb80b37023..655668d4d0e9 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -45,6 +45,7 @@
45#include <asm/mach/sharpsl_param.h> 45#include <asm/mach/sharpsl_param.h>
46 46
47#include "generic.h" 47#include "generic.h"
48#include "devices.h"
48#include "sharpsl.h" 49#include "sharpsl.h"
49 50
50static struct resource poodle_scoop_resources[] = { 51static struct resource poodle_scoop_resources[] = {
@@ -412,7 +413,7 @@ MACHINE_START(POODLE, "SHARP Poodle")
412 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 413 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
413 .fixup = fixup_poodle, 414 .fixup = fixup_poodle,
414 .map_io = pxa_map_io, 415 .map_io = pxa_map_io,
415 .init_irq = pxa_init_irq, 416 .init_irq = pxa25x_init_irq,
416 .timer = &pxa_timer, 417 .timer = &pxa_timer,
417 .init_machine = poodle_init, 418 .init_machine = poodle_init,
418MACHINE_END 419MACHINE_END
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index c1f21739bf71..f36ca448338e 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -19,12 +19,17 @@
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/kernel.h> 20#include <linux/kernel.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/platform_device.h>
22#include <linux/pm.h> 23#include <linux/pm.h>
23 24
24#include <asm/hardware.h> 25#include <asm/hardware.h>
26#include <asm/arch/irqs.h>
25#include <asm/arch/pxa-regs.h> 27#include <asm/arch/pxa-regs.h>
28#include <asm/arch/pm.h>
29#include <asm/arch/dma.h>
26 30
27#include "generic.h" 31#include "generic.h"
32#include "devices.h"
28 33
29/* 34/*
30 * Various clock factors driven by the CCCR register. 35 * Various clock factors driven by the CCCR register.
@@ -105,18 +110,6 @@ EXPORT_SYMBOL(get_lcdclk_frequency_10khz);
105 110
106#ifdef CONFIG_PM 111#ifdef CONFIG_PM
107 112
108int pxa_cpu_pm_prepare(suspend_state_t state)
109{
110 switch (state) {
111 case PM_SUSPEND_MEM:
112 break;
113 default:
114 return -EINVAL;
115 }
116
117 return 0;
118}
119
120void pxa_cpu_pm_enter(suspend_state_t state) 113void pxa_cpu_pm_enter(suspend_state_t state)
121{ 114{
122 extern void pxa_cpu_suspend(unsigned int); 115 extern void pxa_cpu_suspend(unsigned int);
@@ -133,4 +126,49 @@ void pxa_cpu_pm_enter(suspend_state_t state)
133 } 126 }
134} 127}
135 128
129static struct pm_ops pxa25x_pm_ops = {
130 .enter = pxa_pm_enter,
131 .valid = pm_valid_only_mem,
132};
133#endif
134
135void __init pxa25x_init_irq(void)
136{
137 pxa_init_irq_low();
138 pxa_init_irq_gpio(85);
139}
140
141static struct platform_device *pxa25x_devices[] __initdata = {
142 &pxamci_device,
143 &pxaudc_device,
144 &pxafb_device,
145 &ffuart_device,
146 &btuart_device,
147 &stuart_device,
148 &pxai2c_device,
149 &pxai2s_device,
150 &pxaficp_device,
151 &pxartc_device,
152};
153
154static int __init pxa25x_init(void)
155{
156 int ret = 0;
157
158 if (cpu_is_pxa21x() || cpu_is_pxa25x()) {
159 if ((ret = pxa_init_dma(16)))
160 return ret;
161#ifdef CONFIG_PM
162 pm_set_ops(&pxa25x_pm_ops);
136#endif 163#endif
164 ret = platform_add_devices(pxa25x_devices,
165 ARRAY_SIZE(pxa25x_devices));
166 }
167 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
168 if (cpu_is_pxa25x())
169 ret = platform_device_register(&hwuart_device);
170
171 return ret;
172}
173
174subsys_initcall(pxa25x_init);
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index c64bab49efc4..aa5bb02c897b 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -19,10 +19,14 @@
19 19
20#include <asm/hardware.h> 20#include <asm/hardware.h>
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/arch/irqs.h>
22#include <asm/arch/pxa-regs.h> 23#include <asm/arch/pxa-regs.h>
23#include <asm/arch/ohci.h> 24#include <asm/arch/ohci.h>
25#include <asm/arch/pm.h>
26#include <asm/arch/dma.h>
24 27
25#include "generic.h" 28#include "generic.h"
29#include "devices.h"
26 30
27/* Crystal clock: 13MHz */ 31/* Crystal clock: 13MHz */
28#define BASE_CLK 13000000 32#define BASE_CLK 13000000
@@ -122,17 +126,6 @@ EXPORT_SYMBOL(get_lcdclk_frequency_10khz);
122 126
123#ifdef CONFIG_PM 127#ifdef CONFIG_PM
124 128
125int pxa_cpu_pm_prepare(suspend_state_t state)
126{
127 switch (state) {
128 case PM_SUSPEND_MEM:
129 case PM_SUSPEND_STANDBY:
130 return 0;
131 default:
132 return -EINVAL;
133 }
134}
135
136void pxa_cpu_pm_enter(suspend_state_t state) 129void pxa_cpu_pm_enter(suspend_state_t state)
137{ 130{
138 extern void pxa_cpu_standby(void); 131 extern void pxa_cpu_standby(void);
@@ -140,9 +133,9 @@ void pxa_cpu_pm_enter(suspend_state_t state)
140 extern void pxa_cpu_resume(void); 133 extern void pxa_cpu_resume(void);
141 134
142 if (state == PM_SUSPEND_STANDBY) 135 if (state == PM_SUSPEND_STANDBY)
143 CKEN = CKEN_MEMC | CKEN_OSTIMER | CKEN_LCD | CKEN_PWM0; 136 CKEN = (1 << CKEN_MEMC) | (1 << CKEN_OSTIMER) | (1 << CKEN_LCD) | (1 << CKEN_PWM0);
144 else 137 else
145 CKEN = CKEN_MEMC | CKEN_OSTIMER; 138 CKEN = (1 << CKEN_MEMC) | (1 << CKEN_OSTIMER);
146 139
147 /* ensure voltage-change sequencer not initiated, which hangs */ 140 /* ensure voltage-change sequencer not initiated, which hangs */
148 PCFR &= ~PCFR_FVC; 141 PCFR &= ~PCFR_FVC;
@@ -162,6 +155,15 @@ void pxa_cpu_pm_enter(suspend_state_t state)
162 } 155 }
163} 156}
164 157
158static int pxa27x_pm_valid(suspend_state_t state)
159{
160 return state == PM_SUSPEND_MEM || state == PM_SUSPEND_STANDBY;
161}
162
163static struct pm_ops pxa27x_pm_ops = {
164 .enter = pxa_pm_enter,
165 .valid = pxa27x_pm_valid,
166};
165#endif 167#endif
166 168
167/* 169/*
@@ -183,7 +185,7 @@ static struct resource pxa27x_ohci_resources[] = {
183 }, 185 },
184}; 186};
185 187
186static struct platform_device ohci_device = { 188static struct platform_device pxaohci_device = {
187 .name = "pxa27x-ohci", 189 .name = "pxa27x-ohci",
188 .id = -1, 190 .id = -1,
189 .dev = { 191 .dev = {
@@ -196,16 +198,62 @@ static struct platform_device ohci_device = {
196 198
197void __init pxa_set_ohci_info(struct pxaohci_platform_data *info) 199void __init pxa_set_ohci_info(struct pxaohci_platform_data *info)
198{ 200{
199 ohci_device.dev.platform_data = info; 201 pxaohci_device.dev.platform_data = info;
200} 202}
201 203
204static struct resource i2c_power_resources[] = {
205 {
206 .start = 0x40f00180,
207 .end = 0x40f001a3,
208 .flags = IORESOURCE_MEM,
209 }, {
210 .start = IRQ_PWRI2C,
211 .end = IRQ_PWRI2C,
212 .flags = IORESOURCE_IRQ,
213 },
214};
215
216static struct platform_device pxai2c_power_device = {
217 .name = "pxa2xx-i2c",
218 .id = 1,
219 .resource = i2c_power_resources,
220 .num_resources = ARRAY_SIZE(i2c_power_resources),
221};
222
202static struct platform_device *devices[] __initdata = { 223static struct platform_device *devices[] __initdata = {
203 &ohci_device, 224 &pxamci_device,
225 &pxaudc_device,
226 &pxafb_device,
227 &ffuart_device,
228 &btuart_device,
229 &stuart_device,
230 &pxai2c_device,
231 &pxai2c_power_device,
232 &pxai2s_device,
233 &pxaficp_device,
234 &pxartc_device,
235 &pxaohci_device,
204}; 236};
205 237
238void __init pxa27x_init_irq(void)
239{
240 pxa_init_irq_low();
241 pxa_init_irq_high();
242 pxa_init_irq_gpio(128);
243}
244
206static int __init pxa27x_init(void) 245static int __init pxa27x_init(void)
207{ 246{
208 return platform_add_devices(devices, ARRAY_SIZE(devices)); 247 int ret = 0;
248 if (cpu_is_pxa27x()) {
249 if ((ret = pxa_init_dma(32)))
250 return ret;
251#ifdef CONFIG_PM
252 pm_set_ops(&pxa27x_pm_ops);
253#endif
254 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
255 }
256 return ret;
209} 257}
210 258
211subsys_initcall(pxa27x_init); 259subsys_initcall(pxa27x_init);
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 3cbac63bed3c..bae47e145de8 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -48,6 +48,7 @@
48#include <asm/hardware/scoop.h> 48#include <asm/hardware/scoop.h>
49 49
50#include "generic.h" 50#include "generic.h"
51#include "devices.h"
51#include "sharpsl.h" 52#include "sharpsl.h"
52 53
53/* 54/*
@@ -560,7 +561,7 @@ MACHINE_START(SPITZ, "SHARP Spitz")
560 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 561 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
561 .fixup = fixup_spitz, 562 .fixup = fixup_spitz,
562 .map_io = pxa_map_io, 563 .map_io = pxa_map_io,
563 .init_irq = pxa_init_irq, 564 .init_irq = pxa27x_init_irq,
564 .init_machine = spitz_init, 565 .init_machine = spitz_init,
565 .timer = &pxa_timer, 566 .timer = &pxa_timer,
566MACHINE_END 567MACHINE_END
@@ -572,7 +573,7 @@ MACHINE_START(BORZOI, "SHARP Borzoi")
572 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 573 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
573 .fixup = fixup_spitz, 574 .fixup = fixup_spitz,
574 .map_io = pxa_map_io, 575 .map_io = pxa_map_io,
575 .init_irq = pxa_init_irq, 576 .init_irq = pxa27x_init_irq,
576 .init_machine = spitz_init, 577 .init_machine = spitz_init,
577 .timer = &pxa_timer, 578 .timer = &pxa_timer,
578MACHINE_END 579MACHINE_END
@@ -584,7 +585,7 @@ MACHINE_START(AKITA, "SHARP Akita")
584 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 585 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
585 .fixup = fixup_spitz, 586 .fixup = fixup_spitz,
586 .map_io = pxa_map_io, 587 .map_io = pxa_map_io,
587 .init_irq = pxa_init_irq, 588 .init_irq = pxa27x_init_irq,
588 .init_machine = akita_init, 589 .init_machine = akita_init,
589 .timer = &pxa_timer, 590 .timer = &pxa_timer,
590MACHINE_END 591MACHINE_END
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index 5248abe334d2..6f91fd2d061a 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -30,11 +30,6 @@
30#include <asm/arch/pxa-regs.h> 30#include <asm/arch/pxa-regs.h>
31 31
32 32
33static inline unsigned long pxa_get_rtc_time(void)
34{
35 return RCNR;
36}
37
38static int pxa_set_rtc(void) 33static int pxa_set_rtc(void)
39{ 34{
40 unsigned long current_time = xtime.tv_sec; 35 unsigned long current_time = xtime.tv_sec;
@@ -122,10 +117,6 @@ static void __init pxa_timer_init(void)
122 117
123 set_rtc = pxa_set_rtc; 118 set_rtc = pxa_set_rtc;
124 119
125 tv.tv_nsec = 0;
126 tv.tv_sec = pxa_get_rtc_time();
127 do_settimeofday(&tv);
128
129 OIER = 0; /* disable any timer interrupts */ 120 OIER = 0; /* disable any timer interrupts */
130 OSSR = 0xf; /* clear status on all timers */ 121 OSSR = 0xf; /* clear status on all timers */
131 setup_irq(IRQ_OST0, &pxa_timer_irq); 122 setup_irq(IRQ_OST0, &pxa_timer_irq);
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 72738771fb57..240fd042083d 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -42,7 +42,7 @@
42#include <asm/mach/sharpsl_param.h> 42#include <asm/mach/sharpsl_param.h>
43 43
44#include "generic.h" 44#include "generic.h"
45 45#include "devices.h"
46 46
47/* 47/*
48 * SCOOP Device 48 * SCOOP Device
@@ -332,7 +332,7 @@ MACHINE_START(TOSA, "SHARP Tosa")
332 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 332 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
333 .fixup = fixup_tosa, 333 .fixup = fixup_tosa,
334 .map_io = pxa_map_io, 334 .map_io = pxa_map_io,
335 .init_irq = pxa_init_irq, 335 .init_irq = pxa25x_init_irq,
336 .init_machine = tosa_init, 336 .init_machine = tosa_init,
337 .timer = &pxa_timer, 337 .timer = &pxa_timer,
338MACHINE_END 338MACHINE_END
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 28c79bd0a3a0..e4ba43bdf85d 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -49,6 +49,7 @@
49#include <asm/arch/ohci.h> 49#include <asm/arch/ohci.h>
50 50
51#include "generic.h" 51#include "generic.h"
52#include "devices.h"
52 53
53/******************************************************************************************** 54/********************************************************************************************
54 * ONBOARD FLASH 55 * ONBOARD FLASH
@@ -503,7 +504,7 @@ MACHINE_START(TRIZEPS4, "Keith und Koep Trizeps IV module")
503 .boot_params = TRIZEPS4_SDRAM_BASE + 0x100, 504 .boot_params = TRIZEPS4_SDRAM_BASE + 0x100,
504 .init_machine = trizeps4_init, 505 .init_machine = trizeps4_init,
505 .map_io = trizeps4_map_io, 506 .map_io = trizeps4_map_io,
506 .init_irq = pxa_init_irq, 507 .init_irq = pxa27x_init_irq,
507 .timer = &pxa_timer, 508 .timer = &pxa_timer,
508MACHINE_END 509MACHINE_END
509 510
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index f01de807b72f..8b52ea95d4f6 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -20,6 +20,8 @@
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/dm9000.h> 21#include <linux/dm9000.h>
22 22
23#include <net/ax88796.h>
24
23#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
24#include <asm/mach/map.h> 26#include <asm/mach/map.h>
25#include <asm/mach/irq.h> 27#include <asm/mach/irq.h>
@@ -409,6 +411,61 @@ static struct s3c2410_platform_i2c bast_i2c_info = {
409 .max_freq = 130*1000, 411 .max_freq = 130*1000,
410}; 412};
411 413
414/* Asix AX88796 10/100 ethernet controller */
415
416static struct ax_plat_data bast_asix_platdata = {
417 .flags = AXFLG_MAC_FROMDEV,
418 .wordlength = 2,
419 .dcr_val = 0x48,
420 .rcr_val = 0x40,
421};
422
423static struct resource bast_asix_resource[] = {
424 [0] = {
425 .start = S3C2410_CS5 + BAST_PA_ASIXNET,
426 .end = S3C2410_CS5 + BAST_PA_ASIXNET + (0x18 * 0x20) - 1,
427 .flags = IORESOURCE_MEM,
428 },
429 [1] = {
430 .start = S3C2410_CS5 + BAST_PA_ASIXNET + (0x1f * 0x20),
431 .end = S3C2410_CS5 + BAST_PA_ASIXNET + (0x1f * 0x20),
432 .flags = IORESOURCE_MEM,
433 },
434 [2] = {
435 .start = IRQ_ASIX,
436 .end = IRQ_ASIX,
437 .flags = IORESOURCE_IRQ
438 }
439};
440
441static struct platform_device bast_device_asix = {
442 .name = "ax88796",
443 .id = 0,
444 .num_resources = ARRAY_SIZE(bast_asix_resource),
445 .resource = bast_asix_resource,
446 .dev = {
447 .platform_data = &bast_asix_platdata
448 }
449};
450
451/* Asix AX88796 10/100 ethernet controller parallel port */
452
453static struct resource bast_asixpp_resource[] = {
454 [0] = {
455 .start = S3C2410_CS5 + BAST_PA_ASIXNET + (0x18 * 0x20),
456 .end = S3C2410_CS5 + BAST_PA_ASIXNET + (0x1b * 0x20) - 1,
457 .flags = IORESOURCE_MEM,
458 }
459};
460
461static struct platform_device bast_device_axpp = {
462 .name = "ax88796-pp",
463 .id = 0,
464 .num_resources = ARRAY_SIZE(bast_asixpp_resource),
465 .resource = bast_asixpp_resource,
466};
467
468/* LCD/VGA controller */
412 469
413static struct s3c2410fb_mach_info __initdata bast_lcd_info = { 470static struct s3c2410fb_mach_info __initdata bast_lcd_info = {
414 .width = 640, 471 .width = 640,
@@ -453,6 +510,8 @@ static struct platform_device *bast_devices[] __initdata = {
453 &s3c_device_nand, 510 &s3c_device_nand,
454 &bast_device_nor, 511 &bast_device_nor,
455 &bast_device_dm9k, 512 &bast_device_dm9k,
513 &bast_device_asix,
514 &bast_device_axpp,
456 &bast_sio, 515 &bast_sio,
457}; 516};
458 517
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c
index b5d387ef37e1..29c163d300d4 100644
--- a/arch/arm/mach-s3c2440/mach-anubis.c
+++ b/arch/arm/mach-s3c2440/mach-anubis.c
@@ -18,6 +18,9 @@
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20 20
21#include <linux/sm501.h>
22#include <linux/sm501-regs.h>
23
21#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
22#include <asm/mach/map.h> 25#include <asm/mach/map.h>
23#include <asm/mach/irq.h> 26#include <asm/mach/irq.h>
@@ -42,6 +45,8 @@
42#include <linux/mtd/nand_ecc.h> 45#include <linux/mtd/nand_ecc.h>
43#include <linux/mtd/partitions.h> 46#include <linux/mtd/partitions.h>
44 47
48#include <net/ax88796.h>
49
45#include <asm/plat-s3c24xx/clock.h> 50#include <asm/plat-s3c24xx/clock.h>
46#include <asm/plat-s3c24xx/devs.h> 51#include <asm/plat-s3c24xx/devs.h>
47#include <asm/plat-s3c24xx/cpu.h> 52#include <asm/plat-s3c24xx/cpu.h>
@@ -76,8 +81,8 @@ static struct map_desc anubis_iodesc[] __initdata = {
76 .length = SZ_4K, 81 .length = SZ_4K,
77 .type = MT_DEVICE, 82 .type = MT_DEVICE,
78 }, { 83 }, {
79 .virtual = (u32)ANUBIS_VA_CTRL2, 84 .virtual = (u32)ANUBIS_VA_IDREG,
80 .pfn = __phys_to_pfn(ANUBIS_PA_CTRL2), 85 .pfn = __phys_to_pfn(ANUBIS_PA_IDREG),
81 .length = SZ_4K, 86 .length = SZ_4K,
82 .type = MT_DEVICE, 87 .type = MT_DEVICE,
83 }, 88 },
@@ -153,6 +158,29 @@ static struct mtd_partition anubis_default_nand_part[] = {
153 } 158 }
154}; 159};
155 160
161static struct mtd_partition anubis_default_nand_part_large[] = {
162 [0] = {
163 .name = "Boot Agent",
164 .size = SZ_128K,
165 .offset = 0,
166 },
167 [1] = {
168 .name = "/boot",
169 .size = SZ_4M - SZ_128K,
170 .offset = SZ_128K,
171 },
172 [2] = {
173 .name = "user1",
174 .offset = SZ_4M,
175 .size = SZ_32M - SZ_4M,
176 },
177 [3] = {
178 .name = "user2",
179 .offset = SZ_32M,
180 .size = MTDPART_SIZ_FULL,
181 }
182};
183
156/* the Anubis has 3 selectable slots for nand-flash, the two 184/* the Anubis has 3 selectable slots for nand-flash, the two
157 * on-board chip areas, as well as the external slot. 185 * on-board chip areas, as well as the external slot.
158 * 186 *
@@ -260,6 +288,104 @@ static struct platform_device anubis_device_ide1 = {
260 .resource = anubis_ide1_resource, 288 .resource = anubis_ide1_resource,
261}; 289};
262 290
291/* Asix AX88796 10/100 ethernet controller */
292
293static struct ax_plat_data anubis_asix_platdata = {
294 .flags = AXFLG_MAC_FROMDEV,
295 .wordlength = 2,
296 .dcr_val = 0x48,
297 .rcr_val = 0x40,
298};
299
300static struct resource anubis_asix_resource[] = {
301 [0] = {
302 .start = S3C2410_CS5,
303 .end = S3C2410_CS5 + (0x20 * 0x20) -1,
304 .flags = IORESOURCE_MEM
305 },
306 [1] = {
307 .start = IRQ_ASIX,
308 .end = IRQ_ASIX,
309 .flags = IORESOURCE_IRQ
310 }
311};
312
313static struct platform_device anubis_device_asix = {
314 .name = "ax88796",
315 .id = 0,
316 .num_resources = ARRAY_SIZE(anubis_asix_resource),
317 .resource = anubis_asix_resource,
318 .dev = {
319 .platform_data = &anubis_asix_platdata,
320 }
321};
322
323/* SM501 */
324
325static struct resource anubis_sm501_resource[] = {
326 [0] = {
327 .start = S3C2410_CS2,
328 .end = S3C2410_CS2 + SZ_8M,
329 .flags = IORESOURCE_MEM,
330 },
331 [1] = {
332 .start = S3C2410_CS2 + SZ_64M - SZ_2M,
333 .end = S3C2410_CS2 + SZ_64M - 1,
334 .flags = IORESOURCE_MEM,
335 },
336 [2] = {
337 .start = IRQ_EINT0,
338 .end = IRQ_EINT0,
339 .flags = IORESOURCE_IRQ,
340 },
341};
342
343static struct sm501_initdata anubis_sm501_initdata = {
344 .gpio_high = {
345 .set = 0x3F000000, /* 24bit panel */
346 .mask = 0x0,
347 },
348 .misc_timing = {
349 .set = 0x010100, /* SDRAM timing */
350 .mask = 0x1F1F00,
351 },
352 .misc_control = {
353 .set = SM501_MISC_PNL_24BIT,
354 .mask = 0,
355 },
356
357 /* set the SDRAM and bus clocks */
358 .mclk = 72 * MHZ,
359 .m1xclk = 144 * MHZ,
360};
361
362static struct sm501_platdata_gpio_i2c anubis_sm501_gpio_i2c[] = {
363 [0] = {
364 .pin_scl = 44,
365 .pin_sda = 45,
366 },
367 [1] = {
368 .pin_scl = 40,
369 .pin_sda = 41,
370 },
371};
372
373static struct sm501_platdata anubis_sm501_platdata = {
374 .init = &anubis_sm501_initdata,
375 .gpio_i2c = anubis_sm501_gpio_i2c,
376 .gpio_i2c_nr = ARRAY_SIZE(anubis_sm501_gpio_i2c),
377};
378
379static struct platform_device anubis_device_sm501 = {
380 .name = "sm501",
381 .id = 0,
382 .num_resources = ARRAY_SIZE(anubis_sm501_resource),
383 .resource = anubis_sm501_resource,
384 .dev = {
385 .platform_data = &anubis_sm501_platdata,
386 },
387};
388
263/* Standard Anubis devices */ 389/* Standard Anubis devices */
264 390
265static struct platform_device *anubis_devices[] __initdata = { 391static struct platform_device *anubis_devices[] __initdata = {
@@ -271,6 +397,8 @@ static struct platform_device *anubis_devices[] __initdata = {
271 &s3c_device_nand, 397 &s3c_device_nand,
272 &anubis_device_ide0, 398 &anubis_device_ide0,
273 &anubis_device_ide1, 399 &anubis_device_ide1,
400 &anubis_device_asix,
401 &anubis_device_sm501,
274}; 402};
275 403
276static struct clk *anubis_clocks[] = { 404static struct clk *anubis_clocks[] = {
@@ -304,8 +432,17 @@ static void __init anubis_map_io(void)
304 s3c24xx_init_clocks(0); 432 s3c24xx_init_clocks(0);
305 s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs)); 433 s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs));
306 434
307 /* ensure that the GPIO is setup */ 435 /* check for the newer revision boards with large page nand */
308 s3c2410_gpio_setpin(S3C2410_GPA0, 1); 436
437 if ((__raw_readb(ANUBIS_VA_IDREG) & ANUBIS_IDREG_REVMASK) >= 4) {
438 printk(KERN_INFO "ANUBIS-B detected (revision %d)\n",
439 __raw_readb(ANUBIS_VA_IDREG) & ANUBIS_IDREG_REVMASK);
440 anubis_nand_sets[0].partitions = anubis_default_nand_part_large;
441 anubis_nand_sets[0].nr_partitions = ARRAY_SIZE(anubis_default_nand_part_large);
442 } else {
443 /* ensure that the GPIO is setup */
444 s3c2410_gpio_setpin(S3C2410_GPA0, 1);
445 }
309} 446}
310 447
311static void __init anubis_init(void) 448static void __init anubis_init(void)
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c
index 4d6c7a574c1a..89f4c9c5777b 100644
--- a/arch/arm/mach-s3c2440/mach-osiris.c
+++ b/arch/arm/mach-s3c2440/mach-osiris.c
@@ -16,6 +16,7 @@
16#include <linux/timer.h> 16#include <linux/timer.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/device.h> 18#include <linux/device.h>
19#include <linux/sysdev.h>
19#include <linux/serial_core.h> 20#include <linux/serial_core.h>
20 21
21#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
@@ -65,6 +66,11 @@ static struct map_desc osiris_iodesc[] __initdata = {
65 /* CPLD control registers */ 66 /* CPLD control registers */
66 67
67 { 68 {
69 .virtual = (u32)OSIRIS_VA_CTRL0,
70 .pfn = __phys_to_pfn(OSIRIS_PA_CTRL0),
71 .length = SZ_16K,
72 .type = MT_DEVICE,
73 }, {
68 .virtual = (u32)OSIRIS_VA_CTRL1, 74 .virtual = (u32)OSIRIS_VA_CTRL1,
69 .pfn = __phys_to_pfn(OSIRIS_PA_CTRL1), 75 .pfn = __phys_to_pfn(OSIRIS_PA_CTRL1),
70 .length = SZ_16K, 76 .length = SZ_16K,
@@ -74,6 +80,11 @@ static struct map_desc osiris_iodesc[] __initdata = {
74 .pfn = __phys_to_pfn(OSIRIS_PA_CTRL2), 80 .pfn = __phys_to_pfn(OSIRIS_PA_CTRL2),
75 .length = SZ_16K, 81 .length = SZ_16K,
76 .type = MT_DEVICE, 82 .type = MT_DEVICE,
83 }, {
84 .virtual = (u32)OSIRIS_VA_IDREG,
85 .pfn = __phys_to_pfn(OSIRIS_PA_IDREG),
86 .length = SZ_16K,
87 .type = MT_DEVICE,
77 }, 88 },
78}; 89};
79 90
@@ -155,6 +166,29 @@ static struct mtd_partition osiris_default_nand_part[] = {
155 } 166 }
156}; 167};
157 168
169static struct mtd_partition osiris_default_nand_part_large[] = {
170 [0] = {
171 .name = "Boot Agent",
172 .size = SZ_128K,
173 .offset = 0,
174 },
175 [1] = {
176 .name = "/boot",
177 .size = SZ_4M - SZ_128K,
178 .offset = SZ_128K,
179 },
180 [2] = {
181 .name = "user1",
182 .offset = SZ_4M,
183 .size = SZ_32M - SZ_4M,
184 },
185 [3] = {
186 .name = "user2",
187 .offset = SZ_32M,
188 .size = MTDPART_SIZ_FULL,
189 }
190};
191
158/* the Osiris has 3 selectable slots for nand-flash, the two 192/* the Osiris has 3 selectable slots for nand-flash, the two
159 * on-board chip areas, as well as the external slot. 193 * on-board chip areas, as well as the external slot.
160 * 194 *
@@ -195,13 +229,13 @@ static void osiris_nand_select(struct s3c2410_nand_set *set, int slot)
195 pr_debug("osiris_nand: selecting slot %d (set %p,%p)\n", 229 pr_debug("osiris_nand: selecting slot %d (set %p,%p)\n",
196 slot, set, set->nr_map); 230 slot, set, set->nr_map);
197 231
198 tmp = __raw_readb(OSIRIS_VA_CTRL1); 232 tmp = __raw_readb(OSIRIS_VA_CTRL0);
199 tmp &= ~OSIRIS_CTRL1_NANDSEL; 233 tmp &= ~OSIRIS_CTRL0_NANDSEL;
200 tmp |= slot; 234 tmp |= slot;
201 235
202 pr_debug("osiris_nand: ctrl1 now %02x\n", tmp); 236 pr_debug("osiris_nand: ctrl0 now %02x\n", tmp);
203 237
204 __raw_writeb(tmp, OSIRIS_VA_CTRL1); 238 __raw_writeb(tmp, OSIRIS_VA_CTRL0);
205} 239}
206 240
207static struct s3c2410_platform_nand osiris_nand_info = { 241static struct s3c2410_platform_nand osiris_nand_info = {
@@ -235,10 +269,45 @@ static struct platform_device osiris_pcmcia = {
235 .resource = osiris_pcmcia_resource, 269 .resource = osiris_pcmcia_resource,
236}; 270};
237 271
272/* Osiris power management device */
273
274#ifdef CONFIG_PM
275static unsigned char pm_osiris_ctrl0;
276
277static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state)
278{
279 pm_osiris_ctrl0 = __raw_readb(OSIRIS_VA_CTRL0);
280 return 0;
281}
282
283static int osiris_pm_resume(struct sys_device *sd)
284{
285 if (pm_osiris_ctrl0 & OSIRIS_CTRL0_FIX8)
286 __raw_writeb(OSIRIS_CTRL1_FIX8, OSIRIS_VA_CTRL1);
287
288 return 0;
289}
290
291#else
292#define osiris_pm_suspend NULL
293#define osiris_pm_resume NULL
294#endif
295
296static struct sysdev_class osiris_pm_sysclass = {
297 set_kset_name("mach-osiris"),
298 .suspend = osiris_pm_suspend,
299 .resume = osiris_pm_resume,
300};
301
302static struct sys_device osiris_pm_sysdev = {
303 .cls = &osiris_pm_sysclass,
304};
305
238/* Standard Osiris devices */ 306/* Standard Osiris devices */
239 307
240static struct platform_device *osiris_devices[] __initdata = { 308static struct platform_device *osiris_devices[] __initdata = {
241 &s3c_device_i2c, 309 &s3c_device_i2c,
310 &s3c_device_wdt,
242 &s3c_device_nand, 311 &s3c_device_nand,
243 &osiris_pcmcia, 312 &osiris_pcmcia,
244}; 313};
@@ -276,18 +345,30 @@ static void __init osiris_map_io(void)
276 s3c24xx_init_clocks(0); 345 s3c24xx_init_clocks(0);
277 s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs)); 346 s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs));
278 347
348 /* check for the newer revision boards with large page nand */
349
350 if ((__raw_readb(OSIRIS_VA_IDREG) & OSIRIS_ID_REVMASK) >= 4) {
351 printk(KERN_INFO "OSIRIS-B detected (revision %d)\n",
352 __raw_readb(OSIRIS_VA_IDREG) & OSIRIS_ID_REVMASK);
353 osiris_nand_sets[0].partitions = osiris_default_nand_part_large;
354 osiris_nand_sets[0].nr_partitions = ARRAY_SIZE(osiris_default_nand_part_large);
355 } else {
356 /* write-protect line to the NAND */
357 s3c2410_gpio_setpin(S3C2410_GPA0, 1);
358 }
359
279 /* fix bus configuration (nBE settings wrong on ABLE pre v2.20) */ 360 /* fix bus configuration (nBE settings wrong on ABLE pre v2.20) */
280 361
281 local_irq_save(flags); 362 local_irq_save(flags);
282 __raw_writel(__raw_readl(S3C2410_BWSCON) | S3C2410_BWSCON_ST1 | S3C2410_BWSCON_ST2 | S3C2410_BWSCON_ST3 | S3C2410_BWSCON_ST4 | S3C2410_BWSCON_ST5, S3C2410_BWSCON); 363 __raw_writel(__raw_readl(S3C2410_BWSCON) | S3C2410_BWSCON_ST1 | S3C2410_BWSCON_ST2 | S3C2410_BWSCON_ST3 | S3C2410_BWSCON_ST4 | S3C2410_BWSCON_ST5, S3C2410_BWSCON);
283 local_irq_restore(flags); 364 local_irq_restore(flags);
284
285 /* write-protect line to the NAND */
286 s3c2410_gpio_setpin(S3C2410_GPA0, 1);
287} 365}
288 366
289static void __init osiris_init(void) 367static void __init osiris_init(void)
290{ 368{
369 sysdev_class_register(&osiris_pm_sysclass);
370 sysdev_register(&osiris_pm_sysdev);
371
291 platform_add_devices(osiris_devices, ARRAY_SIZE(osiris_devices)); 372 platform_add_devices(osiris_devices, ARRAY_SIZE(osiris_devices));
292}; 373};
293 374
@@ -299,5 +380,6 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS")
299 .map_io = osiris_map_io, 380 .map_io = osiris_map_io,
300 .init_machine = osiris_init, 381 .init_machine = osiris_init,
301 .init_irq = s3c24xx_init_irq, 382 .init_irq = s3c24xx_init_irq,
383 .init_machine = osiris_init,
302 .timer = &s3c24xx_timer, 384 .timer = &s3c24xx_timer,
303MACHINE_END 385MACHINE_END
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index 4cbf9468f654..3a0a1ee2542d 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -185,28 +185,21 @@ static int __devinit neponset_probe(struct platform_device *dev)
185/* 185/*
186 * LDM power management. 186 * LDM power management.
187 */ 187 */
188static unsigned int neponset_saved_state;
189
188static int neponset_suspend(struct platform_device *dev, pm_message_t state) 190static int neponset_suspend(struct platform_device *dev, pm_message_t state)
189{ 191{
190 /* 192 /*
191 * Save state. 193 * Save state.
192 */ 194 */
193 if (!dev->dev.power.saved_state) 195 neponset_saved_state = NCR_0;
194 dev->dev.power.saved_state = kmalloc(sizeof(unsigned int), GFP_KERNEL);
195 if (!dev->dev.power.saved_state)
196 return -ENOMEM;
197
198 *(unsigned int *)dev->dev.power.saved_state = NCR_0;
199 196
200 return 0; 197 return 0;
201} 198}
202 199
203static int neponset_resume(struct platform_device *dev) 200static int neponset_resume(struct platform_device *dev)
204{ 201{
205 if (dev->dev.power.saved_state) { 202 NCR_0 = neponset_saved_state;
206 NCR_0 = *(unsigned int *)dev->dev.power.saved_state;
207 kfree(dev->dev.power.saved_state);
208 dev->dev.power.saved_state = NULL;
209 }
210 203
211 return 0; 204 return 0;
212} 205}
diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c
index d674cf343156..01a37d3c0727 100644
--- a/arch/arm/mach-sa1100/pm.c
+++ b/arch/arm/mach-sa1100/pm.c
@@ -57,12 +57,7 @@ enum { SLEEP_SAVE_SP = 0,
57static int sa11x0_pm_enter(suspend_state_t state) 57static int sa11x0_pm_enter(suspend_state_t state)
58{ 58{
59 unsigned long gpio, sleep_save[SLEEP_SAVE_SIZE]; 59 unsigned long gpio, sleep_save[SLEEP_SAVE_SIZE];
60 struct timespec delta, rtc;
61 60
62 /* preserve current time */
63 rtc.tv_sec = RCNR;
64 rtc.tv_nsec = 0;
65 save_time_delta(&delta, &rtc);
66 gpio = GPLR; 61 gpio = GPLR;
67 62
68 /* save vital registers */ 63 /* save vital registers */
@@ -119,10 +114,6 @@ static int sa11x0_pm_enter(suspend_state_t state)
119 */ 114 */
120 PSSR = PSSR_PH; 115 PSSR = PSSR_PH;
121 116
122 /* restore current time */
123 rtc.tv_sec = RCNR;
124 restore_time_delta(&delta, &rtc);
125
126 return 0; 117 return 0;
127} 118}
128 119
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index 29cb0c1604ab..fdf7b016e7ad 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -21,25 +21,6 @@
21#define RTC_DEF_DIVIDER (32768 - 1) 21#define RTC_DEF_DIVIDER (32768 - 1)
22#define RTC_DEF_TRIM 0 22#define RTC_DEF_TRIM 0
23 23
24static unsigned long __init sa1100_get_rtc_time(void)
25{
26 /*
27 * According to the manual we should be able to let RTTR be zero
28 * and then a default divisor for a 32.768KHz clock is used.
29 * Apparently this doesn't work, at least for my SA1110 rev 5.
30 * If the clock divider is uninitialized then reset it to the
31 * default value to get the 1Hz clock.
32 */
33 if (RTTR == 0) {
34 RTTR = RTC_DEF_DIVIDER + (RTC_DEF_TRIM << 16);
35 printk(KERN_WARNING "Warning: uninitialized Real Time Clock\n");
36 /* The current RTC value probably doesn't make sense either */
37 RCNR = 0;
38 return 0;
39 }
40 return RCNR;
41}
42
43static int sa1100_set_rtc(void) 24static int sa1100_set_rtc(void)
44{ 25{
45 unsigned long current_time = xtime.tv_sec; 26 unsigned long current_time = xtime.tv_sec;
@@ -117,15 +98,10 @@ static struct irqaction sa1100_timer_irq = {
117 98
118static void __init sa1100_timer_init(void) 99static void __init sa1100_timer_init(void)
119{ 100{
120 struct timespec tv;
121 unsigned long flags; 101 unsigned long flags;
122 102
123 set_rtc = sa1100_set_rtc; 103 set_rtc = sa1100_set_rtc;
124 104
125 tv.tv_nsec = 0;
126 tv.tv_sec = sa1100_get_rtc_time();
127 do_settimeofday(&tv);
128
129 OIER = 0; /* disable any timer interrupts */ 105 OIER = 0; /* disable any timer interrupts */
130 OSSR = 0xf; /* clear status on all timers */ 106 OSSR = 0xf; /* clear status on all timers */
131 setup_irq(IRQ_OST0, &sa1100_timer_irq); 107 setup_irq(IRQ_OST0, &sa1100_timer_irq);
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c
index ba58223f12be..ca8290159432 100644
--- a/arch/arm/mach-versatile/pci.c
+++ b/arch/arm/mach-versatile/pci.c
@@ -117,7 +117,10 @@ static int versatile_read_config(struct pci_bus *bus, unsigned int devfn, int wh
117 } else { 117 } else {
118 switch (size) { 118 switch (size) {
119 case 1: 119 case 1:
120 v = __raw_readb(addr); 120 v = __raw_readl(addr);
121 if (where & 2) v >>= 16;
122 if (where & 1) v >>= 8;
123 v &= 0xff;
121 break; 124 break;
122 125
123 case 2: 126 case 2:
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 75d491448e45..846cce48e2b7 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -145,8 +145,8 @@ void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
145 __do_kernel_fault(mm, addr, fsr, regs); 145 __do_kernel_fault(mm, addr, fsr, regs);
146} 146}
147 147
148#define VM_FAULT_BADMAP (-20) 148#define VM_FAULT_BADMAP 0x010000
149#define VM_FAULT_BADACCESS (-21) 149#define VM_FAULT_BADACCESS 0x020000
150 150
151static int 151static int
152__do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, 152__do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
@@ -183,20 +183,20 @@ good_area:
183 */ 183 */
184survive: 184survive:
185 fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, fsr & (1 << 11)); 185 fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, fsr & (1 << 11));
186 186 if (unlikely(fault & VM_FAULT_ERROR)) {
187 /* 187 if (fault & VM_FAULT_OOM)
188 * Handle the "normal" cases first - successful and sigbus 188 goto out_of_memory;
189 */ 189 else if (fault & VM_FAULT_SIGBUS)
190 switch (fault) { 190 return fault;
191 case VM_FAULT_MAJOR: 191 BUG();
192 }
193 if (fault & VM_FAULT_MAJOR)
192 tsk->maj_flt++; 194 tsk->maj_flt++;
193 return fault; 195 else
194 case VM_FAULT_MINOR:
195 tsk->min_flt++; 196 tsk->min_flt++;
196 case VM_FAULT_SIGBUS: 197 return fault;
197 return fault;
198 }
199 198
199out_of_memory:
200 if (!is_init(tsk)) 200 if (!is_init(tsk))
201 goto out; 201 goto out;
202 202
@@ -249,7 +249,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
249 /* 249 /*
250 * Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR 250 * Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR
251 */ 251 */
252 if (fault >= VM_FAULT_MINOR) 252 if (likely(!(fault & (VM_FAULT_ERROR | VM_FAULT_BADMAP | VM_FAULT_BADACCESS))))
253 return 0; 253 return 0;
254 254
255 /* 255 /*
@@ -259,8 +259,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
259 if (!user_mode(regs)) 259 if (!user_mode(regs))
260 goto no_context; 260 goto no_context;
261 261
262 switch (fault) { 262 if (fault & VM_FAULT_OOM) {
263 case VM_FAULT_OOM:
264 /* 263 /*
265 * We ran out of memory, or some other thing 264 * We ran out of memory, or some other thing
266 * happened to us that made us unable to handle 265 * happened to us that made us unable to handle
@@ -269,17 +268,15 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
269 printk("VM: killing process %s\n", tsk->comm); 268 printk("VM: killing process %s\n", tsk->comm);
270 do_exit(SIGKILL); 269 do_exit(SIGKILL);
271 return 0; 270 return 0;
272 271 }
273 case VM_FAULT_SIGBUS: 272 if (fault & VM_FAULT_SIGBUS) {
274 /* 273 /*
275 * We had some memory, but were unable to 274 * We had some memory, but were unable to
276 * successfully fix up this page fault. 275 * successfully fix up this page fault.
277 */ 276 */
278 sig = SIGBUS; 277 sig = SIGBUS;
279 code = BUS_ADRERR; 278 code = BUS_ADRERR;
280 break; 279 } else {
281
282 default:
283 /* 280 /*
284 * Something tried to access memory that 281 * Something tried to access memory that
285 * isn't in our memory map.. 282 * isn't in our memory map..
@@ -287,7 +284,6 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
287 sig = SIGSEGV; 284 sig = SIGSEGV;
288 code = fault == VM_FAULT_BADACCESS ? 285 code = fault == VM_FAULT_BADACCESS ?
289 SEGV_ACCERR : SEGV_MAPERR; 286 SEGV_ACCERR : SEGV_MAPERR;
290 break;
291 } 287 }
292 288
293 __do_user_fault(tsk, addr, fsr, sig, code, regs); 289 __do_user_fault(tsk, addr, fsr, sig, code, regs);
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index f3ade18862aa..75952779ce19 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -280,7 +280,10 @@ __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
280 if (!type) 280 if (!type)
281 return NULL; 281 return NULL;
282 282
283 size = PAGE_ALIGN(size); 283 /*
284 * Page align the mapping size, taking account of any offset.
285 */
286 size = PAGE_ALIGN(offset + size);
284 287
285 area = get_vm_area(size, VM_IOREMAP); 288 area = get_vm_area(size, VM_IOREMAP);
286 if (!area) 289 if (!area)
@@ -325,11 +328,6 @@ __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
325 if (!size || last_addr < phys_addr) 328 if (!size || last_addr < phys_addr)
326 return NULL; 329 return NULL;
327 330
328 /*
329 * Page align the mapping size
330 */
331 size = PAGE_ALIGN(last_addr + 1) - phys_addr;
332
333 return __arm_ioremap_pfn(pfn, offset, size, mtype); 331 return __arm_ioremap_pfn(pfn, offset, size, mtype);
334} 332}
335EXPORT_SYMBOL(__arm_ioremap); 333EXPORT_SYMBOL(__arm_ioremap);
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 02e050ae59f6..3b5e47dc0c97 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -527,9 +527,9 @@ void __init create_mapping(struct map_desc *md)
527 return; 527 return;
528 } 528 }
529 529
530 addr = md->virtual; 530 addr = md->virtual & PAGE_MASK;
531 phys = (unsigned long)__pfn_to_phys(md->pfn); 531 phys = (unsigned long)__pfn_to_phys(md->pfn);
532 length = PAGE_ALIGN(md->length); 532 length = PAGE_ALIGN(md->length + (md->virtual & ~PAGE_MASK));
533 533
534 if (type->prot_l1 == 0 && ((addr | phys | length) & ~SECTION_MASK)) { 534 if (type->prot_l1 == 0 && ((addr | phys | length) & ~SECTION_MASK)) {
535 printk(KERN_WARNING "BUG: map for 0x%08lx at 0x%08lx can not " 535 printk(KERN_WARNING "BUG: map for 0x%08lx at 0x%08lx can not "
diff --git a/arch/arm/oprofile/op_model_mpcore.c b/arch/arm/oprofile/op_model_mpcore.c
index 7791da791f5f..75bae067922d 100644
--- a/arch/arm/oprofile/op_model_mpcore.c
+++ b/arch/arm/oprofile/op_model_mpcore.c
@@ -200,8 +200,10 @@ static int em_call_function(int (*fn)(void))
200 data.fn = fn; 200 data.fn = fn;
201 data.ret = 0; 201 data.ret = 0;
202 202
203 preempt_disable();
203 smp_call_function(em_func, &data, 1, 1); 204 smp_call_function(em_func, &data, 1, 1);
204 em_func(&data); 205 em_func(&data);
206 preempt_enable();
205 207
206 return data.ret; 208 return data.ret;
207} 209}
diff --git a/arch/arm/plat-iop/Makefile b/arch/arm/plat-iop/Makefile
index 4d2b1da3cd82..36bff0325959 100644
--- a/arch/arm/plat-iop/Makefile
+++ b/arch/arm/plat-iop/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_ARCH_IOP32X) += setup.o
12obj-$(CONFIG_ARCH_IOP32X) += time.o 12obj-$(CONFIG_ARCH_IOP32X) += time.o
13obj-$(CONFIG_ARCH_IOP32X) += io.o 13obj-$(CONFIG_ARCH_IOP32X) += io.o
14obj-$(CONFIG_ARCH_IOP32X) += cp6.o 14obj-$(CONFIG_ARCH_IOP32X) += cp6.o
15obj-$(CONFIG_ARCH_IOP32X) += adma.o
15 16
16# IOP33X 17# IOP33X
17obj-$(CONFIG_ARCH_IOP33X) += gpio.o 18obj-$(CONFIG_ARCH_IOP33X) += gpio.o
@@ -21,6 +22,7 @@ obj-$(CONFIG_ARCH_IOP33X) += setup.o
21obj-$(CONFIG_ARCH_IOP33X) += time.o 22obj-$(CONFIG_ARCH_IOP33X) += time.o
22obj-$(CONFIG_ARCH_IOP33X) += io.o 23obj-$(CONFIG_ARCH_IOP33X) += io.o
23obj-$(CONFIG_ARCH_IOP33X) += cp6.o 24obj-$(CONFIG_ARCH_IOP33X) += cp6.o
25obj-$(CONFIG_ARCH_IOP33X) += adma.o
24 26
25# IOP13XX 27# IOP13XX
26obj-$(CONFIG_ARCH_IOP13XX) += cp6.o 28obj-$(CONFIG_ARCH_IOP13XX) += cp6.o
diff --git a/arch/arm/plat-iop/adma.c b/arch/arm/plat-iop/adma.c
new file mode 100644
index 000000000000..53c5e9a52eb1
--- /dev/null
+++ b/arch/arm/plat-iop/adma.c
@@ -0,0 +1,209 @@
1/*
2 * platform device definitions for the iop3xx dma/xor engines
3 * Copyright © 2006, Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 */
19#include <linux/platform_device.h>
20#include <asm/hardware/iop3xx.h>
21#include <linux/dma-mapping.h>
22#include <asm/arch/adma.h>
23#include <asm/hardware/iop_adma.h>
24
25#ifdef CONFIG_ARCH_IOP32X
26#define IRQ_DMA0_EOT IRQ_IOP32X_DMA0_EOT
27#define IRQ_DMA0_EOC IRQ_IOP32X_DMA0_EOC
28#define IRQ_DMA0_ERR IRQ_IOP32X_DMA0_ERR
29
30#define IRQ_DMA1_EOT IRQ_IOP32X_DMA1_EOT
31#define IRQ_DMA1_EOC IRQ_IOP32X_DMA1_EOC
32#define IRQ_DMA1_ERR IRQ_IOP32X_DMA1_ERR
33
34#define IRQ_AA_EOT IRQ_IOP32X_AA_EOT
35#define IRQ_AA_EOC IRQ_IOP32X_AA_EOC
36#define IRQ_AA_ERR IRQ_IOP32X_AA_ERR
37#endif
38#ifdef CONFIG_ARCH_IOP33X
39#define IRQ_DMA0_EOT IRQ_IOP33X_DMA0_EOT
40#define IRQ_DMA0_EOC IRQ_IOP33X_DMA0_EOC
41#define IRQ_DMA0_ERR IRQ_IOP33X_DMA0_ERR
42
43#define IRQ_DMA1_EOT IRQ_IOP33X_DMA1_EOT
44#define IRQ_DMA1_EOC IRQ_IOP33X_DMA1_EOC
45#define IRQ_DMA1_ERR IRQ_IOP33X_DMA1_ERR
46
47#define IRQ_AA_EOT IRQ_IOP33X_AA_EOT
48#define IRQ_AA_EOC IRQ_IOP33X_AA_EOC
49#define IRQ_AA_ERR IRQ_IOP33X_AA_ERR
50#endif
51/* AAU and DMA Channels */
52static struct resource iop3xx_dma_0_resources[] = {
53 [0] = {
54 .start = IOP3XX_DMA_PHYS_BASE(0),
55 .end = IOP3XX_DMA_UPPER_PA(0),
56 .flags = IORESOURCE_MEM,
57 },
58 [1] = {
59 .start = IRQ_DMA0_EOT,
60 .end = IRQ_DMA0_EOT,
61 .flags = IORESOURCE_IRQ
62 },
63 [2] = {
64 .start = IRQ_DMA0_EOC,
65 .end = IRQ_DMA0_EOC,
66 .flags = IORESOURCE_IRQ
67 },
68 [3] = {
69 .start = IRQ_DMA0_ERR,
70 .end = IRQ_DMA0_ERR,
71 .flags = IORESOURCE_IRQ
72 }
73};
74
75static struct resource iop3xx_dma_1_resources[] = {
76 [0] = {
77 .start = IOP3XX_DMA_PHYS_BASE(1),
78 .end = IOP3XX_DMA_UPPER_PA(1),
79 .flags = IORESOURCE_MEM,
80 },
81 [1] = {
82 .start = IRQ_DMA1_EOT,
83 .end = IRQ_DMA1_EOT,
84 .flags = IORESOURCE_IRQ
85 },
86 [2] = {
87 .start = IRQ_DMA1_EOC,
88 .end = IRQ_DMA1_EOC,
89 .flags = IORESOURCE_IRQ
90 },
91 [3] = {
92 .start = IRQ_DMA1_ERR,
93 .end = IRQ_DMA1_ERR,
94 .flags = IORESOURCE_IRQ
95 }
96};
97
98
99static struct resource iop3xx_aau_resources[] = {
100 [0] = {
101 .start = IOP3XX_AAU_PHYS_BASE,
102 .end = IOP3XX_AAU_UPPER_PA,
103 .flags = IORESOURCE_MEM,
104 },
105 [1] = {
106 .start = IRQ_AA_EOT,
107 .end = IRQ_AA_EOT,
108 .flags = IORESOURCE_IRQ
109 },
110 [2] = {
111 .start = IRQ_AA_EOC,
112 .end = IRQ_AA_EOC,
113 .flags = IORESOURCE_IRQ
114 },
115 [3] = {
116 .start = IRQ_AA_ERR,
117 .end = IRQ_AA_ERR,
118 .flags = IORESOURCE_IRQ
119 }
120};
121
122static u64 iop3xx_adma_dmamask = DMA_32BIT_MASK;
123
124static struct iop_adma_platform_data iop3xx_dma_0_data = {
125 .hw_id = DMA0_ID,
126 .pool_size = PAGE_SIZE,
127};
128
129static struct iop_adma_platform_data iop3xx_dma_1_data = {
130 .hw_id = DMA1_ID,
131 .pool_size = PAGE_SIZE,
132};
133
134static struct iop_adma_platform_data iop3xx_aau_data = {
135 .hw_id = AAU_ID,
136 .pool_size = 3 * PAGE_SIZE,
137};
138
139struct platform_device iop3xx_dma_0_channel = {
140 .name = "iop-adma",
141 .id = 0,
142 .num_resources = 4,
143 .resource = iop3xx_dma_0_resources,
144 .dev = {
145 .dma_mask = &iop3xx_adma_dmamask,
146 .coherent_dma_mask = DMA_64BIT_MASK,
147 .platform_data = (void *) &iop3xx_dma_0_data,
148 },
149};
150
151struct platform_device iop3xx_dma_1_channel = {
152 .name = "iop-adma",
153 .id = 1,
154 .num_resources = 4,
155 .resource = iop3xx_dma_1_resources,
156 .dev = {
157 .dma_mask = &iop3xx_adma_dmamask,
158 .coherent_dma_mask = DMA_64BIT_MASK,
159 .platform_data = (void *) &iop3xx_dma_1_data,
160 },
161};
162
163struct platform_device iop3xx_aau_channel = {
164 .name = "iop-adma",
165 .id = 2,
166 .num_resources = 4,
167 .resource = iop3xx_aau_resources,
168 .dev = {
169 .dma_mask = &iop3xx_adma_dmamask,
170 .coherent_dma_mask = DMA_64BIT_MASK,
171 .platform_data = (void *) &iop3xx_aau_data,
172 },
173};
174
175static int __init iop3xx_adma_cap_init(void)
176{
177 #ifdef CONFIG_ARCH_IOP32X /* the 32x DMA does not perform CRC32C */
178 dma_cap_set(DMA_MEMCPY, iop3xx_dma_0_data.cap_mask);
179 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_0_data.cap_mask);
180 #else
181 dma_cap_set(DMA_MEMCPY, iop3xx_dma_0_data.cap_mask);
182 dma_cap_set(DMA_MEMCPY_CRC32C, iop3xx_dma_0_data.cap_mask);
183 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_0_data.cap_mask);
184 #endif
185
186 #ifdef CONFIG_ARCH_IOP32X /* the 32x DMA does not perform CRC32C */
187 dma_cap_set(DMA_MEMCPY, iop3xx_dma_1_data.cap_mask);
188 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_1_data.cap_mask);
189 #else
190 dma_cap_set(DMA_MEMCPY, iop3xx_dma_1_data.cap_mask);
191 dma_cap_set(DMA_MEMCPY_CRC32C, iop3xx_dma_1_data.cap_mask);
192 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_1_data.cap_mask);
193 #endif
194
195 #ifdef CONFIG_ARCH_IOP32X /* the 32x AAU does not perform zero sum */
196 dma_cap_set(DMA_XOR, iop3xx_aau_data.cap_mask);
197 dma_cap_set(DMA_MEMSET, iop3xx_aau_data.cap_mask);
198 dma_cap_set(DMA_INTERRUPT, iop3xx_aau_data.cap_mask);
199 #else
200 dma_cap_set(DMA_XOR, iop3xx_aau_data.cap_mask);
201 dma_cap_set(DMA_ZERO_SUM, iop3xx_aau_data.cap_mask);
202 dma_cap_set(DMA_MEMSET, iop3xx_aau_data.cap_mask);
203 dma_cap_set(DMA_INTERRUPT, iop3xx_aau_data.cap_mask);
204 #endif
205
206 return 0;
207}
208
209arch_initcall(iop3xx_adma_cap_init);
diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c
index 2feceec8eccd..b0af014b0e2c 100644
--- a/arch/arm/plat-omap/timer32k.c
+++ b/arch/arm/plat-omap/timer32k.c
@@ -156,6 +156,8 @@ static void omap_32k_timer_set_mode(enum clock_event_mode mode,
156 case CLOCK_EVT_MODE_SHUTDOWN: 156 case CLOCK_EVT_MODE_SHUTDOWN:
157 omap_32k_timer_stop(); 157 omap_32k_timer_stop();
158 break; 158 break;
159 case CLOCK_EVT_MODE_RESUME:
160 break;
159 } 161 }
160} 162}
161 163
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
index 08d80f2f51f2..6d048490c559 100644
--- a/arch/arm/plat-s3c24xx/dma.c
+++ b/arch/arm/plat-s3c24xx/dma.c
@@ -1333,7 +1333,7 @@ int __init s3c24xx_dma_init(unsigned int channels, unsigned int irq,
1333 dma_kmem = kmem_cache_create("dma_desc", 1333 dma_kmem = kmem_cache_create("dma_desc",
1334 sizeof(struct s3c2410_dma_buf), 0, 1334 sizeof(struct s3c2410_dma_buf), 0,
1335 SLAB_HWCACHE_ALIGN, 1335 SLAB_HWCACHE_ALIGN,
1336 s3c2410_dma_cache_ctor, NULL); 1336 s3c2410_dma_cache_ctor);
1337 1337
1338 if (dma_kmem == NULL) { 1338 if (dma_kmem == NULL) {
1339 printk(KERN_ERR "dma failed to make kmem cache\n"); 1339 printk(KERN_ERR "dma failed to make kmem cache\n");
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S
index ca2a5ad19ea6..806ce26d5243 100644
--- a/arch/arm/vfp/entry.S
+++ b/arch/arm/vfp/entry.S
@@ -29,6 +29,10 @@ do_vfp:
29 add r10, r10, #TI_VFPSTATE @ r10 = workspace 29 add r10, r10, #TI_VFPSTATE @ r10 = workspace
30 ldr pc, [r4] @ call VFP entry point 30 ldr pc, [r4] @ call VFP entry point
31 31
32ENTRY(vfp_null_entry)
33 mov pc, lr
34ENDPROC(vfp_null_entry)
35
32.LCvfp: 36.LCvfp:
33 .word vfp_vector 37 .word vfp_vector
34 38
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index f1e5951dc721..1106b5f9cf19 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -26,8 +26,9 @@
26 */ 26 */
27void vfp_testing_entry(void); 27void vfp_testing_entry(void);
28void vfp_support_entry(void); 28void vfp_support_entry(void);
29void vfp_null_entry(void);
29 30
30void (*vfp_vector)(void) = vfp_testing_entry; 31void (*vfp_vector)(void) = vfp_null_entry;
31union vfp_state *last_VFP_context[NR_CPUS]; 32union vfp_state *last_VFP_context[NR_CPUS];
32 33
33/* 34/*
@@ -321,8 +322,10 @@ static int __init vfp_init(void)
321 * The handler is already setup to just log calls, so 322 * The handler is already setup to just log calls, so
322 * we just need to read the VFPSID register. 323 * we just need to read the VFPSID register.
323 */ 324 */
325 vfp_vector = vfp_testing_entry;
324 vfpsid = fmrx(FPSID); 326 vfpsid = fmrx(FPSID);
325 barrier(); 327 barrier();
328 vfp_vector = vfp_null_entry;
326 329
327 printk(KERN_INFO "VFP support v0.3: "); 330 printk(KERN_INFO "VFP support v0.3: ");
328 if (VFP_arch) { 331 if (VFP_arch) {
diff --git a/arch/arm26/Kconfig b/arch/arm26/Kconfig
index 20688bc13e9b..9044f33299f7 100644
--- a/arch/arm26/Kconfig
+++ b/arch/arm26/Kconfig
@@ -17,6 +17,9 @@ config MMU
17 bool 17 bool
18 default y 18 default y
19 19
20config NO_DMA
21 def_bool y
22
20config ARCH_ACORN 23config ARCH_ACORN
21 bool 24 bool
22 default y 25 default y
diff --git a/arch/arm26/defconfig b/arch/arm26/defconfig
index c4a89703c3d8..2b7d44bf49bf 100644
--- a/arch/arm26/defconfig
+++ b/arch/arm26/defconfig
@@ -248,7 +248,6 @@ CONFIG_I2C_CHARDEV=y
248# CONFIG_JBD_DEBUG is not set 248# CONFIG_JBD_DEBUG is not set
249# CONFIG_FAT_FS is not set 249# CONFIG_FAT_FS is not set
250# CONFIG_MSDOS_FS is not set 250# CONFIG_MSDOS_FS is not set
251# CONFIG_UMSDOS_FS is not set
252# CONFIG_VFAT_FS is not set 251# CONFIG_VFAT_FS is not set
253# CONFIG_EFS_FS is not set 252# CONFIG_EFS_FS is not set
254# CONFIG_JFFS_FS is not set 253# CONFIG_JFFS_FS is not set
diff --git a/arch/arm26/kernel/ptrace.c b/arch/arm26/kernel/ptrace.c
index 416927956721..0fefb86970c6 100644
--- a/arch/arm26/kernel/ptrace.c
+++ b/arch/arm26/kernel/ptrace.c
@@ -531,7 +531,6 @@ static int ptrace_setfpregs(struct task_struct *tsk, void *ufp)
531 531
532long arch_ptrace(struct task_struct *child, long request, long addr, long data) 532long arch_ptrace(struct task_struct *child, long request, long addr, long data)
533{ 533{
534 unsigned long tmp;
535 int ret; 534 int ret;
536 535
537 switch (request) { 536 switch (request) {
@@ -540,12 +539,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
540 */ 539 */
541 case PTRACE_PEEKTEXT: 540 case PTRACE_PEEKTEXT:
542 case PTRACE_PEEKDATA: 541 case PTRACE_PEEKDATA:
543 ret = access_process_vm(child, addr, &tmp, 542 ret = generic_ptrace_peekdata(child, addr, data);
544 sizeof(unsigned long), 0);
545 if (ret == sizeof(unsigned long))
546 ret = put_user(tmp, (unsigned long *) data);
547 else
548 ret = -EIO;
549 break; 543 break;
550 544
551 case PTRACE_PEEKUSR: 545 case PTRACE_PEEKUSR:
@@ -557,12 +551,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
557 */ 551 */
558 case PTRACE_POKETEXT: 552 case PTRACE_POKETEXT:
559 case PTRACE_POKEDATA: 553 case PTRACE_POKEDATA:
560 ret = access_process_vm(child, addr, &data, 554 ret = generic_ptrace_pokedata(child, addr, data);
561 sizeof(unsigned long), 1);
562 if (ret == sizeof(unsigned long))
563 ret = 0;
564 else
565 ret = -EIO;
566 break; 555 break;
567 556
568 case PTRACE_POKEUSR: 557 case PTRACE_POKEUSR:
diff --git a/arch/arm26/kernel/traps.c b/arch/arm26/kernel/traps.c
index d594fb59e945..2911e2eae80e 100644
--- a/arch/arm26/kernel/traps.c
+++ b/arch/arm26/kernel/traps.c
@@ -185,6 +185,7 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
185 printk("Internal error: %s: %x\n", str, err); 185 printk("Internal error: %s: %x\n", str, err);
186 printk("CPU: %d\n", smp_processor_id()); 186 printk("CPU: %d\n", smp_processor_id());
187 show_regs(regs); 187 show_regs(regs);
188 add_taint(TAINT_DIE);
188 printk("Process %s (pid: %d, stack limit = 0x%p)\n", 189 printk("Process %s (pid: %d, stack limit = 0x%p)\n",
189 current->comm, current->pid, end_of_stack(tsk)); 190 current->comm, current->pid, end_of_stack(tsk));
190 191
diff --git a/arch/arm26/mm/fault.c b/arch/arm26/mm/fault.c
index 93c0cee0fb5e..dec638a0c8d9 100644
--- a/arch/arm26/mm/fault.c
+++ b/arch/arm26/mm/fault.c
@@ -170,20 +170,20 @@ good_area:
170 */ 170 */
171survive: 171survive:
172 fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, DO_COW(fsr)); 172 fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, DO_COW(fsr));
173 173 if (unlikely(fault & VM_FAULT_ERROR)) {
174 /* 174 if (fault & VM_FAULT_OOM)
175 * Handle the "normal" cases first - successful and sigbus 175 goto out_of_memory;
176 */ 176 else if (fault & VM_FAULT_SIGBUS)
177 switch (fault) { 177 return fault;
178 case VM_FAULT_MAJOR: 178 BUG();
179 }
180 if (fault & VM_FAULT_MAJOR)
179 tsk->maj_flt++; 181 tsk->maj_flt++;
180 return fault; 182 else
181 case VM_FAULT_MINOR:
182 tsk->min_flt++; 183 tsk->min_flt++;
183 case VM_FAULT_SIGBUS: 184 return fault;
184 return fault;
185 }
186 185
186out_of_memory:
187 fault = -3; /* out of memory */ 187 fault = -3; /* out of memory */
188 if (!is_init(tsk)) 188 if (!is_init(tsk))
189 goto out; 189 goto out;
@@ -225,13 +225,11 @@ int do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
225 /* 225 /*
226 * Handle the "normal" case first 226 * Handle the "normal" case first
227 */ 227 */
228 switch (fault) { 228 if (likely(!(fault & VM_FAULT_ERROR)))
229 case VM_FAULT_MINOR:
230 case VM_FAULT_MAJOR:
231 return 0; 229 return 0;
232 case VM_FAULT_SIGBUS: 230 if (fault & VM_FAULT_SIGBUS)
233 goto do_sigbus; 231 goto do_sigbus;
234 } 232 /* else VM_FAULT_OOM */
235 233
236 /* 234 /*
237 * If we are in kernel mode at this point, we 235 * If we are in kernel mode at this point, we
diff --git a/arch/arm26/mm/init.c b/arch/arm26/mm/init.c
index 562fac12eb95..36e7ee3f8321 100644
--- a/arch/arm26/mm/init.c
+++ b/arch/arm26/mm/init.c
@@ -33,9 +33,6 @@
33 33
34#include <asm/map.h> 34#include <asm/map.h>
35 35
36
37#define TABLE_SIZE PTRS_PER_PTE * sizeof(pte_t))
38
39struct mmu_gather mmu_gathers[NR_CPUS]; 36struct mmu_gather mmu_gathers[NR_CPUS];
40 37
41extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; 38extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
diff --git a/arch/arm26/mm/memc.c b/arch/arm26/mm/memc.c
index 42505541a9b1..ffecd8578247 100644
--- a/arch/arm26/mm/memc.c
+++ b/arch/arm26/mm/memc.c
@@ -176,9 +176,9 @@ void __init pgtable_cache_init(void)
176{ 176{
177 pte_cache = kmem_cache_create("pte-cache", 177 pte_cache = kmem_cache_create("pte-cache",
178 sizeof(pte_t) * PTRS_PER_PTE, 178 sizeof(pte_t) * PTRS_PER_PTE,
179 0, SLAB_PANIC, pte_cache_ctor, NULL); 179 0, SLAB_PANIC, pte_cache_ctor);
180 180
181 pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE + 181 pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE +
182 sizeof(pgd_t) * PTRS_PER_PGD, 182 sizeof(pgd_t) * PTRS_PER_PGD,
183 0, SLAB_PANIC, pgd_cache_ctor, NULL); 183 0, SLAB_PANIC, pgd_cache_ctor);
184} 184}
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 3ec76586877e..d12346aaa88b 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -113,6 +113,10 @@ config BOARD_ATNGW100
113 bool "ATNGW100 Network Gateway" 113 bool "ATNGW100 Network Gateway"
114endchoice 114endchoice
115 115
116if BOARD_ATSTK1000
117source "arch/avr32/boards/atstk1000/Kconfig"
118endif
119
116choice 120choice
117 prompt "Boot loader type" 121 prompt "Boot loader type"
118 default LOADER_U_BOOT 122 default LOADER_U_BOOT
@@ -185,6 +189,27 @@ config CMDLINE
185 189
186endmenu 190endmenu
187 191
192menu "Power managment options"
193
194menu "CPU Frequency scaling"
195
196source "drivers/cpufreq/Kconfig"
197
198config CPU_FREQ_AT32AP
199 bool "CPU frequency driver for AT32AP"
200 depends on CPU_FREQ && PLATFORM_AT32AP
201 default n
202 help
203 This enables the CPU frequency driver for AT32AP processors.
204
205 For details, take a look in <file:Documentation/cpu-freq>.
206
207 If in doubt, say N.
208
209endmenu
210
211endmenu
212
188menu "Bus options" 213menu "Bus options"
189 214
190config PCI 215config PCI
diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c
index 9bc37d4f6687..6c4dc0a00e9f 100644
--- a/arch/avr32/boards/atngw100/setup.c
+++ b/arch/avr32/boards/atngw100/setup.c
@@ -94,9 +94,6 @@ static void __init set_hw_addr(struct platform_device *pdev)
94 clk_put(pclk); 94 clk_put(pclk);
95} 95}
96 96
97struct platform_device *at32_usart_map[1];
98unsigned int at32_nr_usarts = 1;
99
100void __init setup_board(void) 97void __init setup_board(void)
101{ 98{
102 at32_map_usart(1, 0); /* USART 1: /dev/ttyS0, DB9 */ 99 at32_map_usart(1, 0); /* USART 1: /dev/ttyS0, DB9 */
diff --git a/arch/avr32/boards/atstk1000/Kconfig b/arch/avr32/boards/atstk1000/Kconfig
new file mode 100644
index 000000000000..71bc7d364fb7
--- /dev/null
+++ b/arch/avr32/boards/atstk1000/Kconfig
@@ -0,0 +1,53 @@
1# STK1000 customization
2
3if BOARD_ATSTK1002
4
5config BOARD_ATSTK1002_CUSTOM
6 bool "Non-default STK-1002 jumper settings"
7 help
8 You will normally leave the jumpers on the CPU card at their
9 default settings. If you need to use certain peripherals,
10 you will need to change some of those jumpers.
11
12if BOARD_ATSTK1002_CUSTOM
13
14config BOARD_ATSTK1002_SW1_CUSTOM
15 bool "SW1: use SSC1 (not SPI0)"
16 help
17 This also prevents using the external DAC as an audio interface,
18 and means you can't initialize the on-board QVGA display.
19
20config BOARD_ATSTK1002_SW2_CUSTOM
21 bool "SW2: use IRDA or TIMER0 (not UART-A, MMC/SD, and PS2-A)"
22 help
23 If you change this you'll want an updated boot loader putting
24 the console on UART-C not UART-A.
25
26config BOARD_ATSTK1002_SW3_CUSTOM
27 bool "SW3: use TIMER1 (not SSC0 and GCLK)"
28 help
29 This also prevents using the external DAC as an audio interface.
30
31config BOARD_ATSTK1002_SW4_CUSTOM
32 bool "SW4: use ISI/Camera (not GPIOs, SPI1, and PS2-B)"
33 help
34 To use the camera interface you'll need a custom card (on the
35 PCI-format connector) connect a video sensor.
36
37config BOARD_ATSTK1002_SW5_CUSTOM
38 bool "SW5: use MACB1 (not LCDC)"
39
40config BOARD_ATSTK1002_SW6_CUSTOM
41 bool "SW6: more GPIOs (not MACB0)"
42
43endif # custom
44
45config BOARD_ATSTK1002_SPI1
46 bool "Configure SPI1 controller"
47 depends on !BOARD_ATSTK1002_SW4_CUSTOM
48 help
49 All the signals for the second SPI controller are available on
50 GPIO lines and accessed through the J1 jumper block. Say "y"
51 here to configure that SPI controller.
52
53endif # stk 1002
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
index fe1dbe2e28f4..cb93eabb9c6c 100644
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -27,23 +27,43 @@
27 27
28#include "atstk1000.h" 28#include "atstk1000.h"
29 29
30#define SW2_DEFAULT /* MMCI and UART_A available */
31 30
32struct eth_addr { 31struct eth_addr {
33 u8 addr[6]; 32 u8 addr[6];
34}; 33};
35 34
36static struct eth_addr __initdata hw_addr[2]; 35static struct eth_addr __initdata hw_addr[2];
37static struct eth_platform_data __initdata eth_data[2]; 36static struct eth_platform_data __initdata eth_data[2] = {
37 {
38 /*
39 * The MDIO pullups on STK1000 are a bit too weak for
40 * the autodetection to work properly, so we have to
41 * mask out everything but the correct address.
42 */
43 .phy_mask = ~(1U << 16),
44 },
45 {
46 .phy_mask = ~(1U << 17),
47 },
48};
38 49
50#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM
39static struct spi_board_info spi0_board_info[] __initdata = { 51static struct spi_board_info spi0_board_info[] __initdata = {
40 { 52 {
41 /* QVGA display */ 53 /* QVGA display */
42 .modalias = "ltv350qv", 54 .modalias = "ltv350qv",
43 .max_speed_hz = 16000000, 55 .max_speed_hz = 16000000,
44 .chip_select = 1, 56 .chip_select = 1,
57 .mode = SPI_MODE_3,
45 }, 58 },
46}; 59};
60#endif
61
62#ifdef CONFIG_BOARD_ATSTK1002_SPI1
63static struct spi_board_info spi1_board_info[] __initdata = { {
64 /* patch in custom entries here */
65} };
66#endif
47 67
48/* 68/*
49 * The next two functions should go away as the boot loader is 69 * The next two functions should go away as the boot loader is
@@ -102,10 +122,10 @@ static void __init set_hw_addr(struct platform_device *pdev)
102 122
103void __init setup_board(void) 123void __init setup_board(void)
104{ 124{
105#ifdef SW2_DEFAULT 125#ifdef CONFIG_BOARD_ATSTK1002_SW2_CUSTOM
106 at32_map_usart(1, 0); /* USART 1/A: /dev/ttyS0, DB9 */
107#else
108 at32_map_usart(0, 1); /* USART 0/B: /dev/ttyS1, IRDA */ 126 at32_map_usart(0, 1); /* USART 0/B: /dev/ttyS1, IRDA */
127#else
128 at32_map_usart(1, 0); /* USART 1/A: /dev/ttyS0, DB9 */
109#endif 129#endif
110 /* USART 2/unused: expansion connector */ 130 /* USART 2/unused: expansion connector */
111 at32_map_usart(3, 2); /* USART 3/C: /dev/ttyS2, DB9 */ 131 at32_map_usart(3, 2); /* USART 3/C: /dev/ttyS2, DB9 */
@@ -139,18 +159,31 @@ static int __init atstk1002_init(void)
139 159
140 at32_add_system_devices(); 160 at32_add_system_devices();
141 161
142#ifdef SW2_DEFAULT 162#ifdef CONFIG_BOARD_ATSTK1002_SW2_CUSTOM
143 at32_add_device_usart(0);
144#else
145 at32_add_device_usart(1); 163 at32_add_device_usart(1);
164#else
165 at32_add_device_usart(0);
146#endif 166#endif
147 at32_add_device_usart(2); 167 at32_add_device_usart(2);
148 168
169#ifndef CONFIG_BOARD_ATSTK1002_SW6_CUSTOM
149 set_hw_addr(at32_add_device_eth(0, &eth_data[0])); 170 set_hw_addr(at32_add_device_eth(0, &eth_data[0]));
150 171#endif
172#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM
151 at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info)); 173 at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info));
174#endif
175#ifdef CONFIG_BOARD_ATSTK1002_SPI1
176 at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info));
177#endif
178#ifdef CONFIG_BOARD_ATSTK1002_SW5_CUSTOM
179 set_hw_addr(at32_add_device_eth(1, &eth_data[1]));
180#else
152 at32_add_device_lcdc(0, &atstk1000_lcdc_data, 181 at32_add_device_lcdc(0, &atstk1000_lcdc_data,
153 fbmem_start, fbmem_size); 182 fbmem_start, fbmem_size);
183#endif
184#ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM
185 at32_add_device_ssc(0, ATMEL_SSC_TX);
186#endif
154 187
155 return 0; 188 return 0;
156} 189}
diff --git a/arch/avr32/configs/atngw100_defconfig b/arch/avr32/configs/atngw100_defconfig
index c254ffcfa458..49493ad3b5a9 100644
--- a/arch/avr32/configs/atngw100_defconfig
+++ b/arch/avr32/configs/atngw100_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.21-rc6 3# Linux kernel version: 2.6.22-rc5
4# Thu Apr 12 16:35:07 2007 4# Sat Jun 23 15:40:05 2007
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
@@ -40,6 +40,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y
40# CONFIG_UTS_NS is not set 40# CONFIG_UTS_NS is not set
41# CONFIG_AUDIT is not set 41# CONFIG_AUDIT is not set
42# CONFIG_IKCONFIG is not set 42# CONFIG_IKCONFIG is not set
43CONFIG_LOG_BUF_SHIFT=14
43CONFIG_SYSFS_DEPRECATED=y 44CONFIG_SYSFS_DEPRECATED=y
44# CONFIG_RELAY is not set 45# CONFIG_RELAY is not set
45CONFIG_BLK_DEV_INITRD=y 46CONFIG_BLK_DEV_INITRD=y
@@ -57,14 +58,20 @@ CONFIG_BUG=y
57CONFIG_ELF_CORE=y 58CONFIG_ELF_CORE=y
58# CONFIG_BASE_FULL is not set 59# CONFIG_BASE_FULL is not set
59CONFIG_FUTEX=y 60CONFIG_FUTEX=y
61CONFIG_ANON_INODES=y
60CONFIG_EPOLL=y 62CONFIG_EPOLL=y
63CONFIG_SIGNALFD=y
64CONFIG_TIMERFD=y
65CONFIG_EVENTFD=y
61CONFIG_SHMEM=y 66CONFIG_SHMEM=y
62CONFIG_SLAB=y
63CONFIG_VM_EVENT_COUNTERS=y 67CONFIG_VM_EVENT_COUNTERS=y
68# CONFIG_SLUB_DEBUG is not set
69# CONFIG_SLAB is not set
70CONFIG_SLUB=y
71# CONFIG_SLOB is not set
64CONFIG_RT_MUTEXES=y 72CONFIG_RT_MUTEXES=y
65# CONFIG_TINY_SHMEM is not set 73# CONFIG_TINY_SHMEM is not set
66CONFIG_BASE_SMALL=1 74CONFIG_BASE_SMALL=1
67# CONFIG_SLOB is not set
68 75
69# 76#
70# Loadable module support 77# Loadable module support
@@ -148,6 +155,7 @@ CONFIG_CMDLINE=""
148# 155#
149# Bus options 156# Bus options
150# 157#
158# CONFIG_ARCH_SUPPORTS_MSI is not set
151 159
152# 160#
153# PCCARD (PCMCIA/CardBus) support 161# PCCARD (PCMCIA/CardBus) support
@@ -168,7 +176,6 @@ CONFIG_NET=y
168# 176#
169# Networking options 177# Networking options
170# 178#
171# CONFIG_NETDEBUG is not set
172CONFIG_PACKET=y 179CONFIG_PACKET=y
173CONFIG_PACKET_MMAP=y 180CONFIG_PACKET_MMAP=y
174CONFIG_UNIX=y 181CONFIG_UNIX=y
@@ -212,14 +219,11 @@ CONFIG_INET_TCP_DIAG=y
212CONFIG_TCP_CONG_CUBIC=y 219CONFIG_TCP_CONG_CUBIC=y
213CONFIG_DEFAULT_TCP_CONG="cubic" 220CONFIG_DEFAULT_TCP_CONG="cubic"
214# CONFIG_TCP_MD5SIG is not set 221# CONFIG_TCP_MD5SIG is not set
215
216#
217# IP: Virtual Server Configuration
218#
219# CONFIG_IP_VS is not set 222# CONFIG_IP_VS is not set
220CONFIG_IPV6=y 223CONFIG_IPV6=y
221# CONFIG_IPV6_PRIVACY is not set 224# CONFIG_IPV6_PRIVACY is not set
222# CONFIG_IPV6_ROUTER_PREF is not set 225# CONFIG_IPV6_ROUTER_PREF is not set
226# CONFIG_IPV6_OPTIMISTIC_DAD is not set
223CONFIG_INET6_AH=y 227CONFIG_INET6_AH=y
224CONFIG_INET6_ESP=y 228CONFIG_INET6_ESP=y
225CONFIG_INET6_IPCOMP=y 229CONFIG_INET6_IPCOMP=y
@@ -242,8 +246,6 @@ CONFIG_NETFILTER=y
242# 246#
243# CONFIG_NETFILTER_NETLINK is not set 247# CONFIG_NETFILTER_NETLINK is not set
244CONFIG_NF_CONNTRACK_ENABLED=m 248CONFIG_NF_CONNTRACK_ENABLED=m
245CONFIG_NF_CONNTRACK_SUPPORT=y
246# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
247CONFIG_NF_CONNTRACK=m 249CONFIG_NF_CONNTRACK=m
248CONFIG_NF_CT_ACCT=y 250CONFIG_NF_CT_ACCT=y
249CONFIG_NF_CONNTRACK_MARK=y 251CONFIG_NF_CONNTRACK_MARK=y
@@ -357,20 +359,8 @@ CONFIG_IP6_NF_TARGET_REJECT=m
357CONFIG_IP6_NF_MANGLE=m 359CONFIG_IP6_NF_MANGLE=m
358CONFIG_IP6_NF_TARGET_HL=m 360CONFIG_IP6_NF_TARGET_HL=m
359CONFIG_IP6_NF_RAW=m 361CONFIG_IP6_NF_RAW=m
360
361#
362# DCCP Configuration (EXPERIMENTAL)
363#
364# CONFIG_IP_DCCP is not set 362# CONFIG_IP_DCCP is not set
365
366#
367# SCTP Configuration (EXPERIMENTAL)
368#
369# CONFIG_IP_SCTP is not set 363# CONFIG_IP_SCTP is not set
370
371#
372# TIPC Configuration (EXPERIMENTAL)
373#
374# CONFIG_TIPC is not set 364# CONFIG_TIPC is not set
375# CONFIG_ATM is not set 365# CONFIG_ATM is not set
376# CONFIG_BRIDGE is not set 366# CONFIG_BRIDGE is not set
@@ -397,7 +387,16 @@ CONFIG_NET_CLS_ROUTE=y
397# CONFIG_HAMRADIO is not set 387# CONFIG_HAMRADIO is not set
398# CONFIG_IRDA is not set 388# CONFIG_IRDA is not set
399# CONFIG_BT is not set 389# CONFIG_BT is not set
390# CONFIG_AF_RXRPC is not set
391
392#
393# Wireless
394#
395# CONFIG_CFG80211 is not set
396# CONFIG_WIRELESS_EXT is not set
397# CONFIG_MAC80211 is not set
400# CONFIG_IEEE80211 is not set 398# CONFIG_IEEE80211 is not set
399# CONFIG_RFKILL is not set
401 400
402# 401#
403# Device Drivers 402# Device Drivers
@@ -417,10 +416,6 @@ CONFIG_STANDALONE=y
417# Connector - unified userspace <-> kernelspace linker 416# Connector - unified userspace <-> kernelspace linker
418# 417#
419# CONFIG_CONNECTOR is not set 418# CONFIG_CONNECTOR is not set
420
421#
422# Memory Technology Devices (MTD)
423#
424CONFIG_MTD=y 419CONFIG_MTD=y
425# CONFIG_MTD_DEBUG is not set 420# CONFIG_MTD_DEBUG is not set
426# CONFIG_MTD_CONCAT is not set 421# CONFIG_MTD_CONCAT is not set
@@ -464,7 +459,6 @@ CONFIG_MTD_CFI_UTIL=y
464# CONFIG_MTD_RAM is not set 459# CONFIG_MTD_RAM is not set
465# CONFIG_MTD_ROM is not set 460# CONFIG_MTD_ROM is not set
466# CONFIG_MTD_ABSENT is not set 461# CONFIG_MTD_ABSENT is not set
467# CONFIG_MTD_OBSOLETE_CHIPS is not set
468 462
469# 463#
470# Mapping drivers for chip access 464# Mapping drivers for chip access
@@ -492,16 +486,13 @@ CONFIG_MTD_DATAFLASH=y
492# CONFIG_MTD_DOC2000 is not set 486# CONFIG_MTD_DOC2000 is not set
493# CONFIG_MTD_DOC2001 is not set 487# CONFIG_MTD_DOC2001 is not set
494# CONFIG_MTD_DOC2001PLUS is not set 488# CONFIG_MTD_DOC2001PLUS is not set
495
496#
497# NAND Flash Device Drivers
498#
499# CONFIG_MTD_NAND is not set 489# CONFIG_MTD_NAND is not set
490# CONFIG_MTD_ONENAND is not set
500 491
501# 492#
502# OneNAND Flash Device Drivers 493# UBI - Unsorted block images
503# 494#
504# CONFIG_MTD_ONENAND is not set 495# CONFIG_MTD_UBI is not set
505 496
506# 497#
507# Parallel port support 498# Parallel port support
@@ -530,10 +521,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
530# 521#
531# Misc devices 522# Misc devices
532# 523#
533 524# CONFIG_BLINK is not set
534#
535# ATA/ATAPI/MFM/RLL support
536#
537# CONFIG_IDE is not set 525# CONFIG_IDE is not set
538 526
539# 527#
@@ -542,10 +530,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
542# CONFIG_RAID_ATTRS is not set 530# CONFIG_RAID_ATTRS is not set
543# CONFIG_SCSI is not set 531# CONFIG_SCSI is not set
544# CONFIG_SCSI_NETLINK is not set 532# CONFIG_SCSI_NETLINK is not set
545
546#
547# Serial ATA (prod) and Parallel ATA (experimental) drivers
548#
549# CONFIG_ATA is not set 533# CONFIG_ATA is not set
550 534
551# 535#
@@ -554,19 +538,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
554# CONFIG_MD is not set 538# CONFIG_MD is not set
555 539
556# 540#
557# Fusion MPT device support
558#
559# CONFIG_FUSION is not set
560
561#
562# IEEE 1394 (FireWire) support
563#
564
565#
566# I2O device support
567#
568
569#
570# Network device support 541# Network device support
571# 542#
572CONFIG_NETDEVICES=y 543CONFIG_NETDEVICES=y
@@ -574,10 +545,6 @@ CONFIG_NETDEVICES=y
574# CONFIG_BONDING is not set 545# CONFIG_BONDING is not set
575# CONFIG_EQUALIZER is not set 546# CONFIG_EQUALIZER is not set
576CONFIG_TUN=m 547CONFIG_TUN=m
577
578#
579# PHY device support
580#
581# CONFIG_PHYLIB is not set 548# CONFIG_PHYLIB is not set
582 549
583# 550#
@@ -586,27 +553,14 @@ CONFIG_TUN=m
586CONFIG_NET_ETHERNET=y 553CONFIG_NET_ETHERNET=y
587CONFIG_MII=y 554CONFIG_MII=y
588CONFIG_MACB=y 555CONFIG_MACB=y
556# CONFIG_NETDEV_1000 is not set
557# CONFIG_NETDEV_10000 is not set
589 558
590# 559#
591# Ethernet (1000 Mbit) 560# Wireless LAN
592#
593
594#
595# Ethernet (10000 Mbit)
596#
597
598#
599# Token Ring devices
600#
601
602#
603# Wireless LAN (non-hamradio)
604#
605# CONFIG_NET_RADIO is not set
606
607#
608# Wan interfaces
609# 561#
562# CONFIG_WLAN_PRE80211 is not set
563# CONFIG_WLAN_80211 is not set
610# CONFIG_WAN is not set 564# CONFIG_WAN is not set
611CONFIG_PPP=m 565CONFIG_PPP=m
612# CONFIG_PPP_MULTILINK is not set 566# CONFIG_PPP_MULTILINK is not set
@@ -671,15 +625,10 @@ CONFIG_UNIX98_PTYS=y
671# IPMI 625# IPMI
672# 626#
673# CONFIG_IPMI_HANDLER is not set 627# CONFIG_IPMI_HANDLER is not set
674
675#
676# Watchdog Cards
677#
678# CONFIG_WATCHDOG is not set 628# CONFIG_WATCHDOG is not set
679# CONFIG_HW_RANDOM is not set 629# CONFIG_HW_RANDOM is not set
680# CONFIG_RTC is not set 630# CONFIG_RTC is not set
681# CONFIG_GEN_RTC is not set 631# CONFIG_GEN_RTC is not set
682# CONFIG_DTLK is not set
683# CONFIG_R3964 is not set 632# CONFIG_R3964 is not set
684# CONFIG_RAW_DRIVER is not set 633# CONFIG_RAW_DRIVER is not set
685 634
@@ -687,10 +636,6 @@ CONFIG_UNIX98_PTYS=y
687# TPM devices 636# TPM devices
688# 637#
689# CONFIG_TCG_TPM is not set 638# CONFIG_TCG_TPM is not set
690
691#
692# I2C support
693#
694# CONFIG_I2C is not set 639# CONFIG_I2C is not set
695 640
696# 641#
@@ -710,17 +655,13 @@ CONFIG_SPI_ATMEL=y
710# SPI Protocol Masters 655# SPI Protocol Masters
711# 656#
712# CONFIG_SPI_AT25 is not set 657# CONFIG_SPI_AT25 is not set
658# CONFIG_SPI_SPIDEV is not set
713 659
714# 660#
715# Dallas's 1-wire bus 661# Dallas's 1-wire bus
716# 662#
717# CONFIG_W1 is not set 663# CONFIG_W1 is not set
718
719#
720# Hardware Monitoring support
721#
722# CONFIG_HWMON is not set 664# CONFIG_HWMON is not set
723# CONFIG_HWMON_VID is not set
724 665
725# 666#
726# Multifunction device drivers 667# Multifunction device drivers
@@ -731,16 +672,19 @@ CONFIG_SPI_ATMEL=y
731# Multimedia devices 672# Multimedia devices
732# 673#
733# CONFIG_VIDEO_DEV is not set 674# CONFIG_VIDEO_DEV is not set
675# CONFIG_DVB_CORE is not set
676# CONFIG_DAB is not set
734 677
735# 678#
736# Digital Video Broadcasting Devices 679# Graphics support
737# 680#
738# CONFIG_DVB is not set 681# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
739 682
740# 683#
741# Graphics support 684# Display device support
742# 685#
743# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 686# CONFIG_DISPLAY_SUPPORT is not set
687# CONFIG_VGASTATE is not set
744# CONFIG_FB is not set 688# CONFIG_FB is not set
745 689
746# 690#
@@ -763,10 +707,6 @@ CONFIG_SPI_ATMEL=y
763# USB Gadget Support 707# USB Gadget Support
764# 708#
765# CONFIG_USB_GADGET is not set 709# CONFIG_USB_GADGET is not set
766
767#
768# MMC/SD Card support
769#
770# CONFIG_MMC is not set 710# CONFIG_MMC is not set
771 711
772# 712#
@@ -809,14 +749,6 @@ CONFIG_SPI_ATMEL=y
809# 749#
810 750
811# 751#
812# Auxiliary Display support
813#
814
815#
816# Virtualization
817#
818
819#
820# File systems 752# File systems
821# 753#
822CONFIG_EXT2_FS=y 754CONFIG_EXT2_FS=y
@@ -911,6 +843,7 @@ CONFIG_LOCKD=y
911CONFIG_LOCKD_V4=y 843CONFIG_LOCKD_V4=y
912CONFIG_NFS_COMMON=y 844CONFIG_NFS_COMMON=y
913CONFIG_SUNRPC=y 845CONFIG_SUNRPC=y
846# CONFIG_SUNRPC_BIND34 is not set
914# CONFIG_RPCSEC_GSS_KRB5 is not set 847# CONFIG_RPCSEC_GSS_KRB5 is not set
915# CONFIG_RPCSEC_GSS_SPKM3 is not set 848# CONFIG_RPCSEC_GSS_SPKM3 is not set
916CONFIG_SMB_FS=m 849CONFIG_SMB_FS=m
@@ -993,11 +926,9 @@ CONFIG_MAGIC_SYSRQ=y
993# CONFIG_HEADERS_CHECK is not set 926# CONFIG_HEADERS_CHECK is not set
994CONFIG_DEBUG_KERNEL=y 927CONFIG_DEBUG_KERNEL=y
995# CONFIG_DEBUG_SHIRQ is not set 928# CONFIG_DEBUG_SHIRQ is not set
996CONFIG_LOG_BUF_SHIFT=14
997CONFIG_DETECT_SOFTLOCKUP=y 929CONFIG_DETECT_SOFTLOCKUP=y
998# CONFIG_SCHEDSTATS is not set 930# CONFIG_SCHEDSTATS is not set
999# CONFIG_TIMER_STATS is not set 931# CONFIG_TIMER_STATS is not set
1000# CONFIG_DEBUG_SLAB is not set
1001# CONFIG_DEBUG_RT_MUTEXES is not set 932# CONFIG_DEBUG_RT_MUTEXES is not set
1002# CONFIG_RT_MUTEX_TESTER is not set 933# CONFIG_RT_MUTEX_TESTER is not set
1003# CONFIG_DEBUG_SPINLOCK is not set 934# CONFIG_DEBUG_SPINLOCK is not set
@@ -1044,6 +975,7 @@ CONFIG_CRYPTO_ECB=m
1044CONFIG_CRYPTO_CBC=y 975CONFIG_CRYPTO_CBC=y
1045CONFIG_CRYPTO_PCBC=m 976CONFIG_CRYPTO_PCBC=m
1046# CONFIG_CRYPTO_LRW is not set 977# CONFIG_CRYPTO_LRW is not set
978# CONFIG_CRYPTO_CRYPTD is not set
1047CONFIG_CRYPTO_DES=y 979CONFIG_CRYPTO_DES=y
1048# CONFIG_CRYPTO_FCRYPT is not set 980# CONFIG_CRYPTO_FCRYPT is not set
1049# CONFIG_CRYPTO_BLOWFISH is not set 981# CONFIG_CRYPTO_BLOWFISH is not set
@@ -1072,6 +1004,7 @@ CONFIG_CRYPTO_DEFLATE=y
1072CONFIG_BITREVERSE=y 1004CONFIG_BITREVERSE=y
1073CONFIG_CRC_CCITT=m 1005CONFIG_CRC_CCITT=m
1074# CONFIG_CRC16 is not set 1006# CONFIG_CRC16 is not set
1007# CONFIG_CRC_ITU_T is not set
1075CONFIG_CRC32=y 1008CONFIG_CRC32=y
1076# CONFIG_LIBCRC32C is not set 1009# CONFIG_LIBCRC32C is not set
1077CONFIG_ZLIB_INFLATE=y 1010CONFIG_ZLIB_INFLATE=y
@@ -1083,3 +1016,4 @@ CONFIG_TEXTSEARCH_FSM=m
1083CONFIG_PLIST=y 1016CONFIG_PLIST=y
1084CONFIG_HAS_IOMEM=y 1017CONFIG_HAS_IOMEM=y
1085CONFIG_HAS_IOPORT=y 1018CONFIG_HAS_IOPORT=y
1019CONFIG_HAS_DMA=y
diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig
index 77dace9d54bc..3b977fdbaa78 100644
--- a/arch/avr32/configs/atstk1002_defconfig
+++ b/arch/avr32/configs/atstk1002_defconfig
@@ -1,9 +1,10 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc6 3# Linux kernel version: 2.6.22-rc5
4# Fri Jan 26 13:12:59 2007 4# Sat Jun 23 15:32:08 2007
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y
7CONFIG_GENERIC_HARDIRQS=y 8CONFIG_GENERIC_HARDIRQS=y
8CONFIG_HARDIRQS_SW_RESEND=y 9CONFIG_HARDIRQS_SW_RESEND=y
9CONFIG_GENERIC_IRQ_PROBE=y 10CONFIG_GENERIC_IRQ_PROBE=y
@@ -13,6 +14,7 @@ CONFIG_GENERIC_TIME=y
13# CONFIG_ARCH_HAS_ILOG2_U64 is not set 14# CONFIG_ARCH_HAS_ILOG2_U64 is not set
14CONFIG_GENERIC_HWEIGHT=y 15CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 16CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_BUG=y
16CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 18CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
17 19
18# 20#
@@ -30,19 +32,22 @@ CONFIG_LOCALVERSION=""
30CONFIG_SWAP=y 32CONFIG_SWAP=y
31CONFIG_SYSVIPC=y 33CONFIG_SYSVIPC=y
32# CONFIG_IPC_NS is not set 34# CONFIG_IPC_NS is not set
35CONFIG_SYSVIPC_SYSCTL=y
33CONFIG_POSIX_MQUEUE=y 36CONFIG_POSIX_MQUEUE=y
34CONFIG_BSD_PROCESS_ACCT=y 37CONFIG_BSD_PROCESS_ACCT=y
35CONFIG_BSD_PROCESS_ACCT_V3=y 38CONFIG_BSD_PROCESS_ACCT_V3=y
36CONFIG_TASKSTATS=y 39CONFIG_TASKSTATS=y
37CONFIG_TASK_DELAY_ACCT=y 40CONFIG_TASK_DELAY_ACCT=y
41# CONFIG_TASK_XACCT is not set
38# CONFIG_UTS_NS is not set 42# CONFIG_UTS_NS is not set
39CONFIG_AUDIT=y 43CONFIG_AUDIT=y
40# CONFIG_IKCONFIG is not set 44# CONFIG_IKCONFIG is not set
45CONFIG_LOG_BUF_SHIFT=14
41CONFIG_SYSFS_DEPRECATED=y 46CONFIG_SYSFS_DEPRECATED=y
42CONFIG_RELAY=y 47CONFIG_RELAY=y
48CONFIG_BLK_DEV_INITRD=y
43CONFIG_INITRAMFS_SOURCE="" 49CONFIG_INITRAMFS_SOURCE=""
44CONFIG_CC_OPTIMIZE_FOR_SIZE=y 50CONFIG_CC_OPTIMIZE_FOR_SIZE=y
45# CONFIG_TASK_XACCT is not set
46CONFIG_SYSCTL=y 51CONFIG_SYSCTL=y
47CONFIG_EMBEDDED=y 52CONFIG_EMBEDDED=y
48# CONFIG_SYSCTL_SYSCALL is not set 53# CONFIG_SYSCTL_SYSCALL is not set
@@ -55,14 +60,20 @@ CONFIG_BUG=y
55CONFIG_ELF_CORE=y 60CONFIG_ELF_CORE=y
56# CONFIG_BASE_FULL is not set 61# CONFIG_BASE_FULL is not set
57CONFIG_FUTEX=y 62CONFIG_FUTEX=y
63CONFIG_ANON_INODES=y
58CONFIG_EPOLL=y 64CONFIG_EPOLL=y
65CONFIG_SIGNALFD=y
66CONFIG_TIMERFD=y
67CONFIG_EVENTFD=y
59CONFIG_SHMEM=y 68CONFIG_SHMEM=y
60CONFIG_SLAB=y
61CONFIG_VM_EVENT_COUNTERS=y 69CONFIG_VM_EVENT_COUNTERS=y
70# CONFIG_SLUB_DEBUG is not set
71# CONFIG_SLAB is not set
72CONFIG_SLUB=y
73# CONFIG_SLOB is not set
62CONFIG_RT_MUTEXES=y 74CONFIG_RT_MUTEXES=y
63# CONFIG_TINY_SHMEM is not set 75# CONFIG_TINY_SHMEM is not set
64CONFIG_BASE_SMALL=1 76CONFIG_BASE_SMALL=1
65# CONFIG_SLOB is not set
66 77
67# 78#
68# Loadable module support 79# Loadable module support
@@ -105,7 +116,15 @@ CONFIG_PLATFORM_AT32AP=y
105CONFIG_CPU_AT32AP7000=y 116CONFIG_CPU_AT32AP7000=y
106CONFIG_BOARD_ATSTK1002=y 117CONFIG_BOARD_ATSTK1002=y
107CONFIG_BOARD_ATSTK1000=y 118CONFIG_BOARD_ATSTK1000=y
119# CONFIG_BOARD_ATNGW100 is not set
108CONFIG_LOADER_U_BOOT=y 120CONFIG_LOADER_U_BOOT=y
121
122#
123# Atmel AVR32 AP options
124#
125# CONFIG_AP7000_32_BIT_SMC is not set
126CONFIG_AP7000_16_BIT_SMC=y
127# CONFIG_AP7000_8_BIT_SMC is not set
109CONFIG_LOAD_ADDRESS=0x10000000 128CONFIG_LOAD_ADDRESS=0x10000000
110CONFIG_ENTRY_ADDRESS=0x90000000 129CONFIG_ENTRY_ADDRESS=0x90000000
111CONFIG_PHYS_OFFSET=0x10000000 130CONFIG_PHYS_OFFSET=0x10000000
@@ -127,6 +146,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
127# CONFIG_SPARSEMEM_STATIC is not set 146# CONFIG_SPARSEMEM_STATIC is not set
128CONFIG_SPLIT_PTLOCK_CPUS=4 147CONFIG_SPLIT_PTLOCK_CPUS=4
129# CONFIG_RESOURCES_64BIT is not set 148# CONFIG_RESOURCES_64BIT is not set
149CONFIG_ZONE_DMA_FLAG=0
130# CONFIG_OWNERSHIP_TRACE is not set 150# CONFIG_OWNERSHIP_TRACE is not set
131# CONFIG_HZ_100 is not set 151# CONFIG_HZ_100 is not set
132CONFIG_HZ_250=y 152CONFIG_HZ_250=y
@@ -138,6 +158,7 @@ CONFIG_CMDLINE=""
138# 158#
139# Bus options 159# Bus options
140# 160#
161# CONFIG_ARCH_SUPPORTS_MSI is not set
141 162
142# 163#
143# PCCARD (PCMCIA/CardBus) support 164# PCCARD (PCMCIA/CardBus) support
@@ -158,7 +179,6 @@ CONFIG_NET=y
158# 179#
159# Networking options 180# Networking options
160# 181#
161# CONFIG_NETDEBUG is not set
162CONFIG_PACKET=y 182CONFIG_PACKET=y
163CONFIG_PACKET_MMAP=y 183CONFIG_PACKET_MMAP=y
164CONFIG_UNIX=y 184CONFIG_UNIX=y
@@ -194,20 +214,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
194# CONFIG_INET6_TUNNEL is not set 214# CONFIG_INET6_TUNNEL is not set
195# CONFIG_NETWORK_SECMARK is not set 215# CONFIG_NETWORK_SECMARK is not set
196# CONFIG_NETFILTER is not set 216# CONFIG_NETFILTER is not set
197
198#
199# DCCP Configuration (EXPERIMENTAL)
200#
201# CONFIG_IP_DCCP is not set 217# CONFIG_IP_DCCP is not set
202
203#
204# SCTP Configuration (EXPERIMENTAL)
205#
206# CONFIG_IP_SCTP is not set 218# CONFIG_IP_SCTP is not set
207
208#
209# TIPC Configuration (EXPERIMENTAL)
210#
211# CONFIG_TIPC is not set 219# CONFIG_TIPC is not set
212# CONFIG_ATM is not set 220# CONFIG_ATM is not set
213# CONFIG_BRIDGE is not set 221# CONFIG_BRIDGE is not set
@@ -233,7 +241,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
233# CONFIG_HAMRADIO is not set 241# CONFIG_HAMRADIO is not set
234# CONFIG_IRDA is not set 242# CONFIG_IRDA is not set
235# CONFIG_BT is not set 243# CONFIG_BT is not set
244# CONFIG_AF_RXRPC is not set
245
246#
247# Wireless
248#
249# CONFIG_CFG80211 is not set
250# CONFIG_WIRELESS_EXT is not set
251# CONFIG_MAC80211 is not set
236# CONFIG_IEEE80211 is not set 252# CONFIG_IEEE80211 is not set
253# CONFIG_RFKILL is not set
237 254
238# 255#
239# Device Drivers 256# Device Drivers
@@ -246,16 +263,13 @@ CONFIG_STANDALONE=y
246# CONFIG_PREVENT_FIRMWARE_BUILD is not set 263# CONFIG_PREVENT_FIRMWARE_BUILD is not set
247# CONFIG_FW_LOADER is not set 264# CONFIG_FW_LOADER is not set
248# CONFIG_DEBUG_DRIVER is not set 265# CONFIG_DEBUG_DRIVER is not set
266# CONFIG_DEBUG_DEVRES is not set
249# CONFIG_SYS_HYPERVISOR is not set 267# CONFIG_SYS_HYPERVISOR is not set
250 268
251# 269#
252# Connector - unified userspace <-> kernelspace linker 270# Connector - unified userspace <-> kernelspace linker
253# 271#
254# CONFIG_CONNECTOR is not set 272# CONFIG_CONNECTOR is not set
255
256#
257# Memory Technology Devices (MTD)
258#
259CONFIG_MTD=y 273CONFIG_MTD=y
260# CONFIG_MTD_DEBUG is not set 274# CONFIG_MTD_DEBUG is not set
261# CONFIG_MTD_CONCAT is not set 275# CONFIG_MTD_CONCAT is not set
@@ -299,7 +313,6 @@ CONFIG_MTD_CFI_UTIL=y
299# CONFIG_MTD_RAM is not set 313# CONFIG_MTD_RAM is not set
300# CONFIG_MTD_ROM is not set 314# CONFIG_MTD_ROM is not set
301# CONFIG_MTD_ABSENT is not set 315# CONFIG_MTD_ABSENT is not set
302# CONFIG_MTD_OBSOLETE_CHIPS is not set
303 316
304# 317#
305# Mapping drivers for chip access 318# Mapping drivers for chip access
@@ -325,16 +338,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
325# CONFIG_MTD_DOC2000 is not set 338# CONFIG_MTD_DOC2000 is not set
326# CONFIG_MTD_DOC2001 is not set 339# CONFIG_MTD_DOC2001 is not set
327# CONFIG_MTD_DOC2001PLUS is not set 340# CONFIG_MTD_DOC2001PLUS is not set
328
329#
330# NAND Flash Device Drivers
331#
332# CONFIG_MTD_NAND is not set 341# CONFIG_MTD_NAND is not set
342# CONFIG_MTD_ONENAND is not set
333 343
334# 344#
335# OneNAND Flash Device Drivers 345# UBI - Unsorted block images
336# 346#
337# CONFIG_MTD_ONENAND is not set 347# CONFIG_MTD_UBI is not set
338 348
339# 349#
340# Parallel port support 350# Parallel port support
@@ -344,6 +354,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
344# 354#
345# Plug and Play support 355# Plug and Play support
346# 356#
357# CONFIG_PNPACPI is not set
347 358
348# 359#
349# Block devices 360# Block devices
@@ -356,18 +367,13 @@ CONFIG_BLK_DEV_RAM=m
356CONFIG_BLK_DEV_RAM_COUNT=16 367CONFIG_BLK_DEV_RAM_COUNT=16
357CONFIG_BLK_DEV_RAM_SIZE=4096 368CONFIG_BLK_DEV_RAM_SIZE=4096
358CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 369CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
359CONFIG_BLK_DEV_INITRD=y
360# CONFIG_CDROM_PKTCDVD is not set 370# CONFIG_CDROM_PKTCDVD is not set
361# CONFIG_ATA_OVER_ETH is not set 371# CONFIG_ATA_OVER_ETH is not set
362 372
363# 373#
364# Misc devices 374# Misc devices
365# 375#
366# CONFIG_TIFM_CORE is not set 376# CONFIG_BLINK is not set
367
368#
369# ATA/ATAPI/MFM/RLL support
370#
371# CONFIG_IDE is not set 377# CONFIG_IDE is not set
372 378
373# 379#
@@ -376,10 +382,6 @@ CONFIG_BLK_DEV_INITRD=y
376# CONFIG_RAID_ATTRS is not set 382# CONFIG_RAID_ATTRS is not set
377# CONFIG_SCSI is not set 383# CONFIG_SCSI is not set
378# CONFIG_SCSI_NETLINK is not set 384# CONFIG_SCSI_NETLINK is not set
379
380#
381# Serial ATA (prod) and Parallel ATA (experimental) drivers
382#
383# CONFIG_ATA is not set 385# CONFIG_ATA is not set
384 386
385# 387#
@@ -388,19 +390,6 @@ CONFIG_BLK_DEV_INITRD=y
388# CONFIG_MD is not set 390# CONFIG_MD is not set
389 391
390# 392#
391# Fusion MPT device support
392#
393# CONFIG_FUSION is not set
394
395#
396# IEEE 1394 (FireWire) support
397#
398
399#
400# I2O device support
401#
402
403#
404# Network device support 393# Network device support
405# 394#
406CONFIG_NETDEVICES=y 395CONFIG_NETDEVICES=y
@@ -408,10 +397,6 @@ CONFIG_DUMMY=y
408# CONFIG_BONDING is not set 397# CONFIG_BONDING is not set
409# CONFIG_EQUALIZER is not set 398# CONFIG_EQUALIZER is not set
410CONFIG_TUN=m 399CONFIG_TUN=m
411
412#
413# PHY device support
414#
415# CONFIG_PHYLIB is not set 400# CONFIG_PHYLIB is not set
416 401
417# 402#
@@ -420,27 +405,14 @@ CONFIG_TUN=m
420CONFIG_NET_ETHERNET=y 405CONFIG_NET_ETHERNET=y
421CONFIG_MII=y 406CONFIG_MII=y
422CONFIG_MACB=y 407CONFIG_MACB=y
408# CONFIG_NETDEV_1000 is not set
409# CONFIG_NETDEV_10000 is not set
423 410
424# 411#
425# Ethernet (1000 Mbit) 412# Wireless LAN
426#
427
428#
429# Ethernet (10000 Mbit)
430#
431
432#
433# Token Ring devices
434#
435
436#
437# Wireless LAN (non-hamradio)
438#
439# CONFIG_NET_RADIO is not set
440
441#
442# Wan interfaces
443# 413#
414# CONFIG_WLAN_PRE80211 is not set
415# CONFIG_WLAN_80211 is not set
444# CONFIG_WAN is not set 416# CONFIG_WAN is not set
445CONFIG_PPP=m 417CONFIG_PPP=m
446# CONFIG_PPP_MULTILINK is not set 418# CONFIG_PPP_MULTILINK is not set
@@ -505,15 +477,10 @@ CONFIG_UNIX98_PTYS=y
505# IPMI 477# IPMI
506# 478#
507# CONFIG_IPMI_HANDLER is not set 479# CONFIG_IPMI_HANDLER is not set
508
509#
510# Watchdog Cards
511#
512# CONFIG_WATCHDOG is not set 480# CONFIG_WATCHDOG is not set
513# CONFIG_HW_RANDOM is not set 481# CONFIG_HW_RANDOM is not set
514# CONFIG_RTC is not set 482# CONFIG_RTC is not set
515# CONFIG_GEN_RTC is not set 483# CONFIG_GEN_RTC is not set
516# CONFIG_DTLK is not set
517# CONFIG_R3964 is not set 484# CONFIG_R3964 is not set
518# CONFIG_RAW_DRIVER is not set 485# CONFIG_RAW_DRIVER is not set
519 486
@@ -521,10 +488,6 @@ CONFIG_UNIX98_PTYS=y
521# TPM devices 488# TPM devices
522# 489#
523# CONFIG_TCG_TPM is not set 490# CONFIG_TCG_TPM is not set
524
525#
526# I2C support
527#
528# CONFIG_I2C is not set 491# CONFIG_I2C is not set
529 492
530# 493#
@@ -537,29 +500,31 @@ CONFIG_UNIX98_PTYS=y
537# Dallas's 1-wire bus 500# Dallas's 1-wire bus
538# 501#
539# CONFIG_W1 is not set 502# CONFIG_W1 is not set
503# CONFIG_HWMON is not set
540 504
541# 505#
542# Hardware Monitoring support 506# Multifunction device drivers
543# 507#
544# CONFIG_HWMON is not set 508# CONFIG_MFD_SM501 is not set
545# CONFIG_HWMON_VID is not set
546 509
547# 510#
548# Multimedia devices 511# Multimedia devices
549# 512#
550# CONFIG_VIDEO_DEV is not set 513# CONFIG_VIDEO_DEV is not set
514# CONFIG_DVB_CORE is not set
515# CONFIG_DAB is not set
551 516
552# 517#
553# Digital Video Broadcasting Devices 518# Graphics support
554# 519#
555# CONFIG_DVB is not set 520# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
556 521
557# 522#
558# Graphics support 523# Display device support
559# 524#
560# CONFIG_FIRMWARE_EDID is not set 525# CONFIG_DISPLAY_SUPPORT is not set
526# CONFIG_VGASTATE is not set
561# CONFIG_FB is not set 527# CONFIG_FB is not set
562# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
563 528
564# 529#
565# Sound 530# Sound
@@ -581,10 +546,6 @@ CONFIG_UNIX98_PTYS=y
581# USB Gadget Support 546# USB Gadget Support
582# 547#
583# CONFIG_USB_GADGET is not set 548# CONFIG_USB_GADGET is not set
584
585#
586# MMC/SD Card support
587#
588# CONFIG_MMC is not set 549# CONFIG_MMC is not set
589 550
590# 551#
@@ -627,10 +588,6 @@ CONFIG_UNIX98_PTYS=y
627# 588#
628 589
629# 590#
630# Virtualization
631#
632
633#
634# File systems 591# File systems
635# 592#
636CONFIG_EXT2_FS=m 593CONFIG_EXT2_FS=m
@@ -712,8 +669,20 @@ CONFIG_JFFS2_RTIME=y
712# 669#
713# Network File Systems 670# Network File Systems
714# 671#
715# CONFIG_NFS_FS is not set 672CONFIG_NFS_FS=y
673CONFIG_NFS_V3=y
674# CONFIG_NFS_V3_ACL is not set
675# CONFIG_NFS_V4 is not set
676# CONFIG_NFS_DIRECTIO is not set
716# CONFIG_NFSD is not set 677# CONFIG_NFSD is not set
678CONFIG_ROOT_NFS=y
679CONFIG_LOCKD=y
680CONFIG_LOCKD_V4=y
681CONFIG_NFS_COMMON=y
682CONFIG_SUNRPC=y
683# CONFIG_SUNRPC_BIND34 is not set
684# CONFIG_RPCSEC_GSS_KRB5 is not set
685# CONFIG_RPCSEC_GSS_SPKM3 is not set
717# CONFIG_SMB_FS is not set 686# CONFIG_SMB_FS is not set
718# CONFIG_CIFS is not set 687# CONFIG_CIFS is not set
719# CONFIG_NCP_FS is not set 688# CONFIG_NCP_FS is not set
@@ -787,15 +756,14 @@ CONFIG_MAGIC_SYSRQ=y
787CONFIG_DEBUG_FS=y 756CONFIG_DEBUG_FS=y
788# CONFIG_HEADERS_CHECK is not set 757# CONFIG_HEADERS_CHECK is not set
789CONFIG_DEBUG_KERNEL=y 758CONFIG_DEBUG_KERNEL=y
790CONFIG_LOG_BUF_SHIFT=14 759# CONFIG_DEBUG_SHIRQ is not set
791CONFIG_DETECT_SOFTLOCKUP=y 760CONFIG_DETECT_SOFTLOCKUP=y
792# CONFIG_SCHEDSTATS is not set 761# CONFIG_SCHEDSTATS is not set
793# CONFIG_DEBUG_SLAB is not set 762# CONFIG_TIMER_STATS is not set
794# CONFIG_DEBUG_RT_MUTEXES is not set 763# CONFIG_DEBUG_RT_MUTEXES is not set
795# CONFIG_RT_MUTEX_TESTER is not set 764# CONFIG_RT_MUTEX_TESTER is not set
796# CONFIG_DEBUG_SPINLOCK is not set 765# CONFIG_DEBUG_SPINLOCK is not set
797# CONFIG_DEBUG_MUTEXES is not set 766# CONFIG_DEBUG_MUTEXES is not set
798# CONFIG_DEBUG_RWSEMS is not set
799# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 767# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
800# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 768# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
801# CONFIG_DEBUG_KOBJECT is not set 769# CONFIG_DEBUG_KOBJECT is not set
@@ -806,6 +774,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
806CONFIG_FRAME_POINTER=y 774CONFIG_FRAME_POINTER=y
807CONFIG_FORCED_INLINING=y 775CONFIG_FORCED_INLINING=y
808# CONFIG_RCU_TORTURE_TEST is not set 776# CONFIG_RCU_TORTURE_TEST is not set
777# CONFIG_FAULT_INJECTION is not set
809# CONFIG_KPROBES is not set 778# CONFIG_KPROBES is not set
810 779
811# 780#
@@ -825,10 +794,13 @@ CONFIG_FORCED_INLINING=y
825CONFIG_BITREVERSE=y 794CONFIG_BITREVERSE=y
826CONFIG_CRC_CCITT=m 795CONFIG_CRC_CCITT=m
827# CONFIG_CRC16 is not set 796# CONFIG_CRC16 is not set
797# CONFIG_CRC_ITU_T is not set
828CONFIG_CRC32=y 798CONFIG_CRC32=y
829# CONFIG_LIBCRC32C is not set 799# CONFIG_LIBCRC32C is not set
830CONFIG_AUDIT_GENERIC=y 800CONFIG_AUDIT_GENERIC=y
831CONFIG_ZLIB_INFLATE=y 801CONFIG_ZLIB_INFLATE=y
832CONFIG_ZLIB_DEFLATE=y 802CONFIG_ZLIB_DEFLATE=y
833CONFIG_PLIST=y 803CONFIG_PLIST=y
834CONFIG_IOMAP_COPY=y 804CONFIG_HAS_IOMEM=y
805CONFIG_HAS_IOPORT=y
806CONFIG_HAS_DMA=y
diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c
index 3c36c2d16148..39060cbeb2a3 100644
--- a/arch/avr32/kernel/ptrace.c
+++ b/arch/avr32/kernel/ptrace.c
@@ -153,7 +153,6 @@ static int ptrace_setregs(struct task_struct *tsk, const void __user *uregs)
153 153
154long arch_ptrace(struct task_struct *child, long request, long addr, long data) 154long arch_ptrace(struct task_struct *child, long request, long addr, long data)
155{ 155{
156 unsigned long tmp;
157 int ret; 156 int ret;
158 157
159 pr_debug("arch_ptrace(%ld, %d, %#lx, %#lx)\n", 158 pr_debug("arch_ptrace(%ld, %d, %#lx, %#lx)\n",
@@ -166,11 +165,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
166 /* Read the word at location addr in the child process */ 165 /* Read the word at location addr in the child process */
167 case PTRACE_PEEKTEXT: 166 case PTRACE_PEEKTEXT:
168 case PTRACE_PEEKDATA: 167 case PTRACE_PEEKDATA:
169 ret = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); 168 ret = generic_ptrace_peekdata(child, addr, data);
170 if (ret == sizeof(tmp))
171 ret = put_user(tmp, (unsigned long __user *)data);
172 else
173 ret = -EIO;
174 break; 169 break;
175 170
176 case PTRACE_PEEKUSR: 171 case PTRACE_PEEKUSR:
@@ -181,11 +176,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
181 /* Write the word in data at location addr */ 176 /* Write the word in data at location addr */
182 case PTRACE_POKETEXT: 177 case PTRACE_POKETEXT:
183 case PTRACE_POKEDATA: 178 case PTRACE_POKEDATA:
184 ret = access_process_vm(child, addr, &data, sizeof(data), 1); 179 ret = generic_ptrace_pokedata(child, addr, data);
185 if (ret == sizeof(data))
186 ret = 0;
187 else
188 ret = -EIO;
189 break; 180 break;
190 181
191 case PTRACE_POKEUSR: 182 case PTRACE_POKEUSR:
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c
index b279d66acf5f..d08b0bc6b2bb 100644
--- a/arch/avr32/kernel/setup.c
+++ b/arch/avr32/kernel/setup.c
@@ -313,7 +313,7 @@ __tagtable(ATAG_MEM, parse_tag_mem);
313 313
314static int __init parse_tag_rdimg(struct tag *tag) 314static int __init parse_tag_rdimg(struct tag *tag)
315{ 315{
316#ifdef CONFIG_INITRD 316#ifdef CONFIG_BLK_DEV_INITRD
317 struct tag_mem_range *mem = &tag->u.mem_range; 317 struct tag_mem_range *mem = &tag->u.mem_range;
318 int ret; 318 int ret;
319 319
@@ -323,7 +323,7 @@ static int __init parse_tag_rdimg(struct tag *tag)
323 return 0; 323 return 0;
324 } 324 }
325 325
326 ret = add_reserved_region(mem->start, mem->start + mem->size - 1, 326 ret = add_reserved_region(mem->addr, mem->addr + mem->size - 1,
327 "initrd"); 327 "initrd");
328 if (ret) { 328 if (ret) {
329 printk(KERN_WARNING 329 printk(KERN_WARNING
diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c
index 86d107511dd4..9a73ce7eb50f 100644
--- a/arch/avr32/kernel/traps.c
+++ b/arch/avr32/kernel/traps.c
@@ -56,6 +56,7 @@ void NORET_TYPE die(const char *str, struct pt_regs *regs, long err)
56 show_regs_log_lvl(regs, KERN_EMERG); 56 show_regs_log_lvl(regs, KERN_EMERG);
57 show_stack_log_lvl(current, regs->sp, regs, KERN_EMERG); 57 show_stack_log_lvl(current, regs->sp, regs, KERN_EMERG);
58 bust_spinlocks(0); 58 bust_spinlocks(0);
59 add_taint(TAINT_DIE);
59 spin_unlock_irq(&die_lock); 60 spin_unlock_irq(&die_lock);
60 61
61 if (in_interrupt()) 62 if (in_interrupt())
@@ -184,7 +185,7 @@ asmlinkage void do_illegal_opcode(unsigned long ecr, struct pt_regs *regs)
184 if (!user_mode(regs) && (ecr == ECR_ILLEGAL_OPCODE)) { 185 if (!user_mode(regs) && (ecr == ECR_ILLEGAL_OPCODE)) {
185 enum bug_trap_type type; 186 enum bug_trap_type type;
186 187
187 type = report_bug(regs->pc); 188 type = report_bug(regs->pc, regs);
188 switch (type) { 189 switch (type) {
189 case BUG_TRAP_TYPE_NONE: 190 case BUG_TRAP_TYPE_NONE:
190 break; 191 break;
diff --git a/arch/avr32/mach-at32ap/Makefile b/arch/avr32/mach-at32ap/Makefile
index f1d395724ac6..a8b445046e3e 100644
--- a/arch/avr32/mach-at32ap/Makefile
+++ b/arch/avr32/mach-at32ap/Makefile
@@ -1,3 +1,4 @@
1obj-y += at32ap.o clock.o intc.o extint.o pio.o hsmc.o 1obj-y += at32ap.o clock.o intc.o extint.o pio.o hsmc.o
2obj-$(CONFIG_CPU_AT32AP7000) += at32ap7000.o 2obj-$(CONFIG_CPU_AT32AP7000) += at32ap7000.o
3obj-$(CONFIG_CPU_AT32AP7000) += time-tc.o 3obj-$(CONFIG_CPU_AT32AP7000) += time-tc.o
4obj-$(CONFIG_CPU_FREQ_AT32AP) += cpufreq.o
diff --git a/arch/avr32/mach-at32ap/at32ap.c b/arch/avr32/mach-at32ap/at32ap.c
index 90f207e8e96d..7c4987f3287a 100644
--- a/arch/avr32/mach-at32ap/at32ap.c
+++ b/arch/avr32/mach-at32ap/at32ap.c
@@ -11,41 +11,10 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13 13
14#include <asm/io.h>
15
16#include <asm/arch/init.h> 14#include <asm/arch/init.h>
17#include <asm/arch/sm.h>
18
19struct at32_sm system_manager;
20
21static int __init at32_sm_init(void)
22{
23 struct resource *regs;
24 struct at32_sm *sm = &system_manager;
25 int ret = -ENXIO;
26
27 regs = platform_get_resource(&at32_sm_device, IORESOURCE_MEM, 0);
28 if (!regs)
29 goto fail;
30
31 spin_lock_init(&sm->lock);
32 sm->pdev = &at32_sm_device;
33
34 ret = -ENOMEM;
35 sm->regs = ioremap(regs->start, regs->end - regs->start + 1);
36 if (!sm->regs)
37 goto fail;
38
39 return 0;
40
41fail:
42 printk(KERN_ERR "Failed to initialize System Manager: %d\n", ret);
43 return ret;
44}
45 15
46void __init setup_platform(void) 16void __init setup_platform(void)
47{ 17{
48 at32_sm_init();
49 at32_clock_init(); 18 at32_clock_init();
50 at32_portmux_init(); 19 at32_portmux_init();
51} 20}
diff --git a/arch/avr32/mach-at32ap/at32ap7000.c b/arch/avr32/mach-at32ap/at32ap7000.c
index 1d2bf347a1d6..64cc5583ddfb 100644
--- a/arch/avr32/mach-at32ap/at32ap7000.c
+++ b/arch/avr32/mach-at32ap/at32ap7000.c
@@ -9,6 +9,7 @@
9#include <linux/fb.h> 9#include <linux/fb.h>
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/platform_device.h> 11#include <linux/platform_device.h>
12#include <linux/dma-mapping.h>
12#include <linux/spi/spi.h> 13#include <linux/spi/spi.h>
13 14
14#include <asm/io.h> 15#include <asm/io.h>
@@ -16,14 +17,20 @@
16#include <asm/arch/at32ap7000.h> 17#include <asm/arch/at32ap7000.h>
17#include <asm/arch/board.h> 18#include <asm/arch/board.h>
18#include <asm/arch/portmux.h> 19#include <asm/arch/portmux.h>
19#include <asm/arch/sm.h>
20 20
21#include <video/atmel_lcdc.h> 21#include <video/atmel_lcdc.h>
22 22
23#include "clock.h" 23#include "clock.h"
24#include "hmatrix.h" 24#include "hmatrix.h"
25#include "pio.h" 25#include "pio.h"
26#include "sm.h" 26#include "pm.h"
27
28/*
29 * We can reduce the code size a bit by using a constant here. Since
30 * this file is completely chip-specific, it's safe to not use
31 * ioremap. Generic drivers should of course never do this.
32 */
33#define AT32_PM_BASE 0xfff00000
27 34
28#define PBMEM(base) \ 35#define PBMEM(base) \
29 { \ 36 { \
@@ -45,19 +52,30 @@
45 .flags = IORESOURCE_IRQ, \ 52 .flags = IORESOURCE_IRQ, \
46 } 53 }
47 54
55/* REVISIT these assume *every* device supports DMA, but several
56 * don't ... tc, smc, pio, rtc, watchdog, pwm, ps2, and more.
57 */
48#define DEFINE_DEV(_name, _id) \ 58#define DEFINE_DEV(_name, _id) \
59static u64 _name##_id##_dma_mask = DMA_32BIT_MASK; \
49static struct platform_device _name##_id##_device = { \ 60static struct platform_device _name##_id##_device = { \
50 .name = #_name, \ 61 .name = #_name, \
51 .id = _id, \ 62 .id = _id, \
63 .dev = { \
64 .dma_mask = &_name##_id##_dma_mask, \
65 .coherent_dma_mask = DMA_32BIT_MASK, \
66 }, \
52 .resource = _name##_id##_resource, \ 67 .resource = _name##_id##_resource, \
53 .num_resources = ARRAY_SIZE(_name##_id##_resource), \ 68 .num_resources = ARRAY_SIZE(_name##_id##_resource), \
54} 69}
55#define DEFINE_DEV_DATA(_name, _id) \ 70#define DEFINE_DEV_DATA(_name, _id) \
71static u64 _name##_id##_dma_mask = DMA_32BIT_MASK; \
56static struct platform_device _name##_id##_device = { \ 72static struct platform_device _name##_id##_device = { \
57 .name = #_name, \ 73 .name = #_name, \
58 .id = _id, \ 74 .id = _id, \
59 .dev = { \ 75 .dev = { \
76 .dma_mask = &_name##_id##_dma_mask, \
60 .platform_data = &_name##_id##_data, \ 77 .platform_data = &_name##_id##_data, \
78 .coherent_dma_mask = DMA_32BIT_MASK, \
61 }, \ 79 }, \
62 .resource = _name##_id##_resource, \ 80 .resource = _name##_id##_resource, \
63 .num_resources = ARRAY_SIZE(_name##_id##_resource), \ 81 .num_resources = ARRAY_SIZE(_name##_id##_resource), \
@@ -76,6 +94,8 @@ static struct clk devname##_##_name = { \
76 .index = _index, \ 94 .index = _index, \
77} 95}
78 96
97static DEFINE_SPINLOCK(pm_lock);
98
79unsigned long at32ap7000_osc_rates[3] = { 99unsigned long at32ap7000_osc_rates[3] = {
80 [0] = 32768, 100 [0] = 32768,
81 /* FIXME: these are ATSTK1002-specific */ 101 /* FIXME: these are ATSTK1002-specific */
@@ -92,11 +112,11 @@ static unsigned long pll_get_rate(struct clk *clk, unsigned long control)
92{ 112{
93 unsigned long div, mul, rate; 113 unsigned long div, mul, rate;
94 114
95 if (!(control & SM_BIT(PLLEN))) 115 if (!(control & PM_BIT(PLLEN)))
96 return 0; 116 return 0;
97 117
98 div = SM_BFEXT(PLLDIV, control) + 1; 118 div = PM_BFEXT(PLLDIV, control) + 1;
99 mul = SM_BFEXT(PLLMUL, control) + 1; 119 mul = PM_BFEXT(PLLMUL, control) + 1;
100 120
101 rate = clk->parent->get_rate(clk->parent); 121 rate = clk->parent->get_rate(clk->parent);
102 rate = (rate + div / 2) / div; 122 rate = (rate + div / 2) / div;
@@ -109,7 +129,7 @@ static unsigned long pll0_get_rate(struct clk *clk)
109{ 129{
110 u32 control; 130 u32 control;
111 131
112 control = sm_readl(&system_manager, PM_PLL0); 132 control = pm_readl(PLL0);
113 133
114 return pll_get_rate(clk, control); 134 return pll_get_rate(clk, control);
115} 135}
@@ -118,7 +138,7 @@ static unsigned long pll1_get_rate(struct clk *clk)
118{ 138{
119 u32 control; 139 u32 control;
120 140
121 control = sm_readl(&system_manager, PM_PLL1); 141 control = pm_readl(PLL1);
122 142
123 return pll_get_rate(clk, control); 143 return pll_get_rate(clk, control);
124} 144}
@@ -175,108 +195,139 @@ static unsigned long bus_clk_get_rate(struct clk *clk, unsigned int shift)
175 195
176static void cpu_clk_mode(struct clk *clk, int enabled) 196static void cpu_clk_mode(struct clk *clk, int enabled)
177{ 197{
178 struct at32_sm *sm = &system_manager;
179 unsigned long flags; 198 unsigned long flags;
180 u32 mask; 199 u32 mask;
181 200
182 spin_lock_irqsave(&sm->lock, flags); 201 spin_lock_irqsave(&pm_lock, flags);
183 mask = sm_readl(sm, PM_CPU_MASK); 202 mask = pm_readl(CPU_MASK);
184 if (enabled) 203 if (enabled)
185 mask |= 1 << clk->index; 204 mask |= 1 << clk->index;
186 else 205 else
187 mask &= ~(1 << clk->index); 206 mask &= ~(1 << clk->index);
188 sm_writel(sm, PM_CPU_MASK, mask); 207 pm_writel(CPU_MASK, mask);
189 spin_unlock_irqrestore(&sm->lock, flags); 208 spin_unlock_irqrestore(&pm_lock, flags);
190} 209}
191 210
192static unsigned long cpu_clk_get_rate(struct clk *clk) 211static unsigned long cpu_clk_get_rate(struct clk *clk)
193{ 212{
194 unsigned long cksel, shift = 0; 213 unsigned long cksel, shift = 0;
195 214
196 cksel = sm_readl(&system_manager, PM_CKSEL); 215 cksel = pm_readl(CKSEL);
197 if (cksel & SM_BIT(CPUDIV)) 216 if (cksel & PM_BIT(CPUDIV))
198 shift = SM_BFEXT(CPUSEL, cksel) + 1; 217 shift = PM_BFEXT(CPUSEL, cksel) + 1;
199 218
200 return bus_clk_get_rate(clk, shift); 219 return bus_clk_get_rate(clk, shift);
201} 220}
202 221
222static long cpu_clk_set_rate(struct clk *clk, unsigned long rate, int apply)
223{
224 u32 control;
225 unsigned long parent_rate, child_div, actual_rate, div;
226
227 parent_rate = clk->parent->get_rate(clk->parent);
228 control = pm_readl(CKSEL);
229
230 if (control & PM_BIT(HSBDIV))
231 child_div = 1 << (PM_BFEXT(HSBSEL, control) + 1);
232 else
233 child_div = 1;
234
235 if (rate > 3 * (parent_rate / 4) || child_div == 1) {
236 actual_rate = parent_rate;
237 control &= ~PM_BIT(CPUDIV);
238 } else {
239 unsigned int cpusel;
240 div = (parent_rate + rate / 2) / rate;
241 if (div > child_div)
242 div = child_div;
243 cpusel = (div > 1) ? (fls(div) - 2) : 0;
244 control = PM_BIT(CPUDIV) | PM_BFINS(CPUSEL, cpusel, control);
245 actual_rate = parent_rate / (1 << (cpusel + 1));
246 }
247
248 pr_debug("clk %s: new rate %lu (actual rate %lu)\n",
249 clk->name, rate, actual_rate);
250
251 if (apply)
252 pm_writel(CKSEL, control);
253
254 return actual_rate;
255}
256
203static void hsb_clk_mode(struct clk *clk, int enabled) 257static void hsb_clk_mode(struct clk *clk, int enabled)
204{ 258{
205 struct at32_sm *sm = &system_manager;
206 unsigned long flags; 259 unsigned long flags;
207 u32 mask; 260 u32 mask;
208 261
209 spin_lock_irqsave(&sm->lock, flags); 262 spin_lock_irqsave(&pm_lock, flags);
210 mask = sm_readl(sm, PM_HSB_MASK); 263 mask = pm_readl(HSB_MASK);
211 if (enabled) 264 if (enabled)
212 mask |= 1 << clk->index; 265 mask |= 1 << clk->index;
213 else 266 else
214 mask &= ~(1 << clk->index); 267 mask &= ~(1 << clk->index);
215 sm_writel(sm, PM_HSB_MASK, mask); 268 pm_writel(HSB_MASK, mask);
216 spin_unlock_irqrestore(&sm->lock, flags); 269 spin_unlock_irqrestore(&pm_lock, flags);
217} 270}
218 271
219static unsigned long hsb_clk_get_rate(struct clk *clk) 272static unsigned long hsb_clk_get_rate(struct clk *clk)
220{ 273{
221 unsigned long cksel, shift = 0; 274 unsigned long cksel, shift = 0;
222 275
223 cksel = sm_readl(&system_manager, PM_CKSEL); 276 cksel = pm_readl(CKSEL);
224 if (cksel & SM_BIT(HSBDIV)) 277 if (cksel & PM_BIT(HSBDIV))
225 shift = SM_BFEXT(HSBSEL, cksel) + 1; 278 shift = PM_BFEXT(HSBSEL, cksel) + 1;
226 279
227 return bus_clk_get_rate(clk, shift); 280 return bus_clk_get_rate(clk, shift);
228} 281}
229 282
230static void pba_clk_mode(struct clk *clk, int enabled) 283static void pba_clk_mode(struct clk *clk, int enabled)
231{ 284{
232 struct at32_sm *sm = &system_manager;
233 unsigned long flags; 285 unsigned long flags;
234 u32 mask; 286 u32 mask;
235 287
236 spin_lock_irqsave(&sm->lock, flags); 288 spin_lock_irqsave(&pm_lock, flags);
237 mask = sm_readl(sm, PM_PBA_MASK); 289 mask = pm_readl(PBA_MASK);
238 if (enabled) 290 if (enabled)
239 mask |= 1 << clk->index; 291 mask |= 1 << clk->index;
240 else 292 else
241 mask &= ~(1 << clk->index); 293 mask &= ~(1 << clk->index);
242 sm_writel(sm, PM_PBA_MASK, mask); 294 pm_writel(PBA_MASK, mask);
243 spin_unlock_irqrestore(&sm->lock, flags); 295 spin_unlock_irqrestore(&pm_lock, flags);
244} 296}
245 297
246static unsigned long pba_clk_get_rate(struct clk *clk) 298static unsigned long pba_clk_get_rate(struct clk *clk)
247{ 299{
248 unsigned long cksel, shift = 0; 300 unsigned long cksel, shift = 0;
249 301
250 cksel = sm_readl(&system_manager, PM_CKSEL); 302 cksel = pm_readl(CKSEL);
251 if (cksel & SM_BIT(PBADIV)) 303 if (cksel & PM_BIT(PBADIV))
252 shift = SM_BFEXT(PBASEL, cksel) + 1; 304 shift = PM_BFEXT(PBASEL, cksel) + 1;
253 305
254 return bus_clk_get_rate(clk, shift); 306 return bus_clk_get_rate(clk, shift);
255} 307}
256 308
257static void pbb_clk_mode(struct clk *clk, int enabled) 309static void pbb_clk_mode(struct clk *clk, int enabled)
258{ 310{
259 struct at32_sm *sm = &system_manager;
260 unsigned long flags; 311 unsigned long flags;
261 u32 mask; 312 u32 mask;
262 313
263 spin_lock_irqsave(&sm->lock, flags); 314 spin_lock_irqsave(&pm_lock, flags);
264 mask = sm_readl(sm, PM_PBB_MASK); 315 mask = pm_readl(PBB_MASK);
265 if (enabled) 316 if (enabled)
266 mask |= 1 << clk->index; 317 mask |= 1 << clk->index;
267 else 318 else
268 mask &= ~(1 << clk->index); 319 mask &= ~(1 << clk->index);
269 sm_writel(sm, PM_PBB_MASK, mask); 320 pm_writel(PBB_MASK, mask);
270 spin_unlock_irqrestore(&sm->lock, flags); 321 spin_unlock_irqrestore(&pm_lock, flags);
271} 322}
272 323
273static unsigned long pbb_clk_get_rate(struct clk *clk) 324static unsigned long pbb_clk_get_rate(struct clk *clk)
274{ 325{
275 unsigned long cksel, shift = 0; 326 unsigned long cksel, shift = 0;
276 327
277 cksel = sm_readl(&system_manager, PM_CKSEL); 328 cksel = pm_readl(CKSEL);
278 if (cksel & SM_BIT(PBBDIV)) 329 if (cksel & PM_BIT(PBBDIV))
279 shift = SM_BFEXT(PBBSEL, cksel) + 1; 330 shift = PM_BFEXT(PBBSEL, cksel) + 1;
280 331
281 return bus_clk_get_rate(clk, shift); 332 return bus_clk_get_rate(clk, shift);
282} 333}
@@ -284,6 +335,7 @@ static unsigned long pbb_clk_get_rate(struct clk *clk)
284static struct clk cpu_clk = { 335static struct clk cpu_clk = {
285 .name = "cpu", 336 .name = "cpu",
286 .get_rate = cpu_clk_get_rate, 337 .get_rate = cpu_clk_get_rate,
338 .set_rate = cpu_clk_set_rate,
287 .users = 1, 339 .users = 1,
288}; 340};
289static struct clk hsb_clk = { 341static struct clk hsb_clk = {
@@ -315,12 +367,12 @@ static void genclk_mode(struct clk *clk, int enabled)
315{ 367{
316 u32 control; 368 u32 control;
317 369
318 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); 370 control = pm_readl(GCCTRL(clk->index));
319 if (enabled) 371 if (enabled)
320 control |= SM_BIT(CEN); 372 control |= PM_BIT(CEN);
321 else 373 else
322 control &= ~SM_BIT(CEN); 374 control &= ~PM_BIT(CEN);
323 sm_writel(&system_manager, PM_GCCTRL + 4 * clk->index, control); 375 pm_writel(GCCTRL(clk->index), control);
324} 376}
325 377
326static unsigned long genclk_get_rate(struct clk *clk) 378static unsigned long genclk_get_rate(struct clk *clk)
@@ -328,9 +380,9 @@ static unsigned long genclk_get_rate(struct clk *clk)
328 u32 control; 380 u32 control;
329 unsigned long div = 1; 381 unsigned long div = 1;
330 382
331 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); 383 control = pm_readl(GCCTRL(clk->index));
332 if (control & SM_BIT(DIVEN)) 384 if (control & PM_BIT(DIVEN))
333 div = 2 * (SM_BFEXT(DIV, control) + 1); 385 div = 2 * (PM_BFEXT(DIV, control) + 1);
334 386
335 return clk->parent->get_rate(clk->parent) / div; 387 return clk->parent->get_rate(clk->parent) / div;
336} 388}
@@ -341,23 +393,22 @@ static long genclk_set_rate(struct clk *clk, unsigned long rate, int apply)
341 unsigned long parent_rate, actual_rate, div; 393 unsigned long parent_rate, actual_rate, div;
342 394
343 parent_rate = clk->parent->get_rate(clk->parent); 395 parent_rate = clk->parent->get_rate(clk->parent);
344 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); 396 control = pm_readl(GCCTRL(clk->index));
345 397
346 if (rate > 3 * parent_rate / 4) { 398 if (rate > 3 * parent_rate / 4) {
347 actual_rate = parent_rate; 399 actual_rate = parent_rate;
348 control &= ~SM_BIT(DIVEN); 400 control &= ~PM_BIT(DIVEN);
349 } else { 401 } else {
350 div = (parent_rate + rate) / (2 * rate) - 1; 402 div = (parent_rate + rate) / (2 * rate) - 1;
351 control = SM_BFINS(DIV, div, control) | SM_BIT(DIVEN); 403 control = PM_BFINS(DIV, div, control) | PM_BIT(DIVEN);
352 actual_rate = parent_rate / (2 * (div + 1)); 404 actual_rate = parent_rate / (2 * (div + 1));
353 } 405 }
354 406
355 printk("clk %s: new rate %lu (actual rate %lu)\n", 407 dev_dbg(clk->dev, "clk %s: new rate %lu (actual rate %lu)\n",
356 clk->name, rate, actual_rate); 408 clk->name, rate, actual_rate);
357 409
358 if (apply) 410 if (apply)
359 sm_writel(&system_manager, PM_GCCTRL + 4 * clk->index, 411 pm_writel(GCCTRL(clk->index), control);
360 control);
361 412
362 return actual_rate; 413 return actual_rate;
363} 414}
@@ -366,24 +417,24 @@ int genclk_set_parent(struct clk *clk, struct clk *parent)
366{ 417{
367 u32 control; 418 u32 control;
368 419
369 printk("clk %s: new parent %s (was %s)\n", 420 dev_dbg(clk->dev, "clk %s: new parent %s (was %s)\n",
370 clk->name, parent->name, clk->parent->name); 421 clk->name, parent->name, clk->parent->name);
371 422
372 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); 423 control = pm_readl(GCCTRL(clk->index));
373 424
374 if (parent == &osc1 || parent == &pll1) 425 if (parent == &osc1 || parent == &pll1)
375 control |= SM_BIT(OSCSEL); 426 control |= PM_BIT(OSCSEL);
376 else if (parent == &osc0 || parent == &pll0) 427 else if (parent == &osc0 || parent == &pll0)
377 control &= ~SM_BIT(OSCSEL); 428 control &= ~PM_BIT(OSCSEL);
378 else 429 else
379 return -EINVAL; 430 return -EINVAL;
380 431
381 if (parent == &pll0 || parent == &pll1) 432 if (parent == &pll0 || parent == &pll1)
382 control |= SM_BIT(PLLSEL); 433 control |= PM_BIT(PLLSEL);
383 else 434 else
384 control &= ~SM_BIT(PLLSEL); 435 control &= ~PM_BIT(PLLSEL);
385 436
386 sm_writel(&system_manager, PM_GCCTRL + 4 * clk->index, control); 437 pm_writel(GCCTRL(clk->index), control);
387 clk->parent = parent; 438 clk->parent = parent;
388 439
389 return 0; 440 return 0;
@@ -396,11 +447,11 @@ static void __init genclk_init_parent(struct clk *clk)
396 447
397 BUG_ON(clk->index > 7); 448 BUG_ON(clk->index > 7);
398 449
399 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); 450 control = pm_readl(GCCTRL(clk->index));
400 if (control & SM_BIT(OSCSEL)) 451 if (control & PM_BIT(OSCSEL))
401 parent = (control & SM_BIT(PLLSEL)) ? &pll1 : &osc1; 452 parent = (control & PM_BIT(PLLSEL)) ? &pll1 : &osc1;
402 else 453 else
403 parent = (control & SM_BIT(PLLSEL)) ? &pll0 : &osc0; 454 parent = (control & PM_BIT(PLLSEL)) ? &pll0 : &osc0;
404 455
405 clk->parent = parent; 456 clk->parent = parent;
406} 457}
@@ -408,21 +459,53 @@ static void __init genclk_init_parent(struct clk *clk)
408/* -------------------------------------------------------------------- 459/* --------------------------------------------------------------------
409 * System peripherals 460 * System peripherals
410 * -------------------------------------------------------------------- */ 461 * -------------------------------------------------------------------- */
411static struct resource sm_resource[] = { 462static struct resource at32_pm0_resource[] = {
412 PBMEM(0xfff00000), 463 {
413 NAMED_IRQ(19, "eim"), 464 .start = 0xfff00000,
414 NAMED_IRQ(20, "pm"), 465 .end = 0xfff0007f,
415 NAMED_IRQ(21, "rtc"), 466 .flags = IORESOURCE_MEM,
467 },
468 IRQ(20),
416}; 469};
417struct platform_device at32_sm_device = { 470
418 .name = "sm", 471static struct resource at32ap700x_rtc0_resource[] = {
419 .id = 0, 472 {
420 .resource = sm_resource, 473 .start = 0xfff00080,
421 .num_resources = ARRAY_SIZE(sm_resource), 474 .end = 0xfff000af,
475 .flags = IORESOURCE_MEM,
476 },
477 IRQ(21),
422}; 478};
423static struct clk at32_sm_pclk = { 479
480static struct resource at32_wdt0_resource[] = {
481 {
482 .start = 0xfff000b0,
483 .end = 0xfff000bf,
484 .flags = IORESOURCE_MEM,
485 },
486};
487
488static struct resource at32_eic0_resource[] = {
489 {
490 .start = 0xfff00100,
491 .end = 0xfff0013f,
492 .flags = IORESOURCE_MEM,
493 },
494 IRQ(19),
495};
496
497DEFINE_DEV(at32_pm, 0);
498DEFINE_DEV(at32ap700x_rtc, 0);
499DEFINE_DEV(at32_wdt, 0);
500DEFINE_DEV(at32_eic, 0);
501
502/*
503 * Peripheral clock for PM, RTC, WDT and EIC. PM will ensure that this
504 * is always running.
505 */
506static struct clk at32_pm_pclk = {
424 .name = "pclk", 507 .name = "pclk",
425 .dev = &at32_sm_device.dev, 508 .dev = &at32_pm0_device.dev,
426 .parent = &pbb_clk, 509 .parent = &pbb_clk,
427 .mode = pbb_clk_mode, 510 .mode = pbb_clk_mode,
428 .get_rate = pbb_clk_get_rate, 511 .get_rate = pbb_clk_get_rate,
@@ -571,10 +654,11 @@ DEV_CLK(mck, pio4, pba, 14);
571 654
572void __init at32_add_system_devices(void) 655void __init at32_add_system_devices(void)
573{ 656{
574 system_manager.eim_first_irq = EIM_IRQ_BASE; 657 platform_device_register(&at32_pm0_device);
575
576 platform_device_register(&at32_sm_device);
577 platform_device_register(&at32_intc0_device); 658 platform_device_register(&at32_intc0_device);
659 platform_device_register(&at32ap700x_rtc0_device);
660 platform_device_register(&at32_wdt0_device);
661 platform_device_register(&at32_eic0_device);
578 platform_device_register(&smc0_device); 662 platform_device_register(&smc0_device);
579 platform_device_register(&pdc_device); 663 platform_device_register(&pdc_device);
580 664
@@ -1001,6 +1085,89 @@ err_dup_modedb:
1001} 1085}
1002 1086
1003/* -------------------------------------------------------------------- 1087/* --------------------------------------------------------------------
1088 * SSC
1089 * -------------------------------------------------------------------- */
1090static struct resource ssc0_resource[] = {
1091 PBMEM(0xffe01c00),
1092 IRQ(10),
1093};
1094DEFINE_DEV(ssc, 0);
1095DEV_CLK(pclk, ssc0, pba, 7);
1096
1097static struct resource ssc1_resource[] = {
1098 PBMEM(0xffe02000),
1099 IRQ(11),
1100};
1101DEFINE_DEV(ssc, 1);
1102DEV_CLK(pclk, ssc1, pba, 8);
1103
1104static struct resource ssc2_resource[] = {
1105 PBMEM(0xffe02400),
1106 IRQ(12),
1107};
1108DEFINE_DEV(ssc, 2);
1109DEV_CLK(pclk, ssc2, pba, 9);
1110
1111struct platform_device *__init
1112at32_add_device_ssc(unsigned int id, unsigned int flags)
1113{
1114 struct platform_device *pdev;
1115
1116 switch (id) {
1117 case 0:
1118 pdev = &ssc0_device;
1119 if (flags & ATMEL_SSC_RF)
1120 select_peripheral(PA(21), PERIPH_A, 0); /* RF */
1121 if (flags & ATMEL_SSC_RK)
1122 select_peripheral(PA(22), PERIPH_A, 0); /* RK */
1123 if (flags & ATMEL_SSC_TK)
1124 select_peripheral(PA(23), PERIPH_A, 0); /* TK */
1125 if (flags & ATMEL_SSC_TF)
1126 select_peripheral(PA(24), PERIPH_A, 0); /* TF */
1127 if (flags & ATMEL_SSC_TD)
1128 select_peripheral(PA(25), PERIPH_A, 0); /* TD */
1129 if (flags & ATMEL_SSC_RD)
1130 select_peripheral(PA(26), PERIPH_A, 0); /* RD */
1131 break;
1132 case 1:
1133 pdev = &ssc1_device;
1134 if (flags & ATMEL_SSC_RF)
1135 select_peripheral(PA(0), PERIPH_B, 0); /* RF */
1136 if (flags & ATMEL_SSC_RK)
1137 select_peripheral(PA(1), PERIPH_B, 0); /* RK */
1138 if (flags & ATMEL_SSC_TK)
1139 select_peripheral(PA(2), PERIPH_B, 0); /* TK */
1140 if (flags & ATMEL_SSC_TF)
1141 select_peripheral(PA(3), PERIPH_B, 0); /* TF */
1142 if (flags & ATMEL_SSC_TD)
1143 select_peripheral(PA(4), PERIPH_B, 0); /* TD */
1144 if (flags & ATMEL_SSC_RD)
1145 select_peripheral(PA(5), PERIPH_B, 0); /* RD */
1146 break;
1147 case 2:
1148 pdev = &ssc2_device;
1149 if (flags & ATMEL_SSC_TD)
1150 select_peripheral(PB(13), PERIPH_A, 0); /* TD */
1151 if (flags & ATMEL_SSC_RD)
1152 select_peripheral(PB(14), PERIPH_A, 0); /* RD */
1153 if (flags & ATMEL_SSC_TK)
1154 select_peripheral(PB(15), PERIPH_A, 0); /* TK */
1155 if (flags & ATMEL_SSC_TF)
1156 select_peripheral(PB(16), PERIPH_A, 0); /* TF */
1157 if (flags & ATMEL_SSC_RF)
1158 select_peripheral(PB(17), PERIPH_A, 0); /* RF */
1159 if (flags & ATMEL_SSC_RK)
1160 select_peripheral(PB(18), PERIPH_A, 0); /* RK */
1161 break;
1162 default:
1163 return NULL;
1164 }
1165
1166 platform_device_register(pdev);
1167 return pdev;
1168}
1169
1170/* --------------------------------------------------------------------
1004 * GCLK 1171 * GCLK
1005 * -------------------------------------------------------------------- */ 1172 * -------------------------------------------------------------------- */
1006static struct clk gclk0 = { 1173static struct clk gclk0 = {
@@ -1054,7 +1221,7 @@ struct clk *at32_clock_list[] = {
1054 &hsb_clk, 1221 &hsb_clk,
1055 &pba_clk, 1222 &pba_clk,
1056 &pbb_clk, 1223 &pbb_clk,
1057 &at32_sm_pclk, 1224 &at32_pm_pclk,
1058 &at32_intc0_pclk, 1225 &at32_intc0_pclk,
1059 &hmatrix_clk, 1226 &hmatrix_clk,
1060 &ebi_clk, 1227 &ebi_clk,
@@ -1082,6 +1249,9 @@ struct clk *at32_clock_list[] = {
1082 &atmel_spi1_spi_clk, 1249 &atmel_spi1_spi_clk,
1083 &atmel_lcdfb0_hck1, 1250 &atmel_lcdfb0_hck1,
1084 &atmel_lcdfb0_pixclk, 1251 &atmel_lcdfb0_pixclk,
1252 &ssc0_pclk,
1253 &ssc1_pclk,
1254 &ssc2_pclk,
1085 &gclk0, 1255 &gclk0,
1086 &gclk1, 1256 &gclk1,
1087 &gclk2, 1257 &gclk2,
@@ -1101,18 +1271,20 @@ void __init at32_portmux_init(void)
1101 1271
1102void __init at32_clock_init(void) 1272void __init at32_clock_init(void)
1103{ 1273{
1104 struct at32_sm *sm = &system_manager;
1105 u32 cpu_mask = 0, hsb_mask = 0, pba_mask = 0, pbb_mask = 0; 1274 u32 cpu_mask = 0, hsb_mask = 0, pba_mask = 0, pbb_mask = 0;
1106 int i; 1275 int i;
1107 1276
1108 if (sm_readl(sm, PM_MCCTRL) & SM_BIT(PLLSEL)) 1277 if (pm_readl(MCCTRL) & PM_BIT(PLLSEL)) {
1109 main_clock = &pll0; 1278 main_clock = &pll0;
1110 else 1279 cpu_clk.parent = &pll0;
1280 } else {
1111 main_clock = &osc0; 1281 main_clock = &osc0;
1282 cpu_clk.parent = &osc0;
1283 }
1112 1284
1113 if (sm_readl(sm, PM_PLL0) & SM_BIT(PLLOSC)) 1285 if (pm_readl(PLL0) & PM_BIT(PLLOSC))
1114 pll0.parent = &osc1; 1286 pll0.parent = &osc1;
1115 if (sm_readl(sm, PM_PLL1) & SM_BIT(PLLOSC)) 1287 if (pm_readl(PLL1) & PM_BIT(PLLOSC))
1116 pll1.parent = &osc1; 1288 pll1.parent = &osc1;
1117 1289
1118 genclk_init_parent(&gclk0); 1290 genclk_init_parent(&gclk0);
@@ -1145,8 +1317,8 @@ void __init at32_clock_init(void)
1145 pbb_mask |= 1 << clk->index; 1317 pbb_mask |= 1 << clk->index;
1146 } 1318 }
1147 1319
1148 sm_writel(sm, PM_CPU_MASK, cpu_mask); 1320 pm_writel(CPU_MASK, cpu_mask);
1149 sm_writel(sm, PM_HSB_MASK, hsb_mask); 1321 pm_writel(HSB_MASK, hsb_mask);
1150 sm_writel(sm, PM_PBA_MASK, pba_mask); 1322 pm_writel(PBA_MASK, pba_mask);
1151 sm_writel(sm, PM_PBB_MASK, pbb_mask); 1323 pm_writel(PBB_MASK, pbb_mask);
1152} 1324}
diff --git a/arch/avr32/mach-at32ap/cpufreq.c b/arch/avr32/mach-at32ap/cpufreq.c
new file mode 100644
index 000000000000..235524b79193
--- /dev/null
+++ b/arch/avr32/mach-at32ap/cpufreq.c
@@ -0,0 +1,112 @@
1/*
2 * Copyright (C) 2004-2007 Atmel Corporation
3 *
4 * Based on MIPS implementation arch/mips/kernel/time.c
5 * Copyright 2001 MontaVista Software Inc.
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
12/*#define DEBUG*/
13
14#include <linux/kernel.h>
15#include <linux/types.h>
16#include <linux/init.h>
17#include <linux/cpufreq.h>
18#include <linux/io.h>
19#include <linux/clk.h>
20#include <linux/err.h>
21#include <asm/system.h>
22
23static struct clk *cpuclk;
24
25static int at32_verify_speed(struct cpufreq_policy *policy)
26{
27 if (policy->cpu != 0)
28 return -EINVAL;
29
30 cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
31 policy->cpuinfo.max_freq);
32 return 0;
33}
34
35static unsigned int at32_get_speed(unsigned int cpu)
36{
37 /* No SMP support */
38 if (cpu)
39 return 0;
40 return (unsigned int)((clk_get_rate(cpuclk) + 500) / 1000);
41}
42
43static int at32_set_target(struct cpufreq_policy *policy,
44 unsigned int target_freq,
45 unsigned int relation)
46{
47 struct cpufreq_freqs freqs;
48 long freq;
49
50 /* Convert target_freq from kHz to Hz */
51 freq = clk_round_rate(cpuclk, target_freq * 1000);
52
53 /* Check if policy->min <= new_freq <= policy->max */
54 if(freq < (policy->min * 1000) || freq > (policy->max * 1000))
55 return -EINVAL;
56
57 pr_debug("cpufreq: requested frequency %u Hz\n", target_freq * 1000);
58
59 freqs.old = at32_get_speed(0);
60 freqs.new = (freq + 500) / 1000;
61 freqs.cpu = 0;
62 freqs.flags = 0;
63
64 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
65 clk_set_rate(cpuclk, freq);
66 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
67
68 pr_debug("cpufreq: set frequency %lu Hz\n", freq);
69
70 return 0;
71}
72
73static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy)
74{
75 if (policy->cpu != 0)
76 return -EINVAL;
77
78 cpuclk = clk_get(NULL, "cpu");
79 if (IS_ERR(cpuclk)) {
80 pr_debug("cpufreq: could not get CPU clk\n");
81 return PTR_ERR(cpuclk);
82 }
83
84 policy->cpuinfo.min_freq = (clk_round_rate(cpuclk, 1) + 500) / 1000;
85 policy->cpuinfo.max_freq = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000;
86 policy->cpuinfo.transition_latency = 0;
87 policy->cur = at32_get_speed(0);
88 policy->min = policy->cpuinfo.min_freq;
89 policy->max = policy->cpuinfo.max_freq;
90 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
91
92 printk("cpufreq: AT32AP CPU frequency driver\n");
93
94 return 0;
95}
96
97static struct cpufreq_driver at32_driver = {
98 .name = "at32ap",
99 .owner = THIS_MODULE,
100 .init = at32_cpufreq_driver_init,
101 .verify = at32_verify_speed,
102 .target = at32_set_target,
103 .get = at32_get_speed,
104 .flags = CPUFREQ_STICKY,
105};
106
107static int __init at32_cpufreq_init(void)
108{
109 return cpufreq_register_driver(&at32_driver);
110}
111
112arch_initcall(at32_cpufreq_init);
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c
index 4a60eccfebd2..8acd01090031 100644
--- a/arch/avr32/mach-at32ap/extint.c
+++ b/arch/avr32/mach-at32ap/extint.c
@@ -17,42 +17,83 @@
17 17
18#include <asm/io.h> 18#include <asm/io.h>
19 19
20#include <asm/arch/sm.h> 20/* EIC register offsets */
21 21#define EIC_IER 0x0000
22#include "sm.h" 22#define EIC_IDR 0x0004
23#define EIC_IMR 0x0008
24#define EIC_ISR 0x000c
25#define EIC_ICR 0x0010
26#define EIC_MODE 0x0014
27#define EIC_EDGE 0x0018
28#define EIC_LEVEL 0x001c
29#define EIC_TEST 0x0020
30#define EIC_NMIC 0x0024
31
32/* Bitfields in TEST */
33#define EIC_TESTEN_OFFSET 31
34#define EIC_TESTEN_SIZE 1
35
36/* Bitfields in NMIC */
37#define EIC_EN_OFFSET 0
38#define EIC_EN_SIZE 1
39
40/* Bit manipulation macros */
41#define EIC_BIT(name) \
42 (1 << EIC_##name##_OFFSET)
43#define EIC_BF(name,value) \
44 (((value) & ((1 << EIC_##name##_SIZE) - 1)) \
45 << EIC_##name##_OFFSET)
46#define EIC_BFEXT(name,value) \
47 (((value) >> EIC_##name##_OFFSET) \
48 & ((1 << EIC_##name##_SIZE) - 1))
49#define EIC_BFINS(name,value,old) \
50 (((old) & ~(((1 << EIC_##name##_SIZE) - 1) \
51 << EIC_##name##_OFFSET)) \
52 | EIC_BF(name,value))
53
54/* Register access macros */
55#define eic_readl(port,reg) \
56 __raw_readl((port)->regs + EIC_##reg)
57#define eic_writel(port,reg,value) \
58 __raw_writel((value), (port)->regs + EIC_##reg)
59
60struct eic {
61 void __iomem *regs;
62 struct irq_chip *chip;
63 unsigned int first_irq;
64};
23 65
24static void eim_ack_irq(unsigned int irq) 66static void eic_ack_irq(unsigned int irq)
25{ 67{
26 struct at32_sm *sm = get_irq_chip_data(irq); 68 struct eic *eic = get_irq_chip_data(irq);
27 sm_writel(sm, EIM_ICR, 1 << (irq - sm->eim_first_irq)); 69 eic_writel(eic, ICR, 1 << (irq - eic->first_irq));
28} 70}
29 71
30static void eim_mask_irq(unsigned int irq) 72static void eic_mask_irq(unsigned int irq)
31{ 73{
32 struct at32_sm *sm = get_irq_chip_data(irq); 74 struct eic *eic = get_irq_chip_data(irq);
33 sm_writel(sm, EIM_IDR, 1 << (irq - sm->eim_first_irq)); 75 eic_writel(eic, IDR, 1 << (irq - eic->first_irq));
34} 76}
35 77
36static void eim_mask_ack_irq(unsigned int irq) 78static void eic_mask_ack_irq(unsigned int irq)
37{ 79{
38 struct at32_sm *sm = get_irq_chip_data(irq); 80 struct eic *eic = get_irq_chip_data(irq);
39 sm_writel(sm, EIM_ICR, 1 << (irq - sm->eim_first_irq)); 81 eic_writel(eic, ICR, 1 << (irq - eic->first_irq));
40 sm_writel(sm, EIM_IDR, 1 << (irq - sm->eim_first_irq)); 82 eic_writel(eic, IDR, 1 << (irq - eic->first_irq));
41} 83}
42 84
43static void eim_unmask_irq(unsigned int irq) 85static void eic_unmask_irq(unsigned int irq)
44{ 86{
45 struct at32_sm *sm = get_irq_chip_data(irq); 87 struct eic *eic = get_irq_chip_data(irq);
46 sm_writel(sm, EIM_IER, 1 << (irq - sm->eim_first_irq)); 88 eic_writel(eic, IER, 1 << (irq - eic->first_irq));
47} 89}
48 90
49static int eim_set_irq_type(unsigned int irq, unsigned int flow_type) 91static int eic_set_irq_type(unsigned int irq, unsigned int flow_type)
50{ 92{
51 struct at32_sm *sm = get_irq_chip_data(irq); 93 struct eic *eic = get_irq_chip_data(irq);
52 struct irq_desc *desc; 94 struct irq_desc *desc;
53 unsigned int i = irq - sm->eim_first_irq; 95 unsigned int i = irq - eic->first_irq;
54 u32 mode, edge, level; 96 u32 mode, edge, level;
55 unsigned long flags;
56 int ret = 0; 97 int ret = 0;
57 98
58 flow_type &= IRQ_TYPE_SENSE_MASK; 99 flow_type &= IRQ_TYPE_SENSE_MASK;
@@ -60,11 +101,10 @@ static int eim_set_irq_type(unsigned int irq, unsigned int flow_type)
60 flow_type = IRQ_TYPE_LEVEL_LOW; 101 flow_type = IRQ_TYPE_LEVEL_LOW;
61 102
62 desc = &irq_desc[irq]; 103 desc = &irq_desc[irq];
63 spin_lock_irqsave(&sm->lock, flags);
64 104
65 mode = sm_readl(sm, EIM_MODE); 105 mode = eic_readl(eic, MODE);
66 edge = sm_readl(sm, EIM_EDGE); 106 edge = eic_readl(eic, EDGE);
67 level = sm_readl(sm, EIM_LEVEL); 107 level = eic_readl(eic, LEVEL);
68 108
69 switch (flow_type) { 109 switch (flow_type) {
70 case IRQ_TYPE_LEVEL_LOW: 110 case IRQ_TYPE_LEVEL_LOW:
@@ -89,9 +129,9 @@ static int eim_set_irq_type(unsigned int irq, unsigned int flow_type)
89 } 129 }
90 130
91 if (ret == 0) { 131 if (ret == 0) {
92 sm_writel(sm, EIM_MODE, mode); 132 eic_writel(eic, MODE, mode);
93 sm_writel(sm, EIM_EDGE, edge); 133 eic_writel(eic, EDGE, edge);
94 sm_writel(sm, EIM_LEVEL, level); 134 eic_writel(eic, LEVEL, level);
95 135
96 if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) 136 if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
97 flow_type |= IRQ_LEVEL; 137 flow_type |= IRQ_LEVEL;
@@ -99,35 +139,33 @@ static int eim_set_irq_type(unsigned int irq, unsigned int flow_type)
99 desc->status |= flow_type; 139 desc->status |= flow_type;
100 } 140 }
101 141
102 spin_unlock_irqrestore(&sm->lock, flags);
103
104 return ret; 142 return ret;
105} 143}
106 144
107struct irq_chip eim_chip = { 145struct irq_chip eic_chip = {
108 .name = "eim", 146 .name = "eic",
109 .ack = eim_ack_irq, 147 .ack = eic_ack_irq,
110 .mask = eim_mask_irq, 148 .mask = eic_mask_irq,
111 .mask_ack = eim_mask_ack_irq, 149 .mask_ack = eic_mask_ack_irq,
112 .unmask = eim_unmask_irq, 150 .unmask = eic_unmask_irq,
113 .set_type = eim_set_irq_type, 151 .set_type = eic_set_irq_type,
114}; 152};
115 153
116static void demux_eim_irq(unsigned int irq, struct irq_desc *desc) 154static void demux_eic_irq(unsigned int irq, struct irq_desc *desc)
117{ 155{
118 struct at32_sm *sm = desc->handler_data; 156 struct eic *eic = desc->handler_data;
119 struct irq_desc *ext_desc; 157 struct irq_desc *ext_desc;
120 unsigned long status, pending; 158 unsigned long status, pending;
121 unsigned int i, ext_irq; 159 unsigned int i, ext_irq;
122 160
123 status = sm_readl(sm, EIM_ISR); 161 status = eic_readl(eic, ISR);
124 pending = status & sm_readl(sm, EIM_IMR); 162 pending = status & eic_readl(eic, IMR);
125 163
126 while (pending) { 164 while (pending) {
127 i = fls(pending) - 1; 165 i = fls(pending) - 1;
128 pending &= ~(1 << i); 166 pending &= ~(1 << i);
129 167
130 ext_irq = i + sm->eim_first_irq; 168 ext_irq = i + eic->first_irq;
131 ext_desc = irq_desc + ext_irq; 169 ext_desc = irq_desc + ext_irq;
132 if (ext_desc->status & IRQ_LEVEL) 170 if (ext_desc->status & IRQ_LEVEL)
133 handle_level_irq(ext_irq, ext_desc); 171 handle_level_irq(ext_irq, ext_desc);
@@ -136,51 +174,85 @@ static void demux_eim_irq(unsigned int irq, struct irq_desc *desc)
136 } 174 }
137} 175}
138 176
139static int __init eim_init(void) 177static int __init eic_probe(struct platform_device *pdev)
140{ 178{
141 struct at32_sm *sm = &system_manager; 179 struct eic *eic;
180 struct resource *regs;
142 unsigned int i; 181 unsigned int i;
143 unsigned int nr_irqs; 182 unsigned int nr_irqs;
144 unsigned int int_irq; 183 unsigned int int_irq;
184 int ret;
145 u32 pattern; 185 u32 pattern;
146 186
147 /* 187 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
148 * The EIM is really the same module as SM, so register 188 int_irq = platform_get_irq(pdev, 0);
149 * mapping, etc. has been taken care of already. 189 if (!regs || !int_irq) {
150 */ 190 dev_dbg(&pdev->dev, "missing regs and/or irq resource\n");
191 return -ENXIO;
192 }
193
194 ret = -ENOMEM;
195 eic = kzalloc(sizeof(struct eic), GFP_KERNEL);
196 if (!eic) {
197 dev_dbg(&pdev->dev, "no memory for eic structure\n");
198 goto err_kzalloc;
199 }
200
201 eic->first_irq = EIM_IRQ_BASE + 32 * pdev->id;
202 eic->regs = ioremap(regs->start, regs->end - regs->start + 1);
203 if (!eic->regs) {
204 dev_dbg(&pdev->dev, "failed to map regs\n");
205 goto err_ioremap;
206 }
151 207
152 /* 208 /*
153 * Find out how many interrupt lines that are actually 209 * Find out how many interrupt lines that are actually
154 * implemented in hardware. 210 * implemented in hardware.
155 */ 211 */
156 sm_writel(sm, EIM_IDR, ~0UL); 212 eic_writel(eic, IDR, ~0UL);
157 sm_writel(sm, EIM_MODE, ~0UL); 213 eic_writel(eic, MODE, ~0UL);
158 pattern = sm_readl(sm, EIM_MODE); 214 pattern = eic_readl(eic, MODE);
159 nr_irqs = fls(pattern); 215 nr_irqs = fls(pattern);
160 216
161 /* Trigger on falling edge unless overridden by driver */ 217 /* Trigger on falling edge unless overridden by driver */
162 sm_writel(sm, EIM_MODE, 0UL); 218 eic_writel(eic, MODE, 0UL);
163 sm_writel(sm, EIM_EDGE, 0UL); 219 eic_writel(eic, EDGE, 0UL);
164 220
165 sm->eim_chip = &eim_chip; 221 eic->chip = &eic_chip;
166 222
167 for (i = 0; i < nr_irqs; i++) { 223 for (i = 0; i < nr_irqs; i++) {
168 /* NOTE the handler we set here is ignored by the demux */ 224 /* NOTE the handler we set here is ignored by the demux */
169 set_irq_chip_and_handler(sm->eim_first_irq + i, &eim_chip, 225 set_irq_chip_and_handler(eic->first_irq + i, &eic_chip,
170 handle_level_irq); 226 handle_level_irq);
171 set_irq_chip_data(sm->eim_first_irq + i, sm); 227 set_irq_chip_data(eic->first_irq + i, eic);
172 } 228 }
173 229
174 int_irq = platform_get_irq_byname(sm->pdev, "eim"); 230 set_irq_chained_handler(int_irq, demux_eic_irq);
175 231 set_irq_data(int_irq, eic);
176 set_irq_chained_handler(int_irq, demux_eim_irq);
177 set_irq_data(int_irq, sm);
178 232
179 printk("EIM: External Interrupt Module at 0x%p, IRQ %u\n", 233 dev_info(&pdev->dev,
180 sm->regs, int_irq); 234 "External Interrupt Controller at 0x%p, IRQ %u\n",
181 printk("EIM: Handling %u external IRQs, starting with IRQ %u\n", 235 eic->regs, int_irq);
182 nr_irqs, sm->eim_first_irq); 236 dev_info(&pdev->dev,
237 "Handling %u external IRQs, starting with IRQ %u\n",
238 nr_irqs, eic->first_irq);
183 239
184 return 0; 240 return 0;
241
242err_ioremap:
243 kfree(eic);
244err_kzalloc:
245 return ret;
246}
247
248static struct platform_driver eic_driver = {
249 .driver = {
250 .name = "at32_eic",
251 },
252};
253
254static int __init eic_init(void)
255{
256 return platform_driver_probe(&eic_driver, eic_probe);
185} 257}
186arch_initcall(eim_init); 258arch_initcall(eic_init);
diff --git a/arch/avr32/mach-at32ap/pm.h b/arch/avr32/mach-at32ap/pm.h
new file mode 100644
index 000000000000..a1f8aced0a8c
--- /dev/null
+++ b/arch/avr32/mach-at32ap/pm.h
@@ -0,0 +1,112 @@
1/*
2 * Register definitions for the Power Manager (PM)
3 */
4#ifndef __ARCH_AVR32_MACH_AT32AP_PM_H__
5#define __ARCH_AVR32_MACH_AT32AP_PM_H__
6
7/* PM register offsets */
8#define PM_MCCTRL 0x0000
9#define PM_CKSEL 0x0004
10#define PM_CPU_MASK 0x0008
11#define PM_HSB_MASK 0x000c
12#define PM_PBA_MASK 0x0010
13#define PM_PBB_MASK 0x0014
14#define PM_PLL0 0x0020
15#define PM_PLL1 0x0024
16#define PM_IER 0x0040
17#define PM_IDR 0x0044
18#define PM_IMR 0x0048
19#define PM_ISR 0x004c
20#define PM_ICR 0x0050
21#define PM_GCCTRL(x) (0x0060 + 4 * (x))
22#define PM_RCAUSE 0x00c0
23
24/* Bitfields in CKSEL */
25#define PM_CPUSEL_OFFSET 0
26#define PM_CPUSEL_SIZE 3
27#define PM_CPUDIV_OFFSET 7
28#define PM_CPUDIV_SIZE 1
29#define PM_HSBSEL_OFFSET 8
30#define PM_HSBSEL_SIZE 3
31#define PM_HSBDIV_OFFSET 15
32#define PM_HSBDIV_SIZE 1
33#define PM_PBASEL_OFFSET 16
34#define PM_PBASEL_SIZE 3
35#define PM_PBADIV_OFFSET 23
36#define PM_PBADIV_SIZE 1
37#define PM_PBBSEL_OFFSET 24
38#define PM_PBBSEL_SIZE 3
39#define PM_PBBDIV_OFFSET 31
40#define PM_PBBDIV_SIZE 1
41
42/* Bitfields in PLL0 */
43#define PM_PLLEN_OFFSET 0
44#define PM_PLLEN_SIZE 1
45#define PM_PLLOSC_OFFSET 1
46#define PM_PLLOSC_SIZE 1
47#define PM_PLLOPT_OFFSET 2
48#define PM_PLLOPT_SIZE 3
49#define PM_PLLDIV_OFFSET 8
50#define PM_PLLDIV_SIZE 8
51#define PM_PLLMUL_OFFSET 16
52#define PM_PLLMUL_SIZE 8
53#define PM_PLLCOUNT_OFFSET 24
54#define PM_PLLCOUNT_SIZE 6
55#define PM_PLLTEST_OFFSET 31
56#define PM_PLLTEST_SIZE 1
57
58/* Bitfields in ICR */
59#define PM_LOCK0_OFFSET 0
60#define PM_LOCK0_SIZE 1
61#define PM_LOCK1_OFFSET 1
62#define PM_LOCK1_SIZE 1
63#define PM_WAKE_OFFSET 2
64#define PM_WAKE_SIZE 1
65#define PM_CKRDY_OFFSET 5
66#define PM_CKRDY_SIZE 1
67#define PM_MSKRDY_OFFSET 6
68#define PM_MSKRDY_SIZE 1
69
70/* Bitfields in GCCTRL0 */
71#define PM_OSCSEL_OFFSET 0
72#define PM_OSCSEL_SIZE 1
73#define PM_PLLSEL_OFFSET 1
74#define PM_PLLSEL_SIZE 1
75#define PM_CEN_OFFSET 2
76#define PM_CEN_SIZE 1
77#define PM_DIVEN_OFFSET 4
78#define PM_DIVEN_SIZE 1
79#define PM_DIV_OFFSET 8
80#define PM_DIV_SIZE 8
81
82/* Bitfields in RCAUSE */
83#define PM_POR_OFFSET 0
84#define PM_POR_SIZE 1
85#define PM_EXT_OFFSET 2
86#define PM_EXT_SIZE 1
87#define PM_WDT_OFFSET 3
88#define PM_WDT_SIZE 1
89#define PM_NTAE_OFFSET 4
90#define PM_NTAE_SIZE 1
91
92/* Bit manipulation macros */
93#define PM_BIT(name) \
94 (1 << PM_##name##_OFFSET)
95#define PM_BF(name,value) \
96 (((value) & ((1 << PM_##name##_SIZE) - 1)) \
97 << PM_##name##_OFFSET)
98#define PM_BFEXT(name,value) \
99 (((value) >> PM_##name##_OFFSET) \
100 & ((1 << PM_##name##_SIZE) - 1))
101#define PM_BFINS(name,value,old)\
102 (((old) & ~(((1 << PM_##name##_SIZE) - 1) \
103 << PM_##name##_OFFSET)) \
104 | PM_BF(name,value))
105
106/* Register access macros */
107#define pm_readl(reg) \
108 __raw_readl((void __iomem *)AT32_PM_BASE + PM_##reg)
109#define pm_writel(reg,value) \
110 __raw_writel((value), (void __iomem *)AT32_PM_BASE + PM_##reg)
111
112#endif /* __ARCH_AVR32_MACH_AT32AP_PM_H__ */
diff --git a/arch/avr32/mach-at32ap/sm.h b/arch/avr32/mach-at32ap/sm.h
deleted file mode 100644
index cad02b512bcb..000000000000
--- a/arch/avr32/mach-at32ap/sm.h
+++ /dev/null
@@ -1,242 +0,0 @@
1/*
2 * Register definitions for SM
3 *
4 * System Manager
5 */
6#ifndef __ASM_AVR32_SM_H__
7#define __ASM_AVR32_SM_H__
8
9/* SM register offsets */
10#define SM_PM_MCCTRL 0x0000
11#define SM_PM_CKSEL 0x0004
12#define SM_PM_CPU_MASK 0x0008
13#define SM_PM_HSB_MASK 0x000c
14#define SM_PM_PBA_MASK 0x0010
15#define SM_PM_PBB_MASK 0x0014
16#define SM_PM_PLL0 0x0020
17#define SM_PM_PLL1 0x0024
18#define SM_PM_VCTRL 0x0030
19#define SM_PM_VMREF 0x0034
20#define SM_PM_VMV 0x0038
21#define SM_PM_IER 0x0040
22#define SM_PM_IDR 0x0044
23#define SM_PM_IMR 0x0048
24#define SM_PM_ISR 0x004c
25#define SM_PM_ICR 0x0050
26#define SM_PM_GCCTRL 0x0060
27#define SM_RTC_CTRL 0x0080
28#define SM_RTC_VAL 0x0084
29#define SM_RTC_TOP 0x0088
30#define SM_RTC_IER 0x0090
31#define SM_RTC_IDR 0x0094
32#define SM_RTC_IMR 0x0098
33#define SM_RTC_ISR 0x009c
34#define SM_RTC_ICR 0x00a0
35#define SM_WDT_CTRL 0x00b0
36#define SM_WDT_CLR 0x00b4
37#define SM_WDT_EXT 0x00b8
38#define SM_RC_RCAUSE 0x00c0
39#define SM_EIM_IER 0x0100
40#define SM_EIM_IDR 0x0104
41#define SM_EIM_IMR 0x0108
42#define SM_EIM_ISR 0x010c
43#define SM_EIM_ICR 0x0110
44#define SM_EIM_MODE 0x0114
45#define SM_EIM_EDGE 0x0118
46#define SM_EIM_LEVEL 0x011c
47#define SM_EIM_TEST 0x0120
48#define SM_EIM_NMIC 0x0124
49
50/* Bitfields in PM_MCCTRL */
51
52/* Bitfields in PM_CKSEL */
53#define SM_CPUSEL_OFFSET 0
54#define SM_CPUSEL_SIZE 3
55#define SM_CPUDIV_OFFSET 7
56#define SM_CPUDIV_SIZE 1
57#define SM_HSBSEL_OFFSET 8
58#define SM_HSBSEL_SIZE 3
59#define SM_HSBDIV_OFFSET 15
60#define SM_HSBDIV_SIZE 1
61#define SM_PBASEL_OFFSET 16
62#define SM_PBASEL_SIZE 3
63#define SM_PBADIV_OFFSET 23
64#define SM_PBADIV_SIZE 1
65#define SM_PBBSEL_OFFSET 24
66#define SM_PBBSEL_SIZE 3
67#define SM_PBBDIV_OFFSET 31
68#define SM_PBBDIV_SIZE 1
69
70/* Bitfields in PM_CPU_MASK */
71
72/* Bitfields in PM_HSB_MASK */
73
74/* Bitfields in PM_PBA_MASK */
75
76/* Bitfields in PM_PBB_MASK */
77
78/* Bitfields in PM_PLL0 */
79#define SM_PLLEN_OFFSET 0
80#define SM_PLLEN_SIZE 1
81#define SM_PLLOSC_OFFSET 1
82#define SM_PLLOSC_SIZE 1
83#define SM_PLLOPT_OFFSET 2
84#define SM_PLLOPT_SIZE 3
85#define SM_PLLDIV_OFFSET 8
86#define SM_PLLDIV_SIZE 8
87#define SM_PLLMUL_OFFSET 16
88#define SM_PLLMUL_SIZE 8
89#define SM_PLLCOUNT_OFFSET 24
90#define SM_PLLCOUNT_SIZE 6
91#define SM_PLLTEST_OFFSET 31
92#define SM_PLLTEST_SIZE 1
93
94/* Bitfields in PM_PLL1 */
95
96/* Bitfields in PM_VCTRL */
97#define SM_VAUTO_OFFSET 0
98#define SM_VAUTO_SIZE 1
99#define SM_PM_VCTRL_VAL_OFFSET 8
100#define SM_PM_VCTRL_VAL_SIZE 7
101
102/* Bitfields in PM_VMREF */
103#define SM_REFSEL_OFFSET 0
104#define SM_REFSEL_SIZE 4
105
106/* Bitfields in PM_VMV */
107#define SM_PM_VMV_VAL_OFFSET 0
108#define SM_PM_VMV_VAL_SIZE 8
109
110/* Bitfields in PM_IER */
111
112/* Bitfields in PM_IDR */
113
114/* Bitfields in PM_IMR */
115
116/* Bitfields in PM_ISR */
117
118/* Bitfields in PM_ICR */
119#define SM_LOCK0_OFFSET 0
120#define SM_LOCK0_SIZE 1
121#define SM_LOCK1_OFFSET 1
122#define SM_LOCK1_SIZE 1
123#define SM_WAKE_OFFSET 2
124#define SM_WAKE_SIZE 1
125#define SM_VOK_OFFSET 3
126#define SM_VOK_SIZE 1
127#define SM_VMRDY_OFFSET 4
128#define SM_VMRDY_SIZE 1
129#define SM_CKRDY_OFFSET 5
130#define SM_CKRDY_SIZE 1
131
132/* Bitfields in PM_GCCTRL */
133#define SM_OSCSEL_OFFSET 0
134#define SM_OSCSEL_SIZE 1
135#define SM_PLLSEL_OFFSET 1
136#define SM_PLLSEL_SIZE 1
137#define SM_CEN_OFFSET 2
138#define SM_CEN_SIZE 1
139#define SM_CPC_OFFSET 3
140#define SM_CPC_SIZE 1
141#define SM_DIVEN_OFFSET 4
142#define SM_DIVEN_SIZE 1
143#define SM_DIV_OFFSET 8
144#define SM_DIV_SIZE 8
145
146/* Bitfields in RTC_CTRL */
147#define SM_PCLR_OFFSET 1
148#define SM_PCLR_SIZE 1
149#define SM_TOPEN_OFFSET 2
150#define SM_TOPEN_SIZE 1
151#define SM_CLKEN_OFFSET 3
152#define SM_CLKEN_SIZE 1
153#define SM_PSEL_OFFSET 8
154#define SM_PSEL_SIZE 16
155
156/* Bitfields in RTC_VAL */
157#define SM_RTC_VAL_VAL_OFFSET 0
158#define SM_RTC_VAL_VAL_SIZE 31
159
160/* Bitfields in RTC_TOP */
161#define SM_RTC_TOP_VAL_OFFSET 0
162#define SM_RTC_TOP_VAL_SIZE 32
163
164/* Bitfields in RTC_IER */
165
166/* Bitfields in RTC_IDR */
167
168/* Bitfields in RTC_IMR */
169
170/* Bitfields in RTC_ISR */
171
172/* Bitfields in RTC_ICR */
173#define SM_TOPI_OFFSET 0
174#define SM_TOPI_SIZE 1
175
176/* Bitfields in WDT_CTRL */
177#define SM_KEY_OFFSET 24
178#define SM_KEY_SIZE 8
179
180/* Bitfields in WDT_CLR */
181
182/* Bitfields in WDT_EXT */
183
184/* Bitfields in RC_RCAUSE */
185#define SM_POR_OFFSET 0
186#define SM_POR_SIZE 1
187#define SM_BOD_OFFSET 1
188#define SM_BOD_SIZE 1
189#define SM_EXT_OFFSET 2
190#define SM_EXT_SIZE 1
191#define SM_WDT_OFFSET 3
192#define SM_WDT_SIZE 1
193#define SM_NTAE_OFFSET 4
194#define SM_NTAE_SIZE 1
195#define SM_SERP_OFFSET 5
196#define SM_SERP_SIZE 1
197
198/* Bitfields in EIM_IER */
199
200/* Bitfields in EIM_IDR */
201
202/* Bitfields in EIM_IMR */
203
204/* Bitfields in EIM_ISR */
205
206/* Bitfields in EIM_ICR */
207
208/* Bitfields in EIM_MODE */
209
210/* Bitfields in EIM_EDGE */
211#define SM_INT0_OFFSET 0
212#define SM_INT0_SIZE 1
213#define SM_INT1_OFFSET 1
214#define SM_INT1_SIZE 1
215#define SM_INT2_OFFSET 2
216#define SM_INT2_SIZE 1
217#define SM_INT3_OFFSET 3
218#define SM_INT3_SIZE 1
219
220/* Bitfields in EIM_LEVEL */
221
222/* Bitfields in EIM_TEST */
223#define SM_TESTEN_OFFSET 31
224#define SM_TESTEN_SIZE 1
225
226/* Bitfields in EIM_NMIC */
227#define SM_EN_OFFSET 0
228#define SM_EN_SIZE 1
229
230/* Bit manipulation macros */
231#define SM_BIT(name) (1 << SM_##name##_OFFSET)
232#define SM_BF(name,value) (((value) & ((1 << SM_##name##_SIZE) - 1)) << SM_##name##_OFFSET)
233#define SM_BFEXT(name,value) (((value) >> SM_##name##_OFFSET) & ((1 << SM_##name##_SIZE) - 1))
234#define SM_BFINS(name,value,old) (((old) & ~(((1 << SM_##name##_SIZE) - 1) << SM_##name##_OFFSET)) | SM_BF(name,value))
235
236/* Register access macros */
237#define sm_readl(port,reg) \
238 __raw_readl((port)->regs + SM_##reg)
239#define sm_writel(port,reg,value) \
240 __raw_writel((value), (port)->regs + SM_##reg)
241
242#endif /* __ASM_AVR32_SM_H__ */
diff --git a/arch/avr32/mm/cache.c b/arch/avr32/mm/cache.c
index 8f7b1c3cd0f9..c1233c615e67 100644
--- a/arch/avr32/mm/cache.c
+++ b/arch/avr32/mm/cache.c
@@ -23,7 +23,6 @@
23void invalidate_dcache_region(void *start, size_t size) 23void invalidate_dcache_region(void *start, size_t size)
24{ 24{
25 unsigned long v, begin, end, linesz, mask; 25 unsigned long v, begin, end, linesz, mask;
26 int flush = 0;
27 26
28 linesz = boot_cpu_data.dcache.linesz; 27 linesz = boot_cpu_data.dcache.linesz;
29 mask = linesz - 1; 28 mask = linesz - 1;
@@ -32,24 +31,21 @@ void invalidate_dcache_region(void *start, size_t size)
32 * instead of invalidating ... never discard valid data! 31 * instead of invalidating ... never discard valid data!
33 */ 32 */
34 begin = (unsigned long)start; 33 begin = (unsigned long)start;
35 end = begin + size - 1; 34 end = begin + size;
36 35
37 if (begin & mask) { 36 if (begin & mask) {
38 flush_dcache_line(start); 37 flush_dcache_line(start);
39 begin += linesz; 38 begin += linesz;
40 flush = 1;
41 } 39 }
42 if ((end & mask) != mask) { 40 if (end & mask) {
43 flush_dcache_line((void *)end); 41 flush_dcache_line((void *)end);
44 end -= linesz; 42 end &= ~mask;
45 flush = 1;
46 } 43 }
47 44
48 /* remaining cachelines only need invalidation */ 45 /* remaining cachelines only need invalidation */
49 for (v = begin; v <= end; v += linesz) 46 for (v = begin; v < end; v += linesz)
50 invalidate_dcache_line((void *)v); 47 invalidate_dcache_line((void *)v);
51 if (flush) 48 flush_write_buffer();
52 flush_write_buffer();
53} 49}
54 50
55void clean_dcache_region(void *start, size_t size) 51void clean_dcache_region(void *start, size_t size)
diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c
index e011f1ce1875..ae2d2c593b2b 100644
--- a/arch/avr32/mm/fault.c
+++ b/arch/avr32/mm/fault.c
@@ -64,6 +64,7 @@ asmlinkage void do_page_fault(unsigned long ecr, struct pt_regs *regs)
64 int writeaccess; 64 int writeaccess;
65 long signr; 65 long signr;
66 int code; 66 int code;
67 int fault;
67 68
68 if (notify_page_fault(regs, ecr)) 69 if (notify_page_fault(regs, ecr))
69 return; 70 return;
@@ -132,20 +133,18 @@ good_area:
132 * fault. 133 * fault.
133 */ 134 */
134survive: 135survive:
135 switch (handle_mm_fault(mm, vma, address, writeaccess)) { 136 fault = handle_mm_fault(mm, vma, address, writeaccess);
136 case VM_FAULT_MINOR: 137 if (unlikely(fault & VM_FAULT_ERROR)) {
137 tsk->min_flt++; 138 if (fault & VM_FAULT_OOM)
138 break; 139 goto out_of_memory;
139 case VM_FAULT_MAJOR: 140 else if (fault & VM_FAULT_SIGBUS)
140 tsk->maj_flt++; 141 goto do_sigbus;
141 break;
142 case VM_FAULT_SIGBUS:
143 goto do_sigbus;
144 case VM_FAULT_OOM:
145 goto out_of_memory;
146 default:
147 BUG(); 142 BUG();
148 } 143 }
144 if (fault & VM_FAULT_MAJOR)
145 tsk->maj_flt++;
146 else
147 tsk->min_flt++;
149 148
150 up_read(&mm->mmap_sem); 149 up_read(&mm->mmap_sem);
151 return; 150 return;
@@ -158,7 +157,7 @@ bad_area:
158 up_read(&mm->mmap_sem); 157 up_read(&mm->mmap_sem);
159 158
160 if (user_mode(regs)) { 159 if (user_mode(regs)) {
161 if (exception_trace) 160 if (exception_trace && printk_ratelimit())
162 printk("%s%s[%d]: segfault at %08lx pc %08lx " 161 printk("%s%s[%d]: segfault at %08lx pc %08lx "
163 "sp %08lx ecr %lu\n", 162 "sp %08lx ecr %lu\n",
164 is_init(tsk) ? KERN_EMERG : KERN_INFO, 163 is_init(tsk) ? KERN_EMERG : KERN_INFO,
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index b1b111bb2f3a..017defaa525b 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -71,6 +71,7 @@ config GENERIC_CALIBRATE_DELAY
71 71
72config IRQCHIP_DEMUX_GPIO 72config IRQCHIP_DEMUX_GPIO
73 bool 73 bool
74 depends on (BF53x || BF561 || BF54x)
74 default y 75 default y
75 76
76source "init/Kconfig" 77source "init/Kconfig"
@@ -114,6 +115,26 @@ config BF537
114 help 115 help
115 BF537 Processor Support. 116 BF537 Processor Support.
116 117
118config BF542
119 bool "BF542"
120 help
121 BF542 Processor Support.
122
123config BF544
124 bool "BF544"
125 help
126 BF544 Processor Support.
127
128config BF548
129 bool "BF548"
130 help
131 BF548 Processor Support.
132
133config BF549
134 bool "BF549"
135 help
136 BF549 Processor Support.
137
117config BF561 138config BF561
118 bool "BF561" 139 bool "BF561"
119 help 140 help
@@ -125,6 +146,11 @@ choice
125 prompt "Silicon Rev" 146 prompt "Silicon Rev"
126 default BF_REV_0_2 if BF537 147 default BF_REV_0_2 if BF537
127 default BF_REV_0_3 if BF533 148 default BF_REV_0_3 if BF533
149 default BF_REV_0_0 if BF549
150
151config BF_REV_0_0
152 bool "0.0"
153 depends on (BF549)
128 154
129config BF_REV_0_2 155config BF_REV_0_2
130 bool "0.2" 156 bool "0.2"
@@ -142,8 +168,24 @@ config BF_REV_0_5
142 bool "0.5" 168 bool "0.5"
143 depends on (BF561 || BF533 || BF532 || BF531) 169 depends on (BF561 || BF533 || BF532 || BF531)
144 170
171config BF_REV_ANY
172 bool "any"
173
174config BF_REV_NONE
175 bool "none"
176
145endchoice 177endchoice
146 178
179config BF53x
180 bool
181 depends on (BF531 || BF532 || BF533 || BF534 || BF536 || BF537)
182 default y
183
184config BF54x
185 bool
186 depends on (BF542 || BF544 || BF548 || BF549)
187 default y
188
147config BFIN_DUAL_CORE 189config BFIN_DUAL_CORE
148 bool 190 bool
149 depends on (BF561) 191 depends on (BF561)
@@ -192,6 +234,12 @@ config BFIN537_BLUETECHNIX_CM
192 help 234 help
193 CM-BF537 support for EVAL- and DEV-Board. 235 CM-BF537 support for EVAL- and DEV-Board.
194 236
237config BFIN548_EZKIT
238 bool "BF548-EZKIT"
239 depends on (BF548 || BF549)
240 help
241 BFIN548-EZKIT board Support.
242
195config BFIN561_BLUETECHNIX_CM 243config BFIN561_BLUETECHNIX_CM
196 bool "Bluetechnix CM-BF561" 244 bool "Bluetechnix CM-BF561"
197 depends on (BF561) 245 depends on (BF561)
@@ -259,6 +307,7 @@ config BFIN_SHARED_FLASH_ENET
259source "arch/blackfin/mach-bf533/Kconfig" 307source "arch/blackfin/mach-bf533/Kconfig"
260source "arch/blackfin/mach-bf561/Kconfig" 308source "arch/blackfin/mach-bf561/Kconfig"
261source "arch/blackfin/mach-bf537/Kconfig" 309source "arch/blackfin/mach-bf537/Kconfig"
310source "arch/blackfin/mach-bf548/Kconfig"
262 311
263menu "Board customizations" 312menu "Board customizations"
264 313
@@ -394,41 +443,6 @@ config BFIN_IDLE_LED_PIN
394 default 0x08 if (BFIN533_STAMP && BFIN_IDLE_LED_NUM = 2) 443 default 0x08 if (BFIN533_STAMP && BFIN_IDLE_LED_NUM = 2)
395 default 0x10 if (BFIN533_STAMP && BFIN_IDLE_LED_NUM = 3) 444 default 0x10 if (BFIN533_STAMP && BFIN_IDLE_LED_NUM = 3)
396 445
397comment "Console UART Setup"
398
399choice
400 prompt "Baud Rate"
401 default BAUD_57600
402config BAUD_9600
403 bool "9600"
404config BAUD_19200
405 bool "19200"
406config BAUD_38400
407 bool "38400"
408config BAUD_57600
409 bool "57600"
410config BAUD_115200
411 bool "115200"
412endchoice
413
414choice
415 prompt "Parity"
416 default BAUD_NO_PARITY
417config BAUD_NO_PARITY
418 bool "No Parity"
419config BAUD_PARITY
420 bool "Parity"
421endchoice
422
423choice
424 prompt "Stop Bits"
425 default BAUD_1_STOPBIT
426config BAUD_1_STOPBIT
427 bool "1"
428config BAUD_2_STOPBIT
429 bool "2"
430endchoice
431
432endmenu 446endmenu
433 447
434 448
@@ -526,7 +540,8 @@ config IP_CHECKSUM_L1
526 540
527config CACHELINE_ALIGNED_L1 541config CACHELINE_ALIGNED_L1
528 bool "Locate cacheline_aligned data to L1 Data Memory" 542 bool "Locate cacheline_aligned data to L1 Data Memory"
529 default y 543 default y if !BF54x
544 default n if BF54x
530 depends on !BF531 545 depends on !BF531
531 help 546 help
532 If enabled cacheline_anligned data is linked 547 If enabled cacheline_anligned data is linked
@@ -570,9 +585,17 @@ endchoice
570 585
571source "mm/Kconfig" 586source "mm/Kconfig"
572 587
588config LARGE_ALLOCS
589 bool "Allow allocating large blocks (> 1MB) of memory"
590 help
591 Allow the slab memory allocator to keep chains for very large
592 memory sizes - upto 32MB. You may need this if your system has
593 a lot of RAM, and you need to able to allocate very large
594 contiguous chunks. If unsure, say N.
595
573config BFIN_DMA_5XX 596config BFIN_DMA_5XX
574 bool "Enable DMA Support" 597 bool "Enable DMA Support"
575 depends on (BF533 || BF532 || BF531 || BF537 || BF536 || BF534 || BF561) 598 depends on (BF533 || BF532 || BF531 || BF537 || BF536 || BF534 || BF561 || BF54x)
576 default y 599 default y
577 help 600 help
578 DMA driver for BF5xx. 601 DMA driver for BF5xx.
@@ -715,6 +738,7 @@ config C_AMCKEN
715 738
716config C_CDPRIO 739config C_CDPRIO
717 bool "DMA has priority over core for ext. accesses" 740 bool "DMA has priority over core for ext. accesses"
741 depends on !BF54x
718 default n 742 default n
719 743
720config C_B0PEN 744config C_B0PEN
@@ -868,7 +892,7 @@ endchoice
868 892
869endmenu 893endmenu
870 894
871if (BF537 || BF533) 895if (BF537 || BF533 || BF54x)
872 896
873menu "CPU Frequency scaling" 897menu "CPU Frequency scaling"
874 898
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile
index 75e89c324756..1b75672dfc8f 100644
--- a/arch/blackfin/Makefile
+++ b/arch/blackfin/Makefile
@@ -24,10 +24,33 @@ machine-$(CONFIG_BF533) := bf533
24machine-$(CONFIG_BF534) := bf537 24machine-$(CONFIG_BF534) := bf537
25machine-$(CONFIG_BF536) := bf537 25machine-$(CONFIG_BF536) := bf537
26machine-$(CONFIG_BF537) := bf537 26machine-$(CONFIG_BF537) := bf537
27machine-$(CONFIG_BF548) := bf548
28machine-$(CONFIG_BF549) := bf548
27machine-$(CONFIG_BF561) := bf561 29machine-$(CONFIG_BF561) := bf561
28MACHINE := $(machine-y) 30MACHINE := $(machine-y)
29export MACHINE 31export MACHINE
30 32
33cpu-$(CONFIG_BF531) := bf531
34cpu-$(CONFIG_BF532) := bf532
35cpu-$(CONFIG_BF533) := bf533
36cpu-$(CONFIG_BF534) := bf534
37cpu-$(CONFIG_BF536) := bf536
38cpu-$(CONFIG_BF537) := bf537
39cpu-$(CONFIG_BF548) := bf548
40cpu-$(CONFIG_BF549) := bf549
41cpu-$(CONFIG_BF561) := bf561
42
43rev-$(CONFIG_BF_REV_0_0) := 0.0
44rev-$(CONFIG_BF_REV_0_1) := 0.1
45rev-$(CONFIG_BF_REV_0_2) := 0.2
46rev-$(CONFIG_BF_REV_0_3) := 0.3
47rev-$(CONFIG_BF_REV_0_4) := 0.4
48rev-$(CONFIG_BF_REV_0_5) := 0.5
49rev-$(CONFIG_BF_REV_NONE) := none
50rev-$(CONFIG_BF_REV_ANY) := any
51
52CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
53AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
31 54
32head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o 55head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
33 56
diff --git a/arch/blackfin/boot/Makefile b/arch/blackfin/boot/Makefile
index 49e8098d4c21..8cd33560e817 100644
--- a/arch/blackfin/boot/Makefile
+++ b/arch/blackfin/boot/Makefile
@@ -13,7 +13,8 @@ extra-y += vmlinux.bin vmlinux.gz
13 13
14quiet_cmd_uimage = UIMAGE $@ 14quiet_cmd_uimage = UIMAGE $@
15 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \ 15 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \
16 -C gzip -a $(CONFIG_BOOT_LOAD) -e $(CONFIG_BOOT_LOAD) -n 'Linux-$(KERNELRELEASE)' \ 16 -C gzip -n 'Linux-$(KERNELRELEASE)' -a $(CONFIG_BOOT_LOAD) \
17 -e $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}') \
17 -d $< $@ 18 -d $< $@
18 19
19$(obj)/vmlinux.bin: vmlinux FORCE 20$(obj)/vmlinux.bin: vmlinux FORCE
diff --git a/arch/blackfin/configs/BF533-EZKIT_defconfig b/arch/blackfin/configs/BF533-EZKIT_defconfig
index 377c8e05e4ab..1cf1ab28dc66 100644
--- a/arch/blackfin/configs/BF533-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF533-EZKIT_defconfig
@@ -1,20 +1,21 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19.3 3# Linux kernel version: 2.6.21.5
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
9CONFIG_BLACKFIN=y 9CONFIG_BLACKFIN=y
10CONFIG_ZONE_DMA=y
10CONFIG_BFIN=y 11CONFIG_BFIN=y
11CONFIG_SEMAPHORE_SLEEPERS=y 12CONFIG_SEMAPHORE_SLEEPERS=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y 13CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_GENERIC_HWEIGHT=y 14CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 15CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17# CONFIG_GENERIC_TIME is not set
16CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_UCLINUX=y
18CONFIG_FORCE_MAX_ZONEORDER=14 19CONFIG_FORCE_MAX_ZONEORDER=14
19CONFIG_IRQCHIP_DEMUX_GPIO=y 20CONFIG_IRQCHIP_DEMUX_GPIO=y
20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -33,13 +34,16 @@ CONFIG_LOCALVERSION=""
33CONFIG_LOCALVERSION_AUTO=y 34CONFIG_LOCALVERSION_AUTO=y
34CONFIG_SYSVIPC=y 35CONFIG_SYSVIPC=y
35# CONFIG_IPC_NS is not set 36# CONFIG_IPC_NS is not set
37CONFIG_SYSVIPC_SYSCTL=y
36# CONFIG_POSIX_MQUEUE is not set 38# CONFIG_POSIX_MQUEUE is not set
37# CONFIG_BSD_PROCESS_ACCT is not set 39# CONFIG_BSD_PROCESS_ACCT is not set
38# CONFIG_TASKSTATS is not set 40# CONFIG_TASKSTATS is not set
39# CONFIG_UTS_NS is not set 41# CONFIG_UTS_NS is not set
40# CONFIG_AUDIT is not set 42# CONFIG_AUDIT is not set
41# CONFIG_IKCONFIG is not set 43# CONFIG_IKCONFIG is not set
44CONFIG_SYSFS_DEPRECATED=y
42# CONFIG_RELAY is not set 45# CONFIG_RELAY is not set
46CONFIG_BLK_DEV_INITRD=y
43CONFIG_INITRAMFS_SOURCE="" 47CONFIG_INITRAMFS_SOURCE=""
44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 48# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
45CONFIG_SYSCTL=y 49CONFIG_SYSCTL=y
@@ -54,9 +58,7 @@ CONFIG_BUG=y
54CONFIG_ELF_CORE=y 58CONFIG_ELF_CORE=y
55CONFIG_BASE_FULL=y 59CONFIG_BASE_FULL=y
56CONFIG_FUTEX=y 60CONFIG_FUTEX=y
57CONFIG_EPOLL=y
58CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 61CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
59# CONFIG_LIMIT_PAGECACHE is not set
60CONFIG_BUDDY=y 62CONFIG_BUDDY=y
61# CONFIG_NP2 is not set 63# CONFIG_NP2 is not set
62CONFIG_SLAB=y 64CONFIG_SLAB=y
@@ -80,7 +82,9 @@ CONFIG_KMOD=y
80# Block layer 82# Block layer
81# 83#
82CONFIG_BLOCK=y 84CONFIG_BLOCK=y
85# CONFIG_LBD is not set
83# CONFIG_BLK_DEV_IO_TRACE is not set 86# CONFIG_BLK_DEV_IO_TRACE is not set
87# CONFIG_LSF is not set
84 88
85# 89#
86# IO Schedulers 90# IO Schedulers
@@ -109,22 +113,31 @@ CONFIG_PREEMPT_VOLUNTARY=y
109# CONFIG_BF532 is not set 113# CONFIG_BF532 is not set
110CONFIG_BF533=y 114CONFIG_BF533=y
111# CONFIG_BF534 is not set 115# CONFIG_BF534 is not set
112# CONFIG_BF535 is not set
113# CONFIG_BF536 is not set 116# CONFIG_BF536 is not set
114# CONFIG_BF537 is not set 117# CONFIG_BF537 is not set
118# CONFIG_BF542 is not set
119# CONFIG_BF544 is not set
120# CONFIG_BF548 is not set
121# CONFIG_BF549 is not set
115# CONFIG_BF561 is not set 122# CONFIG_BF561 is not set
123# CONFIG_BF_REV_0_0 is not set
116# CONFIG_BF_REV_0_2 is not set 124# CONFIG_BF_REV_0_2 is not set
117CONFIG_BF_REV_0_3=y 125CONFIG_BF_REV_0_3=y
118# CONFIG_BF_REV_0_4 is not set 126# CONFIG_BF_REV_0_4 is not set
119# CONFIG_BF_REV_0_5 is not set 127# CONFIG_BF_REV_0_5 is not set
128# CONFIG_BF_REV_ANY is not set
129# CONFIG_BF_REV_NONE is not set
130CONFIG_BF53x=y
120CONFIG_BFIN_SINGLE_CORE=y 131CONFIG_BFIN_SINGLE_CORE=y
121CONFIG_BFIN533_EZKIT=y 132CONFIG_BFIN533_EZKIT=y
122# CONFIG_BFIN533_STAMP is not set 133# CONFIG_BFIN533_STAMP is not set
123# CONFIG_BFIN537_STAMP is not set 134# CONFIG_BFIN537_STAMP is not set
124# CONFIG_BFIN533_BLUETECHNIX_CM is not set 135# CONFIG_BFIN533_BLUETECHNIX_CM is not set
125# CONFIG_BFIN537_BLUETECHNIX_CM is not set 136# CONFIG_BFIN537_BLUETECHNIX_CM is not set
137# CONFIG_BFIN548_EZKIT is not set
126# CONFIG_BFIN561_BLUETECHNIX_CM is not set 138# CONFIG_BFIN561_BLUETECHNIX_CM is not set
127# CONFIG_BFIN561_EZKIT is not set 139# CONFIG_BFIN561_EZKIT is not set
140# CONFIG_BFIN561_TEPLA is not set
128# CONFIG_PNAV10 is not set 141# CONFIG_PNAV10 is not set
129# CONFIG_GENERIC_BOARD is not set 142# CONFIG_GENERIC_BOARD is not set
130CONFIG_MEM_MT48LC16M16A2TG_75=y 143CONFIG_MEM_MT48LC16M16A2TG_75=y
@@ -168,6 +181,7 @@ CONFIG_WDTIMER=13
168# 181#
169# Board customizations 182# Board customizations
170# 183#
184# CONFIG_CMDLINE_BOOL is not set
171 185
172# 186#
173# Board Setup 187# Board Setup
@@ -178,19 +192,6 @@ CONFIG_MEM_ADD_WIDTH=9
178CONFIG_BOOT_LOAD=0x1000 192CONFIG_BOOT_LOAD=0x1000
179 193
180# 194#
181# Console UART Setup
182#
183# CONFIG_BAUD_9600 is not set
184# CONFIG_BAUD_19200 is not set
185# CONFIG_BAUD_38400 is not set
186CONFIG_BAUD_57600=y
187# CONFIG_BAUD_115200 is not set
188CONFIG_BAUD_NO_PARITY=y
189# CONFIG_BAUD_PARITY is not set
190CONFIG_BAUD_1_STOPBIT=y
191# CONFIG_BAUD_2_STOPBIT is not set
192
193#
194# Blackfin Kernel Optimizations 195# Blackfin Kernel Optimizations
195# 196#
196 197
@@ -199,6 +200,7 @@ CONFIG_BAUD_1_STOPBIT=y
199# 200#
200# CONFIG_HZ_100 is not set 201# CONFIG_HZ_100 is not set
201CONFIG_HZ_250=y 202CONFIG_HZ_250=y
203# CONFIG_HZ_300 is not set
202# CONFIG_HZ_1000 is not set 204# CONFIG_HZ_1000 is not set
203CONFIG_HZ=250 205CONFIG_HZ=250
204 206
@@ -217,6 +219,7 @@ CONFIG_MEMSET_L1=y
217CONFIG_MEMCPY_L1=y 219CONFIG_MEMCPY_L1=y
218CONFIG_SYS_BFIN_SPINLOCK_L1=y 220CONFIG_SYS_BFIN_SPINLOCK_L1=y
219# CONFIG_IP_CHECKSUM_L1 is not set 221# CONFIG_IP_CHECKSUM_L1 is not set
222CONFIG_CACHELINE_ALIGNED_L1=y
220# CONFIG_SYSCALL_TAB_L1 is not set 223# CONFIG_SYSCALL_TAB_L1 is not set
221# CONFIG_CPLB_SWITCH_TAB_L1 is not set 224# CONFIG_CPLB_SWITCH_TAB_L1 is not set
222CONFIG_RAMKERNEL=y 225CONFIG_RAMKERNEL=y
@@ -230,6 +233,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
230# CONFIG_SPARSEMEM_STATIC is not set 233# CONFIG_SPARSEMEM_STATIC is not set
231CONFIG_SPLIT_PTLOCK_CPUS=4 234CONFIG_SPLIT_PTLOCK_CPUS=4
232# CONFIG_RESOURCES_64BIT is not set 235# CONFIG_RESOURCES_64BIT is not set
236CONFIG_ZONE_DMA_FLAG=1
233CONFIG_LARGE_ALLOCS=y 237CONFIG_LARGE_ALLOCS=y
234CONFIG_BFIN_DMA_5XX=y 238CONFIG_BFIN_DMA_5XX=y
235# CONFIG_DMA_UNCACHED_2M is not set 239# CONFIG_DMA_UNCACHED_2M is not set
@@ -302,7 +306,7 @@ CONFIG_BINFMT_ZFLAT=y
302# Power management options 306# Power management options
303# 307#
304CONFIG_PM=y 308CONFIG_PM=y
305CONFIG_PM_LEGACY=y 309# CONFIG_PM_LEGACY is not set
306# CONFIG_PM_DEBUG is not set 310# CONFIG_PM_DEBUG is not set
307# CONFIG_PM_SYSFS_DEPRECATED is not set 311# CONFIG_PM_SYSFS_DEPRECATED is not set
308CONFIG_PM_WAKEUP_GPIO_BY_SIC_IWR=y 312CONFIG_PM_WAKEUP_GPIO_BY_SIC_IWR=y
@@ -330,6 +334,7 @@ CONFIG_UNIX=y
330CONFIG_XFRM=y 334CONFIG_XFRM=y
331# CONFIG_XFRM_USER is not set 335# CONFIG_XFRM_USER is not set
332# CONFIG_XFRM_SUB_POLICY is not set 336# CONFIG_XFRM_SUB_POLICY is not set
337# CONFIG_XFRM_MIGRATE is not set
333# CONFIG_NET_KEY is not set 338# CONFIG_NET_KEY is not set
334CONFIG_INET=y 339CONFIG_INET=y
335# CONFIG_IP_MULTICAST is not set 340# CONFIG_IP_MULTICAST is not set
@@ -356,6 +361,7 @@ CONFIG_INET_TCP_DIAG=y
356# CONFIG_TCP_CONG_ADVANCED is not set 361# CONFIG_TCP_CONG_ADVANCED is not set
357CONFIG_TCP_CONG_CUBIC=y 362CONFIG_TCP_CONG_CUBIC=y
358CONFIG_DEFAULT_TCP_CONG="cubic" 363CONFIG_DEFAULT_TCP_CONG="cubic"
364# CONFIG_TCP_MD5SIG is not set
359# CONFIG_IPV6 is not set 365# CONFIG_IPV6 is not set
360# CONFIG_INET6_XFRM_TUNNEL is not set 366# CONFIG_INET6_XFRM_TUNNEL is not set
361# CONFIG_INET6_TUNNEL is not set 367# CONFIG_INET6_TUNNEL is not set
@@ -399,7 +405,48 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
399# 405#
400# CONFIG_NET_PKTGEN is not set 406# CONFIG_NET_PKTGEN is not set
401# CONFIG_HAMRADIO is not set 407# CONFIG_HAMRADIO is not set
402# CONFIG_IRDA is not set 408CONFIG_IRDA=m
409
410#
411# IrDA protocols
412#
413CONFIG_IRLAN=m
414CONFIG_IRCOMM=m
415# CONFIG_IRDA_ULTRA is not set
416
417#
418# IrDA options
419#
420CONFIG_IRDA_CACHE_LAST_LSAP=y
421# CONFIG_IRDA_FAST_RR is not set
422# CONFIG_IRDA_DEBUG is not set
423
424#
425# Infrared-port device drivers
426#
427
428#
429# SIR device drivers
430#
431CONFIG_IRTTY_SIR=m
432
433#
434# Dongle support
435#
436# CONFIG_DONGLE is not set
437
438#
439# Old SIR device drivers
440#
441# CONFIG_IRPORT_SIR is not set
442
443#
444# Old Serial dongle support
445#
446
447#
448# FIR device drivers
449#
403# CONFIG_BT is not set 450# CONFIG_BT is not set
404# CONFIG_IEEE80211 is not set 451# CONFIG_IEEE80211 is not set
405 452
@@ -434,6 +481,7 @@ CONFIG_MTD_PARTITIONS=y
434# User Modules And Translation Layers 481# User Modules And Translation Layers
435# 482#
436CONFIG_MTD_CHAR=m 483CONFIG_MTD_CHAR=m
484CONFIG_MTD_BLKDEVS=y
437CONFIG_MTD_BLOCK=y 485CONFIG_MTD_BLOCK=y
438# CONFIG_FTL is not set 486# CONFIG_FTL is not set
439# CONFIG_NFTL is not set 487# CONFIG_NFTL is not set
@@ -489,6 +537,8 @@ CONFIG_BFIN_FLASH_BANK_3=0x7BB0
489# 537#
490# Self-contained MTD device drivers 538# Self-contained MTD device drivers
491# 539#
540# CONFIG_MTD_DATAFLASH is not set
541# CONFIG_MTD_M25P80 is not set
492# CONFIG_MTD_SLRAM is not set 542# CONFIG_MTD_SLRAM is not set
493# CONFIG_MTD_PHRAM is not set 543# CONFIG_MTD_PHRAM is not set
494# CONFIG_MTD_MTDRAM is not set 544# CONFIG_MTD_MTDRAM is not set
@@ -519,6 +569,7 @@ CONFIG_BFIN_FLASH_BANK_3=0x7BB0
519# 569#
520# Plug and Play support 570# Plug and Play support
521# 571#
572# CONFIG_PNPACPI is not set
522 573
523# 574#
524# Block devices 575# Block devices
@@ -530,14 +581,12 @@ CONFIG_BLK_DEV_RAM=y
530CONFIG_BLK_DEV_RAM_COUNT=16 581CONFIG_BLK_DEV_RAM_COUNT=16
531CONFIG_BLK_DEV_RAM_SIZE=4096 582CONFIG_BLK_DEV_RAM_SIZE=4096
532CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 583CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
533# CONFIG_BLK_DEV_INITRD is not set
534# CONFIG_CDROM_PKTCDVD is not set 584# CONFIG_CDROM_PKTCDVD is not set
535# CONFIG_ATA_OVER_ETH is not set 585# CONFIG_ATA_OVER_ETH is not set
536 586
537# 587#
538# Misc devices 588# Misc devices
539# 589#
540# CONFIG_TIFM_CORE is not set
541 590
542# 591#
543# ATA/ATAPI/MFM/RLL support 592# ATA/ATAPI/MFM/RLL support
@@ -594,6 +643,7 @@ CONFIG_NETDEVICES=y
594CONFIG_NET_ETHERNET=y 643CONFIG_NET_ETHERNET=y
595CONFIG_MII=y 644CONFIG_MII=y
596CONFIG_SMC91X=y 645CONFIG_SMC91X=y
646# CONFIG_SMSC911X is not set
597 647
598# 648#
599# Ethernet (1000 Mbit) 649# Ethernet (1000 Mbit)
@@ -636,7 +686,26 @@ CONFIG_SMC91X=y
636# 686#
637# Input device support 687# Input device support
638# 688#
639# CONFIG_INPUT is not set 689CONFIG_INPUT=m
690# CONFIG_INPUT_FF_MEMLESS is not set
691
692#
693# Userland interfaces
694#
695# CONFIG_INPUT_MOUSEDEV is not set
696# CONFIG_INPUT_JOYDEV is not set
697# CONFIG_INPUT_TSDEV is not set
698CONFIG_INPUT_EVDEV=m
699# CONFIG_INPUT_EVBUG is not set
700
701#
702# Input Device Drivers
703#
704# CONFIG_INPUT_KEYBOARD is not set
705# CONFIG_INPUT_MOUSE is not set
706# CONFIG_INPUT_JOYSTICK is not set
707# CONFIG_INPUT_TOUCHSCREEN is not set
708# CONFIG_INPUT_MISC is not set
640 709
641# 710#
642# Hardware I/O ports 711# Hardware I/O ports
@@ -649,12 +718,14 @@ CONFIG_SMC91X=y
649# 718#
650# CONFIG_AD9960 is not set 719# CONFIG_AD9960 is not set
651# CONFIG_SPI_ADC_BF533 is not set 720# CONFIG_SPI_ADC_BF533 is not set
652# CONFIG_BF533_PFLAGS is not set 721# CONFIG_BF5xx_PFLAGS is not set
653# CONFIG_BF5xx_PPIFCD is not set 722# CONFIG_BF5xx_PPIFCD is not set
654# CONFIG_BF5xx_TIMERS is not set 723# CONFIG_BF5xx_TIMERS is not set
655# CONFIG_BF5xx_PPI is not set 724# CONFIG_BF5xx_PPI is not set
656# CONFIG_BFIN_SPORT is not set 725CONFIG_BFIN_SPORT=y
657# CONFIG_BFIN_TIMER_LATENCY is not set 726# CONFIG_BFIN_TIMER_LATENCY is not set
727# CONFIG_AD5304 is not set
728# CONFIG_BF5xx_FBDMA is not set
658# CONFIG_VT is not set 729# CONFIG_VT is not set
659# CONFIG_SERIAL_NONSTANDARD is not set 730# CONFIG_SERIAL_NONSTANDARD is not set
660 731
@@ -691,16 +762,19 @@ CONFIG_UNIX98_PTYS=y
691# 762#
692# Watchdog Cards 763# Watchdog Cards
693# 764#
694# CONFIG_WATCHDOG is not set 765CONFIG_WATCHDOG=y
766# CONFIG_WATCHDOG_NOWAYOUT is not set
767
768#
769# Watchdog Device Drivers
770#
771# CONFIG_SOFT_WATCHDOG is not set
772CONFIG_BFIN_WDT=y
695CONFIG_HW_RANDOM=y 773CONFIG_HW_RANDOM=y
696# CONFIG_GEN_RTC is not set 774# CONFIG_GEN_RTC is not set
697CONFIG_BLACKFIN_DPMC=y 775CONFIG_BLACKFIN_DPMC=y
698# CONFIG_DTLK is not set 776# CONFIG_DTLK is not set
699# CONFIG_R3964 is not set 777# CONFIG_R3964 is not set
700
701#
702# Ftape, the floppy tape device driver
703#
704# CONFIG_RAW_DRIVER is not set 778# CONFIG_RAW_DRIVER is not set
705 779
706# 780#
@@ -716,8 +790,19 @@ CONFIG_BLACKFIN_DPMC=y
716# 790#
717# SPI support 791# SPI support
718# 792#
719# CONFIG_SPI is not set 793CONFIG_SPI=y
720# CONFIG_SPI_MASTER is not set 794CONFIG_SPI_MASTER=y
795
796#
797# SPI Master Controller Drivers
798#
799CONFIG_SPI_BFIN=y
800# CONFIG_SPI_BITBANG is not set
801
802#
803# SPI Protocol Masters
804#
805# CONFIG_SPI_AT25 is not set
721 806
722# 807#
723# Dallas's 1-wire bus 808# Dallas's 1-wire bus
@@ -731,10 +816,17 @@ CONFIG_HWMON=y
731# CONFIG_HWMON_VID is not set 816# CONFIG_HWMON_VID is not set
732# CONFIG_SENSORS_ABITUGURU is not set 817# CONFIG_SENSORS_ABITUGURU is not set
733# CONFIG_SENSORS_F71805F is not set 818# CONFIG_SENSORS_F71805F is not set
819# CONFIG_SENSORS_LM70 is not set
820# CONFIG_SENSORS_PC87427 is not set
734# CONFIG_SENSORS_VT1211 is not set 821# CONFIG_SENSORS_VT1211 is not set
735# CONFIG_HWMON_DEBUG_CHIP is not set 822# CONFIG_HWMON_DEBUG_CHIP is not set
736 823
737# 824#
825# Multifunction device drivers
826#
827# CONFIG_MFD_SM501 is not set
828
829#
738# Multimedia devices 830# Multimedia devices
739# 831#
740# CONFIG_VIDEO_DEV is not set 832# CONFIG_VIDEO_DEV is not set
@@ -747,9 +839,8 @@ CONFIG_HWMON=y
747# 839#
748# Graphics support 840# Graphics support
749# 841#
750CONFIG_FIRMWARE_EDID=y
751# CONFIG_FB is not set
752# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 842# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
843# CONFIG_FB is not set
753 844
754# 845#
755# Sound 846# Sound
@@ -757,6 +848,12 @@ CONFIG_FIRMWARE_EDID=y
757# CONFIG_SOUND is not set 848# CONFIG_SOUND is not set
758 849
759# 850#
851# HID Devices
852#
853CONFIG_HID=m
854# CONFIG_HID_DEBUG is not set
855
856#
760# USB support 857# USB support
761# 858#
762CONFIG_USB_ARCH_HAS_HCD=y 859CONFIG_USB_ARCH_HAS_HCD=y
@@ -776,6 +873,7 @@ CONFIG_USB_ARCH_HAS_HCD=y
776# 873#
777# MMC/SD Card support 874# MMC/SD Card support
778# 875#
876# CONFIG_SPI_MMC is not set
779# CONFIG_MMC is not set 877# CONFIG_MMC is not set
780 878
781# 879#
@@ -821,8 +919,10 @@ CONFIG_RTC_INTF_DEV=y
821# 919#
822# CONFIG_RTC_DRV_DS1553 is not set 920# CONFIG_RTC_DRV_DS1553 is not set
823# CONFIG_RTC_DRV_DS1742 is not set 921# CONFIG_RTC_DRV_DS1742 is not set
922# CONFIG_RTC_DRV_RS5C348 is not set
824# CONFIG_RTC_DRV_M48T86 is not set 923# CONFIG_RTC_DRV_M48T86 is not set
825# CONFIG_RTC_DRV_TEST is not set 924# CONFIG_RTC_DRV_TEST is not set
925# CONFIG_RTC_DRV_MAX6902 is not set
826# CONFIG_RTC_DRV_V3020 is not set 926# CONFIG_RTC_DRV_V3020 is not set
827CONFIG_RTC_DRV_BFIN=y 927CONFIG_RTC_DRV_BFIN=y
828 928
@@ -840,6 +940,14 @@ CONFIG_RTC_DRV_BFIN=y
840# 940#
841 941
842# 942#
943# Auxiliary Display support
944#
945
946#
947# Virtualization
948#
949
950#
843# PBX support 951# PBX support
844# 952#
845# CONFIG_PBX is not set 953# CONFIG_PBX is not set
@@ -847,13 +955,9 @@ CONFIG_RTC_DRV_BFIN=y
847# 955#
848# File systems 956# File systems
849# 957#
850CONFIG_EXT2_FS=y 958# CONFIG_EXT2_FS is not set
851CONFIG_EXT2_FS_XATTR=y
852# CONFIG_EXT2_FS_POSIX_ACL is not set
853# CONFIG_EXT2_FS_SECURITY is not set
854# CONFIG_EXT3_FS is not set 959# CONFIG_EXT3_FS is not set
855# CONFIG_EXT4DEV_FS is not set 960# CONFIG_EXT4DEV_FS is not set
856CONFIG_FS_MBCACHE=y
857# CONFIG_REISERFS_FS is not set 961# CONFIG_REISERFS_FS is not set
858# CONFIG_JFS_FS is not set 962# CONFIG_JFS_FS is not set
859# CONFIG_FS_POSIX_ACL is not set 963# CONFIG_FS_POSIX_ACL is not set
@@ -862,7 +966,8 @@ CONFIG_FS_MBCACHE=y
862# CONFIG_OCFS2_FS is not set 966# CONFIG_OCFS2_FS is not set
863# CONFIG_MINIX_FS is not set 967# CONFIG_MINIX_FS is not set
864# CONFIG_ROMFS_FS is not set 968# CONFIG_ROMFS_FS is not set
865# CONFIG_INOTIFY is not set 969CONFIG_INOTIFY=y
970CONFIG_INOTIFY_USER=y
866# CONFIG_QUOTA is not set 971# CONFIG_QUOTA is not set
867# CONFIG_DNOTIFY is not set 972# CONFIG_DNOTIFY is not set
868# CONFIG_AUTOFS_FS is not set 973# CONFIG_AUTOFS_FS is not set
@@ -913,7 +1018,6 @@ CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10
913# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set 1018# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
914# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set 1019# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
915CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y 1020CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
916# CONFIG_JFFS_FS is not set
917CONFIG_JFFS2_FS=m 1021CONFIG_JFFS2_FS=m
918CONFIG_JFFS2_FS_DEBUG=0 1022CONFIG_JFFS2_FS_DEBUG=0
919CONFIG_JFFS2_FS_WRITEBUFFER=y 1023CONFIG_JFFS2_FS_WRITEBUFFER=y
@@ -945,7 +1049,8 @@ CONFIG_NFS_COMMON=y
945CONFIG_SUNRPC=m 1049CONFIG_SUNRPC=m
946# CONFIG_RPCSEC_GSS_KRB5 is not set 1050# CONFIG_RPCSEC_GSS_KRB5 is not set
947# CONFIG_RPCSEC_GSS_SPKM3 is not set 1051# CONFIG_RPCSEC_GSS_SPKM3 is not set
948# CONFIG_SMB_FS is not set 1052CONFIG_SMB_FS=m
1053# CONFIG_SMB_NLS_DEFAULT is not set
949# CONFIG_CIFS is not set 1054# CONFIG_CIFS is not set
950# CONFIG_NCP_FS is not set 1055# CONFIG_NCP_FS is not set
951# CONFIG_CODA_FS is not set 1056# CONFIG_CODA_FS is not set
@@ -961,7 +1066,51 @@ CONFIG_MSDOS_PARTITION=y
961# 1066#
962# Native Language Support 1067# Native Language Support
963# 1068#
964# CONFIG_NLS is not set 1069CONFIG_NLS=m
1070CONFIG_NLS_DEFAULT="iso8859-1"
1071# CONFIG_NLS_CODEPAGE_437 is not set
1072# CONFIG_NLS_CODEPAGE_737 is not set
1073# CONFIG_NLS_CODEPAGE_775 is not set
1074# CONFIG_NLS_CODEPAGE_850 is not set
1075# CONFIG_NLS_CODEPAGE_852 is not set
1076# CONFIG_NLS_CODEPAGE_855 is not set
1077# CONFIG_NLS_CODEPAGE_857 is not set
1078# CONFIG_NLS_CODEPAGE_860 is not set
1079# CONFIG_NLS_CODEPAGE_861 is not set
1080# CONFIG_NLS_CODEPAGE_862 is not set
1081# CONFIG_NLS_CODEPAGE_863 is not set
1082# CONFIG_NLS_CODEPAGE_864 is not set
1083# CONFIG_NLS_CODEPAGE_865 is not set
1084# CONFIG_NLS_CODEPAGE_866 is not set
1085# CONFIG_NLS_CODEPAGE_869 is not set
1086# CONFIG_NLS_CODEPAGE_936 is not set
1087# CONFIG_NLS_CODEPAGE_950 is not set
1088# CONFIG_NLS_CODEPAGE_932 is not set
1089# CONFIG_NLS_CODEPAGE_949 is not set
1090# CONFIG_NLS_CODEPAGE_874 is not set
1091# CONFIG_NLS_ISO8859_8 is not set
1092# CONFIG_NLS_CODEPAGE_1250 is not set
1093# CONFIG_NLS_CODEPAGE_1251 is not set
1094# CONFIG_NLS_ASCII is not set
1095# CONFIG_NLS_ISO8859_1 is not set
1096# CONFIG_NLS_ISO8859_2 is not set
1097# CONFIG_NLS_ISO8859_3 is not set
1098# CONFIG_NLS_ISO8859_4 is not set
1099# CONFIG_NLS_ISO8859_5 is not set
1100# CONFIG_NLS_ISO8859_6 is not set
1101# CONFIG_NLS_ISO8859_7 is not set
1102# CONFIG_NLS_ISO8859_9 is not set
1103# CONFIG_NLS_ISO8859_13 is not set
1104# CONFIG_NLS_ISO8859_14 is not set
1105# CONFIG_NLS_ISO8859_15 is not set
1106# CONFIG_NLS_KOI8_R is not set
1107# CONFIG_NLS_KOI8_U is not set
1108# CONFIG_NLS_UTF8 is not set
1109
1110#
1111# Distributed Lock Manager
1112#
1113# CONFIG_DLM is not set
965 1114
966# 1115#
967# Profiling support 1116# Profiling support
@@ -975,19 +1124,16 @@ CONFIG_MSDOS_PARTITION=y
975CONFIG_ENABLE_MUST_CHECK=y 1124CONFIG_ENABLE_MUST_CHECK=y
976# CONFIG_MAGIC_SYSRQ is not set 1125# CONFIG_MAGIC_SYSRQ is not set
977# CONFIG_UNUSED_SYMBOLS is not set 1126# CONFIG_UNUSED_SYMBOLS is not set
1127# CONFIG_DEBUG_FS is not set
1128# CONFIG_HEADERS_CHECK is not set
978# CONFIG_DEBUG_KERNEL is not set 1129# CONFIG_DEBUG_KERNEL is not set
979CONFIG_LOG_BUF_SHIFT=14 1130CONFIG_LOG_BUF_SHIFT=14
980# CONFIG_DEBUG_BUGVERBOSE is not set 1131# CONFIG_DEBUG_BUGVERBOSE is not set
981# CONFIG_DEBUG_FS is not set
982# CONFIG_UNWIND_INFO is not set
983# CONFIG_HEADERS_CHECK is not set
984# CONFIG_DEBUG_SERIAL_EARLY_INIT is not set 1132# CONFIG_DEBUG_SERIAL_EARLY_INIT is not set
985CONFIG_DEBUG_HUNT_FOR_ZERO=y 1133CONFIG_DEBUG_HUNT_FOR_ZERO=y
986# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1134# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
987# CONFIG_BOOTPARAM is not set
988# CONFIG_NO_KERNEL_MSG is not set
989CONFIG_CPLB_INFO=y 1135CONFIG_CPLB_INFO=y
990# CONFIG_NO_ACCESS_CHECK is not set 1136CONFIG_ACCESS_CHECK=y
991 1137
992# 1138#
993# Security options 1139# Security options
@@ -995,7 +1141,7 @@ CONFIG_CPLB_INFO=y
995# CONFIG_KEYS is not set 1141# CONFIG_KEYS is not set
996CONFIG_SECURITY=y 1142CONFIG_SECURITY=y
997# CONFIG_SECURITY_NETWORK is not set 1143# CONFIG_SECURITY_NETWORK is not set
998CONFIG_SECURITY_CAPABILITIES=y 1144CONFIG_SECURITY_CAPABILITIES=m
999 1145
1000# 1146#
1001# Cryptographic options 1147# Cryptographic options
@@ -1005,10 +1151,13 @@ CONFIG_SECURITY_CAPABILITIES=y
1005# 1151#
1006# Library routines 1152# Library routines
1007# 1153#
1008# CONFIG_CRC_CCITT is not set 1154CONFIG_BITREVERSE=y
1155CONFIG_CRC_CCITT=m
1009# CONFIG_CRC16 is not set 1156# CONFIG_CRC16 is not set
1010CONFIG_CRC32=y 1157CONFIG_CRC32=y
1011# CONFIG_LIBCRC32C is not set 1158# CONFIG_LIBCRC32C is not set
1012CONFIG_ZLIB_INFLATE=y 1159CONFIG_ZLIB_INFLATE=y
1013CONFIG_ZLIB_DEFLATE=m 1160CONFIG_ZLIB_DEFLATE=m
1014CONFIG_PLIST=y 1161CONFIG_PLIST=y
1162CONFIG_HAS_IOMEM=y
1163CONFIG_HAS_IOPORT=y
diff --git a/arch/blackfin/configs/BF533-STAMP_defconfig b/arch/blackfin/configs/BF533-STAMP_defconfig
index 14a948c288a5..64b7f1b3b2af 100644
--- a/arch/blackfin/configs/BF533-STAMP_defconfig
+++ b/arch/blackfin/configs/BF533-STAMP_defconfig
@@ -1,12 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20.4 3# Linux kernel version: 2.6.21.5
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
9CONFIG_BLACKFIN=y 9CONFIG_BLACKFIN=y
10CONFIG_ZONE_DMA=y
10CONFIG_BFIN=y 11CONFIG_BFIN=y
11CONFIG_SEMAPHORE_SLEEPERS=y 12CONFIG_SEMAPHORE_SLEEPERS=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y 13CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -33,6 +34,7 @@ CONFIG_LOCALVERSION=""
33CONFIG_LOCALVERSION_AUTO=y 34CONFIG_LOCALVERSION_AUTO=y
34CONFIG_SYSVIPC=y 35CONFIG_SYSVIPC=y
35# CONFIG_IPC_NS is not set 36# CONFIG_IPC_NS is not set
37CONFIG_SYSVIPC_SYSCTL=y
36# CONFIG_POSIX_MQUEUE is not set 38# CONFIG_POSIX_MQUEUE is not set
37# CONFIG_BSD_PROCESS_ACCT is not set 39# CONFIG_BSD_PROCESS_ACCT is not set
38# CONFIG_TASKSTATS is not set 40# CONFIG_TASKSTATS is not set
@@ -41,6 +43,7 @@ CONFIG_SYSVIPC=y
41# CONFIG_IKCONFIG is not set 43# CONFIG_IKCONFIG is not set
42CONFIG_SYSFS_DEPRECATED=y 44CONFIG_SYSFS_DEPRECATED=y
43# CONFIG_RELAY is not set 45# CONFIG_RELAY is not set
46CONFIG_BLK_DEV_INITRD=y
44CONFIG_INITRAMFS_SOURCE="" 47CONFIG_INITRAMFS_SOURCE=""
45# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 48# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
46CONFIG_SYSCTL=y 49CONFIG_SYSCTL=y
@@ -55,9 +58,7 @@ CONFIG_BUG=y
55CONFIG_ELF_CORE=y 58CONFIG_ELF_CORE=y
56CONFIG_BASE_FULL=y 59CONFIG_BASE_FULL=y
57CONFIG_FUTEX=y 60CONFIG_FUTEX=y
58CONFIG_EPOLL=y
59CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 61CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
60# CONFIG_LIMIT_PAGECACHE is not set
61CONFIG_BUDDY=y 62CONFIG_BUDDY=y
62# CONFIG_NP2 is not set 63# CONFIG_NP2 is not set
63CONFIG_SLAB=y 64CONFIG_SLAB=y
@@ -114,19 +115,29 @@ CONFIG_BF533=y
114# CONFIG_BF534 is not set 115# CONFIG_BF534 is not set
115# CONFIG_BF536 is not set 116# CONFIG_BF536 is not set
116# CONFIG_BF537 is not set 117# CONFIG_BF537 is not set
118# CONFIG_BF542 is not set
119# CONFIG_BF544 is not set
120# CONFIG_BF548 is not set
121# CONFIG_BF549 is not set
117# CONFIG_BF561 is not set 122# CONFIG_BF561 is not set
123# CONFIG_BF_REV_0_0 is not set
118# CONFIG_BF_REV_0_2 is not set 124# CONFIG_BF_REV_0_2 is not set
119CONFIG_BF_REV_0_3=y 125CONFIG_BF_REV_0_3=y
120# CONFIG_BF_REV_0_4 is not set 126# CONFIG_BF_REV_0_4 is not set
121# CONFIG_BF_REV_0_5 is not set 127# CONFIG_BF_REV_0_5 is not set
128# CONFIG_BF_REV_ANY is not set
129# CONFIG_BF_REV_NONE is not set
130CONFIG_BF53x=y
122CONFIG_BFIN_SINGLE_CORE=y 131CONFIG_BFIN_SINGLE_CORE=y
123# CONFIG_BFIN533_EZKIT is not set 132# CONFIG_BFIN533_EZKIT is not set
124CONFIG_BFIN533_STAMP=y 133CONFIG_BFIN533_STAMP=y
125# CONFIG_BFIN537_STAMP is not set 134# CONFIG_BFIN537_STAMP is not set
126# CONFIG_BFIN533_BLUETECHNIX_CM is not set 135# CONFIG_BFIN533_BLUETECHNIX_CM is not set
127# CONFIG_BFIN537_BLUETECHNIX_CM is not set 136# CONFIG_BFIN537_BLUETECHNIX_CM is not set
137# CONFIG_BFIN548_EZKIT is not set
128# CONFIG_BFIN561_BLUETECHNIX_CM is not set 138# CONFIG_BFIN561_BLUETECHNIX_CM is not set
129# CONFIG_BFIN561_EZKIT is not set 139# CONFIG_BFIN561_EZKIT is not set
140# CONFIG_BFIN561_TEPLA is not set
130# CONFIG_PNAV10 is not set 141# CONFIG_PNAV10 is not set
131# CONFIG_GENERIC_BOARD is not set 142# CONFIG_GENERIC_BOARD is not set
132CONFIG_MEM_MT48LC64M4A2FB_7E=y 143CONFIG_MEM_MT48LC64M4A2FB_7E=y
@@ -193,19 +204,6 @@ CONFIG_BFIN_IDLE_LED_PORT=0xFFC00700
193CONFIG_BFIN_IDLE_LED_DPORT=0xFFC00730 204CONFIG_BFIN_IDLE_LED_DPORT=0xFFC00730
194 205
195# 206#
196# Console UART Setup
197#
198# CONFIG_BAUD_9600 is not set
199# CONFIG_BAUD_19200 is not set
200# CONFIG_BAUD_38400 is not set
201CONFIG_BAUD_57600=y
202# CONFIG_BAUD_115200 is not set
203CONFIG_BAUD_NO_PARITY=y
204# CONFIG_BAUD_PARITY is not set
205CONFIG_BAUD_1_STOPBIT=y
206# CONFIG_BAUD_2_STOPBIT is not set
207
208#
209# Blackfin Kernel Optimizations 207# Blackfin Kernel Optimizations
210# 208#
211 209
@@ -233,6 +231,7 @@ CONFIG_MEMSET_L1=y
233CONFIG_MEMCPY_L1=y 231CONFIG_MEMCPY_L1=y
234CONFIG_SYS_BFIN_SPINLOCK_L1=y 232CONFIG_SYS_BFIN_SPINLOCK_L1=y
235# CONFIG_IP_CHECKSUM_L1 is not set 233# CONFIG_IP_CHECKSUM_L1 is not set
234CONFIG_CACHELINE_ALIGNED_L1=y
236# CONFIG_SYSCALL_TAB_L1 is not set 235# CONFIG_SYSCALL_TAB_L1 is not set
237# CONFIG_CPLB_SWITCH_TAB_L1 is not set 236# CONFIG_CPLB_SWITCH_TAB_L1 is not set
238CONFIG_RAMKERNEL=y 237CONFIG_RAMKERNEL=y
@@ -246,6 +245,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
246# CONFIG_SPARSEMEM_STATIC is not set 245# CONFIG_SPARSEMEM_STATIC is not set
247CONFIG_SPLIT_PTLOCK_CPUS=4 246CONFIG_SPLIT_PTLOCK_CPUS=4
248# CONFIG_RESOURCES_64BIT is not set 247# CONFIG_RESOURCES_64BIT is not set
248CONFIG_ZONE_DMA_FLAG=1
249CONFIG_LARGE_ALLOCS=y 249CONFIG_LARGE_ALLOCS=y
250CONFIG_BFIN_DMA_5XX=y 250CONFIG_BFIN_DMA_5XX=y
251# CONFIG_DMA_UNCACHED_2M is not set 251# CONFIG_DMA_UNCACHED_2M is not set
@@ -318,7 +318,7 @@ CONFIG_BINFMT_ZFLAT=y
318# Power management options 318# Power management options
319# 319#
320CONFIG_PM=y 320CONFIG_PM=y
321CONFIG_PM_LEGACY=y 321# CONFIG_PM_LEGACY is not set
322# CONFIG_PM_DEBUG is not set 322# CONFIG_PM_DEBUG is not set
323# CONFIG_PM_SYSFS_DEPRECATED is not set 323# CONFIG_PM_SYSFS_DEPRECATED is not set
324CONFIG_PM_WAKEUP_GPIO_BY_SIC_IWR=y 324CONFIG_PM_WAKEUP_GPIO_BY_SIC_IWR=y
@@ -346,6 +346,7 @@ CONFIG_UNIX=y
346CONFIG_XFRM=y 346CONFIG_XFRM=y
347# CONFIG_XFRM_USER is not set 347# CONFIG_XFRM_USER is not set
348# CONFIG_XFRM_SUB_POLICY is not set 348# CONFIG_XFRM_SUB_POLICY is not set
349# CONFIG_XFRM_MIGRATE is not set
349# CONFIG_NET_KEY is not set 350# CONFIG_NET_KEY is not set
350CONFIG_INET=y 351CONFIG_INET=y
351# CONFIG_IP_MULTICAST is not set 352# CONFIG_IP_MULTICAST is not set
@@ -580,6 +581,7 @@ CONFIG_BFIN_FLASH_BANK_3=0x7BB0
580# 581#
581# Plug and Play support 582# Plug and Play support
582# 583#
584# CONFIG_PNPACPI is not set
583 585
584# 586#
585# Block devices 587# Block devices
@@ -591,14 +593,12 @@ CONFIG_BLK_DEV_RAM=y
591CONFIG_BLK_DEV_RAM_COUNT=16 593CONFIG_BLK_DEV_RAM_COUNT=16
592CONFIG_BLK_DEV_RAM_SIZE=4096 594CONFIG_BLK_DEV_RAM_SIZE=4096
593CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 595CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
594# CONFIG_BLK_DEV_INITRD is not set
595# CONFIG_CDROM_PKTCDVD is not set 596# CONFIG_CDROM_PKTCDVD is not set
596# CONFIG_ATA_OVER_ETH is not set 597# CONFIG_ATA_OVER_ETH is not set
597 598
598# 599#
599# Misc devices 600# Misc devices
600# 601#
601# CONFIG_TIFM_CORE is not set
602 602
603# 603#
604# ATA/ATAPI/MFM/RLL support 604# ATA/ATAPI/MFM/RLL support
@@ -655,6 +655,7 @@ CONFIG_NETDEVICES=y
655CONFIG_NET_ETHERNET=y 655CONFIG_NET_ETHERNET=y
656CONFIG_MII=y 656CONFIG_MII=y
657CONFIG_SMC91X=y 657CONFIG_SMC91X=y
658# CONFIG_SMSC911X is not set
658 659
659# 660#
660# Ethernet (1000 Mbit) 661# Ethernet (1000 Mbit)
@@ -733,7 +734,7 @@ CONFIG_BFIN_TWIKEYPAD_IRQ_PFX=39
733# 734#
734# CONFIG_AD9960 is not set 735# CONFIG_AD9960 is not set
735# CONFIG_SPI_ADC_BF533 is not set 736# CONFIG_SPI_ADC_BF533 is not set
736# CONFIG_BF533_PFLAGS is not set 737# CONFIG_BF5xx_PFLAGS is not set
737# CONFIG_BF5xx_PPIFCD is not set 738# CONFIG_BF5xx_PPIFCD is not set
738# CONFIG_BF5xx_TIMERS is not set 739# CONFIG_BF5xx_TIMERS is not set
739# CONFIG_BF5xx_PPI is not set 740# CONFIG_BF5xx_PPI is not set
@@ -742,6 +743,8 @@ CONFIG_BFIN_SPORT=y
742CONFIG_TWI_LCD=m 743CONFIG_TWI_LCD=m
743CONFIG_TWI_LCD_SLAVE_ADDR=34 744CONFIG_TWI_LCD_SLAVE_ADDR=34
744# CONFIG_AD5304 is not set 745# CONFIG_AD5304 is not set
746# CONFIG_BF5xx_TEA5764 is not set
747# CONFIG_BF5xx_FBDMA is not set
745# CONFIG_VT is not set 748# CONFIG_VT is not set
746# CONFIG_SERIAL_NONSTANDARD is not set 749# CONFIG_SERIAL_NONSTANDARD is not set
747 750
@@ -778,7 +781,14 @@ CONFIG_UNIX98_PTYS=y
778# 781#
779# Watchdog Cards 782# Watchdog Cards
780# 783#
781# CONFIG_WATCHDOG is not set 784CONFIG_WATCHDOG=y
785# CONFIG_WATCHDOG_NOWAYOUT is not set
786
787#
788# Watchdog Device Drivers
789#
790# CONFIG_SOFT_WATCHDOG is not set
791CONFIG_BFIN_WDT=y
782CONFIG_HW_RANDOM=y 792CONFIG_HW_RANDOM=y
783# CONFIG_GEN_RTC is not set 793# CONFIG_GEN_RTC is not set
784CONFIG_BLACKFIN_DPMC=y 794CONFIG_BLACKFIN_DPMC=y
@@ -840,12 +850,13 @@ CONFIG_SPI_MASTER=y
840# 850#
841# SPI Master Controller Drivers 851# SPI Master Controller Drivers
842# 852#
853CONFIG_SPI_BFIN=y
843# CONFIG_SPI_BITBANG is not set 854# CONFIG_SPI_BITBANG is not set
844 855
845# 856#
846# SPI Protocol Masters 857# SPI Protocol Masters
847# 858#
848CONFIG_SPI_BFIN=y 859# CONFIG_SPI_AT25 is not set
849 860
850# 861#
851# Dallas's 1-wire bus 862# Dallas's 1-wire bus
@@ -861,6 +872,7 @@ CONFIG_HWMON=y
861# CONFIG_SENSORS_ADM1021 is not set 872# CONFIG_SENSORS_ADM1021 is not set
862# CONFIG_SENSORS_ADM1025 is not set 873# CONFIG_SENSORS_ADM1025 is not set
863# CONFIG_SENSORS_ADM1026 is not set 874# CONFIG_SENSORS_ADM1026 is not set
875# CONFIG_SENSORS_ADM1029 is not set
864# CONFIG_SENSORS_ADM1031 is not set 876# CONFIG_SENSORS_ADM1031 is not set
865# CONFIG_SENSORS_ADM9240 is not set 877# CONFIG_SENSORS_ADM9240 is not set
866# CONFIG_SENSORS_ASB100 is not set 878# CONFIG_SENSORS_ASB100 is not set
@@ -900,6 +912,11 @@ CONFIG_HWMON=y
900# CONFIG_HWMON_DEBUG_CHIP is not set 912# CONFIG_HWMON_DEBUG_CHIP is not set
901 913
902# 914#
915# Multifunction device drivers
916#
917# CONFIG_MFD_SM501 is not set
918
919#
903# Multimedia devices 920# Multimedia devices
904# 921#
905# CONFIG_VIDEO_DEV is not set 922# CONFIG_VIDEO_DEV is not set
@@ -912,15 +929,22 @@ CONFIG_HWMON=y
912# 929#
913# Graphics support 930# Graphics support
914# 931#
915CONFIG_FIRMWARE_EDID=y 932# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
916CONFIG_FB=m 933CONFIG_FB=m
934CONFIG_FIRMWARE_EDID=y
935# CONFIG_FB_DDC is not set
917CONFIG_FB_CFB_FILLRECT=m 936CONFIG_FB_CFB_FILLRECT=m
918CONFIG_FB_CFB_COPYAREA=m 937CONFIG_FB_CFB_COPYAREA=m
919CONFIG_FB_CFB_IMAGEBLIT=m 938CONFIG_FB_CFB_IMAGEBLIT=m
939# CONFIG_FB_SVGALIB is not set
920# CONFIG_FB_MACMODES is not set 940# CONFIG_FB_MACMODES is not set
921# CONFIG_FB_BACKLIGHT is not set 941# CONFIG_FB_BACKLIGHT is not set
922# CONFIG_FB_MODE_HELPERS is not set 942# CONFIG_FB_MODE_HELPERS is not set
923# CONFIG_FB_TILEBLITTING is not set 943# CONFIG_FB_TILEBLITTING is not set
944
945#
946# Frame buffer hardware drivers
947#
924CONFIG_FB_BFIN_7171=m 948CONFIG_FB_BFIN_7171=m
925CONFIG_FB_BFIN_7393=m 949CONFIG_FB_BFIN_7393=m
926CONFIG_NTSC=y 950CONFIG_NTSC=y
@@ -938,7 +962,6 @@ CONFIG_ADV7393_1XMEM=y
938# Logo configuration 962# Logo configuration
939# 963#
940# CONFIG_LOGO is not set 964# CONFIG_LOGO is not set
941# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
942 965
943# 966#
944# Sound 967# Sound
@@ -971,6 +994,26 @@ CONFIG_SND_VERBOSE_PROCFS=y
971# CONFIG_SND_MPU401 is not set 994# CONFIG_SND_MPU401 is not set
972 995
973# 996#
997# ALSA Blackfin devices
998#
999CONFIG_SND_BLACKFIN_AD1836=m
1000CONFIG_SND_BLACKFIN_AD1836_TDM=y
1001# CONFIG_SND_BLACKFIN_AD1836_I2S is not set
1002CONFIG_SND_BLACKFIN_AD1836_MULSUB=y
1003# CONFIG_SND_BLACKFIN_AD1836_5P1 is not set
1004CONFIG_SND_BLACKFIN_AD1981B=m
1005CONFIG_SND_BLACKFIN_SPORT=0
1006CONFIG_SND_BLACKFIN_SPI_PFBIT=4
1007CONFIG_SND_BFIN_AD73311=m
1008CONFIG_SND_BFIN_SPORT=0
1009CONFIG_SND_BFIN_AD73311_SE=4
1010
1011#
1012# SoC audio support
1013#
1014# CONFIG_SND_SOC is not set
1015
1016#
974# Open Sound System 1017# Open Sound System
975# 1018#
976# CONFIG_SOUND_PRIME is not set 1019# CONFIG_SOUND_PRIME is not set
@@ -979,6 +1022,7 @@ CONFIG_SND_VERBOSE_PROCFS=y
979# HID Devices 1022# HID Devices
980# 1023#
981CONFIG_HID=y 1024CONFIG_HID=y
1025# CONFIG_HID_DEBUG is not set
982 1026
983# 1027#
984# USB support 1028# USB support
@@ -1051,7 +1095,6 @@ CONFIG_RTC_INTF_DEV=y
1051# CONFIG_RTC_DRV_DS1672 is not set 1095# CONFIG_RTC_DRV_DS1672 is not set
1052# CONFIG_RTC_DRV_DS1742 is not set 1096# CONFIG_RTC_DRV_DS1742 is not set
1053# CONFIG_RTC_DRV_PCF8563 is not set 1097# CONFIG_RTC_DRV_PCF8563 is not set
1054# CONFIG_RTC_DRV_PCF8583 is not set
1055# CONFIG_RTC_DRV_RS5C348 is not set 1098# CONFIG_RTC_DRV_RS5C348 is not set
1056# CONFIG_RTC_DRV_RS5C372 is not set 1099# CONFIG_RTC_DRV_RS5C372 is not set
1057# CONFIG_RTC_DRV_M48T86 is not set 1100# CONFIG_RTC_DRV_M48T86 is not set
@@ -1074,6 +1117,10 @@ CONFIG_RTC_DRV_BFIN=y
1074# 1117#
1075 1118
1076# 1119#
1120# Auxiliary Display support
1121#
1122
1123#
1077# Virtualization 1124# Virtualization
1078# 1125#
1079 1126
@@ -1085,13 +1132,9 @@ CONFIG_RTC_DRV_BFIN=y
1085# 1132#
1086# File systems 1133# File systems
1087# 1134#
1088CONFIG_EXT2_FS=y 1135# CONFIG_EXT2_FS is not set
1089CONFIG_EXT2_FS_XATTR=y
1090# CONFIG_EXT2_FS_POSIX_ACL is not set
1091# CONFIG_EXT2_FS_SECURITY is not set
1092# CONFIG_EXT3_FS is not set 1136# CONFIG_EXT3_FS is not set
1093# CONFIG_EXT4DEV_FS is not set 1137# CONFIG_EXT4DEV_FS is not set
1094CONFIG_FS_MBCACHE=y
1095# CONFIG_REISERFS_FS is not set 1138# CONFIG_REISERFS_FS is not set
1096# CONFIG_JFS_FS is not set 1139# CONFIG_JFS_FS is not set
1097# CONFIG_FS_POSIX_ACL is not set 1140# CONFIG_FS_POSIX_ACL is not set
@@ -1103,7 +1146,7 @@ CONFIG_FS_MBCACHE=y
1103CONFIG_INOTIFY=y 1146CONFIG_INOTIFY=y
1104CONFIG_INOTIFY_USER=y 1147CONFIG_INOTIFY_USER=y
1105# CONFIG_QUOTA is not set 1148# CONFIG_QUOTA is not set
1106CONFIG_DNOTIFY=y 1149# CONFIG_DNOTIFY is not set
1107# CONFIG_AUTOFS_FS is not set 1150# CONFIG_AUTOFS_FS is not set
1108# CONFIG_AUTOFS4_FS is not set 1151# CONFIG_AUTOFS4_FS is not set
1109# CONFIG_FUSE_FS is not set 1152# CONFIG_FUSE_FS is not set
@@ -1275,7 +1318,7 @@ CONFIG_ACCESS_CHECK=y
1275# CONFIG_KEYS is not set 1318# CONFIG_KEYS is not set
1276CONFIG_SECURITY=y 1319CONFIG_SECURITY=y
1277# CONFIG_SECURITY_NETWORK is not set 1320# CONFIG_SECURITY_NETWORK is not set
1278CONFIG_SECURITY_CAPABILITIES=y 1321CONFIG_SECURITY_CAPABILITIES=m
1279 1322
1280# 1323#
1281# Cryptographic options 1324# Cryptographic options
@@ -1293,4 +1336,5 @@ CONFIG_CRC32=y
1293CONFIG_ZLIB_INFLATE=y 1336CONFIG_ZLIB_INFLATE=y
1294CONFIG_ZLIB_DEFLATE=m 1337CONFIG_ZLIB_DEFLATE=m
1295CONFIG_PLIST=y 1338CONFIG_PLIST=y
1296CONFIG_IOMAP_COPY=y 1339CONFIG_HAS_IOMEM=y
1340CONFIG_HAS_IOPORT=y
diff --git a/arch/blackfin/configs/BF537-STAMP_defconfig b/arch/blackfin/configs/BF537-STAMP_defconfig
index 8ed67dc450fd..ccf09dc09a18 100644
--- a/arch/blackfin/configs/BF537-STAMP_defconfig
+++ b/arch/blackfin/configs/BF537-STAMP_defconfig
@@ -1,12 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20.4 3# Linux kernel version: 2.6.21.5
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
9CONFIG_BLACKFIN=y 9CONFIG_BLACKFIN=y
10CONFIG_ZONE_DMA=y
10CONFIG_BFIN=y 11CONFIG_BFIN=y
11CONFIG_SEMAPHORE_SLEEPERS=y 12CONFIG_SEMAPHORE_SLEEPERS=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y 13CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -33,6 +34,7 @@ CONFIG_LOCALVERSION=""
33CONFIG_LOCALVERSION_AUTO=y 34CONFIG_LOCALVERSION_AUTO=y
34CONFIG_SYSVIPC=y 35CONFIG_SYSVIPC=y
35# CONFIG_IPC_NS is not set 36# CONFIG_IPC_NS is not set
37CONFIG_SYSVIPC_SYSCTL=y
36# CONFIG_POSIX_MQUEUE is not set 38# CONFIG_POSIX_MQUEUE is not set
37# CONFIG_BSD_PROCESS_ACCT is not set 39# CONFIG_BSD_PROCESS_ACCT is not set
38# CONFIG_TASKSTATS is not set 40# CONFIG_TASKSTATS is not set
@@ -41,6 +43,7 @@ CONFIG_SYSVIPC=y
41# CONFIG_IKCONFIG is not set 43# CONFIG_IKCONFIG is not set
42CONFIG_SYSFS_DEPRECATED=y 44CONFIG_SYSFS_DEPRECATED=y
43# CONFIG_RELAY is not set 45# CONFIG_RELAY is not set
46CONFIG_BLK_DEV_INITRD=y
44CONFIG_INITRAMFS_SOURCE="" 47CONFIG_INITRAMFS_SOURCE=""
45# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 48# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
46CONFIG_SYSCTL=y 49CONFIG_SYSCTL=y
@@ -55,9 +58,7 @@ CONFIG_BUG=y
55CONFIG_ELF_CORE=y 58CONFIG_ELF_CORE=y
56CONFIG_BASE_FULL=y 59CONFIG_BASE_FULL=y
57CONFIG_FUTEX=y 60CONFIG_FUTEX=y
58CONFIG_EPOLL=y
59CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 61CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
60# CONFIG_LIMIT_PAGECACHE is not set
61CONFIG_BUDDY=y 62CONFIG_BUDDY=y
62# CONFIG_NP2 is not set 63# CONFIG_NP2 is not set
63CONFIG_SLAB=y 64CONFIG_SLAB=y
@@ -114,19 +115,29 @@ CONFIG_PREEMPT_VOLUNTARY=y
114# CONFIG_BF534 is not set 115# CONFIG_BF534 is not set
115# CONFIG_BF536 is not set 116# CONFIG_BF536 is not set
116CONFIG_BF537=y 117CONFIG_BF537=y
118# CONFIG_BF542 is not set
119# CONFIG_BF544 is not set
120# CONFIG_BF548 is not set
121# CONFIG_BF549 is not set
117# CONFIG_BF561 is not set 122# CONFIG_BF561 is not set
123# CONFIG_BF_REV_0_0 is not set
118CONFIG_BF_REV_0_2=y 124CONFIG_BF_REV_0_2=y
119# CONFIG_BF_REV_0_3 is not set 125# CONFIG_BF_REV_0_3 is not set
120# CONFIG_BF_REV_0_4 is not set 126# CONFIG_BF_REV_0_4 is not set
121# CONFIG_BF_REV_0_5 is not set 127# CONFIG_BF_REV_0_5 is not set
128# CONFIG_BF_REV_ANY is not set
129# CONFIG_BF_REV_NONE is not set
130CONFIG_BF53x=y
122CONFIG_BFIN_SINGLE_CORE=y 131CONFIG_BFIN_SINGLE_CORE=y
123# CONFIG_BFIN533_EZKIT is not set 132# CONFIG_BFIN533_EZKIT is not set
124# CONFIG_BFIN533_STAMP is not set 133# CONFIG_BFIN533_STAMP is not set
125CONFIG_BFIN537_STAMP=y 134CONFIG_BFIN537_STAMP=y
126# CONFIG_BFIN533_BLUETECHNIX_CM is not set 135# CONFIG_BFIN533_BLUETECHNIX_CM is not set
127# CONFIG_BFIN537_BLUETECHNIX_CM is not set 136# CONFIG_BFIN537_BLUETECHNIX_CM is not set
137# CONFIG_BFIN548_EZKIT is not set
128# CONFIG_BFIN561_BLUETECHNIX_CM is not set 138# CONFIG_BFIN561_BLUETECHNIX_CM is not set
129# CONFIG_BFIN561_EZKIT is not set 139# CONFIG_BFIN561_EZKIT is not set
140# CONFIG_BFIN561_TEPLA is not set
130# CONFIG_PNAV10 is not set 141# CONFIG_PNAV10 is not set
131# CONFIG_GENERIC_BOARD is not set 142# CONFIG_GENERIC_BOARD is not set
132CONFIG_MEM_MT48LC32M8A2_75=y 143CONFIG_MEM_MT48LC32M8A2_75=y
@@ -196,19 +207,6 @@ CONFIG_MEM_ADD_WIDTH=10
196CONFIG_BOOT_LOAD=0x1000 207CONFIG_BOOT_LOAD=0x1000
197 208
198# 209#
199# Console UART Setup
200#
201# CONFIG_BAUD_9600 is not set
202# CONFIG_BAUD_19200 is not set
203# CONFIG_BAUD_38400 is not set
204CONFIG_BAUD_57600=y
205# CONFIG_BAUD_115200 is not set
206CONFIG_BAUD_NO_PARITY=y
207# CONFIG_BAUD_PARITY is not set
208CONFIG_BAUD_1_STOPBIT=y
209# CONFIG_BAUD_2_STOPBIT is not set
210
211#
212# Blackfin Kernel Optimizations 210# Blackfin Kernel Optimizations
213# 211#
214 212
@@ -236,6 +234,7 @@ CONFIG_MEMSET_L1=y
236CONFIG_MEMCPY_L1=y 234CONFIG_MEMCPY_L1=y
237CONFIG_SYS_BFIN_SPINLOCK_L1=y 235CONFIG_SYS_BFIN_SPINLOCK_L1=y
238# CONFIG_IP_CHECKSUM_L1 is not set 236# CONFIG_IP_CHECKSUM_L1 is not set
237CONFIG_CACHELINE_ALIGNED_L1=y
239# CONFIG_SYSCALL_TAB_L1 is not set 238# CONFIG_SYSCALL_TAB_L1 is not set
240# CONFIG_CPLB_SWITCH_TAB_L1 is not set 239# CONFIG_CPLB_SWITCH_TAB_L1 is not set
241CONFIG_RAMKERNEL=y 240CONFIG_RAMKERNEL=y
@@ -249,6 +248,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
249# CONFIG_SPARSEMEM_STATIC is not set 248# CONFIG_SPARSEMEM_STATIC is not set
250CONFIG_SPLIT_PTLOCK_CPUS=4 249CONFIG_SPLIT_PTLOCK_CPUS=4
251# CONFIG_RESOURCES_64BIT is not set 250# CONFIG_RESOURCES_64BIT is not set
251CONFIG_ZONE_DMA_FLAG=1
252CONFIG_LARGE_ALLOCS=y 252CONFIG_LARGE_ALLOCS=y
253CONFIG_BFIN_DMA_5XX=y 253CONFIG_BFIN_DMA_5XX=y
254# CONFIG_DMA_UNCACHED_2M is not set 254# CONFIG_DMA_UNCACHED_2M is not set
@@ -321,7 +321,7 @@ CONFIG_BINFMT_ZFLAT=y
321# Power management options 321# Power management options
322# 322#
323CONFIG_PM=y 323CONFIG_PM=y
324CONFIG_PM_LEGACY=y 324# CONFIG_PM_LEGACY is not set
325# CONFIG_PM_DEBUG is not set 325# CONFIG_PM_DEBUG is not set
326# CONFIG_PM_SYSFS_DEPRECATED is not set 326# CONFIG_PM_SYSFS_DEPRECATED is not set
327CONFIG_PM_WAKEUP_GPIO_BY_SIC_IWR=y 327CONFIG_PM_WAKEUP_GPIO_BY_SIC_IWR=y
@@ -349,6 +349,7 @@ CONFIG_UNIX=y
349CONFIG_XFRM=y 349CONFIG_XFRM=y
350# CONFIG_XFRM_USER is not set 350# CONFIG_XFRM_USER is not set
351# CONFIG_XFRM_SUB_POLICY is not set 351# CONFIG_XFRM_SUB_POLICY is not set
352# CONFIG_XFRM_MIGRATE is not set
352# CONFIG_NET_KEY is not set 353# CONFIG_NET_KEY is not set
353CONFIG_INET=y 354CONFIG_INET=y
354# CONFIG_IP_MULTICAST is not set 355# CONFIG_IP_MULTICAST is not set
@@ -593,6 +594,7 @@ CONFIG_MTD_NAND_IDS=m
593# 594#
594# Plug and Play support 595# Plug and Play support
595# 596#
597# CONFIG_PNPACPI is not set
596 598
597# 599#
598# Block devices 600# Block devices
@@ -604,14 +606,12 @@ CONFIG_BLK_DEV_RAM=y
604CONFIG_BLK_DEV_RAM_COUNT=16 606CONFIG_BLK_DEV_RAM_COUNT=16
605CONFIG_BLK_DEV_RAM_SIZE=4096 607CONFIG_BLK_DEV_RAM_SIZE=4096
606CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 608CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
607# CONFIG_BLK_DEV_INITRD is not set
608# CONFIG_CDROM_PKTCDVD is not set 609# CONFIG_CDROM_PKTCDVD is not set
609# CONFIG_ATA_OVER_ETH is not set 610# CONFIG_ATA_OVER_ETH is not set
610 611
611# 612#
612# Misc devices 613# Misc devices
613# 614#
614# CONFIG_TIFM_CORE is not set
615 615
616# 616#
617# ATA/ATAPI/MFM/RLL support 617# ATA/ATAPI/MFM/RLL support
@@ -673,6 +673,7 @@ CONFIG_BFIN_MAC_USE_L1=y
673CONFIG_BFIN_TX_DESC_NUM=10 673CONFIG_BFIN_TX_DESC_NUM=10
674CONFIG_BFIN_RX_DESC_NUM=20 674CONFIG_BFIN_RX_DESC_NUM=20
675# CONFIG_BFIN_MAC_RMII is not set 675# CONFIG_BFIN_MAC_RMII is not set
676# CONFIG_SMSC911X is not set
676 677
677# 678#
678# Ethernet (1000 Mbit) 679# Ethernet (1000 Mbit)
@@ -751,7 +752,7 @@ CONFIG_BFIN_TWIKEYPAD_IRQ_PFX=72
751# 752#
752# CONFIG_AD9960 is not set 753# CONFIG_AD9960 is not set
753# CONFIG_SPI_ADC_BF533 is not set 754# CONFIG_SPI_ADC_BF533 is not set
754# CONFIG_BF533_PFLAGS is not set 755# CONFIG_BF5xx_PFLAGS is not set
755# CONFIG_BF5xx_PPIFCD is not set 756# CONFIG_BF5xx_PPIFCD is not set
756# CONFIG_BF5xx_TIMERS is not set 757# CONFIG_BF5xx_TIMERS is not set
757# CONFIG_BF5xx_PPI is not set 758# CONFIG_BF5xx_PPI is not set
@@ -760,6 +761,8 @@ CONFIG_BFIN_SPORT=y
760CONFIG_TWI_LCD=m 761CONFIG_TWI_LCD=m
761CONFIG_TWI_LCD_SLAVE_ADDR=34 762CONFIG_TWI_LCD_SLAVE_ADDR=34
762# CONFIG_AD5304 is not set 763# CONFIG_AD5304 is not set
764# CONFIG_BF5xx_TEA5764 is not set
765# CONFIG_BF5xx_FBDMA is not set
763# CONFIG_VT is not set 766# CONFIG_VT is not set
764# CONFIG_SERIAL_NONSTANDARD is not set 767# CONFIG_SERIAL_NONSTANDARD is not set
765 768
@@ -804,7 +807,14 @@ CONFIG_CAN_BLACKFIN=m
804# 807#
805# Watchdog Cards 808# Watchdog Cards
806# 809#
807# CONFIG_WATCHDOG is not set 810CONFIG_WATCHDOG=y
811# CONFIG_WATCHDOG_NOWAYOUT is not set
812
813#
814# Watchdog Device Drivers
815#
816# CONFIG_SOFT_WATCHDOG is not set
817CONFIG_BFIN_WDT=y
808CONFIG_HW_RANDOM=y 818CONFIG_HW_RANDOM=y
809# CONFIG_GEN_RTC is not set 819# CONFIG_GEN_RTC is not set
810CONFIG_BLACKFIN_DPMC=y 820CONFIG_BLACKFIN_DPMC=y
@@ -868,12 +878,13 @@ CONFIG_SPI_MASTER=y
868# 878#
869# SPI Master Controller Drivers 879# SPI Master Controller Drivers
870# 880#
881CONFIG_SPI_BFIN=y
871# CONFIG_SPI_BITBANG is not set 882# CONFIG_SPI_BITBANG is not set
872 883
873# 884#
874# SPI Protocol Masters 885# SPI Protocol Masters
875# 886#
876CONFIG_SPI_BFIN=y 887# CONFIG_SPI_AT25 is not set
877 888
878# 889#
879# Dallas's 1-wire bus 890# Dallas's 1-wire bus
@@ -889,6 +900,7 @@ CONFIG_HWMON=y
889# CONFIG_SENSORS_ADM1021 is not set 900# CONFIG_SENSORS_ADM1021 is not set
890# CONFIG_SENSORS_ADM1025 is not set 901# CONFIG_SENSORS_ADM1025 is not set
891# CONFIG_SENSORS_ADM1026 is not set 902# CONFIG_SENSORS_ADM1026 is not set
903# CONFIG_SENSORS_ADM1029 is not set
892# CONFIG_SENSORS_ADM1031 is not set 904# CONFIG_SENSORS_ADM1031 is not set
893# CONFIG_SENSORS_ADM9240 is not set 905# CONFIG_SENSORS_ADM9240 is not set
894# CONFIG_SENSORS_ASB100 is not set 906# CONFIG_SENSORS_ASB100 is not set
@@ -928,6 +940,11 @@ CONFIG_HWMON=y
928# CONFIG_HWMON_DEBUG_CHIP is not set 940# CONFIG_HWMON_DEBUG_CHIP is not set
929 941
930# 942#
943# Multifunction device drivers
944#
945# CONFIG_MFD_SM501 is not set
946
947#
931# Multimedia devices 948# Multimedia devices
932# 949#
933# CONFIG_VIDEO_DEV is not set 950# CONFIG_VIDEO_DEV is not set
@@ -940,15 +957,24 @@ CONFIG_HWMON=y
940# 957#
941# Graphics support 958# Graphics support
942# 959#
943CONFIG_FIRMWARE_EDID=y 960CONFIG_BACKLIGHT_LCD_SUPPORT=y
961CONFIG_BACKLIGHT_CLASS_DEVICE=m
962CONFIG_LCD_CLASS_DEVICE=m
944CONFIG_FB=m 963CONFIG_FB=m
964CONFIG_FIRMWARE_EDID=y
965# CONFIG_FB_DDC is not set
945CONFIG_FB_CFB_FILLRECT=m 966CONFIG_FB_CFB_FILLRECT=m
946CONFIG_FB_CFB_COPYAREA=m 967CONFIG_FB_CFB_COPYAREA=m
947CONFIG_FB_CFB_IMAGEBLIT=m 968CONFIG_FB_CFB_IMAGEBLIT=m
969# CONFIG_FB_SVGALIB is not set
948# CONFIG_FB_MACMODES is not set 970# CONFIG_FB_MACMODES is not set
949# CONFIG_FB_BACKLIGHT is not set 971# CONFIG_FB_BACKLIGHT is not set
950# CONFIG_FB_MODE_HELPERS is not set 972# CONFIG_FB_MODE_HELPERS is not set
951# CONFIG_FB_TILEBLITTING is not set 973# CONFIG_FB_TILEBLITTING is not set
974
975#
976# Frame buffer hardware drivers
977#
952CONFIG_FB_BFIN_7171=m 978CONFIG_FB_BFIN_7171=m
953CONFIG_FB_BFIN_7393=m 979CONFIG_FB_BFIN_7393=m
954CONFIG_NTSC=y 980CONFIG_NTSC=y
@@ -970,11 +996,6 @@ CONFIG_LQ035_SLAVE_ADDR=0x58
970# Logo configuration 996# Logo configuration
971# 997#
972# CONFIG_LOGO is not set 998# CONFIG_LOGO is not set
973CONFIG_BACKLIGHT_LCD_SUPPORT=y
974CONFIG_BACKLIGHT_CLASS_DEVICE=m
975CONFIG_BACKLIGHT_DEVICE=y
976CONFIG_LCD_CLASS_DEVICE=m
977CONFIG_LCD_DEVICE=y
978 999
979# 1000#
980# Sound 1001# Sound
@@ -1007,6 +1028,26 @@ CONFIG_SND_VERBOSE_PROCFS=y
1007# CONFIG_SND_MPU401 is not set 1028# CONFIG_SND_MPU401 is not set
1008 1029
1009# 1030#
1031# ALSA Blackfin devices
1032#
1033CONFIG_SND_BLACKFIN_AD1836=m
1034CONFIG_SND_BLACKFIN_AD1836_TDM=y
1035# CONFIG_SND_BLACKFIN_AD1836_I2S is not set
1036CONFIG_SND_BLACKFIN_AD1836_MULSUB=y
1037# CONFIG_SND_BLACKFIN_AD1836_5P1 is not set
1038CONFIG_SND_BLACKFIN_AD1981B=m
1039CONFIG_SND_BLACKFIN_SPORT=0
1040CONFIG_SND_BLACKFIN_SPI_PFBIT=4
1041CONFIG_SND_BFIN_AD73311=m
1042CONFIG_SND_BFIN_SPORT=0
1043CONFIG_SND_BFIN_AD73311_SE=4
1044
1045#
1046# SoC audio support
1047#
1048# CONFIG_SND_SOC is not set
1049
1050#
1010# Open Sound System 1051# Open Sound System
1011# 1052#
1012# CONFIG_SOUND_PRIME is not set 1053# CONFIG_SOUND_PRIME is not set
@@ -1015,6 +1056,7 @@ CONFIG_SND_VERBOSE_PROCFS=y
1015# HID Devices 1056# HID Devices
1016# 1057#
1017CONFIG_HID=y 1058CONFIG_HID=y
1059# CONFIG_HID_DEBUG is not set
1018 1060
1019# 1061#
1020# USB support 1062# USB support
@@ -1087,7 +1129,6 @@ CONFIG_RTC_INTF_DEV=y
1087# CONFIG_RTC_DRV_DS1672 is not set 1129# CONFIG_RTC_DRV_DS1672 is not set
1088# CONFIG_RTC_DRV_DS1742 is not set 1130# CONFIG_RTC_DRV_DS1742 is not set
1089# CONFIG_RTC_DRV_PCF8563 is not set 1131# CONFIG_RTC_DRV_PCF8563 is not set
1090# CONFIG_RTC_DRV_PCF8583 is not set
1091# CONFIG_RTC_DRV_RS5C348 is not set 1132# CONFIG_RTC_DRV_RS5C348 is not set
1092# CONFIG_RTC_DRV_RS5C372 is not set 1133# CONFIG_RTC_DRV_RS5C372 is not set
1093# CONFIG_RTC_DRV_M48T86 is not set 1134# CONFIG_RTC_DRV_M48T86 is not set
@@ -1110,6 +1151,10 @@ CONFIG_RTC_DRV_BFIN=y
1110# 1151#
1111 1152
1112# 1153#
1154# Auxiliary Display support
1155#
1156
1157#
1113# Virtualization 1158# Virtualization
1114# 1159#
1115 1160
@@ -1121,13 +1166,9 @@ CONFIG_RTC_DRV_BFIN=y
1121# 1166#
1122# File systems 1167# File systems
1123# 1168#
1124CONFIG_EXT2_FS=y 1169# CONFIG_EXT2_FS is not set
1125CONFIG_EXT2_FS_XATTR=y
1126# CONFIG_EXT2_FS_POSIX_ACL is not set
1127# CONFIG_EXT2_FS_SECURITY is not set
1128# CONFIG_EXT3_FS is not set 1170# CONFIG_EXT3_FS is not set
1129# CONFIG_EXT4DEV_FS is not set 1171# CONFIG_EXT4DEV_FS is not set
1130CONFIG_FS_MBCACHE=y
1131# CONFIG_REISERFS_FS is not set 1172# CONFIG_REISERFS_FS is not set
1132# CONFIG_JFS_FS is not set 1173# CONFIG_JFS_FS is not set
1133# CONFIG_FS_POSIX_ACL is not set 1174# CONFIG_FS_POSIX_ACL is not set
@@ -1139,7 +1180,7 @@ CONFIG_FS_MBCACHE=y
1139CONFIG_INOTIFY=y 1180CONFIG_INOTIFY=y
1140CONFIG_INOTIFY_USER=y 1181CONFIG_INOTIFY_USER=y
1141# CONFIG_QUOTA is not set 1182# CONFIG_QUOTA is not set
1142CONFIG_DNOTIFY=y 1183# CONFIG_DNOTIFY is not set
1143# CONFIG_AUTOFS_FS is not set 1184# CONFIG_AUTOFS_FS is not set
1144# CONFIG_AUTOFS4_FS is not set 1185# CONFIG_AUTOFS4_FS is not set
1145# CONFIG_FUSE_FS is not set 1186# CONFIG_FUSE_FS is not set
@@ -1311,7 +1352,7 @@ CONFIG_ACCESS_CHECK=y
1311# CONFIG_KEYS is not set 1352# CONFIG_KEYS is not set
1312CONFIG_SECURITY=y 1353CONFIG_SECURITY=y
1313# CONFIG_SECURITY_NETWORK is not set 1354# CONFIG_SECURITY_NETWORK is not set
1314CONFIG_SECURITY_CAPABILITIES=y 1355CONFIG_SECURITY_CAPABILITIES=m
1315 1356
1316# 1357#
1317# Cryptographic options 1358# Cryptographic options
@@ -1329,4 +1370,5 @@ CONFIG_CRC32=y
1329CONFIG_ZLIB_INFLATE=y 1370CONFIG_ZLIB_INFLATE=y
1330CONFIG_ZLIB_DEFLATE=m 1371CONFIG_ZLIB_DEFLATE=m
1331CONFIG_PLIST=y 1372CONFIG_PLIST=y
1332CONFIG_IOMAP_COPY=y 1373CONFIG_HAS_IOMEM=y
1374CONFIG_HAS_IOPORT=y
diff --git a/arch/blackfin/defconfig b/arch/blackfin/configs/BF548-EZKIT_defconfig
index a513fbe39567..ac8390fafa9c 100644
--- a/arch/blackfin/defconfig
+++ b/arch/blackfin/configs/BF548-EZKIT_defconfig
@@ -1,12 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20.4 3# Linux kernel version: 2.6.21.5
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
9CONFIG_BLACKFIN=y 9CONFIG_BLACKFIN=y
10CONFIG_ZONE_DMA=y
10CONFIG_BFIN=y 11CONFIG_BFIN=y
11CONFIG_SEMAPHORE_SLEEPERS=y 12CONFIG_SEMAPHORE_SLEEPERS=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y 13CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -33,6 +34,7 @@ CONFIG_LOCALVERSION=""
33CONFIG_LOCALVERSION_AUTO=y 34CONFIG_LOCALVERSION_AUTO=y
34CONFIG_SYSVIPC=y 35CONFIG_SYSVIPC=y
35# CONFIG_IPC_NS is not set 36# CONFIG_IPC_NS is not set
37CONFIG_SYSVIPC_SYSCTL=y
36# CONFIG_POSIX_MQUEUE is not set 38# CONFIG_POSIX_MQUEUE is not set
37# CONFIG_BSD_PROCESS_ACCT is not set 39# CONFIG_BSD_PROCESS_ACCT is not set
38# CONFIG_TASKSTATS is not set 40# CONFIG_TASKSTATS is not set
@@ -41,6 +43,7 @@ CONFIG_SYSVIPC=y
41# CONFIG_IKCONFIG is not set 43# CONFIG_IKCONFIG is not set
42CONFIG_SYSFS_DEPRECATED=y 44CONFIG_SYSFS_DEPRECATED=y
43# CONFIG_RELAY is not set 45# CONFIG_RELAY is not set
46CONFIG_BLK_DEV_INITRD=y
44CONFIG_INITRAMFS_SOURCE="" 47CONFIG_INITRAMFS_SOURCE=""
45# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 48# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
46CONFIG_SYSCTL=y 49CONFIG_SYSCTL=y
@@ -48,6 +51,7 @@ CONFIG_EMBEDDED=y
48CONFIG_UID16=y 51CONFIG_UID16=y
49CONFIG_SYSCTL_SYSCALL=y 52CONFIG_SYSCTL_SYSCALL=y
50CONFIG_KALLSYMS=y 53CONFIG_KALLSYMS=y
54# CONFIG_KALLSYMS_ALL is not set
51# CONFIG_KALLSYMS_EXTRA_PASS is not set 55# CONFIG_KALLSYMS_EXTRA_PASS is not set
52CONFIG_HOTPLUG=y 56CONFIG_HOTPLUG=y
53CONFIG_PRINTK=y 57CONFIG_PRINTK=y
@@ -55,10 +59,7 @@ CONFIG_BUG=y
55CONFIG_ELF_CORE=y 59CONFIG_ELF_CORE=y
56CONFIG_BASE_FULL=y 60CONFIG_BASE_FULL=y
57CONFIG_FUTEX=y 61CONFIG_FUTEX=y
58CONFIG_EPOLL=y
59CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 62CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
60# CONFIG_LIMIT_PAGECACHE is not set
61CONFIG_BUDDY=y
62# CONFIG_NP2 is not set 63# CONFIG_NP2 is not set
63CONFIG_SLAB=y 64CONFIG_SLAB=y
64CONFIG_VM_EVENT_COUNTERS=y 65CONFIG_VM_EVENT_COUNTERS=y
@@ -113,35 +114,57 @@ CONFIG_PREEMPT_VOLUNTARY=y
113# CONFIG_BF533 is not set 114# CONFIG_BF533 is not set
114# CONFIG_BF534 is not set 115# CONFIG_BF534 is not set
115# CONFIG_BF536 is not set 116# CONFIG_BF536 is not set
116CONFIG_BF537=y 117# CONFIG_BF537 is not set
118# CONFIG_BF542 is not set
119# CONFIG_BF544 is not set
120# CONFIG_BF548 is not set
121CONFIG_BF549=y
117# CONFIG_BF561 is not set 122# CONFIG_BF561 is not set
118CONFIG_BF_REV_0_2=y 123CONFIG_BF_REV_0_0=y
124# CONFIG_BF_REV_0_2 is not set
119# CONFIG_BF_REV_0_3 is not set 125# CONFIG_BF_REV_0_3 is not set
120# CONFIG_BF_REV_0_4 is not set 126# CONFIG_BF_REV_0_4 is not set
121# CONFIG_BF_REV_0_5 is not set 127# CONFIG_BF_REV_0_5 is not set
128# CONFIG_BF_REV_ANY is not set
129# CONFIG_BF_REV_NONE is not set
130CONFIG_BF54x=y
122CONFIG_BFIN_SINGLE_CORE=y 131CONFIG_BFIN_SINGLE_CORE=y
123# CONFIG_BFIN533_EZKIT is not set 132# CONFIG_BFIN533_EZKIT is not set
124# CONFIG_BFIN533_STAMP is not set 133# CONFIG_BFIN533_STAMP is not set
125CONFIG_BFIN537_STAMP=y 134# CONFIG_BFIN537_STAMP is not set
126# CONFIG_BFIN533_BLUETECHNIX_CM is not set 135# CONFIG_BFIN533_BLUETECHNIX_CM is not set
127# CONFIG_BFIN537_BLUETECHNIX_CM is not set 136# CONFIG_BFIN537_BLUETECHNIX_CM is not set
137CONFIG_BFIN548_EZKIT=y
128# CONFIG_BFIN561_BLUETECHNIX_CM is not set 138# CONFIG_BFIN561_BLUETECHNIX_CM is not set
129# CONFIG_BFIN561_EZKIT is not set 139# CONFIG_BFIN561_EZKIT is not set
140# CONFIG_BFIN561_TEPLA is not set
130# CONFIG_PNAV10 is not set 141# CONFIG_PNAV10 is not set
131# CONFIG_GENERIC_BOARD is not set 142# CONFIG_GENERIC_BOARD is not set
132CONFIG_MEM_MT48LC32M8A2_75=y
133CONFIG_IRQ_PLL_WAKEUP=7 143CONFIG_IRQ_PLL_WAKEUP=7
144CONFIG_IRQ_TIMER0=11
145CONFIG_IRQ_TIMER1=11
146CONFIG_IRQ_TIMER2=11
147CONFIG_IRQ_TIMER3=11
148CONFIG_IRQ_TIMER4=11
149CONFIG_IRQ_TIMER5=11
150CONFIG_IRQ_TIMER6=11
151CONFIG_IRQ_TIMER7=11
152CONFIG_IRQ_TIMER8=11
153CONFIG_IRQ_TIMER9=11
154CONFIG_IRQ_TIMER10=11
155CONFIG_IRQ_RTC=8
156CONFIG_IRQ_SPORT0_RX=9
157CONFIG_IRQ_SPORT0_TX=9
158CONFIG_IRQ_SPORT1_RX=9
159CONFIG_IRQ_SPORT1_TX=9
160CONFIG_IRQ_UART0_RX=10
161CONFIG_IRQ_UART0_TX=10
162CONFIG_IRQ_UART1_RX=10
163CONFIG_IRQ_UART1_TX=10
134 164
135# 165#
136# BF537 Specific Configuration 166# BF548 Specific Configuration
137#
138
139#
140# PORT F/G Selection
141# 167#
142CONFIG_BF537_PORT_F=y
143# CONFIG_BF537_PORT_G is not set
144# CONFIG_BF537_PORT_H is not set
145 168
146# 169#
147# Interrupt Priority Assignment 170# Interrupt Priority Assignment
@@ -150,37 +173,73 @@ CONFIG_BF537_PORT_F=y
150# 173#
151# Priority 174# Priority
152# 175#
153CONFIG_IRQ_DMA_ERROR=7 176CONFIG_IRQ_DMAC0_ERR=7
154CONFIG_IRQ_ERROR=7 177CONFIG_IRQ_EPPI0_ERR=7
155CONFIG_IRQ_RTC=8 178CONFIG_IRQ_SPORT0_ERR=7
156CONFIG_IRQ_PPI=8 179CONFIG_IRQ_SPORT1_ERR=7
157CONFIG_IRQ_SPORT0_RX=9 180CONFIG_IRQ_SPI0_ERR=7
158CONFIG_IRQ_SPORT0_TX=9 181CONFIG_IRQ_UART0_ERR=7
159CONFIG_IRQ_SPORT1_RX=9 182CONFIG_IRQ_EPPI0=8
160CONFIG_IRQ_SPORT1_TX=9 183CONFIG_IRQ_SPI0=10
161CONFIG_IRQ_TWI=10 184CONFIG_IRQ_PINT0=12
162CONFIG_IRQ_SPI=10 185CONFIG_IRQ_PINT1=12
163CONFIG_IRQ_UART0_RX=10 186CONFIG_IRQ_MDMAS0=13
164CONFIG_IRQ_UART0_TX=10 187CONFIG_IRQ_MDMAS1=13
165CONFIG_IRQ_UART1_RX=10 188CONFIG_IRQ_WATCHDOG=13
166CONFIG_IRQ_UART1_TX=10 189CONFIG_IRQ_DMAC1_ERR=7
167CONFIG_IRQ_CAN_RX=11 190CONFIG_IRQ_SPORT2_ERR=7
168CONFIG_IRQ_CAN_TX=11 191CONFIG_IRQ_SPORT3_ERR=7
169CONFIG_IRQ_MAC_RX=11 192CONFIG_IRQ_MXVR_DATA=7
170CONFIG_IRQ_MAC_TX=11 193CONFIG_IRQ_SPI1_ERR=7
171CONFIG_IRQ_TMR0=12 194CONFIG_IRQ_SPI2_ERR=7
172CONFIG_IRQ_TMR1=12 195CONFIG_IRQ_UART1_ERR=7
173CONFIG_IRQ_TMR2=12 196CONFIG_IRQ_UART2_ERR=7
174CONFIG_IRQ_TMR3=12 197CONFIG_IRQ_CAN0_ERR=7
175CONFIG_IRQ_TMR4=12 198CONFIG_IRQ_SPORT2_RX=9
176CONFIG_IRQ_TMR5=12 199CONFIG_IRQ_SPORT2_TX=9
177CONFIG_IRQ_TMR6=12 200CONFIG_IRQ_SPORT3_RX=9
178CONFIG_IRQ_TMR7=12 201CONFIG_IRQ_SPORT3_TX=9
179CONFIG_IRQ_PROG_INTA=12 202CONFIG_IRQ_EPPI1=9
180CONFIG_IRQ_PORTG_INTB=12 203CONFIG_IRQ_EPPI2=9
181CONFIG_IRQ_MEM_DMA0=13 204CONFIG_IRQ_SPI1=10
182CONFIG_IRQ_MEM_DMA1=13 205CONFIG_IRQ_SPI2=10
183CONFIG_IRQ_WATCH=13 206CONFIG_IRQ_ATAPI_RX=10
207CONFIG_IRQ_ATAPI_TX=10
208CONFIG_IRQ_TWI0=11
209CONFIG_IRQ_TWI1=11
210CONFIG_IRQ_CAN0_RX=11
211CONFIG_IRQ_CAN0_TX=11
212CONFIG_IRQ_MDMAS2=13
213CONFIG_IRQ_MDMAS3=13
214CONFIG_IRQ_MXVR_ERR=11
215CONFIG_IRQ_MXVR_MSG=11
216CONFIG_IRQ_MXVR_PKT=11
217CONFIG_IRQ_EPPI1_ERR=7
218CONFIG_IRQ_EPPI2_ERR=7
219CONFIG_IRQ_UART3_ERR=7
220CONFIG_IRQ_HOST_ERR=7
221CONFIG_IRQ_PIXC_ERR=7
222CONFIG_IRQ_NFC_ERR=7
223CONFIG_IRQ_ATAPI_ERR=7
224CONFIG_IRQ_CAN1_ERR=7
225CONFIG_IRQ_HS_DMA_ERR=7
226CONFIG_IRQ_PIXC_IN0=8
227CONFIG_IRQ_PIXC_IN1=8
228CONFIG_IRQ_PIXC_OUT=8
229CONFIG_IRQ_SDH=8
230CONFIG_IRQ_CNT=8
231CONFIG_IRQ_KEY=8
232CONFIG_IRQ_CAN1_RX=11
233CONFIG_IRQ_CAN1_TX=11
234CONFIG_IRQ_SDH_MASK0=11
235CONFIG_IRQ_SDH_MASK1=11
236CONFIG_IRQ_USB_INT0=11
237CONFIG_IRQ_USB_INT1=11
238CONFIG_IRQ_USB_INT2=11
239CONFIG_IRQ_USB_DMA=11
240CONFIG_IRQ_OTPSEC=11
241CONFIG_IRQ_PINT2=11
242CONFIG_IRQ_PINT3=11
184 243
185# 244#
186# Board customizations 245# Board customizations
@@ -196,19 +255,6 @@ CONFIG_MEM_ADD_WIDTH=10
196CONFIG_BOOT_LOAD=0x1000 255CONFIG_BOOT_LOAD=0x1000
197 256
198# 257#
199# Console UART Setup
200#
201# CONFIG_BAUD_9600 is not set
202# CONFIG_BAUD_19200 is not set
203# CONFIG_BAUD_38400 is not set
204CONFIG_BAUD_57600=y
205# CONFIG_BAUD_115200 is not set
206CONFIG_BAUD_NO_PARITY=y
207# CONFIG_BAUD_PARITY is not set
208CONFIG_BAUD_1_STOPBIT=y
209# CONFIG_BAUD_2_STOPBIT is not set
210
211#
212# Blackfin Kernel Optimizations 258# Blackfin Kernel Optimizations
213# 259#
214 260
@@ -236,6 +282,7 @@ CONFIG_MEMSET_L1=y
236CONFIG_MEMCPY_L1=y 282CONFIG_MEMCPY_L1=y
237CONFIG_SYS_BFIN_SPINLOCK_L1=y 283CONFIG_SYS_BFIN_SPINLOCK_L1=y
238# CONFIG_IP_CHECKSUM_L1 is not set 284# CONFIG_IP_CHECKSUM_L1 is not set
285CONFIG_CACHELINE_ALIGNED_L1=y
239# CONFIG_SYSCALL_TAB_L1 is not set 286# CONFIG_SYSCALL_TAB_L1 is not set
240# CONFIG_CPLB_SWITCH_TAB_L1 is not set 287# CONFIG_CPLB_SWITCH_TAB_L1 is not set
241CONFIG_RAMKERNEL=y 288CONFIG_RAMKERNEL=y
@@ -249,6 +296,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
249# CONFIG_SPARSEMEM_STATIC is not set 296# CONFIG_SPARSEMEM_STATIC is not set
250CONFIG_SPLIT_PTLOCK_CPUS=4 297CONFIG_SPLIT_PTLOCK_CPUS=4
251# CONFIG_RESOURCES_64BIT is not set 298# CONFIG_RESOURCES_64BIT is not set
299CONFIG_ZONE_DMA_FLAG=1
252CONFIG_LARGE_ALLOCS=y 300CONFIG_LARGE_ALLOCS=y
253CONFIG_BFIN_DMA_5XX=y 301CONFIG_BFIN_DMA_5XX=y
254# CONFIG_DMA_UNCACHED_2M is not set 302# CONFIG_DMA_UNCACHED_2M is not set
@@ -320,14 +368,7 @@ CONFIG_BINFMT_ZFLAT=y
320# 368#
321# Power management options 369# Power management options
322# 370#
323CONFIG_PM=y 371# CONFIG_PM is not set
324CONFIG_PM_LEGACY=y
325# CONFIG_PM_DEBUG is not set
326# CONFIG_PM_SYSFS_DEPRECATED is not set
327CONFIG_PM_WAKEUP_GPIO_BY_SIC_IWR=y
328# CONFIG_PM_WAKEUP_BY_GPIO is not set
329# CONFIG_PM_WAKEUP_GPIO_API is not set
330CONFIG_PM_WAKEUP_SIC_IWR=0x80000000
331 372
332# 373#
333# CPU Frequency scaling 374# CPU Frequency scaling
@@ -349,6 +390,7 @@ CONFIG_UNIX=y
349CONFIG_XFRM=y 390CONFIG_XFRM=y
350# CONFIG_XFRM_USER is not set 391# CONFIG_XFRM_USER is not set
351# CONFIG_XFRM_SUB_POLICY is not set 392# CONFIG_XFRM_SUB_POLICY is not set
393# CONFIG_XFRM_MIGRATE is not set
352# CONFIG_NET_KEY is not set 394# CONFIG_NET_KEY is not set
353CONFIG_INET=y 395CONFIG_INET=y
354# CONFIG_IP_MULTICAST is not set 396# CONFIG_IP_MULTICAST is not set
@@ -419,48 +461,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
419# 461#
420# CONFIG_NET_PKTGEN is not set 462# CONFIG_NET_PKTGEN is not set
421# CONFIG_HAMRADIO is not set 463# CONFIG_HAMRADIO is not set
422CONFIG_IRDA=m 464# CONFIG_IRDA is not set
423
424#
425# IrDA protocols
426#
427CONFIG_IRLAN=m
428CONFIG_IRCOMM=m
429# CONFIG_IRDA_ULTRA is not set
430
431#
432# IrDA options
433#
434CONFIG_IRDA_CACHE_LAST_LSAP=y
435# CONFIG_IRDA_FAST_RR is not set
436# CONFIG_IRDA_DEBUG is not set
437
438#
439# Infrared-port device drivers
440#
441
442#
443# SIR device drivers
444#
445CONFIG_IRTTY_SIR=m
446
447#
448# Dongle support
449#
450# CONFIG_DONGLE is not set
451
452#
453# Old SIR device drivers
454#
455# CONFIG_IRPORT_SIR is not set
456
457#
458# Old Serial dongle support
459#
460
461#
462# FIR device drivers
463#
464# CONFIG_BT is not set 465# CONFIG_BT is not set
465# CONFIG_IEEE80211 is not set 466# CONFIG_IEEE80211 is not set
466 467
@@ -474,6 +475,8 @@ CONFIG_IRTTY_SIR=m
474CONFIG_STANDALONE=y 475CONFIG_STANDALONE=y
475CONFIG_PREVENT_FIRMWARE_BUILD=y 476CONFIG_PREVENT_FIRMWARE_BUILD=y
476# CONFIG_FW_LOADER is not set 477# CONFIG_FW_LOADER is not set
478# CONFIG_DEBUG_DRIVER is not set
479# CONFIG_DEBUG_DEVRES is not set
477# CONFIG_SYS_HYPERVISOR is not set 480# CONFIG_SYS_HYPERVISOR is not set
478 481
479# 482#
@@ -494,7 +497,7 @@ CONFIG_MTD_PARTITIONS=y
494# 497#
495# User Modules And Translation Layers 498# User Modules And Translation Layers
496# 499#
497CONFIG_MTD_CHAR=m 500# CONFIG_MTD_CHAR is not set
498CONFIG_MTD_BLKDEVS=y 501CONFIG_MTD_BLKDEVS=y
499CONFIG_MTD_BLOCK=y 502CONFIG_MTD_BLOCK=y
500# CONFIG_FTL is not set 503# CONFIG_FTL is not set
@@ -507,9 +510,7 @@ CONFIG_MTD_BLOCK=y
507# RAM/ROM/Flash chip drivers 510# RAM/ROM/Flash chip drivers
508# 511#
509# CONFIG_MTD_CFI is not set 512# CONFIG_MTD_CFI is not set
510CONFIG_MTD_JEDECPROBE=m 513# CONFIG_MTD_JEDECPROBE is not set
511CONFIG_MTD_GEN_PROBE=m
512# CONFIG_MTD_CFI_ADV_OPTIONS is not set
513CONFIG_MTD_MAP_BANK_WIDTH_1=y 514CONFIG_MTD_MAP_BANK_WIDTH_1=y
514CONFIG_MTD_MAP_BANK_WIDTH_2=y 515CONFIG_MTD_MAP_BANK_WIDTH_2=y
515CONFIG_MTD_MAP_BANK_WIDTH_4=y 516CONFIG_MTD_MAP_BANK_WIDTH_4=y
@@ -520,12 +521,8 @@ CONFIG_MTD_CFI_I1=y
520CONFIG_MTD_CFI_I2=y 521CONFIG_MTD_CFI_I2=y
521# CONFIG_MTD_CFI_I4 is not set 522# CONFIG_MTD_CFI_I4 is not set
522# CONFIG_MTD_CFI_I8 is not set 523# CONFIG_MTD_CFI_I8 is not set
523# CONFIG_MTD_CFI_INTELEXT is not set
524# CONFIG_MTD_CFI_AMDSTD is not set
525# CONFIG_MTD_CFI_STAA is not set
526CONFIG_MTD_MW320D=m
527CONFIG_MTD_RAM=y 524CONFIG_MTD_RAM=y
528CONFIG_MTD_ROM=m 525# CONFIG_MTD_ROM is not set
529# CONFIG_MTD_ABSENT is not set 526# CONFIG_MTD_ABSENT is not set
530# CONFIG_MTD_OBSOLETE_CHIPS is not set 527# CONFIG_MTD_OBSOLETE_CHIPS is not set
531 528
@@ -533,26 +530,13 @@ CONFIG_MTD_ROM=m
533# Mapping drivers for chip access 530# Mapping drivers for chip access
534# 531#
535CONFIG_MTD_COMPLEX_MAPPINGS=y 532CONFIG_MTD_COMPLEX_MAPPINGS=y
536# CONFIG_MTD_PHYSMAP is not set 533# CONFIG_MTD_BF5xx is not set
537CONFIG_MTD_BF5xx=m
538CONFIG_BFIN_FLASH_SIZE=0x400000
539CONFIG_EBIU_FLASH_BASE=0x20000000
540
541#
542# FLASH_EBIU_AMBCTL Control
543#
544CONFIG_BFIN_FLASH_BANK_0=0x7BB0
545CONFIG_BFIN_FLASH_BANK_1=0x7BB0
546CONFIG_BFIN_FLASH_BANK_2=0x7BB0
547CONFIG_BFIN_FLASH_BANK_3=0x7BB0
548CONFIG_MTD_UCLINUX=y 534CONFIG_MTD_UCLINUX=y
549# CONFIG_MTD_PLATRAM is not set 535# CONFIG_MTD_PLATRAM is not set
550 536
551# 537#
552# Self-contained MTD device drivers 538# Self-contained MTD device drivers
553# 539#
554# CONFIG_MTD_DATAFLASH is not set
555# CONFIG_MTD_M25P80 is not set
556# CONFIG_MTD_SLRAM is not set 540# CONFIG_MTD_SLRAM is not set
557# CONFIG_MTD_PHRAM is not set 541# CONFIG_MTD_PHRAM is not set
558# CONFIG_MTD_MTDRAM is not set 542# CONFIG_MTD_MTDRAM is not set
@@ -568,17 +552,7 @@ CONFIG_MTD_UCLINUX=y
568# 552#
569# NAND Flash Device Drivers 553# NAND Flash Device Drivers
570# 554#
571CONFIG_MTD_NAND=m 555# CONFIG_MTD_NAND is not set
572# CONFIG_MTD_NAND_VERIFY_WRITE is not set
573# CONFIG_MTD_NAND_ECC_SMC is not set
574CONFIG_MTD_NAND_BFIN=m
575CONFIG_BFIN_NAND_BASE=0x20212000
576CONFIG_BFIN_NAND_CLE=2
577CONFIG_BFIN_NAND_ALE=1
578CONFIG_BFIN_NAND_READY=3
579CONFIG_MTD_NAND_IDS=m
580# CONFIG_MTD_NAND_DISKONCHIP is not set
581# CONFIG_MTD_NAND_NANDSIM is not set
582 556
583# 557#
584# OneNAND Flash Device Drivers 558# OneNAND Flash Device Drivers
@@ -593,6 +567,7 @@ CONFIG_MTD_NAND_IDS=m
593# 567#
594# Plug and Play support 568# Plug and Play support
595# 569#
570# CONFIG_PNPACPI is not set
596 571
597# 572#
598# Block devices 573# Block devices
@@ -604,14 +579,12 @@ CONFIG_BLK_DEV_RAM=y
604CONFIG_BLK_DEV_RAM_COUNT=16 579CONFIG_BLK_DEV_RAM_COUNT=16
605CONFIG_BLK_DEV_RAM_SIZE=4096 580CONFIG_BLK_DEV_RAM_SIZE=4096
606CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 581CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
607# CONFIG_BLK_DEV_INITRD is not set
608# CONFIG_CDROM_PKTCDVD is not set 582# CONFIG_CDROM_PKTCDVD is not set
609# CONFIG_ATA_OVER_ETH is not set 583# CONFIG_ATA_OVER_ETH is not set
610 584
611# 585#
612# Misc devices 586# Misc devices
613# 587#
614# CONFIG_TIFM_CORE is not set
615 588
616# 589#
617# ATA/ATAPI/MFM/RLL support 590# ATA/ATAPI/MFM/RLL support
@@ -668,11 +641,7 @@ CONFIG_NETDEVICES=y
668CONFIG_NET_ETHERNET=y 641CONFIG_NET_ETHERNET=y
669CONFIG_MII=y 642CONFIG_MII=y
670# CONFIG_SMC91X is not set 643# CONFIG_SMC91X is not set
671CONFIG_BFIN_MAC=y 644# CONFIG_SMSC911X is not set
672CONFIG_BFIN_MAC_USE_L1=y
673CONFIG_BFIN_TX_DESC_NUM=10
674CONFIG_BFIN_RX_DESC_NUM=20
675# CONFIG_BFIN_MAC_RMII is not set
676 645
677# 646#
678# Ethernet (1000 Mbit) 647# Ethernet (1000 Mbit)
@@ -724,7 +693,7 @@ CONFIG_INPUT=y
724# CONFIG_INPUT_MOUSEDEV is not set 693# CONFIG_INPUT_MOUSEDEV is not set
725# CONFIG_INPUT_JOYDEV is not set 694# CONFIG_INPUT_JOYDEV is not set
726# CONFIG_INPUT_TSDEV is not set 695# CONFIG_INPUT_TSDEV is not set
727CONFIG_INPUT_EVDEV=m 696# CONFIG_INPUT_EVDEV is not set
728# CONFIG_INPUT_EVBUG is not set 697# CONFIG_INPUT_EVBUG is not set
729 698
730# 699#
@@ -737,8 +706,6 @@ CONFIG_INPUT_EVDEV=m
737CONFIG_INPUT_MISC=y 706CONFIG_INPUT_MISC=y
738# CONFIG_INPUT_UINPUT is not set 707# CONFIG_INPUT_UINPUT is not set
739# CONFIG_BF53X_PFBUTTONS is not set 708# CONFIG_BF53X_PFBUTTONS is not set
740CONFIG_TWI_KEYPAD=m
741CONFIG_BFIN_TWIKEYPAD_IRQ_PFX=72
742 709
743# 710#
744# Hardware I/O ports 711# Hardware I/O ports
@@ -751,15 +718,13 @@ CONFIG_BFIN_TWIKEYPAD_IRQ_PFX=72
751# 718#
752# CONFIG_AD9960 is not set 719# CONFIG_AD9960 is not set
753# CONFIG_SPI_ADC_BF533 is not set 720# CONFIG_SPI_ADC_BF533 is not set
754# CONFIG_BF533_PFLAGS is not set 721# CONFIG_BF5xx_PFLAGS is not set
755# CONFIG_BF5xx_PPIFCD is not set 722# CONFIG_BF5xx_PPIFCD is not set
756# CONFIG_BF5xx_TIMERS is not set 723# CONFIG_BF5xx_TIMERS is not set
757# CONFIG_BF5xx_PPI is not set 724# CONFIG_BF5xx_PPI is not set
758CONFIG_BFIN_SPORT=y 725# CONFIG_BFIN_SPORT is not set
759# CONFIG_BFIN_TIMER_LATENCY is not set 726# CONFIG_BFIN_TIMER_LATENCY is not set
760CONFIG_TWI_LCD=m 727# CONFIG_BF5xx_FBDMA is not set
761CONFIG_TWI_LCD_SLAVE_ADDR=34
762# CONFIG_AD5304 is not set
763# CONFIG_VT is not set 728# CONFIG_VT is not set
764# CONFIG_SERIAL_NONSTANDARD is not set 729# CONFIG_SERIAL_NONSTANDARD is not set
765 730
@@ -773,11 +738,13 @@ CONFIG_TWI_LCD_SLAVE_ADDR=34
773# 738#
774CONFIG_SERIAL_BFIN=y 739CONFIG_SERIAL_BFIN=y
775CONFIG_SERIAL_BFIN_CONSOLE=y 740CONFIG_SERIAL_BFIN_CONSOLE=y
776CONFIG_SERIAL_BFIN_DMA=y 741# CONFIG_SERIAL_BFIN_DMA is not set
777# CONFIG_SERIAL_BFIN_PIO is not set 742CONFIG_SERIAL_BFIN_PIO=y
778CONFIG_SERIAL_BFIN_UART0=y 743# CONFIG_SERIAL_BFIN_UART0 is not set
779# CONFIG_BFIN_UART0_CTSRTS is not set 744CONFIG_SERIAL_BFIN_UART1=y
780# CONFIG_SERIAL_BFIN_UART1 is not set 745# CONFIG_BFIN_UART1_CTSRTS is not set
746# CONFIG_SERIAL_BFIN_UART2 is not set
747# CONFIG_SERIAL_BFIN_UART3 is not set
781CONFIG_SERIAL_CORE=y 748CONFIG_SERIAL_CORE=y
782CONFIG_SERIAL_CORE_CONSOLE=y 749CONFIG_SERIAL_CORE_CONSOLE=y
783# CONFIG_SERIAL_BFIN_SPORT is not set 750# CONFIG_SERIAL_BFIN_SPORT is not set
@@ -787,14 +754,7 @@ CONFIG_UNIX98_PTYS=y
787# 754#
788# CAN, the car bus and industrial fieldbus 755# CAN, the car bus and industrial fieldbus
789# 756#
790CONFIG_CAN4LINUX=y 757# CONFIG_CAN4LINUX is not set
791
792#
793# linux embedded drivers
794#
795# CONFIG_CAN_MCF5282 is not set
796# CONFIG_CAN_UNCTWINCAN is not set
797CONFIG_CAN_BLACKFIN=m
798 758
799# 759#
800# IPMI 760# IPMI
@@ -807,7 +767,6 @@ CONFIG_CAN_BLACKFIN=m
807# CONFIG_WATCHDOG is not set 767# CONFIG_WATCHDOG is not set
808CONFIG_HW_RANDOM=y 768CONFIG_HW_RANDOM=y
809# CONFIG_GEN_RTC is not set 769# CONFIG_GEN_RTC is not set
810CONFIG_BLACKFIN_DPMC=y
811# CONFIG_DTLK is not set 770# CONFIG_DTLK is not set
812# CONFIG_R3964 is not set 771# CONFIG_R3964 is not set
813# CONFIG_RAW_DRIVER is not set 772# CONFIG_RAW_DRIVER is not set
@@ -820,59 +779,13 @@ CONFIG_BLACKFIN_DPMC=y
820# 779#
821# I2C support 780# I2C support
822# 781#
823CONFIG_I2C=m 782# CONFIG_I2C is not set
824CONFIG_I2C_CHARDEV=m
825
826#
827# I2C Algorithms
828#
829# CONFIG_I2C_ALGOBIT is not set
830# CONFIG_I2C_ALGOPCF is not set
831# CONFIG_I2C_ALGOPCA is not set
832
833#
834# I2C Hardware Bus support
835#
836# CONFIG_I2C_BLACKFIN_GPIO is not set
837# CONFIG_I2C_BLACKFIN_TWI is not set
838# CONFIG_I2C_OCORES is not set
839# CONFIG_I2C_PARPORT_LIGHT is not set
840# CONFIG_I2C_STUB is not set
841# CONFIG_I2C_PCA_ISA is not set
842
843#
844# Miscellaneous I2C Chip support
845#
846# CONFIG_SENSORS_DS1337 is not set
847# CONFIG_SENSORS_DS1374 is not set
848CONFIG_SENSORS_AD5252=m
849# CONFIG_SENSORS_EEPROM is not set
850# CONFIG_SENSORS_PCF8574 is not set
851# CONFIG_SENSORS_PCF8575 is not set
852# CONFIG_SENSORS_PCA9543 is not set
853# CONFIG_SENSORS_PCA9539 is not set
854# CONFIG_SENSORS_PCF8591 is not set
855# CONFIG_SENSORS_MAX6875 is not set
856# CONFIG_I2C_DEBUG_CORE is not set
857# CONFIG_I2C_DEBUG_ALGO is not set
858# CONFIG_I2C_DEBUG_BUS is not set
859# CONFIG_I2C_DEBUG_CHIP is not set
860 783
861# 784#
862# SPI support 785# SPI support
863# 786#
864CONFIG_SPI=y 787# CONFIG_SPI is not set
865CONFIG_SPI_MASTER=y 788# CONFIG_SPI_MASTER is not set
866
867#
868# SPI Master Controller Drivers
869#
870# CONFIG_SPI_BITBANG is not set
871
872#
873# SPI Protocol Masters
874#
875CONFIG_SPI_BFIN=y
876 789
877# 790#
878# Dallas's 1-wire bus 791# Dallas's 1-wire bus
@@ -885,48 +798,17 @@ CONFIG_SPI_BFIN=y
885CONFIG_HWMON=y 798CONFIG_HWMON=y
886# CONFIG_HWMON_VID is not set 799# CONFIG_HWMON_VID is not set
887# CONFIG_SENSORS_ABITUGURU is not set 800# CONFIG_SENSORS_ABITUGURU is not set
888# CONFIG_SENSORS_ADM1021 is not set
889# CONFIG_SENSORS_ADM1025 is not set
890# CONFIG_SENSORS_ADM1026 is not set
891# CONFIG_SENSORS_ADM1031 is not set
892# CONFIG_SENSORS_ADM9240 is not set
893# CONFIG_SENSORS_ASB100 is not set
894# CONFIG_SENSORS_ATXP1 is not set
895# CONFIG_SENSORS_DS1621 is not set
896# CONFIG_SENSORS_F71805F is not set 801# CONFIG_SENSORS_F71805F is not set
897# CONFIG_SENSORS_FSCHER is not set
898# CONFIG_SENSORS_FSCPOS is not set
899# CONFIG_SENSORS_GL518SM is not set
900# CONFIG_SENSORS_GL520SM is not set
901# CONFIG_SENSORS_IT87 is not set
902# CONFIG_SENSORS_LM63 is not set
903# CONFIG_SENSORS_LM70 is not set
904# CONFIG_SENSORS_LM75 is not set
905# CONFIG_SENSORS_LM77 is not set
906# CONFIG_SENSORS_LM78 is not set
907# CONFIG_SENSORS_LM80 is not set
908# CONFIG_SENSORS_LM83 is not set
909# CONFIG_SENSORS_LM85 is not set
910# CONFIG_SENSORS_LM87 is not set
911# CONFIG_SENSORS_LM90 is not set
912# CONFIG_SENSORS_LM92 is not set
913# CONFIG_SENSORS_MAX1619 is not set
914# CONFIG_SENSORS_PC87360 is not set
915# CONFIG_SENSORS_PC87427 is not set 802# CONFIG_SENSORS_PC87427 is not set
916# CONFIG_SENSORS_SMSC47M1 is not set
917# CONFIG_SENSORS_SMSC47M192 is not set
918# CONFIG_SENSORS_SMSC47B397 is not set
919# CONFIG_SENSORS_VT1211 is not set 803# CONFIG_SENSORS_VT1211 is not set
920# CONFIG_SENSORS_W83781D is not set
921# CONFIG_SENSORS_W83791D is not set
922# CONFIG_SENSORS_W83792D is not set
923# CONFIG_SENSORS_W83793 is not set
924# CONFIG_SENSORS_W83L785TS is not set
925# CONFIG_SENSORS_W83627HF is not set
926# CONFIG_SENSORS_W83627EHF is not set
927# CONFIG_HWMON_DEBUG_CHIP is not set 804# CONFIG_HWMON_DEBUG_CHIP is not set
928 805
929# 806#
807# Multifunction device drivers
808#
809# CONFIG_MFD_SM501 is not set
810
811#
930# Multimedia devices 812# Multimedia devices
931# 813#
932# CONFIG_VIDEO_DEV is not set 814# CONFIG_VIDEO_DEV is not set
@@ -939,77 +821,19 @@ CONFIG_HWMON=y
939# 821#
940# Graphics support 822# Graphics support
941# 823#
942CONFIG_FIRMWARE_EDID=y 824# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
943CONFIG_FB=m 825# CONFIG_FB is not set
944CONFIG_FB_CFB_FILLRECT=m
945CONFIG_FB_CFB_COPYAREA=m
946CONFIG_FB_CFB_IMAGEBLIT=m
947# CONFIG_FB_MACMODES is not set
948# CONFIG_FB_BACKLIGHT is not set
949# CONFIG_FB_MODE_HELPERS is not set
950# CONFIG_FB_TILEBLITTING is not set
951CONFIG_FB_BFIN_7171=m
952CONFIG_FB_BFIN_7393=m
953CONFIG_NTSC=y
954# CONFIG_PAL is not set
955# CONFIG_NTSC_640x480 is not set
956# CONFIG_PAL_640x480 is not set
957# CONFIG_NTSC_YCBCR is not set
958# CONFIG_PAL_YCBCR is not set
959CONFIG_ADV7393_1XMEM=y
960# CONFIG_ADV7393_2XMEM is not set
961# CONFIG_FB_S1D13XXX is not set
962# CONFIG_FB_VIRTUAL is not set
963
964#
965# Logo configuration
966#
967# CONFIG_LOGO is not set
968CONFIG_BACKLIGHT_LCD_SUPPORT=y
969CONFIG_BACKLIGHT_CLASS_DEVICE=m
970CONFIG_BACKLIGHT_DEVICE=y
971CONFIG_LCD_CLASS_DEVICE=m
972CONFIG_LCD_DEVICE=y
973 826
974# 827#
975# Sound 828# Sound
976# 829#
977CONFIG_SOUND=m 830# CONFIG_SOUND is not set
978
979#
980# Advanced Linux Sound Architecture
981#
982CONFIG_SND=m
983CONFIG_SND_TIMER=m
984CONFIG_SND_PCM=m
985# CONFIG_SND_SEQUENCER is not set
986CONFIG_SND_OSSEMUL=y
987CONFIG_SND_MIXER_OSS=m
988CONFIG_SND_PCM_OSS=m
989CONFIG_SND_PCM_OSS_PLUGINS=y
990# CONFIG_SND_DYNAMIC_MINORS is not set
991CONFIG_SND_SUPPORT_OLD_API=y
992CONFIG_SND_VERBOSE_PROCFS=y
993# CONFIG_SND_VERBOSE_PRINTK is not set
994# CONFIG_SND_DEBUG is not set
995
996#
997# Generic devices
998#
999# CONFIG_SND_DUMMY is not set
1000# CONFIG_SND_MTPAV is not set
1001# CONFIG_SND_SERIAL_U16550 is not set
1002# CONFIG_SND_MPU401 is not set
1003
1004#
1005# Open Sound System
1006#
1007# CONFIG_SOUND_PRIME is not set
1008 831
1009# 832#
1010# HID Devices 833# HID Devices
1011# 834#
1012CONFIG_HID=y 835CONFIG_HID=y
836# CONFIG_HID_DEBUG is not set
1013 837
1014# 838#
1015# USB support 839# USB support
@@ -1031,7 +855,6 @@ CONFIG_USB_ARCH_HAS_HCD=y
1031# 855#
1032# MMC/SD Card support 856# MMC/SD Card support
1033# 857#
1034# CONFIG_SPI_MMC is not set
1035# CONFIG_MMC is not set 858# CONFIG_MMC is not set
1036 859
1037# 860#
@@ -1075,19 +898,10 @@ CONFIG_RTC_INTF_DEV=y
1075# 898#
1076# RTC drivers 899# RTC drivers
1077# 900#
1078# CONFIG_RTC_DRV_X1205 is not set
1079# CONFIG_RTC_DRV_DS1307 is not set
1080# CONFIG_RTC_DRV_DS1553 is not set 901# CONFIG_RTC_DRV_DS1553 is not set
1081# CONFIG_RTC_DRV_ISL1208 is not set
1082# CONFIG_RTC_DRV_DS1672 is not set
1083# CONFIG_RTC_DRV_DS1742 is not set 902# CONFIG_RTC_DRV_DS1742 is not set
1084# CONFIG_RTC_DRV_PCF8563 is not set
1085# CONFIG_RTC_DRV_PCF8583 is not set
1086# CONFIG_RTC_DRV_RS5C348 is not set
1087# CONFIG_RTC_DRV_RS5C372 is not set
1088# CONFIG_RTC_DRV_M48T86 is not set 903# CONFIG_RTC_DRV_M48T86 is not set
1089# CONFIG_RTC_DRV_TEST is not set 904# CONFIG_RTC_DRV_TEST is not set
1090# CONFIG_RTC_DRV_MAX6902 is not set
1091# CONFIG_RTC_DRV_V3020 is not set 905# CONFIG_RTC_DRV_V3020 is not set
1092CONFIG_RTC_DRV_BFIN=y 906CONFIG_RTC_DRV_BFIN=y
1093 907
@@ -1105,6 +919,10 @@ CONFIG_RTC_DRV_BFIN=y
1105# 919#
1106 920
1107# 921#
922# Auxiliary Display support
923#
924
925#
1108# Virtualization 926# Virtualization
1109# 927#
1110 928
@@ -1173,25 +991,8 @@ CONFIG_RAMFS=y
1173# CONFIG_BEFS_FS is not set 991# CONFIG_BEFS_FS is not set
1174# CONFIG_BFS_FS is not set 992# CONFIG_BFS_FS is not set
1175# CONFIG_EFS_FS is not set 993# CONFIG_EFS_FS is not set
1176CONFIG_YAFFS_FS=m 994# CONFIG_YAFFS_FS is not set
1177CONFIG_YAFFS_YAFFS1=y 995# CONFIG_JFFS2_FS is not set
1178# CONFIG_YAFFS_DOES_ECC is not set
1179CONFIG_YAFFS_YAFFS2=y
1180CONFIG_YAFFS_AUTO_YAFFS2=y
1181# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
1182CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10
1183# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
1184# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
1185CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
1186CONFIG_JFFS2_FS=m
1187CONFIG_JFFS2_FS_DEBUG=0
1188CONFIG_JFFS2_FS_WRITEBUFFER=y
1189# CONFIG_JFFS2_SUMMARY is not set
1190# CONFIG_JFFS2_FS_XATTR is not set
1191# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1192CONFIG_JFFS2_ZLIB=y
1193CONFIG_JFFS2_RTIME=y
1194# CONFIG_JFFS2_RUBIN is not set
1195# CONFIG_CRAMFS is not set 996# CONFIG_CRAMFS is not set
1196# CONFIG_VXFS_FS is not set 997# CONFIG_VXFS_FS is not set
1197# CONFIG_HPFS_FS is not set 998# CONFIG_HPFS_FS is not set
@@ -1202,20 +1003,9 @@ CONFIG_JFFS2_RTIME=y
1202# 1003#
1203# Network File Systems 1004# Network File Systems
1204# 1005#
1205CONFIG_NFS_FS=m 1006# CONFIG_NFS_FS is not set
1206CONFIG_NFS_V3=y
1207# CONFIG_NFS_V3_ACL is not set
1208# CONFIG_NFS_V4 is not set
1209# CONFIG_NFS_DIRECTIO is not set
1210# CONFIG_NFSD is not set 1007# CONFIG_NFSD is not set
1211CONFIG_LOCKD=m 1008# CONFIG_SMB_FS is not set
1212CONFIG_LOCKD_V4=y
1213CONFIG_NFS_COMMON=y
1214CONFIG_SUNRPC=m
1215# CONFIG_RPCSEC_GSS_KRB5 is not set
1216# CONFIG_RPCSEC_GSS_SPKM3 is not set
1217CONFIG_SMB_FS=m
1218# CONFIG_SMB_NLS_DEFAULT is not set
1219# CONFIG_CIFS is not set 1009# CONFIG_CIFS is not set
1220# CONFIG_NCP_FS is not set 1010# CONFIG_NCP_FS is not set
1221# CONFIG_CODA_FS is not set 1011# CONFIG_CODA_FS is not set
@@ -1231,46 +1021,7 @@ CONFIG_MSDOS_PARTITION=y
1231# 1021#
1232# Native Language Support 1022# Native Language Support
1233# 1023#
1234CONFIG_NLS=m 1024# CONFIG_NLS is not set
1235CONFIG_NLS_DEFAULT="iso8859-1"
1236# CONFIG_NLS_CODEPAGE_437 is not set
1237# CONFIG_NLS_CODEPAGE_737 is not set
1238# CONFIG_NLS_CODEPAGE_775 is not set
1239# CONFIG_NLS_CODEPAGE_850 is not set
1240# CONFIG_NLS_CODEPAGE_852 is not set
1241# CONFIG_NLS_CODEPAGE_855 is not set
1242# CONFIG_NLS_CODEPAGE_857 is not set
1243# CONFIG_NLS_CODEPAGE_860 is not set
1244# CONFIG_NLS_CODEPAGE_861 is not set
1245# CONFIG_NLS_CODEPAGE_862 is not set
1246# CONFIG_NLS_CODEPAGE_863 is not set
1247# CONFIG_NLS_CODEPAGE_864 is not set
1248# CONFIG_NLS_CODEPAGE_865 is not set
1249# CONFIG_NLS_CODEPAGE_866 is not set
1250# CONFIG_NLS_CODEPAGE_869 is not set
1251# CONFIG_NLS_CODEPAGE_936 is not set
1252# CONFIG_NLS_CODEPAGE_950 is not set
1253# CONFIG_NLS_CODEPAGE_932 is not set
1254# CONFIG_NLS_CODEPAGE_949 is not set
1255# CONFIG_NLS_CODEPAGE_874 is not set
1256# CONFIG_NLS_ISO8859_8 is not set
1257# CONFIG_NLS_CODEPAGE_1250 is not set
1258# CONFIG_NLS_CODEPAGE_1251 is not set
1259# CONFIG_NLS_ASCII is not set
1260# CONFIG_NLS_ISO8859_1 is not set
1261# CONFIG_NLS_ISO8859_2 is not set
1262# CONFIG_NLS_ISO8859_3 is not set
1263# CONFIG_NLS_ISO8859_4 is not set
1264# CONFIG_NLS_ISO8859_5 is not set
1265# CONFIG_NLS_ISO8859_6 is not set
1266# CONFIG_NLS_ISO8859_7 is not set
1267# CONFIG_NLS_ISO8859_9 is not set
1268# CONFIG_NLS_ISO8859_13 is not set
1269# CONFIG_NLS_ISO8859_14 is not set
1270# CONFIG_NLS_ISO8859_15 is not set
1271# CONFIG_NLS_KOI8_R is not set
1272# CONFIG_NLS_KOI8_U is not set
1273# CONFIG_NLS_UTF8 is not set
1274 1025
1275# 1026#
1276# Distributed Lock Manager 1027# Distributed Lock Manager
@@ -1287,13 +1038,35 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1287# 1038#
1288# CONFIG_PRINTK_TIME is not set 1039# CONFIG_PRINTK_TIME is not set
1289CONFIG_ENABLE_MUST_CHECK=y 1040CONFIG_ENABLE_MUST_CHECK=y
1290# CONFIG_MAGIC_SYSRQ is not set 1041CONFIG_MAGIC_SYSRQ=y
1291# CONFIG_UNUSED_SYMBOLS is not set 1042# CONFIG_UNUSED_SYMBOLS is not set
1292# CONFIG_DEBUG_FS is not set 1043# CONFIG_DEBUG_FS is not set
1293# CONFIG_HEADERS_CHECK is not set 1044# CONFIG_HEADERS_CHECK is not set
1294# CONFIG_DEBUG_KERNEL is not set 1045CONFIG_DEBUG_KERNEL=y
1046# CONFIG_DEBUG_SHIRQ is not set
1295CONFIG_LOG_BUF_SHIFT=14 1047CONFIG_LOG_BUF_SHIFT=14
1048CONFIG_DETECT_SOFTLOCKUP=y
1049# CONFIG_SCHEDSTATS is not set
1050# CONFIG_TIMER_STATS is not set
1051# CONFIG_DEBUG_SLAB is not set
1052# CONFIG_DEBUG_RT_MUTEXES is not set
1053# CONFIG_RT_MUTEX_TESTER is not set
1054# CONFIG_DEBUG_SPINLOCK is not set
1055# CONFIG_DEBUG_MUTEXES is not set
1056# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1057# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1058# CONFIG_DEBUG_KOBJECT is not set
1296# CONFIG_DEBUG_BUGVERBOSE is not set 1059# CONFIG_DEBUG_BUGVERBOSE is not set
1060CONFIG_DEBUG_INFO=y
1061# CONFIG_DEBUG_VM is not set
1062# CONFIG_DEBUG_LIST is not set
1063CONFIG_FRAME_POINTER=y
1064CONFIG_FORCED_INLINING=y
1065# CONFIG_RCU_TORTURE_TEST is not set
1066# CONFIG_FAULT_INJECTION is not set
1067CONFIG_DEBUG_HWERR=y
1068# CONFIG_DEBUG_ICACHE_CHECK is not set
1069# CONFIG_DEBUG_KERNEL_START is not set
1297# CONFIG_DEBUG_SERIAL_EARLY_INIT is not set 1070# CONFIG_DEBUG_SERIAL_EARLY_INIT is not set
1298CONFIG_DEBUG_HUNT_FOR_ZERO=y 1071CONFIG_DEBUG_HUNT_FOR_ZERO=y
1299# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1072# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
@@ -1317,11 +1090,11 @@ CONFIG_SECURITY_CAPABILITIES=y
1317# Library routines 1090# Library routines
1318# 1091#
1319CONFIG_BITREVERSE=y 1092CONFIG_BITREVERSE=y
1320CONFIG_CRC_CCITT=m 1093# CONFIG_CRC_CCITT is not set
1321# CONFIG_CRC16 is not set 1094# CONFIG_CRC16 is not set
1322CONFIG_CRC32=y 1095CONFIG_CRC32=y
1323# CONFIG_LIBCRC32C is not set 1096# CONFIG_LIBCRC32C is not set
1324CONFIG_ZLIB_INFLATE=y 1097CONFIG_ZLIB_INFLATE=y
1325CONFIG_ZLIB_DEFLATE=m
1326CONFIG_PLIST=y 1098CONFIG_PLIST=y
1327CONFIG_IOMAP_COPY=y 1099CONFIG_HAS_IOMEM=y
1100CONFIG_HAS_IOPORT=y
diff --git a/arch/blackfin/configs/BF561-EZKIT_defconfig b/arch/blackfin/configs/BF561-EZKIT_defconfig
index e32ca2072cbf..51c0b6f97798 100644
--- a/arch/blackfin/configs/BF561-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF561-EZKIT_defconfig
@@ -1,20 +1,21 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19.3 3# Linux kernel version: 2.6.21.5
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
9CONFIG_BLACKFIN=y 9CONFIG_BLACKFIN=y
10CONFIG_ZONE_DMA=y
10CONFIG_BFIN=y 11CONFIG_BFIN=y
11CONFIG_SEMAPHORE_SLEEPERS=y 12CONFIG_SEMAPHORE_SLEEPERS=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y 13CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_GENERIC_HWEIGHT=y 14CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 15CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17# CONFIG_GENERIC_TIME is not set
16CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_UCLINUX=y
18CONFIG_FORCE_MAX_ZONEORDER=14 19CONFIG_FORCE_MAX_ZONEORDER=14
19CONFIG_IRQCHIP_DEMUX_GPIO=y 20CONFIG_IRQCHIP_DEMUX_GPIO=y
20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -33,18 +34,21 @@ CONFIG_LOCALVERSION=""
33CONFIG_LOCALVERSION_AUTO=y 34CONFIG_LOCALVERSION_AUTO=y
34CONFIG_SYSVIPC=y 35CONFIG_SYSVIPC=y
35# CONFIG_IPC_NS is not set 36# CONFIG_IPC_NS is not set
37CONFIG_SYSVIPC_SYSCTL=y
36# CONFIG_POSIX_MQUEUE is not set 38# CONFIG_POSIX_MQUEUE is not set
37# CONFIG_BSD_PROCESS_ACCT is not set 39# CONFIG_BSD_PROCESS_ACCT is not set
38# CONFIG_TASKSTATS is not set 40# CONFIG_TASKSTATS is not set
39# CONFIG_UTS_NS is not set 41# CONFIG_UTS_NS is not set
40# CONFIG_AUDIT is not set 42# CONFIG_AUDIT is not set
41# CONFIG_IKCONFIG is not set 43# CONFIG_IKCONFIG is not set
44CONFIG_SYSFS_DEPRECATED=y
42# CONFIG_RELAY is not set 45# CONFIG_RELAY is not set
46CONFIG_BLK_DEV_INITRD=y
43CONFIG_INITRAMFS_SOURCE="" 47CONFIG_INITRAMFS_SOURCE=""
44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 48# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
45CONFIG_SYSCTL=y 49CONFIG_SYSCTL=y
46CONFIG_EMBEDDED=y 50CONFIG_EMBEDDED=y
47# CONFIG_UID16 is not set 51CONFIG_UID16=y
48CONFIG_SYSCTL_SYSCALL=y 52CONFIG_SYSCTL_SYSCALL=y
49CONFIG_KALLSYMS=y 53CONFIG_KALLSYMS=y
50# CONFIG_KALLSYMS_EXTRA_PASS is not set 54# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -54,9 +58,7 @@ CONFIG_BUG=y
54CONFIG_ELF_CORE=y 58CONFIG_ELF_CORE=y
55CONFIG_BASE_FULL=y 59CONFIG_BASE_FULL=y
56CONFIG_FUTEX=y 60CONFIG_FUTEX=y
57CONFIG_EPOLL=y
58CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 61CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
59# CONFIG_LIMIT_PAGECACHE is not set
60CONFIG_BUDDY=y 62CONFIG_BUDDY=y
61# CONFIG_NP2 is not set 63# CONFIG_NP2 is not set
62CONFIG_SLAB=y 64CONFIG_SLAB=y
@@ -80,7 +82,9 @@ CONFIG_KMOD=y
80# Block layer 82# Block layer
81# 83#
82CONFIG_BLOCK=y 84CONFIG_BLOCK=y
85# CONFIG_LBD is not set
83# CONFIG_BLK_DEV_IO_TRACE is not set 86# CONFIG_BLK_DEV_IO_TRACE is not set
87# CONFIG_LSF is not set
84 88
85# 89#
86# IO Schedulers 90# IO Schedulers
@@ -109,22 +113,30 @@ CONFIG_PREEMPT_VOLUNTARY=y
109# CONFIG_BF532 is not set 113# CONFIG_BF532 is not set
110# CONFIG_BF533 is not set 114# CONFIG_BF533 is not set
111# CONFIG_BF534 is not set 115# CONFIG_BF534 is not set
112# CONFIG_BF535 is not set
113# CONFIG_BF536 is not set 116# CONFIG_BF536 is not set
114# CONFIG_BF537 is not set 117# CONFIG_BF537 is not set
118# CONFIG_BF542 is not set
119# CONFIG_BF544 is not set
120# CONFIG_BF548 is not set
121# CONFIG_BF549 is not set
115CONFIG_BF561=y 122CONFIG_BF561=y
123# CONFIG_BF_REV_0_0 is not set
116# CONFIG_BF_REV_0_2 is not set 124# CONFIG_BF_REV_0_2 is not set
117CONFIG_BF_REV_0_3=y 125CONFIG_BF_REV_0_3=y
118# CONFIG_BF_REV_0_4 is not set 126# CONFIG_BF_REV_0_4 is not set
119# CONFIG_BF_REV_0_5 is not set 127# CONFIG_BF_REV_0_5 is not set
128# CONFIG_BF_REV_ANY is not set
129# CONFIG_BF_REV_NONE is not set
120CONFIG_BFIN_DUAL_CORE=y 130CONFIG_BFIN_DUAL_CORE=y
121# CONFIG_BFIN533_EZKIT is not set 131# CONFIG_BFIN533_EZKIT is not set
122# CONFIG_BFIN533_STAMP is not set 132# CONFIG_BFIN533_STAMP is not set
123# CONFIG_BFIN537_STAMP is not set 133# CONFIG_BFIN537_STAMP is not set
124# CONFIG_BFIN533_BLUETECHNIX_CM is not set 134# CONFIG_BFIN533_BLUETECHNIX_CM is not set
125# CONFIG_BFIN537_BLUETECHNIX_CM is not set 135# CONFIG_BFIN537_BLUETECHNIX_CM is not set
136# CONFIG_BFIN548_EZKIT is not set
126# CONFIG_BFIN561_BLUETECHNIX_CM is not set 137# CONFIG_BFIN561_BLUETECHNIX_CM is not set
127CONFIG_BFIN561_EZKIT=y 138CONFIG_BFIN561_EZKIT=y
139# CONFIG_BFIN561_TEPLA is not set
128# CONFIG_PNAV10 is not set 140# CONFIG_PNAV10 is not set
129# CONFIG_GENERIC_BOARD is not set 141# CONFIG_GENERIC_BOARD is not set
130CONFIG_MEM_MT48LC16M16A2TG_75=y 142CONFIG_MEM_MT48LC16M16A2TG_75=y
@@ -214,6 +226,7 @@ CONFIG_IRQ_WDTIMER=13
214# 226#
215# Board customizations 227# Board customizations
216# 228#
229# CONFIG_CMDLINE_BOOL is not set
217 230
218# 231#
219# Board Setup 232# Board Setup
@@ -224,19 +237,6 @@ CONFIG_MEM_ADD_WIDTH=9
224CONFIG_BOOT_LOAD=0x1000 237CONFIG_BOOT_LOAD=0x1000
225 238
226# 239#
227# Console UART Setup
228#
229# CONFIG_BAUD_9600 is not set
230# CONFIG_BAUD_19200 is not set
231# CONFIG_BAUD_38400 is not set
232CONFIG_BAUD_57600=y
233# CONFIG_BAUD_115200 is not set
234CONFIG_BAUD_NO_PARITY=y
235# CONFIG_BAUD_PARITY is not set
236CONFIG_BAUD_1_STOPBIT=y
237# CONFIG_BAUD_2_STOPBIT is not set
238
239#
240# Blackfin Kernel Optimizations 240# Blackfin Kernel Optimizations
241# 241#
242 242
@@ -245,6 +245,7 @@ CONFIG_BAUD_1_STOPBIT=y
245# 245#
246# CONFIG_HZ_100 is not set 246# CONFIG_HZ_100 is not set
247CONFIG_HZ_250=y 247CONFIG_HZ_250=y
248# CONFIG_HZ_300 is not set
248# CONFIG_HZ_1000 is not set 249# CONFIG_HZ_1000 is not set
249CONFIG_HZ=250 250CONFIG_HZ=250
250 251
@@ -263,6 +264,7 @@ CONFIG_MEMSET_L1=y
263CONFIG_MEMCPY_L1=y 264CONFIG_MEMCPY_L1=y
264CONFIG_SYS_BFIN_SPINLOCK_L1=y 265CONFIG_SYS_BFIN_SPINLOCK_L1=y
265# CONFIG_IP_CHECKSUM_L1 is not set 266# CONFIG_IP_CHECKSUM_L1 is not set
267CONFIG_CACHELINE_ALIGNED_L1=y
266# CONFIG_SYSCALL_TAB_L1 is not set 268# CONFIG_SYSCALL_TAB_L1 is not set
267# CONFIG_CPLB_SWITCH_TAB_L1 is not set 269# CONFIG_CPLB_SWITCH_TAB_L1 is not set
268CONFIG_RAMKERNEL=y 270CONFIG_RAMKERNEL=y
@@ -276,6 +278,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
276# CONFIG_SPARSEMEM_STATIC is not set 278# CONFIG_SPARSEMEM_STATIC is not set
277CONFIG_SPLIT_PTLOCK_CPUS=4 279CONFIG_SPLIT_PTLOCK_CPUS=4
278# CONFIG_RESOURCES_64BIT is not set 280# CONFIG_RESOURCES_64BIT is not set
281CONFIG_ZONE_DMA_FLAG=1
279CONFIG_LARGE_ALLOCS=y 282CONFIG_LARGE_ALLOCS=y
280CONFIG_BFIN_DMA_5XX=y 283CONFIG_BFIN_DMA_5XX=y
281# CONFIG_DMA_UNCACHED_2M is not set 284# CONFIG_DMA_UNCACHED_2M is not set
@@ -368,6 +371,7 @@ CONFIG_UNIX=y
368CONFIG_XFRM=y 371CONFIG_XFRM=y
369# CONFIG_XFRM_USER is not set 372# CONFIG_XFRM_USER is not set
370# CONFIG_XFRM_SUB_POLICY is not set 373# CONFIG_XFRM_SUB_POLICY is not set
374# CONFIG_XFRM_MIGRATE is not set
371# CONFIG_NET_KEY is not set 375# CONFIG_NET_KEY is not set
372CONFIG_INET=y 376CONFIG_INET=y
373# CONFIG_IP_MULTICAST is not set 377# CONFIG_IP_MULTICAST is not set
@@ -394,6 +398,7 @@ CONFIG_INET_TCP_DIAG=y
394# CONFIG_TCP_CONG_ADVANCED is not set 398# CONFIG_TCP_CONG_ADVANCED is not set
395CONFIG_TCP_CONG_CUBIC=y 399CONFIG_TCP_CONG_CUBIC=y
396CONFIG_DEFAULT_TCP_CONG="cubic" 400CONFIG_DEFAULT_TCP_CONG="cubic"
401# CONFIG_TCP_MD5SIG is not set
397# CONFIG_IPV6 is not set 402# CONFIG_IPV6 is not set
398# CONFIG_INET6_XFRM_TUNNEL is not set 403# CONFIG_INET6_XFRM_TUNNEL is not set
399# CONFIG_INET6_TUNNEL is not set 404# CONFIG_INET6_TUNNEL is not set
@@ -437,7 +442,48 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
437# 442#
438# CONFIG_NET_PKTGEN is not set 443# CONFIG_NET_PKTGEN is not set
439# CONFIG_HAMRADIO is not set 444# CONFIG_HAMRADIO is not set
440# CONFIG_IRDA is not set 445CONFIG_IRDA=m
446
447#
448# IrDA protocols
449#
450CONFIG_IRLAN=m
451CONFIG_IRCOMM=m
452# CONFIG_IRDA_ULTRA is not set
453
454#
455# IrDA options
456#
457CONFIG_IRDA_CACHE_LAST_LSAP=y
458# CONFIG_IRDA_FAST_RR is not set
459# CONFIG_IRDA_DEBUG is not set
460
461#
462# Infrared-port device drivers
463#
464
465#
466# SIR device drivers
467#
468CONFIG_IRTTY_SIR=m
469
470#
471# Dongle support
472#
473# CONFIG_DONGLE is not set
474
475#
476# Old SIR device drivers
477#
478# CONFIG_IRPORT_SIR is not set
479
480#
481# Old Serial dongle support
482#
483
484#
485# FIR device drivers
486#
441# CONFIG_BT is not set 487# CONFIG_BT is not set
442# CONFIG_IEEE80211 is not set 488# CONFIG_IEEE80211 is not set
443 489
@@ -472,6 +518,7 @@ CONFIG_MTD_PARTITIONS=y
472# User Modules And Translation Layers 518# User Modules And Translation Layers
473# 519#
474CONFIG_MTD_CHAR=m 520CONFIG_MTD_CHAR=m
521CONFIG_MTD_BLKDEVS=y
475CONFIG_MTD_BLOCK=y 522CONFIG_MTD_BLOCK=y
476# CONFIG_FTL is not set 523# CONFIG_FTL is not set
477# CONFIG_NFTL is not set 524# CONFIG_NFTL is not set
@@ -528,6 +575,8 @@ CONFIG_BFIN_FLASH_BANK_3=0x7BB0
528# 575#
529# Self-contained MTD device drivers 576# Self-contained MTD device drivers
530# 577#
578# CONFIG_MTD_DATAFLASH is not set
579# CONFIG_MTD_M25P80 is not set
531# CONFIG_MTD_SLRAM is not set 580# CONFIG_MTD_SLRAM is not set
532# CONFIG_MTD_PHRAM is not set 581# CONFIG_MTD_PHRAM is not set
533# CONFIG_MTD_MTDRAM is not set 582# CONFIG_MTD_MTDRAM is not set
@@ -558,6 +607,7 @@ CONFIG_BFIN_FLASH_BANK_3=0x7BB0
558# 607#
559# Plug and Play support 608# Plug and Play support
560# 609#
610# CONFIG_PNPACPI is not set
561 611
562# 612#
563# Block devices 613# Block devices
@@ -569,14 +619,12 @@ CONFIG_BLK_DEV_RAM=y
569CONFIG_BLK_DEV_RAM_COUNT=16 619CONFIG_BLK_DEV_RAM_COUNT=16
570CONFIG_BLK_DEV_RAM_SIZE=4096 620CONFIG_BLK_DEV_RAM_SIZE=4096
571CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 621CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
572# CONFIG_BLK_DEV_INITRD is not set
573# CONFIG_CDROM_PKTCDVD is not set 622# CONFIG_CDROM_PKTCDVD is not set
574# CONFIG_ATA_OVER_ETH is not set 623# CONFIG_ATA_OVER_ETH is not set
575 624
576# 625#
577# Misc devices 626# Misc devices
578# 627#
579# CONFIG_TIFM_CORE is not set
580 628
581# 629#
582# ATA/ATAPI/MFM/RLL support 630# ATA/ATAPI/MFM/RLL support
@@ -633,6 +681,7 @@ CONFIG_NETDEVICES=y
633CONFIG_NET_ETHERNET=y 681CONFIG_NET_ETHERNET=y
634CONFIG_MII=y 682CONFIG_MII=y
635CONFIG_SMC91X=y 683CONFIG_SMC91X=y
684# CONFIG_SMSC911X is not set
636 685
637# 686#
638# Ethernet (1000 Mbit) 687# Ethernet (1000 Mbit)
@@ -675,7 +724,26 @@ CONFIG_SMC91X=y
675# 724#
676# Input device support 725# Input device support
677# 726#
678# CONFIG_INPUT is not set 727CONFIG_INPUT=m
728# CONFIG_INPUT_FF_MEMLESS is not set
729
730#
731# Userland interfaces
732#
733# CONFIG_INPUT_MOUSEDEV is not set
734# CONFIG_INPUT_JOYDEV is not set
735# CONFIG_INPUT_TSDEV is not set
736CONFIG_INPUT_EVDEV=m
737# CONFIG_INPUT_EVBUG is not set
738
739#
740# Input Device Drivers
741#
742# CONFIG_INPUT_KEYBOARD is not set
743# CONFIG_INPUT_MOUSE is not set
744# CONFIG_INPUT_JOYSTICK is not set
745# CONFIG_INPUT_TOUCHSCREEN is not set
746# CONFIG_INPUT_MISC is not set
679 747
680# 748#
681# Hardware I/O ports 749# Hardware I/O ports
@@ -688,12 +756,14 @@ CONFIG_SMC91X=y
688# 756#
689# CONFIG_AD9960 is not set 757# CONFIG_AD9960 is not set
690# CONFIG_SPI_ADC_BF533 is not set 758# CONFIG_SPI_ADC_BF533 is not set
691# CONFIG_BF533_PFLAGS is not set 759# CONFIG_BF5xx_PFLAGS is not set
692# CONFIG_BF5xx_PPIFCD is not set 760# CONFIG_BF5xx_PPIFCD is not set
693# CONFIG_BF5xx_TIMERS is not set 761# CONFIG_BF5xx_TIMERS is not set
694# CONFIG_BF5xx_PPI is not set 762# CONFIG_BF5xx_PPI is not set
695# CONFIG_BFIN_SPORT is not set 763# CONFIG_BFIN_SPORT is not set
696# CONFIG_BFIN_TIMER_LATENCY is not set 764# CONFIG_BFIN_TIMER_LATENCY is not set
765# CONFIG_AD5304 is not set
766# CONFIG_BF5xx_FBDMA is not set
697# CONFIG_VT is not set 767# CONFIG_VT is not set
698# CONFIG_SERIAL_NONSTANDARD is not set 768# CONFIG_SERIAL_NONSTANDARD is not set
699 769
@@ -730,16 +800,18 @@ CONFIG_UNIX98_PTYS=y
730# 800#
731# Watchdog Cards 801# Watchdog Cards
732# 802#
733# CONFIG_WATCHDOG is not set 803CONFIG_WATCHDOG=y
804# CONFIG_WATCHDOG_NOWAYOUT is not set
805
806#
807# Watchdog Device Drivers
808#
809# CONFIG_SOFT_WATCHDOG is not set
810CONFIG_BFIN_WDT=y
734CONFIG_HW_RANDOM=y 811CONFIG_HW_RANDOM=y
735# CONFIG_GEN_RTC is not set 812# CONFIG_GEN_RTC is not set
736# CONFIG_BLACKFIN_DPMC is not set
737# CONFIG_DTLK is not set 813# CONFIG_DTLK is not set
738# CONFIG_R3964 is not set 814# CONFIG_R3964 is not set
739
740#
741# Ftape, the floppy tape device driver
742#
743# CONFIG_RAW_DRIVER is not set 815# CONFIG_RAW_DRIVER is not set
744 816
745# 817#
@@ -755,8 +827,19 @@ CONFIG_HW_RANDOM=y
755# 827#
756# SPI support 828# SPI support
757# 829#
758# CONFIG_SPI is not set 830CONFIG_SPI=y
759# CONFIG_SPI_MASTER is not set 831CONFIG_SPI_MASTER=y
832
833#
834# SPI Master Controller Drivers
835#
836CONFIG_SPI_BFIN=y
837# CONFIG_SPI_BITBANG is not set
838
839#
840# SPI Protocol Masters
841#
842# CONFIG_SPI_AT25 is not set
760 843
761# 844#
762# Dallas's 1-wire bus 845# Dallas's 1-wire bus
@@ -770,10 +853,17 @@ CONFIG_HWMON=y
770# CONFIG_HWMON_VID is not set 853# CONFIG_HWMON_VID is not set
771# CONFIG_SENSORS_ABITUGURU is not set 854# CONFIG_SENSORS_ABITUGURU is not set
772# CONFIG_SENSORS_F71805F is not set 855# CONFIG_SENSORS_F71805F is not set
856# CONFIG_SENSORS_LM70 is not set
857# CONFIG_SENSORS_PC87427 is not set
773# CONFIG_SENSORS_VT1211 is not set 858# CONFIG_SENSORS_VT1211 is not set
774# CONFIG_HWMON_DEBUG_CHIP is not set 859# CONFIG_HWMON_DEBUG_CHIP is not set
775 860
776# 861#
862# Multifunction device drivers
863#
864# CONFIG_MFD_SM501 is not set
865
866#
777# Multimedia devices 867# Multimedia devices
778# 868#
779# CONFIG_VIDEO_DEV is not set 869# CONFIG_VIDEO_DEV is not set
@@ -786,9 +876,8 @@ CONFIG_HWMON=y
786# 876#
787# Graphics support 877# Graphics support
788# 878#
789CONFIG_FIRMWARE_EDID=y
790# CONFIG_FB is not set
791# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 879# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
880# CONFIG_FB is not set
792 881
793# 882#
794# Sound 883# Sound
@@ -796,6 +885,12 @@ CONFIG_FIRMWARE_EDID=y
796# CONFIG_SOUND is not set 885# CONFIG_SOUND is not set
797 886
798# 887#
888# HID Devices
889#
890CONFIG_HID=m
891# CONFIG_HID_DEBUG is not set
892
893#
799# USB support 894# USB support
800# 895#
801CONFIG_USB_ARCH_HAS_HCD=y 896CONFIG_USB_ARCH_HAS_HCD=y
@@ -815,6 +910,7 @@ CONFIG_USB_ARCH_HAS_HCD=y
815# 910#
816# MMC/SD Card support 911# MMC/SD Card support
817# 912#
913# CONFIG_SPI_MMC is not set
818# CONFIG_MMC is not set 914# CONFIG_MMC is not set
819 915
820# 916#
@@ -857,6 +953,14 @@ CONFIG_USB_ARCH_HAS_HCD=y
857# 953#
858 954
859# 955#
956# Auxiliary Display support
957#
958
959#
960# Virtualization
961#
962
963#
860# PBX support 964# PBX support
861# 965#
862# CONFIG_PBX is not set 966# CONFIG_PBX is not set
@@ -864,13 +968,9 @@ CONFIG_USB_ARCH_HAS_HCD=y
864# 968#
865# File systems 969# File systems
866# 970#
867CONFIG_EXT2_FS=y 971# CONFIG_EXT2_FS is not set
868CONFIG_EXT2_FS_XATTR=y
869# CONFIG_EXT2_FS_POSIX_ACL is not set
870# CONFIG_EXT2_FS_SECURITY is not set
871# CONFIG_EXT3_FS is not set 972# CONFIG_EXT3_FS is not set
872# CONFIG_EXT4DEV_FS is not set 973# CONFIG_EXT4DEV_FS is not set
873CONFIG_FS_MBCACHE=y
874# CONFIG_REISERFS_FS is not set 974# CONFIG_REISERFS_FS is not set
875# CONFIG_JFS_FS is not set 975# CONFIG_JFS_FS is not set
876# CONFIG_FS_POSIX_ACL is not set 976# CONFIG_FS_POSIX_ACL is not set
@@ -882,7 +982,7 @@ CONFIG_FS_MBCACHE=y
882CONFIG_INOTIFY=y 982CONFIG_INOTIFY=y
883CONFIG_INOTIFY_USER=y 983CONFIG_INOTIFY_USER=y
884# CONFIG_QUOTA is not set 984# CONFIG_QUOTA is not set
885CONFIG_DNOTIFY=y 985# CONFIG_DNOTIFY is not set
886# CONFIG_AUTOFS_FS is not set 986# CONFIG_AUTOFS_FS is not set
887# CONFIG_AUTOFS4_FS is not set 987# CONFIG_AUTOFS4_FS is not set
888# CONFIG_FUSE_FS is not set 988# CONFIG_FUSE_FS is not set
@@ -931,7 +1031,6 @@ CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10
931# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set 1031# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
932# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set 1032# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
933CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y 1033CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
934# CONFIG_JFFS_FS is not set
935CONFIG_JFFS2_FS=m 1034CONFIG_JFFS2_FS=m
936CONFIG_JFFS2_FS_DEBUG=0 1035CONFIG_JFFS2_FS_DEBUG=0
937CONFIG_JFFS2_FS_WRITEBUFFER=y 1036CONFIG_JFFS2_FS_WRITEBUFFER=y
@@ -1022,6 +1121,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1022# CONFIG_NLS_UTF8 is not set 1121# CONFIG_NLS_UTF8 is not set
1023 1122
1024# 1123#
1124# Distributed Lock Manager
1125#
1126# CONFIG_DLM is not set
1127
1128#
1025# Profiling support 1129# Profiling support
1026# 1130#
1027# CONFIG_PROFILING is not set 1131# CONFIG_PROFILING is not set
@@ -1033,20 +1137,17 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1033CONFIG_ENABLE_MUST_CHECK=y 1137CONFIG_ENABLE_MUST_CHECK=y
1034# CONFIG_MAGIC_SYSRQ is not set 1138# CONFIG_MAGIC_SYSRQ is not set
1035# CONFIG_UNUSED_SYMBOLS is not set 1139# CONFIG_UNUSED_SYMBOLS is not set
1140# CONFIG_DEBUG_FS is not set
1141# CONFIG_HEADERS_CHECK is not set
1036# CONFIG_DEBUG_KERNEL is not set 1142# CONFIG_DEBUG_KERNEL is not set
1037CONFIG_LOG_BUF_SHIFT=14 1143CONFIG_LOG_BUF_SHIFT=14
1038# CONFIG_DEBUG_BUGVERBOSE is not set 1144# CONFIG_DEBUG_BUGVERBOSE is not set
1039# CONFIG_DEBUG_FS is not set
1040# CONFIG_UNWIND_INFO is not set
1041# CONFIG_HEADERS_CHECK is not set
1042# CONFIG_DEBUG_SERIAL_EARLY_INIT is not set 1145# CONFIG_DEBUG_SERIAL_EARLY_INIT is not set
1043CONFIG_DEBUG_HUNT_FOR_ZERO=y 1146CONFIG_DEBUG_HUNT_FOR_ZERO=y
1044# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1147# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
1045# CONFIG_DUAL_CORE_TEST_MODULE is not set 1148# CONFIG_DUAL_CORE_TEST_MODULE is not set
1046# CONFIG_BOOTPARAM is not set
1047# CONFIG_NO_KERNEL_MSG is not set
1048CONFIG_CPLB_INFO=y 1149CONFIG_CPLB_INFO=y
1049# CONFIG_NO_ACCESS_CHECK is not set 1150CONFIG_ACCESS_CHECK=y
1050 1151
1051# 1152#
1052# Security options 1153# Security options
@@ -1054,7 +1155,7 @@ CONFIG_CPLB_INFO=y
1054# CONFIG_KEYS is not set 1155# CONFIG_KEYS is not set
1055CONFIG_SECURITY=y 1156CONFIG_SECURITY=y
1056# CONFIG_SECURITY_NETWORK is not set 1157# CONFIG_SECURITY_NETWORK is not set
1057CONFIG_SECURITY_CAPABILITIES=y 1158CONFIG_SECURITY_CAPABILITIES=m
1058 1159
1059# 1160#
1060# Cryptographic options 1161# Cryptographic options
@@ -1064,10 +1165,13 @@ CONFIG_SECURITY_CAPABILITIES=y
1064# 1165#
1065# Library routines 1166# Library routines
1066# 1167#
1067# CONFIG_CRC_CCITT is not set 1168CONFIG_BITREVERSE=y
1169CONFIG_CRC_CCITT=m
1068# CONFIG_CRC16 is not set 1170# CONFIG_CRC16 is not set
1069CONFIG_CRC32=y 1171CONFIG_CRC32=y
1070# CONFIG_LIBCRC32C is not set 1172# CONFIG_LIBCRC32C is not set
1071CONFIG_ZLIB_INFLATE=y 1173CONFIG_ZLIB_INFLATE=y
1072CONFIG_ZLIB_DEFLATE=m 1174CONFIG_ZLIB_DEFLATE=m
1073CONFIG_PLIST=y 1175CONFIG_PLIST=y
1176CONFIG_HAS_IOMEM=y
1177CONFIG_HAS_IOPORT=y
diff --git a/arch/blackfin/configs/PNAV-10_defconfig b/arch/blackfin/configs/PNAV-10_defconfig
index 97b4ffa2b4ac..983ed181c896 100644
--- a/arch/blackfin/configs/PNAV-10_defconfig
+++ b/arch/blackfin/configs/PNAV-10_defconfig
@@ -1,20 +1,21 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19.3 3# Linux kernel version: 2.6.21.5
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
9CONFIG_BLACKFIN=y 9CONFIG_BLACKFIN=y
10CONFIG_ZONE_DMA=y
10CONFIG_BFIN=y 11CONFIG_BFIN=y
11CONFIG_SEMAPHORE_SLEEPERS=y 12CONFIG_SEMAPHORE_SLEEPERS=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y 13CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_GENERIC_HWEIGHT=y 14CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 15CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17# CONFIG_GENERIC_TIME is not set
16CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_UCLINUX=y
18CONFIG_FORCE_MAX_ZONEORDER=14 19CONFIG_FORCE_MAX_ZONEORDER=14
19CONFIG_IRQCHIP_DEMUX_GPIO=y 20CONFIG_IRQCHIP_DEMUX_GPIO=y
20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -33,14 +34,16 @@ CONFIG_LOCALVERSION=""
33CONFIG_LOCALVERSION_AUTO=y 34CONFIG_LOCALVERSION_AUTO=y
34CONFIG_SYSVIPC=y 35CONFIG_SYSVIPC=y
35# CONFIG_IPC_NS is not set 36# CONFIG_IPC_NS is not set
37CONFIG_SYSVIPC_SYSCTL=y
36# CONFIG_POSIX_MQUEUE is not set 38# CONFIG_POSIX_MQUEUE is not set
37# CONFIG_BSD_PROCESS_ACCT is not set 39# CONFIG_BSD_PROCESS_ACCT is not set
38# CONFIG_TASKSTATS is not set 40# CONFIG_TASKSTATS is not set
39# CONFIG_UTS_NS is not set 41# CONFIG_UTS_NS is not set
40# CONFIG_AUDIT is not set 42# CONFIG_AUDIT is not set
41# CONFIG_IKCONFIG is not set 43# CONFIG_IKCONFIG is not set
44CONFIG_SYSFS_DEPRECATED=y
42# CONFIG_RELAY is not set 45# CONFIG_RELAY is not set
43CONFIG_INITRAMFS_SOURCE="" 46# CONFIG_BLK_DEV_INITRD is not set
44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 47# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
45CONFIG_SYSCTL=y 48CONFIG_SYSCTL=y
46CONFIG_EMBEDDED=y 49CONFIG_EMBEDDED=y
@@ -54,9 +57,7 @@ CONFIG_BUG=y
54CONFIG_ELF_CORE=y 57CONFIG_ELF_CORE=y
55CONFIG_BASE_FULL=y 58CONFIG_BASE_FULL=y
56CONFIG_FUTEX=y 59CONFIG_FUTEX=y
57CONFIG_EPOLL=y
58CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=9 60CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=9
59# CONFIG_LIMIT_PAGECACHE is not set
60CONFIG_BUDDY=y 61CONFIG_BUDDY=y
61# CONFIG_NP2 is not set 62# CONFIG_NP2 is not set
62CONFIG_SLAB=y 63CONFIG_SLAB=y
@@ -80,7 +81,9 @@ CONFIG_KMOD=y
80# Block layer 81# Block layer
81# 82#
82CONFIG_BLOCK=y 83CONFIG_BLOCK=y
84# CONFIG_LBD is not set
83# CONFIG_BLK_DEV_IO_TRACE is not set 85# CONFIG_BLK_DEV_IO_TRACE is not set
86# CONFIG_LSF is not set
84 87
85# 88#
86# IO Schedulers 89# IO Schedulers
@@ -109,22 +112,31 @@ CONFIG_PREEMPT_VOLUNTARY=y
109# CONFIG_BF532 is not set 112# CONFIG_BF532 is not set
110# CONFIG_BF533 is not set 113# CONFIG_BF533 is not set
111# CONFIG_BF534 is not set 114# CONFIG_BF534 is not set
112# CONFIG_BF535 is not set
113# CONFIG_BF536 is not set 115# CONFIG_BF536 is not set
114CONFIG_BF537=y 116CONFIG_BF537=y
117# CONFIG_BF542 is not set
118# CONFIG_BF544 is not set
119# CONFIG_BF548 is not set
120# CONFIG_BF549 is not set
115# CONFIG_BF561 is not set 121# CONFIG_BF561 is not set
122# CONFIG_BF_REV_0_0 is not set
116CONFIG_BF_REV_0_2=y 123CONFIG_BF_REV_0_2=y
117# CONFIG_BF_REV_0_3 is not set 124# CONFIG_BF_REV_0_3 is not set
118# CONFIG_BF_REV_0_4 is not set 125# CONFIG_BF_REV_0_4 is not set
119# CONFIG_BF_REV_0_5 is not set 126# CONFIG_BF_REV_0_5 is not set
127# CONFIG_BF_REV_ANY is not set
128# CONFIG_BF_REV_NONE is not set
129CONFIG_BF53x=y
120CONFIG_BFIN_SINGLE_CORE=y 130CONFIG_BFIN_SINGLE_CORE=y
121# CONFIG_BFIN533_EZKIT is not set 131# CONFIG_BFIN533_EZKIT is not set
122# CONFIG_BFIN533_STAMP is not set 132# CONFIG_BFIN533_STAMP is not set
123# CONFIG_BFIN537_STAMP is not set 133# CONFIG_BFIN537_STAMP is not set
124# CONFIG_BFIN533_BLUETECHNIX_CM is not set 134# CONFIG_BFIN533_BLUETECHNIX_CM is not set
125# CONFIG_BFIN537_BLUETECHNIX_CM is not set 135# CONFIG_BFIN537_BLUETECHNIX_CM is not set
136# CONFIG_BFIN548_EZKIT is not set
126# CONFIG_BFIN561_BLUETECHNIX_CM is not set 137# CONFIG_BFIN561_BLUETECHNIX_CM is not set
127# CONFIG_BFIN561_EZKIT is not set 138# CONFIG_BFIN561_EZKIT is not set
139# CONFIG_BFIN561_TEPLA is not set
128CONFIG_PNAV10=y 140CONFIG_PNAV10=y
129# CONFIG_GENERIC_BOARD is not set 141# CONFIG_GENERIC_BOARD is not set
130CONFIG_MEM_MT48LC32M8A2_75=y 142CONFIG_MEM_MT48LC32M8A2_75=y
@@ -183,6 +195,7 @@ CONFIG_IRQ_WATCH=13
183# 195#
184# Board customizations 196# Board customizations
185# 197#
198# CONFIG_CMDLINE_BOOL is not set
186 199
187# 200#
188# Board Setup 201# Board Setup
@@ -193,19 +206,6 @@ CONFIG_MEM_ADD_WIDTH=10
193CONFIG_BOOT_LOAD=0x1000 206CONFIG_BOOT_LOAD=0x1000
194 207
195# 208#
196# Console UART Setup
197#
198# CONFIG_BAUD_9600 is not set
199# CONFIG_BAUD_19200 is not set
200# CONFIG_BAUD_38400 is not set
201# CONFIG_BAUD_57600 is not set
202CONFIG_BAUD_115200=y
203CONFIG_BAUD_NO_PARITY=y
204# CONFIG_BAUD_PARITY is not set
205CONFIG_BAUD_1_STOPBIT=y
206# CONFIG_BAUD_2_STOPBIT is not set
207
208#
209# Blackfin Kernel Optimizations 209# Blackfin Kernel Optimizations
210# 210#
211 211
@@ -214,6 +214,7 @@ CONFIG_BAUD_1_STOPBIT=y
214# 214#
215# CONFIG_HZ_100 is not set 215# CONFIG_HZ_100 is not set
216CONFIG_HZ_250=y 216CONFIG_HZ_250=y
217# CONFIG_HZ_300 is not set
217# CONFIG_HZ_1000 is not set 218# CONFIG_HZ_1000 is not set
218CONFIG_HZ=250 219CONFIG_HZ=250
219 220
@@ -232,6 +233,7 @@ CONFIG_MEMSET_L1=y
232CONFIG_MEMCPY_L1=y 233CONFIG_MEMCPY_L1=y
233CONFIG_SYS_BFIN_SPINLOCK_L1=y 234CONFIG_SYS_BFIN_SPINLOCK_L1=y
234CONFIG_IP_CHECKSUM_L1=y 235CONFIG_IP_CHECKSUM_L1=y
236CONFIG_CACHELINE_ALIGNED_L1=y
235CONFIG_SYSCALL_TAB_L1=y 237CONFIG_SYSCALL_TAB_L1=y
236CONFIG_CPLB_SWITCH_TAB_L1=y 238CONFIG_CPLB_SWITCH_TAB_L1=y
237CONFIG_RAMKERNEL=y 239CONFIG_RAMKERNEL=y
@@ -245,6 +247,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
245# CONFIG_SPARSEMEM_STATIC is not set 247# CONFIG_SPARSEMEM_STATIC is not set
246CONFIG_SPLIT_PTLOCK_CPUS=4 248CONFIG_SPLIT_PTLOCK_CPUS=4
247# CONFIG_RESOURCES_64BIT is not set 249# CONFIG_RESOURCES_64BIT is not set
250CONFIG_ZONE_DMA_FLAG=1
248CONFIG_LARGE_ALLOCS=y 251CONFIG_LARGE_ALLOCS=y
249CONFIG_BFIN_DMA_5XX=y 252CONFIG_BFIN_DMA_5XX=y
250# CONFIG_DMA_UNCACHED_2M is not set 253# CONFIG_DMA_UNCACHED_2M is not set
@@ -338,6 +341,7 @@ CONFIG_UNIX=y
338CONFIG_XFRM=y 341CONFIG_XFRM=y
339# CONFIG_XFRM_USER is not set 342# CONFIG_XFRM_USER is not set
340# CONFIG_XFRM_SUB_POLICY is not set 343# CONFIG_XFRM_SUB_POLICY is not set
344# CONFIG_XFRM_MIGRATE is not set
341# CONFIG_NET_KEY is not set 345# CONFIG_NET_KEY is not set
342CONFIG_INET=y 346CONFIG_INET=y
343# CONFIG_IP_MULTICAST is not set 347# CONFIG_IP_MULTICAST is not set
@@ -364,6 +368,7 @@ CONFIG_INET_TCP_DIAG=y
364# CONFIG_TCP_CONG_ADVANCED is not set 368# CONFIG_TCP_CONG_ADVANCED is not set
365CONFIG_TCP_CONG_CUBIC=y 369CONFIG_TCP_CONG_CUBIC=y
366CONFIG_DEFAULT_TCP_CONG="cubic" 370CONFIG_DEFAULT_TCP_CONG="cubic"
371# CONFIG_TCP_MD5SIG is not set
367# CONFIG_IPV6 is not set 372# CONFIG_IPV6 is not set
368# CONFIG_INET6_XFRM_TUNNEL is not set 373# CONFIG_INET6_XFRM_TUNNEL is not set
369# CONFIG_INET6_TUNNEL is not set 374# CONFIG_INET6_TUNNEL is not set
@@ -442,6 +447,7 @@ CONFIG_MTD_PARTITIONS=y
442# User Modules And Translation Layers 447# User Modules And Translation Layers
443# 448#
444CONFIG_MTD_CHAR=m 449CONFIG_MTD_CHAR=m
450CONFIG_MTD_BLKDEVS=y
445CONFIG_MTD_BLOCK=y 451CONFIG_MTD_BLOCK=y
446# CONFIG_FTL is not set 452# CONFIG_FTL is not set
447# CONFIG_NFTL is not set 453# CONFIG_NFTL is not set
@@ -522,6 +528,7 @@ CONFIG_MTD_NAND_IDS=y
522# 528#
523# Plug and Play support 529# Plug and Play support
524# 530#
531# CONFIG_PNPACPI is not set
525 532
526# 533#
527# Block devices 534# Block devices
@@ -533,14 +540,12 @@ CONFIG_BLK_DEV_RAM=y
533CONFIG_BLK_DEV_RAM_COUNT=16 540CONFIG_BLK_DEV_RAM_COUNT=16
534CONFIG_BLK_DEV_RAM_SIZE=4096 541CONFIG_BLK_DEV_RAM_SIZE=4096
535CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 542CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
536# CONFIG_BLK_DEV_INITRD is not set
537# CONFIG_CDROM_PKTCDVD is not set 543# CONFIG_CDROM_PKTCDVD is not set
538# CONFIG_ATA_OVER_ETH is not set 544# CONFIG_ATA_OVER_ETH is not set
539 545
540# 546#
541# Misc devices 547# Misc devices
542# 548#
543# CONFIG_TIFM_CORE is not set
544 549
545# 550#
546# ATA/ATAPI/MFM/RLL support 551# ATA/ATAPI/MFM/RLL support
@@ -602,6 +607,7 @@ CONFIG_BFIN_MAC=y
602CONFIG_BFIN_TX_DESC_NUM=100 607CONFIG_BFIN_TX_DESC_NUM=100
603CONFIG_BFIN_RX_DESC_NUM=100 608CONFIG_BFIN_RX_DESC_NUM=100
604CONFIG_BFIN_MAC_RMII=y 609CONFIG_BFIN_MAC_RMII=y
610# CONFIG_SMSC911X is not set
605 611
606# 612#
607# Ethernet (1000 Mbit) 613# Ethernet (1000 Mbit)
@@ -674,6 +680,7 @@ CONFIG_TOUCHSCREEN_AD7877=y
674# CONFIG_TOUCHSCREEN_PENMOUNT is not set 680# CONFIG_TOUCHSCREEN_PENMOUNT is not set
675# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set 681# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
676# CONFIG_TOUCHSCREEN_TOUCHWIN is not set 682# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
683# CONFIG_TOUCHSCREEN_UCB1400 is not set
677CONFIG_INPUT_MISC=y 684CONFIG_INPUT_MISC=y
678CONFIG_INPUT_UINPUT=y 685CONFIG_INPUT_UINPUT=y
679# CONFIG_BF53X_PFBUTTONS is not set 686# CONFIG_BF53X_PFBUTTONS is not set
@@ -690,7 +697,7 @@ CONFIG_INPUT_UINPUT=y
690# 697#
691# CONFIG_AD9960 is not set 698# CONFIG_AD9960 is not set
692# CONFIG_SPI_ADC_BF533 is not set 699# CONFIG_SPI_ADC_BF533 is not set
693# CONFIG_BF533_PFLAGS is not set 700# CONFIG_BF5xx_PFLAGS is not set
694# CONFIG_BF5xx_PPIFCD is not set 701# CONFIG_BF5xx_PPIFCD is not set
695# CONFIG_BF5xx_TIMERS is not set 702# CONFIG_BF5xx_TIMERS is not set
696# CONFIG_BF5xx_PPI is not set 703# CONFIG_BF5xx_PPI is not set
@@ -699,6 +706,8 @@ CONFIG_BFIN_SPORT=y
699CONFIG_TWI_LCD=m 706CONFIG_TWI_LCD=m
700CONFIG_TWI_LCD_SLAVE_ADDR=34 707CONFIG_TWI_LCD_SLAVE_ADDR=34
701# CONFIG_AD5304 is not set 708# CONFIG_AD5304 is not set
709# CONFIG_BF5xx_TEA5764 is not set
710# CONFIG_BF5xx_FBDMA is not set
702# CONFIG_VT is not set 711# CONFIG_VT is not set
703# CONFIG_SERIAL_NONSTANDARD is not set 712# CONFIG_SERIAL_NONSTANDARD is not set
704 713
@@ -747,13 +756,8 @@ CONFIG_CAN_BLACKFIN=m
747# CONFIG_WATCHDOG is not set 756# CONFIG_WATCHDOG is not set
748CONFIG_HW_RANDOM=y 757CONFIG_HW_RANDOM=y
749# CONFIG_GEN_RTC is not set 758# CONFIG_GEN_RTC is not set
750CONFIG_BLACKFIN_DPMC=y
751# CONFIG_DTLK is not set 759# CONFIG_DTLK is not set
752# CONFIG_R3964 is not set 760# CONFIG_R3964 is not set
753
754#
755# Ftape, the floppy tape device driver
756#
757# CONFIG_RAW_DRIVER is not set 761# CONFIG_RAW_DRIVER is not set
758 762
759# 763#
@@ -777,9 +781,9 @@ CONFIG_I2C_CHARDEV=y
777# 781#
778# I2C Hardware Bus support 782# I2C Hardware Bus support
779# 783#
780# CONFIG_I2C_BFIN_GPIO is not set 784# CONFIG_I2C_BLACKFIN_GPIO is not set
781CONFIG_I2C_BFIN_TWI=y 785CONFIG_I2C_BLACKFIN_TWI=y
782CONFIG_TWICLK_KHZ=50 786CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=50
783# CONFIG_I2C_OCORES is not set 787# CONFIG_I2C_OCORES is not set
784# CONFIG_I2C_PARPORT_LIGHT is not set 788# CONFIG_I2C_PARPORT_LIGHT is not set
785# CONFIG_I2C_STUB is not set 789# CONFIG_I2C_STUB is not set
@@ -812,12 +816,13 @@ CONFIG_SPI_MASTER=y
812# 816#
813# SPI Master Controller Drivers 817# SPI Master Controller Drivers
814# 818#
815# CONFIG_SPI_BITBANG is not set
816CONFIG_SPI_BFIN=y 819CONFIG_SPI_BFIN=y
820# CONFIG_SPI_BITBANG is not set
817 821
818# 822#
819# SPI Protocol Masters 823# SPI Protocol Masters
820# 824#
825# CONFIG_SPI_AT25 is not set
821 826
822# 827#
823# Dallas's 1-wire bus 828# Dallas's 1-wire bus
@@ -833,6 +838,7 @@ CONFIG_HWMON=y
833# CONFIG_SENSORS_ADM1021 is not set 838# CONFIG_SENSORS_ADM1021 is not set
834# CONFIG_SENSORS_ADM1025 is not set 839# CONFIG_SENSORS_ADM1025 is not set
835# CONFIG_SENSORS_ADM1026 is not set 840# CONFIG_SENSORS_ADM1026 is not set
841# CONFIG_SENSORS_ADM1029 is not set
836# CONFIG_SENSORS_ADM1031 is not set 842# CONFIG_SENSORS_ADM1031 is not set
837# CONFIG_SENSORS_ADM9240 is not set 843# CONFIG_SENSORS_ADM9240 is not set
838# CONFIG_SENSORS_ASB100 is not set 844# CONFIG_SENSORS_ASB100 is not set
@@ -857,6 +863,7 @@ CONFIG_HWMON=y
857# CONFIG_SENSORS_LM92 is not set 863# CONFIG_SENSORS_LM92 is not set
858# CONFIG_SENSORS_MAX1619 is not set 864# CONFIG_SENSORS_MAX1619 is not set
859# CONFIG_SENSORS_PC87360 is not set 865# CONFIG_SENSORS_PC87360 is not set
866# CONFIG_SENSORS_PC87427 is not set
860# CONFIG_SENSORS_SMSC47M1 is not set 867# CONFIG_SENSORS_SMSC47M1 is not set
861# CONFIG_SENSORS_SMSC47M192 is not set 868# CONFIG_SENSORS_SMSC47M192 is not set
862# CONFIG_SENSORS_SMSC47B397 is not set 869# CONFIG_SENSORS_SMSC47B397 is not set
@@ -864,12 +871,18 @@ CONFIG_HWMON=y
864# CONFIG_SENSORS_W83781D is not set 871# CONFIG_SENSORS_W83781D is not set
865# CONFIG_SENSORS_W83791D is not set 872# CONFIG_SENSORS_W83791D is not set
866# CONFIG_SENSORS_W83792D is not set 873# CONFIG_SENSORS_W83792D is not set
874# CONFIG_SENSORS_W83793 is not set
867# CONFIG_SENSORS_W83L785TS is not set 875# CONFIG_SENSORS_W83L785TS is not set
868# CONFIG_SENSORS_W83627HF is not set 876# CONFIG_SENSORS_W83627HF is not set
869# CONFIG_SENSORS_W83627EHF is not set 877# CONFIG_SENSORS_W83627EHF is not set
870# CONFIG_HWMON_DEBUG_CHIP is not set 878# CONFIG_HWMON_DEBUG_CHIP is not set
871 879
872# 880#
881# Multifunction device drivers
882#
883# CONFIG_MFD_SM501 is not set
884
885#
873# Multimedia devices 886# Multimedia devices
874# 887#
875# CONFIG_VIDEO_DEV is not set 888# CONFIG_VIDEO_DEV is not set
@@ -882,15 +895,24 @@ CONFIG_HWMON=y
882# 895#
883# Graphics support 896# Graphics support
884# 897#
885CONFIG_FIRMWARE_EDID=y 898CONFIG_BACKLIGHT_LCD_SUPPORT=y
899CONFIG_BACKLIGHT_CLASS_DEVICE=y
900CONFIG_LCD_CLASS_DEVICE=y
886CONFIG_FB=y 901CONFIG_FB=y
902CONFIG_FIRMWARE_EDID=y
903# CONFIG_FB_DDC is not set
887CONFIG_FB_CFB_FILLRECT=y 904CONFIG_FB_CFB_FILLRECT=y
888CONFIG_FB_CFB_COPYAREA=y 905CONFIG_FB_CFB_COPYAREA=y
889CONFIG_FB_CFB_IMAGEBLIT=y 906CONFIG_FB_CFB_IMAGEBLIT=y
907# CONFIG_FB_SVGALIB is not set
890# CONFIG_FB_MACMODES is not set 908# CONFIG_FB_MACMODES is not set
891# CONFIG_FB_BACKLIGHT is not set 909# CONFIG_FB_BACKLIGHT is not set
892# CONFIG_FB_MODE_HELPERS is not set 910# CONFIG_FB_MODE_HELPERS is not set
893# CONFIG_FB_TILEBLITTING is not set 911# CONFIG_FB_TILEBLITTING is not set
912
913#
914# Frame buffer hardware drivers
915#
894# CONFIG_FB_BFIN_7171 is not set 916# CONFIG_FB_BFIN_7171 is not set
895# CONFIG_FB_BFIN_7393 is not set 917# CONFIG_FB_BFIN_7393 is not set
896CONFIG_FB_BF537_LQ035=y 918CONFIG_FB_BF537_LQ035=y
@@ -904,11 +926,6 @@ CONFIG_FB_BFIN_LANDSCAPE=y
904# Logo configuration 926# Logo configuration
905# 927#
906# CONFIG_LOGO is not set 928# CONFIG_LOGO is not set
907CONFIG_BACKLIGHT_LCD_SUPPORT=y
908CONFIG_BACKLIGHT_CLASS_DEVICE=y
909CONFIG_BACKLIGHT_DEVICE=y
910CONFIG_LCD_CLASS_DEVICE=y
911CONFIG_LCD_DEVICE=y
912 929
913# 930#
914# Sound 931# Sound
@@ -946,14 +963,24 @@ CONFIG_SND_BLACKFIN_AD1981B=m
946# CONFIG_SND_BFIN_AD73311 is not set 963# CONFIG_SND_BFIN_AD73311 is not set
947 964
948# 965#
966# SoC audio support
967#
968# CONFIG_SND_SOC is not set
969
970#
949# Open Sound System 971# Open Sound System
950# 972#
951CONFIG_SOUND_PRIME=y 973CONFIG_SOUND_PRIME=y
952CONFIG_OSS_OBSOLETE_DRIVER=y 974# CONFIG_OBSOLETE_OSS is not set
953# CONFIG_SOUND_MSNDCLAS is not set 975# CONFIG_SOUND_MSNDCLAS is not set
954# CONFIG_SOUND_MSNDPIN is not set 976# CONFIG_SOUND_MSNDPIN is not set
955 977
956# 978#
979# HID Devices
980#
981# CONFIG_HID is not set
982
983#
957# USB support 984# USB support
958# 985#
959CONFIG_USB_ARCH_HAS_HCD=y 986CONFIG_USB_ARCH_HAS_HCD=y
@@ -1024,7 +1051,6 @@ CONFIG_RTC_INTF_DEV=y
1024# CONFIG_RTC_DRV_DS1672 is not set 1051# CONFIG_RTC_DRV_DS1672 is not set
1025# CONFIG_RTC_DRV_DS1742 is not set 1052# CONFIG_RTC_DRV_DS1742 is not set
1026# CONFIG_RTC_DRV_PCF8563 is not set 1053# CONFIG_RTC_DRV_PCF8563 is not set
1027# CONFIG_RTC_DRV_PCF8583 is not set
1028# CONFIG_RTC_DRV_RS5C348 is not set 1054# CONFIG_RTC_DRV_RS5C348 is not set
1029# CONFIG_RTC_DRV_RS5C372 is not set 1055# CONFIG_RTC_DRV_RS5C372 is not set
1030# CONFIG_RTC_DRV_M48T86 is not set 1056# CONFIG_RTC_DRV_M48T86 is not set
@@ -1047,6 +1073,14 @@ CONFIG_RTC_DRV_BFIN=y
1047# 1073#
1048 1074
1049# 1075#
1076# Auxiliary Display support
1077#
1078
1079#
1080# Virtualization
1081#
1082
1083#
1050# PBX support 1084# PBX support
1051# 1085#
1052# CONFIG_PBX is not set 1086# CONFIG_PBX is not set
@@ -1121,7 +1155,6 @@ CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10
1121# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set 1155# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
1122# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set 1156# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
1123CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y 1157CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
1124# CONFIG_JFFS_FS is not set
1125# CONFIG_JFFS2_FS is not set 1158# CONFIG_JFFS2_FS is not set
1126# CONFIG_CRAMFS is not set 1159# CONFIG_CRAMFS is not set
1127# CONFIG_VXFS_FS is not set 1160# CONFIG_VXFS_FS is not set
@@ -1204,6 +1237,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1204# CONFIG_NLS_UTF8 is not set 1237# CONFIG_NLS_UTF8 is not set
1205 1238
1206# 1239#
1240# Distributed Lock Manager
1241#
1242# CONFIG_DLM is not set
1243
1244#
1207# Profiling support 1245# Profiling support
1208# 1246#
1209# CONFIG_PROFILING is not set 1247# CONFIG_PROFILING is not set
@@ -1215,19 +1253,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1215CONFIG_ENABLE_MUST_CHECK=y 1253CONFIG_ENABLE_MUST_CHECK=y
1216# CONFIG_MAGIC_SYSRQ is not set 1254# CONFIG_MAGIC_SYSRQ is not set
1217# CONFIG_UNUSED_SYMBOLS is not set 1255# CONFIG_UNUSED_SYMBOLS is not set
1256# CONFIG_DEBUG_FS is not set
1257# CONFIG_HEADERS_CHECK is not set
1218# CONFIG_DEBUG_KERNEL is not set 1258# CONFIG_DEBUG_KERNEL is not set
1219CONFIG_LOG_BUF_SHIFT=14 1259CONFIG_LOG_BUF_SHIFT=14
1220# CONFIG_DEBUG_BUGVERBOSE is not set 1260# CONFIG_DEBUG_BUGVERBOSE is not set
1221# CONFIG_DEBUG_FS is not set
1222# CONFIG_UNWIND_INFO is not set
1223# CONFIG_HEADERS_CHECK is not set
1224# CONFIG_DEBUG_SERIAL_EARLY_INIT is not set 1261# CONFIG_DEBUG_SERIAL_EARLY_INIT is not set
1225# CONFIG_DEBUG_HUNT_FOR_ZERO is not set 1262# CONFIG_DEBUG_HUNT_FOR_ZERO is not set
1226# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1263# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
1227# CONFIG_BOOTPARAM is not set
1228# CONFIG_NO_KERNEL_MSG is not set
1229# CONFIG_CPLB_INFO is not set 1264# CONFIG_CPLB_INFO is not set
1230# CONFIG_NO_ACCESS_CHECK is not set 1265# CONFIG_ACCESS_CHECK is not set
1231 1266
1232# 1267#
1233# Security options 1268# Security options
@@ -1245,9 +1280,12 @@ CONFIG_SECURITY_CAPABILITIES=y
1245# 1280#
1246# Library routines 1281# Library routines
1247# 1282#
1283CONFIG_BITREVERSE=y
1248CONFIG_CRC_CCITT=m 1284CONFIG_CRC_CCITT=m
1249# CONFIG_CRC16 is not set 1285# CONFIG_CRC16 is not set
1250CONFIG_CRC32=y 1286CONFIG_CRC32=y
1251# CONFIG_LIBCRC32C is not set 1287# CONFIG_LIBCRC32C is not set
1252CONFIG_ZLIB_INFLATE=y 1288CONFIG_ZLIB_INFLATE=y
1253CONFIG_PLIST=y 1289CONFIG_PLIST=y
1290CONFIG_HAS_IOMEM=y
1291CONFIG_HAS_IOPORT=y
diff --git a/arch/blackfin/kernel/Makefile b/arch/blackfin/kernel/Makefile
index f3b7d2f9d49c..f429ebc3a961 100644
--- a/arch/blackfin/kernel/Makefile
+++ b/arch/blackfin/kernel/Makefile
@@ -6,9 +6,12 @@ extra-y := init_task.o vmlinux.lds
6 6
7obj-y := \ 7obj-y := \
8 entry.o process.o bfin_ksyms.o ptrace.o setup.o signal.o \ 8 entry.o process.o bfin_ksyms.o ptrace.o setup.o signal.o \
9 sys_bfin.o time.o traps.o irqchip.o dma-mapping.o bfin_gpio.o \ 9 sys_bfin.o time.o traps.o irqchip.o dma-mapping.o flat.o \
10 flat.o 10 fixed_code.o cplbinit.o cacheinit.o
11 11
12obj-$(CONFIG_BF53x) += bfin_gpio.o
13obj-$(CONFIG_BF561) += bfin_gpio.o
12obj-$(CONFIG_MODULES) += module.o 14obj-$(CONFIG_MODULES) += module.o
13obj-$(CONFIG_BFIN_DMA_5XX) += bfin_dma_5xx.o 15obj-$(CONFIG_BFIN_DMA_5XX) += bfin_dma_5xx.o
14obj-$(CONFIG_DUAL_CORE_TEST_MODULE) += dualcore_test.o 16obj-$(CONFIG_DUAL_CORE_TEST_MODULE) += dualcore_test.o
17obj-$(CONFIG_KGDB) += kgdb.o
diff --git a/arch/blackfin/kernel/asm-offsets.c b/arch/blackfin/kernel/asm-offsets.c
index e455f4504509..b56b2741cdea 100644
--- a/arch/blackfin/kernel/asm-offsets.c
+++ b/arch/blackfin/kernel/asm-offsets.c
@@ -32,11 +32,10 @@
32#include <linux/kernel_stat.h> 32#include <linux/kernel_stat.h>
33#include <linux/ptrace.h> 33#include <linux/ptrace.h>
34#include <linux/hardirq.h> 34#include <linux/hardirq.h>
35#include <asm/irq.h> 35#include <linux/irq.h>
36#include <asm/thread_info.h> 36#include <linux/thread_info.h>
37 37
38#define DEFINE(sym, val) \ 38#define DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val))
39 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
40 39
41int main(void) 40int main(void)
42{ 41{
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c
index 0ccb0dc3f833..7cf02f02a1db 100644
--- a/arch/blackfin/kernel/bfin_dma_5xx.c
+++ b/arch/blackfin/kernel/bfin_dma_5xx.c
@@ -34,6 +34,7 @@
34#include <linux/kernel.h> 34#include <linux/kernel.h>
35#include <linux/param.h> 35#include <linux/param.h>
36 36
37#include <asm/blackfin.h>
37#include <asm/dma.h> 38#include <asm/dma.h>
38#include <asm/cacheflush.h> 39#include <asm/cacheflush.h>
39 40
@@ -45,67 +46,6 @@
45***************************************************************************/ 46***************************************************************************/
46 47
47static struct dma_channel dma_ch[MAX_BLACKFIN_DMA_CHANNEL]; 48static struct dma_channel dma_ch[MAX_BLACKFIN_DMA_CHANNEL];
48#if defined (CONFIG_BF561)
49static struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
50 (struct dma_register *) DMA1_0_NEXT_DESC_PTR,
51 (struct dma_register *) DMA1_1_NEXT_DESC_PTR,
52 (struct dma_register *) DMA1_2_NEXT_DESC_PTR,
53 (struct dma_register *) DMA1_3_NEXT_DESC_PTR,
54 (struct dma_register *) DMA1_4_NEXT_DESC_PTR,
55 (struct dma_register *) DMA1_5_NEXT_DESC_PTR,
56 (struct dma_register *) DMA1_6_NEXT_DESC_PTR,
57 (struct dma_register *) DMA1_7_NEXT_DESC_PTR,
58 (struct dma_register *) DMA1_8_NEXT_DESC_PTR,
59 (struct dma_register *) DMA1_9_NEXT_DESC_PTR,
60 (struct dma_register *) DMA1_10_NEXT_DESC_PTR,
61 (struct dma_register *) DMA1_11_NEXT_DESC_PTR,
62 (struct dma_register *) DMA2_0_NEXT_DESC_PTR,
63 (struct dma_register *) DMA2_1_NEXT_DESC_PTR,
64 (struct dma_register *) DMA2_2_NEXT_DESC_PTR,
65 (struct dma_register *) DMA2_3_NEXT_DESC_PTR,
66 (struct dma_register *) DMA2_4_NEXT_DESC_PTR,
67 (struct dma_register *) DMA2_5_NEXT_DESC_PTR,
68 (struct dma_register *) DMA2_6_NEXT_DESC_PTR,
69 (struct dma_register *) DMA2_7_NEXT_DESC_PTR,
70 (struct dma_register *) DMA2_8_NEXT_DESC_PTR,
71 (struct dma_register *) DMA2_9_NEXT_DESC_PTR,
72 (struct dma_register *) DMA2_10_NEXT_DESC_PTR,
73 (struct dma_register *) DMA2_11_NEXT_DESC_PTR,
74 (struct dma_register *) MDMA1_D0_NEXT_DESC_PTR,
75 (struct dma_register *) MDMA1_S0_NEXT_DESC_PTR,
76 (struct dma_register *) MDMA1_D1_NEXT_DESC_PTR,
77 (struct dma_register *) MDMA1_S1_NEXT_DESC_PTR,
78 (struct dma_register *) MDMA2_D0_NEXT_DESC_PTR,
79 (struct dma_register *) MDMA2_S0_NEXT_DESC_PTR,
80 (struct dma_register *) MDMA2_D1_NEXT_DESC_PTR,
81 (struct dma_register *) MDMA2_S1_NEXT_DESC_PTR,
82 (struct dma_register *) IMDMA_D0_NEXT_DESC_PTR,
83 (struct dma_register *) IMDMA_S0_NEXT_DESC_PTR,
84 (struct dma_register *) IMDMA_D1_NEXT_DESC_PTR,
85 (struct dma_register *) IMDMA_S1_NEXT_DESC_PTR,
86};
87#else
88static struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
89 (struct dma_register *) DMA0_NEXT_DESC_PTR,
90 (struct dma_register *) DMA1_NEXT_DESC_PTR,
91 (struct dma_register *) DMA2_NEXT_DESC_PTR,
92 (struct dma_register *) DMA3_NEXT_DESC_PTR,
93 (struct dma_register *) DMA4_NEXT_DESC_PTR,
94 (struct dma_register *) DMA5_NEXT_DESC_PTR,
95 (struct dma_register *) DMA6_NEXT_DESC_PTR,
96 (struct dma_register *) DMA7_NEXT_DESC_PTR,
97#if (defined(CONFIG_BF537) || defined(CONFIG_BF534) || defined(CONFIG_BF536))
98 (struct dma_register *) DMA8_NEXT_DESC_PTR,
99 (struct dma_register *) DMA9_NEXT_DESC_PTR,
100 (struct dma_register *) DMA10_NEXT_DESC_PTR,
101 (struct dma_register *) DMA11_NEXT_DESC_PTR,
102#endif
103 (struct dma_register *) MDMA_D0_NEXT_DESC_PTR,
104 (struct dma_register *) MDMA_S0_NEXT_DESC_PTR,
105 (struct dma_register *) MDMA_D1_NEXT_DESC_PTR,
106 (struct dma_register *) MDMA_S1_NEXT_DESC_PTR,
107};
108#endif
109 49
110/*------------------------------------------------------------------------------ 50/*------------------------------------------------------------------------------
111 * Set the Buffer Clear bit in the Configuration register of specific DMA 51 * Set the Buffer Clear bit in the Configuration register of specific DMA
@@ -138,149 +78,6 @@ static int __init blackfin_dma_init(void)
138 78
139arch_initcall(blackfin_dma_init); 79arch_initcall(blackfin_dma_init);
140 80
141/*
142 * Form the channel find the irq number for that channel.
143 */
144#if !defined(CONFIG_BF561)
145
146static int bf533_channel2irq(unsigned int channel)
147{
148 int ret_irq = -1;
149
150 switch (channel) {
151 case CH_PPI:
152 ret_irq = IRQ_PPI;
153 break;
154
155#if (defined(CONFIG_BF537) || defined(CONFIG_BF534) || defined(CONFIG_BF536))
156 case CH_EMAC_RX:
157 ret_irq = IRQ_MAC_RX;
158 break;
159
160 case CH_EMAC_TX:
161 ret_irq = IRQ_MAC_TX;
162 break;
163
164 case CH_UART1_RX:
165 ret_irq = IRQ_UART1_RX;
166 break;
167
168 case CH_UART1_TX:
169 ret_irq = IRQ_UART1_TX;
170 break;
171#endif
172
173 case CH_SPORT0_RX:
174 ret_irq = IRQ_SPORT0_RX;
175 break;
176
177 case CH_SPORT0_TX:
178 ret_irq = IRQ_SPORT0_TX;
179 break;
180
181 case CH_SPORT1_RX:
182 ret_irq = IRQ_SPORT1_RX;
183 break;
184
185 case CH_SPORT1_TX:
186 ret_irq = IRQ_SPORT1_TX;
187 break;
188
189 case CH_SPI:
190 ret_irq = IRQ_SPI;
191 break;
192
193 case CH_UART_RX:
194 ret_irq = IRQ_UART_RX;
195 break;
196
197 case CH_UART_TX:
198 ret_irq = IRQ_UART_TX;
199 break;
200
201 case CH_MEM_STREAM0_SRC:
202 case CH_MEM_STREAM0_DEST:
203 ret_irq = IRQ_MEM_DMA0;
204 break;
205
206 case CH_MEM_STREAM1_SRC:
207 case CH_MEM_STREAM1_DEST:
208 ret_irq = IRQ_MEM_DMA1;
209 break;
210 }
211 return ret_irq;
212}
213
214# define channel2irq(channel) bf533_channel2irq(channel)
215
216#else
217
218static int bf561_channel2irq(unsigned int channel)
219{
220 int ret_irq = -1;
221
222 switch (channel) {
223 case CH_PPI0:
224 ret_irq = IRQ_PPI0;
225 break;
226 case CH_PPI1:
227 ret_irq = IRQ_PPI1;
228 break;
229 case CH_SPORT0_RX:
230 ret_irq = IRQ_SPORT0_RX;
231 break;
232 case CH_SPORT0_TX:
233 ret_irq = IRQ_SPORT0_TX;
234 break;
235 case CH_SPORT1_RX:
236 ret_irq = IRQ_SPORT1_RX;
237 break;
238 case CH_SPORT1_TX:
239 ret_irq = IRQ_SPORT1_TX;
240 break;
241 case CH_SPI:
242 ret_irq = IRQ_SPI;
243 break;
244 case CH_UART_RX:
245 ret_irq = IRQ_UART_RX;
246 break;
247 case CH_UART_TX:
248 ret_irq = IRQ_UART_TX;
249 break;
250
251 case CH_MEM_STREAM0_SRC:
252 case CH_MEM_STREAM0_DEST:
253 ret_irq = IRQ_MEM_DMA0;
254 break;
255 case CH_MEM_STREAM1_SRC:
256 case CH_MEM_STREAM1_DEST:
257 ret_irq = IRQ_MEM_DMA1;
258 break;
259 case CH_MEM_STREAM2_SRC:
260 case CH_MEM_STREAM2_DEST:
261 ret_irq = IRQ_MEM_DMA2;
262 break;
263 case CH_MEM_STREAM3_SRC:
264 case CH_MEM_STREAM3_DEST:
265 ret_irq = IRQ_MEM_DMA3;
266 break;
267
268 case CH_IMEM_STREAM0_SRC:
269 case CH_IMEM_STREAM0_DEST:
270 ret_irq = IRQ_IMEM_DMA0;
271 break;
272 case CH_IMEM_STREAM1_SRC:
273 case CH_IMEM_STREAM1_DEST:
274 ret_irq = IRQ_IMEM_DMA1;
275 break;
276 }
277 return ret_irq;
278}
279
280# define channel2irq(channel) bf561_channel2irq(channel)
281
282#endif
283
284/*------------------------------------------------------------------------------ 81/*------------------------------------------------------------------------------
285 * Request the specific DMA channel from the system. 82 * Request the specific DMA channel from the system.
286 *-----------------------------------------------------------------------------*/ 83 *-----------------------------------------------------------------------------*/
@@ -535,7 +332,7 @@ set_bfin_dma_config(char direction, char flow_mode,
535} 332}
536EXPORT_SYMBOL(set_bfin_dma_config); 333EXPORT_SYMBOL(set_bfin_dma_config);
537 334
538void set_dma_sg(unsigned int channel, struct dmasg * sg, int nr_sg) 335void set_dma_sg(unsigned int channel, struct dmasg *sg, int nr_sg)
539{ 336{
540 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE 337 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE
541 && channel < MAX_BLACKFIN_DMA_CHANNEL)); 338 && channel < MAX_BLACKFIN_DMA_CHANNEL));
@@ -595,7 +392,7 @@ unsigned short get_dma_curr_ycount(unsigned int channel)
595} 392}
596EXPORT_SYMBOL(get_dma_curr_ycount); 393EXPORT_SYMBOL(get_dma_curr_ycount);
597 394
598void *_dma_memcpy(void *dest, const void *src, size_t size) 395static void *__dma_memcpy(void *dest, const void *src, size_t size)
599{ 396{
600 int direction; /* 1 - address decrease, 0 - address increase */ 397 int direction; /* 1 - address decrease, 0 - address increase */
601 int flag_align; /* 1 - address aligned, 0 - address unaligned */ 398 int flag_align; /* 1 - address aligned, 0 - address unaligned */
@@ -604,7 +401,7 @@ void *_dma_memcpy(void *dest, const void *src, size_t size)
604 401
605 if (size <= 0) 402 if (size <= 0)
606 return NULL; 403 return NULL;
607 404
608 local_irq_save(flags); 405 local_irq_save(flags);
609 406
610 if ((unsigned long)src < memory_end) 407 if ((unsigned long)src < memory_end)
@@ -744,11 +541,10 @@ void *dma_memcpy(void *dest, const void *src, size_t size)
744 bulk = (size >> 16) << 16; 541 bulk = (size >> 16) << 16;
745 rest = size - bulk; 542 rest = size - bulk;
746 if (bulk) 543 if (bulk)
747 _dma_memcpy(dest, src, bulk); 544 __dma_memcpy(dest, src, bulk);
748 addr = _dma_memcpy(dest+bulk, src+bulk, rest); 545 addr = __dma_memcpy(dest+bulk, src+bulk, rest);
749 return addr; 546 return addr;
750} 547}
751
752EXPORT_SYMBOL(dma_memcpy); 548EXPORT_SYMBOL(dma_memcpy);
753 549
754void *safe_dma_memcpy(void *dest, const void *src, size_t size) 550void *safe_dma_memcpy(void *dest, const void *src, size_t size)
@@ -761,14 +557,13 @@ EXPORT_SYMBOL(safe_dma_memcpy);
761 557
762void dma_outsb(void __iomem *addr, const void *buf, unsigned short len) 558void dma_outsb(void __iomem *addr, const void *buf, unsigned short len)
763{ 559{
764
765 unsigned long flags; 560 unsigned long flags;
766 561
767 local_irq_save(flags); 562 local_irq_save(flags);
768
769 blackfin_dcache_flush_range((unsigned int)buf,(unsigned int)(buf) + len);
770 563
771 bfin_write_MDMA_D0_START_ADDR(addr); 564 blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len);
565
566 bfin_write_MDMA_D0_START_ADDR(addr);
772 bfin_write_MDMA_D0_X_COUNT(len); 567 bfin_write_MDMA_D0_X_COUNT(len);
773 bfin_write_MDMA_D0_X_MODIFY(0); 568 bfin_write_MDMA_D0_X_MODIFY(0);
774 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 569 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -796,9 +591,9 @@ EXPORT_SYMBOL(dma_outsb);
796void dma_insb(const void __iomem *addr, void *buf, unsigned short len) 591void dma_insb(const void __iomem *addr, void *buf, unsigned short len)
797{ 592{
798 unsigned long flags; 593 unsigned long flags;
799 594
800 local_irq_save(flags); 595 local_irq_save(flags);
801 bfin_write_MDMA_D0_START_ADDR(buf); 596 bfin_write_MDMA_D0_START_ADDR(buf);
802 bfin_write_MDMA_D0_X_COUNT(len); 597 bfin_write_MDMA_D0_X_COUNT(len);
803 bfin_write_MDMA_D0_X_MODIFY(1); 598 bfin_write_MDMA_D0_X_MODIFY(1);
804 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 599 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -827,12 +622,12 @@ EXPORT_SYMBOL(dma_insb);
827void dma_outsw(void __iomem *addr, const void *buf, unsigned short len) 622void dma_outsw(void __iomem *addr, const void *buf, unsigned short len)
828{ 623{
829 unsigned long flags; 624 unsigned long flags;
830 625
831 local_irq_save(flags); 626 local_irq_save(flags);
832
833 blackfin_dcache_flush_range((unsigned int)buf,(unsigned int)(buf) + len);
834 627
835 bfin_write_MDMA_D0_START_ADDR(addr); 628 blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len);
629
630 bfin_write_MDMA_D0_START_ADDR(addr);
836 bfin_write_MDMA_D0_X_COUNT(len); 631 bfin_write_MDMA_D0_X_COUNT(len);
837 bfin_write_MDMA_D0_X_MODIFY(0); 632 bfin_write_MDMA_D0_X_MODIFY(0);
838 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 633 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -859,10 +654,10 @@ EXPORT_SYMBOL(dma_outsw);
859void dma_insw(const void __iomem *addr, void *buf, unsigned short len) 654void dma_insw(const void __iomem *addr, void *buf, unsigned short len)
860{ 655{
861 unsigned long flags; 656 unsigned long flags;
862 657
863 local_irq_save(flags); 658 local_irq_save(flags);
864 659
865 bfin_write_MDMA_D0_START_ADDR(buf); 660 bfin_write_MDMA_D0_START_ADDR(buf);
866 bfin_write_MDMA_D0_X_COUNT(len); 661 bfin_write_MDMA_D0_X_COUNT(len);
867 bfin_write_MDMA_D0_X_MODIFY(2); 662 bfin_write_MDMA_D0_X_MODIFY(2);
868 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 663 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -891,12 +686,12 @@ EXPORT_SYMBOL(dma_insw);
891void dma_outsl(void __iomem *addr, const void *buf, unsigned short len) 686void dma_outsl(void __iomem *addr, const void *buf, unsigned short len)
892{ 687{
893 unsigned long flags; 688 unsigned long flags;
894 689
895 local_irq_save(flags); 690 local_irq_save(flags);
896
897 blackfin_dcache_flush_range((unsigned int)buf,(unsigned int)(buf) + len);
898 691
899 bfin_write_MDMA_D0_START_ADDR(addr); 692 blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len);
693
694 bfin_write_MDMA_D0_START_ADDR(addr);
900 bfin_write_MDMA_D0_X_COUNT(len); 695 bfin_write_MDMA_D0_X_COUNT(len);
901 bfin_write_MDMA_D0_X_MODIFY(0); 696 bfin_write_MDMA_D0_X_MODIFY(0);
902 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 697 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -923,10 +718,10 @@ EXPORT_SYMBOL(dma_outsl);
923void dma_insl(const void __iomem *addr, void *buf, unsigned short len) 718void dma_insl(const void __iomem *addr, void *buf, unsigned short len)
924{ 719{
925 unsigned long flags; 720 unsigned long flags;
926 721
927 local_irq_save(flags); 722 local_irq_save(flags);
928 723
929 bfin_write_MDMA_D0_START_ADDR(buf); 724 bfin_write_MDMA_D0_START_ADDR(buf);
930 bfin_write_MDMA_D0_X_COUNT(len); 725 bfin_write_MDMA_D0_X_COUNT(len);
931 bfin_write_MDMA_D0_X_MODIFY(4); 726 bfin_write_MDMA_D0_X_MODIFY(4);
932 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 727 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index 3f49fae1cb1f..bafcfa52142b 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -138,7 +138,7 @@ static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INT
138 138
139inline int check_gpio(unsigned short gpio) 139inline int check_gpio(unsigned short gpio)
140{ 140{
141 if (gpio > MAX_BLACKFIN_GPIOS) 141 if (gpio >= MAX_BLACKFIN_GPIOS)
142 return -EINVAL; 142 return -EINVAL;
143 return 0; 143 return 0;
144} 144}
@@ -162,7 +162,7 @@ static void port_setup(unsigned short gpio, unsigned short usage)
162 162
163static void default_gpio(unsigned short gpio) 163static void default_gpio(unsigned short gpio)
164{ 164{
165 unsigned short bank,bitmask; 165 unsigned short bank, bitmask;
166 166
167 bank = gpio_bank(gpio); 167 bank = gpio_bank(gpio);
168 bitmask = gpio_bit(gpio); 168 bitmask = gpio_bit(gpio);
@@ -183,7 +183,7 @@ static int __init bfin_gpio_init(void)
183 183
184 printk(KERN_INFO "Blackfin GPIO Controller\n"); 184 printk(KERN_INFO "Blackfin GPIO Controller\n");
185 185
186 for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE) 186 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE)
187 reserved_map[gpio_bank(i)] = 0; 187 reserved_map[gpio_bank(i)] = 0;
188 188
189#if defined(BF537_FAMILY) && (defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)) 189#if defined(BF537_FAMILY) && (defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE))
@@ -478,7 +478,7 @@ u32 gpio_pm_setup(void)
478 u32 sic_iwr = 0; 478 u32 sic_iwr = 0;
479 u16 bank, mask, i, gpio; 479 u16 bank, mask, i, gpio;
480 480
481 for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE) { 481 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) {
482 mask = wakeup_map[gpio_bank(i)]; 482 mask = wakeup_map[gpio_bank(i)];
483 bank = gpio_bank(i); 483 bank = gpio_bank(i);
484 484
@@ -494,19 +494,24 @@ u32 gpio_pm_setup(void)
494 gpio_bank_saved[bank].dir = gpio_bankb[bank]->dir; 494 gpio_bank_saved[bank].dir = gpio_bankb[bank]->dir;
495 gpio_bank_saved[bank].edge = gpio_bankb[bank]->edge; 495 gpio_bank_saved[bank].edge = gpio_bankb[bank]->edge;
496 gpio_bank_saved[bank].both = gpio_bankb[bank]->both; 496 gpio_bank_saved[bank].both = gpio_bankb[bank]->both;
497 gpio_bank_saved[bank].reserved = reserved_map[bank];
497 498
498 gpio = i; 499 gpio = i;
499 500
500 while (mask) { 501 while (mask) {
501 if (mask & 1) { 502 if (mask & 1) {
502 bfin_gpio_wakeup_type(gpio, wakeup_flags_map[gpio]); 503 reserved_map[gpio_bank(gpio)] |=
504 gpio_bit(gpio);
505 bfin_gpio_wakeup_type(gpio,
506 wakeup_flags_map[gpio]);
503 set_gpio_data(gpio, 0); /*Clear*/ 507 set_gpio_data(gpio, 0); /*Clear*/
504 } 508 }
505 gpio++; 509 gpio++;
506 mask >>= 1; 510 mask >>= 1;
507 } 511 }
508 512
509 sic_iwr |= 1 << (sic_iwr_irqs[bank] - (IRQ_CORETMR + 1)); 513 sic_iwr |= 1 <<
514 (sic_iwr_irqs[bank] - (IRQ_CORETMR + 1));
510 gpio_bankb[bank]->maskb_set = wakeup_map[gpio_bank(i)]; 515 gpio_bankb[bank]->maskb_set = wakeup_map[gpio_bank(i)];
511 } 516 }
512 } 517 }
@@ -517,12 +522,11 @@ u32 gpio_pm_setup(void)
517 return IWR_ENABLE_ALL; 522 return IWR_ENABLE_ALL;
518} 523}
519 524
520
521void gpio_pm_restore(void) 525void gpio_pm_restore(void)
522{ 526{
523 u16 bank, mask, i; 527 u16 bank, mask, i;
524 528
525 for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE) { 529 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) {
526 mask = wakeup_map[gpio_bank(i)]; 530 mask = wakeup_map[gpio_bank(i)];
527 bank = gpio_bank(i); 531 bank = gpio_bank(i);
528 532
@@ -535,6 +539,9 @@ void gpio_pm_restore(void)
535 gpio_bankb[bank]->polar = gpio_bank_saved[bank].polar; 539 gpio_bankb[bank]->polar = gpio_bank_saved[bank].polar;
536 gpio_bankb[bank]->edge = gpio_bank_saved[bank].edge; 540 gpio_bankb[bank]->edge = gpio_bank_saved[bank].edge;
537 gpio_bankb[bank]->both = gpio_bank_saved[bank].both; 541 gpio_bankb[bank]->both = gpio_bank_saved[bank].both;
542
543 reserved_map[bank] = gpio_bank_saved[bank].reserved;
544
538 } 545 }
539 546
540 gpio_bankb[bank]->maskb = gpio_bank_saved[bank].maskb; 547 gpio_bankb[bank]->maskb = gpio_bank_saved[bank].maskb;
@@ -583,7 +590,6 @@ int gpio_request(unsigned short gpio, const char *label)
583} 590}
584EXPORT_SYMBOL(gpio_request); 591EXPORT_SYMBOL(gpio_request);
585 592
586
587void gpio_free(unsigned short gpio) 593void gpio_free(unsigned short gpio)
588{ 594{
589 unsigned long flags; 595 unsigned long flags;
@@ -608,7 +614,6 @@ void gpio_free(unsigned short gpio)
608} 614}
609EXPORT_SYMBOL(gpio_free); 615EXPORT_SYMBOL(gpio_free);
610 616
611
612void gpio_direction_input(unsigned short gpio) 617void gpio_direction_input(unsigned short gpio)
613{ 618{
614 unsigned long flags; 619 unsigned long flags;
diff --git a/arch/blackfin/kernel/bfin_ksyms.c b/arch/blackfin/kernel/bfin_ksyms.c
index f64ecb638fab..70455949cfd2 100644
--- a/arch/blackfin/kernel/bfin_ksyms.c
+++ b/arch/blackfin/kernel/bfin_ksyms.c
@@ -28,10 +28,11 @@
28 */ 28 */
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <asm/irq.h> 31#include <linux/irq.h>
32#include <linux/uaccess.h>
33
32#include <asm/checksum.h> 34#include <asm/checksum.h>
33#include <asm/cacheflush.h> 35#include <asm/cacheflush.h>
34#include <asm/uaccess.h>
35 36
36/* platform dependent support */ 37/* platform dependent support */
37 38
diff --git a/arch/blackfin/kernel/cacheinit.c b/arch/blackfin/kernel/cacheinit.c
new file mode 100644
index 000000000000..4d41a40e8133
--- /dev/null
+++ b/arch/blackfin/kernel/cacheinit.c
@@ -0,0 +1,66 @@
1/*
2 * Copyright 2004-2007 Analog Devices Inc.
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, see the file COPYING, or write
16 * to the Free Software Foundation, Inc.,
17 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#include <linux/cpu.h>
21
22#include <asm/cacheflush.h>
23#include <asm/blackfin.h>
24#include <asm/cplbinit.h>
25
26#if defined(CONFIG_BLKFIN_CACHE)
27void bfin_icache_init(void)
28{
29 unsigned long *table = icplb_table;
30 unsigned long ctrl;
31 int i;
32
33 for (i = 0; i < MAX_CPLBS; i++) {
34 unsigned long addr = *table++;
35 unsigned long data = *table++;
36 if (addr == (unsigned long)-1)
37 break;
38 bfin_write32(ICPLB_ADDR0 + i * 4, addr);
39 bfin_write32(ICPLB_DATA0 + i * 4, data);
40 }
41 ctrl = bfin_read_IMEM_CONTROL();
42 ctrl |= IMC | ENICPLB;
43 bfin_write_IMEM_CONTROL(ctrl);
44}
45#endif
46
47#if defined(CONFIG_BLKFIN_DCACHE)
48void bfin_dcache_init(void)
49{
50 unsigned long *table = dcplb_table;
51 unsigned long ctrl;
52 int i;
53
54 for (i = 0; i < MAX_CPLBS; i++) {
55 unsigned long addr = *table++;
56 unsigned long data = *table++;
57 if (addr == (unsigned long)-1)
58 break;
59 bfin_write32(DCPLB_ADDR0 + i * 4, addr);
60 bfin_write32(DCPLB_DATA0 + i * 4, data);
61 }
62 ctrl = bfin_read_DMEM_CONTROL();
63 ctrl |= DMEM_CNTR;
64 bfin_write_DMEM_CONTROL(ctrl);
65}
66#endif
diff --git a/arch/blackfin/kernel/cplbinit.c b/arch/blackfin/kernel/cplbinit.c
new file mode 100644
index 000000000000..bbdb403fcb55
--- /dev/null
+++ b/arch/blackfin/kernel/cplbinit.c
@@ -0,0 +1,433 @@
1/*
2 * Blackfin CPLB initialization
3 *
4 * Copyright 2004-2007 Analog Devices Inc.
5 *
6 * Bugs: Enter bugs at http://blackfin.uclinux.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 of the License, or
11 * (at your option) 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, see the file COPYING, or write
20 * to the Free Software Foundation, Inc.,
21 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23#include <linux/module.h>
24
25#include <asm/blackfin.h>
26#include <asm/cplbinit.h>
27
28u_long icplb_table[MAX_CPLBS+1];
29u_long dcplb_table[MAX_CPLBS+1];
30
31#ifdef CONFIG_CPLB_SWITCH_TAB_L1
32u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]__attribute__((l1_data));
33u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]__attribute__((l1_data));
34
35#ifdef CONFIG_CPLB_INFO
36u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]__attribute__((l1_data));
37u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]__attribute__((l1_data));
38#endif /* CONFIG_CPLB_INFO */
39
40#else
41
42u_long ipdt_table[MAX_SWITCH_I_CPLBS+1];
43u_long dpdt_table[MAX_SWITCH_D_CPLBS+1];
44
45#ifdef CONFIG_CPLB_INFO
46u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS];
47u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS];
48#endif /* CONFIG_CPLB_INFO */
49
50#endif /*CONFIG_CPLB_SWITCH_TAB_L1*/
51
52struct s_cplb {
53 struct cplb_tab init_i;
54 struct cplb_tab init_d;
55 struct cplb_tab switch_i;
56 struct cplb_tab switch_d;
57};
58
59#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE)
60static struct cplb_desc cplb_data[] = {
61 {
62 .start = 0,
63 .end = SIZE_1K,
64 .psize = SIZE_1K,
65 .attr = INITIAL_T | SWITCH_T | I_CPLB | D_CPLB,
66 .i_conf = SDRAM_OOPS,
67 .d_conf = SDRAM_OOPS,
68#if defined(CONFIG_DEBUG_HUNT_FOR_ZERO)
69 .valid = 1,
70#else
71 .valid = 0,
72#endif
73 .name = "ZERO Pointer Saveguard",
74 },
75 {
76 .start = L1_CODE_START,
77 .end = L1_CODE_START + L1_CODE_LENGTH,
78 .psize = SIZE_4M,
79 .attr = INITIAL_T | SWITCH_T | I_CPLB,
80 .i_conf = L1_IMEMORY,
81 .d_conf = 0,
82 .valid = 1,
83 .name = "L1 I-Memory",
84 },
85 {
86 .start = L1_DATA_A_START,
87 .end = L1_DATA_B_START + L1_DATA_B_LENGTH,
88 .psize = SIZE_4M,
89 .attr = INITIAL_T | SWITCH_T | D_CPLB,
90 .i_conf = 0,
91 .d_conf = L1_DMEMORY,
92#if ((L1_DATA_A_LENGTH > 0) || (L1_DATA_B_LENGTH > 0))
93 .valid = 1,
94#else
95 .valid = 0,
96#endif
97 .name = "L1 D-Memory",
98 },
99 {
100 .start = 0,
101 .end = 0, /* dynamic */
102 .psize = 0,
103 .attr = INITIAL_T | SWITCH_T | I_CPLB | D_CPLB,
104 .i_conf = SDRAM_IGENERIC,
105 .d_conf = SDRAM_DGENERIC,
106 .valid = 1,
107 .name = "SDRAM Kernel",
108 },
109 {
110 .start = 0, /* dynamic */
111 .end = 0, /* dynamic */
112 .psize = 0,
113 .attr = INITIAL_T | SWITCH_T | D_CPLB,
114 .i_conf = SDRAM_IGENERIC,
115 .d_conf = SDRAM_DNON_CHBL,
116 .valid = 1,
117 .name = "SDRAM RAM MTD",
118 },
119 {
120 .start = 0, /* dynamic */
121 .end = 0, /* dynamic */
122 .psize = SIZE_1M,
123 .attr = INITIAL_T | SWITCH_T | D_CPLB,
124 .d_conf = SDRAM_DNON_CHBL,
125 .valid = 1,
126 .name = "SDRAM Uncached DMA ZONE",
127 },
128 {
129 .start = 0, /* dynamic */
130 .end = 0, /* dynamic */
131 .psize = 0,
132 .attr = SWITCH_T | D_CPLB,
133 .i_conf = 0, /* dynamic */
134 .d_conf = 0, /* dynamic */
135 .valid = 1,
136 .name = "SDRAM Reserved Memory",
137 },
138 {
139 .start = ASYNC_BANK0_BASE,
140 .end = ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE,
141 .psize = 0,
142 .attr = SWITCH_T | D_CPLB,
143 .d_conf = SDRAM_EBIU,
144 .valid = 1,
145 .name = "ASYNC Memory",
146 },
147 {
148#if defined(CONFIG_BF561)
149 .start = L2_SRAM,
150 .end = L2_SRAM_END,
151 .psize = SIZE_1M,
152 .attr = SWITCH_T | D_CPLB,
153 .i_conf = L2_MEMORY,
154 .d_conf = L2_MEMORY,
155 .valid = 1,
156#else
157 .valid = 0,
158#endif
159 .name = "L2 Memory",
160 }
161};
162
163static u16 __init lock_kernel_check(u32 start, u32 end)
164{
165 if ((start <= (u32) _stext && end >= (u32) _end)
166 || (start >= (u32) _stext && end <= (u32) _end))
167 return IN_KERNEL;
168 return 0;
169}
170
171static unsigned short __init
172fill_cplbtab(struct cplb_tab *table,
173 unsigned long start, unsigned long end,
174 unsigned long block_size, unsigned long cplb_data)
175{
176 int i;
177
178 switch (block_size) {
179 case SIZE_4M:
180 i = 3;
181 break;
182 case SIZE_1M:
183 i = 2;
184 break;
185 case SIZE_4K:
186 i = 1;
187 break;
188 case SIZE_1K:
189 default:
190 i = 0;
191 break;
192 }
193
194 cplb_data = (cplb_data & ~(3 << 16)) | (i << 16);
195
196 while ((start < end) && (table->pos < table->size)) {
197
198 table->tab[table->pos++] = start;
199
200 if (lock_kernel_check(start, start + block_size) == IN_KERNEL)
201 table->tab[table->pos++] =
202 cplb_data | CPLB_LOCK | CPLB_DIRTY;
203 else
204 table->tab[table->pos++] = cplb_data;
205
206 start += block_size;
207 }
208 return 0;
209}
210
211static unsigned short __init
212close_cplbtab(struct cplb_tab *table)
213{
214
215 while (table->pos < table->size) {
216
217 table->tab[table->pos++] = 0;
218 table->tab[table->pos++] = 0; /* !CPLB_VALID */
219 }
220 return 0;
221}
222
223/* helper function */
224static void __fill_code_cplbtab(struct cplb_tab *t, int i, u32 a_start, u32 a_end)
225{
226 if (cplb_data[i].psize) {
227 fill_cplbtab(t,
228 cplb_data[i].start,
229 cplb_data[i].end,
230 cplb_data[i].psize,
231 cplb_data[i].i_conf);
232 } else {
233#if (defined(CONFIG_BLKFIN_CACHE) && defined(ANOMALY_05000263))
234 if (i == SDRAM_KERN) {
235 fill_cplbtab(t,
236 cplb_data[i].start,
237 cplb_data[i].end,
238 SIZE_4M,
239 cplb_data[i].i_conf);
240 } else
241#endif
242 {
243 fill_cplbtab(t,
244 cplb_data[i].start,
245 a_start,
246 SIZE_1M,
247 cplb_data[i].i_conf);
248 fill_cplbtab(t,
249 a_start,
250 a_end,
251 SIZE_4M,
252 cplb_data[i].i_conf);
253 fill_cplbtab(t, a_end,
254 cplb_data[i].end,
255 SIZE_1M,
256 cplb_data[i].i_conf);
257 }
258 }
259}
260
261static void __fill_data_cplbtab(struct cplb_tab *t, int i, u32 a_start, u32 a_end)
262{
263 if (cplb_data[i].psize) {
264 fill_cplbtab(t,
265 cplb_data[i].start,
266 cplb_data[i].end,
267 cplb_data[i].psize,
268 cplb_data[i].d_conf);
269 } else {
270 fill_cplbtab(t,
271 cplb_data[i].start,
272 a_start, SIZE_1M,
273 cplb_data[i].d_conf);
274 fill_cplbtab(t, a_start,
275 a_end, SIZE_4M,
276 cplb_data[i].d_conf);
277 fill_cplbtab(t, a_end,
278 cplb_data[i].end,
279 SIZE_1M,
280 cplb_data[i].d_conf);
281 }
282}
283
284void __init generate_cpl_tables(void)
285{
286
287 u16 i, j, process;
288 u32 a_start, a_end, as, ae, as_1m;
289
290 struct cplb_tab *t_i = NULL;
291 struct cplb_tab *t_d = NULL;
292 struct s_cplb cplb;
293
294 cplb.init_i.size = MAX_CPLBS;
295 cplb.init_d.size = MAX_CPLBS;
296 cplb.switch_i.size = MAX_SWITCH_I_CPLBS;
297 cplb.switch_d.size = MAX_SWITCH_D_CPLBS;
298
299 cplb.init_i.pos = 0;
300 cplb.init_d.pos = 0;
301 cplb.switch_i.pos = 0;
302 cplb.switch_d.pos = 0;
303
304 cplb.init_i.tab = icplb_table;
305 cplb.init_d.tab = dcplb_table;
306 cplb.switch_i.tab = ipdt_table;
307 cplb.switch_d.tab = dpdt_table;
308
309 cplb_data[SDRAM_KERN].end = memory_end;
310
311#ifdef CONFIG_MTD_UCLINUX
312 cplb_data[SDRAM_RAM_MTD].start = memory_mtd_start;
313 cplb_data[SDRAM_RAM_MTD].end = memory_mtd_start + mtd_size;
314 cplb_data[SDRAM_RAM_MTD].valid = mtd_size > 0;
315# if defined(CONFIG_ROMFS_FS)
316 cplb_data[SDRAM_RAM_MTD].attr |= I_CPLB;
317
318 /*
319 * The ROMFS_FS size is often not multiple of 1MB.
320 * This can cause multiple CPLB sets covering the same memory area.
321 * This will then cause multiple CPLB hit exceptions.
322 * Workaround: We ensure a contiguous memory area by extending the kernel
323 * memory section over the mtd section.
324 * For ROMFS_FS memory must be covered with ICPLBs anyways.
325 * So there is no difference between kernel and mtd memory setup.
326 */
327
328 cplb_data[SDRAM_KERN].end = memory_mtd_start + mtd_size;;
329 cplb_data[SDRAM_RAM_MTD].valid = 0;
330
331# endif
332#else
333 cplb_data[SDRAM_RAM_MTD].valid = 0;
334#endif
335
336 cplb_data[SDRAM_DMAZ].start = _ramend - DMA_UNCACHED_REGION;
337 cplb_data[SDRAM_DMAZ].end = _ramend;
338
339 cplb_data[RES_MEM].start = _ramend;
340 cplb_data[RES_MEM].end = physical_mem_end;
341
342 if (reserved_mem_dcache_on)
343 cplb_data[RES_MEM].d_conf = SDRAM_DGENERIC;
344 else
345 cplb_data[RES_MEM].d_conf = SDRAM_DNON_CHBL;
346
347 if (reserved_mem_icache_on)
348 cplb_data[RES_MEM].i_conf = SDRAM_IGENERIC;
349 else
350 cplb_data[RES_MEM].i_conf = SDRAM_INON_CHBL;
351
352 for (i = ZERO_P; i <= L2_MEM; i++) {
353 if (!cplb_data[i].valid)
354 continue;
355
356 as_1m = cplb_data[i].start % SIZE_1M;
357
358 /* We need to make sure all sections are properly 1M aligned
359 * However between Kernel Memory and the Kernel mtd section, depending on the
360 * rootfs size, there can be overlapping memory areas.
361 */
362
363 if (as_1m && i != L1I_MEM && i != L1D_MEM) {
364#ifdef CONFIG_MTD_UCLINUX
365 if (i == SDRAM_RAM_MTD) {
366 if ((cplb_data[SDRAM_KERN].end + 1) > cplb_data[SDRAM_RAM_MTD].start)
367 cplb_data[SDRAM_RAM_MTD].start = (cplb_data[i].start & (-2*SIZE_1M)) + SIZE_1M;
368 else
369 cplb_data[SDRAM_RAM_MTD].start = (cplb_data[i].start & (-2*SIZE_1M));
370 } else
371#endif
372 printk(KERN_WARNING "Unaligned Start of %s at 0x%X\n",
373 cplb_data[i].name, cplb_data[i].start);
374 }
375
376 as = cplb_data[i].start % SIZE_4M;
377 ae = cplb_data[i].end % SIZE_4M;
378
379 if (as)
380 a_start = cplb_data[i].start + (SIZE_4M - (as));
381 else
382 a_start = cplb_data[i].start;
383
384 a_end = cplb_data[i].end - ae;
385
386 for (j = INITIAL_T; j <= SWITCH_T; j++) {
387
388 switch (j) {
389 case INITIAL_T:
390 if (cplb_data[i].attr & INITIAL_T) {
391 t_i = &cplb.init_i;
392 t_d = &cplb.init_d;
393 process = 1;
394 } else
395 process = 0;
396 break;
397 case SWITCH_T:
398 if (cplb_data[i].attr & SWITCH_T) {
399 t_i = &cplb.switch_i;
400 t_d = &cplb.switch_d;
401 process = 1;
402 } else
403 process = 0;
404 break;
405 default:
406 process = 0;
407 break;
408 }
409
410 if (!process)
411 continue;
412 if (cplb_data[i].attr & I_CPLB)
413 __fill_code_cplbtab(t_i, i, a_start, a_end);
414
415 if (cplb_data[i].attr & D_CPLB)
416 __fill_data_cplbtab(t_d, i, a_start, a_end);
417 }
418 }
419
420/* close tables */
421
422 close_cplbtab(&cplb.init_i);
423 close_cplbtab(&cplb.init_d);
424
425 cplb.init_i.tab[cplb.init_i.pos] = -1;
426 cplb.init_d.tab[cplb.init_d.pos] = -1;
427 cplb.switch_i.tab[cplb.switch_i.pos] = -1;
428 cplb.switch_d.tab[cplb.switch_d.pos] = -1;
429
430}
431
432#endif
433
diff --git a/arch/blackfin/kernel/dma-mapping.c b/arch/blackfin/kernel/dma-mapping.c
index 539eb24e062f..ea48d5b13f11 100644
--- a/arch/blackfin/kernel/dma-mapping.c
+++ b/arch/blackfin/kernel/dma-mapping.c
@@ -34,8 +34,8 @@
34#include <linux/spinlock.h> 34#include <linux/spinlock.h>
35#include <linux/device.h> 35#include <linux/device.h>
36#include <linux/dma-mapping.h> 36#include <linux/dma-mapping.h>
37#include <linux/io.h>
37#include <asm/cacheflush.h> 38#include <asm/cacheflush.h>
38#include <asm/io.h>
39#include <asm/bfin-global.h> 39#include <asm/bfin-global.h>
40 40
41static spinlock_t dma_page_lock; 41static spinlock_t dma_page_lock;
@@ -159,10 +159,13 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
159 159
160 BUG_ON(direction == DMA_NONE); 160 BUG_ON(direction == DMA_NONE);
161 161
162 for (i = 0; i < nents; i++) 162 for (i = 0; i < nents; i++, sg++) {
163 invalidate_dcache_range(sg_dma_address(&sg[i]), 163 sg->dma_address = page_address(sg->page) + sg->offset;
164 sg_dma_address(&sg[i]) + 164
165 sg_dma_len(&sg[i])); 165 invalidate_dcache_range(sg_dma_address(sg),
166 sg_dma_address(sg) +
167 sg_dma_len(sg));
168 }
166 169
167 return nents; 170 return nents;
168} 171}
diff --git a/arch/blackfin/kernel/dualcore_test.c b/arch/blackfin/kernel/dualcore_test.c
index 8b89c99f9dfa..0fcba74840b7 100644
--- a/arch/blackfin/kernel/dualcore_test.c
+++ b/arch/blackfin/kernel/dualcore_test.c
@@ -30,19 +30,19 @@
30#include <linux/init.h> 30#include <linux/init.h>
31#include <linux/module.h> 31#include <linux/module.h>
32 32
33static int *testarg = (int*)0xfeb00000; 33static int *testarg = (int *)0xfeb00000;
34 34
35static int test_init(void) 35static int test_init(void)
36{ 36{
37 *testarg = 1; 37 *testarg = 1;
38 printk("Dual core test module inserted: set testarg = [%d]\n @ [%p]\n", 38 printk(KERN_INFO "Dual core test module inserted: set testarg = [%d]\n @ [%p]\n",
39 *testarg, testarg); 39 *testarg, testarg);
40 return 0; 40 return 0;
41} 41}
42 42
43static void test_exit(void) 43static void test_exit(void)
44{ 44{
45 printk("Dual core test module removed: testarg = [%d]\n", *testarg); 45 printk(KERN_INFO "Dual core test module removed: testarg = [%d]\n", *testarg);
46} 46}
47 47
48module_init(test_init); 48module_init(test_init);
diff --git a/arch/blackfin/kernel/entry.S b/arch/blackfin/kernel/entry.S
index 5880b270bd50..65c5ba4260b0 100644
--- a/arch/blackfin/kernel/entry.S
+++ b/arch/blackfin/kernel/entry.S
@@ -58,10 +58,12 @@ ENTRY(_ret_from_fork)
58 RESTORE_ALL_SYS 58 RESTORE_ALL_SYS
59 p0 = reti; 59 p0 = reti;
60 jump (p0); 60 jump (p0);
61ENDPROC(_ret_from_fork)
61 62
62ENTRY(_sys_fork) 63ENTRY(_sys_fork)
63 r0 = -EINVAL; 64 r0 = -EINVAL;
64 rts; 65 rts;
66ENDPROC(_sys_fork)
65 67
66ENTRY(_sys_vfork) 68ENTRY(_sys_vfork)
67 r0 = sp; 69 r0 = sp;
@@ -72,6 +74,7 @@ ENTRY(_sys_vfork)
72 SP += 12; 74 SP += 12;
73 rets = [sp++]; 75 rets = [sp++];
74 rts; 76 rts;
77ENDPROC(_sys_vfork)
75 78
76ENTRY(_sys_clone) 79ENTRY(_sys_clone)
77 r0 = sp; 80 r0 = sp;
@@ -82,6 +85,7 @@ ENTRY(_sys_clone)
82 SP += 12; 85 SP += 12;
83 rets = [sp++]; 86 rets = [sp++];
84 rts; 87 rts;
88ENDPROC(_sys_clone)
85 89
86ENTRY(_sys_rt_sigreturn) 90ENTRY(_sys_rt_sigreturn)
87 r0 = sp; 91 r0 = sp;
@@ -92,3 +96,4 @@ ENTRY(_sys_rt_sigreturn)
92 SP += 12; 96 SP += 12;
93 rets = [sp++]; 97 rets = [sp++];
94 rts; 98 rts;
99ENDPROC(_sys_rt_sigreturn)
diff --git a/arch/blackfin/kernel/fixed_code.S b/arch/blackfin/kernel/fixed_code.S
new file mode 100644
index 000000000000..d8b1ebc70996
--- /dev/null
+++ b/arch/blackfin/kernel/fixed_code.S
@@ -0,0 +1,132 @@
1/*
2 * This file contains sequences of code that will be copied to a
3 * fixed location, defined in <asm/atomic_seq.h>. The interrupt
4 * handlers ensure that these sequences appear to be atomic when
5 * executed from userspace.
6 * These are aligned to 16 bytes, so that we have some space to replace
7 * these sequences with something else (e.g. kernel traps if we ever do
8 * BF561 SMP).
9 */
10#include <linux/linkage.h>
11#include <linux/unistd.h>
12#include <asm/entry.h>
13
14.text
15ENTRY(_fixed_code_start)
16
17.align 16
18ENTRY(_sigreturn_stub)
19 P0 = __NR_rt_sigreturn;
20 EXCPT 0;
21 /* Speculative execution paranoia. */
220: JUMP.S 0b;
23ENDPROC (_sigreturn_stub)
24
25.align 16
26 /*
27 * Atomic swap, 8 bit.
28 * Inputs: P0: memory address to use
29 * R1: value to store
30 * Output: R0: old contents of the memory address, zero extended.
31 */
32ENTRY(_atomic_xchg32)
33 R0 = [P0];
34 [P0] = R1;
35 rts;
36ENDPROC (_atomic_xchg32)
37
38.align 16
39 /*
40 * Compare and swap, 32 bit.
41 * Inputs: P0: memory address to use
42 * R1: compare value
43 * R2: new value to store
44 * The new value is stored if the contents of the memory
45 * address is equal to the compare value.
46 * Output: R0: old contents of the memory address.
47 */
48ENTRY(_atomic_cas32)
49 R0 = [P0];
50 CC = R0 == R1;
51 IF !CC JUMP 1f;
52 [P0] = R2;
531:
54 rts;
55ENDPROC (_atomic_cas32)
56
57.align 16
58 /*
59 * Atomic add, 32 bit.
60 * Inputs: P0: memory address to use
61 * R0: value to add
62 * Outputs: R0: new contents of the memory address.
63 * R1: previous contents of the memory address.
64 */
65ENTRY(_atomic_add32)
66 R1 = [P0];
67 R0 = R1 + R0;
68 [P0] = R0;
69 rts;
70ENDPROC (_atomic_add32)
71
72.align 16
73 /*
74 * Atomic sub, 32 bit.
75 * Inputs: P0: memory address to use
76 * R0: value to subtract
77 * Outputs: R0: new contents of the memory address.
78 * R1: previous contents of the memory address.
79 */
80ENTRY(_atomic_sub32)
81 R1 = [P0];
82 R0 = R1 - R0;
83 [P0] = R0;
84 rts;
85ENDPROC (_atomic_sub32)
86
87.align 16
88 /*
89 * Atomic ior, 32 bit.
90 * Inputs: P0: memory address to use
91 * R0: value to ior
92 * Outputs: R0: new contents of the memory address.
93 * R1: previous contents of the memory address.
94 */
95ENTRY(_atomic_ior32)
96 R1 = [P0];
97 R0 = R1 | R0;
98 [P0] = R0;
99 rts;
100ENDPROC (_atomic_ior32)
101
102.align 16
103 /*
104 * Atomic ior, 32 bit.
105 * Inputs: P0: memory address to use
106 * R0: value to ior
107 * Outputs: R0: new contents of the memory address.
108 * R1: previous contents of the memory address.
109 */
110ENTRY(_atomic_and32)
111 R1 = [P0];
112 R0 = R1 & R0;
113 [P0] = R0;
114 rts;
115ENDPROC (_atomic_ior32)
116
117.align 16
118 /*
119 * Atomic ior, 32 bit.
120 * Inputs: P0: memory address to use
121 * R0: value to ior
122 * Outputs: R0: new contents of the memory address.
123 * R1: previous contents of the memory address.
124 */
125ENTRY(_atomic_xor32)
126 R1 = [P0];
127 R0 = R1 ^ R0;
128 [P0] = R0;
129 rts;
130ENDPROC (_atomic_ior32)
131
132ENTRY(_fixed_code_end)
diff --git a/arch/blackfin/kernel/flat.c b/arch/blackfin/kernel/flat.c
index a92587b628b5..d188b2430536 100644
--- a/arch/blackfin/kernel/flat.c
+++ b/arch/blackfin/kernel/flat.c
@@ -36,24 +36,22 @@ unsigned long bfin_get_addr_from_rp(unsigned long *ptr,
36 unsigned long val; 36 unsigned long val;
37 37
38 switch (type) { 38 switch (type) {
39 case FLAT_BFIN_RELOC_TYPE_16_BIT: 39 case FLAT_BFIN_RELOC_TYPE_16_BIT:
40 case FLAT_BFIN_RELOC_TYPE_16H_BIT: 40 case FLAT_BFIN_RELOC_TYPE_16H_BIT:
41 usptr = (unsigned short *)ptr; 41 usptr = (unsigned short *)ptr;
42 pr_debug("*usptr = %x", get_unaligned(usptr)); 42 pr_debug("*usptr = %x", get_unaligned(usptr));
43 val = get_unaligned(usptr); 43 val = get_unaligned(usptr);
44 val += *persistent; 44 val += *persistent;
45 break; 45 break;
46 46
47 case FLAT_BFIN_RELOC_TYPE_32_BIT: 47 case FLAT_BFIN_RELOC_TYPE_32_BIT:
48 pr_debug("*ptr = %lx", get_unaligned(ptr)); 48 pr_debug("*ptr = %lx", get_unaligned(ptr));
49 val = get_unaligned(ptr); 49 val = get_unaligned(ptr);
50 break; 50 break;
51 51
52 default: 52 default:
53 pr_debug("BINFMT_FLAT: Unknown relocation type %x\n", 53 pr_debug("BINFMT_FLAT: Unknown relocation type %x\n", type);
54 type); 54 return 0;
55
56 return 0;
57 } 55 }
58 56
59 /* 57 /*
@@ -81,21 +79,20 @@ void bfin_put_addr_at_rp(unsigned long *ptr, unsigned long addr,
81 int type = (relval >> 26) & 7; 79 int type = (relval >> 26) & 7;
82 80
83 switch (type) { 81 switch (type) {
84 case FLAT_BFIN_RELOC_TYPE_16_BIT: 82 case FLAT_BFIN_RELOC_TYPE_16_BIT:
85 put_unaligned(addr, usptr); 83 put_unaligned(addr, usptr);
86 pr_debug("new value %x at %p", get_unaligned(usptr), 84 pr_debug("new value %x at %p", get_unaligned(usptr), usptr);
87 usptr); 85 break;
88 break;
89 86
90 case FLAT_BFIN_RELOC_TYPE_16H_BIT: 87 case FLAT_BFIN_RELOC_TYPE_16H_BIT:
91 put_unaligned(addr >> 16, usptr); 88 put_unaligned(addr >> 16, usptr);
92 pr_debug("new value %x", get_unaligned(usptr)); 89 pr_debug("new value %x", get_unaligned(usptr));
93 break; 90 break;
94 91
95 case FLAT_BFIN_RELOC_TYPE_32_BIT: 92 case FLAT_BFIN_RELOC_TYPE_32_BIT:
96 put_unaligned(addr, ptr); 93 put_unaligned(addr, ptr);
97 pr_debug("new ptr =%lx", get_unaligned(ptr)); 94 pr_debug("new ptr =%lx", get_unaligned(ptr));
98 break; 95 break;
99 } 96 }
100} 97}
101EXPORT_SYMBOL(bfin_put_addr_at_rp); 98EXPORT_SYMBOL(bfin_put_addr_at_rp);
diff --git a/arch/blackfin/kernel/irqchip.c b/arch/blackfin/kernel/irqchip.c
index df5bf022cf79..1fc001c7abda 100644
--- a/arch/blackfin/kernel/irqchip.c
+++ b/arch/blackfin/kernel/irqchip.c
@@ -82,7 +82,7 @@ int show_interrupts(struct seq_file *p, void *v)
82 seq_printf(p, ", %s", action->name); 82 seq_printf(p, ", %s", action->name);
83 83
84 seq_putc(p, '\n'); 84 seq_putc(p, '\n');
85 unlock: 85 unlock:
86 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 86 spin_unlock_irqrestore(&irq_desc[i].lock, flags);
87 } else if (i == NR_IRQS) { 87 } else if (i == NR_IRQS) {
88 seq_printf(p, "Err: %10lu\n", irq_err_count); 88 seq_printf(p, "Err: %10lu\n", irq_err_count);
@@ -91,7 +91,7 @@ int show_interrupts(struct seq_file *p, void *v)
91} 91}
92 92
93/* 93/*
94 * do_IRQ handles all hardware IRQ's. Decoded IRQs should not 94 * do_IRQ handles all hardware IRQs. Decoded IRQs should not
95 * come via this function. Instead, they should provide their 95 * come via this function. Instead, they should provide their
96 * own 'handler' 96 * own 'handler'
97 */ 97 */
diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c
new file mode 100644
index 000000000000..a9c15515bfd7
--- /dev/null
+++ b/arch/blackfin/kernel/kgdb.c
@@ -0,0 +1,421 @@
1/*
2 * File: arch/blackfin/kernel/kgdb.c
3 * Based on:
4 * Author: Sonic Zhang
5 *
6 * Created:
7 * Description:
8 *
9 * Rev: $Id: kgdb_bfin_linux-2.6.x.patch 4934 2007-02-13 09:32:11Z sonicz $
10 *
11 * Modified:
12 * Copyright 2005-2006 Analog Devices Inc.
13 *
14 * Bugs: Enter bugs at http://blackfin.uclinux.org/
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, see the file COPYING, or write
28 * to the Free Software Foundation, Inc.,
29 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 */
31
32#include <linux/string.h>
33#include <linux/kernel.h>
34#include <linux/sched.h>
35#include <linux/smp.h>
36#include <linux/spinlock.h>
37#include <linux/delay.h>
38#include <linux/ptrace.h> /* for linux pt_regs struct */
39#include <linux/kgdb.h>
40#include <linux/console.h>
41#include <linux/init.h>
42#include <linux/debugger.h>
43#include <linux/errno.h>
44#include <linux/irq.h>
45#include <asm/system.h>
46#include <asm/traps.h>
47#include <asm/blackfin.h>
48
49/* Put the error code here just in case the user cares. */
50int gdb_bf533errcode;
51/* Likewise, the vector number here (since GDB only gets the signal
52 number through the usual means, and that's not very specific). */
53int gdb_bf533vector = -1;
54
55#if KGDB_MAX_NO_CPUS != 8
56#error change the definition of slavecpulocks
57#endif
58
59void regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs)
60{
61 gdb_regs[BFIN_R0] = regs->r0;
62 gdb_regs[BFIN_R1] = regs->r1;
63 gdb_regs[BFIN_R2] = regs->r2;
64 gdb_regs[BFIN_R3] = regs->r3;
65 gdb_regs[BFIN_R4] = regs->r4;
66 gdb_regs[BFIN_R5] = regs->r5;
67 gdb_regs[BFIN_R6] = regs->r6;
68 gdb_regs[BFIN_R7] = regs->r7;
69 gdb_regs[BFIN_P0] = regs->p0;
70 gdb_regs[BFIN_P1] = regs->p1;
71 gdb_regs[BFIN_P2] = regs->p2;
72 gdb_regs[BFIN_P3] = regs->p3;
73 gdb_regs[BFIN_P4] = regs->p4;
74 gdb_regs[BFIN_P5] = regs->p5;
75 gdb_regs[BFIN_SP] = regs->reserved;
76 gdb_regs[BFIN_FP] = regs->fp;
77 gdb_regs[BFIN_I0] = regs->i0;
78 gdb_regs[BFIN_I1] = regs->i1;
79 gdb_regs[BFIN_I2] = regs->i2;
80 gdb_regs[BFIN_I3] = regs->i3;
81 gdb_regs[BFIN_M0] = regs->m0;
82 gdb_regs[BFIN_M1] = regs->m1;
83 gdb_regs[BFIN_M2] = regs->m2;
84 gdb_regs[BFIN_M3] = regs->m3;
85 gdb_regs[BFIN_B0] = regs->b0;
86 gdb_regs[BFIN_B1] = regs->b1;
87 gdb_regs[BFIN_B2] = regs->b2;
88 gdb_regs[BFIN_B3] = regs->b3;
89 gdb_regs[BFIN_L0] = regs->l0;
90 gdb_regs[BFIN_L1] = regs->l1;
91 gdb_regs[BFIN_L2] = regs->l2;
92 gdb_regs[BFIN_L3] = regs->l3;
93 gdb_regs[BFIN_A0_DOT_X] = regs->a0x;
94 gdb_regs[BFIN_A0_DOT_W] = regs->a0w;
95 gdb_regs[BFIN_A1_DOT_X] = regs->a1x;
96 gdb_regs[BFIN_A1_DOT_W] = regs->a1w;
97 gdb_regs[BFIN_ASTAT] = regs->astat;
98 gdb_regs[BFIN_RETS] = regs->rets;
99 gdb_regs[BFIN_LC0] = regs->lc0;
100 gdb_regs[BFIN_LT0] = regs->lt0;
101 gdb_regs[BFIN_LB0] = regs->lb0;
102 gdb_regs[BFIN_LC1] = regs->lc1;
103 gdb_regs[BFIN_LT1] = regs->lt1;
104 gdb_regs[BFIN_LB1] = regs->lb1;
105 gdb_regs[BFIN_CYCLES] = 0;
106 gdb_regs[BFIN_CYCLES2] = 0;
107 gdb_regs[BFIN_USP] = regs->usp;
108 gdb_regs[BFIN_SEQSTAT] = regs->seqstat;
109 gdb_regs[BFIN_SYSCFG] = regs->syscfg;
110 gdb_regs[BFIN_RETI] = regs->pc;
111 gdb_regs[BFIN_RETX] = regs->retx;
112 gdb_regs[BFIN_RETN] = regs->retn;
113 gdb_regs[BFIN_RETE] = regs->rete;
114 gdb_regs[BFIN_PC] = regs->pc;
115 gdb_regs[BFIN_CC] = 0;
116 gdb_regs[BFIN_EXTRA1] = 0;
117 gdb_regs[BFIN_EXTRA2] = 0;
118 gdb_regs[BFIN_EXTRA3] = 0;
119 gdb_regs[BFIN_IPEND] = regs->ipend;
120}
121
122/*
123 * Extracts ebp, esp and eip values understandable by gdb from the values
124 * saved by switch_to.
125 * thread.esp points to ebp. flags and ebp are pushed in switch_to hence esp
126 * prior to entering switch_to is 8 greater then the value that is saved.
127 * If switch_to changes, change following code appropriately.
128 */
129void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p)
130{
131 gdb_regs[BFIN_SP] = p->thread.ksp;
132 gdb_regs[BFIN_PC] = p->thread.pc;
133 gdb_regs[BFIN_SEQSTAT] = p->thread.seqstat;
134}
135
136void gdb_regs_to_regs(unsigned long *gdb_regs, struct pt_regs *regs)
137{
138 regs->r0 = gdb_regs[BFIN_R0];
139 regs->r1 = gdb_regs[BFIN_R1];
140 regs->r2 = gdb_regs[BFIN_R2];
141 regs->r3 = gdb_regs[BFIN_R3];
142 regs->r4 = gdb_regs[BFIN_R4];
143 regs->r5 = gdb_regs[BFIN_R5];
144 regs->r6 = gdb_regs[BFIN_R6];
145 regs->r7 = gdb_regs[BFIN_R7];
146 regs->p0 = gdb_regs[BFIN_P0];
147 regs->p1 = gdb_regs[BFIN_P1];
148 regs->p2 = gdb_regs[BFIN_P2];
149 regs->p3 = gdb_regs[BFIN_P3];
150 regs->p4 = gdb_regs[BFIN_P4];
151 regs->p5 = gdb_regs[BFIN_P5];
152 regs->fp = gdb_regs[BFIN_FP];
153 regs->i0 = gdb_regs[BFIN_I0];
154 regs->i1 = gdb_regs[BFIN_I1];
155 regs->i2 = gdb_regs[BFIN_I2];
156 regs->i3 = gdb_regs[BFIN_I3];
157 regs->m0 = gdb_regs[BFIN_M0];
158 regs->m1 = gdb_regs[BFIN_M1];
159 regs->m2 = gdb_regs[BFIN_M2];
160 regs->m3 = gdb_regs[BFIN_M3];
161 regs->b0 = gdb_regs[BFIN_B0];
162 regs->b1 = gdb_regs[BFIN_B1];
163 regs->b2 = gdb_regs[BFIN_B2];
164 regs->b3 = gdb_regs[BFIN_B3];
165 regs->l0 = gdb_regs[BFIN_L0];
166 regs->l1 = gdb_regs[BFIN_L1];
167 regs->l2 = gdb_regs[BFIN_L2];
168 regs->l3 = gdb_regs[BFIN_L3];
169 regs->a0x = gdb_regs[BFIN_A0_DOT_X];
170 regs->a0w = gdb_regs[BFIN_A0_DOT_W];
171 regs->a1x = gdb_regs[BFIN_A1_DOT_X];
172 regs->a1w = gdb_regs[BFIN_A1_DOT_W];
173 regs->rets = gdb_regs[BFIN_RETS];
174 regs->lc0 = gdb_regs[BFIN_LC0];
175 regs->lt0 = gdb_regs[BFIN_LT0];
176 regs->lb0 = gdb_regs[BFIN_LB0];
177 regs->lc1 = gdb_regs[BFIN_LC1];
178 regs->lt1 = gdb_regs[BFIN_LT1];
179 regs->lb1 = gdb_regs[BFIN_LB1];
180 regs->usp = gdb_regs[BFIN_USP];
181 regs->syscfg = gdb_regs[BFIN_SYSCFG];
182 regs->retx = gdb_regs[BFIN_PC];
183 regs->retn = gdb_regs[BFIN_RETN];
184 regs->rete = gdb_regs[BFIN_RETE];
185 regs->pc = gdb_regs[BFIN_PC];
186
187#if 0 /* can't change these */
188 regs->astat = gdb_regs[BFIN_ASTAT];
189 regs->seqstat = gdb_regs[BFIN_SEQSTAT];
190 regs->ipend = gdb_regs[BFIN_IPEND];
191#endif
192}
193
194struct hw_breakpoint {
195 unsigned int occupied:1;
196 unsigned int skip:1;
197 unsigned int enabled:1;
198 unsigned int type:1;
199 unsigned int dataacc:2;
200 unsigned short count;
201 unsigned int addr;
202} breakinfo[HW_BREAKPOINT_NUM];
203
204int kgdb_arch_init(void)
205{
206 kgdb_remove_all_hw_break();
207 return 0;
208}
209
210int kgdb_set_hw_break(unsigned long addr)
211{
212 int breakno;
213 for (breakno = 0; breakno < HW_BREAKPOINT_NUM; breakno++)
214 if (!breakinfo[breakno].occupied) {
215 breakinfo[breakno].occupied = 1;
216 breakinfo[breakno].enabled = 1;
217 breakinfo[breakno].type = 1;
218 breakinfo[breakno].addr = addr;
219 return 0;
220 }
221
222 return -ENOSPC;
223}
224
225int kgdb_remove_hw_break(unsigned long addr)
226{
227 int breakno;
228 for (breakno = 0; breakno < HW_BREAKPOINT_NUM; breakno++)
229 if (breakinfo[breakno].addr == addr)
230 memset(&(breakinfo[breakno]), 0, sizeof(struct hw_breakpoint));
231
232 return 0;
233}
234
235void kgdb_remove_all_hw_break(void)
236{
237 memset(breakinfo, 0, sizeof(struct hw_breakpoint)*8);
238}
239
240/*
241void kgdb_show_info(void)
242{
243 printk(KERN_DEBUG "hwd: wpia0=0x%x, wpiacnt0=%d, wpiactl=0x%x, wpstat=0x%x\n",
244 bfin_read_WPIA0(), bfin_read_WPIACNT0(),
245 bfin_read_WPIACTL(), bfin_read_WPSTAT());
246}
247*/
248
249void kgdb_correct_hw_break(void)
250{
251 int breakno;
252 int correctit;
253 uint32_t wpdactl = bfin_read_WPDACTL();
254
255 correctit = 0;
256 for (breakno = 0; breakno < HW_BREAKPOINT_NUM; breakno++) {
257 if (breakinfo[breakno].type == 1) {
258 switch (breakno) {
259 case 0:
260 if (breakinfo[breakno].enabled && !(wpdactl & WPIAEN0)) {
261 correctit = 1;
262 wpdactl &= ~(WPIREN01|EMUSW0);
263 wpdactl |= WPIAEN0|WPICNTEN0;
264 bfin_write_WPIA0(breakinfo[breakno].addr);
265 bfin_write_WPIACNT0(breakinfo[breakno].skip);
266 } else if (!breakinfo[breakno].enabled && (wpdactl & WPIAEN0)) {
267 correctit = 1;
268 wpdactl &= ~WPIAEN0;
269 }
270 break;
271
272 case 1:
273 if (breakinfo[breakno].enabled && !(wpdactl & WPIAEN1)) {
274 correctit = 1;
275 wpdactl &= ~(WPIREN01|EMUSW1);
276 wpdactl |= WPIAEN1|WPICNTEN1;
277 bfin_write_WPIA1(breakinfo[breakno].addr);
278 bfin_write_WPIACNT1(breakinfo[breakno].skip);
279 } else if (!breakinfo[breakno].enabled && (wpdactl & WPIAEN1)) {
280 correctit = 1;
281 wpdactl &= ~WPIAEN1;
282 }
283 break;
284
285 case 2:
286 if (breakinfo[breakno].enabled && !(wpdactl & WPIAEN2)) {
287 correctit = 1;
288 wpdactl &= ~(WPIREN23|EMUSW2);
289 wpdactl |= WPIAEN2|WPICNTEN2;
290 bfin_write_WPIA2(breakinfo[breakno].addr);
291 bfin_write_WPIACNT2(breakinfo[breakno].skip);
292 } else if (!breakinfo[breakno].enabled && (wpdactl & WPIAEN2)) {
293 correctit = 1;
294 wpdactl &= ~WPIAEN2;
295 }
296 break;
297
298 case 3:
299 if (breakinfo[breakno].enabled && !(wpdactl & WPIAEN3)) {
300 correctit = 1;
301 wpdactl &= ~(WPIREN23|EMUSW3);
302 wpdactl |= WPIAEN3|WPICNTEN3;
303 bfin_write_WPIA3(breakinfo[breakno].addr);
304 bfin_write_WPIACNT3(breakinfo[breakno].skip);
305 } else if (!breakinfo[breakno].enabled && (wpdactl & WPIAEN3)) {
306 correctit = 1;
307 wpdactl &= ~WPIAEN3;
308 }
309 break;
310 case 4:
311 if (breakinfo[breakno].enabled && !(wpdactl & WPIAEN4)) {
312 correctit = 1;
313 wpdactl &= ~(WPIREN45|EMUSW4);
314 wpdactl |= WPIAEN4|WPICNTEN4;
315 bfin_write_WPIA4(breakinfo[breakno].addr);
316 bfin_write_WPIACNT4(breakinfo[breakno].skip);
317 } else if (!breakinfo[breakno].enabled && (wpdactl & WPIAEN4)) {
318 correctit = 1;
319 wpdactl &= ~WPIAEN4;
320 }
321 break;
322 case 5:
323 if (breakinfo[breakno].enabled && !(wpdactl & WPIAEN5)) {
324 correctit = 1;
325 wpdactl &= ~(WPIREN45|EMUSW5);
326 wpdactl |= WPIAEN5|WPICNTEN5;
327 bfin_write_WPIA5(breakinfo[breakno].addr);
328 bfin_write_WPIACNT5(breakinfo[breakno].skip);
329 } else if (!breakinfo[breakno].enabled && (wpdactl & WPIAEN5)) {
330 correctit = 1;
331 wpdactl &= ~WPIAEN5;
332 }
333 break;
334 }
335 }
336 }
337 if (correctit) {
338 wpdactl &= ~WPAND;
339 wpdactl |= WPPWR;
340 /*printk("correct_hw_break: wpdactl=0x%x\n", wpdactl);*/
341 bfin_write_WPDACTL(wpdactl);
342 CSYNC();
343 /*kgdb_show_info();*/
344 }
345}
346
347void kgdb_disable_hw_debug(struct pt_regs *regs)
348{
349 /* Disable hardware debugging while we are in kgdb */
350 bfin_write_WPIACTL(bfin_read_WPIACTL() & ~0x1);
351 CSYNC();
352}
353
354void kgdb_post_master_code(struct pt_regs *regs, int eVector, int err_code)
355{
356 /* Master processor is completely in the debugger */
357 gdb_bf533vector = eVector;
358 gdb_bf533errcode = err_code;
359}
360
361int kgdb_arch_handle_exception(int exceptionVector, int signo,
362 int err_code, char *remcom_in_buffer,
363 char *remcom_out_buffer,
364 struct pt_regs *linux_regs)
365{
366 long addr;
367 long breakno;
368 char *ptr;
369 int newPC;
370 int wp_status;
371
372 switch (remcom_in_buffer[0]) {
373 case 'c':
374 case 's':
375 if (kgdb_contthread && kgdb_contthread != current) {
376 strcpy(remcom_out_buffer, "E00");
377 break;
378 }
379
380 kgdb_contthread = NULL;
381
382 /* try to read optional parameter, pc unchanged if no parm */
383 ptr = &remcom_in_buffer[1];
384 if (kgdb_hex2long(&ptr, &addr)) {
385 linux_regs->retx = addr;
386 }
387 newPC = linux_regs->retx;
388
389 /* clear the trace bit */
390 linux_regs->syscfg &= 0xfffffffe;
391
392 /* set the trace bit if we're stepping */
393 if (remcom_in_buffer[0] == 's') {
394 linux_regs->syscfg |= 0x1;
395 debugger_step = 1;
396 }
397
398 wp_status = bfin_read_WPSTAT();
399 CSYNC();
400
401 if (exceptionVector == VEC_WATCH) {
402 for (breakno = 0; breakno < 6; ++breakno) {
403 if (wp_status & (1 << breakno)) {
404 breakinfo->skip = 1;
405 break;
406 }
407 }
408 }
409 kgdb_correct_hw_break();
410
411 bfin_write_WPSTAT(0);
412
413 return 0;
414 } /* switch */
415 return -1; /* this means that we do not want to exit from the handler */
416}
417
418struct kgdb_arch arch_kgdb_ops = {
419 .gdb_bpt_instr = {0xa1},
420 .flags = KGDB_HW_BREAKPOINT,
421};
diff --git a/arch/blackfin/kernel/module.c b/arch/blackfin/kernel/module.c
index 372f756f1ad9..8b9fe29d03f4 100644
--- a/arch/blackfin/kernel/module.c
+++ b/arch/blackfin/kernel/module.c
@@ -165,8 +165,8 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs,
165 165
166 for (s = sechdrs; s < sechdrs_end; ++s) { 166 for (s = sechdrs; s < sechdrs_end; ++s) {
167 if ((strcmp(".l1.text", secstrings + s->sh_name) == 0) || 167 if ((strcmp(".l1.text", secstrings + s->sh_name) == 0) ||
168 ((strcmp(".text", secstrings + s->sh_name)==0) && 168 ((strcmp(".text", secstrings + s->sh_name) == 0) &&
169 (hdr->e_flags & FLG_CODE_IN_L1) && (s->sh_size > 0))) { 169 (hdr->e_flags & FLG_CODE_IN_L1) && (s->sh_size > 0))) {
170 mod->arch.text_l1 = s; 170 mod->arch.text_l1 = s;
171 dest = l1_inst_sram_alloc(s->sh_size); 171 dest = l1_inst_sram_alloc(s->sh_size);
172 if (dest == NULL) { 172 if (dest == NULL) {
@@ -179,9 +179,9 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs,
179 s->sh_flags &= ~SHF_ALLOC; 179 s->sh_flags &= ~SHF_ALLOC;
180 s->sh_addr = (unsigned long)dest; 180 s->sh_addr = (unsigned long)dest;
181 } 181 }
182 if ((strcmp(".l1.data", secstrings + s->sh_name) == 0)|| 182 if ((strcmp(".l1.data", secstrings + s->sh_name) == 0) ||
183 ((strcmp(".data", secstrings + s->sh_name)==0) && 183 ((strcmp(".data", secstrings + s->sh_name) == 0) &&
184 (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) { 184 (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) {
185 mod->arch.data_a_l1 = s; 185 mod->arch.data_a_l1 = s;
186 dest = l1_data_sram_alloc(s->sh_size); 186 dest = l1_data_sram_alloc(s->sh_size);
187 if (dest == NULL) { 187 if (dest == NULL) {
@@ -195,8 +195,8 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs,
195 s->sh_addr = (unsigned long)dest; 195 s->sh_addr = (unsigned long)dest;
196 } 196 }
197 if (strcmp(".l1.bss", secstrings + s->sh_name) == 0 || 197 if (strcmp(".l1.bss", secstrings + s->sh_name) == 0 ||
198 ((strcmp(".bss", secstrings + s->sh_name)==0) && 198 ((strcmp(".bss", secstrings + s->sh_name) == 0) &&
199 (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) { 199 (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) {
200 mod->arch.bss_a_l1 = s; 200 mod->arch.bss_a_l1 = s;
201 dest = l1_data_sram_alloc(s->sh_size); 201 dest = l1_data_sram_alloc(s->sh_size);
202 if (dest == NULL) { 202 if (dest == NULL) {
@@ -326,7 +326,7 @@ apply_relocate_add(Elf_Shdr * sechdrs, const char *strtab,
326 pr_debug("before %x after %x\n", *location16, 326 pr_debug("before %x after %x\n", *location16,
327 (value & 0xffff)); 327 (value & 0xffff));
328 tmp = (value & 0xffff); 328 tmp = (value & 0xffff);
329 if((unsigned long)location16 >= L1_CODE_START) { 329 if ((unsigned long)location16 >= L1_CODE_START) {
330 dma_memcpy(location16, &tmp, 2); 330 dma_memcpy(location16, &tmp, 2);
331 } else 331 } else
332 *location16 = tmp; 332 *location16 = tmp;
@@ -335,7 +335,7 @@ apply_relocate_add(Elf_Shdr * sechdrs, const char *strtab,
335 pr_debug("before %x after %x\n", *location16, 335 pr_debug("before %x after %x\n", *location16,
336 ((value >> 16) & 0xffff)); 336 ((value >> 16) & 0xffff));
337 tmp = ((value >> 16) & 0xffff); 337 tmp = ((value >> 16) & 0xffff);
338 if((unsigned long)location16 >= L1_CODE_START) { 338 if ((unsigned long)location16 >= L1_CODE_START) {
339 dma_memcpy(location16, &tmp, 2); 339 dma_memcpy(location16, &tmp, 2);
340 } else 340 } else
341 *location16 = tmp; 341 *location16 = tmp;
@@ -404,8 +404,8 @@ module_finalize(const Elf_Ehdr * hdr,
404 continue; 404 continue;
405 405
406 if ((sechdrs[i].sh_type == SHT_RELA) && 406 if ((sechdrs[i].sh_type == SHT_RELA) &&
407 ((strcmp(".rela.l1.text", secstrings + sechdrs[i].sh_name) == 0)|| 407 ((strcmp(".rela.l1.text", secstrings + sechdrs[i].sh_name) == 0) ||
408 ((strcmp(".rela.text", secstrings + sechdrs[i].sh_name) == 0) && 408 ((strcmp(".rela.text", secstrings + sechdrs[i].sh_name) == 0) &&
409 (hdr->e_flags & FLG_CODE_IN_L1)))) { 409 (hdr->e_flags & FLG_CODE_IN_L1)))) {
410 apply_relocate_add((Elf_Shdr *) sechdrs, strtab, 410 apply_relocate_add((Elf_Shdr *) sechdrs, strtab,
411 symindex, i, mod); 411 symindex, i, mod);
@@ -417,13 +417,13 @@ module_finalize(const Elf_Ehdr * hdr,
417void module_arch_cleanup(struct module *mod) 417void module_arch_cleanup(struct module *mod)
418{ 418{
419 if ((mod->arch.text_l1) && (mod->arch.text_l1->sh_addr)) 419 if ((mod->arch.text_l1) && (mod->arch.text_l1->sh_addr))
420 l1_inst_sram_free((void*)mod->arch.text_l1->sh_addr); 420 l1_inst_sram_free((void *)mod->arch.text_l1->sh_addr);
421 if ((mod->arch.data_a_l1) && (mod->arch.data_a_l1->sh_addr)) 421 if ((mod->arch.data_a_l1) && (mod->arch.data_a_l1->sh_addr))
422 l1_data_sram_free((void*)mod->arch.data_a_l1->sh_addr); 422 l1_data_sram_free((void *)mod->arch.data_a_l1->sh_addr);
423 if ((mod->arch.bss_a_l1) && (mod->arch.bss_a_l1->sh_addr)) 423 if ((mod->arch.bss_a_l1) && (mod->arch.bss_a_l1->sh_addr))
424 l1_data_sram_free((void*)mod->arch.bss_a_l1->sh_addr); 424 l1_data_sram_free((void *)mod->arch.bss_a_l1->sh_addr);
425 if ((mod->arch.data_b_l1) && (mod->arch.data_b_l1->sh_addr)) 425 if ((mod->arch.data_b_l1) && (mod->arch.data_b_l1->sh_addr))
426 l1_data_B_sram_free((void*)mod->arch.data_b_l1->sh_addr); 426 l1_data_B_sram_free((void *)mod->arch.data_b_l1->sh_addr);
427 if ((mod->arch.bss_b_l1) && (mod->arch.bss_b_l1->sh_addr)) 427 if ((mod->arch.bss_b_l1) && (mod->arch.bss_b_l1->sh_addr))
428 l1_data_B_sram_free((void*)mod->arch.bss_b_l1->sh_addr); 428 l1_data_B_sram_free((void *)mod->arch.bss_b_l1->sh_addr);
429} 429}
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 3eff7439d8d3..5a51dd6ab280 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -32,9 +32,10 @@
32#include <linux/unistd.h> 32#include <linux/unistd.h>
33#include <linux/user.h> 33#include <linux/user.h>
34#include <linux/a.out.h> 34#include <linux/a.out.h>
35#include <linux/uaccess.h>
35 36
36#include <asm/blackfin.h> 37#include <asm/blackfin.h>
37#include <asm/uaccess.h> 38#include <asm/fixed_code.h>
38 39
39#define LED_ON 0 40#define LED_ON 0
40#define LED_OFF 1 41#define LED_OFF 1
@@ -173,8 +174,8 @@ void show_regs(struct pt_regs *regs)
173 printk(KERN_NOTICE "R4: %08lx R5: %08lx R6: %08lx R7: %08lx\n", 174 printk(KERN_NOTICE "R4: %08lx R5: %08lx R6: %08lx R7: %08lx\n",
174 regs->r4, regs->r5, regs->r6, regs->r7); 175 regs->r4, regs->r5, regs->r6, regs->r7);
175 176
176 if (!(regs->ipend)) 177 if (!regs->ipend)
177 printk("USP: %08lx\n", rdusp()); 178 printk(KERN_NOTICE "USP: %08lx\n", rdusp());
178} 179}
179 180
180/* Fill in the fpu structure for a core dump. */ 181/* Fill in the fpu structure for a core dump. */
@@ -322,7 +323,7 @@ asmlinkage int sys_execve(char *name, char **argv, char **envp)
322 goto out; 323 goto out;
323 error = do_execve(filename, argv, envp, regs); 324 error = do_execve(filename, argv, envp, regs);
324 putname(filename); 325 putname(filename);
325 out: 326 out:
326 unlock_kernel(); 327 unlock_kernel();
327 return error; 328 return error;
328} 329}
@@ -350,13 +351,77 @@ unsigned long get_wchan(struct task_struct *p)
350 return 0; 351 return 0;
351} 352}
352 353
354void finish_atomic_sections (struct pt_regs *regs)
355{
356 if (regs->pc < ATOMIC_SEQS_START || regs->pc >= ATOMIC_SEQS_END)
357 return;
358
359 switch (regs->pc) {
360 case ATOMIC_XCHG32 + 2:
361 put_user(regs->r1, (int *)regs->p0);
362 regs->pc += 2;
363 break;
364
365 case ATOMIC_CAS32 + 2:
366 case ATOMIC_CAS32 + 4:
367 if (regs->r0 == regs->r1)
368 put_user(regs->r2, (int *)regs->p0);
369 regs->pc = ATOMIC_CAS32 + 8;
370 break;
371 case ATOMIC_CAS32 + 6:
372 put_user(regs->r2, (int *)regs->p0);
373 regs->pc += 2;
374 break;
375
376 case ATOMIC_ADD32 + 2:
377 regs->r0 = regs->r1 + regs->r0;
378 /* fall through */
379 case ATOMIC_ADD32 + 4:
380 put_user(regs->r0, (int *)regs->p0);
381 regs->pc = ATOMIC_ADD32 + 6;
382 break;
383
384 case ATOMIC_SUB32 + 2:
385 regs->r0 = regs->r1 - regs->r0;
386 /* fall through */
387 case ATOMIC_SUB32 + 4:
388 put_user(regs->r0, (int *)regs->p0);
389 regs->pc = ATOMIC_SUB32 + 6;
390 break;
391
392 case ATOMIC_IOR32 + 2:
393 regs->r0 = regs->r1 | regs->r0;
394 /* fall through */
395 case ATOMIC_IOR32 + 4:
396 put_user(regs->r0, (int *)regs->p0);
397 regs->pc = ATOMIC_IOR32 + 6;
398 break;
399
400 case ATOMIC_AND32 + 2:
401 regs->r0 = regs->r1 & regs->r0;
402 /* fall through */
403 case ATOMIC_AND32 + 4:
404 put_user(regs->r0, (int *)regs->p0);
405 regs->pc = ATOMIC_AND32 + 6;
406 break;
407
408 case ATOMIC_XOR32 + 2:
409 regs->r0 = regs->r1 ^ regs->r0;
410 /* fall through */
411 case ATOMIC_XOR32 + 4:
412 put_user(regs->r0, (int *)regs->p0);
413 regs->pc = ATOMIC_XOR32 + 6;
414 break;
415 }
416}
417
353#if defined(CONFIG_ACCESS_CHECK) 418#if defined(CONFIG_ACCESS_CHECK)
354int _access_ok(unsigned long addr, unsigned long size) 419int _access_ok(unsigned long addr, unsigned long size)
355{ 420{
356 421
357 if (addr > (addr + size)) 422 if (addr > (addr + size))
358 return 0; 423 return 0;
359 if (segment_eq(get_fs(),KERNEL_DS)) 424 if (segment_eq(get_fs(), KERNEL_DS))
360 return 1; 425 return 1;
361#ifdef CONFIG_MTD_UCLINUX 426#ifdef CONFIG_MTD_UCLINUX
362 if (addr >= memory_start && (addr + size) <= memory_end) 427 if (addr >= memory_start && (addr + size) <= memory_end)
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c
index e718bb4a1ef0..ed800c7456dd 100644
--- a/arch/blackfin/kernel/ptrace.c
+++ b/arch/blackfin/kernel/ptrace.c
@@ -36,8 +36,8 @@
36#include <linux/ptrace.h> 36#include <linux/ptrace.h>
37#include <linux/user.h> 37#include <linux/user.h>
38#include <linux/signal.h> 38#include <linux/signal.h>
39#include <linux/uaccess.h>
39 40
40#include <asm/uaccess.h>
41#include <asm/page.h> 41#include <asm/page.h>
42#include <asm/pgtable.h> 42#include <asm/pgtable.h>
43#include <asm/system.h> 43#include <asm/system.h>
@@ -122,7 +122,7 @@ static inline long get_reg(struct task_struct *task, int regno)
122static inline int 122static inline int
123put_reg(struct task_struct *task, int regno, unsigned long data) 123put_reg(struct task_struct *task, int regno, unsigned long data)
124{ 124{
125 char * reg_ptr; 125 char *reg_ptr;
126 126
127 struct pt_regs *regs = 127 struct pt_regs *regs =
128 (struct pt_regs *)((unsigned long)task_stack_page(task) + 128 (struct pt_regs *)((unsigned long)task_stack_page(task) +
@@ -146,7 +146,7 @@ put_reg(struct task_struct *task, int regno, unsigned long data)
146 break; 146 break;
147 default: 147 default:
148 if (regno <= 216) 148 if (regno <= 216)
149 *(long *)(reg_ptr + regno) = data; 149 *(long *)(reg_ptr + regno) = data;
150 } 150 }
151 return 0; 151 return 0;
152} 152}
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index 02dc74301920..f59dcee7bae3 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -42,6 +42,7 @@
42#include <asm/cacheflush.h> 42#include <asm/cacheflush.h>
43#include <asm/blackfin.h> 43#include <asm/blackfin.h>
44#include <asm/cplbinit.h> 44#include <asm/cplbinit.h>
45#include <asm/fixed_code.h>
45 46
46u16 _bfin_swrst; 47u16 _bfin_swrst;
47 48
@@ -61,11 +62,7 @@ EXPORT_SYMBOL(memory_mtd_start);
61EXPORT_SYMBOL(mtd_size); 62EXPORT_SYMBOL(mtd_size);
62#endif 63#endif
63 64
64char command_line[COMMAND_LINE_SIZE]; 65char __initdata command_line[COMMAND_LINE_SIZE];
65
66#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE)
67static void generate_cpl_tables(void);
68#endif
69 66
70void __init bf53x_cache_init(void) 67void __init bf53x_cache_init(void)
71{ 68{
@@ -90,7 +87,7 @@ void __init bf53x_cache_init(void)
90#endif 87#endif
91} 88}
92 89
93void bf53x_relocate_l1_mem(void) 90void __init bf53x_relocate_l1_mem(void)
94{ 91{
95 unsigned long l1_code_length; 92 unsigned long l1_code_length;
96 unsigned long l1_data_a_length; 93 unsigned long l1_data_a_length;
@@ -197,6 +194,17 @@ void __init setup_arch(char **cmdline_p)
197 /* this give a chance to get printk() working before crash. */ 194 /* this give a chance to get printk() working before crash. */
198#endif 195#endif
199 196
197 printk(KERN_INFO "Hardware Trace ");
198 if (bfin_read_TBUFCTL() & 0x1 )
199 printk("Active ");
200 else
201 printk("Off ");
202 if (bfin_read_TBUFCTL() & 0x2)
203 printk("and Enabled\n");
204 else
205 printk("and Disabled\n");
206
207
200#if defined(CONFIG_CHR_DEV_FLASH) || defined(CONFIG_BLK_DEV_FLASH) 208#if defined(CONFIG_CHR_DEV_FLASH) || defined(CONFIG_BLK_DEV_FLASH)
201 /* we need to initialize the Flashrom device here since we might 209 /* we need to initialize the Flashrom device here since we might
202 * do things with flash early on in the boot 210 * do things with flash early on in the boot
@@ -205,7 +213,6 @@ void __init setup_arch(char **cmdline_p)
205#endif 213#endif
206 214
207#if defined(CONFIG_CMDLINE_BOOL) 215#if defined(CONFIG_CMDLINE_BOOL)
208 memset(command_line, 0, sizeof(command_line));
209 strncpy(&command_line[0], CONFIG_CMDLINE, sizeof(command_line)); 216 strncpy(&command_line[0], CONFIG_CMDLINE, sizeof(command_line));
210 command_line[sizeof(command_line) - 1] = 0; 217 command_line[sizeof(command_line) - 1] = 0;
211#endif 218#endif
@@ -213,7 +220,7 @@ void __init setup_arch(char **cmdline_p)
213 /* Keep a copy of command line */ 220 /* Keep a copy of command line */
214 *cmdline_p = &command_line[0]; 221 *cmdline_p = &command_line[0];
215 memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); 222 memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
216 boot_command_line[COMMAND_LINE_SIZE - 1] = 0; 223 boot_command_line[COMMAND_LINE_SIZE - 1] = '\0';
217 224
218 /* setup memory defaults from the user config */ 225 /* setup memory defaults from the user config */
219 physical_mem_end = 0; 226 physical_mem_end = 0;
@@ -308,10 +315,20 @@ void __init setup_arch(char **cmdline_p)
308 init_leds(); 315 init_leds();
309 316
310 printk(KERN_INFO "Blackfin support (C) 2004-2007 Analog Devices, Inc.\n"); 317 printk(KERN_INFO "Blackfin support (C) 2004-2007 Analog Devices, Inc.\n");
311 printk(KERN_INFO "Compiled for ADSP-%s Rev 0.%d\n", CPU, bfin_compiled_revid()); 318 if (bfin_compiled_revid() == 0xffff)
312 if (bfin_revid() != bfin_compiled_revid()) 319 printk(KERN_INFO "Compiled for ADSP-%s Rev any\n", CPU);
313 printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n", 320 else if (bfin_compiled_revid() == -1)
314 bfin_compiled_revid(), bfin_revid()); 321 printk(KERN_INFO "Compiled for ADSP-%s Rev none\n", CPU);
322 else
323 printk(KERN_INFO "Compiled for ADSP-%s Rev 0.%d\n", CPU, bfin_compiled_revid());
324 if (bfin_revid() != bfin_compiled_revid()) {
325 if (bfin_compiled_revid() == -1)
326 printk(KERN_ERR "Warning: Compiled for Rev none, but running on Rev %d\n",
327 bfin_revid());
328 else if (bfin_compiled_revid() != 0xffff)
329 printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n",
330 bfin_compiled_revid(), bfin_revid());
331 }
315 if (bfin_revid() < SUPPORTED_REVID) 332 if (bfin_revid() < SUPPORTED_REVID)
316 printk(KERN_ERR "Warning: Unsupported Chip Revision ADSP-%s Rev 0.%d detected\n", 333 printk(KERN_ERR "Warning: Unsupported Chip Revision ADSP-%s Rev 0.%d detected\n",
317 CPU, bfin_revid()); 334 CPU, bfin_revid());
@@ -330,9 +347,10 @@ void __init setup_arch(char **cmdline_p)
330 347
331 printk(KERN_INFO "Memory map:\n" 348 printk(KERN_INFO "Memory map:\n"
332 KERN_INFO " text = 0x%p-0x%p\n" 349 KERN_INFO " text = 0x%p-0x%p\n"
333 KERN_INFO " init = 0x%p-0x%p\n" 350 KERN_INFO " rodata = 0x%p-0x%p\n"
334 KERN_INFO " data = 0x%p-0x%p\n" 351 KERN_INFO " data = 0x%p-0x%p\n"
335 KERN_INFO " stack = 0x%p-0x%p\n" 352 KERN_INFO " stack = 0x%p-0x%p\n"
353 KERN_INFO " init = 0x%p-0x%p\n"
336 KERN_INFO " bss = 0x%p-0x%p\n" 354 KERN_INFO " bss = 0x%p-0x%p\n"
337 KERN_INFO " available = 0x%p-0x%p\n" 355 KERN_INFO " available = 0x%p-0x%p\n"
338#ifdef CONFIG_MTD_UCLINUX 356#ifdef CONFIG_MTD_UCLINUX
@@ -342,16 +360,17 @@ void __init setup_arch(char **cmdline_p)
342 KERN_INFO " DMA Zone = 0x%p-0x%p\n" 360 KERN_INFO " DMA Zone = 0x%p-0x%p\n"
343#endif 361#endif
344 , _stext, _etext, 362 , _stext, _etext,
345 __init_begin, __init_end, 363 __start_rodata, __end_rodata,
346 _sdata, _edata, 364 _sdata, _edata,
347 (void*)&init_thread_union, (void*)((int)(&init_thread_union) + 0x2000), 365 (void *)&init_thread_union, (void *)((int)(&init_thread_union) + 0x2000),
366 __init_begin, __init_end,
348 __bss_start, __bss_stop, 367 __bss_start, __bss_stop,
349 (void*)_ramstart, (void*)memory_end 368 (void *)_ramstart, (void *)memory_end
350#ifdef CONFIG_MTD_UCLINUX 369#ifdef CONFIG_MTD_UCLINUX
351 , (void*)memory_mtd_start, (void*)(memory_mtd_start + mtd_size) 370 , (void *)memory_mtd_start, (void *)(memory_mtd_start + mtd_size)
352#endif 371#endif
353#if DMA_UNCACHED_REGION > 0 372#if DMA_UNCACHED_REGION > 0
354 , (void*)(_ramend - DMA_UNCACHED_REGION), (void*)(_ramend) 373 , (void *)(_ramend - DMA_UNCACHED_REGION), (void *)(_ramend)
355#endif 374#endif
356 ); 375 );
357 376
@@ -377,11 +396,11 @@ void __init setup_arch(char **cmdline_p)
377 /* check the size of the l1 area */ 396 /* check the size of the l1 area */
378 l1_length = _etext_l1 - _stext_l1; 397 l1_length = _etext_l1 - _stext_l1;
379 if (l1_length > L1_CODE_LENGTH) 398 if (l1_length > L1_CODE_LENGTH)
380 panic("L1 memory overflow\n"); 399 panic("L1 code memory overflow\n");
381 400
382 l1_length = _ebss_l1 - _sdata_l1; 401 l1_length = _ebss_l1 - _sdata_l1;
383 if (l1_length > L1_DATA_A_LENGTH) 402 if (l1_length > L1_DATA_A_LENGTH)
384 panic("L1 memory overflow\n"); 403 panic("L1 data memory overflow\n");
385 404
386#ifdef BF561_FAMILY 405#ifdef BF561_FAMILY
387 _bfin_swrst = bfin_read_SICA_SWRST(); 406 _bfin_swrst = bfin_read_SICA_SWRST();
@@ -389,10 +408,28 @@ void __init setup_arch(char **cmdline_p)
389 _bfin_swrst = bfin_read_SWRST(); 408 _bfin_swrst = bfin_read_SWRST();
390#endif 409#endif
391 410
392 bf53x_cache_init(); 411 /* Copy atomic sequences to their fixed location, and sanity check that
412 these locations are the ones that we advertise to userspace. */
413 memcpy((void *)FIXED_CODE_START, &fixed_code_start,
414 FIXED_CODE_END - FIXED_CODE_START);
415 BUG_ON((char *)&sigreturn_stub - (char *)&fixed_code_start
416 != SIGRETURN_STUB - FIXED_CODE_START);
417 BUG_ON((char *)&atomic_xchg32 - (char *)&fixed_code_start
418 != ATOMIC_XCHG32 - FIXED_CODE_START);
419 BUG_ON((char *)&atomic_cas32 - (char *)&fixed_code_start
420 != ATOMIC_CAS32 - FIXED_CODE_START);
421 BUG_ON((char *)&atomic_add32 - (char *)&fixed_code_start
422 != ATOMIC_ADD32 - FIXED_CODE_START);
423 BUG_ON((char *)&atomic_sub32 - (char *)&fixed_code_start
424 != ATOMIC_SUB32 - FIXED_CODE_START);
425 BUG_ON((char *)&atomic_ior32 - (char *)&fixed_code_start
426 != ATOMIC_IOR32 - FIXED_CODE_START);
427 BUG_ON((char *)&atomic_and32 - (char *)&fixed_code_start
428 != ATOMIC_AND32 - FIXED_CODE_START);
429 BUG_ON((char *)&atomic_xor32 - (char *)&fixed_code_start
430 != ATOMIC_XOR32 - FIXED_CODE_START);
393 431
394 printk(KERN_INFO "Hardware Trace Enabled\n"); 432 bf53x_cache_init();
395 bfin_write_TBUFCTL(0x03);
396} 433}
397 434
398static int __init topology_init(void) 435static int __init topology_init(void)
@@ -410,278 +447,7 @@ static int __init topology_init(void)
410 447
411subsys_initcall(topology_init); 448subsys_initcall(topology_init);
412 449
413#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE) 450static u_long get_vco(void)
414u16 lock_kernel_check(u32 start, u32 end)
415{
416 if ((start <= (u32) _stext && end >= (u32) _end)
417 || (start >= (u32) _stext && end <= (u32) _end))
418 return IN_KERNEL;
419 return 0;
420}
421
422static unsigned short __init
423fill_cplbtab(struct cplb_tab *table,
424 unsigned long start, unsigned long end,
425 unsigned long block_size, unsigned long cplb_data)
426{
427 int i;
428
429 switch (block_size) {
430 case SIZE_4M:
431 i = 3;
432 break;
433 case SIZE_1M:
434 i = 2;
435 break;
436 case SIZE_4K:
437 i = 1;
438 break;
439 case SIZE_1K:
440 default:
441 i = 0;
442 break;
443 }
444
445 cplb_data = (cplb_data & ~(3 << 16)) | (i << 16);
446
447 while ((start < end) && (table->pos < table->size)) {
448
449 table->tab[table->pos++] = start;
450
451 if (lock_kernel_check(start, start + block_size) == IN_KERNEL)
452 table->tab[table->pos++] =
453 cplb_data | CPLB_LOCK | CPLB_DIRTY;
454 else
455 table->tab[table->pos++] = cplb_data;
456
457 start += block_size;
458 }
459 return 0;
460}
461
462static unsigned short __init
463close_cplbtab(struct cplb_tab *table)
464{
465
466 while (table->pos < table->size) {
467
468 table->tab[table->pos++] = 0;
469 table->tab[table->pos++] = 0; /* !CPLB_VALID */
470 }
471 return 0;
472}
473
474static void __init generate_cpl_tables(void)
475{
476
477 u16 i, j, process;
478 u32 a_start, a_end, as, ae, as_1m;
479
480 struct cplb_tab *t_i = NULL;
481 struct cplb_tab *t_d = NULL;
482 struct s_cplb cplb;
483
484 cplb.init_i.size = MAX_CPLBS;
485 cplb.init_d.size = MAX_CPLBS;
486 cplb.switch_i.size = MAX_SWITCH_I_CPLBS;
487 cplb.switch_d.size = MAX_SWITCH_D_CPLBS;
488
489 cplb.init_i.pos = 0;
490 cplb.init_d.pos = 0;
491 cplb.switch_i.pos = 0;
492 cplb.switch_d.pos = 0;
493
494 cplb.init_i.tab = icplb_table;
495 cplb.init_d.tab = dcplb_table;
496 cplb.switch_i.tab = ipdt_table;
497 cplb.switch_d.tab = dpdt_table;
498
499 cplb_data[SDRAM_KERN].end = memory_end;
500
501#ifdef CONFIG_MTD_UCLINUX
502 cplb_data[SDRAM_RAM_MTD].start = memory_mtd_start;
503 cplb_data[SDRAM_RAM_MTD].end = memory_mtd_start + mtd_size;
504 cplb_data[SDRAM_RAM_MTD].valid = mtd_size > 0;
505# if defined(CONFIG_ROMFS_FS)
506 cplb_data[SDRAM_RAM_MTD].attr |= I_CPLB;
507
508 /*
509 * The ROMFS_FS size is often not multiple of 1MB.
510 * This can cause multiple CPLB sets covering the same memory area.
511 * This will then cause multiple CPLB hit exceptions.
512 * Workaround: We ensure a contiguous memory area by extending the kernel
513 * memory section over the mtd section.
514 * For ROMFS_FS memory must be covered with ICPLBs anyways.
515 * So there is no difference between kernel and mtd memory setup.
516 */
517
518 cplb_data[SDRAM_KERN].end = memory_mtd_start + mtd_size;;
519 cplb_data[SDRAM_RAM_MTD].valid = 0;
520
521# endif
522#else
523 cplb_data[SDRAM_RAM_MTD].valid = 0;
524#endif
525
526 cplb_data[SDRAM_DMAZ].start = _ramend - DMA_UNCACHED_REGION;
527 cplb_data[SDRAM_DMAZ].end = _ramend;
528
529 cplb_data[RES_MEM].start = _ramend;
530 cplb_data[RES_MEM].end = physical_mem_end;
531
532 if (reserved_mem_dcache_on)
533 cplb_data[RES_MEM].d_conf = SDRAM_DGENERIC;
534 else
535 cplb_data[RES_MEM].d_conf = SDRAM_DNON_CHBL;
536
537 if (reserved_mem_icache_on)
538 cplb_data[RES_MEM].i_conf = SDRAM_IGENERIC;
539 else
540 cplb_data[RES_MEM].i_conf = SDRAM_INON_CHBL;
541
542 for (i = ZERO_P; i <= L2_MEM; i++) {
543
544 if (cplb_data[i].valid) {
545
546 as_1m = cplb_data[i].start % SIZE_1M;
547
548 /* We need to make sure all sections are properly 1M aligned
549 * However between Kernel Memory and the Kernel mtd section, depending on the
550 * rootfs size, there can be overlapping memory areas.
551 */
552
553 if (as_1m && i!=L1I_MEM && i!=L1D_MEM) {
554#ifdef CONFIG_MTD_UCLINUX
555 if (i == SDRAM_RAM_MTD) {
556 if ((cplb_data[SDRAM_KERN].end + 1) > cplb_data[SDRAM_RAM_MTD].start)
557 cplb_data[SDRAM_RAM_MTD].start = (cplb_data[i].start & (-2*SIZE_1M)) + SIZE_1M;
558 else
559 cplb_data[SDRAM_RAM_MTD].start = (cplb_data[i].start & (-2*SIZE_1M));
560 } else
561#endif
562 printk(KERN_WARNING "Unaligned Start of %s at 0x%X\n",
563 cplb_data[i].name, cplb_data[i].start);
564 }
565
566 as = cplb_data[i].start % SIZE_4M;
567 ae = cplb_data[i].end % SIZE_4M;
568
569 if (as)
570 a_start = cplb_data[i].start + (SIZE_4M - (as));
571 else
572 a_start = cplb_data[i].start;
573
574 a_end = cplb_data[i].end - ae;
575
576 for (j = INITIAL_T; j <= SWITCH_T; j++) {
577
578 switch (j) {
579 case INITIAL_T:
580 if (cplb_data[i].attr & INITIAL_T) {
581 t_i = &cplb.init_i;
582 t_d = &cplb.init_d;
583 process = 1;
584 } else
585 process = 0;
586 break;
587 case SWITCH_T:
588 if (cplb_data[i].attr & SWITCH_T) {
589 t_i = &cplb.switch_i;
590 t_d = &cplb.switch_d;
591 process = 1;
592 } else
593 process = 0;
594 break;
595 default:
596 process = 0;
597 break;
598 }
599
600 if (process) {
601 if (cplb_data[i].attr & I_CPLB) {
602
603 if (cplb_data[i].psize) {
604 fill_cplbtab(t_i,
605 cplb_data[i].start,
606 cplb_data[i].end,
607 cplb_data[i].psize,
608 cplb_data[i].i_conf);
609 } else {
610 /*icplb_table */
611#if (defined(CONFIG_BLKFIN_CACHE) && defined(ANOMALY_05000263))
612 if (i == SDRAM_KERN) {
613 fill_cplbtab(t_i,
614 cplb_data[i].start,
615 cplb_data[i].end,
616 SIZE_4M,
617 cplb_data[i].i_conf);
618 } else
619#endif
620 {
621 fill_cplbtab(t_i,
622 cplb_data[i].start,
623 a_start,
624 SIZE_1M,
625 cplb_data[i].i_conf);
626 fill_cplbtab(t_i,
627 a_start,
628 a_end,
629 SIZE_4M,
630 cplb_data[i].i_conf);
631 fill_cplbtab(t_i, a_end,
632 cplb_data[i].end,
633 SIZE_1M,
634 cplb_data[i].i_conf);
635 }
636 }
637
638 }
639 if (cplb_data[i].attr & D_CPLB) {
640
641 if (cplb_data[i].psize) {
642 fill_cplbtab(t_d,
643 cplb_data[i].start,
644 cplb_data[i].end,
645 cplb_data[i].psize,
646 cplb_data[i].d_conf);
647 } else {
648/*dcplb_table*/
649 fill_cplbtab(t_d,
650 cplb_data[i].start,
651 a_start, SIZE_1M,
652 cplb_data[i].d_conf);
653 fill_cplbtab(t_d, a_start,
654 a_end, SIZE_4M,
655 cplb_data[i].d_conf);
656 fill_cplbtab(t_d, a_end,
657 cplb_data[i].end,
658 SIZE_1M,
659 cplb_data[i].d_conf);
660
661 }
662
663 }
664 }
665 }
666
667 }
668 }
669
670/* close tables */
671
672 close_cplbtab(&cplb.init_i);
673 close_cplbtab(&cplb.init_d);
674
675 cplb.init_i.tab[cplb.init_i.pos] = -1;
676 cplb.init_d.tab[cplb.init_d.pos] = -1;
677 cplb.switch_i.tab[cplb.switch_i.pos] = -1;
678 cplb.switch_d.tab[cplb.switch_d.pos] = -1;
679
680}
681
682#endif
683
684static inline u_long get_vco(void)
685{ 451{
686 u_long msel; 452 u_long msel;
687 u_long vco; 453 u_long vco;
@@ -710,7 +476,6 @@ u_long get_cclk(void)
710 return get_vco() / ssel; 476 return get_vco() / ssel;
711 return get_vco() >> csel; 477 return get_vco() >> csel;
712} 478}
713
714EXPORT_SYMBOL(get_cclk); 479EXPORT_SYMBOL(get_cclk);
715 480
716/* Get the System clock */ 481/* Get the System clock */
@@ -729,7 +494,6 @@ u_long get_sclk(void)
729 494
730 return get_vco() / ssel; 495 return get_vco() / ssel;
731} 496}
732
733EXPORT_SYMBOL(get_sclk); 497EXPORT_SYMBOL(get_sclk);
734 498
735/* 499/*
@@ -784,23 +548,23 @@ static int show_cpuinfo(struct seq_file *m, void *v)
784 seq_printf(m, "D-CACHE:\tOFF\n"); 548 seq_printf(m, "D-CACHE:\tOFF\n");
785 549
786 550
787 switch(bfin_read_DMEM_CONTROL() & (1 << DMC0_P | 1 << DMC1_P)) { 551 switch (bfin_read_DMEM_CONTROL() & (1 << DMC0_P | 1 << DMC1_P)) {
788 case ACACHE_BSRAM: 552 case ACACHE_BSRAM:
789 seq_printf(m, "DBANK-A:\tCACHE\n" "DBANK-B:\tSRAM\n"); 553 seq_printf(m, "DBANK-A:\tCACHE\n" "DBANK-B:\tSRAM\n");
790 dcache_size = 16; 554 dcache_size = 16;
791 dsup_banks = 1; 555 dsup_banks = 1;
792 break; 556 break;
793 case ACACHE_BCACHE: 557 case ACACHE_BCACHE:
794 seq_printf(m, "DBANK-A:\tCACHE\n" "DBANK-B:\tCACHE\n"); 558 seq_printf(m, "DBANK-A:\tCACHE\n" "DBANK-B:\tCACHE\n");
795 dcache_size = 32; 559 dcache_size = 32;
796 dsup_banks = 2; 560 dsup_banks = 2;
797 break; 561 break;
798 case ASRAM_BSRAM: 562 case ASRAM_BSRAM:
799 seq_printf(m, "DBANK-A:\tSRAM\n" "DBANK-B:\tSRAM\n"); 563 seq_printf(m, "DBANK-A:\tSRAM\n" "DBANK-B:\tSRAM\n");
800 dcache_size = 0; 564 dcache_size = 0;
801 dsup_banks = 0; 565 dsup_banks = 0;
802 break; 566 break;
803 default: 567 default:
804 break; 568 break;
805 } 569 }
806 570
@@ -889,8 +653,8 @@ struct seq_operations cpuinfo_op = {
889 .show = show_cpuinfo, 653 .show = show_cpuinfo,
890}; 654};
891 655
892void cmdline_init(unsigned long r0) 656void __init cmdline_init(const char *r0)
893{ 657{
894 if (r0) 658 if (r0)
895 strncpy(command_line, (char *)r0, COMMAND_LINE_SIZE); 659 strncpy(command_line, r0, COMMAND_LINE_SIZE);
896} 660}
diff --git a/arch/blackfin/kernel/signal.c b/arch/blackfin/kernel/signal.c
index 316e65c3439d..5564c9588aa8 100644
--- a/arch/blackfin/kernel/signal.c
+++ b/arch/blackfin/kernel/signal.c
@@ -34,8 +34,8 @@
34#include <linux/personality.h> 34#include <linux/personality.h>
35#include <linux/binfmts.h> 35#include <linux/binfmts.h>
36#include <linux/freezer.h> 36#include <linux/freezer.h>
37#include <linux/uaccess.h>
37 38
38#include <asm/uaccess.h>
39#include <asm/cacheflush.h> 39#include <asm/cacheflush.h>
40#include <asm/ucontext.h> 40#include <asm/ucontext.h>
41 41
@@ -124,7 +124,7 @@ asmlinkage int do_rt_sigreturn(unsigned long __unused)
124 124
125 return r0; 125 return r0;
126 126
127 badframe: 127 badframe:
128 force_sig(SIGSEGV, current); 128 force_sig(SIGSEGV, current);
129 return 0; 129 return 0;
130} 130}
@@ -239,7 +239,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t * info,
239 239
240 return 0; 240 return 0;
241 241
242 give_sigsegv: 242 give_sigsegv:
243 if (sig == SIGSEGV) 243 if (sig == SIGSEGV)
244 ka->sa.sa_handler = SIG_DFL; 244 ka->sa.sa_handler = SIG_DFL;
245 force_sig(SIGSEGV, current); 245 force_sig(SIGSEGV, current);
@@ -263,7 +263,7 @@ handle_restart(struct pt_regs *regs, struct k_sigaction *ka, int has_handler)
263 } 263 }
264 /* fallthrough */ 264 /* fallthrough */
265 case -ERESTARTNOINTR: 265 case -ERESTARTNOINTR:
266 do_restart: 266 do_restart:
267 regs->p0 = regs->orig_p0; 267 regs->p0 = regs->orig_p0;
268 regs->r0 = regs->orig_r0; 268 regs->r0 = regs->orig_r0;
269 regs->pc -= 2; 269 regs->pc -= 2;
@@ -341,7 +341,7 @@ asmlinkage void do_signal(struct pt_regs *regs)
341 return; 341 return;
342 } 342 }
343 343
344no_signal: 344 no_signal:
345 /* Did we come from a system call? */ 345 /* Did we come from a system call? */
346 if (regs->orig_p0 >= 0) 346 if (regs->orig_p0 >= 0)
347 /* Restart the system call - no handlers present */ 347 /* Restart the system call - no handlers present */
diff --git a/arch/blackfin/kernel/sys_bfin.c b/arch/blackfin/kernel/sys_bfin.c
index f436e6743f5a..f5e1ae3d1705 100644
--- a/arch/blackfin/kernel/sys_bfin.c
+++ b/arch/blackfin/kernel/sys_bfin.c
@@ -37,12 +37,12 @@
37#include <linux/syscalls.h> 37#include <linux/syscalls.h>
38#include <linux/mman.h> 38#include <linux/mman.h>
39#include <linux/file.h> 39#include <linux/file.h>
40#include <linux/uaccess.h>
41#include <linux/ipc.h>
42#include <linux/unistd.h>
40 43
41#include <asm/cacheflush.h> 44#include <asm/cacheflush.h>
42#include <asm/uaccess.h>
43#include <asm/ipc.h>
44#include <asm/dma.h> 45#include <asm/dma.h>
45#include <asm/unistd.h>
46 46
47/* 47/*
48 * sys_pipe() is the normal C calling standard for creating 48 * sys_pipe() is the normal C calling standard for creating
@@ -83,7 +83,7 @@ do_mmap2(unsigned long addr, unsigned long len,
83 83
84 if (file) 84 if (file)
85 fput(file); 85 fput(file);
86 out: 86 out:
87 return error; 87 return error;
88} 88}
89 89
diff --git a/arch/blackfin/kernel/time.c b/arch/blackfin/kernel/time.c
index f578176b6d92..beef057bd1dc 100644
--- a/arch/blackfin/kernel/time.c
+++ b/arch/blackfin/kernel/time.c
@@ -87,7 +87,7 @@ void __init init_leds(void)
87static inline void do_leds(void) 87static inline void do_leds(void)
88{ 88{
89 static unsigned int count = 50; 89 static unsigned int count = 50;
90 static int flag = 0; 90 static int flag;
91 unsigned short tmp = 0; 91 unsigned short tmp = 0;
92 92
93 if (--count == 0) { 93 if (--count == 0) {
@@ -200,7 +200,7 @@ irqreturn_t timer_interrupt(int irq, void *dummy)__attribute__((l1_text));
200irqreturn_t timer_interrupt(int irq, void *dummy) 200irqreturn_t timer_interrupt(int irq, void *dummy)
201{ 201{
202 /* last time the cmos clock got updated */ 202 /* last time the cmos clock got updated */
203 static long last_rtc_update = 0; 203 static long last_rtc_update;
204 204
205 write_seqlock(&xtime_lock); 205 write_seqlock(&xtime_lock);
206 206
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index 9932edee8cb4..3909f5b35536 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -27,15 +27,15 @@
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */ 28 */
29 29
30#include <asm/uaccess.h> 30#include <linux/uaccess.h>
31#include <linux/interrupt.h>
32#include <linux/module.h>
33#include <linux/kallsyms.h>
31#include <asm/traps.h> 34#include <asm/traps.h>
32#include <asm/cacheflush.h> 35#include <asm/cacheflush.h>
33#include <asm/blackfin.h> 36#include <asm/blackfin.h>
34#include <asm/uaccess.h>
35#include <asm/irq_handler.h> 37#include <asm/irq_handler.h>
36#include <linux/interrupt.h> 38#include <asm/trace.h>
37#include <linux/module.h>
38#include <linux/kallsyms.h>
39 39
40#ifdef CONFIG_KGDB 40#ifdef CONFIG_KGDB
41# include <linux/debugger.h> 41# include <linux/debugger.h>
@@ -76,7 +76,7 @@ static int printk_address(unsigned long address)
76 if (!modname) 76 if (!modname)
77 modname = delim = ""; 77 modname = delim = "";
78 return printk("<0x%p> { %s%s%s%s + 0x%lx }", 78 return printk("<0x%p> { %s%s%s%s + 0x%lx }",
79 (void*)address, delim, modname, delim, symname, 79 (void *)address, delim, modname, delim, symname,
80 (unsigned long)offset); 80 (unsigned long)offset);
81 81
82 } 82 }
@@ -119,7 +119,7 @@ static int printk_address(unsigned long address)
119 119
120 write_unlock_irq(&tasklist_lock); 120 write_unlock_irq(&tasklist_lock);
121 return printk("<0x%p> [ %s + 0x%lx ]", 121 return printk("<0x%p> [ %s + 0x%lx ]",
122 (void*)address, name, offset); 122 (void *)address, name, offset);
123 } 123 }
124 124
125 vml = vml->next; 125 vml = vml->next;
@@ -128,19 +128,9 @@ static int printk_address(unsigned long address)
128 write_unlock_irq(&tasklist_lock); 128 write_unlock_irq(&tasklist_lock);
129 129
130 /* we were unable to find this address anywhere */ 130 /* we were unable to find this address anywhere */
131 return printk("[<0x%p>]", (void*)address); 131 return printk("[<0x%p>]", (void *)address);
132} 132}
133 133
134#define trace_buffer_save(x) \
135 do { \
136 (x) = bfin_read_TBUFCTL(); \
137 bfin_write_TBUFCTL((x) & ~TBUFEN); \
138 } while (0)
139#define trace_buffer_restore(x) \
140 do { \
141 bfin_write_TBUFCTL((x)); \
142 } while (0)
143
144asmlinkage void trap_c(struct pt_regs *fp) 134asmlinkage void trap_c(struct pt_regs *fp)
145{ 135{
146 int j, sig = 0; 136 int j, sig = 0;
@@ -148,8 +138,15 @@ asmlinkage void trap_c(struct pt_regs *fp)
148 unsigned long trapnr = fp->seqstat & SEQSTAT_EXCAUSE; 138 unsigned long trapnr = fp->seqstat & SEQSTAT_EXCAUSE;
149 139
150#ifdef CONFIG_KGDB 140#ifdef CONFIG_KGDB
151# define CHK_DEBUGGER_TRAP() do { CHK_DEBUGGER(trapnr, sig, info.si_code, fp,); } while (0) 141# define CHK_DEBUGGER_TRAP() \
152# define CHK_DEBUGGER_TRAP_MAYBE() do { if (kgdb_connected) CHK_DEBUGGER_TRAP(); } while (0) 142 do { \
143 CHK_DEBUGGER(trapnr, sig, info.si_code, fp); \
144 } while (0)
145# define CHK_DEBUGGER_TRAP_MAYBE() \
146 do { \
147 if (kgdb_connected) \
148 CHK_DEBUGGER_TRAP(); \
149 } while (0)
153#else 150#else
154# define CHK_DEBUGGER_TRAP() do { } while (0) 151# define CHK_DEBUGGER_TRAP() do { } while (0)
155# define CHK_DEBUGGER_TRAP_MAYBE() do { } while (0) 152# define CHK_DEBUGGER_TRAP_MAYBE() do { } while (0)
@@ -196,15 +193,14 @@ asmlinkage void trap_c(struct pt_regs *fp)
196#else 193#else
197 /* 0x02 - User Defined, Caught by default */ 194 /* 0x02 - User Defined, Caught by default */
198#endif 195#endif
199 /* 0x03 - Atomic test and set */ 196 /* 0x03 - User Defined, userspace stack overflow */
200 case VEC_EXCPT03: 197 case VEC_EXCPT03:
201 info.si_code = SEGV_STACKFLOW; 198 info.si_code = SEGV_STACKFLOW;
202 sig = SIGSEGV; 199 sig = SIGSEGV;
203 printk(KERN_EMERG EXC_0x03); 200 printk(KERN_EMERG EXC_0x03);
204 CHK_DEBUGGER_TRAP(); 201 CHK_DEBUGGER_TRAP();
205 break; 202 break;
206 /* 0x04 - spinlock - handled by _ex_spinlock, 203 /* 0x04 - User Defined, Caught by default */
207 getting here is an error */
208 /* 0x05 - User Defined, Caught by default */ 204 /* 0x05 - User Defined, Caught by default */
209 /* 0x06 - User Defined, Caught by default */ 205 /* 0x06 - User Defined, Caught by default */
210 /* 0x07 - User Defined, Caught by default */ 206 /* 0x07 - User Defined, Caught by default */
@@ -297,7 +293,8 @@ asmlinkage void trap_c(struct pt_regs *fp)
297 info.si_code = ILL_CPLB_MULHIT; 293 info.si_code = ILL_CPLB_MULHIT;
298#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO 294#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
299 sig = SIGSEGV; 295 sig = SIGSEGV;
300 printk(KERN_EMERG "\n\nNULL pointer access (probably)\n"); 296 printk(KERN_EMERG "\n"
297 KERN_EMERG "NULL pointer access (probably)\n");
301#else 298#else
302 sig = SIGILL; 299 sig = SIGILL;
303 printk(KERN_EMERG EXC_0x27); 300 printk(KERN_EMERG EXC_0x27);
@@ -418,7 +415,9 @@ asmlinkage void trap_c(struct pt_regs *fp)
418 if (current->mm) { 415 if (current->mm) {
419 fp->pc = current->mm->start_code; 416 fp->pc = current->mm->start_code;
420 } else { 417 } else {
421 printk(KERN_EMERG "I can't return to memory that doesn't exist - bad things happen\n"); 418 printk(KERN_EMERG
419 "I can't return to memory that doesn't exist"
420 " - bad things happen\n");
422 panic("Help - I've fallen and can't get up\n"); 421 panic("Help - I've fallen and can't get up\n");
423 } 422 }
424 } 423 }
@@ -522,92 +521,113 @@ EXPORT_SYMBOL(dump_stack);
522void dump_bfin_regs(struct pt_regs *fp, void *retaddr) 521void dump_bfin_regs(struct pt_regs *fp, void *retaddr)
523{ 522{
524 if (current->pid) { 523 if (current->pid) {
525 printk("\nCURRENT PROCESS:\n\n"); 524 printk(KERN_EMERG "\n" KERN_EMERG "CURRENT PROCESS:\n"
526 printk("COMM=%s PID=%d\n", current->comm, current->pid); 525 KERN_EMERG "\n");
526 printk(KERN_EMERG "COMM=%s PID=%d\n",
527 current->comm, current->pid);
527 } else { 528 } else {
528 printk 529 printk
529 ("\nNo Valid pid - Either things are really messed up, or you are in the kernel\n"); 530 (KERN_EMERG "\n" KERN_EMERG
531 "No Valid pid - Either things are really messed up,"
532 " or you are in the kernel\n");
530 } 533 }
531 534
532 if (current->mm) { 535 if (current->mm) {
533 printk("TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" 536 printk(KERN_EMERG "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n"
534 "BSS = 0x%p-0x%p USER-STACK = 0x%p\n\n", 537 KERN_EMERG "BSS = 0x%p-0x%p USER-STACK = 0x%p\n"
535 (void*)current->mm->start_code, 538 KERN_EMERG "\n",
536 (void*)current->mm->end_code, 539 (void *)current->mm->start_code,
537 (void*)current->mm->start_data, 540 (void *)current->mm->end_code,
538 (void*)current->mm->end_data, 541 (void *)current->mm->start_data,
539 (void*)current->mm->end_data, 542 (void *)current->mm->end_data,
540 (void*)current->mm->brk, 543 (void *)current->mm->end_data,
541 (void*)current->mm->start_stack); 544 (void *)current->mm->brk,
545 (void *)current->mm->start_stack);
542 } 546 }
543 547
544 printk("return address: 0x%p; contents of [PC-16...PC+8]:\n", retaddr); 548 printk(KERN_EMERG "return address: [0x%p]; contents of:", retaddr);
545 if (retaddr != 0 && retaddr <= (void*)physical_mem_end 549 if (retaddr != 0 && retaddr <= (void *)physical_mem_end
546#if L1_CODE_LENGTH != 0 550#if L1_CODE_LENGTH != 0
547 /* FIXME: Copy the code out of L1 Instruction SRAM through dma 551 /* FIXME: Copy the code out of L1 Instruction SRAM through dma
548 memcpy. */ 552 memcpy. */
549 && !(retaddr >= (void*)L1_CODE_START 553 && !(retaddr >= (void *)L1_CODE_START
550 && retaddr < (void*)(L1_CODE_START + L1_CODE_LENGTH)) 554 && retaddr < (void *)(L1_CODE_START + L1_CODE_LENGTH))
551#endif 555#endif
552 ) { 556 ) {
553 int i = 0; 557 int i = ((unsigned int)retaddr & 0xFFFFFFF0) - 32;
554 unsigned short x = 0; 558 unsigned short x = 0;
555 for (i = -16; i < 8; i++) { 559 for (; i < ((unsigned int)retaddr & 0xFFFFFFF0) + 32; i += 2) {
556 if (get_user(x, (unsigned short *)retaddr + i)) 560 if (!(i & 0xF))
561 printk(KERN_EMERG "\n" KERN_EMERG
562 "0x%08x: ", i);
563
564 if (get_user(x, (unsigned short *)i))
557 break; 565 break;
558#ifndef CONFIG_DEBUG_HWERR 566#ifndef CONFIG_DEBUG_HWERR
559 /* If one of the last few instructions was a STI 567 /* If one of the last few instructions was a STI
560 * it is likily that the error occured awhile ago 568 * it is likely that the error occured awhile ago
561 * and we just noticed 569 * and we just noticed
562 */ 570 */
563 if (x >= 0x0040 && x <= 0x0047 && i <= 0) 571 if (x >= 0x0040 && x <= 0x0047 && i <= 0)
564 panic("\n\nWARNING : You should reconfigure the kernel to turn on\n" 572 panic("\n\nWARNING : You should reconfigure"
565 " 'Hardware error interrupt debugging'\n" 573 " the kernel to turn on\n"
566 " The rest of this error is meanless\n"); 574 " 'Hardware error interrupt"
575 " debugging'\n"
576 " The rest of this error"
577 " is meanless\n");
567#endif 578#endif
568 579 if (i == (unsigned int)retaddr)
569 if (i == -8) 580 printk("[%04x]", x);
570 printk("\n"); 581 else
571 if (i == 0) 582 printk(" %04x ", x);
572 printk("X\n");
573 printk("%04x ", x);
574 } 583 }
584 printk("\n" KERN_EMERG "\n");
575 } else 585 } else
576 printk("Cannot look at the [PC] for it is in unreadable L1 SRAM - sorry\n"); 586 printk(KERN_EMERG
577 587 "Cannot look at the [PC] for it is"
578 printk("\n\n"); 588 "in unreadable L1 SRAM - sorry\n");
579 589
580 printk("RETE: %08lx RETN: %08lx RETX: %08lx RETS: %08lx\n", 590
581 fp->rete, fp->retn, fp->retx, fp->rets); 591 printk(KERN_EMERG
582 printk("IPEND: %04lx SYSCFG: %04lx\n", fp->ipend, fp->syscfg); 592 "RETE: %08lx RETN: %08lx RETX: %08lx RETS: %08lx\n",
583 printk("SEQSTAT: %08lx SP: %08lx\n", (long)fp->seqstat, (long)fp); 593 fp->rete, fp->retn, fp->retx, fp->rets);
584 printk("R0: %08lx R1: %08lx R2: %08lx R3: %08lx\n", 594 printk(KERN_EMERG "IPEND: %04lx SYSCFG: %04lx\n",
585 fp->r0, fp->r1, fp->r2, fp->r3); 595 fp->ipend, fp->syscfg);
586 printk("R4: %08lx R5: %08lx R6: %08lx R7: %08lx\n", 596 printk(KERN_EMERG "SEQSTAT: %08lx SP: %08lx\n",
587 fp->r4, fp->r5, fp->r6, fp->r7); 597 (long)fp->seqstat, (long)fp);
588 printk("P0: %08lx P1: %08lx P2: %08lx P3: %08lx\n", 598 printk(KERN_EMERG "R0: %08lx R1: %08lx R2: %08lx R3: %08lx\n",
589 fp->p0, fp->p1, fp->p2, fp->p3); 599 fp->r0, fp->r1, fp->r2, fp->r3);
590 printk("P4: %08lx P5: %08lx FP: %08lx\n", fp->p4, fp->p5, fp->fp); 600 printk(KERN_EMERG "R4: %08lx R5: %08lx R6: %08lx R7: %08lx\n",
591 printk("A0.w: %08lx A0.x: %08lx A1.w: %08lx A1.x: %08lx\n", 601 fp->r4, fp->r5, fp->r6, fp->r7);
592 fp->a0w, fp->a0x, fp->a1w, fp->a1x); 602 printk(KERN_EMERG "P0: %08lx P1: %08lx P2: %08lx P3: %08lx\n",
593 603 fp->p0, fp->p1, fp->p2, fp->p3);
594 printk("LB0: %08lx LT0: %08lx LC0: %08lx\n", fp->lb0, fp->lt0, 604 printk(KERN_EMERG
595 fp->lc0); 605 "P4: %08lx P5: %08lx FP: %08lx\n",
596 printk("LB1: %08lx LT1: %08lx LC1: %08lx\n", fp->lb1, fp->lt1, 606 fp->p4, fp->p5, fp->fp);
597 fp->lc1); 607 printk(KERN_EMERG
598 printk("B0: %08lx L0: %08lx M0: %08lx I0: %08lx\n", fp->b0, fp->l0, 608 "A0.w: %08lx A0.x: %08lx A1.w: %08lx A1.x: %08lx\n",
599 fp->m0, fp->i0); 609 fp->a0w, fp->a0x, fp->a1w, fp->a1x);
600 printk("B1: %08lx L1: %08lx M1: %08lx I1: %08lx\n", fp->b1, fp->l1, 610
601 fp->m1, fp->i1); 611 printk(KERN_EMERG "LB0: %08lx LT0: %08lx LC0: %08lx\n",
602 printk("B2: %08lx L2: %08lx M2: %08lx I2: %08lx\n", fp->b2, fp->l2, 612 fp->lb0, fp->lt0, fp->lc0);
603 fp->m2, fp->i2); 613 printk(KERN_EMERG "LB1: %08lx LT1: %08lx LC1: %08lx\n",
604 printk("B3: %08lx L3: %08lx M3: %08lx I3: %08lx\n", fp->b3, fp->l3, 614 fp->lb1, fp->lt1, fp->lc1);
605 fp->m3, fp->i3); 615 printk(KERN_EMERG "B0: %08lx L0: %08lx M0: %08lx I0: %08lx\n",
606 616 fp->b0, fp->l0, fp->m0, fp->i0);
607 printk("\nUSP: %08lx ASTAT: %08lx\n", rdusp(), fp->astat); 617 printk(KERN_EMERG "B1: %08lx L1: %08lx M1: %08lx I1: %08lx\n",
618 fp->b1, fp->l1, fp->m1, fp->i1);
619 printk(KERN_EMERG "B2: %08lx L2: %08lx M2: %08lx I2: %08lx\n",
620 fp->b2, fp->l2, fp->m2, fp->i2);
621 printk(KERN_EMERG "B3: %08lx L3: %08lx M3: %08lx I3: %08lx\n",
622 fp->b3, fp->l3, fp->m3, fp->i3);
623
624 printk(KERN_EMERG "\n" KERN_EMERG "USP: %08lx ASTAT: %08lx\n",
625 rdusp(), fp->astat);
608 if ((long)fp->seqstat & SEQSTAT_EXCAUSE) { 626 if ((long)fp->seqstat & SEQSTAT_EXCAUSE) {
609 printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", (void*)bfin_read_DCPLB_FAULT_ADDR()); 627 printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n",
610 printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", (void*)bfin_read_ICPLB_FAULT_ADDR()); 628 (void *)bfin_read_DCPLB_FAULT_ADDR());
629 printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n",
630 (void *)bfin_read_ICPLB_FAULT_ADDR());
611 } 631 }
612 632
613 printk("\n\n"); 633 printk("\n\n");
@@ -649,8 +669,8 @@ void panic_cplb_error(int cplb_panic, struct pt_regs *fp)
649 break; 669 break;
650 } 670 }
651 671
652 printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", (void*)bfin_read_DCPLB_FAULT_ADDR()); 672 printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", (void *)bfin_read_DCPLB_FAULT_ADDR());
653 printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", (void*)bfin_read_ICPLB_FAULT_ADDR()); 673 printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", (void *)bfin_read_ICPLB_FAULT_ADDR());
654 dump_bfin_regs(fp, (void *)fp->retx); 674 dump_bfin_regs(fp, (void *)fp->retx);
655 dump_stack(); 675 dump_stack();
656 panic("Unrecoverable event\n"); 676 panic("Unrecoverable event\n");
diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S
index 86fe67995802..d06f860f4790 100644
--- a/arch/blackfin/kernel/vmlinux.lds.S
+++ b/arch/blackfin/kernel/vmlinux.lds.S
@@ -7,7 +7,7 @@
7 * Description: Master linker script for blackfin architecture 7 * Description: Master linker script for blackfin architecture
8 * 8 *
9 * Modified: 9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc. 10 * Copyright 2004-2007 Analog Devices Inc.
11 * 11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 * 13 *
@@ -31,98 +31,56 @@
31 31
32#include <asm-generic/vmlinux.lds.h> 32#include <asm-generic/vmlinux.lds.h>
33#include <asm/mem_map.h> 33#include <asm/mem_map.h>
34 34#include <asm/page.h>
35 35
36OUTPUT_FORMAT("elf32-bfin") 36OUTPUT_FORMAT("elf32-bfin")
37ENTRY(__start) 37ENTRY(__start)
38_jiffies = _jiffies_64; 38_jiffies = _jiffies_64;
39 39
40MEMORY
41{
42 ram : ORIGIN = CONFIG_BOOT_LOAD, LENGTH = (CONFIG_MEM_SIZE * 1024 * 1024) - (CONFIG_BOOT_LOAD)
43 l1_data_a : ORIGIN = L1_DATA_A_START, LENGTH = L1_DATA_A_LENGTH
44 l1_data_b : ORIGIN = L1_DATA_B_START, LENGTH = L1_DATA_B_LENGTH
45 l1_code : ORIGIN = L1_CODE_START, LENGTH = L1_CODE_LENGTH
46 l1_scratch : ORIGIN = L1_SCRATCH_START, LENGTH = L1_SCRATCH_LENGTH
47}
48
49SECTIONS 40SECTIONS
50{ 41{
51 . = CONFIG_BOOT_LOAD; 42 . = CONFIG_BOOT_LOAD;
52
53 .text : 43 .text :
54 { 44 {
55 _text = .; 45 __text = .;
56 __stext = .; 46 _text = .;
47 __stext = .;
57 TEXT_TEXT 48 TEXT_TEXT
58 SCHED_TEXT 49 SCHED_TEXT
50 LOCK_TEXT
59 *(.text.lock) 51 *(.text.lock)
52 *(.fixup)
53
60 . = ALIGN(16); 54 . = ALIGN(16);
61 ___start___ex_table = .; 55 ___start___ex_table = .;
62 *(__ex_table) 56 *(__ex_table)
63 ___stop___ex_table = .; 57 ___stop___ex_table = .;
64 58
65 *($code)
66 *(.rodata)
67 *(.rodata.*)
68 *(__vermagic) /* Kernel version magic */
69 *(.rodata1)
70 *(.fixup)
71 *(.spinlock.text)
72
73 /* Kernel symbol table: Normal symbols */
74 . = ALIGN(4); 59 . = ALIGN(4);
75 ___start___ksymtab = .;
76 *(__ksymtab)
77 ___stop___ksymtab = .;
78
79 /* Kernel symbol table: GPL-only symbols */
80 ___start___ksymtab_gpl = .;
81 *(__ksymtab_gpl)
82 ___stop___ksymtab_gpl = .;
83
84 /* Kernel symbol table: Normal unused symbols */ \
85 ___start___ksymtab_unused = .;
86 *(__ksymtab_unused)
87 ___stop___ksymtab_unused = .;
88
89 /* Kernel symbol table: GPL-only unused symbols */
90 ___start___ksymtab_unused_gpl = .;
91 *(__ksymtab_unused_gpl)
92 ___stop___ksymtab_unused_gpl = .;
93
94
95 /* Kernel symbol table: GPL-future symbols */
96 ___start___ksymtab_gpl_future = .;
97 *(__ksymtab_gpl_future)
98 ___stop___ksymtab_gpl_future = .;
99
100 /* Kernel symbol table: Normal symbols */
101 ___start___kcrctab = .;
102 *(__kcrctab)
103 ___stop___kcrctab = .;
104
105 /* Kernel symbol table: GPL-only symbols */
106 ___start___kcrctab_gpl = .;
107 *(__kcrctab_gpl)
108 ___stop___kcrctab_gpl = .;
109
110 /* Kernel symbol table: GPL-future symbols */
111 ___start___kcrctab_gpl_future = .;
112 *(__kcrctab_gpl_future)
113 ___stop___kcrctab_gpl_future = .;
114
115 /* Kernel symbol table: strings */
116 *(__ksymtab_strings)
117
118 . = ALIGN(4);
119 __etext = .; 60 __etext = .;
120 } > ram 61 }
62
63 RODATA
64
65 .data :
66 {
67 . = ALIGN(PAGE_SIZE);
68 __sdata = .;
69 *(.data.init_task)
70 DATA_DATA
71 CONSTRUCTORS
72
73 . = ALIGN(32);
74 *(.data.cacheline_aligned)
75
76 . = ALIGN(PAGE_SIZE);
77 __edata = .;
78 }
121 79
80 . = ALIGN(PAGE_SIZE);
81 ___init_begin = .;
122 .init : 82 .init :
123 { 83 {
124 . = ALIGN(4096);
125 ___init_begin = .;
126 __sinittext = .; 84 __sinittext = .;
127 *(.init.text) 85 *(.init.text)
128 __einittext = .; 86 __einittext = .;
@@ -148,39 +106,39 @@ SECTIONS
148 *(.init.ramfs) 106 *(.init.ramfs)
149 ___initramfs_end = .; 107 ___initramfs_end = .;
150 . = ALIGN(4); 108 . = ALIGN(4);
151 ___init_end = .; 109 }
152 } > ram
153 110
154 __l1_lma_start = .; 111 __l1_lma_start = .;
155 112
156 .text_l1 : 113 .text_l1 L1_CODE_START : AT(LOADADDR(.init) + SIZEOF(.init))
157 { 114 {
158 . = ALIGN(4); 115 . = ALIGN(4);
159 __stext_l1 = .; 116 __stext_l1 = .;
160 *(.l1.text) 117 *(.l1.text)
161 118
162 . = ALIGN(4); 119 . = ALIGN(4);
163 __etext_l1 = .; 120 __etext_l1 = .;
164 } > l1_code AT > ram 121 }
165 122
166 .data_l1 : 123 .data_l1 L1_DATA_A_START : AT(LOADADDR(.text_l1) + SIZEOF(.text_l1))
167 { 124 {
168 . = ALIGN(4); 125 . = ALIGN(4);
169 __sdata_l1 = .; 126 __sdata_l1 = .;
170 *(.l1.data) 127 *(.l1.data)
171 __edata_l1 = .; 128 __edata_l1 = .;
172 129
173 . = ALIGN(4); 130 . = ALIGN(4);
174 __sbss_l1 = .; 131 __sbss_l1 = .;
175 *(.l1.bss) 132 *(.l1.bss)
176 133
177 . = ALIGN(32); 134 . = ALIGN(32);
178 *(.data_l1.cacheline_aligned) 135 *(.data_l1.cacheline_aligned)
179 136
180 . = ALIGN(4); 137 . = ALIGN(4);
181 __ebss_l1 = .; 138 __ebss_l1 = .;
182 } > l1_data_a AT > ram 139 }
183 .data_b_l1 : 140
141 .data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1))
184 { 142 {
185 . = ALIGN(4); 143 . = ALIGN(4);
186 __sdata_b_l1 = .; 144 __sdata_b_l1 = .;
@@ -193,36 +151,26 @@ SECTIONS
193 151
194 . = ALIGN(4); 152 . = ALIGN(4);
195 __ebss_b_l1 = .; 153 __ebss_b_l1 = .;
196 } > l1_data_b AT > ram 154 }
197
198 .data :
199 {
200 __sdata = .;
201 . = ALIGN(0x2000);
202 *(.data.init_task)
203 DATA_DATA
204 155
205 . = ALIGN(32); 156 . = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
206 *(.data.cacheline_aligned) 157 ___init_end = ALIGN(PAGE_SIZE);
207
208 . = ALIGN(0x2000);
209 __edata = .;
210 } > ram
211 158
212 /DISCARD/ : { /* Exit code and data*/ 159 .bss ___init_end :
213 *(.exit.text)
214 *(.exit.data)
215 *(.exitcall.exit)
216 } > ram
217
218 .bss :
219 { 160 {
220 . = ALIGN(4); 161 . = ALIGN(4);
221 ___bss_start = .; 162 ___bss_start = .;
222 *(.bss) 163 *(.bss)
223 *(COMMON) 164 *(COMMON)
224 . = ALIGN(4); 165 . = ALIGN(4);
225 ___bss_stop = .; 166 ___bss_stop = .;
226 __end = . ; 167 __end = .;
227 } > ram 168 }
169
170 /DISCARD/ :
171 {
172 *(.exit.text)
173 *(.exit.data)
174 *(.exitcall.exit)
175 }
228} 176}
diff --git a/arch/blackfin/lib/divsi3.S b/arch/blackfin/lib/divsi3.S
index 3e29861852b2..2ac59c70dd94 100644
--- a/arch/blackfin/lib/divsi3.S
+++ b/arch/blackfin/lib/divsi3.S
@@ -44,6 +44,7 @@
44 */ 44 */
45 45
46.global ___divsi3; 46.global ___divsi3;
47.type ___divsi3, STT_FUNC;
47 48
48#ifdef CONFIG_ARITHMETIC_OPS_L1 49#ifdef CONFIG_ARITHMETIC_OPS_L1
49.section .l1.text 50.section .l1.text
@@ -214,3 +215,5 @@ ___divsi3 :
214.Lret_zero: 215.Lret_zero:
215 R0 = 0; 216 R0 = 0;
216 RTS; 217 RTS;
218
219.size ___divsi3, .-___divsi3
diff --git a/arch/blackfin/lib/ins.S b/arch/blackfin/lib/ins.S
index 7d5e9846311d..a17cc77ac36f 100644
--- a/arch/blackfin/lib/ins.S
+++ b/arch/blackfin/lib/ins.S
@@ -46,7 +46,7 @@ ENTRY(_insl)
46.Llong_loop_e: NOP; 46.Llong_loop_e: NOP;
47 sti R3; 47 sti R3;
48 RTS; 48 RTS;
49 49ENDPROC(_insl)
50 50
51ENTRY(_insw) 51ENTRY(_insw)
52 P0 = R0; /* P0 = port */ 52 P0 = R0; /* P0 = port */
@@ -61,6 +61,7 @@ ENTRY(_insw)
61.Lword_loop_e: NOP; 61.Lword_loop_e: NOP;
62 sti R3; 62 sti R3;
63 RTS; 63 RTS;
64ENDPROC(_insw)
64 65
65ENTRY(_insb) 66ENTRY(_insb)
66 P0 = R0; /* P0 = port */ 67 P0 = R0; /* P0 = port */
@@ -75,3 +76,4 @@ ENTRY(_insb)
75.Lbyte_loop_e: NOP; 76.Lbyte_loop_e: NOP;
76 sti R3; 77 sti R3;
77 RTS; 78 RTS;
79ENDPROC(_insb)
diff --git a/arch/blackfin/lib/memchr.S b/arch/blackfin/lib/memchr.S
index 498122250d07..5da428134d32 100644
--- a/arch/blackfin/lib/memchr.S
+++ b/arch/blackfin/lib/memchr.S
@@ -67,4 +67,4 @@ ENTRY(_memchr)
67 R0 += -1; 67 R0 += -1;
68 RTS; 68 RTS;
69 69
70.size _memchr,.-_memchr 70ENDPROC(_memchr)
diff --git a/arch/blackfin/lib/memcmp.S b/arch/blackfin/lib/memcmp.S
index 5b9502368fc6..b88c5d2d1ebe 100644
--- a/arch/blackfin/lib/memcmp.S
+++ b/arch/blackfin/lib/memcmp.S
@@ -61,7 +61,12 @@ ENTRY(_memcmp)
61 61
62 LSETUP (.Lquad_loop_s, .Lquad_loop_e) LC0=P1; 62 LSETUP (.Lquad_loop_s, .Lquad_loop_e) LC0=P1;
63.Lquad_loop_s: 63.Lquad_loop_s:
64#ifdef ANOMALY_05000202
65 R0 = [P0++];
66 R1 = [I0++];
67#else
64 MNOP || R0 = [P0++] || R1 = [I0++]; 68 MNOP || R0 = [P0++] || R1 = [I0++];
69#endif
65 CC = R0 == R1; 70 CC = R0 == R1;
66 IF !CC JUMP .Lquad_different; 71 IF !CC JUMP .Lquad_different;
67.Lquad_loop_e: 72.Lquad_loop_e:
@@ -107,4 +112,4 @@ ENTRY(_memcmp)
107 P3 = I1; 112 P3 = I1;
108 RTS; 113 RTS;
109 114
110.size _memcmp,.-_memcmp 115ENDPROC(_memcmp)
diff --git a/arch/blackfin/lib/memcpy.S b/arch/blackfin/lib/memcpy.S
index c1e00eff541c..14a5585bbd02 100644
--- a/arch/blackfin/lib/memcpy.S
+++ b/arch/blackfin/lib/memcpy.S
@@ -94,13 +94,20 @@ ENTRY(_memcpy)
94.Lmore_than_seven: 94.Lmore_than_seven:
95 /* There's at least eight bytes to copy. */ 95 /* There's at least eight bytes to copy. */
96 P2 += -1; /* because we unroll one iteration */ 96 P2 += -1; /* because we unroll one iteration */
97 LSETUP(.Lword_loop, .Lword_loop) LC0=P2; 97 LSETUP(.Lword_loops, .Lword_loope) LC0=P2;
98 R0 = R1; 98 R0 = R1;
99 I1 = P1; 99 I1 = P1;
100 R3 = [I1++]; 100 R3 = [I1++];
101.Lword_loop: 101#ifdef ANOMALY_05000202
102.Lword_loops:
103 [P0++] = R3;
104.Lword_loope:
105 R3 = [I1++];
106#else
107.Lword_loops:
108.Lword_loope:
102 MNOP || [P0++] = R3 || R3 = [I1++]; 109 MNOP || [P0++] = R3 || R3 = [I1++];
103 110#endif
104 [P0++] = R3; 111 [P0++] = R3;
105 /* Any remaining bytes to copy? */ 112 /* Any remaining bytes to copy? */
106 R3 = 0x3; 113 R3 = 0x3;
@@ -140,3 +147,5 @@ ENTRY(_memcpy)
140 B[P0--] = R1; 147 B[P0--] = R1;
141 148
142 RTS; 149 RTS;
150
151ENDPROC(_memcpy)
diff --git a/arch/blackfin/lib/memmove.S b/arch/blackfin/lib/memmove.S
index 2e5fb7f8df13..6ee6e206e77c 100644
--- a/arch/blackfin/lib/memmove.S
+++ b/arch/blackfin/lib/memmove.S
@@ -69,8 +69,17 @@ ENTRY(_memmove)
69 P2 = R2; /* set remainder */ 69 P2 = R2; /* set remainder */
70 R1 = [I0++]; 70 R1 = [I0++];
71 71
72 LSETUP (.Lquad_loop, .Lquad_loop) LC0=P1; 72 LSETUP (.Lquad_loops, .Lquad_loope) LC0=P1;
73.Lquad_loop: MNOP || [P0++] = R1 || R1 = [I0++]; 73#ifdef ANOMALY_05000202
74.Lquad_loops:
75 [P0++] = R1;
76.Lquad_loope:
77 R1 = [I0++];
78#else
79.Lquad_loops:
80.Lquad_loope:
81 MNOP || [P0++] = R1 || R1 = [I0++];
82#endif
74 [P0++] = R1; 83 [P0++] = R1;
75 84
76 CC = P2 == 0; /* any remaining bytes? */ 85 CC = P2 == 0; /* any remaining bytes? */
@@ -93,6 +102,10 @@ ENTRY(_memmove)
93 R1 = B[P3--] (Z); 102 R1 = B[P3--] (Z);
94 CC = P2 == 0; 103 CC = P2 == 0;
95 IF CC JUMP .Lno_loop; 104 IF CC JUMP .Lno_loop;
105#ifdef ANOMALY_05000245
106 NOP;
107 NOP;
108#endif
96 LSETUP (.Lol_s, .Lol_e) LC0 = P2; 109 LSETUP (.Lol_s, .Lol_e) LC0 = P2;
97.Lol_s: B[P0--] = R1; 110.Lol_s: B[P0--] = R1;
98.Lol_e: R1 = B[P3--] (Z); 111.Lol_e: R1 = B[P3--] (Z);
@@ -100,4 +113,4 @@ ENTRY(_memmove)
100 P3 = I1; 113 P3 = I1;
101 RTS; 114 RTS;
102 115
103.size _memmove,.-_memmove 116ENDPROC(_memmove)
diff --git a/arch/blackfin/lib/memset.S b/arch/blackfin/lib/memset.S
index ba6d047568dd..8159136a29ea 100644
--- a/arch/blackfin/lib/memset.S
+++ b/arch/blackfin/lib/memset.S
@@ -106,4 +106,4 @@ ENTRY(_memset)
106 B[P0++] = R1; 106 B[P0++] = R1;
107 JUMP .Laligned; 107 JUMP .Laligned;
108 108
109.size _memset,.-_memset 109ENDPROC(_memset)
diff --git a/arch/blackfin/lib/modsi3.S b/arch/blackfin/lib/modsi3.S
index 528b8b1ccb34..ca1dd3973b39 100644
--- a/arch/blackfin/lib/modsi3.S
+++ b/arch/blackfin/lib/modsi3.S
@@ -77,3 +77,5 @@ ___modsi3:
77 R0 = 0; 77 R0 = 0;
78.LRETURN_R0: 78.LRETURN_R0:
79 RTS; 79 RTS;
80
81.size ___modsi3, .-___modsi3
diff --git a/arch/blackfin/lib/outs.S b/arch/blackfin/lib/outs.S
index f8c876fe8930..4c3da8ae094e 100644
--- a/arch/blackfin/lib/outs.S
+++ b/arch/blackfin/lib/outs.S
@@ -40,6 +40,7 @@ ENTRY(_outsl)
40.Llong_loop_s: R0 = [P1++]; 40.Llong_loop_s: R0 = [P1++];
41.Llong_loop_e: [P0] = R0; 41.Llong_loop_e: [P0] = R0;
42 RTS; 42 RTS;
43ENDPROC(_outsl)
43 44
44ENTRY(_outsw) 45ENTRY(_outsw)
45 P0 = R0; /* P0 = port */ 46 P0 = R0; /* P0 = port */
@@ -50,6 +51,7 @@ ENTRY(_outsw)
50.Lword_loop_s: R0 = W[P1++]; 51.Lword_loop_s: R0 = W[P1++];
51.Lword_loop_e: W[P0] = R0; 52.Lword_loop_e: W[P0] = R0;
52 RTS; 53 RTS;
54ENDPROC(_outsw)
53 55
54ENTRY(_outsb) 56ENTRY(_outsb)
55 P0 = R0; /* P0 = port */ 57 P0 = R0; /* P0 = port */
@@ -60,3 +62,4 @@ ENTRY(_outsb)
60.Lbyte_loop_s: R0 = B[P1++]; 62.Lbyte_loop_s: R0 = B[P1++];
61.Lbyte_loop_e: B[P0] = R0; 63.Lbyte_loop_e: B[P0] = R0;
62 RTS; 64 RTS;
65ENDPROC(_outsb)
diff --git a/arch/blackfin/lib/smulsi3_highpart.S b/arch/blackfin/lib/smulsi3_highpart.S
index 10b8f8da576f..e383cd3eca5d 100644
--- a/arch/blackfin/lib/smulsi3_highpart.S
+++ b/arch/blackfin/lib/smulsi3_highpart.S
@@ -28,3 +28,5 @@ ___smulsi3_highpart:
28 28
29 R0 = R0 + R1; 29 R0 = R0 + R1;
30 RTS; 30 RTS;
31
32.size ___smulsi3_highpart, .-___smulsi3_highpart
diff --git a/arch/blackfin/lib/strcmp.c b/arch/blackfin/lib/strcmp.c
index 2ad47c4254ba..4eeefd86907f 100644
--- a/arch/blackfin/lib/strcmp.c
+++ b/arch/blackfin/lib/strcmp.c
@@ -6,6 +6,5 @@
6 6
7int strcmp(const char *dest, const char *src) 7int strcmp(const char *dest, const char *src)
8{ 8{
9 return __inline_strcmp(dest, src); 9 return __inline_strcmp(dest, src);
10} 10}
11
diff --git a/arch/blackfin/lib/strcpy.c b/arch/blackfin/lib/strcpy.c
index 4dc835a8a19b..534589db7256 100644
--- a/arch/blackfin/lib/strcpy.c
+++ b/arch/blackfin/lib/strcpy.c
@@ -6,6 +6,5 @@
6 6
7char *strcpy(char *dest, const char *src) 7char *strcpy(char *dest, const char *src)
8{ 8{
9 return __inline_strcpy(dest, src); 9 return __inline_strcpy(dest, src);
10} 10}
11
diff --git a/arch/blackfin/lib/strncmp.c b/arch/blackfin/lib/strncmp.c
index 947bcfe3f3bb..d791f120bff7 100644
--- a/arch/blackfin/lib/strncmp.c
+++ b/arch/blackfin/lib/strncmp.c
@@ -6,6 +6,5 @@
6 6
7int strncmp(const char *cs, const char *ct, size_t count) 7int strncmp(const char *cs, const char *ct, size_t count)
8{ 8{
9 return __inline_strncmp(cs, ct, count); 9 return __inline_strncmp(cs, ct, count);
10} 10}
11
diff --git a/arch/blackfin/lib/strncpy.c b/arch/blackfin/lib/strncpy.c
index 77a9b2e95097..1fecb5c71ffb 100644
--- a/arch/blackfin/lib/strncpy.c
+++ b/arch/blackfin/lib/strncpy.c
@@ -6,6 +6,5 @@
6 6
7char *strncpy(char *dest, const char *src, size_t n) 7char *strncpy(char *dest, const char *src, size_t n)
8{ 8{
9 return __inline_strncpy(dest, src, n); 9 return __inline_strncpy(dest, src, n);
10} 10}
11
diff --git a/arch/blackfin/lib/udivsi3.S b/arch/blackfin/lib/udivsi3.S
index d39a12916259..58fd96d74766 100644
--- a/arch/blackfin/lib/udivsi3.S
+++ b/arch/blackfin/lib/udivsi3.S
@@ -296,3 +296,5 @@ ENTRY(___udivsi3)
296 R1 = R0 - R3; 296 R1 = R0 - R3;
297 IF CC R0 = R1; 297 IF CC R0 = R1;
298 RTS; 298 RTS;
299
300ENDPROC(___udivsi3)
diff --git a/arch/blackfin/lib/umodsi3.S b/arch/blackfin/lib/umodsi3.S
index b55ce96ab89f..4f2b76ee7626 100644
--- a/arch/blackfin/lib/umodsi3.S
+++ b/arch/blackfin/lib/umodsi3.S
@@ -34,7 +34,9 @@
34#endif 34#endif
35 35
36.extern ___udivsi3; 36.extern ___udivsi3;
37.type ___udivsi3, STT_FUNC;
37.globl ___umodsi3 38.globl ___umodsi3
39.type ___umodsi3, STT_FUNC;
38___umodsi3: 40___umodsi3:
39 41
40 CC=R0==0; 42 CC=R0==0;
@@ -64,3 +66,5 @@ ___umodsi3:
64 R0 = 0; 66 R0 = 0;
65.LRETURN_R0: 67.LRETURN_R0:
66 RTS; 68 RTS;
69
70.size ___umodsi3, .-___umodsi3
diff --git a/arch/blackfin/lib/umulsi3_highpart.S b/arch/blackfin/lib/umulsi3_highpart.S
index aac8218fb258..67b799351e3e 100644
--- a/arch/blackfin/lib/umulsi3_highpart.S
+++ b/arch/blackfin/lib/umulsi3_highpart.S
@@ -21,3 +21,5 @@ ___umulsi3_highpart:
21 R1 = PACK(R1.l,R0.h); 21 R1 = PACK(R1.l,R0.h);
22 R0 = R1 + R2; 22 R0 = R1 + R2;
23 RTS; 23 RTS;
24
25.size ___umulsi3_highpart, .-___umulsi3_highpart
diff --git a/arch/blackfin/mach-bf533/Makefile b/arch/blackfin/mach-bf533/Makefile
index 76d2c2b8579a..8cce1736360d 100644
--- a/arch/blackfin/mach-bf533/Makefile
+++ b/arch/blackfin/mach-bf533/Makefile
@@ -4,6 +4,6 @@
4 4
5extra-y := head.o 5extra-y := head.o
6 6
7obj-y := ints-priority.o 7obj-y := ints-priority.o dma.o
8 8
9obj-$(CONFIG_CPU_FREQ_BF533) += cpu.o 9obj-$(CONFIG_CPU_FREQ) += cpu.o
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index 23a7f607df3f..4545f363e641 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * File: arch/blackfin/mach-bf533/boards/cm_bf533.c 2 * File: arch/blackfin/mach-bf533/boards/cm_bf533.c
3 * Based on: arch/blackfin/mach-bf533/boards/ezkit.c 3 * Based on: arch/blackfin/mach-bf533/boards/ezkit.c
4 * Author: Aidan Williams <aidan@nicta.com.au> Copright 2005 4 * Author: Aidan Williams <aidan@nicta.com.au> Copyright 2005
5 * 5 *
6 * Created: 2005 6 * Created: 2005
7 * Description: Board description file 7 * Description: Board description file
@@ -34,7 +34,7 @@
34#include <linux/spi/spi.h> 34#include <linux/spi/spi.h>
35#include <linux/spi/flash.h> 35#include <linux/spi/flash.h>
36#include <linux/usb_isp1362.h> 36#include <linux/usb_isp1362.h>
37#include <asm/irq.h> 37#include <linux/irq.h>
38#include <asm/bfin5xx_spi.h> 38#include <asm/bfin5xx_spi.h>
39 39
40/* 40/*
@@ -51,11 +51,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
51 .size = 0x00020000, 51 .size = 0x00020000,
52 .offset = 0, 52 .offset = 0,
53 .mask_flags = MTD_CAP_ROM 53 .mask_flags = MTD_CAP_ROM
54 },{ 54 }, {
55 .name = "kernel", 55 .name = "kernel",
56 .size = 0xe0000, 56 .size = 0xe0000,
57 .offset = 0x20000 57 .offset = 0x20000
58 },{ 58 }, {
59 .name = "file system", 59 .name = "file system",
60 .size = 0x700000, 60 .size = 0x700000,
61 .offset = 0x00100000, 61 .offset = 0x00100000,
@@ -98,7 +98,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
98 .platform_data = &bfin_spi_flash_data, 98 .platform_data = &bfin_spi_flash_data,
99 .controller_data = &spi_flash_chip_info, 99 .controller_data = &spi_flash_chip_info,
100 .mode = SPI_MODE_3, 100 .mode = SPI_MODE_3,
101 },{ 101 }, {
102 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 102 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
103 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 103 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
104 .bus_num = 1, /* Framework bus number */ 104 .bus_num = 1, /* Framework bus number */
@@ -145,7 +145,7 @@ static struct resource smc91x_resources[] = {
145 .start = 0x20200300, 145 .start = 0x20200300,
146 .end = 0x20200300 + 16, 146 .end = 0x20200300 + 16,
147 .flags = IORESOURCE_MEM, 147 .flags = IORESOURCE_MEM,
148 },{ 148 }, {
149 .start = IRQ_PF0, 149 .start = IRQ_PF0,
150 .end = IRQ_PF0, 150 .end = IRQ_PF0,
151 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 151 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -194,11 +194,11 @@ static struct resource isp1362_hcd_resources[] = {
194 .start = 0x20308000, 194 .start = 0x20308000,
195 .end = 0x20308000, 195 .end = 0x20308000,
196 .flags = IORESOURCE_MEM, 196 .flags = IORESOURCE_MEM,
197 },{ 197 }, {
198 .start = 0x20308004, 198 .start = 0x20308004,
199 .end = 0x20308004, 199 .end = 0x20308004,
200 .flags = IORESOURCE_MEM, 200 .flags = IORESOURCE_MEM,
201 },{ 201 }, {
202 .start = IRQ_PF4, 202 .start = IRQ_PF4,
203 .end = IRQ_PF4, 203 .end = IRQ_PF4,
204 .flags = IORESOURCE_IRQ, 204 .flags = IORESOURCE_IRQ,
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index 747298ea907b..0000b8f1239c 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * File: arch/blackfin/mach-bf533/ezkit.c 2 * File: arch/blackfin/mach-bf533/ezkit.c
3 * Based on: Orginal Work 3 * Based on: Original Work
4 * Author: Aidan Williams <aidan@nicta.com.au> 4 * Author: Aidan Williams <aidan@nicta.com.au>
5 * 5 *
6 * Created: 2005 6 * Created: 2005
@@ -35,7 +35,7 @@
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#include <linux/usb_isp1362.h> 37#include <linux/usb_isp1362.h>
38#include <asm/irq.h> 38#include <linux/irq.h>
39#include <asm/bfin5xx_spi.h> 39#include <asm/bfin5xx_spi.h>
40 40
41/* 41/*
@@ -61,7 +61,7 @@ static struct resource smc91x_resources[] = {
61 .start = 0x20310300, 61 .start = 0x20310300,
62 .end = 0x20310300 + 16, 62 .end = 0x20310300 + 16,
63 .flags = IORESOURCE_MEM, 63 .flags = IORESOURCE_MEM,
64 },{ 64 }, {
65 .start = IRQ_PF9, 65 .start = IRQ_PF9,
66 .end = IRQ_PF9, 66 .end = IRQ_PF9,
67 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 67 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -85,11 +85,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
85 .size = 0x00020000, 85 .size = 0x00020000,
86 .offset = 0, 86 .offset = 0,
87 .mask_flags = MTD_CAP_ROM 87 .mask_flags = MTD_CAP_ROM
88 },{ 88 }, {
89 .name = "kernel", 89 .name = "kernel",
90 .size = 0xe0000, 90 .size = 0xe0000,
91 .offset = 0x20000 91 .offset = 0x20000
92 },{ 92 }, {
93 .name = "file system", 93 .name = "file system",
94 .size = 0x700000, 94 .size = 0x700000,
95 .offset = 0x00100000, 95 .offset = 0x00100000,
diff --git a/arch/blackfin/mach-bf533/boards/generic_board.c b/arch/blackfin/mach-bf533/boards/generic_board.c
index c0f43ccfbfb5..9bc1f0d0ab50 100644
--- a/arch/blackfin/mach-bf533/boards/generic_board.c
+++ b/arch/blackfin/mach-bf533/boards/generic_board.c
@@ -30,7 +30,7 @@
30 30
31#include <linux/device.h> 31#include <linux/device.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <asm/irq.h> 33#include <linux/irq.h>
34 34
35/* 35/*
36 * Name the Board for the /proc/cpuinfo 36 * Name the Board for the /proc/cpuinfo
@@ -53,11 +53,11 @@ static struct resource smc91x_resources[] = {
53 .start = 0x20300300, 53 .start = 0x20300300,
54 .end = 0x20300300 + 16, 54 .end = 0x20300300 + 16,
55 .flags = IORESOURCE_MEM, 55 .flags = IORESOURCE_MEM,
56 },{ 56 }, {
57 .start = IRQ_PROG_INTB, 57 .start = IRQ_PROG_INTB,
58 .end = IRQ_PROG_INTB, 58 .end = IRQ_PROG_INTB,
59 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 59 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
60 },{ 60 }, {
61 /* 61 /*
62 * denotes the flag pin and is used directly if 62 * denotes the flag pin and is used directly if
63 * CONFIG_IRQCHIP_DEMUX_GPIO is defined. 63 * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 9a472fe15833..a9143c4cbdcd 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -37,7 +37,7 @@
37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
38#include <linux/usb_isp1362.h> 38#include <linux/usb_isp1362.h>
39#endif 39#endif
40#include <asm/irq.h> 40#include <linux/irq.h>
41#include <asm/bfin5xx_spi.h> 41#include <asm/bfin5xx_spi.h>
42 42
43/* 43/*
@@ -62,7 +62,7 @@ static struct resource smc91x_resources[] = {
62 .start = 0x20300300, 62 .start = 0x20300300,
63 .end = 0x20300300 + 16, 63 .end = 0x20300300 + 16,
64 .flags = IORESOURCE_MEM, 64 .flags = IORESOURCE_MEM,
65 },{ 65 }, {
66 .start = IRQ_PF7, 66 .start = IRQ_PF7,
67 .end = IRQ_PF7, 67 .end = IRQ_PF7,
68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -83,7 +83,7 @@ static struct resource net2272_bfin_resources[] = {
83 .start = 0x20300000, 83 .start = 0x20300000,
84 .end = 0x20300000 + 0x100, 84 .end = 0x20300000 + 0x100,
85 .flags = IORESOURCE_MEM, 85 .flags = IORESOURCE_MEM,
86 },{ 86 }, {
87 .start = IRQ_PF10, 87 .start = IRQ_PF10,
88 .end = IRQ_PF10, 88 .end = IRQ_PF10,
89 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 89 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -108,11 +108,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
108 .size = 0x00020000, 108 .size = 0x00020000,
109 .offset = 0, 109 .offset = 0,
110 .mask_flags = MTD_CAP_ROM 110 .mask_flags = MTD_CAP_ROM
111 },{ 111 }, {
112 .name = "kernel", 112 .name = "kernel",
113 .size = 0xe0000, 113 .size = 0xe0000,
114 .offset = 0x20000 114 .offset = 0x20000
115 },{ 115 }, {
116 .name = "file system", 116 .name = "file system",
117 .size = 0x700000, 117 .size = 0x700000,
118 .offset = 0x00100000, 118 .offset = 0x00100000,
@@ -229,19 +229,19 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
229 229
230#if defined(CONFIG_PBX) 230#if defined(CONFIG_PBX)
231 { 231 {
232 .modalias = "fxs-spi", 232 .modalias = "fxs-spi",
233 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 233 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
234 .bus_num = 1, 234 .bus_num = 1,
235 .chip_select = 3, 235 .chip_select = 3,
236 .controller_data= &spi_si3xxx_chip_info, 236 .controller_data = &spi_si3xxx_chip_info,
237 .mode = SPI_MODE_3, 237 .mode = SPI_MODE_3,
238 }, 238 },
239 { 239 {
240 .modalias = "fxo-spi", 240 .modalias = "fxo-spi",
241 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 241 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
242 .bus_num = 1, 242 .bus_num = 1,
243 .chip_select = 2, 243 .chip_select = 2,
244 .controller_data= &spi_si3xxx_chip_info, 244 .controller_data = &spi_si3xxx_chip_info,
245 .mode = SPI_MODE_3, 245 .mode = SPI_MODE_3,
246 }, 246 },
247#endif 247#endif
diff --git a/arch/blackfin/mach-bf533/cpu.c b/arch/blackfin/mach-bf533/cpu.c
index 99547c4c290e..6fd9cfd0a31b 100644
--- a/arch/blackfin/mach-bf533/cpu.c
+++ b/arch/blackfin/mach-bf533/cpu.c
@@ -79,8 +79,7 @@ static int bf533_target(struct cpufreq_policy *policy,
79 int i; 79 int i;
80 80
81 struct cpufreq_freqs freqs; 81 struct cpufreq_freqs freqs;
82 if (cpufreq_frequency_table_target 82 if (cpufreq_frequency_table_target(policy, bf533_freq_table, target_freq, relation, &index))
83 (policy, bf533_freq_table, target_freq, relation, &index))
84 return -EINVAL; 83 return -EINVAL;
85 cclk_mhz = bf533_freq_table[index].frequency; 84 cclk_mhz = bf533_freq_table[index].frequency;
86 vco_mhz = bf533_freq_table[index].index; 85 vco_mhz = bf533_freq_table[index].index;
diff --git a/arch/blackfin/mach-bf533/dma.c b/arch/blackfin/mach-bf533/dma.c
new file mode 100644
index 000000000000..6c909cf4f7bf
--- /dev/null
+++ b/arch/blackfin/mach-bf533/dma.c
@@ -0,0 +1,95 @@
1/*
2 * File: arch/blackfin/mach-bf533/dma.c
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: This file contains the simple DMA Implementation for Blackfin
8 *
9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29#include <asm/blackfin.h>
30#include <asm/dma.h>
31
32struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
33 (struct dma_register *) DMA0_NEXT_DESC_PTR,
34 (struct dma_register *) DMA1_NEXT_DESC_PTR,
35 (struct dma_register *) DMA2_NEXT_DESC_PTR,
36 (struct dma_register *) DMA3_NEXT_DESC_PTR,
37 (struct dma_register *) DMA4_NEXT_DESC_PTR,
38 (struct dma_register *) DMA5_NEXT_DESC_PTR,
39 (struct dma_register *) DMA6_NEXT_DESC_PTR,
40 (struct dma_register *) DMA7_NEXT_DESC_PTR,
41 (struct dma_register *) MDMA_D0_NEXT_DESC_PTR,
42 (struct dma_register *) MDMA_S0_NEXT_DESC_PTR,
43 (struct dma_register *) MDMA_D1_NEXT_DESC_PTR,
44 (struct dma_register *) MDMA_S1_NEXT_DESC_PTR,
45};
46
47int channel2irq(unsigned int channel)
48{
49 int ret_irq = -1;
50
51 switch (channel) {
52 case CH_PPI:
53 ret_irq = IRQ_PPI;
54 break;
55
56 case CH_SPORT0_RX:
57 ret_irq = IRQ_SPORT0_RX;
58 break;
59
60 case CH_SPORT0_TX:
61 ret_irq = IRQ_SPORT0_TX;
62 break;
63
64 case CH_SPORT1_RX:
65 ret_irq = IRQ_SPORT1_RX;
66 break;
67
68 case CH_SPORT1_TX:
69 ret_irq = IRQ_SPORT1_TX;
70 break;
71
72 case CH_SPI:
73 ret_irq = IRQ_SPI;
74 break;
75
76 case CH_UART_RX:
77 ret_irq = IRQ_UART_RX;
78 break;
79
80 case CH_UART_TX:
81 ret_irq = IRQ_UART_TX;
82 break;
83
84 case CH_MEM_STREAM0_SRC:
85 case CH_MEM_STREAM0_DEST:
86 ret_irq = IRQ_MEM_DMA0;
87 break;
88
89 case CH_MEM_STREAM1_SRC:
90 case CH_MEM_STREAM1_DEST:
91 ret_irq = IRQ_MEM_DMA1;
92 break;
93 }
94 return ret_irq;
95}
diff --git a/arch/blackfin/mach-bf533/head.S b/arch/blackfin/mach-bf533/head.S
index 4db9e6240906..7dd0e9c3a936 100644
--- a/arch/blackfin/mach-bf533/head.S
+++ b/arch/blackfin/mach-bf533/head.S
@@ -28,7 +28,9 @@
28 */ 28 */
29 29
30#include <linux/linkage.h> 30#include <linux/linkage.h>
31#include <linux/init.h>
31#include <asm/blackfin.h> 32#include <asm/blackfin.h>
33#include <asm/trace.h>
32#if CONFIG_BFIN_KERNEL_CLOCK 34#if CONFIG_BFIN_KERNEL_CLOCK
33#include <asm/mach/mem_init.h> 35#include <asm/mach/mem_init.h>
34#endif 36#endif
@@ -45,19 +47,19 @@
45 47
46#define INITIAL_STACK 0xFFB01000 48#define INITIAL_STACK 0xFFB01000
47 49
48.text 50__INIT
49 51
50ENTRY(__start) 52ENTRY(__start)
51ENTRY(__stext)
52 /* R0: argument of command line string, passed from uboot, save it */ 53 /* R0: argument of command line string, passed from uboot, save it */
53 R7 = R0; 54 R7 = R0;
54 /* Set the SYSCFG register */ 55 /* Set the SYSCFG register:
56 * Enable Cycle Counter and Nesting Of Interrupts (3rd Bit)
57 */
55 R0 = 0x36; 58 R0 = 0x36;
56 /*Enable Cycle Counter and Nesting Of Interrupts(3rd Bit)*/
57 SYSCFG = R0; 59 SYSCFG = R0;
58 R0 = 0; 60 R0 = 0;
59 61
60 /*Clear Out All the data and pointer Registers*/ 62 /* Clear Out All the data and pointer Registers */
61 R1 = R0; 63 R1 = R0;
62 R2 = R0; 64 R2 = R0;
63 R3 = R0; 65 R3 = R0;
@@ -79,7 +81,7 @@ ENTRY(__stext)
79 L2 = r0; 81 L2 = r0;
80 L3 = r0; 82 L3 = r0;
81 83
82 /* Clear Out All the DAG Registers*/ 84 /* Clear Out All the DAG Registers */
83 B0 = r0; 85 B0 = r0;
84 B1 = r0; 86 B1 = r0;
85 B2 = r0; 87 B2 = r0;
@@ -95,6 +97,10 @@ ENTRY(__stext)
95 M2 = r0; 97 M2 = r0;
96 M3 = r0; 98 M3 = r0;
97 99
100 trace_buffer_start(p0,r0);
101 P0 = R1;
102 R0 = R1;
103
98#if CONFIG_DEBUG_KERNEL_START 104#if CONFIG_DEBUG_KERNEL_START
99 105
100/* 106/*
@@ -265,6 +271,7 @@ ENTRY(__stext)
265 271
266.LWAIT_HERE: 272.LWAIT_HERE:
267 jump .LWAIT_HERE; 273 jump .LWAIT_HERE;
274ENDPROC(__start)
268 275
269ENTRY(_real_start) 276ENTRY(_real_start)
270 [ -- sp ] = reti; 277 [ -- sp ] = reti;
@@ -303,7 +310,7 @@ ENTRY(_real_start)
303.L_clear_zero: 310.L_clear_zero:
304 W[p1++] = r0; 311 W[p1++] = r0;
305 312
306/* pass the uboot arguments to the global value command line */ 313 /* pass the uboot arguments to the global value command line */
307 R0 = R7; 314 R0 = R7;
308 call _cmdline_init; 315 call _cmdline_init;
309 316
@@ -322,7 +329,7 @@ ENTRY(_real_start)
322 [p1] = r1; 329 [p1] = r1;
323 330
324 /* 331 /*
325 * load the current thread pointer and stack 332 * load the current thread pointer and stack
326 */ 333 */
327 r1.l = _init_thread_union; 334 r1.l = _init_thread_union;
328 r1.h = _init_thread_union; 335 r1.h = _init_thread_union;
@@ -333,9 +340,10 @@ ENTRY(_real_start)
333 sp = r1; 340 sp = r1;
334 usp = sp; 341 usp = sp;
335 fp = sp; 342 fp = sp;
336 call _start_kernel; 343 jump.l _start_kernel;
337.L_exit: 344ENDPROC(_real_start)
338 jump.s .L_exit; 345
346__FINIT
339 347
340.section .l1.text 348.section .l1.text
341#if CONFIG_BFIN_KERNEL_CLOCK 349#if CONFIG_BFIN_KERNEL_CLOCK
@@ -439,12 +447,13 @@ ENTRY(_start_dma_code)
439 447
440 p0.h = hi(SIC_IWR); 448 p0.h = hi(SIC_IWR);
441 p0.l = lo(SIC_IWR); 449 p0.l = lo(SIC_IWR);
442 r0.l = lo(IWR_ENABLE_ALL) 450 r0.l = lo(IWR_ENABLE_ALL);
443 r0.h = hi(IWR_ENABLE_ALL) 451 r0.h = hi(IWR_ENABLE_ALL);
444 [p0] = r0; 452 [p0] = r0;
445 SSYNC; 453 SSYNC;
446 454
447 RTS; 455 RTS;
456ENDPROC(_start_dma_code)
448#endif /* CONFIG_BFIN_KERNEL_CLOCK */ 457#endif /* CONFIG_BFIN_KERNEL_CLOCK */
449 458
450ENTRY(_bfin_reset) 459ENTRY(_bfin_reset)
diff --git a/arch/blackfin/mach-bf533/ints-priority.c b/arch/blackfin/mach-bf533/ints-priority.c
index 36a693345204..7d79e0f9503d 100644
--- a/arch/blackfin/mach-bf533/ints-priority.c
+++ b/arch/blackfin/mach-bf533/ints-priority.c
@@ -4,7 +4,7 @@
4 * Author: Michael Hennerich 4 * Author: Michael Hennerich
5 * 5 *
6 * Created: ? 6 * Created: ?
7 * Description: Set up the interupt priorities 7 * Description: Set up the interrupt priorities
8 * 8 *
9 * Modified: 9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc. 10 * Copyright 2004-2006 Analog Devices Inc.
@@ -28,8 +28,8 @@
28 */ 28 */
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/irq.h>
31#include <asm/blackfin.h> 32#include <asm/blackfin.h>
32#include <asm/irq.h>
33 33
34void program_IAR(void) 34void program_IAR(void)
35{ 35{
diff --git a/arch/blackfin/mach-bf537/Makefile b/arch/blackfin/mach-bf537/Makefile
index f32d44215bb7..7e7c9c8ac5b2 100644
--- a/arch/blackfin/mach-bf537/Makefile
+++ b/arch/blackfin/mach-bf537/Makefile
@@ -4,6 +4,6 @@
4 4
5extra-y := head.o 5extra-y := head.o
6 6
7obj-y := ints-priority.o 7obj-y := ints-priority.o dma.o
8 8
9obj-$(CONFIG_CPU_FREQ) += cpu.o 9obj-$(CONFIG_CPU_FREQ) += cpu.o
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c
index 6a60618a78ec..a8f947b72754 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c
@@ -35,7 +35,7 @@
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#include <linux/usb_isp1362.h> 37#include <linux/usb_isp1362.h>
38#include <asm/irq.h> 38#include <linux/irq.h>
39#include <asm/bfin5xx_spi.h> 39#include <asm/bfin5xx_spi.h>
40 40
41/* 41/*
@@ -53,11 +53,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
53 .size = 0x00020000, 53 .size = 0x00020000,
54 .offset = 0, 54 .offset = 0,
55 .mask_flags = MTD_CAP_ROM 55 .mask_flags = MTD_CAP_ROM
56 },{ 56 }, {
57 .name = "kernel", 57 .name = "kernel",
58 .size = 0xe0000, 58 .size = 0xe0000,
59 .offset = 0x20000 59 .offset = 0x20000
60 },{ 60 }, {
61 .name = "file system", 61 .name = "file system",
62 .size = 0x700000, 62 .size = 0x700000,
63 .offset = 0x00100000, 63 .offset = 0x00100000,
@@ -202,7 +202,7 @@ static struct resource smc91x_resources[] = {
202 .start = 0x20200300, 202 .start = 0x20200300,
203 .end = 0x20200300 + 16, 203 .end = 0x20200300 + 16,
204 .flags = IORESOURCE_MEM, 204 .flags = IORESOURCE_MEM,
205 },{ 205 }, {
206 .start = IRQ_PF14, 206 .start = IRQ_PF14,
207 .end = IRQ_PF14, 207 .end = IRQ_PF14,
208 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 208 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -223,11 +223,11 @@ static struct resource isp1362_hcd_resources[] = {
223 .start = 0x20308000, 223 .start = 0x20308000,
224 .end = 0x20308000, 224 .end = 0x20308000,
225 .flags = IORESOURCE_MEM, 225 .flags = IORESOURCE_MEM,
226 },{ 226 }, {
227 .start = 0x20308004, 227 .start = 0x20308004,
228 .end = 0x20308004, 228 .end = 0x20308004,
229 .flags = IORESOURCE_MEM, 229 .flags = IORESOURCE_MEM,
230 },{ 230 }, {
231 .start = IRQ_PG15, 231 .start = IRQ_PG15,
232 .end = IRQ_PG15, 232 .end = IRQ_PG15,
233 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 233 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -262,7 +262,7 @@ static struct resource net2272_bfin_resources[] = {
262 .start = 0x20200000, 262 .start = 0x20200000,
263 .end = 0x20200000 + 0x100, 263 .end = 0x20200000 + 0x100,
264 .flags = IORESOURCE_MEM, 264 .flags = IORESOURCE_MEM,
265 },{ 265 }, {
266 .start = IRQ_PF7, 266 .start = IRQ_PF7,
267 .end = IRQ_PF7, 267 .end = IRQ_PF7,
268 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 268 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -283,7 +283,7 @@ static struct resource bfin_uart_resources[] = {
283 .start = 0xFFC00400, 283 .start = 0xFFC00400,
284 .end = 0xFFC004FF, 284 .end = 0xFFC004FF,
285 .flags = IORESOURCE_MEM, 285 .flags = IORESOURCE_MEM,
286 },{ 286 }, {
287 .start = 0xFFC02000, 287 .start = 0xFFC02000,
288 .end = 0xFFC020FF, 288 .end = 0xFFC020FF,
289 .flags = IORESOURCE_MEM, 289 .flags = IORESOURCE_MEM,
diff --git a/arch/blackfin/mach-bf537/boards/eth_mac.c b/arch/blackfin/mach-bf537/boards/eth_mac.c
index e129a08d63de..a725cc8a9290 100644
--- a/arch/blackfin/mach-bf537/boards/eth_mac.c
+++ b/arch/blackfin/mach-bf537/boards/eth_mac.c
@@ -20,8 +20,7 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <asm/blackfin.h> 21#include <asm/blackfin.h>
22 22
23#if defined(CONFIG_GENERIC_BOARD) \ 23#if defined(CONFIG_GENERIC_BOARD) || defined(CONFIG_BFIN537_STAMP)
24 || defined(CONFIG_BFIN537_STAMP)
25 24
26/* 25/*
27 * Currently the MAC address is saved in Flash by U-Boot 26 * Currently the MAC address is saved in Flash by U-Boot
@@ -43,7 +42,7 @@ void get_bf537_ether_addr(char *addr)
43 */ 42 */
44void get_bf537_ether_addr(char *addr) 43void get_bf537_ether_addr(char *addr)
45{ 44{
46 printk(KERN_WARNING "%s: No valid Ethernet MAC address found\n",__FILE__); 45 printk(KERN_WARNING "%s: No valid Ethernet MAC address found\n", __FILE__);
47} 46}
48 47
49#endif 48#endif
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c
index 9019c0edbe7c..648d984e98d6 100644
--- a/arch/blackfin/mach-bf537/boards/generic_board.c
+++ b/arch/blackfin/mach-bf537/boards/generic_board.c
@@ -35,9 +35,9 @@
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#include <linux/usb_isp1362.h> 37#include <linux/usb_isp1362.h>
38#include <asm/irq.h> 38#include <linux/irq.h>
39#include <asm/bfin5xx_spi.h>
40#include <linux/usb_sl811.h> 39#include <linux/usb_sl811.h>
40#include <asm/bfin5xx_spi.h>
41 41
42/* 42/*
43 * Name the Board for the /proc/cpuinfo 43 * Name the Board for the /proc/cpuinfo
@@ -54,19 +54,19 @@ static struct resource bfin_pcmcia_cf_resources[] = {
54 .start = 0x20310000, /* IO PORT */ 54 .start = 0x20310000, /* IO PORT */
55 .end = 0x20312000, 55 .end = 0x20312000,
56 .flags = IORESOURCE_MEM, 56 .flags = IORESOURCE_MEM,
57 },{ 57 }, {
58 .start = 0x20311000, /* Attribute Memeory */ 58 .start = 0x20311000, /* Attribute Memory */
59 .end = 0x20311FFF, 59 .end = 0x20311FFF,
60 .flags = IORESOURCE_MEM, 60 .flags = IORESOURCE_MEM,
61 },{ 61 }, {
62 .start = IRQ_PROG_INTA, 62 .start = IRQ_PROG_INTA,
63 .end = IRQ_PROG_INTA, 63 .end = IRQ_PROG_INTA,
64 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 64 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
65 },{ 65 }, {
66 .start = IRQ_PF4, 66 .start = IRQ_PF4,
67 .end = IRQ_PF4, 67 .end = IRQ_PF4,
68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
69 },{ 69 }, {
70 .start = 6, /* Card Detect PF6 */ 70 .start = 6, /* Card Detect PF6 */
71 .end = 6, 71 .end = 6,
72 .flags = IORESOURCE_IRQ, 72 .flags = IORESOURCE_IRQ,
@@ -95,11 +95,11 @@ static struct resource smc91x_resources[] = {
95 .start = 0x20300300, 95 .start = 0x20300300,
96 .end = 0x20300300 + 16, 96 .end = 0x20300300 + 16,
97 .flags = IORESOURCE_MEM, 97 .flags = IORESOURCE_MEM,
98 },{ 98 }, {
99 .start = IRQ_PROG_INTB, 99 .start = IRQ_PROG_INTB,
100 .end = IRQ_PROG_INTB, 100 .end = IRQ_PROG_INTB,
101 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 101 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
102 },{ 102 }, {
103 /* 103 /*
104 * denotes the flag pin and is used directly if 104 * denotes the flag pin and is used directly if
105 * CONFIG_IRQCHIP_DEMUX_GPIO is defined. 105 * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
@@ -123,15 +123,15 @@ static struct resource sl811_hcd_resources[] = {
123 .start = 0x20340000, 123 .start = 0x20340000,
124 .end = 0x20340000, 124 .end = 0x20340000,
125 .flags = IORESOURCE_MEM, 125 .flags = IORESOURCE_MEM,
126 },{ 126 }, {
127 .start = 0x20340004, 127 .start = 0x20340004,
128 .end = 0x20340004, 128 .end = 0x20340004,
129 .flags = IORESOURCE_MEM, 129 .flags = IORESOURCE_MEM,
130 },{ 130 }, {
131 .start = IRQ_PROG_INTA, 131 .start = IRQ_PROG_INTA,
132 .end = IRQ_PROG_INTA, 132 .end = IRQ_PROG_INTA,
133 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 133 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
134 },{ 134 }, {
135 .start = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO, 135 .start = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO,
136 .end = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO, 136 .end = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO,
137 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 137 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -179,15 +179,15 @@ static struct resource isp1362_hcd_resources[] = {
179 .start = 0x20360000, 179 .start = 0x20360000,
180 .end = 0x20360000, 180 .end = 0x20360000,
181 .flags = IORESOURCE_MEM, 181 .flags = IORESOURCE_MEM,
182 },{ 182 }, {
183 .start = 0x20360004, 183 .start = 0x20360004,
184 .end = 0x20360004, 184 .end = 0x20360004,
185 .flags = IORESOURCE_MEM, 185 .flags = IORESOURCE_MEM,
186 },{ 186 }, {
187 .start = IRQ_PROG_INTA, 187 .start = IRQ_PROG_INTA,
188 .end = IRQ_PROG_INTA, 188 .end = IRQ_PROG_INTA,
189 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 189 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
190 },{ 190 }, {
191 .start = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO, 191 .start = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO,
192 .end = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO, 192 .end = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO,
193 .flags = IORESOURCE_IRQ, 193 .flags = IORESOURCE_IRQ,
@@ -228,7 +228,7 @@ static struct resource net2272_bfin_resources[] = {
228 .start = 0x20300000, 228 .start = 0x20300000,
229 .end = 0x20300000 + 0x100, 229 .end = 0x20300000 + 0x100,
230 .flags = IORESOURCE_MEM, 230 .flags = IORESOURCE_MEM,
231 },{ 231 }, {
232 .start = IRQ_PF7, 232 .start = IRQ_PF7,
233 .end = IRQ_PF7, 233 .end = IRQ_PF7,
234 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 234 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -253,11 +253,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
253 .size = 0x00020000, 253 .size = 0x00020000,
254 .offset = 0, 254 .offset = 0,
255 .mask_flags = MTD_CAP_ROM 255 .mask_flags = MTD_CAP_ROM
256 },{ 256 }, {
257 .name = "kernel", 257 .name = "kernel",
258 .size = 0xe0000, 258 .size = 0xe0000,
259 .offset = 0x20000 259 .offset = 0x20000
260 },{ 260 }, {
261 .name = "file system", 261 .name = "file system",
262 .size = 0x700000, 262 .size = 0x700000,
263 .offset = 0x00100000, 263 .offset = 0x00100000,
@@ -375,7 +375,7 @@ static struct resource bfin_uart_resources[] = {
375 .start = 0xFFC00400, 375 .start = 0xFFC00400,
376 .end = 0xFFC004FF, 376 .end = 0xFFC004FF,
377 .flags = IORESOURCE_MEM, 377 .flags = IORESOURCE_MEM,
378 },{ 378 }, {
379 .start = 0xFFC02000, 379 .start = 0xFFC02000,
380 .end = 0xFFC020FF, 380 .end = 0xFFC020FF,
381 .flags = IORESOURCE_MEM, 381 .flags = IORESOURCE_MEM,
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
index 40d3a1b70ee7..8806f1230f2d 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -37,7 +37,7 @@
37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
38#include <linux/usb_isp1362.h> 38#include <linux/usb_isp1362.h>
39#endif 39#endif
40#include <asm/irq.h> 40#include <linux/irq.h>
41#include <asm/bfin5xx_spi.h> 41#include <asm/bfin5xx_spi.h>
42#include <linux/usb_sl811.h> 42#include <linux/usb_sl811.h>
43 43
@@ -58,15 +58,15 @@ static struct resource bfin_pcmcia_cf_resources[] = {
58 .start = 0x20310000, /* IO PORT */ 58 .start = 0x20310000, /* IO PORT */
59 .end = 0x20312000, 59 .end = 0x20312000,
60 .flags = IORESOURCE_MEM, 60 .flags = IORESOURCE_MEM,
61 },{ 61 }, {
62 .start = 0x20311000, /* Attribute Memeory */ 62 .start = 0x20311000, /* Attribute Memory */
63 .end = 0x20311FFF, 63 .end = 0x20311FFF,
64 .flags = IORESOURCE_MEM, 64 .flags = IORESOURCE_MEM,
65 },{ 65 }, {
66 .start = IRQ_PF4, 66 .start = IRQ_PF4,
67 .end = IRQ_PF4, 67 .end = IRQ_PF4,
68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
69 },{ 69 }, {
70 .start = 6, /* Card Detect PF6 */ 70 .start = 6, /* Card Detect PF6 */
71 .end = 6, 71 .end = 6,
72 .flags = IORESOURCE_IRQ, 72 .flags = IORESOURCE_IRQ,
@@ -95,7 +95,7 @@ static struct resource smc91x_resources[] = {
95 .start = 0x20300300, 95 .start = 0x20300300,
96 .end = 0x20300300 + 16, 96 .end = 0x20300300 + 16,
97 .flags = IORESOURCE_MEM, 97 .flags = IORESOURCE_MEM,
98 },{ 98 }, {
99 99
100 .start = IRQ_PF7, 100 .start = IRQ_PF7,
101 .end = IRQ_PF7, 101 .end = IRQ_PF7,
@@ -116,11 +116,11 @@ static struct resource sl811_hcd_resources[] = {
116 .start = 0x20340000, 116 .start = 0x20340000,
117 .end = 0x20340000, 117 .end = 0x20340000,
118 .flags = IORESOURCE_MEM, 118 .flags = IORESOURCE_MEM,
119 },{ 119 }, {
120 .start = 0x20340004, 120 .start = 0x20340004,
121 .end = 0x20340004, 121 .end = 0x20340004,
122 .flags = IORESOURCE_MEM, 122 .flags = IORESOURCE_MEM,
123 },{ 123 }, {
124 .start = CONFIG_USB_SL811_BFIN_IRQ, 124 .start = CONFIG_USB_SL811_BFIN_IRQ,
125 .end = CONFIG_USB_SL811_BFIN_IRQ, 125 .end = CONFIG_USB_SL811_BFIN_IRQ,
126 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 126 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -167,11 +167,11 @@ static struct resource isp1362_hcd_resources[] = {
167 .start = 0x20360000, 167 .start = 0x20360000,
168 .end = 0x20360000, 168 .end = 0x20360000,
169 .flags = IORESOURCE_MEM, 169 .flags = IORESOURCE_MEM,
170 },{ 170 }, {
171 .start = 0x20360004, 171 .start = 0x20360004,
172 .end = 0x20360004, 172 .end = 0x20360004,
173 .flags = IORESOURCE_MEM, 173 .flags = IORESOURCE_MEM,
174 },{ 174 }, {
175 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, 175 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
176 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, 176 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
177 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 177 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -212,7 +212,7 @@ static struct resource net2272_bfin_resources[] = {
212 .start = 0x20300000, 212 .start = 0x20300000,
213 .end = 0x20300000 + 0x100, 213 .end = 0x20300000 + 0x100,
214 .flags = IORESOURCE_MEM, 214 .flags = IORESOURCE_MEM,
215 },{ 215 }, {
216 .start = IRQ_PF7, 216 .start = IRQ_PF7,
217 .end = IRQ_PF7, 217 .end = IRQ_PF7,
218 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 218 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -238,11 +238,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
238 .size = 0x00020000, 238 .size = 0x00020000,
239 .offset = 0, 239 .offset = 0,
240 .mask_flags = MTD_CAP_ROM 240 .mask_flags = MTD_CAP_ROM
241 },{ 241 }, {
242 .name = "kernel", 242 .name = "kernel",
243 .size = 0xe0000, 243 .size = 0xe0000,
244 .offset = 0x20000 244 .offset = 0x20000
245 },{ 245 }, {
246 .name = "file system", 246 .name = "file system",
247 .size = 0x700000, 247 .size = 0x700000,
248 .offset = 0x00100000, 248 .offset = 0x00100000,
@@ -294,16 +294,6 @@ static struct bfin5xx_spi_chip spi_mmc_chip_info = {
294}; 294};
295#endif 295#endif
296 296
297#if defined(CONFIG_PBX)
298static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
299 .ctl_reg = 0x4, /* send zero */
300 .enable_dma = 0,
301 .bits_per_word = 8,
302 .cs_change_per_word = 1,
303};
304#endif
305
306
307#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 297#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
308static struct bfin5xx_spi_chip spi_ad7877_chip_info = { 298static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
309 .cs_change_per_word = 1, 299 .cs_change_per_word = 1,
@@ -392,24 +382,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
392 .mode = SPI_MODE_3, 382 .mode = SPI_MODE_3,
393 }, 383 },
394#endif 384#endif
395#if defined(CONFIG_PBX)
396 {
397 .modalias = "fxs-spi",
398 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
399 .bus_num = 1,
400 .chip_select = 3,
401 .controller_data= &spi_si3xxx_chip_info,
402 .mode = SPI_MODE_3,
403 },
404 {
405 .modalias = "fxo-spi",
406 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
407 .bus_num = 1,
408 .chip_select = 2,
409 .controller_data= &spi_si3xxx_chip_info,
410 .mode = SPI_MODE_3,
411 },
412#endif
413#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 385#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
414{ 386{
415 .modalias = "ad7877", 387 .modalias = "ad7877",
@@ -451,7 +423,7 @@ static struct resource bfin_uart_resources[] = {
451 .start = 0xFFC00400, 423 .start = 0xFFC00400,
452 .end = 0xFFC004FF, 424 .end = 0xFFC004FF,
453 .flags = IORESOURCE_MEM, 425 .flags = IORESOURCE_MEM,
454 },{ 426 }, {
455 .start = 0xFFC02000, 427 .start = 0xFFC02000,
456 .end = 0xFFC020FF, 428 .end = 0xFFC020FF,
457 .flags = IORESOURCE_MEM, 429 .flags = IORESOURCE_MEM,
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index ba2f875a7f7d..9c43d7756510 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -37,12 +37,10 @@
37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
38#include <linux/usb_isp1362.h> 38#include <linux/usb_isp1362.h>
39#endif 39#endif
40#include <asm/irq.h>
41#include <linux/irq.h> 40#include <linux/irq.h>
42#include <linux/interrupt.h> 41#include <linux/interrupt.h>
43#include <asm/bfin5xx_spi.h>
44#include <linux/usb_sl811.h> 42#include <linux/usb_sl811.h>
45 43#include <asm/bfin5xx_spi.h>
46#include <linux/spi/ad7877.h> 44#include <linux/spi/ad7877.h>
47 45
48/* 46/*
@@ -85,7 +83,7 @@ static struct platform_device *bfin_isp1761_devices[] = {
85 83
86int __init bfin_isp1761_init(void) 84int __init bfin_isp1761_init(void)
87{ 85{
88 unsigned int num_devices=ARRAY_SIZE(bfin_isp1761_devices); 86 unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices);
89 87
90 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); 88 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
91 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); 89 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING);
@@ -107,15 +105,15 @@ static struct resource bfin_pcmcia_cf_resources[] = {
107 .start = 0x20310000, /* IO PORT */ 105 .start = 0x20310000, /* IO PORT */
108 .end = 0x20312000, 106 .end = 0x20312000,
109 .flags = IORESOURCE_MEM, 107 .flags = IORESOURCE_MEM,
110 },{ 108 }, {
111 .start = 0x20311000, /* Attribute Memeory */ 109 .start = 0x20311000, /* Attribute Memory */
112 .end = 0x20311FFF, 110 .end = 0x20311FFF,
113 .flags = IORESOURCE_MEM, 111 .flags = IORESOURCE_MEM,
114 },{ 112 }, {
115 .start = IRQ_PF4, 113 .start = IRQ_PF4,
116 .end = IRQ_PF4, 114 .end = IRQ_PF4,
117 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 115 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
118 },{ 116 }, {
119 .start = 6, /* Card Detect PF6 */ 117 .start = 6, /* Card Detect PF6 */
120 .end = 6, 118 .end = 6,
121 .flags = IORESOURCE_IRQ, 119 .flags = IORESOURCE_IRQ,
@@ -144,7 +142,7 @@ static struct resource smc91x_resources[] = {
144 .start = 0x20300300, 142 .start = 0x20300300,
145 .end = 0x20300300 + 16, 143 .end = 0x20300300 + 16,
146 .flags = IORESOURCE_MEM, 144 .flags = IORESOURCE_MEM,
147 },{ 145 }, {
148 146
149 .start = IRQ_PF7, 147 .start = IRQ_PF7,
150 .end = IRQ_PF7, 148 .end = IRQ_PF7,
@@ -159,17 +157,39 @@ static struct platform_device smc91x_device = {
159}; 157};
160#endif 158#endif
161 159
160#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
161static struct resource dm9000_resources[] = {
162 [0] = {
163 .start = 0x203FB800,
164 .end = 0x203FB800 + 8,
165 .flags = IORESOURCE_MEM,
166 },
167 [1] = {
168 .start = IRQ_PF9,
169 .end = IRQ_PF9,
170 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
171 },
172};
173
174static struct platform_device dm9000_device = {
175 .name = "dm9000",
176 .id = -1,
177 .num_resources = ARRAY_SIZE(dm9000_resources),
178 .resource = dm9000_resources,
179};
180#endif
181
162#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) 182#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
163static struct resource sl811_hcd_resources[] = { 183static struct resource sl811_hcd_resources[] = {
164 { 184 {
165 .start = 0x20340000, 185 .start = 0x20340000,
166 .end = 0x20340000, 186 .end = 0x20340000,
167 .flags = IORESOURCE_MEM, 187 .flags = IORESOURCE_MEM,
168 },{ 188 }, {
169 .start = 0x20340004, 189 .start = 0x20340004,
170 .end = 0x20340004, 190 .end = 0x20340004,
171 .flags = IORESOURCE_MEM, 191 .flags = IORESOURCE_MEM,
172 },{ 192 }, {
173 .start = CONFIG_USB_SL811_BFIN_IRQ, 193 .start = CONFIG_USB_SL811_BFIN_IRQ,
174 .end = CONFIG_USB_SL811_BFIN_IRQ, 194 .end = CONFIG_USB_SL811_BFIN_IRQ,
175 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 195 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -216,11 +236,11 @@ static struct resource isp1362_hcd_resources[] = {
216 .start = 0x20360000, 236 .start = 0x20360000,
217 .end = 0x20360000, 237 .end = 0x20360000,
218 .flags = IORESOURCE_MEM, 238 .flags = IORESOURCE_MEM,
219 },{ 239 }, {
220 .start = 0x20360004, 240 .start = 0x20360004,
221 .end = 0x20360004, 241 .end = 0x20360004,
222 .flags = IORESOURCE_MEM, 242 .flags = IORESOURCE_MEM,
223 },{ 243 }, {
224 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, 244 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
225 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, 245 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
226 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 246 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -261,7 +281,7 @@ static struct resource net2272_bfin_resources[] = {
261 .start = 0x20300000, 281 .start = 0x20300000,
262 .end = 0x20300000 + 0x100, 282 .end = 0x20300000 + 0x100,
263 .flags = IORESOURCE_MEM, 283 .flags = IORESOURCE_MEM,
264 },{ 284 }, {
265 .start = IRQ_PF7, 285 .start = IRQ_PF7,
266 .end = IRQ_PF7, 286 .end = IRQ_PF7,
267 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 287 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -287,11 +307,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
287 .size = 0x00020000, 307 .size = 0x00020000,
288 .offset = 0, 308 .offset = 0,
289 .mask_flags = MTD_CAP_ROM 309 .mask_flags = MTD_CAP_ROM
290 },{ 310 }, {
291 .name = "kernel", 311 .name = "kernel",
292 .size = 0xe0000, 312 .size = 0xe0000,
293 .offset = 0x20000 313 .offset = 0x20000
294 },{ 314 }, {
295 .name = "file system", 315 .name = "file system",
296 .size = 0x700000, 316 .size = 0x700000,
297 .offset = 0x00100000, 317 .offset = 0x00100000,
@@ -361,7 +381,6 @@ static struct bfin5xx_spi_chip ad5304_chip_info = {
361 381
362#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 382#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
363static struct bfin5xx_spi_chip spi_ad7877_chip_info = { 383static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
364// .cs_change_per_word = 1,
365 .enable_dma = 0, 384 .enable_dma = 0,
366 .bits_per_word = 16, 385 .bits_per_word = 16,
367}; 386};
@@ -449,19 +468,19 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
449#endif 468#endif
450#if defined(CONFIG_PBX) 469#if defined(CONFIG_PBX)
451 { 470 {
452 .modalias = "fxs-spi", 471 .modalias = "fxs-spi",
453 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 472 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
454 .bus_num = 1, 473 .bus_num = 1,
455 .chip_select = 3, 474 .chip_select = 3,
456 .controller_data= &spi_si3xxx_chip_info, 475 .controller_data = &spi_si3xxx_chip_info,
457 .mode = SPI_MODE_3, 476 .mode = SPI_MODE_3,
458 }, 477 },
459 { 478 {
460 .modalias = "fxo-spi", 479 .modalias = "fxo-spi",
461 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 480 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
462 .bus_num = 1, 481 .bus_num = 1,
463 .chip_select = 2, 482 .chip_select = 2,
464 .controller_data= &spi_si3xxx_chip_info, 483 .controller_data = &spi_si3xxx_chip_info,
465 .mode = SPI_MODE_3, 484 .mode = SPI_MODE_3,
466 }, 485 },
467#endif 486#endif
@@ -516,7 +535,7 @@ static struct resource bfin_uart_resources[] = {
516 .start = 0xFFC00400, 535 .start = 0xFFC00400,
517 .end = 0xFFC004FF, 536 .end = 0xFFC004FF,
518 .flags = IORESOURCE_MEM, 537 .flags = IORESOURCE_MEM,
519 },{ 538 }, {
520 .start = 0xFFC02000, 539 .start = 0xFFC02000,
521 .end = 0xFFC020FF, 540 .end = 0xFFC020FF,
522 .flags = IORESOURCE_MEM, 541 .flags = IORESOURCE_MEM,
@@ -571,6 +590,10 @@ static struct platform_device *stamp_devices[] __initdata = {
571 &smc91x_device, 590 &smc91x_device,
572#endif 591#endif
573 592
593#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
594 &dm9000_device,
595#endif
596
574#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 597#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
575 &bfin_mac_device, 598 &bfin_mac_device,
576#endif 599#endif
diff --git a/arch/blackfin/mach-bf537/dma.c b/arch/blackfin/mach-bf537/dma.c
new file mode 100644
index 000000000000..706cb97b0265
--- /dev/null
+++ b/arch/blackfin/mach-bf537/dma.c
@@ -0,0 +1,115 @@
1/*
2 * File: arch/blackfin/mach-bf537/dma.c
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: This file contains the simple DMA Implementation for Blackfin
8 *
9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29#include <asm/blackfin.h>
30#include <asm/dma.h>
31
32struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
33 (struct dma_register *) DMA0_NEXT_DESC_PTR,
34 (struct dma_register *) DMA1_NEXT_DESC_PTR,
35 (struct dma_register *) DMA2_NEXT_DESC_PTR,
36 (struct dma_register *) DMA3_NEXT_DESC_PTR,
37 (struct dma_register *) DMA4_NEXT_DESC_PTR,
38 (struct dma_register *) DMA5_NEXT_DESC_PTR,
39 (struct dma_register *) DMA6_NEXT_DESC_PTR,
40 (struct dma_register *) DMA7_NEXT_DESC_PTR,
41 (struct dma_register *) DMA8_NEXT_DESC_PTR,
42 (struct dma_register *) DMA9_NEXT_DESC_PTR,
43 (struct dma_register *) DMA10_NEXT_DESC_PTR,
44 (struct dma_register *) DMA11_NEXT_DESC_PTR,
45 (struct dma_register *) MDMA_D0_NEXT_DESC_PTR,
46 (struct dma_register *) MDMA_S0_NEXT_DESC_PTR,
47 (struct dma_register *) MDMA_D1_NEXT_DESC_PTR,
48 (struct dma_register *) MDMA_S1_NEXT_DESC_PTR,
49};
50
51int channel2irq(unsigned int channel)
52{
53 int ret_irq = -1;
54
55 switch (channel) {
56 case CH_PPI:
57 ret_irq = IRQ_PPI;
58 break;
59
60 case CH_EMAC_RX:
61 ret_irq = IRQ_MAC_RX;
62 break;
63
64 case CH_EMAC_TX:
65 ret_irq = IRQ_MAC_TX;
66 break;
67
68 case CH_UART1_RX:
69 ret_irq = IRQ_UART1_RX;
70 break;
71
72 case CH_UART1_TX:
73 ret_irq = IRQ_UART1_TX;
74 break;
75
76 case CH_SPORT0_RX:
77 ret_irq = IRQ_SPORT0_RX;
78 break;
79
80 case CH_SPORT0_TX:
81 ret_irq = IRQ_SPORT0_TX;
82 break;
83
84 case CH_SPORT1_RX:
85 ret_irq = IRQ_SPORT1_RX;
86 break;
87
88 case CH_SPORT1_TX:
89 ret_irq = IRQ_SPORT1_TX;
90 break;
91
92 case CH_SPI:
93 ret_irq = IRQ_SPI;
94 break;
95
96 case CH_UART_RX:
97 ret_irq = IRQ_UART_RX;
98 break;
99
100 case CH_UART_TX:
101 ret_irq = IRQ_UART_TX;
102 break;
103
104 case CH_MEM_STREAM0_SRC:
105 case CH_MEM_STREAM0_DEST:
106 ret_irq = IRQ_MEM_DMA0;
107 break;
108
109 case CH_MEM_STREAM1_SRC:
110 case CH_MEM_STREAM1_DEST:
111 ret_irq = IRQ_MEM_DMA1;
112 break;
113 }
114 return ret_irq;
115}
diff --git a/arch/blackfin/mach-bf537/head.S b/arch/blackfin/mach-bf537/head.S
index 2c2652bee7e5..429c8a1019da 100644
--- a/arch/blackfin/mach-bf537/head.S
+++ b/arch/blackfin/mach-bf537/head.S
@@ -28,7 +28,10 @@
28 */ 28 */
29 29
30#include <linux/linkage.h> 30#include <linux/linkage.h>
31#include <linux/init.h>
31#include <asm/blackfin.h> 32#include <asm/blackfin.h>
33#include <asm/trace.h>
34
32#if CONFIG_BFIN_KERNEL_CLOCK 35#if CONFIG_BFIN_KERNEL_CLOCK
33#include <asm/mach/mem_init.h> 36#include <asm/mach/mem_init.h>
34#endif 37#endif
@@ -40,20 +43,21 @@
40.extern ___bss_start 43.extern ___bss_start
41.extern _bf53x_relocate_l1_mem 44.extern _bf53x_relocate_l1_mem
42 45
43#define INITIAL_STACK 0xFFB01000 46#define INITIAL_STACK 0xFFB01000
44 47
45.text 48__INIT
46 49
47ENTRY(__start) 50ENTRY(__start)
48ENTRY(__stext)
49 /* R0: argument of command line string, passed from uboot, save it */ 51 /* R0: argument of command line string, passed from uboot, save it */
50 R7 = R0; 52 R7 = R0;
51 /* Set the SYSCFG register */ 53 /* Set the SYSCFG register:
54 * Enable Cycle Counter and Nesting Of Interrupts (3rd Bit)
55 */
52 R0 = 0x36; 56 R0 = 0x36;
53 SYSCFG = R0; /*Enable Cycle Counter and Nesting Of Interrupts(3rd Bit)*/ 57 SYSCFG = R0;
54 R0 = 0; 58 R0 = 0;
55 59
56 /* Clear Out All the data and pointer Registers*/ 60 /* Clear Out All the data and pointer Registers */
57 R1 = R0; 61 R1 = R0;
58 R2 = R0; 62 R2 = R0;
59 R3 = R0; 63 R3 = R0;
@@ -75,7 +79,7 @@ ENTRY(__stext)
75 L2 = r0; 79 L2 = r0;
76 L3 = r0; 80 L3 = r0;
77 81
78 /* Clear Out All the DAG Registers*/ 82 /* Clear Out All the DAG Registers */
79 B0 = r0; 83 B0 = r0;
80 B1 = r0; 84 B1 = r0;
81 B2 = r0; 85 B2 = r0;
@@ -91,6 +95,10 @@ ENTRY(__stext)
91 M2 = r0; 95 M2 = r0;
92 M3 = r0; 96 M3 = r0;
93 97
98 trace_buffer_start(p0,r0);
99 P0 = R1;
100 R0 = R1;
101
94 /* Turn off the icache */ 102 /* Turn off the icache */
95 p0.l = (IMEM_CONTROL & 0xFFFF); 103 p0.l = (IMEM_CONTROL & 0xFFFF);
96 p0.h = (IMEM_CONTROL >> 16); 104 p0.h = (IMEM_CONTROL >> 16);
@@ -191,7 +199,7 @@ ENTRY(__stext)
191 199
192 p0.h = hi(UART_DLL); 200 p0.h = hi(UART_DLL);
193 p0.l = lo(UART_DLL); 201 p0.l = lo(UART_DLL);
194 r0 = 0x00(Z); 202 r0 = 0x0(Z);
195 w[p0] = r0.L; 203 w[p0] = r0.L;
196 ssync; 204 ssync;
197 205
@@ -218,6 +226,7 @@ ENTRY(__stext)
218#if CONFIG_BFIN_KERNEL_CLOCK 226#if CONFIG_BFIN_KERNEL_CLOCK
219 call _start_dma_code; 227 call _start_dma_code;
220#endif 228#endif
229
221 /* Code for initializing Async memory banks */ 230 /* Code for initializing Async memory banks */
222 231
223 p2.h = hi(EBIU_AMBCTL1); 232 p2.h = hi(EBIU_AMBCTL1);
@@ -272,6 +281,7 @@ ENTRY(__stext)
272 281
273.LWAIT_HERE: 282.LWAIT_HERE:
274 jump .LWAIT_HERE; 283 jump .LWAIT_HERE;
284ENDPROC(__start)
275 285
276ENTRY(_real_start) 286ENTRY(_real_start)
277 [ -- sp ] = reti; 287 [ -- sp ] = reti;
@@ -291,7 +301,7 @@ ENTRY(_real_start)
291 p2.h = ___bss_stop; 301 p2.h = ___bss_stop;
292 r0 = 0; 302 r0 = 0;
293 p2 -= p1; 303 p2 -= p1;
294 lsetup (.L_clear_bss, .L_clear_bss ) lc0 = p2; 304 lsetup (.L_clear_bss, .L_clear_bss) lc0 = p2;
295.L_clear_bss: 305.L_clear_bss:
296 B[p1++] = r0; 306 B[p1++] = r0;
297 307
@@ -306,7 +316,7 @@ ENTRY(_real_start)
306 r0 = r0 >> 1; 316 r0 = r0 >> 1;
307 p2 = r0; 317 p2 = r0;
308 r0 = 0; 318 r0 = 0;
309 lsetup (.L_clear_zero, .L_clear_zero ) lc0 = p2; 319 lsetup (.L_clear_zero, .L_clear_zero) lc0 = p2;
310.L_clear_zero: 320.L_clear_zero:
311 W[p1++] = r0; 321 W[p1++] = r0;
312 322
@@ -328,9 +338,8 @@ ENTRY(_real_start)
328 r1 = p3; 338 r1 = p3;
329 [p1] = r1; 339 [p1] = r1;
330 340
331
332 /* 341 /*
333 * load the current thread pointer and stack 342 * load the current thread pointer and stack
334 */ 343 */
335 r1.l = _init_thread_union; 344 r1.l = _init_thread_union;
336 r1.h = _init_thread_union; 345 r1.h = _init_thread_union;
@@ -341,9 +350,10 @@ ENTRY(_real_start)
341 sp = r1; 350 sp = r1;
342 usp = sp; 351 usp = sp;
343 fp = sp; 352 fp = sp;
344 call _start_kernel; 353 jump.l _start_kernel;
345.L_exit: 354ENDPROC(_real_start)
346 jump.s .L_exit; 355
356__FINIT
347 357
348.section .l1.text 358.section .l1.text
349#if CONFIG_BFIN_KERNEL_CLOCK 359#if CONFIG_BFIN_KERNEL_CLOCK
@@ -462,6 +472,7 @@ ENTRY(_start_dma_code)
462 SSYNC; 472 SSYNC;
463 473
464 RTS; 474 RTS;
475ENDPROC(_start_dma_code)
465#endif /* CONFIG_BFIN_KERNEL_CLOCK */ 476#endif /* CONFIG_BFIN_KERNEL_CLOCK */
466 477
467ENTRY(_bfin_reset) 478ENTRY(_bfin_reset)
diff --git a/arch/blackfin/mach-bf537/ints-priority.c b/arch/blackfin/mach-bf537/ints-priority.c
index fd6308eccbe6..a8b915f202ec 100644
--- a/arch/blackfin/mach-bf537/ints-priority.c
+++ b/arch/blackfin/mach-bf537/ints-priority.c
@@ -4,7 +4,7 @@
4 * Author: Michael Hennerich 4 * Author: Michael Hennerich
5 * 5 *
6 * Created: 6 * Created:
7 * Description: Set up the interupt priorities 7 * Description: Set up the interrupt priorities
8 * 8 *
9 * Modified: 9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc. 10 * Copyright 2004-2006 Analog Devices Inc.
@@ -28,8 +28,8 @@
28 */ 28 */
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/irq.h>
31#include <asm/blackfin.h> 32#include <asm/blackfin.h>
32#include <asm/irq.h>
33 33
34void program_IAR(void) 34void program_IAR(void)
35{ 35{
diff --git a/arch/blackfin/mach-bf548/Kconfig b/arch/blackfin/mach-bf548/Kconfig
new file mode 100644
index 000000000000..e78b03d56c7c
--- /dev/null
+++ b/arch/blackfin/mach-bf548/Kconfig
@@ -0,0 +1,316 @@
1if (BF54x)
2
3menu "BF548 Specific Configuration"
4
5comment "Interrupt Priority Assignment"
6menu "Priority"
7
8config IRQ_PLL_WAKEUP
9 int "IRQ_PLL_WAKEUP"
10 default 7
11config IRQ_DMAC0_ERR
12 int "IRQ_DMAC0_ERR"
13 default 7
14config IRQ_EPPI0_ERR
15 int "IRQ_EPPI0_ERR"
16 default 7
17config IRQ_SPORT0_ERR
18 int "IRQ_SPORT0_ERR"
19 default 7
20config IRQ_SPORT1_ERR
21 int "IRQ_SPORT1_ERR"
22 default 7
23config IRQ_SPI0_ERR
24 int "IRQ_SPI0_ERR"
25 default 7
26config IRQ_UART0_ERR
27 int "IRQ_UART0_ERR"
28 default 7
29config IRQ_RTC
30 int "IRQ_RTC"
31 default 8
32config IRQ_EPPI0
33 int "IRQ_EPPI0"
34 default 8
35config IRQ_SPORT0_RX
36 int "IRQ_SPORT0_RX"
37 default 9
38config IRQ_SPORT0_TX
39 int "IRQ_SPORT0_TX"
40 default 9
41config IRQ_SPORT1_RX
42 int "IRQ_SPORT1_RX"
43 default 9
44config IRQ_SPORT1_TX
45 int "IRQ_SPORT1_TX"
46 default 9
47config IRQ_SPI0
48 int "IRQ_SPI0"
49 default 10
50config IRQ_UART0_RX
51 int "IRQ_UART0_RX"
52 default 10
53config IRQ_UART0_TX
54 int "IRQ_UART0_TX"
55 default 10
56config IRQ_TIMER8
57 int "IRQ_TIMER8"
58 default 11
59config IRQ_TIMER9
60 int "IRQ_TIMER9"
61 default 11
62config IRQ_TIMER10
63 int "IRQ_TIMER10"
64 default 11
65config IRQ_PINT0
66 int "IRQ_PINT0"
67 default 12
68config IRQ_PINT1
69 int "IRQ_PINT0"
70 default 12
71config IRQ_MDMAS0
72 int "IRQ_MDMAS0"
73 default 13
74config IRQ_MDMAS1
75 int "IRQ_DMDMAS1"
76 default 13
77config IRQ_WATCHDOG
78 int "IRQ_WATCHDOG"
79 default 13
80config IRQ_DMAC1_ERR
81 int "IRQ_DMAC1_ERR"
82 default 7
83config IRQ_SPORT2_ERR
84 int "IRQ_SPORT2_ERR"
85 default 7
86config IRQ_SPORT3_ERR
87 int "IRQ_SPORT3_ERR"
88 default 7
89config IRQ_MXVR_DATA
90 int "IRQ MXVR Data"
91 default 7
92config IRQ_SPI1_ERR
93 int "IRQ_SPI1_ERR"
94 default 7
95config IRQ_SPI2_ERR
96 int "IRQ_SPI2_ERR"
97 default 7
98config IRQ_UART1_ERR
99 int "IRQ_UART1_ERR"
100 default 7
101config IRQ_UART2_ERR
102 int "IRQ_UART2_ERR"
103 default 7
104config IRQ_CAN0_ERR
105 int "IRQ_CAN0_ERR"
106 default 7
107config IRQ_SPORT2_RX
108 int "IRQ_SPORT2_RX"
109 default 9
110config IRQ_SPORT2_TX
111 int "IRQ_SPORT2_TX"
112 default 9
113config IRQ_SPORT3_RX
114 int "IRQ_SPORT3_RX"
115 default 9
116config IRQ_SPORT3_TX
117 int "IRQ_SPORT3_TX"
118 default 9
119config IRQ_EPPI1
120 int "IRQ_EPPI1"
121 default 9
122config IRQ_EPPI2
123 int "IRQ_EPPI2"
124 default 9
125config IRQ_SPI1
126 int "IRQ_SPI1"
127 default 10
128config IRQ_SPI2
129 int "IRQ_SPI2"
130 default 10
131config IRQ_UART1_RX
132 int "IRQ_UART1_RX"
133 default 10
134config IRQ_UART1_TX
135 int "IRQ_UART1_TX"
136 default 10
137config IRQ_ATAPI_RX
138 int "IRQ_ATAPI_RX"
139 default 10
140config IRQ_ATAPI_TX
141 int "IRQ_ATAPI_TX"
142 default 10
143config IRQ_TWI0
144 int "IRQ_TWI0"
145 default 11
146config IRQ_TWI1
147 int "IRQ_TWI1"
148 default 11
149config IRQ_CAN0_RX
150 int "IRQ_CAN_RX"
151 default 11
152config IRQ_CAN0_TX
153 int "IRQ_CAN_TX"
154 default 11
155config IRQ_MDMAS2
156 int "IRQ_MDMAS2"
157 default 13
158config IRQ_MDMAS3
159 int "IRQ_DMMAS3"
160 default 13
161config IRQ_MXVR_ERR
162 int "IRQ_MXVR_ERR"
163 default 11
164config IRQ_MXVR_MSG
165 int "IRQ_MXVR_MSG"
166 default 11
167config IRQ_MXVR_PKT
168 int "IRQ_MXVR_PKT"
169 default 11
170config IRQ_EPPI1_ERR
171 int "IRQ_EPPI1_ERR"
172 default 7
173config IRQ_EPPI2_ERR
174 int "IRQ_EPPI2_ERR"
175 default 7
176config IRQ_UART3_ERR
177 int "IRQ_UART3_ERR"
178 default 7
179config IRQ_HOST_ERR
180 int "IRQ_HOST_ERR"
181 default 7
182config IRQ_PIXC_ERR
183 int "IRQ_PIXC_ERR"
184 default 7
185config IRQ_NFC_ERR
186 int "IRQ_NFC_ERR"
187 default 7
188config IRQ_ATAPI_ERR
189 int "IRQ_ATAPI_ERR"
190 default 7
191config IRQ_CAN1_ERR
192 int "IRQ_CAN1_ERR"
193 default 7
194config IRQ_HS_DMA_ERR
195 int "IRQ Handshake DMA Status"
196 default 7
197config IRQ_PIXC_IN0
198 int "IRQ PIXC IN0"
199 default 8
200config IRQ_PIXC_IN1
201 int "IRQ PIXC IN1"
202 default 8
203config IRQ_PIXC_OUT
204 int "IRQ PIXC OUT"
205 default 8
206config IRQ_SDH
207 int "IRQ SDH"
208 default 8
209config IRQ_CNT
210 int "IRQ CNT"
211 default 8
212config IRQ_KEY
213 int "IRQ KEY"
214 default 8
215config IRQ_CAN1_RX
216 int "IRQ CAN1 RX"
217 default 11
218config IRQ_CAN1_TX
219 int "IRQ_CAN1_TX"
220 default 11
221config IRQ_SDH_MASK0
222 int "IRQ_SDH_MASK0"
223 default 11
224config IRQ_SDH_MASK1
225 int "IRQ_SDH_MASK1"
226 default 11
227config IRQ_USB_INT0
228 int "IRQ USB INT0"
229 default 11
230config IRQ_USB_INT1
231 int "IRQ USB INT1"
232 default 11
233config IRQ_USB_INT2
234 int "IRQ USB INT2"
235 default 11
236config IRQ_USB_DMA
237 int "IRQ USB DMA"
238 default 11
239config IRQ_OTPSEC
240 int "IRQ OPTSEC"
241 default 11
242config IRQ_TIMER0
243 int "IRQ_TIMER0"
244 default 11
245config IRQ_TIMER1
246 int "IRQ_TIMER1"
247 default 11
248config IRQ_TIMER2
249 int "IRQ_TIMER2"
250 default 11
251config IRQ_TIMER3
252 int "IRQ_TIMER3"
253 default 11
254config IRQ_TIMER4
255 int "IRQ_TIMER4"
256 default 11
257config IRQ_TIMER5
258 int "IRQ_TIMER5"
259 default 11
260config IRQ_TIMER6
261 int "IRQ_TIMER6"
262 default 11
263config IRQ_TIMER7
264 int "IRQ_TIMER7"
265 default 11
266config IRQ_PINT2
267 int "IRQ_PIN2"
268 default 11
269config IRQ_PINT3
270 int "IRQ_PIN3"
271 default 11
272
273 help
274 Enter the priority numbers between 7-13 ONLY. Others are Reserved.
275 This applies to all the above. It is not recommended to assign the
276 highest priority number 7 to UART or any other device.
277
278endmenu
279
280comment "Pin Interrupt to Port Assignment"
281menu "Assignment"
282
283config PINTx_REASSIGN
284 bool "Reprogram PINT Assignment"
285 default n
286 help
287 The interrupt assignment registers controls the pin-to-interrupt
288 assignment in a byte-wide manner. Each option allows you to select
289 a set of pins (High/Low Byte) of an specific Port being mapped
290 to one of the four PIN Interrupts IRQ_PINTx.
291
292 You shouldn't change any of these unless you know exactly what you're doing.
293 Please consult the Blackfin BF54x Processor Hardware Reference Manual.
294
295config PINT0_ASSIGN
296 hex "PINT0_ASSIGN"
297 depends on PINTx_REASSIGN
298 default 0x00000101
299config PINT1_ASSIGN
300 hex "PINT1_ASSIGN"
301 depends on PINTx_REASSIGN
302 default 0x01010000
303config PINT2_ASSIGN
304 hex "PINT2_ASSIGN"
305 depends on PINTx_REASSIGN
306 default 0x00000101
307config PINT3_ASSIGN
308 hex "PINT3_ASSIGN"
309 depends on PINTx_REASSIGN
310 default 0x02020303
311
312endmenu
313
314endmenu
315
316endif
diff --git a/arch/blackfin/mach-bf548/Makefile b/arch/blackfin/mach-bf548/Makefile
new file mode 100644
index 000000000000..060ad78ebf1d
--- /dev/null
+++ b/arch/blackfin/mach-bf548/Makefile
@@ -0,0 +1,9 @@
1#
2# arch/blackfin/mach-bf537/Makefile
3#
4
5extra-y := head.o
6
7obj-y := ints-priority.o dma.o gpio.o
8
9obj-$(CONFIG_CPU_FREQ) += cpu.o
diff --git a/arch/blackfin/mach-bf548/boards/Makefile b/arch/blackfin/mach-bf548/boards/Makefile
new file mode 100644
index 000000000000..486e07c99a51
--- /dev/null
+++ b/arch/blackfin/mach-bf548/boards/Makefile
@@ -0,0 +1,5 @@
1#
2# arch/blackfin/mach-bf548/boards/Makefile
3#
4
5obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o led.o
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
new file mode 100644
index 000000000000..96ad95fab1a8
--- /dev/null
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -0,0 +1,114 @@
1/*
2 * File: arch/blackfin/mach-bf548/boards/ezkit.c
3 * Based on: arch/blackfin/mach-bf537/boards/ezkit.c
4 * Author: Aidan Williams <aidan@nicta.com.au>
5 *
6 * Created:
7 * Description:
8 *
9 * Modified:
10 * Copyright 2005 National ICT Australia (NICTA)
11 * Copyright 2004-2007 Analog Devices Inc.
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, see the file COPYING, or write
27 * to the Free Software Foundation, Inc.,
28 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 */
30
31#include <linux/device.h>
32#include <linux/platform_device.h>
33#include <linux/mtd/mtd.h>
34#include <linux/mtd/partitions.h>
35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h>
37#include <linux/irq.h>
38#include <linux/irq.h>
39#include <linux/interrupt.h>
40#include <asm/bfin5xx_spi.h>
41
42/*
43 * Name the Board for the /proc/cpuinfo
44 */
45char *bfin_board_name = "ADSP-BF548-EZKIT";
46
47/*
48 * Driver needs to know address, irq and flag pin.
49 */
50
51#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
52static struct platform_device rtc_device = {
53 .name = "rtc-bfin",
54 .id = -1,
55};
56#endif
57
58#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
59static struct resource bfin_uart_resources[] = {
60#ifdef CONFIG_SERIAL_BFIN_UART0
61 {
62 .start = 0xFFC00400,
63 .end = 0xFFC004FF,
64 .flags = IORESOURCE_MEM,
65 },
66#endif
67#ifdef CONFIG_SERIAL_BFIN_UART1
68 {
69 .start = 0xFFC02000,
70 .end = 0xFFC020FF,
71 .flags = IORESOURCE_MEM,
72 },
73#endif
74#ifdef CONFIG_SERIAL_BFIN_UART2
75 {
76 .start = 0xFFC02100,
77 .end = 0xFFC021FF,
78 .flags = IORESOURCE_MEM,
79 },
80#endif
81#ifdef CONFIG_SERIAL_BFIN_UART3
82 {
83 .start = 0xFFC03100,
84 .end = 0xFFC031FF,
85 },
86#endif
87};
88
89static struct platform_device bfin_uart_device = {
90 .name = "bfin-uart",
91 .id = 1,
92 .num_resources = ARRAY_SIZE(bfin_uart_resources),
93 .resource = bfin_uart_resources,
94};
95#endif
96
97static struct platform_device *ezkit_devices[] __initdata = {
98#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
99 &rtc_device,
100#endif
101
102#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
103 &bfin_uart_device,
104#endif
105};
106
107static int __init stamp_init(void)
108{
109 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
110 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
111 return 0;
112}
113
114arch_initcall(stamp_init);
diff --git a/arch/blackfin/mach-bf548/boards/led.S b/arch/blackfin/mach-bf548/boards/led.S
new file mode 100644
index 000000000000..f47daf3770d0
--- /dev/null
+++ b/arch/blackfin/mach-bf548/boards/led.S
@@ -0,0 +1,172 @@
1/****************************************************
2 * LED1 ---- PG6 LED2 ---- PG7 *
3 * LED3 ---- PG8 LED4 ---- PG9 *
4 * LED5 ---- PG10 LED6 ---- PG11 *
5 ****************************************************/
6
7#include <linux/linkage.h>
8#include <asm/blackfin.h>
9
10/* All functions in this file save the registers they uses.
11 So there is no need to save any registers before calling them. */
12
13 .text;
14
15/* Initialize LEDs. */
16
17ENTRY(_led_init)
18 LINK 0;
19 [--SP] = P0;
20 [--SP] = R0;
21 [--SP] = R1;
22 [--SP] = R2;
23 R1 = (PG6|PG7|PG8|PG9|PG10|PG11)(Z);
24 R2 = ~R1;
25
26 P0.H = hi(PORTG_FER);
27 P0.L = lo(PORTG_FER);
28 R0 = W[P0](Z);
29 SSYNC;
30 R0 = R0 & R2;
31 W[P0] = R0.L;
32 SSYNC;
33
34 P0.H = hi(PORTG_DIR_SET);
35 P0.L = lo(PORTG_DIR_SET);
36 W[P0] = R1.L;
37 SSYNC;
38
39 P0.H = hi(PORTG_INEN);
40 P0.L = lo(PORTG_INEN);
41 R0 = W[P0](Z);
42 SSYNC;
43 R0 = R0 & R2;
44 W[P0] = R0.L;
45 SSYNC;
46
47 R2 = [SP++];
48 R1 = [SP++];
49 R0 = [SP++];
50 P0 = [SP++];
51 RTS;
52 .size _led_init, .-_led_init
53
54/* Set one LED on. Leave other LEDs unchanged.
55 It expects the LED number passed through R0. */
56
57ENTRY(_led_on)
58 LINK 0;
59 [--SP] = P0;
60 [--SP] = R1;
61 CALL _led_init;
62 R1 = 1;
63 R0 += 5;
64 R1 <<= R0;
65 P0.H = hi(PORTG_SET);
66 P0.L = lo(PORTG_SET);
67 W[P0] = R1.L;
68 SSYNC;
69 R1 = [SP++];
70 P0 = [SP++];
71 UNLINK;
72 RTS;
73 .size _led_on, .-_led_on
74
75/* Set one LED off. Leave other LEDs unchanged. */
76
77ENTRY(_led_off)
78 LINK 0;
79 [--SP] = P0;
80 [--SP] = R1;
81 CALL _led_init;
82 R1 = 1;
83 R0 += 5;
84 R1 <<= R0;
85 P0.H = hi(PORTG_CLEAR);
86 P0.L = lo(PORTG_CLEAR);
87 W[P0] = R1.L;
88 SSYNC;
89 R1 = [SP++];
90 P0 = [SP++];
91 UNLINK;
92 RTS;
93 .size _led_off, .-_led_off
94
95/* Toggle one LED. Leave other LEDs unchanged. */
96
97ENTRY(_led_toggle)
98 LINK 0;
99 [--SP] = P0;
100 [--SP] = R1;
101 CALL _led_init;
102 R1 = 1;
103 R0 += 5;
104 R1 <<= R0;
105 P0.H = hi(PORTG);
106 P0.L = lo(PORTG);
107 R0 = W[P0](Z);
108 SSYNC;
109 R0 = R0 ^ R1;
110 W[P0] = R0.L;
111 SSYNC;
112 R1 = [SP++];
113 P0 = [SP++];
114 UNLINK;
115 RTS;
116 .size _led_toggle, .-_led_toggle
117
118/* Display the number using LEDs in binary format. */
119
120ENTRY(_led_disp_num)
121 LINK 0;
122 [--SP] = P0;
123 [--SP] = R1;
124 [--SP] = R2;
125 CALL _led_init;
126 R1 = 0x3f(X);
127 R0 = R0 & R1;
128 R2 = 6(X);
129 R0 <<= R2;
130 R1 <<= R2;
131 P0.H = hi(PORTG);
132 P0.L = lo(PORTG);
133 R2 = W[P0](Z);
134 SSYNC;
135 R1 = ~R1;
136 R2 = R2 & R1;
137 R2 = R2 | R0;
138 W[P0] = R2.L;
139 SSYNC;
140 R2 = [SP++];
141 R1 = [SP++];
142 P0 = [SP++];
143 UNLINK;
144 RTS;
145 .size _led_disp_num, .-_led_disp_num
146
147/* Toggle the number using LEDs in binary format. */
148
149ENTRY(_led_toggle_num)
150 LINK 0;
151 [--SP] = P0;
152 [--SP] = R1;
153 [--SP] = R2;
154 CALL _led_init;
155 R1 = 0x3f(X);
156 R0 = R0 & R1;
157 R1 = 6(X);
158 R0 <<= R1;
159 P0.H = hi(PORTG);
160 P0.L = lo(PORTG);
161 R1 = W[P0](Z);
162 SSYNC;
163 R1 = R1 ^ R0;
164 W[P0] = R1.L;
165 SSYNC;
166 R2 = [SP++];
167 R1 = [SP++];
168 P0 = [SP++];
169 UNLINK;
170 RTS;
171 .size _led_toggle_num, .-_led_toggle_num
172
diff --git a/arch/blackfin/mach-bf548/cpu.c b/arch/blackfin/mach-bf548/cpu.c
new file mode 100644
index 000000000000..4298a3ccfbfc
--- /dev/null
+++ b/arch/blackfin/mach-bf548/cpu.c
@@ -0,0 +1,159 @@
1/*
2 * File: arch/blackfin/mach-bf548/cpu.c
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: clock scaling for the bf54x
8 *
9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#include <linux/kernel.h>
31#include <linux/types.h>
32#include <linux/init.h>
33#include <linux/cpufreq.h>
34#include <asm/dpmc.h>
35#include <linux/fs.h>
36#include <asm/bfin-global.h>
37
38/* CONFIG_CLKIN_HZ=25000000 */
39#define VCO5 (CONFIG_CLKIN_HZ*45)
40#define VCO4 (CONFIG_CLKIN_HZ*36)
41#define VCO3 (CONFIG_CLKIN_HZ*27)
42#define VCO2 (CONFIG_CLKIN_HZ*18)
43#define VCO1 (CONFIG_CLKIN_HZ*9)
44#define VCO(x) VCO##x
45
46#define MFREQ(x) {VCO(x),VCO(x)/4},{VCO(x),VCO(x)/2},{VCO(x),VCO(x)}
47/* frequency */
48static struct cpufreq_frequency_table bf548_freq_table[] = {
49 MFREQ(1),
50 MFREQ(3),
51 {VCO4, VCO4 / 2}, {VCO4, VCO4},
52 MFREQ(5),
53 {0, CPUFREQ_TABLE_END},
54};
55
56/*
57 * dpmc_fops->ioctl()
58 * static int dpmc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
59 */
60static int bf548_getfreq(unsigned int cpu)
61{
62 unsigned long cclk_mhz;
63
64 /* The driver only support single cpu */
65 if (cpu == 0)
66 dpmc_fops.ioctl(NULL, NULL, IOCTL_GET_CORECLOCK, &cclk_mhz);
67 else
68 cclk_mhz = -1;
69
70 return cclk_mhz;
71}
72
73static int bf548_target(struct cpufreq_policy *policy,
74 unsigned int target_freq, unsigned int relation)
75{
76 unsigned long cclk_mhz;
77 unsigned long vco_mhz;
78 unsigned long flags;
79 unsigned int index;
80 struct cpufreq_freqs freqs;
81
82 if (cpufreq_frequency_table_target(policy, bf548_freq_table, target_freq, relation, &index))
83 return -EINVAL;
84
85 cclk_mhz = bf548_freq_table[index].frequency;
86 vco_mhz = bf548_freq_table[index].index;
87
88 dpmc_fops.ioctl(NULL, NULL, IOCTL_CHANGE_FREQUENCY, &vco_mhz);
89 freqs.old = bf548_getfreq(0);
90 freqs.new = cclk_mhz;
91 freqs.cpu = 0;
92
93 pr_debug("cclk begin change to cclk %d,vco=%d,index=%d,target=%d,oldfreq=%d\n",
94 cclk_mhz, vco_mhz, index, target_freq, freqs.old);
95
96 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
97 local_irq_save(flags);
98 dpmc_fops.ioctl(NULL, NULL, IOCTL_SET_CCLK, &cclk_mhz);
99 local_irq_restore(flags);
100 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
101
102 vco_mhz = get_vco();
103 cclk_mhz = get_cclk();
104 return 0;
105}
106
107/* make sure that only the "userspace" governor is run -- anything else wouldn't make sense on
108 * this platform, anyway.
109 */
110static int bf548_verify_speed(struct cpufreq_policy *policy)
111{
112 return cpufreq_frequency_table_verify(policy, &bf548_freq_table);
113}
114
115static int __init __bf548_cpu_init(struct cpufreq_policy *policy)
116{
117 if (policy->cpu != 0)
118 return -EINVAL;
119
120 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
121
122 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
123 /*Now ,only support one cpu */
124 policy->cur = bf548_getfreq(0);
125 cpufreq_frequency_table_get_attr(bf548_freq_table, policy->cpu);
126 return cpufreq_frequency_table_cpuinfo(policy, bf548_freq_table);
127}
128
129static struct freq_attr *bf548_freq_attr[] = {
130 &cpufreq_freq_attr_scaling_available_freqs,
131 NULL,
132};
133
134static struct cpufreq_driver bf548_driver = {
135 .verify = bf548_verify_speed,
136 .target = bf548_target,
137 .get = bf548_getfreq,
138 .init = __bf548_cpu_init,
139 .name = "bf548",
140 .owner = THIS_MODULE,
141 .attr = bf548_freq_attr,
142};
143
144static int __init bf548_cpu_init(void)
145{
146 return cpufreq_register_driver(&bf548_driver);
147}
148
149static void __exit bf548_cpu_exit(void)
150{
151 cpufreq_unregister_driver(&bf548_driver);
152}
153
154MODULE_AUTHOR("Mickael Kang");
155MODULE_DESCRIPTION("cpufreq driver for BF548 CPU");
156MODULE_LICENSE("GPL");
157
158module_init(bf548_cpu_init);
159module_exit(bf548_cpu_exit);
diff --git a/arch/blackfin/mach-bf548/dma.c b/arch/blackfin/mach-bf548/dma.c
new file mode 100644
index 000000000000..a8184113be48
--- /dev/null
+++ b/arch/blackfin/mach-bf548/dma.c
@@ -0,0 +1,156 @@
1/*
2 * File: arch/blackfin/mach-bf561/dma.c
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: This file contains the simple DMA Implementation for Blackfin
8 *
9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#include <asm/blackfin.h>
31#include <asm/dma.h>
32
33 struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
34 (struct dma_register *) DMA0_NEXT_DESC_PTR,
35 (struct dma_register *) DMA1_NEXT_DESC_PTR,
36 (struct dma_register *) DMA2_NEXT_DESC_PTR,
37 (struct dma_register *) DMA3_NEXT_DESC_PTR,
38 (struct dma_register *) DMA4_NEXT_DESC_PTR,
39 (struct dma_register *) DMA5_NEXT_DESC_PTR,
40 (struct dma_register *) DMA6_NEXT_DESC_PTR,
41 (struct dma_register *) DMA7_NEXT_DESC_PTR,
42 (struct dma_register *) DMA8_NEXT_DESC_PTR,
43 (struct dma_register *) DMA9_NEXT_DESC_PTR,
44 (struct dma_register *) DMA10_NEXT_DESC_PTR,
45 (struct dma_register *) DMA11_NEXT_DESC_PTR,
46 (struct dma_register *) DMA12_NEXT_DESC_PTR,
47 (struct dma_register *) DMA13_NEXT_DESC_PTR,
48 (struct dma_register *) DMA14_NEXT_DESC_PTR,
49 (struct dma_register *) DMA15_NEXT_DESC_PTR,
50 (struct dma_register *) DMA16_NEXT_DESC_PTR,
51 (struct dma_register *) DMA17_NEXT_DESC_PTR,
52 (struct dma_register *) DMA18_NEXT_DESC_PTR,
53 (struct dma_register *) DMA19_NEXT_DESC_PTR,
54 (struct dma_register *) DMA20_NEXT_DESC_PTR,
55 (struct dma_register *) DMA21_NEXT_DESC_PTR,
56 (struct dma_register *) DMA22_NEXT_DESC_PTR,
57 (struct dma_register *) DMA23_NEXT_DESC_PTR,
58 (struct dma_register *) MDMA_D0_NEXT_DESC_PTR,
59 (struct dma_register *) MDMA_S0_NEXT_DESC_PTR,
60 (struct dma_register *) MDMA_D1_NEXT_DESC_PTR,
61 (struct dma_register *) MDMA_S1_NEXT_DESC_PTR,
62 (struct dma_register *) MDMA_D2_NEXT_DESC_PTR,
63 (struct dma_register *) MDMA_S2_NEXT_DESC_PTR,
64 (struct dma_register *) MDMA_D3_NEXT_DESC_PTR,
65 (struct dma_register *) MDMA_S3_NEXT_DESC_PTR,
66};
67
68int channel2irq(unsigned int channel)
69{
70 int ret_irq = -1;
71
72 switch (channel) {
73 case CH_SPORT0_RX:
74 ret_irq = IRQ_SPORT0_RX;
75 break;
76 case CH_SPORT0_TX:
77 ret_irq = IRQ_SPORT0_TX;
78 break;
79 case CH_SPORT1_RX:
80 ret_irq = IRQ_SPORT1_RX;
81 break;
82 case CH_SPORT1_TX:
83 ret_irq = IRQ_SPORT1_TX;
84 case CH_SPI0:
85 ret_irq = IRQ_SPI0;
86 break;
87 case CH_SPI1:
88 ret_irq = IRQ_SPI1;
89 break;
90 case CH_UART0_RX:
91 ret_irq = IRQ_UART_RX;
92 break;
93 case CH_UART0_TX:
94 ret_irq = IRQ_UART_TX;
95 break;
96 case CH_UART1_RX:
97 ret_irq = IRQ_UART_RX;
98 break;
99 case CH_UART1_TX:
100 ret_irq = IRQ_UART_TX;
101 break;
102 case CH_EPPI0:
103 ret_irq = IRQ_EPPI0;
104 break;
105 case CH_EPPI1:
106 ret_irq = IRQ_EPPI1;
107 break;
108 case CH_EPPI2:
109 ret_irq = IRQ_EPPI2;
110 break;
111 case CH_PIXC_IMAGE:
112 ret_irq = IRQ_PIXC_IN0;
113 break;
114 case CH_PIXC_OVERLAY:
115 ret_irq = IRQ_PIXC_IN1;
116 break;
117 case CH_PIXC_OUTPUT:
118 ret_irq = IRQ_PIXC_OUT;
119 break;
120 case CH_SPORT2_RX:
121 ret_irq = IRQ_SPORT2_RX;
122 break;
123 case CH_SPORT2_TX:
124 ret_irq = IRQ_SPORT2_TX;
125 break;
126 case CH_SPORT3_RX:
127 ret_irq = IRQ_SPORT3_RX;
128 break;
129 case CH_SPORT3_TX:
130 ret_irq = IRQ_SPORT3_TX;
131 break;
132 case CH_SDH:
133 ret_irq = IRQ_SDH;
134 break;
135 case CH_SPI2:
136 ret_irq = IRQ_SPI2;
137 break;
138 case CH_MEM_STREAM0_SRC:
139 case CH_MEM_STREAM0_DEST:
140 ret_irq = IRQ_MDMAS0;
141 break;
142 case CH_MEM_STREAM1_SRC:
143 case CH_MEM_STREAM1_DEST:
144 ret_irq = IRQ_MDMAS1;
145 break;
146 case CH_MEM_STREAM2_SRC:
147 case CH_MEM_STREAM2_DEST:
148 ret_irq = IRQ_MDMAS2;
149 break;
150 case CH_MEM_STREAM3_SRC:
151 case CH_MEM_STREAM3_DEST:
152 ret_irq = IRQ_MDMAS3;
153 break;
154 }
155 return ret_irq;
156}
diff --git a/arch/blackfin/mach-bf548/gpio.c b/arch/blackfin/mach-bf548/gpio.c
new file mode 100644
index 000000000000..0da5f0003b8c
--- /dev/null
+++ b/arch/blackfin/mach-bf548/gpio.c
@@ -0,0 +1,323 @@
1/*
2 * File: arch/blackfin/mach-bf548/gpio.c
3 * Based on:
4 * Author: Michael Hennerich (hennerich@blackfin.uclinux.org)
5 *
6 * Created:
7 * Description: GPIO Abstraction Layer
8 *
9 * Modified:
10 * Copyright 2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#include <linux/module.h>
31#include <linux/err.h>
32#include <asm/blackfin.h>
33#include <asm/gpio.h>
34#include <asm/portmux.h>
35#include <linux/irq.h>
36
37static struct gpio_port_t *gpio_array[gpio_bank(MAX_BLACKFIN_GPIOS)] = {
38 (struct gpio_port_t *)PORTA_FER,
39 (struct gpio_port_t *)PORTB_FER,
40 (struct gpio_port_t *)PORTC_FER,
41 (struct gpio_port_t *)PORTD_FER,
42 (struct gpio_port_t *)PORTE_FER,
43 (struct gpio_port_t *)PORTF_FER,
44 (struct gpio_port_t *)PORTG_FER,
45 (struct gpio_port_t *)PORTH_FER,
46 (struct gpio_port_t *)PORTI_FER,
47 (struct gpio_port_t *)PORTJ_FER,
48};
49
50static unsigned short reserved_gpio_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
51static unsigned short reserved_peri_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
52
53inline int check_gpio(unsigned short gpio)
54{
55 if (gpio == GPIO_PB15 || gpio == GPIO_PC14 || gpio == GPIO_PC15
56 || gpio == GPIO_PH14 || gpio == GPIO_PH15
57 || gpio == GPIO_PJ14 || gpio == GPIO_PJ15
58 || gpio > MAX_BLACKFIN_GPIOS)
59 return -EINVAL;
60 return 0;
61}
62
63inline void portmux_setup(unsigned short portno, unsigned short function)
64{
65 u32 pmux;
66
67 pmux = gpio_array[gpio_bank(portno)]->port_mux;
68
69 pmux &= ~(0x3 << (2 * gpio_sub_n(portno)));
70 pmux |= (function & 0x3) << (2 * gpio_sub_n(portno));
71
72 gpio_array[gpio_bank(portno)]->port_mux = pmux;
73
74}
75
76inline u16 get_portmux(unsigned short portno)
77{
78 u32 pmux;
79
80 pmux = gpio_array[gpio_bank(portno)]->port_mux;
81
82 return (pmux >> (2 * gpio_sub_n(portno)) & 0x3);
83
84}
85
86static void port_setup(unsigned short gpio, unsigned short usage)
87{
88 if (usage == GPIO_USAGE) {
89 if (gpio_array[gpio_bank(gpio)]->port_fer & gpio_bit(gpio))
90 printk(KERN_WARNING
91 "bfin-gpio: Possible Conflict with Peripheral "
92 "usage and GPIO %d detected!\n", gpio);
93 gpio_array[gpio_bank(gpio)]->port_fer &= ~gpio_bit(gpio);
94 } else
95 gpio_array[gpio_bank(gpio)]->port_fer |= gpio_bit(gpio);
96 SSYNC();
97}
98
99static int __init bfin_gpio_init(void)
100{
101 printk(KERN_INFO "Blackfin GPIO Controller\n");
102
103 return 0;
104}
105
106arch_initcall(bfin_gpio_init);
107
108int peripheral_request(unsigned short per, const char *label)
109{
110 unsigned long flags;
111 unsigned short ident = P_IDENT(per);
112
113 if (!(per & P_DEFINED))
114 return -ENODEV;
115
116 if (check_gpio(ident) < 0)
117 return -EINVAL;
118
119 local_irq_save(flags);
120
121 if (unlikely(reserved_gpio_map[gpio_bank(ident)] & gpio_bit(ident))) {
122 printk(KERN_ERR
123 "%s: Peripheral %d is already reserved as GPIO!\n",
124 __FUNCTION__, per);
125 dump_stack();
126 local_irq_restore(flags);
127 return -EBUSY;
128 }
129
130 if (unlikely(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident))) {
131
132 u16 funct = get_portmux(ident);
133
134 if (!((per & P_MAYSHARE) && (funct == P_FUNCT2MUX(per)))) {
135 printk(KERN_ERR
136 "%s: Peripheral %d is already reserved!\n",
137 __FUNCTION__, per);
138 dump_stack();
139 local_irq_restore(flags);
140 return -EBUSY;
141 }
142 }
143
144 reserved_peri_map[gpio_bank(ident)] |= gpio_bit(ident);
145
146 portmux_setup(ident, P_FUNCT2MUX(per));
147 port_setup(ident, PERIPHERAL_USAGE);
148
149 local_irq_restore(flags);
150
151 return 0;
152}
153EXPORT_SYMBOL(peripheral_request);
154
155int peripheral_request_list(unsigned short per[], const char *label)
156{
157
158 u16 cnt;
159 int ret;
160
161 for (cnt = 0; per[cnt] != 0; cnt++) {
162 ret = peripheral_request(per[cnt], label);
163 if (ret < 0)
164 return ret;
165 }
166
167 return 0;
168}
169EXPORT_SYMBOL(peripheral_request_list);
170
171void peripheral_free(unsigned short per)
172{
173 unsigned long flags;
174 unsigned short ident = P_IDENT(per);
175
176 if (!(per & P_DEFINED))
177 return;
178
179 if (check_gpio(ident) < 0)
180 return;
181
182 local_irq_save(flags);
183
184 if (unlikely(!(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident)))) {
185 printk(KERN_ERR "bfin-gpio: Peripheral %d wasn't reserved!\n", per);
186 dump_stack();
187 local_irq_restore(flags);
188 return;
189 }
190
191 if (!(per & P_MAYSHARE)) {
192 port_setup(ident, GPIO_USAGE);
193 }
194
195 reserved_peri_map[gpio_bank(ident)] &= ~gpio_bit(ident);
196
197 local_irq_restore(flags);
198}
199EXPORT_SYMBOL(peripheral_free);
200
201void peripheral_free_list(unsigned short per[])
202{
203 u16 cnt;
204
205 for (cnt = 0; per[cnt] != 0; cnt++) {
206 peripheral_free(per[cnt]);
207 }
208
209}
210EXPORT_SYMBOL(peripheral_free_list);
211
212/***********************************************************
213*
214* FUNCTIONS: Blackfin GPIO Driver
215*
216* INPUTS/OUTPUTS:
217* gpio - GPIO Number between 0 and MAX_BLACKFIN_GPIOS
218*
219*
220* DESCRIPTION: Blackfin GPIO Driver API
221*
222* CAUTION:
223*************************************************************
224* MODIFICATION HISTORY :
225**************************************************************/
226
227int gpio_request(unsigned short gpio, const char *label)
228{
229 unsigned long flags;
230
231 if (check_gpio(gpio) < 0)
232 return -EINVAL;
233
234 local_irq_save(flags);
235
236 if (unlikely(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
237 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved!\n", gpio);
238 dump_stack();
239 local_irq_restore(flags);
240 return -EBUSY;
241 }
242
243 if (unlikely(reserved_peri_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
244 printk(KERN_ERR
245 "bfin-gpio: GPIO %d is already reserved as Peripheral!\n", gpio);
246 dump_stack();
247 local_irq_restore(flags);
248 return -EBUSY;
249 }
250
251 reserved_gpio_map[gpio_bank(gpio)] |= gpio_bit(gpio);
252
253 local_irq_restore(flags);
254
255 port_setup(gpio, GPIO_USAGE);
256
257 return 0;
258}
259EXPORT_SYMBOL(gpio_request);
260
261void gpio_free(unsigned short gpio)
262{
263 unsigned long flags;
264
265 if (check_gpio(gpio) < 0)
266 return;
267
268 local_irq_save(flags);
269
270 if (unlikely(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
271 printk(KERN_ERR "bfin-gpio: GPIO %d wasn't reserved!\n", gpio);
272 dump_stack();
273 local_irq_restore(flags);
274 return;
275 }
276
277 reserved_gpio_map[gpio_bank(gpio)] &= ~gpio_bit(gpio);
278
279 local_irq_restore(flags);
280}
281EXPORT_SYMBOL(gpio_free);
282
283void gpio_direction_input(unsigned short gpio)
284{
285 unsigned long flags;
286
287 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
288
289 local_irq_save(flags);
290 gpio_array[gpio_bank(gpio)]->port_dir_clear = gpio_bit(gpio);
291 gpio_array[gpio_bank(gpio)]->port_inen |= gpio_bit(gpio);
292 local_irq_restore(flags);
293}
294EXPORT_SYMBOL(gpio_direction_input);
295
296void gpio_direction_output(unsigned short gpio)
297{
298 unsigned long flags;
299
300 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
301
302 local_irq_save(flags);
303 gpio_array[gpio_bank(gpio)]->port_inen &= ~gpio_bit(gpio);
304 gpio_array[gpio_bank(gpio)]->port_dir_set = gpio_bit(gpio);
305 local_irq_restore(flags);
306}
307EXPORT_SYMBOL(gpio_direction_output);
308
309void gpio_set_value(unsigned short gpio, unsigned short arg)
310{
311 if (arg)
312 gpio_array[gpio_bank(gpio)]->port_set = gpio_bit(gpio);
313 else
314 gpio_array[gpio_bank(gpio)]->port_clear = gpio_bit(gpio);
315
316}
317EXPORT_SYMBOL(gpio_set_value);
318
319unsigned short gpio_get_value(unsigned short gpio)
320{
321 return (1 & (gpio_array[gpio_bank(gpio)]->port_data >> gpio_sub_n(gpio)));
322}
323EXPORT_SYMBOL(gpio_get_value);
diff --git a/arch/blackfin/mach-bf548/head.S b/arch/blackfin/mach-bf548/head.S
new file mode 100644
index 000000000000..06751ae8b857
--- /dev/null
+++ b/arch/blackfin/mach-bf548/head.S
@@ -0,0 +1,512 @@
1/*
2 * File: arch/blackfin/mach-bf548/head.S
3 * Based on: arch/blackfin/mach-bf537/head.S
4 * Author: Jeff Dionne <jeff@uclinux.org> COPYRIGHT 1998 D. Jeff Dionne
5 *
6 * Created: 1998
7 * Description: Startup code for Blackfin BF548
8 *
9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#include <linux/linkage.h>
31#include <asm/blackfin.h>
32#include <asm/trace.h>
33#if CONFIG_BFIN_KERNEL_CLOCK
34#include <asm/mach/mem_init.h>
35#endif
36
37.global __rambase
38.global __ramstart
39.global __ramend
40.extern ___bss_stop
41.extern ___bss_start
42.extern _bf53x_relocate_l1_mem
43
44#define INITIAL_STACK 0xFFB01000
45
46.text
47
48ENTRY(__start)
49ENTRY(__stext)
50 /* R0: argument of command line string, passed from uboot, save it */
51 R7 = R0;
52 /* Set the SYSCFG register */
53 R0 = 0x36;
54 SYSCFG = R0; /*Enable Cycle Counter and Nesting Of Interrupts(3rd Bit)*/
55 R0 = 0;
56
57 /* Clear Out All the data and pointer Registers*/
58 R1 = R0;
59 R2 = R0;
60 R3 = R0;
61 R4 = R0;
62 R5 = R0;
63 R6 = R0;
64
65 P0 = R0;
66 P1 = R0;
67 P2 = R0;
68 P3 = R0;
69 P4 = R0;
70 P5 = R0;
71
72 LC0 = r0;
73 LC1 = r0;
74 L0 = r0;
75 L1 = r0;
76 L2 = r0;
77 L3 = r0;
78
79 /* Clear Out All the DAG Registers*/
80 B0 = r0;
81 B1 = r0;
82 B2 = r0;
83 B3 = r0;
84
85 I0 = r0;
86 I1 = r0;
87 I2 = r0;
88 I3 = r0;
89
90 M0 = r0;
91 M1 = r0;
92 M2 = r0;
93 M3 = r0;
94
95 trace_buffer_start(p0,r0);
96 P0 = R1;
97 R0 = R1;
98
99 /* Turn off the icache */
100 p0.l = (IMEM_CONTROL & 0xFFFF);
101 p0.h = (IMEM_CONTROL >> 16);
102 R1 = [p0];
103 R0 = ~ENICPLB;
104 R0 = R0 & R1;
105 [p0] = R0;
106 SSYNC;
107
108 /* Turn off the dcache */
109 p0.l = (DMEM_CONTROL & 0xFFFF);
110 p0.h = (DMEM_CONTROL >> 16);
111 R1 = [p0];
112 R0 = ~ENDCPLB;
113 R0 = R0 & R1;
114 [p0] = R0;
115 SSYNC;
116
117 /* Initialize stack pointer */
118 SP.L = LO(INITIAL_STACK);
119 SP.H = HI(INITIAL_STACK);
120 FP = SP;
121 USP = SP;
122
123 /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */
124 call _bf53x_relocate_l1_mem;
125#if CONFIG_BFIN_KERNEL_CLOCK
126 call _start_dma_code;
127#endif
128 /* Code for initializing Async memory banks */
129
130 p2.h = hi(EBIU_AMBCTL1);
131 p2.l = lo(EBIU_AMBCTL1);
132 r0.h = hi(AMBCTL1VAL);
133 r0.l = lo(AMBCTL1VAL);
134 [p2] = r0;
135 ssync;
136
137 p2.h = hi(EBIU_AMBCTL0);
138 p2.l = lo(EBIU_AMBCTL0);
139 r0.h = hi(AMBCTL0VAL);
140 r0.l = lo(AMBCTL0VAL);
141 [p2] = r0;
142 ssync;
143
144 p2.h = hi(EBIU_AMGCTL);
145 p2.l = lo(EBIU_AMGCTL);
146 r0 = AMGCTLVAL;
147 w[p2] = r0;
148 ssync;
149
150 /* This section keeps the processor in supervisor mode
151 * during kernel boot. Switches to user mode at end of boot.
152 * See page 3-9 of Hardware Reference manual for documentation.
153 */
154
155 /* EVT15 = _real_start */
156
157 p0.l = lo(EVT15);
158 p0.h = hi(EVT15);
159 p1.l = _real_start;
160 p1.h = _real_start;
161 [p0] = p1;
162 csync;
163
164 p0.l = lo(IMASK);
165 p0.h = hi(IMASK);
166 p1.l = IMASK_IVG15;
167 p1.h = 0x0;
168 [p0] = p1;
169 csync;
170
171 raise 15;
172 p0.l = .LWAIT_HERE;
173 p0.h = .LWAIT_HERE;
174 reti = p0;
175#if defined (ANOMALY_05000281)
176 nop;
177 nop;
178 nop;
179#endif
180 rti;
181
182.LWAIT_HERE:
183 jump .LWAIT_HERE;
184
185ENTRY(_real_start)
186 [ -- sp ] = reti;
187 p0.l = lo(WDOG_CTL);
188 p0.h = hi(WDOG_CTL);
189 r0 = 0xAD6(z);
190 w[p0] = r0; /* watchdog off for now */
191 ssync;
192
193 /* Code update for BSS size == 0
194 * Zero out the bss region.
195 */
196
197 p1.l = ___bss_start;
198 p1.h = ___bss_start;
199 p2.l = ___bss_stop;
200 p2.h = ___bss_stop;
201 r0 = 0;
202 p2 -= p1;
203 lsetup (.L_clear_bss, .L_clear_bss ) lc0 = p2;
204.L_clear_bss:
205 B[p1++] = r0;
206
207 /* In case there is a NULL pointer reference
208 * Zero out region before stext
209 */
210
211 p1.l = 0x0;
212 p1.h = 0x0;
213 r0.l = __stext;
214 r0.h = __stext;
215 r0 = r0 >> 1;
216 p2 = r0;
217 r0 = 0;
218 lsetup (.L_clear_zero, .L_clear_zero ) lc0 = p2;
219.L_clear_zero:
220 W[p1++] = r0;
221
222 /* pass the uboot arguments to the global value command line */
223 R0 = R7;
224 call _cmdline_init;
225
226 p1.l = __rambase;
227 p1.h = __rambase;
228 r0.l = __sdata;
229 r0.h = __sdata;
230 [p1] = r0;
231
232 p1.l = __ramstart;
233 p1.h = __ramstart;
234 p3.l = ___bss_stop;
235 p3.h = ___bss_stop;
236
237 r1 = p3;
238 [p1] = r1;
239
240
241 /*
242 * load the current thread pointer and stack
243 */
244 r1.l = _init_thread_union;
245 r1.h = _init_thread_union;
246
247 r2.l = 0x2000;
248 r2.h = 0x0000;
249 r1 = r1 + r2;
250 sp = r1;
251 usp = sp;
252 fp = sp;
253 call _start_kernel;
254.L_exit:
255 jump.s .L_exit;
256
257.section .l1.text
258#if CONFIG_BFIN_KERNEL_CLOCK
259ENTRY(_start_dma_code)
260
261 /* Enable PHY CLK buffer output */
262 p0.h = hi(VR_CTL);
263 p0.l = lo(VR_CTL);
264 r0.l = w[p0];
265 bitset(r0, 14);
266 w[p0] = r0.l;
267 ssync;
268
269 p0.h = hi(SIC_IWR);
270 p0.l = lo(SIC_IWR);
271 r0.l = 0x1;
272 r0.h = 0x0;
273 [p0] = r0;
274 SSYNC;
275
276 /*
277 * Set PLL_CTL
278 * - [14:09] = MSEL[5:0] : CLKIN / VCO multiplication factors
279 * - [8] = BYPASS : BYPASS the PLL, run CLKIN into CCLK/SCLK
280 * - [7] = output delay (add 200ps of delay to mem signals)
281 * - [6] = input delay (add 200ps of input delay to mem signals)
282 * - [5] = PDWN : 1=All Clocks off
283 * - [3] = STOPCK : 1=Core Clock off
284 * - [1] = PLL_OFF : 1=Disable Power to PLL
285 * - [0] = DF : 1=Pass CLKIN/2 to PLL / 0=Pass CLKIN to PLL
286 * all other bits set to zero
287 */
288
289 p0.h = hi(PLL_LOCKCNT);
290 p0.l = lo(PLL_LOCKCNT);
291 r0 = 0x300(Z);
292 w[p0] = r0.l;
293 ssync;
294
295 P2.H = hi(EBIU_SDGCTL);
296 P2.L = lo(EBIU_SDGCTL);
297 R0 = [P2];
298 BITSET (R0, 24);
299 [P2] = R0;
300 SSYNC;
301
302 r0 = CONFIG_VCO_MULT & 63; /* Load the VCO multiplier */
303 r0 = r0 << 9; /* Shift it over, */
304 r1 = CLKIN_HALF; /* Do we need to divide CLKIN by 2?*/
305 r0 = r1 | r0;
306 r1 = PLL_BYPASS; /* Bypass the PLL? */
307 r1 = r1 << 8; /* Shift it over */
308 r0 = r1 | r0; /* add them all together */
309
310 p0.h = hi(PLL_CTL);
311 p0.l = lo(PLL_CTL); /* Load the address */
312 cli r2; /* Disable interrupts */
313 ssync;
314 w[p0] = r0.l; /* Set the value */
315 idle; /* Wait for the PLL to stablize */
316 sti r2; /* Enable interrupts */
317
318.Lcheck_again:
319 p0.h = hi(PLL_STAT);
320 p0.l = lo(PLL_STAT);
321 R0 = W[P0](Z);
322 CC = BITTST(R0,5);
323 if ! CC jump .Lcheck_again;
324
325 /* Configure SCLK & CCLK Dividers */
326 r0 = (CONFIG_CCLK_ACT_DIV | CONFIG_SCLK_DIV);
327 p0.h = hi(PLL_DIV);
328 p0.l = lo(PLL_DIV);
329 w[p0] = r0.l;
330 ssync;
331
332 p0.l = lo(EBIU_SDRRC);
333 p0.h = hi(EBIU_SDRRC);
334 r0 = mem_SDRRC;
335 w[p0] = r0.l;
336 ssync;
337
338 p0.l = (EBIU_SDBCTL & 0xFFFF);
339 p0.h = (EBIU_SDBCTL >> 16); /* SDRAM Memory Bank Control Register */
340 r0 = mem_SDBCTL;
341 w[p0] = r0.l;
342 ssync;
343
344 P2.H = hi(EBIU_SDGCTL);
345 P2.L = lo(EBIU_SDGCTL);
346 R0 = [P2];
347 BITCLR (R0, 24);
348 p0.h = hi(EBIU_SDSTAT);
349 p0.l = lo(EBIU_SDSTAT);
350 r2.l = w[p0];
351 cc = bittst(r2,3);
352 if !cc jump .Lskip;
353 NOP;
354 BITSET (R0, 23);
355.Lskip:
356 [P2] = R0;
357 SSYNC;
358
359 R0.L = lo(mem_SDGCTL);
360 R0.H = hi(mem_SDGCTL);
361 R1 = [p2];
362 R1 = R1 | R0;
363 [P2] = R1;
364 SSYNC;
365
366 p0.h = hi(SIC_IWR);
367 p0.l = lo(SIC_IWR);
368 r0.l = lo(IWR_ENABLE_ALL);
369 r0.h = hi(IWR_ENABLE_ALL);
370 [p0] = r0;
371 SSYNC;
372
373 RTS;
374#endif /* CONFIG_BFIN_KERNEL_CLOCK */
375
376ENTRY(_bfin_reset)
377 /* No more interrupts to be handled*/
378 CLI R6;
379 SSYNC;
380
381#if defined(CONFIG_MTD_M25P80)
382/*
383 * The following code fix the SPI flash reboot issue,
384 * /CS signal of the chip which is using PF10 return to GPIO mode
385 */
386 p0.h = hi(PORTF_FER);
387 p0.l = lo(PORTF_FER);
388 r0.l = 0x0000;
389 w[p0] = r0.l;
390 SSYNC;
391
392/* /CS return to high */
393 p0.h = hi(PORTFIO);
394 p0.l = lo(PORTFIO);
395 r0.l = 0xFFFF;
396 w[p0] = r0.l;
397 SSYNC;
398
399/* Delay some time, This is necessary */
400 r1.h = 0;
401 r1.l = 0x400;
402 p1 = r1;
403 lsetup (_delay_lab1,_delay_lab1_end ) lc1 = p1;
404_delay_lab1:
405 r0.h = 0;
406 r0.l = 0x8000;
407 p0 = r0;
408 lsetup (_delay_lab0,_delay_lab0_end ) lc0 = p0;
409_delay_lab0:
410 nop;
411_delay_lab0_end:
412 nop;
413_delay_lab1_end:
414 nop;
415#endif
416
417 /* Clear the bits 13-15 in SWRST if they werent cleared */
418 p0.h = hi(SWRST);
419 p0.l = lo(SWRST);
420 csync;
421 r0.l = w[p0];
422
423 /* Clear the IMASK register */
424 p0.h = hi(IMASK);
425 p0.l = lo(IMASK);
426 r0 = 0x0;
427 [p0] = r0;
428
429 /* Clear the ILAT register */
430 p0.h = hi(ILAT);
431 p0.l = lo(ILAT);
432 r0 = [p0];
433 [p0] = r0;
434 SSYNC;
435
436 /* Disable the WDOG TIMER */
437 p0.h = hi(WDOG_CTL);
438 p0.l = lo(WDOG_CTL);
439 r0.l = 0xAD6;
440 w[p0] = r0.l;
441 SSYNC;
442
443 /* Clear the sticky bit incase it is already set */
444 p0.h = hi(WDOG_CTL);
445 p0.l = lo(WDOG_CTL);
446 r0.l = 0x8AD6;
447 w[p0] = r0.l;
448 SSYNC;
449
450 /* Program the count value */
451 R0.l = 0x100;
452 R0.h = 0x0;
453 P0.h = hi(WDOG_CNT);
454 P0.l = lo(WDOG_CNT);
455 [P0] = R0;
456 SSYNC;
457
458 /* Program WDOG_STAT if necessary */
459 P0.h = hi(WDOG_CTL);
460 P0.l = lo(WDOG_CTL);
461 R0 = W[P0](Z);
462 CC = BITTST(R0,1);
463 if !CC JUMP .LWRITESTAT;
464 CC = BITTST(R0,2);
465 if !CC JUMP .LWRITESTAT;
466 JUMP .LSKIP_WRITE;
467
468.LWRITESTAT:
469 /* When watch dog timer is enabled,
470 * a write to STAT will load the contents of CNT to STAT
471 */
472 R0 = 0x0000(z);
473 P0.h = hi(WDOG_STAT);
474 P0.l = lo(WDOG_STAT)
475 [P0] = R0;
476 SSYNC;
477
478.LSKIP_WRITE:
479 /* Enable the reset event */
480 P0.h = hi(WDOG_CTL);
481 P0.l = lo(WDOG_CTL);
482 R0 = W[P0](Z);
483 BITCLR(R0,1);
484 BITCLR(R0,2);
485 W[P0] = R0.L;
486 SSYNC;
487 NOP;
488
489 /* Enable the wdog counter */
490 R0 = W[P0](Z);
491 BITCLR(R0,4);
492 W[P0] = R0.L;
493 SSYNC;
494
495 IDLE;
496
497 RTS;
498
499.data
500
501/*
502 * Set up the usable of RAM stuff. Size of RAM is determined then
503 * an initial stack set up at the end.
504 */
505
506.align 4
507__rambase:
508.long 0
509__ramstart:
510.long 0
511__ramend:
512.long 0
diff --git a/arch/blackfin/mach-bf548/ints-priority.c b/arch/blackfin/mach-bf548/ints-priority.c
new file mode 100644
index 000000000000..cb0ebac53c79
--- /dev/null
+++ b/arch/blackfin/mach-bf548/ints-priority.c
@@ -0,0 +1,137 @@
1/*
2 * File: arch/blackfin/mach-bf537/ints-priority.c
3 * Based on: arch/blackfin/mach-bf533/ints-priority.c
4 * Author: Michael Hennerich
5 *
6 * Created:
7 * Description: Set up the interupt priorities
8 *
9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#include <linux/module.h>
31#include <linux/irq.h>
32#include <asm/blackfin.h>
33
34void program_IAR(void)
35{
36 /* Program the IAR0 Register with the configured priority */
37 bfin_write_SIC_IAR0(((CONFIG_IRQ_PLL_WAKEUP - 7) << IRQ_PLL_WAKEUP_POS) |
38 ((CONFIG_IRQ_DMAC0_ERR - 7) << IRQ_DMAC0_ERR_POS) |
39 ((CONFIG_IRQ_EPPI0_ERR - 7) << IRQ_EPPI0_ERR_POS) |
40 ((CONFIG_IRQ_SPORT0_ERR - 7) << IRQ_SPORT0_ERR_POS) |
41 ((CONFIG_IRQ_SPORT1_ERR - 7) << IRQ_SPORT1_ERR_POS) |
42 ((CONFIG_IRQ_SPI0_ERR - 7) << IRQ_SPI0_ERR_POS) |
43 ((CONFIG_IRQ_UART0_ERR - 7) << IRQ_UART0_ERR_POS) |
44 ((CONFIG_IRQ_RTC - 7) << IRQ_RTC_POS));
45
46 bfin_write_SIC_IAR1(((CONFIG_IRQ_EPPI0 - 7) << IRQ_EPPI0_POS) |
47 ((CONFIG_IRQ_SPORT0_RX - 7) << IRQ_SPORT0_RX_POS) |
48 ((CONFIG_IRQ_SPORT0_TX - 7) << IRQ_SPORT0_TX_POS) |
49 ((CONFIG_IRQ_SPORT1_RX - 7) << IRQ_SPORT1_RX_POS) |
50 ((CONFIG_IRQ_SPORT1_TX - 7) << IRQ_SPORT1_TX_POS) |
51 ((CONFIG_IRQ_SPI0 - 7) << IRQ_SPI0_POS) |
52 ((CONFIG_IRQ_UART0_RX - 7) << IRQ_UART0_RX_POS) |
53 ((CONFIG_IRQ_UART0_TX - 7) << IRQ_UART0_TX_POS));
54
55 bfin_write_SIC_IAR2(((CONFIG_IRQ_TIMER8 - 7) << IRQ_TIMER8_POS) |
56 ((CONFIG_IRQ_TIMER9 - 7) << IRQ_TIMER9_POS) |
57 ((CONFIG_IRQ_PINT0 - 7) << IRQ_PINT0_POS) |
58 ((CONFIG_IRQ_PINT1 - 7) << IRQ_PINT1_POS) |
59 ((CONFIG_IRQ_MDMAS0 - 7) << IRQ_MDMAS0_POS) |
60 ((CONFIG_IRQ_MDMAS1 - 7) << IRQ_MDMAS1_POS) |
61 ((CONFIG_IRQ_WATCHDOG - 7) << IRQ_WATCHDOG_POS));
62
63 bfin_write_SIC_IAR3(((CONFIG_IRQ_DMAC1_ERR - 7) << IRQ_DMAC1_ERR_POS) |
64 ((CONFIG_IRQ_SPORT2_ERR - 7) << IRQ_SPORT2_ERR_POS) |
65 ((CONFIG_IRQ_SPORT3_ERR - 7) << IRQ_SPORT3_ERR_POS) |
66 ((CONFIG_IRQ_MXVR_DATA - 7) << IRQ_MXVR_DATA_POS) |
67 ((CONFIG_IRQ_SPI1_ERR - 7) << IRQ_SPI1_ERR_POS) |
68 ((CONFIG_IRQ_SPI2_ERR - 7) << IRQ_SPI2_ERR_POS) |
69 ((CONFIG_IRQ_UART1_ERR - 7) << IRQ_UART1_ERR_POS) |
70 ((CONFIG_IRQ_UART2_ERR - 7) << IRQ_UART2_ERR_POS));
71
72 bfin_write_SIC_IAR4(((CONFIG_IRQ_CAN0_ERR - 7) << IRQ_CAN0_ERR_POS) |
73 ((CONFIG_IRQ_SPORT2_RX - 7) << IRQ_SPORT2_RX_POS) |
74 ((CONFIG_IRQ_SPORT2_TX - 7) << IRQ_SPORT2_TX_POS) |
75 ((CONFIG_IRQ_SPORT3_RX - 7) << IRQ_SPORT3_RX_POS) |
76 ((CONFIG_IRQ_SPORT3_TX - 7) << IRQ_SPORT3_TX_POS) |
77 ((CONFIG_IRQ_EPPI1 - 7) << IRQ_EPPI1_POS) |
78 ((CONFIG_IRQ_EPPI2 - 7) << IRQ_EPPI2_POS) |
79 ((CONFIG_IRQ_SPI1 - 7) << IRQ_SPI1_POS));
80
81 bfin_write_SIC_IAR5(((CONFIG_IRQ_SPI2 - 7) << IRQ_SPI2_POS) |
82 ((CONFIG_IRQ_UART1_RX - 7) << IRQ_UART1_RX_POS) |
83 ((CONFIG_IRQ_UART1_TX - 7) << IRQ_UART1_TX_POS) |
84 ((CONFIG_IRQ_ATAPI_RX - 7) << IRQ_ATAPI_RX_POS) |
85 ((CONFIG_IRQ_ATAPI_TX - 7) << IRQ_ATAPI_TX_POS) |
86 ((CONFIG_IRQ_TWI0 - 7) << IRQ_TWI0_POS) |
87 ((CONFIG_IRQ_TWI1 - 7) << IRQ_TWI1_POS) |
88 ((CONFIG_IRQ_CAN0_RX - 7) << IRQ_CAN0_RX_POS));
89
90 bfin_write_SIC_IAR6(((CONFIG_IRQ_CAN0_TX - 7) << IRQ_CAN0_TX_POS) |
91 ((CONFIG_IRQ_MDMAS2 - 7) << IRQ_MDMAS2_POS) |
92 ((CONFIG_IRQ_MDMAS3 - 7) << IRQ_MDMAS3_POS) |
93 ((CONFIG_IRQ_MXVR_ERR - 7) << IRQ_MXVR_ERR_POS) |
94 ((CONFIG_IRQ_MXVR_MSG - 7) << IRQ_MXVR_MSG_POS) |
95 ((CONFIG_IRQ_MXVR_PKT - 7) << IRQ_MXVR_PKT_POS) |
96 ((CONFIG_IRQ_EPPI1_ERR - 7) << IRQ_EPPI1_ERR_POS) |
97 ((CONFIG_IRQ_EPPI2_ERR - 7) << IRQ_EPPI2_ERR_POS));
98
99 bfin_write_SIC_IAR7(((CONFIG_IRQ_UART3_ERR - 7) << IRQ_UART3_ERR_POS) |
100 ((CONFIG_IRQ_HOST_ERR - 7) << IRQ_HOST_ERR_POS) |
101 ((CONFIG_IRQ_PIXC_ERR - 7) << IRQ_PIXC_ERR_POS) |
102 ((CONFIG_IRQ_NFC_ERR - 7) << IRQ_NFC_ERR_POS) |
103 ((CONFIG_IRQ_ATAPI_ERR - 7) << IRQ_ATAPI_ERR_POS) |
104 ((CONFIG_IRQ_CAN1_ERR - 7) << IRQ_CAN1_ERR_POS) |
105 ((CONFIG_IRQ_HS_DMA_ERR - 7) << IRQ_HS_DMA_ERR_POS));
106
107 bfin_write_SIC_IAR8(((CONFIG_IRQ_PIXC_IN0 - 7) << IRQ_PIXC_IN1_POS) |
108 ((CONFIG_IRQ_PIXC_IN1 - 7) << IRQ_PIXC_IN1_POS) |
109 ((CONFIG_IRQ_PIXC_OUT - 7) << IRQ_PIXC_OUT_POS) |
110 ((CONFIG_IRQ_SDH - 7) << IRQ_SDH_POS) |
111 ((CONFIG_IRQ_CNT - 7) << IRQ_CNT_POS) |
112 ((CONFIG_IRQ_KEY - 7) << IRQ_KEY_POS) |
113 ((CONFIG_IRQ_CAN1_RX - 7) << IRQ_CAN1_RX_POS) |
114 ((CONFIG_IRQ_CAN1_TX - 7) << IRQ_CAN1_TX_POS));
115
116 bfin_write_SIC_IAR9(((CONFIG_IRQ_SDH_MASK0 - 7) << IRQ_SDH_MASK0_POS) |
117 ((CONFIG_IRQ_SDH_MASK1 - 7) << IRQ_SDH_MASK1_POS) |
118 ((CONFIG_IRQ_USB_INT0 - 7) << IRQ_USB_INT0_POS) |
119 ((CONFIG_IRQ_USB_INT1 - 7) << IRQ_USB_INT1_POS) |
120 ((CONFIG_IRQ_USB_INT2 - 7) << IRQ_USB_INT2_POS) |
121 ((CONFIG_IRQ_USB_DMA - 7) << IRQ_USB_DMA_POS) |
122 ((CONFIG_IRQ_OTPSEC - 7) << IRQ_OTPSEC_POS));
123
124 bfin_write_SIC_IAR10(((CONFIG_IRQ_TIMER0 - 7) << IRQ_TIMER0_POS) |
125 ((CONFIG_IRQ_TIMER1 - 7) << IRQ_TIMER1_POS));
126
127 bfin_write_SIC_IAR11(((CONFIG_IRQ_TIMER2 - 7) << IRQ_TIMER2_POS) |
128 ((CONFIG_IRQ_TIMER3 - 7) << IRQ_TIMER3_POS) |
129 ((CONFIG_IRQ_TIMER4 - 7) << IRQ_TIMER4_POS) |
130 ((CONFIG_IRQ_TIMER5 - 7) << IRQ_TIMER5_POS) |
131 ((CONFIG_IRQ_TIMER6 - 7) << IRQ_TIMER6_POS) |
132 ((CONFIG_IRQ_TIMER7 - 7) << IRQ_TIMER7_POS) |
133 ((CONFIG_IRQ_PINT2 - 7) << IRQ_PINT2_POS) |
134 ((CONFIG_IRQ_PINT3 - 7) << IRQ_PINT3_POS));
135
136 SSYNC();
137}
diff --git a/arch/blackfin/mach-bf561/Makefile b/arch/blackfin/mach-bf561/Makefile
index 57f475a55161..f39235a55783 100644
--- a/arch/blackfin/mach-bf561/Makefile
+++ b/arch/blackfin/mach-bf561/Makefile
@@ -4,6 +4,6 @@
4 4
5extra-y := head.o 5extra-y := head.o
6 6
7obj-y := ints-priority.o 7obj-y := ints-priority.o dma.o
8 8
9obj-$(CONFIG_BF561_COREB) += coreb.o 9obj-$(CONFIG_BF561_COREB) += coreb.o
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 6824e956d153..5b2b544529a1 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * File: arch/blackfin/mach-bf533/boards/cm_bf561.c 2 * File: arch/blackfin/mach-bf533/boards/cm_bf561.c
3 * Based on: arch/blackfin/mach-bf533/boards/ezkit.c 3 * Based on: arch/blackfin/mach-bf533/boards/ezkit.c
4 * Author: Aidan Williams <aidan@nicta.com.au> Copright 2005 4 * Author: Aidan Williams <aidan@nicta.com.au> Copyright 2005
5 * 5 *
6 * Created: 2006 6 * Created: 2006
7 * Description: Board description file 7 * Description: Board description file
@@ -34,7 +34,7 @@
34#include <linux/spi/spi.h> 34#include <linux/spi/spi.h>
35#include <linux/spi/flash.h> 35#include <linux/spi/flash.h>
36#include <linux/usb_isp1362.h> 36#include <linux/usb_isp1362.h>
37#include <asm/irq.h> 37#include <linux/irq.h>
38#include <asm/bfin5xx_spi.h> 38#include <asm/bfin5xx_spi.h>
39 39
40/* 40/*
@@ -43,7 +43,7 @@
43char *bfin_board_name = "Bluetechnix CM BF561"; 43char *bfin_board_name = "Bluetechnix CM BF561";
44 44
45#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 45#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
46/* all SPI perpherals info goes here */ 46/* all SPI peripherals info goes here */
47 47
48#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 48#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
49static struct mtd_partition bfin_spi_flash_partitions[] = { 49static struct mtd_partition bfin_spi_flash_partitions[] = {
@@ -52,11 +52,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
52 .size = 0x00020000, 52 .size = 0x00020000,
53 .offset = 0, 53 .offset = 0,
54 .mask_flags = MTD_CAP_ROM 54 .mask_flags = MTD_CAP_ROM
55 },{ 55 }, {
56 .name = "kernel", 56 .name = "kernel",
57 .size = 0xe0000, 57 .size = 0xe0000,
58 .offset = 0x20000 58 .offset = 0x20000
59 },{ 59 }, {
60 .name = "file system", 60 .name = "file system",
61 .size = 0x700000, 61 .size = 0x700000,
62 .offset = 0x00100000, 62 .offset = 0x00100000,
@@ -186,7 +186,7 @@ static struct resource smc91x_resources[] = {
186 .start = 0x28000300, 186 .start = 0x28000300,
187 .end = 0x28000300 + 16, 187 .end = 0x28000300 + 16,
188 .flags = IORESOURCE_MEM, 188 .flags = IORESOURCE_MEM,
189 },{ 189 }, {
190 .start = IRQ_PF0, 190 .start = IRQ_PF0,
191 .end = IRQ_PF0, 191 .end = IRQ_PF0,
192 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 192 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -206,11 +206,11 @@ static struct resource isp1362_hcd_resources[] = {
206 .start = 0x24008000, 206 .start = 0x24008000,
207 .end = 0x24008000, 207 .end = 0x24008000,
208 .flags = IORESOURCE_MEM, 208 .flags = IORESOURCE_MEM,
209 },{ 209 }, {
210 .start = 0x24008004, 210 .start = 0x24008004,
211 .end = 0x24008004, 211 .end = 0x24008004,
212 .flags = IORESOURCE_MEM, 212 .flags = IORESOURCE_MEM,
213 },{ 213 }, {
214 .start = IRQ_PF47, 214 .start = IRQ_PF47,
215 .end = IRQ_PF47, 215 .end = IRQ_PF47,
216 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 216 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -241,25 +241,25 @@ static struct platform_device isp1362_hcd_device = {
241 241
242#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 242#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
243static struct resource bfin_uart_resources[] = { 243static struct resource bfin_uart_resources[] = {
244 { 244 {
245 .start = 0xFFC00400, 245 .start = 0xFFC00400,
246 .end = 0xFFC004FF, 246 .end = 0xFFC004FF,
247 .flags = IORESOURCE_MEM, 247 .flags = IORESOURCE_MEM,
248 }, 248 },
249}; 249};
250 250
251static struct platform_device bfin_uart_device = { 251static struct platform_device bfin_uart_device = {
252 .name = "bfin-uart", 252 .name = "bfin-uart",
253 .id = 1, 253 .id = 1,
254 .num_resources = ARRAY_SIZE(bfin_uart_resources), 254 .num_resources = ARRAY_SIZE(bfin_uart_resources),
255 .resource = bfin_uart_resources, 255 .resource = bfin_uart_resources,
256}; 256};
257#endif 257#endif
258 258
259static struct platform_device *cm_bf561_devices[] __initdata = { 259static struct platform_device *cm_bf561_devices[] __initdata = {
260 260
261#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 261#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
262 &bfin_uart_device, 262 &bfin_uart_device,
263#endif 263#endif
264 264
265#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 265#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 9720b5c307ab..724191da20a2 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -30,10 +30,9 @@
30#include <linux/device.h> 30#include <linux/device.h>
31#include <linux/platform_device.h> 31#include <linux/platform_device.h>
32#include <linux/spi/spi.h> 32#include <linux/spi/spi.h>
33#include <asm/irq.h>
34#include <asm/bfin5xx_spi.h>
35#include <linux/interrupt.h>
36#include <linux/irq.h> 33#include <linux/irq.h>
34#include <linux/interrupt.h>
35#include <asm/bfin5xx_spi.h>
37 36
38/* 37/*
39 * Name the Board for the /proc/cpuinfo 38 * Name the Board for the /proc/cpuinfo
@@ -45,13 +44,13 @@ char *bfin_board_name = "ADDS-BF561-EZKIT";
45 44
46#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 45#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
47static struct resource bfin_isp1761_resources[] = { 46static struct resource bfin_isp1761_resources[] = {
48 [0] = { 47 {
49 .name = "isp1761-regs", 48 .name = "isp1761-regs",
50 .start = ISP1761_BASE + 0x00000000, 49 .start = ISP1761_BASE + 0x00000000,
51 .end = ISP1761_BASE + 0x000fffff, 50 .end = ISP1761_BASE + 0x000fffff,
52 .flags = IORESOURCE_MEM, 51 .flags = IORESOURCE_MEM,
53 }, 52 },
54 [1] = { 53 {
55 .start = ISP1761_IRQ, 54 .start = ISP1761_IRQ,
56 .end = ISP1761_IRQ, 55 .end = ISP1761_IRQ,
57 .flags = IORESOURCE_IRQ, 56 .flags = IORESOURCE_IRQ,
@@ -71,7 +70,7 @@ static struct platform_device *bfin_isp1761_devices[] = {
71 70
72int __init bfin_isp1761_init(void) 71int __init bfin_isp1761_init(void)
73{ 72{
74 unsigned int num_devices=ARRAY_SIZE(bfin_isp1761_devices); 73 unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices);
75 74
76 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); 75 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
77 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); 76 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING);
@@ -98,7 +97,7 @@ static struct resource smc91x_resources[] = {
98 .start = 0x2C010300, 97 .start = 0x2C010300,
99 .end = 0x2C010300 + 16, 98 .end = 0x2C010300 + 16,
100 .flags = IORESOURCE_MEM, 99 .flags = IORESOURCE_MEM,
101 },{ 100 }, {
102 101
103 .start = IRQ_PF9, 102 .start = IRQ_PF9,
104 .end = IRQ_PF9, 103 .end = IRQ_PF9,
@@ -116,18 +115,18 @@ static struct platform_device smc91x_device = {
116 115
117#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 116#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
118static struct resource bfin_uart_resources[] = { 117static struct resource bfin_uart_resources[] = {
119 { 118 {
120 .start = 0xFFC00400, 119 .start = 0xFFC00400,
121 .end = 0xFFC004FF, 120 .end = 0xFFC004FF,
122 .flags = IORESOURCE_MEM, 121 .flags = IORESOURCE_MEM,
123 }, 122 },
124}; 123};
125 124
126static struct platform_device bfin_uart_device = { 125static struct platform_device bfin_uart_device = {
127 .name = "bfin-uart", 126 .name = "bfin-uart",
128 .id = 1, 127 .id = 1,
129 .num_resources = ARRAY_SIZE(bfin_uart_resources), 128 .num_resources = ARRAY_SIZE(bfin_uart_resources),
130 .resource = bfin_uart_resources, 129 .resource = bfin_uart_resources,
131}; 130};
132#endif 131#endif
133 132
@@ -176,7 +175,7 @@ static struct platform_device *ezkit_devices[] __initdata = {
176 &spi_bfin_master_device, 175 &spi_bfin_master_device,
177#endif 176#endif
178#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 177#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
179 &bfin_uart_device, 178 &bfin_uart_device,
180#endif 179#endif
181}; 180};
182 181
diff --git a/arch/blackfin/mach-bf561/boards/generic_board.c b/arch/blackfin/mach-bf561/boards/generic_board.c
index 585ecdd2f6a5..4dfea5da674c 100644
--- a/arch/blackfin/mach-bf561/boards/generic_board.c
+++ b/arch/blackfin/mach-bf561/boards/generic_board.c
@@ -30,7 +30,7 @@
30 30
31#include <linux/device.h> 31#include <linux/device.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <asm/irq.h> 33#include <linux/irq.h>
34 34
35char *bfin_board_name = "UNKNOWN BOARD"; 35char *bfin_board_name = "UNKNOWN BOARD";
36 36
@@ -43,11 +43,11 @@ static struct resource smc91x_resources[] = {
43 .start = 0x2C010300, 43 .start = 0x2C010300,
44 .end = 0x2C010300 + 16, 44 .end = 0x2C010300 + 16,
45 .flags = IORESOURCE_MEM, 45 .flags = IORESOURCE_MEM,
46 },{ 46 }, {
47 .start = IRQ_PROG_INTB, 47 .start = IRQ_PROG_INTB,
48 .end = IRQ_PROG_INTB, 48 .end = IRQ_PROG_INTB,
49 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 49 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
50 },{ 50 }, {
51 /* 51 /*
52 * denotes the flag pin and is used directly if 52 * denotes the flag pin and is used directly if
53 * CONFIG_IRQCHIP_DEMUX_GPIO is defined. 53 * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
diff --git a/arch/blackfin/mach-bf561/boards/tepla.c b/arch/blackfin/mach-bf561/boards/tepla.c
index db308c7ccabb..c442eb23db5e 100644
--- a/arch/blackfin/mach-bf561/boards/tepla.c
+++ b/arch/blackfin/mach-bf561/boards/tepla.c
@@ -14,7 +14,7 @@
14 14
15#include <linux/device.h> 15#include <linux/device.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <asm/irq.h> 17#include <linux/irq.h>
18 18
19char *bfin_board_name = "Tepla-BF561"; 19char *bfin_board_name = "Tepla-BF561";
20 20
@@ -26,11 +26,11 @@ static struct resource smc91x_resources[] = {
26 .start = 0x2C000300, 26 .start = 0x2C000300,
27 .end = 0x2C000320, 27 .end = 0x2C000320,
28 .flags = IORESOURCE_MEM, 28 .flags = IORESOURCE_MEM,
29 },{ 29 }, {
30 .start = IRQ_PROG_INTB, 30 .start = IRQ_PROG_INTB,
31 .end = IRQ_PROG_INTB, 31 .end = IRQ_PROG_INTB,
32 .flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL, 32 .flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL,
33 },{ 33 }, {
34 /* 34 /*
35 * denotes the flag pin and is used directly if 35 * denotes the flag pin and is used directly if
36 * CONFIG_IRQCHIP_DEMUX_GPIO is defined. 36 * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
diff --git a/arch/blackfin/mach-bf561/coreb.c b/arch/blackfin/mach-bf561/coreb.c
index b28582fe083c..5d1d21b4c2a7 100644
--- a/arch/blackfin/mach-bf561/coreb.c
+++ b/arch/blackfin/mach-bf561/coreb.c
@@ -32,8 +32,8 @@
32#include <linux/device.h> 32#include <linux/device.h>
33#include <linux/ioport.h> 33#include <linux/ioport.h>
34#include <linux/module.h> 34#include <linux/module.h>
35#include <linux/uaccess.h>
35#include <asm/dma.h> 36#include <asm/dma.h>
36#include <asm/uaccess.h>
37 37
38#define MODULE_VER "v0.1" 38#define MODULE_VER "v0.1"
39 39
@@ -202,7 +202,7 @@ static int coreb_open(struct inode *inode, struct file *file)
202 spin_unlock_irq(&coreb_lock); 202 spin_unlock_irq(&coreb_lock);
203 return 0; 203 return 0;
204 204
205 out_busy: 205 out_busy:
206 spin_unlock_irq(&coreb_lock); 206 spin_unlock_irq(&coreb_lock);
207 return -EBUSY; 207 return -EBUSY;
208} 208}
@@ -365,19 +365,19 @@ int __init bf561_coreb_init(void)
365 printk(KERN_INFO "BF561 Core B driver %s initialized.\n", MODULE_VER); 365 printk(KERN_INFO "BF561 Core B driver %s initialized.\n", MODULE_VER);
366 return 0; 366 return 0;
367 367
368 release_dma_src: 368 release_dma_src:
369 free_dma(CH_MEM_STREAM2_SRC); 369 free_dma(CH_MEM_STREAM2_SRC);
370 release_dma_dest: 370 release_dma_dest:
371 free_dma(CH_MEM_STREAM2_DEST); 371 free_dma(CH_MEM_STREAM2_DEST);
372 release_data_a_sram: 372 release_data_a_sram:
373 release_mem_region(0xff400000, 0x8000); 373 release_mem_region(0xff400000, 0x8000);
374 release_data_b_sram: 374 release_data_b_sram:
375 release_mem_region(0xff500000, 0x8000); 375 release_mem_region(0xff500000, 0x8000);
376 release_instruction_b_sram: 376 release_instruction_b_sram:
377 release_mem_region(0xff610000, 0x4000); 377 release_mem_region(0xff610000, 0x4000);
378 release_instruction_a_sram: 378 release_instruction_a_sram:
379 release_mem_region(0xff600000, 0x4000); 379 release_mem_region(0xff600000, 0x4000);
380 exit: 380 exit:
381 return -ENOMEM; 381 return -ENOMEM;
382} 382}
383 383
diff --git a/arch/blackfin/mach-bf561/dma.c b/arch/blackfin/mach-bf561/dma.c
new file mode 100644
index 000000000000..89c65bb0bed3
--- /dev/null
+++ b/arch/blackfin/mach-bf561/dma.c
@@ -0,0 +1,131 @@
1/*
2 * File: arch/blackfin/mach-bf561/dma.c
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: This file contains the simple DMA Implementation for Blackfin
8 *
9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29#include <asm/blackfin.h>
30#include <asm/dma.h>
31
32struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
33 (struct dma_register *) DMA1_0_NEXT_DESC_PTR,
34 (struct dma_register *) DMA1_1_NEXT_DESC_PTR,
35 (struct dma_register *) DMA1_2_NEXT_DESC_PTR,
36 (struct dma_register *) DMA1_3_NEXT_DESC_PTR,
37 (struct dma_register *) DMA1_4_NEXT_DESC_PTR,
38 (struct dma_register *) DMA1_5_NEXT_DESC_PTR,
39 (struct dma_register *) DMA1_6_NEXT_DESC_PTR,
40 (struct dma_register *) DMA1_7_NEXT_DESC_PTR,
41 (struct dma_register *) DMA1_8_NEXT_DESC_PTR,
42 (struct dma_register *) DMA1_9_NEXT_DESC_PTR,
43 (struct dma_register *) DMA1_10_NEXT_DESC_PTR,
44 (struct dma_register *) DMA1_11_NEXT_DESC_PTR,
45 (struct dma_register *) DMA2_0_NEXT_DESC_PTR,
46 (struct dma_register *) DMA2_1_NEXT_DESC_PTR,
47 (struct dma_register *) DMA2_2_NEXT_DESC_PTR,
48 (struct dma_register *) DMA2_3_NEXT_DESC_PTR,
49 (struct dma_register *) DMA2_4_NEXT_DESC_PTR,
50 (struct dma_register *) DMA2_5_NEXT_DESC_PTR,
51 (struct dma_register *) DMA2_6_NEXT_DESC_PTR,
52 (struct dma_register *) DMA2_7_NEXT_DESC_PTR,
53 (struct dma_register *) DMA2_8_NEXT_DESC_PTR,
54 (struct dma_register *) DMA2_9_NEXT_DESC_PTR,
55 (struct dma_register *) DMA2_10_NEXT_DESC_PTR,
56 (struct dma_register *) DMA2_11_NEXT_DESC_PTR,
57 (struct dma_register *) MDMA1_D0_NEXT_DESC_PTR,
58 (struct dma_register *) MDMA1_S0_NEXT_DESC_PTR,
59 (struct dma_register *) MDMA1_D1_NEXT_DESC_PTR,
60 (struct dma_register *) MDMA1_S1_NEXT_DESC_PTR,
61 (struct dma_register *) MDMA2_D0_NEXT_DESC_PTR,
62 (struct dma_register *) MDMA2_S0_NEXT_DESC_PTR,
63 (struct dma_register *) MDMA2_D1_NEXT_DESC_PTR,
64 (struct dma_register *) MDMA2_S1_NEXT_DESC_PTR,
65 (struct dma_register *) IMDMA_D0_NEXT_DESC_PTR,
66 (struct dma_register *) IMDMA_S0_NEXT_DESC_PTR,
67 (struct dma_register *) IMDMA_D1_NEXT_DESC_PTR,
68 (struct dma_register *) IMDMA_S1_NEXT_DESC_PTR,
69};
70
71int channel2irq(unsigned int channel)
72{
73 int ret_irq = -1;
74
75 switch (channel) {
76 case CH_PPI0:
77 ret_irq = IRQ_PPI0;
78 break;
79 case CH_PPI1:
80 ret_irq = IRQ_PPI1;
81 break;
82 case CH_SPORT0_RX:
83 ret_irq = IRQ_SPORT0_RX;
84 break;
85 case CH_SPORT0_TX:
86 ret_irq = IRQ_SPORT0_TX;
87 break;
88 case CH_SPORT1_RX:
89 ret_irq = IRQ_SPORT1_RX;
90 break;
91 case CH_SPORT1_TX:
92 ret_irq = IRQ_SPORT1_TX;
93 break;
94 case CH_SPI:
95 ret_irq = IRQ_SPI;
96 break;
97 case CH_UART_RX:
98 ret_irq = IRQ_UART_RX;
99 break;
100 case CH_UART_TX:
101 ret_irq = IRQ_UART_TX;
102 break;
103
104 case CH_MEM_STREAM0_SRC:
105 case CH_MEM_STREAM0_DEST:
106 ret_irq = IRQ_MEM_DMA0;
107 break;
108 case CH_MEM_STREAM1_SRC:
109 case CH_MEM_STREAM1_DEST:
110 ret_irq = IRQ_MEM_DMA1;
111 break;
112 case CH_MEM_STREAM2_SRC:
113 case CH_MEM_STREAM2_DEST:
114 ret_irq = IRQ_MEM_DMA2;
115 break;
116 case CH_MEM_STREAM3_SRC:
117 case CH_MEM_STREAM3_DEST:
118 ret_irq = IRQ_MEM_DMA3;
119 break;
120
121 case CH_IMEM_STREAM0_SRC:
122 case CH_IMEM_STREAM0_DEST:
123 ret_irq = IRQ_IMEM_DMA0;
124 break;
125 case CH_IMEM_STREAM1_SRC:
126 case CH_IMEM_STREAM1_DEST:
127 ret_irq = IRQ_IMEM_DMA1;
128 break;
129 }
130 return ret_irq;
131}
diff --git a/arch/blackfin/mach-bf561/head.S b/arch/blackfin/mach-bf561/head.S
index ad9187a866a5..2f08bcb2dded 100644
--- a/arch/blackfin/mach-bf561/head.S
+++ b/arch/blackfin/mach-bf561/head.S
@@ -28,7 +28,10 @@
28 */ 28 */
29 29
30#include <linux/linkage.h> 30#include <linux/linkage.h>
31#include <linux/init.h>
31#include <asm/blackfin.h> 32#include <asm/blackfin.h>
33#include <asm/trace.h>
34
32#if CONFIG_BFIN_KERNEL_CLOCK 35#if CONFIG_BFIN_KERNEL_CLOCK
33#include <asm/mach/mem_init.h> 36#include <asm/mach/mem_init.h>
34#endif 37#endif
@@ -42,18 +45,19 @@
42 45
43#define INITIAL_STACK 0xFFB01000 46#define INITIAL_STACK 0xFFB01000
44 47
45.text 48__INIT
46 49
47ENTRY(__start) 50ENTRY(__start)
48ENTRY(__stext) 51 /* R0: argument of command line string, passed from uboot, save it */
49 /* R0: argument of command line string, passed from uboot, save it */
50 R7 = R0; 52 R7 = R0;
51 /* Set the SYSCFG register */ 53 /* Set the SYSCFG register:
54 * Enable Cycle Counter and Nesting Of Interrupts (3rd Bit)
55 */
52 R0 = 0x36; 56 R0 = 0x36;
53 SYSCFG = R0; /*Enable Cycle Counter and Nesting Of Interrupts(3rd Bit)*/ 57 SYSCFG = R0;
54 R0 = 0; 58 R0 = 0;
55 59
56 /*Clear Out All the data and pointer Registers*/ 60 /* Clear Out All the data and pointer Registers */
57 R1 = R0; 61 R1 = R0;
58 R2 = R0; 62 R2 = R0;
59 R3 = R0; 63 R3 = R0;
@@ -75,7 +79,7 @@ ENTRY(__stext)
75 L2 = r0; 79 L2 = r0;
76 L3 = r0; 80 L3 = r0;
77 81
78 /* Clear Out All the DAG Registers*/ 82 /* Clear Out All the DAG Registers */
79 B0 = r0; 83 B0 = r0;
80 B1 = r0; 84 B1 = r0;
81 B2 = r0; 85 B2 = r0;
@@ -91,6 +95,10 @@ ENTRY(__stext)
91 M2 = r0; 95 M2 = r0;
92 M3 = r0; 96 M3 = r0;
93 97
98 trace_buffer_start(p0,r0);
99 P0 = R1;
100 R0 = R1;
101
94 /* Turn off the icache */ 102 /* Turn off the icache */
95 p0.l = (IMEM_CONTROL & 0xFFFF); 103 p0.l = (IMEM_CONTROL & 0xFFFF);
96 p0.h = (IMEM_CONTROL >> 16); 104 p0.h = (IMEM_CONTROL >> 16);
@@ -219,6 +227,7 @@ ENTRY(__stext)
219 227
220.LWAIT_HERE: 228.LWAIT_HERE:
221 jump .LWAIT_HERE; 229 jump .LWAIT_HERE;
230ENDPROC(__start)
222 231
223ENTRY(_real_start) 232ENTRY(_real_start)
224 [ -- sp ] = reti; 233 [ -- sp ] = reti;
@@ -238,7 +247,7 @@ ENTRY(_real_start)
238 p2.h = ___bss_stop; 247 p2.h = ___bss_stop;
239 r0 = 0; 248 r0 = 0;
240 p2 -= p1; 249 p2 -= p1;
241 lsetup (.L_clear_bss, .L_clear_bss ) lc0 = p2; 250 lsetup (.L_clear_bss, .L_clear_bss) lc0 = p2;
242.L_clear_bss: 251.L_clear_bss:
243 B[p1++] = r0; 252 B[p1++] = r0;
244 253
@@ -253,11 +262,11 @@ ENTRY(_real_start)
253 r0 = r0 >> 1; 262 r0 = r0 >> 1;
254 p2 = r0; 263 p2 = r0;
255 r0 = 0; 264 r0 = 0;
256 lsetup (.L_clear_zero, .L_clear_zero ) lc0 = p2; 265 lsetup (.L_clear_zero, .L_clear_zero) lc0 = p2;
257.L_clear_zero: 266.L_clear_zero:
258 W[p1++] = r0; 267 W[p1++] = r0;
259 268
260/* pass the uboot arguments to the global value command line */ 269 /* pass the uboot arguments to the global value command line */
261 R0 = R7; 270 R0 = R7;
262 call _cmdline_init; 271 call _cmdline_init;
263 272
@@ -287,9 +296,10 @@ ENTRY(_real_start)
287 sp = r1; 296 sp = r1;
288 usp = sp; 297 usp = sp;
289 fp = sp; 298 fp = sp;
290 call _start_kernel; 299 jump.l _start_kernel;
291.L_exit: 300ENDPROC(_real_start)
292 jump.s .L_exit; 301
302__FINIT
293 303
294.section .l1.text 304.section .l1.text
295#if CONFIG_BFIN_KERNEL_CLOCK 305#if CONFIG_BFIN_KERNEL_CLOCK
@@ -350,7 +360,7 @@ ENTRY(_start_dma_code)
350 if ! CC jump .Lcheck_again; 360 if ! CC jump .Lcheck_again;
351 361
352 /* Configure SCLK & CCLK Dividers */ 362 /* Configure SCLK & CCLK Dividers */
353 r0 = (CONFIG_CCLK_ACT_DIV | CONFIG_SCLK_DIV); 363 r0 = (CONFIG_CCLK_ACT_DIV | CONFIG_SCLK_DIV);
354 p0.h = hi(PLL_DIV); 364 p0.h = hi(PLL_DIV);
355 p0.l = lo(PLL_DIV); 365 p0.l = lo(PLL_DIV);
356 w[p0] = r0.l; 366 w[p0] = r0.l;
@@ -391,6 +401,7 @@ ENTRY(_start_dma_code)
391 SSYNC; 401 SSYNC;
392 402
393 RTS; 403 RTS;
404ENDPROC(_start_dma_code)
394#endif /* CONFIG_BFIN_KERNEL_CLOCK */ 405#endif /* CONFIG_BFIN_KERNEL_CLOCK */
395 406
396ENTRY(_bfin_reset) 407ENTRY(_bfin_reset)
diff --git a/arch/blackfin/mach-bf561/ints-priority.c b/arch/blackfin/mach-bf561/ints-priority.c
index 89c52ff95b27..09b541b0f7c2 100644
--- a/arch/blackfin/mach-bf561/ints-priority.c
+++ b/arch/blackfin/mach-bf561/ints-priority.c
@@ -4,7 +4,7 @@
4 * Author: Michael Hennerich 4 * Author: Michael Hennerich
5 * 5 *
6 * Created: 6 * Created:
7 * Description: Set up the interupt priorities 7 * Description: Set up the interrupt priorities
8 * 8 *
9 * Modified: 9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc. 10 * Copyright 2004-2006 Analog Devices Inc.
@@ -28,8 +28,8 @@
28 */ 28 */
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/irq.h>
31#include <asm/blackfin.h> 32#include <asm/blackfin.h>
32#include <asm/irq.h>
33 33
34void program_IAR(void) 34void program_IAR(void)
35{ 35{
diff --git a/arch/blackfin/mach-common/Makefile b/arch/blackfin/mach-common/Makefile
index d3a49073d196..0279ede70392 100644
--- a/arch/blackfin/mach-common/Makefile
+++ b/arch/blackfin/mach-common/Makefile
@@ -4,9 +4,9 @@
4 4
5obj-y := \ 5obj-y := \
6 cache.o cacheinit.o cplbhdlr.o cplbmgr.o entry.o \ 6 cache.o cacheinit.o cplbhdlr.o cplbmgr.o entry.o \
7 interrupt.o lock.o dpmc.o irqpanic.o 7 interrupt.o lock.o irqpanic.o
8 8
9obj-$(CONFIG_CPLB_INFO) += cplbinfo.o 9obj-$(CONFIG_CPLB_INFO) += cplbinfo.o
10obj-$(CONFIG_BFIN_SINGLE_CORE) += ints-priority-sc.o 10obj-$(CONFIG_BFIN_SINGLE_CORE) += ints-priority-sc.o
11obj-$(CONFIG_BFIN_DUAL_CORE) += ints-priority-dc.o 11obj-$(CONFIG_BFIN_DUAL_CORE) += ints-priority-dc.o
12obj-$(CONFIG_PM) += pm.o 12obj-$(CONFIG_PM) += pm.o dpmc.o
diff --git a/arch/blackfin/mach-common/cache.S b/arch/blackfin/mach-common/cache.S
index bb9446ef66ef..7063795eb7c0 100644
--- a/arch/blackfin/mach-common/cache.S
+++ b/arch/blackfin/mach-common/cache.S
@@ -70,6 +70,7 @@ ENTRY(_cache_invalidate)
70.Lno_dcache_b: 70.Lno_dcache_b:
71 R7 = [SP++]; 71 R7 = [SP++];
72 RTS; 72 RTS;
73ENDPROC(_cache_invalidate)
73 74
74/* Invalidate the Entire Instruction cache by 75/* Invalidate the Entire Instruction cache by
75 * disabling IMC bit 76 * disabling IMC bit
@@ -106,6 +107,8 @@ ENTRY(_invalidate_entire_icache)
106 107
107 ( R7:5) = [SP++]; 108 ( R7:5) = [SP++];
108 RTS; 109 RTS;
110ENDPROC(_invalidate_entire_icache)
111ENDPROC(_icache_invalidate)
109 112
110/* 113/*
111 * blackfin_cache_flush_range(start, end) 114 * blackfin_cache_flush_range(start, end)
@@ -120,15 +123,16 @@ ENTRY(_blackfin_icache_flush_range)
120 R2 = R0 & R2; 123 R2 = R0 & R2;
121 P0 = R2; 124 P0 = R2;
122 P1 = R1; 125 P1 = R1;
123 CSYNC; 126 CSYNC(R3);
124 IFLUSH [P0]; 127 IFLUSH [P0];
1251: 1281:
126 IFLUSH [P0++]; 129 IFLUSH [P0++];
127 CC = P0 < P1 (iu); 130 CC = P0 < P1 (iu);
128 IF CC JUMP 1b (bp); 131 IF CC JUMP 1b (bp);
129 IFLUSH [P0]; 132 IFLUSH [P0];
130 SSYNC; 133 SSYNC(R3);
131 RTS; 134 RTS;
135ENDPROC(_blackfin_icache_flush_range)
132 136
133/* 137/*
134 * blackfin_icache_dcache_flush_range(start, end) 138 * blackfin_icache_dcache_flush_range(start, end)
@@ -144,7 +148,7 @@ ENTRY(_blackfin_icache_dcache_flush_range)
144 R2 = R0 & R2; 148 R2 = R0 & R2;
145 P0 = R2; 149 P0 = R2;
146 P1 = R1; 150 P1 = R1;
147 CSYNC; 151 CSYNC(R3);
148 IFLUSH [P0]; 152 IFLUSH [P0];
1491: 1531:
150 FLUSH [P0]; 154 FLUSH [P0];
@@ -153,8 +157,9 @@ ENTRY(_blackfin_icache_dcache_flush_range)
153 IF CC JUMP 1b (bp); 157 IF CC JUMP 1b (bp);
154 IFLUSH [P0]; 158 IFLUSH [P0];
155 FLUSH [P0]; 159 FLUSH [P0];
156 SSYNC; 160 SSYNC(R3);
157 RTS; 161 RTS;
162ENDPROC(_blackfin_icache_dcache_flush_range)
158 163
159/* Throw away all D-cached data in specified region without any obligation to 164/* Throw away all D-cached data in specified region without any obligation to
160 * write them back. However, we must clean the D-cached entries around the 165 * write them back. However, we must clean the D-cached entries around the
@@ -169,7 +174,7 @@ ENTRY(_blackfin_dcache_invalidate_range)
169 R2 = R0 & R2; 174 R2 = R0 & R2;
170 P0 = R2; 175 P0 = R2;
171 P1 = R1; 176 P1 = R1;
172 CSYNC; 177 CSYNC(R3);
173 FLUSHINV[P0]; 178 FLUSHINV[P0];
1741: 1791:
175 FLUSHINV[P0++]; 180 FLUSHINV[P0++];
@@ -181,8 +186,9 @@ ENTRY(_blackfin_dcache_invalidate_range)
181 * so do one more. 186 * so do one more.
182 */ 187 */
183 FLUSHINV[P0]; 188 FLUSHINV[P0];
184 SSYNC; 189 SSYNC(R3);
185 RTS; 190 RTS;
191ENDPROC(_blackfin_dcache_invalidate_range)
186 192
187/* Invalidate the Entire Data cache by 193/* Invalidate the Entire Data cache by
188 * clearing DMC[1:0] bits 194 * clearing DMC[1:0] bits
@@ -221,13 +227,15 @@ ENTRY(_dcache_invalidate)
221 227
222 ( R7:6) = [SP++]; 228 ( R7:6) = [SP++];
223 RTS; 229 RTS;
230ENDPROC(_dcache_invalidate)
231ENDPROC(_invalidate_entire_dcache)
224 232
225ENTRY(_blackfin_dcache_flush_range) 233ENTRY(_blackfin_dcache_flush_range)
226 R2 = -L1_CACHE_BYTES; 234 R2 = -L1_CACHE_BYTES;
227 R2 = R0 & R2; 235 R2 = R0 & R2;
228 P0 = R2; 236 P0 = R2;
229 P1 = R1; 237 P1 = R1;
230 CSYNC; 238 CSYNC(R3);
231 FLUSH[P0]; 239 FLUSH[P0];
2321: 2401:
233 FLUSH[P0++]; 241 FLUSH[P0++];
@@ -239,15 +247,17 @@ ENTRY(_blackfin_dcache_flush_range)
239 * one more. 247 * one more.
240 */ 248 */
241 FLUSH[P0]; 249 FLUSH[P0];
242 SSYNC; 250 SSYNC(R3);
243 RTS; 251 RTS;
252ENDPROC(_blackfin_dcache_flush_range)
244 253
245ENTRY(_blackfin_dflush_page) 254ENTRY(_blackfin_dflush_page)
246 P1 = 1 << (PAGE_SHIFT - L1_CACHE_SHIFT); 255 P1 = 1 << (PAGE_SHIFT - L1_CACHE_SHIFT);
247 P0 = R0; 256 P0 = R0;
248 CSYNC; 257 CSYNC(R3);
249 FLUSH[P0]; 258 FLUSH[P0];
250 LSETUP (.Lfl1, .Lfl1) LC0 = P1; 259 LSETUP (.Lfl1, .Lfl1) LC0 = P1;
251.Lfl1: FLUSH [P0++]; 260.Lfl1: FLUSH [P0++];
252 SSYNC; 261 SSYNC(R3);
253 RTS; 262 RTS;
263ENDPROC(_blackfin_dflush_page)
diff --git a/arch/blackfin/mach-common/cacheinit.S b/arch/blackfin/mach-common/cacheinit.S
index 8c17f099e5eb..9d475623b724 100644
--- a/arch/blackfin/mach-common/cacheinit.S
+++ b/arch/blackfin/mach-common/cacheinit.S
@@ -38,100 +38,37 @@
38 38
39.text 39.text
40 40
41#ifdef ANOMALY_05000125
41#if defined(CONFIG_BLKFIN_CACHE) 42#if defined(CONFIG_BLKFIN_CACHE)
42ENTRY(_bfin_icache_init) 43ENTRY(_bfin_write_IMEM_CONTROL)
43 44
44 /* Initialize Instruction CPLBS */
45
46 I0.L = (ICPLB_ADDR0 & 0xFFFF);
47 I0.H = (ICPLB_ADDR0 >> 16);
48
49 I1.L = (ICPLB_DATA0 & 0xFFFF);
50 I1.H = (ICPLB_DATA0 >> 16);
51
52 I2.L = _icplb_table;
53 I2.H = _icplb_table;
54
55 r1 = -1; /* end point comparison */
56 r3 = 15; /* max counter */
57
58/* read entries from table */
59
60.Lread_iaddr:
61 R0 = [I2++];
62 CC = R0 == R1;
63 IF CC JUMP .Lidone;
64 [I0++] = R0;
65
66.Lread_idata:
67 R2 = [I2++];
68 [I1++] = R2;
69 R3 = R3 + R1;
70 CC = R3 == R1;
71 IF !CC JUMP .Lread_iaddr;
72
73.Lidone:
74 /* Enable Instruction Cache */ 45 /* Enable Instruction Cache */
75 P0.l = (IMEM_CONTROL & 0xFFFF); 46 P0.l = (IMEM_CONTROL & 0xFFFF);
76 P0.h = (IMEM_CONTROL >> 16); 47 P0.h = (IMEM_CONTROL >> 16);
77 R1 = [P0];
78 R0 = (IMC | ENICPLB);
79 R0 = R0 | R1;
80 48
81 /* Anomaly 05000125 */ 49 /* Anomaly 05000125 */
82 CLI R2; 50 CLI R1;
83 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */ 51 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
84 .align 8; 52 .align 8;
85 [P0] = R0; 53 [P0] = R0;
86 SSYNC; 54 SSYNC;
87 STI R2; 55 STI R1;
88 RTS; 56 RTS;
57
58ENDPROC(_bfin_write_IMEM_CONTROL)
89#endif 59#endif
90 60
91#if defined(CONFIG_BLKFIN_DCACHE) 61#if defined(CONFIG_BLKFIN_DCACHE)
92ENTRY(_bfin_dcache_init) 62ENTRY(_bfin_write_DMEM_CONTROL)
93 63 CLI R1;
94 /* Initialize Data CPLBS */
95
96 I0.L = (DCPLB_ADDR0 & 0xFFFF);
97 I0.H = (DCPLB_ADDR0 >> 16);
98
99 I1.L = (DCPLB_DATA0 & 0xFFFF);
100 I1.H = (DCPLB_DATA0 >> 16);
101
102 I2.L = _dcplb_table;
103 I2.H = _dcplb_table;
104
105 R1 = -1; /* end point comparison */
106 R3 = 15; /* max counter */
107
108 /* read entries from table */
109.Lread_daddr:
110 R0 = [I2++];
111 cc = R0 == R1;
112 IF CC JUMP .Lddone;
113 [I0++] = R0;
114
115.Lread_ddata:
116 R2 = [I2++];
117 [I1++] = R2;
118 R3 = R3 + R1;
119 CC = R3 == R1;
120 IF !CC JUMP .Lread_daddr;
121.Lddone:
122 P0.L = (DMEM_CONTROL & 0xFFFF);
123 P0.H = (DMEM_CONTROL >> 16);
124 R1 = [P0];
125
126 R0 = DMEM_CNTR;
127
128 R0 = R0 | R1;
129 /* Anomaly 05000125 */
130 CLI R2;
131 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */ 64 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
132 .align 8; 65 .align 8;
133 [P0] = R0; 66 [P0] = R0;
134 SSYNC; 67 SSYNC;
135 STI R2; 68 STI R1;
136 RTS; 69 RTS;
70
71ENDPROC(_bfin_write_DMEM_CONTROL)
72#endif
73
137#endif 74#endif
diff --git a/arch/blackfin/mach-common/cplbhdlr.S b/arch/blackfin/mach-common/cplbhdlr.S
index b979067c49ef..2f3c72c23997 100644
--- a/arch/blackfin/mach-common/cplbhdlr.S
+++ b/arch/blackfin/mach-common/cplbhdlr.S
@@ -42,8 +42,6 @@
42 42
43.align 2 43.align 2
44 44
45.global __cplb_hdr;
46.type __cplb_hdr, STT_FUNC;
47ENTRY(__cplb_hdr) 45ENTRY(__cplb_hdr)
48 R2 = SEQSTAT; 46 R2 = SEQSTAT;
49 47
@@ -128,3 +126,5 @@ ENTRY(__cplb_hdr)
128 call _panic_cplb_error; 126 call _panic_cplb_error;
129 SP += 12; 127 SP += 12;
130 JUMP _handle_bad_cplb; 128 JUMP _handle_bad_cplb;
129
130ENDPROC(__cplb_hdr)
diff --git a/arch/blackfin/mach-common/cplbinfo.c b/arch/blackfin/mach-common/cplbinfo.c
index d65fac39d1bf..785ca9816971 100644
--- a/arch/blackfin/mach-common/cplbinfo.c
+++ b/arch/blackfin/mach-common/cplbinfo.c
@@ -31,11 +31,10 @@
31#include <linux/kernel.h> 31#include <linux/kernel.h>
32#include <linux/init.h> 32#include <linux/init.h>
33#include <linux/proc_fs.h> 33#include <linux/proc_fs.h>
34#include <linux/uaccess.h>
34 35
35#include <asm/current.h> 36#include <asm/current.h>
36#include <asm/uaccess.h>
37#include <asm/system.h> 37#include <asm/system.h>
38
39#include <asm/cplb.h> 38#include <asm/cplb.h>
40#include <asm/blackfin.h> 39#include <asm/blackfin.h>
41 40
@@ -82,7 +81,7 @@ static char *cplb_print_entry(char *buf, int type)
82 int entry = 0, used_cplb = 0; 81 int entry = 0, used_cplb = 0;
83 82
84 if (type == CPLB_I) { 83 if (type == CPLB_I) {
85 buf += sprintf(buf, "Instrction CPLB entry:\n"); 84 buf += sprintf(buf, "Instruction CPLB entry:\n");
86 p_addr = ipdt_table; 85 p_addr = ipdt_table;
87 p_data = ipdt_table + 1; 86 p_data = ipdt_table + 1;
88 p_icount = ipdt_swapcount_table; 87 p_icount = ipdt_swapcount_table;
@@ -92,8 +91,7 @@ static char *cplb_print_entry(char *buf, int type)
92 } else 91 } else
93 buf += sprintf(buf, "Data CPLB entry:\n"); 92 buf += sprintf(buf, "Data CPLB entry:\n");
94 93
95 buf += sprintf(buf, "Address\t\tData\tSize\tValid\tLocked\tSwapin\ 94 buf += sprintf(buf, "Address\t\tData\tSize\tValid\tLocked\tSwapin\n\tiCount\toCount\n");
96\tiCount\toCount\n");
97 95
98 while (*p_addr != 0xffffffff) { 96 while (*p_addr != 0xffffffff) {
99 entry = cplb_find_entry(cplb_addr, cplb_data, *p_addr, *p_data); 97 entry = cplb_find_entry(cplb_addr, cplb_data, *p_addr, *p_data);
@@ -144,8 +142,7 @@ static int cplbinfo_proc_output(char *buf)
144 142
145 p = buf; 143 p = buf;
146 144
147 p += sprintf(p, 145 p += sprintf(p, "------------------ CPLB Information ------------------\n\n");
148 "------------------ CPLB Information ------------------\n\n");
149 146
150 if (bfin_read_IMEM_CONTROL() & ENICPLB) 147 if (bfin_read_IMEM_CONTROL() & ENICPLB)
151 p = cplb_print_entry(p, CPLB_I); 148 p = cplb_print_entry(p, CPLB_I);
@@ -191,9 +188,9 @@ static int __init cplbinfo_init(void)
191{ 188{
192 struct proc_dir_entry *entry; 189 struct proc_dir_entry *entry;
193 190
194 if ((entry = create_proc_entry("cplbinfo", 0, NULL)) == NULL) { 191 entry = create_proc_entry("cplbinfo", 0, NULL);
192 if (!entry)
195 return -ENOMEM; 193 return -ENOMEM;
196 }
197 194
198 entry->read_proc = cplbinfo_read_proc; 195 entry->read_proc = cplbinfo_read_proc;
199 entry->write_proc = cplbinfo_write_proc; 196 entry->write_proc = cplbinfo_write_proc;
diff --git a/arch/blackfin/mach-common/cplbmgr.S b/arch/blackfin/mach-common/cplbmgr.S
index f5efc4bc65e6..e4b47e09cf13 100644
--- a/arch/blackfin/mach-common/cplbmgr.S
+++ b/arch/blackfin/mach-common/cplbmgr.S
@@ -592,6 +592,7 @@ ENTRY(_cplb_mgr)
592 ( R7:4,P5:3 ) = [SP++]; 592 ( R7:4,P5:3 ) = [SP++];
593 R0 = CPLB_RELOADED; 593 R0 = CPLB_RELOADED;
594 RTS; 594 RTS;
595ENDPROC(_cplb_mgr)
595 596
596.data 597.data
597.align 4; 598.align 4;
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index 7d0368772cda..d61bba98fb54 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -49,34 +49,15 @@
49 49
50 50
51#include <linux/linkage.h> 51#include <linux/linkage.h>
52#include <linux/unistd.h>
52#include <asm/blackfin.h> 53#include <asm/blackfin.h>
53#include <asm/unistd.h>
54#include <asm/errno.h> 54#include <asm/errno.h>
55#include <asm/thread_info.h> /* TIF_NEED_RESCHED */ 55#include <asm/thread_info.h> /* TIF_NEED_RESCHED */
56#include <asm/asm-offsets.h> 56#include <asm/asm-offsets.h>
57#include <asm/trace.h>
57 58
58#include <asm/mach-common/context.S> 59#include <asm/mach-common/context.S>
59 60
60#ifdef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE
61 /*
62 * TODO: this should be proper save/restore, but for now
63 * we'll just cheat and use 0x1/0x13
64 */
65# define DEBUG_START_HWTRACE \
66 P5.l = LO(TBUFCTL); \
67 P5.h = HI(TBUFCTL); \
68 R7 = 0x13; \
69 [P5] = R7;
70# define DEBUG_STOP_HWTRACE \
71 P5.l = LO(TBUFCTL); \
72 P5.h = HI(TBUFCTL); \
73 R7 = 0x01; \
74 [P5] = R7;
75#else
76# define DEBUG_START_HWTRACE
77# define DEBUG_STOP_HWTRACE
78#endif
79
80#ifdef CONFIG_EXCPT_IRQ_SYSC_L1 61#ifdef CONFIG_EXCPT_IRQ_SYSC_L1
81.section .l1.text 62.section .l1.text
82#else 63#else
@@ -103,59 +84,34 @@ ENTRY(_ex_dcplb)
103 if !cc jump _return_from_exception; 84 if !cc jump _return_from_exception;
104 /* fall through */ 85 /* fall through */
105#endif 86#endif
87ENDPROC(_ex_dcplb)
106 88
107ENTRY(_ex_icplb) 89ENTRY(_ex_icplb)
108 (R7:6,P5:4) = [sp++]; 90 (R7:6,P5:4) = [sp++];
109 ASTAT = [sp++]; 91 ASTAT = [sp++];
110 SAVE_ALL_SYS 92 SAVE_ALL_SYS
111 call __cplb_hdr; 93 call __cplb_hdr;
112 DEBUG_START_HWTRACE 94 DEBUG_START_HWTRACE(p5, r7)
113 RESTORE_ALL_SYS 95 RESTORE_ALL_SYS
114 SP = RETN; 96 SP = RETN;
115 rtx; 97 rtx;
116 98ENDPROC(_ex_icplb)
117ENTRY(_ex_spinlock)
118 /* Transform this into a syscall - twiddle the syscall vector. */
119 p5.l = lo(EVT15);
120 p5.h = hi(EVT15);
121 r7.l = _spinlock_bh;
122 r7.h = _spinlock_bh;
123 [p5] = r7;
124 csync;
125 /* Fall through. */
126 99
127ENTRY(_ex_syscall) 100ENTRY(_ex_syscall)
128 DEBUG_START_HWTRACE 101 DEBUG_START_HWTRACE(p5, r7)
129 (R7:6,P5:4) = [sp++]; 102 (R7:6,P5:4) = [sp++];
130 ASTAT = [sp++]; 103 ASTAT = [sp++];
131 raise 15; /* invoked by TRAP #0, for sys call */ 104 raise 15; /* invoked by TRAP #0, for sys call */
132 sp = retn; 105 sp = retn;
133 rtx 106 rtx
134 107ENDPROC(_ex_syscall)
135ENTRY(_spinlock_bh)
136 SAVE_ALL_SYS
137 /* To end up here, vector 15 was changed - so we have to change it
138 * back.
139 */
140 p0.l = lo(EVT15);
141 p0.h = hi(EVT15);
142 p1.l = _evt_system_call;
143 p1.h = _evt_system_call;
144 [p0] = p1;
145 csync;
146 r0 = [sp + PT_R0];
147 sp += -12;
148 call _sys_bfin_spinlock;
149 sp += 12;
150 [SP + PT_R0] = R0;
151 RESTORE_ALL_SYS
152 rti;
153 108
154ENTRY(_ex_soft_bp) 109ENTRY(_ex_soft_bp)
155 r7 = retx; 110 r7 = retx;
156 r7 += -2; 111 r7 += -2;
157 retx = r7; 112 retx = r7;
158 jump.s _ex_trap_c; 113 jump.s _ex_trap_c;
114ENDPROC(_ex_soft_bp)
159 115
160ENTRY(_ex_single_step) 116ENTRY(_ex_single_step)
161 r7 = retx; 117 r7 = retx;
@@ -180,7 +136,7 @@ ENTRY(_ex_single_step)
180 if !cc jump _ex_trap_c; 136 if !cc jump _ex_trap_c;
181 137
182_return_from_exception: 138_return_from_exception:
183 DEBUG_START_HWTRACE 139 DEBUG_START_HWTRACE(p5, r7)
184#ifdef ANOMALY_05000257 140#ifdef ANOMALY_05000257
185 R7=LC0; 141 R7=LC0;
186 LC0=R7; 142 LC0=R7;
@@ -191,6 +147,7 @@ _return_from_exception:
191 ASTAT = [sp++]; 147 ASTAT = [sp++];
192 sp = retn; 148 sp = retn;
193 rtx; 149 rtx;
150ENDPROC(_ex_soft_bp)
194 151
195ENTRY(_handle_bad_cplb) 152ENTRY(_handle_bad_cplb)
196 /* To get here, we just tried and failed to change a CPLB 153 /* To get here, we just tried and failed to change a CPLB
@@ -201,7 +158,7 @@ ENTRY(_handle_bad_cplb)
201 * need to make a CPLB exception look like a normal exception 158 * need to make a CPLB exception look like a normal exception
202 */ 159 */
203 160
204 DEBUG_START_HWTRACE 161 DEBUG_START_HWTRACE(p5, r7)
205 RESTORE_ALL_SYS 162 RESTORE_ALL_SYS
206 [--sp] = ASTAT; 163 [--sp] = ASTAT;
207 [--sp] = (R7:6, P5:4); 164 [--sp] = (R7:6, P5:4);
@@ -244,12 +201,13 @@ ENTRY(_ex_trap_c)
244 R6 = SEQSTAT; 201 R6 = SEQSTAT;
245 [P5] = R6; 202 [P5] = R6;
246 203
247 DEBUG_START_HWTRACE 204 DEBUG_START_HWTRACE(p5, r7)
248 (R7:6,P5:4) = [sp++]; 205 (R7:6,P5:4) = [sp++];
249 ASTAT = [sp++]; 206 ASTAT = [sp++];
250 SP = RETN; 207 SP = RETN;
251 raise 5; 208 raise 5;
252 rtx; 209 rtx;
210ENDPROC(_ex_trap_c)
253 211
254ENTRY(_exception_to_level5) 212ENTRY(_exception_to_level5)
255 SAVE_ALL_SYS 213 SAVE_ALL_SYS
@@ -314,6 +272,7 @@ ENTRY(_exception_to_level5)
314 call _ret_from_exception; 272 call _ret_from_exception;
315 RESTORE_ALL_SYS 273 RESTORE_ALL_SYS
316 rti; 274 rti;
275ENDPROC(_exception_to_level5)
317 276
318ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/ 277ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
319 /* Since the kernel stack can be anywhere, it's not guaranteed to be 278 /* Since the kernel stack can be anywhere, it's not guaranteed to be
@@ -326,7 +285,7 @@ ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
326 /* Try to deal with syscalls quickly. */ 285 /* Try to deal with syscalls quickly. */
327 [--sp] = ASTAT; 286 [--sp] = ASTAT;
328 [--sp] = (R7:6, P5:4); 287 [--sp] = (R7:6, P5:4);
329 DEBUG_STOP_HWTRACE 288 DEBUG_STOP_HWTRACE(p5, r7)
330 r7 = SEQSTAT; /* reason code is in bit 5:0 */ 289 r7 = SEQSTAT; /* reason code is in bit 5:0 */
331 r6.l = lo(SEQSTAT_EXCAUSE); 290 r6.l = lo(SEQSTAT_EXCAUSE);
332 r6.h = hi(SEQSTAT_EXCAUSE); 291 r6.h = hi(SEQSTAT_EXCAUSE);
@@ -342,6 +301,7 @@ ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
342 r7 = -ENOSYS; /* signextending enough */ 301 r7 = -ENOSYS; /* signextending enough */
343 [sp + PT_R0] = r7; /* return value from system call */ 302 [sp + PT_R0] = r7; /* return value from system call */
344 jump .Lsyscall_really_exit; 303 jump .Lsyscall_really_exit;
304ENDPROC(_trap)
345 305
346ENTRY(_kernel_execve) 306ENTRY(_kernel_execve)
347 link SIZEOF_PTREGS; 307 link SIZEOF_PTREGS;
@@ -396,6 +356,7 @@ ENTRY(_kernel_execve)
3961: 3561:
397 unlink; 357 unlink;
398 rts; 358 rts;
359ENDPROC(_kernel_execve)
399 360
400ENTRY(_system_call) 361ENTRY(_system_call)
401 /* Store IPEND */ 362 /* Store IPEND */
@@ -503,6 +464,7 @@ ENTRY(_system_call)
503 r5 = [sp + PT_RESERVED]; 464 r5 = [sp + PT_RESERVED];
504 rets = r5; 465 rets = r5;
505 rts; 466 rts;
467ENDPROC(_system_call)
506 468
507_sys_trace: 469_sys_trace:
508 call _syscall_trace; 470 call _syscall_trace;
@@ -531,6 +493,7 @@ _sys_trace:
531 493
532 call _syscall_trace; 494 call _syscall_trace;
533 jump .Lresume_userspace; 495 jump .Lresume_userspace;
496ENDPROC(_sys_trace)
534 497
535ENTRY(_resume) 498ENTRY(_resume)
536 /* 499 /*
@@ -580,6 +543,7 @@ _new_old_task:
580 * in "new" task. 543 * in "new" task.
581 */ 544 */
582 rts; 545 rts;
546ENDPROC(_resume)
583 547
584ENTRY(_ret_from_exception) 548ENTRY(_ret_from_exception)
585 p2.l = lo(IPEND); 549 p2.l = lo(IPEND);
@@ -638,6 +602,7 @@ ENTRY(_ret_from_exception)
638 syscfg = r0; 602 syscfg = r0;
6395: 6035:
640 rts; 604 rts;
605ENDPROC(_ret_from_exception)
641 606
642ENTRY(_return_from_int) 607ENTRY(_return_from_int)
643 /* If someone else already raised IRQ 15, do nothing. */ 608 /* If someone else already raised IRQ 15, do nothing. */
@@ -680,6 +645,7 @@ ENTRY(_return_from_int)
680 rti; 645 rti;
6812: 6462:
682 rts; 647 rts;
648ENDPROC(_return_from_int)
683 649
684ENTRY(_lower_to_irq14) 650ENTRY(_lower_to_irq14)
685#if defined(ANOMALY_05000281) 651#if defined(ANOMALY_05000281)
@@ -725,6 +691,10 @@ _schedule_and_signal_from_int:
725 r0 = [p0]; 691 r0 = [p0];
726 sti r0; 692 sti r0;
727 693
694 r0 = sp;
695 sp += -12;
696 call _finish_atomic_sections;
697 sp += 12;
728 jump.s .Lresume_userspace; 698 jump.s .Lresume_userspace;
729 699
730_schedule_and_signal: 700_schedule_and_signal:
@@ -745,6 +715,7 @@ _schedule_and_signal:
7451: 7151:
746 RESTORE_CONTEXT 716 RESTORE_CONTEXT
747 rti; 717 rti;
718ENDPROC(_lower_to_irq14)
748 719
749/* Make sure when we start, that the circular buffer is initialized properly 720/* Make sure when we start, that the circular buffer is initialized properly
750 * R0 and P0 are call clobbered, so we can use them here. 721 * R0 and P0 are call clobbered, so we can use them here.
@@ -758,6 +729,7 @@ ENTRY(_init_exception_buff)
758 p0.l = _out_ptr_excause; 729 p0.l = _out_ptr_excause;
759 [p0] = r0; 730 [p0] = r0;
760 rts; 731 rts;
732ENDPROC(_init_exception_buff)
761 733
762/* 734/*
763 * Put these in the kernel data section - that should always be covered by 735 * Put these in the kernel data section - that should always be covered by
@@ -772,14 +744,14 @@ ENTRY(_init_exception_buff)
772ALIGN 744ALIGN
773_extable: 745_extable:
774 /* entry for each EXCAUSE[5:0] 746 /* entry for each EXCAUSE[5:0]
775 * This table bmust be in sync with the table in ./kernel/traps.c 747 * This table must be in sync with the table in ./kernel/traps.c
776 * EXCPT instruction can provide 4 bits of EXCAUSE, allowing 16 to be user defined 748 * EXCPT instruction can provide 4 bits of EXCAUSE, allowing 16 to be user defined
777 */ 749 */
778 .long _ex_syscall; /* 0x00 - User Defined - Linux Syscall */ 750 .long _ex_syscall; /* 0x00 - User Defined - Linux Syscall */
779 .long _ex_soft_bp /* 0x01 - User Defined - Software breakpoint */ 751 .long _ex_soft_bp /* 0x01 - User Defined - Software breakpoint */
780 .long _ex_trap_c /* 0x02 - User Defined */ 752 .long _ex_trap_c /* 0x02 - User Defined */
781 .long _ex_trap_c /* 0x03 - User Defined - Atomic test and set service */ 753 .long _ex_trap_c /* 0x03 - User Defined - userspace stack overflow */
782 .long _ex_spinlock /* 0x04 - User Defined */ 754 .long _ex_trap_c /* 0x04 - User Defined */
783 .long _ex_trap_c /* 0x05 - User Defined */ 755 .long _ex_trap_c /* 0x05 - User Defined */
784 .long _ex_trap_c /* 0x06 - User Defined */ 756 .long _ex_trap_c /* 0x06 - User Defined */
785 .long _ex_trap_c /* 0x07 - User Defined */ 757 .long _ex_trap_c /* 0x07 - User Defined */
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S
index dd45664f0d02..203e20709163 100644
--- a/arch/blackfin/mach-common/interrupt.S
+++ b/arch/blackfin/mach-common/interrupt.S
@@ -34,6 +34,7 @@
34#include <linux/linkage.h> 34#include <linux/linkage.h>
35#include <asm/entry.h> 35#include <asm/entry.h>
36#include <asm/asm-offsets.h> 36#include <asm/asm-offsets.h>
37#include <asm/trace.h>
37 38
38#include <asm/mach-common/context.S> 39#include <asm/mach-common/context.S>
39 40
@@ -66,6 +67,7 @@ ENTRY(_evt_emulation)
66 SP += 12; 67 SP += 12;
67 /* - GDB stub fills this in by itself (if defined) */ 68 /* - GDB stub fills this in by itself (if defined) */
68 rte; 69 rte;
70ENDPROC(_evt_emulation)
69#endif 71#endif
70 72
71/* Common interrupt entry code. First we do CLI, then push 73/* Common interrupt entry code. First we do CLI, then push
@@ -138,7 +140,7 @@ __common_int_entry:
138 fp = 0; 140 fp = 0;
139#endif 141#endif
140 142
141#ifdef ANOMALY_05000283 143#if defined (ANOMALY_05000283) || defined (ANOMALY_05000315)
142 cc = r7 == r7; 144 cc = r7 == r7;
143 p5.h = 0xffc0; 145 p5.h = 0xffc0;
144 p5.l = 0x0014; 146 p5.l = 0x0014;
@@ -169,10 +171,9 @@ ENTRY(_evt_ivhw)
169 r7.l = W[p5]; 171 r7.l = W[p5];
1701: 1721:
171#endif 173#endif
172 p0.l = lo(TBUFCTL); 174
173 p0.h = hi(TBUFCTL); 175 trace_buffer_stop(p0, r0);
174 r0 = 1; 176
175 [p0] = r0;
176 r0 = IRQ_HWERR; 177 r0 = IRQ_HWERR;
177 r1 = sp; 178 r1 = sp;
178 179
@@ -251,3 +252,4 @@ ENTRY(_evt_system_call)
251#endif 252#endif
252 call _system_call; 253 call _system_call;
253 jump .Lcommon_restore_context; 254 jump .Lcommon_restore_context;
255ENDPROC(_evt_system_call)
diff --git a/arch/blackfin/mach-common/ints-priority-dc.c b/arch/blackfin/mach-common/ints-priority-dc.c
index f3cf07036c2a..6b9fd03ce835 100644
--- a/arch/blackfin/mach-common/ints-priority-dc.c
+++ b/arch/blackfin/mach-common/ints-priority-dc.c
@@ -4,7 +4,7 @@
4 * Author: 4 * Author:
5 * 5 *
6 * Created: ? 6 * Created: ?
7 * Description: Set up the interupt priorities 7 * Description: Set up the interrupt priorities
8 * 8 *
9 * Modified: 9 * Modified:
10 * 1996 Roman Zippel 10 * 1996 Roman Zippel
@@ -183,7 +183,7 @@ static void bf561_gpio_ack_irq(unsigned int irq)
183{ 183{
184 u16 gpionr = irq - IRQ_PF0; 184 u16 gpionr = irq - IRQ_PF0;
185 185
186 if(gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) { 186 if (gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) {
187 set_gpio_data(gpionr, 0); 187 set_gpio_data(gpionr, 0);
188 SSYNC(); 188 SSYNC();
189 } 189 }
@@ -193,7 +193,7 @@ static void bf561_gpio_mask_ack_irq(unsigned int irq)
193{ 193{
194 u16 gpionr = irq - IRQ_PF0; 194 u16 gpionr = irq - IRQ_PF0;
195 195
196 if(gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) { 196 if (gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) {
197 set_gpio_data(gpionr, 0); 197 set_gpio_data(gpionr, 0);
198 SSYNC(); 198 SSYNC();
199 } 199 }
@@ -222,7 +222,7 @@ static unsigned int bf561_gpio_irq_startup(unsigned int irq)
222 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { 222 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
223 223
224 ret = gpio_request(gpionr, NULL); 224 ret = gpio_request(gpionr, NULL);
225 if(ret) 225 if (ret)
226 return ret; 226 return ret;
227 227
228 } 228 }
@@ -262,7 +262,7 @@ static int bf561_gpio_irq_type(unsigned int irq, unsigned int type)
262 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { 262 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
263 263
264 ret = gpio_request(gpionr, NULL); 264 ret = gpio_request(gpionr, NULL);
265 if(ret) 265 if (ret)
266 return ret; 266 return ret;
267 267
268 } 268 }
@@ -371,6 +371,9 @@ int __init init_arch_irq(void)
371 bfin_write_SICA_IMASK1(SIC_UNMASK_ALL); 371 bfin_write_SICA_IMASK1(SIC_UNMASK_ALL);
372 SSYNC(); 372 SSYNC();
373 373
374 bfin_write_SICA_IWR0(IWR_ENABLE_ALL);
375 bfin_write_SICA_IWR1(IWR_ENABLE_ALL);
376
374 local_irq_disable(); 377 local_irq_disable();
375 378
376 init_exception_buff(); 379 init_exception_buff();
@@ -393,7 +396,7 @@ int __init init_arch_irq(void)
393 bfin_write_EVT15(evt_system_call); 396 bfin_write_EVT15(evt_system_call);
394 CSYNC(); 397 CSYNC();
395 398
396 for (irq = 0; irq < SYS_IRQS; irq++) { 399 for (irq = 0; irq <= SYS_IRQS; irq++) {
397 if (irq <= IRQ_CORETMR) 400 if (irq <= IRQ_CORETMR)
398 set_irq_chip(irq, &bf561_core_irqchip); 401 set_irq_chip(irq, &bf561_core_irqchip);
399 else 402 else
diff --git a/arch/blackfin/mach-common/ints-priority-sc.c b/arch/blackfin/mach-common/ints-priority-sc.c
index 34b62288ec3c..28a878c3577a 100644
--- a/arch/blackfin/mach-common/ints-priority-sc.c
+++ b/arch/blackfin/mach-common/ints-priority-sc.c
@@ -4,7 +4,7 @@
4 * Author: 4 * Author:
5 * 5 *
6 * Created: ? 6 * Created: ?
7 * Description: Set up the interupt priorities 7 * Description: Set up the interrupt priorities
8 * 8 *
9 * Modified: 9 * Modified:
10 * 1996 Roman Zippel 10 * 1996 Roman Zippel
@@ -13,7 +13,7 @@
13 * 2002 Arcturus Networks Inc. MaTed <mated@sympatico.ca> 13 * 2002 Arcturus Networks Inc. MaTed <mated@sympatico.ca>
14 * 2003 Metrowerks/Motorola 14 * 2003 Metrowerks/Motorola
15 * 2003 Bas Vermeulen <bas@buyways.nl> 15 * 2003 Bas Vermeulen <bas@buyways.nl>
16 * Copyright 2004-2006 Analog Devices Inc. 16 * Copyright 2004-2007 Analog Devices Inc.
17 * 17 *
18 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 18 * Bugs: Enter bugs at http://blackfin.uclinux.org/
19 * 19 *
@@ -65,9 +65,9 @@ atomic_t num_spurious;
65 65
66struct ivgx { 66struct ivgx {
67 /* irq number for request_irq, available in mach-bf533/irq.h */ 67 /* irq number for request_irq, available in mach-bf533/irq.h */
68 int irqno; 68 unsigned int irqno;
69 /* corresponding bit in the SIC_ISR register */ 69 /* corresponding bit in the SIC_ISR register */
70 int isrflag; 70 unsigned int isrflag;
71} ivg_table[NR_PERI_INTS]; 71} ivg_table[NR_PERI_INTS];
72 72
73struct ivg_slice { 73struct ivg_slice {
@@ -88,17 +88,16 @@ static void __init search_IAR(void)
88 for (ivg = 0; ivg <= IVG13 - IVG7; ivg++) { 88 for (ivg = 0; ivg <= IVG13 - IVG7; ivg++) {
89 int irqn; 89 int irqn;
90 90
91 ivg7_13[ivg].istop = ivg7_13[ivg].ifirst = 91 ivg7_13[ivg].istop = ivg7_13[ivg].ifirst = &ivg_table[irq_pos];
92 &ivg_table[irq_pos];
93 92
94 for (irqn = 0; irqn < NR_PERI_INTS; irqn++) { 93 for (irqn = 0; irqn < NR_PERI_INTS; irqn++) {
95 int iar_shift = (irqn & 7) * 4; 94 int iar_shift = (irqn & 7) * 4;
96 if (ivg == 95 if (ivg ==
97 (0xf & 96 (0xf &
98 bfin_read32((unsigned long *) SIC_IAR0 + 97 bfin_read32((unsigned long *)SIC_IAR0 +
99 (irqn >> 3)) >> iar_shift)) { 98 (irqn >> 3)) >> iar_shift)) {
100 ivg_table[irq_pos].irqno = IVG7 + irqn; 99 ivg_table[irq_pos].irqno = IVG7 + irqn;
101 ivg_table[irq_pos].isrflag = 1 << irqn; 100 ivg_table[irq_pos].isrflag = 1 << (irqn % 32);
102 ivg7_13[ivg].istop++; 101 ivg7_13[ivg].istop++;
103 irq_pos++; 102 irq_pos++;
104 } 103 }
@@ -141,15 +140,31 @@ static void bfin_core_unmask_irq(unsigned int irq)
141 140
142static void bfin_internal_mask_irq(unsigned int irq) 141static void bfin_internal_mask_irq(unsigned int irq)
143{ 142{
143#ifndef CONFIG_BF54x
144 bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() & 144 bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() &
145 ~(1 << (irq - (IRQ_CORETMR + 1)))); 145 ~(1 << (irq - (IRQ_CORETMR + 1))));
146#else
147 unsigned mask_bank, mask_bit;
148 mask_bank = (irq - (IRQ_CORETMR + 1)) / 32;
149 mask_bit = (irq - (IRQ_CORETMR + 1)) % 32;
150 bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) &
151 ~(1 << mask_bit));
152#endif
146 SSYNC(); 153 SSYNC();
147} 154}
148 155
149static void bfin_internal_unmask_irq(unsigned int irq) 156static void bfin_internal_unmask_irq(unsigned int irq)
150{ 157{
158#ifndef CONFIG_BF54x
151 bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() | 159 bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() |
152 (1 << (irq - (IRQ_CORETMR + 1)))); 160 (1 << (irq - (IRQ_CORETMR + 1))));
161#else
162 unsigned mask_bank, mask_bit;
163 mask_bank = (irq - (IRQ_CORETMR + 1)) / 32;
164 mask_bit = (irq - (IRQ_CORETMR + 1)) % 32;
165 bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) |
166 (1 << mask_bit));
167#endif
153 SSYNC(); 168 SSYNC();
154} 169}
155 170
@@ -206,7 +221,7 @@ static struct irq_chip bfin_generic_error_irqchip = {
206}; 221};
207 222
208static void bfin_demux_error_irq(unsigned int int_err_irq, 223static void bfin_demux_error_irq(unsigned int int_err_irq,
209 struct irq_desc *intb_desc) 224 struct irq_desc *intb_desc)
210{ 225{
211 int irq = 0; 226 int irq = 0;
212 227
@@ -270,8 +285,8 @@ static void bfin_demux_error_irq(unsigned int int_err_irq,
270 } 285 }
271 286
272 pr_debug("IRQ %d:" 287 pr_debug("IRQ %d:"
273 " MASKED PERIPHERAL ERROR INTERRUPT ASSERTED\n", 288 " MASKED PERIPHERAL ERROR INTERRUPT ASSERTED\n",
274 irq); 289 irq);
275 } 290 }
276 } else 291 } else
277 printk(KERN_ERR 292 printk(KERN_ERR
@@ -279,11 +294,10 @@ static void bfin_demux_error_irq(unsigned int int_err_irq,
279 " INTERRUPT ASSERTED BUT NO SOURCE FOUND\n", 294 " INTERRUPT ASSERTED BUT NO SOURCE FOUND\n",
280 __FUNCTION__, __FILE__, __LINE__); 295 __FUNCTION__, __FILE__, __LINE__);
281 296
282
283} 297}
284#endif /* BF537_GENERIC_ERROR_INT_DEMUX */ 298#endif /* BF537_GENERIC_ERROR_INT_DEMUX */
285 299
286#ifdef CONFIG_IRQCHIP_DEMUX_GPIO 300#if defined(CONFIG_IRQCHIP_DEMUX_GPIO) && !defined(CONFIG_BF54x)
287 301
288static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)]; 302static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)];
289static unsigned short gpio_edge_triggered[gpio_bank(MAX_BLACKFIN_GPIOS)]; 303static unsigned short gpio_edge_triggered[gpio_bank(MAX_BLACKFIN_GPIOS)];
@@ -361,8 +375,7 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
361 } 375 }
362 376
363 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING | 377 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING |
364 IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) 378 IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) {
365 {
366 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { 379 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
367 ret = gpio_request(gpionr, NULL); 380 ret = gpio_request(gpionr, NULL);
368 if (ret) 381 if (ret)
@@ -407,7 +420,6 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
407 return 0; 420 return 0;
408} 421}
409 422
410
411static struct irq_chip bfin_gpio_irqchip = { 423static struct irq_chip bfin_gpio_irqchip = {
412 .ack = bfin_gpio_ack_irq, 424 .ack = bfin_gpio_ack_irq,
413 .mask = bfin_gpio_mask_irq, 425 .mask = bfin_gpio_mask_irq,
@@ -419,20 +431,20 @@ static struct irq_chip bfin_gpio_irqchip = {
419}; 431};
420 432
421static void bfin_demux_gpio_irq(unsigned int intb_irq, 433static void bfin_demux_gpio_irq(unsigned int intb_irq,
422 struct irq_desc *intb_desc) 434 struct irq_desc *intb_desc)
423{ 435{
424 u16 i; 436 u16 i;
437 struct irq_desc *desc;
425 438
426 for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=16) { 439 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += 16) {
427 int irq = IRQ_PF0 + i; 440 int irq = IRQ_PF0 + i;
428 int flag_d = get_gpiop_data(i); 441 int flag_d = get_gpiop_data(i);
429 int mask = 442 int mask =
430 flag_d & (gpio_enabled[gpio_bank(i)] & 443 flag_d & (gpio_enabled[gpio_bank(i)] & get_gpiop_maska(i));
431 get_gpiop_maska(i));
432 444
433 while (mask) { 445 while (mask) {
434 if (mask & 1) { 446 if (mask & 1) {
435 struct irq_desc *desc = irq_desc + irq; 447 desc = irq_desc + irq;
436 desc->handle_irq(irq, desc); 448 desc->handle_irq(irq, desc);
437 } 449 }
438 irq++; 450 irq++;
@@ -441,6 +453,264 @@ static void bfin_demux_gpio_irq(unsigned int intb_irq,
441 } 453 }
442} 454}
443 455
456#else /* CONFIG_IRQCHIP_DEMUX_GPIO */
457
458#define NR_PINT_SYS_IRQS 4
459#define NR_PINT_BITS 32
460#define NR_PINTS 160
461#define IRQ_NOT_AVAIL 0xFF
462
463#define PINT_2_BANK(x) ((x) >> 5)
464#define PINT_2_BIT(x) ((x) & 0x1F)
465#define PINT_BIT(x) (1 << (PINT_2_BIT(x)))
466
467static unsigned char irq2pint_lut[NR_PINTS];
468static unsigned char pint2irq_lut[NR_PINT_SYS_IRQS * NR_PINT_BITS];
469
470struct pin_int_t {
471 unsigned int mask_set;
472 unsigned int mask_clear;
473 unsigned int request;
474 unsigned int assign;
475 unsigned int edge_set;
476 unsigned int edge_clear;
477 unsigned int invert_set;
478 unsigned int invert_clear;
479 unsigned int pinstate;
480 unsigned int latch;
481};
482
483static struct pin_int_t *pint[NR_PINT_SYS_IRQS] = {
484 (struct pin_int_t *)PINT0_MASK_SET,
485 (struct pin_int_t *)PINT1_MASK_SET,
486 (struct pin_int_t *)PINT2_MASK_SET,
487 (struct pin_int_t *)PINT3_MASK_SET,
488};
489
490unsigned short get_irq_base(u8 bank, u8 bmap)
491{
492
493 u16 irq_base;
494
495 if (bank < 2) { /*PA-PB */
496 irq_base = IRQ_PA0 + bmap * 16;
497 } else { /*PC-PJ */
498 irq_base = IRQ_PC0 + bmap * 16;
499 }
500
501 return irq_base;
502
503}
504
505 /* Whenever PINTx_ASSIGN is altered init_pint_lut() must be executed! */
506void init_pint_lut(void)
507{
508 u16 bank, bit, irq_base, bit_pos;
509 u32 pint_assign;
510 u8 bmap;
511
512 memset(irq2pint_lut, IRQ_NOT_AVAIL, sizeof(irq2pint_lut));
513
514 for (bank = 0; bank < NR_PINT_SYS_IRQS; bank++) {
515
516 pint_assign = pint[bank]->assign;
517
518 for (bit = 0; bit < NR_PINT_BITS; bit++) {
519
520 bmap = (pint_assign >> ((bit / 8) * 8)) & 0xFF;
521
522 irq_base = get_irq_base(bank, bmap);
523
524 irq_base += (bit % 8) + ((bit / 8) & 1 ? 8 : 0);
525 bit_pos = bit + bank * NR_PINT_BITS;
526
527 pint2irq_lut[bit_pos] = irq_base - SYS_IRQS;
528 irq2pint_lut[irq_base - SYS_IRQS] = bit_pos;
529
530 }
531
532 }
533
534}
535
536static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)];
537
538static void bfin_gpio_ack_irq(unsigned int irq)
539{
540 u8 pint_val = irq2pint_lut[irq - SYS_IRQS];
541
542 pint[PINT_2_BANK(pint_val)]->request = PINT_BIT(pint_val);
543 SSYNC();
544}
545
546static void bfin_gpio_mask_ack_irq(unsigned int irq)
547{
548 u8 pint_val = irq2pint_lut[irq - SYS_IRQS];
549 u32 pintbit = PINT_BIT(pint_val);
550 u8 bank = PINT_2_BANK(pint_val);
551
552 pint[bank]->request = pintbit;
553 pint[bank]->mask_clear = pintbit;
554 SSYNC();
555}
556
557static void bfin_gpio_mask_irq(unsigned int irq)
558{
559 u8 pint_val = irq2pint_lut[irq - SYS_IRQS];
560
561 pint[PINT_2_BANK(pint_val)]->mask_clear = PINT_BIT(pint_val);
562 SSYNC();
563}
564
565static void bfin_gpio_unmask_irq(unsigned int irq)
566{
567 u8 pint_val = irq2pint_lut[irq - SYS_IRQS];
568 u32 pintbit = PINT_BIT(pint_val);
569 u8 bank = PINT_2_BANK(pint_val);
570
571 pint[bank]->request = pintbit;
572 pint[bank]->mask_set = pintbit;
573 SSYNC();
574}
575
576static unsigned int bfin_gpio_irq_startup(unsigned int irq)
577{
578 unsigned int ret;
579 u16 gpionr = irq - IRQ_PA0;
580 u8 pint_val = irq2pint_lut[irq - SYS_IRQS];
581
582 if (pint_val == IRQ_NOT_AVAIL)
583 return -ENODEV;
584
585 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
586 ret = gpio_request(gpionr, NULL);
587 if (ret)
588 return ret;
589 }
590
591 gpio_enabled[gpio_bank(gpionr)] |= gpio_bit(gpionr);
592 bfin_gpio_unmask_irq(irq);
593
594 return ret;
595}
596
597static void bfin_gpio_irq_shutdown(unsigned int irq)
598{
599 bfin_gpio_mask_irq(irq);
600 gpio_free(irq - IRQ_PA0);
601 gpio_enabled[gpio_bank(irq - IRQ_PA0)] &= ~gpio_bit(irq - IRQ_PA0);
602}
603
604static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
605{
606
607 unsigned int ret;
608 u16 gpionr = irq - IRQ_PA0;
609 u8 pint_val = irq2pint_lut[irq - SYS_IRQS];
610 u32 pintbit = PINT_BIT(pint_val);
611 u8 bank = PINT_2_BANK(pint_val);
612
613 if (pint_val == IRQ_NOT_AVAIL)
614 return -ENODEV;
615
616 if (type == IRQ_TYPE_PROBE) {
617 /* only probe unenabled GPIO interrupt lines */
618 if (gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))
619 return 0;
620 type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING;
621 }
622
623 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING |
624 IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) {
625 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
626 ret = gpio_request(gpionr, NULL);
627 if (ret)
628 return ret;
629 }
630
631 gpio_enabled[gpio_bank(gpionr)] |= gpio_bit(gpionr);
632 } else {
633 gpio_enabled[gpio_bank(gpionr)] &= ~gpio_bit(gpionr);
634 return 0;
635 }
636
637 gpio_direction_input(gpionr);
638
639 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) {
640 pint[bank]->edge_set = pintbit;
641 } else {
642 pint[bank]->edge_clear = pintbit;
643 }
644
645 if ((type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_LEVEL_LOW)))
646 pint[bank]->invert_set = pintbit; /* low or falling edge denoted by one */
647 else
648 pint[bank]->invert_set = pintbit; /* high or rising edge denoted by zero */
649
650 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING))
651 pint[bank]->invert_set = pintbit;
652 else
653 pint[bank]->invert_set = pintbit;
654
655 SSYNC();
656
657 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING))
658 set_irq_handler(irq, handle_edge_irq);
659 else
660 set_irq_handler(irq, handle_level_irq);
661
662 return 0;
663}
664
665static struct irq_chip bfin_gpio_irqchip = {
666 .ack = bfin_gpio_ack_irq,
667 .mask = bfin_gpio_mask_irq,
668 .mask_ack = bfin_gpio_mask_ack_irq,
669 .unmask = bfin_gpio_unmask_irq,
670 .set_type = bfin_gpio_irq_type,
671 .startup = bfin_gpio_irq_startup,
672 .shutdown = bfin_gpio_irq_shutdown
673};
674
675static void bfin_demux_gpio_irq(unsigned int intb_irq,
676 struct irq_desc *intb_desc)
677{
678 u8 bank, pint_val;
679 u32 request, irq;
680 struct irq_desc *desc;
681
682 switch (intb_irq) {
683 case IRQ_PINT0:
684 bank = 0;
685 break;
686 case IRQ_PINT2:
687 bank = 2;
688 break;
689 case IRQ_PINT3:
690 bank = 3;
691 break;
692 case IRQ_PINT1:
693 bank = 1;
694 break;
695 default:
696 return;
697 }
698
699 pint_val = bank * NR_PINT_BITS;
700
701 request = pint[bank]->request;
702
703 while (request) {
704 if (request & 1) {
705 irq = pint2irq_lut[pint_val] + SYS_IRQS;
706 desc = irq_desc + irq;
707 desc->handle_irq(irq, desc);
708 }
709 pint_val++;
710 request >>= 1;
711 }
712
713}
444#endif /* CONFIG_IRQCHIP_DEMUX_GPIO */ 714#endif /* CONFIG_IRQCHIP_DEMUX_GPIO */
445 715
446/* 716/*
@@ -452,7 +722,18 @@ int __init init_arch_irq(void)
452 int irq; 722 int irq;
453 unsigned long ilat = 0; 723 unsigned long ilat = 0;
454 /* Disable all the peripheral intrs - page 4-29 HW Ref manual */ 724 /* Disable all the peripheral intrs - page 4-29 HW Ref manual */
725#ifdef CONFIG_BF54x
726 bfin_write_SIC_IMASK0(SIC_UNMASK_ALL);
727 bfin_write_SIC_IMASK1(SIC_UNMASK_ALL);
728 bfin_write_SIC_IMASK2(SIC_UNMASK_ALL);
729 bfin_write_SIC_IWR0(IWR_ENABLE_ALL);
730 bfin_write_SIC_IWR1(IWR_ENABLE_ALL);
731 bfin_write_SIC_IWR2(IWR_ENABLE_ALL);
732#else
455 bfin_write_SIC_IMASK(SIC_UNMASK_ALL); 733 bfin_write_SIC_IMASK(SIC_UNMASK_ALL);
734 bfin_write_SIC_IWR(IWR_ENABLE_ALL);
735#endif
736
456 SSYNC(); 737 SSYNC();
457 738
458 local_irq_disable(); 739 local_irq_disable();
@@ -475,7 +756,18 @@ int __init init_arch_irq(void)
475 bfin_write_EVT15(evt_system_call); 756 bfin_write_EVT15(evt_system_call);
476 CSYNC(); 757 CSYNC();
477 758
478 for (irq = 0; irq < SYS_IRQS; irq++) { 759#if defined(CONFIG_IRQCHIP_DEMUX_GPIO) && defined(CONFIG_BF54x)
760#ifdef CONFIG_PINTx_REASSIGN
761 pint[0]->assign = CONFIG_PINT0_ASSIGN;
762 pint[1]->assign = CONFIG_PINT1_ASSIGN;
763 pint[2]->assign = CONFIG_PINT2_ASSIGN;
764 pint[3]->assign = CONFIG_PINT3_ASSIGN;
765#endif
766 /* Whenever PINTx_ASSIGN is altered init_pint_lut() must be executed! */
767 init_pint_lut();
768#endif
769
770 for (irq = 0; irq <= SYS_IRQS; irq++) {
479 if (irq <= IRQ_CORETMR) 771 if (irq <= IRQ_CORETMR)
480 set_irq_chip(irq, &bfin_core_irqchip); 772 set_irq_chip(irq, &bfin_core_irqchip);
481 else 773 else
@@ -484,20 +776,42 @@ int __init init_arch_irq(void)
484 if (irq != IRQ_GENERIC_ERROR) { 776 if (irq != IRQ_GENERIC_ERROR) {
485#endif 777#endif
486 778
779 switch (irq) {
487#ifdef CONFIG_IRQCHIP_DEMUX_GPIO 780#ifdef CONFIG_IRQCHIP_DEMUX_GPIO
488 if ((irq != IRQ_PROG_INTA) /*PORT F & G MASK_A Interrupt*/ 781#ifndef CONFIG_BF54x
489# if defined(BF537_FAMILY) && !(defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)) 782 case IRQ_PROG_INTA:
490 && (irq != IRQ_MAC_RX) /*PORT H MASK_A Interrupt*/ 783 set_irq_chained_handler(irq,
491# endif 784 bfin_demux_gpio_irq);
492 ) { 785 break;
786#if defined(BF537_FAMILY) && !(defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE))
787 case IRQ_MAC_RX:
788 set_irq_chained_handler(irq,
789 bfin_demux_gpio_irq);
790 break;
493#endif 791#endif
494 set_irq_handler(irq, handle_simple_irq); 792#else
495#ifdef CONFIG_IRQCHIP_DEMUX_GPIO 793 case IRQ_PINT0:
496 } else {
497 set_irq_chained_handler(irq, 794 set_irq_chained_handler(irq,
498 bfin_demux_gpio_irq); 795 bfin_demux_gpio_irq);
499 } 796 break;
797 case IRQ_PINT1:
798 set_irq_chained_handler(irq,
799 bfin_demux_gpio_irq);
800 break;
801 case IRQ_PINT2:
802 set_irq_chained_handler(irq,
803 bfin_demux_gpio_irq);
804 break;
805 case IRQ_PINT3:
806 set_irq_chained_handler(irq,
807 bfin_demux_gpio_irq);
808 break;
809#endif /*CONFIG_BF54x */
500#endif 810#endif
811 default:
812 set_irq_handler(irq, handle_simple_irq);
813 break;
814 }
501 815
502#ifdef BF537_GENERIC_ERROR_INT_DEMUX 816#ifdef BF537_GENERIC_ERROR_INT_DEMUX
503 } else { 817 } else {
@@ -513,7 +827,11 @@ int __init init_arch_irq(void)
513#endif 827#endif
514 828
515#ifdef CONFIG_IRQCHIP_DEMUX_GPIO 829#ifdef CONFIG_IRQCHIP_DEMUX_GPIO
830#ifndef CONFIG_BF54x
516 for (irq = IRQ_PF0; irq < NR_IRQS; irq++) { 831 for (irq = IRQ_PF0; irq < NR_IRQS; irq++) {
832#else
833 for (irq = IRQ_PA0; irq < NR_IRQS; irq++) {
834#endif
517 set_irq_chip(irq, &bfin_gpio_irqchip); 835 set_irq_chip(irq, &bfin_gpio_irqchip);
518 /* if configured as edge, then will be changed to do_edge_IRQ */ 836 /* if configured as edge, then will be changed to do_edge_IRQ */
519 set_irq_handler(irq, handle_level_irq); 837 set_irq_handler(irq, handle_level_irq);
@@ -526,8 +844,7 @@ int __init init_arch_irq(void)
526 bfin_write_ILAT(ilat); 844 bfin_write_ILAT(ilat);
527 CSYNC(); 845 CSYNC();
528 846
529 printk(KERN_INFO 847 printk(KERN_INFO "Configuring Blackfin Priority Driven Interrupts\n");
530 "Configuring Blackfin Priority Driven Interrupts\n");
531 /* IMASK=xxx is equivalent to STI xx or irq_flags=xx, 848 /* IMASK=xxx is equivalent to STI xx or irq_flags=xx,
532 * local_irq_enable() 849 * local_irq_enable()
533 */ 850 */
@@ -538,14 +855,13 @@ int __init init_arch_irq(void)
538 /* Enable interrupts IVG7-15 */ 855 /* Enable interrupts IVG7-15 */
539 irq_flags = irq_flags | IMASK_IVG15 | 856 irq_flags = irq_flags | IMASK_IVG15 |
540 IMASK_IVG14 | IMASK_IVG13 | IMASK_IVG12 | IMASK_IVG11 | 857 IMASK_IVG14 | IMASK_IVG13 | IMASK_IVG12 | IMASK_IVG11 |
541 IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | 858 IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | IMASK_IVGHW;
542 IMASK_IVGHW;
543 859
544 return 0; 860 return 0;
545} 861}
546 862
547#ifdef CONFIG_DO_IRQ_L1 863#ifdef CONFIG_DO_IRQ_L1
548void do_irq(int vec, struct pt_regs *fp)__attribute__((l1_text)); 864void do_irq(int vec, struct pt_regs *fp) __attribute__((l1_text));
549#endif 865#endif
550 866
551void do_irq(int vec, struct pt_regs *fp) 867void do_irq(int vec, struct pt_regs *fp)
@@ -555,9 +871,25 @@ void do_irq(int vec, struct pt_regs *fp)
555 } else { 871 } else {
556 struct ivgx *ivg = ivg7_13[vec - IVG7].ifirst; 872 struct ivgx *ivg = ivg7_13[vec - IVG7].ifirst;
557 struct ivgx *ivg_stop = ivg7_13[vec - IVG7].istop; 873 struct ivgx *ivg_stop = ivg7_13[vec - IVG7].istop;
558 unsigned long sic_status; 874#ifdef CONFIG_BF54x
875 unsigned long sic_status[3];
559 876
560 SSYNC(); 877 SSYNC();
878 sic_status[0] = bfin_read_SIC_ISR(0) & bfin_read_SIC_IMASK(0);
879 sic_status[1] = bfin_read_SIC_ISR(1) & bfin_read_SIC_IMASK(1);
880 sic_status[2] = bfin_read_SIC_ISR(2) & bfin_read_SIC_IMASK(2);
881
882 for (;; ivg++) {
883 if (ivg >= ivg_stop) {
884 atomic_inc(&num_spurious);
885 return;
886 }
887 if (sic_status[(ivg->irqno - IVG7) / 32] & ivg->isrflag)
888 break;
889 }
890#else
891 unsigned long sic_status;
892 SSYNC();
561 sic_status = bfin_read_SIC_IMASK() & bfin_read_SIC_ISR(); 893 sic_status = bfin_read_SIC_IMASK() & bfin_read_SIC_ISR();
562 894
563 for (;; ivg++) { 895 for (;; ivg++) {
@@ -567,6 +899,7 @@ void do_irq(int vec, struct pt_regs *fp)
567 } else if (sic_status & ivg->isrflag) 899 } else if (sic_status & ivg->isrflag)
568 break; 900 break;
569 } 901 }
902#endif
570 vec = ivg->irqno; 903 vec = ivg->irqno;
571 } 904 }
572 asm_do_IRQ(vec, fp); 905 asm_do_IRQ(vec, fp);
diff --git a/arch/blackfin/mach-common/lock.S b/arch/blackfin/mach-common/lock.S
index 2cbb15b33925..386ac8dda076 100644
--- a/arch/blackfin/mach-common/lock.S
+++ b/arch/blackfin/mach-common/lock.S
@@ -155,6 +155,7 @@ ENTRY(_cache_grab_lock)
155 ( R7:0,P5:0 ) = [SP++]; 155 ( R7:0,P5:0 ) = [SP++];
156 156
157 RTS; 157 RTS;
158ENDPROC(_cache_grab_lock)
158 159
159/* After the execution of critical code, the code is now locked into 160/* After the execution of critical code, the code is now locked into
160 * the cache way. Now we need to set ILOC. 161 * the cache way. Now we need to set ILOC.
@@ -186,6 +187,7 @@ ENTRY(_cache_lock)
186 187
187 ( R7:0,P5:0 ) = [SP++]; 188 ( R7:0,P5:0 ) = [SP++];
188 RTS; 189 RTS;
190ENDPROC(_cache_lock)
189 191
190#endif /* BLKFIN_CACHE_LOCK */ 192#endif /* BLKFIN_CACHE_LOCK */
191 193
@@ -193,7 +195,6 @@ ENTRY(_cache_lock)
193 */ 195 */
194 196
195ENTRY(_read_iloc) 197ENTRY(_read_iloc)
196
197 P1.H = (IMEM_CONTROL >> 16); 198 P1.H = (IMEM_CONTROL >> 16);
198 P1.L = (IMEM_CONTROL & 0xFFFF); 199 P1.L = (IMEM_CONTROL & 0xFFFF);
199 R1 = 0xF; 200 R1 = 0xF;
@@ -202,3 +203,4 @@ ENTRY(_read_iloc)
202 R0 = R0 & R1; 203 R0 = R0 & R1;
203 204
204 RTS; 205 RTS;
206ENDPROC(_read_iloc)
diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c
index afed5246dd9e..1772d8d2c1a7 100644
--- a/arch/blackfin/mach-common/pm.c
+++ b/arch/blackfin/mach-common/pm.c
@@ -35,11 +35,11 @@
35#include <linux/pm.h> 35#include <linux/pm.h>
36#include <linux/sched.h> 36#include <linux/sched.h>
37#include <linux/proc_fs.h> 37#include <linux/proc_fs.h>
38#include <linux/io.h>
39#include <linux/irq.h>
38 40
39#include <asm/io.h>
40#include <asm/dpmc.h> 41#include <asm/dpmc.h>
41#include <asm/irq.h> 42#include <asm/gpio.h>
42
43 43
44#ifdef CONFIG_PM_WAKEUP_GPIO_POLAR_H 44#ifdef CONFIG_PM_WAKEUP_GPIO_POLAR_H
45#define WAKEUP_TYPE PM_WAKE_HIGH 45#define WAKEUP_TYPE PM_WAKE_HIGH
diff --git a/arch/blackfin/mm/blackfin_sram.c b/arch/blackfin/mm/blackfin_sram.c
index dd0c6501c424..b99ea883cd22 100644
--- a/arch/blackfin/mm/blackfin_sram.c
+++ b/arch/blackfin/mm/blackfin_sram.c
@@ -7,7 +7,7 @@
7 * Description: SRAM driver for Blackfin ADSP-BF5xx 7 * Description: SRAM driver for Blackfin ADSP-BF5xx
8 * 8 *
9 * Modified: 9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc. 10 * Copyright 2004-2007 Analog Devices Inc.
11 * 11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 * 13 *
@@ -63,6 +63,7 @@ struct l1_sram_piece {
63 void *paddr; 63 void *paddr;
64 int size; 64 int size;
65 int flag; 65 int flag;
66 pid_t pid;
66}; 67};
67 68
68static struct l1_sram_piece l1_ssram[CONFIG_L1_MAX_PIECE]; 69static struct l1_sram_piece l1_ssram[CONFIG_L1_MAX_PIECE];
@@ -80,13 +81,13 @@ static struct l1_sram_piece l1_inst_sram[CONFIG_L1_MAX_PIECE];
80#endif 81#endif
81 82
82/* L1 Scratchpad SRAM initialization function */ 83/* L1 Scratchpad SRAM initialization function */
83void l1sram_init(void) 84void __init l1sram_init(void)
84{ 85{
85 printk(KERN_INFO "Blackfin Scratchpad data SRAM: %d KB\n", 86 printk(KERN_INFO "Blackfin Scratchpad data SRAM: %d KB\n",
86 L1_SCRATCH_LENGTH >> 10); 87 L1_SCRATCH_LENGTH >> 10);
87 88
88 memset(&l1_ssram, 0x00, sizeof(l1_ssram)); 89 memset(&l1_ssram, 0x00, sizeof(l1_ssram));
89 l1_ssram[0].paddr = (void*)L1_SCRATCH_START; 90 l1_ssram[0].paddr = (void *)L1_SCRATCH_START;
90 l1_ssram[0].size = L1_SCRATCH_LENGTH; 91 l1_ssram[0].size = L1_SCRATCH_LENGTH;
91 l1_ssram[0].flag = SRAM_SLT_FREE; 92 l1_ssram[0].flag = SRAM_SLT_FREE;
92 93
@@ -94,42 +95,43 @@ void l1sram_init(void)
94 spin_lock_init(&l1sram_lock); 95 spin_lock_init(&l1sram_lock);
95} 96}
96 97
97void l1_data_sram_init(void) 98void __init l1_data_sram_init(void)
98{ 99{
99#if L1_DATA_A_LENGTH != 0 100#if L1_DATA_A_LENGTH != 0
100 printk(KERN_INFO "Blackfin DATA_A SRAM: %d KB\n",
101 L1_DATA_A_LENGTH >> 10);
102
103 memset(&l1_data_A_sram, 0x00, sizeof(l1_data_A_sram)); 101 memset(&l1_data_A_sram, 0x00, sizeof(l1_data_A_sram));
104 l1_data_A_sram[0].paddr = (void*)L1_DATA_A_START + 102 l1_data_A_sram[0].paddr = (void *)L1_DATA_A_START +
105 (_ebss_l1 - _sdata_l1); 103 (_ebss_l1 - _sdata_l1);
106 l1_data_A_sram[0].size = L1_DATA_A_LENGTH - (_ebss_l1 - _sdata_l1); 104 l1_data_A_sram[0].size = L1_DATA_A_LENGTH - (_ebss_l1 - _sdata_l1);
107 l1_data_A_sram[0].flag = SRAM_SLT_FREE; 105 l1_data_A_sram[0].flag = SRAM_SLT_FREE;
106
107 printk(KERN_INFO "Blackfin Data A SRAM: %d KB (%d KB free)\n",
108 L1_DATA_A_LENGTH >> 10, l1_data_A_sram[0].size >> 10);
108#endif 109#endif
109#if L1_DATA_B_LENGTH != 0 110#if L1_DATA_B_LENGTH != 0
110 printk(KERN_INFO "Blackfin DATA_B SRAM: %d KB\n",
111 L1_DATA_B_LENGTH >> 10);
112
113 memset(&l1_data_B_sram, 0x00, sizeof(l1_data_B_sram)); 111 memset(&l1_data_B_sram, 0x00, sizeof(l1_data_B_sram));
114 l1_data_B_sram[0].paddr = (void*)L1_DATA_B_START; 112 l1_data_B_sram[0].paddr = (void *)L1_DATA_B_START +
115 l1_data_B_sram[0].size = L1_DATA_B_LENGTH; 113 (_ebss_b_l1 - _sdata_b_l1);
114 l1_data_B_sram[0].size = L1_DATA_B_LENGTH - (_ebss_b_l1 - _sdata_b_l1);
116 l1_data_B_sram[0].flag = SRAM_SLT_FREE; 115 l1_data_B_sram[0].flag = SRAM_SLT_FREE;
116
117 printk(KERN_INFO "Blackfin Data B SRAM: %d KB (%d KB free)\n",
118 L1_DATA_B_LENGTH >> 10, l1_data_B_sram[0].size >> 10);
117#endif 119#endif
118 120
119 /* mutex initialize */ 121 /* mutex initialize */
120 spin_lock_init(&l1_data_sram_lock); 122 spin_lock_init(&l1_data_sram_lock);
121} 123}
122 124
123void l1_inst_sram_init(void) 125void __init l1_inst_sram_init(void)
124{ 126{
125#if L1_CODE_LENGTH != 0 127#if L1_CODE_LENGTH != 0
126 printk(KERN_INFO "Blackfin Instruction SRAM: %d KB\n",
127 L1_CODE_LENGTH >> 10);
128
129 memset(&l1_inst_sram, 0x00, sizeof(l1_inst_sram)); 128 memset(&l1_inst_sram, 0x00, sizeof(l1_inst_sram));
130 l1_inst_sram[0].paddr = (void*)L1_CODE_START + (_etext_l1 - _stext_l1); 129 l1_inst_sram[0].paddr = (void *)L1_CODE_START + (_etext_l1 - _stext_l1);
131 l1_inst_sram[0].size = L1_CODE_LENGTH - (_etext_l1 - _stext_l1); 130 l1_inst_sram[0].size = L1_CODE_LENGTH - (_etext_l1 - _stext_l1);
132 l1_inst_sram[0].flag = SRAM_SLT_FREE; 131 l1_inst_sram[0].flag = SRAM_SLT_FREE;
132
133 printk(KERN_INFO "Blackfin Instruction SRAM: %d KB (%d KB free)\n",
134 L1_CODE_LENGTH >> 10, l1_inst_sram[0].size >> 10);
133#endif 135#endif
134 136
135 /* mutex initialize */ 137 /* mutex initialize */
@@ -149,12 +151,13 @@ static void *_l1_sram_alloc(size_t size, struct l1_sram_piece *pfree, int count)
149 size = (size + 3) & ~3; 151 size = (size + 3) & ~3;
150 152
151 /* not use the good method to match the best slot !!! */ 153 /* not use the good method to match the best slot !!! */
152 /* search an available memeory slot */ 154 /* search an available memory slot */
153 for (i = 0; i < count; i++) { 155 for (i = 0; i < count; i++) {
154 if ((pfree[i].flag == SRAM_SLT_FREE) 156 if ((pfree[i].flag == SRAM_SLT_FREE)
155 && (pfree[i].size >= size)) { 157 && (pfree[i].size >= size)) {
156 addr = pfree[i].paddr; 158 addr = pfree[i].paddr;
157 pfree[i].flag = SRAM_SLT_ALLOCATED; 159 pfree[i].flag = SRAM_SLT_ALLOCATED;
160 pfree[i].pid = current->pid;
158 index = i; 161 index = i;
159 break; 162 break;
160 } 163 }
@@ -162,10 +165,11 @@ static void *_l1_sram_alloc(size_t size, struct l1_sram_piece *pfree, int count)
162 if (i >= count) 165 if (i >= count)
163 return NULL; 166 return NULL;
164 167
165 /* updated the NULL memeory slot !!! */ 168 /* updated the NULL memory slot !!! */
166 if (pfree[i].size > size) { 169 if (pfree[i].size > size) {
167 for (i = 0; i < count; i++) { 170 for (i = 0; i < count; i++) {
168 if (pfree[i].flag == SRAM_SLT_NULL) { 171 if (pfree[i].flag == SRAM_SLT_NULL) {
172 pfree[i].pid = 0;
169 pfree[i].flag = SRAM_SLT_FREE; 173 pfree[i].flag = SRAM_SLT_FREE;
170 pfree[i].paddr = addr + size; 174 pfree[i].paddr = addr + size;
171 pfree[i].size = pfree[index].size - size; 175 pfree[i].size = pfree[index].size - size;
@@ -186,7 +190,7 @@ static void *_l1_sram_alloc_max(struct l1_sram_piece *pfree, int count,
186 int i, index = -1; 190 int i, index = -1;
187 void *addr = NULL; 191 void *addr = NULL;
188 192
189 /* search an available memeory slot */ 193 /* search an available memory slot */
190 for (i = 0; i < count; i++) { 194 for (i = 0; i < count; i++) {
191 if (pfree[i].flag == SRAM_SLT_FREE && pfree[i].size > best) { 195 if (pfree[i].flag == SRAM_SLT_FREE && pfree[i].size > best) {
192 addr = pfree[i].paddr; 196 addr = pfree[i].paddr;
@@ -198,13 +202,15 @@ static void *_l1_sram_alloc_max(struct l1_sram_piece *pfree, int count,
198 return NULL; 202 return NULL;
199 *psize = best; 203 *psize = best;
200 204
205 pfree[index].pid = current->pid;
201 pfree[index].flag = SRAM_SLT_ALLOCATED; 206 pfree[index].flag = SRAM_SLT_ALLOCATED;
202 return addr; 207 return addr;
203} 208}
204 209
205/* L1 memory free function */ 210/* L1 memory free function */
206static int _l1_sram_free(const void *addr, 211static int _l1_sram_free(const void *addr,
207 struct l1_sram_piece *pfree, int count) 212 struct l1_sram_piece *pfree,
213 int count)
208{ 214{
209 int i, index = 0; 215 int i, index = 0;
210 216
@@ -222,12 +228,14 @@ static int _l1_sram_free(const void *addr,
222 if (i >= count) 228 if (i >= count)
223 return -1; 229 return -1;
224 230
231 pfree[index].pid = 0;
225 pfree[index].flag = SRAM_SLT_FREE; 232 pfree[index].flag = SRAM_SLT_FREE;
226 233
227 /* link the next address slot */ 234 /* link the next address slot */
228 for (i = 0; i < count; i++) { 235 for (i = 0; i < count; i++) {
229 if (((pfree[index].paddr + pfree[index].size) == pfree[i].paddr) 236 if (((pfree[index].paddr + pfree[index].size) == pfree[i].paddr)
230 && (pfree[i].flag == SRAM_SLT_FREE)) { 237 && (pfree[i].flag == SRAM_SLT_FREE)) {
238 pfree[i].pid = 0;
231 pfree[i].flag = SRAM_SLT_NULL; 239 pfree[i].flag = SRAM_SLT_NULL;
232 pfree[index].size += pfree[i].size; 240 pfree[index].size += pfree[i].size;
233 pfree[index].flag = SRAM_SLT_FREE; 241 pfree[index].flag = SRAM_SLT_FREE;
@@ -513,10 +521,9 @@ void *sram_alloc_with_lsl(size_t size, unsigned long flags)
513 struct sram_list_struct *lsl = NULL; 521 struct sram_list_struct *lsl = NULL;
514 struct mm_struct *mm = current->mm; 522 struct mm_struct *mm = current->mm;
515 523
516 lsl = kmalloc(sizeof(struct sram_list_struct), GFP_KERNEL); 524 lsl = kzalloc(sizeof(struct sram_list_struct), GFP_KERNEL);
517 if (!lsl) 525 if (!lsl)
518 return NULL; 526 return NULL;
519 memset(lsl, 0, sizeof(*lsl));
520 527
521 if (flags & L1_INST_SRAM) 528 if (flags & L1_INST_SRAM)
522 addr = l1_inst_sram_alloc(size); 529 addr = l1_inst_sram_alloc(size);
@@ -538,3 +545,64 @@ void *sram_alloc_with_lsl(size_t size, unsigned long flags)
538 return addr; 545 return addr;
539} 546}
540EXPORT_SYMBOL(sram_alloc_with_lsl); 547EXPORT_SYMBOL(sram_alloc_with_lsl);
548
549#ifdef CONFIG_PROC_FS
550/* Once we get a real allocator, we'll throw all of this away.
551 * Until then, we need some sort of visibility into the L1 alloc.
552 */
553static void _l1sram_proc_read(char *buf, int *len, const char *desc,
554 struct l1_sram_piece *pfree, const int array_size)
555{
556 int i;
557
558 *len += sprintf(&buf[*len], "--- L1 %-14s Size PID State\n", desc);
559 for (i = 0; i < array_size; ++i) {
560 const char *alloc_type;
561 switch (pfree[i].flag) {
562 case SRAM_SLT_NULL: alloc_type = "NULL"; break;
563 case SRAM_SLT_FREE: alloc_type = "FREE"; break;
564 case SRAM_SLT_ALLOCATED: alloc_type = "ALLOCATED"; break;
565 default: alloc_type = "????"; break;
566 }
567 *len += sprintf(&buf[*len], "%p-%p %8i %4i %s\n",
568 pfree[i].paddr, pfree[i].paddr + pfree[i].size,
569 pfree[i].size, pfree[i].pid, alloc_type);
570 }
571}
572static int l1sram_proc_read(char *buf, char **start, off_t offset, int count,
573 int *eof, void *data)
574{
575 int len = 0;
576
577 _l1sram_proc_read(buf, &len, "Scratchpad",
578 l1_ssram, ARRAY_SIZE(l1_ssram));
579#if L1_DATA_A_LENGTH != 0
580 _l1sram_proc_read(buf, &len, "Data A",
581 l1_data_A_sram, ARRAY_SIZE(l1_data_A_sram));
582#endif
583#if L1_DATA_B_LENGTH != 0
584 _l1sram_proc_read(buf, &len, "Data B",
585 l1_data_B_sram, ARRAY_SIZE(l1_data_B_sram));
586#endif
587#if L1_CODE_LENGTH != 0
588 _l1sram_proc_read(buf, &len, "Instruction",
589 l1_inst_sram, ARRAY_SIZE(l1_inst_sram));
590#endif
591
592 return len;
593}
594
595static int __init l1sram_proc_init(void)
596{
597 struct proc_dir_entry *ptr;
598 ptr = create_proc_entry("sram", S_IFREG | S_IRUGO, NULL);
599 if (!ptr) {
600 printk(KERN_WARNING "unable to create /proc/sram\n");
601 return -1;
602 }
603 ptr->owner = THIS_MODULE;
604 ptr->read_proc = l1sram_proc_read;
605 return 0;
606}
607late_initcall(l1sram_proc_init);
608#endif
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c
index d6cf1059560d..68459cc052a1 100644
--- a/arch/blackfin/mm/init.c
+++ b/arch/blackfin/mm/init.c
@@ -7,7 +7,7 @@
7 * Description: 7 * Description:
8 * 8 *
9 * Modified: 9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc. 10 * Copyright 2004-2007 Analog Devices Inc.
11 * 11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 * 13 *
@@ -29,8 +29,8 @@
29 29
30#include <linux/swap.h> 30#include <linux/swap.h>
31#include <linux/bootmem.h> 31#include <linux/bootmem.h>
32#include <linux/uaccess.h>
32#include <asm/bfin-global.h> 33#include <asm/bfin-global.h>
33#include <asm/uaccess.h>
34#include <asm/l1layout.h> 34#include <asm/l1layout.h>
35#include "blackfin_sram.h" 35#include "blackfin_sram.h"
36 36
@@ -53,7 +53,7 @@ static unsigned long empty_bad_page;
53 53
54unsigned long empty_zero_page; 54unsigned long empty_zero_page;
55 55
56void show_mem(void) 56void __init show_mem(void)
57{ 57{
58 unsigned long i; 58 unsigned long i;
59 int free = 0, total = 0, reserved = 0, shared = 0; 59 int free = 0, total = 0, reserved = 0, shared = 0;
@@ -86,7 +86,7 @@ void show_mem(void)
86 * The parameters are pointers to where to stick the starting and ending 86 * The parameters are pointers to where to stick the starting and ending
87 * addresses of available kernel virtual memory. 87 * addresses of available kernel virtual memory.
88 */ 88 */
89void paging_init(void) 89void __init paging_init(void)
90{ 90{
91 /* 91 /*
92 * make sure start_mem is page aligned, otherwise bootmem and 92 * make sure start_mem is page aligned, otherwise bootmem and
@@ -125,7 +125,7 @@ void paging_init(void)
125 } 125 }
126} 126}
127 127
128void mem_init(void) 128void __init mem_init(void)
129{ 129{
130 unsigned int codek = 0, datak = 0, initk = 0; 130 unsigned int codek = 0, datak = 0, initk = 0;
131 unsigned long tmp; 131 unsigned long tmp;
@@ -168,42 +168,31 @@ void mem_init(void)
168 } 168 }
169} 169}
170 170
171#ifdef CONFIG_BLK_DEV_INITRD 171static __init void free_init_pages(const char *what, unsigned long begin, unsigned long end)
172void free_initrd_mem(unsigned long start, unsigned long end)
173{
174 int pages = 0;
175 for (; start < end; start += PAGE_SIZE) {
176 ClearPageReserved(virt_to_page(start));
177 init_page_count(virt_to_page(start));
178 free_page(start);
179 totalram_pages++;
180 pages++;
181 }
182 printk(KERN_NOTICE "Freeing initrd memory: %dk freed\n", pages);
183}
184#endif
185
186void free_initmem(void)
187{ 172{
188#ifdef CONFIG_RAMKERNEL
189 unsigned long addr; 173 unsigned long addr;
190/*
191 * the following code should be cool even if these sections
192 * are not page aligned.
193 */
194 addr = PAGE_ALIGN((unsigned long)(__init_begin));
195 /* next to check that the page we free is not a partial page */ 174 /* next to check that the page we free is not a partial page */
196 for (; addr + PAGE_SIZE < (unsigned long)(__init_end); 175 for (addr = begin; addr + PAGE_SIZE <= end; addr += PAGE_SIZE) {
197 addr += PAGE_SIZE) {
198 ClearPageReserved(virt_to_page(addr)); 176 ClearPageReserved(virt_to_page(addr));
199 init_page_count(virt_to_page(addr)); 177 init_page_count(virt_to_page(addr));
200 free_page(addr); 178 free_page(addr);
201 totalram_pages++; 179 totalram_pages++;
202 } 180 }
203 printk(KERN_NOTICE 181 printk(KERN_INFO "Freeing %s: %ldk freed\n", what, (end - begin) >> 10);
204 "Freeing unused kernel memory: %ldk freed (0x%x - 0x%x)\n", 182}
205 (addr - PAGE_ALIGN((long)__init_begin)) >> 10, 183
206 (int)(PAGE_ALIGN((unsigned long)(__init_begin))), 184#ifdef CONFIG_BLK_DEV_INITRD
207 (int)(addr - PAGE_SIZE)); 185void __init free_initrd_mem(unsigned long start, unsigned long end)
186{
187 free_init_pages("initrd memory", start, end);
188}
189#endif
190
191void __init free_initmem(void)
192{
193#ifdef CONFIG_RAMKERNEL
194 free_init_pages("unused kernel memory",
195 (unsigned long)(&__init_begin),
196 (unsigned long)(&__init_end));
208#endif 197#endif
209} 198}
diff --git a/arch/blackfin/oprofile/common.c b/arch/blackfin/oprofile/common.c
index 009a1700c854..cb8b8d5af34f 100644
--- a/arch/blackfin/oprofile/common.c
+++ b/arch/blackfin/oprofile/common.c
@@ -33,12 +33,12 @@
33#include <linux/smp.h> 33#include <linux/smp.h>
34#include <linux/errno.h> 34#include <linux/errno.h>
35#include <linux/mutex.h> 35#include <linux/mutex.h>
36#include <linux/ptrace.h>
37#include <linux/irq.h>
38#include <linux/io.h>
36 39
37#include <asm/ptrace.h>
38#include <asm/system.h> 40#include <asm/system.h>
39#include <asm/blackfin.h> 41#include <asm/blackfin.h>
40#include <asm/irq.h>
41#include <asm/io.h>
42 42
43#include "op_blackfin.h" 43#include "op_blackfin.h"
44 44
diff --git a/arch/blackfin/oprofile/op_model_bf533.c b/arch/blackfin/oprofile/op_model_bf533.c
index b7a20a006b49..872dffe33623 100644
--- a/arch/blackfin/oprofile/op_model_bf533.c
+++ b/arch/blackfin/oprofile/op_model_bf533.c
@@ -32,12 +32,12 @@
32#include <linux/init.h> 32#include <linux/init.h>
33#include <linux/smp.h> 33#include <linux/smp.h>
34#include <linux/interrupt.h> 34#include <linux/interrupt.h>
35#include <asm/ptrace.h> 35#include <linux/ptrace.h>
36#include <linux/irq.h>
37#include <linux/io.h>
36#include <asm/system.h> 38#include <asm/system.h>
37#include <asm/processor.h> 39#include <asm/processor.h>
38#include <asm/blackfin.h> 40#include <asm/blackfin.h>
39#include <asm/irq.h>
40#include <asm/io.h>
41 41
42#include "op_blackfin.h" 42#include "op_blackfin.h"
43 43
diff --git a/arch/blackfin/oprofile/timer_int.c b/arch/blackfin/oprofile/timer_int.c
index 8fba16c846c9..6c6f8606af4c 100644
--- a/arch/blackfin/oprofile/timer_int.c
+++ b/arch/blackfin/oprofile/timer_int.c
@@ -31,8 +31,7 @@
31#include <linux/smp.h> 31#include <linux/smp.h>
32#include <linux/irq.h> 32#include <linux/irq.h>
33#include <linux/oprofile.h> 33#include <linux/oprofile.h>
34 34#include <linux/ptrace.h>
35#include <asm/ptrace.h>
36 35
37static void enable_sys_timer0() 36static void enable_sys_timer0()
38{ 37{
diff --git a/arch/cris/arch-v10/defconfig b/arch/cris/arch-v10/defconfig
index 2a3411eaace9..710c20ba2be7 100644
--- a/arch/cris/arch-v10/defconfig
+++ b/arch/cris/arch-v10/defconfig
@@ -429,7 +429,6 @@ CONFIG_NET_ETHERNET=y
429# CONFIG_BFS_FS is not set 429# CONFIG_BFS_FS is not set
430# CONFIG_FAT_FS is not set 430# CONFIG_FAT_FS is not set
431# CONFIG_MSDOS_FS is not set 431# CONFIG_MSDOS_FS is not set
432# CONFIG_UMSDOS_FS is not set
433# CONFIG_VFAT_FS is not set 432# CONFIG_VFAT_FS is not set
434# CONFIG_EFS_FS is not set 433# CONFIG_EFS_FS is not set
435# CONFIG_JFFS_FS is not set 434# CONFIG_JFFS_FS is not set
diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c
index d47cfbf98d6e..1de0026bb94e 100644
--- a/arch/cris/arch-v10/drivers/pcf8563.c
+++ b/arch/cris/arch-v10/drivers/pcf8563.c
@@ -180,9 +180,7 @@ err:
180void __exit 180void __exit
181pcf8563_exit(void) 181pcf8563_exit(void)
182{ 182{
183 if (unregister_chrdev(PCF8563_MAJOR, DEVICE_NAME) < 0) { 183 unregister_chrdev(PCF8563_MAJOR, DEVICE_NAME);
184 printk(KERN_INFO "%s: Unable to unregister device.\n", PCF8563_NAME);
185 }
186} 184}
187 185
188/* 186/*
diff --git a/arch/cris/arch-v10/kernel/ptrace.c b/arch/cris/arch-v10/kernel/ptrace.c
index fd2129a04586..f4f9db698b44 100644
--- a/arch/cris/arch-v10/kernel/ptrace.c
+++ b/arch/cris/arch-v10/kernel/ptrace.c
@@ -83,19 +83,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
83 switch (request) { 83 switch (request) {
84 /* Read word at location address. */ 84 /* Read word at location address. */
85 case PTRACE_PEEKTEXT: 85 case PTRACE_PEEKTEXT:
86 case PTRACE_PEEKDATA: { 86 case PTRACE_PEEKDATA:
87 unsigned long tmp; 87 ret = generic_ptrace_peekdata(child, addr, data);
88 int copied;
89
90 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
91 ret = -EIO;
92
93 if (copied != sizeof(tmp))
94 break;
95
96 ret = put_user(tmp,datap);
97 break; 88 break;
98 }
99 89
100 /* Read the word at location address in the USER area. */ 90 /* Read the word at location address in the USER area. */
101 case PTRACE_PEEKUSR: { 91 case PTRACE_PEEKUSR: {
@@ -113,12 +103,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
113 /* Write the word at location address. */ 103 /* Write the word at location address. */
114 case PTRACE_POKETEXT: 104 case PTRACE_POKETEXT:
115 case PTRACE_POKEDATA: 105 case PTRACE_POKEDATA:
116 ret = 0; 106 ret = generic_ptrace_pokedata(child, addr, data);
117
118 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
119 break;
120
121 ret = -EIO;
122 break; 107 break;
123 108
124 /* Write the word at location address in the USER area. */ 109 /* Write the word at location address in the USER area. */
diff --git a/arch/cris/arch-v10/vmlinux.lds.S b/arch/cris/arch-v10/vmlinux.lds.S
index 4b348b38cf33..9859d49d088b 100644
--- a/arch/cris/arch-v10/vmlinux.lds.S
+++ b/arch/cris/arch-v10/vmlinux.lds.S
@@ -44,7 +44,7 @@ SECTIONS
44 ___data_start = . ; 44 ___data_start = . ;
45 __Sdata = . ; 45 __Sdata = . ;
46 .data : { /* Data */ 46 .data : { /* Data */
47 *(.data) 47 DATA_DATA
48 } 48 }
49 __edata = . ; /* End of data section */ 49 __edata = . ; /* End of data section */
50 _edata = . ; 50 _edata = . ;
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
index 1a071f17446d..e8914d401696 100644
--- a/arch/cris/arch-v32/drivers/cryptocop.c
+++ b/arch/cris/arch-v32/drivers/cryptocop.c
@@ -267,10 +267,10 @@ static void print_user_dma_lists(struct cryptocop_dma_list_operation *dma_op);
267 267
268 268
269const struct file_operations cryptocop_fops = { 269const struct file_operations cryptocop_fops = {
270 owner: THIS_MODULE, 270 .owner = THIS_MODULE,
271 open: cryptocop_open, 271 .open = cryptocop_open,
272 release: cryptocop_release, 272 .release = cryptocop_release,
273 ioctl: cryptocop_ioctl 273 .ioctl = cryptocop_ioctl
274}; 274};
275 275
276 276
diff --git a/arch/cris/arch-v32/drivers/i2c.c b/arch/cris/arch-v32/drivers/i2c.c
index 5d6c52737df3..e12f6cc6f4a2 100644
--- a/arch/cris/arch-v32/drivers/i2c.c
+++ b/arch/cris/arch-v32/drivers/i2c.c
@@ -574,10 +574,10 @@ i2c_ioctl(struct inode *inode, struct file *file,
574} 574}
575 575
576static const struct file_operations i2c_fops = { 576static const struct file_operations i2c_fops = {
577 owner: THIS_MODULE, 577 .owner = THIS_MODULE,
578 ioctl: i2c_ioctl, 578 .ioctl = i2c_ioctl,
579 open: i2c_open, 579 .open = i2c_open,
580 release: i2c_release, 580 .release = i2c_release,
581}; 581};
582 582
583int __init 583int __init
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c
index 24b919b3821a..da479a14f836 100644
--- a/arch/cris/arch-v32/drivers/pcf8563.c
+++ b/arch/cris/arch-v32/drivers/pcf8563.c
@@ -51,10 +51,10 @@ int pcf8563_open(struct inode *, struct file *);
51int pcf8563_release(struct inode *, struct file *); 51int pcf8563_release(struct inode *, struct file *);
52 52
53static const struct file_operations pcf8563_fops = { 53static const struct file_operations pcf8563_fops = {
54 owner: THIS_MODULE, 54 .owner = THIS_MODULE,
55 ioctl: pcf8563_ioctl, 55 .ioctl = pcf8563_ioctl,
56 open: pcf8563_open, 56 .open = pcf8563_open,
57 release: pcf8563_release, 57 .release = pcf8563_release,
58}; 58};
59 59
60unsigned char 60unsigned char
@@ -193,9 +193,7 @@ err:
193void __exit 193void __exit
194pcf8563_exit(void) 194pcf8563_exit(void)
195{ 195{
196 if (unregister_chrdev(PCF8563_MAJOR, DEVICE_NAME) < 0) { 196 unregister_chrdev(PCF8563_MAJOR, DEVICE_NAME);
197 printk(KERN_INFO "%s: Unable to unregister device.\n", PCF8563_NAME);
198 }
199} 197}
200 198
201/* 199/*
diff --git a/arch/cris/arch-v32/drivers/pci/dma.c b/arch/cris/arch-v32/drivers/pci/dma.c
index 832fc63504d4..66f9500fbc02 100644
--- a/arch/cris/arch-v32/drivers/pci/dma.c
+++ b/arch/cris/arch-v32/drivers/pci/dma.c
@@ -91,14 +91,12 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
91 if (!mem_base) 91 if (!mem_base)
92 goto out; 92 goto out;
93 93
94 dev->dma_mem = kmalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL); 94 dev->dma_mem = kzalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL);
95 if (!dev->dma_mem) 95 if (!dev->dma_mem)
96 goto out; 96 goto out;
97 memset(dev->dma_mem, 0, sizeof(struct dma_coherent_mem)); 97 dev->dma_mem->bitmap = kzalloc(bitmap_size, GFP_KERNEL);
98 dev->dma_mem->bitmap = kmalloc(bitmap_size, GFP_KERNEL);
99 if (!dev->dma_mem->bitmap) 98 if (!dev->dma_mem->bitmap)
100 goto free1_out; 99 goto free1_out;
101 memset(dev->dma_mem->bitmap, 0, bitmap_size);
102 100
103 dev->dma_mem->virt_base = mem_base; 101 dev->dma_mem->virt_base = mem_base;
104 dev->dma_mem->device_base = device_addr; 102 dev->dma_mem->device_base = device_addr;
diff --git a/arch/cris/arch-v32/kernel/ptrace.c b/arch/cris/arch-v32/kernel/ptrace.c
index d4d57b741334..38ece0cd47cb 100644
--- a/arch/cris/arch-v32/kernel/ptrace.c
+++ b/arch/cris/arch-v32/kernel/ptrace.c
@@ -146,12 +146,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
146 /* Write the word at location address. */ 146 /* Write the word at location address. */
147 case PTRACE_POKETEXT: 147 case PTRACE_POKETEXT:
148 case PTRACE_POKEDATA: 148 case PTRACE_POKEDATA:
149 ret = 0; 149 ret = generic_ptrace_pokedata(child, addr, data);
150
151 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
152 break;
153
154 ret = -EIO;
155 break; 150 break;
156 151
157 /* Write the word at location address in the USER area. */ 152 /* Write the word at location address in the USER area. */
diff --git a/arch/cris/arch-v32/vmlinux.lds.S b/arch/cris/arch-v32/vmlinux.lds.S
index dfa25e1542b9..b076c134c0bb 100644
--- a/arch/cris/arch-v32/vmlinux.lds.S
+++ b/arch/cris/arch-v32/vmlinux.lds.S
@@ -49,7 +49,7 @@ SECTIONS
49 ___data_start = . ; 49 ___data_start = . ;
50 __Sdata = . ; 50 __Sdata = . ;
51 .data : { /* Data */ 51 .data : { /* Data */
52 *(.data) 52 DATA_DATA
53 } 53 }
54 __edata = . ; /* End of data section. */ 54 __edata = . ; /* End of data section. */
55 _edata = . ; 55 _edata = . ;
@@ -91,10 +91,7 @@ SECTIONS
91 } 91 }
92 SECURITY_INIT 92 SECURITY_INIT
93 93
94 . = ALIGN (8192); 94 PERCPU(8192)
95 __per_cpu_start = .;
96 .data.percpu : { *(.data.percpu) }
97 __per_cpu_end = .;
98 95
99#ifdef CONFIG_BLK_DEV_INITRD 96#ifdef CONFIG_BLK_DEV_INITRD
100 .init.ramfs : { 97 .init.ramfs : {
diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c
index c73e91f1299a..8672ab7d7978 100644
--- a/arch/cris/mm/fault.c
+++ b/arch/cris/mm/fault.c
@@ -179,6 +179,7 @@ do_page_fault(unsigned long address, struct pt_regs *regs,
179 struct mm_struct *mm; 179 struct mm_struct *mm;
180 struct vm_area_struct * vma; 180 struct vm_area_struct * vma;
181 siginfo_t info; 181 siginfo_t info;
182 int fault;
182 183
183 D(printk("Page fault for %lX on %X at %lX, prot %d write %d\n", 184 D(printk("Page fault for %lX on %X at %lX, prot %d write %d\n",
184 address, smp_processor_id(), instruction_pointer(regs), 185 address, smp_processor_id(), instruction_pointer(regs),
@@ -283,18 +284,18 @@ do_page_fault(unsigned long address, struct pt_regs *regs,
283 * the fault. 284 * the fault.
284 */ 285 */
285 286
286 switch (handle_mm_fault(mm, vma, address, writeaccess & 1)) { 287 fault = handle_mm_fault(mm, vma, address, writeaccess & 1);
287 case VM_FAULT_MINOR: 288 if (unlikely(fault & VM_FAULT_ERROR)) {
288 tsk->min_flt++; 289 if (fault & VM_FAULT_OOM)
289 break; 290 goto out_of_memory;
290 case VM_FAULT_MAJOR: 291 else if (fault & VM_FAULT_SIGBUS)
291 tsk->maj_flt++; 292 goto do_sigbus;
292 break; 293 BUG();
293 case VM_FAULT_SIGBUS:
294 goto do_sigbus;
295 default:
296 goto out_of_memory;
297 } 294 }
295 if (fault & VM_FAULT_MAJOR)
296 tsk->maj_flt++;
297 else
298 tsk->min_flt++;
298 299
299 up_read(&mm->mmap_sem); 300 up_read(&mm->mmap_sem);
300 return; 301 return;
diff --git a/arch/frv/Makefile b/arch/frv/Makefile
index 038e3a8457e0..9bf7345c5cc9 100644
--- a/arch/frv/Makefile
+++ b/arch/frv/Makefile
@@ -88,7 +88,7 @@ ASFLAGS += -mno-fdpic
88# make sure the .S files get compiled with debug info 88# make sure the .S files get compiled with debug info
89# and disable optimisations that are unhelpful whilst debugging 89# and disable optimisations that are unhelpful whilst debugging
90ifdef CONFIG_DEBUG_INFO 90ifdef CONFIG_DEBUG_INFO
91CFLAGS += -O1 91#CFLAGS += -O1
92AFLAGS += -Wa,--gdwarf2 92AFLAGS += -Wa,--gdwarf2
93ASFLAGS += -Wa,--gdwarf2 93ASFLAGS += -Wa,--gdwarf2
94endif 94endif
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S
index 43dc08ec7511..275673c192aa 100644
--- a/arch/frv/kernel/entry.S
+++ b/arch/frv/kernel/entry.S
@@ -1492,6 +1492,10 @@ sys_call_table:
1492 .long sys_move_pages 1492 .long sys_move_pages
1493 .long sys_getcpu 1493 .long sys_getcpu
1494 .long sys_epoll_pwait 1494 .long sys_epoll_pwait
1495 .long sys_utimensat /* 320 */
1496 .long sys_signalfd
1497 .long sys_timerfd
1498 .long sys_eventfd
1495 1499
1496 1500
1497syscall_table_size = (. - sys_call_table) 1501syscall_table_size = (. - sys_call_table)
diff --git a/arch/frv/kernel/gdb-stub.c b/arch/frv/kernel/gdb-stub.c
index 1e7a101cbf4c..e89cad1192a9 100644
--- a/arch/frv/kernel/gdb-stub.c
+++ b/arch/frv/kernel/gdb-stub.c
@@ -647,17 +647,11 @@ void debug_to_serial(const char *p, int n)
647} 647}
648#endif 648#endif
649 649
650#ifdef CONFIG_GDBSTUB_CONSOLE 650#ifdef CONFIG_GDB_CONSOLE
651
652static kdev_t gdbstub_console_dev(struct console *con)
653{
654 return MKDEV(1,3); /* /dev/null */
655}
656 651
657static struct console gdbstub_console = { 652static struct console gdbstub_console = {
658 .name = "gdb", 653 .name = "gdb",
659 .write = gdbstub_console_write, /* in break.S */ 654 .write = gdbstub_console_write, /* in break.S */
660 .device = gdbstub_console_dev,
661 .flags = CON_PRINTBUFFER, 655 .flags = CON_PRINTBUFFER,
662 .index = -1, 656 .index = -1,
663}; 657};
@@ -2021,7 +2015,7 @@ void __init gdbstub_init(void)
2021 ptr = mem2hex(gdbstub_banner, ptr, sizeof(gdbstub_banner) - 1, 0); 2015 ptr = mem2hex(gdbstub_banner, ptr, sizeof(gdbstub_banner) - 1, 0);
2022 gdbstub_send_packet(output_buffer); 2016 gdbstub_send_packet(output_buffer);
2023#endif 2017#endif
2024#if defined(CONFIG_GDBSTUB_CONSOLE) && defined(CONFIG_GDBSTUB_IMMEDIATE) 2018#if defined(CONFIG_GDB_CONSOLE) && defined(CONFIG_GDBSTUB_IMMEDIATE)
2025 register_console(&gdbstub_console); 2019 register_console(&gdbstub_console);
2026#endif 2020#endif
2027 2021
@@ -2031,7 +2025,7 @@ void __init gdbstub_init(void)
2031/* 2025/*
2032 * register the console at a more appropriate time 2026 * register the console at a more appropriate time
2033 */ 2027 */
2034#if defined (CONFIG_GDBSTUB_CONSOLE) && !defined(CONFIG_GDBSTUB_IMMEDIATE) 2028#if defined (CONFIG_GDB_CONSOLE) && !defined(CONFIG_GDBSTUB_IMMEDIATE)
2035static int __init gdbstub_postinit(void) 2029static int __init gdbstub_postinit(void)
2036{ 2030{
2037 printk("registering console\n"); 2031 printk("registering console\n");
diff --git a/arch/frv/kernel/ptrace.c b/arch/frv/kernel/ptrace.c
index ce88fb95ee59..709e9bdc6126 100644
--- a/arch/frv/kernel/ptrace.c
+++ b/arch/frv/kernel/ptrace.c
@@ -112,20 +112,12 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
112 switch (request) { 112 switch (request) {
113 /* when I and D space are separate, these will need to be fixed. */ 113 /* when I and D space are separate, these will need to be fixed. */
114 case PTRACE_PEEKTEXT: /* read word at location addr. */ 114 case PTRACE_PEEKTEXT: /* read word at location addr. */
115 case PTRACE_PEEKDATA: { 115 case PTRACE_PEEKDATA:
116 int copied;
117
118 ret = -EIO; 116 ret = -EIO;
119 if (is_user_addr_valid(child, addr, sizeof(tmp)) < 0) 117 if (is_user_addr_valid(child, addr, sizeof(tmp)) < 0)
120 break; 118 break;
121 119 ret = generic_ptrace_peekdata(child, addr, data);
122 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
123 if (copied != sizeof(tmp))
124 break;
125
126 ret = put_user(tmp,(unsigned long *) data);
127 break; 120 break;
128 }
129 121
130 /* read the word at location addr in the USER area. */ 122 /* read the word at location addr in the USER area. */
131 case PTRACE_PEEKUSR: { 123 case PTRACE_PEEKUSR: {
@@ -176,9 +168,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
176 ret = -EIO; 168 ret = -EIO;
177 if (is_user_addr_valid(child, addr, sizeof(tmp)) < 0) 169 if (is_user_addr_valid(child, addr, sizeof(tmp)) < 0)
178 break; 170 break;
179 if (access_process_vm(child, addr, &data, sizeof(data), 1) != sizeof(data)) 171 ret = generic_ptrace_pokedata(child, addr, data);
180 break;
181 ret = 0;
182 break; 172 break;
183 173
184 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 174 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
index aa3c795d5354..a74c08786b21 100644
--- a/arch/frv/kernel/setup.c
+++ b/arch/frv/kernel/setup.c
@@ -29,6 +29,7 @@
29#include <linux/serial.h> 29#include <linux/serial.h>
30#include <linux/serial_core.h> 30#include <linux/serial_core.h>
31#include <linux/serial_reg.h> 31#include <linux/serial_reg.h>
32#include <linux/serial_8250.h>
32 33
33#include <asm/setup.h> 34#include <asm/setup.h>
34#include <asm/irq.h> 35#include <asm/irq.h>
@@ -60,10 +61,6 @@ static void __init setup_linux_memory(void);
60static void __init setup_uclinux_memory(void); 61static void __init setup_uclinux_memory(void);
61#endif 62#endif
62 63
63#ifdef CONFIG_CONSOLE
64extern struct consw *conswitchp;
65#endif
66
67#ifdef CONFIG_MB93090_MB00 64#ifdef CONFIG_MB93090_MB00
68static char __initdata mb93090_banner[] = "FJ/RH FR-V Linux"; 65static char __initdata mb93090_banner[] = "FJ/RH FR-V Linux";
69static char __initdata mb93090_version[] = UTS_RELEASE; 66static char __initdata mb93090_version[] = UTS_RELEASE;
@@ -795,13 +792,6 @@ void __init setup_arch(char **cmdline_p)
795#endif 792#endif
796#endif 793#endif
797 794
798#if defined(CONFIG_CHR_DEV_FLASH) || defined(CONFIG_BLK_DEV_FLASH)
799 /* we need to initialize the Flashrom device here since we might
800 * do things with flash early on in the boot
801 */
802 flash_probe();
803#endif
804
805 /* deal with the command line - RedBoot may have passed one to the kernel */ 795 /* deal with the command line - RedBoot may have passed one to the kernel */
806 memcpy(command_line, boot_command_line, sizeof(command_line)); 796 memcpy(command_line, boot_command_line, sizeof(command_line));
807 *cmdline_p = &command_line[0]; 797 *cmdline_p = &command_line[0];
@@ -837,11 +827,6 @@ void __init setup_arch(char **cmdline_p)
837#endif 827#endif
838#endif 828#endif
839 829
840#ifdef CONFIG_BLK_DEV_BLKMEM
841 ROOT_DEV = MKDEV(BLKMEM_MAJOR,0);
842#endif
843 /*rom_length = (unsigned long)&_flashend - (unsigned long)&_romvec;*/
844
845#ifdef CONFIG_MMU 830#ifdef CONFIG_MMU
846 setup_linux_memory(); 831 setup_linux_memory();
847#else 832#else
diff --git a/arch/frv/kernel/vmlinux.lds.S b/arch/frv/kernel/vmlinux.lds.S
index 481dc1374640..3b71e0c86399 100644
--- a/arch/frv/kernel/vmlinux.lds.S
+++ b/arch/frv/kernel/vmlinux.lds.S
@@ -57,10 +57,7 @@ SECTIONS
57 __alt_instructions_end = .; 57 __alt_instructions_end = .;
58 .altinstr_replacement : { *(.altinstr_replacement) } 58 .altinstr_replacement : { *(.altinstr_replacement) }
59 59
60 . = ALIGN(4096); 60 PERCPU(4096)
61 __per_cpu_start = .;
62 .data.percpu : { *(.data.percpu) }
63 __per_cpu_end = .;
64 61
65#ifdef CONFIG_BLK_DEV_INITRD 62#ifdef CONFIG_BLK_DEV_INITRD
66 . = ALIGN(4096); 63 . = ALIGN(4096);
diff --git a/arch/frv/mm/fault.c b/arch/frv/mm/fault.c
index 3f12296c3688..6798fa0257b1 100644
--- a/arch/frv/mm/fault.c
+++ b/arch/frv/mm/fault.c
@@ -40,6 +40,7 @@ asmlinkage void do_page_fault(int datammu, unsigned long esr0, unsigned long ear
40 pud_t *pue; 40 pud_t *pue;
41 pte_t *pte; 41 pte_t *pte;
42 int write; 42 int write;
43 int fault;
43 44
44#if 0 45#if 0
45 const char *atxc[16] = { 46 const char *atxc[16] = {
@@ -162,18 +163,18 @@ asmlinkage void do_page_fault(int datammu, unsigned long esr0, unsigned long ear
162 * make sure we exit gracefully rather than endlessly redo 163 * make sure we exit gracefully rather than endlessly redo
163 * the fault. 164 * the fault.
164 */ 165 */
165 switch (handle_mm_fault(mm, vma, ear0, write)) { 166 fault = handle_mm_fault(mm, vma, ear0, write);
166 case VM_FAULT_MINOR: 167 if (unlikely(fault & VM_FAULT_ERROR)) {
167 current->min_flt++; 168 if (fault & VM_FAULT_OOM)
168 break; 169 goto out_of_memory;
169 case VM_FAULT_MAJOR: 170 else if (fault & VM_FAULT_SIGBUS)
170 current->maj_flt++; 171 goto do_sigbus;
171 break; 172 BUG();
172 case VM_FAULT_SIGBUS:
173 goto do_sigbus;
174 default:
175 goto out_of_memory;
176 } 173 }
174 if (fault & VM_FAULT_MAJOR)
175 current->maj_flt++;
176 else
177 current->min_flt++;
177 178
178 up_read(&mm->mmap_sem); 179 up_read(&mm->mmap_sem);
179 return; 180 return;
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 618dbad696f6..e35f74e6e505 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -68,6 +68,9 @@ config TIME_LOW_RES
68config NO_IOPORT 68config NO_IOPORT
69 def_bool y 69 def_bool y
70 70
71config NO_DMA
72 def_bool y
73
71config ISA 74config ISA
72 bool 75 bool
73 default y 76 default y
diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
index b2d896a7e598..53b5c1edf596 100644
--- a/arch/h8300/Makefile
+++ b/arch/h8300/Makefile
@@ -61,10 +61,11 @@ archmrproper:
61archclean: 61archclean:
62 $(Q)$(MAKE) $(clean)=$(boot) 62 $(Q)$(MAKE) $(clean)=$(boot)
63 63
64vmlinux.srec vmlinux.bin: vmlinux 64vmlinux.srec vmlinux.bin zImage: vmlinux
65 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ 65 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
66 66
67define archhelp 67define archhelp
68 echo 'vmlinux.bin - Create raw binary' 68 @echo 'vmlinux.bin - Create raw binary'
69 echo 'vmlinux.srec - Create srec binary' 69 @echo 'vmlinux.srec - Create srec binary'
70 @echo 'zImage - Compressed kernel image'
70endef 71endef
diff --git a/arch/h8300/boot/compressed/Makefile b/arch/h8300/boot/compressed/Makefile
index 71aac82a8ae0..d6189e057ed3 100644
--- a/arch/h8300/boot/compressed/Makefile
+++ b/arch/h8300/boot/compressed/Makefile
@@ -15,10 +15,10 @@ OBJECTS = $(obj)/head.o $(obj)/misc.o
15# in order to suppress error message. 15# in order to suppress error message.
16# 16#
17CONFIG_MEMORY_START ?= 0x00400000 17CONFIG_MEMORY_START ?= 0x00400000
18CONFIG_BOOT_LINK_OFFSET ?= 0x00400000 18CONFIG_BOOT_LINK_OFFSET ?= 0x00140000
19IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET)]) 19IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET)])
20 20
21LDFLAGS_vmlinux := -T $(obj)/vmlinux.lds 21LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -estartup $(obj)/vmlinux.lds
22 22
23$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE 23$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
24 $(call if_changed,ld) 24 $(call if_changed,ld)
diff --git a/arch/h8300/boot/compressed/head.S b/arch/h8300/boot/compressed/head.S
index b8e90d12d19e..985a81a2435a 100644
--- a/arch/h8300/boot/compressed/head.S
+++ b/arch/h8300/boot/compressed/head.S
@@ -4,7 +4,7 @@
4 * Copyright (C) 2006 Yoshinori Sato 4 * Copyright (C) 2006 Yoshinori Sato
5 */ 5 */
6 6
7.h8300h 7 .h8300h
8#include <linux/linkage.h> 8#include <linux/linkage.h>
9 9
10#define SRAM_START 0xff4000 10#define SRAM_START 0xff4000
diff --git a/arch/h8300/boot/compressed/vmlinux.lds b/arch/h8300/boot/compressed/vmlinux.lds
new file mode 100644
index 000000000000..65e2a0d1ae39
--- /dev/null
+++ b/arch/h8300/boot/compressed/vmlinux.lds
@@ -0,0 +1,32 @@
1SECTIONS
2{
3 .text :
4 {
5 __stext = . ;
6 __text = .;
7 *(.text.startup)
8 *(.text)
9 __etext = . ;
10 }
11
12 .rodata :
13 {
14 *(.rodata)
15 }
16 .data :
17
18 {
19 __sdata = . ;
20 ___data_start = . ;
21 *(.data.*)
22 }
23 .bss :
24 {
25 . = ALIGN(0x4) ;
26 __sbss = . ;
27 *(.bss*)
28 . = ALIGN(0x4) ;
29 __ebss = . ;
30 __end = . ;
31 }
32}
diff --git a/arch/h8300/boot/compressed/vmlinux.scr b/arch/h8300/boot/compressed/vmlinux.scr
new file mode 100644
index 000000000000..a0f6962736e9
--- /dev/null
+++ b/arch/h8300/boot/compressed/vmlinux.scr
@@ -0,0 +1,9 @@
1SECTIONS
2{
3 .data : {
4 _input_len = .;
5 LONG(_input_data_end - _input_data) _input_data = .;
6 *(.data)
7 _input_data_end = .;
8 }
9}
diff --git a/arch/h8300/kernel/Makefile b/arch/h8300/kernel/Makefile
index ccc1a7fbf94b..874f6aefee65 100644
--- a/arch/h8300/kernel/Makefile
+++ b/arch/h8300/kernel/Makefile
@@ -6,6 +6,7 @@ extra-y := vmlinux.lds
6 6
7obj-y := process.o traps.o ptrace.o irq.o \ 7obj-y := process.o traps.o ptrace.o irq.o \
8 sys_h8300.o time.o semaphore.o signal.o \ 8 sys_h8300.o time.o semaphore.o signal.o \
9 setup.o gpio.o init_task.o syscalls.o 9 setup.o gpio.o init_task.o syscalls.o \
10 entry.o
10 11
11obj-$(CONFIG_MODULES) += module.o h8300_ksyms.o 12obj-$(CONFIG_MODULES) += module.o h8300_ksyms.o
diff --git a/arch/h8300/platform/h8s/entry.S b/arch/h8300/kernel/entry.S
index f3d6b8e8f959..ca7431690300 100644
--- a/arch/h8300/platform/h8s/entry.S
+++ b/arch/h8300/kernel/entry.S
@@ -1,11 +1,10 @@
1/* -*- mode: asm -*- 1/* -*- mode: asm -*-
2 * 2 *
3 * linux/arch/h8300/platform/h8s/entry.S 3 * linux/arch/h8300/platform/h8300h/entry.S
4 * 4 *
5 * Yoshinori Sato <ysato@users.sourceforge.jp> 5 * Yoshinori Sato <ysato@users.sourceforge.jp>
6 * David McCullough <davidm@snapgear.com>
6 * 7 *
7 * fairly heavy changes to fix syscall args and signal processing
8 * by David McCullough <davidm@snapgear.com>
9 */ 8 */
10 9
11/* 10/*
@@ -23,13 +22,66 @@
23#include <asm/thread_info.h> 22#include <asm/thread_info.h>
24#include <asm/errno.h> 23#include <asm/errno.h>
25 24
25#if defined(CONFIG_CPU_H8300H)
26#define USERRET 8
27INTERRUPTS = 64
28 .h8300h
29 .macro SHLL2 reg
30 shll.l \reg
31 shll.l \reg
32 .endm
33 .macro SHLR2 reg
34 shlr.l \reg
35 shlr.l \reg
36 .endm
37 .macro SAVEREGS
38 mov.l er0,@-sp
39 mov.l er1,@-sp
40 mov.l er2,@-sp
41 mov.l er3,@-sp
42 .endm
43 .macro RESTOREREGS
44 mov.l @sp+,er3
45 mov.l @sp+,er2
46 .endm
47 .macro SAVEEXR
48 .endm
49 .macro RESTOREEXR
50 .endm
51#endif
52#if defined(CONFIG_CPU_H8S)
53#define USERRET 10
54#define USEREXR 8
55INTERRUPTS = 128
26 .h8300s 56 .h8300s
57 .macro SHLL2 reg
58 shll.l #2,\reg
59 .endm
60 .macro SHLR2 reg
61 shlr.l #2,\reg
62 .endm
63 .macro SAVEREGS
64 stm.l er0-er3,@-sp
65 .endm
66 .macro RESTOREREGS
67 ldm.l @sp+,er2-er3
68 .endm
69 .macro SAVEEXR
70 mov.w @(USEREXR:16,er0),r1
71 mov.w r1,@(LEXR-LER3:16,sp) /* copy EXR */
72 .endm
73 .macro RESTOREEXR
74 mov.w @(LEXR-LER1:16,sp),r1 /* restore EXR */
75 mov.b r1l,r1h
76 mov.w r1,@(USEREXR:16,er0)
77 .endm
78#endif
79
27 80
28/* CPU context save/restore macros. */ 81/* CPU context save/restore macros. */
29 82
30 .macro SAVE_ALL 83 .macro SAVE_ALL
31 mov.l er0,@-sp 84 mov.l er0,@-sp
32
33 stc ccr,r0l /* check kernel mode */ 85 stc ccr,r0l /* check kernel mode */
34 btst #4,r0l 86 btst #4,r0l
35 bne 5f 87 bne 5f
@@ -39,42 +91,38 @@
39 mov.l @sp,er0 /* restore saved er0 */ 91 mov.l @sp,er0 /* restore saved er0 */
40 orc #0x10,ccr /* switch kernel stack */ 92 orc #0x10,ccr /* switch kernel stack */
41 mov.l @SYMBOL_NAME(sw_ksp),sp 93 mov.l @SYMBOL_NAME(sw_ksp),sp
42 sub.l #(LRET-LORIG),sp /* allocate LORIG - LRET */ 94 sub.l #(LRET-LORIG),sp /* allocate LORIG - LRET */
43 stm.l er0-er3,@-sp 95 SAVEREGS
44 mov.l @SYMBOL_NAME(sw_usp),er0 96 mov.l @SYMBOL_NAME(sw_usp),er0
45 mov.l @(10:16,er0),er1 /* copy the RET addr */ 97 mov.l @(USERRET:16,er0),er1 /* copy the RET addr */
46 mov.l er1,@(LRET-LER3:16,sp) 98 mov.l er1,@(LRET-LER3:16,sp)
47 mov.w @(8:16,er0),r1 99 SAVEEXR
48 mov.w r1,@(LEXR-LER3:16,sp) /* copy EXR */
49 100
50 mov.w e1,r1 /* e1 highbyte = ccr */
51 and #0xef,r1h /* mask mode? flag */
52 sub.w r0,r0
53 mov.b r1h,r0l
54 mov.w r0,@(LCCR-LER3:16,sp) /* copy ccr */
55 mov.l @(LORIG-LER3:16,sp),er0 101 mov.l @(LORIG-LER3:16,sp),er0
56 mov.l er0,@(LER0-LER3:16,sp) /* copy ER0 */ 102 mov.l er0,@(LER0-LER3:16,sp) /* copy ER0 */
103 mov.w e1,r1 /* e1 highbyte = ccr */
104 and #0xef,r1h /* mask mode? flag */
57 bra 6f 105 bra 6f
585: 1065:
59 /* kernel mode */ 107 /* kernel mode */
60 mov.l @sp,er0 /* restore saved er0 */ 108 mov.l @sp,er0 /* restore saved er0 */
61 subs #2,sp /* set dummy ccr */ 109 subs #2,sp /* set dummy ccr */
62 stm.l er0-er3,@-sp 110 SAVEREGS
63 mov.w @(LRET-LER3:16,sp),r1 /* copy old ccr */ 111 mov.w @(LRET-LER3:16,sp),r1 /* copy old ccr */
1126:
64 mov.b r1h,r1l 113 mov.b r1h,r1l
65 mov.b #0,r1h 114 mov.b #0,r1h
66 mov.w r1,@(LCCR-LER3:16,sp) 115 mov.w r1,@(LCCR-LER3:16,sp) /* set ccr */
676:
68 mov.l er6,@-sp /* syscall arg #6 */ 116 mov.l er6,@-sp /* syscall arg #6 */
69 mov.l er5,@-sp /* syscall arg #5 */ 117 mov.l er5,@-sp /* syscall arg #5 */
70 mov.l er4,@-sp /* syscall arg #4 */ 118 mov.l er4,@-sp /* syscall arg #4 */
71 .endm 119 .endm /* r1 = ccr */
72 120
73 .macro RESTORE_ALL 121 .macro RESTORE_ALL
74 mov.l @sp+,er4 122 mov.l @sp+,er4
75 mov.l @sp+,er5 123 mov.l @sp+,er5
76 mov.l @sp+,er6 124 mov.l @sp+,er6
77 ldm.l @sp+,er2-er3 125 RESTOREREGS
78 mov.w @(LCCR-LER1:16,sp),r0 /* check kernel mode */ 126 mov.w @(LCCR-LER1:16,sp),r0 /* check kernel mode */
79 btst #4,r0l 127 btst #4,r0l
80 bne 7f 128 bne 7f
@@ -83,18 +131,16 @@
83 mov.l @SYMBOL_NAME(sw_usp),er0 131 mov.l @SYMBOL_NAME(sw_usp),er0
84 mov.l @(LER0-LER1:16,sp),er1 /* restore ER0 */ 132 mov.l @(LER0-LER1:16,sp),er1 /* restore ER0 */
85 mov.l er1,@er0 133 mov.l er1,@er0
86 mov.w @(LEXR-LER1:16,sp),r1 /* restore EXR */ 134 RESTOREEXR
87 mov.b r1l,r1h
88 mov.w r1,@(8:16,er0)
89 mov.w @(LCCR-LER1:16,sp),r1 /* restore the RET addr */ 135 mov.w @(LCCR-LER1:16,sp),r1 /* restore the RET addr */
90 mov.b r1l,r1h 136 mov.b r1l,r1h
91 mov.b @(LRET+1-LER1:16,sp),r1l 137 mov.b @(LRET+1-LER1:16,sp),r1l
92 mov.w r1,e1 138 mov.w r1,e1
93 mov.w @(LRET+2-LER1:16,sp),r1 139 mov.w @(LRET+2-LER1:16,sp),r1
94 mov.l er1,@(10:16,er0) 140 mov.l er1,@(USERRET:16,er0)
95 141
96 mov.l @sp+,er1 142 mov.l @sp+,er1
97 add.l #(LRET-LER1),sp /* remove LORIG - LRET */ 143 add.l #(LRET-LER1),sp /* remove LORIG - LRET */
98 mov.l sp,@SYMBOL_NAME(sw_ksp) 144 mov.l sp,@SYMBOL_NAME(sw_ksp)
99 andc #0xef,ccr /* switch to user mode */ 145 andc #0xef,ccr /* switch to user mode */
100 mov.l er0,sp 146 mov.l er0,sp
@@ -108,7 +154,7 @@
108 adds #4,sp /* remove the sw created LVEC */ 154 adds #4,sp /* remove the sw created LVEC */
109 rte 155 rte
110 .endm 156 .endm
111 157
112.globl SYMBOL_NAME(system_call) 158.globl SYMBOL_NAME(system_call)
113.globl SYMBOL_NAME(ret_from_exception) 159.globl SYMBOL_NAME(ret_from_exception)
114.globl SYMBOL_NAME(ret_from_fork) 160.globl SYMBOL_NAME(ret_from_fork)
@@ -116,16 +162,25 @@
116.globl SYMBOL_NAME(interrupt_redirect_table) 162.globl SYMBOL_NAME(interrupt_redirect_table)
117.globl SYMBOL_NAME(sw_ksp),SYMBOL_NAME(sw_usp) 163.globl SYMBOL_NAME(sw_ksp),SYMBOL_NAME(sw_usp)
118.globl SYMBOL_NAME(resume) 164.globl SYMBOL_NAME(resume)
119.globl SYMBOL_NAME(trace_break)
120.globl SYMBOL_NAME(interrupt_entry) 165.globl SYMBOL_NAME(interrupt_entry)
121 166.globl SYMBOL_NAME(trace_break)
122INTERRUPTS = 128 167
123#if defined(CONFIG_ROMKERNEL) 168#if defined(CONFIG_ROMKERNEL)
124 .section .int_redirect,"ax" 169 .section .int_redirect,"ax"
125SYMBOL_NAME_LABEL(interrupt_redirect_table) 170SYMBOL_NAME_LABEL(interrupt_redirect_table)
171#if defined(CONFIG_CPU_H8300H)
126 .rept 7 172 .rept 7
127 .long 0 173 .long 0
128 .endr 174 .endr
175#endif
176#if defined(CONFIG_CPU_H8S)
177 .rept 5
178 .long 0
179 .endr
180 jmp @SYMBOL_NAME(trace_break)
181 .long 0
182#endif
183
129 jsr @SYMBOL_NAME(interrupt_entry) /* NMI */ 184 jsr @SYMBOL_NAME(interrupt_entry) /* NMI */
130 jmp @SYMBOL_NAME(system_call) /* TRAPA #0 (System call) */ 185 jmp @SYMBOL_NAME(system_call) /* TRAPA #0 (System call) */
131 .long 0 186 .long 0
@@ -141,20 +196,20 @@ SYMBOL_NAME_LABEL(interrupt_redirect_table)
141SYMBOL_NAME_LABEL(interrupt_redirect_table) 196SYMBOL_NAME_LABEL(interrupt_redirect_table)
142 .space 4 197 .space 4
143#endif 198#endif
144 199
145 .section .text 200 .section .text
146 .align 2 201 .align 2
147SYMBOL_NAME_LABEL(interrupt_entry) 202SYMBOL_NAME_LABEL(interrupt_entry)
148 SAVE_ALL 203 SAVE_ALL
149 mov.w @(LCCR,sp),r0 204 mov.l sp,er0
150 btst #4,r0l 205 add.l #LVEC,er0
206 btst #4,r1l
151 bne 1f 207 bne 1f
208 /* user LVEC */
152 mov.l @SYMBOL_NAME(sw_usp),er0 209 mov.l @SYMBOL_NAME(sw_usp),er0
153 mov.l @(4:16,er0),er0 210 adds #4,er0
154 bra 2f
1551: 2111:
156 mov.l @(LVEC:16,sp),er0 212 mov.l @er0,er0 /* LVEC address */
1572:
158#if defined(CONFIG_ROMKERNEL) 213#if defined(CONFIG_ROMKERNEL)
159 sub.l #SYMBOL_NAME(interrupt_redirect_table),er0 214 sub.l #SYMBOL_NAME(interrupt_redirect_table),er0
160#endif 215#endif
@@ -162,69 +217,62 @@ SYMBOL_NAME_LABEL(interrupt_entry)
162 mov.l @SYMBOL_NAME(interrupt_redirect_table),er1 217 mov.l @SYMBOL_NAME(interrupt_redirect_table),er1
163 sub.l er1,er0 218 sub.l er1,er0
164#endif 219#endif
165 shlr.l #2,er0 220 SHLR2 er0
166 dec.l #1,er0 221 dec.l #1,er0
167 mov.l sp,er1 222 mov.l sp,er1
168 subs #4,er1 /* adjust ret_pc */ 223 subs #4,er1 /* adjust ret_pc */
169 jsr @SYMBOL_NAME(process_int) 224 jsr @SYMBOL_NAME(do_IRQ)
170 mov.l @SYMBOL_NAME(irq_stat)+CPUSTAT_SOFTIRQ_PENDING,er0 225 jmp @SYMBOL_NAME(ret_from_interrupt)
171 beq 1f
172 jsr @SYMBOL_NAME(do_softirq)
1731:
174 jmp @SYMBOL_NAME(ret_from_exception)
175 226
176SYMBOL_NAME_LABEL(system_call) 227SYMBOL_NAME_LABEL(system_call)
177 subs #4,sp /* dummy LVEC */ 228 subs #4,sp /* dummy LVEC */
178 SAVE_ALL 229 SAVE_ALL
230 andc #0x7f,ccr
179 mov.l er0,er4 231 mov.l er0,er4
180 mov.l #-ENOSYS,er0
181 mov.l er0,@(LER0:16,sp)
182 232
183 /* save top of frame */ 233 /* save top of frame */
184 mov.l sp,er0 234 mov.l sp,er0
185 jsr @SYMBOL_NAME(set_esp0) 235 jsr @SYMBOL_NAME(set_esp0)
186 cmp.l #NR_syscalls,er4
187 bcc SYMBOL_NAME(ret_from_exception):16
188 shll.l #2,er4
189 mov.l #SYMBOL_NAME(sys_call_table),er0
190 add.l er4,er0
191 mov.l @er0,er0
192 mov.l er0,er4
193 beq SYMBOL_NAME(ret_from_exception):16
194 mov.l sp,er2 236 mov.l sp,er2
195 and.w #0xe000,r2 237 and.w #0xe000,r2
196 mov.b @((TASK_FLAGS+3-(TIF_SYSCALL_TRACE >> 3)):16,er2),r2l 238 mov.b @((TI_FLAGS+3-(TIF_SYSCALL_TRACE >> 3)):16,er2),r2l
197 btst #(TIF_SYSCALL_TRACE & 7),r2l 239 btst #(TIF_SYSCALL_TRACE & 7),r2l
240 beq 1f
241 jsr @SYMBOL_NAME(do_syscall_trace)
2421:
243 cmp.l #NR_syscalls,er4
244 bcc badsys
245 SHLL2 er4
246 mov.l #SYMBOL_NAME(sys_call_table),er0
247 add.l er4,er0
248 mov.l @er0,er4
249 beq SYMBOL_NAME(ret_from_exception):16
198 mov.l @(LER1:16,sp),er0 250 mov.l @(LER1:16,sp),er0
199 mov.l @(LER2:16,sp),er1 251 mov.l @(LER2:16,sp),er1
200 mov.l @(LER3:16,sp),er2 252 mov.l @(LER3:16,sp),er2
201 andc #0x7f,ccr
202 jsr @er4 253 jsr @er4
203 mov.l er0,@(LER0:16,sp) /* save the return value */ 254 mov.l er0,@(LER0:16,sp) /* save the return value */
255 mov.l sp,er2
256 and.w #0xe000,r2
257 mov.b @((TI_FLAGS+3-(TIF_SYSCALL_TRACE >> 3)):16,er2),r2l
258 btst #(TIF_SYSCALL_TRACE & 7),r2l
259 beq 2f
260 jsr @SYMBOL_NAME(do_syscall_trace)
2612:
204#if defined(CONFIG_SYSCALL_PRINT) 262#if defined(CONFIG_SYSCALL_PRINT)
205 jsr @SYMBOL_NAME(syscall_print) 263 jsr @SYMBOL_NAME(syscall_print)
206#endif 264#endif
207 bra SYMBOL_NAME(ret_from_exception):8 265 orc #0x80,ccr
2081: 266 bra resume_userspace
209 jsr SYMBOL_NAME(syscall_trace)
210 mov.l @(LER1:16,sp),er0
211 mov.l @(LER2:16,sp),er1
212 mov.l @(LER3:16,sp),er2
213 jsr @er4
214 mov.l er0,@(LER0:16,sp) /* save the return value */
215 jsr @SYMBOL_NAME(syscall_trace)
216 bra SYMBOL_NAME(ret_from_exception):8
217 267
218SYMBOL_NAME_LABEL(ret_from_fork) 268badsys:
219 mov.l er2,er0 269 mov.l #-ENOSYS,er0
220 jsr @SYMBOL_NAME(schedule_tail) 270 mov.l er0,@(LER0:16,sp)
221 bra SYMBOL_NAME(ret_from_exception):8 271 bra resume_userspace
222 272
223SYMBOL_NAME_LABEL(reschedule) 273#if !defined(CONFIG_PREEMPT)
224 /* save top of frame */ 274#define resume_kernel restore_all
225 mov.l sp,er0 275#endif
226 jsr @SYMBOL_NAME(set_esp0)
227 jsr @SYMBOL_NAME(schedule)
228 276
229SYMBOL_NAME_LABEL(ret_from_exception) 277SYMBOL_NAME_LABEL(ret_from_exception)
230#if defined(CONFIG_PREEMPT) 278#if defined(CONFIG_PREEMPT)
@@ -232,58 +280,68 @@ SYMBOL_NAME_LABEL(ret_from_exception)
232#endif 280#endif
233SYMBOL_NAME_LABEL(ret_from_interrupt) 281SYMBOL_NAME_LABEL(ret_from_interrupt)
234 mov.b @(LCCR+1:16,sp),r0l 282 mov.b @(LCCR+1:16,sp),r0l
235 btst #4,r0l /* check if returning to kernel */ 283 btst #4,r0l
236 bne done:8 /* if so, skip resched, signals */ 284 bne resume_kernel:8 /* return from kernel */
285resume_userspace:
237 andc #0x7f,ccr 286 andc #0x7f,ccr
238 mov.l sp,er4 287 mov.l sp,er4
239 and.w #0xe000,r4 288 and.w #0xe000,r4 /* er4 <- current thread info */
240 mov.l @(TI_FLAGS:16,er4),er1 289 mov.l @(TI_FLAGS:16,er4),er1
241 and.l #_TIF_WORK_MASK,er1 290 and.l #_TIF_WORK_MASK,er1
242 beq done:8 291 beq restore_all:8
2431: 292work_pending:
244 mov.l @(TI_FLAGS:16,er4),er1
245 btst #TIF_NEED_RESCHED,r1l 293 btst #TIF_NEED_RESCHED,r1l
246 bne SYMBOL_NAME(reschedule):16 294 bne work_resched:8
295 /* work notifysig */
247 mov.l sp,er0 296 mov.l sp,er0
248 subs #4,er0 /* adjust retpc */ 297 subs #4,er0 /* er0: pt_regs */
249 mov.l er2,er1 298 jsr @SYMBOL_NAME(do_notify_resume)
250 jsr @SYMBOL_NAME(do_signal) 299 bra restore_all:8
300work_resched:
301 mov.l sp,er0
302 jsr @SYMBOL_NAME(set_esp0)
303 jsr @SYMBOL_NAME(schedule)
304 bra resume_userspace:8
305restore_all:
306 RESTORE_ALL /* Does RTE */
307
251#if defined(CONFIG_PREEMPT) 308#if defined(CONFIG_PREEMPT)
252 bra done:8 /* userspace thoru */ 309resume_kernel:
2533: 310 mov.l @(TI_PRE_COUNT:16,er4),er0
254 btst #4,r0l 311 bne restore_all:8
255 beq done:8 /* userspace thoru */ 312need_resched:
2564: 313 mov.l @(TI_FLAGS:16,er4),er0
257 mov.l @(TI_PRE_COUNT:16,er4),er1 314 btst #TIF_NEED_RESCHED,r0l
258 bne done:8 315 beq restore_all:8
259 mov.l @(TI_FLAGS:16,er4),er1 316 mov.b @(LCCR+1:16,sp),r0l /* Interrupt Enabled? */
260 btst #TIF_NEED_RESCHED,r1l 317 bmi restore_all:8
261 beq done:8 318 mov.l #PREEMPT_ACTIVE,er0
262 mov.b r0l,r0l 319 mov.l er0,@(TI_PRE_COUNT:16,er4)
263 bpl done:8 /* interrupt off (exception path?) */
264 mov.l #PREEMPT_ACTIVE,er1
265 mov.l er1,@(TI_PRE_COUNT:16,er4)
266 andc #0x7f,ccr 320 andc #0x7f,ccr
321 mov.l sp,er0
322 jsr @SYMBOL_NAME(set_esp0)
267 jsr @SYMBOL_NAME(schedule) 323 jsr @SYMBOL_NAME(schedule)
268 sub.l er1,er1
269 mov.l er1,@(TI_PRE_COUNT:16,er4)
270 orc #0x80,ccr 324 orc #0x80,ccr
271 bra 4b:8 325 bra need_resched:8
272#endif 326#endif
273done: 327
274 RESTORE_ALL /* Does RTE */ 328SYMBOL_NAME_LABEL(ret_from_fork)
329 mov.l er2,er0
330 jsr @SYMBOL_NAME(schedule_tail)
331 jmp @SYMBOL_NAME(ret_from_exception)
275 332
276SYMBOL_NAME_LABEL(resume) 333SYMBOL_NAME_LABEL(resume)
277 /* 334 /*
278 * er0 = prev 335 * Beware - when entering resume, offset of tss is in d1,
279 * er1 = next 336 * prev (the current task) is in a0, next (the new task)
280 * return last in er2 337 * is in a1 and d2.b is non-zero if the mm structure is
338 * shared between the tasks, so don't change these
339 * registers until their contents are no longer needed.
281 */ 340 */
282 341
283 /* save sr */ 342 /* save sr */
284 sub.w r3,r3 343 sub.w r3,r3
285 stc ccr,r3l 344 stc ccr,r3l
286 stc exr,r3h
287 mov.w r3,@(THREAD_CCR+2:16,er0) 345 mov.w r3,@(THREAD_CCR+2:16,er0)
288 346
289 /* disable interrupts */ 347 /* disable interrupts */
@@ -291,41 +349,45 @@ SYMBOL_NAME_LABEL(resume)
291 mov.l @SYMBOL_NAME(sw_usp),er3 349 mov.l @SYMBOL_NAME(sw_usp),er3
292 mov.l er3,@(THREAD_USP:16,er0) 350 mov.l er3,@(THREAD_USP:16,er0)
293 mov.l sp,@(THREAD_KSP:16,er0) 351 mov.l sp,@(THREAD_KSP:16,er0)
294 352
295 /* Skip address space switching if they are the same. */ 353 /* Skip address space switching if they are the same. */
296 /* FIXME: what did we hack out of here, this does nothing! */ 354 /* FIXME: what did we hack out of here, this does nothing! */
297 355
298 mov.l @(THREAD_USP:16,er1),er0 356 mov.l @(THREAD_USP:16,er1),er0
299 mov.l er0,@SYMBOL_NAME(sw_usp) 357 mov.l er0,@SYMBOL_NAME(sw_usp)
300 mov.l @(THREAD_KSP:16,er1),sp 358 mov.l @(THREAD_KSP:16,er1),sp
301 359
302 /* restore status register */ 360 /* restore status register */
303 mov.w @(THREAD_CCR+2:16,er1),r3 361 mov.w @(THREAD_CCR+2:16,er1),r3
304 362
305 ldc r3l,ccr 363 ldc r3l,ccr
306 ldc r3h,exr
307
308 rts 364 rts
309 365
310SYMBOL_NAME_LABEL(trace_break) 366SYMBOL_NAME_LABEL(trace_break)
311 subs #4,sp /* dummy LVEC */ 367 subs #4,sp
312 SAVE_ALL 368 SAVE_ALL
313 sub.l er1,er1 369 sub.l er1,er1
314 dec.l #1,er1 370 dec.l #1,er1
315 mov.l er1,@(LORIG,sp) 371 mov.l er1,@(LORIG,sp)
316 mov.l sp,er0 372 mov.l sp,er0
317 jsr @SYMBOL_NAME(set_esp0) 373 jsr @SYMBOL_NAME(set_esp0)
318 mov.l @SYMBOL_NAME(sw_usp),er0 374 mov.l @SYMBOL_NAME(sw_usp),er0
319 mov.l @er0,er1 375 mov.l @er0,er1
376 mov.w @(-2:16,er1),r2
377 cmp.w #0x5730,r2
378 beq 1f
320 subs #2,er1 379 subs #2,er1
321 mov.l er1,@er0 380 mov.l er1,@er0
3811:
322 and.w #0xff,e1 382 and.w #0xff,e1
323 mov.l er1,er0 383 mov.l er1,er0
324 jsr @SYMBOL_NAME(trace_trap) 384 jsr @SYMBOL_NAME(trace_trap)
325 jmp @SYMBOL_NAME(ret_from_exception) 385 jmp @SYMBOL_NAME(ret_from_exception)
326 386
327 .section .bss 387 .section .bss
328SYMBOL_NAME_LABEL(sw_ksp) 388SYMBOL_NAME_LABEL(sw_ksp)
329 .space 4 389 .space 4
330SYMBOL_NAME_LABEL(sw_usp) 390SYMBOL_NAME_LABEL(sw_usp)
331 .space 4 391 .space 4
392
393 .end
diff --git a/arch/h8300/kernel/ints.c b/arch/h8300/kernel/ints.c
deleted file mode 100644
index 3e4f479271c9..000000000000
--- a/arch/h8300/kernel/ints.c
+++ /dev/null
@@ -1,256 +0,0 @@
1/*
2 * linux/arch/h8300/kernel/ints.c
3 *
4 * Yoshinori Sato <ysato@users.sourceforge.jp>
5 *
6 * Based on linux/arch/$(ARCH)/platform/$(PLATFORM)/ints.c
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file COPYING in the main directory of this archive
10 * for more details.
11 *
12 * Copyright 1996 Roman Zippel
13 * Copyright 1999 D. Jeff Dionne <jeff@rt-control.com>
14 */
15
16#include <linux/module.h>
17#include <linux/types.h>
18#include <linux/kernel.h>
19#include <linux/sched.h>
20#include <linux/kernel_stat.h>
21#include <linux/seq_file.h>
22#include <linux/interrupt.h>
23#include <linux/init.h>
24#include <linux/random.h>
25#include <linux/bootmem.h>
26#include <linux/hardirq.h>
27
28#include <asm/system.h>
29#include <asm/irq.h>
30#include <asm/traps.h>
31#include <asm/io.h>
32#include <asm/setup.h>
33#include <asm/errno.h>
34
35/*
36 * This structure has only 4 elements for speed reasons
37 */
38typedef struct irq_handler {
39 irqreturn_t (*handler)(int, void *, struct pt_regs *);
40 int flags;
41 int count;
42 void *dev_id;
43 const char *devname;
44} irq_handler_t;
45
46static irq_handler_t *irq_list[NR_IRQS];
47static int use_kmalloc;
48
49extern unsigned long *interrupt_redirect_table;
50extern const int h8300_saved_vectors[];
51extern const unsigned long h8300_trap_table[];
52int h8300_enable_irq_pin(unsigned int irq);
53void h8300_disable_irq_pin(unsigned int irq);
54
55#define CPU_VECTOR ((unsigned long *)0x000000)
56#define ADDR_MASK (0xffffff)
57
58#if defined(CONFIG_RAMKERNEL)
59static unsigned long __init *get_vector_address(void)
60{
61 unsigned long *rom_vector = CPU_VECTOR;
62 unsigned long base,tmp;
63 int vec_no;
64
65 base = rom_vector[EXT_IRQ0] & ADDR_MASK;
66
67 /* check romvector format */
68 for (vec_no = EXT_IRQ1; vec_no <= EXT_IRQ0+EXT_IRQS; vec_no++) {
69 if ((base+(vec_no - EXT_IRQ0)*4) != (rom_vector[vec_no] & ADDR_MASK))
70 return NULL;
71 }
72
73 /* ramvector base address */
74 base -= EXT_IRQ0*4;
75
76 /* writerble check */
77 tmp = ~(*(volatile unsigned long *)base);
78 (*(volatile unsigned long *)base) = tmp;
79 if ((*(volatile unsigned long *)base) != tmp)
80 return NULL;
81 return (unsigned long *)base;
82}
83#endif
84
85void __init init_IRQ(void)
86{
87#if defined(CONFIG_RAMKERNEL)
88 int i;
89 unsigned long *ramvec,*ramvec_p;
90 const unsigned long *trap_entry;
91 const int *saved_vector;
92
93 ramvec = get_vector_address();
94 if (ramvec == NULL)
95 panic("interrupt vector serup failed.");
96 else
97 printk(KERN_INFO "virtual vector at 0x%08lx\n",(unsigned long)ramvec);
98
99 /* create redirect table */
100 ramvec_p = ramvec;
101 trap_entry = h8300_trap_table;
102 saved_vector = h8300_saved_vectors;
103 for ( i = 0; i < NR_IRQS; i++) {
104 if (i == *saved_vector) {
105 ramvec_p++;
106 saved_vector++;
107 } else {
108 if ( i < NR_TRAPS ) {
109 if (*trap_entry)
110 *ramvec_p = VECTOR(*trap_entry);
111 ramvec_p++;
112 trap_entry++;
113 } else
114 *ramvec_p++ = REDIRECT(interrupt_entry);
115 }
116 }
117 interrupt_redirect_table = ramvec;
118#ifdef DUMP_VECTOR
119 ramvec_p = ramvec;
120 for (i = 0; i < NR_IRQS; i++) {
121 if ((i % 8) == 0)
122 printk(KERN_DEBUG "\n%p: ",ramvec_p);
123 printk(KERN_DEBUG "%p ",*ramvec_p);
124 ramvec_p++;
125 }
126 printk(KERN_DEBUG "\n");
127#endif
128#endif
129}
130
131int request_irq(unsigned int irq,
132 irqreturn_t (*handler)(int, void *, struct pt_regs *),
133 unsigned long flags, const char *devname, void *dev_id)
134{
135 irq_handler_t *irq_handle;
136 if (irq < 0 || irq >= NR_IRQS) {
137 printk(KERN_ERR "Incorrect IRQ %d from %s\n", irq, devname);
138 return -EINVAL;
139 }
140
141 if (irq_list[irq] || (h8300_enable_irq_pin(irq) == -EBUSY))
142 return -EBUSY;
143
144 if (use_kmalloc)
145 irq_handle = kmalloc(sizeof(irq_handler_t), GFP_ATOMIC);
146 else {
147 /* use bootmem allocater */
148 irq_handle = (irq_handler_t *)alloc_bootmem(sizeof(irq_handler_t));
149 irq_handle = (irq_handler_t *)((unsigned long)irq_handle | 0x80000000);
150 }
151
152 if (irq_handle == NULL)
153 return -ENOMEM;
154
155 irq_handle->handler = handler;
156 irq_handle->flags = flags;
157 irq_handle->count = 0;
158 irq_handle->dev_id = dev_id;
159 irq_handle->devname = devname;
160 irq_list[irq] = irq_handle;
161
162 if (irq_handle->flags & IRQF_SAMPLE_RANDOM)
163 rand_initialize_irq(irq);
164
165 enable_irq(irq);
166 return 0;
167}
168
169EXPORT_SYMBOL(request_irq);
170
171void free_irq(unsigned int irq, void *dev_id)
172{
173 if (irq >= NR_IRQS)
174 return;
175
176 if (!irq_list[irq] || irq_list[irq]->dev_id != dev_id)
177 printk(KERN_WARNING "Removing probably wrong IRQ %d from %s\n",
178 irq, irq_list[irq]->devname);
179 disable_irq(irq);
180 h8300_disable_irq_pin(irq);
181 if (((unsigned long)irq_list[irq] & 0x80000000) == 0) {
182 kfree(irq_list[irq]);
183 irq_list[irq] = NULL;
184 }
185}
186
187EXPORT_SYMBOL(free_irq);
188
189/*
190 * Do we need these probe functions on the m68k?
191 */
192unsigned long probe_irq_on (void)
193{
194 return 0;
195}
196
197EXPORT_SYMBOL(probe_irq_on);
198
199int probe_irq_off (unsigned long irqs)
200{
201 return 0;
202}
203
204EXPORT_SYMBOL(probe_irq_off);
205
206void enable_irq(unsigned int irq)
207{
208 if (irq >= EXT_IRQ0 && irq <= (EXT_IRQ0 + EXT_IRQS))
209 IER_REGS |= 1 << (irq - EXT_IRQ0);
210}
211
212void disable_irq(unsigned int irq)
213{
214 if (irq >= EXT_IRQ0 && irq <= (EXT_IRQ0 + EXT_IRQS))
215 IER_REGS &= ~(1 << (irq - EXT_IRQ0));
216}
217
218asmlinkage void process_int(int irq, struct pt_regs *fp)
219{
220 irq_enter();
221 h8300_clear_isr(irq);
222 if (irq >= NR_TRAPS && irq < NR_IRQS) {
223 if (irq_list[irq]) {
224 irq_list[irq]->handler(irq, irq_list[irq]->dev_id, fp);
225 irq_list[irq]->count++;
226 if (irq_list[irq]->flags & IRQF_SAMPLE_RANDOM)
227 add_interrupt_randomness(irq);
228 }
229 } else {
230 BUG();
231 }
232 irq_exit();
233}
234
235int show_interrupts(struct seq_file *p, void *v)
236{
237 int i = *(loff_t *) v;
238
239 if ((i < NR_IRQS) && (irq_list[i]!=NULL)) {
240 seq_printf(p, "%3d: %10u ",i,irq_list[i]->count);
241 seq_printf(p, "%s\n", irq_list[i]->devname);
242 }
243
244 return 0;
245}
246
247void init_irq_proc(void)
248{
249}
250
251static int __init enable_kmalloc(void)
252{
253 use_kmalloc = 1;
254 return 0;
255}
256core_initcall(enable_kmalloc);
diff --git a/arch/h8300/kernel/ptrace.c b/arch/h8300/kernel/ptrace.c
index 8f2411db7eaf..d32bbf02fc48 100644
--- a/arch/h8300/kernel/ptrace.c
+++ b/arch/h8300/kernel/ptrace.c
@@ -111,10 +111,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
111 /* when I and D space are separate, this will have to be fixed. */ 111 /* when I and D space are separate, this will have to be fixed. */
112 case PTRACE_POKETEXT: /* write the word at location addr. */ 112 case PTRACE_POKETEXT: /* write the word at location addr. */
113 case PTRACE_POKEDATA: 113 case PTRACE_POKEDATA:
114 ret = 0; 114 ret = generic_ptrace_pokedata(child, addr, data);
115 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
116 break;
117 ret = -EIO;
118 break; 115 break;
119 116
120 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 117 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
@@ -219,7 +216,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
219 return ret; 216 return ret;
220} 217}
221 218
222asmlinkage void syscall_trace(void) 219asmlinkage void do_syscall_trace(void)
223{ 220{
224 if (!test_thread_flag(TIF_SYSCALL_TRACE)) 221 if (!test_thread_flag(TIF_SYSCALL_TRACE))
225 return; 222 return;
diff --git a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c
index 02955604d760..62ea12d339b9 100644
--- a/arch/h8300/kernel/signal.c
+++ b/arch/h8300/kernel/signal.c
@@ -547,3 +547,9 @@ asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset)
547 } 547 }
548 return 0; 548 return 0;
549} 549}
550
551asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags)
552{
553 if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
554 do_signal(regs, NULL);
555}
diff --git a/arch/h8300/platform/h8300h/Makefile b/arch/h8300/platform/h8300h/Makefile
index b24ea08aa0a7..c5096369ea50 100644
--- a/arch/h8300/platform/h8300h/Makefile
+++ b/arch/h8300/platform/h8300h/Makefile
@@ -4,4 +4,4 @@
4# Reuse any files we can from the H8/300H 4# Reuse any files we can from the H8/300H
5# 5#
6 6
7obj-y := entry.o irq_pin.o ptrace_h8300h.o 7obj-y := irq_pin.o ptrace_h8300h.o
diff --git a/arch/h8300/platform/h8300h/entry.S b/arch/h8300/platform/h8300h/entry.S
deleted file mode 100644
index f86ac3b5d4de..000000000000
--- a/arch/h8300/platform/h8300h/entry.S
+++ /dev/null
@@ -1,332 +0,0 @@
1/* -*- mode: asm -*-
2 *
3 * linux/arch/h8300/platform/h8300h/entry.S
4 *
5 * Yoshinori Sato <ysato@users.sourceforge.jp>
6 * David McCullough <davidm@snapgear.com>
7 *
8 */
9
10/*
11 * entry.S
12 * include exception/interrupt gateway
13 * system call entry
14 */
15
16#include <linux/sys.h>
17#include <asm/unistd.h>
18#include <asm/setup.h>
19#include <asm/segment.h>
20#include <asm/linkage.h>
21#include <asm/asm-offsets.h>
22#include <asm/thread_info.h>
23#include <asm/errno.h>
24
25 .h8300h
26
27/* CPU context save/restore macros. */
28
29 .macro SAVE_ALL
30 mov.l er0,@-sp
31
32 stc ccr,r0l /* check kernel mode */
33 btst #4,r0l
34 bne 5f
35
36 mov.l sp,@SYMBOL_NAME(sw_usp) /* user mode */
37 mov.l @sp,er0
38 orc #0x10,ccr
39 mov.l @SYMBOL_NAME(sw_ksp),sp
40 sub.l #(LRET-LORIG),sp /* allocate LORIG - LRET */
41 mov.l er0,@-sp
42 mov.l er1,@-sp
43 mov.l @SYMBOL_NAME(sw_usp),er0
44 mov.l @(8:16,er0),er1 /* copy the RET addr */
45 mov.l er1,@(LRET-LER1:16,sp)
46
47 mov.w e1,r1 /* e1 highbyte = ccr */
48 and #0xef,r1h /* mask mode? flag */
49 sub.w r0,r0
50 mov.b r1h,r0l
51 mov.w r0,@(LCCR-LER1:16,sp) /* copy ccr */
52 mov.l @(LORIG-LER1:16,sp),er0
53 mov.l er0,@(LER0-LER1:16,sp) /* copy ER0 */
54 bra 6f
555:
56 mov.l @sp,er0 /* kernel mode */
57 subs #2,sp /* dummy ccr */
58 mov.l er0,@-sp
59 mov.l er1,@-sp
60 mov.w @(LRET-LER1:16,sp),r1 /* copy old ccr */
61 mov.b r1h,r1l
62 mov.b #0,r1h
63 mov.w r1,@(LCCR-LER1:16,sp) /* set ccr */
646:
65 mov.l er2,@-sp
66 mov.l er3,@-sp
67 mov.l er6,@-sp /* syscall arg #6 */
68 mov.l er5,@-sp /* syscall arg #5 */
69 mov.l er4,@-sp /* syscall arg #4 */
70 .endm
71
72 .macro RESTORE_ALL
73 mov.l @sp+,er4
74 mov.l @sp+,er5
75 mov.l @sp+,er6
76 mov.l @sp+,er3
77 mov.l @sp+,er2
78 mov.w @(LCCR-LER1:16,sp),r0 /* check kernel mode */
79 btst #4,r0l
80 bne 7f
81
82 orc #0x80,ccr
83 mov.l @SYMBOL_NAME(sw_usp),er0
84 mov.l @(LER0-LER1:16,sp),er1 /* restore ER0 */
85 mov.l er1,@er0
86 mov.w @(LCCR-LER1:16,sp),r1 /* restore the RET addr */
87 mov.b r1l,r1h
88 mov.b @(LRET+1-LER1:16,sp),r1l
89 mov.w r1,e1
90 mov.w @(LRET+2-LER1:16,sp),r1
91 mov.l er1,@(8:16,er0)
92
93 mov.l @sp+,er1
94 add.l #(LRET-LER1),sp /* remove LORIG - LRET */
95 mov.l sp,@SYMBOL_NAME(sw_ksp)
96 mov.l er0,sp
97 bra 8f
987:
99 mov.l @sp+,er1
100 adds #4,sp
101 adds #2,sp
1028:
103 mov.l @sp+,er0
104 adds #4,sp /* remove the sw created LVEC */
105 rte
106 .endm
107
108.globl SYMBOL_NAME(system_call)
109.globl SYMBOL_NAME(ret_from_exception)
110.globl SYMBOL_NAME(ret_from_fork)
111.globl SYMBOL_NAME(ret_from_interrupt)
112.globl SYMBOL_NAME(interrupt_redirect_table)
113.globl SYMBOL_NAME(sw_ksp),SYMBOL_NAME(sw_usp)
114.globl SYMBOL_NAME(resume)
115.globl SYMBOL_NAME(interrupt_redirect_table)
116.globl SYMBOL_NAME(interrupt_entry)
117.globl SYMBOL_NAME(system_call)
118.globl SYMBOL_NAME(trace_break)
119
120#if defined(CONFIG_ROMKERNEL)
121INTERRUPTS = 64
122 .section .int_redirect,"ax"
123SYMBOL_NAME_LABEL(interrupt_redirect_table)
124 .rept 7
125 .long 0
126 .endr
127 jsr @SYMBOL_NAME(interrupt_entry) /* NMI */
128 jmp @SYMBOL_NAME(system_call) /* TRAPA #0 (System call) */
129 .long 0
130 .long 0
131 jmp @SYMBOL_NAME(trace_break) /* TRAPA #3 (breakpoint) */
132 .rept INTERRUPTS-12
133 jsr @SYMBOL_NAME(interrupt_entry)
134 .endr
135#endif
136#if defined(CONFIG_RAMKERNEL)
137.globl SYMBOL_NAME(interrupt_redirect_table)
138 .section .bss
139SYMBOL_NAME_LABEL(interrupt_redirect_table)
140 .space 4
141#endif
142
143 .section .text
144 .align 2
145SYMBOL_NAME_LABEL(interrupt_entry)
146 SAVE_ALL
147 mov.w @(LCCR,sp),r0
148 btst #4,r0l
149 bne 1f
150 mov.l @SYMBOL_NAME(sw_usp),er0
151 mov.l @(4:16,er0),er0
152 bra 2f
1531:
154 mov.l @(LVEC,sp),er0
1552:
156#if defined(CONFIG_ROMKERNEL)
157 sub.l #SYMBOL_NAME(interrupt_redirect_table),er0
158#endif
159#if defined(CONFIG_RAMKERNEL)
160 mov.l @SYMBOL_NAME(interrupt_redirect_table),er1
161 sub.l er1,er0
162#endif
163 shlr.l er0
164 shlr.l er0
165 dec.l #1,er0
166 mov.l sp,er1
167 subs #4,er1 /* adjust ret_pc */
168 jsr @SYMBOL_NAME(do_IRQ)
169 mov.l @SYMBOL_NAME(irq_stat)+CPUSTAT_SOFTIRQ_PENDING,er0
170 beq 1f
171 jsr @SYMBOL_NAME(do_softirq)
1721:
173 jmp @SYMBOL_NAME(ret_from_interrupt)
174
175SYMBOL_NAME_LABEL(system_call)
176 subs #4,sp /* dummy LVEC */
177 SAVE_ALL
178 mov.w @(LCCR:16,sp),r1
179 bset #4,r1l
180 ldc r1l,ccr
181 mov.l er0,er4
182 mov.l #-ENOSYS,er0
183 mov.l er0,@(LER0:16,sp)
184
185 /* save top of frame */
186 mov.l sp,er0
187 jsr @SYMBOL_NAME(set_esp0)
188 cmp.l #NR_syscalls,er4
189 bcc SYMBOL_NAME(ret_from_exception):16
190 shll.l er4
191 shll.l er4
192 mov.l #SYMBOL_NAME(sys_call_table),er0
193 add.l er4,er0
194 mov.l @er0,er4
195 beq SYMBOL_NAME(ret_from_exception):16
196 mov.l sp,er2
197 and.w #0xe000,r2
198 mov.b @((TASK_FLAGS+3-(TIF_SYSCALL_TRACE >> 3)):16,er2),r2l
199 btst #(TIF_SYSCALL_TRACE & 7),r2l
200 bne 1f
201 mov.l @(LER1:16,sp),er0
202 mov.l @(LER2:16,sp),er1
203 mov.l @(LER3:16,sp),er2
204 jsr @er4
205 mov.l er0,@(LER0:16,sp) /* save the return value */
206#if defined(CONFIG_SYSCALL_PRINT)
207 jsr @SYMBOL_NAME(syscall_print)
208#endif
209 bra SYMBOL_NAME(ret_from_exception):8
2101:
211 jsr SYMBOL_NAME(syscall_trace)
212 mov.l @(LER1:16,sp),er0
213 mov.l @(LER2:16,sp),er1
214 mov.l @(LER3:16,sp),er2
215 jsr @er4
216 mov.l er0,@(LER0:16,sp) /* save the return value */
217 jsr @SYMBOL_NAME(syscall_trace)
218 bra SYMBOL_NAME(ret_from_exception):8
219
220SYMBOL_NAME_LABEL(ret_from_fork)
221 mov.l er2,er0
222 jsr @SYMBOL_NAME(schedule_tail)
223 bra SYMBOL_NAME(ret_from_exception):8
224
225SYMBOL_NAME_LABEL(reschedule)
226 /* save top of frame */
227 mov.l sp,er0
228 jsr @SYMBOL_NAME(set_esp0)
229 jsr @SYMBOL_NAME(schedule)
230
231SYMBOL_NAME_LABEL(ret_from_exception)
232#if defined(CONFIG_PREEMPT)
233 orc #0x80,ccr
234#endif
235SYMBOL_NAME_LABEL(ret_from_interrupt)
236 mov.b @(LCCR+1:16,sp),r0l
237 btst #4,r0l /* check if returning to kernel */
238 bne done:8 /* if so, skip resched, signals */
239 andc #0x7f,ccr
240 mov.l sp,er4
241 and.w #0xe000,r4
242 mov.l @(TI_FLAGS:16,er4),er1
243 and.l #_TIF_WORK_MASK,er1
244 beq done:8
2451:
246 mov.l @(TI_FLAGS:16,er4),er1
247 btst #TIF_NEED_RESCHED,r1l
248 bne SYMBOL_NAME(reschedule):16
249 mov.l sp,er0
250 subs #4,er0 /* adjust retpc */
251 mov.l er2,er1
252 jsr @SYMBOL_NAME(do_signal)
253#if defined(CONFIG_PREEMPT)
254 bra done:8 /* userspace thoru */
2553:
256 btst #4,r0l
257 beq done:8 /* userspace thoru */
2584:
259 mov.l @(TI_PRE_COUNT:16,er4),er1
260 bne done:8
261 mov.l @(TI_FLAGS:16,er4),er1
262 btst #TIF_NEED_RESCHED,r1l
263 beq done:8
264 mov.b r0l,r0l
265 bpl done:8 /* interrupt off (exception path?) */
266 mov.l #PREEMPT_ACTIVE,er1
267 mov.l er1,@(TI_PRE_COUNT:16,er4)
268 andc #0x7f,ccr
269 jsr @SYMBOL_NAME(schedule)
270 sub.l er1,er1
271 mov.l er1,@(TI_PRE_COUNT:16,er4)
272 orc #0x80,ccr
273 bra 4b:8
274#endif
275done:
276 RESTORE_ALL /* Does RTE */
277
278SYMBOL_NAME_LABEL(resume)
279 /*
280 * Beware - when entering resume, offset of tss is in d1,
281 * prev (the current task) is in a0, next (the new task)
282 * is in a1 and d2.b is non-zero if the mm structure is
283 * shared between the tasks, so don't change these
284 * registers until their contents are no longer needed.
285 */
286
287 /* save sr */
288 sub.w r3,r3
289 stc ccr,r3l
290 mov.w r3,@(THREAD_CCR+2:16,er0)
291
292 /* disable interrupts */
293 orc #0x80,ccr
294 mov.l @SYMBOL_NAME(sw_usp),er3
295 mov.l er3,@(THREAD_USP:16,er0)
296 mov.l sp,@(THREAD_KSP:16,er0)
297
298 /* Skip address space switching if they are the same. */
299 /* FIXME: what did we hack out of here, this does nothing! */
300
301 mov.l @(THREAD_USP:16,er1),er0
302 mov.l er0,@SYMBOL_NAME(sw_usp)
303 mov.l @(THREAD_KSP:16,er1),sp
304
305 /* restore status register */
306 mov.w @(THREAD_CCR+2:16,er1),r3
307
308 ldc r3l,ccr
309 rts
310
311SYMBOL_NAME_LABEL(trace_break)
312 subs #4,sp
313 SAVE_ALL
314 sub.l er1,er1
315 dec.l #1,er1
316 mov.l er1,@(LORIG,sp)
317 mov.l sp,er0
318 jsr @SYMBOL_NAME(set_esp0)
319 mov.l @SYMBOL_NAME(sw_usp),er0
320 mov.l @er0,er1
321 subs #2,er1
322 mov.l er1,@er0
323 and.w #0xff,e1
324 mov.l er1,er0
325 jsr @SYMBOL_NAME(trace_trap)
326 jmp @SYMBOL_NAME(ret_from_exception)
327
328 .section .bss
329SYMBOL_NAME_LABEL(sw_ksp)
330 .space 4
331SYMBOL_NAME_LABEL(sw_usp)
332 .space 4
diff --git a/arch/h8300/platform/h8s/Makefile b/arch/h8300/platform/h8s/Makefile
index 0847b15d4256..bf1241883766 100644
--- a/arch/h8300/platform/h8s/Makefile
+++ b/arch/h8300/platform/h8s/Makefile
@@ -4,4 +4,4 @@
4# Reuse any files we can from the H8S 4# Reuse any files we can from the H8S
5# 5#
6 6
7obj-y := entry.o ints_h8s.o ptrace_h8s.o 7obj-y := ints_h8s.o ptrace_h8s.o
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index 8770a5d0b143..abb582bc218f 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -18,6 +18,10 @@ config GENERIC_TIME
18 bool 18 bool
19 default y 19 default y
20 20
21config GENERIC_CMOS_UPDATE
22 bool
23 default y
24
21config CLOCKSOURCE_WATCHDOG 25config CLOCKSOURCE_WATCHDOG
22 bool 26 bool
23 default y 27 default y
@@ -222,6 +226,8 @@ config PARAVIRT
222 However, when run without a hypervisor the kernel is 226 However, when run without a hypervisor the kernel is
223 theoretically slower. If in doubt, say N. 227 theoretically slower. If in doubt, say N.
224 228
229source "arch/i386/xen/Kconfig"
230
225config VMI 231config VMI
226 bool "VMI Paravirt-ops support" 232 bool "VMI Paravirt-ops support"
227 depends on PARAVIRT 233 depends on PARAVIRT
@@ -441,8 +447,8 @@ config X86_REBOOTFIXUPS
441 this config is intended, is when reboot ends with a stalled/hung 447 this config is intended, is when reboot ends with a stalled/hung
442 system. 448 system.
443 449
444 Currently, the only fixup is for the Geode GX1/CS5530A/TROM2.1. 450 Currently, the only fixup is for the Geode machines using
445 combination. 451 CS5530A and CS5536 chipsets.
446 452
447 Say Y if you want to enable the fixup. Currently, it's safe to 453 Say Y if you want to enable the fixup. Currently, it's safe to
448 enable this option even if you don't need it. 454 enable this option even if you don't need it.
@@ -541,7 +547,8 @@ config HIGHMEM4G
541 547
542config HIGHMEM64G 548config HIGHMEM64G
543 bool "64GB" 549 bool "64GB"
544 depends on X86_CMPXCHG64 550 depends on !M386 && !M486
551 select X86_PAE
545 help 552 help
546 Select this if you have a 32-bit processor and more than 4 553 Select this if you have a 32-bit processor and more than 4
547 gigabytes of physical RAM. 554 gigabytes of physical RAM.
@@ -571,12 +578,12 @@ choice
571 config VMSPLIT_3G 578 config VMSPLIT_3G
572 bool "3G/1G user/kernel split" 579 bool "3G/1G user/kernel split"
573 config VMSPLIT_3G_OPT 580 config VMSPLIT_3G_OPT
574 depends on !HIGHMEM 581 depends on !X86_PAE
575 bool "3G/1G user/kernel split (for full 1G low memory)" 582 bool "3G/1G user/kernel split (for full 1G low memory)"
576 config VMSPLIT_2G 583 config VMSPLIT_2G
577 bool "2G/2G user/kernel split" 584 bool "2G/2G user/kernel split"
578 config VMSPLIT_2G_OPT 585 config VMSPLIT_2G_OPT
579 depends on !HIGHMEM 586 depends on !X86_PAE
580 bool "2G/2G user/kernel split (for full 2G low memory)" 587 bool "2G/2G user/kernel split (for full 2G low memory)"
581 config VMSPLIT_1G 588 config VMSPLIT_1G
582 bool "1G/3G user/kernel split" 589 bool "1G/3G user/kernel split"
@@ -596,10 +603,15 @@ config HIGHMEM
596 default y 603 default y
597 604
598config X86_PAE 605config X86_PAE
599 bool 606 bool "PAE (Physical Address Extension) Support"
600 depends on HIGHMEM64G 607 default n
601 default y 608 depends on !HIGHMEM4G
602 select RESOURCES_64BIT 609 select RESOURCES_64BIT
610 help
611 PAE is required for NX support, and furthermore enables
612 larger swapspace support for non-overcommit purposes. It
613 has the cost of more pagetable lookup overhead, and also
614 consumes more pagetable space per process.
603 615
604# Common NUMA Features 616# Common NUMA Features
605config NUMA 617config NUMA
@@ -815,6 +827,7 @@ config CRASH_DUMP
815 827
816config PHYSICAL_START 828config PHYSICAL_START
817 hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP) 829 hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
830 default "0x1000000" if X86_NUMAQ
818 default "0x100000" 831 default "0x100000"
819 help 832 help
820 This gives the physical address where the kernel is loaded. 833 This gives the physical address where the kernel is loaded.
@@ -1212,21 +1225,26 @@ source "drivers/Kconfig"
1212 1225
1213source "fs/Kconfig" 1226source "fs/Kconfig"
1214 1227
1215menu "Instrumentation Support" 1228menuconfig INSTRUMENTATION
1229 bool "Instrumentation Support"
1216 depends on EXPERIMENTAL 1230 depends on EXPERIMENTAL
1231 default y
1232
1233if INSTRUMENTATION
1217 1234
1218source "arch/i386/oprofile/Kconfig" 1235source "arch/i386/oprofile/Kconfig"
1219 1236
1220config KPROBES 1237config KPROBES
1221 bool "Kprobes (EXPERIMENTAL)" 1238 bool "Kprobes"
1222 depends on KALLSYMS && EXPERIMENTAL && MODULES 1239 depends on KALLSYMS && MODULES
1223 help 1240 help
1224 Kprobes allows you to trap at almost any kernel address and 1241 Kprobes allows you to trap at almost any kernel address and
1225 execute a callback function. register_kprobe() establishes 1242 execute a callback function. register_kprobe() establishes
1226 a probepoint and specifies the callback. Kprobes is useful 1243 a probepoint and specifies the callback. Kprobes is useful
1227 for kernel debugging, non-intrusive instrumentation and testing. 1244 for kernel debugging, non-intrusive instrumentation and testing.
1228 If in doubt, say "N". 1245 If in doubt, say "N".
1229endmenu 1246
1247endif # INSTRUMENTATION
1230 1248
1231source "arch/i386/Kconfig.debug" 1249source "arch/i386/Kconfig.debug"
1232 1250
diff --git a/arch/i386/Kconfig.cpu b/arch/i386/Kconfig.cpu
index d7f6fb0b30f2..11a24d54f27b 100644
--- a/arch/i386/Kconfig.cpu
+++ b/arch/i386/Kconfig.cpu
@@ -297,11 +297,6 @@ config X86_POPAD_OK
297 depends on !M386 297 depends on !M386
298 default y 298 default y
299 299
300config X86_CMPXCHG64
301 bool
302 depends on !M386 && !M486
303 default y
304
305config X86_ALIGNMENT_16 300config X86_ALIGNMENT_16
306 bool 301 bool
307 depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1 302 depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
@@ -344,8 +339,8 @@ config X86_CMOV
344 depends on (MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7) 339 depends on (MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7)
345 default y 340 default y
346 341
347config X86_MINIMUM_CPU_MODEL 342config X86_MINIMUM_CPU_FAMILY
348 int 343 int
349 default "4" if X86_XADD || X86_CMPXCHG || X86_BSWAP 344 default "4" if X86_XADD || X86_CMPXCHG || X86_BSWAP || X86_WP_WORKS_OK
350 default "0" 345 default "3"
351 346
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index bd28f9f9b4b7..01f0ff0daaf4 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -93,6 +93,9 @@ mflags-$(CONFIG_X86_ES7000) := -Iinclude/asm-i386/mach-es7000
93mcore-$(CONFIG_X86_ES7000) := mach-default 93mcore-$(CONFIG_X86_ES7000) := mach-default
94core-$(CONFIG_X86_ES7000) := arch/i386/mach-es7000/ 94core-$(CONFIG_X86_ES7000) := arch/i386/mach-es7000/
95 95
96# Xen paravirtualization support
97core-$(CONFIG_XEN) += arch/i386/xen/
98
96# default subarch .h files 99# default subarch .h files
97mflags-y += -Iinclude/asm-i386/mach-default 100mflags-y += -Iinclude/asm-i386/mach-default
98 101
@@ -108,6 +111,7 @@ drivers-$(CONFIG_PCI) += arch/i386/pci/
108# must be linked after kernel/ 111# must be linked after kernel/
109drivers-$(CONFIG_OPROFILE) += arch/i386/oprofile/ 112drivers-$(CONFIG_OPROFILE) += arch/i386/oprofile/
110drivers-$(CONFIG_PM) += arch/i386/power/ 113drivers-$(CONFIG_PM) += arch/i386/power/
114drivers-$(CONFIG_FB) += arch/i386/video/
111 115
112CFLAGS += $(mflags-y) 116CFLAGS += $(mflags-y)
113AFLAGS += $(mflags-y) 117AFLAGS += $(mflags-y)
diff --git a/arch/i386/boot/.gitignore b/arch/i386/boot/.gitignore
index 495f20c085de..18465143cfa2 100644
--- a/arch/i386/boot/.gitignore
+++ b/arch/i386/boot/.gitignore
@@ -1,3 +1,5 @@
1bootsect 1bootsect
2bzImage 2bzImage
3setup 3setup
4setup.bin
5setup.elf
diff --git a/arch/i386/boot/Makefile b/arch/i386/boot/Makefile
index bfbc32098a4a..93386a4e40b4 100644
--- a/arch/i386/boot/Makefile
+++ b/arch/i386/boot/Makefile
@@ -25,27 +25,56 @@ SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
25 25
26#RAMDISK := -DRAMDISK=512 26#RAMDISK := -DRAMDISK=512
27 27
28targets := vmlinux.bin bootsect bootsect.o \ 28targets := vmlinux.bin setup.bin setup.elf zImage bzImage
29 setup setup.o zImage bzImage
30subdir- := compressed 29subdir- := compressed
31 30
31setup-y += a20.o apm.o cmdline.o copy.o cpu.o cpucheck.o edd.o
32setup-y += header.o main.o mca.o memory.o pm.o pmjump.o
33setup-y += printf.o string.o tty.o video.o version.o voyager.o
34
35# The link order of the video-*.o modules can matter. In particular,
36# video-vga.o *must* be listed first, followed by video-vesa.o.
37# Hardware-specific drivers should follow in the order they should be
38# probed, and video-bios.o should typically be last.
39setup-y += video-vga.o
40setup-y += video-vesa.o
41setup-y += video-bios.o
42targets += $(setup-y)
32hostprogs-y := tools/build 43hostprogs-y := tools/build
33 44
34HOSTCFLAGS_build.o := $(LINUXINCLUDE) 45HOSTCFLAGS_build.o := $(LINUXINCLUDE)
35 46
36# --------------------------------------------------------------------------- 47# ---------------------------------------------------------------------------
37 48
49# How to compile the 16-bit code. Note we always compile for -march=i386,
50# that way we can complain to the user if the CPU is insufficient.
51cflags-i386 :=
52cflags-x86_64 := -m32
53CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
54 $(cflags-$(ARCH)) \
55 -Wall -Wstrict-prototypes \
56 -march=i386 -mregparm=3 \
57 -include $(srctree)/$(src)/code16gcc.h \
58 -fno-strict-aliasing -fomit-frame-pointer \
59 $(call cc-option, -ffreestanding) \
60 $(call cc-option, -fno-toplevel-reorder,\
61 $(call cc-option, -fno-unit-at-a-time)) \
62 $(call cc-option, -fno-stack-protector) \
63 $(call cc-option, -mpreferred-stack-boundary=2)
64AFLAGS := $(CFLAGS) -D__ASSEMBLY__
65
38$(obj)/zImage: IMAGE_OFFSET := 0x1000 66$(obj)/zImage: IMAGE_OFFSET := 0x1000
39$(obj)/zImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK) 67$(obj)/zImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK)
40$(obj)/bzImage: IMAGE_OFFSET := 0x100000 68$(obj)/bzImage: IMAGE_OFFSET := 0x100000
69$(obj)/bzImage: EXTRA_CFLAGS := -D__BIG_KERNEL__
41$(obj)/bzImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__ 70$(obj)/bzImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
42$(obj)/bzImage: BUILDFLAGS := -b 71$(obj)/bzImage: BUILDFLAGS := -b
43 72
44quiet_cmd_image = BUILD $@ 73quiet_cmd_image = BUILD $@
45cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/bootsect $(obj)/setup \ 74cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/setup.bin \
46 $(obj)/vmlinux.bin $(ROOT_DEV) > $@ 75 $(obj)/vmlinux.bin $(ROOT_DEV) > $@
47 76
48$(obj)/zImage $(obj)/bzImage: $(obj)/bootsect $(obj)/setup \ 77$(obj)/zImage $(obj)/bzImage: $(obj)/setup.bin \
49 $(obj)/vmlinux.bin $(obj)/tools/build FORCE 78 $(obj)/vmlinux.bin $(obj)/tools/build FORCE
50 $(call if_changed,image) 79 $(call if_changed,image)
51 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' 80 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
@@ -53,12 +82,17 @@ $(obj)/zImage $(obj)/bzImage: $(obj)/bootsect $(obj)/setup \
53$(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE 82$(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE
54 $(call if_changed,objcopy) 83 $(call if_changed,objcopy)
55 84
56LDFLAGS_bootsect := -Ttext 0x0 -s --oformat binary 85SETUP_OBJS = $(addprefix $(obj)/,$(setup-y))
57LDFLAGS_setup := -Ttext 0x0 -s --oformat binary -e begtext
58 86
59$(obj)/setup $(obj)/bootsect: %: %.o FORCE 87LDFLAGS_setup.elf := -T
88$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
60 $(call if_changed,ld) 89 $(call if_changed,ld)
61 90
91OBJCOPYFLAGS_setup.bin := -O binary
92
93$(obj)/setup.bin: $(obj)/setup.elf FORCE
94 $(call if_changed,objcopy)
95
62$(obj)/compressed/vmlinux: FORCE 96$(obj)/compressed/vmlinux: FORCE
63 $(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@ 97 $(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@
64 98
diff --git a/arch/i386/boot/a20.c b/arch/i386/boot/a20.c
new file mode 100644
index 000000000000..31348d054fca
--- /dev/null
+++ b/arch/i386/boot/a20.c
@@ -0,0 +1,161 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/a20.c
13 *
14 * Enable A20 gate (return -1 on failure)
15 */
16
17#include "boot.h"
18
19#define MAX_8042_LOOPS 100000
20
21static int empty_8042(void)
22{
23 u8 status;
24 int loops = MAX_8042_LOOPS;
25
26 while (loops--) {
27 io_delay();
28
29 status = inb(0x64);
30 if (status & 1) {
31 /* Read and discard input data */
32 io_delay();
33 (void)inb(0x60);
34 } else if (!(status & 2)) {
35 /* Buffers empty, finished! */
36 return 0;
37 }
38 }
39
40 return -1;
41}
42
43/* Returns nonzero if the A20 line is enabled. The memory address
44 used as a test is the int $0x80 vector, which should be safe. */
45
46#define A20_TEST_ADDR (4*0x80)
47#define A20_TEST_SHORT 32
48#define A20_TEST_LONG 2097152 /* 2^21 */
49
50static int a20_test(int loops)
51{
52 int ok = 0;
53 int saved, ctr;
54
55 set_fs(0x0000);
56 set_gs(0xffff);
57
58 saved = ctr = rdfs32(A20_TEST_ADDR);
59
60 while (loops--) {
61 wrfs32(++ctr, A20_TEST_ADDR);
62 io_delay(); /* Serialize and make delay constant */
63 ok = rdgs32(A20_TEST_ADDR+0x10) ^ ctr;
64 if (ok)
65 break;
66 }
67
68 wrfs32(saved, A20_TEST_ADDR);
69 return ok;
70}
71
72/* Quick test to see if A20 is already enabled */
73static int a20_test_short(void)
74{
75 return a20_test(A20_TEST_SHORT);
76}
77
78/* Longer test that actually waits for A20 to come on line; this
79 is useful when dealing with the KBC or other slow external circuitry. */
80static int a20_test_long(void)
81{
82 return a20_test(A20_TEST_LONG);
83}
84
85static void enable_a20_bios(void)
86{
87 asm volatile("pushfl; int $0x15; popfl"
88 : : "a" ((u16)0x2401));
89}
90
91static void enable_a20_kbc(void)
92{
93 empty_8042();
94
95 outb(0xd1, 0x64); /* Command write */
96 empty_8042();
97
98 outb(0xdf, 0x60); /* A20 on */
99 empty_8042();
100}
101
102static void enable_a20_fast(void)
103{
104 u8 port_a;
105
106 port_a = inb(0x92); /* Configuration port A */
107 port_a |= 0x02; /* Enable A20 */
108 port_a &= ~0x01; /* Do not reset machine */
109 outb(port_a, 0x92);
110}
111
112/*
113 * Actual routine to enable A20; return 0 on ok, -1 on failure
114 */
115
116#define A20_ENABLE_LOOPS 255 /* Number of times to try */
117
118int enable_a20(void)
119{
120 int loops = A20_ENABLE_LOOPS;
121
122#if defined(CONFIG_X86_ELAN)
123 /* Elan croaks if we try to touch the KBC */
124 enable_a20_fast();
125 while (!a20_test_long())
126 ;
127 return 0;
128#elif defined(CONFIG_X86_VOYAGER)
129 /* On Voyager, a20_test() is unsafe? */
130 enable_a20_kbc();
131 return 0;
132#else
133 while (loops--) {
134 /* First, check to see if A20 is already enabled
135 (legacy free, etc.) */
136 if (a20_test_short())
137 return 0;
138
139 /* Next, try the BIOS (INT 0x15, AX=0x2401) */
140 enable_a20_bios();
141 if (a20_test_short())
142 return 0;
143
144 /* Try enabling A20 through the keyboard controller */
145 empty_8042();
146 if (a20_test_short())
147 return 0; /* BIOS worked, but with delayed reaction */
148
149 enable_a20_kbc();
150 if (a20_test_long())
151 return 0;
152
153 /* Finally, try enabling the "fast A20 gate" */
154 enable_a20_fast();
155 if (a20_test_long())
156 return 0;
157 }
158
159 return -1;
160#endif
161}
diff --git a/arch/i386/boot/apm.c b/arch/i386/boot/apm.c
new file mode 100644
index 000000000000..a34087c370c0
--- /dev/null
+++ b/arch/i386/boot/apm.c
@@ -0,0 +1,97 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * Original APM BIOS checking by Stephen Rothwell, May 1994
7 * (sfr@canb.auug.org.au)
8 *
9 * This file is part of the Linux kernel, and is made available under
10 * the terms of the GNU General Public License version 2.
11 *
12 * ----------------------------------------------------------------------- */
13
14/*
15 * arch/i386/boot/apm.c
16 *
17 * Get APM BIOS information
18 */
19
20#include "boot.h"
21
22#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
23
24int query_apm_bios(void)
25{
26 u16 ax, bx, cx, dx, di;
27 u32 ebx, esi;
28 u8 err;
29
30 /* APM BIOS installation check */
31 ax = 0x5300;
32 bx = cx = 0;
33 asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp ; setc %0"
34 : "=d" (err), "+a" (ax), "+b" (bx), "+c" (cx)
35 : : "esi", "edi");
36
37 if (err)
38 return -1; /* No APM BIOS */
39
40 if (bx != 0x504d) /* "PM" signature */
41 return -1;
42
43 if (cx & 0x02) /* 32 bits supported? */
44 return -1;
45
46 /* Disconnect first, just in case */
47 ax = 0x5304;
48 asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp"
49 : "+a" (ax)
50 : : "ebx", "ecx", "edx", "esi", "edi");
51
52 /* Paranoia */
53 ebx = esi = 0;
54 cx = dx = di = 0;
55
56 /* 32-bit connect */
57 asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp ; setc %6"
58 : "=a" (ax), "+b" (ebx), "+c" (cx), "+d" (dx),
59 "+S" (esi), "+D" (di), "=m" (err)
60 : "a" (0x5303));
61
62 boot_params.apm_bios_info.cseg = ax;
63 boot_params.apm_bios_info.offset = ebx;
64 boot_params.apm_bios_info.cseg_16 = cx;
65 boot_params.apm_bios_info.dseg = dx;
66 boot_params.apm_bios_info.cseg_len = (u16)esi;
67 boot_params.apm_bios_info.cseg_16_len = esi >> 16;
68 boot_params.apm_bios_info.dseg_len = di;
69
70 if (err)
71 return -1;
72
73 /* Redo the installation check as the 32-bit connect;
74 some BIOSes return different flags this way... */
75
76 ax = 0x5300;
77 bx = cx = 0;
78 asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp ; setc %0"
79 : "=d" (err), "+a" (ax), "+b" (bx), "+c" (cx)
80 : : "esi", "edi");
81
82 if (err || bx != 0x504d) {
83 /* Failure with 32-bit connect, try to disconect and ignore */
84 ax = 0x5304;
85 bx = 0;
86 asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp"
87 : "+a" (ax), "+b" (bx)
88 : : "ecx", "edx", "esi", "edi");
89 return -1;
90 }
91
92 boot_params.apm_bios_info.version = ax;
93 boot_params.apm_bios_info.flags = cx;
94 return 0;
95}
96
97#endif
diff --git a/arch/i386/boot/bitops.h b/arch/i386/boot/bitops.h
new file mode 100644
index 000000000000..8dcc8dc7db88
--- /dev/null
+++ b/arch/i386/boot/bitops.h
@@ -0,0 +1,45 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/bitops.h
13 *
14 * Very simple bitops for the boot code.
15 */
16
17#ifndef BOOT_BITOPS_H
18#define BOOT_BITOPS_H
19#define _LINUX_BITOPS_H /* Inhibit inclusion of <linux/bitops.h> */
20
21static inline int constant_test_bit(int nr, const void *addr)
22{
23 const u32 *p = (const u32 *)addr;
24 return ((1UL << (nr & 31)) & (p[nr >> 5])) != 0;
25}
26static inline int variable_test_bit(int nr, const void *addr)
27{
28 u8 v;
29 const u32 *p = (const u32 *)addr;
30
31 asm("btl %2,%1; setc %0" : "=qm" (v) : "m" (*p), "Ir" (nr));
32 return v;
33}
34
35#define test_bit(nr,addr) \
36(__builtin_constant_p(nr) ? \
37 constant_test_bit((nr),(addr)) : \
38 variable_test_bit((nr),(addr)))
39
40static inline void set_bit(int nr, void *addr)
41{
42 asm("btsl %1,%0" : "+m" (*(u32 *)addr) : "Ir" (nr));
43}
44
45#endif /* BOOT_BITOPS_H */
diff --git a/arch/i386/boot/boot.h b/arch/i386/boot/boot.h
new file mode 100644
index 000000000000..dec70c9b6050
--- /dev/null
+++ b/arch/i386/boot/boot.h
@@ -0,0 +1,296 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/boot.h
13 *
14 * Header file for the real-mode kernel code
15 */
16
17#ifndef BOOT_BOOT_H
18#define BOOT_BOOT_H
19
20#ifndef __ASSEMBLY__
21
22#include <stdarg.h>
23#include <linux/types.h>
24#include <linux/edd.h>
25#include <asm/boot.h>
26#include <asm/bootparam.h>
27
28/* Useful macros */
29#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
30
31extern struct setup_header hdr;
32extern struct boot_params boot_params;
33
34/* Basic port I/O */
35static inline void outb(u8 v, u16 port)
36{
37 asm volatile("outb %0,%1" : : "a" (v), "dN" (port));
38}
39static inline u8 inb(u16 port)
40{
41 u8 v;
42 asm volatile("inb %1,%0" : "=a" (v) : "dN" (port));
43 return v;
44}
45
46static inline void outw(u16 v, u16 port)
47{
48 asm volatile("outw %0,%1" : : "a" (v), "dN" (port));
49}
50static inline u16 inw(u16 port)
51{
52 u16 v;
53 asm volatile("inw %1,%0" : "=a" (v) : "dN" (port));
54 return v;
55}
56
57static inline void outl(u32 v, u16 port)
58{
59 asm volatile("outl %0,%1" : : "a" (v), "dN" (port));
60}
61static inline u32 inl(u32 port)
62{
63 u32 v;
64 asm volatile("inl %1,%0" : "=a" (v) : "dN" (port));
65 return v;
66}
67
68static inline void io_delay(void)
69{
70 const u16 DELAY_PORT = 0x80;
71 asm volatile("outb %%al,%0" : : "dN" (DELAY_PORT));
72}
73
74/* These functions are used to reference data in other segments. */
75
76static inline u16 ds(void)
77{
78 u16 seg;
79 asm("movw %%ds,%0" : "=rm" (seg));
80 return seg;
81}
82
83static inline void set_fs(u16 seg)
84{
85 asm volatile("movw %0,%%fs" : : "rm" (seg));
86}
87static inline u16 fs(void)
88{
89 u16 seg;
90 asm("movw %%fs,%0" : "=rm" (seg));
91 return seg;
92}
93
94static inline void set_gs(u16 seg)
95{
96 asm volatile("movw %0,%%gs" : : "rm" (seg));
97}
98static inline u16 gs(void)
99{
100 u16 seg;
101 asm("movw %%gs,%0" : "=rm" (seg));
102 return seg;
103}
104
105typedef unsigned int addr_t;
106
107static inline u8 rdfs8(addr_t addr)
108{
109 u8 v;
110 asm("movb %%fs:%1,%0" : "=r" (v) : "m" (*(u8 *)addr));
111 return v;
112}
113static inline u16 rdfs16(addr_t addr)
114{
115 u16 v;
116 asm("movw %%fs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
117 return v;
118}
119static inline u32 rdfs32(addr_t addr)
120{
121 u32 v;
122 asm("movl %%fs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
123 return v;
124}
125
126static inline void wrfs8(u8 v, addr_t addr)
127{
128 asm volatile("movb %1,%%fs:%0" : "+m" (*(u8 *)addr) : "r" (v));
129}
130static inline void wrfs16(u16 v, addr_t addr)
131{
132 asm volatile("movw %1,%%fs:%0" : "+m" (*(u16 *)addr) : "r" (v));
133}
134static inline void wrfs32(u32 v, addr_t addr)
135{
136 asm volatile("movl %1,%%fs:%0" : "+m" (*(u32 *)addr) : "r" (v));
137}
138
139static inline u8 rdgs8(addr_t addr)
140{
141 u8 v;
142 asm("movb %%gs:%1,%0" : "=r" (v) : "m" (*(u8 *)addr));
143 return v;
144}
145static inline u16 rdgs16(addr_t addr)
146{
147 u16 v;
148 asm("movw %%gs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
149 return v;
150}
151static inline u32 rdgs32(addr_t addr)
152{
153 u32 v;
154 asm("movl %%gs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
155 return v;
156}
157
158static inline void wrgs8(u8 v, addr_t addr)
159{
160 asm volatile("movb %1,%%gs:%0" : "+m" (*(u8 *)addr) : "r" (v));
161}
162static inline void wrgs16(u16 v, addr_t addr)
163{
164 asm volatile("movw %1,%%gs:%0" : "+m" (*(u16 *)addr) : "r" (v));
165}
166static inline void wrgs32(u32 v, addr_t addr)
167{
168 asm volatile("movl %1,%%gs:%0" : "+m" (*(u32 *)addr) : "r" (v));
169}
170
171/* Note: these only return true/false, not a signed return value! */
172static inline int memcmp(const void *s1, const void *s2, size_t len)
173{
174 u8 diff;
175 asm("repe; cmpsb; setnz %0"
176 : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
177 return diff;
178}
179
180static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
181{
182 u8 diff;
183 asm("fs; repe; cmpsb; setnz %0"
184 : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
185 return diff;
186}
187static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
188{
189 u8 diff;
190 asm("gs; repe; cmpsb; setnz %0"
191 : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
192 return diff;
193}
194
195static inline int isdigit(int ch)
196{
197 return (ch >= '0') && (ch <= '9');
198}
199
200/* Heap -- available for dynamic lists. */
201#define STACK_SIZE 512 /* Minimum number of bytes for stack */
202
203extern char _end[];
204extern char *HEAP;
205extern char *heap_end;
206#define RESET_HEAP() ((void *)( HEAP = _end ))
207static inline char *__get_heap(size_t s, size_t a, size_t n)
208{
209 char *tmp;
210
211 HEAP = (char *)(((size_t)HEAP+(a-1)) & ~(a-1));
212 tmp = HEAP;
213 HEAP += s*n;
214 return tmp;
215}
216#define GET_HEAP(type, n) \
217 ((type *)__get_heap(sizeof(type),__alignof__(type),(n)))
218
219static inline int heap_free(void)
220{
221 return heap_end-HEAP;
222}
223
224/* copy.S */
225
226void copy_to_fs(addr_t dst, void *src, size_t len);
227void *copy_from_fs(void *dst, addr_t src, size_t len);
228void copy_to_gs(addr_t dst, void *src, size_t len);
229void *copy_from_gs(void *dst, addr_t src, size_t len);
230void *memcpy(void *dst, void *src, size_t len);
231void *memset(void *dst, int c, size_t len);
232
233#define memcpy(d,s,l) __builtin_memcpy(d,s,l)
234#define memset(d,c,l) __builtin_memset(d,c,l)
235
236/* a20.c */
237int enable_a20(void);
238
239/* apm.c */
240int query_apm_bios(void);
241
242/* cmdline.c */
243int cmdline_find_option(const char *option, char *buffer, int bufsize);
244
245/* cpu.c, cpucheck.c */
246int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr);
247int validate_cpu(void);
248
249/* edd.c */
250void query_edd(void);
251
252/* header.S */
253void __attribute__((noreturn)) die(void);
254
255/* mca.c */
256int query_mca(void);
257
258/* memory.c */
259int detect_memory(void);
260
261/* pm.c */
262void __attribute__((noreturn)) go_to_protected_mode(void);
263
264/* pmjump.S */
265void __attribute__((noreturn))
266 protected_mode_jump(u32 entrypoint, u32 bootparams);
267
268/* printf.c */
269int sprintf(char *buf, const char *fmt, ...);
270int vsprintf(char *buf, const char *fmt, va_list args);
271int printf(const char *fmt, ...);
272
273/* string.c */
274int strcmp(const char *str1, const char *str2);
275size_t strnlen(const char *s, size_t maxlen);
276unsigned int atou(const char *s);
277
278/* tty.c */
279void puts(const char *);
280void putchar(int);
281int getchar(void);
282void kbd_flush(void);
283int getchar_timeout(void);
284
285/* video.c */
286void set_video(void);
287
288/* video-vesa.c */
289void vesa_store_edid(void);
290
291/* voyager.c */
292int query_voyager(void);
293
294#endif /* __ASSEMBLY__ */
295
296#endif /* BOOT_BOOT_H */
diff --git a/arch/i386/boot/bootsect.S b/arch/i386/boot/bootsect.S
deleted file mode 100644
index 011b7a4993d4..000000000000
--- a/arch/i386/boot/bootsect.S
+++ /dev/null
@@ -1,98 +0,0 @@
1/*
2 * bootsect.S Copyright (C) 1991, 1992 Linus Torvalds
3 *
4 * modified by Drew Eckhardt
5 * modified by Bruce Evans (bde)
6 * modified by Chris Noe (May 1999) (as86 -> gas)
7 * gutted by H. Peter Anvin (Jan 2003)
8 *
9 * BIG FAT NOTE: We're in real mode using 64k segments. Therefore segment
10 * addresses must be multiplied by 16 to obtain their respective linear
11 * addresses. To avoid confusion, linear addresses are written using leading
12 * hex while segment addresses are written as segment:offset.
13 *
14 */
15
16#include <asm/boot.h>
17
18SETUPSECTS = 4 /* default nr of setup-sectors */
19BOOTSEG = 0x07C0 /* original address of boot-sector */
20INITSEG = DEF_INITSEG /* we move boot here - out of the way */
21SETUPSEG = DEF_SETUPSEG /* setup starts here */
22SYSSEG = DEF_SYSSEG /* system loaded at 0x10000 (65536) */
23SYSSIZE = DEF_SYSSIZE /* system size: # of 16-byte clicks */
24 /* to be loaded */
25ROOT_DEV = 0 /* ROOT_DEV is now written by "build" */
26SWAP_DEV = 0 /* SWAP_DEV is now written by "build" */
27
28#ifndef SVGA_MODE
29#define SVGA_MODE ASK_VGA
30#endif
31
32#ifndef RAMDISK
33#define RAMDISK 0
34#endif
35
36#ifndef ROOT_RDONLY
37#define ROOT_RDONLY 1
38#endif
39
40.code16
41.text
42
43.global _start
44_start:
45
46 # Normalize the start address
47 jmpl $BOOTSEG, $start2
48
49start2:
50 movw %cs, %ax
51 movw %ax, %ds
52 movw %ax, %es
53 movw %ax, %ss
54 movw $0x7c00, %sp
55 sti
56 cld
57
58 movw $bugger_off_msg, %si
59
60msg_loop:
61 lodsb
62 andb %al, %al
63 jz die
64 movb $0xe, %ah
65 movw $7, %bx
66 int $0x10
67 jmp msg_loop
68
69die:
70 # Allow the user to press a key, then reboot
71 xorw %ax, %ax
72 int $0x16
73 int $0x19
74
75 # int 0x19 should never return. In case it does anyway,
76 # invoke the BIOS reset code...
77 ljmp $0xf000,$0xfff0
78
79
80bugger_off_msg:
81 .ascii "Direct booting from floppy is no longer supported.\r\n"
82 .ascii "Please use a boot loader program instead.\r\n"
83 .ascii "\n"
84 .ascii "Remove disk and press any key to reboot . . .\r\n"
85 .byte 0
86
87
88 # Kernel attributes; used by setup
89
90 .org 497
91setup_sects: .byte SETUPSECTS
92root_flags: .word ROOT_RDONLY
93syssize: .word SYSSIZE
94swap_dev: .word SWAP_DEV
95ram_size: .word RAMDISK
96vid_mode: .word SVGA_MODE
97root_dev: .word ROOT_DEV
98boot_flag: .word 0xAA55
diff --git a/arch/i386/boot/cmdline.c b/arch/i386/boot/cmdline.c
new file mode 100644
index 000000000000..34bb778c4357
--- /dev/null
+++ b/arch/i386/boot/cmdline.c
@@ -0,0 +1,97 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/cmdline.c
13 *
14 * Simple command-line parser for early boot.
15 */
16
17#include "boot.h"
18
19static inline int myisspace(u8 c)
20{
21 return c <= ' '; /* Close enough approximation */
22}
23
24/*
25 * Find a non-boolean option, that is, "option=argument". In accordance
26 * with standard Linux practice, if this option is repeated, this returns
27 * the last instance on the command line.
28 *
29 * Returns the length of the argument (regardless of if it was
30 * truncated to fit in the buffer), or -1 on not found.
31 */
32int cmdline_find_option(const char *option, char *buffer, int bufsize)
33{
34 u32 cmdline_ptr = boot_params.hdr.cmd_line_ptr;
35 addr_t cptr;
36 char c;
37 int len = -1;
38 const char *opptr = NULL;
39 char *bufptr = buffer;
40 enum {
41 st_wordstart, /* Start of word/after whitespace */
42 st_wordcmp, /* Comparing this word */
43 st_wordskip, /* Miscompare, skip */
44 st_bufcpy /* Copying this to buffer */
45 } state = st_wordstart;
46
47 if (!cmdline_ptr || cmdline_ptr >= 0x100000)
48 return -1; /* No command line, or inaccessible */
49
50 cptr = cmdline_ptr & 0xf;
51 set_fs(cmdline_ptr >> 4);
52
53 while (cptr < 0x10000 && (c = rdfs8(cptr++))) {
54 switch (state) {
55 case st_wordstart:
56 if (myisspace(c))
57 break;
58
59 /* else */
60 state = st_wordcmp;
61 opptr = option;
62 /* fall through */
63
64 case st_wordcmp:
65 if (c == '=' && !*opptr) {
66 len = 0;
67 bufptr = buffer;
68 state = st_bufcpy;
69 } else if (myisspace(c)) {
70 state = st_wordstart;
71 } else if (c != *opptr++) {
72 state = st_wordskip;
73 }
74 break;
75
76 case st_wordskip:
77 if (myisspace(c))
78 state = st_wordstart;
79 break;
80
81 case st_bufcpy:
82 if (myisspace(c)) {
83 state = st_wordstart;
84 } else {
85 if (len < bufsize-1)
86 *bufptr++ = c;
87 len++;
88 }
89 break;
90 }
91 }
92
93 if (bufsize)
94 *bufptr = '\0';
95
96 return len;
97}
diff --git a/arch/i386/boot/code16gcc.h b/arch/i386/boot/code16gcc.h
new file mode 100644
index 000000000000..3bd848093b9d
--- /dev/null
+++ b/arch/i386/boot/code16gcc.h
@@ -0,0 +1,15 @@
1/*
2 * code16gcc.h
3 *
4 * This file is -include'd when compiling 16-bit C code.
5 * Note: this asm() needs to be emitted before gcc omits any code.
6 * Depending on gcc version, this requires -fno-unit-at-a-time or
7 * -fno-toplevel-reorder.
8 *
9 * Hopefully gcc will eventually have a real -m16 option so we can
10 * drop this hack long term.
11 */
12
13#ifndef __ASSEMBLY__
14asm(".code16gcc");
15#endif
diff --git a/arch/i386/boot/compressed/Makefile b/arch/i386/boot/compressed/Makefile
index a661217f33ec..189fa1dbefcc 100644
--- a/arch/i386/boot/compressed/Makefile
+++ b/arch/i386/boot/compressed/Makefile
@@ -9,9 +9,14 @@ targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o \
9EXTRA_AFLAGS := -traditional 9EXTRA_AFLAGS := -traditional
10 10
11LDFLAGS_vmlinux := -T 11LDFLAGS_vmlinux := -T
12CFLAGS_misc.o += -fPIC
13hostprogs-y := relocs 12hostprogs-y := relocs
14 13
14CFLAGS := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \
15 -fno-strict-aliasing -fPIC \
16 $(call cc-option,-ffreestanding) \
17 $(call cc-option,-fno-stack-protector)
18LDFLAGS := -m elf_i386
19
15$(obj)/vmlinux: $(src)/vmlinux.lds $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE 20$(obj)/vmlinux: $(src)/vmlinux.lds $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE
16 $(call if_changed,ld) 21 $(call if_changed,ld)
17 @: 22 @:
diff --git a/arch/i386/boot/compressed/head.S b/arch/i386/boot/compressed/head.S
index 3517a32aaf41..f35ea2237522 100644
--- a/arch/i386/boot/compressed/head.S
+++ b/arch/i386/boot/compressed/head.S
@@ -45,10 +45,10 @@ startup_32:
45 * at and where we were actually loaded at. This can only be done 45 * at and where we were actually loaded at. This can only be done
46 * with a short local call on x86. Nothing else will tell us what 46 * with a short local call on x86. Nothing else will tell us what
47 * address we are running at. The reserved chunk of the real-mode 47 * address we are running at. The reserved chunk of the real-mode
48 * data at 0x34-0x3f are used as the stack for this calculation. 48 * data at 0x1e4 (defined as a scratch field) are used as the stack
49 * Only 4 bytes are needed. 49 * for this calculation. Only 4 bytes are needed.
50 */ 50 */
51 leal 0x40(%esi), %esp 51 leal (0x1e4+4)(%esi), %esp
52 call 1f 52 call 1f
531: popl %ebp 531: popl %ebp
54 subl $1b, %ebp 54 subl $1b, %ebp
diff --git a/arch/i386/boot/compressed/relocs.c b/arch/i386/boot/compressed/relocs.c
index ce4fda261aaf..2d77ee728f92 100644
--- a/arch/i386/boot/compressed/relocs.c
+++ b/arch/i386/boot/compressed/relocs.c
@@ -31,6 +31,9 @@ static const char* safe_abs_relocs[] = {
31 "__kernel_rt_sigreturn", 31 "__kernel_rt_sigreturn",
32 "__kernel_sigreturn", 32 "__kernel_sigreturn",
33 "SYSENTER_RETURN", 33 "SYSENTER_RETURN",
34 "VDSO_NOTE_MASK",
35 "xen_irq_disable_direct_reloc",
36 "xen_save_fl_direct_reloc",
34}; 37};
35 38
36static int is_safe_abs_reloc(const char* sym_name) 39static int is_safe_abs_reloc(const char* sym_name)
diff --git a/arch/i386/boot/copy.S b/arch/i386/boot/copy.S
new file mode 100644
index 000000000000..ef127e56a3cf
--- /dev/null
+++ b/arch/i386/boot/copy.S
@@ -0,0 +1,101 @@
1/* ----------------------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/copy.S
13 *
14 * Memory copy routines
15 */
16
17 .code16gcc
18 .text
19
20 .globl memcpy
21 .type memcpy, @function
22memcpy:
23 pushw %si
24 pushw %di
25 movw %ax, %di
26 movw %dx, %si
27 pushw %cx
28 shrw $2, %cx
29 rep; movsl
30 popw %cx
31 andw $3, %cx
32 rep; movsb
33 popw %di
34 popw %si
35 ret
36 .size memcpy, .-memcpy
37
38 .globl memset
39 .type memset, @function
40memset:
41 pushw %di
42 movw %ax, %di
43 movzbl %dl, %eax
44 imull $0x01010101,%eax
45 pushw %cx
46 shrw $2, %cx
47 rep; stosl
48 popw %cx
49 andw $3, %cx
50 rep; stosb
51 popw %di
52 ret
53 .size memset, .-memset
54
55 .globl copy_from_fs
56 .type copy_from_fs, @function
57copy_from_fs:
58 pushw %ds
59 pushw %fs
60 popw %ds
61 call memcpy
62 popw %ds
63 ret
64 .size copy_from_fs, .-copy_from_fs
65
66 .globl copy_to_fs
67 .type copy_to_fs, @function
68copy_to_fs:
69 pushw %es
70 pushw %fs
71 popw %es
72 call memcpy
73 popw %es
74 ret
75 .size copy_to_fs, .-copy_to_fs
76
77#if 0 /* Not currently used, but can be enabled as needed */
78
79 .globl copy_from_gs
80 .type copy_from_gs, @function
81copy_from_gs:
82 pushw %ds
83 pushw %gs
84 popw %ds
85 call memcpy
86 popw %ds
87 ret
88 .size copy_from_gs, .-copy_from_gs
89 .globl copy_to_gs
90
91 .type copy_to_gs, @function
92copy_to_gs:
93 pushw %es
94 pushw %gs
95 popw %es
96 call memcpy
97 popw %es
98 ret
99 .size copy_to_gs, .-copy_to_gs
100
101#endif
diff --git a/arch/i386/boot/cpu.c b/arch/i386/boot/cpu.c
new file mode 100644
index 000000000000..2a5c32da5852
--- /dev/null
+++ b/arch/i386/boot/cpu.c
@@ -0,0 +1,69 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/cpu.c
13 *
14 * Check for obligatory CPU features and abort if the features are not
15 * present.
16 */
17
18#include "boot.h"
19#include "bitops.h"
20#include <asm/cpufeature.h>
21
22static char *cpu_name(int level)
23{
24 static char buf[6];
25
26 if (level == 64) {
27 return "x86-64";
28 } else {
29 sprintf(buf, "i%d86", level);
30 return buf;
31 }
32}
33
34int validate_cpu(void)
35{
36 u32 *err_flags;
37 int cpu_level, req_level;
38
39 check_cpu(&cpu_level, &req_level, &err_flags);
40
41 if (cpu_level < req_level) {
42 printf("This kernel requires an %s CPU, ",
43 cpu_name(req_level));
44 printf("but only detected an %s CPU.\n",
45 cpu_name(cpu_level));
46 return -1;
47 }
48
49 if (err_flags) {
50 int i, j;
51 puts("This kernel requires the following features "
52 "not present on the CPU:\n");
53
54 for (i = 0; i < NCAPINTS; i++) {
55 u32 e = err_flags[i];
56
57 for (j = 0; j < 32; j++) {
58 if (e & 1)
59 printf("%d:%d ", i, j);
60
61 e >>= 1;
62 }
63 }
64 putchar('\n');
65 return -1;
66 } else {
67 return 0;
68 }
69}
diff --git a/arch/i386/boot/cpucheck.c b/arch/i386/boot/cpucheck.c
new file mode 100644
index 000000000000..991e8ceae1de
--- /dev/null
+++ b/arch/i386/boot/cpucheck.c
@@ -0,0 +1,267 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/cpucheck.c
13 *
14 * Check for obligatory CPU features and abort if the features are not
15 * present. This code should be compilable as 16-, 32- or 64-bit
16 * code, so be very careful with types and inline assembly.
17 *
18 * This code should not contain any messages; that requires an
19 * additional wrapper.
20 *
21 * As written, this code is not safe for inclusion into the kernel
22 * proper (after FPU initialization, in particular).
23 */
24
25#ifdef _SETUP
26# include "boot.h"
27# include "bitops.h"
28#endif
29#include <linux/types.h>
30#include <asm/cpufeature.h>
31#include <asm/processor-flags.h>
32#include <asm/required-features.h>
33#include <asm/msr-index.h>
34
35struct cpu_features {
36 int level; /* Family, or 64 for x86-64 */
37 int model;
38 u32 flags[NCAPINTS];
39};
40
41static struct cpu_features cpu;
42static u32 cpu_vendor[3];
43static u32 err_flags[NCAPINTS];
44
45#ifdef CONFIG_X86_64
46static const int req_level = 64;
47#elif defined(CONFIG_X86_MINIMUM_CPU_FAMILY)
48static const int req_level = CONFIG_X86_MINIMUM_CPU_FAMILY;
49#else
50static const int req_level = 3;
51#endif
52
53static const u32 req_flags[NCAPINTS] =
54{
55 REQUIRED_MASK0,
56 REQUIRED_MASK1,
57 REQUIRED_MASK2,
58 REQUIRED_MASK3,
59 REQUIRED_MASK4,
60 REQUIRED_MASK5,
61 REQUIRED_MASK6,
62 REQUIRED_MASK7,
63};
64
65#define A32(a,b,c,d) (((d) << 24)+((c) << 16)+((b) << 8)+(a))
66
67static int is_amd(void)
68{
69 return cpu_vendor[0] == A32('A','u','t','h') &&
70 cpu_vendor[1] == A32('e','n','t','i') &&
71 cpu_vendor[2] == A32('c','A','M','D');
72}
73
74static int is_centaur(void)
75{
76 return cpu_vendor[0] == A32('C','e','n','t') &&
77 cpu_vendor[1] == A32('a','u','r','H') &&
78 cpu_vendor[2] == A32('a','u','l','s');
79}
80
81static int is_transmeta(void)
82{
83 return cpu_vendor[0] == A32('G','e','n','u') &&
84 cpu_vendor[1] == A32('i','n','e','T') &&
85 cpu_vendor[2] == A32('M','x','8','6');
86}
87
88static int has_fpu(void)
89{
90 u16 fcw = -1, fsw = -1;
91 u32 cr0;
92
93 asm("movl %%cr0,%0" : "=r" (cr0));
94 if (cr0 & (X86_CR0_EM|X86_CR0_TS)) {
95 cr0 &= ~(X86_CR0_EM|X86_CR0_TS);
96 asm volatile("movl %0,%%cr0" : : "r" (cr0));
97 }
98
99 asm("fninit ; fnstsw %0 ; fnstcw %1" : "+m" (fsw), "+m" (fcw));
100
101 return fsw == 0 && (fcw & 0x103f) == 0x003f;
102}
103
104static int has_eflag(u32 mask)
105{
106 u32 f0, f1;
107
108 asm("pushfl ; "
109 "pushfl ; "
110 "popl %0 ; "
111 "movl %0,%1 ; "
112 "xorl %2,%1 ; "
113 "pushl %1 ; "
114 "popfl ; "
115 "pushfl ; "
116 "popl %1 ; "
117 "popfl"
118 : "=&r" (f0), "=&r" (f1)
119 : "ri" (mask));
120
121 return !!((f0^f1) & mask);
122}
123
124static void get_flags(void)
125{
126 u32 max_intel_level, max_amd_level;
127 u32 tfms;
128
129 if (has_fpu())
130 set_bit(X86_FEATURE_FPU, cpu.flags);
131
132 if (has_eflag(X86_EFLAGS_ID)) {
133 asm("cpuid"
134 : "=a" (max_intel_level),
135 "=b" (cpu_vendor[0]),
136 "=d" (cpu_vendor[1]),
137 "=c" (cpu_vendor[2])
138 : "a" (0));
139
140 if (max_intel_level >= 0x00000001 &&
141 max_intel_level <= 0x0000ffff) {
142 asm("cpuid"
143 : "=a" (tfms),
144 "=c" (cpu.flags[4]),
145 "=d" (cpu.flags[0])
146 : "a" (0x00000001)
147 : "ebx");
148 cpu.level = (tfms >> 8) & 15;
149 cpu.model = (tfms >> 4) & 15;
150 if (cpu.level >= 6)
151 cpu.model += ((tfms >> 16) & 0xf) << 4;
152 }
153
154 asm("cpuid"
155 : "=a" (max_amd_level)
156 : "a" (0x80000000)
157 : "ebx", "ecx", "edx");
158
159 if (max_amd_level >= 0x80000001 &&
160 max_amd_level <= 0x8000ffff) {
161 u32 eax = 0x80000001;
162 asm("cpuid"
163 : "+a" (eax),
164 "=c" (cpu.flags[6]),
165 "=d" (cpu.flags[1])
166 : : "ebx");
167 }
168 }
169}
170
171/* Returns a bitmask of which words we have error bits in */
172static int check_flags(void)
173{
174 u32 err;
175 int i;
176
177 err = 0;
178 for (i = 0; i < NCAPINTS; i++) {
179 err_flags[i] = req_flags[i] & ~cpu.flags[i];
180 if (err_flags[i])
181 err |= 1 << i;
182 }
183
184 return err;
185}
186
187/*
188 * Returns -1 on error.
189 *
190 * *cpu_level is set to the current CPU level; *req_level to the required
191 * level. x86-64 is considered level 64 for this purpose.
192 *
193 * *err_flags_ptr is set to the flags error array if there are flags missing.
194 */
195int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr)
196{
197 int err;
198
199 memset(&cpu.flags, 0, sizeof cpu.flags);
200 cpu.level = 3;
201
202 if (has_eflag(X86_EFLAGS_AC))
203 cpu.level = 4;
204
205 get_flags();
206 err = check_flags();
207
208 if (test_bit(X86_FEATURE_LM, cpu.flags))
209 cpu.level = 64;
210
211 if (err == 0x01 &&
212 !(err_flags[0] &
213 ~((1 << X86_FEATURE_XMM)|(1 << X86_FEATURE_XMM2))) &&
214 is_amd()) {
215 /* If this is an AMD and we're only missing SSE+SSE2, try to
216 turn them on */
217
218 u32 ecx = MSR_K7_HWCR;
219 u32 eax, edx;
220
221 asm("rdmsr" : "=a" (eax), "=d" (edx) : "c" (ecx));
222 eax &= ~(1 << 15);
223 asm("wrmsr" : : "a" (eax), "d" (edx), "c" (ecx));
224
225 get_flags(); /* Make sure it really did something */
226 err = check_flags();
227 } else if (err == 0x01 &&
228 !(err_flags[0] & ~(1 << X86_FEATURE_CX8)) &&
229 is_centaur() && cpu.model >= 6) {
230 /* If this is a VIA C3, we might have to enable CX8
231 explicitly */
232
233 u32 ecx = MSR_VIA_FCR;
234 u32 eax, edx;
235
236 asm("rdmsr" : "=a" (eax), "=d" (edx) : "c" (ecx));
237 eax |= (1<<1)|(1<<7);
238 asm("wrmsr" : : "a" (eax), "d" (edx), "c" (ecx));
239
240 set_bit(X86_FEATURE_CX8, cpu.flags);
241 err = check_flags();
242 } else if (err == 0x01 && is_transmeta()) {
243 /* Transmeta might have masked feature bits in word 0 */
244
245 u32 ecx = 0x80860004;
246 u32 eax, edx;
247 u32 level = 1;
248
249 asm("rdmsr" : "=a" (eax), "=d" (edx) : "c" (ecx));
250 asm("wrmsr" : : "a" (~0), "d" (edx), "c" (ecx));
251 asm("cpuid"
252 : "+a" (level), "=d" (cpu.flags[0])
253 : : "ecx", "ebx");
254 asm("wrmsr" : : "a" (eax), "d" (edx), "c" (ecx));
255
256 err = check_flags();
257 }
258
259 if (err_flags_ptr)
260 *err_flags_ptr = err ? err_flags : NULL;
261 if (cpu_level_ptr)
262 *cpu_level_ptr = cpu.level;
263 if (req_level_ptr)
264 *req_level_ptr = req_level;
265
266 return (cpu.level < req_level || err) ? -1 : 0;
267}
diff --git a/arch/i386/boot/edd.S b/arch/i386/boot/edd.S
deleted file mode 100644
index 34321368011a..000000000000
--- a/arch/i386/boot/edd.S
+++ /dev/null
@@ -1,231 +0,0 @@
1/*
2 * BIOS Enhanced Disk Drive support
3 * Copyright (C) 2002, 2003, 2004 Dell, Inc.
4 * by Matt Domsch <Matt_Domsch@dell.com> October 2002
5 * conformant to T13 Committee www.t13.org
6 * projects 1572D, 1484D, 1386D, 1226DT
7 * disk signature read by Matt Domsch <Matt_Domsch@dell.com>
8 * and Andrew Wilks <Andrew_Wilks@dell.com> September 2003, June 2004
9 * legacy CHS retrieval by Patrick J. LoPresti <patl@users.sourceforge.net>
10 * March 2004
11 * Command line option parsing, Matt Domsch, November 2004
12 */
13
14#include <linux/edd.h>
15#include <asm/setup.h>
16
17#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
18
19# It is assumed that %ds == INITSEG here
20
21 movb $0, (EDD_MBR_SIG_NR_BUF)
22 movb $0, (EDDNR)
23
24# Check the command line for options:
25# edd=of disables EDD completely (edd=off)
26# edd=sk skips the MBR test (edd=skipmbr)
27# edd=on re-enables EDD (edd=on)
28
29 pushl %esi
30 movw $edd_mbr_sig_start, %di # Default to edd=on
31
32 movl %cs:(cmd_line_ptr), %esi
33 andl %esi, %esi
34 jz old_cl # Old boot protocol?
35
36# Convert to a real-mode pointer in fs:si
37 movl %esi, %eax
38 shrl $4, %eax
39 movw %ax, %fs
40 andw $0xf, %si
41 jmp have_cl_pointer
42
43# Old-style boot protocol?
44old_cl:
45 push %ds # aka INITSEG
46 pop %fs
47
48 cmpw $0xa33f, (0x20)
49 jne done_cl # No command line at all?
50 movw (0x22), %si # Pointer relative to INITSEG
51
52# fs:si has the pointer to the command line now
53have_cl_pointer:
54
55# Loop through kernel command line one byte at a time. Just in
56# case the loader is buggy and failed to null-terminate the command line
57# terminate if we get close enough to the end of the segment that we
58# cannot fit "edd=XX"...
59cl_atspace:
60 cmpw $-5, %si # Watch for segment wraparound
61 jae done_cl
62 movl %fs:(%si), %eax
63 andb %al, %al # End of line?
64 jz done_cl
65 cmpl $EDD_CL_EQUALS, %eax
66 jz found_edd_equals
67 cmpb $0x20, %al # <= space consider whitespace
68 ja cl_skipword
69 incw %si
70 jmp cl_atspace
71
72cl_skipword:
73 cmpw $-5, %si # Watch for segment wraparound
74 jae done_cl
75 movb %fs:(%si), %al # End of string?
76 andb %al, %al
77 jz done_cl
78 cmpb $0x20, %al
79 jbe cl_atspace
80 incw %si
81 jmp cl_skipword
82
83found_edd_equals:
84# only looking at first two characters after equals
85# late overrides early on the command line, so keep going after finding something
86 movw %fs:4(%si), %ax
87 cmpw $EDD_CL_OFF, %ax # edd=of
88 je do_edd_off
89 cmpw $EDD_CL_SKIP, %ax # edd=sk
90 je do_edd_skipmbr
91 cmpw $EDD_CL_ON, %ax # edd=on
92 je do_edd_on
93 jmp cl_skipword
94do_edd_skipmbr:
95 movw $edd_start, %di
96 jmp cl_skipword
97do_edd_off:
98 movw $edd_done, %di
99 jmp cl_skipword
100do_edd_on:
101 movw $edd_mbr_sig_start, %di
102 jmp cl_skipword
103
104done_cl:
105 popl %esi
106 jmpw *%di
107
108# Read the first sector of each BIOS disk device and store the 4-byte signature
109edd_mbr_sig_start:
110 movb $0x80, %dl # from device 80
111 movw $EDD_MBR_SIG_BUF, %bx # store buffer ptr in bx
112edd_mbr_sig_read:
113 movl $0xFFFFFFFF, %eax
114 movl %eax, (%bx) # assume failure
115 pushw %bx
116 movb $READ_SECTORS, %ah
117 movb $1, %al # read 1 sector
118 movb $0, %dh # at head 0
119 movw $1, %cx # cylinder 0, sector 0
120 pushw %es
121 pushw %ds
122 popw %es
123 movw $EDDBUF, %bx # disk's data goes into EDDBUF
124 pushw %dx # work around buggy BIOSes
125 stc # work around buggy BIOSes
126 int $0x13
127 sti # work around buggy BIOSes
128 popw %dx
129 popw %es
130 popw %bx
131 jc edd_mbr_sig_done # on failure, we're done.
132 cmpb $0, %ah # some BIOSes do not set CF
133 jne edd_mbr_sig_done # on failure, we're done.
134 movl (EDDBUF+EDD_MBR_SIG_OFFSET), %eax # read sig out of the MBR
135 movl %eax, (%bx) # store success
136 incb (EDD_MBR_SIG_NR_BUF) # note that we stored something
137 incb %dl # increment to next device
138 addw $4, %bx # increment sig buffer ptr
139 cmpb $EDD_MBR_SIG_MAX, (EDD_MBR_SIG_NR_BUF) # Out of space?
140 jb edd_mbr_sig_read # keep looping
141edd_mbr_sig_done:
142
143# Do the BIOS Enhanced Disk Drive calls
144# This consists of two calls:
145# int 13h ah=41h "Check Extensions Present"
146# int 13h ah=48h "Get Device Parameters"
147# int 13h ah=08h "Legacy Get Device Parameters"
148#
149# A buffer of size EDDMAXNR*(EDDEXTSIZE+EDDPARMSIZE) is reserved for our use
150# in the boot_params at EDDBUF. The first four bytes of which are
151# used to store the device number, interface support map and version
152# results from fn41. The next four bytes are used to store the legacy
153# cylinders, heads, and sectors from fn08. The following 74 bytes are used to
154# store the results from fn48. Starting from device 80h, fn41, then fn48
155# are called and their results stored in EDDBUF+n*(EDDEXTSIZE+EDDPARMIZE).
156# Then the pointer is incremented to store the data for the next call.
157# This repeats until either a device doesn't exist, or until EDDMAXNR
158# devices have been stored.
159# The one tricky part is that ds:si always points EDDEXTSIZE bytes into
160# the structure, and the fn41 and fn08 results are stored at offsets
161# from there. This removes the need to increment the pointer for
162# every store, and leaves it ready for the fn48 call.
163# A second one-byte buffer, EDDNR, in the boot_params stores
164# the number of BIOS devices which exist, up to EDDMAXNR.
165# In setup.c, copy_edd() stores both boot_params buffers away
166# for later use, as they would get overwritten otherwise.
167# This code is sensitive to the size of the structs in edd.h
168edd_start:
169 # %ds points to the bootsector
170 # result buffer for fn48
171 movw $EDDBUF+EDDEXTSIZE, %si # in ds:si, fn41 results
172 # kept just before that
173 movb $0x80, %dl # BIOS device 0x80
174
175edd_check_ext:
176 movb $CHECKEXTENSIONSPRESENT, %ah # Function 41
177 movw $EDDMAGIC1, %bx # magic
178 int $0x13 # make the call
179 jc edd_done # no more BIOS devices
180
181 cmpw $EDDMAGIC2, %bx # is magic right?
182 jne edd_next # nope, next...
183
184 movb %dl, %ds:-8(%si) # store device number
185 movb %ah, %ds:-7(%si) # store version
186 movw %cx, %ds:-6(%si) # store extensions
187 incb (EDDNR) # note that we stored something
188
189edd_get_device_params:
190 movw $EDDPARMSIZE, %ds:(%si) # put size
191 movw $0x0, %ds:2(%si) # work around buggy BIOSes
192 movb $GETDEVICEPARAMETERS, %ah # Function 48
193 int $0x13 # make the call
194 # Don't check for fail return
195 # it doesn't matter.
196edd_get_legacy_chs:
197 xorw %ax, %ax
198 movw %ax, %ds:-4(%si)
199 movw %ax, %ds:-2(%si)
200 # Ralf Brown's Interrupt List says to set ES:DI to
201 # 0000h:0000h "to guard against BIOS bugs"
202 pushw %es
203 movw %ax, %es
204 movw %ax, %di
205 pushw %dx # legacy call clobbers %dl
206 movb $LEGACYGETDEVICEPARAMETERS, %ah # Function 08
207 int $0x13 # make the call
208 jc edd_legacy_done # failed
209 movb %cl, %al # Low 6 bits are max
210 andb $0x3F, %al # sector number
211 movb %al, %ds:-1(%si) # Record max sect
212 movb %dh, %ds:-2(%si) # Record max head number
213 movb %ch, %al # Low 8 bits of max cyl
214 shr $6, %cl
215 movb %cl, %ah # High 2 bits of max cyl
216 movw %ax, %ds:-4(%si)
217
218edd_legacy_done:
219 popw %dx
220 popw %es
221 movw %si, %ax # increment si
222 addw $EDDPARMSIZE+EDDEXTSIZE, %ax
223 movw %ax, %si
224
225edd_next:
226 incb %dl # increment to next device
227 cmpb $EDDMAXNR, (EDDNR) # Out of space?
228 jb edd_check_ext # keep looping
229
230edd_done:
231#endif
diff --git a/arch/i386/boot/edd.c b/arch/i386/boot/edd.c
new file mode 100644
index 000000000000..25a282494f4c
--- /dev/null
+++ b/arch/i386/boot/edd.c
@@ -0,0 +1,196 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/edd.c
13 *
14 * Get EDD BIOS disk information
15 */
16
17#include "boot.h"
18#include <linux/edd.h>
19
20#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
21
22struct edd_dapa {
23 u8 pkt_size;
24 u8 rsvd;
25 u16 sector_cnt;
26 u16 buf_off, buf_seg;
27 u64 lba;
28 u64 buf_lin_addr;
29};
30
31/*
32 * Read the MBR (first sector) from a specific device.
33 */
34static int read_mbr(u8 devno, void *buf)
35{
36 struct edd_dapa dapa;
37 u16 ax, bx, cx, dx, si;
38
39 memset(&dapa, 0, sizeof dapa);
40 dapa.pkt_size = sizeof(dapa);
41 dapa.sector_cnt = 1;
42 dapa.buf_off = (size_t)buf;
43 dapa.buf_seg = ds();
44 /* dapa.lba = 0; */
45
46 ax = 0x4200; /* Extended Read */
47 si = (size_t)&dapa;
48 dx = devno;
49 asm("pushfl; stc; int $0x13; setc %%al; popfl"
50 : "+a" (ax), "+S" (si), "+d" (dx)
51 : "m" (dapa)
52 : "ebx", "ecx", "edi", "memory");
53
54 if (!(u8)ax)
55 return 0; /* OK */
56
57 ax = 0x0201; /* Legacy Read, one sector */
58 cx = 0x0001; /* Sector 0-0-1 */
59 dx = devno;
60 bx = (size_t)buf;
61 asm("pushfl; stc; int $0x13; setc %%al; popfl"
62 : "+a" (ax), "+c" (cx), "+d" (dx), "+b" (bx)
63 : : "esi", "edi", "memory");
64
65 return -(u8)ax; /* 0 or -1 */
66}
67
68static u32 read_mbr_sig(u8 devno, struct edd_info *ei)
69{
70 int sector_size;
71 char *mbrbuf_ptr, *mbrbuf_end;
72 u32 mbrsig;
73 u32 buf_base, mbr_base;
74 extern char _end[];
75 static char mbr_buf[1024];
76
77 sector_size = ei->params.bytes_per_sector;
78 if (!sector_size)
79 sector_size = 512; /* Best available guess */
80
81 buf_base = (ds() << 4) + (u32)&_end;
82 mbr_base = (buf_base+sector_size-1) & ~(sector_size-1);
83 mbrbuf_ptr = mbr_buf + (mbr_base-buf_base);
84 mbrbuf_end = mbrbuf_ptr + sector_size;
85
86 if (!(boot_params.hdr.loadflags & CAN_USE_HEAP))
87 return 0;
88 if (mbrbuf_end > (char *)(size_t)boot_params.hdr.heap_end_ptr)
89 return 0;
90
91 if (read_mbr(devno, mbrbuf_ptr))
92 return 0;
93
94 mbrsig = *(u32 *)&mbrbuf_ptr[EDD_MBR_SIG_OFFSET];
95 return mbrsig;
96}
97
98static int get_edd_info(u8 devno, struct edd_info *ei)
99{
100 u16 ax, bx, cx, dx, di;
101
102 memset(ei, 0, sizeof *ei);
103
104 /* Check Extensions Present */
105
106 ax = 0x4100;
107 bx = EDDMAGIC1;
108 dx = devno;
109 asm("pushfl; stc; int $0x13; setc %%al; popfl"
110 : "+a" (ax), "+b" (bx), "=c" (cx), "+d" (dx)
111 : : "esi", "edi");
112
113 if ((u8)ax)
114 return -1; /* No extended information */
115
116 if (bx != EDDMAGIC2)
117 return -1;
118
119 ei->device = devno;
120 ei->version = ax >> 8; /* EDD version number */
121 ei->interface_support = cx; /* EDD functionality subsets */
122
123 /* Extended Get Device Parameters */
124
125 ei->params.length = sizeof(ei->params);
126 ax = 0x4800;
127 dx = devno;
128 asm("pushfl; int $0x13; popfl"
129 : "+a" (ax), "+d" (dx)
130 : "S" (&ei->params)
131 : "ebx", "ecx", "edi");
132
133 /* Get legacy CHS parameters */
134
135 /* Ralf Brown recommends setting ES:DI to 0:0 */
136 ax = 0x0800;
137 dx = devno;
138 di = 0;
139 asm("pushw %%es; "
140 "movw %%di,%%es; "
141 "pushfl; stc; int $0x13; setc %%al; popfl; "
142 "popw %%es"
143 : "+a" (ax), "=b" (bx), "=c" (cx), "+d" (dx), "+D" (di)
144 : : "esi");
145
146 if ((u8)ax == 0) {
147 ei->legacy_max_cylinder = (cx >> 8) + ((cx & 0xc0) << 2);
148 ei->legacy_max_head = dx >> 8;
149 ei->legacy_sectors_per_track = cx & 0x3f;
150 }
151
152 return 0;
153}
154
155void query_edd(void)
156{
157 char eddarg[8];
158 int do_mbr = 1;
159 int do_edd = 1;
160 int devno;
161 struct edd_info ei, *edp;
162
163 if (cmdline_find_option("edd", eddarg, sizeof eddarg) > 0) {
164 if (!strcmp(eddarg, "skipmbr") || !strcmp(eddarg, "skip"))
165 do_mbr = 0;
166 else if (!strcmp(eddarg, "off"))
167 do_edd = 0;
168 }
169
170 edp = (struct edd_info *)boot_params.eddbuf;
171
172 if (!do_edd)
173 return;
174
175 for (devno = 0x80; devno < 0x80+EDD_MBR_SIG_MAX; devno++) {
176 /*
177 * Scan the BIOS-supported hard disks and query EDD
178 * information...
179 */
180 get_edd_info(devno, &ei);
181
182 if (boot_params.eddbuf_entries < EDDMAXNR) {
183 memcpy(edp, &ei, sizeof ei);
184 edp++;
185 boot_params.eddbuf_entries++;
186 }
187
188 if (do_mbr) {
189 u32 mbr_sig;
190 mbr_sig = read_mbr_sig(devno, &ei);
191 boot_params.edd_mbr_sig_buffer[devno-0x80] = mbr_sig;
192 }
193 }
194}
195
196#endif
diff --git a/arch/i386/boot/header.S b/arch/i386/boot/header.S
new file mode 100644
index 000000000000..6b9923fb6eae
--- /dev/null
+++ b/arch/i386/boot/header.S
@@ -0,0 +1,283 @@
1/*
2 * header.S
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 *
6 * Based on bootsect.S and setup.S
7 * modified by more people than can be counted
8 *
9 * Rewritten as a common file by H. Peter Anvin (Apr 2007)
10 *
11 * BIG FAT NOTE: We're in real mode using 64k segments. Therefore segment
12 * addresses must be multiplied by 16 to obtain their respective linear
13 * addresses. To avoid confusion, linear addresses are written using leading
14 * hex while segment addresses are written as segment:offset.
15 *
16 */
17
18#include <asm/segment.h>
19#include <linux/utsrelease.h>
20#include <asm/boot.h>
21#include <asm/e820.h>
22#include <asm/page.h>
23#include <asm/setup.h>
24#include "boot.h"
25
26SETUPSECTS = 4 /* default nr of setup-sectors */
27BOOTSEG = 0x07C0 /* original address of boot-sector */
28SYSSEG = DEF_SYSSEG /* system loaded at 0x10000 (65536) */
29SYSSIZE = DEF_SYSSIZE /* system size: # of 16-byte clicks */
30 /* to be loaded */
31ROOT_DEV = 0 /* ROOT_DEV is now written by "build" */
32SWAP_DEV = 0 /* SWAP_DEV is now written by "build" */
33
34#ifndef SVGA_MODE
35#define SVGA_MODE ASK_VGA
36#endif
37
38#ifndef RAMDISK
39#define RAMDISK 0
40#endif
41
42#ifndef ROOT_RDONLY
43#define ROOT_RDONLY 1
44#endif
45
46 .code16
47 .section ".bstext", "ax"
48
49 .global bootsect_start
50bootsect_start:
51
52 # Normalize the start address
53 ljmp $BOOTSEG, $start2
54
55start2:
56 movw %cs, %ax
57 movw %ax, %ds
58 movw %ax, %es
59 movw %ax, %ss
60 xorw %sp, %sp
61 sti
62 cld
63
64 movw $bugger_off_msg, %si
65
66msg_loop:
67 lodsb
68 andb %al, %al
69 jz bs_die
70 movb $0xe, %ah
71 movw $7, %bx
72 int $0x10
73 jmp msg_loop
74
75bs_die:
76 # Allow the user to press a key, then reboot
77 xorw %ax, %ax
78 int $0x16
79 int $0x19
80
81 # int 0x19 should never return. In case it does anyway,
82 # invoke the BIOS reset code...
83 ljmp $0xf000,$0xfff0
84
85 .section ".bsdata", "a"
86bugger_off_msg:
87 .ascii "Direct booting from floppy is no longer supported.\r\n"
88 .ascii "Please use a boot loader program instead.\r\n"
89 .ascii "\n"
90 .ascii "Remove disk and press any key to reboot . . .\r\n"
91 .byte 0
92
93
94 # Kernel attributes; used by setup. This is part 1 of the
95 # header, from the old boot sector.
96
97 .section ".header", "a"
98 .globl hdr
99hdr:
100setup_sects: .byte SETUPSECTS
101root_flags: .word ROOT_RDONLY
102syssize: .long SYSSIZE
103ram_size: .word RAMDISK
104vid_mode: .word SVGA_MODE
105root_dev: .word ROOT_DEV
106boot_flag: .word 0xAA55
107
108 # offset 512, entry point
109
110 .globl _start
111_start:
112 # Explicitly enter this as bytes, or the assembler
113 # tries to generate a 3-byte jump here, which causes
114 # everything else to push off to the wrong offset.
115 .byte 0xeb # short (2-byte) jump
116 .byte start_of_setup-1f
1171:
118
119 # Part 2 of the header, from the old setup.S
120
121 .ascii "HdrS" # header signature
122 .word 0x0206 # header version number (>= 0x0105)
123 # or else old loadlin-1.5 will fail)
124 .globl realmode_swtch
125realmode_swtch: .word 0, 0 # default_switch, SETUPSEG
126start_sys_seg: .word SYSSEG
127 .word kernel_version-512 # pointing to kernel version string
128 # above section of header is compatible
129 # with loadlin-1.5 (header v1.5). Don't
130 # change it.
131
132type_of_loader: .byte 0 # = 0, old one (LILO, Loadlin,
133 # Bootlin, SYSLX, bootsect...)
134 # See Documentation/i386/boot.txt for
135 # assigned ids
136
137# flags, unused bits must be zero (RFU) bit within loadflags
138loadflags:
139LOADED_HIGH = 1 # If set, the kernel is loaded high
140CAN_USE_HEAP = 0x80 # If set, the loader also has set
141 # heap_end_ptr to tell how much
142 # space behind setup.S can be used for
143 # heap purposes.
144 # Only the loader knows what is free
145#ifndef __BIG_KERNEL__
146 .byte 0
147#else
148 .byte LOADED_HIGH
149#endif
150
151setup_move_size: .word 0x8000 # size to move, when setup is not
152 # loaded at 0x90000. We will move setup
153 # to 0x90000 then just before jumping
154 # into the kernel. However, only the
155 # loader knows how much data behind
156 # us also needs to be loaded.
157
158code32_start: # here loaders can put a different
159 # 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
164#endif
165
166ramdisk_image: .long 0 # address of loaded ramdisk image
167 # Here the loader puts the 32-bit
168 # address where it loaded the image.
169 # This only will be read by the kernel.
170
171ramdisk_size: .long 0 # its size in bytes
172
173bootsect_kludge:
174 .long 0 # obsolete
175
176heap_end_ptr: .word _end+1024 # (Header version 0x0201 or later)
177 # space from here (exclusive) down to
178 # end of setup code can be used by setup
179 # for local heap purposes.
180
181pad1: .word 0
182cmd_line_ptr: .long 0 # (Header version 0x0202 or later)
183 # If nonzero, a 32-bit pointer
184 # to the kernel command line.
185 # The command line should be
186 # located between the start of
187 # setup and the end of low
188 # memory (0xa0000), or it may
189 # get overwritten before it
190 # gets read. If this field is
191 # used, there is no longer
192 # anything magical about the
193 # 0x90000 segment; the setup
194 # can be located anywhere in
195 # low memory 0x10000 or higher.
196
197ramdisk_max: .long (-__PAGE_OFFSET-(512 << 20)-1) & 0x7fffffff
198 # (Header version 0x0203 or later)
199 # The highest safe address for
200 # the contents of an initrd
201
202kernel_alignment: .long CONFIG_PHYSICAL_ALIGN #physical addr alignment
203 #required for protected mode
204 #kernel
205#ifdef CONFIG_RELOCATABLE
206relocatable_kernel: .byte 1
207#else
208relocatable_kernel: .byte 0
209#endif
210pad2: .byte 0
211pad3: .word 0
212
213cmdline_size: .long COMMAND_LINE_SIZE-1 #length of the command line,
214 #added with boot protocol
215 #version 2.06
216
217# End of setup header #####################################################
218
219 .section ".inittext", "ax"
220start_of_setup:
221#ifdef SAFE_RESET_DISK_CONTROLLER
222# Reset the disk controller.
223 movw $0x0000, %ax # Reset disk controller
224 movb $0x80, %dl # All disks
225 int $0x13
226#endif
227
228# We will have entired with %cs = %ds+0x20, normalize %cs so
229# it is on par with the other segments.
230 pushw %ds
231 pushw $setup2
232 lretw
233
234setup2:
235# Force %es = %ds
236 movw %ds, %ax
237 movw %ax, %es
238 cld
239
240# Stack paranoia: align the stack and make sure it is good
241# for both 16- and 32-bit references. In particular, if we
242# were meant to have been using the full 16-bit segment, the
243# caller might have set %sp to zero, which breaks %esp-based
244# references.
245 andw $~3, %sp # dword align (might as well...)
246 jnz 1f
247 movw $0xfffc, %sp # Make sure we're not zero
2481: movzwl %sp, %esp # Clear upper half of %esp
249 sti
250
251# Check signature at end of setup
252 cmpl $0x5a5aaa55, setup_sig
253 jne setup_bad
254
255# Zero the bss
256 movw $__bss_start, %di
257 movw $_end+3, %cx
258 xorl %eax, %eax
259 subw %di, %cx
260 shrw $2, %cx
261 rep; stosl
262
263# Jump to C code (should not return)
264 calll main
265
266# Setup corrupt somehow...
267setup_bad:
268 movl $setup_corrupt, %eax
269 calll puts
270 # Fall through...
271
272 .globl die
273 .type die, @function
274die:
275 hlt
276 jmp die
277
278 .size die, .-due
279
280 .section ".initdata", "a"
281setup_corrupt:
282 .byte 7
283 .string "No setup signature found..."
diff --git a/arch/i386/boot/main.c b/arch/i386/boot/main.c
new file mode 100644
index 000000000000..7f01f96c4fb8
--- /dev/null
+++ b/arch/i386/boot/main.c
@@ -0,0 +1,161 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/main.c
13 *
14 * Main module for the real-mode kernel code
15 */
16
17#include "boot.h"
18
19struct boot_params boot_params __attribute__((aligned(16)));
20
21char *HEAP = _end;
22char *heap_end = _end; /* Default end of heap = no heap */
23
24/*
25 * Copy the header into the boot parameter block. Since this
26 * screws up the old-style command line protocol, adjust by
27 * filling in the new-style command line pointer instead.
28 */
29#define OLD_CL_MAGIC 0xA33F
30#define OLD_CL_ADDRESS 0x20
31
32static void copy_boot_params(void)
33{
34 struct old_cmdline {
35 u16 cl_magic;
36 u16 cl_offset;
37 };
38 const struct old_cmdline * const oldcmd =
39 (const struct old_cmdline *)OLD_CL_ADDRESS;
40
41 BUILD_BUG_ON(sizeof boot_params != 4096);
42 memcpy(&boot_params.hdr, &hdr, sizeof hdr);
43
44 if (!boot_params.hdr.cmd_line_ptr &&
45 oldcmd->cl_magic == OLD_CL_MAGIC) {
46 /* Old-style command line protocol. */
47 u16 cmdline_seg;
48
49 /* Figure out if the command line falls in the region
50 of memory that an old kernel would have copied up
51 to 0x90000... */
52 if (oldcmd->cl_offset < boot_params.hdr.setup_move_size)
53 cmdline_seg = ds();
54 else
55 cmdline_seg = 0x9000;
56
57 boot_params.hdr.cmd_line_ptr =
58 (cmdline_seg << 4) + oldcmd->cl_offset;
59 }
60}
61
62/*
63 * Set the keyboard repeat rate to maximum. Unclear why this
64 * is done here; this might be possible to kill off as stale code.
65 */
66static void keyboard_set_repeat(void)
67{
68 u16 ax = 0x0305;
69 u16 bx = 0;
70 asm volatile("int $0x16"
71 : "+a" (ax), "+b" (bx)
72 : : "ecx", "edx", "esi", "edi");
73}
74
75/*
76 * Get Intel SpeedStep IST information.
77 */
78static void query_speedstep_ist(void)
79{
80 asm("int $0x15"
81 : "=a" (boot_params.speedstep_info[0]),
82 "=b" (boot_params.speedstep_info[1]),
83 "=c" (boot_params.speedstep_info[2]),
84 "=d" (boot_params.speedstep_info[3])
85 : "a" (0x0000e980), /* IST Support */
86 "d" (0x47534943)); /* Request value */
87}
88
89/*
90 * Tell the BIOS what CPU mode we intend to run in.
91 */
92static void set_bios_mode(void)
93{
94#ifdef CONFIG_X86_64
95 u32 eax, ebx;
96
97 eax = 0xec00;
98 ebx = 2;
99 asm volatile("int $0x15"
100 : "+a" (eax), "+b" (ebx)
101 : : "ecx", "edx", "esi", "edi");
102#endif
103}
104
105void main(void)
106{
107 /* First, copy the boot header into the "zeropage" */
108 copy_boot_params();
109
110 /* End of heap check */
111 if (boot_params.hdr.loadflags & CAN_USE_HEAP) {
112 heap_end = (char *)(boot_params.hdr.heap_end_ptr
113 +0x200-STACK_SIZE);
114 } else {
115 /* Boot protocol 2.00 only, no heap available */
116 puts("WARNING: Ancient bootloader, some functionality "
117 "may be limited!\n");
118 }
119
120 /* Make sure we have all the proper CPU support */
121 if (validate_cpu()) {
122 puts("Unable to boot - please use a kernel appropriate "
123 "for your CPU.\n");
124 die();
125 }
126
127 /* Tell the BIOS what CPU mode we intend to run in. */
128 set_bios_mode();
129
130 /* Detect memory layout */
131 detect_memory();
132
133 /* Set keyboard repeat rate (why?) */
134 keyboard_set_repeat();
135
136 /* Set the video mode */
137 set_video();
138
139 /* Query MCA information */
140 query_mca();
141
142 /* Voyager */
143#ifdef CONFIG_X86_VOYAGER
144 query_voyager();
145#endif
146
147 /* Query SpeedStep IST information */
148 query_speedstep_ist();
149
150 /* Query APM information */
151#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
152 query_apm_bios();
153#endif
154
155 /* Query EDD information */
156#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
157 query_edd();
158#endif
159 /* Do the last things and invoke protected mode */
160 go_to_protected_mode();
161}
diff --git a/arch/i386/boot/mca.c b/arch/i386/boot/mca.c
new file mode 100644
index 000000000000..68222f2d4b67
--- /dev/null
+++ b/arch/i386/boot/mca.c
@@ -0,0 +1,43 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/mca.c
13 *
14 * Get the MCA system description table
15 */
16
17#include "boot.h"
18
19int query_mca(void)
20{
21 u8 err;
22 u16 es, bx, len;
23
24 asm("pushw %%es ; "
25 "int $0x15 ; "
26 "setc %0 ; "
27 "movw %%es, %1 ; "
28 "popw %%es"
29 : "=acd" (err), "=acdSD" (es), "=b" (bx)
30 : "a" (0xc000));
31
32 if (err)
33 return -1; /* No MCA present */
34
35 set_fs(es);
36 len = rdfs16(bx);
37
38 if (len > sizeof(boot_params.sys_desc_table))
39 len = sizeof(boot_params.sys_desc_table);
40
41 copy_from_fs(&boot_params.sys_desc_table, bx, len);
42 return 0;
43}
diff --git a/arch/i386/boot/memory.c b/arch/i386/boot/memory.c
new file mode 100644
index 000000000000..1a2e62db8bed
--- /dev/null
+++ b/arch/i386/boot/memory.c
@@ -0,0 +1,99 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/memory.c
13 *
14 * Memory detection code
15 */
16
17#include "boot.h"
18
19#define SMAP 0x534d4150 /* ASCII "SMAP" */
20
21static int detect_memory_e820(void)
22{
23 u32 next = 0;
24 u32 size, id;
25 u8 err;
26 struct e820entry *desc = boot_params.e820_map;
27
28 do {
29 size = sizeof(struct e820entry);
30 id = SMAP;
31 asm("int $0x15; setc %0"
32 : "=am" (err), "+b" (next), "+d" (id), "+c" (size),
33 "=m" (*desc)
34 : "D" (desc), "a" (0xe820));
35
36 if (err || id != SMAP)
37 break;
38
39 boot_params.e820_entries++;
40 desc++;
41 } while (next && boot_params.e820_entries < E820MAX);
42
43 return boot_params.e820_entries;
44}
45
46static int detect_memory_e801(void)
47{
48 u16 ax, bx, cx, dx;
49 u8 err;
50
51 bx = cx = dx = 0;
52 ax = 0xe801;
53 asm("stc; int $0x15; setc %0"
54 : "=m" (err), "+a" (ax), "+b" (bx), "+c" (cx), "+d" (dx));
55
56 if (err)
57 return -1;
58
59 /* Do we really need to do this? */
60 if (cx || dx) {
61 ax = cx;
62 bx = dx;
63 }
64
65 if (ax > 15*1024)
66 return -1; /* Bogus! */
67
68 /* This ignores memory above 16MB if we have a memory hole
69 there. If someone actually finds a machine with a memory
70 hole at 16MB and no support for 0E820h they should probably
71 generate a fake e820 map. */
72 boot_params.alt_mem_k = (ax == 15*1024) ? (dx << 6)+ax : ax;
73
74 return 0;
75}
76
77static int detect_memory_88(void)
78{
79 u16 ax;
80 u8 err;
81
82 ax = 0x8800;
83 asm("stc; int $0x15; setc %0" : "=bcdm" (err), "+a" (ax));
84
85 boot_params.screen_info.ext_mem_k = ax;
86
87 return -err;
88}
89
90int detect_memory(void)
91{
92 if (detect_memory_e820() > 0)
93 return 0;
94
95 if (!detect_memory_e801())
96 return 0;
97
98 return detect_memory_88();
99}
diff --git a/arch/i386/boot/pm.c b/arch/i386/boot/pm.c
new file mode 100644
index 000000000000..1df025c73261
--- /dev/null
+++ b/arch/i386/boot/pm.c
@@ -0,0 +1,170 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/pm.c
13 *
14 * Prepare the machine for transition to protected mode.
15 */
16
17#include "boot.h"
18#include <asm/segment.h>
19
20/*
21 * Invoke the realmode switch hook if present; otherwise
22 * disable all interrupts.
23 */
24static void realmode_switch_hook(void)
25{
26 if (boot_params.hdr.realmode_swtch) {
27 asm volatile("lcallw *%0"
28 : : "m" (boot_params.hdr.realmode_swtch)
29 : "eax", "ebx", "ecx", "edx");
30 } else {
31 asm volatile("cli");
32 outb(0x80, 0x70); /* Disable NMI */
33 io_delay();
34 }
35}
36
37/*
38 * A zImage kernel is loaded at 0x10000 but wants to run at 0x1000.
39 * A bzImage kernel is loaded and runs at 0x100000.
40 */
41static void move_kernel_around(void)
42{
43 /* Note: rely on the compile-time option here rather than
44 the LOADED_HIGH flag. The Qemu kernel loader unconditionally
45 sets the loadflags to zero. */
46#ifndef __BIG_KERNEL__
47 u16 dst_seg, src_seg;
48 u32 syssize;
49
50 dst_seg = 0x1000 >> 4;
51 src_seg = 0x10000 >> 4;
52 syssize = boot_params.hdr.syssize; /* Size in 16-byte paragraphs */
53
54 while (syssize) {
55 int paras = (syssize >= 0x1000) ? 0x1000 : syssize;
56 int dwords = paras << 2;
57
58 asm volatile("pushw %%es ; "
59 "pushw %%ds ; "
60 "movw %1,%%es ; "
61 "movw %2,%%ds ; "
62 "xorw %%di,%%di ; "
63 "xorw %%si,%%si ; "
64 "rep;movsl ; "
65 "popw %%ds ; "
66 "popw %%es"
67 : "+c" (dwords)
68 : "r" (dst_seg), "r" (src_seg)
69 : "esi", "edi");
70
71 syssize -= paras;
72 dst_seg += paras;
73 src_seg += paras;
74 }
75#endif
76}
77
78/*
79 * Disable all interrupts at the legacy PIC.
80 */
81static void mask_all_interrupts(void)
82{
83 outb(0xff, 0xa1); /* Mask all interrupts on the seconday PIC */
84 io_delay();
85 outb(0xfb, 0x21); /* Mask all but cascade on the primary PIC */
86 io_delay();
87}
88
89/*
90 * Reset IGNNE# if asserted in the FPU.
91 */
92static void reset_coprocessor(void)
93{
94 outb(0, 0xf0);
95 io_delay();
96 outb(0, 0xf1);
97 io_delay();
98}
99
100/*
101 * Set up the GDT
102 */
103#define GDT_ENTRY(flags,base,limit) \
104 (((u64)(base & 0xff000000) << 32) | \
105 ((u64)flags << 40) | \
106 ((u64)(limit & 0x00ff0000) << 32) | \
107 ((u64)(base & 0x00ffff00) << 16) | \
108 ((u64)(limit & 0x0000ffff)))
109
110struct gdt_ptr {
111 u16 len;
112 u32 ptr;
113} __attribute__((packed));
114
115static void setup_gdt(void)
116{
117 /* There are machines which are known to not boot with the GDT
118 being 8-byte unaligned. Intel recommends 16 byte alignment. */
119 static const u64 boot_gdt[] __attribute__((aligned(16))) = {
120 /* CS: code, read/execute, 4 GB, base 0 */
121 [GDT_ENTRY_BOOT_CS] = GDT_ENTRY(0xc09b, 0, 0xfffff),
122 /* DS: data, read/write, 4 GB, base 0 */
123 [GDT_ENTRY_BOOT_DS] = GDT_ENTRY(0xc093, 0, 0xfffff),
124 };
125 struct gdt_ptr gdt;
126
127 gdt.len = sizeof(boot_gdt)-1;
128 gdt.ptr = (u32)&boot_gdt + (ds() << 4);
129
130 asm volatile("lgdtl %0" : : "m" (gdt));
131}
132
133/*
134 * Set up the IDT
135 */
136static void setup_idt(void)
137{
138 static const struct gdt_ptr null_idt = {0, 0};
139 asm volatile("lidtl %0" : : "m" (null_idt));
140}
141
142/*
143 * Actual invocation sequence
144 */
145void go_to_protected_mode(void)
146{
147 /* Hook before leaving real mode, also disables interrupts */
148 realmode_switch_hook();
149
150 /* Move the kernel/setup to their final resting places */
151 move_kernel_around();
152
153 /* Enable the A20 gate */
154 if (enable_a20()) {
155 puts("A20 gate not responding, unable to boot...\n");
156 die();
157 }
158
159 /* Reset coprocessor (IGNNE#) */
160 reset_coprocessor();
161
162 /* Mask all interrupts in the PIC */
163 mask_all_interrupts();
164
165 /* Actual transition to protected mode... */
166 setup_idt();
167 setup_gdt();
168 protected_mode_jump(boot_params.hdr.code32_start,
169 (u32)&boot_params + (ds() << 4));
170}
diff --git a/arch/i386/boot/pmjump.S b/arch/i386/boot/pmjump.S
new file mode 100644
index 000000000000..2e559233725a
--- /dev/null
+++ b/arch/i386/boot/pmjump.S
@@ -0,0 +1,54 @@
1/* ----------------------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/pmjump.S
13 *
14 * The actual transition into protected mode
15 */
16
17#include <asm/boot.h>
18#include <asm/segment.h>
19
20 .text
21
22 .globl protected_mode_jump
23 .type protected_mode_jump, @function
24
25 .code16
26
27/*
28 * void protected_mode_jump(u32 entrypoint, u32 bootparams);
29 */
30protected_mode_jump:
31 xorl %ebx, %ebx # Flag to indicate this is a boot
32 movl %edx, %esi # Pointer to boot_params table
33 movl %eax, 2f # Patch ljmpl instruction
34 jmp 1f # Short jump to flush instruction q.
35
361:
37 movw $__BOOT_DS, %cx
38
39 movl %cr0, %edx
40 orb $1, %dl # Protected mode (PE) bit
41 movl %edx, %cr0
42
43 movw %cx, %ds
44 movw %cx, %es
45 movw %cx, %fs
46 movw %cx, %gs
47 movw %cx, %ss
48
49 # Jump to the 32-bit entrypoint
50 .byte 0x66, 0xea # ljmpl opcode
512: .long 0 # offset
52 .word __BOOT_CS # segment
53
54 .size protected_mode_jump, .-protected_mode_jump
diff --git a/arch/i386/boot/printf.c b/arch/i386/boot/printf.c
new file mode 100644
index 000000000000..1a09f9309d3c
--- /dev/null
+++ b/arch/i386/boot/printf.c
@@ -0,0 +1,307 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/printf.c
13 *
14 * Oh, it's a waste of space, but oh-so-yummy for debugging. This
15 * version of printf() does not include 64-bit support. "Live with
16 * it."
17 *
18 */
19
20#include "boot.h"
21
22static int skip_atoi(const char **s)
23{
24 int i = 0;
25
26 while (isdigit(**s))
27 i = i * 10 + *((*s)++) - '0';
28 return i;
29}
30
31#define ZEROPAD 1 /* pad with zero */
32#define SIGN 2 /* unsigned/signed long */
33#define PLUS 4 /* show plus */
34#define SPACE 8 /* space if plus */
35#define LEFT 16 /* left justified */
36#define SPECIAL 32 /* 0x */
37#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
38
39#define do_div(n,base) ({ \
40int __res; \
41__res = ((unsigned long) n) % (unsigned) base; \
42n = ((unsigned long) n) / (unsigned) base; \
43__res; })
44
45static char *number(char *str, long num, int base, int size, int precision,
46 int type)
47{
48 char c, sign, tmp[66];
49 const char *digits = "0123456789abcdefghijklmnopqrstuvwxyz";
50 int i;
51
52 if (type & LARGE)
53 digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
54 if (type & LEFT)
55 type &= ~ZEROPAD;
56 if (base < 2 || base > 36)
57 return 0;
58 c = (type & ZEROPAD) ? '0' : ' ';
59 sign = 0;
60 if (type & SIGN) {
61 if (num < 0) {
62 sign = '-';
63 num = -num;
64 size--;
65 } else if (type & PLUS) {
66 sign = '+';
67 size--;
68 } else if (type & SPACE) {
69 sign = ' ';
70 size--;
71 }
72 }
73 if (type & SPECIAL) {
74 if (base == 16)
75 size -= 2;
76 else if (base == 8)
77 size--;
78 }
79 i = 0;
80 if (num == 0)
81 tmp[i++] = '0';
82 else
83 while (num != 0)
84 tmp[i++] = digits[do_div(num, base)];
85 if (i > precision)
86 precision = i;
87 size -= precision;
88 if (!(type & (ZEROPAD + LEFT)))
89 while (size-- > 0)
90 *str++ = ' ';
91 if (sign)
92 *str++ = sign;
93 if (type & SPECIAL) {
94 if (base == 8)
95 *str++ = '0';
96 else if (base == 16) {
97 *str++ = '0';
98 *str++ = digits[33];
99 }
100 }
101 if (!(type & LEFT))
102 while (size-- > 0)
103 *str++ = c;
104 while (i < precision--)
105 *str++ = '0';
106 while (i-- > 0)
107 *str++ = tmp[i];
108 while (size-- > 0)
109 *str++ = ' ';
110 return str;
111}
112
113int vsprintf(char *buf, const char *fmt, va_list args)
114{
115 int len;
116 unsigned long num;
117 int i, base;
118 char *str;
119 const char *s;
120
121 int flags; /* flags to number() */
122
123 int field_width; /* width of output field */
124 int precision; /* min. # of digits for integers; max
125 number of chars for from string */
126 int qualifier; /* 'h', 'l', or 'L' for integer fields */
127
128 for (str = buf; *fmt; ++fmt) {
129 if (*fmt != '%') {
130 *str++ = *fmt;
131 continue;
132 }
133
134 /* process flags */
135 flags = 0;
136 repeat:
137 ++fmt; /* this also skips first '%' */
138 switch (*fmt) {
139 case '-':
140 flags |= LEFT;
141 goto repeat;
142 case '+':
143 flags |= PLUS;
144 goto repeat;
145 case ' ':
146 flags |= SPACE;
147 goto repeat;
148 case '#':
149 flags |= SPECIAL;
150 goto repeat;
151 case '0':
152 flags |= ZEROPAD;
153 goto repeat;
154 }
155
156 /* get field width */
157 field_width = -1;
158 if (isdigit(*fmt))
159 field_width = skip_atoi(&fmt);
160 else if (*fmt == '*') {
161 ++fmt;
162 /* it's the next argument */
163 field_width = va_arg(args, int);
164 if (field_width < 0) {
165 field_width = -field_width;
166 flags |= LEFT;
167 }
168 }
169
170 /* get the precision */
171 precision = -1;
172 if (*fmt == '.') {
173 ++fmt;
174 if (isdigit(*fmt))
175 precision = skip_atoi(&fmt);
176 else if (*fmt == '*') {
177 ++fmt;
178 /* it's the next argument */
179 precision = va_arg(args, int);
180 }
181 if (precision < 0)
182 precision = 0;
183 }
184
185 /* get the conversion qualifier */
186 qualifier = -1;
187 if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') {
188 qualifier = *fmt;
189 ++fmt;
190 }
191
192 /* default base */
193 base = 10;
194
195 switch (*fmt) {
196 case 'c':
197 if (!(flags & LEFT))
198 while (--field_width > 0)
199 *str++ = ' ';
200 *str++ = (unsigned char)va_arg(args, int);
201 while (--field_width > 0)
202 *str++ = ' ';
203 continue;
204
205 case 's':
206 s = va_arg(args, char *);
207 len = strnlen(s, precision);
208
209 if (!(flags & LEFT))
210 while (len < field_width--)
211 *str++ = ' ';
212 for (i = 0; i < len; ++i)
213 *str++ = *s++;
214 while (len < field_width--)
215 *str++ = ' ';
216 continue;
217
218 case 'p':
219 if (field_width == -1) {
220 field_width = 2 * sizeof(void *);
221 flags |= ZEROPAD;
222 }
223 str = number(str,
224 (unsigned long)va_arg(args, void *), 16,
225 field_width, precision, flags);
226 continue;
227
228 case 'n':
229 if (qualifier == 'l') {
230 long *ip = va_arg(args, long *);
231 *ip = (str - buf);
232 } else {
233 int *ip = va_arg(args, int *);
234 *ip = (str - buf);
235 }
236 continue;
237
238 case '%':
239 *str++ = '%';
240 continue;
241
242 /* integer number formats - set up the flags and "break" */
243 case 'o':
244 base = 8;
245 break;
246
247 case 'X':
248 flags |= LARGE;
249 case 'x':
250 base = 16;
251 break;
252
253 case 'd':
254 case 'i':
255 flags |= SIGN;
256 case 'u':
257 break;
258
259 default:
260 *str++ = '%';
261 if (*fmt)
262 *str++ = *fmt;
263 else
264 --fmt;
265 continue;
266 }
267 if (qualifier == 'l')
268 num = va_arg(args, unsigned long);
269 else if (qualifier == 'h') {
270 num = (unsigned short)va_arg(args, int);
271 if (flags & SIGN)
272 num = (short)num;
273 } else if (flags & SIGN)
274 num = va_arg(args, int);
275 else
276 num = va_arg(args, unsigned int);
277 str = number(str, num, base, field_width, precision, flags);
278 }
279 *str = '\0';
280 return str - buf;
281}
282
283int sprintf(char *buf, const char *fmt, ...)
284{
285 va_list args;
286 int i;
287
288 va_start(args, fmt);
289 i = vsprintf(buf, fmt, args);
290 va_end(args);
291 return i;
292}
293
294int printf(const char *fmt, ...)
295{
296 char printf_buf[1024];
297 va_list args;
298 int printed;
299
300 va_start(args, fmt);
301 printed = vsprintf(printf_buf, fmt, args);
302 va_end(args);
303
304 puts(printf_buf);
305
306 return printed;
307}
diff --git a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S
deleted file mode 100644
index 6dbcc95b2120..000000000000
--- a/arch/i386/boot/setup.S
+++ /dev/null
@@ -1,1075 +0,0 @@
1/*
2 * setup.S Copyright (C) 1991, 1992 Linus Torvalds
3 *
4 * setup.s is responsible for getting the system data from the BIOS,
5 * and putting them into the appropriate places in system memory.
6 * both setup.s and system has been loaded by the bootblock.
7 *
8 * This code asks the bios for memory/disk/other parameters, and
9 * puts them in a "safe" place: 0x90000-0x901FF, ie where the
10 * boot-block used to be. It is then up to the protected mode
11 * system to read them from there before the area is overwritten
12 * for buffer-blocks.
13 *
14 * Move PS/2 aux init code to psaux.c
15 * (troyer@saifr00.cfsat.Honeywell.COM) 03Oct92
16 *
17 * some changes and additional features by Christoph Niemann,
18 * March 1993/June 1994 (Christoph.Niemann@linux.org)
19 *
20 * add APM BIOS checking by Stephen Rothwell, May 1994
21 * (sfr@canb.auug.org.au)
22 *
23 * High load stuff, initrd support and position independency
24 * by Hans Lermen & Werner Almesberger, February 1996
25 * <lermen@elserv.ffm.fgan.de>, <almesber@lrc.epfl.ch>
26 *
27 * Video handling moved to video.S by Martin Mares, March 1996
28 * <mj@k332.feld.cvut.cz>
29 *
30 * Extended memory detection scheme retwiddled by orc@pell.chi.il.us (david
31 * parsons) to avoid loadlin confusion, July 1997
32 *
33 * Transcribed from Intel (as86) -> AT&T (gas) by Chris Noe, May 1999.
34 * <stiker@northlink.com>
35 *
36 * Fix to work around buggy BIOSes which don't use carry bit correctly
37 * and/or report extended memory in CX/DX for e801h memory size detection
38 * call. As a result the kernel got wrong figures. The int15/e801h docs
39 * from Ralf Brown interrupt list seem to indicate AX/BX should be used
40 * anyway. So to avoid breaking many machines (presumably there was a reason
41 * to orginally use CX/DX instead of AX/BX), we do a kludge to see
42 * if CX/DX have been changed in the e801 call and if so use AX/BX .
43 * Michael Miller, April 2001 <michaelm@mjmm.org>
44 *
45 * New A20 code ported from SYSLINUX by H. Peter Anvin. AMD Elan bugfixes
46 * by Robert Schwebel, December 2001 <robert@schwebel.de>
47 */
48
49#include <asm/segment.h>
50#include <linux/utsrelease.h>
51#include <linux/compile.h>
52#include <asm/boot.h>
53#include <asm/e820.h>
54#include <asm/page.h>
55#include <asm/setup.h>
56
57/* Signature words to ensure LILO loaded us right */
58#define SIG1 0xAA55
59#define SIG2 0x5A5A
60
61INITSEG = DEF_INITSEG # 0x9000, we move boot here, out of the way
62SYSSEG = DEF_SYSSEG # 0x1000, system loaded at 0x10000 (65536).
63SETUPSEG = DEF_SETUPSEG # 0x9020, this is the current segment
64 # ... and the former contents of CS
65
66DELTA_INITSEG = SETUPSEG - INITSEG # 0x0020
67
68.code16
69.globl begtext, begdata, begbss, endtext, enddata, endbss
70
71.text
72begtext:
73.data
74begdata:
75.bss
76begbss:
77.text
78
79start:
80 jmp trampoline
81
82# This is the setup header, and it must start at %cs:2 (old 0x9020:2)
83
84 .ascii "HdrS" # header signature
85 .word 0x0206 # header version number (>= 0x0105)
86 # or else old loadlin-1.5 will fail)
87realmode_swtch: .word 0, 0 # default_switch, SETUPSEG
88start_sys_seg: .word SYSSEG
89 .word kernel_version # pointing to kernel version string
90 # above section of header is compatible
91 # with loadlin-1.5 (header v1.5). Don't
92 # change it.
93
94type_of_loader: .byte 0 # = 0, old one (LILO, Loadlin,
95 # Bootlin, SYSLX, bootsect...)
96 # See Documentation/i386/boot.txt for
97 # assigned ids
98
99# flags, unused bits must be zero (RFU) bit within loadflags
100loadflags:
101LOADED_HIGH = 1 # If set, the kernel is loaded high
102CAN_USE_HEAP = 0x80 # If set, the loader also has set
103 # heap_end_ptr to tell how much
104 # space behind setup.S can be used for
105 # heap purposes.
106 # Only the loader knows what is free
107#ifndef __BIG_KERNEL__
108 .byte 0
109#else
110 .byte LOADED_HIGH
111#endif
112
113setup_move_size: .word 0x8000 # size to move, when setup is not
114 # loaded at 0x90000. We will move setup
115 # to 0x90000 then just before jumping
116 # into the kernel. However, only the
117 # loader knows how much data behind
118 # us also needs to be loaded.
119
120code32_start: # here loaders can put a different
121 # start address for 32-bit code.
122#ifndef __BIG_KERNEL__
123 .long 0x1000 # 0x1000 = default for zImage
124#else
125 .long 0x100000 # 0x100000 = default for big kernel
126#endif
127
128ramdisk_image: .long 0 # address of loaded ramdisk image
129 # Here the loader puts the 32-bit
130 # address where it loaded the image.
131 # This only will be read by the kernel.
132
133ramdisk_size: .long 0 # its size in bytes
134
135bootsect_kludge:
136 .long 0 # obsolete
137
138heap_end_ptr: .word modelist+1024 # (Header version 0x0201 or later)
139 # space from here (exclusive) down to
140 # end of setup code can be used by setup
141 # for local heap purposes.
142
143pad1: .word 0
144cmd_line_ptr: .long 0 # (Header version 0x0202 or later)
145 # If nonzero, a 32-bit pointer
146 # to the kernel command line.
147 # The command line should be
148 # located between the start of
149 # setup and the end of low
150 # memory (0xa0000), or it may
151 # get overwritten before it
152 # gets read. If this field is
153 # used, there is no longer
154 # anything magical about the
155 # 0x90000 segment; the setup
156 # can be located anywhere in
157 # low memory 0x10000 or higher.
158
159ramdisk_max: .long (-__PAGE_OFFSET-(512 << 20)-1) & 0x7fffffff
160 # (Header version 0x0203 or later)
161 # The highest safe address for
162 # the contents of an initrd
163
164kernel_alignment: .long CONFIG_PHYSICAL_ALIGN #physical addr alignment
165 #required for protected mode
166 #kernel
167#ifdef CONFIG_RELOCATABLE
168relocatable_kernel: .byte 1
169#else
170relocatable_kernel: .byte 0
171#endif
172pad2: .byte 0
173pad3: .word 0
174
175cmdline_size: .long COMMAND_LINE_SIZE-1 #length of the command line,
176 #added with boot protocol
177 #version 2.06
178
179trampoline: call start_of_setup
180 .align 16
181 # The offset at this point is 0x240
182 .space (0xeff-0x240+1) # E820 & EDD space (ending at 0xeff)
183# End of setup header #####################################################
184
185start_of_setup:
186# Bootlin depends on this being done early
187 movw $0x01500, %ax
188 movb $0x81, %dl
189 int $0x13
190
191#ifdef SAFE_RESET_DISK_CONTROLLER
192# Reset the disk controller.
193 movw $0x0000, %ax
194 movb $0x80, %dl
195 int $0x13
196#endif
197
198# Set %ds = %cs, we know that SETUPSEG = %cs at this point
199 movw %cs, %ax # aka SETUPSEG
200 movw %ax, %ds
201# Check signature at end of setup
202 cmpw $SIG1, setup_sig1
203 jne bad_sig
204
205 cmpw $SIG2, setup_sig2
206 jne bad_sig
207
208 jmp good_sig1
209
210# Routine to print asciiz string at ds:si
211prtstr:
212 lodsb
213 andb %al, %al
214 jz fin
215
216 call prtchr
217 jmp prtstr
218
219fin: ret
220
221# Space printing
222prtsp2: call prtspc # Print double space
223prtspc: movb $0x20, %al # Print single space (note: fall-thru)
224
225# Part of above routine, this one just prints ascii al
226prtchr: pushw %ax
227 pushw %cx
228 movw $7,%bx
229 movw $0x01, %cx
230 movb $0x0e, %ah
231 int $0x10
232 popw %cx
233 popw %ax
234 ret
235
236beep: movb $0x07, %al
237 jmp prtchr
238
239no_sig_mess: .string "No setup signature found ..."
240
241good_sig1:
242 jmp good_sig
243
244# We now have to find the rest of the setup code/data
245bad_sig:
246 movw %cs, %ax # SETUPSEG
247 subw $DELTA_INITSEG, %ax # INITSEG
248 movw %ax, %ds
249 xorb %bh, %bh
250 movb (497), %bl # get setup sect from bootsect
251 subw $4, %bx # LILO loads 4 sectors of setup
252 shlw $8, %bx # convert to words (1sect=2^8 words)
253 movw %bx, %cx
254 shrw $3, %bx # convert to segment
255 addw $SYSSEG, %bx
256 movw %bx, %cs:start_sys_seg
257# Move rest of setup code/data to here
258 movw $2048, %di # four sectors loaded by LILO
259 subw %si, %si
260 pushw %cs
261 popw %es
262 movw $SYSSEG, %ax
263 movw %ax, %ds
264 rep
265 movsw
266 movw %cs, %ax # aka SETUPSEG
267 movw %ax, %ds
268 cmpw $SIG1, setup_sig1
269 jne no_sig
270
271 cmpw $SIG2, setup_sig2
272 jne no_sig
273
274 jmp good_sig
275
276no_sig:
277 lea no_sig_mess, %si
278 call prtstr
279
280no_sig_loop:
281 hlt
282 jmp no_sig_loop
283
284good_sig:
285 movw %cs, %ax # aka SETUPSEG
286 subw $DELTA_INITSEG, %ax # aka INITSEG
287 movw %ax, %ds
288# Check if an old loader tries to load a big-kernel
289 testb $LOADED_HIGH, %cs:loadflags # Do we have a big kernel?
290 jz loader_ok # No, no danger for old loaders.
291
292 cmpb $0, %cs:type_of_loader # Do we have a loader that
293 # can deal with us?
294 jnz loader_ok # Yes, continue.
295
296 pushw %cs # No, we have an old loader,
297 popw %ds # die.
298 lea loader_panic_mess, %si
299 call prtstr
300
301 jmp no_sig_loop
302
303loader_panic_mess: .string "Wrong loader, giving up..."
304
305# check minimum cpuid
306# we do this here because it is the last place we can actually
307# show a user visible error message. Later the video modus
308# might be already messed up.
309loader_ok:
310 call verify_cpu
311 testl %eax,%eax
312 jz cpu_ok
313 movw %cs,%ax # aka SETUPSEG
314 movw %ax,%ds
315 lea cpu_panic_mess,%si
316 call prtstr
3171: jmp 1b
318
319cpu_panic_mess:
320 .asciz "PANIC: CPU too old for this kernel."
321
322#include "../kernel/verify_cpu.S"
323
324cpu_ok:
325# Get memory size (extended mem, kB)
326
327 xorl %eax, %eax
328 movl %eax, (0x1e0)
329#ifndef STANDARD_MEMORY_BIOS_CALL
330 movb %al, (E820NR)
331# Try three different memory detection schemes. First, try
332# e820h, which lets us assemble a memory map, then try e801h,
333# which returns a 32-bit memory size, and finally 88h, which
334# returns 0-64m
335
336# method E820H:
337# the memory map from hell. e820h returns memory classified into
338# a whole bunch of different types, and allows memory holes and
339# everything. We scan through this memory map and build a list
340# of the first 32 memory areas, which we return at [E820MAP].
341# This is documented at http://www.acpi.info/, in the ACPI 2.0 specification.
342
343#define SMAP 0x534d4150
344
345meme820:
346 xorl %ebx, %ebx # continuation counter
347 movw $E820MAP, %di # point into the whitelist
348 # so we can have the bios
349 # directly write into it.
350
351jmpe820:
352 movl $0x0000e820, %eax # e820, upper word zeroed
353 movl $SMAP, %edx # ascii 'SMAP'
354 movl $20, %ecx # size of the e820rec
355 pushw %ds # data record.
356 popw %es
357 int $0x15 # make the call
358 jc bail820 # fall to e801 if it fails
359
360 cmpl $SMAP, %eax # check the return is `SMAP'
361 jne bail820 # fall to e801 if it fails
362
363# cmpl $1, 16(%di) # is this usable memory?
364# jne again820
365
366 # If this is usable memory, we save it by simply advancing %di by
367 # sizeof(e820rec).
368 #
369good820:
370 movb (E820NR), %al # up to 128 entries
371 cmpb $E820MAX, %al
372 jae bail820
373
374 incb (E820NR)
375 movw %di, %ax
376 addw $20, %ax
377 movw %ax, %di
378again820:
379 cmpl $0, %ebx # check to see if
380 jne jmpe820 # %ebx is set to EOF
381bail820:
382
383
384# method E801H:
385# memory size is in 1k chunksizes, to avoid confusing loadlin.
386# we store the 0xe801 memory size in a completely different place,
387# because it will most likely be longer than 16 bits.
388# (use 1e0 because that's what Larry Augustine uses in his
389# alternative new memory detection scheme, and it's sensible
390# to write everything into the same place.)
391
392meme801:
393 stc # fix to work around buggy
394 xorw %cx,%cx # BIOSes which don't clear/set
395 xorw %dx,%dx # carry on pass/error of
396 # e801h memory size call
397 # or merely pass cx,dx though
398 # without changing them.
399 movw $0xe801, %ax
400 int $0x15
401 jc mem88
402
403 cmpw $0x0, %cx # Kludge to handle BIOSes
404 jne e801usecxdx # which report their extended
405 cmpw $0x0, %dx # memory in AX/BX rather than
406 jne e801usecxdx # CX/DX. The spec I have read
407 movw %ax, %cx # seems to indicate AX/BX
408 movw %bx, %dx # are more reasonable anyway...
409
410e801usecxdx:
411 andl $0xffff, %edx # clear sign extend
412 shll $6, %edx # and go from 64k to 1k chunks
413 movl %edx, (0x1e0) # store extended memory size
414 andl $0xffff, %ecx # clear sign extend
415 addl %ecx, (0x1e0) # and add lower memory into
416 # total size.
417
418# Ye Olde Traditional Methode. Returns the memory size (up to 16mb or
419# 64mb, depending on the bios) in ax.
420mem88:
421
422#endif
423 movb $0x88, %ah
424 int $0x15
425 movw %ax, (2)
426
427# Set the keyboard repeat rate to the max
428 movw $0x0305, %ax
429 xorw %bx, %bx
430 int $0x16
431
432# Check for video adapter and its parameters and allow the
433# user to browse video modes.
434 call video # NOTE: we need %ds pointing
435 # to bootsector
436
437# Get hd0 data...
438 xorw %ax, %ax
439 movw %ax, %ds
440 ldsw (4 * 0x41), %si
441 movw %cs, %ax # aka SETUPSEG
442 subw $DELTA_INITSEG, %ax # aka INITSEG
443 pushw %ax
444 movw %ax, %es
445 movw $0x0080, %di
446 movw $0x10, %cx
447 pushw %cx
448 cld
449 rep
450 movsb
451# Get hd1 data...
452 xorw %ax, %ax
453 movw %ax, %ds
454 ldsw (4 * 0x46), %si
455 popw %cx
456 popw %es
457 movw $0x0090, %di
458 rep
459 movsb
460# Check that there IS a hd1 :-)
461 movw $0x01500, %ax
462 movb $0x81, %dl
463 int $0x13
464 jc no_disk1
465
466 cmpb $3, %ah
467 je is_disk1
468
469no_disk1:
470 movw %cs, %ax # aka SETUPSEG
471 subw $DELTA_INITSEG, %ax # aka INITSEG
472 movw %ax, %es
473 movw $0x0090, %di
474 movw $0x10, %cx
475 xorw %ax, %ax
476 cld
477 rep
478 stosb
479is_disk1:
480# check for Micro Channel (MCA) bus
481 movw %cs, %ax # aka SETUPSEG
482 subw $DELTA_INITSEG, %ax # aka INITSEG
483 movw %ax, %ds
484 xorw %ax, %ax
485 movw %ax, (0xa0) # set table length to 0
486 movb $0xc0, %ah
487 stc
488 int $0x15 # moves feature table to es:bx
489 jc no_mca
490
491 pushw %ds
492 movw %es, %ax
493 movw %ax, %ds
494 movw %cs, %ax # aka SETUPSEG
495 subw $DELTA_INITSEG, %ax # aka INITSEG
496 movw %ax, %es
497 movw %bx, %si
498 movw $0xa0, %di
499 movw (%si), %cx
500 addw $2, %cx # table length is a short
501 cmpw $0x10, %cx
502 jc sysdesc_ok
503
504 movw $0x10, %cx # we keep only first 16 bytes
505sysdesc_ok:
506 rep
507 movsb
508 popw %ds
509no_mca:
510#ifdef CONFIG_X86_VOYAGER
511 movb $0xff, 0x40 # flag on config found
512 movb $0xc0, %al
513 mov $0xff, %ah
514 int $0x15 # put voyager config info at es:di
515 jc no_voyager
516 movw $0x40, %si # place voyager info in apm table
517 cld
518 movw $7, %cx
519voyager_rep:
520 movb %es:(%di), %al
521 movb %al,(%si)
522 incw %di
523 incw %si
524 decw %cx
525 jnz voyager_rep
526no_voyager:
527#endif
528# Check for PS/2 pointing device
529 movw %cs, %ax # aka SETUPSEG
530 subw $DELTA_INITSEG, %ax # aka INITSEG
531 movw %ax, %ds
532 movb $0, (0x1ff) # default is no pointing device
533 int $0x11 # int 0x11: equipment list
534 testb $0x04, %al # check if mouse installed
535 jz no_psmouse
536
537 movb $0xAA, (0x1ff) # device present
538no_psmouse:
539
540#if defined(CONFIG_X86_SPEEDSTEP_SMI) || defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE)
541 movl $0x0000E980, %eax # IST Support
542 movl $0x47534943, %edx # Request value
543 int $0x15
544
545 movl %eax, (96)
546 movl %ebx, (100)
547 movl %ecx, (104)
548 movl %edx, (108)
549#endif
550
551#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
552# Then check for an APM BIOS...
553 # %ds points to the bootsector
554 movw $0, 0x40 # version = 0 means no APM BIOS
555 movw $0x05300, %ax # APM BIOS installation check
556 xorw %bx, %bx
557 int $0x15
558 jc done_apm_bios # Nope, no APM BIOS
559
560 cmpw $0x0504d, %bx # Check for "PM" signature
561 jne done_apm_bios # No signature, no APM BIOS
562
563 andw $0x02, %cx # Is 32 bit supported?
564 je done_apm_bios # No 32-bit, no (good) APM BIOS
565
566 movw $0x05304, %ax # Disconnect first just in case
567 xorw %bx, %bx
568 int $0x15 # ignore return code
569 movw $0x05303, %ax # 32 bit connect
570 xorl %ebx, %ebx
571 xorw %cx, %cx # paranoia :-)
572 xorw %dx, %dx # ...
573 xorl %esi, %esi # ...
574 xorw %di, %di # ...
575 int $0x15
576 jc no_32_apm_bios # Ack, error.
577
578 movw %ax, (66) # BIOS code segment
579 movl %ebx, (68) # BIOS entry point offset
580 movw %cx, (72) # BIOS 16 bit code segment
581 movw %dx, (74) # BIOS data segment
582 movl %esi, (78) # BIOS code segment lengths
583 movw %di, (82) # BIOS data segment length
584# Redo the installation check as the 32 bit connect
585# modifies the flags returned on some BIOSs
586 movw $0x05300, %ax # APM BIOS installation check
587 xorw %bx, %bx
588 xorw %cx, %cx # paranoia
589 int $0x15
590 jc apm_disconnect # error -> shouldn't happen
591
592 cmpw $0x0504d, %bx # check for "PM" signature
593 jne apm_disconnect # no sig -> shouldn't happen
594
595 movw %ax, (64) # record the APM BIOS version
596 movw %cx, (76) # and flags
597 jmp done_apm_bios
598
599apm_disconnect: # Tidy up
600 movw $0x05304, %ax # Disconnect
601 xorw %bx, %bx
602 int $0x15 # ignore return code
603
604 jmp done_apm_bios
605
606no_32_apm_bios:
607 andw $0xfffd, (76) # remove 32 bit support bit
608done_apm_bios:
609#endif
610
611#include "edd.S"
612
613# Now we want to move to protected mode ...
614 cmpw $0, %cs:realmode_swtch
615 jz rmodeswtch_normal
616
617 lcall *%cs:realmode_swtch
618
619 jmp rmodeswtch_end
620
621rmodeswtch_normal:
622 pushw %cs
623 call default_switch
624
625rmodeswtch_end:
626# Now we move the system to its rightful place ... but we check if we have a
627# big-kernel. In that case we *must* not move it ...
628 testb $LOADED_HIGH, %cs:loadflags
629 jz do_move0 # .. then we have a normal low
630 # loaded zImage
631 # .. or else we have a high
632 # loaded bzImage
633 jmp end_move # ... and we skip moving
634
635do_move0:
636 movw $0x100, %ax # start of destination segment
637 movw %cs, %bp # aka SETUPSEG
638 subw $DELTA_INITSEG, %bp # aka INITSEG
639 movw %cs:start_sys_seg, %bx # start of source segment
640 cld
641do_move:
642 movw %ax, %es # destination segment
643 incb %ah # instead of add ax,#0x100
644 movw %bx, %ds # source segment
645 addw $0x100, %bx
646 subw %di, %di
647 subw %si, %si
648 movw $0x800, %cx
649 rep
650 movsw
651 cmpw %bp, %bx # assume start_sys_seg > 0x200,
652 # so we will perhaps read one
653 # page more than needed, but
654 # never overwrite INITSEG
655 # because destination is a
656 # minimum one page below source
657 jb do_move
658
659end_move:
660# then we load the segment descriptors
661 movw %cs, %ax # aka SETUPSEG
662 movw %ax, %ds
663
664# Check whether we need to be downward compatible with version <=201
665 cmpl $0, cmd_line_ptr
666 jne end_move_self # loader uses version >=202 features
667 cmpb $0x20, type_of_loader
668 je end_move_self # bootsect loader, we know of it
669
670# Boot loader doesnt support boot protocol version 2.02.
671# If we have our code not at 0x90000, we need to move it there now.
672# We also then need to move the params behind it (commandline)
673# Because we would overwrite the code on the current IP, we move
674# it in two steps, jumping high after the first one.
675 movw %cs, %ax
676 cmpw $SETUPSEG, %ax
677 je end_move_self
678
679 cli # make sure we really have
680 # interrupts disabled !
681 # because after this the stack
682 # should not be used
683 subw $DELTA_INITSEG, %ax # aka INITSEG
684 movw %ss, %dx
685 cmpw %ax, %dx
686 jb move_self_1
687
688 addw $INITSEG, %dx
689 subw %ax, %dx # this will go into %ss after
690 # the move
691move_self_1:
692 movw %ax, %ds
693 movw $INITSEG, %ax # real INITSEG
694 movw %ax, %es
695 movw %cs:setup_move_size, %cx
696 std # we have to move up, so we use
697 # direction down because the
698 # areas may overlap
699 movw %cx, %di
700 decw %di
701 movw %di, %si
702 subw $move_self_here+0x200, %cx
703 rep
704 movsb
705 ljmp $SETUPSEG, $move_self_here
706
707move_self_here:
708 movw $move_self_here+0x200, %cx
709 rep
710 movsb
711 movw $SETUPSEG, %ax
712 movw %ax, %ds
713 movw %dx, %ss
714end_move_self: # now we are at the right place
715
716#
717# Enable A20. This is at the very best an annoying procedure.
718# A20 code ported from SYSLINUX 1.52-1.63 by H. Peter Anvin.
719# AMD Elan bug fix by Robert Schwebel.
720#
721
722#if defined(CONFIG_X86_ELAN)
723 movb $0x02, %al # alternate A20 gate
724 outb %al, $0x92 # this works on SC410/SC520
725a20_elan_wait:
726 call a20_test
727 jz a20_elan_wait
728 jmp a20_done
729#endif
730
731
732A20_TEST_LOOPS = 32 # Iterations per wait
733A20_ENABLE_LOOPS = 255 # Total loops to try
734
735
736#ifndef CONFIG_X86_VOYAGER
737a20_try_loop:
738
739 # First, see if we are on a system with no A20 gate.
740a20_none:
741 call a20_test
742 jnz a20_done
743
744 # Next, try the BIOS (INT 0x15, AX=0x2401)
745a20_bios:
746 movw $0x2401, %ax
747 pushfl # Be paranoid about flags
748 int $0x15
749 popfl
750
751 call a20_test
752 jnz a20_done
753
754 # Try enabling A20 through the keyboard controller
755#endif /* CONFIG_X86_VOYAGER */
756a20_kbc:
757 call empty_8042
758
759#ifndef CONFIG_X86_VOYAGER
760 call a20_test # Just in case the BIOS worked
761 jnz a20_done # but had a delayed reaction.
762#endif
763
764 movb $0xD1, %al # command write
765 outb %al, $0x64
766 call empty_8042
767
768 movb $0xDF, %al # A20 on
769 outb %al, $0x60
770 call empty_8042
771
772#ifndef CONFIG_X86_VOYAGER
773 # Wait until a20 really *is* enabled; it can take a fair amount of
774 # time on certain systems; Toshiba Tecras are known to have this
775 # problem.
776a20_kbc_wait:
777 xorw %cx, %cx
778a20_kbc_wait_loop:
779 call a20_test
780 jnz a20_done
781 loop a20_kbc_wait_loop
782
783 # Final attempt: use "configuration port A"
784a20_fast:
785 inb $0x92, %al # Configuration Port A
786 orb $0x02, %al # "fast A20" version
787 andb $0xFE, %al # don't accidentally reset
788 outb %al, $0x92
789
790 # Wait for configuration port A to take effect
791a20_fast_wait:
792 xorw %cx, %cx
793a20_fast_wait_loop:
794 call a20_test
795 jnz a20_done
796 loop a20_fast_wait_loop
797
798 # A20 is still not responding. Try frobbing it again.
799 #
800 decb (a20_tries)
801 jnz a20_try_loop
802
803 movw $a20_err_msg, %si
804 call prtstr
805
806a20_die:
807 hlt
808 jmp a20_die
809
810a20_tries:
811 .byte A20_ENABLE_LOOPS
812
813a20_err_msg:
814 .ascii "linux: fatal error: A20 gate not responding!"
815 .byte 13, 10, 0
816
817 # If we get here, all is good
818a20_done:
819
820#endif /* CONFIG_X86_VOYAGER */
821# set up gdt and idt and 32bit start address
822 lidt idt_48 # load idt with 0,0
823 xorl %eax, %eax # Compute gdt_base
824 movw %ds, %ax # (Convert %ds:gdt to a linear ptr)
825 shll $4, %eax
826 addl %eax, code32
827 addl $gdt, %eax
828 movl %eax, (gdt_48+2)
829 lgdt gdt_48 # load gdt with whatever is
830 # appropriate
831
832# make sure any possible coprocessor is properly reset..
833 xorw %ax, %ax
834 outb %al, $0xf0
835 call delay
836
837 outb %al, $0xf1
838 call delay
839
840# well, that went ok, I hope. Now we mask all interrupts - the rest
841# is done in init_IRQ().
842 movb $0xFF, %al # mask all interrupts for now
843 outb %al, $0xA1
844 call delay
845
846 movb $0xFB, %al # mask all irq's but irq2 which
847 outb %al, $0x21 # is cascaded
848
849# Well, that certainly wasn't fun :-(. Hopefully it works, and we don't
850# need no steenking BIOS anyway (except for the initial loading :-).
851# The BIOS-routine wants lots of unnecessary data, and it's less
852# "interesting" anyway. This is how REAL programmers do it.
853#
854# Well, now's the time to actually move into protected mode. To make
855# things as simple as possible, we do no register set-up or anything,
856# we let the gnu-compiled 32-bit programs do that. We just jump to
857# absolute address 0x1000 (or the loader supplied one),
858# in 32-bit protected mode.
859#
860# Note that the short jump isn't strictly needed, although there are
861# reasons why it might be a good idea. It won't hurt in any case.
862 movw $1, %ax # protected mode (PE) bit
863 lmsw %ax # This is it!
864 jmp flush_instr
865
866flush_instr:
867 xorw %bx, %bx # Flag to indicate a boot
868 xorl %esi, %esi # Pointer to real-mode code
869 movw %cs, %si
870 subw $DELTA_INITSEG, %si
871 shll $4, %esi # Convert to 32-bit pointer
872
873# jump to startup_32 in arch/i386/boot/compressed/head.S
874#
875# NOTE: For high loaded big kernels we need a
876# jmpi 0x100000,__BOOT_CS
877#
878# but we yet haven't reloaded the CS register, so the default size
879# of the target offset still is 16 bit.
880# However, using an operand prefix (0x66), the CPU will properly
881# take our 48 bit far pointer. (INTeL 80386 Programmer's Reference
882# Manual, Mixing 16-bit and 32-bit code, page 16-6)
883
884 .byte 0x66, 0xea # prefix + jmpi-opcode
885code32: .long startup_32 # will be set to %cs+startup_32
886 .word __BOOT_CS
887.code32
888startup_32:
889 movl $(__BOOT_DS), %eax
890 movl %eax, %ds
891 movl %eax, %es
892 movl %eax, %fs
893 movl %eax, %gs
894 movl %eax, %ss
895
896 xorl %eax, %eax
8971: incl %eax # check that A20 really IS enabled
898 movl %eax, 0x00000000 # loop forever if it isn't
899 cmpl %eax, 0x00100000
900 je 1b
901
902 # Jump to the 32bit entry point
903 jmpl *(code32_start - start + (DELTA_INITSEG << 4))(%esi)
904.code16
905
906# Here's a bunch of information about your current kernel..
907kernel_version: .ascii UTS_RELEASE
908 .ascii " ("
909 .ascii LINUX_COMPILE_BY
910 .ascii "@"
911 .ascii LINUX_COMPILE_HOST
912 .ascii ") "
913 .ascii UTS_VERSION
914 .byte 0
915
916# This is the default real mode switch routine.
917# to be called just before protected mode transition
918default_switch:
919 cli # no interrupts allowed !
920 movb $0x80, %al # disable NMI for bootup
921 # sequence
922 outb %al, $0x70
923 lret
924
925
926#ifndef CONFIG_X86_VOYAGER
927# This routine tests whether or not A20 is enabled. If so, it
928# exits with zf = 0.
929#
930# The memory address used, 0x200, is the int $0x80 vector, which
931# should be safe.
932
933A20_TEST_ADDR = 4*0x80
934
935a20_test:
936 pushw %cx
937 pushw %ax
938 xorw %cx, %cx
939 movw %cx, %fs # Low memory
940 decw %cx
941 movw %cx, %gs # High memory area
942 movw $A20_TEST_LOOPS, %cx
943 movw %fs:(A20_TEST_ADDR), %ax
944 pushw %ax
945a20_test_wait:
946 incw %ax
947 movw %ax, %fs:(A20_TEST_ADDR)
948 call delay # Serialize and make delay constant
949 cmpw %gs:(A20_TEST_ADDR+0x10), %ax
950 loope a20_test_wait
951
952 popw %fs:(A20_TEST_ADDR)
953 popw %ax
954 popw %cx
955 ret
956
957#endif /* CONFIG_X86_VOYAGER */
958
959# This routine checks that the keyboard command queue is empty
960# (after emptying the output buffers)
961#
962# Some machines have delusions that the keyboard buffer is always full
963# with no keyboard attached...
964#
965# If there is no keyboard controller, we will usually get 0xff
966# to all the reads. With each IO taking a microsecond and
967# a timeout of 100,000 iterations, this can take about half a
968# second ("delay" == outb to port 0x80). That should be ok,
969# and should also be plenty of time for a real keyboard controller
970# to empty.
971#
972
973empty_8042:
974 pushl %ecx
975 movl $100000, %ecx
976
977empty_8042_loop:
978 decl %ecx
979 jz empty_8042_end_loop
980
981 call delay
982
983 inb $0x64, %al # 8042 status port
984 testb $1, %al # output buffer?
985 jz no_output
986
987 call delay
988 inb $0x60, %al # read it
989 jmp empty_8042_loop
990
991no_output:
992 testb $2, %al # is input buffer full?
993 jnz empty_8042_loop # yes - loop
994empty_8042_end_loop:
995 popl %ecx
996 ret
997
998# Read the cmos clock. Return the seconds in al
999gettime:
1000 pushw %cx
1001 movb $0x02, %ah
1002 int $0x1a
1003 movb %dh, %al # %dh contains the seconds
1004 andb $0x0f, %al
1005 movb %dh, %ah
1006 movb $0x04, %cl
1007 shrb %cl, %ah
1008 aad
1009 popw %cx
1010 ret
1011
1012# Delay is needed after doing I/O
1013delay:
1014 outb %al,$0x80
1015 ret
1016
1017# Descriptor tables
1018#
1019# NOTE: The intel manual says gdt should be sixteen bytes aligned for
1020# efficiency reasons. However, there are machines which are known not
1021# to boot with misaligned GDTs, so alter this at your peril! If you alter
1022# GDT_ENTRY_BOOT_CS (in asm/segment.h) remember to leave at least two
1023# empty GDT entries (one for NULL and one reserved).
1024#
1025# NOTE: On some CPUs, the GDT must be 8 byte aligned. This is
1026# true for the Voyager Quad CPU card which will not boot without
1027# This directive. 16 byte aligment is recommended by intel.
1028#
1029 .align 16
1030gdt:
1031 .fill GDT_ENTRY_BOOT_CS,8,0
1032
1033 .word 0xFFFF # 4Gb - (0x100000*0x1000 = 4Gb)
1034 .word 0 # base address = 0
1035 .word 0x9A00 # code read/exec
1036 .word 0x00CF # granularity = 4096, 386
1037 # (+5th nibble of limit)
1038
1039 .word 0xFFFF # 4Gb - (0x100000*0x1000 = 4Gb)
1040 .word 0 # base address = 0
1041 .word 0x9200 # data read/write
1042 .word 0x00CF # granularity = 4096, 386
1043 # (+5th nibble of limit)
1044gdt_end:
1045 .align 4
1046
1047 .word 0 # alignment byte
1048idt_48:
1049 .word 0 # idt limit = 0
1050 .word 0, 0 # idt base = 0L
1051
1052 .word 0 # alignment byte
1053gdt_48:
1054 .word gdt_end - gdt - 1 # gdt limit
1055 .word 0, 0 # gdt base (filled in later)
1056
1057# Include video setup & detection code
1058
1059#include "video.S"
1060
1061# Setup signature -- must be last
1062setup_sig1: .word SIG1
1063setup_sig2: .word SIG2
1064
1065# After this point, there is some free space which is used by the video mode
1066# handling code to store the temporary mode table (not used by the kernel).
1067
1068modelist:
1069
1070.text
1071endtext:
1072.data
1073enddata:
1074.bss
1075endbss:
diff --git a/arch/i386/boot/setup.ld b/arch/i386/boot/setup.ld
new file mode 100644
index 000000000000..df9234b3a5e0
--- /dev/null
+++ b/arch/i386/boot/setup.ld
@@ -0,0 +1,54 @@
1/*
2 * setup.ld
3 *
4 * Linker script for the i386 setup code
5 */
6OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
7OUTPUT_ARCH(i386)
8ENTRY(_start)
9
10SECTIONS
11{
12 . = 0;
13 .bstext : { *(.bstext) }
14 .bsdata : { *(.bsdata) }
15
16 . = 497;
17 .header : { *(.header) }
18 .inittext : { *(.inittext) }
19 .initdata : { *(.initdata) }
20 .text : { *(.text*) }
21
22 . = ALIGN(16);
23 .rodata : { *(.rodata*) }
24
25 .videocards : {
26 video_cards = .;
27 *(.videocards)
28 video_cards_end = .;
29 }
30
31 . = ALIGN(16);
32 .data : { *(.data*) }
33
34 .signature : {
35 setup_sig = .;
36 LONG(0x5a5aaa55)
37 }
38
39
40 . = ALIGN(16);
41 .bss :
42 {
43 __bss_start = .;
44 *(.bss)
45 __bss_end = .;
46 }
47 . = ALIGN(16);
48 _end = .;
49
50 /DISCARD/ : { *(.note*) }
51
52 . = ASSERT(_end <= 0x8000, "Setup too big!");
53 . = ASSERT(hdr == 0x1f1, "The setup header has the wrong offset!");
54}
diff --git a/arch/i386/boot/string.c b/arch/i386/boot/string.c
new file mode 100644
index 000000000000..481a22097781
--- /dev/null
+++ b/arch/i386/boot/string.c
@@ -0,0 +1,52 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/string.c
13 *
14 * Very basic string functions
15 */
16
17#include "boot.h"
18
19int strcmp(const char *str1, const char *str2)
20{
21 const unsigned char *s1 = (const unsigned char *)str1;
22 const unsigned char *s2 = (const unsigned char *)str2;
23 int delta = 0;
24
25 while (*s1 || *s2) {
26 delta = *s2 - *s1;
27 if (delta)
28 return delta;
29 s1++;
30 s2++;
31 }
32 return 0;
33}
34
35size_t strnlen(const char *s, size_t maxlen)
36{
37 const char *es = s;
38 while (*es && maxlen) {
39 es++;
40 maxlen--;
41 }
42
43 return (es - s);
44}
45
46unsigned int atou(const char *s)
47{
48 unsigned int i = 0;
49 while (isdigit(*s))
50 i = i * 10 + (*s++ - '0');
51 return i;
52}
diff --git a/arch/i386/boot/tools/build.c b/arch/i386/boot/tools/build.c
index 05798419a6a9..b4248740ff0d 100644
--- a/arch/i386/boot/tools/build.c
+++ b/arch/i386/boot/tools/build.c
@@ -1,13 +1,12 @@
1/* 1/*
2 * Copyright (C) 1991, 1992 Linus Torvalds 2 * Copyright (C) 1991, 1992 Linus Torvalds
3 * Copyright (C) 1997 Martin Mares 3 * Copyright (C) 1997 Martin Mares
4 * Copyright (C) 2007 H. Peter Anvin
4 */ 5 */
5 6
6/* 7/*
7 * This file builds a disk-image from three different files: 8 * This file builds a disk-image from two different files:
8 * 9 *
9 * - bootsect: compatibility mbr which prints an error message if
10 * someone tries to boot the kernel directly.
11 * - setup: 8086 machine code, sets up system parm 10 * - setup: 8086 machine code, sets up system parm
12 * - system: 80386 code for actual system 11 * - system: 80386 code for actual system
13 * 12 *
@@ -21,6 +20,7 @@
21 * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996 20 * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996
22 * Cross compiling fixes by Gertjan van Wingerde, July 1996 21 * Cross compiling fixes by Gertjan van Wingerde, July 1996
23 * Rewritten by Martin Mares, April 1997 22 * Rewritten by Martin Mares, April 1997
23 * Substantially overhauled by H. Peter Anvin, April 2007
24 */ 24 */
25 25
26#include <stdio.h> 26#include <stdio.h>
@@ -32,23 +32,25 @@
32#include <sys/sysmacros.h> 32#include <sys/sysmacros.h>
33#include <unistd.h> 33#include <unistd.h>
34#include <fcntl.h> 34#include <fcntl.h>
35#include <sys/mman.h>
35#include <asm/boot.h> 36#include <asm/boot.h>
36 37
37typedef unsigned char byte; 38typedef unsigned char u8;
38typedef unsigned short word; 39typedef unsigned short u16;
39typedef unsigned long u32; 40typedef unsigned long u32;
40 41
41#define DEFAULT_MAJOR_ROOT 0 42#define DEFAULT_MAJOR_ROOT 0
42#define DEFAULT_MINOR_ROOT 0 43#define DEFAULT_MINOR_ROOT 0
43 44
44/* Minimal number of setup sectors (see also bootsect.S) */ 45/* Minimal number of setup sectors */
45#define SETUP_SECTS 4 46#define SETUP_SECT_MIN 5
47#define SETUP_SECT_MAX 64
46 48
47byte buf[1024]; 49/* This must be large enough to hold the entire setup */
48int fd; 50u8 buf[SETUP_SECT_MAX*512];
49int is_big_kernel; 51int is_big_kernel;
50 52
51void die(const char * str, ...) 53static void die(const char * str, ...)
52{ 54{
53 va_list args; 55 va_list args;
54 va_start(args, str); 56 va_start(args, str);
@@ -57,15 +59,9 @@ void die(const char * str, ...)
57 exit(1); 59 exit(1);
58} 60}
59 61
60void file_open(const char *name) 62static void usage(void)
61{ 63{
62 if ((fd = open(name, O_RDONLY, 0)) < 0) 64 die("Usage: build [-b] setup system [rootdev] [> image]");
63 die("Unable to open `%s': %m", name);
64}
65
66void usage(void)
67{
68 die("Usage: build [-b] bootsect setup system [rootdev] [> image]");
69} 65}
70 66
71int main(int argc, char ** argv) 67int main(int argc, char ** argv)
@@ -73,27 +69,30 @@ int main(int argc, char ** argv)
73 unsigned int i, sz, setup_sectors; 69 unsigned int i, sz, setup_sectors;
74 int c; 70 int c;
75 u32 sys_size; 71 u32 sys_size;
76 byte major_root, minor_root; 72 u8 major_root, minor_root;
77 struct stat sb; 73 struct stat sb;
74 FILE *file;
75 int fd;
76 void *kernel;
78 77
79 if (argc > 2 && !strcmp(argv[1], "-b")) 78 if (argc > 2 && !strcmp(argv[1], "-b"))
80 { 79 {
81 is_big_kernel = 1; 80 is_big_kernel = 1;
82 argc--, argv++; 81 argc--, argv++;
83 } 82 }
84 if ((argc < 4) || (argc > 5)) 83 if ((argc < 3) || (argc > 4))
85 usage(); 84 usage();
86 if (argc > 4) { 85 if (argc > 3) {
87 if (!strcmp(argv[4], "CURRENT")) { 86 if (!strcmp(argv[3], "CURRENT")) {
88 if (stat("/", &sb)) { 87 if (stat("/", &sb)) {
89 perror("/"); 88 perror("/");
90 die("Couldn't stat /"); 89 die("Couldn't stat /");
91 } 90 }
92 major_root = major(sb.st_dev); 91 major_root = major(sb.st_dev);
93 minor_root = minor(sb.st_dev); 92 minor_root = minor(sb.st_dev);
94 } else if (strcmp(argv[4], "FLOPPY")) { 93 } else if (strcmp(argv[3], "FLOPPY")) {
95 if (stat(argv[4], &sb)) { 94 if (stat(argv[3], &sb)) {
96 perror(argv[4]); 95 perror(argv[3]);
97 die("Couldn't stat root device."); 96 die("Couldn't stat root device.");
98 } 97 }
99 major_root = major(sb.st_rdev); 98 major_root = major(sb.st_rdev);
@@ -108,79 +107,62 @@ int main(int argc, char ** argv)
108 } 107 }
109 fprintf(stderr, "Root device is (%d, %d)\n", major_root, minor_root); 108 fprintf(stderr, "Root device is (%d, %d)\n", major_root, minor_root);
110 109
111 file_open(argv[1]); 110 /* Copy the setup code */
112 i = read(fd, buf, sizeof(buf)); 111 file = fopen(argv[1], "r");
113 fprintf(stderr,"Boot sector %d bytes.\n",i); 112 if (!file)
114 if (i != 512) 113 die("Unable to open `%s': %m", argv[1]);
115 die("Boot block must be exactly 512 bytes"); 114 c = fread(buf, 1, sizeof(buf), file);
115 if (ferror(file))
116 die("read-error on `setup'");
117 if (c < 1024)
118 die("The setup must be at least 1024 bytes");
116 if (buf[510] != 0x55 || buf[511] != 0xaa) 119 if (buf[510] != 0x55 || buf[511] != 0xaa)
117 die("Boot block hasn't got boot flag (0xAA55)"); 120 die("Boot block hasn't got boot flag (0xAA55)");
121 fclose(file);
122
123 /* Pad unused space with zeros */
124 setup_sectors = (c + 511) / 512;
125 if (setup_sectors < SETUP_SECT_MIN)
126 setup_sectors = SETUP_SECT_MIN;
127 i = setup_sectors*512;
128 memset(buf+c, 0, i-c);
129
130 /* Set the default root device */
118 buf[508] = minor_root; 131 buf[508] = minor_root;
119 buf[509] = major_root; 132 buf[509] = major_root;
120 if (write(1, buf, 512) != 512)
121 die("Write call failed");
122 close (fd);
123
124 file_open(argv[2]); /* Copy the setup code */
125 for (i=0 ; (c=read(fd, buf, sizeof(buf)))>0 ; i+=c )
126 if (write(1, buf, c) != c)
127 die("Write call failed");
128 if (c != 0)
129 die("read-error on `setup'");
130 close (fd);
131
132 setup_sectors = (i + 511) / 512; /* Pad unused space with zeros */
133 /* for compatibility with ancient versions of LILO. */
134 if (setup_sectors < SETUP_SECTS)
135 setup_sectors = SETUP_SECTS;
136 fprintf(stderr, "Setup is %d bytes.\n", i);
137 memset(buf, 0, sizeof(buf));
138 while (i < setup_sectors * 512) {
139 c = setup_sectors * 512 - i;
140 if (c > sizeof(buf))
141 c = sizeof(buf);
142 if (write(1, buf, c) != c)
143 die("Write call failed");
144 i += c;
145 }
146 133
147 file_open(argv[3]); 134 fprintf(stderr, "Setup is %d bytes (padded to %d bytes).\n", c, i);
148 if (fstat (fd, &sb)) 135
149 die("Unable to stat `%s': %m", argv[3]); 136 /* Open and stat the kernel file */
137 fd = open(argv[2], O_RDONLY);
138 if (fd < 0)
139 die("Unable to open `%s': %m", argv[2]);
140 if (fstat(fd, &sb))
141 die("Unable to stat `%s': %m", argv[2]);
150 sz = sb.st_size; 142 sz = sb.st_size;
151 fprintf (stderr, "System is %d kB\n", sz/1024); 143 fprintf (stderr, "System is %d kB\n", (sz+1023)/1024);
144 kernel = mmap(NULL, sz, PROT_READ, MAP_SHARED, fd, 0);
145 if (kernel == MAP_FAILED)
146 die("Unable to mmap '%s': %m", argv[2]);
152 sys_size = (sz + 15) / 16; 147 sys_size = (sz + 15) / 16;
153 if (!is_big_kernel && sys_size > DEF_SYSSIZE) 148 if (!is_big_kernel && sys_size > DEF_SYSSIZE)
154 die("System is too big. Try using bzImage or modules."); 149 die("System is too big. Try using bzImage or modules.");
155 while (sz > 0) { 150
156 int l, n; 151 /* Patch the setup code with the appropriate size parameters */
157 152 buf[0x1f1] = setup_sectors-1;
158 l = (sz > sizeof(buf)) ? sizeof(buf) : sz; 153 buf[0x1f4] = sys_size;
159 if ((n=read(fd, buf, l)) != l) { 154 buf[0x1f5] = sys_size >> 8;
160 if (n < 0) 155 buf[0x1f6] = sys_size >> 16;
161 die("Error reading %s: %m", argv[3]); 156 buf[0x1f7] = sys_size >> 24;
162 else 157
163 die("%s: Unexpected EOF", argv[3]); 158 if (fwrite(buf, 1, i, stdout) != i)
164 } 159 die("Writing setup failed");
165 if (write(1, buf, l) != l) 160
166 die("Write failed"); 161 /* Copy the kernel code */
167 sz -= l; 162 if (fwrite(kernel, 1, sz, stdout) != sz)
168 } 163 die("Writing kernel failed");
169 close(fd); 164 close(fd);
170 165
171 if (lseek(1, 497, SEEK_SET) != 497) /* Write sizes to the bootsector */ 166 /* Everything is OK */
172 die("Output: seek failed"); 167 return 0;
173 buf[0] = setup_sectors;
174 if (write(1, buf, 1) != 1)
175 die("Write of setup sector count failed");
176 if (lseek(1, 500, SEEK_SET) != 500)
177 die("Output: seek failed");
178 buf[0] = (sys_size & 0xff);
179 buf[1] = ((sys_size >> 8) & 0xff);
180 buf[2] = ((sys_size >> 16) & 0xff);
181 buf[3] = ((sys_size >> 24) & 0xff);
182 if (write(1, buf, 4) != 4)
183 die("Write of image length failed");
184
185 return 0; /* Everything is OK */
186} 168}
diff --git a/arch/i386/boot/tty.c b/arch/i386/boot/tty.c
new file mode 100644
index 000000000000..9c668aad3515
--- /dev/null
+++ b/arch/i386/boot/tty.c
@@ -0,0 +1,112 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/tty.c
13 *
14 * Very simple screen I/O
15 * XXX: Probably should add very simple serial I/O?
16 */
17
18#include "boot.h"
19
20/*
21 * These functions are in .inittext so they can be used to signal
22 * error during initialization.
23 */
24
25void __attribute__((section(".inittext"))) putchar(int ch)
26{
27 unsigned char c = ch;
28
29 if (c == '\n')
30 putchar('\r'); /* \n -> \r\n */
31
32 /* int $0x10 is known to have bugs involving touching registers
33 it shouldn't. Be extra conservative... */
34 asm volatile("pushal; pushw %%ds; int $0x10; popw %%ds; popal"
35 : : "b" (0x0007), "c" (0x0001), "a" (0x0e00|ch));
36}
37
38void __attribute__((section(".inittext"))) puts(const char *str)
39{
40 int n = 0;
41 while (*str) {
42 putchar(*str++);
43 n++;
44 }
45}
46
47/*
48 * Read the CMOS clock through the BIOS, and return the
49 * seconds in BCD.
50 */
51
52static u8 gettime(void)
53{
54 u16 ax = 0x0200;
55 u16 cx, dx;
56
57 asm("int $0x1a"
58 : "+a" (ax), "=c" (cx), "=d" (dx)
59 : : "ebx", "esi", "edi");
60
61 return dx >> 8;
62}
63
64/*
65 * Read from the keyboard
66 */
67int getchar(void)
68{
69 u16 ax = 0;
70 asm("int $0x16" : "+a" (ax));
71
72 return ax & 0xff;
73}
74
75static int kbd_pending(void)
76{
77 u8 pending;
78 asm("int $0x16; setnz %0"
79 : "=rm" (pending)
80 : "a" (0x0100));
81 return pending;
82}
83
84void kbd_flush(void)
85{
86 for (;;) {
87 if (!kbd_pending())
88 break;
89 getchar();
90 }
91}
92
93int getchar_timeout(void)
94{
95 int cnt = 30;
96 int t0, t1;
97
98 t0 = gettime();
99
100 while (cnt) {
101 if (kbd_pending())
102 return getchar();
103
104 t1 = gettime();
105 if (t0 != t1) {
106 cnt--;
107 t0 = t1;
108 }
109 }
110
111 return 0; /* Timeout! */
112}
diff --git a/arch/i386/boot/version.c b/arch/i386/boot/version.c
new file mode 100644
index 000000000000..c61462f7d9a7
--- /dev/null
+++ b/arch/i386/boot/version.c
@@ -0,0 +1,23 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/version.c
13 *
14 * Kernel version string
15 */
16
17#include "boot.h"
18#include <linux/utsrelease.h>
19#include <linux/compile.h>
20
21const char kernel_version[] =
22 UTS_RELEASE " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ") "
23 UTS_VERSION;
diff --git a/arch/i386/boot/vesa.h b/arch/i386/boot/vesa.h
new file mode 100644
index 000000000000..ff5b73cd406f
--- /dev/null
+++ b/arch/i386/boot/vesa.h
@@ -0,0 +1,79 @@
1/* ----------------------------------------------------------------------- *
2 *
3 * Copyright 1999-2007 H. Peter Anvin - All Rights Reserved
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, Inc., 53 Temple Place Ste 330,
8 * Boston MA 02111-1307, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
10 *
11 * ----------------------------------------------------------------------- */
12
13#ifndef BOOT_VESA_H
14#define BOOT_VESA_H
15
16typedef struct {
17 u16 off, seg;
18} far_ptr;
19
20/* VESA General Information table */
21struct vesa_general_info {
22 u32 signature; /* 0 Magic number = "VESA" */
23 u16 version; /* 4 */
24 far_ptr vendor_string; /* 6 */
25 u32 capabilities; /* 10 */
26 far_ptr video_mode_ptr; /* 14 */
27 u16 total_memory; /* 18 */
28
29 u16 oem_software_rev; /* 20 */
30 far_ptr oem_vendor_name_ptr; /* 22 */
31 far_ptr oem_product_name_ptr; /* 26 */
32 far_ptr oem_product_rev_ptr; /* 30 */
33
34 u8 reserved[222]; /* 34 */
35 u8 oem_data[256]; /* 256 */
36} __attribute__ ((packed));
37
38#define VESA_MAGIC ('V' + ('E' << 8) + ('S' << 16) + ('A' << 24))
39#define VBE2_MAGIC ('V' + ('B' << 8) + ('E' << 16) + ('2' << 24))
40
41struct vesa_mode_info {
42 u16 mode_attr; /* 0 */
43 u8 win_attr[2]; /* 2 */
44 u16 win_grain; /* 4 */
45 u16 win_size; /* 6 */
46 u16 win_seg[2]; /* 8 */
47 far_ptr win_scheme; /* 12 */
48 u16 logical_scan; /* 16 */
49
50 u16 h_res; /* 18 */
51 u16 v_res; /* 20 */
52 u8 char_width; /* 22 */
53 u8 char_height; /* 23 */
54 u8 memory_planes; /* 24 */
55 u8 bpp; /* 25 */
56 u8 banks; /* 26 */
57 u8 memory_layout; /* 27 */
58 u8 bank_size; /* 28 */
59 u8 image_planes; /* 29 */
60 u8 page_function; /* 30 */
61
62 u8 rmask; /* 31 */
63 u8 rpos; /* 32 */
64 u8 gmask; /* 33 */
65 u8 gpos; /* 34 */
66 u8 bmask; /* 35 */
67 u8 bpos; /* 36 */
68 u8 resv_mask; /* 37 */
69 u8 resv_pos; /* 38 */
70 u8 dcm_info; /* 39 */
71
72 u32 lfb_ptr; /* 40 Linear frame buffer address */
73 u32 offscreen_ptr; /* 44 Offscreen memory address */
74 u16 offscreen_size; /* 48 */
75
76 u8 reserved[206]; /* 50 */
77} __attribute__ ((packed));
78
79#endif /* LIB_SYS_VESA_H */
diff --git a/arch/i386/boot/video-bios.c b/arch/i386/boot/video-bios.c
new file mode 100644
index 000000000000..afea46c500cc
--- /dev/null
+++ b/arch/i386/boot/video-bios.c
@@ -0,0 +1,125 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/video-bios.c
13 *
14 * Standard video BIOS modes
15 *
16 * We have two options for this; silent and scanned.
17 */
18
19#include "boot.h"
20#include "video.h"
21
22__videocard video_bios;
23
24/* Set a conventional BIOS mode */
25static int set_bios_mode(u8 mode);
26
27static int bios_set_mode(struct mode_info *mi)
28{
29 return set_bios_mode(mi->mode - VIDEO_FIRST_BIOS);
30}
31
32static int set_bios_mode(u8 mode)
33{
34 u16 ax;
35 u8 new_mode;
36
37 ax = mode; /* AH=0x00 Set Video Mode */
38 asm volatile(INT10
39 : "+a" (ax)
40 : : "ebx", "ecx", "edx", "esi", "edi");
41
42 ax = 0x0f00; /* Get Current Video Mode */
43 asm volatile(INT10
44 : "+a" (ax)
45 : : "ebx", "ecx", "edx", "esi", "edi");
46
47 do_restore = 1; /* Assume video contents was lost */
48 new_mode = ax & 0x7f; /* Not all BIOSes are clean with the top bit */
49
50 if (new_mode == mode)
51 return 0; /* Mode change OK */
52
53 if (new_mode != boot_params.screen_info.orig_video_mode) {
54 /* Mode setting failed, but we didn't end up where we
55 started. That's bad. Try to revert to the original
56 video mode. */
57 ax = boot_params.screen_info.orig_video_mode;
58 asm volatile(INT10
59 : "+a" (ax)
60 : : "ebx", "ecx", "edx", "esi", "edi");
61 }
62 return -1;
63}
64
65static int bios_probe(void)
66{
67 u8 mode;
68 u8 saved_mode = boot_params.screen_info.orig_video_mode;
69 u16 crtc;
70 struct mode_info *mi;
71 int nmodes = 0;
72
73 if (adapter != ADAPTER_EGA && adapter != ADAPTER_VGA)
74 return 0;
75
76 set_fs(0);
77 crtc = vga_crtc();
78
79 video_bios.modes = GET_HEAP(struct mode_info, 0);
80
81 for (mode = 0x14; mode <= 0x7f; mode++) {
82 if (heap_free() < sizeof(struct mode_info))
83 break;
84
85 if (mode_defined(VIDEO_FIRST_BIOS+mode))
86 continue;
87
88 if (set_bios_mode(mode))
89 continue;
90
91 /* Try to verify that it's a text mode. */
92
93 /* Attribute Controller: make graphics controller disabled */
94 if (in_idx(0x3c0, 0x10) & 0x01)
95 continue;
96
97 /* Graphics Controller: verify Alpha addressing enabled */
98 if (in_idx(0x3ce, 0x06) & 0x01)
99 continue;
100
101 /* CRTC cursor location low should be zero(?) */
102 if (in_idx(crtc, 0x0f))
103 continue;
104
105 mi = GET_HEAP(struct mode_info, 1);
106 mi->mode = VIDEO_FIRST_BIOS+mode;
107 mi->x = rdfs16(0x44a);
108 mi->y = rdfs8(0x484)+1;
109 nmodes++;
110 }
111
112 set_bios_mode(saved_mode);
113
114 return nmodes;
115}
116
117__videocard video_bios =
118{
119 .card_name = "BIOS (scanned)",
120 .probe = bios_probe,
121 .set_mode = bios_set_mode,
122 .unsafe = 1,
123 .xmode_first = VIDEO_FIRST_BIOS,
124 .xmode_n = 0x80,
125};
diff --git a/arch/i386/boot/video-vesa.c b/arch/i386/boot/video-vesa.c
new file mode 100644
index 000000000000..e6aa9eb8d93a
--- /dev/null
+++ b/arch/i386/boot/video-vesa.c
@@ -0,0 +1,284 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/video-vesa.c
13 *
14 * VESA text modes
15 */
16
17#include "boot.h"
18#include "video.h"
19#include "vesa.h"
20
21/* VESA information */
22static struct vesa_general_info vginfo;
23static struct vesa_mode_info vminfo;
24
25__videocard video_vesa;
26
27static void vesa_store_mode_params_graphics(void);
28
29static int vesa_probe(void)
30{
31#if defined(CONFIG_VIDEO_VESA) || defined(CONFIG_FIRMWARE_EDID)
32 u16 ax;
33 u16 mode;
34 addr_t mode_ptr;
35 struct mode_info *mi;
36 int nmodes = 0;
37
38 video_vesa.modes = GET_HEAP(struct mode_info, 0);
39
40 vginfo.signature = VBE2_MAGIC;
41
42 /* Optimistically assume a VESA BIOS is register-clean... */
43 ax = 0x4f00;
44 asm("int $0x10" : "+a" (ax), "=m" (vginfo) : "D" (&vginfo));
45
46 if (ax != 0x004f ||
47 vginfo.signature != VESA_MAGIC ||
48 vginfo.version < 0x0102)
49 return 0; /* Not present */
50#endif /* CONFIG_VIDEO_VESA || CONFIG_FIRMWARE_EDID */
51#ifdef CONFIG_VIDEO_VESA
52 set_fs(vginfo.video_mode_ptr.seg);
53 mode_ptr = vginfo.video_mode_ptr.off;
54
55 while ((mode = rdfs16(mode_ptr)) != 0xffff) {
56 mode_ptr += 2;
57
58 if (heap_free() < sizeof(struct mode_info))
59 break; /* Heap full, can't save mode info */
60
61 if (mode & ~0x1ff)
62 continue;
63
64 memset(&vminfo, 0, sizeof vminfo); /* Just in case... */
65
66 ax = 0x4f01;
67 asm("int $0x10"
68 : "+a" (ax), "=m" (vminfo)
69 : "c" (mode), "D" (&vminfo));
70
71 if (ax != 0x004f)
72 continue;
73
74 if ((vminfo.mode_attr & 0x15) == 0x05) {
75 /* Text Mode, TTY BIOS supported,
76 supported by hardware */
77 mi = GET_HEAP(struct mode_info, 1);
78 mi->mode = mode + VIDEO_FIRST_VESA;
79 mi->x = vminfo.h_res;
80 mi->y = vminfo.v_res;
81 nmodes++;
82 } else if ((vminfo.mode_attr & 0x99) == 0x99) {
83#ifdef CONFIG_FB
84 /* Graphics mode, color, linear frame buffer
85 supported -- register the mode but hide from
86 the menu. Only do this if framebuffer is
87 configured, however, otherwise the user will
88 be left without a screen. */
89 mi = GET_HEAP(struct mode_info, 1);
90 mi->mode = mode + VIDEO_FIRST_VESA;
91 mi->x = mi->y = 0;
92 nmodes++;
93#endif
94 }
95 }
96
97 return nmodes;
98#else
99 return 0;
100#endif /* CONFIG_VIDEO_VESA */
101}
102
103static int vesa_set_mode(struct mode_info *mode)
104{
105 u16 ax;
106 int is_graphic;
107 u16 vesa_mode = mode->mode - VIDEO_FIRST_VESA;
108
109 memset(&vminfo, 0, sizeof vminfo); /* Just in case... */
110
111 ax = 0x4f01;
112 asm("int $0x10"
113 : "+a" (ax), "=m" (vminfo)
114 : "c" (vesa_mode), "D" (&vminfo));
115
116 if (ax != 0x004f)
117 return -1;
118
119 if ((vminfo.mode_attr & 0x15) == 0x05) {
120 /* It's a supported text mode */
121 is_graphic = 0;
122 } else if ((vminfo.mode_attr & 0x99) == 0x99) {
123 /* It's a graphics mode with linear frame buffer */
124 is_graphic = 1;
125 vesa_mode |= 0x4000; /* Request linear frame buffer */
126 } else {
127 return -1; /* Invalid mode */
128 }
129
130
131 ax = 0x4f02;
132 asm volatile("int $0x10"
133 : "+a" (ax)
134 : "b" (vesa_mode), "D" (0));
135
136 if (ax != 0x004f)
137 return -1;
138
139 graphic_mode = is_graphic;
140 if (!is_graphic) {
141 /* Text mode */
142 force_x = mode->x;
143 force_y = mode->y;
144 do_restore = 1;
145 } else {
146 /* Graphics mode */
147 vesa_store_mode_params_graphics();
148 }
149
150 return 0;
151}
152
153
154/* Switch DAC to 8-bit mode */
155static void vesa_dac_set_8bits(void)
156{
157 u8 dac_size = 6;
158
159 /* If possible, switch the DAC to 8-bit mode */
160 if (vginfo.capabilities & 1) {
161 u16 ax, bx;
162
163 ax = 0x4f08;
164 bx = 0x0800;
165 asm volatile(INT10
166 : "+a" (ax), "+b" (bx)
167 : : "ecx", "edx", "esi", "edi");
168
169 if (ax == 0x004f)
170 dac_size = bx >> 8;
171 }
172
173 /* Set the color sizes to the DAC size, and offsets to 0 */
174 boot_params.screen_info.red_size = dac_size;
175 boot_params.screen_info.green_size = dac_size;
176 boot_params.screen_info.blue_size = dac_size;
177 boot_params.screen_info.rsvd_size = dac_size;
178
179 boot_params.screen_info.red_pos = 0;
180 boot_params.screen_info.green_pos = 0;
181 boot_params.screen_info.blue_pos = 0;
182 boot_params.screen_info.rsvd_pos = 0;
183}
184
185/* Save the VESA protected mode info */
186static void vesa_store_pm_info(void)
187{
188 u16 ax, bx, di, es;
189
190 ax = 0x4f0a;
191 bx = di = 0;
192 asm("pushw %%es; "INT10"; movw %%es,%0; popw %%es"
193 : "=d" (es), "+a" (ax), "+b" (bx), "+D" (di)
194 : : "ecx", "esi");
195
196 if (ax != 0x004f)
197 return;
198
199 boot_params.screen_info.vesapm_seg = es;
200 boot_params.screen_info.vesapm_off = di;
201}
202
203/*
204 * Save video mode parameters for graphics mode
205 */
206static void vesa_store_mode_params_graphics(void)
207{
208 /* Tell the kernel we're in VESA graphics mode */
209 boot_params.screen_info.orig_video_isVGA = 0x23;
210
211 /* Mode parameters */
212 boot_params.screen_info.vesa_attributes = vminfo.mode_attr;
213 boot_params.screen_info.lfb_linelength = vminfo.logical_scan;
214 boot_params.screen_info.lfb_width = vminfo.h_res;
215 boot_params.screen_info.lfb_height = vminfo.v_res;
216 boot_params.screen_info.lfb_depth = vminfo.bpp;
217 boot_params.screen_info.pages = vminfo.image_planes;
218 boot_params.screen_info.lfb_base = vminfo.lfb_ptr;
219 memcpy(&boot_params.screen_info.red_size,
220 &vminfo.rmask, 8);
221
222 /* General parameters */
223 boot_params.screen_info.lfb_size = vginfo.total_memory;
224
225 if (vminfo.bpp <= 8)
226 vesa_dac_set_8bits();
227
228 vesa_store_pm_info();
229}
230
231/*
232 * Save EDID information for the kernel; this is invoked, separately,
233 * after mode-setting.
234 */
235void vesa_store_edid(void)
236{
237#ifdef CONFIG_FIRMWARE_EDID
238 u16 ax, bx, cx, dx, di;
239
240 /* Apparently used as a nonsense token... */
241 memset(&boot_params.edid_info, 0x13, sizeof boot_params.edid_info);
242
243 if (vginfo.version < 0x0200)
244 return; /* EDID requires VBE 2.0+ */
245
246 ax = 0x4f15; /* VBE DDC */
247 bx = 0x0000; /* Report DDC capabilities */
248 cx = 0; /* Controller 0 */
249 di = 0; /* ES:DI must be 0 by spec */
250
251 /* Note: The VBE DDC spec is different from the main VESA spec;
252 we genuinely have to assume all registers are destroyed here. */
253
254 asm("pushw %%es; movw %2,%%es; "INT10"; popw %%es"
255 : "+a" (ax), "+b" (bx)
256 : "c" (cx), "D" (di)
257 : "esi");
258
259 if (ax != 0x004f)
260 return; /* No EDID */
261
262 /* BH = time in seconds to transfer EDD information */
263 /* BL = DDC level supported */
264
265 ax = 0x4f15; /* VBE DDC */
266 bx = 0x0001; /* Read EDID */
267 cx = 0; /* Controller 0 */
268 dx = 0; /* EDID block number */
269 di =(size_t) &boot_params.edid_info; /* (ES:)Pointer to block */
270 asm(INT10
271 : "+a" (ax), "+b" (bx), "+d" (dx)
272 : "c" (cx), "D" (di)
273 : "esi");
274#endif /* CONFIG_FIRMWARE_EDID */
275}
276
277__videocard video_vesa =
278{
279 .card_name = "VESA",
280 .probe = vesa_probe,
281 .set_mode = vesa_set_mode,
282 .xmode_first = VIDEO_FIRST_VESA,
283 .xmode_n = 0x200,
284};
diff --git a/arch/i386/boot/video-vga.c b/arch/i386/boot/video-vga.c
new file mode 100644
index 000000000000..700d09a9c9b3
--- /dev/null
+++ b/arch/i386/boot/video-vga.c
@@ -0,0 +1,260 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/video-vga.c
13 *
14 * Common all-VGA modes
15 */
16
17#include "boot.h"
18#include "video.h"
19
20static struct mode_info vga_modes[] = {
21 { VIDEO_80x25, 80, 25 },
22 { VIDEO_8POINT, 80, 50 },
23 { VIDEO_80x43, 80, 43 },
24 { VIDEO_80x28, 80, 28 },
25 { VIDEO_80x30, 80, 30 },
26 { VIDEO_80x34, 80, 34 },
27 { VIDEO_80x60, 80, 60 },
28};
29
30static struct mode_info ega_modes[] = {
31 { VIDEO_80x25, 80, 25 },
32 { VIDEO_8POINT, 80, 43 },
33};
34
35static struct mode_info cga_modes[] = {
36 { VIDEO_80x25, 80, 25 },
37};
38
39__videocard video_vga;
40
41/* Set basic 80x25 mode */
42static u8 vga_set_basic_mode(void)
43{
44 u16 ax;
45 u8 rows;
46 u8 mode;
47
48#ifdef CONFIG_VIDEO_400_HACK
49 if (adapter >= ADAPTER_VGA) {
50 asm(INT10
51 : : "a" (0x1202), "b" (0x0030)
52 : "ecx", "edx", "esi", "edi");
53 }
54#endif
55
56 ax = 0x0f00;
57 asm(INT10
58 : "+a" (ax)
59 : : "ebx", "ecx", "edx", "esi", "edi");
60
61 mode = (u8)ax;
62
63 set_fs(0);
64 rows = rdfs8(0x484); /* rows minus one */
65
66#ifndef CONFIG_VIDEO_400_HACK
67 if ((ax == 0x5003 || ax == 0x5007) &&
68 (rows == 0 || rows == 24))
69 return mode;
70#endif
71
72 if (mode != 3 && mode != 7)
73 mode = 3;
74
75 /* Set the mode */
76 asm volatile(INT10
77 : : "a" (mode)
78 : "ebx", "ecx", "edx", "esi", "edi");
79 do_restore = 1;
80 return mode;
81}
82
83static void vga_set_8font(void)
84{
85 /* Set 8x8 font - 80x43 on EGA, 80x50 on VGA */
86
87 /* Set 8x8 font */
88 asm volatile(INT10 : : "a" (0x1112), "b" (0));
89
90 /* Use alternate print screen */
91 asm volatile(INT10 : : "a" (0x1200), "b" (0x20));
92
93 /* Turn off cursor emulation */
94 asm volatile(INT10 : : "a" (0x1201), "b" (0x34));
95
96 /* Cursor is scan lines 6-7 */
97 asm volatile(INT10 : : "a" (0x0100), "c" (0x0607));
98}
99
100static void vga_set_14font(void)
101{
102 /* Set 9x14 font - 80x28 on VGA */
103
104 /* Set 9x14 font */
105 asm volatile(INT10 : : "a" (0x1111), "b" (0));
106
107 /* Turn off cursor emulation */
108 asm volatile(INT10 : : "a" (0x1201), "b" (0x34));
109
110 /* Cursor is scan lines 11-12 */
111 asm volatile(INT10 : : "a" (0x0100), "c" (0x0b0c));
112}
113
114static void vga_set_80x43(void)
115{
116 /* Set 80x43 mode on VGA (not EGA) */
117
118 /* Set 350 scans */
119 asm volatile(INT10 : : "a" (0x1201), "b" (0x30));
120
121 /* Reset video mode */
122 asm volatile(INT10 : : "a" (0x0003));
123
124 vga_set_8font();
125}
126
127/* I/O address of the VGA CRTC */
128u16 vga_crtc(void)
129{
130 return (inb(0x3cc) & 1) ? 0x3d4 : 0x3b4;
131}
132
133static void vga_set_480_scanlines(int end)
134{
135 u16 crtc;
136 u8 csel;
137
138 crtc = vga_crtc();
139
140 out_idx(0x0c, crtc, 0x11); /* Vertical sync end, unlock CR0-7 */
141 out_idx(0x0b, crtc, 0x06); /* Vertical total */
142 out_idx(0x3e, crtc, 0x07); /* Vertical overflow */
143 out_idx(0xea, crtc, 0x10); /* Vertical sync start */
144 out_idx(end, crtc, 0x12); /* Vertical display end */
145 out_idx(0xe7, crtc, 0x15); /* Vertical blank start */
146 out_idx(0x04, crtc, 0x16); /* Vertical blank end */
147 csel = inb(0x3cc);
148 csel &= 0x0d;
149 csel |= 0xe2;
150 outb(csel, 0x3cc);
151}
152
153static void vga_set_80x30(void)
154{
155 vga_set_480_scanlines(0xdf);
156}
157
158static void vga_set_80x34(void)
159{
160 vga_set_14font();
161 vga_set_480_scanlines(0xdb);
162}
163
164static void vga_set_80x60(void)
165{
166 vga_set_8font();
167 vga_set_480_scanlines(0xdf);
168}
169
170static int vga_set_mode(struct mode_info *mode)
171{
172 /* Set the basic mode */
173 vga_set_basic_mode();
174
175 /* Override a possibly broken BIOS */
176 force_x = mode->x;
177 force_y = mode->y;
178
179 switch (mode->mode) {
180 case VIDEO_80x25:
181 break;
182 case VIDEO_8POINT:
183 vga_set_8font();
184 break;
185 case VIDEO_80x43:
186 vga_set_80x43();
187 break;
188 case VIDEO_80x28:
189 vga_set_14font();
190 break;
191 case VIDEO_80x30:
192 vga_set_80x30();
193 break;
194 case VIDEO_80x34:
195 vga_set_80x34();
196 break;
197 case VIDEO_80x60:
198 vga_set_80x60();
199 break;
200 }
201
202 return 0;
203}
204
205/*
206 * Note: this probe includes basic information required by all
207 * systems. It should be executed first, by making sure
208 * video-vga.c is listed first in the Makefile.
209 */
210static int vga_probe(void)
211{
212 static const char *card_name[] = {
213 "CGA/MDA/HGC", "EGA", "VGA"
214 };
215 static struct mode_info *mode_lists[] = {
216 cga_modes,
217 ega_modes,
218 vga_modes,
219 };
220 static int mode_count[] = {
221 sizeof(cga_modes)/sizeof(struct mode_info),
222 sizeof(ega_modes)/sizeof(struct mode_info),
223 sizeof(vga_modes)/sizeof(struct mode_info),
224 };
225 u8 vga_flag;
226
227 asm(INT10
228 : "=b" (boot_params.screen_info.orig_video_ega_bx)
229 : "a" (0x1200), "b" (0x10) /* Check EGA/VGA */
230 : "ecx", "edx", "esi", "edi");
231
232 /* If we have MDA/CGA/HGC then BL will be unchanged at 0x10 */
233 if ((u8)boot_params.screen_info.orig_video_ega_bx != 0x10) {
234 /* EGA/VGA */
235 asm(INT10
236 : "=a" (vga_flag)
237 : "a" (0x1a00)
238 : "ebx", "ecx", "edx", "esi", "edi");
239
240 if (vga_flag == 0x1a) {
241 adapter = ADAPTER_VGA;
242 boot_params.screen_info.orig_video_isVGA = 1;
243 } else {
244 adapter = ADAPTER_EGA;
245 }
246 } else {
247 adapter = ADAPTER_CGA;
248 }
249
250 video_vga.modes = mode_lists[adapter];
251 video_vga.card_name = card_name[adapter];
252 return mode_count[adapter];
253}
254
255__videocard video_vga =
256{
257 .card_name = "VGA",
258 .probe = vga_probe,
259 .set_mode = vga_set_mode,
260};
diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S
deleted file mode 100644
index 8143c9516cb4..000000000000
--- a/arch/i386/boot/video.S
+++ /dev/null
@@ -1,2043 +0,0 @@
1/* video.S
2 *
3 * Display adapter & video mode setup, version 2.13 (14-May-99)
4 *
5 * Copyright (C) 1995 -- 1998 Martin Mares <mj@ucw.cz>
6 * Based on the original setup.S code (C) Linus Torvalds and Mats Anderson
7 *
8 * Rewritten to use GNU 'as' by Chris Noe <stiker@northlink.com> May 1999
9 *
10 * For further information, look at Documentation/svga.txt.
11 *
12 */
13
14/* Enable autodetection of SVGA adapters and modes. */
15#undef CONFIG_VIDEO_SVGA
16
17/* Enable autodetection of VESA modes */
18#define CONFIG_VIDEO_VESA
19
20/* Enable compacting of mode table */
21#define CONFIG_VIDEO_COMPACT
22
23/* Retain screen contents when switching modes */
24#define CONFIG_VIDEO_RETAIN
25
26/* Enable local mode list */
27#undef CONFIG_VIDEO_LOCAL
28
29/* Force 400 scan lines for standard modes (hack to fix bad BIOS behaviour */
30#undef CONFIG_VIDEO_400_HACK
31
32/* Hack that lets you force specific BIOS mode ID and specific dimensions */
33#undef CONFIG_VIDEO_GFX_HACK
34#define VIDEO_GFX_BIOS_AX 0x4f02 /* 800x600 on ThinkPad */
35#define VIDEO_GFX_BIOS_BX 0x0102
36#define VIDEO_GFX_DUMMY_RESOLUTION 0x6425 /* 100x37 */
37
38/* This code uses an extended set of video mode numbers. These include:
39 * Aliases for standard modes
40 * NORMAL_VGA (-1)
41 * EXTENDED_VGA (-2)
42 * ASK_VGA (-3)
43 * Video modes numbered by menu position -- NOT RECOMMENDED because of lack
44 * of compatibility when extending the table. These are between 0x00 and 0xff.
45 */
46#define VIDEO_FIRST_MENU 0x0000
47
48/* Standard BIOS video modes (BIOS number + 0x0100) */
49#define VIDEO_FIRST_BIOS 0x0100
50
51/* VESA BIOS video modes (VESA number + 0x0200) */
52#define VIDEO_FIRST_VESA 0x0200
53
54/* Video7 special modes (BIOS number + 0x0900) */
55#define VIDEO_FIRST_V7 0x0900
56
57/* Special video modes */
58#define VIDEO_FIRST_SPECIAL 0x0f00
59#define VIDEO_80x25 0x0f00
60#define VIDEO_8POINT 0x0f01
61#define VIDEO_80x43 0x0f02
62#define VIDEO_80x28 0x0f03
63#define VIDEO_CURRENT_MODE 0x0f04
64#define VIDEO_80x30 0x0f05
65#define VIDEO_80x34 0x0f06
66#define VIDEO_80x60 0x0f07
67#define VIDEO_GFX_HACK 0x0f08
68#define VIDEO_LAST_SPECIAL 0x0f09
69
70/* Video modes given by resolution */
71#define VIDEO_FIRST_RESOLUTION 0x1000
72
73/* The "recalculate timings" flag */
74#define VIDEO_RECALC 0x8000
75
76/* Positions of various video parameters passed to the kernel */
77/* (see also include/linux/tty.h) */
78#define PARAM_CURSOR_POS 0x00
79#define PARAM_VIDEO_PAGE 0x04
80#define PARAM_VIDEO_MODE 0x06
81#define PARAM_VIDEO_COLS 0x07
82#define PARAM_VIDEO_EGA_BX 0x0a
83#define PARAM_VIDEO_LINES 0x0e
84#define PARAM_HAVE_VGA 0x0f
85#define PARAM_FONT_POINTS 0x10
86
87#define PARAM_LFB_WIDTH 0x12
88#define PARAM_LFB_HEIGHT 0x14
89#define PARAM_LFB_DEPTH 0x16
90#define PARAM_LFB_BASE 0x18
91#define PARAM_LFB_SIZE 0x1c
92#define PARAM_LFB_LINELENGTH 0x24
93#define PARAM_LFB_COLORS 0x26
94#define PARAM_VESAPM_SEG 0x2e
95#define PARAM_VESAPM_OFF 0x30
96#define PARAM_LFB_PAGES 0x32
97#define PARAM_VESA_ATTRIB 0x34
98#define PARAM_CAPABILITIES 0x36
99
100/* Define DO_STORE according to CONFIG_VIDEO_RETAIN */
101#ifdef CONFIG_VIDEO_RETAIN
102#define DO_STORE call store_screen
103#else
104#define DO_STORE
105#endif /* CONFIG_VIDEO_RETAIN */
106
107# This is the main entry point called by setup.S
108# %ds *must* be pointing to the bootsector
109video: pushw %ds # We use different segments
110 pushw %ds # FS contains original DS
111 popw %fs
112 pushw %cs # DS is equal to CS
113 popw %ds
114 pushw %cs # ES is equal to CS
115 popw %es
116 xorw %ax, %ax
117 movw %ax, %gs # GS is zero
118 cld
119 call basic_detect # Basic adapter type testing (EGA/VGA/MDA/CGA)
120#ifdef CONFIG_VIDEO_SELECT
121 movw %fs:(0x01fa), %ax # User selected video mode
122 cmpw $ASK_VGA, %ax # Bring up the menu
123 jz vid2
124
125 call mode_set # Set the mode
126 jc vid1
127
128 leaw badmdt, %si # Invalid mode ID
129 call prtstr
130vid2: call mode_menu
131vid1:
132#ifdef CONFIG_VIDEO_RETAIN
133 call restore_screen # Restore screen contents
134#endif /* CONFIG_VIDEO_RETAIN */
135 call store_edid
136#endif /* CONFIG_VIDEO_SELECT */
137 call mode_params # Store mode parameters
138 popw %ds # Restore original DS
139 ret
140
141# Detect if we have CGA, MDA, EGA or VGA and pass it to the kernel.
142basic_detect:
143 movb $0, %fs:(PARAM_HAVE_VGA)
144 movb $0x12, %ah # Check EGA/VGA
145 movb $0x10, %bl
146 int $0x10
147 movw %bx, %fs:(PARAM_VIDEO_EGA_BX) # Identifies EGA to the kernel
148 cmpb $0x10, %bl # No, it's a CGA/MDA/HGA card.
149 je basret
150
151 incb adapter
152 movw $0x1a00, %ax # Check EGA or VGA?
153 int $0x10
154 cmpb $0x1a, %al # 1a means VGA...
155 jne basret # anything else is EGA.
156
157 incb %fs:(PARAM_HAVE_VGA) # We've detected a VGA
158 incb adapter
159basret: ret
160
161# Store the video mode parameters for later usage by the kernel.
162# This is done by asking the BIOS except for the rows/columns
163# parameters in the default 80x25 mode -- these are set directly,
164# because some very obscure BIOSes supply insane values.
165mode_params:
166#ifdef CONFIG_VIDEO_SELECT
167 cmpb $0, graphic_mode
168 jnz mopar_gr
169#endif
170 movb $0x03, %ah # Read cursor position
171 xorb %bh, %bh
172 int $0x10
173 movw %dx, %fs:(PARAM_CURSOR_POS)
174 movb $0x0f, %ah # Read page/mode/width
175 int $0x10
176 movw %bx, %fs:(PARAM_VIDEO_PAGE)
177 movw %ax, %fs:(PARAM_VIDEO_MODE) # Video mode and screen width
178 cmpb $0x7, %al # MDA/HGA => segment differs
179 jnz mopar0
180
181 movw $0xb000, video_segment
182mopar0: movw %gs:(0x485), %ax # Font size
183 movw %ax, %fs:(PARAM_FONT_POINTS) # (valid only on EGA/VGA)
184 movw force_size, %ax # Forced size?
185 orw %ax, %ax
186 jz mopar1
187
188 movb %ah, %fs:(PARAM_VIDEO_COLS)
189 movb %al, %fs:(PARAM_VIDEO_LINES)
190 ret
191
192mopar1: movb $25, %al
193 cmpb $0, adapter # If we are on CGA/MDA/HGA, the
194 jz mopar2 # screen must have 25 lines.
195
196 movb %gs:(0x484), %al # On EGA/VGA, use the EGA+ BIOS
197 incb %al # location of max lines.
198mopar2: movb %al, %fs:(PARAM_VIDEO_LINES)
199 ret
200
201#ifdef CONFIG_VIDEO_SELECT
202# Fetching of VESA frame buffer parameters
203mopar_gr:
204 leaw modelist+1024, %di
205 movb $0x23, %fs:(PARAM_HAVE_VGA)
206 movw 16(%di), %ax
207 movw %ax, %fs:(PARAM_LFB_LINELENGTH)
208 movw 18(%di), %ax
209 movw %ax, %fs:(PARAM_LFB_WIDTH)
210 movw 20(%di), %ax
211 movw %ax, %fs:(PARAM_LFB_HEIGHT)
212 movb 25(%di), %al
213 movb $0, %ah
214 movw %ax, %fs:(PARAM_LFB_DEPTH)
215 movb 29(%di), %al
216 movb $0, %ah
217 movw %ax, %fs:(PARAM_LFB_PAGES)
218 movl 40(%di), %eax
219 movl %eax, %fs:(PARAM_LFB_BASE)
220 movl 31(%di), %eax
221 movl %eax, %fs:(PARAM_LFB_COLORS)
222 movl 35(%di), %eax
223 movl %eax, %fs:(PARAM_LFB_COLORS+4)
224 movw 0(%di), %ax
225 movw %ax, %fs:(PARAM_VESA_ATTRIB)
226
227# get video mem size
228 leaw modelist+1024, %di
229 movw $0x4f00, %ax
230 int $0x10
231 xorl %eax, %eax
232 movw 18(%di), %ax
233 movl %eax, %fs:(PARAM_LFB_SIZE)
234
235# store mode capabilities
236 movl 10(%di), %eax
237 movl %eax, %fs:(PARAM_CAPABILITIES)
238
239# switching the DAC to 8-bit is for <= 8 bpp only
240 movw %fs:(PARAM_LFB_DEPTH), %ax
241 cmpw $8, %ax
242 jg dac_done
243
244# get DAC switching capability
245 xorl %eax, %eax
246 movb 10(%di), %al
247 testb $1, %al
248 jz dac_set
249
250# attempt to switch DAC to 8-bit
251 movw $0x4f08, %ax
252 movw $0x0800, %bx
253 int $0x10
254 cmpw $0x004f, %ax
255 jne dac_set
256 movb %bh, dac_size # store actual DAC size
257
258dac_set:
259# set color size to DAC size
260 movb dac_size, %al
261 movb %al, %fs:(PARAM_LFB_COLORS+0)
262 movb %al, %fs:(PARAM_LFB_COLORS+2)
263 movb %al, %fs:(PARAM_LFB_COLORS+4)
264 movb %al, %fs:(PARAM_LFB_COLORS+6)
265
266# set color offsets to 0
267 movb $0, %fs:(PARAM_LFB_COLORS+1)
268 movb $0, %fs:(PARAM_LFB_COLORS+3)
269 movb $0, %fs:(PARAM_LFB_COLORS+5)
270 movb $0, %fs:(PARAM_LFB_COLORS+7)
271
272dac_done:
273# get protected mode interface informations
274 movw $0x4f0a, %ax
275 xorw %bx, %bx
276 xorw %di, %di
277 int $0x10
278 cmp $0x004f, %ax
279 jnz no_pm
280
281 movw %es, %fs:(PARAM_VESAPM_SEG)
282 movw %di, %fs:(PARAM_VESAPM_OFF)
283no_pm: ret
284
285# The video mode menu
286mode_menu:
287 leaw keymsg, %si # "Return/Space/Timeout" message
288 call prtstr
289 call flush
290nokey: call getkt
291
292 cmpb $0x0d, %al # ENTER ?
293 je listm # yes - manual mode selection
294
295 cmpb $0x20, %al # SPACE ?
296 je defmd1 # no - repeat
297
298 call beep
299 jmp nokey
300
301defmd1: ret # No mode chosen? Default 80x25
302
303listm: call mode_table # List mode table
304listm0: leaw name_bann, %si # Print adapter name
305 call prtstr
306 movw card_name, %si
307 orw %si, %si
308 jnz an2
309
310 movb adapter, %al
311 leaw old_name, %si
312 orb %al, %al
313 jz an1
314
315 leaw ega_name, %si
316 decb %al
317 jz an1
318
319 leaw vga_name, %si
320 jmp an1
321
322an2: call prtstr
323 leaw svga_name, %si
324an1: call prtstr
325 leaw listhdr, %si # Table header
326 call prtstr
327 movb $0x30, %dl # DL holds mode number
328 leaw modelist, %si
329lm1: cmpw $ASK_VGA, (%si) # End?
330 jz lm2
331
332 movb %dl, %al # Menu selection number
333 call prtchr
334 call prtsp2
335 lodsw
336 call prthw # Mode ID
337 call prtsp2
338 movb 0x1(%si), %al
339 call prtdec # Rows
340 movb $0x78, %al # the letter 'x'
341 call prtchr
342 lodsw
343 call prtdec # Columns
344 movb $0x0d, %al # New line
345 call prtchr
346 movb $0x0a, %al
347 call prtchr
348 incb %dl # Next character
349 cmpb $0x3a, %dl
350 jnz lm1
351
352 movb $0x61, %dl
353 jmp lm1
354
355lm2: leaw prompt, %si # Mode prompt
356 call prtstr
357 leaw edit_buf, %di # Editor buffer
358lm3: call getkey
359 cmpb $0x0d, %al # Enter?
360 jz lment
361
362 cmpb $0x08, %al # Backspace?
363 jz lmbs
364
365 cmpb $0x20, %al # Printable?
366 jc lm3
367
368 cmpw $edit_buf+4, %di # Enough space?
369 jz lm3
370
371 stosb
372 call prtchr
373 jmp lm3
374
375lmbs: cmpw $edit_buf, %di # Backspace
376 jz lm3
377
378 decw %di
379 movb $0x08, %al
380 call prtchr
381 call prtspc
382 movb $0x08, %al
383 call prtchr
384 jmp lm3
385
386lment: movb $0, (%di)
387 leaw crlft, %si
388 call prtstr
389 leaw edit_buf, %si
390 cmpb $0, (%si) # Empty string = default mode
391 jz lmdef
392
393 cmpb $0, 1(%si) # One character = menu selection
394 jz mnusel
395
396 cmpw $0x6373, (%si) # "scan" => mode scanning
397 jnz lmhx
398
399 cmpw $0x6e61, 2(%si)
400 jz lmscan
401
402lmhx: xorw %bx, %bx # Else => mode ID in hex
403lmhex: lodsb
404 orb %al, %al
405 jz lmuse1
406
407 subb $0x30, %al
408 jc lmbad
409
410 cmpb $10, %al
411 jc lmhx1
412
413 subb $7, %al
414 andb $0xdf, %al
415 cmpb $10, %al
416 jc lmbad
417
418 cmpb $16, %al
419 jnc lmbad
420
421lmhx1: shlw $4, %bx
422 orb %al, %bl
423 jmp lmhex
424
425lmuse1: movw %bx, %ax
426 jmp lmuse
427
428mnusel: lodsb # Menu selection
429 xorb %ah, %ah
430 subb $0x30, %al
431 jc lmbad
432
433 cmpb $10, %al
434 jc lmuse
435
436 cmpb $0x61-0x30, %al
437 jc lmbad
438
439 subb $0x61-0x30-10, %al
440 cmpb $36, %al
441 jnc lmbad
442
443lmuse: call mode_set
444 jc lmdef
445
446lmbad: leaw unknt, %si
447 call prtstr
448 jmp lm2
449lmscan: cmpb $0, adapter # Scanning only on EGA/VGA
450 jz lmbad
451
452 movw $0, mt_end # Scanning of modes is
453 movb $1, scanning # done as new autodetection.
454 call mode_table
455 jmp listm0
456lmdef: ret
457
458# Additional parts of mode_set... (relative jumps, you know)
459setv7: # Video7 extended modes
460 DO_STORE
461 subb $VIDEO_FIRST_V7>>8, %bh
462 movw $0x6f05, %ax
463 int $0x10
464 stc
465 ret
466
467_setrec: jmp setrec # Ugly...
468_set_80x25: jmp set_80x25
469
470# Aliases for backward compatibility.
471setalias:
472 movw $VIDEO_80x25, %ax
473 incw %bx
474 jz mode_set
475
476 movb $VIDEO_8POINT-VIDEO_FIRST_SPECIAL, %al
477 incw %bx
478 jnz setbad # Fall-through!
479
480# Setting of user mode (AX=mode ID) => CF=success
481mode_set:
482 movw %ax, %fs:(0x01fa) # Store mode for use in acpi_wakeup.S
483 movw %ax, %bx
484 cmpb $0xff, %ah
485 jz setalias
486
487 testb $VIDEO_RECALC>>8, %ah
488 jnz _setrec
489
490 cmpb $VIDEO_FIRST_RESOLUTION>>8, %ah
491 jnc setres
492
493 cmpb $VIDEO_FIRST_SPECIAL>>8, %ah
494 jz setspc
495
496 cmpb $VIDEO_FIRST_V7>>8, %ah
497 jz setv7
498
499 cmpb $VIDEO_FIRST_VESA>>8, %ah
500 jnc check_vesa
501
502 orb %ah, %ah
503 jz setmenu
504
505 decb %ah
506 jz setbios
507
508setbad: clc
509 movb $0, do_restore # The screen needn't be restored
510 ret
511
512setvesa:
513 DO_STORE
514 subb $VIDEO_FIRST_VESA>>8, %bh
515 movw $0x4f02, %ax # VESA BIOS mode set call
516 int $0x10
517 cmpw $0x004f, %ax # AL=4f if implemented
518 jnz setbad # AH=0 if OK
519
520 stc
521 ret
522
523setbios:
524 DO_STORE
525 int $0x10 # Standard BIOS mode set call
526 pushw %bx
527 movb $0x0f, %ah # Check if really set
528 int $0x10
529 popw %bx
530 cmpb %bl, %al
531 jnz setbad
532
533 stc
534 ret
535
536setspc: xorb %bh, %bh # Set special mode
537 cmpb $VIDEO_LAST_SPECIAL-VIDEO_FIRST_SPECIAL, %bl
538 jnc setbad
539
540 addw %bx, %bx
541 jmp *spec_inits(%bx)
542
543setmenu:
544 orb %al, %al # 80x25 is an exception
545 jz _set_80x25
546
547 pushw %bx # Set mode chosen from menu
548 call mode_table # Build the mode table
549 popw %ax
550 shlw $2, %ax
551 addw %ax, %si
552 cmpw %di, %si
553 jnc setbad
554
555 movw (%si), %ax # Fetch mode ID
556_m_s: jmp mode_set
557
558setres: pushw %bx # Set mode chosen by resolution
559 call mode_table
560 popw %bx
561 xchgb %bl, %bh
562setr1: lodsw
563 cmpw $ASK_VGA, %ax # End of the list?
564 jz setbad
565
566 lodsw
567 cmpw %bx, %ax
568 jnz setr1
569
570 movw -4(%si), %ax # Fetch mode ID
571 jmp _m_s
572
573check_vesa:
574#ifdef CONFIG_FIRMWARE_EDID
575 leaw modelist+1024, %di
576 movw $0x4f00, %ax
577 int $0x10
578 cmpw $0x004f, %ax
579 jnz setbad
580
581 movw 4(%di), %ax
582 movw %ax, vbe_version
583#endif
584 leaw modelist+1024, %di
585 subb $VIDEO_FIRST_VESA>>8, %bh
586 movw %bx, %cx # Get mode information structure
587 movw $0x4f01, %ax
588 int $0x10
589 addb $VIDEO_FIRST_VESA>>8, %bh
590 cmpw $0x004f, %ax
591 jnz setbad
592
593 movb (%di), %al # Check capabilities.
594 andb $0x19, %al
595 cmpb $0x09, %al
596 jz setvesa # This is a text mode
597
598 movb (%di), %al # Check capabilities.
599 andb $0x99, %al
600 cmpb $0x99, %al
601 jnz _setbad # Doh! No linear frame buffer.
602
603 subb $VIDEO_FIRST_VESA>>8, %bh
604 orw $0x4000, %bx # Use linear frame buffer
605 movw $0x4f02, %ax # VESA BIOS mode set call
606 int $0x10
607 cmpw $0x004f, %ax # AL=4f if implemented
608 jnz _setbad # AH=0 if OK
609
610 movb $1, graphic_mode # flag graphic mode
611 movb $0, do_restore # no screen restore
612 stc
613 ret
614
615_setbad: jmp setbad # Ugly...
616
617# Recalculate vertical display end registers -- this fixes various
618# inconsistencies of extended modes on many adapters. Called when
619# the VIDEO_RECALC flag is set in the mode ID.
620
621setrec: subb $VIDEO_RECALC>>8, %ah # Set the base mode
622 call mode_set
623 jnc rct3
624
625 movw %gs:(0x485), %ax # Font size in pixels
626 movb %gs:(0x484), %bl # Number of rows
627 incb %bl
628 mulb %bl # Number of visible
629 decw %ax # scan lines - 1
630 movw $0x3d4, %dx
631 movw %ax, %bx
632 movb $0x12, %al # Lower 8 bits
633 movb %bl, %ah
634 outw %ax, %dx
635 movb $0x07, %al # Bits 8 and 9 in the overflow register
636 call inidx
637 xchgb %al, %ah
638 andb $0xbd, %ah
639 shrb %bh
640 jnc rct1
641 orb $0x02, %ah
642rct1: shrb %bh
643 jnc rct2
644 orb $0x40, %ah
645rct2: movb $0x07, %al
646 outw %ax, %dx
647 stc
648rct3: ret
649
650# Table of routines for setting of the special modes.
651spec_inits:
652 .word set_80x25
653 .word set_8pixel
654 .word set_80x43
655 .word set_80x28
656 .word set_current
657 .word set_80x30
658 .word set_80x34
659 .word set_80x60
660 .word set_gfx
661
662# Set the 80x25 mode. If already set, do nothing.
663set_80x25:
664 movw $0x5019, force_size # Override possibly broken BIOS
665use_80x25:
666#ifdef CONFIG_VIDEO_400_HACK
667 movw $0x1202, %ax # Force 400 scan lines
668 movb $0x30, %bl
669 int $0x10
670#else
671 movb $0x0f, %ah # Get current mode ID
672 int $0x10
673 cmpw $0x5007, %ax # Mode 7 (80x25 mono) is the only one available
674 jz st80 # on CGA/MDA/HGA and is also available on EGAM
675
676 cmpw $0x5003, %ax # Unknown mode, force 80x25 color
677 jnz force3
678
679st80: cmpb $0, adapter # CGA/MDA/HGA => mode 3/7 is always 80x25
680 jz set80
681
682 movb %gs:(0x0484), %al # This is EGA+ -- beware of 80x50 etc.
683 orb %al, %al # Some buggy BIOS'es set 0 rows
684 jz set80
685
686 cmpb $24, %al # It's hopefully correct
687 jz set80
688#endif /* CONFIG_VIDEO_400_HACK */
689force3: DO_STORE
690 movw $0x0003, %ax # Forced set
691 int $0x10
692set80: stc
693 ret
694
695# Set the 80x50/80x43 8-pixel mode. Simple BIOS calls.
696set_8pixel:
697 DO_STORE
698 call use_80x25 # The base is 80x25
699set_8pt:
700 movw $0x1112, %ax # Use 8x8 font
701 xorb %bl, %bl
702 int $0x10
703 movw $0x1200, %ax # Use alternate print screen
704 movb $0x20, %bl
705 int $0x10
706 movw $0x1201, %ax # Turn off cursor emulation
707 movb $0x34, %bl
708 int $0x10
709 movb $0x01, %ah # Define cursor scan lines 6-7
710 movw $0x0607, %cx
711 int $0x10
712set_current:
713 stc
714 ret
715
716# Set the 80x28 mode. This mode works on all VGA's, because it's a standard
717# 80x25 mode with 14-point fonts instead of 16-point.
718set_80x28:
719 DO_STORE
720 call use_80x25 # The base is 80x25
721set14: movw $0x1111, %ax # Use 9x14 font
722 xorb %bl, %bl
723 int $0x10
724 movb $0x01, %ah # Define cursor scan lines 11-12
725 movw $0x0b0c, %cx
726 int $0x10
727 stc
728 ret
729
730# Set the 80x43 mode. This mode is works on all VGA's.
731# It's a 350-scanline mode with 8-pixel font.
732set_80x43:
733 DO_STORE
734 movw $0x1201, %ax # Set 350 scans
735 movb $0x30, %bl
736 int $0x10
737 movw $0x0003, %ax # Reset video mode
738 int $0x10
739 jmp set_8pt # Use 8-pixel font
740
741# Set the 80x30 mode (all VGA's). 480 scanlines, 16-pixel font.
742set_80x30:
743 call use_80x25 # Start with real 80x25
744 DO_STORE
745 movw $0x3cc, %dx # Get CRTC port
746 inb %dx, %al
747 movb $0xd4, %dl
748 rorb %al # Mono or color?
749 jc set48a
750
751 movb $0xb4, %dl
752set48a: movw $0x0c11, %ax # Vertical sync end (also unlocks CR0-7)
753 call outidx
754 movw $0x0b06, %ax # Vertical total
755 call outidx
756 movw $0x3e07, %ax # (Vertical) overflow
757 call outidx
758 movw $0xea10, %ax # Vertical sync start
759 call outidx
760 movw $0xdf12, %ax # Vertical display end
761 call outidx
762 movw $0xe715, %ax # Vertical blank start
763 call outidx
764 movw $0x0416, %ax # Vertical blank end
765 call outidx
766 pushw %dx
767 movb $0xcc, %dl # Misc output register (read)
768 inb %dx, %al
769 movb $0xc2, %dl # (write)
770 andb $0x0d, %al # Preserve clock select bits and color bit
771 orb $0xe2, %al # Set correct sync polarity
772 outb %al, %dx
773 popw %dx
774 movw $0x501e, force_size
775 stc # That's all.
776 ret
777
778# Set the 80x34 mode (all VGA's). 480 scans, 14-pixel font.
779set_80x34:
780 call set_80x30 # Set 480 scans
781 call set14 # And 14-pt font
782 movw $0xdb12, %ax # VGA vertical display end
783 movw $0x5022, force_size
784setvde: call outidx
785 stc
786 ret
787
788# Set the 80x60 mode (all VGA's). 480 scans, 8-pixel font.
789set_80x60:
790 call set_80x30 # Set 480 scans
791 call set_8pt # And 8-pt font
792 movw $0xdf12, %ax # VGA vertical display end
793 movw $0x503c, force_size
794 jmp setvde
795
796# Special hack for ThinkPad graphics
797set_gfx:
798#ifdef CONFIG_VIDEO_GFX_HACK
799 movw $VIDEO_GFX_BIOS_AX, %ax
800 movw $VIDEO_GFX_BIOS_BX, %bx
801 int $0x10
802 movw $VIDEO_GFX_DUMMY_RESOLUTION, force_size
803 stc
804#endif
805 ret
806
807#ifdef CONFIG_VIDEO_RETAIN
808
809# Store screen contents to temporary buffer.
810store_screen:
811 cmpb $0, do_restore # Already stored?
812 jnz stsr
813
814 testb $CAN_USE_HEAP, loadflags # Have we space for storing?
815 jz stsr
816
817 pushw %ax
818 pushw %bx
819 pushw force_size # Don't force specific size
820 movw $0, force_size
821 call mode_params # Obtain params of current mode
822 popw force_size
823 movb %fs:(PARAM_VIDEO_LINES), %ah
824 movb %fs:(PARAM_VIDEO_COLS), %al
825 movw %ax, %bx # BX=dimensions
826 mulb %ah
827 movw %ax, %cx # CX=number of characters
828 addw %ax, %ax # Calculate image size
829 addw $modelist+1024+4, %ax
830 cmpw heap_end_ptr, %ax
831 jnc sts1 # Unfortunately, out of memory
832
833 movw %fs:(PARAM_CURSOR_POS), %ax # Store mode params
834 leaw modelist+1024, %di
835 stosw
836 movw %bx, %ax
837 stosw
838 pushw %ds # Store the screen
839 movw video_segment, %ds
840 xorw %si, %si
841 rep
842 movsw
843 popw %ds
844 incb do_restore # Screen will be restored later
845sts1: popw %bx
846 popw %ax
847stsr: ret
848
849# Restore screen contents from temporary buffer.
850restore_screen:
851 cmpb $0, do_restore # Has the screen been stored?
852 jz res1
853
854 call mode_params # Get parameters of current mode
855 movb %fs:(PARAM_VIDEO_LINES), %cl
856 movb %fs:(PARAM_VIDEO_COLS), %ch
857 leaw modelist+1024, %si # Screen buffer
858 lodsw # Set cursor position
859 movw %ax, %dx
860 cmpb %cl, %dh
861 jc res2
862
863 movb %cl, %dh
864 decb %dh
865res2: cmpb %ch, %dl
866 jc res3
867
868 movb %ch, %dl
869 decb %dl
870res3: movb $0x02, %ah
871 movb $0x00, %bh
872 int $0x10
873 lodsw # Display size
874 movb %ah, %dl # DL=number of lines
875 movb $0, %ah # BX=phys. length of orig. line
876 movw %ax, %bx
877 cmpb %cl, %dl # Too many?
878 jc res4
879
880 pushw %ax
881 movb %dl, %al
882 subb %cl, %al
883 mulb %bl
884 addw %ax, %si
885 addw %ax, %si
886 popw %ax
887 movb %cl, %dl
888res4: cmpb %ch, %al # Too wide?
889 jc res5
890
891 movb %ch, %al # AX=width of src. line
892res5: movb $0, %cl
893 xchgb %ch, %cl
894 movw %cx, %bp # BP=width of dest. line
895 pushw %es
896 movw video_segment, %es
897 xorw %di, %di # Move the data
898 addw %bx, %bx # Convert BX and BP to _bytes_
899 addw %bp, %bp
900res6: pushw %si
901 pushw %di
902 movw %ax, %cx
903 rep
904 movsw
905 popw %di
906 popw %si
907 addw %bp, %di
908 addw %bx, %si
909 decb %dl
910 jnz res6
911
912 popw %es # Done
913res1: ret
914#endif /* CONFIG_VIDEO_RETAIN */
915
916# Write to indexed VGA register (AL=index, AH=data, DX=index reg. port)
917outidx: outb %al, %dx
918 pushw %ax
919 movb %ah, %al
920 incw %dx
921 outb %al, %dx
922 decw %dx
923 popw %ax
924 ret
925
926# Build the table of video modes (stored after the setup.S code at the
927# `modelist' label. Each video mode record looks like:
928# .word MODE-ID (our special mode ID (see above))
929# .byte rows (number of rows)
930# .byte columns (number of columns)
931# Returns address of the end of the table in DI, the end is marked
932# with a ASK_VGA ID.
933mode_table:
934 movw mt_end, %di # Already filled?
935 orw %di, %di
936 jnz mtab1x
937
938 leaw modelist, %di # Store standard modes:
939 movl $VIDEO_80x25 + 0x50190000, %eax # The 80x25 mode (ALL)
940 stosl
941 movb adapter, %al # CGA/MDA/HGA -- no more modes
942 orb %al, %al
943 jz mtabe
944
945 decb %al
946 jnz mtabv
947
948 movl $VIDEO_8POINT + 0x502b0000, %eax # The 80x43 EGA mode
949 stosl
950 jmp mtabe
951
952mtab1x: jmp mtab1
953
954mtabv: leaw vga_modes, %si # All modes for std VGA
955 movw $vga_modes_end-vga_modes, %cx
956 rep # I'm unable to use movsw as I don't know how to store a half
957 movsb # of the expression above to cx without using explicit shr.
958
959 cmpb $0, scanning # Mode scan requested?
960 jz mscan1
961
962 call mode_scan
963mscan1:
964
965#ifdef CONFIG_VIDEO_LOCAL
966 call local_modes
967#endif /* CONFIG_VIDEO_LOCAL */
968
969#ifdef CONFIG_VIDEO_VESA
970 call vesa_modes # Detect VESA VGA modes
971#endif /* CONFIG_VIDEO_VESA */
972
973#ifdef CONFIG_VIDEO_SVGA
974 cmpb $0, scanning # Bypass when scanning
975 jnz mscan2
976
977 call svga_modes # Detect SVGA cards & modes
978mscan2:
979#endif /* CONFIG_VIDEO_SVGA */
980
981mtabe:
982
983#ifdef CONFIG_VIDEO_COMPACT
984 leaw modelist, %si
985 movw %di, %dx
986 movw %si, %di
987cmt1: cmpw %dx, %si # Scan all modes
988 jz cmt2
989
990 leaw modelist, %bx # Find in previous entries
991 movw 2(%si), %cx
992cmt3: cmpw %bx, %si
993 jz cmt4
994
995 cmpw 2(%bx), %cx # Found => don't copy this entry
996 jz cmt5
997
998 addw $4, %bx
999 jmp cmt3
1000
1001cmt4: movsl # Copy entry
1002 jmp cmt1
1003
1004cmt5: addw $4, %si # Skip entry
1005 jmp cmt1
1006
1007cmt2:
1008#endif /* CONFIG_VIDEO_COMPACT */
1009
1010 movw $ASK_VGA, (%di) # End marker
1011 movw %di, mt_end
1012mtab1: leaw modelist, %si # SI=mode list, DI=list end
1013ret0: ret
1014
1015# Modes usable on all standard VGAs
1016vga_modes:
1017 .word VIDEO_8POINT
1018 .word 0x5032 # 80x50
1019 .word VIDEO_80x43
1020 .word 0x502b # 80x43
1021 .word VIDEO_80x28
1022 .word 0x501c # 80x28
1023 .word VIDEO_80x30
1024 .word 0x501e # 80x30
1025 .word VIDEO_80x34
1026 .word 0x5022 # 80x34
1027 .word VIDEO_80x60
1028 .word 0x503c # 80x60
1029#ifdef CONFIG_VIDEO_GFX_HACK
1030 .word VIDEO_GFX_HACK
1031 .word VIDEO_GFX_DUMMY_RESOLUTION
1032#endif
1033
1034vga_modes_end:
1035# Detect VESA modes.
1036
1037#ifdef CONFIG_VIDEO_VESA
1038vesa_modes:
1039 cmpb $2, adapter # VGA only
1040 jnz ret0
1041
1042 movw %di, %bp # BP=original mode table end
1043 addw $0x200, %di # Buffer space
1044 movw $0x4f00, %ax # VESA Get card info call
1045 int $0x10
1046 movw %bp, %di
1047 cmpw $0x004f, %ax # Successful?
1048 jnz ret0
1049
1050 cmpw $0x4556, 0x200(%di)
1051 jnz ret0
1052
1053 cmpw $0x4153, 0x202(%di)
1054 jnz ret0
1055
1056 movw $vesa_name, card_name # Set name to "VESA VGA"
1057 pushw %gs
1058 lgsw 0x20e(%di), %si # GS:SI=mode list
1059 movw $128, %cx # Iteration limit
1060vesa1:
1061# gas version 2.9.1, using BFD version 2.9.1.0.23 buggers the next inst.
1062# XXX: lodsw %gs:(%si), %ax # Get next mode in the list
1063 gs; lodsw
1064 cmpw $0xffff, %ax # End of the table?
1065 jz vesar
1066
1067 cmpw $0x0080, %ax # Check validity of mode ID
1068 jc vesa2
1069
1070 orb %ah, %ah # Valid IDs: 0x0000-0x007f/0x0100-0x07ff
1071 jz vesan # Certain BIOSes report 0x80-0xff!
1072
1073 cmpw $0x0800, %ax
1074 jnc vesae
1075
1076vesa2: pushw %cx
1077 movw %ax, %cx # Get mode information structure
1078 movw $0x4f01, %ax
1079 int $0x10
1080 movw %cx, %bx # BX=mode number
1081 addb $VIDEO_FIRST_VESA>>8, %bh
1082 popw %cx
1083 cmpw $0x004f, %ax
1084 jnz vesan # Don't report errors (buggy BIOSES)
1085
1086 movb (%di), %al # Check capabilities. We require
1087 andb $0x19, %al # a color text mode.
1088 cmpb $0x09, %al
1089 jnz vesan
1090
1091 cmpw $0xb800, 8(%di) # Standard video memory address required
1092 jnz vesan
1093
1094 testb $2, (%di) # Mode characteristics supplied?
1095 movw %bx, (%di) # Store mode number
1096 jz vesa3
1097
1098 xorw %dx, %dx
1099 movw 0x12(%di), %bx # Width
1100 orb %bh, %bh
1101 jnz vesan
1102
1103 movb %bl, 0x3(%di)
1104 movw 0x14(%di), %ax # Height
1105 orb %ah, %ah
1106 jnz vesan
1107
1108 movb %al, 2(%di)
1109 mulb %bl
1110 cmpw $8193, %ax # Small enough for Linux console driver?
1111 jnc vesan
1112
1113 jmp vesaok
1114
1115vesa3: subw $0x8108, %bx # This mode has no detailed info specified,
1116 jc vesan # so it must be a standard VESA mode.
1117
1118 cmpw $5, %bx
1119 jnc vesan
1120
1121 movw vesa_text_mode_table(%bx), %ax
1122 movw %ax, 2(%di)
1123vesaok: addw $4, %di # The mode is valid. Store it.
1124vesan: loop vesa1 # Next mode. Limit exceeded => error
1125vesae: leaw vesaer, %si
1126 call prtstr
1127 movw %bp, %di # Discard already found modes.
1128vesar: popw %gs
1129 ret
1130
1131# Dimensions of standard VESA text modes
1132vesa_text_mode_table:
1133 .byte 60, 80 # 0108
1134 .byte 25, 132 # 0109
1135 .byte 43, 132 # 010A
1136 .byte 50, 132 # 010B
1137 .byte 60, 132 # 010C
1138#endif /* CONFIG_VIDEO_VESA */
1139
1140# Scan for video modes. A bit dirty, but should work.
1141mode_scan:
1142 movw $0x0100, %cx # Start with mode 0
1143scm1: movb $0, %ah # Test the mode
1144 movb %cl, %al
1145 int $0x10
1146 movb $0x0f, %ah
1147 int $0x10
1148 cmpb %cl, %al
1149 jnz scm2 # Mode not set
1150
1151 movw $0x3c0, %dx # Test if it's a text mode
1152 movb $0x10, %al # Mode bits
1153 call inidx
1154 andb $0x03, %al
1155 jnz scm2
1156
1157 movb $0xce, %dl # Another set of mode bits
1158 movb $0x06, %al
1159 call inidx
1160 shrb %al
1161 jc scm2
1162
1163 movb $0xd4, %dl # Cursor location
1164 movb $0x0f, %al
1165 call inidx
1166 orb %al, %al
1167 jnz scm2
1168
1169 movw %cx, %ax # Ok, store the mode
1170 stosw
1171 movb %gs:(0x484), %al # Number of rows
1172 incb %al
1173 stosb
1174 movw %gs:(0x44a), %ax # Number of columns
1175 stosb
1176scm2: incb %cl
1177 jns scm1
1178
1179 movw $0x0003, %ax # Return back to mode 3
1180 int $0x10
1181 ret
1182
1183tstidx: outw %ax, %dx # OUT DX,AX and inidx
1184inidx: outb %al, %dx # Read from indexed VGA register
1185 incw %dx # AL=index, DX=index reg port -> AL=data
1186 inb %dx, %al
1187 decw %dx
1188 ret
1189
1190# Try to detect type of SVGA card and supply (usually approximate) video
1191# mode table for it.
1192
1193#ifdef CONFIG_VIDEO_SVGA
1194svga_modes:
1195 leaw svga_table, %si # Test all known SVGA adapters
1196dosvga: lodsw
1197 movw %ax, %bp # Default mode table
1198 orw %ax, %ax
1199 jz didsv1
1200
1201 lodsw # Pointer to test routine
1202 pushw %si
1203 pushw %di
1204 pushw %es
1205 movw $0xc000, %bx
1206 movw %bx, %es
1207 call *%ax # Call test routine
1208 popw %es
1209 popw %di
1210 popw %si
1211 orw %bp, %bp
1212 jz dosvga
1213
1214 movw %bp, %si # Found, copy the modes
1215 movb svga_prefix, %ah
1216cpsvga: lodsb
1217 orb %al, %al
1218 jz didsv
1219
1220 stosw
1221 movsw
1222 jmp cpsvga
1223
1224didsv: movw %si, card_name # Store pointer to card name
1225didsv1: ret
1226
1227# Table of all known SVGA cards. For each card, we store a pointer to
1228# a table of video modes supported by the card and a pointer to a routine
1229# used for testing of presence of the card. The video mode table is always
1230# followed by the name of the card or the chipset.
1231svga_table:
1232 .word ati_md, ati_test
1233 .word oak_md, oak_test
1234 .word paradise_md, paradise_test
1235 .word realtek_md, realtek_test
1236 .word s3_md, s3_test
1237 .word chips_md, chips_test
1238 .word video7_md, video7_test
1239 .word cirrus5_md, cirrus5_test
1240 .word cirrus6_md, cirrus6_test
1241 .word cirrus1_md, cirrus1_test
1242 .word ahead_md, ahead_test
1243 .word everex_md, everex_test
1244 .word genoa_md, genoa_test
1245 .word trident_md, trident_test
1246 .word tseng_md, tseng_test
1247 .word 0
1248
1249# Test routines and mode tables:
1250
1251# S3 - The test algorithm was taken from the SuperProbe package
1252# for XFree86 1.2.1. Report bugs to Christoph.Niemann@linux.org
1253s3_test:
1254 movw $0x0f35, %cx # we store some constants in cl/ch
1255 movw $0x03d4, %dx
1256 movb $0x38, %al
1257 call inidx
1258 movb %al, %bh # store current CRT-register 0x38
1259 movw $0x0038, %ax
1260 call outidx # disable writing to special regs
1261 movb %cl, %al # check whether we can write special reg 0x35
1262 call inidx
1263 movb %al, %bl # save the current value of CRT reg 0x35
1264 andb $0xf0, %al # clear bits 0-3
1265 movb %al, %ah
1266 movb %cl, %al # and write it to CRT reg 0x35
1267 call outidx
1268 call inidx # now read it back
1269 andb %ch, %al # clear the upper 4 bits
1270 jz s3_2 # the first test failed. But we have a
1271
1272 movb %bl, %ah # second chance
1273 movb %cl, %al
1274 call outidx
1275 jmp s3_1 # do the other tests
1276
1277s3_2: movw %cx, %ax # load ah with 0xf and al with 0x35
1278 orb %bl, %ah # set the upper 4 bits of ah with the orig value
1279 call outidx # write ...
1280 call inidx # ... and reread
1281 andb %cl, %al # turn off the upper 4 bits
1282 pushw %ax
1283 movb %bl, %ah # restore old value in register 0x35
1284 movb %cl, %al
1285 call outidx
1286 popw %ax
1287 cmpb %ch, %al # setting lower 4 bits was successful => bad
1288 je no_s3 # writing is allowed => this is not an S3
1289
1290s3_1: movw $0x4838, %ax # allow writing to special regs by putting
1291 call outidx # magic number into CRT-register 0x38
1292 movb %cl, %al # check whether we can write special reg 0x35
1293 call inidx
1294 movb %al, %bl
1295 andb $0xf0, %al
1296 movb %al, %ah
1297 movb %cl, %al
1298 call outidx
1299 call inidx
1300 andb %ch, %al
1301 jnz no_s3 # no, we can't write => no S3
1302
1303 movw %cx, %ax
1304 orb %bl, %ah
1305 call outidx
1306 call inidx
1307 andb %ch, %al
1308 pushw %ax
1309 movb %bl, %ah # restore old value in register 0x35
1310 movb %cl, %al
1311 call outidx
1312 popw %ax
1313 cmpb %ch, %al
1314 jne no_s31 # writing not possible => no S3
1315 movb $0x30, %al
1316 call inidx # now get the S3 id ...
1317 leaw idS3, %di
1318 movw $0x10, %cx
1319 repne
1320 scasb
1321 je no_s31
1322
1323 movb %bh, %ah
1324 movb $0x38, %al
1325 jmp s3rest
1326
1327no_s3: movb $0x35, %al # restore CRT register 0x35
1328 movb %bl, %ah
1329 call outidx
1330no_s31: xorw %bp, %bp # Detection failed
1331s3rest: movb %bh, %ah
1332 movb $0x38, %al # restore old value of CRT register 0x38
1333 jmp outidx
1334
1335idS3: .byte 0x81, 0x82, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95
1336 .byte 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa8, 0xb0
1337
1338s3_md: .byte 0x54, 0x2b, 0x84
1339 .byte 0x55, 0x19, 0x84
1340 .byte 0
1341 .ascii "S3"
1342 .byte 0
1343
1344# ATI cards.
1345ati_test:
1346 leaw idati, %si
1347 movw $0x31, %di
1348 movw $0x09, %cx
1349 repe
1350 cmpsb
1351 je atiok
1352
1353 xorw %bp, %bp
1354atiok: ret
1355
1356idati: .ascii "761295520"
1357
1358ati_md: .byte 0x23, 0x19, 0x84
1359 .byte 0x33, 0x2c, 0x84
1360 .byte 0x22, 0x1e, 0x64
1361 .byte 0x21, 0x19, 0x64
1362 .byte 0x58, 0x21, 0x50
1363 .byte 0x5b, 0x1e, 0x50
1364 .byte 0
1365 .ascii "ATI"
1366 .byte 0
1367
1368# AHEAD
1369ahead_test:
1370 movw $0x200f, %ax
1371 movw $0x3ce, %dx
1372 outw %ax, %dx
1373 incw %dx
1374 inb %dx, %al
1375 cmpb $0x20, %al
1376 je isahed
1377
1378 cmpb $0x21, %al
1379 je isahed
1380
1381 xorw %bp, %bp
1382isahed: ret
1383
1384ahead_md:
1385 .byte 0x22, 0x2c, 0x84
1386 .byte 0x23, 0x19, 0x84
1387 .byte 0x24, 0x1c, 0x84
1388 .byte 0x2f, 0x32, 0xa0
1389 .byte 0x32, 0x22, 0x50
1390 .byte 0x34, 0x42, 0x50
1391 .byte 0
1392 .ascii "Ahead"
1393 .byte 0
1394
1395# Chips & Tech.
1396chips_test:
1397 movw $0x3c3, %dx
1398 inb %dx, %al
1399 orb $0x10, %al
1400 outb %al, %dx
1401 movw $0x104, %dx
1402 inb %dx, %al
1403 movb %al, %bl
1404 movw $0x3c3, %dx
1405 inb %dx, %al
1406 andb $0xef, %al
1407 outb %al, %dx
1408 cmpb $0xa5, %bl
1409 je cantok
1410
1411 xorw %bp, %bp
1412cantok: ret
1413
1414chips_md:
1415 .byte 0x60, 0x19, 0x84
1416 .byte 0x61, 0x32, 0x84
1417 .byte 0
1418 .ascii "Chips & Technologies"
1419 .byte 0
1420
1421# Cirrus Logic 5X0
1422cirrus1_test:
1423 movw $0x3d4, %dx
1424 movb $0x0c, %al
1425 outb %al, %dx
1426 incw %dx
1427 inb %dx, %al
1428 movb %al, %bl
1429 xorb %al, %al
1430 outb %al, %dx
1431 decw %dx
1432 movb $0x1f, %al
1433 outb %al, %dx
1434 incw %dx
1435 inb %dx, %al
1436 movb %al, %bh
1437 xorb %ah, %ah
1438 shlb $4, %al
1439 movw %ax, %cx
1440 movb %bh, %al
1441 shrb $4, %al
1442 addw %ax, %cx
1443 shlw $8, %cx
1444 addw $6, %cx
1445 movw %cx, %ax
1446 movw $0x3c4, %dx
1447 outw %ax, %dx
1448 incw %dx
1449 inb %dx, %al
1450 andb %al, %al
1451 jnz nocirr
1452
1453 movb %bh, %al
1454 outb %al, %dx
1455 inb %dx, %al
1456 cmpb $0x01, %al
1457 je iscirr
1458
1459nocirr: xorw %bp, %bp
1460iscirr: movw $0x3d4, %dx
1461 movb %bl, %al
1462 xorb %ah, %ah
1463 shlw $8, %ax
1464 addw $0x0c, %ax
1465 outw %ax, %dx
1466 ret
1467
1468cirrus1_md:
1469 .byte 0x1f, 0x19, 0x84
1470 .byte 0x20, 0x2c, 0x84
1471 .byte 0x22, 0x1e, 0x84
1472 .byte 0x31, 0x25, 0x64
1473 .byte 0
1474 .ascii "Cirrus Logic 5X0"
1475 .byte 0
1476
1477# Cirrus Logic 54XX
1478cirrus5_test:
1479 movw $0x3c4, %dx
1480 movb $6, %al
1481 call inidx
1482 movb %al, %bl # BL=backup
1483 movw $6, %ax
1484 call tstidx
1485 cmpb $0x0f, %al
1486 jne c5fail
1487
1488 movw $0x1206, %ax
1489 call tstidx
1490 cmpb $0x12, %al
1491 jne c5fail
1492
1493 movb $0x1e, %al
1494 call inidx
1495 movb %al, %bh
1496 movb %bh, %ah
1497 andb $0xc0, %ah
1498 movb $0x1e, %al
1499 call tstidx
1500 andb $0x3f, %al
1501 jne c5xx
1502
1503 movb $0x1e, %al
1504 movb %bh, %ah
1505 orb $0x3f, %ah
1506 call tstidx
1507 xorb $0x3f, %al
1508 andb $0x3f, %al
1509c5xx: pushf
1510 movb $0x1e, %al
1511 movb %bh, %ah
1512 outw %ax, %dx
1513 popf
1514 je c5done
1515
1516c5fail: xorw %bp, %bp
1517c5done: movb $6, %al
1518 movb %bl, %ah
1519 outw %ax, %dx
1520 ret
1521
1522cirrus5_md:
1523 .byte 0x14, 0x19, 0x84
1524 .byte 0x54, 0x2b, 0x84
1525 .byte 0
1526 .ascii "Cirrus Logic 54XX"
1527 .byte 0
1528
1529# Cirrus Logic 64XX -- no known extra modes, but must be identified, because
1530# it's misidentified by the Ahead test.
1531cirrus6_test:
1532 movw $0x3ce, %dx
1533 movb $0x0a, %al
1534 call inidx
1535 movb %al, %bl # BL=backup
1536 movw $0xce0a, %ax
1537 call tstidx
1538 orb %al, %al
1539 jne c2fail
1540
1541 movw $0xec0a, %ax
1542 call tstidx
1543 cmpb $0x01, %al
1544 jne c2fail
1545
1546 movb $0xaa, %al
1547 call inidx # 4X, 5X, 7X and 8X are valid 64XX chip ID's.
1548 shrb $4, %al
1549 subb $4, %al
1550 jz c6done
1551
1552 decb %al
1553 jz c6done
1554
1555 subb $2, %al
1556 jz c6done
1557
1558 decb %al
1559 jz c6done
1560
1561c2fail: xorw %bp, %bp
1562c6done: movb $0x0a, %al
1563 movb %bl, %ah
1564 outw %ax, %dx
1565 ret
1566
1567cirrus6_md:
1568 .byte 0
1569 .ascii "Cirrus Logic 64XX"
1570 .byte 0
1571
1572# Everex / Trident
1573everex_test:
1574 movw $0x7000, %ax
1575 xorw %bx, %bx
1576 int $0x10
1577 cmpb $0x70, %al
1578 jne noevrx
1579
1580 shrw $4, %dx
1581 cmpw $0x678, %dx
1582 je evtrid
1583
1584 cmpw $0x236, %dx
1585 jne evrxok
1586
1587evtrid: leaw trident_md, %bp
1588evrxok: ret
1589
1590noevrx: xorw %bp, %bp
1591 ret
1592
1593everex_md:
1594 .byte 0x03, 0x22, 0x50
1595 .byte 0x04, 0x3c, 0x50
1596 .byte 0x07, 0x2b, 0x64
1597 .byte 0x08, 0x4b, 0x64
1598 .byte 0x0a, 0x19, 0x84
1599 .byte 0x0b, 0x2c, 0x84
1600 .byte 0x16, 0x1e, 0x50
1601 .byte 0x18, 0x1b, 0x64
1602 .byte 0x21, 0x40, 0xa0
1603 .byte 0x40, 0x1e, 0x84
1604 .byte 0
1605 .ascii "Everex/Trident"
1606 .byte 0
1607
1608# Genoa.
1609genoa_test:
1610 leaw idgenoa, %si # Check Genoa 'clues'
1611 xorw %ax, %ax
1612 movb %es:(0x37), %al
1613 movw %ax, %di
1614 movw $0x04, %cx
1615 decw %si
1616 decw %di
1617l1: incw %si
1618 incw %di
1619 movb (%si), %al
1620 testb %al, %al
1621 jz l2
1622
1623 cmpb %es:(%di), %al
1624l2: loope l1
1625 orw %cx, %cx
1626 je isgen
1627
1628 xorw %bp, %bp
1629isgen: ret
1630
1631idgenoa: .byte 0x77, 0x00, 0x99, 0x66
1632
1633genoa_md:
1634 .byte 0x58, 0x20, 0x50
1635 .byte 0x5a, 0x2a, 0x64
1636 .byte 0x60, 0x19, 0x84
1637 .byte 0x61, 0x1d, 0x84
1638 .byte 0x62, 0x20, 0x84
1639 .byte 0x63, 0x2c, 0x84
1640 .byte 0x64, 0x3c, 0x84
1641 .byte 0x6b, 0x4f, 0x64
1642 .byte 0x72, 0x3c, 0x50
1643 .byte 0x74, 0x42, 0x50
1644 .byte 0x78, 0x4b, 0x64
1645 .byte 0
1646 .ascii "Genoa"
1647 .byte 0
1648
1649# OAK
1650oak_test:
1651 leaw idoakvga, %si
1652 movw $0x08, %di
1653 movw $0x08, %cx
1654 repe
1655 cmpsb
1656 je isoak
1657
1658 xorw %bp, %bp
1659isoak: ret
1660
1661idoakvga: .ascii "OAK VGA "
1662
1663oak_md: .byte 0x4e, 0x3c, 0x50
1664 .byte 0x4f, 0x3c, 0x84
1665 .byte 0x50, 0x19, 0x84
1666 .byte 0x51, 0x2b, 0x84
1667 .byte 0
1668 .ascii "OAK"
1669 .byte 0
1670
1671# WD Paradise.
1672paradise_test:
1673 leaw idparadise, %si
1674 movw $0x7d, %di
1675 movw $0x04, %cx
1676 repe
1677 cmpsb
1678 je ispara
1679
1680 xorw %bp, %bp
1681ispara: ret
1682
1683idparadise: .ascii "VGA="
1684
1685paradise_md:
1686 .byte 0x41, 0x22, 0x50
1687 .byte 0x47, 0x1c, 0x84
1688 .byte 0x55, 0x19, 0x84
1689 .byte 0x54, 0x2c, 0x84
1690 .byte 0
1691 .ascii "Paradise"
1692 .byte 0
1693
1694# Trident.
1695trident_test:
1696 movw $0x3c4, %dx
1697 movb $0x0e, %al
1698 outb %al, %dx
1699 incw %dx
1700 inb %dx, %al
1701 xchgb %al, %ah
1702 xorb %al, %al
1703 outb %al, %dx
1704 inb %dx, %al
1705 xchgb %ah, %al
1706 movb %al, %bl # Strange thing ... in the book this wasn't
1707 andb $0x02, %bl # necessary but it worked on my card which
1708 jz setb2 # is a trident. Without it the screen goes
1709 # blurred ...
1710 andb $0xfd, %al
1711 jmp clrb2
1712
1713setb2: orb $0x02, %al
1714clrb2: outb %al, %dx
1715 andb $0x0f, %ah
1716 cmpb $0x02, %ah
1717 je istrid
1718
1719 xorw %bp, %bp
1720istrid: ret
1721
1722trident_md:
1723 .byte 0x50, 0x1e, 0x50
1724 .byte 0x51, 0x2b, 0x50
1725 .byte 0x52, 0x3c, 0x50
1726 .byte 0x57, 0x19, 0x84
1727 .byte 0x58, 0x1e, 0x84
1728 .byte 0x59, 0x2b, 0x84
1729 .byte 0x5a, 0x3c, 0x84
1730 .byte 0
1731 .ascii "Trident"
1732 .byte 0
1733
1734# Tseng.
1735tseng_test:
1736 movw $0x3cd, %dx
1737 inb %dx, %al # Could things be this simple ! :-)
1738 movb %al, %bl
1739 movb $0x55, %al
1740 outb %al, %dx
1741 inb %dx, %al
1742 movb %al, %ah
1743 movb %bl, %al
1744 outb %al, %dx
1745 cmpb $0x55, %ah
1746 je istsen
1747
1748isnot: xorw %bp, %bp
1749istsen: ret
1750
1751tseng_md:
1752 .byte 0x26, 0x3c, 0x50
1753 .byte 0x2a, 0x28, 0x64
1754 .byte 0x23, 0x19, 0x84
1755 .byte 0x24, 0x1c, 0x84
1756 .byte 0x22, 0x2c, 0x84
1757 .byte 0x21, 0x3c, 0x84
1758 .byte 0
1759 .ascii "Tseng"
1760 .byte 0
1761
1762# Video7.
1763video7_test:
1764 movw $0x3cc, %dx
1765 inb %dx, %al
1766 movw $0x3b4, %dx
1767 andb $0x01, %al
1768 jz even7
1769
1770 movw $0x3d4, %dx
1771even7: movb $0x0c, %al
1772 outb %al, %dx
1773 incw %dx
1774 inb %dx, %al
1775 movb %al, %bl
1776 movb $0x55, %al
1777 outb %al, %dx
1778 inb %dx, %al
1779 decw %dx
1780 movb $0x1f, %al
1781 outb %al, %dx
1782 incw %dx
1783 inb %dx, %al
1784 movb %al, %bh
1785 decw %dx
1786 movb $0x0c, %al
1787 outb %al, %dx
1788 incw %dx
1789 movb %bl, %al
1790 outb %al, %dx
1791 movb $0x55, %al
1792 xorb $0xea, %al
1793 cmpb %bh, %al
1794 jne isnot
1795
1796 movb $VIDEO_FIRST_V7>>8, svga_prefix # Use special mode switching
1797 ret
1798
1799video7_md:
1800 .byte 0x40, 0x2b, 0x50
1801 .byte 0x43, 0x3c, 0x50
1802 .byte 0x44, 0x3c, 0x64
1803 .byte 0x41, 0x19, 0x84
1804 .byte 0x42, 0x2c, 0x84
1805 .byte 0x45, 0x1c, 0x84
1806 .byte 0
1807 .ascii "Video 7"
1808 .byte 0
1809
1810# Realtek VGA
1811realtek_test:
1812 leaw idrtvga, %si
1813 movw $0x45, %di
1814 movw $0x0b, %cx
1815 repe
1816 cmpsb
1817 je isrt
1818
1819 xorw %bp, %bp
1820isrt: ret
1821
1822idrtvga: .ascii "REALTEK VGA"
1823
1824realtek_md:
1825 .byte 0x1a, 0x3c, 0x50
1826 .byte 0x1b, 0x19, 0x84
1827 .byte 0x1c, 0x1e, 0x84
1828 .byte 0x1d, 0x2b, 0x84
1829 .byte 0x1e, 0x3c, 0x84
1830 .byte 0
1831 .ascii "REALTEK"
1832 .byte 0
1833
1834#endif /* CONFIG_VIDEO_SVGA */
1835
1836# User-defined local mode table (VGA only)
1837#ifdef CONFIG_VIDEO_LOCAL
1838local_modes:
1839 leaw local_mode_table, %si
1840locm1: lodsw
1841 orw %ax, %ax
1842 jz locm2
1843
1844 stosw
1845 movsw
1846 jmp locm1
1847
1848locm2: ret
1849
1850# This is the table of local video modes which can be supplied manually
1851# by the user. Each entry consists of mode ID (word) and dimensions
1852# (byte for column count and another byte for row count). These modes
1853# are placed before all SVGA and VESA modes and override them if table
1854# compacting is enabled. The table must end with a zero word followed
1855# by NUL-terminated video adapter name.
1856local_mode_table:
1857 .word 0x0100 # Example: 40x25
1858 .byte 25,40
1859 .word 0
1860 .ascii "Local"
1861 .byte 0
1862#endif /* CONFIG_VIDEO_LOCAL */
1863
1864# Read a key and return the ASCII code in al, scan code in ah
1865getkey: xorb %ah, %ah
1866 int $0x16
1867 ret
1868
1869# Read a key with a timeout of 30 seconds.
1870# The hardware clock is used to get the time.
1871getkt: call gettime
1872 addb $30, %al # Wait 30 seconds
1873 cmpb $60, %al
1874 jl lminute
1875
1876 subb $60, %al
1877lminute:
1878 movb %al, %cl
1879again: movb $0x01, %ah
1880 int $0x16
1881 jnz getkey # key pressed, so get it
1882
1883 call gettime
1884 cmpb %cl, %al
1885 jne again
1886
1887 movb $0x20, %al # timeout, return `space'
1888 ret
1889
1890# Flush the keyboard buffer
1891flush: movb $0x01, %ah
1892 int $0x16
1893 jz empty
1894
1895 xorb %ah, %ah
1896 int $0x16
1897 jmp flush
1898
1899empty: ret
1900
1901# Print hexadecimal number.
1902prthw: pushw %ax
1903 movb %ah, %al
1904 call prthb
1905 popw %ax
1906prthb: pushw %ax
1907 shrb $4, %al
1908 call prthn
1909 popw %ax
1910 andb $0x0f, %al
1911prthn: cmpb $0x0a, %al
1912 jc prth1
1913
1914 addb $0x07, %al
1915prth1: addb $0x30, %al
1916 jmp prtchr
1917
1918# Print decimal number in al
1919prtdec: pushw %ax
1920 pushw %cx
1921 xorb %ah, %ah
1922 movb $0x0a, %cl
1923 idivb %cl
1924 cmpb $0x09, %al
1925 jbe lt100
1926
1927 call prtdec
1928 jmp skip10
1929
1930lt100: addb $0x30, %al
1931 call prtchr
1932skip10: movb %ah, %al
1933 addb $0x30, %al
1934 call prtchr
1935 popw %cx
1936 popw %ax
1937 ret
1938
1939store_edid:
1940#ifdef CONFIG_FIRMWARE_EDID
1941 pushw %es # just save all registers
1942 pushw %ax
1943 pushw %bx
1944 pushw %cx
1945 pushw %dx
1946 pushw %di
1947
1948 pushw %fs
1949 popw %es
1950
1951 movl $0x13131313, %eax # memset block with 0x13
1952 movw $32, %cx
1953 movw $0x140, %di
1954 cld
1955 rep
1956 stosl
1957
1958 cmpw $0x0200, vbe_version # only do EDID on >= VBE2.0
1959 jl no_edid
1960
1961 pushw %es # save ES
1962 xorw %di, %di # Report Capability
1963 pushw %di
1964 popw %es # ES:DI must be 0:0
1965 movw $0x4f15, %ax
1966 xorw %bx, %bx
1967 xorw %cx, %cx
1968 int $0x10
1969 popw %es # restore ES
1970
1971 cmpb $0x00, %ah # call successful
1972 jne no_edid
1973
1974 cmpb $0x4f, %al # function supported
1975 jne no_edid
1976
1977 movw $0x4f15, %ax # do VBE/DDC
1978 movw $0x01, %bx
1979 movw $0x00, %cx
1980 movw $0x00, %dx
1981 movw $0x140, %di
1982 int $0x10
1983
1984no_edid:
1985 popw %di # restore all registers
1986 popw %dx
1987 popw %cx
1988 popw %bx
1989 popw %ax
1990 popw %es
1991#endif
1992 ret
1993
1994# VIDEO_SELECT-only variables
1995mt_end: .word 0 # End of video mode table if built
1996edit_buf: .space 6 # Line editor buffer
1997card_name: .word 0 # Pointer to adapter name
1998scanning: .byte 0 # Performing mode scan
1999do_restore: .byte 0 # Screen contents altered during mode change
2000svga_prefix: .byte VIDEO_FIRST_BIOS>>8 # Default prefix for BIOS modes
2001graphic_mode: .byte 0 # Graphic mode with a linear frame buffer
2002dac_size: .byte 6 # DAC bit depth
2003vbe_version: .word 0 # VBE bios version
2004
2005# Status messages
2006keymsg: .ascii "Press <RETURN> to see video modes available, "
2007 .ascii "<SPACE> to continue or wait 30 secs"
2008 .byte 0x0d, 0x0a, 0
2009
2010listhdr: .byte 0x0d, 0x0a
2011 .ascii "Mode: COLSxROWS:"
2012
2013crlft: .byte 0x0d, 0x0a, 0
2014
2015prompt: .byte 0x0d, 0x0a
2016 .asciz "Enter mode number or `scan': "
2017
2018unknt: .asciz "Unknown mode ID. Try again."
2019
2020badmdt: .ascii "You passed an undefined mode number."
2021 .byte 0x0d, 0x0a, 0
2022
2023vesaer: .ascii "Error: Scanning of VESA modes failed. Please "
2024 .ascii "report to <mj@ucw.cz>."
2025 .byte 0x0d, 0x0a, 0
2026
2027old_name: .asciz "CGA/MDA/HGA"
2028
2029ega_name: .asciz "EGA"
2030
2031svga_name: .ascii " "
2032
2033vga_name: .asciz "VGA"
2034
2035vesa_name: .asciz "VESA"
2036
2037name_bann: .asciz "Video adapter: "
2038#endif /* CONFIG_VIDEO_SELECT */
2039
2040# Other variables:
2041adapter: .byte 0 # Video adapter: 0=CGA/MDA/HGA,1=EGA,2=VGA
2042video_segment: .word 0xb800 # Video memory segment
2043force_size: .word 0 # Use this size instead of the one in BIOS vars
diff --git a/arch/i386/boot/video.c b/arch/i386/boot/video.c
new file mode 100644
index 000000000000..958130ef0042
--- /dev/null
+++ b/arch/i386/boot/video.c
@@ -0,0 +1,461 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/video.c
13 *
14 * Select video mode
15 */
16
17#include "boot.h"
18#include "video.h"
19#include "vesa.h"
20
21/*
22 * Mode list variables
23 */
24static struct card_info cards[]; /* List of cards to probe for */
25
26/*
27 * Common variables
28 */
29int adapter; /* 0=CGA/MDA/HGC, 1=EGA, 2=VGA+ */
30u16 video_segment;
31int force_x, force_y; /* Don't query the BIOS for cols/rows */
32
33int do_restore = 0; /* Screen contents changed during mode flip */
34int graphic_mode; /* Graphic mode with linear frame buffer */
35
36static void store_cursor_position(void)
37{
38 u16 curpos;
39 u16 ax, bx;
40
41 ax = 0x0300;
42 bx = 0;
43 asm(INT10
44 : "=d" (curpos), "+a" (ax), "+b" (bx)
45 : : "ecx", "esi", "edi");
46
47 boot_params.screen_info.orig_x = curpos;
48 boot_params.screen_info.orig_y = curpos >> 8;
49}
50
51static void store_video_mode(void)
52{
53 u16 ax, page;
54
55 /* N.B.: the saving of the video page here is a bit silly,
56 since we pretty much assume page 0 everywhere. */
57 ax = 0x0f00;
58 asm(INT10
59 : "+a" (ax), "=b" (page)
60 : : "ecx", "edx", "esi", "edi");
61
62 /* Not all BIOSes are clean with respect to the top bit */
63 boot_params.screen_info.orig_video_mode = ax & 0x7f;
64 boot_params.screen_info.orig_video_page = page;
65}
66
67/*
68 * Store the video mode parameters for later usage by the kernel.
69 * This is done by asking the BIOS except for the rows/columns
70 * parameters in the default 80x25 mode -- these are set directly,
71 * because some very obscure BIOSes supply insane values.
72 */
73static void store_mode_params(void)
74{
75 u16 font_size;
76 int x, y;
77
78 /* For graphics mode, it is up to the mode-setting driver
79 (currently only video-vesa.c) to store the parameters */
80 if (graphic_mode)
81 return;
82
83 store_cursor_position();
84 store_video_mode();
85
86 if (boot_params.screen_info.orig_video_mode == 0x07) {
87 /* MDA, HGC, or VGA in monochrome mode */
88 video_segment = 0xb000;
89 } else {
90 /* CGA, EGA, VGA and so forth */
91 video_segment = 0xb800;
92 }
93
94 set_fs(0);
95 font_size = rdfs16(0x485); /* Font size, BIOS area */
96 boot_params.screen_info.orig_video_points = font_size;
97
98 x = rdfs16(0x44a);
99 y = (adapter == ADAPTER_CGA) ? 25 : rdfs8(0x484)+1;
100
101 if (force_x)
102 x = force_x;
103 if (force_y)
104 y = force_y;
105
106 boot_params.screen_info.orig_video_cols = x;
107 boot_params.screen_info.orig_video_lines = y;
108}
109
110/* Probe the video drivers and have them generate their mode lists. */
111static void probe_cards(int unsafe)
112{
113 struct card_info *card;
114 static u8 probed[2];
115
116 if (probed[unsafe])
117 return;
118
119 probed[unsafe] = 1;
120
121 for (card = video_cards; card < video_cards_end; card++) {
122 if (card->unsafe == unsafe) {
123 if (card->probe)
124 card->nmodes = card->probe();
125 else
126 card->nmodes = 0;
127 }
128 }
129}
130
131/* Test if a mode is defined */
132int mode_defined(u16 mode)
133{
134 struct card_info *card;
135 struct mode_info *mi;
136 int i;
137
138 for (card = video_cards; card < video_cards_end; card++) {
139 mi = card->modes;
140 for (i = 0; i < card->nmodes; i++, mi++) {
141 if (mi->mode == mode)
142 return 1;
143 }
144 }
145
146 return 0;
147}
148
149/* Set mode (without recalc) */
150static int raw_set_mode(u16 mode)
151{
152 int nmode, i;
153 struct card_info *card;
154 struct mode_info *mi;
155
156 /* Drop the recalc bit if set */
157 mode &= ~VIDEO_RECALC;
158
159 /* Scan for mode based on fixed ID, position, or resolution */
160 nmode = 0;
161 for (card = video_cards; card < video_cards_end; card++) {
162 mi = card->modes;
163 for (i = 0; i < card->nmodes; i++, mi++) {
164 int visible = mi->x || mi->y;
165
166 if ((mode == nmode && visible) ||
167 mode == mi->mode ||
168 mode == (mi->y << 8)+mi->x)
169 return card->set_mode(mi);
170
171 if (visible)
172 nmode++;
173 }
174 }
175
176 /* Nothing found? Is it an "exceptional" (unprobed) mode? */
177 for (card = video_cards; card < video_cards_end; card++) {
178 if (mode >= card->xmode_first &&
179 mode < card->xmode_first+card->xmode_n) {
180 struct mode_info mix;
181 mix.mode = mode;
182 mix.x = mix.y = 0;
183 return card->set_mode(&mix);
184 }
185 }
186
187 /* Otherwise, failure... */
188 return -1;
189}
190
191/*
192 * Recalculate the vertical video cutoff (hack!)
193 */
194static void vga_recalc_vertical(void)
195{
196 unsigned int font_size, rows;
197 u16 crtc;
198 u8 pt, ov;
199
200 set_fs(0);
201 font_size = rdfs8(0x485); /* BIOS: font size (pixels) */
202 rows = force_y ? force_y : rdfs8(0x484)+1; /* Text rows */
203
204 rows *= font_size; /* Visible scan lines */
205 rows--; /* ... minus one */
206
207 crtc = vga_crtc();
208
209 pt = in_idx(crtc, 0x11);
210 pt &= ~0x80; /* Unlock CR0-7 */
211 out_idx(pt, crtc, 0x11);
212
213 out_idx((u8)rows, crtc, 0x12); /* Lower height register */
214
215 ov = in_idx(crtc, 0x07); /* Overflow register */
216 ov &= 0xbd;
217 ov |= (rows >> (8-1)) & 0x02;
218 ov |= (rows >> (9-6)) & 0x40;
219 out_idx(ov, crtc, 0x07);
220}
221
222/* Set mode (with recalc if specified) */
223static int set_mode(u16 mode)
224{
225 int rv;
226
227 /* Very special mode numbers... */
228 if (mode == VIDEO_CURRENT_MODE)
229 return 0; /* Nothing to do... */
230 else if (mode == NORMAL_VGA)
231 mode = VIDEO_80x25;
232 else if (mode == EXTENDED_VGA)
233 mode = VIDEO_8POINT;
234
235 rv = raw_set_mode(mode);
236 if (rv)
237 return rv;
238
239 if (mode & VIDEO_RECALC)
240 vga_recalc_vertical();
241
242 return 0;
243}
244
245static unsigned int get_entry(void)
246{
247 char entry_buf[4];
248 int i, len = 0;
249 int key;
250 unsigned int v;
251
252 do {
253 key = getchar();
254
255 if (key == '\b') {
256 if (len > 0) {
257 puts("\b \b");
258 len--;
259 }
260 } else if ((key >= '0' && key <= '9') ||
261 (key >= 'A' && key <= 'Z') ||
262 (key >= 'a' && key <= 'z')) {
263 if (len < sizeof entry_buf) {
264 entry_buf[len++] = key;
265 putchar(key);
266 }
267 }
268 } while (key != '\r');
269 putchar('\n');
270
271 if (len == 0)
272 return VIDEO_CURRENT_MODE; /* Default */
273
274 v = 0;
275 for (i = 0; i < len; i++) {
276 v <<= 4;
277 key = entry_buf[i] | 0x20;
278 v += (key > '9') ? key-'a'+10 : key-'0';
279 }
280
281 return v;
282}
283
284static void display_menu(void)
285{
286 struct card_info *card;
287 struct mode_info *mi;
288 char ch;
289 int i;
290
291 puts("Mode: COLSxROWS:\n");
292
293 ch = '0';
294 for (card = video_cards; card < video_cards_end; card++) {
295 mi = card->modes;
296 for (i = 0; i < card->nmodes; i++, mi++) {
297 int visible = mi->x && mi->y;
298 u16 mode_id = mi->mode ? mi->mode :
299 (mi->y << 8)+mi->x;
300
301 if (!visible)
302 continue; /* Hidden mode */
303
304 printf("%c %04X %3dx%-3d %s\n",
305 ch, mode_id, mi->x, mi->y, card->card_name);
306
307 if (ch == '9')
308 ch = 'a';
309 else if (ch == 'z' || ch == ' ')
310 ch = ' '; /* Out of keys... */
311 else
312 ch++;
313 }
314 }
315}
316
317#define H(x) ((x)-'a'+10)
318#define SCAN ((H('s')<<12)+(H('c')<<8)+(H('a')<<4)+H('n'))
319
320static unsigned int mode_menu(void)
321{
322 int key;
323 unsigned int sel;
324
325 puts("Press <ENTER> to see video modes available, "
326 "<SPACE> to continue, or wait 30 sec\n");
327
328 kbd_flush();
329 while (1) {
330 key = getchar_timeout();
331 if (key == ' ' || key == 0)
332 return VIDEO_CURRENT_MODE; /* Default */
333 if (key == '\r')
334 break;
335 putchar('\a'); /* Beep! */
336 }
337
338
339 for (;;) {
340 display_menu();
341
342 puts("Enter a video mode or \"scan\" to scan for "
343 "additional modes: ");
344 sel = get_entry();
345 if (sel != SCAN)
346 return sel;
347
348 probe_cards(1);
349 }
350}
351
352#ifdef CONFIG_VIDEO_RETAIN
353/* Save screen content to the heap */
354struct saved_screen {
355 int x, y;
356 int curx, cury;
357 u16 *data;
358} saved;
359
360static void save_screen(void)
361{
362 /* Should be called after store_mode_params() */
363 saved.x = boot_params.screen_info.orig_video_cols;
364 saved.y = boot_params.screen_info.orig_video_lines;
365 saved.curx = boot_params.screen_info.orig_x;
366 saved.cury = boot_params.screen_info.orig_y;
367
368 if (heap_free() < saved.x*saved.y*sizeof(u16)+512)
369 return; /* Not enough heap to save the screen */
370
371 saved.data = GET_HEAP(u16, saved.x*saved.y);
372
373 set_fs(video_segment);
374 copy_from_fs(saved.data, 0, saved.x*saved.y*sizeof(u16));
375}
376
377static void restore_screen(void)
378{
379 /* Should be called after store_mode_params() */
380 int xs = boot_params.screen_info.orig_video_cols;
381 int ys = boot_params.screen_info.orig_video_lines;
382 int y;
383 addr_t dst = 0;
384 u16 *src = saved.data;
385 u16 ax, bx, dx;
386
387 if (graphic_mode)
388 return; /* Can't restore onto a graphic mode */
389
390 if (!src)
391 return; /* No saved screen contents */
392
393 /* Restore screen contents */
394
395 set_fs(video_segment);
396 for (y = 0; y < ys; y++) {
397 int npad;
398
399 if (y < saved.y) {
400 int copy = (xs < saved.x) ? xs : saved.x;
401 copy_to_fs(dst, src, copy*sizeof(u16));
402 dst += copy*sizeof(u16);
403 src += saved.x;
404 npad = (xs < saved.x) ? 0 : xs-saved.x;
405 } else {
406 npad = xs;
407 }
408
409 /* Writes "npad" blank characters to
410 video_segment:dst and advances dst */
411 asm volatile("pushw %%es ; "
412 "movw %2,%%es ; "
413 "shrw %%cx ; "
414 "jnc 1f ; "
415 "stosw \n\t"
416 "1: rep;stosl ; "
417 "popw %%es"
418 : "+D" (dst), "+c" (npad)
419 : "bdS" (video_segment),
420 "a" (0x07200720));
421 }
422
423 /* Restore cursor position */
424 ax = 0x0200; /* Set cursor position */
425 bx = 0; /* Page number (<< 8) */
426 dx = (saved.cury << 8)+saved.curx;
427 asm volatile(INT10
428 : "+a" (ax), "+b" (bx), "+d" (dx)
429 : : "ecx", "esi", "edi");
430}
431#else
432#define save_screen() ((void)0)
433#define restore_screen() ((void)0)
434#endif
435
436void set_video(void)
437{
438 u16 mode = boot_params.hdr.vid_mode;
439
440 RESET_HEAP();
441
442 store_mode_params();
443 save_screen();
444 probe_cards(0);
445
446 for (;;) {
447 if (mode == ASK_VGA)
448 mode = mode_menu();
449
450 if (!set_mode(mode))
451 break;
452
453 printf("Undefined video mode number: %x\n", mode);
454 mode = ASK_VGA;
455 }
456 vesa_store_edid();
457 store_mode_params();
458
459 if (do_restore)
460 restore_screen();
461}
diff --git a/arch/i386/boot/video.h b/arch/i386/boot/video.h
new file mode 100644
index 000000000000..b92447d51213
--- /dev/null
+++ b/arch/i386/boot/video.h
@@ -0,0 +1,152 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/video.h
13 *
14 * Header file for the real-mode video probing code
15 */
16
17#ifndef BOOT_VIDEO_H
18#define BOOT_VIDEO_H
19
20#include <linux/types.h>
21
22/* Enable autodetection of SVGA adapters and modes. */
23#undef CONFIG_VIDEO_SVGA
24
25/* Enable autodetection of VESA modes */
26#define CONFIG_VIDEO_VESA
27
28/* Retain screen contents when switching modes */
29#define CONFIG_VIDEO_RETAIN
30
31/* Force 400 scan lines for standard modes (hack to fix bad BIOS behaviour */
32#undef CONFIG_VIDEO_400_HACK
33
34/* This code uses an extended set of video mode numbers. These include:
35 * Aliases for standard modes
36 * NORMAL_VGA (-1)
37 * EXTENDED_VGA (-2)
38 * ASK_VGA (-3)
39 * Video modes numbered by menu position -- NOT RECOMMENDED because of lack
40 * of compatibility when extending the table. These are between 0x00 and 0xff.
41 */
42#define VIDEO_FIRST_MENU 0x0000
43
44/* Standard BIOS video modes (BIOS number + 0x0100) */
45#define VIDEO_FIRST_BIOS 0x0100
46
47/* VESA BIOS video modes (VESA number + 0x0200) */
48#define VIDEO_FIRST_VESA 0x0200
49
50/* Video7 special modes (BIOS number + 0x0900) */
51#define VIDEO_FIRST_V7 0x0900
52
53/* Special video modes */
54#define VIDEO_FIRST_SPECIAL 0x0f00
55#define VIDEO_80x25 0x0f00
56#define VIDEO_8POINT 0x0f01
57#define VIDEO_80x43 0x0f02
58#define VIDEO_80x28 0x0f03
59#define VIDEO_CURRENT_MODE 0x0f04
60#define VIDEO_80x30 0x0f05
61#define VIDEO_80x34 0x0f06
62#define VIDEO_80x60 0x0f07
63#define VIDEO_GFX_HACK 0x0f08
64#define VIDEO_LAST_SPECIAL 0x0f09
65
66/* Video modes given by resolution */
67#define VIDEO_FIRST_RESOLUTION 0x1000
68
69/* The "recalculate timings" flag */
70#define VIDEO_RECALC 0x8000
71
72/* Define DO_STORE according to CONFIG_VIDEO_RETAIN */
73#ifdef CONFIG_VIDEO_RETAIN
74void store_screen(void);
75#define DO_STORE() store_screen()
76#else
77#define DO_STORE() ((void)0)
78#endif /* CONFIG_VIDEO_RETAIN */
79
80/*
81 * Mode table structures
82 */
83
84struct mode_info {
85 u16 mode; /* Mode number (vga= style) */
86 u8 x, y; /* Width, height */
87};
88
89struct card_info {
90 const char *card_name;
91 int (*set_mode)(struct mode_info *mode);
92 int (*probe)(void);
93 struct mode_info *modes;
94 int nmodes; /* Number of probed modes so far */
95 int unsafe; /* Probing is unsafe, only do after "scan" */
96 u16 xmode_first; /* Unprobed modes to try to call anyway */
97 u16 xmode_n; /* Size of unprobed mode range */
98};
99
100#define __videocard struct card_info __attribute__((section(".videocards")))
101extern struct card_info video_cards[], video_cards_end[];
102
103int mode_defined(u16 mode); /* video.c */
104
105/* Basic video information */
106#define ADAPTER_CGA 0 /* CGA/MDA/HGC */
107#define ADAPTER_EGA 1
108#define ADAPTER_VGA 2
109
110extern int adapter;
111extern u16 video_segment;
112extern int force_x, force_y; /* Don't query the BIOS for cols/rows */
113extern int do_restore; /* Restore screen contents */
114extern int graphic_mode; /* Graphics mode with linear frame buffer */
115
116/*
117 * int $0x10 is notorious for touching registers it shouldn't.
118 * gcc doesn't like %ebp being clobbered, so define it as a push/pop
119 * sequence here.
120 *
121 * A number of systems, including the original PC can clobber %bp in
122 * certain circumstances, like when scrolling. There exists at least
123 * one Trident video card which could clobber DS under a set of
124 * circumstances that we are unlikely to encounter (scrolling when
125 * using an extended graphics mode of more than 800x600 pixels), but
126 * it's cheap insurance to deal with that here.
127 */
128#define INT10 "pushl %%ebp; pushw %%ds; int $0x10; popw %%ds; popl %%ebp"
129
130/* Accessing VGA indexed registers */
131static inline u8 in_idx(u16 port, u8 index)
132{
133 outb(index, port);
134 return inb(port+1);
135}
136
137static inline void out_idx(u8 v, u16 port, u8 index)
138{
139 outw(index+(v << 8), port);
140}
141
142/* Writes a value to an indexed port and then reads the port again */
143static inline u8 tst_idx(u8 v, u16 port, u8 index)
144{
145 out_idx(port, index, v);
146 return in_idx(port, index);
147}
148
149/* Get the I/O port of the VGA CRTC */
150u16 vga_crtc(void); /* video-vga.c */
151
152#endif /* BOOT_VIDEO_H */
diff --git a/arch/i386/boot/voyager.c b/arch/i386/boot/voyager.c
new file mode 100644
index 000000000000..61c8fe0453be
--- /dev/null
+++ b/arch/i386/boot/voyager.c
@@ -0,0 +1,46 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * 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 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/voyager.c
13 *
14 * Get the Voyager config information
15 */
16
17#include "boot.h"
18
19#ifdef CONFIG_X86_VOYAGER
20
21int query_voyager(void)
22{
23 u8 err;
24 u16 es, di;
25 /* Abuse the apm_bios_info area for this */
26 u8 *data_ptr = (u8 *)&boot_params.apm_bios_info;
27
28 data_ptr[0] = 0xff; /* Flag on config not found(?) */
29
30 asm("pushw %%es ; "
31 "int $0x15 ; "
32 "setc %0 ; "
33 "movw %%es, %1 ; "
34 "popw %%es"
35 : "=q" (err), "=r" (es), "=D" (di)
36 : "a" (0xffc0));
37
38 if (err)
39 return -1; /* Not Voyager */
40
41 set_fs(es);
42 copy_from_fs(data_ptr, di, 7); /* Table is 7 bytes apparently */
43 return 0;
44}
45
46#endif /* CONFIG_X86_VOYAGER */
diff --git a/arch/i386/defconfig b/arch/i386/defconfig
index 1a3a2217b7c2..54ee1764fdae 100644
--- a/arch/i386/defconfig
+++ b/arch/i386/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.22-rc2 3# Linux kernel version: 2.6.22-git14
4# Mon May 21 13:23:44 2007 4# Fri Jul 20 09:53:15 2007
5# 5#
6CONFIG_X86_32=y 6CONFIG_X86_32=y
7CONFIG_GENERIC_TIME=y 7CONFIG_GENERIC_TIME=y
@@ -37,19 +37,18 @@ CONFIG_LOCALVERSION=""
37CONFIG_LOCALVERSION_AUTO=y 37CONFIG_LOCALVERSION_AUTO=y
38CONFIG_SWAP=y 38CONFIG_SWAP=y
39CONFIG_SYSVIPC=y 39CONFIG_SYSVIPC=y
40# CONFIG_IPC_NS is not set
41CONFIG_SYSVIPC_SYSCTL=y 40CONFIG_SYSVIPC_SYSCTL=y
42CONFIG_POSIX_MQUEUE=y 41CONFIG_POSIX_MQUEUE=y
43# CONFIG_BSD_PROCESS_ACCT is not set 42# CONFIG_BSD_PROCESS_ACCT is not set
44# CONFIG_TASKSTATS is not set 43# CONFIG_TASKSTATS is not set
45# CONFIG_UTS_NS is not set 44# CONFIG_USER_NS is not set
46# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
47CONFIG_IKCONFIG=y 46CONFIG_IKCONFIG=y
48CONFIG_IKCONFIG_PROC=y 47CONFIG_IKCONFIG_PROC=y
49CONFIG_LOG_BUF_SHIFT=18 48CONFIG_LOG_BUF_SHIFT=18
50# CONFIG_CPUSETS is not set 49# CONFIG_CPUSETS is not set
51CONFIG_SYSFS_DEPRECATED=y 50CONFIG_SYSFS_DEPRECATED=y
52# CONFIG_RELAY is not set 51CONFIG_RELAY=y
53CONFIG_BLK_DEV_INITRD=y 52CONFIG_BLK_DEV_INITRD=y
54CONFIG_INITRAMFS_SOURCE="" 53CONFIG_INITRAMFS_SOURCE=""
55CONFIG_CC_OPTIMIZE_FOR_SIZE=y 54CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -73,16 +72,13 @@ CONFIG_TIMERFD=y
73CONFIG_EVENTFD=y 72CONFIG_EVENTFD=y
74CONFIG_SHMEM=y 73CONFIG_SHMEM=y
75CONFIG_VM_EVENT_COUNTERS=y 74CONFIG_VM_EVENT_COUNTERS=y
76CONFIG_SLAB=y 75CONFIG_SLUB_DEBUG=y
77# CONFIG_SLUB is not set 76# CONFIG_SLAB is not set
77CONFIG_SLUB=y
78# CONFIG_SLOB is not set 78# CONFIG_SLOB is not set
79CONFIG_RT_MUTEXES=y 79CONFIG_RT_MUTEXES=y
80# CONFIG_TINY_SHMEM is not set 80# CONFIG_TINY_SHMEM is not set
81CONFIG_BASE_SMALL=0 81CONFIG_BASE_SMALL=0
82
83#
84# Loadable module support
85#
86CONFIG_MODULES=y 82CONFIG_MODULES=y
87CONFIG_MODULE_UNLOAD=y 83CONFIG_MODULE_UNLOAD=y
88CONFIG_MODULE_FORCE_UNLOAD=y 84CONFIG_MODULE_FORCE_UNLOAD=y
@@ -90,14 +86,11 @@ CONFIG_MODULE_FORCE_UNLOAD=y
90# CONFIG_MODULE_SRCVERSION_ALL is not set 86# CONFIG_MODULE_SRCVERSION_ALL is not set
91# CONFIG_KMOD is not set 87# CONFIG_KMOD is not set
92CONFIG_STOP_MACHINE=y 88CONFIG_STOP_MACHINE=y
93
94#
95# Block layer
96#
97CONFIG_BLOCK=y 89CONFIG_BLOCK=y
98CONFIG_LBD=y 90CONFIG_LBD=y
99# CONFIG_BLK_DEV_IO_TRACE is not set 91# CONFIG_BLK_DEV_IO_TRACE is not set
100# CONFIG_LSF is not set 92# CONFIG_LSF is not set
93# CONFIG_BLK_DEV_BSG is not set
101 94
102# 95#
103# IO Schedulers 96# IO Schedulers
@@ -166,7 +159,6 @@ CONFIG_X86_WP_WORKS_OK=y
166CONFIG_X86_INVLPG=y 159CONFIG_X86_INVLPG=y
167CONFIG_X86_BSWAP=y 160CONFIG_X86_BSWAP=y
168CONFIG_X86_POPAD_OK=y 161CONFIG_X86_POPAD_OK=y
169CONFIG_X86_CMPXCHG64=y
170CONFIG_X86_GOOD_APIC=y 162CONFIG_X86_GOOD_APIC=y
171CONFIG_X86_INTEL_USERCOPY=y 163CONFIG_X86_INTEL_USERCOPY=y
172CONFIG_X86_USE_PPRO_CHECKSUM=y 164CONFIG_X86_USE_PPRO_CHECKSUM=y
@@ -202,6 +194,7 @@ CONFIG_X86_CPUID=y
202# CONFIG_EDD is not set 194# CONFIG_EDD is not set
203# CONFIG_DELL_RBU is not set 195# CONFIG_DELL_RBU is not set
204# CONFIG_DCDBAS is not set 196# CONFIG_DCDBAS is not set
197CONFIG_DMIID=y
205# CONFIG_NOHIGHMEM is not set 198# CONFIG_NOHIGHMEM is not set
206CONFIG_HIGHMEM4G=y 199CONFIG_HIGHMEM4G=y
207# CONFIG_HIGHMEM64G is not set 200# CONFIG_HIGHMEM64G is not set
@@ -218,7 +211,9 @@ CONFIG_FLAT_NODE_MEM_MAP=y
218CONFIG_SPLIT_PTLOCK_CPUS=4 211CONFIG_SPLIT_PTLOCK_CPUS=4
219CONFIG_RESOURCES_64BIT=y 212CONFIG_RESOURCES_64BIT=y
220CONFIG_ZONE_DMA_FLAG=1 213CONFIG_ZONE_DMA_FLAG=1
214CONFIG_BOUNCE=y
221CONFIG_NR_QUICK=1 215CONFIG_NR_QUICK=1
216CONFIG_VIRT_TO_BUS=y
222# CONFIG_HIGHPTE is not set 217# CONFIG_HIGHPTE is not set
223# CONFIG_MATH_EMULATION is not set 218# CONFIG_MATH_EMULATION is not set
224CONFIG_MTRR=y 219CONFIG_MTRR=y
@@ -245,7 +240,6 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
245CONFIG_PM=y 240CONFIG_PM=y
246CONFIG_PM_LEGACY=y 241CONFIG_PM_LEGACY=y
247# CONFIG_PM_DEBUG is not set 242# CONFIG_PM_DEBUG is not set
248# CONFIG_PM_SYSFS_DEPRECATED is not set
249 243
250# 244#
251# ACPI (Advanced Configuration and Power Interface) Support 245# ACPI (Advanced Configuration and Power Interface) Support
@@ -285,7 +279,7 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
285# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set 279# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
286CONFIG_CPU_FREQ_GOV_USERSPACE=y 280CONFIG_CPU_FREQ_GOV_USERSPACE=y
287CONFIG_CPU_FREQ_GOV_ONDEMAND=y 281CONFIG_CPU_FREQ_GOV_ONDEMAND=y
288# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set 282CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
289 283
290# 284#
291# CPUFreq processor drivers 285# CPUFreq processor drivers
@@ -326,7 +320,7 @@ CONFIG_PCI_MMCONFIG=y
326CONFIG_ARCH_SUPPORTS_MSI=y 320CONFIG_ARCH_SUPPORTS_MSI=y
327CONFIG_PCI_MSI=y 321CONFIG_PCI_MSI=y
328# CONFIG_PCI_DEBUG is not set 322# CONFIG_PCI_DEBUG is not set
329CONFIG_HT_IRQ=y 323# CONFIG_HT_IRQ is not set
330CONFIG_ISA_DMA_API=y 324CONFIG_ISA_DMA_API=y
331# CONFIG_ISA is not set 325# CONFIG_ISA is not set
332# CONFIG_MCA is not set 326# CONFIG_MCA is not set
@@ -382,7 +376,7 @@ CONFIG_IP_PNP_DHCP=y
382CONFIG_INET_TUNNEL=y 376CONFIG_INET_TUNNEL=y
383CONFIG_INET_XFRM_MODE_TRANSPORT=y 377CONFIG_INET_XFRM_MODE_TRANSPORT=y
384CONFIG_INET_XFRM_MODE_TUNNEL=y 378CONFIG_INET_XFRM_MODE_TUNNEL=y
385CONFIG_INET_XFRM_MODE_BEET=y 379# CONFIG_INET_XFRM_MODE_BEET is not set
386CONFIG_INET_DIAG=y 380CONFIG_INET_DIAG=y
387CONFIG_INET_TCP_DIAG=y 381CONFIG_INET_TCP_DIAG=y
388# CONFIG_TCP_CONG_ADVANCED is not set 382# CONFIG_TCP_CONG_ADVANCED is not set
@@ -401,27 +395,15 @@ CONFIG_IPV6=y
401# CONFIG_INET6_TUNNEL is not set 395# CONFIG_INET6_TUNNEL is not set
402CONFIG_INET6_XFRM_MODE_TRANSPORT=y 396CONFIG_INET6_XFRM_MODE_TRANSPORT=y
403CONFIG_INET6_XFRM_MODE_TUNNEL=y 397CONFIG_INET6_XFRM_MODE_TUNNEL=y
404CONFIG_INET6_XFRM_MODE_BEET=y 398# CONFIG_INET6_XFRM_MODE_BEET is not set
405# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 399# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
406CONFIG_IPV6_SIT=y 400CONFIG_IPV6_SIT=y
407# CONFIG_IPV6_TUNNEL is not set 401# CONFIG_IPV6_TUNNEL is not set
408# CONFIG_IPV6_MULTIPLE_TABLES is not set 402# CONFIG_IPV6_MULTIPLE_TABLES is not set
409# CONFIG_NETWORK_SECMARK is not set 403# CONFIG_NETWORK_SECMARK is not set
410# CONFIG_NETFILTER is not set 404# CONFIG_NETFILTER is not set
411
412#
413# DCCP Configuration (EXPERIMENTAL)
414#
415# CONFIG_IP_DCCP is not set 405# CONFIG_IP_DCCP is not set
416
417#
418# SCTP Configuration (EXPERIMENTAL)
419#
420# CONFIG_IP_SCTP is not set 406# CONFIG_IP_SCTP is not set
421
422#
423# TIPC Configuration (EXPERIMENTAL)
424#
425# CONFIG_TIPC is not set 407# CONFIG_TIPC is not set
426# CONFIG_ATM is not set 408# CONFIG_ATM is not set
427# CONFIG_BRIDGE is not set 409# CONFIG_BRIDGE is not set
@@ -458,6 +440,7 @@ CONFIG_IPV6_SIT=y
458# CONFIG_MAC80211 is not set 440# CONFIG_MAC80211 is not set
459# CONFIG_IEEE80211 is not set 441# CONFIG_IEEE80211 is not set
460# CONFIG_RFKILL is not set 442# CONFIG_RFKILL is not set
443# CONFIG_NET_9P is not set
461 444
462# 445#
463# Device Drivers 446# Device Drivers
@@ -472,21 +455,9 @@ CONFIG_FW_LOADER=y
472# CONFIG_DEBUG_DRIVER is not set 455# CONFIG_DEBUG_DRIVER is not set
473# CONFIG_DEBUG_DEVRES is not set 456# CONFIG_DEBUG_DEVRES is not set
474# CONFIG_SYS_HYPERVISOR is not set 457# CONFIG_SYS_HYPERVISOR is not set
475
476#
477# Connector - unified userspace <-> kernelspace linker
478#
479# CONFIG_CONNECTOR is not set 458# CONFIG_CONNECTOR is not set
480# CONFIG_MTD is not set 459# CONFIG_MTD is not set
481
482#
483# Parallel port support
484#
485# CONFIG_PARPORT is not set 460# CONFIG_PARPORT is not set
486
487#
488# Plug and Play support
489#
490CONFIG_PNP=y 461CONFIG_PNP=y
491# CONFIG_PNP_DEBUG is not set 462# CONFIG_PNP_DEBUG is not set
492 463
@@ -494,10 +465,7 @@ CONFIG_PNP=y
494# Protocols 465# Protocols
495# 466#
496CONFIG_PNPACPI=y 467CONFIG_PNPACPI=y
497 468CONFIG_BLK_DEV=y
498#
499# Block devices
500#
501CONFIG_BLK_DEV_FD=y 469CONFIG_BLK_DEV_FD=y
502# CONFIG_BLK_CPQ_DA is not set 470# CONFIG_BLK_CPQ_DA is not set
503# CONFIG_BLK_CPQ_CISS_DA is not set 471# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -515,17 +483,14 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
515CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 483CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
516# CONFIG_CDROM_PKTCDVD is not set 484# CONFIG_CDROM_PKTCDVD is not set
517# CONFIG_ATA_OVER_ETH is not set 485# CONFIG_ATA_OVER_ETH is not set
518 486CONFIG_MISC_DEVICES=y
519#
520# Misc devices
521#
522# CONFIG_IBM_ASM is not set 487# CONFIG_IBM_ASM is not set
523# CONFIG_PHANTOM is not set 488# CONFIG_PHANTOM is not set
489# CONFIG_EEPROM_93CX6 is not set
524# CONFIG_SGI_IOC4 is not set 490# CONFIG_SGI_IOC4 is not set
525# CONFIG_TIFM_CORE is not set 491# CONFIG_TIFM_CORE is not set
526# CONFIG_SONY_LAPTOP is not set 492# CONFIG_SONY_LAPTOP is not set
527# CONFIG_THINKPAD_ACPI is not set 493# CONFIG_THINKPAD_ACPI is not set
528# CONFIG_BLINK is not set
529CONFIG_IDE=y 494CONFIG_IDE=y
530CONFIG_BLK_DEV_IDE=y 495CONFIG_BLK_DEV_IDE=y
531 496
@@ -597,6 +562,7 @@ CONFIG_BLK_DEV_IDEDMA=y
597# 562#
598# CONFIG_RAID_ATTRS is not set 563# CONFIG_RAID_ATTRS is not set
599CONFIG_SCSI=y 564CONFIG_SCSI=y
565CONFIG_SCSI_DMA=y
600# CONFIG_SCSI_TGT is not set 566# CONFIG_SCSI_TGT is not set
601CONFIG_SCSI_NETLINK=y 567CONFIG_SCSI_NETLINK=y
602# CONFIG_SCSI_PROC_FS is not set 568# CONFIG_SCSI_PROC_FS is not set
@@ -607,8 +573,9 @@ CONFIG_SCSI_NETLINK=y
607CONFIG_BLK_DEV_SD=y 573CONFIG_BLK_DEV_SD=y
608# CONFIG_CHR_DEV_ST is not set 574# CONFIG_CHR_DEV_ST is not set
609# CONFIG_CHR_DEV_OSST is not set 575# CONFIG_CHR_DEV_OSST is not set
610# CONFIG_BLK_DEV_SR is not set 576CONFIG_BLK_DEV_SR=y
611# CONFIG_CHR_DEV_SG is not set 577# CONFIG_BLK_DEV_SR_VENDOR is not set
578CONFIG_CHR_DEV_SG=y
612# CONFIG_CHR_DEV_SCH is not set 579# CONFIG_CHR_DEV_SCH is not set
613 580
614# 581#
@@ -668,6 +635,7 @@ CONFIG_AIC79XX_DEBUG_MASK=0
668# CONFIG_SCSI_INIA100 is not set 635# CONFIG_SCSI_INIA100 is not set
669# CONFIG_SCSI_STEX is not set 636# CONFIG_SCSI_STEX is not set
670# CONFIG_SCSI_SYM53C8XX_2 is not set 637# CONFIG_SCSI_SYM53C8XX_2 is not set
638# CONFIG_SCSI_IPR is not set
671# CONFIG_SCSI_QLOGIC_1280 is not set 639# CONFIG_SCSI_QLOGIC_1280 is not set
672# CONFIG_SCSI_QLA_FC is not set 640# CONFIG_SCSI_QLA_FC is not set
673# CONFIG_SCSI_QLA_ISCSI is not set 641# CONFIG_SCSI_QLA_ISCSI is not set
@@ -676,14 +644,73 @@ CONFIG_AIC79XX_DEBUG_MASK=0
676# CONFIG_SCSI_DC390T is not set 644# CONFIG_SCSI_DC390T is not set
677# CONFIG_SCSI_NSP32 is not set 645# CONFIG_SCSI_NSP32 is not set
678# CONFIG_SCSI_DEBUG is not set 646# CONFIG_SCSI_DEBUG is not set
679# CONFIG_SCSI_ESP_CORE is not set
680# CONFIG_SCSI_SRP is not set 647# CONFIG_SCSI_SRP is not set
681# CONFIG_ATA is not set 648CONFIG_ATA=y
682 649# CONFIG_ATA_NONSTANDARD is not set
683# 650CONFIG_ATA_ACPI=y
684# Multi-device support (RAID and LVM) 651CONFIG_SATA_AHCI=y
685# 652CONFIG_SATA_SVW=y
686# CONFIG_MD is not set 653CONFIG_ATA_PIIX=y
654# CONFIG_SATA_MV is not set
655CONFIG_SATA_NV=y
656# CONFIG_PDC_ADMA is not set
657# CONFIG_SATA_QSTOR is not set
658# CONFIG_SATA_PROMISE is not set
659# CONFIG_SATA_SX4 is not set
660CONFIG_SATA_SIL=y
661# CONFIG_SATA_SIL24 is not set
662# CONFIG_SATA_SIS is not set
663# CONFIG_SATA_ULI is not set
664CONFIG_SATA_VIA=y
665# CONFIG_SATA_VITESSE is not set
666# CONFIG_SATA_INIC162X is not set
667# CONFIG_PATA_ALI is not set
668# CONFIG_PATA_AMD is not set
669# CONFIG_PATA_ARTOP is not set
670# CONFIG_PATA_ATIIXP is not set
671# CONFIG_PATA_CMD640_PCI is not set
672# CONFIG_PATA_CMD64X is not set
673# CONFIG_PATA_CS5520 is not set
674# CONFIG_PATA_CS5530 is not set
675# CONFIG_PATA_CS5535 is not set
676# CONFIG_PATA_CYPRESS is not set
677# CONFIG_PATA_EFAR is not set
678# CONFIG_ATA_GENERIC is not set
679# CONFIG_PATA_HPT366 is not set
680# CONFIG_PATA_HPT37X is not set
681# CONFIG_PATA_HPT3X2N is not set
682# CONFIG_PATA_HPT3X3 is not set
683# CONFIG_PATA_IT821X is not set
684# CONFIG_PATA_IT8213 is not set
685# CONFIG_PATA_JMICRON is not set
686# CONFIG_PATA_TRIFLEX is not set
687# CONFIG_PATA_MARVELL is not set
688# CONFIG_PATA_MPIIX is not set
689# CONFIG_PATA_OLDPIIX is not set
690# CONFIG_PATA_NETCELL is not set
691# CONFIG_PATA_NS87410 is not set
692# CONFIG_PATA_OPTI is not set
693# CONFIG_PATA_OPTIDMA is not set
694# CONFIG_PATA_PDC_OLD is not set
695# CONFIG_PATA_RADISYS is not set
696# CONFIG_PATA_RZ1000 is not set
697# CONFIG_PATA_SC1200 is not set
698# CONFIG_PATA_SERVERWORKS is not set
699# CONFIG_PATA_PDC2027X is not set
700# CONFIG_PATA_SIL680 is not set
701# CONFIG_PATA_SIS is not set
702# CONFIG_PATA_VIA is not set
703# CONFIG_PATA_WINBOND is not set
704CONFIG_MD=y
705# CONFIG_BLK_DEV_MD is not set
706CONFIG_BLK_DEV_DM=y
707# CONFIG_DM_DEBUG is not set
708# CONFIG_DM_CRYPT is not set
709# CONFIG_DM_SNAPSHOT is not set
710# CONFIG_DM_MIRROR is not set
711# CONFIG_DM_ZERO is not set
712# CONFIG_DM_MULTIPATH is not set
713# CONFIG_DM_DELAY is not set
687 714
688# 715#
689# Fusion MPT device support 716# Fusion MPT device support
@@ -724,42 +751,27 @@ CONFIG_IEEE1394_OHCI1394=y
724# CONFIG_IEEE1394_ETH1394 is not set 751# CONFIG_IEEE1394_ETH1394 is not set
725# CONFIG_IEEE1394_DV1394 is not set 752# CONFIG_IEEE1394_DV1394 is not set
726CONFIG_IEEE1394_RAWIO=y 753CONFIG_IEEE1394_RAWIO=y
727
728#
729# I2O device support
730#
731# CONFIG_I2O is not set 754# CONFIG_I2O is not set
732# CONFIG_MACINTOSH_DRIVERS is not set 755CONFIG_MACINTOSH_DRIVERS=y
733 756# CONFIG_MAC_EMUMOUSEBTN is not set
734#
735# Network device support
736#
737CONFIG_NETDEVICES=y 757CONFIG_NETDEVICES=y
758CONFIG_NETDEVICES_MULTIQUEUE=y
738# CONFIG_DUMMY is not set 759# CONFIG_DUMMY is not set
739# CONFIG_BONDING is not set 760# CONFIG_BONDING is not set
761# CONFIG_MACVLAN is not set
740# CONFIG_EQUALIZER is not set 762# CONFIG_EQUALIZER is not set
741# CONFIG_TUN is not set 763# CONFIG_TUN is not set
742# CONFIG_NET_SB1000 is not set 764# CONFIG_NET_SB1000 is not set
743
744#
745# ARCnet devices
746#
747# CONFIG_ARCNET is not set 765# CONFIG_ARCNET is not set
748# CONFIG_PHYLIB is not set 766# CONFIG_PHYLIB is not set
749
750#
751# Ethernet (10 or 100Mbit)
752#
753CONFIG_NET_ETHERNET=y 767CONFIG_NET_ETHERNET=y
754CONFIG_MII=y 768CONFIG_MII=y
755# CONFIG_HAPPYMEAL is not set 769# CONFIG_HAPPYMEAL is not set
756# CONFIG_SUNGEM is not set 770# CONFIG_SUNGEM is not set
757# CONFIG_CASSINI is not set 771# CONFIG_CASSINI is not set
758# CONFIG_NET_VENDOR_3COM is not set 772CONFIG_NET_VENDOR_3COM=y
759 773CONFIG_VORTEX=y
760# 774# CONFIG_TYPHOON is not set
761# Tulip family network device support
762#
763CONFIG_NET_TULIP=y 775CONFIG_NET_TULIP=y
764# CONFIG_DE2104X is not set 776# CONFIG_DE2104X is not set
765CONFIG_TULIP=y 777CONFIG_TULIP=y
@@ -810,7 +822,6 @@ CONFIG_R8169=y
810# CONFIG_SIS190 is not set 822# CONFIG_SIS190 is not set
811# CONFIG_SKGE is not set 823# CONFIG_SKGE is not set
812CONFIG_SKY2=y 824CONFIG_SKY2=y
813# CONFIG_SK98LIN is not set
814# CONFIG_VIA_VELOCITY is not set 825# CONFIG_VIA_VELOCITY is not set
815CONFIG_TIGON3=y 826CONFIG_TIGON3=y
816CONFIG_BNX2=y 827CONFIG_BNX2=y
@@ -824,10 +835,6 @@ CONFIG_NETDEV_10000=y
824# CONFIG_MYRI10GE is not set 835# CONFIG_MYRI10GE is not set
825# CONFIG_NETXEN_NIC is not set 836# CONFIG_NETXEN_NIC is not set
826# CONFIG_MLX4_CORE is not set 837# CONFIG_MLX4_CORE is not set
827
828#
829# Token Ring devices
830#
831# CONFIG_TR is not set 838# CONFIG_TR is not set
832 839
833# 840#
@@ -856,15 +863,7 @@ CONFIG_NETCONSOLE=y
856CONFIG_NETPOLL=y 863CONFIG_NETPOLL=y
857# CONFIG_NETPOLL_TRAP is not set 864# CONFIG_NETPOLL_TRAP is not set
858CONFIG_NET_POLL_CONTROLLER=y 865CONFIG_NET_POLL_CONTROLLER=y
859
860#
861# ISDN subsystem
862#
863# CONFIG_ISDN is not set 866# CONFIG_ISDN is not set
864
865#
866# Telephony Support
867#
868# CONFIG_PHONE is not set 867# CONFIG_PHONE is not set
869 868
870# 869#
@@ -872,6 +871,7 @@ CONFIG_NET_POLL_CONTROLLER=y
872# 871#
873CONFIG_INPUT=y 872CONFIG_INPUT=y
874# CONFIG_INPUT_FF_MEMLESS is not set 873# CONFIG_INPUT_FF_MEMLESS is not set
874# CONFIG_INPUT_POLLDEV is not set
875 875
876# 876#
877# Userland interfaces 877# Userland interfaces
@@ -937,6 +937,7 @@ CONFIG_HW_CONSOLE=y
937# 937#
938CONFIG_SERIAL_8250=y 938CONFIG_SERIAL_8250=y
939CONFIG_SERIAL_8250_CONSOLE=y 939CONFIG_SERIAL_8250_CONSOLE=y
940CONFIG_FIX_EARLYCON_MEM=y
940CONFIG_SERIAL_8250_PCI=y 941CONFIG_SERIAL_8250_PCI=y
941CONFIG_SERIAL_8250_PNP=y 942CONFIG_SERIAL_8250_PNP=y
942CONFIG_SERIAL_8250_NR_UARTS=4 943CONFIG_SERIAL_8250_NR_UARTS=4
@@ -952,10 +953,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
952CONFIG_UNIX98_PTYS=y 953CONFIG_UNIX98_PTYS=y
953CONFIG_LEGACY_PTYS=y 954CONFIG_LEGACY_PTYS=y
954CONFIG_LEGACY_PTY_COUNT=256 955CONFIG_LEGACY_PTY_COUNT=256
955
956#
957# IPMI
958#
959# CONFIG_IPMI_HANDLER is not set 956# CONFIG_IPMI_HANDLER is not set
960# CONFIG_WATCHDOG is not set 957# CONFIG_WATCHDOG is not set
961CONFIG_HW_RANDOM=y 958CONFIG_HW_RANDOM=y
@@ -989,11 +986,7 @@ CONFIG_MAX_RAW_DEVS=256
989CONFIG_HPET=y 986CONFIG_HPET=y
990# CONFIG_HPET_RTC_IRQ is not set 987# CONFIG_HPET_RTC_IRQ is not set
991CONFIG_HPET_MMAP=y 988CONFIG_HPET_MMAP=y
992CONFIG_HANGCHECK_TIMER=y 989# CONFIG_HANGCHECK_TIMER is not set
993
994#
995# TPM devices
996#
997# CONFIG_TCG_TPM is not set 990# CONFIG_TCG_TPM is not set
998# CONFIG_TELCLOCK is not set 991# CONFIG_TELCLOCK is not set
999CONFIG_DEVPORT=y 992CONFIG_DEVPORT=y
@@ -1004,11 +997,8 @@ CONFIG_DEVPORT=y
1004# 997#
1005# CONFIG_SPI is not set 998# CONFIG_SPI is not set
1006# CONFIG_SPI_MASTER is not set 999# CONFIG_SPI_MASTER is not set
1007
1008#
1009# Dallas's 1-wire bus
1010#
1011# CONFIG_W1 is not set 1000# CONFIG_W1 is not set
1001# CONFIG_POWER_SUPPLY is not set
1012# CONFIG_HWMON is not set 1002# CONFIG_HWMON is not set
1013 1003
1014# 1004#
@@ -1042,7 +1032,7 @@ CONFIG_DAB=y
1042CONFIG_VGA_CONSOLE=y 1032CONFIG_VGA_CONSOLE=y
1043CONFIG_VGACON_SOFT_SCROLLBACK=y 1033CONFIG_VGACON_SOFT_SCROLLBACK=y
1044CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=128 1034CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=128
1045# CONFIG_VIDEO_SELECT is not set 1035CONFIG_VIDEO_SELECT=y
1046CONFIG_DUMMY_CONSOLE=y 1036CONFIG_DUMMY_CONSOLE=y
1047 1037
1048# 1038#
@@ -1059,15 +1049,11 @@ CONFIG_SOUND=y
1059# Open Sound System 1049# Open Sound System
1060# 1050#
1061CONFIG_SOUND_PRIME=y 1051CONFIG_SOUND_PRIME=y
1062# CONFIG_OSS_OBSOLETE is not set
1063# CONFIG_SOUND_TRIDENT is not set 1052# CONFIG_SOUND_TRIDENT is not set
1064# CONFIG_SOUND_MSNDCLAS is not set 1053# CONFIG_SOUND_MSNDCLAS is not set
1065# CONFIG_SOUND_MSNDPIN is not set 1054# CONFIG_SOUND_MSNDPIN is not set
1066# CONFIG_SOUND_OSS is not set 1055# CONFIG_SOUND_OSS is not set
1067 1056CONFIG_HID_SUPPORT=y
1068#
1069# HID Devices
1070#
1071CONFIG_HID=y 1057CONFIG_HID=y
1072# CONFIG_HID_DEBUG is not set 1058# CONFIG_HID_DEBUG is not set
1073 1059
@@ -1078,10 +1064,7 @@ CONFIG_USB_HID=y
1078# CONFIG_USB_HIDINPUT_POWERBOOK is not set 1064# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1079# CONFIG_HID_FF is not set 1065# CONFIG_HID_FF is not set
1080# CONFIG_USB_HIDDEV is not set 1066# CONFIG_USB_HIDDEV is not set
1081 1067CONFIG_USB_SUPPORT=y
1082#
1083# USB support
1084#
1085CONFIG_USB_ARCH_HAS_HCD=y 1068CONFIG_USB_ARCH_HAS_HCD=y
1086CONFIG_USB_ARCH_HAS_OHCI=y 1069CONFIG_USB_ARCH_HAS_OHCI=y
1087CONFIG_USB_ARCH_HAS_EHCI=y 1070CONFIG_USB_ARCH_HAS_EHCI=y
@@ -1095,6 +1078,7 @@ CONFIG_USB_DEVICEFS=y
1095# CONFIG_USB_DEVICE_CLASS is not set 1078# CONFIG_USB_DEVICE_CLASS is not set
1096# CONFIG_USB_DYNAMIC_MINORS is not set 1079# CONFIG_USB_DYNAMIC_MINORS is not set
1097# CONFIG_USB_SUSPEND is not set 1080# CONFIG_USB_SUSPEND is not set
1081# CONFIG_USB_PERSIST is not set
1098# CONFIG_USB_OTG is not set 1082# CONFIG_USB_OTG is not set
1099 1083
1100# 1084#
@@ -1104,7 +1088,6 @@ CONFIG_USB_EHCI_HCD=y
1104# CONFIG_USB_EHCI_SPLIT_ISO is not set 1088# CONFIG_USB_EHCI_SPLIT_ISO is not set
1105# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1089# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1106# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1090# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1107# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1108# CONFIG_USB_ISP116X_HCD is not set 1091# CONFIG_USB_ISP116X_HCD is not set
1109CONFIG_USB_OHCI_HCD=y 1092CONFIG_USB_OHCI_HCD=y
1110# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1093# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -1112,6 +1095,7 @@ CONFIG_USB_OHCI_HCD=y
1112CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1095CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1113CONFIG_USB_UHCI_HCD=y 1096CONFIG_USB_UHCI_HCD=y
1114# CONFIG_USB_SL811_HCD is not set 1097# CONFIG_USB_SL811_HCD is not set
1098# CONFIG_USB_R8A66597_HCD is not set
1115 1099
1116# 1100#
1117# USB Device Class drivers 1101# USB Device Class drivers
@@ -1202,15 +1186,7 @@ CONFIG_USB_MON=y
1202# 1186#
1203# LED Triggers 1187# LED Triggers
1204# 1188#
1205
1206#
1207# InfiniBand support
1208#
1209# CONFIG_INFINIBAND is not set 1189# CONFIG_INFINIBAND is not set
1210
1211#
1212# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1213#
1214# CONFIG_EDAC is not set 1190# CONFIG_EDAC is not set
1215 1191
1216# 1192#
@@ -1230,11 +1206,13 @@ CONFIG_USB_MON=y
1230# 1206#
1231# DMA Devices 1207# DMA Devices
1232# 1208#
1209CONFIG_VIRTUALIZATION=y
1210# CONFIG_KVM is not set
1233 1211
1234# 1212#
1235# Virtualization 1213# Userspace I/O
1236# 1214#
1237# CONFIG_KVM is not set 1215# CONFIG_UIO is not set
1238 1216
1239# 1217#
1240# File systems 1218# File systems
@@ -1272,6 +1250,7 @@ CONFIG_DNOTIFY=y
1272# CONFIG_AUTOFS_FS is not set 1250# CONFIG_AUTOFS_FS is not set
1273CONFIG_AUTOFS4_FS=y 1251CONFIG_AUTOFS4_FS=y
1274# CONFIG_FUSE_FS is not set 1252# CONFIG_FUSE_FS is not set
1253CONFIG_GENERIC_ACL=y
1275 1254
1276# 1255#
1277# CD-ROM/DVD Filesystems 1256# CD-ROM/DVD Filesystems
@@ -1299,7 +1278,7 @@ CONFIG_PROC_KCORE=y
1299CONFIG_PROC_SYSCTL=y 1278CONFIG_PROC_SYSCTL=y
1300CONFIG_SYSFS=y 1279CONFIG_SYSFS=y
1301CONFIG_TMPFS=y 1280CONFIG_TMPFS=y
1302# CONFIG_TMPFS_POSIX_ACL is not set 1281CONFIG_TMPFS_POSIX_ACL=y
1303CONFIG_HUGETLBFS=y 1282CONFIG_HUGETLBFS=y
1304CONFIG_HUGETLB_PAGE=y 1283CONFIG_HUGETLB_PAGE=y
1305CONFIG_RAMFS=y 1284CONFIG_RAMFS=y
@@ -1349,7 +1328,6 @@ CONFIG_SUNRPC=y
1349# CONFIG_NCP_FS is not set 1328# CONFIG_NCP_FS is not set
1350# CONFIG_CODA_FS is not set 1329# CONFIG_CODA_FS is not set
1351# CONFIG_AFS_FS is not set 1330# CONFIG_AFS_FS is not set
1352# CONFIG_9P_FS is not set
1353 1331
1354# 1332#
1355# Partition Types 1333# Partition Types
@@ -1405,10 +1383,7 @@ CONFIG_NLS_UTF8=y
1405# Distributed Lock Manager 1383# Distributed Lock Manager
1406# 1384#
1407# CONFIG_DLM is not set 1385# CONFIG_DLM is not set
1408 1386CONFIG_INSTRUMENTATION=y
1409#
1410# Instrumentation Support
1411#
1412CONFIG_PROFILING=y 1387CONFIG_PROFILING=y
1413CONFIG_OPROFILE=y 1388CONFIG_OPROFILE=y
1414CONFIG_KPROBES=y 1389CONFIG_KPROBES=y
@@ -1418,7 +1393,7 @@ CONFIG_KPROBES=y
1418# 1393#
1419CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1394CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1420# CONFIG_PRINTK_TIME is not set 1395# CONFIG_PRINTK_TIME is not set
1421CONFIG_ENABLE_MUST_CHECK=y 1396# CONFIG_ENABLE_MUST_CHECK is not set
1422CONFIG_MAGIC_SYSRQ=y 1397CONFIG_MAGIC_SYSRQ=y
1423CONFIG_UNUSED_SYMBOLS=y 1398CONFIG_UNUSED_SYMBOLS=y
1424# CONFIG_DEBUG_FS is not set 1399# CONFIG_DEBUG_FS is not set
@@ -1426,15 +1401,17 @@ CONFIG_UNUSED_SYMBOLS=y
1426CONFIG_DEBUG_KERNEL=y 1401CONFIG_DEBUG_KERNEL=y
1427# CONFIG_DEBUG_SHIRQ is not set 1402# CONFIG_DEBUG_SHIRQ is not set
1428CONFIG_DETECT_SOFTLOCKUP=y 1403CONFIG_DETECT_SOFTLOCKUP=y
1404# CONFIG_SCHED_DEBUG is not set
1429# CONFIG_SCHEDSTATS is not set 1405# CONFIG_SCHEDSTATS is not set
1430# CONFIG_TIMER_STATS is not set 1406CONFIG_TIMER_STATS=y
1431# CONFIG_DEBUG_SLAB is not set 1407# CONFIG_SLUB_DEBUG_ON is not set
1432# CONFIG_DEBUG_RT_MUTEXES is not set 1408# CONFIG_DEBUG_RT_MUTEXES is not set
1433# CONFIG_RT_MUTEX_TESTER is not set 1409# CONFIG_RT_MUTEX_TESTER is not set
1434# CONFIG_DEBUG_SPINLOCK is not set 1410# CONFIG_DEBUG_SPINLOCK is not set
1435# CONFIG_DEBUG_MUTEXES is not set 1411# CONFIG_DEBUG_MUTEXES is not set
1436# CONFIG_DEBUG_LOCK_ALLOC is not set 1412# CONFIG_DEBUG_LOCK_ALLOC is not set
1437# CONFIG_PROVE_LOCKING is not set 1413# CONFIG_PROVE_LOCKING is not set
1414# CONFIG_LOCK_STAT is not set
1438# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1415# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1439# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1416# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1440# CONFIG_DEBUG_KOBJECT is not set 1417# CONFIG_DEBUG_KOBJECT is not set
@@ -1444,7 +1421,6 @@ CONFIG_DEBUG_BUGVERBOSE=y
1444# CONFIG_DEBUG_VM is not set 1421# CONFIG_DEBUG_VM is not set
1445# CONFIG_DEBUG_LIST is not set 1422# CONFIG_DEBUG_LIST is not set
1446# CONFIG_FRAME_POINTER is not set 1423# CONFIG_FRAME_POINTER is not set
1447# CONFIG_UNWIND_INFO is not set
1448# CONFIG_FORCED_INLINING is not set 1424# CONFIG_FORCED_INLINING is not set
1449# CONFIG_RCU_TORTURE_TEST is not set 1425# CONFIG_RCU_TORTURE_TEST is not set
1450# CONFIG_LKDTM is not set 1426# CONFIG_LKDTM is not set
@@ -1463,10 +1439,6 @@ CONFIG_DOUBLEFAULT=y
1463# 1439#
1464# CONFIG_KEYS is not set 1440# CONFIG_KEYS is not set
1465# CONFIG_SECURITY is not set 1441# CONFIG_SECURITY is not set
1466
1467#
1468# Cryptographic options
1469#
1470# CONFIG_CRYPTO is not set 1442# CONFIG_CRYPTO is not set
1471 1443
1472# 1444#
@@ -1477,6 +1449,7 @@ CONFIG_BITREVERSE=y
1477# CONFIG_CRC16 is not set 1449# CONFIG_CRC16 is not set
1478# CONFIG_CRC_ITU_T is not set 1450# CONFIG_CRC_ITU_T is not set
1479CONFIG_CRC32=y 1451CONFIG_CRC32=y
1452# CONFIG_CRC7 is not set
1480# CONFIG_LIBCRC32C is not set 1453# CONFIG_LIBCRC32C is not set
1481CONFIG_ZLIB_INFLATE=y 1454CONFIG_ZLIB_INFLATE=y
1482CONFIG_PLIST=y 1455CONFIG_PLIST=y
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 06da59f6f837..dbe5e87e0d66 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -40,6 +40,7 @@ obj-$(CONFIG_VM86) += vm86.o
40obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 40obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
41obj-$(CONFIG_HPET_TIMER) += hpet.o 41obj-$(CONFIG_HPET_TIMER) += hpet.o
42obj-$(CONFIG_K8_NB) += k8.o 42obj-$(CONFIG_K8_NB) += k8.o
43obj-$(CONFIG_MGEODE_LX) += geode.o
43 44
44obj-$(CONFIG_VMI) += vmi.o vmiclock.o 45obj-$(CONFIG_VMI) += vmi.o vmiclock.o
45obj-$(CONFIG_PARAVIRT) += paravirt.o 46obj-$(CONFIG_PARAVIRT) += paravirt.o
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index a2c8b9efd700..cacdd883bf2b 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -618,11 +618,11 @@ static int __init acpi_parse_sbf(struct acpi_table_header *table)
618#ifdef CONFIG_HPET_TIMER 618#ifdef CONFIG_HPET_TIMER
619#include <asm/hpet.h> 619#include <asm/hpet.h>
620 620
621static struct __initdata resource *hpet_res;
622
621static int __init acpi_parse_hpet(struct acpi_table_header *table) 623static int __init acpi_parse_hpet(struct acpi_table_header *table)
622{ 624{
623 struct acpi_table_hpet *hpet_tbl; 625 struct acpi_table_hpet *hpet_tbl;
624 struct resource *hpet_res;
625 resource_size_t res_start;
626 626
627 hpet_tbl = (struct acpi_table_hpet *)table; 627 hpet_tbl = (struct acpi_table_hpet *)table;
628 if (!hpet_tbl) { 628 if (!hpet_tbl) {
@@ -636,31 +636,46 @@ static int __init acpi_parse_hpet(struct acpi_table_header *table)
636 return -1; 636 return -1;
637 } 637 }
638 638
639#define HPET_RESOURCE_NAME_SIZE 9
640 hpet_res = alloc_bootmem(sizeof(*hpet_res) + HPET_RESOURCE_NAME_SIZE);
641 if (hpet_res) {
642 memset(hpet_res, 0, sizeof(*hpet_res));
643 hpet_res->name = (void *)&hpet_res[1];
644 hpet_res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
645 snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE,
646 "HPET %u", hpet_tbl->sequence);
647 hpet_res->end = (1 * 1024) - 1;
648 }
649
650 hpet_address = hpet_tbl->address.address; 639 hpet_address = hpet_tbl->address.address;
651 printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", 640 printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
652 hpet_tbl->id, hpet_address); 641 hpet_tbl->id, hpet_address);
653 642
654 res_start = hpet_address; 643 /*
644 * Allocate and initialize the HPET firmware resource for adding into
645 * the resource tree during the lateinit timeframe.
646 */
647#define HPET_RESOURCE_NAME_SIZE 9
648 hpet_res = alloc_bootmem(sizeof(*hpet_res) + HPET_RESOURCE_NAME_SIZE);
655 649
656 if (hpet_res) { 650 if (!hpet_res)
657 hpet_res->start = res_start; 651 return 0;
658 hpet_res->end += res_start; 652
659 insert_resource(&iomem_resource, hpet_res); 653 memset(hpet_res, 0, sizeof(*hpet_res));
660 } 654 hpet_res->name = (void *)&hpet_res[1];
655 hpet_res->flags = IORESOURCE_MEM;
656 snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE, "HPET %u",
657 hpet_tbl->sequence);
658
659 hpet_res->start = hpet_address;
660 hpet_res->end = hpet_address + (1 * 1024) - 1;
661 661
662 return 0; 662 return 0;
663} 663}
664
665/*
666 * hpet_insert_resource inserts the HPET resources used into the resource
667 * tree.
668 */
669static __init int hpet_insert_resource(void)
670{
671 if (!hpet_res)
672 return 1;
673
674 return insert_resource(&iomem_resource, hpet_res);
675}
676
677late_initcall(hpet_insert_resource);
678
664#else 679#else
665#define acpi_parse_hpet NULL 680#define acpi_parse_hpet NULL
666#endif 681#endif
diff --git a/arch/i386/kernel/acpi/sleep.c b/arch/i386/kernel/acpi/sleep.c
index 4ee83577bf61..c42b5ab49deb 100644
--- a/arch/i386/kernel/acpi/sleep.c
+++ b/arch/i386/kernel/acpi/sleep.c
@@ -14,7 +14,7 @@
14 14
15/* address in low memory of the wakeup routine. */ 15/* address in low memory of the wakeup routine. */
16unsigned long acpi_wakeup_address = 0; 16unsigned long acpi_wakeup_address = 0;
17unsigned long acpi_video_flags; 17unsigned long acpi_realmode_flags;
18extern char wakeup_start, wakeup_end; 18extern char wakeup_start, wakeup_end;
19 19
20extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long)); 20extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
@@ -68,9 +68,11 @@ static int __init acpi_sleep_setup(char *str)
68{ 68{
69 while ((str != NULL) && (*str != '\0')) { 69 while ((str != NULL) && (*str != '\0')) {
70 if (strncmp(str, "s3_bios", 7) == 0) 70 if (strncmp(str, "s3_bios", 7) == 0)
71 acpi_video_flags = 1; 71 acpi_realmode_flags |= 1;
72 if (strncmp(str, "s3_mode", 7) == 0) 72 if (strncmp(str, "s3_mode", 7) == 0)
73 acpi_video_flags |= 2; 73 acpi_realmode_flags |= 2;
74 if (strncmp(str, "s3_beep", 7) == 0)
75 acpi_realmode_flags |= 4;
74 str = strchr(str, ','); 76 str = strchr(str, ',');
75 if (str != NULL) 77 if (str != NULL)
76 str += strspn(str, ", \t"); 78 str += strspn(str, ", \t");
@@ -80,9 +82,11 @@ static int __init acpi_sleep_setup(char *str)
80 82
81__setup("acpi_sleep=", acpi_sleep_setup); 83__setup("acpi_sleep=", acpi_sleep_setup);
82 84
85/* Ouch, we want to delete this. We already have better version in userspace, in
86 s2ram from suspend.sf.net project */
83static __init int reset_videomode_after_s3(struct dmi_system_id *d) 87static __init int reset_videomode_after_s3(struct dmi_system_id *d)
84{ 88{
85 acpi_video_flags |= 2; 89 acpi_realmode_flags |= 2;
86 return 0; 90 return 0;
87} 91}
88 92
diff --git a/arch/i386/kernel/acpi/wakeup.S b/arch/i386/kernel/acpi/wakeup.S
index b781b38131c0..ed0a0f2c1597 100644
--- a/arch/i386/kernel/acpi/wakeup.S
+++ b/arch/i386/kernel/acpi/wakeup.S
@@ -13,6 +13,21 @@
13# cs = 0x1234, eip = 0x05 13# cs = 0x1234, eip = 0x05
14# 14#
15 15
16#define BEEP \
17 inb $97, %al; \
18 outb %al, $0x80; \
19 movb $3, %al; \
20 outb %al, $97; \
21 outb %al, $0x80; \
22 movb $-74, %al; \
23 outb %al, $67; \
24 outb %al, $0x80; \
25 movb $-119, %al; \
26 outb %al, $66; \
27 outb %al, $0x80; \
28 movb $15, %al; \
29 outb %al, $66;
30
16ALIGN 31ALIGN
17 .align 4096 32 .align 4096
18ENTRY(wakeup_start) 33ENTRY(wakeup_start)
@@ -31,6 +46,11 @@ wakeup_code:
31 movw %cs, %ax 46 movw %cs, %ax
32 movw %ax, %ds # Make ds:0 point to wakeup_start 47 movw %ax, %ds # Make ds:0 point to wakeup_start
33 movw %ax, %ss 48 movw %ax, %ss
49
50 testl $4, realmode_flags - wakeup_code
51 jz 1f
52 BEEP
531:
34 mov $(wakeup_stack - wakeup_code), %sp # Private stack is needed for ASUS board 54 mov $(wakeup_stack - wakeup_code), %sp # Private stack is needed for ASUS board
35 movw $0x0e00 + 'S', %fs:(0x12) 55 movw $0x0e00 + 'S', %fs:(0x12)
36 56
@@ -41,7 +61,7 @@ wakeup_code:
41 cmpl $0x12345678, %eax 61 cmpl $0x12345678, %eax
42 jne bogus_real_magic 62 jne bogus_real_magic
43 63
44 testl $1, video_flags - wakeup_code 64 testl $1, realmode_flags - wakeup_code
45 jz 1f 65 jz 1f
46 lcall $0xc000,$3 66 lcall $0xc000,$3
47 movw %cs, %ax 67 movw %cs, %ax
@@ -49,7 +69,7 @@ wakeup_code:
49 movw %ax, %ss 69 movw %ax, %ss
501: 701:
51 71
52 testl $2, video_flags - wakeup_code 72 testl $2, realmode_flags - wakeup_code
53 jz 1f 73 jz 1f
54 mov video_mode - wakeup_code, %ax 74 mov video_mode - wakeup_code, %ax
55 call mode_set 75 call mode_set
@@ -88,7 +108,11 @@ wakeup_code:
88 cmpl $0x12345678, %eax 108 cmpl $0x12345678, %eax
89 jne bogus_real_magic 109 jne bogus_real_magic
90 110
91 ljmpl $__KERNEL_CS,$wakeup_pmode_return 111 testl $8, realmode_flags - wakeup_code
112 jz 1f
113 BEEP
1141:
115 ljmpl $__KERNEL_CS, $wakeup_pmode_return
92 116
93real_save_gdt: .word 0 117real_save_gdt: .word 0
94 .long 0 118 .long 0
@@ -97,7 +121,8 @@ real_save_cr3: .long 0
97real_save_cr4: .long 0 121real_save_cr4: .long 0
98real_magic: .long 0 122real_magic: .long 0
99video_mode: .long 0 123video_mode: .long 0
100video_flags: .long 0 124realmode_flags: .long 0
125beep_flags: .long 0
101real_efer_save_restore: .long 0 126real_efer_save_restore: .long 0
102real_save_efer_edx: .long 0 127real_save_efer_edx: .long 0
103real_save_efer_eax: .long 0 128real_save_efer_eax: .long 0
@@ -230,6 +255,7 @@ bogus_magic:
230# 255#
231ENTRY(acpi_copy_wakeup_routine) 256ENTRY(acpi_copy_wakeup_routine)
232 257
258 pushl %ebx
233 sgdt saved_gdt 259 sgdt saved_gdt
234 sidt saved_idt 260 sidt saved_idt
235 sldt saved_ldt 261 sldt saved_ldt
@@ -259,10 +285,11 @@ ENTRY(acpi_copy_wakeup_routine)
259 285
260 movl saved_videomode, %edx 286 movl saved_videomode, %edx
261 movl %edx, video_mode - wakeup_start (%eax) 287 movl %edx, video_mode - wakeup_start (%eax)
262 movl acpi_video_flags, %edx 288 movl acpi_realmode_flags, %edx
263 movl %edx, video_flags - wakeup_start (%eax) 289 movl %edx, realmode_flags - wakeup_start (%eax)
264 movl $0x12345678, real_magic - wakeup_start (%eax) 290 movl $0x12345678, real_magic - wakeup_start (%eax)
265 movl $0x12345678, saved_magic 291 movl $0x12345678, saved_magic
292 popl %ebx
266 ret 293 ret
267 294
268save_registers: 295save_registers:
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c
index d8cda14fff8b..0695be538de5 100644
--- a/arch/i386/kernel/alternative.c
+++ b/arch/i386/kernel/alternative.c
@@ -5,9 +5,8 @@
5#include <asm/alternative.h> 5#include <asm/alternative.h>
6#include <asm/sections.h> 6#include <asm/sections.h>
7 7
8static int noreplace_smp = 0; 8#ifdef CONFIG_HOTPLUG_CPU
9static int smp_alt_once = 0; 9static int smp_alt_once;
10static int debug_alternative = 0;
11 10
12static int __init bootonly(char *str) 11static int __init bootonly(char *str)
13{ 12{
@@ -15,6 +14,11 @@ static int __init bootonly(char *str)
15 return 1; 14 return 1;
16} 15}
17__setup("smp-alt-boot", bootonly); 16__setup("smp-alt-boot", bootonly);
17#else
18#define smp_alt_once 1
19#endif
20
21static int debug_alternative;
18 22
19static int __init debug_alt(char *str) 23static int __init debug_alt(char *str)
20{ 24{
@@ -23,6 +27,8 @@ static int __init debug_alt(char *str)
23} 27}
24__setup("debug-alternative", debug_alt); 28__setup("debug-alternative", debug_alt);
25 29
30static int noreplace_smp;
31
26static int __init setup_noreplace_smp(char *str) 32static int __init setup_noreplace_smp(char *str)
27{ 33{
28 noreplace_smp = 1; 34 noreplace_smp = 1;
@@ -376,8 +382,6 @@ void __init alternative_instructions(void)
376#ifdef CONFIG_HOTPLUG_CPU 382#ifdef CONFIG_HOTPLUG_CPU
377 if (num_possible_cpus() < 2) 383 if (num_possible_cpus() < 2)
378 smp_alt_once = 1; 384 smp_alt_once = 1;
379#else
380 smp_alt_once = 1;
381#endif 385#endif
382 386
383#ifdef CONFIG_SMP 387#ifdef CONFIG_SMP
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index 67824f3bb974..bfc6cb7df7e7 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -263,6 +263,9 @@ static void lapic_timer_setup(enum clock_event_mode mode,
263 v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR); 263 v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR);
264 apic_write_around(APIC_LVTT, v); 264 apic_write_around(APIC_LVTT, v);
265 break; 265 break;
266 case CLOCK_EVT_MODE_RESUME:
267 /* Nothing to do here */
268 break;
266 } 269 }
267 270
268 local_irq_restore(flags); 271 local_irq_restore(flags);
@@ -315,7 +318,7 @@ static void __devinit setup_APIC_timer(void)
315 318
316#define LAPIC_CAL_LOOPS (HZ/10) 319#define LAPIC_CAL_LOOPS (HZ/10)
317 320
318static __initdata volatile int lapic_cal_loops = -1; 321static __initdata int lapic_cal_loops = -1;
319static __initdata long lapic_cal_t1, lapic_cal_t2; 322static __initdata long lapic_cal_t1, lapic_cal_t2;
320static __initdata unsigned long long lapic_cal_tsc1, lapic_cal_tsc2; 323static __initdata unsigned long long lapic_cal_tsc1, lapic_cal_tsc2;
321static __initdata unsigned long lapic_cal_pm1, lapic_cal_pm2; 324static __initdata unsigned long lapic_cal_pm1, lapic_cal_pm2;
@@ -485,7 +488,7 @@ void __init setup_boot_APIC_clock(void)
485 /* Let the interrupts run */ 488 /* Let the interrupts run */
486 local_irq_enable(); 489 local_irq_enable();
487 490
488 while(lapic_cal_loops <= LAPIC_CAL_LOOPS) 491 while (lapic_cal_loops <= LAPIC_CAL_LOOPS)
489 cpu_relax(); 492 cpu_relax();
490 493
491 local_irq_disable(); 494 local_irq_disable();
@@ -521,6 +524,9 @@ void __init setup_boot_APIC_clock(void)
521 */ 524 */
522 if (nmi_watchdog != NMI_IO_APIC) 525 if (nmi_watchdog != NMI_IO_APIC)
523 lapic_clockevent.features &= ~CLOCK_EVT_FEAT_DUMMY; 526 lapic_clockevent.features &= ~CLOCK_EVT_FEAT_DUMMY;
527 else
528 printk(KERN_WARNING "APIC timer registered as dummy,"
529 " due to nmi_watchdog=1!\n");
524 } 530 }
525 531
526 /* Setup the lapic or request the broadcast */ 532 /* Setup the lapic or request the broadcast */
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
index 4112afe712b9..47001d50a083 100644
--- a/arch/i386/kernel/apm.c
+++ b/arch/i386/kernel/apm.c
@@ -222,6 +222,7 @@
222#include <linux/capability.h> 222#include <linux/capability.h>
223#include <linux/device.h> 223#include <linux/device.h>
224#include <linux/kernel.h> 224#include <linux/kernel.h>
225#include <linux/freezer.h>
225#include <linux/smp.h> 226#include <linux/smp.h>
226#include <linux/dmi.h> 227#include <linux/dmi.h>
227#include <linux/suspend.h> 228#include <linux/suspend.h>
@@ -2311,7 +2312,6 @@ static int __init apm_init(void)
2311 remove_proc_entry("apm", NULL); 2312 remove_proc_entry("apm", NULL);
2312 return err; 2313 return err;
2313 } 2314 }
2314 kapmd_task->flags |= PF_NOFREEZE;
2315 wake_up_process(kapmd_task); 2315 wake_up_process(kapmd_task);
2316 2316
2317 if (num_online_cpus() > 1 && !smp ) { 2317 if (num_online_cpus() > 1 && !smp ) {
diff --git a/arch/i386/kernel/asm-offsets.c b/arch/i386/kernel/asm-offsets.c
index 27a776c9044d..7288ac88d746 100644
--- a/arch/i386/kernel/asm-offsets.c
+++ b/arch/i386/kernel/asm-offsets.c
@@ -17,6 +17,13 @@
17#include <asm/thread_info.h> 17#include <asm/thread_info.h>
18#include <asm/elf.h> 18#include <asm/elf.h>
19 19
20#include <xen/interface/xen.h>
21
22#ifdef CONFIG_LGUEST_GUEST
23#include <linux/lguest.h>
24#include "../../../drivers/lguest/lg.h"
25#endif
26
20#define DEFINE(sym, val) \ 27#define DEFINE(sym, val) \
21 asm volatile("\n->" #sym " %0 " #val : : "i" (val)) 28 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
22 29
@@ -59,6 +66,7 @@ void foo(void)
59 OFFSET(TI_addr_limit, thread_info, addr_limit); 66 OFFSET(TI_addr_limit, thread_info, addr_limit);
60 OFFSET(TI_restart_block, thread_info, restart_block); 67 OFFSET(TI_restart_block, thread_info, restart_block);
61 OFFSET(TI_sysenter_return, thread_info, sysenter_return); 68 OFFSET(TI_sysenter_return, thread_info, sysenter_return);
69 OFFSET(TI_cpu, thread_info, cpu);
62 BLANK(); 70 BLANK();
63 71
64 OFFSET(GDS_size, Xgt_desc_struct, size); 72 OFFSET(GDS_size, Xgt_desc_struct, size);
@@ -115,4 +123,25 @@ void foo(void)
115 OFFSET(PARAVIRT_iret, paravirt_ops, iret); 123 OFFSET(PARAVIRT_iret, paravirt_ops, iret);
116 OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0); 124 OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0);
117#endif 125#endif
126
127#ifdef CONFIG_XEN
128 BLANK();
129 OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask);
130 OFFSET(XEN_vcpu_info_pending, vcpu_info, evtchn_upcall_pending);
131#endif
132
133#ifdef CONFIG_LGUEST_GUEST
134 BLANK();
135 OFFSET(LGUEST_DATA_irq_enabled, lguest_data, irq_enabled);
136 OFFSET(LGUEST_PAGES_host_gdt_desc, lguest_pages, state.host_gdt_desc);
137 OFFSET(LGUEST_PAGES_host_idt_desc, lguest_pages, state.host_idt_desc);
138 OFFSET(LGUEST_PAGES_host_cr3, lguest_pages, state.host_cr3);
139 OFFSET(LGUEST_PAGES_host_sp, lguest_pages, state.host_sp);
140 OFFSET(LGUEST_PAGES_guest_gdt_desc, lguest_pages,state.guest_gdt_desc);
141 OFFSET(LGUEST_PAGES_guest_idt_desc, lguest_pages,state.guest_idt_desc);
142 OFFSET(LGUEST_PAGES_guest_gdt, lguest_pages, state.guest_gdt);
143 OFFSET(LGUEST_PAGES_regs_trapnum, lguest_pages, regs.trapnum);
144 OFFSET(LGUEST_PAGES_regs_errcode, lguest_pages, regs.errcode);
145 OFFSET(LGUEST_PAGES_regs, lguest_pages, regs);
146#endif
118} 147}
diff --git a/arch/i386/kernel/cpu/Makefile b/arch/i386/kernel/cpu/Makefile
index 74f27a463db0..778396c78d65 100644
--- a/arch/i386/kernel/cpu/Makefile
+++ b/arch/i386/kernel/cpu/Makefile
@@ -8,8 +8,7 @@ obj-y += amd.o
8obj-y += cyrix.o 8obj-y += cyrix.o
9obj-y += centaur.o 9obj-y += centaur.o
10obj-y += transmeta.o 10obj-y += transmeta.o
11obj-y += intel.o intel_cacheinfo.o 11obj-y += intel.o intel_cacheinfo.o addon_cpuid_features.o
12obj-y += rise.o
13obj-y += nexgen.o 12obj-y += nexgen.o
14obj-y += umc.o 13obj-y += umc.o
15 14
diff --git a/arch/i386/kernel/cpu/addon_cpuid_features.c b/arch/i386/kernel/cpu/addon_cpuid_features.c
new file mode 100644
index 000000000000..3e91d3ee26ec
--- /dev/null
+++ b/arch/i386/kernel/cpu/addon_cpuid_features.c
@@ -0,0 +1,50 @@
1
2/*
3 * Routines to indentify additional cpu features that are scattered in
4 * cpuid space.
5 */
6
7#include <linux/cpu.h>
8
9#include <asm/processor.h>
10
11struct cpuid_bit {
12 u16 feature;
13 u8 reg;
14 u8 bit;
15 u32 level;
16};
17
18enum cpuid_regs {
19 CR_EAX = 0,
20 CR_ECX,
21 CR_EDX,
22 CR_EBX
23};
24
25void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
26{
27 u32 max_level;
28 u32 regs[4];
29 const struct cpuid_bit *cb;
30
31 static const struct cpuid_bit cpuid_bits[] = {
32 { X86_FEATURE_IDA, CR_EAX, 1, 0x00000006 },
33 { 0, 0, 0, 0 }
34 };
35
36 for (cb = cpuid_bits; cb->feature; cb++) {
37
38 /* Verify that the level is valid */
39 max_level = cpuid_eax(cb->level & 0xffff0000);
40 if (max_level < cb->level ||
41 max_level > (cb->level | 0xffff))
42 continue;
43
44 cpuid(cb->level, &regs[CR_EAX], &regs[CR_EBX],
45 &regs[CR_ECX], &regs[CR_EDX]);
46
47 if (regs[cb->reg] & (1 << cb->bit))
48 set_bit(cb->feature, c->x86_capability);
49 }
50}
diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386/kernel/cpu/amd.c
index 6f47eeeb93ea..815a5f0aa474 100644
--- a/arch/i386/kernel/cpu/amd.c
+++ b/arch/i386/kernel/cpu/amd.c
@@ -272,8 +272,12 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
272 } 272 }
273#endif 273#endif
274 274
275 if (cpuid_eax(0x80000000) >= 0x80000006) 275 if (cpuid_eax(0x80000000) >= 0x80000006) {
276 num_cache_leaves = 3; 276 if ((c->x86 == 0x10) && (cpuid_edx(0x80000006) & 0xf000))
277 num_cache_leaves = 4;
278 else
279 num_cache_leaves = 3;
280 }
277 281
278 if (amd_apic_timer_broken()) 282 if (amd_apic_timer_broken())
279 set_bit(X86_FEATURE_LAPIC_TIMER_BROKEN, c->x86_capability); 283 set_bit(X86_FEATURE_LAPIC_TIMER_BROKEN, c->x86_capability);
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c
index 794d593c47eb..d506201d397c 100644
--- a/arch/i386/kernel/cpu/common.c
+++ b/arch/i386/kernel/cpu/common.c
@@ -353,6 +353,8 @@ static void __cpuinit generic_identify(struct cpuinfo_x86 * c)
353 if ( xlvl >= 0x80000004 ) 353 if ( xlvl >= 0x80000004 )
354 get_model_name(c); /* Default name */ 354 get_model_name(c); /* Default name */
355 } 355 }
356
357 init_scattered_cpuid_features(c);
356 } 358 }
357 359
358 early_intel_workaround(c); 360 early_intel_workaround(c);
@@ -604,7 +606,6 @@ extern int nsc_init_cpu(void);
604extern int amd_init_cpu(void); 606extern int amd_init_cpu(void);
605extern int centaur_init_cpu(void); 607extern int centaur_init_cpu(void);
606extern int transmeta_init_cpu(void); 608extern int transmeta_init_cpu(void);
607extern int rise_init_cpu(void);
608extern int nexgen_init_cpu(void); 609extern int nexgen_init_cpu(void);
609extern int umc_init_cpu(void); 610extern int umc_init_cpu(void);
610 611
@@ -616,7 +617,6 @@ void __init early_cpu_init(void)
616 amd_init_cpu(); 617 amd_init_cpu();
617 centaur_init_cpu(); 618 centaur_init_cpu();
618 transmeta_init_cpu(); 619 transmeta_init_cpu();
619 rise_init_cpu();
620 nexgen_init_cpu(); 620 nexgen_init_cpu();
621 umc_init_cpu(); 621 umc_init_cpu();
622 early_cpu_detect(); 622 early_cpu_detect();
diff --git a/arch/i386/kernel/cpu/cpufreq/Kconfig b/arch/i386/kernel/cpu/cpufreq/Kconfig
index e912aae9473c..094118ba00da 100644
--- a/arch/i386/kernel/cpu/cpufreq/Kconfig
+++ b/arch/i386/kernel/cpu/cpufreq/Kconfig
@@ -90,10 +90,17 @@ config X86_POWERNOW_K8
90 If in doubt, say N. 90 If in doubt, say N.
91 91
92config X86_POWERNOW_K8_ACPI 92config X86_POWERNOW_K8_ACPI
93 bool 93 bool "ACPI Support"
94 depends on X86_POWERNOW_K8 && ACPI_PROCESSOR 94 select ACPI_PROCESSOR
95 depends on !(X86_POWERNOW_K8 = y && ACPI_PROCESSOR = m) 95 depends on X86_POWERNOW_K8
96 default y 96 default y
97 help
98 This provides access to the K8s Processor Performance States via ACPI.
99 This driver is probably required for CPUFreq to work with multi-socket and
100 SMP systems. It is not required on at least some single-socket yet
101 multi-core systems, even if SMP is enabled.
102
103 It is safe to say Y here.
97 104
98config X86_GX_SUSPMOD 105config X86_GX_SUSPMOD
99 tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation" 106 tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation"
@@ -109,7 +116,7 @@ config X86_GX_SUSPMOD
109config X86_SPEEDSTEP_CENTRINO 116config X86_SPEEDSTEP_CENTRINO
110 tristate "Intel Enhanced SpeedStep" 117 tristate "Intel Enhanced SpeedStep"
111 select CPU_FREQ_TABLE 118 select CPU_FREQ_TABLE
112 select X86_SPEEDSTEP_CENTRINO_TABLE if (!X86_SPEEDSTEP_CENTRINO_ACPI) 119 select X86_SPEEDSTEP_CENTRINO_TABLE
113 help 120 help
114 This adds the CPUFreq driver for Enhanced SpeedStep enabled 121 This adds the CPUFreq driver for Enhanced SpeedStep enabled
115 mobile CPUs. This means Intel Pentium M (Centrino) CPUs. However, 122 mobile CPUs. This means Intel Pentium M (Centrino) CPUs. However,
@@ -121,20 +128,6 @@ config X86_SPEEDSTEP_CENTRINO
121 128
122 If in doubt, say N. 129 If in doubt, say N.
123 130
124config X86_SPEEDSTEP_CENTRINO_ACPI
125 bool "Use ACPI tables to decode valid frequency/voltage (deprecated)"
126 depends on X86_SPEEDSTEP_CENTRINO && ACPI_PROCESSOR
127 depends on !(X86_SPEEDSTEP_CENTRINO = y && ACPI_PROCESSOR = m)
128 help
129 This is deprecated and this functionality is now merged into
130 acpi_cpufreq (X86_ACPI_CPUFREQ). Use that driver instead of
131 speedstep_centrino.
132 Use primarily the information provided in the BIOS ACPI tables
133 to determine valid CPU frequency and voltage pairings. It is
134 required for the driver to work on non-Banias CPUs.
135
136 If in doubt, say Y.
137
138config X86_SPEEDSTEP_CENTRINO_TABLE 131config X86_SPEEDSTEP_CENTRINO_TABLE
139 bool "Built-in tables for Banias CPUs" 132 bool "Built-in tables for Banias CPUs"
140 depends on X86_SPEEDSTEP_CENTRINO 133 depends on X86_SPEEDSTEP_CENTRINO
@@ -230,7 +223,7 @@ comment "shared options"
230config X86_ACPI_CPUFREQ_PROC_INTF 223config X86_ACPI_CPUFREQ_PROC_INTF
231 bool "/proc/acpi/processor/../performance interface (deprecated)" 224 bool "/proc/acpi/processor/../performance interface (deprecated)"
232 depends on PROC_FS 225 depends on PROC_FS
233 depends on X86_ACPI_CPUFREQ || X86_SPEEDSTEP_CENTRINO_ACPI || X86_POWERNOW_K7_ACPI || X86_POWERNOW_K8_ACPI 226 depends on X86_ACPI_CPUFREQ || X86_POWERNOW_K7_ACPI || X86_POWERNOW_K8_ACPI
234 help 227 help
235 This enables the deprecated /proc/acpi/processor/../performance 228 This enables the deprecated /proc/acpi/processor/../performance
236 interface. While it is helpful for debugging, the generic, 229 interface. While it is helpful for debugging, the generic,
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
index 10baa3501ed3..6f846bee2103 100644
--- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -167,11 +167,13 @@ static void do_drv_read(struct drv_cmd *cmd)
167 167
168static void do_drv_write(struct drv_cmd *cmd) 168static void do_drv_write(struct drv_cmd *cmd)
169{ 169{
170 u32 h = 0; 170 u32 lo, hi;
171 171
172 switch (cmd->type) { 172 switch (cmd->type) {
173 case SYSTEM_INTEL_MSR_CAPABLE: 173 case SYSTEM_INTEL_MSR_CAPABLE:
174 wrmsr(cmd->addr.msr.reg, cmd->val, h); 174 rdmsr(cmd->addr.msr.reg, lo, hi);
175 lo = (lo & ~INTEL_MSR_RANGE) | (cmd->val & INTEL_MSR_RANGE);
176 wrmsr(cmd->addr.msr.reg, lo, hi);
175 break; 177 break;
176 case SYSTEM_IO_CAPABLE: 178 case SYSTEM_IO_CAPABLE:
177 acpi_os_write_port((acpi_io_address)cmd->addr.io.port, 179 acpi_os_write_port((acpi_io_address)cmd->addr.io.port,
@@ -372,7 +374,6 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,
372 struct cpufreq_freqs freqs; 374 struct cpufreq_freqs freqs;
373 cpumask_t online_policy_cpus; 375 cpumask_t online_policy_cpus;
374 struct drv_cmd cmd; 376 struct drv_cmd cmd;
375 unsigned int msr;
376 unsigned int next_state = 0; /* Index into freq_table */ 377 unsigned int next_state = 0; /* Index into freq_table */
377 unsigned int next_perf_state = 0; /* Index into perf table */ 378 unsigned int next_perf_state = 0; /* Index into perf table */
378 unsigned int i; 379 unsigned int i;
@@ -417,11 +418,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,
417 case SYSTEM_INTEL_MSR_CAPABLE: 418 case SYSTEM_INTEL_MSR_CAPABLE:
418 cmd.type = SYSTEM_INTEL_MSR_CAPABLE; 419 cmd.type = SYSTEM_INTEL_MSR_CAPABLE;
419 cmd.addr.msr.reg = MSR_IA32_PERF_CTL; 420 cmd.addr.msr.reg = MSR_IA32_PERF_CTL;
420 msr = 421 cmd.val = (u32) perf->states[next_perf_state].control;
421 (u32) perf->states[next_perf_state].
422 control & INTEL_MSR_RANGE;
423 cmd.val = get_cur_val(online_policy_cpus);
424 cmd.val = (cmd.val & ~INTEL_MSR_RANGE) | msr;
425 break; 422 break;
426 case SYSTEM_IO_CAPABLE: 423 case SYSTEM_IO_CAPABLE:
427 cmd.type = SYSTEM_IO_CAPABLE; 424 cmd.type = SYSTEM_IO_CAPABLE;
@@ -668,8 +665,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
668 data->max_freq = perf->states[0].core_frequency * 1000; 665 data->max_freq = perf->states[0].core_frequency * 1000;
669 /* table init */ 666 /* table init */
670 for (i=0; i<perf->state_count; i++) { 667 for (i=0; i<perf->state_count; i++) {
671 if (i>0 && perf->states[i].core_frequency == 668 if (i>0 && perf->states[i].core_frequency >=
672 perf->states[i-1].core_frequency) 669 data->freq_table[valid_states-1].frequency / 1000)
673 continue; 670 continue;
674 671
675 data->freq_table[valid_states].index = i; 672 data->freq_table[valid_states].index = i;
diff --git a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
index 0d49d73d1b71..66acd5039918 100644
--- a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
+++ b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
@@ -391,8 +391,6 @@ static struct cpufreq_driver nforce2_driver = {
391 */ 391 */
392static unsigned int nforce2_detect_chipset(void) 392static unsigned int nforce2_detect_chipset(void)
393{ 393{
394 u8 revision;
395
396 nforce2_chipset_dev = pci_get_subsys(PCI_VENDOR_ID_NVIDIA, 394 nforce2_chipset_dev = pci_get_subsys(PCI_VENDOR_ID_NVIDIA,
397 PCI_DEVICE_ID_NVIDIA_NFORCE2, 395 PCI_DEVICE_ID_NVIDIA_NFORCE2,
398 PCI_ANY_ID, PCI_ANY_ID, NULL); 396 PCI_ANY_ID, PCI_ANY_ID, NULL);
@@ -400,10 +398,8 @@ static unsigned int nforce2_detect_chipset(void)
400 if (nforce2_chipset_dev == NULL) 398 if (nforce2_chipset_dev == NULL)
401 return -ENODEV; 399 return -ENODEV;
402 400
403 pci_read_config_byte(nforce2_chipset_dev, PCI_REVISION_ID, &revision);
404
405 printk(KERN_INFO "cpufreq: Detected nForce2 chipset revision %X\n", 401 printk(KERN_INFO "cpufreq: Detected nForce2 chipset revision %X\n",
406 revision); 402 nforce2_chipset_dev->revision);
407 printk(KERN_INFO 403 printk(KERN_INFO
408 "cpufreq: FSB changing is maybe unstable and can lead to crashes and data loss.\n"); 404 "cpufreq: FSB changing is maybe unstable and can lead to crashes and data loss.\n");
409 405
diff --git a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
index 6667e9cceb9f..194144539a6f 100644
--- a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
+++ b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
@@ -115,7 +115,6 @@ struct gxfreq_params {
115 u8 pci_suscfg; 115 u8 pci_suscfg;
116 u8 pci_pmer1; 116 u8 pci_pmer1;
117 u8 pci_pmer2; 117 u8 pci_pmer2;
118 u8 pci_rev;
119 struct pci_dev *cs55x0; 118 struct pci_dev *cs55x0;
120}; 119};
121 120
@@ -276,7 +275,7 @@ static void gx_set_cpuspeed(unsigned int khz)
276 pci_write_config_byte(gx_params->cs55x0, PCI_VIDTC, 100);/* typical 50 to 100ms */ 275 pci_write_config_byte(gx_params->cs55x0, PCI_VIDTC, 100);/* typical 50 to 100ms */
277 pci_write_config_byte(gx_params->cs55x0, PCI_PMER1, pmer1); 276 pci_write_config_byte(gx_params->cs55x0, PCI_PMER1, pmer1);
278 277
279 if (gx_params->pci_rev < 0x10) { /* CS5530(rev 1.2, 1.3) */ 278 if (gx_params->cs55x0->revision < 0x10) { /* CS5530(rev 1.2, 1.3) */
280 suscfg = gx_params->pci_suscfg | SUSMOD; 279 suscfg = gx_params->pci_suscfg | SUSMOD;
281 } else { /* CS5530A,B.. */ 280 } else { /* CS5530A,B.. */
282 suscfg = gx_params->pci_suscfg | SUSMOD | PWRSVE; 281 suscfg = gx_params->pci_suscfg | SUSMOD | PWRSVE;
@@ -471,7 +470,6 @@ static int __init cpufreq_gx_init(void)
471 pci_read_config_byte(params->cs55x0, PCI_PMER2, &(params->pci_pmer2)); 470 pci_read_config_byte(params->cs55x0, PCI_PMER2, &(params->pci_pmer2));
472 pci_read_config_byte(params->cs55x0, PCI_MODON, &(params->on_duration)); 471 pci_read_config_byte(params->cs55x0, PCI_MODON, &(params->on_duration));
473 pci_read_config_byte(params->cs55x0, PCI_MODOFF, &(params->off_duration)); 472 pci_read_config_byte(params->cs55x0, PCI_MODOFF, &(params->off_duration));
474 pci_read_config_byte(params->cs55x0, PCI_REVISION_ID, &params->pci_rev);
475 473
476 if ((ret = cpufreq_register_driver(&gx_suspmod_driver))) { 474 if ((ret = cpufreq_register_driver(&gx_suspmod_driver))) {
477 kfree(params); 475 kfree(params);
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c
index a3df9c039bd4..ef8f0bc3fc71 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c
@@ -29,6 +29,7 @@
29#include <linux/pci.h> 29#include <linux/pci.h>
30#include <linux/slab.h> 30#include <linux/slab.h>
31#include <linux/string.h> 31#include <linux/string.h>
32#include <linux/delay.h>
32 33
33#include <asm/msr.h> 34#include <asm/msr.h>
34#include <asm/timex.h> 35#include <asm/timex.h>
@@ -55,7 +56,6 @@
55/* Flags */ 56/* Flags */
56#define USE_ACPI_C3 (1 << 1) 57#define USE_ACPI_C3 (1 << 1)
57#define USE_NORTHBRIDGE (1 << 2) 58#define USE_NORTHBRIDGE (1 << 2)
58#define USE_VT8235 (1 << 3)
59 59
60static int cpu_model; 60static int cpu_model;
61static unsigned int numscales=16; 61static unsigned int numscales=16;
@@ -63,22 +63,19 @@ static unsigned int fsb;
63 63
64static const struct mV_pos *vrm_mV_table; 64static const struct mV_pos *vrm_mV_table;
65static const unsigned char *mV_vrm_table; 65static const unsigned char *mV_vrm_table;
66struct f_msr {
67 u8 vrm;
68 u8 pos;
69};
70static struct f_msr f_msr_table[32];
71 66
72static unsigned int highest_speed, lowest_speed; /* kHz */ 67static unsigned int highest_speed, lowest_speed; /* kHz */
73static unsigned int minmult, maxmult; 68static unsigned int minmult, maxmult;
74static int can_scale_voltage; 69static int can_scale_voltage;
75static struct acpi_processor *pr = NULL; 70static struct acpi_processor *pr = NULL;
76static struct acpi_processor_cx *cx = NULL; 71static struct acpi_processor_cx *cx = NULL;
72static u32 acpi_regs_addr;
77static u8 longhaul_flags; 73static u8 longhaul_flags;
78static u8 longhaul_pos; 74static unsigned int longhaul_index;
79 75
80/* Module parameters */ 76/* Module parameters */
81static int scale_voltage; 77static int scale_voltage;
78static int disable_acpi_c3;
82 79
83#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longhaul", msg) 80#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longhaul", msg)
84 81
@@ -144,7 +141,7 @@ static void do_longhaul1(unsigned int clock_ratio_index)
144 rdmsrl(MSR_VIA_BCR2, bcr2.val); 141 rdmsrl(MSR_VIA_BCR2, bcr2.val);
145 /* Enable software clock multiplier */ 142 /* Enable software clock multiplier */
146 bcr2.bits.ESOFTBF = 1; 143 bcr2.bits.ESOFTBF = 1;
147 bcr2.bits.CLOCKMUL = clock_ratio_index; 144 bcr2.bits.CLOCKMUL = clock_ratio_index & 0xff;
148 145
149 /* Sync to timer tick */ 146 /* Sync to timer tick */
150 safe_halt(); 147 safe_halt();
@@ -163,14 +160,12 @@ static void do_longhaul1(unsigned int clock_ratio_index)
163 160
164/* For processor with Longhaul MSR */ 161/* For processor with Longhaul MSR */
165 162
166static void do_powersaver(int cx_address, unsigned int clock_ratio_index) 163static void do_powersaver(int cx_address, unsigned int clock_ratio_index,
164 unsigned int dir)
167{ 165{
168 union msr_longhaul longhaul; 166 union msr_longhaul longhaul;
169 u8 dest_pos;
170 u32 t; 167 u32 t;
171 168
172 dest_pos = f_msr_table[clock_ratio_index].pos;
173
174 rdmsrl(MSR_VIA_LONGHAUL, longhaul.val); 169 rdmsrl(MSR_VIA_LONGHAUL, longhaul.val);
175 /* Setup new frequency */ 170 /* Setup new frequency */
176 longhaul.bits.RevisionKey = longhaul.bits.RevisionID; 171 longhaul.bits.RevisionKey = longhaul.bits.RevisionID;
@@ -178,11 +173,11 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index)
178 longhaul.bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4; 173 longhaul.bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4;
179 /* Setup new voltage */ 174 /* Setup new voltage */
180 if (can_scale_voltage) 175 if (can_scale_voltage)
181 longhaul.bits.SoftVID = f_msr_table[clock_ratio_index].vrm; 176 longhaul.bits.SoftVID = (clock_ratio_index >> 8) & 0x1f;
182 /* Sync to timer tick */ 177 /* Sync to timer tick */
183 safe_halt(); 178 safe_halt();
184 /* Raise voltage if necessary */ 179 /* Raise voltage if necessary */
185 if (can_scale_voltage && longhaul_pos < dest_pos) { 180 if (can_scale_voltage && dir) {
186 longhaul.bits.EnableSoftVID = 1; 181 longhaul.bits.EnableSoftVID = 1;
187 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); 182 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
188 /* Change voltage */ 183 /* Change voltage */
@@ -199,7 +194,6 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index)
199 } 194 }
200 longhaul.bits.EnableSoftVID = 0; 195 longhaul.bits.EnableSoftVID = 0;
201 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); 196 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
202 longhaul_pos = dest_pos;
203 } 197 }
204 198
205 /* Change frequency on next halt or sleep */ 199 /* Change frequency on next halt or sleep */
@@ -220,7 +214,7 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index)
220 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); 214 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
221 215
222 /* Reduce voltage if necessary */ 216 /* Reduce voltage if necessary */
223 if (can_scale_voltage && longhaul_pos > dest_pos) { 217 if (can_scale_voltage && !dir) {
224 longhaul.bits.EnableSoftVID = 1; 218 longhaul.bits.EnableSoftVID = 1;
225 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); 219 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
226 /* Change voltage */ 220 /* Change voltage */
@@ -237,7 +231,6 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index)
237 } 231 }
238 longhaul.bits.EnableSoftVID = 0; 232 longhaul.bits.EnableSoftVID = 0;
239 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); 233 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
240 longhaul_pos = dest_pos;
241 } 234 }
242} 235}
243 236
@@ -248,25 +241,28 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index)
248 * Sets a new clock ratio. 241 * Sets a new clock ratio.
249 */ 242 */
250 243
251static void longhaul_setstate(unsigned int clock_ratio_index) 244static void longhaul_setstate(unsigned int table_index)
252{ 245{
246 unsigned int clock_ratio_index;
253 int speed, mult; 247 int speed, mult;
254 struct cpufreq_freqs freqs; 248 struct cpufreq_freqs freqs;
255 static unsigned int old_ratio=-1;
256 unsigned long flags; 249 unsigned long flags;
257 unsigned int pic1_mask, pic2_mask; 250 unsigned int pic1_mask, pic2_mask;
251 u16 bm_status = 0;
252 u32 bm_timeout = 1000;
253 unsigned int dir = 0;
258 254
259 if (old_ratio == clock_ratio_index) 255 clock_ratio_index = longhaul_table[table_index].index;
260 return; 256 /* Safety precautions */
261 old_ratio = clock_ratio_index; 257 mult = clock_ratio[clock_ratio_index & 0x1f];
262
263 mult = clock_ratio[clock_ratio_index];
264 if (mult == -1) 258 if (mult == -1)
265 return; 259 return;
266
267 speed = calc_speed(mult); 260 speed = calc_speed(mult);
268 if ((speed > highest_speed) || (speed < lowest_speed)) 261 if ((speed > highest_speed) || (speed < lowest_speed))
269 return; 262 return;
263 /* Voltage transition before frequency transition? */
264 if (can_scale_voltage && longhaul_index < table_index)
265 dir = 1;
270 266
271 freqs.old = calc_speed(longhaul_get_cpu_mult()); 267 freqs.old = calc_speed(longhaul_get_cpu_mult());
272 freqs.new = speed; 268 freqs.new = speed;
@@ -285,11 +281,24 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
285 outb(0xFF,0xA1); /* Overkill */ 281 outb(0xFF,0xA1); /* Overkill */
286 outb(0xFE,0x21); /* TMR0 only */ 282 outb(0xFE,0x21); /* TMR0 only */
287 283
284 /* Wait while PCI bus is busy. */
285 if (acpi_regs_addr && (longhaul_flags & USE_NORTHBRIDGE
286 || ((pr != NULL) && pr->flags.bm_control))) {
287 bm_status = inw(acpi_regs_addr);
288 bm_status &= 1 << 4;
289 while (bm_status && bm_timeout) {
290 outw(1 << 4, acpi_regs_addr);
291 bm_timeout--;
292 bm_status = inw(acpi_regs_addr);
293 bm_status &= 1 << 4;
294 }
295 }
296
288 if (longhaul_flags & USE_NORTHBRIDGE) { 297 if (longhaul_flags & USE_NORTHBRIDGE) {
289 /* Disable AGP and PCI arbiters */ 298 /* Disable AGP and PCI arbiters */
290 outb(3, 0x22); 299 outb(3, 0x22);
291 } else if ((pr != NULL) && pr->flags.bm_control) { 300 } else if ((pr != NULL) && pr->flags.bm_control) {
292 /* Disable bus master arbitration */ 301 /* Disable bus master arbitration */
293 acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1); 302 acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1);
294 } 303 }
295 switch (longhaul_version) { 304 switch (longhaul_version) {
@@ -314,9 +323,9 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
314 if (longhaul_flags & USE_ACPI_C3) { 323 if (longhaul_flags & USE_ACPI_C3) {
315 /* Don't allow wakeup */ 324 /* Don't allow wakeup */
316 acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0); 325 acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0);
317 do_powersaver(cx->address, clock_ratio_index); 326 do_powersaver(cx->address, clock_ratio_index, dir);
318 } else { 327 } else {
319 do_powersaver(0, clock_ratio_index); 328 do_powersaver(0, clock_ratio_index, dir);
320 } 329 }
321 break; 330 break;
322 } 331 }
@@ -336,6 +345,9 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
336 345
337 freqs.new = calc_speed(longhaul_get_cpu_mult()); 346 freqs.new = calc_speed(longhaul_get_cpu_mult());
338 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 347 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
348
349 if (!bm_timeout)
350 printk(KERN_INFO PFX "Warning: Timeout while waiting for idle PCI bus.\n");
339} 351}
340 352
341/* 353/*
@@ -369,7 +381,8 @@ static int guess_fsb(int mult)
369 381
370static int __init longhaul_get_ranges(void) 382static int __init longhaul_get_ranges(void)
371{ 383{
372 unsigned int j, k = 0; 384 unsigned int i, j, k = 0;
385 unsigned int ratio;
373 int mult; 386 int mult;
374 387
375 /* Get current frequency */ 388 /* Get current frequency */
@@ -423,8 +436,7 @@ static int __init longhaul_get_ranges(void)
423 if(!longhaul_table) 436 if(!longhaul_table)
424 return -ENOMEM; 437 return -ENOMEM;
425 438
426 for (j=0; j < numscales; j++) { 439 for (j = 0; j < numscales; j++) {
427 unsigned int ratio;
428 ratio = clock_ratio[j]; 440 ratio = clock_ratio[j];
429 if (ratio == -1) 441 if (ratio == -1)
430 continue; 442 continue;
@@ -434,13 +446,41 @@ static int __init longhaul_get_ranges(void)
434 longhaul_table[k].index = j; 446 longhaul_table[k].index = j;
435 k++; 447 k++;
436 } 448 }
449 if (k <= 1) {
450 kfree(longhaul_table);
451 return -ENODEV;
452 }
453 /* Sort */
454 for (j = 0; j < k - 1; j++) {
455 unsigned int min_f, min_i;
456 min_f = longhaul_table[j].frequency;
457 min_i = j;
458 for (i = j + 1; i < k; i++) {
459 if (longhaul_table[i].frequency < min_f) {
460 min_f = longhaul_table[i].frequency;
461 min_i = i;
462 }
463 }
464 if (min_i != j) {
465 unsigned int temp;
466 temp = longhaul_table[j].frequency;
467 longhaul_table[j].frequency = longhaul_table[min_i].frequency;
468 longhaul_table[min_i].frequency = temp;
469 temp = longhaul_table[j].index;
470 longhaul_table[j].index = longhaul_table[min_i].index;
471 longhaul_table[min_i].index = temp;
472 }
473 }
437 474
438 longhaul_table[k].frequency = CPUFREQ_TABLE_END; 475 longhaul_table[k].frequency = CPUFREQ_TABLE_END;
439 if (!k) {
440 kfree (longhaul_table);
441 return -EINVAL;
442 }
443 476
477 /* Find index we are running on */
478 for (j = 0; j < k; j++) {
479 if (clock_ratio[longhaul_table[j].index & 0x1f] == mult) {
480 longhaul_index = j;
481 break;
482 }
483 }
444 return 0; 484 return 0;
445} 485}
446 486
@@ -448,7 +488,7 @@ static int __init longhaul_get_ranges(void)
448static void __init longhaul_setup_voltagescaling(void) 488static void __init longhaul_setup_voltagescaling(void)
449{ 489{
450 union msr_longhaul longhaul; 490 union msr_longhaul longhaul;
451 struct mV_pos minvid, maxvid; 491 struct mV_pos minvid, maxvid, vid;
452 unsigned int j, speed, pos, kHz_step, numvscales; 492 unsigned int j, speed, pos, kHz_step, numvscales;
453 int min_vid_speed; 493 int min_vid_speed;
454 494
@@ -459,11 +499,11 @@ static void __init longhaul_setup_voltagescaling(void)
459 } 499 }
460 500
461 if (!longhaul.bits.VRMRev) { 501 if (!longhaul.bits.VRMRev) {
462 printk (KERN_INFO PFX "VRM 8.5\n"); 502 printk(KERN_INFO PFX "VRM 8.5\n");
463 vrm_mV_table = &vrm85_mV[0]; 503 vrm_mV_table = &vrm85_mV[0];
464 mV_vrm_table = &mV_vrm85[0]; 504 mV_vrm_table = &mV_vrm85[0];
465 } else { 505 } else {
466 printk (KERN_INFO PFX "Mobile VRM\n"); 506 printk(KERN_INFO PFX "Mobile VRM\n");
467 if (cpu_model < CPU_NEHEMIAH) 507 if (cpu_model < CPU_NEHEMIAH)
468 return; 508 return;
469 vrm_mV_table = &mobilevrm_mV[0]; 509 vrm_mV_table = &mobilevrm_mV[0];
@@ -523,7 +563,6 @@ static void __init longhaul_setup_voltagescaling(void)
523 /* Calculate kHz for one voltage step */ 563 /* Calculate kHz for one voltage step */
524 kHz_step = (highest_speed - min_vid_speed) / numvscales; 564 kHz_step = (highest_speed - min_vid_speed) / numvscales;
525 565
526
527 j = 0; 566 j = 0;
528 while (longhaul_table[j].frequency != CPUFREQ_TABLE_END) { 567 while (longhaul_table[j].frequency != CPUFREQ_TABLE_END) {
529 speed = longhaul_table[j].frequency; 568 speed = longhaul_table[j].frequency;
@@ -531,15 +570,14 @@ static void __init longhaul_setup_voltagescaling(void)
531 pos = (speed - min_vid_speed) / kHz_step + minvid.pos; 570 pos = (speed - min_vid_speed) / kHz_step + minvid.pos;
532 else 571 else
533 pos = minvid.pos; 572 pos = minvid.pos;
534 f_msr_table[longhaul_table[j].index].vrm = mV_vrm_table[pos]; 573 longhaul_table[j].index |= mV_vrm_table[pos] << 8;
535 f_msr_table[longhaul_table[j].index].pos = pos; 574 vid = vrm_mV_table[mV_vrm_table[pos]];
575 printk(KERN_INFO PFX "f: %d kHz, index: %d, vid: %d mV\n", speed, j, vid.mV);
536 j++; 576 j++;
537 } 577 }
538 578
539 longhaul_pos = maxvid.pos;
540 can_scale_voltage = 1; 579 can_scale_voltage = 1;
541 printk(KERN_INFO PFX "Voltage scaling enabled. " 580 printk(KERN_INFO PFX "Voltage scaling enabled.\n");
542 "Use of \"conservative\" governor is highly recommended.\n");
543} 581}
544 582
545 583
@@ -553,15 +591,44 @@ static int longhaul_target(struct cpufreq_policy *policy,
553 unsigned int target_freq, unsigned int relation) 591 unsigned int target_freq, unsigned int relation)
554{ 592{
555 unsigned int table_index = 0; 593 unsigned int table_index = 0;
556 unsigned int new_clock_ratio = 0; 594 unsigned int i;
595 unsigned int dir = 0;
596 u8 vid, current_vid;
557 597
558 if (cpufreq_frequency_table_target(policy, longhaul_table, target_freq, relation, &table_index)) 598 if (cpufreq_frequency_table_target(policy, longhaul_table, target_freq, relation, &table_index))
559 return -EINVAL; 599 return -EINVAL;
560 600
561 new_clock_ratio = longhaul_table[table_index].index & 0xFF; 601 /* Don't set same frequency again */
562 602 if (longhaul_index == table_index)
563 longhaul_setstate(new_clock_ratio); 603 return 0;
564 604
605 if (!can_scale_voltage)
606 longhaul_setstate(table_index);
607 else {
608 /* On test system voltage transitions exceeding single
609 * step up or down were turning motherboard off. Both
610 * "ondemand" and "userspace" are unsafe. C7 is doing
611 * this in hardware, C3 is old and we need to do this
612 * in software. */
613 i = longhaul_index;
614 current_vid = (longhaul_table[longhaul_index].index >> 8) & 0x1f;
615 if (table_index > longhaul_index)
616 dir = 1;
617 while (i != table_index) {
618 vid = (longhaul_table[i].index >> 8) & 0x1f;
619 if (vid != current_vid) {
620 longhaul_setstate(i);
621 current_vid = vid;
622 msleep(200);
623 }
624 if (dir)
625 i++;
626 else
627 i--;
628 }
629 longhaul_setstate(table_index);
630 }
631 longhaul_index = table_index;
565 return 0; 632 return 0;
566} 633}
567 634
@@ -590,11 +657,10 @@ static acpi_status longhaul_walk_callback(acpi_handle obj_handle,
590static int enable_arbiter_disable(void) 657static int enable_arbiter_disable(void)
591{ 658{
592 struct pci_dev *dev; 659 struct pci_dev *dev;
593 int status; 660 int status = 1;
594 int reg; 661 int reg;
595 u8 pci_cmd; 662 u8 pci_cmd;
596 663
597 status = 1;
598 /* Find PLE133 host bridge */ 664 /* Find PLE133 host bridge */
599 reg = 0x78; 665 reg = 0x78;
600 dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, 666 dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0,
@@ -627,13 +693,17 @@ static int enable_arbiter_disable(void)
627 return 0; 693 return 0;
628} 694}
629 695
630static int longhaul_setup_vt8235(void) 696static int longhaul_setup_southbridge(void)
631{ 697{
632 struct pci_dev *dev; 698 struct pci_dev *dev;
633 u8 pci_cmd; 699 u8 pci_cmd;
634 700
635 /* Find VT8235 southbridge */ 701 /* Find VT8235 southbridge */
636 dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, NULL); 702 dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, NULL);
703 if (dev == NULL)
704 /* Find VT8237 southbridge */
705 dev = pci_get_device(PCI_VENDOR_ID_VIA,
706 PCI_DEVICE_ID_VIA_8237, NULL);
637 if (dev != NULL) { 707 if (dev != NULL) {
638 /* Set transition time to max */ 708 /* Set transition time to max */
639 pci_read_config_byte(dev, 0xec, &pci_cmd); 709 pci_read_config_byte(dev, 0xec, &pci_cmd);
@@ -645,6 +715,14 @@ static int longhaul_setup_vt8235(void)
645 pci_read_config_byte(dev, 0xe5, &pci_cmd); 715 pci_read_config_byte(dev, 0xe5, &pci_cmd);
646 pci_cmd |= 1 << 7; 716 pci_cmd |= 1 << 7;
647 pci_write_config_byte(dev, 0xe5, pci_cmd); 717 pci_write_config_byte(dev, 0xe5, pci_cmd);
718 /* Get address of ACPI registers block*/
719 pci_read_config_byte(dev, 0x81, &pci_cmd);
720 if (pci_cmd & 1 << 7) {
721 pci_read_config_dword(dev, 0x88, &acpi_regs_addr);
722 acpi_regs_addr &= 0xff00;
723 printk(KERN_INFO PFX "ACPI I/O at 0x%x\n", acpi_regs_addr);
724 }
725
648 pci_dev_put(dev); 726 pci_dev_put(dev);
649 return 1; 727 return 1;
650 } 728 }
@@ -657,7 +735,6 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
657 char *cpuname=NULL; 735 char *cpuname=NULL;
658 int ret; 736 int ret;
659 u32 lo, hi; 737 u32 lo, hi;
660 int vt8235_present;
661 738
662 /* Check what we have on this motherboard */ 739 /* Check what we have on this motherboard */
663 switch (c->x86_model) { 740 switch (c->x86_model) {
@@ -755,7 +832,7 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
755 }; 832 };
756 833
757 /* Doesn't hurt */ 834 /* Doesn't hurt */
758 vt8235_present = longhaul_setup_vt8235(); 835 longhaul_setup_southbridge();
759 836
760 /* Find ACPI data for processor */ 837 /* Find ACPI data for processor */
761 acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, 838 acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT,
@@ -765,35 +842,29 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
765 /* Check ACPI support for C3 state */ 842 /* Check ACPI support for C3 state */
766 if (pr != NULL && longhaul_version == TYPE_POWERSAVER) { 843 if (pr != NULL && longhaul_version == TYPE_POWERSAVER) {
767 cx = &pr->power.states[ACPI_STATE_C3]; 844 cx = &pr->power.states[ACPI_STATE_C3];
768 if (cx->address > 0 && cx->latency <= 1000) { 845 if (cx->address > 0 && cx->latency <= 1000)
769 longhaul_flags |= USE_ACPI_C3; 846 longhaul_flags |= USE_ACPI_C3;
770 goto print_support_type;
771 }
772 } 847 }
848 /* Disable if it isn't working */
849 if (disable_acpi_c3)
850 longhaul_flags &= ~USE_ACPI_C3;
773 /* Check if northbridge is friendly */ 851 /* Check if northbridge is friendly */
774 if (enable_arbiter_disable()) { 852 if (enable_arbiter_disable())
775 longhaul_flags |= USE_NORTHBRIDGE; 853 longhaul_flags |= USE_NORTHBRIDGE;
776 goto print_support_type; 854
777 }
778 /* Use VT8235 southbridge if present */
779 if (longhaul_version == TYPE_POWERSAVER && vt8235_present) {
780 longhaul_flags |= USE_VT8235;
781 goto print_support_type;
782 }
783 /* Check ACPI support for bus master arbiter disable */ 855 /* Check ACPI support for bus master arbiter disable */
784 if ((pr == NULL) || !(pr->flags.bm_control)) { 856 if (!(longhaul_flags & USE_ACPI_C3
857 || longhaul_flags & USE_NORTHBRIDGE)
858 && ((pr == NULL) || !(pr->flags.bm_control))) {
785 printk(KERN_ERR PFX 859 printk(KERN_ERR PFX
786 "No ACPI support. Unsupported northbridge.\n"); 860 "No ACPI support. Unsupported northbridge.\n");
787 return -ENODEV; 861 return -ENODEV;
788 } 862 }
789 863
790print_support_type:
791 if (longhaul_flags & USE_NORTHBRIDGE) 864 if (longhaul_flags & USE_NORTHBRIDGE)
792 printk (KERN_INFO PFX "Using northbridge support.\n"); 865 printk(KERN_INFO PFX "Using northbridge support.\n");
793 else if (longhaul_flags & USE_VT8235) 866 if (longhaul_flags & USE_ACPI_C3)
794 printk (KERN_INFO PFX "Using VT8235 support.\n"); 867 printk(KERN_INFO PFX "Using ACPI support.\n");
795 else
796 printk (KERN_INFO PFX "Using ACPI support.\n");
797 868
798 ret = longhaul_get_ranges(); 869 ret = longhaul_get_ranges();
799 if (ret != 0) 870 if (ret != 0)
@@ -885,6 +956,9 @@ static void __exit longhaul_exit(void)
885 kfree(longhaul_table); 956 kfree(longhaul_table);
886} 957}
887 958
959module_param (disable_acpi_c3, int, 0644);
960MODULE_PARM_DESC(disable_acpi_c3, "Don't use ACPI C3 support");
961
888module_param (scale_voltage, int, 0644); 962module_param (scale_voltage, int, 0644);
889MODULE_PARM_DESC(scale_voltage, "Scale voltage of processor"); 963MODULE_PARM_DESC(scale_voltage, "Scale voltage of processor");
890 964
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.h b/arch/i386/kernel/cpu/cpufreq/longhaul.h
index 102548f12842..4fcc320997df 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.h
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.h
@@ -180,7 +180,7 @@ static const int __initdata ezrat_clock_ratio[32] = {
180 180
181 -1, /* 0000 -> RESERVED (10.0x) */ 181 -1, /* 0000 -> RESERVED (10.0x) */
182 110, /* 0001 -> 11.0x */ 182 110, /* 0001 -> 11.0x */
183 120, /* 0010 -> 12.0x */ 183 -1, /* 0010 -> 12.0x */
184 -1, /* 0011 -> RESERVED (9.0x)*/ 184 -1, /* 0011 -> RESERVED (9.0x)*/
185 105, /* 0100 -> 10.5x */ 185 105, /* 0100 -> 10.5x */
186 115, /* 0101 -> 11.5x */ 186 115, /* 0101 -> 11.5x */
@@ -237,7 +237,7 @@ static const int __initdata ezrat_eblcr[32] = {
237 237
238static const int __initdata nehemiah_clock_ratio[32] = { 238static const int __initdata nehemiah_clock_ratio[32] = {
239 100, /* 0000 -> 10.0x */ 239 100, /* 0000 -> 10.0x */
240 160, /* 0001 -> 16.0x */ 240 -1, /* 0001 -> 16.0x */
241 40, /* 0010 -> 4.0x */ 241 40, /* 0010 -> 4.0x */
242 90, /* 0011 -> 9.0x */ 242 90, /* 0011 -> 9.0x */
243 95, /* 0100 -> 9.5x */ 243 95, /* 0100 -> 9.5x */
@@ -252,10 +252,10 @@ static const int __initdata nehemiah_clock_ratio[32] = {
252 75, /* 1101 -> 7.5x */ 252 75, /* 1101 -> 7.5x */
253 85, /* 1110 -> 8.5x */ 253 85, /* 1110 -> 8.5x */
254 120, /* 1111 -> 12.0x */ 254 120, /* 1111 -> 12.0x */
255 100, /* 0000 -> 10.0x */ 255 -1, /* 0000 -> 10.0x */
256 110, /* 0001 -> 11.0x */ 256 110, /* 0001 -> 11.0x */
257 120, /* 0010 -> 12.0x */ 257 -1, /* 0010 -> 12.0x */
258 90, /* 0011 -> 9.0x */ 258 -1, /* 0011 -> 9.0x */
259 105, /* 0100 -> 10.5x */ 259 105, /* 0100 -> 10.5x */
260 115, /* 0101 -> 11.5x */ 260 115, /* 0101 -> 11.5x */
261 125, /* 0110 -> 12.5x */ 261 125, /* 0110 -> 12.5x */
@@ -267,7 +267,7 @@ static const int __initdata nehemiah_clock_ratio[32] = {
267 145, /* 1100 -> 14.5x */ 267 145, /* 1100 -> 14.5x */
268 155, /* 1101 -> 15.5x */ 268 155, /* 1101 -> 15.5x */
269 -1, /* 1110 -> RESERVED (13.0x) */ 269 -1, /* 1110 -> RESERVED (13.0x) */
270 120, /* 1111 -> 12.0x */ 270 -1, /* 1111 -> 12.0x */
271}; 271};
272 272
273static const int __initdata nehemiah_eblcr[32] = { 273static const int __initdata nehemiah_eblcr[32] = {
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
index 4ade55c5f333..34ed53a06730 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -599,14 +599,17 @@ static void print_basics(struct powernow_k8_data *data)
599 for (j = 0; j < data->numps; j++) { 599 for (j = 0; j < data->numps; j++) {
600 if (data->powernow_table[j].frequency != CPUFREQ_ENTRY_INVALID) { 600 if (data->powernow_table[j].frequency != CPUFREQ_ENTRY_INVALID) {
601 if (cpu_family == CPU_HW_PSTATE) { 601 if (cpu_family == CPU_HW_PSTATE) {
602 printk(KERN_INFO PFX " %d : fid 0x%x gid 0x%x (%d MHz)\n", j, (data->powernow_table[j].index & 0xff00) >> 8, 602 printk(KERN_INFO PFX " %d : fid 0x%x did 0x%x (%d MHz)\n",
603 (data->powernow_table[j].index & 0xff0000) >> 16, 603 j,
604 data->powernow_table[j].frequency/1000); 604 (data->powernow_table[j].index & 0xff00) >> 8,
605 (data->powernow_table[j].index & 0xff0000) >> 16,
606 data->powernow_table[j].frequency/1000);
605 } else { 607 } else {
606 printk(KERN_INFO PFX " %d : fid 0x%x (%d MHz), vid 0x%x\n", j, 608 printk(KERN_INFO PFX " %d : fid 0x%x (%d MHz), vid 0x%x\n",
607 data->powernow_table[j].index & 0xff, 609 j,
608 data->powernow_table[j].frequency/1000, 610 data->powernow_table[j].index & 0xff,
609 data->powernow_table[j].index >> 8); 611 data->powernow_table[j].frequency/1000,
612 data->powernow_table[j].index >> 8);
610 } 613 }
611 } 614 }
612 } 615 }
@@ -1086,7 +1089,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
1086 1089
1087 if (cpu_family == CPU_HW_PSTATE) 1090 if (cpu_family == CPU_HW_PSTATE)
1088 dprintk("targ: curr fid 0x%x, did 0x%x\n", 1091 dprintk("targ: curr fid 0x%x, did 0x%x\n",
1089 data->currfid, data->currvid); 1092 data->currfid, data->currdid);
1090 else { 1093 else {
1091 dprintk("targ: curr fid 0x%x, vid 0x%x\n", 1094 dprintk("targ: curr fid 0x%x, vid 0x%x\n",
1092 data->currfid, data->currvid); 1095 data->currfid, data->currvid);
@@ -1322,16 +1325,22 @@ static struct cpufreq_driver cpufreq_amd64_driver = {
1322static int __cpuinit powernowk8_init(void) 1325static int __cpuinit powernowk8_init(void)
1323{ 1326{
1324 unsigned int i, supported_cpus = 0; 1327 unsigned int i, supported_cpus = 0;
1328 unsigned int booted_cores = 1;
1325 1329
1326 for_each_online_cpu(i) { 1330 for_each_online_cpu(i) {
1327 if (check_supported_cpu(i)) 1331 if (check_supported_cpu(i))
1328 supported_cpus++; 1332 supported_cpus++;
1329 } 1333 }
1330 1334
1335#ifdef CONFIG_SMP
1336 booted_cores = cpu_data[0].booted_cores;
1337#endif
1338
1331 if (supported_cpus == num_online_cpus()) { 1339 if (supported_cpus == num_online_cpus()) {
1332 printk(KERN_INFO PFX "Found %d %s " 1340 printk(KERN_INFO PFX "Found %d %s "
1333 "processors (" VERSION ")\n", supported_cpus, 1341 "processors (%d cpu cores) (" VERSION ")\n",
1334 boot_cpu_data.x86_model_id); 1342 supported_cpus/booted_cores,
1343 boot_cpu_data.x86_model_id, supported_cpus);
1335 return cpufreq_register_driver(&cpufreq_amd64_driver); 1344 return cpufreq_register_driver(&cpufreq_amd64_driver);
1336 } 1345 }
1337 1346
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
index 35489fd68852..6c5dc2c85aeb 100644
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
@@ -21,12 +21,6 @@
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/compiler.h> 22#include <linux/compiler.h>
23 23
24#ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
25#include <linux/acpi.h>
26#include <linux/dmi.h>
27#include <acpi/processor.h>
28#endif
29
30#include <asm/msr.h> 24#include <asm/msr.h>
31#include <asm/processor.h> 25#include <asm/processor.h>
32#include <asm/cpufeature.h> 26#include <asm/cpufeature.h>
@@ -257,9 +251,7 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy)
257 /* Matched a non-match */ 251 /* Matched a non-match */
258 dprintk("no table support for CPU model \"%s\"\n", 252 dprintk("no table support for CPU model \"%s\"\n",
259 cpu->x86_model_id); 253 cpu->x86_model_id);
260#ifndef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI 254 dprintk("try using the acpi-cpufreq driver\n");
261 dprintk("try compiling with CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI enabled\n");
262#endif
263 return -ENOENT; 255 return -ENOENT;
264 } 256 }
265 257
@@ -346,213 +338,6 @@ static unsigned int get_cur_freq(unsigned int cpu)
346} 338}
347 339
348 340
349#ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
350
351static struct acpi_processor_performance *acpi_perf_data[NR_CPUS];
352
353/*
354 * centrino_cpu_early_init_acpi - Do the preregistering with ACPI P-States
355 * library
356 *
357 * Before doing the actual init, we need to do _PSD related setup whenever
358 * supported by the BIOS. These are handled by this early_init routine.
359 */
360static int centrino_cpu_early_init_acpi(void)
361{
362 unsigned int i, j;
363 struct acpi_processor_performance *data;
364
365 for_each_possible_cpu(i) {
366 data = kzalloc(sizeof(struct acpi_processor_performance),
367 GFP_KERNEL);
368 if (!data) {
369 for_each_possible_cpu(j) {
370 kfree(acpi_perf_data[j]);
371 acpi_perf_data[j] = NULL;
372 }
373 return (-ENOMEM);
374 }
375 acpi_perf_data[i] = data;
376 }
377
378 acpi_processor_preregister_performance(acpi_perf_data);
379 return 0;
380}
381
382
383#ifdef CONFIG_SMP
384/*
385 * Some BIOSes do SW_ANY coordination internally, either set it up in hw
386 * or do it in BIOS firmware and won't inform about it to OS. If not
387 * detected, this has a side effect of making CPU run at a different speed
388 * than OS intended it to run at. Detect it and handle it cleanly.
389 */
390static int bios_with_sw_any_bug;
391static int sw_any_bug_found(struct dmi_system_id *d)
392{
393 bios_with_sw_any_bug = 1;
394 return 0;
395}
396
397static struct dmi_system_id sw_any_bug_dmi_table[] = {
398 {
399 .callback = sw_any_bug_found,
400 .ident = "Supermicro Server X6DLP",
401 .matches = {
402 DMI_MATCH(DMI_SYS_VENDOR, "Supermicro"),
403 DMI_MATCH(DMI_BIOS_VERSION, "080010"),
404 DMI_MATCH(DMI_PRODUCT_NAME, "X6DLP"),
405 },
406 },
407 { }
408};
409#endif
410
411/*
412 * centrino_cpu_init_acpi - register with ACPI P-States library
413 *
414 * Register with the ACPI P-States library (part of drivers/acpi/processor.c)
415 * in order to determine correct frequency and voltage pairings by reading
416 * the _PSS of the ACPI DSDT or SSDT tables.
417 */
418static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)
419{
420 unsigned long cur_freq;
421 int result = 0, i;
422 unsigned int cpu = policy->cpu;
423 struct acpi_processor_performance *p;
424
425 p = acpi_perf_data[cpu];
426
427 /* register with ACPI core */
428 if (acpi_processor_register_performance(p, cpu)) {
429 dprintk(PFX "obtaining ACPI data failed\n");
430 return -EIO;
431 }
432
433 policy->shared_type = p->shared_type;
434 /*
435 * Will let policy->cpus know about dependency only when software
436 * coordination is required.
437 */
438 if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL ||
439 policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) {
440 policy->cpus = p->shared_cpu_map;
441 }
442
443#ifdef CONFIG_SMP
444 dmi_check_system(sw_any_bug_dmi_table);
445 if (bios_with_sw_any_bug && cpus_weight(policy->cpus) == 1) {
446 policy->shared_type = CPUFREQ_SHARED_TYPE_ALL;
447 policy->cpus = cpu_core_map[cpu];
448 }
449#endif
450
451 /* verify the acpi_data */
452 if (p->state_count <= 1) {
453 dprintk("No P-States\n");
454 result = -ENODEV;
455 goto err_unreg;
456 }
457
458 if ((p->control_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) ||
459 (p->status_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) {
460 dprintk("Invalid control/status registers (%x - %x)\n",
461 p->control_register.space_id, p->status_register.space_id);
462 result = -EIO;
463 goto err_unreg;
464 }
465
466 for (i=0; i<p->state_count; i++) {
467 if ((p->states[i].control & INTEL_MSR_RANGE) !=
468 (p->states[i].status & INTEL_MSR_RANGE)) {
469 dprintk("Different MSR bits in control (%llu) and status (%llu)\n",
470 p->states[i].control, p->states[i].status);
471 result = -EINVAL;
472 goto err_unreg;
473 }
474
475 if (!p->states[i].core_frequency) {
476 dprintk("Zero core frequency for state %u\n", i);
477 result = -EINVAL;
478 goto err_unreg;
479 }
480
481 if (p->states[i].core_frequency > p->states[0].core_frequency) {
482 dprintk("P%u has larger frequency (%llu) than P0 (%llu), skipping\n", i,
483 p->states[i].core_frequency, p->states[0].core_frequency);
484 p->states[i].core_frequency = 0;
485 continue;
486 }
487 }
488
489 centrino_model[cpu] = kzalloc(sizeof(struct cpu_model), GFP_KERNEL);
490 if (!centrino_model[cpu]) {
491 result = -ENOMEM;
492 goto err_unreg;
493 }
494
495 centrino_model[cpu]->model_name=NULL;
496 centrino_model[cpu]->max_freq = p->states[0].core_frequency * 1000;
497 centrino_model[cpu]->op_points = kmalloc(sizeof(struct cpufreq_frequency_table) *
498 (p->state_count + 1), GFP_KERNEL);
499 if (!centrino_model[cpu]->op_points) {
500 result = -ENOMEM;
501 goto err_kfree;
502 }
503
504 for (i=0; i<p->state_count; i++) {
505 centrino_model[cpu]->op_points[i].index = p->states[i].control & INTEL_MSR_RANGE;
506 centrino_model[cpu]->op_points[i].frequency = p->states[i].core_frequency * 1000;
507 dprintk("adding state %i with frequency %u and control value %04x\n",
508 i, centrino_model[cpu]->op_points[i].frequency, centrino_model[cpu]->op_points[i].index);
509 }
510 centrino_model[cpu]->op_points[p->state_count].frequency = CPUFREQ_TABLE_END;
511
512 cur_freq = get_cur_freq(cpu);
513
514 for (i=0; i<p->state_count; i++) {
515 if (!p->states[i].core_frequency) {
516 dprintk("skipping state %u\n", i);
517 centrino_model[cpu]->op_points[i].frequency = CPUFREQ_ENTRY_INVALID;
518 continue;
519 }
520
521 if (extract_clock(centrino_model[cpu]->op_points[i].index, cpu, 0) !=
522 (centrino_model[cpu]->op_points[i].frequency)) {
523 dprintk("Invalid encoded frequency (%u vs. %u)\n",
524 extract_clock(centrino_model[cpu]->op_points[i].index, cpu, 0),
525 centrino_model[cpu]->op_points[i].frequency);
526 result = -EINVAL;
527 goto err_kfree_all;
528 }
529
530 if (cur_freq == centrino_model[cpu]->op_points[i].frequency)
531 p->state = i;
532 }
533
534 /* notify BIOS that we exist */
535 acpi_processor_notify_smm(THIS_MODULE);
536 printk("speedstep-centrino with X86_SPEEDSTEP_CENTRINO_ACPI "
537 "config is deprecated.\n "
538 "Use X86_ACPI_CPUFREQ (acpi-cpufreq) instead.\n" );
539
540 return 0;
541
542 err_kfree_all:
543 kfree(centrino_model[cpu]->op_points);
544 err_kfree:
545 kfree(centrino_model[cpu]);
546 err_unreg:
547 acpi_processor_unregister_performance(p, cpu);
548 dprintk(PFX "invalid ACPI data\n");
549 return (result);
550}
551#else
552static inline int centrino_cpu_init_acpi(struct cpufreq_policy *policy) { return -ENODEV; }
553static inline int centrino_cpu_early_init_acpi(void) { return 0; }
554#endif
555
556static int centrino_cpu_init(struct cpufreq_policy *policy) 341static int centrino_cpu_init(struct cpufreq_policy *policy)
557{ 342{
558 struct cpuinfo_x86 *cpu = &cpu_data[policy->cpu]; 343 struct cpuinfo_x86 *cpu = &cpu_data[policy->cpu];
@@ -568,27 +353,25 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
568 if (cpu_has(cpu, X86_FEATURE_CONSTANT_TSC)) 353 if (cpu_has(cpu, X86_FEATURE_CONSTANT_TSC))
569 centrino_driver.flags |= CPUFREQ_CONST_LOOPS; 354 centrino_driver.flags |= CPUFREQ_CONST_LOOPS;
570 355
571 if (centrino_cpu_init_acpi(policy)) { 356 if (policy->cpu != 0)
572 if (policy->cpu != 0) 357 return -ENODEV;
573 return -ENODEV;
574 358
575 for (i = 0; i < N_IDS; i++) 359 for (i = 0; i < N_IDS; i++)
576 if (centrino_verify_cpu_id(cpu, &cpu_ids[i])) 360 if (centrino_verify_cpu_id(cpu, &cpu_ids[i]))
577 break; 361 break;
578 362
579 if (i != N_IDS) 363 if (i != N_IDS)
580 centrino_cpu[policy->cpu] = &cpu_ids[i]; 364 centrino_cpu[policy->cpu] = &cpu_ids[i];
581 365
582 if (!centrino_cpu[policy->cpu]) { 366 if (!centrino_cpu[policy->cpu]) {
583 dprintk("found unsupported CPU with " 367 dprintk("found unsupported CPU with "
584 "Enhanced SpeedStep: send /proc/cpuinfo to " 368 "Enhanced SpeedStep: send /proc/cpuinfo to "
585 MAINTAINER "\n"); 369 MAINTAINER "\n");
586 return -ENODEV; 370 return -ENODEV;
587 } 371 }
588 372
589 if (centrino_cpu_init_table(policy)) { 373 if (centrino_cpu_init_table(policy)) {
590 return -ENODEV; 374 return -ENODEV;
591 }
592 } 375 }
593 376
594 /* Check to see if Enhanced SpeedStep is enabled, and try to 377 /* Check to see if Enhanced SpeedStep is enabled, and try to
@@ -634,20 +417,6 @@ static int centrino_cpu_exit(struct cpufreq_policy *policy)
634 417
635 cpufreq_frequency_table_put_attr(cpu); 418 cpufreq_frequency_table_put_attr(cpu);
636 419
637#ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
638 if (!centrino_model[cpu]->model_name) {
639 static struct acpi_processor_performance *p;
640
641 if (acpi_perf_data[cpu]) {
642 p = acpi_perf_data[cpu];
643 dprintk("unregistering and freeing ACPI data\n");
644 acpi_processor_unregister_performance(p, cpu);
645 kfree(centrino_model[cpu]->op_points);
646 kfree(centrino_model[cpu]);
647 }
648 }
649#endif
650
651 centrino_model[cpu] = NULL; 420 centrino_model[cpu] = NULL;
652 421
653 return 0; 422 return 0;
@@ -849,25 +618,12 @@ static int __init centrino_init(void)
849 if (!cpu_has(cpu, X86_FEATURE_EST)) 618 if (!cpu_has(cpu, X86_FEATURE_EST))
850 return -ENODEV; 619 return -ENODEV;
851 620
852 centrino_cpu_early_init_acpi();
853
854 return cpufreq_register_driver(&centrino_driver); 621 return cpufreq_register_driver(&centrino_driver);
855} 622}
856 623
857static void __exit centrino_exit(void) 624static void __exit centrino_exit(void)
858{ 625{
859#ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
860 unsigned int j;
861#endif
862
863 cpufreq_unregister_driver(&centrino_driver); 626 cpufreq_unregister_driver(&centrino_driver);
864
865#ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
866 for_each_possible_cpu(j) {
867 kfree(acpi_perf_data[j]);
868 acpi_perf_data[j] = NULL;
869 }
870#endif
871} 627}
872 628
873MODULE_AUTHOR ("Jeremy Fitzhardinge <jeremy@goop.org>"); 629MODULE_AUTHOR ("Jeremy Fitzhardinge <jeremy@goop.org>");
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
index 698f980eb443..a5b2346faf1f 100644
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
@@ -205,7 +205,6 @@ static unsigned int speedstep_detect_chipset (void)
205 * host brige. Abort on these systems. 205 * host brige. Abort on these systems.
206 */ 206 */
207 static struct pci_dev *hostbridge; 207 static struct pci_dev *hostbridge;
208 u8 rev = 0;
209 208
210 hostbridge = pci_get_subsys(PCI_VENDOR_ID_INTEL, 209 hostbridge = pci_get_subsys(PCI_VENDOR_ID_INTEL,
211 PCI_DEVICE_ID_INTEL_82815_MC, 210 PCI_DEVICE_ID_INTEL_82815_MC,
@@ -216,8 +215,7 @@ static unsigned int speedstep_detect_chipset (void)
216 if (!hostbridge) 215 if (!hostbridge)
217 return 2; /* 2-M */ 216 return 2; /* 2-M */
218 217
219 pci_read_config_byte(hostbridge, PCI_REVISION_ID, &rev); 218 if (hostbridge->revision < 5) {
220 if (rev < 5) {
221 dprintk("hostbridge does not support speedstep\n"); 219 dprintk("hostbridge does not support speedstep\n");
222 speedstep_chipset_dev = NULL; 220 speedstep_chipset_dev = NULL;
223 pci_dev_put(hostbridge); 221 pci_dev_put(hostbridge);
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c
index e5be819492ef..d5a456d27d82 100644
--- a/arch/i386/kernel/cpu/intel_cacheinfo.c
+++ b/arch/i386/kernel/cpu/intel_cacheinfo.c
@@ -4,7 +4,7 @@
4 * Changes: 4 * Changes:
5 * Venkatesh Pallipadi : Adding cache identification through cpuid(4) 5 * Venkatesh Pallipadi : Adding cache identification through cpuid(4)
6 * Ashok Raj <ashok.raj@intel.com>: Work with CPU hotplug infrastructure. 6 * Ashok Raj <ashok.raj@intel.com>: Work with CPU hotplug infrastructure.
7 * Andi Kleen : CPUID4 emulation on AMD. 7 * Andi Kleen / Andreas Herrmann : CPUID4 emulation on AMD.
8 */ 8 */
9 9
10#include <linux/init.h> 10#include <linux/init.h>
@@ -135,7 +135,7 @@ unsigned short num_cache_leaves;
135 135
136/* AMD doesn't have CPUID4. Emulate it here to report the same 136/* AMD doesn't have CPUID4. Emulate it here to report the same
137 information to the user. This makes some assumptions about the machine: 137 information to the user. This makes some assumptions about the machine:
138 No L3, L2 not shared, no SMT etc. that is currently true on AMD CPUs. 138 L2 not shared, no SMT etc. that is currently true on AMD CPUs.
139 139
140 In theory the TLBs could be reported as fake type (they are in "dummy"). 140 In theory the TLBs could be reported as fake type (they are in "dummy").
141 Maybe later */ 141 Maybe later */
@@ -159,13 +159,26 @@ union l2_cache {
159 unsigned val; 159 unsigned val;
160}; 160};
161 161
162union l3_cache {
163 struct {
164 unsigned line_size : 8;
165 unsigned lines_per_tag : 4;
166 unsigned assoc : 4;
167 unsigned res : 2;
168 unsigned size_encoded : 14;
169 };
170 unsigned val;
171};
172
162static const unsigned short assocs[] = { 173static const unsigned short assocs[] = {
163 [1] = 1, [2] = 2, [4] = 4, [6] = 8, 174 [1] = 1, [2] = 2, [4] = 4, [6] = 8,
164 [8] = 16, 175 [8] = 16, [0xa] = 32, [0xb] = 48,
176 [0xc] = 64,
165 [0xf] = 0xffff // ?? 177 [0xf] = 0xffff // ??
166 }; 178};
167static const unsigned char levels[] = { 1, 1, 2 }; 179
168static const unsigned char types[] = { 1, 2, 3 }; 180static const unsigned char levels[] = { 1, 1, 2, 3 };
181static const unsigned char types[] = { 1, 2, 3, 3 };
169 182
170static void __cpuinit amd_cpuid4(int leaf, union _cpuid4_leaf_eax *eax, 183static void __cpuinit amd_cpuid4(int leaf, union _cpuid4_leaf_eax *eax,
171 union _cpuid4_leaf_ebx *ebx, 184 union _cpuid4_leaf_ebx *ebx,
@@ -175,37 +188,58 @@ static void __cpuinit amd_cpuid4(int leaf, union _cpuid4_leaf_eax *eax,
175 unsigned line_size, lines_per_tag, assoc, size_in_kb; 188 unsigned line_size, lines_per_tag, assoc, size_in_kb;
176 union l1_cache l1i, l1d; 189 union l1_cache l1i, l1d;
177 union l2_cache l2; 190 union l2_cache l2;
191 union l3_cache l3;
192 union l1_cache *l1 = &l1d;
178 193
179 eax->full = 0; 194 eax->full = 0;
180 ebx->full = 0; 195 ebx->full = 0;
181 ecx->full = 0; 196 ecx->full = 0;
182 197
183 cpuid(0x80000005, &dummy, &dummy, &l1d.val, &l1i.val); 198 cpuid(0x80000005, &dummy, &dummy, &l1d.val, &l1i.val);
184 cpuid(0x80000006, &dummy, &dummy, &l2.val, &dummy); 199 cpuid(0x80000006, &dummy, &dummy, &l2.val, &l3.val);
185 200
186 if (leaf > 2 || !l1d.val || !l1i.val || !l2.val) 201 switch (leaf) {
187 return; 202 case 1:
188 203 l1 = &l1i;
189 eax->split.is_self_initializing = 1; 204 case 0:
190 eax->split.type = types[leaf]; 205 if (!l1->val)
191 eax->split.level = levels[leaf]; 206 return;
192 eax->split.num_threads_sharing = 0;
193 eax->split.num_cores_on_die = current_cpu_data.x86_max_cores - 1;
194
195 if (leaf <= 1) {
196 union l1_cache *l1 = leaf == 0 ? &l1d : &l1i;
197 assoc = l1->assoc; 207 assoc = l1->assoc;
198 line_size = l1->line_size; 208 line_size = l1->line_size;
199 lines_per_tag = l1->lines_per_tag; 209 lines_per_tag = l1->lines_per_tag;
200 size_in_kb = l1->size_in_kb; 210 size_in_kb = l1->size_in_kb;
201 } else { 211 break;
212 case 2:
213 if (!l2.val)
214 return;
202 assoc = l2.assoc; 215 assoc = l2.assoc;
203 line_size = l2.line_size; 216 line_size = l2.line_size;
204 lines_per_tag = l2.lines_per_tag; 217 lines_per_tag = l2.lines_per_tag;
205 /* cpu_data has errata corrections for K7 applied */ 218 /* cpu_data has errata corrections for K7 applied */
206 size_in_kb = current_cpu_data.x86_cache_size; 219 size_in_kb = current_cpu_data.x86_cache_size;
220 break;
221 case 3:
222 if (!l3.val)
223 return;
224 assoc = l3.assoc;
225 line_size = l3.line_size;
226 lines_per_tag = l3.lines_per_tag;
227 size_in_kb = l3.size_encoded * 512;
228 break;
229 default:
230 return;
207 } 231 }
208 232
233 eax->split.is_self_initializing = 1;
234 eax->split.type = types[leaf];
235 eax->split.level = levels[leaf];
236 if (leaf == 3)
237 eax->split.num_threads_sharing = current_cpu_data.x86_max_cores - 1;
238 else
239 eax->split.num_threads_sharing = 0;
240 eax->split.num_cores_on_die = current_cpu_data.x86_max_cores - 1;
241
242
209 if (assoc == 0xf) 243 if (assoc == 0xf)
210 eax->split.is_fully_associative = 1; 244 eax->split.is_fully_associative = 1;
211 ebx->split.coherency_line_size = line_size - 1; 245 ebx->split.coherency_line_size = line_size - 1;
@@ -239,8 +273,7 @@ static int __cpuinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_le
239 return 0; 273 return 0;
240} 274}
241 275
242/* will only be called once; __init is safe here */ 276static int __cpuinit find_num_cache_leaves(void)
243static int __init find_num_cache_leaves(void)
244{ 277{
245 unsigned int eax, ebx, ecx, edx; 278 unsigned int eax, ebx, ecx, edx;
246 union _cpuid4_leaf_eax cache_eax; 279 union _cpuid4_leaf_eax cache_eax;
@@ -710,7 +743,7 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
710 return retval; 743 return retval;
711} 744}
712 745
713static void __cpuexit cache_remove_dev(struct sys_device * sys_dev) 746static void __cpuinit cache_remove_dev(struct sys_device * sys_dev)
714{ 747{
715 unsigned int cpu = sys_dev->id; 748 unsigned int cpu = sys_dev->id;
716 unsigned long i; 749 unsigned long i;
diff --git a/arch/i386/kernel/cpu/mcheck/non-fatal.c b/arch/i386/kernel/cpu/mcheck/non-fatal.c
index 6b5d3518a1c0..bf39409b3838 100644
--- a/arch/i386/kernel/cpu/mcheck/non-fatal.c
+++ b/arch/i386/kernel/cpu/mcheck/non-fatal.c
@@ -57,7 +57,7 @@ static DECLARE_DELAYED_WORK(mce_work, mce_work_fn);
57static void mce_work_fn(struct work_struct *work) 57static void mce_work_fn(struct work_struct *work)
58{ 58{
59 on_each_cpu(mce_checkregs, NULL, 1, 1); 59 on_each_cpu(mce_checkregs, NULL, 1, 1);
60 schedule_delayed_work(&mce_work, MCE_RATE); 60 schedule_delayed_work(&mce_work, round_jiffies_relative(MCE_RATE));
61} 61}
62 62
63static int __init init_nonfatal_mce_checker(void) 63static int __init init_nonfatal_mce_checker(void)
@@ -82,7 +82,7 @@ static int __init init_nonfatal_mce_checker(void)
82 /* 82 /*
83 * Check for non-fatal errors every MCE_RATE s 83 * Check for non-fatal errors every MCE_RATE s
84 */ 84 */
85 schedule_delayed_work(&mce_work, MCE_RATE); 85 schedule_delayed_work(&mce_work, round_jiffies_relative(MCE_RATE));
86 printk(KERN_INFO "Machine check exception polling timer started.\n"); 86 printk(KERN_INFO "Machine check exception polling timer started.\n");
87 return 0; 87 return 0;
88} 88}
diff --git a/arch/i386/kernel/cpu/mcheck/therm_throt.c b/arch/i386/kernel/cpu/mcheck/therm_throt.c
index 7ba7c3abd3a4..1203dc5ab87a 100644
--- a/arch/i386/kernel/cpu/mcheck/therm_throt.c
+++ b/arch/i386/kernel/cpu/mcheck/therm_throt.c
@@ -134,19 +134,21 @@ static __cpuinit int thermal_throttle_cpu_callback(struct notifier_block *nfb,
134 int err; 134 int err;
135 135
136 sys_dev = get_cpu_sysdev(cpu); 136 sys_dev = get_cpu_sysdev(cpu);
137 mutex_lock(&therm_cpu_lock);
138 switch (action) { 137 switch (action) {
139 case CPU_ONLINE: 138 case CPU_ONLINE:
140 case CPU_ONLINE_FROZEN: 139 case CPU_ONLINE_FROZEN:
140 mutex_lock(&therm_cpu_lock);
141 err = thermal_throttle_add_dev(sys_dev); 141 err = thermal_throttle_add_dev(sys_dev);
142 mutex_unlock(&therm_cpu_lock);
142 WARN_ON(err); 143 WARN_ON(err);
143 break; 144 break;
144 case CPU_DEAD: 145 case CPU_DEAD:
145 case CPU_DEAD_FROZEN: 146 case CPU_DEAD_FROZEN:
147 mutex_lock(&therm_cpu_lock);
146 thermal_throttle_remove_dev(sys_dev); 148 thermal_throttle_remove_dev(sys_dev);
149 mutex_unlock(&therm_cpu_lock);
147 break; 150 break;
148 } 151 }
149 mutex_unlock(&therm_cpu_lock);
150 return NOTIFY_OK; 152 return NOTIFY_OK;
151} 153}
152 154
diff --git a/arch/i386/kernel/cpu/mtrr/cyrix.c b/arch/i386/kernel/cpu/mtrr/cyrix.c
index 9edf5625584f..1001f1e0fe6d 100644
--- a/arch/i386/kernel/cpu/mtrr/cyrix.c
+++ b/arch/i386/kernel/cpu/mtrr/cyrix.c
@@ -233,12 +233,12 @@ typedef struct {
233 mtrr_type type; 233 mtrr_type type;
234} arr_state_t; 234} arr_state_t;
235 235
236static arr_state_t arr_state[8] __devinitdata = { 236static arr_state_t arr_state[8] = {
237 {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, 237 {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL},
238 {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL} 238 {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}
239}; 239};
240 240
241static unsigned char ccr_state[7] __devinitdata = { 0, 0, 0, 0, 0, 0, 0 }; 241static unsigned char ccr_state[7] = { 0, 0, 0, 0, 0, 0, 0 };
242 242
243static void cyrix_set_all(void) 243static void cyrix_set_all(void)
244{ 244{
diff --git a/arch/i386/kernel/cpu/mtrr/generic.c b/arch/i386/kernel/cpu/mtrr/generic.c
index c4ebb5126ef7..56f64e34829f 100644
--- a/arch/i386/kernel/cpu/mtrr/generic.c
+++ b/arch/i386/kernel/cpu/mtrr/generic.c
@@ -42,7 +42,7 @@ static int mtrr_show;
42module_param_named(show, mtrr_show, bool, 0); 42module_param_named(show, mtrr_show, bool, 0);
43 43
44/* Get the MSR pair relating to a var range */ 44/* Get the MSR pair relating to a var range */
45static void __init 45static void
46get_mtrr_var_range(unsigned int index, struct mtrr_var_range *vr) 46get_mtrr_var_range(unsigned int index, struct mtrr_var_range *vr)
47{ 47{
48 rdmsr(MTRRphysBase_MSR(index), vr->base_lo, vr->base_hi); 48 rdmsr(MTRRphysBase_MSR(index), vr->base_lo, vr->base_hi);
@@ -65,10 +65,11 @@ get_fixed_ranges(mtrr_type * frs)
65 65
66void mtrr_save_fixed_ranges(void *info) 66void mtrr_save_fixed_ranges(void *info)
67{ 67{
68 get_fixed_ranges(mtrr_state.fixed_ranges); 68 if (cpu_has_mtrr)
69 get_fixed_ranges(mtrr_state.fixed_ranges);
69} 70}
70 71
71static void __cpuinit print_fixed(unsigned base, unsigned step, const mtrr_type*types) 72static void print_fixed(unsigned base, unsigned step, const mtrr_type*types)
72{ 73{
73 unsigned i; 74 unsigned i;
74 75
@@ -78,7 +79,7 @@ static void __cpuinit print_fixed(unsigned base, unsigned step, const mtrr_type*
78} 79}
79 80
80/* Grab all of the MTRR state for this CPU into *state */ 81/* Grab all of the MTRR state for this CPU into *state */
81void get_mtrr_state(void) 82void __init get_mtrr_state(void)
82{ 83{
83 unsigned int i; 84 unsigned int i;
84 struct mtrr_var_range *vrs; 85 struct mtrr_var_range *vrs;
@@ -469,11 +470,6 @@ int generic_validate_add_page(unsigned long base, unsigned long size, unsigned i
469 } 470 }
470 } 471 }
471 472
472 if (base < 0x100) {
473 printk(KERN_WARNING "mtrr: cannot set region below 1 MiB (0x%lx000,0x%lx000)\n",
474 base, size);
475 return -EINVAL;
476 }
477 /* Check upper bits of base and last are equal and lower bits are 0 473 /* Check upper bits of base and last are equal and lower bits are 0
478 for base and 1 for last */ 474 for base and 1 for last */
479 last = base + size - 1; 475 last = base + size - 1;
diff --git a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c
index 1cf466df330a..c48b6fea5ab4 100644
--- a/arch/i386/kernel/cpu/mtrr/main.c
+++ b/arch/i386/kernel/cpu/mtrr/main.c
@@ -229,6 +229,8 @@ static void set_mtrr(unsigned int reg, unsigned long base,
229 data.smp_size = size; 229 data.smp_size = size;
230 data.smp_type = type; 230 data.smp_type = type;
231 atomic_set(&data.count, num_booting_cpus() - 1); 231 atomic_set(&data.count, num_booting_cpus() - 1);
232 /* make sure data.count is visible before unleashing other CPUs */
233 smp_wmb();
232 atomic_set(&data.gate,0); 234 atomic_set(&data.gate,0);
233 235
234 /* Start the ball rolling on other CPUs */ 236 /* Start the ball rolling on other CPUs */
@@ -242,6 +244,7 @@ static void set_mtrr(unsigned int reg, unsigned long base,
242 244
243 /* ok, reset count and toggle gate */ 245 /* ok, reset count and toggle gate */
244 atomic_set(&data.count, num_booting_cpus() - 1); 246 atomic_set(&data.count, num_booting_cpus() - 1);
247 smp_wmb();
245 atomic_set(&data.gate,1); 248 atomic_set(&data.gate,1);
246 249
247 /* do our MTRR business */ 250 /* do our MTRR business */
@@ -260,6 +263,7 @@ static void set_mtrr(unsigned int reg, unsigned long base,
260 cpu_relax(); 263 cpu_relax();
261 264
262 atomic_set(&data.count, num_booting_cpus() - 1); 265 atomic_set(&data.count, num_booting_cpus() - 1);
266 smp_wmb();
263 atomic_set(&data.gate,0); 267 atomic_set(&data.gate,0);
264 268
265 /* 269 /*
@@ -639,7 +643,7 @@ static struct sysdev_driver mtrr_sysdev_driver = {
639 * initialized (i.e. before smp_init()). 643 * initialized (i.e. before smp_init()).
640 * 644 *
641 */ 645 */
642void mtrr_bp_init(void) 646void __init mtrr_bp_init(void)
643{ 647{
644 init_ifs(); 648 init_ifs();
645 649
@@ -734,10 +738,13 @@ void mtrr_ap_init(void)
734 */ 738 */
735void mtrr_save_state(void) 739void mtrr_save_state(void)
736{ 740{
737 if (smp_processor_id() == 0) 741 int cpu = get_cpu();
742
743 if (cpu == 0)
738 mtrr_save_fixed_ranges(NULL); 744 mtrr_save_fixed_ranges(NULL);
739 else 745 else
740 smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1, 1); 746 smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1, 1);
747 put_cpu();
741} 748}
742 749
743static int __init mtrr_init_finialize(void) 750static int __init mtrr_init_finialize(void)
diff --git a/arch/i386/kernel/cpu/perfctr-watchdog.c b/arch/i386/kernel/cpu/perfctr-watchdog.c
index 2b04c8f1db62..30b5e48aa76b 100644
--- a/arch/i386/kernel/cpu/perfctr-watchdog.c
+++ b/arch/i386/kernel/cpu/perfctr-watchdog.c
@@ -28,7 +28,7 @@ struct wd_ops {
28 void (*unreserve)(void); 28 void (*unreserve)(void);
29 int (*setup)(unsigned nmi_hz); 29 int (*setup)(unsigned nmi_hz);
30 void (*rearm)(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz); 30 void (*rearm)(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz);
31 void (*stop)(void *); 31 void (*stop)(void);
32 unsigned perfctr; 32 unsigned perfctr;
33 unsigned evntsel; 33 unsigned evntsel;
34 u64 checkbit; 34 u64 checkbit;
@@ -55,14 +55,45 @@ static DEFINE_PER_CPU(struct nmi_watchdog_ctlblk, nmi_watchdog_ctlblk);
55/* converts an msr to an appropriate reservation bit */ 55/* converts an msr to an appropriate reservation bit */
56static inline unsigned int nmi_perfctr_msr_to_bit(unsigned int msr) 56static inline unsigned int nmi_perfctr_msr_to_bit(unsigned int msr)
57{ 57{
58 return wd_ops ? msr - wd_ops->perfctr : 0; 58 /* returns the bit offset of the performance counter register */
59 switch (boot_cpu_data.x86_vendor) {
60 case X86_VENDOR_AMD:
61 return (msr - MSR_K7_PERFCTR0);
62 case X86_VENDOR_INTEL:
63 if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON))
64 return (msr - MSR_ARCH_PERFMON_PERFCTR0);
65
66 switch (boot_cpu_data.x86) {
67 case 6:
68 return (msr - MSR_P6_PERFCTR0);
69 case 15:
70 return (msr - MSR_P4_BPU_PERFCTR0);
71 }
72 }
73 return 0;
59} 74}
60 75
61/* converts an msr to an appropriate reservation bit */ 76/* converts an msr to an appropriate reservation bit */
62/* returns the bit offset of the event selection register */ 77/* returns the bit offset of the event selection register */
63static inline unsigned int nmi_evntsel_msr_to_bit(unsigned int msr) 78static inline unsigned int nmi_evntsel_msr_to_bit(unsigned int msr)
64{ 79{
65 return wd_ops ? msr - wd_ops->evntsel : 0; 80 /* returns the bit offset of the event selection register */
81 switch (boot_cpu_data.x86_vendor) {
82 case X86_VENDOR_AMD:
83 return (msr - MSR_K7_EVNTSEL0);
84 case X86_VENDOR_INTEL:
85 if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON))
86 return (msr - MSR_ARCH_PERFMON_EVENTSEL0);
87
88 switch (boot_cpu_data.x86) {
89 case 6:
90 return (msr - MSR_P6_EVNTSEL0);
91 case 15:
92 return (msr - MSR_P4_BSU_ESCR0);
93 }
94 }
95 return 0;
96
66} 97}
67 98
68/* checks for a bit availability (hack for oprofile) */ 99/* checks for a bit availability (hack for oprofile) */
@@ -142,7 +173,7 @@ void disable_lapic_nmi_watchdog(void)
142 if (atomic_read(&nmi_active) <= 0) 173 if (atomic_read(&nmi_active) <= 0)
143 return; 174 return;
144 175
145 on_each_cpu(wd_ops->stop, NULL, 0, 1); 176 on_each_cpu(stop_apic_nmi_watchdog, NULL, 0, 1);
146 wd_ops->unreserve(); 177 wd_ops->unreserve();
147 178
148 BUG_ON(atomic_read(&nmi_active) != 0); 179 BUG_ON(atomic_read(&nmi_active) != 0);
@@ -255,7 +286,7 @@ static int setup_k7_watchdog(unsigned nmi_hz)
255 return 1; 286 return 1;
256} 287}
257 288
258static void single_msr_stop_watchdog(void *arg) 289static void single_msr_stop_watchdog(void)
259{ 290{
260 struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); 291 struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk);
261 292
@@ -276,8 +307,8 @@ static int single_msr_reserve(void)
276 307
277static void single_msr_unreserve(void) 308static void single_msr_unreserve(void)
278{ 309{
279 release_evntsel_nmi(wd_ops->perfctr); 310 release_evntsel_nmi(wd_ops->evntsel);
280 release_perfctr_nmi(wd_ops->evntsel); 311 release_perfctr_nmi(wd_ops->perfctr);
281} 312}
282 313
283static void single_msr_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz) 314static void single_msr_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz)
@@ -442,7 +473,7 @@ static int setup_p4_watchdog(unsigned nmi_hz)
442 return 1; 473 return 1;
443} 474}
444 475
445static void stop_p4_watchdog(void *arg) 476static void stop_p4_watchdog(void)
446{ 477{
447 struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); 478 struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk);
448 wrmsr(wd->cccr_msr, 0, 0); 479 wrmsr(wd->cccr_msr, 0, 0);
@@ -475,10 +506,10 @@ static void p4_unreserve(void)
475{ 506{
476#ifdef CONFIG_SMP 507#ifdef CONFIG_SMP
477 if (smp_num_siblings > 1) 508 if (smp_num_siblings > 1)
478 release_evntsel_nmi(MSR_P4_IQ_PERFCTR1); 509 release_perfctr_nmi(MSR_P4_IQ_PERFCTR1);
479#endif 510#endif
480 release_evntsel_nmi(MSR_P4_IQ_PERFCTR0); 511 release_evntsel_nmi(MSR_P4_CRU_ESCR0);
481 release_perfctr_nmi(MSR_P4_CRU_ESCR0); 512 release_perfctr_nmi(MSR_P4_IQ_PERFCTR0);
482} 513}
483 514
484static void p4_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz) 515static void p4_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz)
@@ -568,8 +599,8 @@ static struct wd_ops intel_arch_wd_ops = {
568 .setup = setup_intel_arch_watchdog, 599 .setup = setup_intel_arch_watchdog,
569 .rearm = p6_rearm, 600 .rearm = p6_rearm,
570 .stop = single_msr_stop_watchdog, 601 .stop = single_msr_stop_watchdog,
571 .perfctr = MSR_ARCH_PERFMON_PERFCTR0, 602 .perfctr = MSR_ARCH_PERFMON_PERFCTR1,
572 .evntsel = MSR_ARCH_PERFMON_EVENTSEL0, 603 .evntsel = MSR_ARCH_PERFMON_EVENTSEL1,
573}; 604};
574 605
575static void probe_nmi_watchdog(void) 606static void probe_nmi_watchdog(void)
@@ -614,6 +645,12 @@ int lapic_watchdog_init(unsigned nmi_hz)
614 probe_nmi_watchdog(); 645 probe_nmi_watchdog();
615 if (!wd_ops) 646 if (!wd_ops)
616 return -1; 647 return -1;
648
649 if (!wd_ops->reserve()) {
650 printk(KERN_ERR
651 "NMI watchdog: cannot reserve perfctrs\n");
652 return -1;
653 }
617 } 654 }
618 655
619 if (!(wd_ops->setup(nmi_hz))) { 656 if (!(wd_ops->setup(nmi_hz))) {
@@ -628,7 +665,7 @@ int lapic_watchdog_init(unsigned nmi_hz)
628void lapic_watchdog_stop(void) 665void lapic_watchdog_stop(void)
629{ 666{
630 if (wd_ops) 667 if (wd_ops)
631 wd_ops->stop(NULL); 668 wd_ops->stop();
632} 669}
633 670
634unsigned lapic_adjust_nmi_hz(unsigned hz) 671unsigned lapic_adjust_nmi_hz(unsigned hz)
diff --git a/arch/i386/kernel/cpu/proc.c b/arch/i386/kernel/cpu/proc.c
index 89d91e6cc972..1e31b6caffb1 100644
--- a/arch/i386/kernel/cpu/proc.c
+++ b/arch/i386/kernel/cpu/proc.c
@@ -29,7 +29,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
29 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 29 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
30 NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL, 30 NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL,
31 NULL, NULL, NULL, "mp", "nx", NULL, "mmxext", NULL, 31 NULL, NULL, NULL, "mp", "nx", NULL, "mmxext", NULL,
32 NULL, "fxsr_opt", "pdpe1gb", "rdtscp", NULL, "lm", "3dnowext", "3dnow", 32 NULL, "fxsr_opt", "pdpe1gb", "rdtscp", NULL, "lm",
33 "3dnowext", "3dnow",
33 34
34 /* Transmeta-defined */ 35 /* Transmeta-defined */
35 "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL, 36 "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL,
@@ -40,8 +41,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
40 /* Other (Linux-defined) */ 41 /* Other (Linux-defined) */
41 "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", 42 "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr",
42 NULL, NULL, NULL, NULL, 43 NULL, NULL, NULL, NULL,
43 "constant_tsc", "up", NULL, NULL, NULL, NULL, NULL, NULL, 44 "constant_tsc", "up", NULL, "arch_perfmon",
44 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 45 "pebs", "bts", NULL, "sync_rdtsc",
46 "rep_good", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
45 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 47 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
46 48
47 /* Intel-defined (#2) */ 49 /* Intel-defined (#2) */
@@ -57,9 +59,16 @@ static int show_cpuinfo(struct seq_file *m, void *v)
57 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 59 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
58 60
59 /* AMD-defined (#2) */ 61 /* AMD-defined (#2) */
60 "lahf_lm", "cmp_legacy", "svm", "extapic", "cr8legacy", "abm", 62 "lahf_lm", "cmp_legacy", "svm", "extapic", "cr8_legacy",
61 "sse4a", "misalignsse", 63 "altmovcr8", "abm", "sse4a",
62 "3dnowprefetch", "osvw", "ibs", NULL, NULL, NULL, NULL, NULL, 64 "misalignsse", "3dnowprefetch",
65 "osvw", "ibs", NULL, NULL, NULL, NULL,
66 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
67 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
68
69 /* Auxiliary (Linux-defined) */
70 "ida", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
71 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
63 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 72 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
64 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 73 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
65 }; 74 };
diff --git a/arch/i386/kernel/cpu/rise.c b/arch/i386/kernel/cpu/rise.c
deleted file mode 100644
index 50076f22e90f..000000000000
--- a/arch/i386/kernel/cpu/rise.c
+++ /dev/null
@@ -1,52 +0,0 @@
1#include <linux/kernel.h>
2#include <linux/init.h>
3#include <linux/bitops.h>
4#include <asm/processor.h>
5
6#include "cpu.h"
7
8static void __cpuinit init_rise(struct cpuinfo_x86 *c)
9{
10 printk("CPU: Rise iDragon");
11 if (c->x86_model > 2)
12 printk(" II");
13 printk("\n");
14
15 /* Unhide possibly hidden capability flags
16 The mp6 iDragon family don't have MSRs.
17 We switch on extra features with this cpuid weirdness: */
18 __asm__ (
19 "movl $0x6363452a, %%eax\n\t"
20 "movl $0x3231206c, %%ecx\n\t"
21 "movl $0x2a32313a, %%edx\n\t"
22 "cpuid\n\t"
23 "movl $0x63634523, %%eax\n\t"
24 "movl $0x32315f6c, %%ecx\n\t"
25 "movl $0x2333313a, %%edx\n\t"
26 "cpuid\n\t" : : : "eax", "ebx", "ecx", "edx"
27 );
28 set_bit(X86_FEATURE_CX8, c->x86_capability);
29}
30
31static struct cpu_dev rise_cpu_dev __cpuinitdata = {
32 .c_vendor = "Rise",
33 .c_ident = { "RiseRiseRise" },
34 .c_models = {
35 { .vendor = X86_VENDOR_RISE, .family = 5, .model_names =
36 {
37 [0] = "iDragon",
38 [2] = "iDragon",
39 [8] = "iDragon II",
40 [9] = "iDragon II"
41 }
42 },
43 },
44 .c_init = init_rise,
45};
46
47int __init rise_init_cpu(void)
48{
49 cpu_devs[X86_VENDOR_RISE] = &rise_cpu_dev;
50 return 0;
51}
52
diff --git a/arch/i386/kernel/e820.c b/arch/i386/kernel/e820.c
index 9645bb51f76a..e60cddbc4cfb 100644
--- a/arch/i386/kernel/e820.c
+++ b/arch/i386/kernel/e820.c
@@ -10,6 +10,7 @@
10#include <linux/efi.h> 10#include <linux/efi.h>
11#include <linux/pfn.h> 11#include <linux/pfn.h>
12#include <linux/uaccess.h> 12#include <linux/uaccess.h>
13#include <linux/suspend.h>
13 14
14#include <asm/pgtable.h> 15#include <asm/pgtable.h>
15#include <asm/page.h> 16#include <asm/page.h>
@@ -320,6 +321,37 @@ static int __init request_standard_resources(void)
320 321
321subsys_initcall(request_standard_resources); 322subsys_initcall(request_standard_resources);
322 323
324#if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND)
325/**
326 * e820_mark_nosave_regions - Find the ranges of physical addresses that do not
327 * correspond to e820 RAM areas and mark the corresponding pages as nosave for
328 * hibernation.
329 *
330 * This function requires the e820 map to be sorted and without any
331 * overlapping entries and assumes the first e820 area to be RAM.
332 */
333void __init e820_mark_nosave_regions(void)
334{
335 int i;
336 unsigned long pfn;
337
338 pfn = PFN_DOWN(e820.map[0].addr + e820.map[0].size);
339 for (i = 1; i < e820.nr_map; i++) {
340 struct e820entry *ei = &e820.map[i];
341
342 if (pfn < PFN_UP(ei->addr))
343 register_nosave_region(pfn, PFN_UP(ei->addr));
344
345 pfn = PFN_DOWN(ei->addr + ei->size);
346 if (ei->type != E820_RAM)
347 register_nosave_region(PFN_UP(ei->addr), pfn);
348
349 if (pfn >= max_low_pfn)
350 break;
351 }
352}
353#endif
354
323void __init add_memory_region(unsigned long long start, 355void __init add_memory_region(unsigned long long start,
324 unsigned long long size, int type) 356 unsigned long long size, int type)
325{ 357{
@@ -734,7 +766,7 @@ void __init print_memory_map(char *who)
734 case E820_NVS: 766 case E820_NVS:
735 printk("(ACPI NVS)\n"); 767 printk("(ACPI NVS)\n");
736 break; 768 break;
737 default: printk("type %lu\n", e820.map[i].type); 769 default: printk("type %u\n", e820.map[i].type);
738 break; 770 break;
739 } 771 }
740 } 772 }
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c
index a1808022ea19..2452c6fbe992 100644
--- a/arch/i386/kernel/efi.c
+++ b/arch/i386/kernel/efi.c
@@ -278,7 +278,7 @@ void efi_memmap_walk(efi_freemem_callback_t callback, void *arg)
278 struct range { 278 struct range {
279 unsigned long start; 279 unsigned long start;
280 unsigned long end; 280 unsigned long end;
281 } prev, curr; 281 } uninitialized_var(prev), curr;
282 efi_memory_desc_t *md; 282 efi_memory_desc_t *md;
283 unsigned long start, end; 283 unsigned long start, end;
284 void *p; 284 void *p;
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index b1f16ee65e4d..a714d6b43506 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -367,10 +367,6 @@ ENTRY(system_call)
367 CFI_ADJUST_CFA_OFFSET 4 367 CFI_ADJUST_CFA_OFFSET 4
368 SAVE_ALL 368 SAVE_ALL
369 GET_THREAD_INFO(%ebp) 369 GET_THREAD_INFO(%ebp)
370 testl $TF_MASK,PT_EFLAGS(%esp)
371 jz no_singlestep
372 orl $_TIF_SINGLESTEP,TI_flags(%ebp)
373no_singlestep:
374 # system call tracing in operation / emulation 370 # system call tracing in operation / emulation
375 /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ 371 /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
376 testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) 372 testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
@@ -385,6 +381,10 @@ syscall_exit:
385 # setting need_resched or sigpending 381 # setting need_resched or sigpending
386 # between sampling and the iret 382 # between sampling and the iret
387 TRACE_IRQS_OFF 383 TRACE_IRQS_OFF
384 testl $TF_MASK,PT_EFLAGS(%esp) # If tracing set singlestep flag on exit
385 jz no_singlestep
386 orl $_TIF_SINGLESTEP,TI_flags(%ebp)
387no_singlestep:
388 movl TI_flags(%ebp), %ecx 388 movl TI_flags(%ebp), %ecx
389 testw $_TIF_ALLWORK_MASK, %cx # current->work 389 testw $_TIF_ALLWORK_MASK, %cx # current->work
390 jne syscall_exit_work 390 jne syscall_exit_work
@@ -409,8 +409,6 @@ restore_nocheck_notrace:
4091: INTERRUPT_RETURN 4091: INTERRUPT_RETURN
410.section .fixup,"ax" 410.section .fixup,"ax"
411iret_exc: 411iret_exc:
412 TRACE_IRQS_ON
413 ENABLE_INTERRUPTS(CLBR_NONE)
414 pushl $0 # no error code 412 pushl $0 # no error code
415 pushl $do_iret_error 413 pushl $do_iret_error
416 jmp error_code 414 jmp error_code
@@ -1023,6 +1021,91 @@ ENTRY(kernel_thread_helper)
1023 CFI_ENDPROC 1021 CFI_ENDPROC
1024ENDPROC(kernel_thread_helper) 1022ENDPROC(kernel_thread_helper)
1025 1023
1024#ifdef CONFIG_XEN
1025ENTRY(xen_hypervisor_callback)
1026 CFI_STARTPROC
1027 pushl $0
1028 CFI_ADJUST_CFA_OFFSET 4
1029 SAVE_ALL
1030 TRACE_IRQS_OFF
1031
1032 /* Check to see if we got the event in the critical
1033 region in xen_iret_direct, after we've reenabled
1034 events and checked for pending events. This simulates
1035 iret instruction's behaviour where it delivers a
1036 pending interrupt when enabling interrupts. */
1037 movl PT_EIP(%esp),%eax
1038 cmpl $xen_iret_start_crit,%eax
1039 jb 1f
1040 cmpl $xen_iret_end_crit,%eax
1041 jae 1f
1042
1043 call xen_iret_crit_fixup
1044
10451: mov %esp, %eax
1046 call xen_evtchn_do_upcall
1047 jmp ret_from_intr
1048 CFI_ENDPROC
1049ENDPROC(xen_hypervisor_callback)
1050
1051# Hypervisor uses this for application faults while it executes.
1052# We get here for two reasons:
1053# 1. Fault while reloading DS, ES, FS or GS
1054# 2. Fault while executing IRET
1055# Category 1 we fix up by reattempting the load, and zeroing the segment
1056# register if the load fails.
1057# Category 2 we fix up by jumping to do_iret_error. We cannot use the
1058# normal Linux return path in this case because if we use the IRET hypercall
1059# to pop the stack frame we end up in an infinite loop of failsafe callbacks.
1060# We distinguish between categories by maintaining a status value in EAX.
1061ENTRY(xen_failsafe_callback)
1062 CFI_STARTPROC
1063 pushl %eax
1064 CFI_ADJUST_CFA_OFFSET 4
1065 movl $1,%eax
10661: mov 4(%esp),%ds
10672: mov 8(%esp),%es
10683: mov 12(%esp),%fs
10694: mov 16(%esp),%gs
1070 testl %eax,%eax
1071 popl %eax
1072 CFI_ADJUST_CFA_OFFSET -4
1073 lea 16(%esp),%esp
1074 CFI_ADJUST_CFA_OFFSET -16
1075 jz 5f
1076 addl $16,%esp
1077 jmp iret_exc # EAX != 0 => Category 2 (Bad IRET)
10785: pushl $0 # EAX == 0 => Category 1 (Bad segment)
1079 CFI_ADJUST_CFA_OFFSET 4
1080 SAVE_ALL
1081 jmp ret_from_exception
1082 CFI_ENDPROC
1083
1084.section .fixup,"ax"
10856: xorl %eax,%eax
1086 movl %eax,4(%esp)
1087 jmp 1b
10887: xorl %eax,%eax
1089 movl %eax,8(%esp)
1090 jmp 2b
10918: xorl %eax,%eax
1092 movl %eax,12(%esp)
1093 jmp 3b
10949: xorl %eax,%eax
1095 movl %eax,16(%esp)
1096 jmp 4b
1097.previous
1098.section __ex_table,"a"
1099 .align 4
1100 .long 1b,6b
1101 .long 2b,7b
1102 .long 3b,8b
1103 .long 4b,9b
1104.previous
1105ENDPROC(xen_failsafe_callback)
1106
1107#endif /* CONFIG_XEN */
1108
1026.section .rodata,"a" 1109.section .rodata,"a"
1027#include "syscall_table.S" 1110#include "syscall_table.S"
1028 1111
diff --git a/arch/i386/kernel/geode.c b/arch/i386/kernel/geode.c
new file mode 100644
index 000000000000..41e8aec4c61d
--- /dev/null
+++ b/arch/i386/kernel/geode.c
@@ -0,0 +1,155 @@
1/*
2 * AMD Geode southbridge support code
3 * Copyright (C) 2006, Advanced Micro Devices, Inc.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public License
7 * as published by the Free Software Foundation.
8 */
9
10#include <linux/kernel.h>
11#include <linux/module.h>
12#include <linux/ioport.h>
13#include <linux/io.h>
14#include <asm/msr.h>
15#include <asm/geode.h>
16
17static struct {
18 char *name;
19 u32 msr;
20 int size;
21 u32 base;
22} lbars[] = {
23 { "geode-pms", MSR_LBAR_PMS, LBAR_PMS_SIZE, 0 },
24 { "geode-acpi", MSR_LBAR_ACPI, LBAR_ACPI_SIZE, 0 },
25 { "geode-gpio", MSR_LBAR_GPIO, LBAR_GPIO_SIZE, 0 },
26 { "geode-mfgpt", MSR_LBAR_MFGPT, LBAR_MFGPT_SIZE, 0 }
27};
28
29static void __init init_lbars(void)
30{
31 u32 lo, hi;
32 int i;
33
34 for (i = 0; i < ARRAY_SIZE(lbars); i++) {
35 rdmsr(lbars[i].msr, lo, hi);
36 if (hi & 0x01)
37 lbars[i].base = lo & 0x0000ffff;
38
39 if (lbars[i].base == 0)
40 printk(KERN_ERR "geode: Couldn't initialize '%s'\n",
41 lbars[i].name);
42 }
43}
44
45int geode_get_dev_base(unsigned int dev)
46{
47 BUG_ON(dev >= ARRAY_SIZE(lbars));
48 return lbars[dev].base;
49}
50EXPORT_SYMBOL_GPL(geode_get_dev_base);
51
52/* === GPIO API === */
53
54void geode_gpio_set(unsigned int gpio, unsigned int reg)
55{
56 u32 base = geode_get_dev_base(GEODE_DEV_GPIO);
57
58 if (!base)
59 return;
60
61 if (gpio < 16)
62 outl(1 << gpio, base + reg);
63 else
64 outl(1 << (gpio - 16), base + 0x80 + reg);
65}
66EXPORT_SYMBOL_GPL(geode_gpio_set);
67
68void geode_gpio_clear(unsigned int gpio, unsigned int reg)
69{
70 u32 base = geode_get_dev_base(GEODE_DEV_GPIO);
71
72 if (!base)
73 return;
74
75 if (gpio < 16)
76 outl(1 << (gpio + 16), base + reg);
77 else
78 outl(1 << gpio, base + 0x80 + reg);
79}
80EXPORT_SYMBOL_GPL(geode_gpio_clear);
81
82int geode_gpio_isset(unsigned int gpio, unsigned int reg)
83{
84 u32 base = geode_get_dev_base(GEODE_DEV_GPIO);
85
86 if (!base)
87 return 0;
88
89 if (gpio < 16)
90 return (inl(base + reg) & (1 << gpio)) ? 1 : 0;
91 else
92 return (inl(base + 0x80 + reg) & (1 << (gpio - 16))) ? 1 : 0;
93}
94EXPORT_SYMBOL_GPL(geode_gpio_isset);
95
96void geode_gpio_set_irq(unsigned int group, unsigned int irq)
97{
98 u32 lo, hi;
99
100 if (group > 7 || irq > 15)
101 return;
102
103 rdmsr(MSR_PIC_ZSEL_HIGH, lo, hi);
104
105 lo &= ~(0xF << (group * 4));
106 lo |= (irq & 0xF) << (group * 4);
107
108 wrmsr(MSR_PIC_ZSEL_HIGH, lo, hi);
109}
110EXPORT_SYMBOL_GPL(geode_gpio_set_irq);
111
112void geode_gpio_setup_event(unsigned int gpio, int pair, int pme)
113{
114 u32 base = geode_get_dev_base(GEODE_DEV_GPIO);
115 u32 offset, shift, val;
116
117 if (gpio >= 24)
118 offset = GPIO_MAP_W;
119 else if (gpio >= 16)
120 offset = GPIO_MAP_Z;
121 else if (gpio >= 8)
122 offset = GPIO_MAP_Y;
123 else
124 offset = GPIO_MAP_X;
125
126 shift = (gpio % 8) * 4;
127
128 val = inl(base + offset);
129
130 /* Clear whatever was there before */
131 val &= ~(0xF << shift);
132
133 /* And set the new value */
134
135 val |= ((pair & 7) << shift);
136
137 /* Set the PME bit if this is a PME event */
138
139 if (pme)
140 val |= (1 << (shift + 3));
141
142 outl(val, base + offset);
143}
144EXPORT_SYMBOL_GPL(geode_gpio_setup_event);
145
146static int __init geode_southbridge_init(void)
147{
148 if (!is_geode())
149 return -ENODEV;
150
151 init_lbars();
152 return 0;
153}
154
155postcore_initcall(geode_southbridge_init);
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S
index f74dfc419b56..7c52b222207e 100644
--- a/arch/i386/kernel/head.S
+++ b/arch/i386/kernel/head.S
@@ -168,6 +168,12 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
168.section .init.text,"ax",@progbits 168.section .init.text,"ax",@progbits
169#endif 169#endif
170 170
171 /* Do an early initialization of the fixmap area */
172 movl $(swapper_pg_dir - __PAGE_OFFSET), %edx
173 movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax
174 addl $0x007, %eax /* 0x007 = PRESENT+RW+USER */
175 movl %eax, 4092(%edx)
176
171#ifdef CONFIG_SMP 177#ifdef CONFIG_SMP
172ENTRY(startup_32_smp) 178ENTRY(startup_32_smp)
173 cld 179 cld
@@ -504,9 +510,12 @@ ENTRY(_stext)
504/* 510/*
505 * BSS section 511 * BSS section
506 */ 512 */
507.section ".bss.page_aligned","w" 513.section ".bss.page_aligned","wa"
514 .align PAGE_SIZE_asm
508ENTRY(swapper_pg_dir) 515ENTRY(swapper_pg_dir)
509 .fill 1024,4,0 516 .fill 1024,4,0
517ENTRY(swapper_pg_pmd)
518 .fill 1024,4,0
510ENTRY(empty_zero_page) 519ENTRY(empty_zero_page)
511 .fill 4096,1,0 520 .fill 4096,1,0
512 521
@@ -530,6 +539,8 @@ fault_msg:
530 .ascii "Int %d: CR2 %p err %p EIP %p CS %p flags %p\n" 539 .ascii "Int %d: CR2 %p err %p EIP %p CS %p flags %p\n"
531 .asciz "Stack: %p %p %p %p %p %p %p %p\n" 540 .asciz "Stack: %p %p %p %p %p %p %p %p\n"
532 541
542#include "../xen/xen-head.S"
543
533/* 544/*
534 * The IDT and GDT 'descriptors' are a strange 48-bit object 545 * The IDT and GDT 'descriptors' are a strange 48-bit object
535 * only used by the lidt and lgdt instructions. They are not 546 * only used by the lidt and lgdt instructions. They are not
diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c
index 17d73459fc5f..533d4932bc79 100644
--- a/arch/i386/kernel/hpet.c
+++ b/arch/i386/kernel/hpet.c
@@ -5,6 +5,7 @@
5#include <linux/init.h> 5#include <linux/init.h>
6#include <linux/sysdev.h> 6#include <linux/sysdev.h>
7#include <linux/pm.h> 7#include <linux/pm.h>
8#include <linux/delay.h>
8 9
9#include <asm/hpet.h> 10#include <asm/hpet.h>
10#include <asm/io.h> 11#include <asm/io.h>
@@ -187,6 +188,10 @@ static void hpet_set_mode(enum clock_event_mode mode,
187 cfg &= ~HPET_TN_ENABLE; 188 cfg &= ~HPET_TN_ENABLE;
188 hpet_writel(cfg, HPET_T0_CFG); 189 hpet_writel(cfg, HPET_T0_CFG);
189 break; 190 break;
191
192 case CLOCK_EVT_MODE_RESUME:
193 hpet_enable_int();
194 break;
190 } 195 }
191} 196}
192 197
@@ -217,6 +222,7 @@ static struct clocksource clocksource_hpet = {
217 .mask = HPET_MASK, 222 .mask = HPET_MASK,
218 .shift = HPET_SHIFT, 223 .shift = HPET_SHIFT,
219 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 224 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
225 .resume = hpet_start_counter,
220}; 226};
221 227
222/* 228/*
@@ -226,7 +232,8 @@ int __init hpet_enable(void)
226{ 232{
227 unsigned long id; 233 unsigned long id;
228 uint64_t hpet_freq; 234 uint64_t hpet_freq;
229 u64 tmp; 235 u64 tmp, start, now;
236 cycle_t t1;
230 237
231 if (!is_hpet_capable()) 238 if (!is_hpet_capable())
232 return 0; 239 return 0;
@@ -273,6 +280,27 @@ int __init hpet_enable(void)
273 /* Start the counter */ 280 /* Start the counter */
274 hpet_start_counter(); 281 hpet_start_counter();
275 282
283 /* Verify whether hpet counter works */
284 t1 = read_hpet();
285 rdtscll(start);
286
287 /*
288 * We don't know the TSC frequency yet, but waiting for
289 * 200000 TSC cycles is safe:
290 * 4 GHz == 50us
291 * 1 GHz == 200us
292 */
293 do {
294 rep_nop();
295 rdtscll(now);
296 } while ((now - start) < 200000UL);
297
298 if (t1 == read_hpet()) {
299 printk(KERN_WARNING
300 "HPET counter not counting. HPET disabled\n");
301 goto out_nohpet;
302 }
303
276 /* Initialize and register HPET clocksource 304 /* Initialize and register HPET clocksource
277 * 305 *
278 * hpet period is in femto seconds per cycle 306 * hpet period is in femto seconds per cycle
@@ -291,7 +319,6 @@ int __init hpet_enable(void)
291 319
292 clocksource_register(&clocksource_hpet); 320 clocksource_register(&clocksource_hpet);
293 321
294
295 if (id & HPET_ID_LEGSUP) { 322 if (id & HPET_ID_LEGSUP) {
296 hpet_enable_int(); 323 hpet_enable_int();
297 hpet_reserve_platform_timers(id); 324 hpet_reserve_platform_timers(id);
@@ -299,7 +326,7 @@ int __init hpet_enable(void)
299 * Start hpet with the boot cpu mask and make it 326 * Start hpet with the boot cpu mask and make it
300 * global after the IO_APIC has been initialized. 327 * global after the IO_APIC has been initialized.
301 */ 328 */
302 hpet_clockevent.cpumask =cpumask_of_cpu(0); 329 hpet_clockevent.cpumask = cpumask_of_cpu(smp_processor_id());
303 clockevents_register_device(&hpet_clockevent); 330 clockevents_register_device(&hpet_clockevent);
304 global_clock_event = &hpet_clockevent; 331 global_clock_event = &hpet_clockevent;
305 return 1; 332 return 1;
@@ -524,68 +551,3 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
524 return IRQ_HANDLED; 551 return IRQ_HANDLED;
525} 552}
526#endif 553#endif
527
528
529/*
530 * Suspend/resume part
531 */
532
533#ifdef CONFIG_PM
534
535static int hpet_suspend(struct sys_device *sys_device, pm_message_t state)
536{
537 unsigned long cfg = hpet_readl(HPET_CFG);
538
539 cfg &= ~(HPET_CFG_ENABLE|HPET_CFG_LEGACY);
540 hpet_writel(cfg, HPET_CFG);
541
542 return 0;
543}
544
545static int hpet_resume(struct sys_device *sys_device)
546{
547 unsigned int id;
548
549 hpet_start_counter();
550
551 id = hpet_readl(HPET_ID);
552
553 if (id & HPET_ID_LEGSUP)
554 hpet_enable_int();
555
556 return 0;
557}
558
559static struct sysdev_class hpet_class = {
560 set_kset_name("hpet"),
561 .suspend = hpet_suspend,
562 .resume = hpet_resume,
563};
564
565static struct sys_device hpet_device = {
566 .id = 0,
567 .cls = &hpet_class,
568};
569
570
571static __init int hpet_register_sysfs(void)
572{
573 int err;
574
575 if (!is_hpet_capable())
576 return 0;
577
578 err = sysdev_class_register(&hpet_class);
579
580 if (!err) {
581 err = sysdev_register(&hpet_device);
582 if (err)
583 sysdev_class_unregister(&hpet_class);
584 }
585
586 return err;
587}
588
589device_initcall(hpet_register_sysfs);
590
591#endif
diff --git a/arch/i386/kernel/i8253.c b/arch/i386/kernel/i8253.c
index f8a3c4054c70..6d839f2f1b1a 100644
--- a/arch/i386/kernel/i8253.c
+++ b/arch/i386/kernel/i8253.c
@@ -3,18 +3,17 @@
3 * 3 *
4 */ 4 */
5#include <linux/clockchips.h> 5#include <linux/clockchips.h>
6#include <linux/spinlock.h> 6#include <linux/init.h>
7#include <linux/interrupt.h>
7#include <linux/jiffies.h> 8#include <linux/jiffies.h>
8#include <linux/sysdev.h>
9#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/init.h> 10#include <linux/spinlock.h>
11 11
12#include <asm/smp.h> 12#include <asm/smp.h>
13#include <asm/delay.h> 13#include <asm/delay.h>
14#include <asm/i8253.h> 14#include <asm/i8253.h>
15#include <asm/io.h> 15#include <asm/io.h>
16 16#include <asm/timer.h>
17#include "io_ports.h"
18 17
19DEFINE_SPINLOCK(i8253_lock); 18DEFINE_SPINLOCK(i8253_lock);
20EXPORT_SYMBOL(i8253_lock); 19EXPORT_SYMBOL(i8253_lock);
@@ -41,26 +40,27 @@ static void init_pit_timer(enum clock_event_mode mode,
41 case CLOCK_EVT_MODE_PERIODIC: 40 case CLOCK_EVT_MODE_PERIODIC:
42 /* binary, mode 2, LSB/MSB, ch 0 */ 41 /* binary, mode 2, LSB/MSB, ch 0 */
43 outb_p(0x34, PIT_MODE); 42 outb_p(0x34, PIT_MODE);
44 udelay(10);
45 outb_p(LATCH & 0xff , PIT_CH0); /* LSB */ 43 outb_p(LATCH & 0xff , PIT_CH0); /* LSB */
46 udelay(10);
47 outb(LATCH >> 8 , PIT_CH0); /* MSB */ 44 outb(LATCH >> 8 , PIT_CH0); /* MSB */
48 break; 45 break;
49 46
50 /*
51 * Avoid unnecessary state transitions, as it confuses
52 * Geode / Cyrix based boxen.
53 */
54 case CLOCK_EVT_MODE_SHUTDOWN: 47 case CLOCK_EVT_MODE_SHUTDOWN:
55 if (evt->mode == CLOCK_EVT_MODE_UNUSED)
56 break;
57 case CLOCK_EVT_MODE_UNUSED: 48 case CLOCK_EVT_MODE_UNUSED:
58 if (evt->mode == CLOCK_EVT_MODE_SHUTDOWN) 49 if (evt->mode == CLOCK_EVT_MODE_PERIODIC ||
59 break; 50 evt->mode == CLOCK_EVT_MODE_ONESHOT) {
51 outb_p(0x30, PIT_MODE);
52 outb_p(0, PIT_CH0);
53 outb_p(0, PIT_CH0);
54 }
55 break;
56
60 case CLOCK_EVT_MODE_ONESHOT: 57 case CLOCK_EVT_MODE_ONESHOT:
61 /* One shot setup */ 58 /* One shot setup */
62 outb_p(0x38, PIT_MODE); 59 outb_p(0x38, PIT_MODE);
63 udelay(10); 60 break;
61
62 case CLOCK_EVT_MODE_RESUME:
63 /* Nothing to do here */
64 break; 64 break;
65 } 65 }
66 spin_unlock_irqrestore(&i8253_lock, flags); 66 spin_unlock_irqrestore(&i8253_lock, flags);
diff --git a/arch/i386/kernel/init_task.c b/arch/i386/kernel/init_task.c
index cff95d10a4d8..d26fc063a760 100644
--- a/arch/i386/kernel/init_task.c
+++ b/arch/i386/kernel/init_task.c
@@ -42,5 +42,5 @@ EXPORT_SYMBOL(init_task);
42 * per-CPU TSS segments. Threads are completely 'soft' on Linux, 42 * per-CPU TSS segments. Threads are completely 'soft' on Linux,
43 * no more per-task TSS's. 43 * no more per-task TSS's.
44 */ 44 */
45DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_internodealigned_in_smp = INIT_TSS; 45DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS;
46 46
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 7f8b7af2b95f..893df8280756 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -353,14 +353,6 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask)
353# include <linux/slab.h> /* kmalloc() */ 353# include <linux/slab.h> /* kmalloc() */
354# include <linux/timer.h> /* time_after() */ 354# include <linux/timer.h> /* time_after() */
355 355
356#ifdef CONFIG_BALANCED_IRQ_DEBUG
357# define TDprintk(x...) do { printk("<%ld:%s:%d>: ", jiffies, __FILE__, __LINE__); printk(x); } while (0)
358# define Dprintk(x...) do { TDprintk(x); } while (0)
359# else
360# define TDprintk(x...)
361# define Dprintk(x...)
362# endif
363
364#define IRQBALANCE_CHECK_ARCH -999 356#define IRQBALANCE_CHECK_ARCH -999
365#define MAX_BALANCED_IRQ_INTERVAL (5*HZ) 357#define MAX_BALANCED_IRQ_INTERVAL (5*HZ)
366#define MIN_BALANCED_IRQ_INTERVAL (HZ/2) 358#define MIN_BALANCED_IRQ_INTERVAL (HZ/2)
@@ -443,7 +435,7 @@ static inline void balance_irq(int cpu, int irq)
443static inline void rotate_irqs_among_cpus(unsigned long useful_load_threshold) 435static inline void rotate_irqs_among_cpus(unsigned long useful_load_threshold)
444{ 436{
445 int i, j; 437 int i, j;
446 Dprintk("Rotating IRQs among CPUs.\n"); 438
447 for_each_online_cpu(i) { 439 for_each_online_cpu(i) {
448 for (j = 0; j < NR_IRQS; j++) { 440 for (j = 0; j < NR_IRQS; j++) {
449 if (!irq_desc[j].action) 441 if (!irq_desc[j].action)
@@ -560,19 +552,11 @@ tryanothercpu:
560 max_loaded = tmp_loaded; /* processor */ 552 max_loaded = tmp_loaded; /* processor */
561 imbalance = (max_cpu_irq - min_cpu_irq) / 2; 553 imbalance = (max_cpu_irq - min_cpu_irq) / 2;
562 554
563 Dprintk("max_loaded cpu = %d\n", max_loaded);
564 Dprintk("min_loaded cpu = %d\n", min_loaded);
565 Dprintk("max_cpu_irq load = %ld\n", max_cpu_irq);
566 Dprintk("min_cpu_irq load = %ld\n", min_cpu_irq);
567 Dprintk("load imbalance = %lu\n", imbalance);
568
569 /* if imbalance is less than approx 10% of max load, then 555 /* if imbalance is less than approx 10% of max load, then
570 * observe diminishing returns action. - quit 556 * observe diminishing returns action. - quit
571 */ 557 */
572 if (imbalance < (max_cpu_irq >> 3)) { 558 if (imbalance < (max_cpu_irq >> 3))
573 Dprintk("Imbalance too trivial\n");
574 goto not_worth_the_effort; 559 goto not_worth_the_effort;
575 }
576 560
577tryanotherirq: 561tryanotherirq:
578 /* if we select an IRQ to move that can't go where we want, then 562 /* if we select an IRQ to move that can't go where we want, then
@@ -629,9 +613,6 @@ tryanotherirq:
629 cpus_and(tmp, target_cpu_mask, allowed_mask); 613 cpus_and(tmp, target_cpu_mask, allowed_mask);
630 614
631 if (!cpus_empty(tmp)) { 615 if (!cpus_empty(tmp)) {
632
633 Dprintk("irq = %d moved to cpu = %d\n",
634 selected_irq, min_loaded);
635 /* mark for change destination */ 616 /* mark for change destination */
636 set_pending_irq(selected_irq, cpumask_of_cpu(min_loaded)); 617 set_pending_irq(selected_irq, cpumask_of_cpu(min_loaded));
637 618
@@ -651,7 +632,6 @@ not_worth_the_effort:
651 */ 632 */
652 balanced_irq_interval = min((long)MAX_BALANCED_IRQ_INTERVAL, 633 balanced_irq_interval = min((long)MAX_BALANCED_IRQ_INTERVAL,
653 balanced_irq_interval + BALANCED_IRQ_MORE_DELTA); 634 balanced_irq_interval + BALANCED_IRQ_MORE_DELTA);
654 Dprintk("IRQ worth rotating not found\n");
655 return; 635 return;
656} 636}
657 637
@@ -667,6 +647,7 @@ static int balanced_irq(void *unused)
667 set_pending_irq(i, cpumask_of_cpu(0)); 647 set_pending_irq(i, cpumask_of_cpu(0));
668 } 648 }
669 649
650 set_freezable();
670 for ( ; ; ) { 651 for ( ; ; ) {
671 time_remaining = schedule_timeout_interruptible(time_remaining); 652 time_remaining = schedule_timeout_interruptible(time_remaining);
672 try_to_freeze(); 653 try_to_freeze();
@@ -1901,7 +1882,7 @@ __setup("no_timer_check", notimercheck);
1901 * - if this function detects that timer IRQs are defunct, then we fall 1882 * - if this function detects that timer IRQs are defunct, then we fall
1902 * back to ISA timer IRQs 1883 * back to ISA timer IRQs
1903 */ 1884 */
1904int __init timer_irq_works(void) 1885static int __init timer_irq_works(void)
1905{ 1886{
1906 unsigned long t1 = jiffies; 1887 unsigned long t1 = jiffies;
1907 1888
diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c
index d2daf672f4a2..dd2b97fc00b2 100644
--- a/arch/i386/kernel/irq.c
+++ b/arch/i386/kernel/irq.c
@@ -21,7 +21,7 @@
21#include <asm/apic.h> 21#include <asm/apic.h>
22#include <asm/uaccess.h> 22#include <asm/uaccess.h>
23 23
24DEFINE_PER_CPU(irq_cpustat_t, irq_stat) ____cacheline_internodealigned_in_smp; 24DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
25EXPORT_PER_CPU_SYMBOL(irq_stat); 25EXPORT_PER_CPU_SYMBOL(irq_stat);
26 26
27DEFINE_PER_CPU(struct pt_regs *, irq_regs); 27DEFINE_PER_CPU(struct pt_regs *, irq_regs);
@@ -149,15 +149,11 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
149 149
150#ifdef CONFIG_4KSTACKS 150#ifdef CONFIG_4KSTACKS
151 151
152/*
153 * These should really be __section__(".bss.page_aligned") as well, but
154 * gcc's 3.0 and earlier don't handle that correctly.
155 */
156static char softirq_stack[NR_CPUS * THREAD_SIZE] 152static char softirq_stack[NR_CPUS * THREAD_SIZE]
157 __attribute__((__aligned__(THREAD_SIZE))); 153 __attribute__((__section__(".bss.page_aligned")));
158 154
159static char hardirq_stack[NR_CPUS * THREAD_SIZE] 155static char hardirq_stack[NR_CPUS * THREAD_SIZE]
160 __attribute__((__aligned__(THREAD_SIZE))); 156 __attribute__((__section__(".bss.page_aligned")));
161 157
162/* 158/*
163 * allocate per-cpu stacks for hardirq and for softirq processing 159 * allocate per-cpu stacks for hardirq and for softirq processing
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index fba121f7973f..03b7f5584d71 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -295,7 +295,7 @@ static unsigned int
295 last_irq_sums [NR_CPUS], 295 last_irq_sums [NR_CPUS],
296 alert_counter [NR_CPUS]; 296 alert_counter [NR_CPUS];
297 297
298void touch_nmi_watchdog (void) 298void touch_nmi_watchdog(void)
299{ 299{
300 if (nmi_watchdog > 0) { 300 if (nmi_watchdog > 0) {
301 unsigned cpu; 301 unsigned cpu;
@@ -304,8 +304,10 @@ void touch_nmi_watchdog (void)
304 * Just reset the alert counters, (other CPUs might be 304 * Just reset the alert counters, (other CPUs might be
305 * spinning on locks we hold): 305 * spinning on locks we hold):
306 */ 306 */
307 for_each_present_cpu (cpu) 307 for_each_present_cpu(cpu) {
308 alert_counter[cpu] = 0; 308 if (alert_counter[cpu])
309 alert_counter[cpu] = 0;
310 }
309 } 311 }
310 312
311 /* 313 /*
diff --git a/arch/i386/kernel/paravirt.c b/arch/i386/kernel/paravirt.c
index faab09abca5e..53f07a8275e3 100644
--- a/arch/i386/kernel/paravirt.c
+++ b/arch/i386/kernel/paravirt.c
@@ -228,6 +228,41 @@ static int __init print_banner(void)
228} 228}
229core_initcall(print_banner); 229core_initcall(print_banner);
230 230
231static struct resource reserve_ioports = {
232 .start = 0,
233 .end = IO_SPACE_LIMIT,
234 .name = "paravirt-ioport",
235 .flags = IORESOURCE_IO | IORESOURCE_BUSY,
236};
237
238static struct resource reserve_iomem = {
239 .start = 0,
240 .end = -1,
241 .name = "paravirt-iomem",
242 .flags = IORESOURCE_MEM | IORESOURCE_BUSY,
243};
244
245/*
246 * Reserve the whole legacy IO space to prevent any legacy drivers
247 * from wasting time probing for their hardware. This is a fairly
248 * brute-force approach to disabling all non-virtual drivers.
249 *
250 * Note that this must be called very early to have any effect.
251 */
252int paravirt_disable_iospace(void)
253{
254 int ret;
255
256 ret = request_resource(&ioport_resource, &reserve_ioports);
257 if (ret == 0) {
258 ret = request_resource(&iomem_resource, &reserve_iomem);
259 if (ret)
260 release_resource(&reserve_ioports);
261 }
262
263 return ret;
264}
265
231struct paravirt_ops paravirt_ops = { 266struct paravirt_ops paravirt_ops = {
232 .name = "bare hardware", 267 .name = "bare hardware",
233 .paravirt_enabled = 0, 268 .paravirt_enabled = 0,
@@ -267,7 +302,7 @@ struct paravirt_ops paravirt_ops = {
267 .write_msr = native_write_msr_safe, 302 .write_msr = native_write_msr_safe,
268 .read_tsc = native_read_tsc, 303 .read_tsc = native_read_tsc,
269 .read_pmc = native_read_pmc, 304 .read_pmc = native_read_pmc,
270 .get_scheduled_cycles = native_read_tsc, 305 .sched_clock = native_sched_clock,
271 .get_cpu_khz = native_calculate_cpu_khz, 306 .get_cpu_khz = native_calculate_cpu_khz,
272 .load_tr_desc = native_load_tr_desc, 307 .load_tr_desc = native_load_tr_desc,
273 .set_ldt = native_set_ldt, 308 .set_ldt = native_set_ldt,
diff --git a/arch/i386/kernel/pci-dma.c b/arch/i386/kernel/pci-dma.c
index 30b754f7cbec..048f09b62553 100644
--- a/arch/i386/kernel/pci-dma.c
+++ b/arch/i386/kernel/pci-dma.c
@@ -12,6 +12,7 @@
12#include <linux/string.h> 12#include <linux/string.h>
13#include <linux/pci.h> 13#include <linux/pci.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/pci.h>
15#include <asm/io.h> 16#include <asm/io.h>
16 17
17struct dma_coherent_mem { 18struct dma_coherent_mem {
@@ -148,3 +149,29 @@ void *dma_mark_declared_memory_occupied(struct device *dev,
148 return mem->virt_base + (pos << PAGE_SHIFT); 149 return mem->virt_base + (pos << PAGE_SHIFT);
149} 150}
150EXPORT_SYMBOL(dma_mark_declared_memory_occupied); 151EXPORT_SYMBOL(dma_mark_declared_memory_occupied);
152
153#ifdef CONFIG_PCI
154/* Many VIA bridges seem to corrupt data for DAC. Disable it here */
155
156int forbid_dac;
157EXPORT_SYMBOL(forbid_dac);
158
159static __devinit void via_no_dac(struct pci_dev *dev)
160{
161 if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) {
162 printk(KERN_INFO "PCI: VIA PCI bridge detected. Disabling DAC.\n");
163 forbid_dac = 1;
164 }
165}
166DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac);
167
168static int check_iommu(char *s)
169{
170 if (!strcmp(s, "usedac")) {
171 forbid_dac = -1;
172 return 1;
173 }
174 return 0;
175}
176__setup("iommu=", check_iommu);
177#endif
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index 06dfa65ad180..84664710b784 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -300,6 +300,7 @@ early_param("idle", idle_setup);
300void show_regs(struct pt_regs * regs) 300void show_regs(struct pt_regs * regs)
301{ 301{
302 unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L; 302 unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L;
303 unsigned long d0, d1, d2, d3, d6, d7;
303 304
304 printk("\n"); 305 printk("\n");
305 printk("Pid: %d, comm: %20s\n", current->pid, current->comm); 306 printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
@@ -324,6 +325,17 @@ void show_regs(struct pt_regs * regs)
324 cr3 = read_cr3(); 325 cr3 = read_cr3();
325 cr4 = read_cr4_safe(); 326 cr4 = read_cr4_safe();
326 printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", cr0, cr2, cr3, cr4); 327 printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", cr0, cr2, cr3, cr4);
328
329 get_debugreg(d0, 0);
330 get_debugreg(d1, 1);
331 get_debugreg(d2, 2);
332 get_debugreg(d3, 3);
333 printk("DR0: %08lx DR1: %08lx DR2: %08lx DR3: %08lx\n",
334 d0, d1, d2, d3);
335 get_debugreg(d6, 6);
336 get_debugreg(d7, 7);
337 printk("DR6: %08lx DR7: %08lx\n", d6, d7);
338
327 show_trace(NULL, regs, &regs->esp); 339 show_trace(NULL, regs, &regs->esp);
328} 340}
329 341
@@ -538,8 +550,31 @@ int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
538 return 1; 550 return 1;
539} 551}
540 552
541static noinline void __switch_to_xtra(struct task_struct *next_p, 553#ifdef CONFIG_SECCOMP
542 struct tss_struct *tss) 554void hard_disable_TSC(void)
555{
556 write_cr4(read_cr4() | X86_CR4_TSD);
557}
558void disable_TSC(void)
559{
560 preempt_disable();
561 if (!test_and_set_thread_flag(TIF_NOTSC))
562 /*
563 * Must flip the CPU state synchronously with
564 * TIF_NOTSC in the current running context.
565 */
566 hard_disable_TSC();
567 preempt_enable();
568}
569void hard_enable_TSC(void)
570{
571 write_cr4(read_cr4() & ~X86_CR4_TSD);
572}
573#endif /* CONFIG_SECCOMP */
574
575static noinline void
576__switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
577 struct tss_struct *tss)
543{ 578{
544 struct thread_struct *next; 579 struct thread_struct *next;
545 580
@@ -555,6 +590,17 @@ static noinline void __switch_to_xtra(struct task_struct *next_p,
555 set_debugreg(next->debugreg[7], 7); 590 set_debugreg(next->debugreg[7], 7);
556 } 591 }
557 592
593#ifdef CONFIG_SECCOMP
594 if (test_tsk_thread_flag(prev_p, TIF_NOTSC) ^
595 test_tsk_thread_flag(next_p, TIF_NOTSC)) {
596 /* prev and next are different */
597 if (test_tsk_thread_flag(next_p, TIF_NOTSC))
598 hard_disable_TSC();
599 else
600 hard_enable_TSC();
601 }
602#endif
603
558 if (!test_tsk_thread_flag(next_p, TIF_IO_BITMAP)) { 604 if (!test_tsk_thread_flag(next_p, TIF_IO_BITMAP)) {
559 /* 605 /*
560 * Disable the bitmap via an invalid offset. We still cache 606 * Disable the bitmap via an invalid offset. We still cache
@@ -586,33 +632,6 @@ static noinline void __switch_to_xtra(struct task_struct *next_p,
586} 632}
587 633
588/* 634/*
589 * This function selects if the context switch from prev to next
590 * has to tweak the TSC disable bit in the cr4.
591 */
592static inline void disable_tsc(struct task_struct *prev_p,
593 struct task_struct *next_p)
594{
595 struct thread_info *prev, *next;
596
597 /*
598 * gcc should eliminate the ->thread_info dereference if
599 * has_secure_computing returns 0 at compile time (SECCOMP=n).
600 */
601 prev = task_thread_info(prev_p);
602 next = task_thread_info(next_p);
603
604 if (has_secure_computing(prev) || has_secure_computing(next)) {
605 /* slow path here */
606 if (has_secure_computing(prev) &&
607 !has_secure_computing(next)) {
608 write_cr4(read_cr4() & ~X86_CR4_TSD);
609 } else if (!has_secure_computing(prev) &&
610 has_secure_computing(next))
611 write_cr4(read_cr4() | X86_CR4_TSD);
612 }
613}
614
615/*
616 * switch_to(x,yn) should switch tasks from x to y. 635 * switch_to(x,yn) should switch tasks from x to y.
617 * 636 *
618 * We fsave/fwait so that an exception goes off at the right time 637 * We fsave/fwait so that an exception goes off at the right time
@@ -689,11 +708,9 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas
689 /* 708 /*
690 * Now maybe handle debug registers and/or IO bitmaps 709 * Now maybe handle debug registers and/or IO bitmaps
691 */ 710 */
692 if (unlikely((task_thread_info(next_p)->flags & _TIF_WORK_CTXSW) 711 if (unlikely(task_thread_info(prev_p)->flags & _TIF_WORK_CTXSW_PREV ||
693 || test_tsk_thread_flag(prev_p, TIF_IO_BITMAP))) 712 task_thread_info(next_p)->flags & _TIF_WORK_CTXSW_NEXT))
694 __switch_to_xtra(next_p, tss); 713 __switch_to_xtra(prev_p, next_p, tss);
695
696 disable_tsc(prev_p, next_p);
697 714
698 /* 715 /*
699 * Leave lazy mode, flushing any hypercalls made here. 716 * Leave lazy mode, flushing any hypercalls made here.
diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c
index 0c0ceec5de00..0c8f00e69c4d 100644
--- a/arch/i386/kernel/ptrace.c
+++ b/arch/i386/kernel/ptrace.c
@@ -164,14 +164,22 @@ static unsigned long convert_eip_to_linear(struct task_struct *child, struct pt_
164 u32 *desc; 164 u32 *desc;
165 unsigned long base; 165 unsigned long base;
166 166
167 down(&child->mm->context.sem); 167 seg &= ~7UL;
168 desc = child->mm->context.ldt + (seg & ~7);
169 base = (desc[0] >> 16) | ((desc[1] & 0xff) << 16) | (desc[1] & 0xff000000);
170 168
171 /* 16-bit code segment? */ 169 down(&child->mm->context.sem);
172 if (!((desc[1] >> 22) & 1)) 170 if (unlikely((seg >> 3) >= child->mm->context.size))
173 addr &= 0xffff; 171 addr = -1L; /* bogus selector, access would fault */
174 addr += base; 172 else {
173 desc = child->mm->context.ldt + seg;
174 base = ((desc[0] >> 16) |
175 ((desc[1] & 0xff) << 16) |
176 (desc[1] & 0xff000000));
177
178 /* 16-bit code segment? */
179 if (!((desc[1] >> 22) & 1))
180 addr &= 0xffff;
181 addr += base;
182 }
175 up(&child->mm->context.sem); 183 up(&child->mm->context.sem);
176 } 184 }
177 return addr; 185 return addr;
@@ -358,17 +366,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
358 switch (request) { 366 switch (request) {
359 /* when I and D space are separate, these will need to be fixed. */ 367 /* when I and D space are separate, these will need to be fixed. */
360 case PTRACE_PEEKTEXT: /* read word at location addr. */ 368 case PTRACE_PEEKTEXT: /* read word at location addr. */
361 case PTRACE_PEEKDATA: { 369 case PTRACE_PEEKDATA:
362 unsigned long tmp; 370 ret = generic_ptrace_peekdata(child, addr, data);
363 int copied;
364
365 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
366 ret = -EIO;
367 if (copied != sizeof(tmp))
368 break;
369 ret = put_user(tmp, datap);
370 break; 371 break;
371 }
372 372
373 /* read the word at location addr in the USER area. */ 373 /* read the word at location addr in the USER area. */
374 case PTRACE_PEEKUSR: { 374 case PTRACE_PEEKUSR: {
@@ -395,10 +395,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
395 /* when I and D space are separate, this will have to be fixed. */ 395 /* when I and D space are separate, this will have to be fixed. */
396 case PTRACE_POKETEXT: /* write the word at location addr. */ 396 case PTRACE_POKETEXT: /* write the word at location addr. */
397 case PTRACE_POKEDATA: 397 case PTRACE_POKEDATA:
398 ret = 0; 398 ret = generic_ptrace_pokedata(child, addr, data);
399 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
400 break;
401 ret = -EIO;
402 break; 399 break;
403 400
404 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 401 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
diff --git a/arch/i386/kernel/quirks.c b/arch/i386/kernel/quirks.c
index 9f6ab1789bb0..6722469c2633 100644
--- a/arch/i386/kernel/quirks.c
+++ b/arch/i386/kernel/quirks.c
@@ -20,8 +20,6 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev)
20 if (rev > 0x9) 20 if (rev > 0x9)
21 return; 21 return;
22 22
23 printk(KERN_INFO "Intel E7520/7320/7525 detected.");
24
25 /* enable access to config space*/ 23 /* enable access to config space*/
26 pci_read_config_byte(dev, 0xf4, &config); 24 pci_read_config_byte(dev, 0xf4, &config);
27 pci_write_config_byte(dev, 0xf4, config|0x2); 25 pci_write_config_byte(dev, 0xf4, config|0x2);
@@ -30,7 +28,8 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev)
30 raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word); 28 raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word);
31 29
32 if (!(word & (1 << 13))) { 30 if (!(word & (1 << 13))) {
33 printk(KERN_INFO "Disabling irq balancing and affinity\n"); 31 printk(KERN_INFO "Intel E7520/7320/7525 detected. "
32 "Disabling irq balancing and affinity\n");
34#ifdef CONFIG_IRQBALANCE 33#ifdef CONFIG_IRQBALANCE
35 irqbalance_disable(""); 34 irqbalance_disable("");
36#endif 35#endif
diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c
index 5513f8d5b5be..0d796248866c 100644
--- a/arch/i386/kernel/reboot.c
+++ b/arch/i386/kernel/reboot.c
@@ -113,6 +113,15 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
113 DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 300/"), 113 DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 300/"),
114 }, 114 },
115 }, 115 },
116 { /* Handle problems with rebooting on Dell Optiplex 745's SFF*/
117 .callback = set_bios_reboot,
118 .ident = "Dell OptiPlex 745",
119 .matches = {
120 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
121 DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
122 DMI_MATCH(DMI_BOARD_NAME, "0WF810"),
123 },
124 },
116 { /* Handle problems with rebooting on Dell 2400's */ 125 { /* Handle problems with rebooting on Dell 2400's */
117 .callback = set_bios_reboot, 126 .callback = set_bios_reboot,
118 .ident = "Dell PowerEdge 2400", 127 .ident = "Dell PowerEdge 2400",
diff --git a/arch/i386/kernel/reboot_fixups.c b/arch/i386/kernel/reboot_fixups.c
index 2d78d918340f..03e1cce58f49 100644
--- a/arch/i386/kernel/reboot_fixups.c
+++ b/arch/i386/kernel/reboot_fixups.c
@@ -5,12 +5,14 @@
5 * 5 *
6 * List of supported fixups: 6 * List of supported fixups:
7 * geode-gx1/cs5530a - Jaya Kumar <jayalk@intworks.biz> 7 * geode-gx1/cs5530a - Jaya Kumar <jayalk@intworks.biz>
8 * geode-gx/lx/cs5536 - Andres Salomon <dilinger@debian.org>
8 * 9 *
9 */ 10 */
10 11
11#include <asm/delay.h> 12#include <asm/delay.h>
12#include <linux/pci.h> 13#include <linux/pci.h>
13#include <asm/reboot_fixups.h> 14#include <asm/reboot_fixups.h>
15#include <asm/msr.h>
14 16
15static void cs5530a_warm_reset(struct pci_dev *dev) 17static void cs5530a_warm_reset(struct pci_dev *dev)
16{ 18{
@@ -21,6 +23,16 @@ static void cs5530a_warm_reset(struct pci_dev *dev)
21 return; 23 return;
22} 24}
23 25
26static void cs5536_warm_reset(struct pci_dev *dev)
27{
28 /*
29 * 6.6.2.12 Soft Reset (DIVIL_SOFT_RESET)
30 * writing 1 to the LSB of this MSR causes a hard reset.
31 */
32 wrmsrl(0x51400017, 1ULL);
33 udelay(50); /* shouldn't get here but be safe and spin a while */
34}
35
24struct device_fixup { 36struct device_fixup {
25 unsigned int vendor; 37 unsigned int vendor;
26 unsigned int device; 38 unsigned int device;
@@ -29,6 +41,7 @@ struct device_fixup {
29 41
30static struct device_fixup fixups_table[] = { 42static struct device_fixup fixups_table[] = {
31{ PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, cs5530a_warm_reset }, 43{ PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, cs5530a_warm_reset },
44{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, cs5536_warm_reset },
32}; 45};
33 46
34/* 47/*
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 698c24fe482e..d474cd639bcb 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -102,19 +102,10 @@ static unsigned int highmem_pages = -1;
102/* 102/*
103 * Setup options 103 * Setup options
104 */ 104 */
105struct drive_info_struct { char dummy[32]; } drive_info;
106#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || \
107 defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
108EXPORT_SYMBOL(drive_info);
109#endif
110struct screen_info screen_info; 105struct screen_info screen_info;
111EXPORT_SYMBOL(screen_info); 106EXPORT_SYMBOL(screen_info);
112struct apm_info apm_info; 107struct apm_info apm_info;
113EXPORT_SYMBOL(apm_info); 108EXPORT_SYMBOL(apm_info);
114struct sys_desc_table_struct {
115 unsigned short length;
116 unsigned char table[0];
117};
118struct edid_info edid_info; 109struct edid_info edid_info;
119EXPORT_SYMBOL_GPL(edid_info); 110EXPORT_SYMBOL_GPL(edid_info);
120struct ist_info ist_info; 111struct ist_info ist_info;
@@ -134,7 +125,7 @@ unsigned long saved_videomode;
134 125
135static char __initdata command_line[COMMAND_LINE_SIZE]; 126static char __initdata command_line[COMMAND_LINE_SIZE];
136 127
137unsigned char __initdata boot_params[PARAM_SIZE]; 128struct boot_params __initdata boot_params;
138 129
139#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) 130#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
140struct edd edd; 131struct edd edd;
@@ -282,18 +273,18 @@ unsigned long __init find_max_low_pfn(void)
282 printk(KERN_WARNING "Warning only %ldMB will be used.\n", 273 printk(KERN_WARNING "Warning only %ldMB will be used.\n",
283 MAXMEM>>20); 274 MAXMEM>>20);
284 if (max_pfn > MAX_NONPAE_PFN) 275 if (max_pfn > MAX_NONPAE_PFN)
285 printk(KERN_WARNING "Use a PAE enabled kernel.\n"); 276 printk(KERN_WARNING "Use a HIGHMEM64G enabled kernel.\n");
286 else 277 else
287 printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n"); 278 printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");
288 max_pfn = MAXMEM_PFN; 279 max_pfn = MAXMEM_PFN;
289#else /* !CONFIG_HIGHMEM */ 280#else /* !CONFIG_HIGHMEM */
290#ifndef CONFIG_X86_PAE 281#ifndef CONFIG_HIGHMEM64G
291 if (max_pfn > MAX_NONPAE_PFN) { 282 if (max_pfn > MAX_NONPAE_PFN) {
292 max_pfn = MAX_NONPAE_PFN; 283 max_pfn = MAX_NONPAE_PFN;
293 printk(KERN_WARNING "Warning only 4GB will be used.\n"); 284 printk(KERN_WARNING "Warning only 4GB will be used.\n");
294 printk(KERN_WARNING "Use a PAE enabled kernel.\n"); 285 printk(KERN_WARNING "Use a HIGHMEM64G enabled kernel.\n");
295 } 286 }
296#endif /* !CONFIG_X86_PAE */ 287#endif /* !CONFIG_HIGHMEM64G */
297#endif /* !CONFIG_HIGHMEM */ 288#endif /* !CONFIG_HIGHMEM */
298 } else { 289 } else {
299 if (highmem_pages == -1) 290 if (highmem_pages == -1)
@@ -475,7 +466,7 @@ void __init setup_bootmem_allocator(void)
475 * 466 *
476 * This should all compile down to nothing when NUMA is off. 467 * This should all compile down to nothing when NUMA is off.
477 */ 468 */
478void __init remapped_pgdat_init(void) 469static void __init remapped_pgdat_init(void)
479{ 470{
480 int nid; 471 int nid;
481 472
@@ -528,7 +519,6 @@ void __init setup_arch(char **cmdline_p)
528#endif 519#endif
529 520
530 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); 521 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
531 drive_info = DRIVE_INFO;
532 screen_info = SCREEN_INFO; 522 screen_info = SCREEN_INFO;
533 edid_info = EDID_INFO; 523 edid_info = EDID_INFO;
534 apm_info.bios = APM_BIOS_INFO; 524 apm_info.bios = APM_BIOS_INFO;
@@ -611,6 +601,8 @@ void __init setup_arch(char **cmdline_p)
611 * NOTE: at this point the bootmem allocator is fully available. 601 * NOTE: at this point the bootmem allocator is fully available.
612 */ 602 */
613 603
604 paravirt_post_allocator_init();
605
614 dmi_scan_machine(); 606 dmi_scan_machine();
615 607
616#ifdef CONFIG_X86_GENERICARCH 608#ifdef CONFIG_X86_GENERICARCH
@@ -648,6 +640,7 @@ void __init setup_arch(char **cmdline_p)
648#endif 640#endif
649 641
650 e820_register_memory(); 642 e820_register_memory();
643 e820_mark_nosave_regions();
651 644
652#ifdef CONFIG_VT 645#ifdef CONFIG_VT
653#if defined(CONFIG_VGA_CONSOLE) 646#if defined(CONFIG_VGA_CONSOLE)
diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
index 6299c080f6e2..2d35d8502029 100644
--- a/arch/i386/kernel/smp.c
+++ b/arch/i386/kernel/smp.c
@@ -22,6 +22,7 @@
22 22
23#include <asm/mtrr.h> 23#include <asm/mtrr.h>
24#include <asm/tlbflush.h> 24#include <asm/tlbflush.h>
25#include <asm/mmu_context.h>
25#include <mach_apic.h> 26#include <mach_apic.h>
26 27
27/* 28/*
@@ -249,13 +250,13 @@ static unsigned long flush_va;
249static DEFINE_SPINLOCK(tlbstate_lock); 250static DEFINE_SPINLOCK(tlbstate_lock);
250 251
251/* 252/*
252 * We cannot call mmdrop() because we are in interrupt context, 253 * We cannot call mmdrop() because we are in interrupt context,
253 * instead update mm->cpu_vm_mask. 254 * instead update mm->cpu_vm_mask.
254 * 255 *
255 * We need to reload %cr3 since the page tables may be going 256 * We need to reload %cr3 since the page tables may be going
256 * away from under us.. 257 * away from under us..
257 */ 258 */
258static inline void leave_mm (unsigned long cpu) 259void leave_mm(unsigned long cpu)
259{ 260{
260 if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK) 261 if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK)
261 BUG(); 262 BUG();
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
index 88baed1e7e83..5910d3fac561 100644
--- a/arch/i386/kernel/smpboot.c
+++ b/arch/i386/kernel/smpboot.c
@@ -148,7 +148,7 @@ void __init smp_alloc_memory(void)
148 * a given CPU 148 * a given CPU
149 */ 149 */
150 150
151static void __cpuinit smp_store_cpu_info(int id) 151void __cpuinit smp_store_cpu_info(int id)
152{ 152{
153 struct cpuinfo_x86 *c = cpu_data + id; 153 struct cpuinfo_x86 *c = cpu_data + id;
154 154
@@ -308,8 +308,7 @@ cpumask_t cpu_coregroup_map(int cpu)
308/* representing cpus for which sibling maps can be computed */ 308/* representing cpus for which sibling maps can be computed */
309static cpumask_t cpu_sibling_setup_map; 309static cpumask_t cpu_sibling_setup_map;
310 310
311static inline void 311void set_cpu_sibling_map(int cpu)
312set_cpu_sibling_map(int cpu)
313{ 312{
314 int i; 313 int i;
315 struct cpuinfo_x86 *c = cpu_data; 314 struct cpuinfo_x86 *c = cpu_data;
@@ -941,17 +940,6 @@ exit:
941} 940}
942#endif 941#endif
943 942
944static void smp_tune_scheduling(void)
945{
946 if (cpu_khz) {
947 /* cache size in kB */
948 long cachesize = boot_cpu_data.x86_cache_size;
949
950 if (cachesize > 0)
951 max_cache_size = cachesize * 1024;
952 }
953}
954
955/* 943/*
956 * Cycle through the processors sending APIC IPIs to boot each. 944 * Cycle through the processors sending APIC IPIs to boot each.
957 */ 945 */
@@ -980,7 +968,6 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
980 x86_cpu_to_apicid[0] = boot_cpu_physical_apicid; 968 x86_cpu_to_apicid[0] = boot_cpu_physical_apicid;
981 969
982 current_thread_info()->cpu = 0; 970 current_thread_info()->cpu = 0;
983 smp_tune_scheduling();
984 971
985 set_cpu_sibling_map(0); 972 set_cpu_sibling_map(0);
986 973
@@ -1156,8 +1143,7 @@ void __init native_smp_prepare_boot_cpu(void)
1156} 1143}
1157 1144
1158#ifdef CONFIG_HOTPLUG_CPU 1145#ifdef CONFIG_HOTPLUG_CPU
1159static void 1146void remove_siblinginfo(int cpu)
1160remove_siblinginfo(int cpu)
1161{ 1147{
1162 int sibling; 1148 int sibling;
1163 struct cpuinfo_x86 *c = cpu_data; 1149 struct cpuinfo_x86 *c = cpu_data;
diff --git a/arch/i386/kernel/smpcommon.c b/arch/i386/kernel/smpcommon.c
index 1868ae18eb4d..bbfe85a0f699 100644
--- a/arch/i386/kernel/smpcommon.c
+++ b/arch/i386/kernel/smpcommon.c
@@ -47,7 +47,7 @@ int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
47EXPORT_SYMBOL(smp_call_function); 47EXPORT_SYMBOL(smp_call_function);
48 48
49/** 49/**
50 * smp_call_function_single - Run a function on another CPU 50 * smp_call_function_single - Run a function on a specific CPU
51 * @cpu: The target CPU. Cannot be the calling CPU. 51 * @cpu: The target CPU. Cannot be the calling CPU.
52 * @func: The function to run. This must be fast and non-blocking. 52 * @func: The function to run. This must be fast and non-blocking.
53 * @info: An arbitrary pointer to pass to the function. 53 * @info: An arbitrary pointer to pass to the function.
@@ -66,9 +66,11 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
66 int ret; 66 int ret;
67 int me = get_cpu(); 67 int me = get_cpu();
68 if (cpu == me) { 68 if (cpu == me) {
69 WARN_ON(1); 69 local_irq_disable();
70 func(info);
71 local_irq_enable();
70 put_cpu(); 72 put_cpu();
71 return -EBUSY; 73 return 0;
72 } 74 }
73 75
74 ret = smp_call_function_mask(cpumask_of_cpu(cpu), func, info, wait); 76 ret = smp_call_function_mask(cpumask_of_cpu(cpu), func, info, wait);
diff --git a/arch/i386/kernel/syscall_table.S b/arch/i386/kernel/syscall_table.S
index bf6adce52267..8344c70adf61 100644
--- a/arch/i386/kernel/syscall_table.S
+++ b/arch/i386/kernel/syscall_table.S
@@ -323,3 +323,4 @@ ENTRY(sys_call_table)
323 .long sys_signalfd 323 .long sys_signalfd
324 .long sys_timerfd 324 .long sys_timerfd
325 .long sys_eventfd 325 .long sys_eventfd
326 .long sys_fallocate
diff --git a/arch/i386/kernel/sysenter.c b/arch/i386/kernel/sysenter.c
index ff4ee6f3326b..6deb159d08e0 100644
--- a/arch/i386/kernel/sysenter.c
+++ b/arch/i386/kernel/sysenter.c
@@ -336,7 +336,9 @@ struct vm_area_struct *get_gate_vma(struct task_struct *tsk)
336 336
337int in_gate_area(struct task_struct *task, unsigned long addr) 337int in_gate_area(struct task_struct *task, unsigned long addr)
338{ 338{
339 return 0; 339 const struct vm_area_struct *vma = get_gate_vma(task);
340
341 return vma && addr >= vma->vm_start && addr < vma->vm_end;
340} 342}
341 343
342int in_gate_area_no_task(unsigned long addr) 344int in_gate_area_no_task(unsigned long addr)
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c
index a665df61f08c..19a6c678d02e 100644
--- a/arch/i386/kernel/time.c
+++ b/arch/i386/kernel/time.c
@@ -207,55 +207,9 @@ unsigned long read_persistent_clock(void)
207 return retval; 207 return retval;
208} 208}
209 209
210static void sync_cmos_clock(unsigned long dummy); 210int update_persistent_clock(struct timespec now)
211
212static DEFINE_TIMER(sync_cmos_timer, sync_cmos_clock, 0, 0);
213int no_sync_cmos_clock;
214
215static void sync_cmos_clock(unsigned long dummy)
216{
217 struct timeval now, next;
218 int fail = 1;
219
220 /*
221 * If we have an externally synchronized Linux clock, then update
222 * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
223 * called as close as possible to 500 ms before the new second starts.
224 * This code is run on a timer. If the clock is set, that timer
225 * may not expire at the correct time. Thus, we adjust...
226 */
227 if (!ntp_synced())
228 /*
229 * Not synced, exit, do not restart a timer (if one is
230 * running, let it run out).
231 */
232 return;
233
234 do_gettimeofday(&now);
235 if (now.tv_usec >= USEC_AFTER - ((unsigned) TICK_SIZE) / 2 &&
236 now.tv_usec <= USEC_BEFORE + ((unsigned) TICK_SIZE) / 2)
237 fail = set_rtc_mmss(now.tv_sec);
238
239 next.tv_usec = USEC_AFTER - now.tv_usec;
240 if (next.tv_usec <= 0)
241 next.tv_usec += USEC_PER_SEC;
242
243 if (!fail)
244 next.tv_sec = 659;
245 else
246 next.tv_sec = 0;
247
248 if (next.tv_usec >= USEC_PER_SEC) {
249 next.tv_sec++;
250 next.tv_usec -= USEC_PER_SEC;
251 }
252 mod_timer(&sync_cmos_timer, jiffies + timeval_to_jiffies(&next));
253}
254
255void notify_arch_cmos_timer(void)
256{ 211{
257 if (!no_sync_cmos_clock) 212 return set_rtc_mmss(now.tv_sec);
258 mod_timer(&sync_cmos_timer, jiffies + 1);
259} 213}
260 214
261extern void (*late_time_init)(void); 215extern void (*late_time_init)(void);
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index 90da0575fcff..57772a18c394 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -41,6 +41,10 @@
41#include <linux/mca.h> 41#include <linux/mca.h>
42#endif 42#endif
43 43
44#if defined(CONFIG_EDAC)
45#include <linux/edac.h>
46#endif
47
44#include <asm/processor.h> 48#include <asm/processor.h>
45#include <asm/system.h> 49#include <asm/system.h>
46#include <asm/io.h> 50#include <asm/io.h>
@@ -148,7 +152,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
148 if (!stack) { 152 if (!stack) {
149 unsigned long dummy; 153 unsigned long dummy;
150 stack = &dummy; 154 stack = &dummy;
151 if (task && task != current) 155 if (task != current)
152 stack = (unsigned long *)task->thread.esp; 156 stack = (unsigned long *)task->thread.esp;
153 } 157 }
154 158
@@ -207,6 +211,7 @@ static void print_trace_address(void *data, unsigned long addr)
207{ 211{
208 printk("%s [<%08lx>] ", (char *)data, addr); 212 printk("%s [<%08lx>] ", (char *)data, addr);
209 print_symbol("%s\n", addr); 213 print_symbol("%s\n", addr);
214 touch_nmi_watchdog();
210} 215}
211 216
212static struct stacktrace_ops print_trace_ops = { 217static struct stacktrace_ops print_trace_ops = {
@@ -390,7 +395,7 @@ void die(const char * str, struct pt_regs * regs, long err)
390 unsigned long esp; 395 unsigned long esp;
391 unsigned short ss; 396 unsigned short ss;
392 397
393 report_bug(regs->eip); 398 report_bug(regs->eip, regs);
394 399
395 printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); 400 printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
396#ifdef CONFIG_PREEMPT 401#ifdef CONFIG_PREEMPT
@@ -433,6 +438,7 @@ void die(const char * str, struct pt_regs * regs, long err)
433 438
434 bust_spinlocks(0); 439 bust_spinlocks(0);
435 die.lock_owner = -1; 440 die.lock_owner = -1;
441 add_taint(TAINT_DIE);
436 spin_unlock_irqrestore(&die.lock, flags); 442 spin_unlock_irqrestore(&die.lock, flags);
437 443
438 if (!regs) 444 if (!regs)
@@ -517,10 +523,12 @@ fastcall void do_##name(struct pt_regs * regs, long error_code) \
517 do_trap(trapnr, signr, str, 0, regs, error_code, NULL); \ 523 do_trap(trapnr, signr, str, 0, regs, error_code, NULL); \
518} 524}
519 525
520#define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \ 526#define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr, irq) \
521fastcall void do_##name(struct pt_regs * regs, long error_code) \ 527fastcall void do_##name(struct pt_regs * regs, long error_code) \
522{ \ 528{ \
523 siginfo_t info; \ 529 siginfo_t info; \
530 if (irq) \
531 local_irq_enable(); \
524 info.si_signo = signr; \ 532 info.si_signo = signr; \
525 info.si_errno = 0; \ 533 info.si_errno = 0; \
526 info.si_code = sicode; \ 534 info.si_code = sicode; \
@@ -560,13 +568,13 @@ DO_VM86_ERROR( 3, SIGTRAP, "int3", int3)
560#endif 568#endif
561DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow) 569DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow)
562DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds) 570DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds)
563DO_ERROR_INFO( 6, SIGILL, "invalid opcode", invalid_op, ILL_ILLOPN, regs->eip) 571DO_ERROR_INFO( 6, SIGILL, "invalid opcode", invalid_op, ILL_ILLOPN, regs->eip, 0)
564DO_ERROR( 9, SIGFPE, "coprocessor segment overrun", coprocessor_segment_overrun) 572DO_ERROR( 9, SIGFPE, "coprocessor segment overrun", coprocessor_segment_overrun)
565DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS) 573DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
566DO_ERROR(11, SIGBUS, "segment not present", segment_not_present) 574DO_ERROR(11, SIGBUS, "segment not present", segment_not_present)
567DO_ERROR(12, SIGBUS, "stack segment", stack_segment) 575DO_ERROR(12, SIGBUS, "stack segment", stack_segment)
568DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0) 576DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0, 0)
569DO_ERROR_INFO(32, SIGSEGV, "iret exception", iret_error, ILL_BADSTK, 0) 577DO_ERROR_INFO(32, SIGSEGV, "iret exception", iret_error, ILL_BADSTK, 0, 1)
570 578
571fastcall void __kprobes do_general_protection(struct pt_regs * regs, 579fastcall void __kprobes do_general_protection(struct pt_regs * regs,
572 long error_code) 580 long error_code)
@@ -635,6 +643,14 @@ mem_parity_error(unsigned char reason, struct pt_regs * regs)
635 printk(KERN_EMERG "Uhhuh. NMI received for unknown reason %02x on " 643 printk(KERN_EMERG "Uhhuh. NMI received for unknown reason %02x on "
636 "CPU %d.\n", reason, smp_processor_id()); 644 "CPU %d.\n", reason, smp_processor_id());
637 printk(KERN_EMERG "You have some hardware problem, likely on the PCI bus.\n"); 645 printk(KERN_EMERG "You have some hardware problem, likely on the PCI bus.\n");
646
647#if defined(CONFIG_EDAC)
648 if(edac_handler_set()) {
649 edac_atomic_assert_error();
650 return;
651 }
652#endif
653
638 if (panic_on_unrecovered_nmi) 654 if (panic_on_unrecovered_nmi)
639 panic("NMI: Not continuing"); 655 panic("NMI: Not continuing");
640 656
@@ -1053,6 +1069,7 @@ asmlinkage void math_state_restore(void)
1053 thread->status |= TS_USEDFPU; /* So we fnsave on switch_to() */ 1069 thread->status |= TS_USEDFPU; /* So we fnsave on switch_to() */
1054 tsk->fpu_counter++; 1070 tsk->fpu_counter++;
1055} 1071}
1072EXPORT_SYMBOL_GPL(math_state_restore);
1056 1073
1057#ifndef CONFIG_MATH_EMULATION 1074#ifndef CONFIG_MATH_EMULATION
1058 1075
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c
index f64b81f3033b..debd7dbb4158 100644
--- a/arch/i386/kernel/tsc.c
+++ b/arch/i386/kernel/tsc.c
@@ -4,6 +4,7 @@
4 * See comments there for proper credits. 4 * See comments there for proper credits.
5 */ 5 */
6 6
7#include <linux/sched.h>
7#include <linux/clocksource.h> 8#include <linux/clocksource.h>
8#include <linux/workqueue.h> 9#include <linux/workqueue.h>
9#include <linux/cpufreq.h> 10#include <linux/cpufreq.h>
@@ -26,6 +27,7 @@ static int tsc_enabled;
26 * an extra value to store the TSC freq 27 * an extra value to store the TSC freq
27 */ 28 */
28unsigned int tsc_khz; 29unsigned int tsc_khz;
30EXPORT_SYMBOL_GPL(tsc_khz);
29 31
30int tsc_disable; 32int tsc_disable;
31 33
@@ -57,10 +59,11 @@ __setup("notsc", tsc_setup);
57 */ 59 */
58static int tsc_unstable; 60static int tsc_unstable;
59 61
60static inline int check_tsc_unstable(void) 62int check_tsc_unstable(void)
61{ 63{
62 return tsc_unstable; 64 return tsc_unstable;
63} 65}
66EXPORT_SYMBOL_GPL(check_tsc_unstable);
64 67
65/* Accellerators for sched_clock() 68/* Accellerators for sched_clock()
66 * convert from cycles(64bits) => nanoseconds (64bits) 69 * convert from cycles(64bits) => nanoseconds (64bits)
@@ -83,7 +86,7 @@ static inline int check_tsc_unstable(void)
83 * 86 *
84 * -johnstul@us.ibm.com "math is hard, lets go shopping!" 87 * -johnstul@us.ibm.com "math is hard, lets go shopping!"
85 */ 88 */
86static unsigned long cyc2ns_scale __read_mostly; 89unsigned long cyc2ns_scale __read_mostly;
87 90
88#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ 91#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */
89 92
@@ -92,32 +95,44 @@ static inline void set_cyc2ns_scale(unsigned long cpu_khz)
92 cyc2ns_scale = (1000000 << CYC2NS_SCALE_FACTOR)/cpu_khz; 95 cyc2ns_scale = (1000000 << CYC2NS_SCALE_FACTOR)/cpu_khz;
93} 96}
94 97
95static inline unsigned long long cycles_2_ns(unsigned long long cyc)
96{
97 return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR;
98}
99
100/* 98/*
101 * Scheduler clock - returns current time in nanosec units. 99 * Scheduler clock - returns current time in nanosec units.
102 */ 100 */
103unsigned long long sched_clock(void) 101unsigned long long native_sched_clock(void)
104{ 102{
105 unsigned long long this_offset; 103 unsigned long long this_offset;
106 104
107 /* 105 /*
108 * Fall back to jiffies if there's no TSC available: 106 * Fall back to jiffies if there's no TSC available:
107 * ( But note that we still use it if the TSC is marked
108 * unstable. We do this because unlike Time Of Day,
109 * the scheduler clock tolerates small errors and it's
110 * very important for it to be as fast as the platform
111 * can achive it. )
109 */ 112 */
110 if (unlikely(!tsc_enabled)) 113 if (unlikely(!tsc_enabled && !tsc_unstable))
111 /* No locking but a rare wrong value is not a big deal: */ 114 /* No locking but a rare wrong value is not a big deal: */
112 return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); 115 return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ);
113 116
114 /* read the Time Stamp Counter: */ 117 /* read the Time Stamp Counter: */
115 get_scheduled_cycles(this_offset); 118 rdtscll(this_offset);
116 119
117 /* return the value in ns */ 120 /* return the value in ns */
118 return cycles_2_ns(this_offset); 121 return cycles_2_ns(this_offset);
119} 122}
120 123
124/* We need to define a real function for sched_clock, to override the
125 weak default version */
126#ifdef CONFIG_PARAVIRT
127unsigned long long sched_clock(void)
128{
129 return paravirt_sched_clock();
130}
131#else
132unsigned long long sched_clock(void)
133 __attribute__((alias("native_sched_clock")));
134#endif
135
121unsigned long native_calculate_cpu_khz(void) 136unsigned long native_calculate_cpu_khz(void)
122{ 137{
123 unsigned long long start, end; 138 unsigned long long start, end;
@@ -277,6 +292,7 @@ static struct clocksource clocksource_tsc = {
277 292
278void mark_tsc_unstable(char *reason) 293void mark_tsc_unstable(char *reason)
279{ 294{
295 sched_clock_unstable_event();
280 if (!tsc_unstable) { 296 if (!tsc_unstable) {
281 tsc_unstable = 1; 297 tsc_unstable = 1;
282 tsc_enabled = 0; 298 tsc_enabled = 0;
diff --git a/arch/i386/kernel/verify_cpu.S b/arch/i386/kernel/verify_cpu.S
deleted file mode 100644
index f1d1eacf4ab0..000000000000
--- a/arch/i386/kernel/verify_cpu.S
+++ /dev/null
@@ -1,94 +0,0 @@
1/* Check if CPU has some minimum CPUID bits
2 This runs in 16bit mode so that the caller can still use the BIOS
3 to output errors on the screen */
4#include <asm/cpufeature.h>
5#include <asm/msr.h>
6
7verify_cpu:
8 pushfl # Save caller passed flags
9 pushl $0 # Kill any dangerous flags
10 popfl
11
12#if CONFIG_X86_MINIMUM_CPU_MODEL >= 4
13 pushfl
14 pop %eax
15 orl $(1<<18),%eax # try setting AC
16 push %eax
17 popfl
18 pushfl
19 popl %eax
20 testl $(1<<18),%eax
21 jz bad
22#endif
23#if REQUIRED_MASK1 != 0
24 pushfl # standard way to check for cpuid
25 popl %eax
26 movl %eax,%ebx
27 xorl $0x200000,%eax
28 pushl %eax
29 popfl
30 pushfl
31 popl %eax
32 cmpl %eax,%ebx
33 pushfl # standard way to check for cpuid
34 popl %eax
35 movl %eax,%ebx
36 xorl $0x200000,%eax
37 pushl %eax
38 popfl
39 pushfl
40 popl %eax
41 cmpl %eax,%ebx
42 jz bad # REQUIRED_MASK1 != 0 requires CPUID
43
44 movl $0x0,%eax # See if cpuid 1 is implemented
45 cpuid
46 cmpl $0x1,%eax
47 jb bad # no cpuid 1
48
49#if REQUIRED_MASK1 & NEED_CMPXCHG64
50 /* Some VIA C3s need magic MSRs to enable CX64. Do this here */
51 cmpl $0x746e6543,%ebx # Cent
52 jne 1f
53 cmpl $0x48727561,%edx # aurH
54 jne 1f
55 cmpl $0x736c7561,%ecx # auls
56 jne 1f
57 movl $1,%eax # check model
58 cpuid
59 movl %eax,%ebx
60 shr $8,%ebx
61 andl $0xf,%ebx
62 cmp $6,%ebx # check family == 6
63 jne 1f
64 shr $4,%eax
65 andl $0xf,%eax
66 cmpl $6,%eax # check model >= 6
67 jb 1f
68 # assume models >= 6 all support this MSR
69 movl $MSR_VIA_FCR,%ecx
70 rdmsr
71 orl $((1<<1)|(1<<7)),%eax # enable CMPXCHG64 and PGE
72 wrmsr
731:
74#endif
75 movl $0x1,%eax # Does the cpu have what it takes
76 cpuid
77
78#if CONFIG_X86_MINIMUM_CPU_MODEL > 4
79#error add proper model checking here
80#endif
81
82 andl $REQUIRED_MASK1,%edx
83 xorl $REQUIRED_MASK1,%edx
84 jnz bad
85#endif /* REQUIRED_MASK1 */
86
87 popfl
88 xor %eax,%eax
89 ret
90
91bad:
92 popfl
93 movl $1,%eax
94 ret
diff --git a/arch/i386/kernel/vmi.c b/arch/i386/kernel/vmi.c
index c12720d7cbc5..72042bb7ec94 100644
--- a/arch/i386/kernel/vmi.c
+++ b/arch/i386/kernel/vmi.c
@@ -362,7 +362,7 @@ static void *vmi_kmap_atomic_pte(struct page *page, enum km_type type)
362} 362}
363#endif 363#endif
364 364
365static void vmi_allocate_pt(u32 pfn) 365static void vmi_allocate_pt(struct mm_struct *mm, u32 pfn)
366{ 366{
367 vmi_set_page_type(pfn, VMI_PAGE_L1); 367 vmi_set_page_type(pfn, VMI_PAGE_L1);
368 vmi_ops.allocate_page(pfn, VMI_PAGE_L1, 0, 0, 0); 368 vmi_ops.allocate_page(pfn, VMI_PAGE_L1, 0, 0, 0);
@@ -891,7 +891,7 @@ static inline int __init activate_vmi(void)
891 paravirt_ops.setup_boot_clock = vmi_time_bsp_init; 891 paravirt_ops.setup_boot_clock = vmi_time_bsp_init;
892 paravirt_ops.setup_secondary_clock = vmi_time_ap_init; 892 paravirt_ops.setup_secondary_clock = vmi_time_ap_init;
893#endif 893#endif
894 paravirt_ops.get_scheduled_cycles = vmi_get_sched_cycles; 894 paravirt_ops.sched_clock = vmi_sched_clock;
895 paravirt_ops.get_cpu_khz = vmi_cpu_khz; 895 paravirt_ops.get_cpu_khz = vmi_cpu_khz;
896 896
897 /* We have true wallclock functions; disable CMOS clock sync */ 897 /* We have true wallclock functions; disable CMOS clock sync */
diff --git a/arch/i386/kernel/vmiclock.c b/arch/i386/kernel/vmiclock.c
index 26a37f8a8762..b1b5ab08b26e 100644
--- a/arch/i386/kernel/vmiclock.c
+++ b/arch/i386/kernel/vmiclock.c
@@ -32,6 +32,7 @@
32#include <asm/apicdef.h> 32#include <asm/apicdef.h>
33#include <asm/apic.h> 33#include <asm/apic.h>
34#include <asm/timer.h> 34#include <asm/timer.h>
35#include <asm/i8253.h>
35 36
36#include <irq_vectors.h> 37#include <irq_vectors.h>
37#include "io_ports.h" 38#include "io_ports.h"
@@ -64,10 +65,10 @@ int vmi_set_wallclock(unsigned long now)
64 return 0; 65 return 0;
65} 66}
66 67
67/* paravirt_ops.get_scheduled_cycles = vmi_get_sched_cycles */ 68/* paravirt_ops.sched_clock = vmi_sched_clock */
68unsigned long long vmi_get_sched_cycles(void) 69unsigned long long vmi_sched_clock(void)
69{ 70{
70 return vmi_timer_ops.get_cycle_counter(VMI_CYCLES_AVAILABLE); 71 return cycles_2_ns(vmi_timer_ops.get_cycle_counter(VMI_CYCLES_AVAILABLE));
71} 72}
72 73
73/* paravirt_ops.get_cpu_khz = vmi_cpu_khz */ 74/* paravirt_ops.get_cpu_khz = vmi_cpu_khz */
@@ -142,6 +143,7 @@ static void vmi_timer_set_mode(enum clock_event_mode mode,
142 143
143 switch (mode) { 144 switch (mode) {
144 case CLOCK_EVT_MODE_ONESHOT: 145 case CLOCK_EVT_MODE_ONESHOT:
146 case CLOCK_EVT_MODE_RESUME:
145 break; 147 break;
146 case CLOCK_EVT_MODE_PERIODIC: 148 case CLOCK_EVT_MODE_PERIODIC:
147 cycles_per_hz = vmi_timer_ops.get_cycle_frequency(); 149 cycles_per_hz = vmi_timer_ops.get_cycle_frequency();
diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S
index aa87b06c7c82..7d72cce00529 100644
--- a/arch/i386/kernel/vmlinux.lds.S
+++ b/arch/i386/kernel/vmlinux.lds.S
@@ -60,7 +60,9 @@ SECTIONS
60 __stop___ex_table = .; 60 __stop___ex_table = .;
61 } 61 }
62 62
63 BUG_TABLE 63 NOTES :text :note
64
65 BUG_TABLE :text
64 66
65 . = ALIGN(4); 67 . = ALIGN(4);
66 .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { 68 .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) {
@@ -88,6 +90,7 @@ SECTIONS
88 90
89 . = ALIGN(4096); 91 . = ALIGN(4096);
90 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { 92 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
93 *(.data.page_aligned)
91 *(.data.idt) 94 *(.data.idt)
92 } 95 }
93 96
@@ -180,6 +183,7 @@ SECTIONS
180 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { 183 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) {
181 __per_cpu_start = .; 184 __per_cpu_start = .;
182 *(.data.percpu) 185 *(.data.percpu)
186 *(.data.percpu.shared_aligned)
183 __per_cpu_end = .; 187 __per_cpu_end = .;
184 } 188 }
185 . = ALIGN(4096); 189 . = ALIGN(4096);
@@ -206,6 +210,4 @@ SECTIONS
206 STABS_DEBUG 210 STABS_DEBUG
207 211
208 DWARF_DEBUG 212 DWARF_DEBUG
209
210 NOTES
211} 213}
diff --git a/arch/i386/kernel/vsyscall-note.S b/arch/i386/kernel/vsyscall-note.S
index d4b5be4f3d5f..07c0daf78237 100644
--- a/arch/i386/kernel/vsyscall-note.S
+++ b/arch/i386/kernel/vsyscall-note.S
@@ -3,23 +3,43 @@
3 * Here we can supply some information useful to userland. 3 * Here we can supply some information useful to userland.
4 */ 4 */
5 5
6#include <linux/uts.h>
7#include <linux/version.h> 6#include <linux/version.h>
7#include <linux/elfnote.h>
8 8
9#define ASM_ELF_NOTE_BEGIN(name, flags, vendor, type) \ 9/* Ideally this would use UTS_NAME, but using a quoted string here
10 .section name, flags; \ 10 doesn't work. Remember to change this when changing the
11 .balign 4; \ 11 kernel's name. */
12 .long 1f - 0f; /* name length */ \ 12ELFNOTE_START(Linux, 0, "a")
13 .long 3f - 2f; /* data length */ \ 13 .long LINUX_VERSION_CODE
14 .long type; /* note type */ \ 14ELFNOTE_END
150: .asciz vendor; /* vendor name */ \
161: .balign 4; \
172:
18 15
19#define ASM_ELF_NOTE_END \ 16#ifdef CONFIG_XEN
203: .balign 4; /* pad out section */ \ 17/*
21 .previous 18 * Add a special note telling glibc's dynamic linker a fake hardware
19 * flavor that it will use to choose the search path for libraries in the
20 * same way it uses real hardware capabilities like "mmx".
21 * We supply "nosegneg" as the fake capability, to indicate that we
22 * do not like negative offsets in instructions using segment overrides,
23 * since we implement those inefficiently. This makes it possible to
24 * install libraries optimized to avoid those access patterns in someplace
25 * like /lib/i686/tls/nosegneg. Note that an /etc/ld.so.conf.d/file
26 * corresponding to the bits here is needed to make ldconfig work right.
27 * It should contain:
28 * hwcap 1 nosegneg
29 * to match the mapping of bit to name that we give here.
30 *
31 * At runtime, the fake hardware feature will be considered to be present
32 * if its bit is set in the mask word. So, we start with the mask 0, and
33 * at boot time we set VDSO_NOTE_NONEGSEG_BIT if running under Xen.
34 */
22 35
23 ASM_ELF_NOTE_BEGIN(".note.kernel-version", "a", UTS_SYSNAME, 0) 36#include "../xen/vdso.h" /* Defines VDSO_NOTE_NONEGSEG_BIT. */
24 .long LINUX_VERSION_CODE 37
25 ASM_ELF_NOTE_END 38 .globl VDSO_NOTE_MASK
39ELFNOTE_START(GNU, 2, "a")
40 .long 1 /* ncaps */
41VDSO_NOTE_MASK:
42 .long 0 /* mask */
43 .byte VDSO_NOTE_NONEGSEG_BIT; .asciz "nosegneg" /* bit, name */
44ELFNOTE_END
45#endif
diff --git a/arch/i386/lib/Makefile b/arch/i386/lib/Makefile
index 22d8ac5815f0..4d105fdfe817 100644
--- a/arch/i386/lib/Makefile
+++ b/arch/i386/lib/Makefile
@@ -4,7 +4,7 @@
4 4
5 5
6lib-y = checksum.o delay.o usercopy.o getuser.o putuser.o memcpy.o strstr.o \ 6lib-y = checksum.o delay.o usercopy.o getuser.o putuser.o memcpy.o strstr.o \
7 bitops.o semaphore.o 7 bitops.o semaphore.o string.o
8 8
9lib-$(CONFIG_X86_USE_3DNOW) += mmx.o 9lib-$(CONFIG_X86_USE_3DNOW) += mmx.o
10 10
diff --git a/arch/i386/lib/string.c b/arch/i386/lib/string.c
new file mode 100644
index 000000000000..2c773fefa3dd
--- /dev/null
+++ b/arch/i386/lib/string.c
@@ -0,0 +1,257 @@
1/*
2 * Most of the string-functions are rather heavily hand-optimized,
3 * see especially strsep,strstr,str[c]spn. They should work, but are not
4 * very easy to understand. Everything is done entirely within the register
5 * set, making the functions fast and clean. String instructions have been
6 * used through-out, making for "slightly" unclear code :-)
7 *
8 * AK: On P4 and K7 using non string instruction implementations might be faster
9 * for large memory blocks. But most of them are unlikely to be used on large
10 * strings.
11 */
12
13#include <linux/string.h>
14#include <linux/module.h>
15
16#ifdef __HAVE_ARCH_STRCPY
17char *strcpy(char * dest,const char *src)
18{
19 int d0, d1, d2;
20 asm volatile( "1:\tlodsb\n\t"
21 "stosb\n\t"
22 "testb %%al,%%al\n\t"
23 "jne 1b"
24 : "=&S" (d0), "=&D" (d1), "=&a" (d2)
25 :"0" (src),"1" (dest) : "memory");
26 return dest;
27}
28EXPORT_SYMBOL(strcpy);
29#endif
30
31#ifdef __HAVE_ARCH_STRNCPY
32char *strncpy(char * dest,const char *src,size_t count)
33{
34 int d0, d1, d2, d3;
35 asm volatile( "1:\tdecl %2\n\t"
36 "js 2f\n\t"
37 "lodsb\n\t"
38 "stosb\n\t"
39 "testb %%al,%%al\n\t"
40 "jne 1b\n\t"
41 "rep\n\t"
42 "stosb\n"
43 "2:"
44 : "=&S" (d0), "=&D" (d1), "=&c" (d2), "=&a" (d3)
45 :"0" (src),"1" (dest),"2" (count) : "memory");
46 return dest;
47}
48EXPORT_SYMBOL(strncpy);
49#endif
50
51#ifdef __HAVE_ARCH_STRCAT
52char *strcat(char * dest,const char * src)
53{
54 int d0, d1, d2, d3;
55 asm volatile( "repne\n\t"
56 "scasb\n\t"
57 "decl %1\n"
58 "1:\tlodsb\n\t"
59 "stosb\n\t"
60 "testb %%al,%%al\n\t"
61 "jne 1b"
62 : "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3)
63 : "0" (src), "1" (dest), "2" (0), "3" (0xffffffffu): "memory");
64 return dest;
65}
66EXPORT_SYMBOL(strcat);
67#endif
68
69#ifdef __HAVE_ARCH_STRNCAT
70char *strncat(char * dest,const char * src,size_t count)
71{
72 int d0, d1, d2, d3;
73 asm volatile( "repne\n\t"
74 "scasb\n\t"
75 "decl %1\n\t"
76 "movl %8,%3\n"
77 "1:\tdecl %3\n\t"
78 "js 2f\n\t"
79 "lodsb\n\t"
80 "stosb\n\t"
81 "testb %%al,%%al\n\t"
82 "jne 1b\n"
83 "2:\txorl %2,%2\n\t"
84 "stosb"
85 : "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3)
86 : "0" (src),"1" (dest),"2" (0),"3" (0xffffffffu), "g" (count)
87 : "memory");
88 return dest;
89}
90EXPORT_SYMBOL(strncat);
91#endif
92
93#ifdef __HAVE_ARCH_STRCMP
94int strcmp(const char * cs,const char * ct)
95{
96 int d0, d1;
97 int res;
98 asm volatile( "1:\tlodsb\n\t"
99 "scasb\n\t"
100 "jne 2f\n\t"
101 "testb %%al,%%al\n\t"
102 "jne 1b\n\t"
103 "xorl %%eax,%%eax\n\t"
104 "jmp 3f\n"
105 "2:\tsbbl %%eax,%%eax\n\t"
106 "orb $1,%%al\n"
107 "3:"
108 :"=a" (res), "=&S" (d0), "=&D" (d1)
109 :"1" (cs),"2" (ct)
110 :"memory");
111 return res;
112}
113EXPORT_SYMBOL(strcmp);
114#endif
115
116#ifdef __HAVE_ARCH_STRNCMP
117int strncmp(const char * cs,const char * ct,size_t count)
118{
119 int res;
120 int d0, d1, d2;
121 asm volatile( "1:\tdecl %3\n\t"
122 "js 2f\n\t"
123 "lodsb\n\t"
124 "scasb\n\t"
125 "jne 3f\n\t"
126 "testb %%al,%%al\n\t"
127 "jne 1b\n"
128 "2:\txorl %%eax,%%eax\n\t"
129 "jmp 4f\n"
130 "3:\tsbbl %%eax,%%eax\n\t"
131 "orb $1,%%al\n"
132 "4:"
133 :"=a" (res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
134 :"1" (cs),"2" (ct),"3" (count)
135 :"memory");
136 return res;
137}
138EXPORT_SYMBOL(strncmp);
139#endif
140
141#ifdef __HAVE_ARCH_STRCHR
142char *strchr(const char * s, int c)
143{
144 int d0;
145 char * res;
146 asm volatile( "movb %%al,%%ah\n"
147 "1:\tlodsb\n\t"
148 "cmpb %%ah,%%al\n\t"
149 "je 2f\n\t"
150 "testb %%al,%%al\n\t"
151 "jne 1b\n\t"
152 "movl $1,%1\n"
153 "2:\tmovl %1,%0\n\t"
154 "decl %0"
155 :"=a" (res), "=&S" (d0)
156 :"1" (s),"0" (c)
157 :"memory");
158 return res;
159}
160EXPORT_SYMBOL(strchr);
161#endif
162
163#ifdef __HAVE_ARCH_STRRCHR
164char *strrchr(const char * s, int c)
165{
166 int d0, d1;
167 char * res;
168 asm volatile( "movb %%al,%%ah\n"
169 "1:\tlodsb\n\t"
170 "cmpb %%ah,%%al\n\t"
171 "jne 2f\n\t"
172 "leal -1(%%esi),%0\n"
173 "2:\ttestb %%al,%%al\n\t"
174 "jne 1b"
175 :"=g" (res), "=&S" (d0), "=&a" (d1)
176 :"0" (0),"1" (s),"2" (c)
177 :"memory");
178 return res;
179}
180EXPORT_SYMBOL(strrchr);
181#endif
182
183#ifdef __HAVE_ARCH_STRLEN
184size_t strlen(const char * s)
185{
186 int d0;
187 int res;
188 asm volatile( "repne\n\t"
189 "scasb\n\t"
190 "notl %0\n\t"
191 "decl %0"
192 :"=c" (res), "=&D" (d0)
193 :"1" (s),"a" (0), "0" (0xffffffffu)
194 :"memory");
195 return res;
196}
197EXPORT_SYMBOL(strlen);
198#endif
199
200#ifdef __HAVE_ARCH_MEMCHR
201void *memchr(const void *cs,int c,size_t count)
202{
203 int d0;
204 void *res;
205 if (!count)
206 return NULL;
207 asm volatile( "repne\n\t"
208 "scasb\n\t"
209 "je 1f\n\t"
210 "movl $1,%0\n"
211 "1:\tdecl %0"
212 :"=D" (res), "=&c" (d0)
213 :"a" (c),"0" (cs),"1" (count)
214 :"memory");
215 return res;
216}
217EXPORT_SYMBOL(memchr);
218#endif
219
220#ifdef __HAVE_ARCH_MEMSCAN
221void *memscan(void * addr, int c, size_t size)
222{
223 if (!size)
224 return addr;
225 asm volatile("repnz; scasb\n\t"
226 "jnz 1f\n\t"
227 "dec %%edi\n"
228 "1:"
229 : "=D" (addr), "=c" (size)
230 : "0" (addr), "1" (size), "a" (c)
231 : "memory");
232 return addr;
233}
234EXPORT_SYMBOL(memscan);
235#endif
236
237#ifdef __HAVE_ARCH_STRNLEN
238size_t strnlen(const char *s, size_t count)
239{
240 int d0;
241 int res;
242 asm volatile( "movl %2,%0\n\t"
243 "jmp 2f\n"
244 "1:\tcmpb $0,(%0)\n\t"
245 "je 3f\n\t"
246 "incl %0\n"
247 "2:\tdecl %1\n\t"
248 "cmpl $-1,%1\n\t"
249 "jne 1b\n"
250 "3:\tsubl %2,%0"
251 :"=a" (res), "=&d" (d0)
252 :"c" (s),"1" (count)
253 :"memory");
254 return res;
255}
256EXPORT_SYMBOL(strnlen);
257#endif
diff --git a/arch/i386/mach-es7000/es7000plat.c b/arch/i386/mach-es7000/es7000plat.c
index 9be6ceabf042..ab99072d3f9a 100644
--- a/arch/i386/mach-es7000/es7000plat.c
+++ b/arch/i386/mach-es7000/es7000plat.c
@@ -40,6 +40,7 @@
40#include <asm/smp.h> 40#include <asm/smp.h>
41#include <asm/apicdef.h> 41#include <asm/apicdef.h>
42#include "es7000.h" 42#include "es7000.h"
43#include <mach_mpparse.h>
43 44
44/* 45/*
45 * ES7000 Globals 46 * ES7000 Globals
@@ -174,6 +175,53 @@ find_unisys_acpi_oem_table(unsigned long *oem_addr)
174} 175}
175#endif 176#endif
176 177
178/*
179 * This file also gets compiled if CONFIG_X86_GENERICARCH is set. Generic
180 * arch already has got following function definitions (asm-generic/es7000.c)
181 * hence no need to define these for that case.
182 */
183#ifndef CONFIG_X86_GENERICARCH
184void es7000_sw_apic(void);
185void __init enable_apic_mode(void)
186{
187 es7000_sw_apic();
188 return;
189}
190
191__init int mps_oem_check(struct mp_config_table *mpc, char *oem,
192 char *productid)
193{
194 if (mpc->mpc_oemptr) {
195 struct mp_config_oemtable *oem_table =
196 (struct mp_config_oemtable *)mpc->mpc_oemptr;
197 if (!strncmp(oem, "UNISYS", 6))
198 return parse_unisys_oem((char *)oem_table);
199 }
200 return 0;
201}
202#ifdef CONFIG_ACPI
203/* Hook from generic ACPI tables.c */
204int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
205{
206 unsigned long oem_addr;
207 if (!find_unisys_acpi_oem_table(&oem_addr)) {
208 if (es7000_check_dsdt())
209 return parse_unisys_oem((char *)oem_addr);
210 else {
211 setup_unisys();
212 return 1;
213 }
214 }
215 return 0;
216}
217#else
218int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
219{
220 return 0;
221}
222#endif
223#endif /* COFIG_X86_GENERICARCH */
224
177static void 225static void
178es7000_spin(int n) 226es7000_spin(int n)
179{ 227{
diff --git a/arch/i386/mach-generic/es7000.c b/arch/i386/mach-generic/es7000.c
index b47f951c0ec2..4742626f08c4 100644
--- a/arch/i386/mach-generic/es7000.c
+++ b/arch/i386/mach-generic/es7000.c
@@ -66,4 +66,4 @@ static int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
66} 66}
67#endif 67#endif
68 68
69struct genapic apic_es7000 = APIC_INIT("es7000", probe_es7000); 69struct genapic __initdata_refok apic_es7000 = APIC_INIT("es7000", probe_es7000);
diff --git a/arch/i386/mach-visws/traps.c b/arch/i386/mach-visws/traps.c
index 5199bd03254a..843b67acf43b 100644
--- a/arch/i386/mach-visws/traps.c
+++ b/arch/i386/mach-visws/traps.c
@@ -23,13 +23,13 @@ static __init void lithium_init(void)
23 set_fixmap(FIX_LI_PCIB, LI_PCI_B_PHYS); 23 set_fixmap(FIX_LI_PCIB, LI_PCI_B_PHYS);
24 24
25 if ((li_pcia_read16(PCI_VENDOR_ID) != PCI_VENDOR_ID_SGI) || 25 if ((li_pcia_read16(PCI_VENDOR_ID) != PCI_VENDOR_ID_SGI) ||
26 (li_pcia_read16(PCI_DEVICE_ID) != PCI_VENDOR_ID_SGI_LITHIUM)) { 26 (li_pcia_read16(PCI_DEVICE_ID) != PCI_DEVICE_ID_SGI_LITHIUM)) {
27 printk(KERN_EMERG "Lithium hostbridge %c not found\n", 'A'); 27 printk(KERN_EMERG "Lithium hostbridge %c not found\n", 'A');
28 panic("This machine is not SGI Visual Workstation 320/540"); 28 panic("This machine is not SGI Visual Workstation 320/540");
29 } 29 }
30 30
31 if ((li_pcib_read16(PCI_VENDOR_ID) != PCI_VENDOR_ID_SGI) || 31 if ((li_pcib_read16(PCI_VENDOR_ID) != PCI_VENDOR_ID_SGI) ||
32 (li_pcib_read16(PCI_DEVICE_ID) != PCI_VENDOR_ID_SGI_LITHIUM)) { 32 (li_pcib_read16(PCI_DEVICE_ID) != PCI_DEVICE_ID_SGI_LITHIUM)) {
33 printk(KERN_EMERG "Lithium hostbridge %c not found\n", 'B'); 33 printk(KERN_EMERG "Lithium hostbridge %c not found\n", 'B');
34 panic("This machine is not SGI Visual Workstation 320/540"); 34 panic("This machine is not SGI Visual Workstation 320/540");
35 } 35 }
diff --git a/arch/i386/mach-voyager/voyager_thread.c b/arch/i386/mach-voyager/voyager_thread.c
index b4b24e0e45e1..f9d595338159 100644
--- a/arch/i386/mach-voyager/voyager_thread.c
+++ b/arch/i386/mach-voyager/voyager_thread.c
@@ -52,7 +52,7 @@ execute(const char *string)
52 NULL, 52 NULL,
53 }; 53 };
54 54
55 if ((ret = call_usermodehelper(argv[0], argv, envp, 1)) != 0) { 55 if ((ret = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC)) != 0) {
56 printk(KERN_ERR "Voyager failed to run \"%s\": %i\n", 56 printk(KERN_ERR "Voyager failed to run \"%s\": %i\n",
57 string, ret); 57 string, ret);
58 } 58 }
diff --git a/arch/i386/math-emu/fpu_entry.c b/arch/i386/math-emu/fpu_entry.c
index ddf8fa3bbd01..1853524c8b57 100644
--- a/arch/i386/math-emu/fpu_entry.c
+++ b/arch/i386/math-emu/fpu_entry.c
@@ -754,7 +754,7 @@ int save_i387_soft(void *s387, struct _fpstate __user * buf)
754 return -1; 754 return -1;
755 if ( offset ) 755 if ( offset )
756 if (__copy_to_user(d+other, (u_char *)&S387->st_space, offset)) 756 if (__copy_to_user(d+other, (u_char *)&S387->st_space, offset))
757 return -1 757 return -1;
758 RE_ENTRANT_CHECK_ON; 758 RE_ENTRANT_CHECK_ON;
759 759
760 return 1; 760 return 1;
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
index 29d7d61543a1..e92a10124935 100644
--- a/arch/i386/mm/fault.c
+++ b/arch/i386/mm/fault.c
@@ -303,6 +303,7 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
303 struct vm_area_struct * vma; 303 struct vm_area_struct * vma;
304 unsigned long address; 304 unsigned long address;
305 int write, si_code; 305 int write, si_code;
306 int fault;
306 307
307 /* get the address */ 308 /* get the address */
308 address = read_cr2(); 309 address = read_cr2();
@@ -422,20 +423,18 @@ good_area:
422 * make sure we exit gracefully rather than endlessly redo 423 * make sure we exit gracefully rather than endlessly redo
423 * the fault. 424 * the fault.
424 */ 425 */
425 switch (handle_mm_fault(mm, vma, address, write)) { 426 fault = handle_mm_fault(mm, vma, address, write);
426 case VM_FAULT_MINOR: 427 if (unlikely(fault & VM_FAULT_ERROR)) {
427 tsk->min_flt++; 428 if (fault & VM_FAULT_OOM)
428 break;
429 case VM_FAULT_MAJOR:
430 tsk->maj_flt++;
431 break;
432 case VM_FAULT_SIGBUS:
433 goto do_sigbus;
434 case VM_FAULT_OOM:
435 goto out_of_memory; 429 goto out_of_memory;
436 default: 430 else if (fault & VM_FAULT_SIGBUS)
437 BUG(); 431 goto do_sigbus;
432 BUG();
438 } 433 }
434 if (fault & VM_FAULT_MAJOR)
435 tsk->maj_flt++;
436 else
437 tsk->min_flt++;
439 438
440 /* 439 /*
441 * Did it hit the DOS screen memory VA from vm86 mode? 440 * Did it hit the DOS screen memory VA from vm86 mode?
@@ -458,6 +457,11 @@ bad_area:
458bad_area_nosemaphore: 457bad_area_nosemaphore:
459 /* User mode accesses just cause a SIGSEGV */ 458 /* User mode accesses just cause a SIGSEGV */
460 if (error_code & 4) { 459 if (error_code & 4) {
460 /*
461 * It's possible to have interrupts off here.
462 */
463 local_irq_enable();
464
461 /* 465 /*
462 * Valid to do another page fault here because this one came 466 * Valid to do another page fault here because this one came
463 * from user space. 467 * from user space.
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c
index b22ce8d6b1ba..e1a9a805c445 100644
--- a/arch/i386/mm/init.c
+++ b/arch/i386/mm/init.c
@@ -87,7 +87,7 @@ static pte_t * __init one_page_table_init(pmd_t *pmd)
87 if (!(pmd_val(*pmd) & _PAGE_PRESENT)) { 87 if (!(pmd_val(*pmd) & _PAGE_PRESENT)) {
88 pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); 88 pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
89 89
90 paravirt_alloc_pt(__pa(page_table) >> PAGE_SHIFT); 90 paravirt_alloc_pt(&init_mm, __pa(page_table) >> PAGE_SHIFT);
91 set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE)); 91 set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
92 BUG_ON(page_table != pte_offset_kernel(pmd, 0)); 92 BUG_ON(page_table != pte_offset_kernel(pmd, 0));
93 } 93 }
@@ -471,8 +471,13 @@ void zap_low_mappings (void)
471 flush_tlb_all(); 471 flush_tlb_all();
472} 472}
473 473
474int nx_enabled = 0;
475
476#ifdef CONFIG_X86_PAE
477
474static int disable_nx __initdata = 0; 478static int disable_nx __initdata = 0;
475u64 __supported_pte_mask __read_mostly = ~_PAGE_NX; 479u64 __supported_pte_mask __read_mostly = ~_PAGE_NX;
480EXPORT_SYMBOL_GPL(__supported_pte_mask);
476 481
477/* 482/*
478 * noexec = on|off 483 * noexec = on|off
@@ -499,9 +504,6 @@ static int __init noexec_setup(char *str)
499} 504}
500early_param("noexec", noexec_setup); 505early_param("noexec", noexec_setup);
501 506
502int nx_enabled = 0;
503#ifdef CONFIG_X86_PAE
504
505static void __init set_nx(void) 507static void __init set_nx(void)
506{ 508{
507 unsigned int v[4], l, h; 509 unsigned int v[4], l, h;
@@ -751,8 +753,7 @@ void __init pgtable_cache_init(void)
751 PTRS_PER_PMD*sizeof(pmd_t), 753 PTRS_PER_PMD*sizeof(pmd_t),
752 PTRS_PER_PMD*sizeof(pmd_t), 754 PTRS_PER_PMD*sizeof(pmd_t),
753 SLAB_PANIC, 755 SLAB_PANIC,
754 pmd_ctor, 756 pmd_ctor);
755 NULL);
756 if (!SHARED_KERNEL_PMD) { 757 if (!SHARED_KERNEL_PMD) {
757 /* If we're in PAE mode and have a non-shared 758 /* If we're in PAE mode and have a non-shared
758 kernel pmd, then the pgd size must be a 759 kernel pmd, then the pgd size must be a
@@ -799,6 +800,7 @@ void mark_rodata_ro(void)
799 unsigned long start = PFN_ALIGN(_text); 800 unsigned long start = PFN_ALIGN(_text);
800 unsigned long size = PFN_ALIGN(_etext) - start; 801 unsigned long size = PFN_ALIGN(_etext) - start;
801 802
803#ifndef CONFIG_KPROBES
802#ifdef CONFIG_HOTPLUG_CPU 804#ifdef CONFIG_HOTPLUG_CPU
803 /* It must still be possible to apply SMP alternatives. */ 805 /* It must still be possible to apply SMP alternatives. */
804 if (num_possible_cpus() <= 1) 806 if (num_possible_cpus() <= 1)
@@ -808,7 +810,7 @@ void mark_rodata_ro(void)
808 size >> PAGE_SHIFT, PAGE_KERNEL_RX); 810 size >> PAGE_SHIFT, PAGE_KERNEL_RX);
809 printk("Write protecting the kernel text: %luk\n", size >> 10); 811 printk("Write protecting the kernel text: %luk\n", size >> 10);
810 } 812 }
811 813#endif
812 start += size; 814 start += size;
813 size = (unsigned long)__end_rodata - start; 815 size = (unsigned long)__end_rodata - start;
814 change_page_attr(virt_to_page(start), 816 change_page_attr(virt_to_page(start),
diff --git a/arch/i386/mm/ioremap.c b/arch/i386/mm/ioremap.c
index fff08ae7b5ed..0b278315d737 100644
--- a/arch/i386/mm/ioremap.c
+++ b/arch/i386/mm/ioremap.c
@@ -196,7 +196,7 @@ void iounmap(volatile void __iomem *addr)
196 /* Reset the direct mapping. Can block */ 196 /* Reset the direct mapping. Can block */
197 if ((p->flags >> 20) && p->phys_addr < virt_to_phys(high_memory) - 1) { 197 if ((p->flags >> 20) && p->phys_addr < virt_to_phys(high_memory) - 1) {
198 change_page_attr(virt_to_page(__va(p->phys_addr)), 198 change_page_attr(virt_to_page(__va(p->phys_addr)),
199 p->size >> PAGE_SHIFT, 199 get_vm_area_size(p) >> PAGE_SHIFT,
200 PAGE_KERNEL); 200 PAGE_KERNEL);
201 global_flush_tlb(); 201 global_flush_tlb();
202 } 202 }
diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c
index 47bd477c8ecc..8927222b3ab2 100644
--- a/arch/i386/mm/pageattr.c
+++ b/arch/i386/mm/pageattr.c
@@ -60,7 +60,7 @@ static struct page *split_large_page(unsigned long address, pgprot_t prot,
60 address = __pa(address); 60 address = __pa(address);
61 addr = address & LARGE_PAGE_MASK; 61 addr = address & LARGE_PAGE_MASK;
62 pbase = (pte_t *)page_address(base); 62 pbase = (pte_t *)page_address(base);
63 paravirt_alloc_pt(page_to_pfn(base)); 63 paravirt_alloc_pt(&init_mm, page_to_pfn(base));
64 for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) { 64 for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) {
65 set_pte(&pbase[i], pfn_pte(addr >> PAGE_SHIFT, 65 set_pte(&pbase[i], pfn_pte(addr >> PAGE_SHIFT,
66 addr == address ? prot : ref_prot)); 66 addr == address ? prot : ref_prot));
@@ -68,14 +68,23 @@ static struct page *split_large_page(unsigned long address, pgprot_t prot,
68 return base; 68 return base;
69} 69}
70 70
71static void flush_kernel_map(void *arg) 71static void cache_flush_page(struct page *p)
72{ 72{
73 unsigned long adr = (unsigned long)arg; 73 unsigned long adr = (unsigned long)page_address(p);
74 int i;
75 for (i = 0; i < PAGE_SIZE; i += boot_cpu_data.x86_clflush_size)
76 asm volatile("clflush (%0)" :: "r" (adr + i));
77}
78
79static void flush_kernel_map(void *arg)
80{
81 struct list_head *lh = (struct list_head *)arg;
82 struct page *p;
74 83
75 if (adr && cpu_has_clflush) { 84 /* High level code is not ready for clflush yet */
76 int i; 85 if (cpu_has_clflush) {
77 for (i = 0; i < PAGE_SIZE; i += boot_cpu_data.x86_clflush_size) 86 list_for_each_entry (p, lh, lru)
78 asm volatile("clflush (%0)" :: "r" (adr + i)); 87 cache_flush_page(p);
79 } else if (boot_cpu_data.x86_model >= 4) 88 } else if (boot_cpu_data.x86_model >= 4)
80 wbinvd(); 89 wbinvd();
81 90
@@ -127,6 +136,12 @@ static inline void revert_page(struct page *kpte_page, unsigned long address)
127 ref_prot)); 136 ref_prot));
128} 137}
129 138
139static inline void save_page(struct page *kpte_page)
140{
141 if (!test_and_set_bit(PG_arch_1, &kpte_page->flags))
142 list_add(&kpte_page->lru, &df_list);
143}
144
130static int 145static int
131__change_page_attr(struct page *page, pgprot_t prot) 146__change_page_attr(struct page *page, pgprot_t prot)
132{ 147{
@@ -141,6 +156,9 @@ __change_page_attr(struct page *page, pgprot_t prot)
141 if (!kpte) 156 if (!kpte)
142 return -EINVAL; 157 return -EINVAL;
143 kpte_page = virt_to_page(kpte); 158 kpte_page = virt_to_page(kpte);
159 BUG_ON(PageLRU(kpte_page));
160 BUG_ON(PageCompound(kpte_page));
161
144 if (pgprot_val(prot) != pgprot_val(PAGE_KERNEL)) { 162 if (pgprot_val(prot) != pgprot_val(PAGE_KERNEL)) {
145 if (!pte_huge(*kpte)) { 163 if (!pte_huge(*kpte)) {
146 set_pte_atomic(kpte, mk_pte(page, prot)); 164 set_pte_atomic(kpte, mk_pte(page, prot));
@@ -170,20 +188,20 @@ __change_page_attr(struct page *page, pgprot_t prot)
170 * time (not via split_large_page) and in turn we must not 188 * time (not via split_large_page) and in turn we must not
171 * replace it with a largepage. 189 * replace it with a largepage.
172 */ 190 */
191
192 save_page(kpte_page);
173 if (!PageReserved(kpte_page)) { 193 if (!PageReserved(kpte_page)) {
174 if (cpu_has_pse && (page_private(kpte_page) == 0)) { 194 if (cpu_has_pse && (page_private(kpte_page) == 0)) {
175 ClearPagePrivate(kpte_page);
176 paravirt_release_pt(page_to_pfn(kpte_page)); 195 paravirt_release_pt(page_to_pfn(kpte_page));
177 list_add(&kpte_page->lru, &df_list);
178 revert_page(kpte_page, address); 196 revert_page(kpte_page, address);
179 } 197 }
180 } 198 }
181 return 0; 199 return 0;
182} 200}
183 201
184static inline void flush_map(void *adr) 202static inline void flush_map(struct list_head *l)
185{ 203{
186 on_each_cpu(flush_kernel_map, adr, 1, 1); 204 on_each_cpu(flush_kernel_map, l, 1, 1);
187} 205}
188 206
189/* 207/*
@@ -225,11 +243,13 @@ void global_flush_tlb(void)
225 spin_lock_irq(&cpa_lock); 243 spin_lock_irq(&cpa_lock);
226 list_replace_init(&df_list, &l); 244 list_replace_init(&df_list, &l);
227 spin_unlock_irq(&cpa_lock); 245 spin_unlock_irq(&cpa_lock);
228 if (!cpu_has_clflush) 246 flush_map(&l);
229 flush_map(NULL);
230 list_for_each_entry_safe(pg, next, &l, lru) { 247 list_for_each_entry_safe(pg, next, &l, lru) {
231 if (cpu_has_clflush) 248 list_del(&pg->lru);
232 flush_map(page_address(pg)); 249 clear_bit(PG_arch_1, &pg->flags);
250 if (PageReserved(pg) || !cpu_has_pse || page_private(pg) != 0)
251 continue;
252 ClearPagePrivate(pg);
233 __free_page(pg); 253 __free_page(pg);
234 } 254 }
235} 255}
diff --git a/arch/i386/mm/pgtable.c b/arch/i386/mm/pgtable.c
index 8d7c0864cc04..01437c46baae 100644
--- a/arch/i386/mm/pgtable.c
+++ b/arch/i386/mm/pgtable.c
@@ -235,7 +235,7 @@ static inline void pgd_list_del(pgd_t *pgd)
235 235
236#if (PTRS_PER_PMD == 1) 236#if (PTRS_PER_PMD == 1)
237/* Non-PAE pgd constructor */ 237/* Non-PAE pgd constructor */
238void pgd_ctor(void *pgd) 238static void pgd_ctor(void *pgd)
239{ 239{
240 unsigned long flags; 240 unsigned long flags;
241 241
@@ -257,7 +257,7 @@ void pgd_ctor(void *pgd)
257} 257}
258#else /* PTRS_PER_PMD > 1 */ 258#else /* PTRS_PER_PMD > 1 */
259/* PAE pgd constructor */ 259/* PAE pgd constructor */
260void pgd_ctor(void *pgd) 260static void pgd_ctor(void *pgd)
261{ 261{
262 /* PAE, kernel PMD may be shared */ 262 /* PAE, kernel PMD may be shared */
263 263
@@ -276,7 +276,7 @@ void pgd_ctor(void *pgd)
276} 276}
277#endif /* PTRS_PER_PMD */ 277#endif /* PTRS_PER_PMD */
278 278
279void pgd_dtor(void *pgd) 279static void pgd_dtor(void *pgd)
280{ 280{
281 unsigned long flags; /* can be called from interrupt context */ 281 unsigned long flags; /* can be called from interrupt context */
282 282
diff --git a/arch/i386/pci/acpi.c b/arch/i386/pci/acpi.c
index b33aea845f58..bc8a44bddaa7 100644
--- a/arch/i386/pci/acpi.c
+++ b/arch/i386/pci/acpi.c
@@ -8,20 +8,42 @@
8struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int domain, int busnum) 8struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int domain, int busnum)
9{ 9{
10 struct pci_bus *bus; 10 struct pci_bus *bus;
11 struct pci_sysdata *sd;
12 int pxm;
13
14 /* Allocate per-root-bus (not per bus) arch-specific data.
15 * TODO: leak; this memory is never freed.
16 * It's arguable whether it's worth the trouble to care.
17 */
18 sd = kzalloc(sizeof(*sd), GFP_KERNEL);
19 if (!sd) {
20 printk(KERN_ERR "PCI: OOM, not probing PCI bus %02x\n", busnum);
21 return NULL;
22 }
11 23
12 if (domain != 0) { 24 if (domain != 0) {
13 printk(KERN_WARNING "PCI: Multiple domains not supported\n"); 25 printk(KERN_WARNING "PCI: Multiple domains not supported\n");
26 kfree(sd);
14 return NULL; 27 return NULL;
15 } 28 }
16 29
17 bus = pcibios_scan_root(busnum); 30 sd->node = -1;
31
32 pxm = acpi_get_pxm(device->handle);
33#ifdef CONFIG_ACPI_NUMA
34 if (pxm >= 0)
35 sd->node = pxm_to_node(pxm);
36#endif
37
38 bus = pci_scan_bus_parented(NULL, busnum, &pci_root_ops, sd);
39 if (!bus)
40 kfree(sd);
41
18#ifdef CONFIG_ACPI_NUMA 42#ifdef CONFIG_ACPI_NUMA
19 if (bus != NULL) { 43 if (bus != NULL) {
20 int pxm = acpi_get_pxm(device->handle);
21 if (pxm >= 0) { 44 if (pxm >= 0) {
22 bus->sysdata = (void *)(unsigned long)pxm_to_node(pxm); 45 printk("bus %d -> pxm %d -> node %d\n",
23 printk("bus %d -> pxm %d -> node %ld\n", 46 busnum, pxm, sd->node);
24 busnum, pxm, (long)(bus->sysdata));
25 } 47 }
26 } 48 }
27#endif 49#endif
diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c
index 3f78d4d8ecf3..85503deeda46 100644
--- a/arch/i386/pci/common.c
+++ b/arch/i386/pci/common.c
@@ -293,6 +293,7 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
293struct pci_bus * __devinit pcibios_scan_root(int busnum) 293struct pci_bus * __devinit pcibios_scan_root(int busnum)
294{ 294{
295 struct pci_bus *bus = NULL; 295 struct pci_bus *bus = NULL;
296 struct pci_sysdata *sd;
296 297
297 dmi_check_system(pciprobe_dmi_table); 298 dmi_check_system(pciprobe_dmi_table);
298 299
@@ -303,9 +304,19 @@ struct pci_bus * __devinit pcibios_scan_root(int busnum)
303 } 304 }
304 } 305 }
305 306
307 /* Allocate per-root-bus (not per bus) arch-specific data.
308 * TODO: leak; this memory is never freed.
309 * It's arguable whether it's worth the trouble to care.
310 */
311 sd = kzalloc(sizeof(*sd), GFP_KERNEL);
312 if (!sd) {
313 printk(KERN_ERR "PCI: OOM, not probing PCI bus %02x\n", busnum);
314 return NULL;
315 }
316
306 printk(KERN_DEBUG "PCI: Probing PCI hardware (bus %02x)\n", busnum); 317 printk(KERN_DEBUG "PCI: Probing PCI hardware (bus %02x)\n", busnum);
307 318
308 return pci_scan_bus_parented(NULL, busnum, &pci_root_ops, NULL); 319 return pci_scan_bus_parented(NULL, busnum, &pci_root_ops, sd);
309} 320}
310 321
311extern u8 pci_cache_line_size; 322extern u8 pci_cache_line_size;
diff --git a/arch/i386/pci/fixup.c b/arch/i386/pci/fixup.c
index b95b42950ed4..e7306dbf6c42 100644
--- a/arch/i386/pci/fixup.c
+++ b/arch/i386/pci/fixup.c
@@ -118,12 +118,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, pci
118static void pci_fixup_via_northbridge_bug(struct pci_dev *d) 118static void pci_fixup_via_northbridge_bug(struct pci_dev *d)
119{ 119{
120 u8 v; 120 u8 v;
121 u8 revision;
122 int where = 0x55; 121 int where = 0x55;
123 int mask = 0x1f; /* clear bits 5, 6, 7 by default */ 122 int mask = 0x1f; /* clear bits 5, 6, 7 by default */
124 123
125 pci_read_config_byte(d, PCI_REVISION_ID, &revision);
126
127 if (d->device == PCI_DEVICE_ID_VIA_8367_0) { 124 if (d->device == PCI_DEVICE_ID_VIA_8367_0) {
128 /* fix pci bus latency issues resulted by NB bios error 125 /* fix pci bus latency issues resulted by NB bios error
129 it appears on bug free^Wreduced kt266x's bios forces 126 it appears on bug free^Wreduced kt266x's bios forces
@@ -133,8 +130,8 @@ static void pci_fixup_via_northbridge_bug(struct pci_dev *d)
133 where = 0x95; /* the memory write queue timer register is 130 where = 0x95; /* the memory write queue timer register is
134 different for the KT266x's: 0x95 not 0x55 */ 131 different for the KT266x's: 0x95 not 0x55 */
135 } else if (d->device == PCI_DEVICE_ID_VIA_8363_0 && 132 } else if (d->device == PCI_DEVICE_ID_VIA_8363_0 &&
136 (revision == VIA_8363_KL133_REVISION_ID || 133 (d->revision == VIA_8363_KL133_REVISION_ID ||
137 revision == VIA_8363_KM133_REVISION_ID)) { 134 d->revision == VIA_8363_KM133_REVISION_ID)) {
138 mask = 0x3f; /* clear only bits 6 and 7; clearing bit 5 135 mask = 0x3f; /* clear only bits 6 and 7; clearing bit 5
139 causes screen corruption on the KL133/KM133 */ 136 causes screen corruption on the KL133/KM133 */
140 } 137 }
@@ -142,7 +139,7 @@ static void pci_fixup_via_northbridge_bug(struct pci_dev *d)
142 pci_read_config_byte(d, where, &v); 139 pci_read_config_byte(d, where, &v);
143 if (v & ~mask) { 140 if (v & ~mask) {
144 printk(KERN_WARNING "Disabling VIA memory write queue (PCI ID %04x, rev %02x): [%02x] %02x & %02x -> %02x\n", \ 141 printk(KERN_WARNING "Disabling VIA memory write queue (PCI ID %04x, rev %02x): [%02x] %02x & %02x -> %02x\n", \
145 d->device, revision, where, v, mask, v & mask); 142 d->device, d->revision, where, v, mask, v & mask);
146 v &= mask; 143 v &= mask;
147 pci_write_config_byte(d, where, v); 144 pci_write_config_byte(d, where, v);
148 } 145 }
diff --git a/arch/i386/pci/mmconfig-shared.c b/arch/i386/pci/mmconfig-shared.c
index c7cabeed4d7b..4df637e34f81 100644
--- a/arch/i386/pci/mmconfig-shared.c
+++ b/arch/i386/pci/mmconfig-shared.c
@@ -24,6 +24,9 @@
24 24
25DECLARE_BITMAP(pci_mmcfg_fallback_slots, 32*PCI_MMCFG_MAX_CHECK_BUS); 25DECLARE_BITMAP(pci_mmcfg_fallback_slots, 32*PCI_MMCFG_MAX_CHECK_BUS);
26 26
27/* Indicate if the mmcfg resources have been placed into the resource table. */
28static int __initdata pci_mmcfg_resources_inserted;
29
27/* K8 systems have some devices (typically in the builtin northbridge) 30/* K8 systems have some devices (typically in the builtin northbridge)
28 that are only accessible using type1 31 that are only accessible using type1
29 Normally this can be expressed in the MCFG by not listing them 32 Normally this can be expressed in the MCFG by not listing them
@@ -170,7 +173,7 @@ static int __init pci_mmcfg_check_hostbridge(void)
170 return name != NULL; 173 return name != NULL;
171} 174}
172 175
173static void __init pci_mmcfg_insert_resources(void) 176static void __init pci_mmcfg_insert_resources(unsigned long resource_flags)
174{ 177{
175#define PCI_MMCFG_RESOURCE_NAME_LEN 19 178#define PCI_MMCFG_RESOURCE_NAME_LEN 19
176 int i; 179 int i;
@@ -194,10 +197,13 @@ static void __init pci_mmcfg_insert_resources(void)
194 cfg->pci_segment); 197 cfg->pci_segment);
195 res->start = cfg->address; 198 res->start = cfg->address;
196 res->end = res->start + (num_buses << 20) - 1; 199 res->end = res->start + (num_buses << 20) - 1;
197 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; 200 res->flags = IORESOURCE_MEM | resource_flags;
198 insert_resource(&iomem_resource, res); 201 insert_resource(&iomem_resource, res);
199 names += PCI_MMCFG_RESOURCE_NAME_LEN; 202 names += PCI_MMCFG_RESOURCE_NAME_LEN;
200 } 203 }
204
205 /* Mark that the resources have been inserted. */
206 pci_mmcfg_resources_inserted = 1;
201} 207}
202 208
203static void __init pci_mmcfg_reject_broken(int type) 209static void __init pci_mmcfg_reject_broken(int type)
@@ -267,7 +273,43 @@ void __init pci_mmcfg_init(int type)
267 if (type == 1) 273 if (type == 1)
268 unreachable_devices(); 274 unreachable_devices();
269 if (known_bridge) 275 if (known_bridge)
270 pci_mmcfg_insert_resources(); 276 pci_mmcfg_insert_resources(IORESOURCE_BUSY);
271 pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; 277 pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
278 } else {
279 /*
280 * Signal not to attempt to insert mmcfg resources because
281 * the architecture mmcfg setup could not initialize.
282 */
283 pci_mmcfg_resources_inserted = 1;
272 } 284 }
273} 285}
286
287static int __init pci_mmcfg_late_insert_resources(void)
288{
289 /*
290 * If resources are already inserted or we are not using MMCONFIG,
291 * don't insert the resources.
292 */
293 if ((pci_mmcfg_resources_inserted == 1) ||
294 (pci_probe & PCI_PROBE_MMCONF) == 0 ||
295 (pci_mmcfg_config_num == 0) ||
296 (pci_mmcfg_config == NULL) ||
297 (pci_mmcfg_config[0].address == 0))
298 return 1;
299
300 /*
301 * Attempt to insert the mmcfg resources but not with the busy flag
302 * marked so it won't cause request errors when __request_region is
303 * called.
304 */
305 pci_mmcfg_insert_resources(0);
306
307 return 0;
308}
309
310/*
311 * Perform MMCONFIG resource insertion after PCI initialization to allow for
312 * misprogrammed MCFG tables that state larger sizes but actually conflict
313 * with other system resources.
314 */
315late_initcall(pci_mmcfg_late_insert_resources);
diff --git a/arch/i386/video/Makefile b/arch/i386/video/Makefile
new file mode 100644
index 000000000000..2c447c94adcc
--- /dev/null
+++ b/arch/i386/video/Makefile
@@ -0,0 +1 @@
obj-$(CONFIG_FB) += fbdev.o
diff --git a/arch/i386/video/fbdev.c b/arch/i386/video/fbdev.c
new file mode 100644
index 000000000000..48fb38d7d2c0
--- /dev/null
+++ b/arch/i386/video/fbdev.c
@@ -0,0 +1,32 @@
1/*
2 * arch/i386/video/fbdev.c - i386 Framebuffer
3 *
4 * Copyright (C) 2007 Antonino Daplas <adaplas@gmail.com>
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 */
11#include <linux/fb.h>
12#include <linux/pci.h>
13
14int fb_is_primary_device(struct fb_info *info)
15{
16 struct device *device = info->device;
17 struct pci_dev *pci_dev = NULL;
18 struct resource *res = NULL;
19 int retval = 0;
20
21 if (device)
22 pci_dev = to_pci_dev(device);
23
24 if (pci_dev)
25 res = &pci_dev->resource[PCI_ROM_RESOURCE];
26
27 if (res && res->flags & IORESOURCE_ROM_SHADOW)
28 retval = 1;
29
30 return retval;
31}
32EXPORT_SYMBOL(fb_is_primary_device);
diff --git a/arch/i386/xen/Kconfig b/arch/i386/xen/Kconfig
new file mode 100644
index 000000000000..9df99e1885a4
--- /dev/null
+++ b/arch/i386/xen/Kconfig
@@ -0,0 +1,11 @@
1#
2# This Kconfig describes xen options
3#
4
5config XEN
6 bool "Enable support for Xen hypervisor"
7 depends on PARAVIRT && X86_CMPXCHG && X86_TSC && !NEED_MULTIPLE_NODES
8 help
9 This is the Linux Xen port. Enabling this will allow the
10 kernel to boot in a paravirtualized environment under the
11 Xen hypervisor.
diff --git a/arch/i386/xen/Makefile b/arch/i386/xen/Makefile
new file mode 100644
index 000000000000..343df246bd3e
--- /dev/null
+++ b/arch/i386/xen/Makefile
@@ -0,0 +1,4 @@
1obj-y := enlighten.o setup.o features.o multicalls.o mmu.o \
2 events.o time.o manage.o xen-asm.o
3
4obj-$(CONFIG_SMP) += smp.o
diff --git a/arch/i386/xen/enlighten.c b/arch/i386/xen/enlighten.c
new file mode 100644
index 000000000000..9a8c1181c001
--- /dev/null
+++ b/arch/i386/xen/enlighten.c
@@ -0,0 +1,1144 @@
1/*
2 * Core of Xen paravirt_ops implementation.
3 *
4 * This file contains the xen_paravirt_ops structure itself, and the
5 * implementations for:
6 * - privileged instructions
7 * - interrupt flags
8 * - segment operations
9 * - booting and setup
10 *
11 * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/smp.h>
17#include <linux/preempt.h>
18#include <linux/hardirq.h>
19#include <linux/percpu.h>
20#include <linux/delay.h>
21#include <linux/start_kernel.h>
22#include <linux/sched.h>
23#include <linux/bootmem.h>
24#include <linux/module.h>
25#include <linux/mm.h>
26#include <linux/page-flags.h>
27#include <linux/highmem.h>
28#include <linux/smp.h>
29
30#include <xen/interface/xen.h>
31#include <xen/interface/physdev.h>
32#include <xen/interface/vcpu.h>
33#include <xen/interface/sched.h>
34#include <xen/features.h>
35#include <xen/page.h>
36
37#include <asm/paravirt.h>
38#include <asm/page.h>
39#include <asm/xen/hypercall.h>
40#include <asm/xen/hypervisor.h>
41#include <asm/fixmap.h>
42#include <asm/processor.h>
43#include <asm/setup.h>
44#include <asm/desc.h>
45#include <asm/pgtable.h>
46#include <asm/tlbflush.h>
47#include <asm/reboot.h>
48
49#include "xen-ops.h"
50#include "mmu.h"
51#include "multicalls.h"
52
53EXPORT_SYMBOL_GPL(hypercall_page);
54
55DEFINE_PER_CPU(enum paravirt_lazy_mode, xen_lazy_mode);
56
57DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu);
58DEFINE_PER_CPU(struct vcpu_info, xen_vcpu_info);
59DEFINE_PER_CPU(unsigned long, xen_cr3);
60
61struct start_info *xen_start_info;
62EXPORT_SYMBOL_GPL(xen_start_info);
63
64static /* __initdata */ struct shared_info dummy_shared_info;
65
66/*
67 * Point at some empty memory to start with. We map the real shared_info
68 * page as soon as fixmap is up and running.
69 */
70struct shared_info *HYPERVISOR_shared_info = (void *)&dummy_shared_info;
71
72/*
73 * Flag to determine whether vcpu info placement is available on all
74 * VCPUs. We assume it is to start with, and then set it to zero on
75 * the first failure. This is because it can succeed on some VCPUs
76 * and not others, since it can involve hypervisor memory allocation,
77 * or because the guest failed to guarantee all the appropriate
78 * constraints on all VCPUs (ie buffer can't cross a page boundary).
79 *
80 * Note that any particular CPU may be using a placed vcpu structure,
81 * but we can only optimise if the all are.
82 *
83 * 0: not available, 1: available
84 */
85static int have_vcpu_info_placement = 1;
86
87static void __init xen_vcpu_setup(int cpu)
88{
89 struct vcpu_register_vcpu_info info;
90 int err;
91 struct vcpu_info *vcpup;
92
93 per_cpu(xen_vcpu, cpu) = &HYPERVISOR_shared_info->vcpu_info[cpu];
94
95 if (!have_vcpu_info_placement)
96 return; /* already tested, not available */
97
98 vcpup = &per_cpu(xen_vcpu_info, cpu);
99
100 info.mfn = virt_to_mfn(vcpup);
101 info.offset = offset_in_page(vcpup);
102
103 printk(KERN_DEBUG "trying to map vcpu_info %d at %p, mfn %x, offset %d\n",
104 cpu, vcpup, info.mfn, info.offset);
105
106 /* Check to see if the hypervisor will put the vcpu_info
107 structure where we want it, which allows direct access via
108 a percpu-variable. */
109 err = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_info, cpu, &info);
110
111 if (err) {
112 printk(KERN_DEBUG "register_vcpu_info failed: err=%d\n", err);
113 have_vcpu_info_placement = 0;
114 } else {
115 /* This cpu is using the registered vcpu info, even if
116 later ones fail to. */
117 per_cpu(xen_vcpu, cpu) = vcpup;
118
119 printk(KERN_DEBUG "cpu %d using vcpu_info at %p\n",
120 cpu, vcpup);
121 }
122}
123
124static void __init xen_banner(void)
125{
126 printk(KERN_INFO "Booting paravirtualized kernel on %s\n",
127 paravirt_ops.name);
128 printk(KERN_INFO "Hypervisor signature: %s\n", xen_start_info->magic);
129}
130
131static void xen_cpuid(unsigned int *eax, unsigned int *ebx,
132 unsigned int *ecx, unsigned int *edx)
133{
134 unsigned maskedx = ~0;
135
136 /*
137 * Mask out inconvenient features, to try and disable as many
138 * unsupported kernel subsystems as possible.
139 */
140 if (*eax == 1)
141 maskedx = ~((1 << X86_FEATURE_APIC) | /* disable APIC */
142 (1 << X86_FEATURE_ACPI) | /* disable ACPI */
143 (1 << X86_FEATURE_ACC)); /* thermal monitoring */
144
145 asm(XEN_EMULATE_PREFIX "cpuid"
146 : "=a" (*eax),
147 "=b" (*ebx),
148 "=c" (*ecx),
149 "=d" (*edx)
150 : "0" (*eax), "2" (*ecx));
151 *edx &= maskedx;
152}
153
154static void xen_set_debugreg(int reg, unsigned long val)
155{
156 HYPERVISOR_set_debugreg(reg, val);
157}
158
159static unsigned long xen_get_debugreg(int reg)
160{
161 return HYPERVISOR_get_debugreg(reg);
162}
163
164static unsigned long xen_save_fl(void)
165{
166 struct vcpu_info *vcpu;
167 unsigned long flags;
168
169 vcpu = x86_read_percpu(xen_vcpu);
170
171 /* flag has opposite sense of mask */
172 flags = !vcpu->evtchn_upcall_mask;
173
174 /* convert to IF type flag
175 -0 -> 0x00000000
176 -1 -> 0xffffffff
177 */
178 return (-flags) & X86_EFLAGS_IF;
179}
180
181static void xen_restore_fl(unsigned long flags)
182{
183 struct vcpu_info *vcpu;
184
185 /* convert from IF type flag */
186 flags = !(flags & X86_EFLAGS_IF);
187
188 /* There's a one instruction preempt window here. We need to
189 make sure we're don't switch CPUs between getting the vcpu
190 pointer and updating the mask. */
191 preempt_disable();
192 vcpu = x86_read_percpu(xen_vcpu);
193 vcpu->evtchn_upcall_mask = flags;
194 preempt_enable_no_resched();
195
196 /* Doesn't matter if we get preempted here, because any
197 pending event will get dealt with anyway. */
198
199 if (flags == 0) {
200 preempt_check_resched();
201 barrier(); /* unmask then check (avoid races) */
202 if (unlikely(vcpu->evtchn_upcall_pending))
203 force_evtchn_callback();
204 }
205}
206
207static void xen_irq_disable(void)
208{
209 /* There's a one instruction preempt window here. We need to
210 make sure we're don't switch CPUs between getting the vcpu
211 pointer and updating the mask. */
212 preempt_disable();
213 x86_read_percpu(xen_vcpu)->evtchn_upcall_mask = 1;
214 preempt_enable_no_resched();
215}
216
217static void xen_irq_enable(void)
218{
219 struct vcpu_info *vcpu;
220
221 /* There's a one instruction preempt window here. We need to
222 make sure we're don't switch CPUs between getting the vcpu
223 pointer and updating the mask. */
224 preempt_disable();
225 vcpu = x86_read_percpu(xen_vcpu);
226 vcpu->evtchn_upcall_mask = 0;
227 preempt_enable_no_resched();
228
229 /* Doesn't matter if we get preempted here, because any
230 pending event will get dealt with anyway. */
231
232 barrier(); /* unmask then check (avoid races) */
233 if (unlikely(vcpu->evtchn_upcall_pending))
234 force_evtchn_callback();
235}
236
237static void xen_safe_halt(void)
238{
239 /* Blocking includes an implicit local_irq_enable(). */
240 if (HYPERVISOR_sched_op(SCHEDOP_block, 0) != 0)
241 BUG();
242}
243
244static void xen_halt(void)
245{
246 if (irqs_disabled())
247 HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL);
248 else
249 xen_safe_halt();
250}
251
252static void xen_set_lazy_mode(enum paravirt_lazy_mode mode)
253{
254 BUG_ON(preemptible());
255
256 switch (mode) {
257 case PARAVIRT_LAZY_NONE:
258 BUG_ON(x86_read_percpu(xen_lazy_mode) == PARAVIRT_LAZY_NONE);
259 break;
260
261 case PARAVIRT_LAZY_MMU:
262 case PARAVIRT_LAZY_CPU:
263 BUG_ON(x86_read_percpu(xen_lazy_mode) != PARAVIRT_LAZY_NONE);
264 break;
265
266 case PARAVIRT_LAZY_FLUSH:
267 /* flush if necessary, but don't change state */
268 if (x86_read_percpu(xen_lazy_mode) != PARAVIRT_LAZY_NONE)
269 xen_mc_flush();
270 return;
271 }
272
273 xen_mc_flush();
274 x86_write_percpu(xen_lazy_mode, mode);
275}
276
277static unsigned long xen_store_tr(void)
278{
279 return 0;
280}
281
282static void xen_set_ldt(const void *addr, unsigned entries)
283{
284 unsigned long linear_addr = (unsigned long)addr;
285 struct mmuext_op *op;
286 struct multicall_space mcs = xen_mc_entry(sizeof(*op));
287
288 op = mcs.args;
289 op->cmd = MMUEXT_SET_LDT;
290 if (linear_addr) {
291 /* ldt my be vmalloced, use arbitrary_virt_to_machine */
292 xmaddr_t maddr;
293 maddr = arbitrary_virt_to_machine((unsigned long)addr);
294 linear_addr = (unsigned long)maddr.maddr;
295 }
296 op->arg1.linear_addr = linear_addr;
297 op->arg2.nr_ents = entries;
298
299 MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF);
300
301 xen_mc_issue(PARAVIRT_LAZY_CPU);
302}
303
304static void xen_load_gdt(const struct Xgt_desc_struct *dtr)
305{
306 unsigned long *frames;
307 unsigned long va = dtr->address;
308 unsigned int size = dtr->size + 1;
309 unsigned pages = (size + PAGE_SIZE - 1) / PAGE_SIZE;
310 int f;
311 struct multicall_space mcs;
312
313 /* A GDT can be up to 64k in size, which corresponds to 8192
314 8-byte entries, or 16 4k pages.. */
315
316 BUG_ON(size > 65536);
317 BUG_ON(va & ~PAGE_MASK);
318
319 mcs = xen_mc_entry(sizeof(*frames) * pages);
320 frames = mcs.args;
321
322 for (f = 0; va < dtr->address + size; va += PAGE_SIZE, f++) {
323 frames[f] = virt_to_mfn(va);
324 make_lowmem_page_readonly((void *)va);
325 }
326
327 MULTI_set_gdt(mcs.mc, frames, size / sizeof(struct desc_struct));
328
329 xen_mc_issue(PARAVIRT_LAZY_CPU);
330}
331
332static void load_TLS_descriptor(struct thread_struct *t,
333 unsigned int cpu, unsigned int i)
334{
335 struct desc_struct *gdt = get_cpu_gdt_table(cpu);
336 xmaddr_t maddr = virt_to_machine(&gdt[GDT_ENTRY_TLS_MIN+i]);
337 struct multicall_space mc = __xen_mc_entry(0);
338
339 MULTI_update_descriptor(mc.mc, maddr.maddr, t->tls_array[i]);
340}
341
342static void xen_load_tls(struct thread_struct *t, unsigned int cpu)
343{
344 xen_mc_batch();
345
346 load_TLS_descriptor(t, cpu, 0);
347 load_TLS_descriptor(t, cpu, 1);
348 load_TLS_descriptor(t, cpu, 2);
349
350 xen_mc_issue(PARAVIRT_LAZY_CPU);
351
352 /*
353 * XXX sleazy hack: If we're being called in a lazy-cpu zone,
354 * it means we're in a context switch, and %gs has just been
355 * saved. This means we can zero it out to prevent faults on
356 * exit from the hypervisor if the next process has no %gs.
357 * Either way, it has been saved, and the new value will get
358 * loaded properly. This will go away as soon as Xen has been
359 * modified to not save/restore %gs for normal hypercalls.
360 */
361 if (xen_get_lazy_mode() == PARAVIRT_LAZY_CPU)
362 loadsegment(gs, 0);
363}
364
365static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum,
366 u32 low, u32 high)
367{
368 unsigned long lp = (unsigned long)&dt[entrynum];
369 xmaddr_t mach_lp = virt_to_machine(lp);
370 u64 entry = (u64)high << 32 | low;
371
372 preempt_disable();
373
374 xen_mc_flush();
375 if (HYPERVISOR_update_descriptor(mach_lp.maddr, entry))
376 BUG();
377
378 preempt_enable();
379}
380
381static int cvt_gate_to_trap(int vector, u32 low, u32 high,
382 struct trap_info *info)
383{
384 u8 type, dpl;
385
386 type = (high >> 8) & 0x1f;
387 dpl = (high >> 13) & 3;
388
389 if (type != 0xf && type != 0xe)
390 return 0;
391
392 info->vector = vector;
393 info->address = (high & 0xffff0000) | (low & 0x0000ffff);
394 info->cs = low >> 16;
395 info->flags = dpl;
396 /* interrupt gates clear IF */
397 if (type == 0xe)
398 info->flags |= 4;
399
400 return 1;
401}
402
403/* Locations of each CPU's IDT */
404static DEFINE_PER_CPU(struct Xgt_desc_struct, idt_desc);
405
406/* Set an IDT entry. If the entry is part of the current IDT, then
407 also update Xen. */
408static void xen_write_idt_entry(struct desc_struct *dt, int entrynum,
409 u32 low, u32 high)
410{
411 unsigned long p = (unsigned long)&dt[entrynum];
412 unsigned long start, end;
413
414 preempt_disable();
415
416 start = __get_cpu_var(idt_desc).address;
417 end = start + __get_cpu_var(idt_desc).size + 1;
418
419 xen_mc_flush();
420
421 write_dt_entry(dt, entrynum, low, high);
422
423 if (p >= start && (p + 8) <= end) {
424 struct trap_info info[2];
425
426 info[1].address = 0;
427
428 if (cvt_gate_to_trap(entrynum, low, high, &info[0]))
429 if (HYPERVISOR_set_trap_table(info))
430 BUG();
431 }
432
433 preempt_enable();
434}
435
436static void xen_convert_trap_info(const struct Xgt_desc_struct *desc,
437 struct trap_info *traps)
438{
439 unsigned in, out, count;
440
441 count = (desc->size+1) / 8;
442 BUG_ON(count > 256);
443
444 for (in = out = 0; in < count; in++) {
445 const u32 *entry = (u32 *)(desc->address + in * 8);
446
447 if (cvt_gate_to_trap(in, entry[0], entry[1], &traps[out]))
448 out++;
449 }
450 traps[out].address = 0;
451}
452
453void xen_copy_trap_info(struct trap_info *traps)
454{
455 const struct Xgt_desc_struct *desc = &__get_cpu_var(idt_desc);
456
457 xen_convert_trap_info(desc, traps);
458}
459
460/* Load a new IDT into Xen. In principle this can be per-CPU, so we
461 hold a spinlock to protect the static traps[] array (static because
462 it avoids allocation, and saves stack space). */
463static void xen_load_idt(const struct Xgt_desc_struct *desc)
464{
465 static DEFINE_SPINLOCK(lock);
466 static struct trap_info traps[257];
467
468 spin_lock(&lock);
469
470 __get_cpu_var(idt_desc) = *desc;
471
472 xen_convert_trap_info(desc, traps);
473
474 xen_mc_flush();
475 if (HYPERVISOR_set_trap_table(traps))
476 BUG();
477
478 spin_unlock(&lock);
479}
480
481/* Write a GDT descriptor entry. Ignore LDT descriptors, since
482 they're handled differently. */
483static void xen_write_gdt_entry(struct desc_struct *dt, int entry,
484 u32 low, u32 high)
485{
486 preempt_disable();
487
488 switch ((high >> 8) & 0xff) {
489 case DESCTYPE_LDT:
490 case DESCTYPE_TSS:
491 /* ignore */
492 break;
493
494 default: {
495 xmaddr_t maddr = virt_to_machine(&dt[entry]);
496 u64 desc = (u64)high << 32 | low;
497
498 xen_mc_flush();
499 if (HYPERVISOR_update_descriptor(maddr.maddr, desc))
500 BUG();
501 }
502
503 }
504
505 preempt_enable();
506}
507
508static void xen_load_esp0(struct tss_struct *tss,
509 struct thread_struct *thread)
510{
511 struct multicall_space mcs = xen_mc_entry(0);
512 MULTI_stack_switch(mcs.mc, __KERNEL_DS, thread->esp0);
513 xen_mc_issue(PARAVIRT_LAZY_CPU);
514}
515
516static void xen_set_iopl_mask(unsigned mask)
517{
518 struct physdev_set_iopl set_iopl;
519
520 /* Force the change at ring 0. */
521 set_iopl.iopl = (mask == 0) ? 1 : (mask >> 12) & 3;
522 HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
523}
524
525static void xen_io_delay(void)
526{
527}
528
529#ifdef CONFIG_X86_LOCAL_APIC
530static unsigned long xen_apic_read(unsigned long reg)
531{
532 return 0;
533}
534
535static void xen_apic_write(unsigned long reg, unsigned long val)
536{
537 /* Warn to see if there's any stray references */
538 WARN_ON(1);
539}
540#endif
541
542static void xen_flush_tlb(void)
543{
544 struct mmuext_op *op;
545 struct multicall_space mcs = xen_mc_entry(sizeof(*op));
546
547 op = mcs.args;
548 op->cmd = MMUEXT_TLB_FLUSH_LOCAL;
549 MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF);
550
551 xen_mc_issue(PARAVIRT_LAZY_MMU);
552}
553
554static void xen_flush_tlb_single(unsigned long addr)
555{
556 struct mmuext_op *op;
557 struct multicall_space mcs = xen_mc_entry(sizeof(*op));
558
559 op = mcs.args;
560 op->cmd = MMUEXT_INVLPG_LOCAL;
561 op->arg1.linear_addr = addr & PAGE_MASK;
562 MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF);
563
564 xen_mc_issue(PARAVIRT_LAZY_MMU);
565}
566
567static void xen_flush_tlb_others(const cpumask_t *cpus, struct mm_struct *mm,
568 unsigned long va)
569{
570 struct {
571 struct mmuext_op op;
572 cpumask_t mask;
573 } *args;
574 cpumask_t cpumask = *cpus;
575 struct multicall_space mcs;
576
577 /*
578 * A couple of (to be removed) sanity checks:
579 *
580 * - current CPU must not be in mask
581 * - mask must exist :)
582 */
583 BUG_ON(cpus_empty(cpumask));
584 BUG_ON(cpu_isset(smp_processor_id(), cpumask));
585 BUG_ON(!mm);
586
587 /* If a CPU which we ran on has gone down, OK. */
588 cpus_and(cpumask, cpumask, cpu_online_map);
589 if (cpus_empty(cpumask))
590 return;
591
592 mcs = xen_mc_entry(sizeof(*args));
593 args = mcs.args;
594 args->mask = cpumask;
595 args->op.arg2.vcpumask = &args->mask;
596
597 if (va == TLB_FLUSH_ALL) {
598 args->op.cmd = MMUEXT_TLB_FLUSH_MULTI;
599 } else {
600 args->op.cmd = MMUEXT_INVLPG_MULTI;
601 args->op.arg1.linear_addr = va;
602 }
603
604 MULTI_mmuext_op(mcs.mc, &args->op, 1, NULL, DOMID_SELF);
605
606 xen_mc_issue(PARAVIRT_LAZY_MMU);
607}
608
609static void xen_write_cr2(unsigned long cr2)
610{
611 x86_read_percpu(xen_vcpu)->arch.cr2 = cr2;
612}
613
614static unsigned long xen_read_cr2(void)
615{
616 return x86_read_percpu(xen_vcpu)->arch.cr2;
617}
618
619static unsigned long xen_read_cr2_direct(void)
620{
621 return x86_read_percpu(xen_vcpu_info.arch.cr2);
622}
623
624static void xen_write_cr4(unsigned long cr4)
625{
626 /* never allow TSC to be disabled */
627 native_write_cr4(cr4 & ~X86_CR4_TSD);
628}
629
630static unsigned long xen_read_cr3(void)
631{
632 return x86_read_percpu(xen_cr3);
633}
634
635static void xen_write_cr3(unsigned long cr3)
636{
637 BUG_ON(preemptible());
638
639 if (cr3 == x86_read_percpu(xen_cr3)) {
640 /* just a simple tlb flush */
641 xen_flush_tlb();
642 return;
643 }
644
645 x86_write_percpu(xen_cr3, cr3);
646
647
648 {
649 struct mmuext_op *op;
650 struct multicall_space mcs = xen_mc_entry(sizeof(*op));
651 unsigned long mfn = pfn_to_mfn(PFN_DOWN(cr3));
652
653 op = mcs.args;
654 op->cmd = MMUEXT_NEW_BASEPTR;
655 op->arg1.mfn = mfn;
656
657 MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF);
658
659 xen_mc_issue(PARAVIRT_LAZY_CPU);
660 }
661}
662
663/* Early in boot, while setting up the initial pagetable, assume
664 everything is pinned. */
665static __init void xen_alloc_pt_init(struct mm_struct *mm, u32 pfn)
666{
667 BUG_ON(mem_map); /* should only be used early */
668 make_lowmem_page_readonly(__va(PFN_PHYS(pfn)));
669}
670
671/* This needs to make sure the new pte page is pinned iff its being
672 attached to a pinned pagetable. */
673static void xen_alloc_pt(struct mm_struct *mm, u32 pfn)
674{
675 struct page *page = pfn_to_page(pfn);
676
677 if (PagePinned(virt_to_page(mm->pgd))) {
678 SetPagePinned(page);
679
680 if (!PageHighMem(page))
681 make_lowmem_page_readonly(__va(PFN_PHYS(pfn)));
682 else
683 /* make sure there are no stray mappings of
684 this page */
685 kmap_flush_unused();
686 }
687}
688
689/* This should never happen until we're OK to use struct page */
690static void xen_release_pt(u32 pfn)
691{
692 struct page *page = pfn_to_page(pfn);
693
694 if (PagePinned(page)) {
695 if (!PageHighMem(page))
696 make_lowmem_page_readwrite(__va(PFN_PHYS(pfn)));
697 }
698}
699
700#ifdef CONFIG_HIGHPTE
701static void *xen_kmap_atomic_pte(struct page *page, enum km_type type)
702{
703 pgprot_t prot = PAGE_KERNEL;
704
705 if (PagePinned(page))
706 prot = PAGE_KERNEL_RO;
707
708 if (0 && PageHighMem(page))
709 printk("mapping highpte %lx type %d prot %s\n",
710 page_to_pfn(page), type,
711 (unsigned long)pgprot_val(prot) & _PAGE_RW ? "WRITE" : "READ");
712
713 return kmap_atomic_prot(page, type, prot);
714}
715#endif
716
717static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte)
718{
719 /* If there's an existing pte, then don't allow _PAGE_RW to be set */
720 if (pte_val_ma(*ptep) & _PAGE_PRESENT)
721 pte = __pte_ma(((pte_val_ma(*ptep) & _PAGE_RW) | ~_PAGE_RW) &
722 pte_val_ma(pte));
723
724 return pte;
725}
726
727/* Init-time set_pte while constructing initial pagetables, which
728 doesn't allow RO pagetable pages to be remapped RW */
729static __init void xen_set_pte_init(pte_t *ptep, pte_t pte)
730{
731 pte = mask_rw_pte(ptep, pte);
732
733 xen_set_pte(ptep, pte);
734}
735
736static __init void xen_pagetable_setup_start(pgd_t *base)
737{
738 pgd_t *xen_pgd = (pgd_t *)xen_start_info->pt_base;
739
740 /* special set_pte for pagetable initialization */
741 paravirt_ops.set_pte = xen_set_pte_init;
742
743 init_mm.pgd = base;
744 /*
745 * copy top-level of Xen-supplied pagetable into place. For
746 * !PAE we can use this as-is, but for PAE it is a stand-in
747 * while we copy the pmd pages.
748 */
749 memcpy(base, xen_pgd, PTRS_PER_PGD * sizeof(pgd_t));
750
751 if (PTRS_PER_PMD > 1) {
752 int i;
753 /*
754 * For PAE, need to allocate new pmds, rather than
755 * share Xen's, since Xen doesn't like pmd's being
756 * shared between address spaces.
757 */
758 for (i = 0; i < PTRS_PER_PGD; i++) {
759 if (pgd_val_ma(xen_pgd[i]) & _PAGE_PRESENT) {
760 pmd_t *pmd = (pmd_t *)alloc_bootmem_low_pages(PAGE_SIZE);
761
762 memcpy(pmd, (void *)pgd_page_vaddr(xen_pgd[i]),
763 PAGE_SIZE);
764
765 make_lowmem_page_readonly(pmd);
766
767 set_pgd(&base[i], __pgd(1 + __pa(pmd)));
768 } else
769 pgd_clear(&base[i]);
770 }
771 }
772
773 /* make sure zero_page is mapped RO so we can use it in pagetables */
774 make_lowmem_page_readonly(empty_zero_page);
775 make_lowmem_page_readonly(base);
776 /*
777 * Switch to new pagetable. This is done before
778 * pagetable_init has done anything so that the new pages
779 * added to the table can be prepared properly for Xen.
780 */
781 xen_write_cr3(__pa(base));
782}
783
784static __init void xen_pagetable_setup_done(pgd_t *base)
785{
786 /* This will work as long as patching hasn't happened yet
787 (which it hasn't) */
788 paravirt_ops.alloc_pt = xen_alloc_pt;
789 paravirt_ops.set_pte = xen_set_pte;
790
791 if (!xen_feature(XENFEAT_auto_translated_physmap)) {
792 /*
793 * Create a mapping for the shared info page.
794 * Should be set_fixmap(), but shared_info is a machine
795 * address with no corresponding pseudo-phys address.
796 */
797 set_pte_mfn(fix_to_virt(FIX_PARAVIRT_BOOTMAP),
798 PFN_DOWN(xen_start_info->shared_info),
799 PAGE_KERNEL);
800
801 HYPERVISOR_shared_info =
802 (struct shared_info *)fix_to_virt(FIX_PARAVIRT_BOOTMAP);
803
804 } else
805 HYPERVISOR_shared_info =
806 (struct shared_info *)__va(xen_start_info->shared_info);
807
808 /* Actually pin the pagetable down, but we can't set PG_pinned
809 yet because the page structures don't exist yet. */
810 {
811 struct mmuext_op op;
812#ifdef CONFIG_X86_PAE
813 op.cmd = MMUEXT_PIN_L3_TABLE;
814#else
815 op.cmd = MMUEXT_PIN_L3_TABLE;
816#endif
817 op.arg1.mfn = pfn_to_mfn(PFN_DOWN(__pa(base)));
818 if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF))
819 BUG();
820 }
821}
822
823/* This is called once we have the cpu_possible_map */
824void __init xen_setup_vcpu_info_placement(void)
825{
826 int cpu;
827
828 for_each_possible_cpu(cpu)
829 xen_vcpu_setup(cpu);
830
831 /* xen_vcpu_setup managed to place the vcpu_info within the
832 percpu area for all cpus, so make use of it */
833 if (have_vcpu_info_placement) {
834 printk(KERN_INFO "Xen: using vcpu_info placement\n");
835
836 paravirt_ops.save_fl = xen_save_fl_direct;
837 paravirt_ops.restore_fl = xen_restore_fl_direct;
838 paravirt_ops.irq_disable = xen_irq_disable_direct;
839 paravirt_ops.irq_enable = xen_irq_enable_direct;
840 paravirt_ops.read_cr2 = xen_read_cr2_direct;
841 paravirt_ops.iret = xen_iret_direct;
842 }
843}
844
845static unsigned xen_patch(u8 type, u16 clobbers, void *insns, unsigned len)
846{
847 char *start, *end, *reloc;
848 unsigned ret;
849
850 start = end = reloc = NULL;
851
852#define SITE(x) \
853 case PARAVIRT_PATCH(x): \
854 if (have_vcpu_info_placement) { \
855 start = (char *)xen_##x##_direct; \
856 end = xen_##x##_direct_end; \
857 reloc = xen_##x##_direct_reloc; \
858 } \
859 goto patch_site
860
861 switch (type) {
862 SITE(irq_enable);
863 SITE(irq_disable);
864 SITE(save_fl);
865 SITE(restore_fl);
866#undef SITE
867
868 patch_site:
869 if (start == NULL || (end-start) > len)
870 goto default_patch;
871
872 ret = paravirt_patch_insns(insns, len, start, end);
873
874 /* Note: because reloc is assigned from something that
875 appears to be an array, gcc assumes it's non-null,
876 but doesn't know its relationship with start and
877 end. */
878 if (reloc > start && reloc < end) {
879 int reloc_off = reloc - start;
880 long *relocp = (long *)(insns + reloc_off);
881 long delta = start - (char *)insns;
882
883 *relocp += delta;
884 }
885 break;
886
887 default_patch:
888 default:
889 ret = paravirt_patch_default(type, clobbers, insns, len);
890 break;
891 }
892
893 return ret;
894}
895
896static const struct paravirt_ops xen_paravirt_ops __initdata = {
897 .paravirt_enabled = 1,
898 .shared_kernel_pmd = 0,
899
900 .name = "Xen",
901 .banner = xen_banner,
902
903 .patch = xen_patch,
904
905 .memory_setup = xen_memory_setup,
906 .arch_setup = xen_arch_setup,
907 .init_IRQ = xen_init_IRQ,
908 .post_allocator_init = xen_mark_init_mm_pinned,
909
910 .time_init = xen_time_init,
911 .set_wallclock = xen_set_wallclock,
912 .get_wallclock = xen_get_wallclock,
913 .get_cpu_khz = xen_cpu_khz,
914 .sched_clock = xen_sched_clock,
915
916 .cpuid = xen_cpuid,
917
918 .set_debugreg = xen_set_debugreg,
919 .get_debugreg = xen_get_debugreg,
920
921 .clts = native_clts,
922
923 .read_cr0 = native_read_cr0,
924 .write_cr0 = native_write_cr0,
925
926 .read_cr2 = xen_read_cr2,
927 .write_cr2 = xen_write_cr2,
928
929 .read_cr3 = xen_read_cr3,
930 .write_cr3 = xen_write_cr3,
931
932 .read_cr4 = native_read_cr4,
933 .read_cr4_safe = native_read_cr4_safe,
934 .write_cr4 = xen_write_cr4,
935
936 .save_fl = xen_save_fl,
937 .restore_fl = xen_restore_fl,
938 .irq_disable = xen_irq_disable,
939 .irq_enable = xen_irq_enable,
940 .safe_halt = xen_safe_halt,
941 .halt = xen_halt,
942 .wbinvd = native_wbinvd,
943
944 .read_msr = native_read_msr_safe,
945 .write_msr = native_write_msr_safe,
946 .read_tsc = native_read_tsc,
947 .read_pmc = native_read_pmc,
948
949 .iret = (void *)&hypercall_page[__HYPERVISOR_iret],
950 .irq_enable_sysexit = NULL, /* never called */
951
952 .load_tr_desc = paravirt_nop,
953 .set_ldt = xen_set_ldt,
954 .load_gdt = xen_load_gdt,
955 .load_idt = xen_load_idt,
956 .load_tls = xen_load_tls,
957
958 .store_gdt = native_store_gdt,
959 .store_idt = native_store_idt,
960 .store_tr = xen_store_tr,
961
962 .write_ldt_entry = xen_write_ldt_entry,
963 .write_gdt_entry = xen_write_gdt_entry,
964 .write_idt_entry = xen_write_idt_entry,
965 .load_esp0 = xen_load_esp0,
966
967 .set_iopl_mask = xen_set_iopl_mask,
968 .io_delay = xen_io_delay,
969
970#ifdef CONFIG_X86_LOCAL_APIC
971 .apic_write = xen_apic_write,
972 .apic_write_atomic = xen_apic_write,
973 .apic_read = xen_apic_read,
974 .setup_boot_clock = paravirt_nop,
975 .setup_secondary_clock = paravirt_nop,
976 .startup_ipi_hook = paravirt_nop,
977#endif
978
979 .flush_tlb_user = xen_flush_tlb,
980 .flush_tlb_kernel = xen_flush_tlb,
981 .flush_tlb_single = xen_flush_tlb_single,
982 .flush_tlb_others = xen_flush_tlb_others,
983
984 .pte_update = paravirt_nop,
985 .pte_update_defer = paravirt_nop,
986
987 .pagetable_setup_start = xen_pagetable_setup_start,
988 .pagetable_setup_done = xen_pagetable_setup_done,
989
990 .alloc_pt = xen_alloc_pt_init,
991 .release_pt = xen_release_pt,
992 .alloc_pd = paravirt_nop,
993 .alloc_pd_clone = paravirt_nop,
994 .release_pd = paravirt_nop,
995
996#ifdef CONFIG_HIGHPTE
997 .kmap_atomic_pte = xen_kmap_atomic_pte,
998#endif
999
1000 .set_pte = NULL, /* see xen_pagetable_setup_* */
1001 .set_pte_at = xen_set_pte_at,
1002 .set_pmd = xen_set_pmd,
1003
1004 .pte_val = xen_pte_val,
1005 .pgd_val = xen_pgd_val,
1006
1007 .make_pte = xen_make_pte,
1008 .make_pgd = xen_make_pgd,
1009
1010#ifdef CONFIG_X86_PAE
1011 .set_pte_atomic = xen_set_pte_atomic,
1012 .set_pte_present = xen_set_pte_at,
1013 .set_pud = xen_set_pud,
1014 .pte_clear = xen_pte_clear,
1015 .pmd_clear = xen_pmd_clear,
1016
1017 .make_pmd = xen_make_pmd,
1018 .pmd_val = xen_pmd_val,
1019#endif /* PAE */
1020
1021 .activate_mm = xen_activate_mm,
1022 .dup_mmap = xen_dup_mmap,
1023 .exit_mmap = xen_exit_mmap,
1024
1025 .set_lazy_mode = xen_set_lazy_mode,
1026};
1027
1028#ifdef CONFIG_SMP
1029static const struct smp_ops xen_smp_ops __initdata = {
1030 .smp_prepare_boot_cpu = xen_smp_prepare_boot_cpu,
1031 .smp_prepare_cpus = xen_smp_prepare_cpus,
1032 .cpu_up = xen_cpu_up,
1033 .smp_cpus_done = xen_smp_cpus_done,
1034
1035 .smp_send_stop = xen_smp_send_stop,
1036 .smp_send_reschedule = xen_smp_send_reschedule,
1037 .smp_call_function_mask = xen_smp_call_function_mask,
1038};
1039#endif /* CONFIG_SMP */
1040
1041static void xen_reboot(int reason)
1042{
1043#ifdef CONFIG_SMP
1044 smp_send_stop();
1045#endif
1046
1047 if (HYPERVISOR_sched_op(SCHEDOP_shutdown, reason))
1048 BUG();
1049}
1050
1051static void xen_restart(char *msg)
1052{
1053 xen_reboot(SHUTDOWN_reboot);
1054}
1055
1056static void xen_emergency_restart(void)
1057{
1058 xen_reboot(SHUTDOWN_reboot);
1059}
1060
1061static void xen_machine_halt(void)
1062{
1063 xen_reboot(SHUTDOWN_poweroff);
1064}
1065
1066static void xen_crash_shutdown(struct pt_regs *regs)
1067{
1068 xen_reboot(SHUTDOWN_crash);
1069}
1070
1071static const struct machine_ops __initdata xen_machine_ops = {
1072 .restart = xen_restart,
1073 .halt = xen_machine_halt,
1074 .power_off = xen_machine_halt,
1075 .shutdown = xen_machine_halt,
1076 .crash_shutdown = xen_crash_shutdown,
1077 .emergency_restart = xen_emergency_restart,
1078};
1079
1080
1081/* First C function to be called on Xen boot */
1082asmlinkage void __init xen_start_kernel(void)
1083{
1084 pgd_t *pgd;
1085
1086 if (!xen_start_info)
1087 return;
1088
1089 BUG_ON(memcmp(xen_start_info->magic, "xen-3.0", 7) != 0);
1090
1091 /* Install Xen paravirt ops */
1092 paravirt_ops = xen_paravirt_ops;
1093 machine_ops = xen_machine_ops;
1094
1095#ifdef CONFIG_SMP
1096 smp_ops = xen_smp_ops;
1097#endif
1098
1099 xen_setup_features();
1100
1101 /* Get mfn list */
1102 if (!xen_feature(XENFEAT_auto_translated_physmap))
1103 phys_to_machine_mapping = (unsigned long *)xen_start_info->mfn_list;
1104
1105 pgd = (pgd_t *)xen_start_info->pt_base;
1106
1107 init_pg_tables_end = __pa(pgd) + xen_start_info->nr_pt_frames*PAGE_SIZE;
1108
1109 init_mm.pgd = pgd; /* use the Xen pagetables to start */
1110
1111 /* keep using Xen gdt for now; no urgent need to change it */
1112
1113 x86_write_percpu(xen_cr3, __pa(pgd));
1114
1115#ifdef CONFIG_SMP
1116 /* Don't do the full vcpu_info placement stuff until we have a
1117 possible map. */
1118 per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];
1119#else
1120 /* May as well do it now, since there's no good time to call
1121 it later on UP. */
1122 xen_setup_vcpu_info_placement();
1123#endif
1124
1125 paravirt_ops.kernel_rpl = 1;
1126 if (xen_feature(XENFEAT_supervisor_mode_kernel))
1127 paravirt_ops.kernel_rpl = 0;
1128
1129 /* set the limit of our address space */
1130 reserve_top_address(-HYPERVISOR_VIRT_START + 2 * PAGE_SIZE);
1131
1132 /* set up basic CPUID stuff */
1133 cpu_detect(&new_cpu_data);
1134 new_cpu_data.hard_math = 1;
1135 new_cpu_data.x86_capability[0] = cpuid_edx(1);
1136
1137 /* Poke various useful things into boot_params */
1138 LOADER_TYPE = (9 << 4) | 0;
1139 INITRD_START = xen_start_info->mod_start ? __pa(xen_start_info->mod_start) : 0;
1140 INITRD_SIZE = xen_start_info->mod_len;
1141
1142 /* Start the world */
1143 start_kernel();
1144}
diff --git a/arch/i386/xen/events.c b/arch/i386/xen/events.c
new file mode 100644
index 000000000000..da1b173547a1
--- /dev/null
+++ b/arch/i386/xen/events.c
@@ -0,0 +1,591 @@
1/*
2 * Xen event channels
3 *
4 * Xen models interrupts with abstract event channels. Because each
5 * domain gets 1024 event channels, but NR_IRQ is not that large, we
6 * must dynamically map irqs<->event channels. The event channels
7 * interface with the rest of the kernel by defining a xen interrupt
8 * chip. When an event is recieved, it is mapped to an irq and sent
9 * through the normal interrupt processing path.
10 *
11 * There are four kinds of events which can be mapped to an event
12 * channel:
13 *
14 * 1. Inter-domain notifications. This includes all the virtual
15 * device events, since they're driven by front-ends in another domain
16 * (typically dom0).
17 * 2. VIRQs, typically used for timers. These are per-cpu events.
18 * 3. IPIs.
19 * 4. Hardware interrupts. Not supported at present.
20 *
21 * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007
22 */
23
24#include <linux/linkage.h>
25#include <linux/interrupt.h>
26#include <linux/irq.h>
27#include <linux/module.h>
28#include <linux/string.h>
29
30#include <asm/ptrace.h>
31#include <asm/irq.h>
32#include <asm/sync_bitops.h>
33#include <asm/xen/hypercall.h>
34#include <asm/xen/hypervisor.h>
35
36#include <xen/events.h>
37#include <xen/interface/xen.h>
38#include <xen/interface/event_channel.h>
39
40#include "xen-ops.h"
41
42/*
43 * This lock protects updates to the following mapping and reference-count
44 * arrays. The lock does not need to be acquired to read the mapping tables.
45 */
46static DEFINE_SPINLOCK(irq_mapping_update_lock);
47
48/* IRQ <-> VIRQ mapping. */
49static DEFINE_PER_CPU(int, virq_to_irq[NR_VIRQS]) = {[0 ... NR_VIRQS-1] = -1};
50
51/* IRQ <-> IPI mapping */
52static DEFINE_PER_CPU(int, ipi_to_irq[XEN_NR_IPIS]) = {[0 ... XEN_NR_IPIS-1] = -1};
53
54/* Packed IRQ information: binding type, sub-type index, and event channel. */
55struct packed_irq
56{
57 unsigned short evtchn;
58 unsigned char index;
59 unsigned char type;
60};
61
62static struct packed_irq irq_info[NR_IRQS];
63
64/* Binding types. */
65enum {
66 IRQT_UNBOUND,
67 IRQT_PIRQ,
68 IRQT_VIRQ,
69 IRQT_IPI,
70 IRQT_EVTCHN
71};
72
73/* Convenient shorthand for packed representation of an unbound IRQ. */
74#define IRQ_UNBOUND mk_irq_info(IRQT_UNBOUND, 0, 0)
75
76static int evtchn_to_irq[NR_EVENT_CHANNELS] = {
77 [0 ... NR_EVENT_CHANNELS-1] = -1
78};
79static unsigned long cpu_evtchn_mask[NR_CPUS][NR_EVENT_CHANNELS/BITS_PER_LONG];
80static u8 cpu_evtchn[NR_EVENT_CHANNELS];
81
82/* Reference counts for bindings to IRQs. */
83static int irq_bindcount[NR_IRQS];
84
85/* Xen will never allocate port zero for any purpose. */
86#define VALID_EVTCHN(chn) ((chn) != 0)
87
88/*
89 * Force a proper event-channel callback from Xen after clearing the
90 * callback mask. We do this in a very simple manner, by making a call
91 * down into Xen. The pending flag will be checked by Xen on return.
92 */
93void force_evtchn_callback(void)
94{
95 (void)HYPERVISOR_xen_version(0, NULL);
96}
97EXPORT_SYMBOL_GPL(force_evtchn_callback);
98
99static struct irq_chip xen_dynamic_chip;
100
101/* Constructor for packed IRQ information. */
102static inline struct packed_irq mk_irq_info(u32 type, u32 index, u32 evtchn)
103{
104 return (struct packed_irq) { evtchn, index, type };
105}
106
107/*
108 * Accessors for packed IRQ information.
109 */
110static inline unsigned int evtchn_from_irq(int irq)
111{
112 return irq_info[irq].evtchn;
113}
114
115static inline unsigned int index_from_irq(int irq)
116{
117 return irq_info[irq].index;
118}
119
120static inline unsigned int type_from_irq(int irq)
121{
122 return irq_info[irq].type;
123}
124
125static inline unsigned long active_evtchns(unsigned int cpu,
126 struct shared_info *sh,
127 unsigned int idx)
128{
129 return (sh->evtchn_pending[idx] &
130 cpu_evtchn_mask[cpu][idx] &
131 ~sh->evtchn_mask[idx]);
132}
133
134static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu)
135{
136 int irq = evtchn_to_irq[chn];
137
138 BUG_ON(irq == -1);
139#ifdef CONFIG_SMP
140 irq_desc[irq].affinity = cpumask_of_cpu(cpu);
141#endif
142
143 __clear_bit(chn, cpu_evtchn_mask[cpu_evtchn[chn]]);
144 __set_bit(chn, cpu_evtchn_mask[cpu]);
145
146 cpu_evtchn[chn] = cpu;
147}
148
149static void init_evtchn_cpu_bindings(void)
150{
151#ifdef CONFIG_SMP
152 int i;
153 /* By default all event channels notify CPU#0. */
154 for (i = 0; i < NR_IRQS; i++)
155 irq_desc[i].affinity = cpumask_of_cpu(0);
156#endif
157
158 memset(cpu_evtchn, 0, sizeof(cpu_evtchn));
159 memset(cpu_evtchn_mask[0], ~0, sizeof(cpu_evtchn_mask[0]));
160}
161
162static inline unsigned int cpu_from_evtchn(unsigned int evtchn)
163{
164 return cpu_evtchn[evtchn];
165}
166
167static inline void clear_evtchn(int port)
168{
169 struct shared_info *s = HYPERVISOR_shared_info;
170 sync_clear_bit(port, &s->evtchn_pending[0]);
171}
172
173static inline void set_evtchn(int port)
174{
175 struct shared_info *s = HYPERVISOR_shared_info;
176 sync_set_bit(port, &s->evtchn_pending[0]);
177}
178
179
180/**
181 * notify_remote_via_irq - send event to remote end of event channel via irq
182 * @irq: irq of event channel to send event to
183 *
184 * Unlike notify_remote_via_evtchn(), this is safe to use across
185 * save/restore. Notifications on a broken connection are silently
186 * dropped.
187 */
188void notify_remote_via_irq(int irq)
189{
190 int evtchn = evtchn_from_irq(irq);
191
192 if (VALID_EVTCHN(evtchn))
193 notify_remote_via_evtchn(evtchn);
194}
195EXPORT_SYMBOL_GPL(notify_remote_via_irq);
196
197static void mask_evtchn(int port)
198{
199 struct shared_info *s = HYPERVISOR_shared_info;
200 sync_set_bit(port, &s->evtchn_mask[0]);
201}
202
203static void unmask_evtchn(int port)
204{
205 struct shared_info *s = HYPERVISOR_shared_info;
206 unsigned int cpu = get_cpu();
207
208 BUG_ON(!irqs_disabled());
209
210 /* Slow path (hypercall) if this is a non-local port. */
211 if (unlikely(cpu != cpu_from_evtchn(port))) {
212 struct evtchn_unmask unmask = { .port = port };
213 (void)HYPERVISOR_event_channel_op(EVTCHNOP_unmask, &unmask);
214 } else {
215 struct vcpu_info *vcpu_info = __get_cpu_var(xen_vcpu);
216
217 sync_clear_bit(port, &s->evtchn_mask[0]);
218
219 /*
220 * The following is basically the equivalent of
221 * 'hw_resend_irq'. Just like a real IO-APIC we 'lose
222 * the interrupt edge' if the channel is masked.
223 */
224 if (sync_test_bit(port, &s->evtchn_pending[0]) &&
225 !sync_test_and_set_bit(port / BITS_PER_LONG,
226 &vcpu_info->evtchn_pending_sel))
227 vcpu_info->evtchn_upcall_pending = 1;
228 }
229
230 put_cpu();
231}
232
233static int find_unbound_irq(void)
234{
235 int irq;
236
237 /* Only allocate from dynirq range */
238 for (irq = 0; irq < NR_IRQS; irq++)
239 if (irq_bindcount[irq] == 0)
240 break;
241
242 if (irq == NR_IRQS)
243 panic("No available IRQ to bind to: increase NR_IRQS!\n");
244
245 return irq;
246}
247
248int bind_evtchn_to_irq(unsigned int evtchn)
249{
250 int irq;
251
252 spin_lock(&irq_mapping_update_lock);
253
254 irq = evtchn_to_irq[evtchn];
255
256 if (irq == -1) {
257 irq = find_unbound_irq();
258
259 dynamic_irq_init(irq);
260 set_irq_chip_and_handler_name(irq, &xen_dynamic_chip,
261 handle_level_irq, "event");
262
263 evtchn_to_irq[evtchn] = irq;
264 irq_info[irq] = mk_irq_info(IRQT_EVTCHN, 0, evtchn);
265 }
266
267 irq_bindcount[irq]++;
268
269 spin_unlock(&irq_mapping_update_lock);
270
271 return irq;
272}
273EXPORT_SYMBOL_GPL(bind_evtchn_to_irq);
274
275static int bind_ipi_to_irq(unsigned int ipi, unsigned int cpu)
276{
277 struct evtchn_bind_ipi bind_ipi;
278 int evtchn, irq;
279
280 spin_lock(&irq_mapping_update_lock);
281
282 irq = per_cpu(ipi_to_irq, cpu)[ipi];
283 if (irq == -1) {
284 irq = find_unbound_irq();
285 if (irq < 0)
286 goto out;
287
288 dynamic_irq_init(irq);
289 set_irq_chip_and_handler_name(irq, &xen_dynamic_chip,
290 handle_level_irq, "ipi");
291
292 bind_ipi.vcpu = cpu;
293 if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_ipi,
294 &bind_ipi) != 0)
295 BUG();
296 evtchn = bind_ipi.port;
297
298 evtchn_to_irq[evtchn] = irq;
299 irq_info[irq] = mk_irq_info(IRQT_IPI, ipi, evtchn);
300
301 per_cpu(ipi_to_irq, cpu)[ipi] = irq;
302
303 bind_evtchn_to_cpu(evtchn, cpu);
304 }
305
306 irq_bindcount[irq]++;
307
308 out:
309 spin_unlock(&irq_mapping_update_lock);
310 return irq;
311}
312
313
314static int bind_virq_to_irq(unsigned int virq, unsigned int cpu)
315{
316 struct evtchn_bind_virq bind_virq;
317 int evtchn, irq;
318
319 spin_lock(&irq_mapping_update_lock);
320
321 irq = per_cpu(virq_to_irq, cpu)[virq];
322
323 if (irq == -1) {
324 bind_virq.virq = virq;
325 bind_virq.vcpu = cpu;
326 if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_virq,
327 &bind_virq) != 0)
328 BUG();
329 evtchn = bind_virq.port;
330
331 irq = find_unbound_irq();
332
333 dynamic_irq_init(irq);
334 set_irq_chip_and_handler_name(irq, &xen_dynamic_chip,
335 handle_level_irq, "virq");
336
337 evtchn_to_irq[evtchn] = irq;
338 irq_info[irq] = mk_irq_info(IRQT_VIRQ, virq, evtchn);
339
340 per_cpu(virq_to_irq, cpu)[virq] = irq;
341
342 bind_evtchn_to_cpu(evtchn, cpu);
343 }
344
345 irq_bindcount[irq]++;
346
347 spin_unlock(&irq_mapping_update_lock);
348
349 return irq;
350}
351
352static void unbind_from_irq(unsigned int irq)
353{
354 struct evtchn_close close;
355 int evtchn = evtchn_from_irq(irq);
356
357 spin_lock(&irq_mapping_update_lock);
358
359 if (VALID_EVTCHN(evtchn) && (--irq_bindcount[irq] == 0)) {
360 close.port = evtchn;
361 if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close) != 0)
362 BUG();
363
364 switch (type_from_irq(irq)) {
365 case IRQT_VIRQ:
366 per_cpu(virq_to_irq, cpu_from_evtchn(evtchn))
367 [index_from_irq(irq)] = -1;
368 break;
369 default:
370 break;
371 }
372
373 /* Closed ports are implicitly re-bound to VCPU0. */
374 bind_evtchn_to_cpu(evtchn, 0);
375
376 evtchn_to_irq[evtchn] = -1;
377 irq_info[irq] = IRQ_UNBOUND;
378
379 dynamic_irq_init(irq);
380 }
381
382 spin_unlock(&irq_mapping_update_lock);
383}
384
385int bind_evtchn_to_irqhandler(unsigned int evtchn,
386 irqreturn_t (*handler)(int, void *),
387 unsigned long irqflags,
388 const char *devname, void *dev_id)
389{
390 unsigned int irq;
391 int retval;
392
393 irq = bind_evtchn_to_irq(evtchn);
394 retval = request_irq(irq, handler, irqflags, devname, dev_id);
395 if (retval != 0) {
396 unbind_from_irq(irq);
397 return retval;
398 }
399
400 return irq;
401}
402EXPORT_SYMBOL_GPL(bind_evtchn_to_irqhandler);
403
404int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu,
405 irqreturn_t (*handler)(int, void *),
406 unsigned long irqflags, const char *devname, void *dev_id)
407{
408 unsigned int irq;
409 int retval;
410
411 irq = bind_virq_to_irq(virq, cpu);
412 retval = request_irq(irq, handler, irqflags, devname, dev_id);
413 if (retval != 0) {
414 unbind_from_irq(irq);
415 return retval;
416 }
417
418 return irq;
419}
420EXPORT_SYMBOL_GPL(bind_virq_to_irqhandler);
421
422int bind_ipi_to_irqhandler(enum ipi_vector ipi,
423 unsigned int cpu,
424 irq_handler_t handler,
425 unsigned long irqflags,
426 const char *devname,
427 void *dev_id)
428{
429 int irq, retval;
430
431 irq = bind_ipi_to_irq(ipi, cpu);
432 if (irq < 0)
433 return irq;
434
435 retval = request_irq(irq, handler, irqflags, devname, dev_id);
436 if (retval != 0) {
437 unbind_from_irq(irq);
438 return retval;
439 }
440
441 return irq;
442}
443
444void unbind_from_irqhandler(unsigned int irq, void *dev_id)
445{
446 free_irq(irq, dev_id);
447 unbind_from_irq(irq);
448}
449EXPORT_SYMBOL_GPL(unbind_from_irqhandler);
450
451void xen_send_IPI_one(unsigned int cpu, enum ipi_vector vector)
452{
453 int irq = per_cpu(ipi_to_irq, cpu)[vector];
454 BUG_ON(irq < 0);
455 notify_remote_via_irq(irq);
456}
457
458
459/*
460 * Search the CPUs pending events bitmasks. For each one found, map
461 * the event number to an irq, and feed it into do_IRQ() for
462 * handling.
463 *
464 * Xen uses a two-level bitmap to speed searching. The first level is
465 * a bitset of words which contain pending event bits. The second
466 * level is a bitset of pending events themselves.
467 */
468fastcall void xen_evtchn_do_upcall(struct pt_regs *regs)
469{
470 int cpu = get_cpu();
471 struct shared_info *s = HYPERVISOR_shared_info;
472 struct vcpu_info *vcpu_info = __get_cpu_var(xen_vcpu);
473 unsigned long pending_words;
474
475 vcpu_info->evtchn_upcall_pending = 0;
476
477 /* NB. No need for a barrier here -- XCHG is a barrier on x86. */
478 pending_words = xchg(&vcpu_info->evtchn_pending_sel, 0);
479 while (pending_words != 0) {
480 unsigned long pending_bits;
481 int word_idx = __ffs(pending_words);
482 pending_words &= ~(1UL << word_idx);
483
484 while ((pending_bits = active_evtchns(cpu, s, word_idx)) != 0) {
485 int bit_idx = __ffs(pending_bits);
486 int port = (word_idx * BITS_PER_LONG) + bit_idx;
487 int irq = evtchn_to_irq[port];
488
489 if (irq != -1) {
490 regs->orig_eax = ~irq;
491 do_IRQ(regs);
492 }
493 }
494 }
495
496 put_cpu();
497}
498
499/* Rebind an evtchn so that it gets delivered to a specific cpu */
500static void rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
501{
502 struct evtchn_bind_vcpu bind_vcpu;
503 int evtchn = evtchn_from_irq(irq);
504
505 if (!VALID_EVTCHN(evtchn))
506 return;
507
508 /* Send future instances of this interrupt to other vcpu. */
509 bind_vcpu.port = evtchn;
510 bind_vcpu.vcpu = tcpu;
511
512 /*
513 * If this fails, it usually just indicates that we're dealing with a
514 * virq or IPI channel, which don't actually need to be rebound. Ignore
515 * it, but don't do the xenlinux-level rebind in that case.
516 */
517 if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0)
518 bind_evtchn_to_cpu(evtchn, tcpu);
519}
520
521
522static void set_affinity_irq(unsigned irq, cpumask_t dest)
523{
524 unsigned tcpu = first_cpu(dest);
525 rebind_irq_to_cpu(irq, tcpu);
526}
527
528static void enable_dynirq(unsigned int irq)
529{
530 int evtchn = evtchn_from_irq(irq);
531
532 if (VALID_EVTCHN(evtchn))
533 unmask_evtchn(evtchn);
534}
535
536static void disable_dynirq(unsigned int irq)
537{
538 int evtchn = evtchn_from_irq(irq);
539
540 if (VALID_EVTCHN(evtchn))
541 mask_evtchn(evtchn);
542}
543
544static void ack_dynirq(unsigned int irq)
545{
546 int evtchn = evtchn_from_irq(irq);
547
548 move_native_irq(irq);
549
550 if (VALID_EVTCHN(evtchn))
551 clear_evtchn(evtchn);
552}
553
554static int retrigger_dynirq(unsigned int irq)
555{
556 int evtchn = evtchn_from_irq(irq);
557 int ret = 0;
558
559 if (VALID_EVTCHN(evtchn)) {
560 set_evtchn(evtchn);
561 ret = 1;
562 }
563
564 return ret;
565}
566
567static struct irq_chip xen_dynamic_chip __read_mostly = {
568 .name = "xen-dyn",
569 .mask = disable_dynirq,
570 .unmask = enable_dynirq,
571 .ack = ack_dynirq,
572 .set_affinity = set_affinity_irq,
573 .retrigger = retrigger_dynirq,
574};
575
576void __init xen_init_IRQ(void)
577{
578 int i;
579
580 init_evtchn_cpu_bindings();
581
582 /* No event channels are 'live' right now. */
583 for (i = 0; i < NR_EVENT_CHANNELS; i++)
584 mask_evtchn(i);
585
586 /* Dynamic IRQ space is currently unbound. Zero the refcnts. */
587 for (i = 0; i < NR_IRQS; i++)
588 irq_bindcount[i] = 0;
589
590 irq_ctx_init(smp_processor_id());
591}
diff --git a/arch/i386/xen/features.c b/arch/i386/xen/features.c
new file mode 100644
index 000000000000..0707714e40d6
--- /dev/null
+++ b/arch/i386/xen/features.c
@@ -0,0 +1,29 @@
1/******************************************************************************
2 * features.c
3 *
4 * Xen feature flags.
5 *
6 * Copyright (c) 2006, Ian Campbell, XenSource Inc.
7 */
8#include <linux/types.h>
9#include <linux/cache.h>
10#include <linux/module.h>
11#include <asm/xen/hypervisor.h>
12#include <xen/features.h>
13
14u8 xen_features[XENFEAT_NR_SUBMAPS * 32] __read_mostly;
15EXPORT_SYMBOL_GPL(xen_features);
16
17void xen_setup_features(void)
18{
19 struct xen_feature_info fi;
20 int i, j;
21
22 for (i = 0; i < XENFEAT_NR_SUBMAPS; i++) {
23 fi.submap_idx = i;
24 if (HYPERVISOR_xen_version(XENVER_get_features, &fi) < 0)
25 break;
26 for (j = 0; j < 32; j++)
27 xen_features[i * 32 + j] = !!(fi.submap & 1<<j);
28 }
29}
diff --git a/arch/i386/xen/manage.c b/arch/i386/xen/manage.c
new file mode 100644
index 000000000000..aa7af9e6abc0
--- /dev/null
+++ b/arch/i386/xen/manage.c
@@ -0,0 +1,143 @@
1/*
2 * Handle extern requests for shutdown, reboot and sysrq
3 */
4#include <linux/kernel.h>
5#include <linux/err.h>
6#include <linux/reboot.h>
7#include <linux/sysrq.h>
8
9#include <xen/xenbus.h>
10
11#define SHUTDOWN_INVALID -1
12#define SHUTDOWN_POWEROFF 0
13#define SHUTDOWN_SUSPEND 2
14/* Code 3 is SHUTDOWN_CRASH, which we don't use because the domain can only
15 * report a crash, not be instructed to crash!
16 * HALT is the same as POWEROFF, as far as we're concerned. The tools use
17 * the distinction when we return the reason code to them.
18 */
19#define SHUTDOWN_HALT 4
20
21/* Ignore multiple shutdown requests. */
22static int shutting_down = SHUTDOWN_INVALID;
23
24static void shutdown_handler(struct xenbus_watch *watch,
25 const char **vec, unsigned int len)
26{
27 char *str;
28 struct xenbus_transaction xbt;
29 int err;
30
31 if (shutting_down != SHUTDOWN_INVALID)
32 return;
33
34 again:
35 err = xenbus_transaction_start(&xbt);
36 if (err)
37 return;
38
39 str = (char *)xenbus_read(xbt, "control", "shutdown", NULL);
40 /* Ignore read errors and empty reads. */
41 if (XENBUS_IS_ERR_READ(str)) {
42 xenbus_transaction_end(xbt, 1);
43 return;
44 }
45
46 xenbus_write(xbt, "control", "shutdown", "");
47
48 err = xenbus_transaction_end(xbt, 0);
49 if (err == -EAGAIN) {
50 kfree(str);
51 goto again;
52 }
53
54 if (strcmp(str, "poweroff") == 0 ||
55 strcmp(str, "halt") == 0)
56 orderly_poweroff(false);
57 else if (strcmp(str, "reboot") == 0)
58 ctrl_alt_del();
59 else {
60 printk(KERN_INFO "Ignoring shutdown request: %s\n", str);
61 shutting_down = SHUTDOWN_INVALID;
62 }
63
64 kfree(str);
65}
66
67static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
68 unsigned int len)
69{
70 char sysrq_key = '\0';
71 struct xenbus_transaction xbt;
72 int err;
73
74 again:
75 err = xenbus_transaction_start(&xbt);
76 if (err)
77 return;
78 if (!xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key)) {
79 printk(KERN_ERR "Unable to read sysrq code in "
80 "control/sysrq\n");
81 xenbus_transaction_end(xbt, 1);
82 return;
83 }
84
85 if (sysrq_key != '\0')
86 xenbus_printf(xbt, "control", "sysrq", "%c", '\0');
87
88 err = xenbus_transaction_end(xbt, 0);
89 if (err == -EAGAIN)
90 goto again;
91
92 if (sysrq_key != '\0')
93 handle_sysrq(sysrq_key, NULL);
94}
95
96static struct xenbus_watch shutdown_watch = {
97 .node = "control/shutdown",
98 .callback = shutdown_handler
99};
100
101static struct xenbus_watch sysrq_watch = {
102 .node = "control/sysrq",
103 .callback = sysrq_handler
104};
105
106static int setup_shutdown_watcher(void)
107{
108 int err;
109
110 err = register_xenbus_watch(&shutdown_watch);
111 if (err) {
112 printk(KERN_ERR "Failed to set shutdown watcher\n");
113 return err;
114 }
115
116 err = register_xenbus_watch(&sysrq_watch);
117 if (err) {
118 printk(KERN_ERR "Failed to set sysrq watcher\n");
119 return err;
120 }
121
122 return 0;
123}
124
125static int shutdown_event(struct notifier_block *notifier,
126 unsigned long event,
127 void *data)
128{
129 setup_shutdown_watcher();
130 return NOTIFY_DONE;
131}
132
133static int __init setup_shutdown_event(void)
134{
135 static struct notifier_block xenstore_notifier = {
136 .notifier_call = shutdown_event
137 };
138 register_xenstore_notifier(&xenstore_notifier);
139
140 return 0;
141}
142
143subsys_initcall(setup_shutdown_event);
diff --git a/arch/i386/xen/mmu.c b/arch/i386/xen/mmu.c
new file mode 100644
index 000000000000..4ae038aa6c24
--- /dev/null
+++ b/arch/i386/xen/mmu.c
@@ -0,0 +1,564 @@
1/*
2 * Xen mmu operations
3 *
4 * This file contains the various mmu fetch and update operations.
5 * The most important job they must perform is the mapping between the
6 * domain's pfn and the overall machine mfns.
7 *
8 * Xen allows guests to directly update the pagetable, in a controlled
9 * fashion. In other words, the guest modifies the same pagetable
10 * that the CPU actually uses, which eliminates the overhead of having
11 * a separate shadow pagetable.
12 *
13 * In order to allow this, it falls on the guest domain to map its
14 * notion of a "physical" pfn - which is just a domain-local linear
15 * address - into a real "machine address" which the CPU's MMU can
16 * use.
17 *
18 * A pgd_t/pmd_t/pte_t will typically contain an mfn, and so can be
19 * inserted directly into the pagetable. When creating a new
20 * pte/pmd/pgd, it converts the passed pfn into an mfn. Conversely,
21 * when reading the content back with __(pgd|pmd|pte)_val, it converts
22 * the mfn back into a pfn.
23 *
24 * The other constraint is that all pages which make up a pagetable
25 * must be mapped read-only in the guest. This prevents uncontrolled
26 * guest updates to the pagetable. Xen strictly enforces this, and
27 * will disallow any pagetable update which will end up mapping a
28 * pagetable page RW, and will disallow using any writable page as a
29 * pagetable.
30 *
31 * Naively, when loading %cr3 with the base of a new pagetable, Xen
32 * would need to validate the whole pagetable before going on.
33 * Naturally, this is quite slow. The solution is to "pin" a
34 * pagetable, which enforces all the constraints on the pagetable even
35 * when it is not actively in use. This menas that Xen can be assured
36 * that it is still valid when you do load it into %cr3, and doesn't
37 * need to revalidate it.
38 *
39 * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007
40 */
41#include <linux/sched.h>
42#include <linux/highmem.h>
43#include <linux/bug.h>
44#include <linux/sched.h>
45
46#include <asm/pgtable.h>
47#include <asm/tlbflush.h>
48#include <asm/mmu_context.h>
49#include <asm/paravirt.h>
50
51#include <asm/xen/hypercall.h>
52#include <asm/xen/hypervisor.h>
53
54#include <xen/page.h>
55#include <xen/interface/xen.h>
56
57#include "multicalls.h"
58#include "mmu.h"
59
60xmaddr_t arbitrary_virt_to_machine(unsigned long address)
61{
62 pte_t *pte = lookup_address(address);
63 unsigned offset = address & PAGE_MASK;
64
65 BUG_ON(pte == NULL);
66
67 return XMADDR((pte_mfn(*pte) << PAGE_SHIFT) + offset);
68}
69
70void make_lowmem_page_readonly(void *vaddr)
71{
72 pte_t *pte, ptev;
73 unsigned long address = (unsigned long)vaddr;
74
75 pte = lookup_address(address);
76 BUG_ON(pte == NULL);
77
78 ptev = pte_wrprotect(*pte);
79
80 if (HYPERVISOR_update_va_mapping(address, ptev, 0))
81 BUG();
82}
83
84void make_lowmem_page_readwrite(void *vaddr)
85{
86 pte_t *pte, ptev;
87 unsigned long address = (unsigned long)vaddr;
88
89 pte = lookup_address(address);
90 BUG_ON(pte == NULL);
91
92 ptev = pte_mkwrite(*pte);
93
94 if (HYPERVISOR_update_va_mapping(address, ptev, 0))
95 BUG();
96}
97
98
99void xen_set_pmd(pmd_t *ptr, pmd_t val)
100{
101 struct multicall_space mcs;
102 struct mmu_update *u;
103
104 preempt_disable();
105
106 mcs = xen_mc_entry(sizeof(*u));
107 u = mcs.args;
108 u->ptr = virt_to_machine(ptr).maddr;
109 u->val = pmd_val_ma(val);
110 MULTI_mmu_update(mcs.mc, u, 1, NULL, DOMID_SELF);
111
112 xen_mc_issue(PARAVIRT_LAZY_MMU);
113
114 preempt_enable();
115}
116
117/*
118 * Associate a virtual page frame with a given physical page frame
119 * and protection flags for that frame.
120 */
121void set_pte_mfn(unsigned long vaddr, unsigned long mfn, pgprot_t flags)
122{
123 pgd_t *pgd;
124 pud_t *pud;
125 pmd_t *pmd;
126 pte_t *pte;
127
128 pgd = swapper_pg_dir + pgd_index(vaddr);
129 if (pgd_none(*pgd)) {
130 BUG();
131 return;
132 }
133 pud = pud_offset(pgd, vaddr);
134 if (pud_none(*pud)) {
135 BUG();
136 return;
137 }
138 pmd = pmd_offset(pud, vaddr);
139 if (pmd_none(*pmd)) {
140 BUG();
141 return;
142 }
143 pte = pte_offset_kernel(pmd, vaddr);
144 /* <mfn,flags> stored as-is, to permit clearing entries */
145 xen_set_pte(pte, mfn_pte(mfn, flags));
146
147 /*
148 * It's enough to flush this one mapping.
149 * (PGE mappings get flushed as well)
150 */
151 __flush_tlb_one(vaddr);
152}
153
154void xen_set_pte_at(struct mm_struct *mm, unsigned long addr,
155 pte_t *ptep, pte_t pteval)
156{
157 if (mm == current->mm || mm == &init_mm) {
158 if (xen_get_lazy_mode() == PARAVIRT_LAZY_MMU) {
159 struct multicall_space mcs;
160 mcs = xen_mc_entry(0);
161
162 MULTI_update_va_mapping(mcs.mc, addr, pteval, 0);
163 xen_mc_issue(PARAVIRT_LAZY_MMU);
164 return;
165 } else
166 if (HYPERVISOR_update_va_mapping(addr, pteval, 0) == 0)
167 return;
168 }
169 xen_set_pte(ptep, pteval);
170}
171
172#ifdef CONFIG_X86_PAE
173void xen_set_pud(pud_t *ptr, pud_t val)
174{
175 struct multicall_space mcs;
176 struct mmu_update *u;
177
178 preempt_disable();
179
180 mcs = xen_mc_entry(sizeof(*u));
181 u = mcs.args;
182 u->ptr = virt_to_machine(ptr).maddr;
183 u->val = pud_val_ma(val);
184 MULTI_mmu_update(mcs.mc, u, 1, NULL, DOMID_SELF);
185
186 xen_mc_issue(PARAVIRT_LAZY_MMU);
187
188 preempt_enable();
189}
190
191void xen_set_pte(pte_t *ptep, pte_t pte)
192{
193 ptep->pte_high = pte.pte_high;
194 smp_wmb();
195 ptep->pte_low = pte.pte_low;
196}
197
198void xen_set_pte_atomic(pte_t *ptep, pte_t pte)
199{
200 set_64bit((u64 *)ptep, pte_val_ma(pte));
201}
202
203void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
204{
205 ptep->pte_low = 0;
206 smp_wmb(); /* make sure low gets written first */
207 ptep->pte_high = 0;
208}
209
210void xen_pmd_clear(pmd_t *pmdp)
211{
212 xen_set_pmd(pmdp, __pmd(0));
213}
214
215unsigned long long xen_pte_val(pte_t pte)
216{
217 unsigned long long ret = 0;
218
219 if (pte.pte_low) {
220 ret = ((unsigned long long)pte.pte_high << 32) | pte.pte_low;
221 ret = machine_to_phys(XMADDR(ret)).paddr | 1;
222 }
223
224 return ret;
225}
226
227unsigned long long xen_pmd_val(pmd_t pmd)
228{
229 unsigned long long ret = pmd.pmd;
230 if (ret)
231 ret = machine_to_phys(XMADDR(ret)).paddr | 1;
232 return ret;
233}
234
235unsigned long long xen_pgd_val(pgd_t pgd)
236{
237 unsigned long long ret = pgd.pgd;
238 if (ret)
239 ret = machine_to_phys(XMADDR(ret)).paddr | 1;
240 return ret;
241}
242
243pte_t xen_make_pte(unsigned long long pte)
244{
245 if (pte & 1)
246 pte = phys_to_machine(XPADDR(pte)).maddr;
247
248 return (pte_t){ pte, pte >> 32 };
249}
250
251pmd_t xen_make_pmd(unsigned long long pmd)
252{
253 if (pmd & 1)
254 pmd = phys_to_machine(XPADDR(pmd)).maddr;
255
256 return (pmd_t){ pmd };
257}
258
259pgd_t xen_make_pgd(unsigned long long pgd)
260{
261 if (pgd & _PAGE_PRESENT)
262 pgd = phys_to_machine(XPADDR(pgd)).maddr;
263
264 return (pgd_t){ pgd };
265}
266#else /* !PAE */
267void xen_set_pte(pte_t *ptep, pte_t pte)
268{
269 *ptep = pte;
270}
271
272unsigned long xen_pte_val(pte_t pte)
273{
274 unsigned long ret = pte.pte_low;
275
276 if (ret & _PAGE_PRESENT)
277 ret = machine_to_phys(XMADDR(ret)).paddr;
278
279 return ret;
280}
281
282unsigned long xen_pgd_val(pgd_t pgd)
283{
284 unsigned long ret = pgd.pgd;
285 if (ret)
286 ret = machine_to_phys(XMADDR(ret)).paddr | 1;
287 return ret;
288}
289
290pte_t xen_make_pte(unsigned long pte)
291{
292 if (pte & _PAGE_PRESENT)
293 pte = phys_to_machine(XPADDR(pte)).maddr;
294
295 return (pte_t){ pte };
296}
297
298pgd_t xen_make_pgd(unsigned long pgd)
299{
300 if (pgd & _PAGE_PRESENT)
301 pgd = phys_to_machine(XPADDR(pgd)).maddr;
302
303 return (pgd_t){ pgd };
304}
305#endif /* CONFIG_X86_PAE */
306
307
308
309/*
310 (Yet another) pagetable walker. This one is intended for pinning a
311 pagetable. This means that it walks a pagetable and calls the
312 callback function on each page it finds making up the page table,
313 at every level. It walks the entire pagetable, but it only bothers
314 pinning pte pages which are below pte_limit. In the normal case
315 this will be TASK_SIZE, but at boot we need to pin up to
316 FIXADDR_TOP. But the important bit is that we don't pin beyond
317 there, because then we start getting into Xen's ptes.
318*/
319static int pgd_walk(pgd_t *pgd_base, int (*func)(struct page *, unsigned),
320 unsigned long limit)
321{
322 pgd_t *pgd = pgd_base;
323 int flush = 0;
324 unsigned long addr = 0;
325 unsigned long pgd_next;
326
327 BUG_ON(limit > FIXADDR_TOP);
328
329 if (xen_feature(XENFEAT_auto_translated_physmap))
330 return 0;
331
332 for (; addr != FIXADDR_TOP; pgd++, addr = pgd_next) {
333 pud_t *pud;
334 unsigned long pud_limit, pud_next;
335
336 pgd_next = pud_limit = pgd_addr_end(addr, FIXADDR_TOP);
337
338 if (!pgd_val(*pgd))
339 continue;
340
341 pud = pud_offset(pgd, 0);
342
343 if (PTRS_PER_PUD > 1) /* not folded */
344 flush |= (*func)(virt_to_page(pud), 0);
345
346 for (; addr != pud_limit; pud++, addr = pud_next) {
347 pmd_t *pmd;
348 unsigned long pmd_limit;
349
350 pud_next = pud_addr_end(addr, pud_limit);
351
352 if (pud_next < limit)
353 pmd_limit = pud_next;
354 else
355 pmd_limit = limit;
356
357 if (pud_none(*pud))
358 continue;
359
360 pmd = pmd_offset(pud, 0);
361
362 if (PTRS_PER_PMD > 1) /* not folded */
363 flush |= (*func)(virt_to_page(pmd), 0);
364
365 for (; addr != pmd_limit; pmd++) {
366 addr += (PAGE_SIZE * PTRS_PER_PTE);
367 if ((pmd_limit-1) < (addr-1)) {
368 addr = pmd_limit;
369 break;
370 }
371
372 if (pmd_none(*pmd))
373 continue;
374
375 flush |= (*func)(pmd_page(*pmd), 0);
376 }
377 }
378 }
379
380 flush |= (*func)(virt_to_page(pgd_base), UVMF_TLB_FLUSH);
381
382 return flush;
383}
384
385static int pin_page(struct page *page, unsigned flags)
386{
387 unsigned pgfl = test_and_set_bit(PG_pinned, &page->flags);
388 int flush;
389
390 if (pgfl)
391 flush = 0; /* already pinned */
392 else if (PageHighMem(page))
393 /* kmaps need flushing if we found an unpinned
394 highpage */
395 flush = 1;
396 else {
397 void *pt = lowmem_page_address(page);
398 unsigned long pfn = page_to_pfn(page);
399 struct multicall_space mcs = __xen_mc_entry(0);
400
401 flush = 0;
402
403 MULTI_update_va_mapping(mcs.mc, (unsigned long)pt,
404 pfn_pte(pfn, PAGE_KERNEL_RO),
405 flags);
406 }
407
408 return flush;
409}
410
411/* This is called just after a mm has been created, but it has not
412 been used yet. We need to make sure that its pagetable is all
413 read-only, and can be pinned. */
414void xen_pgd_pin(pgd_t *pgd)
415{
416 struct multicall_space mcs;
417 struct mmuext_op *op;
418
419 xen_mc_batch();
420
421 if (pgd_walk(pgd, pin_page, TASK_SIZE)) {
422 /* re-enable interrupts for kmap_flush_unused */
423 xen_mc_issue(0);
424 kmap_flush_unused();
425 xen_mc_batch();
426 }
427
428 mcs = __xen_mc_entry(sizeof(*op));
429 op = mcs.args;
430
431#ifdef CONFIG_X86_PAE
432 op->cmd = MMUEXT_PIN_L3_TABLE;
433#else
434 op->cmd = MMUEXT_PIN_L2_TABLE;
435#endif
436 op->arg1.mfn = pfn_to_mfn(PFN_DOWN(__pa(pgd)));
437 MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF);
438
439 xen_mc_issue(0);
440}
441
442/* The init_mm pagetable is really pinned as soon as its created, but
443 that's before we have page structures to store the bits. So do all
444 the book-keeping now. */
445static __init int mark_pinned(struct page *page, unsigned flags)
446{
447 SetPagePinned(page);
448 return 0;
449}
450
451void __init xen_mark_init_mm_pinned(void)
452{
453 pgd_walk(init_mm.pgd, mark_pinned, FIXADDR_TOP);
454}
455
456static int unpin_page(struct page *page, unsigned flags)
457{
458 unsigned pgfl = test_and_clear_bit(PG_pinned, &page->flags);
459
460 if (pgfl && !PageHighMem(page)) {
461 void *pt = lowmem_page_address(page);
462 unsigned long pfn = page_to_pfn(page);
463 struct multicall_space mcs = __xen_mc_entry(0);
464
465 MULTI_update_va_mapping(mcs.mc, (unsigned long)pt,
466 pfn_pte(pfn, PAGE_KERNEL),
467 flags);
468 }
469
470 return 0; /* never need to flush on unpin */
471}
472
473/* Release a pagetables pages back as normal RW */
474static void xen_pgd_unpin(pgd_t *pgd)
475{
476 struct mmuext_op *op;
477 struct multicall_space mcs;
478
479 xen_mc_batch();
480
481 mcs = __xen_mc_entry(sizeof(*op));
482
483 op = mcs.args;
484 op->cmd = MMUEXT_UNPIN_TABLE;
485 op->arg1.mfn = pfn_to_mfn(PFN_DOWN(__pa(pgd)));
486
487 MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF);
488
489 pgd_walk(pgd, unpin_page, TASK_SIZE);
490
491 xen_mc_issue(0);
492}
493
494void xen_activate_mm(struct mm_struct *prev, struct mm_struct *next)
495{
496 spin_lock(&next->page_table_lock);
497 xen_pgd_pin(next->pgd);
498 spin_unlock(&next->page_table_lock);
499}
500
501void xen_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm)
502{
503 spin_lock(&mm->page_table_lock);
504 xen_pgd_pin(mm->pgd);
505 spin_unlock(&mm->page_table_lock);
506}
507
508
509#ifdef CONFIG_SMP
510/* Another cpu may still have their %cr3 pointing at the pagetable, so
511 we need to repoint it somewhere else before we can unpin it. */
512static void drop_other_mm_ref(void *info)
513{
514 struct mm_struct *mm = info;
515
516 if (__get_cpu_var(cpu_tlbstate).active_mm == mm)
517 leave_mm(smp_processor_id());
518}
519
520static void drop_mm_ref(struct mm_struct *mm)
521{
522 if (current->active_mm == mm) {
523 if (current->mm == mm)
524 load_cr3(swapper_pg_dir);
525 else
526 leave_mm(smp_processor_id());
527 }
528
529 if (!cpus_empty(mm->cpu_vm_mask))
530 xen_smp_call_function_mask(mm->cpu_vm_mask, drop_other_mm_ref,
531 mm, 1);
532}
533#else
534static void drop_mm_ref(struct mm_struct *mm)
535{
536 if (current->active_mm == mm)
537 load_cr3(swapper_pg_dir);
538}
539#endif
540
541/*
542 * While a process runs, Xen pins its pagetables, which means that the
543 * hypervisor forces it to be read-only, and it controls all updates
544 * to it. This means that all pagetable updates have to go via the
545 * hypervisor, which is moderately expensive.
546 *
547 * Since we're pulling the pagetable down, we switch to use init_mm,
548 * unpin old process pagetable and mark it all read-write, which
549 * allows further operations on it to be simple memory accesses.
550 *
551 * The only subtle point is that another CPU may be still using the
552 * pagetable because of lazy tlb flushing. This means we need need to
553 * switch all CPUs off this pagetable before we can unpin it.
554 */
555void xen_exit_mmap(struct mm_struct *mm)
556{
557 get_cpu(); /* make sure we don't move around */
558 drop_mm_ref(mm);
559 put_cpu();
560
561 spin_lock(&mm->page_table_lock);
562 xen_pgd_unpin(mm->pgd);
563 spin_unlock(&mm->page_table_lock);
564}
diff --git a/arch/i386/xen/mmu.h b/arch/i386/xen/mmu.h
new file mode 100644
index 000000000000..c9ff27f3ac3a
--- /dev/null
+++ b/arch/i386/xen/mmu.h
@@ -0,0 +1,60 @@
1#ifndef _XEN_MMU_H
2
3#include <linux/linkage.h>
4#include <asm/page.h>
5
6/*
7 * Page-directory addresses above 4GB do not fit into architectural %cr3.
8 * When accessing %cr3, or equivalent field in vcpu_guest_context, guests
9 * must use the following accessor macros to pack/unpack valid MFNs.
10 *
11 * Note that Xen is using the fact that the pagetable base is always
12 * page-aligned, and putting the 12 MSB of the address into the 12 LSB
13 * of cr3.
14 */
15#define xen_pfn_to_cr3(pfn) (((unsigned)(pfn) << 12) | ((unsigned)(pfn) >> 20))
16#define xen_cr3_to_pfn(cr3) (((unsigned)(cr3) >> 12) | ((unsigned)(cr3) << 20))
17
18
19void set_pte_mfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags);
20
21void xen_set_pte(pte_t *ptep, pte_t pteval);
22void xen_set_pte_at(struct mm_struct *mm, unsigned long addr,
23 pte_t *ptep, pte_t pteval);
24void xen_set_pmd(pmd_t *pmdp, pmd_t pmdval);
25
26void xen_activate_mm(struct mm_struct *prev, struct mm_struct *next);
27void xen_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm);
28void xen_exit_mmap(struct mm_struct *mm);
29
30void xen_pgd_pin(pgd_t *pgd);
31//void xen_pgd_unpin(pgd_t *pgd);
32
33#ifdef CONFIG_X86_PAE
34unsigned long long xen_pte_val(pte_t);
35unsigned long long xen_pmd_val(pmd_t);
36unsigned long long xen_pgd_val(pgd_t);
37
38pte_t xen_make_pte(unsigned long long);
39pmd_t xen_make_pmd(unsigned long long);
40pgd_t xen_make_pgd(unsigned long long);
41
42void xen_set_pte_at(struct mm_struct *mm, unsigned long addr,
43 pte_t *ptep, pte_t pteval);
44void xen_set_pte_atomic(pte_t *ptep, pte_t pte);
45void xen_set_pud(pud_t *ptr, pud_t val);
46void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
47void xen_pmd_clear(pmd_t *pmdp);
48
49
50#else
51unsigned long xen_pte_val(pte_t);
52unsigned long xen_pmd_val(pmd_t);
53unsigned long xen_pgd_val(pgd_t);
54
55pte_t xen_make_pte(unsigned long);
56pmd_t xen_make_pmd(unsigned long);
57pgd_t xen_make_pgd(unsigned long);
58#endif
59
60#endif /* _XEN_MMU_H */
diff --git a/arch/i386/xen/multicalls.c b/arch/i386/xen/multicalls.c
new file mode 100644
index 000000000000..c837e8e463db
--- /dev/null
+++ b/arch/i386/xen/multicalls.c
@@ -0,0 +1,90 @@
1/*
2 * Xen hypercall batching.
3 *
4 * Xen allows multiple hypercalls to be issued at once, using the
5 * multicall interface. This allows the cost of trapping into the
6 * hypervisor to be amortized over several calls.
7 *
8 * This file implements a simple interface for multicalls. There's a
9 * per-cpu buffer of outstanding multicalls. When you want to queue a
10 * multicall for issuing, you can allocate a multicall slot for the
11 * call and its arguments, along with storage for space which is
12 * pointed to by the arguments (for passing pointers to structures,
13 * etc). When the multicall is actually issued, all the space for the
14 * commands and allocated memory is freed for reuse.
15 *
16 * Multicalls are flushed whenever any of the buffers get full, or
17 * when explicitly requested. There's no way to get per-multicall
18 * return results back. It will BUG if any of the multicalls fail.
19 *
20 * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007
21 */
22#include <linux/percpu.h>
23#include <linux/hardirq.h>
24
25#include <asm/xen/hypercall.h>
26
27#include "multicalls.h"
28
29#define MC_BATCH 32
30#define MC_ARGS (MC_BATCH * 16 / sizeof(u64))
31
32struct mc_buffer {
33 struct multicall_entry entries[MC_BATCH];
34 u64 args[MC_ARGS];
35 unsigned mcidx, argidx;
36};
37
38static DEFINE_PER_CPU(struct mc_buffer, mc_buffer);
39DEFINE_PER_CPU(unsigned long, xen_mc_irq_flags);
40
41void xen_mc_flush(void)
42{
43 struct mc_buffer *b = &__get_cpu_var(mc_buffer);
44 int ret = 0;
45 unsigned long flags;
46
47 BUG_ON(preemptible());
48
49 /* Disable interrupts in case someone comes in and queues
50 something in the middle */
51 local_irq_save(flags);
52
53 if (b->mcidx) {
54 int i;
55
56 if (HYPERVISOR_multicall(b->entries, b->mcidx) != 0)
57 BUG();
58 for (i = 0; i < b->mcidx; i++)
59 if (b->entries[i].result < 0)
60 ret++;
61 b->mcidx = 0;
62 b->argidx = 0;
63 } else
64 BUG_ON(b->argidx != 0);
65
66 local_irq_restore(flags);
67
68 BUG_ON(ret);
69}
70
71struct multicall_space __xen_mc_entry(size_t args)
72{
73 struct mc_buffer *b = &__get_cpu_var(mc_buffer);
74 struct multicall_space ret;
75 unsigned argspace = (args + sizeof(u64) - 1) / sizeof(u64);
76
77 BUG_ON(preemptible());
78 BUG_ON(argspace > MC_ARGS);
79
80 if (b->mcidx == MC_BATCH ||
81 (b->argidx + argspace) > MC_ARGS)
82 xen_mc_flush();
83
84 ret.mc = &b->entries[b->mcidx];
85 b->mcidx++;
86 ret.args = &b->args[b->argidx];
87 b->argidx += argspace;
88
89 return ret;
90}
diff --git a/arch/i386/xen/multicalls.h b/arch/i386/xen/multicalls.h
new file mode 100644
index 000000000000..e6f7530b156c
--- /dev/null
+++ b/arch/i386/xen/multicalls.h
@@ -0,0 +1,45 @@
1#ifndef _XEN_MULTICALLS_H
2#define _XEN_MULTICALLS_H
3
4#include "xen-ops.h"
5
6/* Multicalls */
7struct multicall_space
8{
9 struct multicall_entry *mc;
10 void *args;
11};
12
13/* Allocate room for a multicall and its args */
14struct multicall_space __xen_mc_entry(size_t args);
15
16DECLARE_PER_CPU(unsigned long, xen_mc_irq_flags);
17
18/* Call to start a batch of multiple __xen_mc_entry()s. Must be
19 paired with xen_mc_issue() */
20static inline void xen_mc_batch(void)
21{
22 /* need to disable interrupts until this entry is complete */
23 local_irq_save(__get_cpu_var(xen_mc_irq_flags));
24}
25
26static inline struct multicall_space xen_mc_entry(size_t args)
27{
28 xen_mc_batch();
29 return __xen_mc_entry(args);
30}
31
32/* Flush all pending multicalls */
33void xen_mc_flush(void);
34
35/* Issue a multicall if we're not in a lazy mode */
36static inline void xen_mc_issue(unsigned mode)
37{
38 if ((xen_get_lazy_mode() & mode) == 0)
39 xen_mc_flush();
40
41 /* restore flags saved in xen_mc_batch */
42 local_irq_restore(x86_read_percpu(xen_mc_irq_flags));
43}
44
45#endif /* _XEN_MULTICALLS_H */
diff --git a/arch/i386/xen/setup.c b/arch/i386/xen/setup.c
new file mode 100644
index 000000000000..f84e77226646
--- /dev/null
+++ b/arch/i386/xen/setup.c
@@ -0,0 +1,111 @@
1/*
2 * Machine specific setup for xen
3 *
4 * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007
5 */
6
7#include <linux/module.h>
8#include <linux/sched.h>
9#include <linux/mm.h>
10#include <linux/pm.h>
11
12#include <asm/elf.h>
13#include <asm/e820.h>
14#include <asm/setup.h>
15#include <asm/xen/hypervisor.h>
16#include <asm/xen/hypercall.h>
17
18#include <xen/interface/physdev.h>
19#include <xen/features.h>
20
21#include "xen-ops.h"
22#include "vdso.h"
23
24/* These are code, but not functions. Defined in entry.S */
25extern const char xen_hypervisor_callback[];
26extern const char xen_failsafe_callback[];
27
28unsigned long *phys_to_machine_mapping;
29EXPORT_SYMBOL(phys_to_machine_mapping);
30
31/**
32 * machine_specific_memory_setup - Hook for machine specific memory setup.
33 **/
34
35char * __init xen_memory_setup(void)
36{
37 unsigned long max_pfn = xen_start_info->nr_pages;
38
39 e820.nr_map = 0;
40 add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM);
41
42 return "Xen";
43}
44
45static void xen_idle(void)
46{
47 local_irq_disable();
48
49 if (need_resched())
50 local_irq_enable();
51 else {
52 current_thread_info()->status &= ~TS_POLLING;
53 smp_mb__after_clear_bit();
54 safe_halt();
55 current_thread_info()->status |= TS_POLLING;
56 }
57}
58
59/*
60 * Set the bit indicating "nosegneg" library variants should be used.
61 */
62static void fiddle_vdso(void)
63{
64 extern u32 VDSO_NOTE_MASK; /* See ../kernel/vsyscall-note.S. */
65 extern char vsyscall_int80_start;
66 u32 *mask = (u32 *) ((unsigned long) &VDSO_NOTE_MASK - VDSO_PRELINK +
67 &vsyscall_int80_start);
68 *mask |= 1 << VDSO_NOTE_NONEGSEG_BIT;
69}
70
71void __init xen_arch_setup(void)
72{
73 struct physdev_set_iopl set_iopl;
74 int rc;
75
76 HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
77 HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_writable_pagetables);
78
79 if (!xen_feature(XENFEAT_auto_translated_physmap))
80 HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_pae_extended_cr3);
81
82 HYPERVISOR_set_callbacks(__KERNEL_CS, (unsigned long)xen_hypervisor_callback,
83 __KERNEL_CS, (unsigned long)xen_failsafe_callback);
84
85 set_iopl.iopl = 1;
86 rc = HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
87 if (rc != 0)
88 printk(KERN_INFO "physdev_op failed %d\n", rc);
89
90#ifdef CONFIG_ACPI
91 if (!(xen_start_info->flags & SIF_INITDOMAIN)) {
92 printk(KERN_INFO "ACPI in unprivileged domain disabled\n");
93 disable_acpi();
94 }
95#endif
96
97 memcpy(boot_command_line, xen_start_info->cmd_line,
98 MAX_GUEST_CMDLINE > COMMAND_LINE_SIZE ?
99 COMMAND_LINE_SIZE : MAX_GUEST_CMDLINE);
100
101 pm_idle = xen_idle;
102
103#ifdef CONFIG_SMP
104 /* fill cpus_possible with all available cpus */
105 xen_fill_possible_map();
106#endif
107
108 paravirt_disable_iospace();
109
110 fiddle_vdso();
111}
diff --git a/arch/i386/xen/smp.c b/arch/i386/xen/smp.c
new file mode 100644
index 000000000000..557b8e24706a
--- /dev/null
+++ b/arch/i386/xen/smp.c
@@ -0,0 +1,404 @@
1/*
2 * Xen SMP support
3 *
4 * This file implements the Xen versions of smp_ops. SMP under Xen is
5 * very straightforward. Bringing a CPU up is simply a matter of
6 * loading its initial context and setting it running.
7 *
8 * IPIs are handled through the Xen event mechanism.
9 *
10 * Because virtual CPUs can be scheduled onto any real CPU, there's no
11 * useful topology information for the kernel to make use of. As a
12 * result, all CPUs are treated as if they're single-core and
13 * single-threaded.
14 *
15 * This does not handle HOTPLUG_CPU yet.
16 */
17#include <linux/sched.h>
18#include <linux/err.h>
19#include <linux/smp.h>
20
21#include <asm/paravirt.h>
22#include <asm/desc.h>
23#include <asm/pgtable.h>
24#include <asm/cpu.h>
25
26#include <xen/interface/xen.h>
27#include <xen/interface/vcpu.h>
28
29#include <asm/xen/interface.h>
30#include <asm/xen/hypercall.h>
31
32#include <xen/page.h>
33#include <xen/events.h>
34
35#include "xen-ops.h"
36#include "mmu.h"
37
38static cpumask_t cpu_initialized_map;
39static DEFINE_PER_CPU(int, resched_irq);
40static DEFINE_PER_CPU(int, callfunc_irq);
41
42/*
43 * Structure and data for smp_call_function(). This is designed to minimise
44 * static memory requirements. It also looks cleaner.
45 */
46static DEFINE_SPINLOCK(call_lock);
47
48struct call_data_struct {
49 void (*func) (void *info);
50 void *info;
51 atomic_t started;
52 atomic_t finished;
53 int wait;
54};
55
56static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id);
57
58static struct call_data_struct *call_data;
59
60/*
61 * Reschedule call back. Nothing to do,
62 * all the work is done automatically when
63 * we return from the interrupt.
64 */
65static irqreturn_t xen_reschedule_interrupt(int irq, void *dev_id)
66{
67 return IRQ_HANDLED;
68}
69
70static __cpuinit void cpu_bringup_and_idle(void)
71{
72 int cpu = smp_processor_id();
73
74 cpu_init();
75
76 preempt_disable();
77 per_cpu(cpu_state, cpu) = CPU_ONLINE;
78
79 xen_setup_cpu_clockevents();
80
81 /* We can take interrupts now: we're officially "up". */
82 local_irq_enable();
83
84 wmb(); /* make sure everything is out */
85 cpu_idle();
86}
87
88static int xen_smp_intr_init(unsigned int cpu)
89{
90 int rc;
91 const char *resched_name, *callfunc_name;
92
93 per_cpu(resched_irq, cpu) = per_cpu(callfunc_irq, cpu) = -1;
94
95 resched_name = kasprintf(GFP_KERNEL, "resched%d", cpu);
96 rc = bind_ipi_to_irqhandler(XEN_RESCHEDULE_VECTOR,
97 cpu,
98 xen_reschedule_interrupt,
99 IRQF_DISABLED|IRQF_PERCPU|IRQF_NOBALANCING,
100 resched_name,
101 NULL);
102 if (rc < 0)
103 goto fail;
104 per_cpu(resched_irq, cpu) = rc;
105
106 callfunc_name = kasprintf(GFP_KERNEL, "callfunc%d", cpu);
107 rc = bind_ipi_to_irqhandler(XEN_CALL_FUNCTION_VECTOR,
108 cpu,
109 xen_call_function_interrupt,
110 IRQF_DISABLED|IRQF_PERCPU|IRQF_NOBALANCING,
111 callfunc_name,
112 NULL);
113 if (rc < 0)
114 goto fail;
115 per_cpu(callfunc_irq, cpu) = rc;
116
117 return 0;
118
119 fail:
120 if (per_cpu(resched_irq, cpu) >= 0)
121 unbind_from_irqhandler(per_cpu(resched_irq, cpu), NULL);
122 if (per_cpu(callfunc_irq, cpu) >= 0)
123 unbind_from_irqhandler(per_cpu(callfunc_irq, cpu), NULL);
124 return rc;
125}
126
127void __init xen_fill_possible_map(void)
128{
129 int i, rc;
130
131 for (i = 0; i < NR_CPUS; i++) {
132 rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL);
133 if (rc >= 0)
134 cpu_set(i, cpu_possible_map);
135 }
136}
137
138void __init xen_smp_prepare_boot_cpu(void)
139{
140 int cpu;
141
142 BUG_ON(smp_processor_id() != 0);
143 native_smp_prepare_boot_cpu();
144
145 /* We've switched to the "real" per-cpu gdt, so make sure the
146 old memory can be recycled */
147 make_lowmem_page_readwrite(&per_cpu__gdt_page);
148
149 for (cpu = 0; cpu < NR_CPUS; cpu++) {
150 cpus_clear(cpu_sibling_map[cpu]);
151 cpus_clear(cpu_core_map[cpu]);
152 }
153
154 xen_setup_vcpu_info_placement();
155}
156
157void __init xen_smp_prepare_cpus(unsigned int max_cpus)
158{
159 unsigned cpu;
160
161 for (cpu = 0; cpu < NR_CPUS; cpu++) {
162 cpus_clear(cpu_sibling_map[cpu]);
163 cpus_clear(cpu_core_map[cpu]);
164 }
165
166 smp_store_cpu_info(0);
167 set_cpu_sibling_map(0);
168
169 if (xen_smp_intr_init(0))
170 BUG();
171
172 cpu_initialized_map = cpumask_of_cpu(0);
173
174 /* Restrict the possible_map according to max_cpus. */
175 while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) {
176 for (cpu = NR_CPUS-1; !cpu_isset(cpu, cpu_possible_map); cpu--)
177 continue;
178 cpu_clear(cpu, cpu_possible_map);
179 }
180
181 for_each_possible_cpu (cpu) {
182 struct task_struct *idle;
183
184 if (cpu == 0)
185 continue;
186
187 idle = fork_idle(cpu);
188 if (IS_ERR(idle))
189 panic("failed fork for CPU %d", cpu);
190
191 cpu_set(cpu, cpu_present_map);
192 }
193
194 //init_xenbus_allowed_cpumask();
195}
196
197static __cpuinit int
198cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
199{
200 struct vcpu_guest_context *ctxt;
201 struct gdt_page *gdt = &per_cpu(gdt_page, cpu);
202
203 if (cpu_test_and_set(cpu, cpu_initialized_map))
204 return 0;
205
206 ctxt = kzalloc(sizeof(*ctxt), GFP_KERNEL);
207 if (ctxt == NULL)
208 return -ENOMEM;
209
210 ctxt->flags = VGCF_IN_KERNEL;
211 ctxt->user_regs.ds = __USER_DS;
212 ctxt->user_regs.es = __USER_DS;
213 ctxt->user_regs.fs = __KERNEL_PERCPU;
214 ctxt->user_regs.gs = 0;
215 ctxt->user_regs.ss = __KERNEL_DS;
216 ctxt->user_regs.eip = (unsigned long)cpu_bringup_and_idle;
217 ctxt->user_regs.eflags = 0x1000; /* IOPL_RING1 */
218
219 memset(&ctxt->fpu_ctxt, 0, sizeof(ctxt->fpu_ctxt));
220
221 xen_copy_trap_info(ctxt->trap_ctxt);
222
223 ctxt->ldt_ents = 0;
224
225 BUG_ON((unsigned long)gdt->gdt & ~PAGE_MASK);
226 make_lowmem_page_readonly(gdt->gdt);
227
228 ctxt->gdt_frames[0] = virt_to_mfn(gdt->gdt);
229 ctxt->gdt_ents = ARRAY_SIZE(gdt->gdt);
230
231 ctxt->user_regs.cs = __KERNEL_CS;
232 ctxt->user_regs.esp = idle->thread.esp0 - sizeof(struct pt_regs);
233
234 ctxt->kernel_ss = __KERNEL_DS;
235 ctxt->kernel_sp = idle->thread.esp0;
236
237 ctxt->event_callback_cs = __KERNEL_CS;
238 ctxt->event_callback_eip = (unsigned long)xen_hypervisor_callback;
239 ctxt->failsafe_callback_cs = __KERNEL_CS;
240 ctxt->failsafe_callback_eip = (unsigned long)xen_failsafe_callback;
241
242 per_cpu(xen_cr3, cpu) = __pa(swapper_pg_dir);
243 ctxt->ctrlreg[3] = xen_pfn_to_cr3(virt_to_mfn(swapper_pg_dir));
244
245 if (HYPERVISOR_vcpu_op(VCPUOP_initialise, cpu, ctxt))
246 BUG();
247
248 kfree(ctxt);
249 return 0;
250}
251
252int __cpuinit xen_cpu_up(unsigned int cpu)
253{
254 struct task_struct *idle = idle_task(cpu);
255 int rc;
256
257#if 0
258 rc = cpu_up_check(cpu);
259 if (rc)
260 return rc;
261#endif
262
263 init_gdt(cpu);
264 per_cpu(current_task, cpu) = idle;
265 irq_ctx_init(cpu);
266 xen_setup_timer(cpu);
267
268 /* make sure interrupts start blocked */
269 per_cpu(xen_vcpu, cpu)->evtchn_upcall_mask = 1;
270
271 rc = cpu_initialize_context(cpu, idle);
272 if (rc)
273 return rc;
274
275 if (num_online_cpus() == 1)
276 alternatives_smp_switch(1);
277
278 rc = xen_smp_intr_init(cpu);
279 if (rc)
280 return rc;
281
282 smp_store_cpu_info(cpu);
283 set_cpu_sibling_map(cpu);
284 /* This must be done before setting cpu_online_map */
285 wmb();
286
287 cpu_set(cpu, cpu_online_map);
288
289 rc = HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL);
290 BUG_ON(rc);
291
292 return 0;
293}
294
295void xen_smp_cpus_done(unsigned int max_cpus)
296{
297}
298
299static void stop_self(void *v)
300{
301 int cpu = smp_processor_id();
302
303 /* make sure we're not pinning something down */
304 load_cr3(swapper_pg_dir);
305 /* should set up a minimal gdt */
306
307 HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL);
308 BUG();
309}
310
311void xen_smp_send_stop(void)
312{
313 smp_call_function(stop_self, NULL, 0, 0);
314}
315
316void xen_smp_send_reschedule(int cpu)
317{
318 xen_send_IPI_one(cpu, XEN_RESCHEDULE_VECTOR);
319}
320
321
322static void xen_send_IPI_mask(cpumask_t mask, enum ipi_vector vector)
323{
324 unsigned cpu;
325
326 cpus_and(mask, mask, cpu_online_map);
327
328 for_each_cpu_mask(cpu, mask)
329 xen_send_IPI_one(cpu, vector);
330}
331
332static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id)
333{
334 void (*func) (void *info) = call_data->func;
335 void *info = call_data->info;
336 int wait = call_data->wait;
337
338 /*
339 * Notify initiating CPU that I've grabbed the data and am
340 * about to execute the function
341 */
342 mb();
343 atomic_inc(&call_data->started);
344 /*
345 * At this point the info structure may be out of scope unless wait==1
346 */
347 irq_enter();
348 (*func)(info);
349 irq_exit();
350
351 if (wait) {
352 mb(); /* commit everything before setting finished */
353 atomic_inc(&call_data->finished);
354 }
355
356 return IRQ_HANDLED;
357}
358
359int xen_smp_call_function_mask(cpumask_t mask, void (*func)(void *),
360 void *info, int wait)
361{
362 struct call_data_struct data;
363 int cpus;
364
365 /* Holding any lock stops cpus from going down. */
366 spin_lock(&call_lock);
367
368 cpu_clear(smp_processor_id(), mask);
369
370 cpus = cpus_weight(mask);
371 if (!cpus) {
372 spin_unlock(&call_lock);
373 return 0;
374 }
375
376 /* Can deadlock when called with interrupts disabled */
377 WARN_ON(irqs_disabled());
378
379 data.func = func;
380 data.info = info;
381 atomic_set(&data.started, 0);
382 data.wait = wait;
383 if (wait)
384 atomic_set(&data.finished, 0);
385
386 call_data = &data;
387 mb(); /* write everything before IPI */
388
389 /* Send a message to other CPUs and wait for them to respond */
390 xen_send_IPI_mask(mask, XEN_CALL_FUNCTION_VECTOR);
391
392 /* Make sure other vcpus get a chance to run.
393 XXX too severe? Maybe we should check the other CPU's states? */
394 HYPERVISOR_sched_op(SCHEDOP_yield, 0);
395
396 /* Wait for response */
397 while (atomic_read(&data.started) != cpus ||
398 (wait && atomic_read(&data.finished) != cpus))
399 cpu_relax();
400
401 spin_unlock(&call_lock);
402
403 return 0;
404}
diff --git a/arch/i386/xen/time.c b/arch/i386/xen/time.c
new file mode 100644
index 000000000000..dfd6db69ead5
--- /dev/null
+++ b/arch/i386/xen/time.c
@@ -0,0 +1,593 @@
1/*
2 * Xen time implementation.
3 *
4 * This is implemented in terms of a clocksource driver which uses
5 * the hypervisor clock as a nanosecond timebase, and a clockevent
6 * driver which uses the hypervisor's timer mechanism.
7 *
8 * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007
9 */
10#include <linux/kernel.h>
11#include <linux/interrupt.h>
12#include <linux/clocksource.h>
13#include <linux/clockchips.h>
14#include <linux/kernel_stat.h>
15
16#include <asm/xen/hypervisor.h>
17#include <asm/xen/hypercall.h>
18
19#include <xen/events.h>
20#include <xen/interface/xen.h>
21#include <xen/interface/vcpu.h>
22
23#include "xen-ops.h"
24
25#define XEN_SHIFT 22
26
27/* Xen may fire a timer up to this many ns early */
28#define TIMER_SLOP 100000
29#define NS_PER_TICK (1000000000LL / HZ)
30
31static cycle_t xen_clocksource_read(void);
32
33/* These are perodically updated in shared_info, and then copied here. */
34struct shadow_time_info {
35 u64 tsc_timestamp; /* TSC at last update of time vals. */
36 u64 system_timestamp; /* Time, in nanosecs, since boot. */
37 u32 tsc_to_nsec_mul;
38 int tsc_shift;
39 u32 version;
40};
41
42static DEFINE_PER_CPU(struct shadow_time_info, shadow_time);
43
44/* runstate info updated by Xen */
45static DEFINE_PER_CPU(struct vcpu_runstate_info, runstate);
46
47/* snapshots of runstate info */
48static DEFINE_PER_CPU(struct vcpu_runstate_info, runstate_snapshot);
49
50/* unused ns of stolen and blocked time */
51static DEFINE_PER_CPU(u64, residual_stolen);
52static DEFINE_PER_CPU(u64, residual_blocked);
53
54/* return an consistent snapshot of 64-bit time/counter value */
55static u64 get64(const u64 *p)
56{
57 u64 ret;
58
59 if (BITS_PER_LONG < 64) {
60 u32 *p32 = (u32 *)p;
61 u32 h, l;
62
63 /*
64 * Read high then low, and then make sure high is
65 * still the same; this will only loop if low wraps
66 * and carries into high.
67 * XXX some clean way to make this endian-proof?
68 */
69 do {
70 h = p32[1];
71 barrier();
72 l = p32[0];
73 barrier();
74 } while (p32[1] != h);
75
76 ret = (((u64)h) << 32) | l;
77 } else
78 ret = *p;
79
80 return ret;
81}
82
83/*
84 * Runstate accounting
85 */
86static void get_runstate_snapshot(struct vcpu_runstate_info *res)
87{
88 u64 state_time;
89 struct vcpu_runstate_info *state;
90
91 BUG_ON(preemptible());
92
93 state = &__get_cpu_var(runstate);
94
95 /*
96 * The runstate info is always updated by the hypervisor on
97 * the current CPU, so there's no need to use anything
98 * stronger than a compiler barrier when fetching it.
99 */
100 do {
101 state_time = get64(&state->state_entry_time);
102 barrier();
103 *res = *state;
104 barrier();
105 } while (get64(&state->state_entry_time) != state_time);
106}
107
108static void setup_runstate_info(int cpu)
109{
110 struct vcpu_register_runstate_memory_area area;
111
112 area.addr.v = &per_cpu(runstate, cpu);
113
114 if (HYPERVISOR_vcpu_op(VCPUOP_register_runstate_memory_area,
115 cpu, &area))
116 BUG();
117}
118
119static void do_stolen_accounting(void)
120{
121 struct vcpu_runstate_info state;
122 struct vcpu_runstate_info *snap;
123 s64 blocked, runnable, offline, stolen;
124 cputime_t ticks;
125
126 get_runstate_snapshot(&state);
127
128 WARN_ON(state.state != RUNSTATE_running);
129
130 snap = &__get_cpu_var(runstate_snapshot);
131
132 /* work out how much time the VCPU has not been runn*ing* */
133 blocked = state.time[RUNSTATE_blocked] - snap->time[RUNSTATE_blocked];
134 runnable = state.time[RUNSTATE_runnable] - snap->time[RUNSTATE_runnable];
135 offline = state.time[RUNSTATE_offline] - snap->time[RUNSTATE_offline];
136
137 *snap = state;
138
139 /* Add the appropriate number of ticks of stolen time,
140 including any left-overs from last time. Passing NULL to
141 account_steal_time accounts the time as stolen. */
142 stolen = runnable + offline + __get_cpu_var(residual_stolen);
143
144 if (stolen < 0)
145 stolen = 0;
146
147 ticks = 0;
148 while (stolen >= NS_PER_TICK) {
149 ticks++;
150 stolen -= NS_PER_TICK;
151 }
152 __get_cpu_var(residual_stolen) = stolen;
153 account_steal_time(NULL, ticks);
154
155 /* Add the appropriate number of ticks of blocked time,
156 including any left-overs from last time. Passing idle to
157 account_steal_time accounts the time as idle/wait. */
158 blocked += __get_cpu_var(residual_blocked);
159
160 if (blocked < 0)
161 blocked = 0;
162
163 ticks = 0;
164 while (blocked >= NS_PER_TICK) {
165 ticks++;
166 blocked -= NS_PER_TICK;
167 }
168 __get_cpu_var(residual_blocked) = blocked;
169 account_steal_time(idle_task(smp_processor_id()), ticks);
170}
171
172/*
173 * Xen sched_clock implementation. Returns the number of unstolen
174 * nanoseconds, which is nanoseconds the VCPU spent in RUNNING+BLOCKED
175 * states.
176 */
177unsigned long long xen_sched_clock(void)
178{
179 struct vcpu_runstate_info state;
180 cycle_t now;
181 u64 ret;
182 s64 offset;
183
184 /*
185 * Ideally sched_clock should be called on a per-cpu basis
186 * anyway, so preempt should already be disabled, but that's
187 * not current practice at the moment.
188 */
189 preempt_disable();
190
191 now = xen_clocksource_read();
192
193 get_runstate_snapshot(&state);
194
195 WARN_ON(state.state != RUNSTATE_running);
196
197 offset = now - state.state_entry_time;
198 if (offset < 0)
199 offset = 0;
200
201 ret = state.time[RUNSTATE_blocked] +
202 state.time[RUNSTATE_running] +
203 offset;
204
205 preempt_enable();
206
207 return ret;
208}
209
210
211/* Get the CPU speed from Xen */
212unsigned long xen_cpu_khz(void)
213{
214 u64 cpu_khz = 1000000ULL << 32;
215 const struct vcpu_time_info *info =
216 &HYPERVISOR_shared_info->vcpu_info[0].time;
217
218 do_div(cpu_khz, info->tsc_to_system_mul);
219 if (info->tsc_shift < 0)
220 cpu_khz <<= -info->tsc_shift;
221 else
222 cpu_khz >>= info->tsc_shift;
223
224 return cpu_khz;
225}
226
227/*
228 * Reads a consistent set of time-base values from Xen, into a shadow data
229 * area.
230 */
231static unsigned get_time_values_from_xen(void)
232{
233 struct vcpu_time_info *src;
234 struct shadow_time_info *dst;
235
236 /* src is shared memory with the hypervisor, so we need to
237 make sure we get a consistent snapshot, even in the face of
238 being preempted. */
239 src = &__get_cpu_var(xen_vcpu)->time;
240 dst = &__get_cpu_var(shadow_time);
241
242 do {
243 dst->version = src->version;
244 rmb(); /* fetch version before data */
245 dst->tsc_timestamp = src->tsc_timestamp;
246 dst->system_timestamp = src->system_time;
247 dst->tsc_to_nsec_mul = src->tsc_to_system_mul;
248 dst->tsc_shift = src->tsc_shift;
249 rmb(); /* test version after fetching data */
250 } while ((src->version & 1) | (dst->version ^ src->version));
251
252 return dst->version;
253}
254
255/*
256 * Scale a 64-bit delta by scaling and multiplying by a 32-bit fraction,
257 * yielding a 64-bit result.
258 */
259static inline u64 scale_delta(u64 delta, u32 mul_frac, int shift)
260{
261 u64 product;
262#ifdef __i386__
263 u32 tmp1, tmp2;
264#endif
265
266 if (shift < 0)
267 delta >>= -shift;
268 else
269 delta <<= shift;
270
271#ifdef __i386__
272 __asm__ (
273 "mul %5 ; "
274 "mov %4,%%eax ; "
275 "mov %%edx,%4 ; "
276 "mul %5 ; "
277 "xor %5,%5 ; "
278 "add %4,%%eax ; "
279 "adc %5,%%edx ; "
280 : "=A" (product), "=r" (tmp1), "=r" (tmp2)
281 : "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) );
282#elif __x86_64__
283 __asm__ (
284 "mul %%rdx ; shrd $32,%%rdx,%%rax"
285 : "=a" (product) : "0" (delta), "d" ((u64)mul_frac) );
286#else
287#error implement me!
288#endif
289
290 return product;
291}
292
293static u64 get_nsec_offset(struct shadow_time_info *shadow)
294{
295 u64 now, delta;
296 now = native_read_tsc();
297 delta = now - shadow->tsc_timestamp;
298 return scale_delta(delta, shadow->tsc_to_nsec_mul, shadow->tsc_shift);
299}
300
301static cycle_t xen_clocksource_read(void)
302{
303 struct shadow_time_info *shadow = &get_cpu_var(shadow_time);
304 cycle_t ret;
305 unsigned version;
306
307 do {
308 version = get_time_values_from_xen();
309 barrier();
310 ret = shadow->system_timestamp + get_nsec_offset(shadow);
311 barrier();
312 } while (version != __get_cpu_var(xen_vcpu)->time.version);
313
314 put_cpu_var(shadow_time);
315
316 return ret;
317}
318
319static void xen_read_wallclock(struct timespec *ts)
320{
321 const struct shared_info *s = HYPERVISOR_shared_info;
322 u32 version;
323 u64 delta;
324 struct timespec now;
325
326 /* get wallclock at system boot */
327 do {
328 version = s->wc_version;
329 rmb(); /* fetch version before time */
330 now.tv_sec = s->wc_sec;
331 now.tv_nsec = s->wc_nsec;
332 rmb(); /* fetch time before checking version */
333 } while ((s->wc_version & 1) | (version ^ s->wc_version));
334
335 delta = xen_clocksource_read(); /* time since system boot */
336 delta += now.tv_sec * (u64)NSEC_PER_SEC + now.tv_nsec;
337
338 now.tv_nsec = do_div(delta, NSEC_PER_SEC);
339 now.tv_sec = delta;
340
341 set_normalized_timespec(ts, now.tv_sec, now.tv_nsec);
342}
343
344unsigned long xen_get_wallclock(void)
345{
346 struct timespec ts;
347
348 xen_read_wallclock(&ts);
349
350 return ts.tv_sec;
351}
352
353int xen_set_wallclock(unsigned long now)
354{
355 /* do nothing for domU */
356 return -1;
357}
358
359static struct clocksource xen_clocksource __read_mostly = {
360 .name = "xen",
361 .rating = 400,
362 .read = xen_clocksource_read,
363 .mask = ~0,
364 .mult = 1<<XEN_SHIFT, /* time directly in nanoseconds */
365 .shift = XEN_SHIFT,
366 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
367};
368
369/*
370 Xen clockevent implementation
371
372 Xen has two clockevent implementations:
373
374 The old timer_op one works with all released versions of Xen prior
375 to version 3.0.4. This version of the hypervisor provides a
376 single-shot timer with nanosecond resolution. However, sharing the
377 same event channel is a 100Hz tick which is delivered while the
378 vcpu is running. We don't care about or use this tick, but it will
379 cause the core time code to think the timer fired too soon, and
380 will end up resetting it each time. It could be filtered, but
381 doing so has complications when the ktime clocksource is not yet
382 the xen clocksource (ie, at boot time).
383
384 The new vcpu_op-based timer interface allows the tick timer period
385 to be changed or turned off. The tick timer is not useful as a
386 periodic timer because events are only delivered to running vcpus.
387 The one-shot timer can report when a timeout is in the past, so
388 set_next_event is capable of returning -ETIME when appropriate.
389 This interface is used when available.
390*/
391
392
393/*
394 Get a hypervisor absolute time. In theory we could maintain an
395 offset between the kernel's time and the hypervisor's time, and
396 apply that to a kernel's absolute timeout. Unfortunately the
397 hypervisor and kernel times can drift even if the kernel is using
398 the Xen clocksource, because ntp can warp the kernel's clocksource.
399*/
400static s64 get_abs_timeout(unsigned long delta)
401{
402 return xen_clocksource_read() + delta;
403}
404
405static void xen_timerop_set_mode(enum clock_event_mode mode,
406 struct clock_event_device *evt)
407{
408 switch (mode) {
409 case CLOCK_EVT_MODE_PERIODIC:
410 /* unsupported */
411 WARN_ON(1);
412 break;
413
414 case CLOCK_EVT_MODE_ONESHOT:
415 case CLOCK_EVT_MODE_RESUME:
416 break;
417
418 case CLOCK_EVT_MODE_UNUSED:
419 case CLOCK_EVT_MODE_SHUTDOWN:
420 HYPERVISOR_set_timer_op(0); /* cancel timeout */
421 break;
422 }
423}
424
425static int xen_timerop_set_next_event(unsigned long delta,
426 struct clock_event_device *evt)
427{
428 WARN_ON(evt->mode != CLOCK_EVT_MODE_ONESHOT);
429
430 if (HYPERVISOR_set_timer_op(get_abs_timeout(delta)) < 0)
431 BUG();
432
433 /* We may have missed the deadline, but there's no real way of
434 knowing for sure. If the event was in the past, then we'll
435 get an immediate interrupt. */
436
437 return 0;
438}
439
440static const struct clock_event_device xen_timerop_clockevent = {
441 .name = "xen",
442 .features = CLOCK_EVT_FEAT_ONESHOT,
443
444 .max_delta_ns = 0xffffffff,
445 .min_delta_ns = TIMER_SLOP,
446
447 .mult = 1,
448 .shift = 0,
449 .rating = 500,
450
451 .set_mode = xen_timerop_set_mode,
452 .set_next_event = xen_timerop_set_next_event,
453};
454
455
456
457static void xen_vcpuop_set_mode(enum clock_event_mode mode,
458 struct clock_event_device *evt)
459{
460 int cpu = smp_processor_id();
461
462 switch (mode) {
463 case CLOCK_EVT_MODE_PERIODIC:
464 WARN_ON(1); /* unsupported */
465 break;
466
467 case CLOCK_EVT_MODE_ONESHOT:
468 if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL))
469 BUG();
470 break;
471
472 case CLOCK_EVT_MODE_UNUSED:
473 case CLOCK_EVT_MODE_SHUTDOWN:
474 if (HYPERVISOR_vcpu_op(VCPUOP_stop_singleshot_timer, cpu, NULL) ||
475 HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL))
476 BUG();
477 break;
478 case CLOCK_EVT_MODE_RESUME:
479 break;
480 }
481}
482
483static int xen_vcpuop_set_next_event(unsigned long delta,
484 struct clock_event_device *evt)
485{
486 int cpu = smp_processor_id();
487 struct vcpu_set_singleshot_timer single;
488 int ret;
489
490 WARN_ON(evt->mode != CLOCK_EVT_MODE_ONESHOT);
491
492 single.timeout_abs_ns = get_abs_timeout(delta);
493 single.flags = VCPU_SSHOTTMR_future;
494
495 ret = HYPERVISOR_vcpu_op(VCPUOP_set_singleshot_timer, cpu, &single);
496
497 BUG_ON(ret != 0 && ret != -ETIME);
498
499 return ret;
500}
501
502static const struct clock_event_device xen_vcpuop_clockevent = {
503 .name = "xen",
504 .features = CLOCK_EVT_FEAT_ONESHOT,
505
506 .max_delta_ns = 0xffffffff,
507 .min_delta_ns = TIMER_SLOP,
508
509 .mult = 1,
510 .shift = 0,
511 .rating = 500,
512
513 .set_mode = xen_vcpuop_set_mode,
514 .set_next_event = xen_vcpuop_set_next_event,
515};
516
517static const struct clock_event_device *xen_clockevent =
518 &xen_timerop_clockevent;
519static DEFINE_PER_CPU(struct clock_event_device, xen_clock_events);
520
521static irqreturn_t xen_timer_interrupt(int irq, void *dev_id)
522{
523 struct clock_event_device *evt = &__get_cpu_var(xen_clock_events);
524 irqreturn_t ret;
525
526 ret = IRQ_NONE;
527 if (evt->event_handler) {
528 evt->event_handler(evt);
529 ret = IRQ_HANDLED;
530 }
531
532 do_stolen_accounting();
533
534 return ret;
535}
536
537void xen_setup_timer(int cpu)
538{
539 const char *name;
540 struct clock_event_device *evt;
541 int irq;
542
543 printk(KERN_INFO "installing Xen timer for CPU %d\n", cpu);
544
545 name = kasprintf(GFP_KERNEL, "timer%d", cpu);
546 if (!name)
547 name = "<timer kasprintf failed>";
548
549 irq = bind_virq_to_irqhandler(VIRQ_TIMER, cpu, xen_timer_interrupt,
550 IRQF_DISABLED|IRQF_PERCPU|IRQF_NOBALANCING,
551 name, NULL);
552
553 evt = &per_cpu(xen_clock_events, cpu);
554 memcpy(evt, xen_clockevent, sizeof(*evt));
555
556 evt->cpumask = cpumask_of_cpu(cpu);
557 evt->irq = irq;
558
559 setup_runstate_info(cpu);
560}
561
562void xen_setup_cpu_clockevents(void)
563{
564 BUG_ON(preemptible());
565
566 clockevents_register_device(&__get_cpu_var(xen_clock_events));
567}
568
569__init void xen_time_init(void)
570{
571 int cpu = smp_processor_id();
572
573 get_time_values_from_xen();
574
575 clocksource_register(&xen_clocksource);
576
577 if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL) == 0) {
578 /* Successfully turned off 100Hz tick, so we have the
579 vcpuop-based timer interface */
580 printk(KERN_DEBUG "Xen: using vcpuop timer interface\n");
581 xen_clockevent = &xen_vcpuop_clockevent;
582 }
583
584 /* Set initial system time with full resolution */
585 xen_read_wallclock(&xtime);
586 set_normalized_timespec(&wall_to_monotonic,
587 -xtime.tv_sec, -xtime.tv_nsec);
588
589 tsc_disable = 0;
590
591 xen_setup_timer(cpu);
592 xen_setup_cpu_clockevents();
593}
diff --git a/arch/i386/xen/vdso.h b/arch/i386/xen/vdso.h
new file mode 100644
index 000000000000..861fedfe5230
--- /dev/null
+++ b/arch/i386/xen/vdso.h
@@ -0,0 +1,4 @@
1/* Bit used for the pseudo-hwcap for non-negative segments. We use
2 bit 1 to avoid bugs in some versions of glibc when bit 0 is
3 used; the choice is otherwise arbitrary. */
4#define VDSO_NOTE_NONEGSEG_BIT 1
diff --git a/arch/i386/xen/xen-asm.S b/arch/i386/xen/xen-asm.S
new file mode 100644
index 000000000000..1a43b60c0c62
--- /dev/null
+++ b/arch/i386/xen/xen-asm.S
@@ -0,0 +1,291 @@
1/*
2 Asm versions of Xen pv-ops, suitable for either direct use or inlining.
3 The inline versions are the same as the direct-use versions, with the
4 pre- and post-amble chopped off.
5
6 This code is encoded for size rather than absolute efficiency,
7 with a view to being able to inline as much as possible.
8
9 We only bother with direct forms (ie, vcpu in pda) of the operations
10 here; the indirect forms are better handled in C, since they're
11 generally too large to inline anyway.
12 */
13
14#include <linux/linkage.h>
15
16#include <asm/asm-offsets.h>
17#include <asm/thread_info.h>
18#include <asm/percpu.h>
19#include <asm/processor-flags.h>
20#include <asm/segment.h>
21
22#include <xen/interface/xen.h>
23
24#define RELOC(x, v) .globl x##_reloc; x##_reloc=v
25#define ENDPATCH(x) .globl x##_end; x##_end=.
26
27/* Pseudo-flag used for virtual NMI, which we don't implement yet */
28#define XEN_EFLAGS_NMI 0x80000000
29
30/*
31 Enable events. This clears the event mask and tests the pending
32 event status with one and operation. If there are pending
33 events, then enter the hypervisor to get them handled.
34 */
35ENTRY(xen_irq_enable_direct)
36 /* Clear mask and test pending */
37 andw $0x00ff, PER_CPU_VAR(xen_vcpu_info)+XEN_vcpu_info_pending
38 /* Preempt here doesn't matter because that will deal with
39 any pending interrupts. The pending check may end up being
40 run on the wrong CPU, but that doesn't hurt. */
41 jz 1f
422: call check_events
431:
44ENDPATCH(xen_irq_enable_direct)
45 ret
46 ENDPROC(xen_irq_enable_direct)
47 RELOC(xen_irq_enable_direct, 2b+1)
48
49
50/*
51 Disabling events is simply a matter of making the event mask
52 non-zero.
53 */
54ENTRY(xen_irq_disable_direct)
55 movb $1, PER_CPU_VAR(xen_vcpu_info)+XEN_vcpu_info_mask
56ENDPATCH(xen_irq_disable_direct)
57 ret
58 ENDPROC(xen_irq_disable_direct)
59 RELOC(xen_irq_disable_direct, 0)
60
61/*
62 (xen_)save_fl is used to get the current interrupt enable status.
63 Callers expect the status to be in X86_EFLAGS_IF, and other bits
64 may be set in the return value. We take advantage of this by
65 making sure that X86_EFLAGS_IF has the right value (and other bits
66 in that byte are 0), but other bits in the return value are
67 undefined. We need to toggle the state of the bit, because
68 Xen and x86 use opposite senses (mask vs enable).
69 */
70ENTRY(xen_save_fl_direct)
71 testb $0xff, PER_CPU_VAR(xen_vcpu_info)+XEN_vcpu_info_mask
72 setz %ah
73 addb %ah,%ah
74ENDPATCH(xen_save_fl_direct)
75 ret
76 ENDPROC(xen_save_fl_direct)
77 RELOC(xen_save_fl_direct, 0)
78
79
80/*
81 In principle the caller should be passing us a value return
82 from xen_save_fl_direct, but for robustness sake we test only
83 the X86_EFLAGS_IF flag rather than the whole byte. After
84 setting the interrupt mask state, it checks for unmasked
85 pending events and enters the hypervisor to get them delivered
86 if so.
87 */
88ENTRY(xen_restore_fl_direct)
89 testb $X86_EFLAGS_IF>>8, %ah
90 setz PER_CPU_VAR(xen_vcpu_info)+XEN_vcpu_info_mask
91 /* Preempt here doesn't matter because that will deal with
92 any pending interrupts. The pending check may end up being
93 run on the wrong CPU, but that doesn't hurt. */
94
95 /* check for unmasked and pending */
96 cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info)+XEN_vcpu_info_pending
97 jz 1f
982: call check_events
991:
100ENDPATCH(xen_restore_fl_direct)
101 ret
102 ENDPROC(xen_restore_fl_direct)
103 RELOC(xen_restore_fl_direct, 2b+1)
104
105/*
106 This is run where a normal iret would be run, with the same stack setup:
107 8: eflags
108 4: cs
109 esp-> 0: eip
110
111 This attempts to make sure that any pending events are dealt
112 with on return to usermode, but there is a small window in
113 which an event can happen just before entering usermode. If
114 the nested interrupt ends up setting one of the TIF_WORK_MASK
115 pending work flags, they will not be tested again before
116 returning to usermode. This means that a process can end up
117 with pending work, which will be unprocessed until the process
118 enters and leaves the kernel again, which could be an
119 unbounded amount of time. This means that a pending signal or
120 reschedule event could be indefinitely delayed.
121
122 The fix is to notice a nested interrupt in the critical
123 window, and if one occurs, then fold the nested interrupt into
124 the current interrupt stack frame, and re-process it
125 iteratively rather than recursively. This means that it will
126 exit via the normal path, and all pending work will be dealt
127 with appropriately.
128
129 Because the nested interrupt handler needs to deal with the
130 current stack state in whatever form its in, we keep things
131 simple by only using a single register which is pushed/popped
132 on the stack.
133
134 Non-direct iret could be done in the same way, but it would
135 require an annoying amount of code duplication. We'll assume
136 that direct mode will be the common case once the hypervisor
137 support becomes commonplace.
138 */
139ENTRY(xen_iret_direct)
140 /* test eflags for special cases */
141 testl $(X86_EFLAGS_VM | XEN_EFLAGS_NMI), 8(%esp)
142 jnz hyper_iret
143
144 push %eax
145 ESP_OFFSET=4 # bytes pushed onto stack
146
147 /* Store vcpu_info pointer for easy access. Do it this
148 way to avoid having to reload %fs */
149#ifdef CONFIG_SMP
150 GET_THREAD_INFO(%eax)
151 movl TI_cpu(%eax),%eax
152 movl __per_cpu_offset(,%eax,4),%eax
153 lea per_cpu__xen_vcpu_info(%eax),%eax
154#else
155 movl $per_cpu__xen_vcpu_info, %eax
156#endif
157
158 /* check IF state we're restoring */
159 testb $X86_EFLAGS_IF>>8, 8+1+ESP_OFFSET(%esp)
160
161 /* Maybe enable events. Once this happens we could get a
162 recursive event, so the critical region starts immediately
163 afterwards. However, if that happens we don't end up
164 resuming the code, so we don't have to be worried about
165 being preempted to another CPU. */
166 setz XEN_vcpu_info_mask(%eax)
167xen_iret_start_crit:
168
169 /* check for unmasked and pending */
170 cmpw $0x0001, XEN_vcpu_info_pending(%eax)
171
172 /* If there's something pending, mask events again so we
173 can jump back into xen_hypervisor_callback */
174 sete XEN_vcpu_info_mask(%eax)
175
176 popl %eax
177
178 /* From this point on the registers are restored and the stack
179 updated, so we don't need to worry about it if we're preempted */
180iret_restore_end:
181
182 /* Jump to hypervisor_callback after fixing up the stack.
183 Events are masked, so jumping out of the critical
184 region is OK. */
185 je xen_hypervisor_callback
186
187 iret
188xen_iret_end_crit:
189
190hyper_iret:
191 /* put this out of line since its very rarely used */
192 jmp hypercall_page + __HYPERVISOR_iret * 32
193
194 .globl xen_iret_start_crit, xen_iret_end_crit
195
196/*
197 This is called by xen_hypervisor_callback in entry.S when it sees
198 that the EIP at the time of interrupt was between xen_iret_start_crit
199 and xen_iret_end_crit. We're passed the EIP in %eax so we can do
200 a more refined determination of what to do.
201
202 The stack format at this point is:
203 ----------------
204 ss : (ss/esp may be present if we came from usermode)
205 esp :
206 eflags } outer exception info
207 cs }
208 eip }
209 ---------------- <- edi (copy dest)
210 eax : outer eax if it hasn't been restored
211 ----------------
212 eflags } nested exception info
213 cs } (no ss/esp because we're nested
214 eip } from the same ring)
215 orig_eax }<- esi (copy src)
216 - - - - - - - -
217 fs }
218 es }
219 ds } SAVE_ALL state
220 eax }
221 : :
222 ebx }
223 ----------------
224 return addr <- esp
225 ----------------
226
227 In order to deliver the nested exception properly, we need to shift
228 everything from the return addr up to the error code so it
229 sits just under the outer exception info. This means that when we
230 handle the exception, we do it in the context of the outer exception
231 rather than starting a new one.
232
233 The only caveat is that if the outer eax hasn't been
234 restored yet (ie, it's still on stack), we need to insert
235 its value into the SAVE_ALL state before going on, since
236 it's usermode state which we eventually need to restore.
237 */
238ENTRY(xen_iret_crit_fixup)
239 /* offsets +4 for return address */
240
241 /*
242 Paranoia: Make sure we're really coming from userspace.
243 One could imagine a case where userspace jumps into the
244 critical range address, but just before the CPU delivers a GP,
245 it decides to deliver an interrupt instead. Unlikely?
246 Definitely. Easy to avoid? Yes. The Intel documents
247 explicitly say that the reported EIP for a bad jump is the
248 jump instruction itself, not the destination, but some virtual
249 environments get this wrong.
250 */
251 movl PT_CS+4(%esp), %ecx
252 andl $SEGMENT_RPL_MASK, %ecx
253 cmpl $USER_RPL, %ecx
254 je 2f
255
256 lea PT_ORIG_EAX+4(%esp), %esi
257 lea PT_EFLAGS+4(%esp), %edi
258
259 /* If eip is before iret_restore_end then stack
260 hasn't been restored yet. */
261 cmp $iret_restore_end, %eax
262 jae 1f
263
264 movl 0+4(%edi),%eax /* copy EAX */
265 movl %eax, PT_EAX+4(%esp)
266
267 lea ESP_OFFSET(%edi),%edi /* move dest up over saved regs */
268
269 /* set up the copy */
2701: std
271 mov $(PT_EIP+4) / 4, %ecx /* copy ret+saved regs up to orig_eax */
272 rep movsl
273 cld
274
275 lea 4(%edi),%esp /* point esp to new frame */
2762: ret
277
278
279/*
280 Force an event check by making a hypercall,
281 but preserve regs before making the call.
282 */
283check_events:
284 push %eax
285 push %ecx
286 push %edx
287 call force_evtchn_callback
288 pop %edx
289 pop %ecx
290 pop %eax
291 ret
diff --git a/arch/i386/xen/xen-head.S b/arch/i386/xen/xen-head.S
new file mode 100644
index 000000000000..2998d55a0017
--- /dev/null
+++ b/arch/i386/xen/xen-head.S
@@ -0,0 +1,36 @@
1/* Xen-specific pieces of head.S, intended to be included in the right
2 place in head.S */
3
4#ifdef CONFIG_XEN
5
6#include <linux/elfnote.h>
7#include <asm/boot.h>
8#include <xen/interface/elfnote.h>
9
10ENTRY(startup_xen)
11 movl %esi,xen_start_info
12 cld
13 movl $(init_thread_union+THREAD_SIZE),%esp
14 jmp xen_start_kernel
15
16.pushsection ".bss.page_aligned"
17 .align PAGE_SIZE_asm
18ENTRY(hypercall_page)
19 .skip 0x1000
20.popsection
21
22 ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "linux")
23 ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz "2.6")
24 ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz "xen-3.0")
25 ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, .long __PAGE_OFFSET)
26 ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, .long startup_xen)
27 ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, .long hypercall_page)
28 ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz "!writable_page_tables|pae_pgdir_above_4gb")
29#ifdef CONFIG_X86_PAE
30 ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes")
31#else
32 ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "no")
33#endif
34 ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic")
35
36#endif /*CONFIG_XEN */
diff --git a/arch/i386/xen/xen-ops.h b/arch/i386/xen/xen-ops.h
new file mode 100644
index 000000000000..b9aaea45f07f
--- /dev/null
+++ b/arch/i386/xen/xen-ops.h
@@ -0,0 +1,71 @@
1#ifndef XEN_OPS_H
2#define XEN_OPS_H
3
4#include <linux/init.h>
5
6/* These are code, but not functions. Defined in entry.S */
7extern const char xen_hypervisor_callback[];
8extern const char xen_failsafe_callback[];
9
10void xen_copy_trap_info(struct trap_info *traps);
11
12DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu);
13DECLARE_PER_CPU(unsigned long, xen_cr3);
14
15extern struct start_info *xen_start_info;
16extern struct shared_info *HYPERVISOR_shared_info;
17
18char * __init xen_memory_setup(void);
19void __init xen_arch_setup(void);
20void __init xen_init_IRQ(void);
21
22void xen_setup_timer(int cpu);
23void xen_setup_cpu_clockevents(void);
24unsigned long xen_cpu_khz(void);
25void __init xen_time_init(void);
26unsigned long xen_get_wallclock(void);
27int xen_set_wallclock(unsigned long time);
28unsigned long long xen_sched_clock(void);
29
30void xen_mark_init_mm_pinned(void);
31
32DECLARE_PER_CPU(enum paravirt_lazy_mode, xen_lazy_mode);
33
34static inline unsigned xen_get_lazy_mode(void)
35{
36 return x86_read_percpu(xen_lazy_mode);
37}
38
39void __init xen_fill_possible_map(void);
40
41void __init xen_setup_vcpu_info_placement(void);
42void xen_smp_prepare_boot_cpu(void);
43void xen_smp_prepare_cpus(unsigned int max_cpus);
44int xen_cpu_up(unsigned int cpu);
45void xen_smp_cpus_done(unsigned int max_cpus);
46
47void xen_smp_send_stop(void);
48void xen_smp_send_reschedule(int cpu);
49int xen_smp_call_function (void (*func) (void *info), void *info, int nonatomic,
50 int wait);
51int xen_smp_call_function_single(int cpu, void (*func) (void *info), void *info,
52 int nonatomic, int wait);
53
54int xen_smp_call_function_mask(cpumask_t mask, void (*func)(void *),
55 void *info, int wait);
56
57
58/* Declare an asm function, along with symbols needed to make it
59 inlineable */
60#define DECL_ASM(ret, name, ...) \
61 ret name(__VA_ARGS__); \
62 extern char name##_end[]; \
63 extern char name##_reloc[] \
64
65DECL_ASM(void, xen_irq_enable_direct, void);
66DECL_ASM(void, xen_irq_disable_direct, void);
67DECL_ASM(unsigned long, xen_save_fl_direct, void);
68DECL_ASM(void, xen_restore_fl_direct, unsigned long);
69
70void xen_iret_direct(void);
71#endif /* XEN_OPS_H */
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index de1bff659969..36c7b9682aa6 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -62,7 +62,11 @@ config GENERIC_CALIBRATE_DELAY
62 bool 62 bool
63 default y 63 default y
64 64
65config TIME_INTERPOLATION 65config GENERIC_TIME
66 bool
67 default y
68
69config GENERIC_TIME_VSYSCALL
66 bool 70 bool
67 default y 71 default y
68 72
@@ -520,8 +524,10 @@ config PCI
520 here unless you are using a simulator without PCI support. 524 here unless you are using a simulator without PCI support.
521 525
522config PCI_DOMAINS 526config PCI_DOMAINS
523 bool 527 def_bool PCI
524 default PCI 528
529config PCI_SYSCALL
530 def_bool PCI
525 531
526source "drivers/pci/pcie/Kconfig" 532source "drivers/pci/pcie/Kconfig"
527 533
@@ -580,8 +586,8 @@ menu "Instrumentation Support"
580source "arch/ia64/oprofile/Kconfig" 586source "arch/ia64/oprofile/Kconfig"
581 587
582config KPROBES 588config KPROBES
583 bool "Kprobes (EXPERIMENTAL)" 589 bool "Kprobes"
584 depends on KALLSYMS && EXPERIMENTAL && MODULES 590 depends on KALLSYMS && MODULES
585 help 591 help
586 Kprobes allows you to trap at almost any kernel address and 592 Kprobes allows you to trap at almost any kernel address and
587 execute a callback function. register_kprobe() establishes 593 execute a callback function. register_kprobe() establishes
diff --git a/arch/ia64/configs/bigsur_defconfig b/arch/ia64/configs/bigsur_defconfig
index 90e9c2e61bf4..9eb48c0927b0 100644
--- a/arch/ia64/configs/bigsur_defconfig
+++ b/arch/ia64/configs/bigsur_defconfig
@@ -85,7 +85,7 @@ CONFIG_MMU=y
85CONFIG_SWIOTLB=y 85CONFIG_SWIOTLB=y
86CONFIG_RWSEM_XCHGADD_ALGORITHM=y 86CONFIG_RWSEM_XCHGADD_ALGORITHM=y
87CONFIG_GENERIC_CALIBRATE_DELAY=y 87CONFIG_GENERIC_CALIBRATE_DELAY=y
88CONFIG_TIME_INTERPOLATION=y 88CONFIG_GENERIC_TIME=y
89CONFIG_EFI=y 89CONFIG_EFI=y
90CONFIG_GENERIC_IOMAP=y 90CONFIG_GENERIC_IOMAP=y
91CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 91CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
diff --git a/arch/ia64/configs/gensparse_defconfig b/arch/ia64/configs/gensparse_defconfig
index 0d29aa2066b3..3a9ed951db08 100644
--- a/arch/ia64/configs/gensparse_defconfig
+++ b/arch/ia64/configs/gensparse_defconfig
@@ -86,7 +86,7 @@ CONFIG_MMU=y
86CONFIG_SWIOTLB=y 86CONFIG_SWIOTLB=y
87CONFIG_RWSEM_XCHGADD_ALGORITHM=y 87CONFIG_RWSEM_XCHGADD_ALGORITHM=y
88CONFIG_GENERIC_CALIBRATE_DELAY=y 88CONFIG_GENERIC_CALIBRATE_DELAY=y
89CONFIG_TIME_INTERPOLATION=y 89CONFIG_GENERIC_TIME=y
90CONFIG_EFI=y 90CONFIG_EFI=y
91CONFIG_GENERIC_IOMAP=y 91CONFIG_GENERIC_IOMAP=y
92CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 92CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
diff --git a/arch/ia64/configs/sim_defconfig b/arch/ia64/configs/sim_defconfig
index d9146c31ea13..c420d9f3df98 100644
--- a/arch/ia64/configs/sim_defconfig
+++ b/arch/ia64/configs/sim_defconfig
@@ -86,7 +86,7 @@ CONFIG_MMU=y
86CONFIG_SWIOTLB=y 86CONFIG_SWIOTLB=y
87CONFIG_RWSEM_XCHGADD_ALGORITHM=y 87CONFIG_RWSEM_XCHGADD_ALGORITHM=y
88CONFIG_GENERIC_CALIBRATE_DELAY=y 88CONFIG_GENERIC_CALIBRATE_DELAY=y
89CONFIG_TIME_INTERPOLATION=y 89CONFIG_GENERIC_TIME=y
90CONFIG_EFI=y 90CONFIG_EFI=y
91CONFIG_GENERIC_IOMAP=y 91CONFIG_GENERIC_IOMAP=y
92CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 92CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
diff --git a/arch/ia64/configs/sn2_defconfig b/arch/ia64/configs/sn2_defconfig
index 64e951de4e57..4c9ffc47bc7a 100644
--- a/arch/ia64/configs/sn2_defconfig
+++ b/arch/ia64/configs/sn2_defconfig
@@ -93,7 +93,7 @@ CONFIG_SWIOTLB=y
93CONFIG_RWSEM_XCHGADD_ALGORITHM=y 93CONFIG_RWSEM_XCHGADD_ALGORITHM=y
94CONFIG_GENERIC_FIND_NEXT_BIT=y 94CONFIG_GENERIC_FIND_NEXT_BIT=y
95CONFIG_GENERIC_CALIBRATE_DELAY=y 95CONFIG_GENERIC_CALIBRATE_DELAY=y
96CONFIG_TIME_INTERPOLATION=y 96CONFIG_GENERIC_TIME=y
97CONFIG_DMI=y 97CONFIG_DMI=y
98CONFIG_EFI=y 98CONFIG_EFI=y
99CONFIG_GENERIC_IOMAP=y 99CONFIG_GENERIC_IOMAP=y
diff --git a/arch/ia64/configs/tiger_defconfig b/arch/ia64/configs/tiger_defconfig
index a1446931b401..3dbb3987df27 100644
--- a/arch/ia64/configs/tiger_defconfig
+++ b/arch/ia64/configs/tiger_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.21-rc3 3# Linux kernel version: 2.6.22
4# Thu Mar 8 11:07:09 2007 4# Thu Jul 19 13:54:47 2007
5# 5#
6CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 6CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
7 7
@@ -19,15 +19,15 @@ CONFIG_LOCALVERSION=""
19CONFIG_LOCALVERSION_AUTO=y 19CONFIG_LOCALVERSION_AUTO=y
20CONFIG_SWAP=y 20CONFIG_SWAP=y
21CONFIG_SYSVIPC=y 21CONFIG_SYSVIPC=y
22# CONFIG_IPC_NS is not set
23CONFIG_SYSVIPC_SYSCTL=y 22CONFIG_SYSVIPC_SYSCTL=y
24CONFIG_POSIX_MQUEUE=y 23CONFIG_POSIX_MQUEUE=y
25# CONFIG_BSD_PROCESS_ACCT is not set 24# CONFIG_BSD_PROCESS_ACCT is not set
26# CONFIG_TASKSTATS is not set 25# CONFIG_TASKSTATS is not set
27# CONFIG_UTS_NS is not set 26# CONFIG_USER_NS is not set
28# CONFIG_AUDIT is not set 27# CONFIG_AUDIT is not set
29CONFIG_IKCONFIG=y 28CONFIG_IKCONFIG=y
30CONFIG_IKCONFIG_PROC=y 29CONFIG_IKCONFIG_PROC=y
30CONFIG_LOG_BUF_SHIFT=20
31# CONFIG_CPUSETS is not set 31# CONFIG_CPUSETS is not set
32CONFIG_SYSFS_DEPRECATED=y 32CONFIG_SYSFS_DEPRECATED=y
33# CONFIG_RELAY is not set 33# CONFIG_RELAY is not set
@@ -46,18 +46,19 @@ CONFIG_BUG=y
46CONFIG_ELF_CORE=y 46CONFIG_ELF_CORE=y
47CONFIG_BASE_FULL=y 47CONFIG_BASE_FULL=y
48CONFIG_FUTEX=y 48CONFIG_FUTEX=y
49CONFIG_ANON_INODES=y
49CONFIG_EPOLL=y 50CONFIG_EPOLL=y
51CONFIG_SIGNALFD=y
52CONFIG_TIMERFD=y
53CONFIG_EVENTFD=y
50CONFIG_SHMEM=y 54CONFIG_SHMEM=y
51CONFIG_SLAB=y
52CONFIG_VM_EVENT_COUNTERS=y 55CONFIG_VM_EVENT_COUNTERS=y
56CONFIG_SLAB=y
57# CONFIG_SLUB is not set
58# CONFIG_SLOB is not set
53CONFIG_RT_MUTEXES=y 59CONFIG_RT_MUTEXES=y
54# CONFIG_TINY_SHMEM is not set 60# CONFIG_TINY_SHMEM is not set
55CONFIG_BASE_SMALL=0 61CONFIG_BASE_SMALL=0
56# CONFIG_SLOB is not set
57
58#
59# Loadable module support
60#
61CONFIG_MODULES=y 62CONFIG_MODULES=y
62CONFIG_MODULE_UNLOAD=y 63CONFIG_MODULE_UNLOAD=y
63# CONFIG_MODULE_FORCE_UNLOAD is not set 64# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -65,12 +66,9 @@ CONFIG_MODVERSIONS=y
65CONFIG_MODULE_SRCVERSION_ALL=y 66CONFIG_MODULE_SRCVERSION_ALL=y
66CONFIG_KMOD=y 67CONFIG_KMOD=y
67CONFIG_STOP_MACHINE=y 68CONFIG_STOP_MACHINE=y
68
69#
70# Block layer
71#
72CONFIG_BLOCK=y 69CONFIG_BLOCK=y
73# CONFIG_BLK_DEV_IO_TRACE is not set 70# CONFIG_BLK_DEV_IO_TRACE is not set
71# CONFIG_BLK_DEV_BSG is not set
74 72
75# 73#
76# IO Schedulers 74# IO Schedulers
@@ -91,6 +89,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
91CONFIG_IA64=y 89CONFIG_IA64=y
92CONFIG_64BIT=y 90CONFIG_64BIT=y
93CONFIG_ZONE_DMA=y 91CONFIG_ZONE_DMA=y
92CONFIG_QUICKLIST=y
94CONFIG_MMU=y 93CONFIG_MMU=y
95CONFIG_SWIOTLB=y 94CONFIG_SWIOTLB=y
96CONFIG_RWSEM_XCHGADD_ALGORITHM=y 95CONFIG_RWSEM_XCHGADD_ALGORITHM=y
@@ -98,7 +97,7 @@ CONFIG_RWSEM_XCHGADD_ALGORITHM=y
98# CONFIG_ARCH_HAS_ILOG2_U64 is not set 97# CONFIG_ARCH_HAS_ILOG2_U64 is not set
99CONFIG_GENERIC_FIND_NEXT_BIT=y 98CONFIG_GENERIC_FIND_NEXT_BIT=y
100CONFIG_GENERIC_CALIBRATE_DELAY=y 99CONFIG_GENERIC_CALIBRATE_DELAY=y
101CONFIG_TIME_INTERPOLATION=y 100CONFIG_GENERIC_TIME=y
102CONFIG_DMI=y 101CONFIG_DMI=y
103CONFIG_EFI=y 102CONFIG_EFI=y
104CONFIG_GENERIC_IOMAP=y 103CONFIG_GENERIC_IOMAP=y
@@ -114,8 +113,8 @@ CONFIG_IA64_DIG=y
114CONFIG_MCKINLEY=y 113CONFIG_MCKINLEY=y
115# CONFIG_IA64_PAGE_SIZE_4KB is not set 114# CONFIG_IA64_PAGE_SIZE_4KB is not set
116# CONFIG_IA64_PAGE_SIZE_8KB is not set 115# CONFIG_IA64_PAGE_SIZE_8KB is not set
117CONFIG_IA64_PAGE_SIZE_16KB=y 116# CONFIG_IA64_PAGE_SIZE_16KB is not set
118# CONFIG_IA64_PAGE_SIZE_64KB is not set 117CONFIG_IA64_PAGE_SIZE_64KB=y
119CONFIG_PGTABLE_3=y 118CONFIG_PGTABLE_3=y
120# CONFIG_PGTABLE_4 is not set 119# CONFIG_PGTABLE_4 is not set
121# CONFIG_HZ_100 is not set 120# CONFIG_HZ_100 is not set
@@ -145,6 +144,9 @@ CONFIG_FLAT_NODE_MEM_MAP=y
145CONFIG_SPLIT_PTLOCK_CPUS=4 144CONFIG_SPLIT_PTLOCK_CPUS=4
146CONFIG_RESOURCES_64BIT=y 145CONFIG_RESOURCES_64BIT=y
147CONFIG_ZONE_DMA_FLAG=1 146CONFIG_ZONE_DMA_FLAG=1
147CONFIG_BOUNCE=y
148CONFIG_NR_QUICK=1
149CONFIG_VIRT_TO_BUS=y
148CONFIG_ARCH_SELECT_MEMORY_MODEL=y 150CONFIG_ARCH_SELECT_MEMORY_MODEL=y
149CONFIG_ARCH_DISCONTIGMEM_ENABLE=y 151CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
150CONFIG_ARCH_FLATMEM_ENABLE=y 152CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -152,11 +154,11 @@ CONFIG_ARCH_SPARSEMEM_ENABLE=y
152CONFIG_ARCH_POPULATES_NODE_MAP=y 154CONFIG_ARCH_POPULATES_NODE_MAP=y
153CONFIG_VIRTUAL_MEM_MAP=y 155CONFIG_VIRTUAL_MEM_MAP=y
154CONFIG_HOLES_IN_ZONE=y 156CONFIG_HOLES_IN_ZONE=y
155CONFIG_IA32_SUPPORT=y 157# CONFIG_IA32_SUPPORT is not set
156CONFIG_COMPAT=y
157CONFIG_IA64_MCA_RECOVERY=y 158CONFIG_IA64_MCA_RECOVERY=y
158CONFIG_PERFMON=y 159CONFIG_PERFMON=y
159CONFIG_IA64_PALINFO=y 160CONFIG_IA64_PALINFO=y
161# CONFIG_IA64_MC_ERR_INJECT is not set
160# CONFIG_IA64_ESI is not set 162# CONFIG_IA64_ESI is not set
161CONFIG_KEXEC=y 163CONFIG_KEXEC=y
162# CONFIG_CRASH_DUMP is not set 164# CONFIG_CRASH_DUMP is not set
@@ -166,6 +168,7 @@ CONFIG_KEXEC=y
166# 168#
167CONFIG_EFI_VARS=y 169CONFIG_EFI_VARS=y
168CONFIG_EFI_PCDP=y 170CONFIG_EFI_PCDP=y
171CONFIG_DMIID=y
169CONFIG_BINFMT_ELF=y 172CONFIG_BINFMT_ELF=y
170CONFIG_BINFMT_MISC=m 173CONFIG_BINFMT_MISC=m
171 174
@@ -175,7 +178,6 @@ CONFIG_BINFMT_MISC=m
175CONFIG_PM=y 178CONFIG_PM=y
176CONFIG_PM_LEGACY=y 179CONFIG_PM_LEGACY=y
177# CONFIG_PM_DEBUG is not set 180# CONFIG_PM_DEBUG is not set
178# CONFIG_PM_SYSFS_DEPRECATED is not set
179 181
180# 182#
181# ACPI (Advanced Configuration and Power Interface) Support 183# ACPI (Advanced Configuration and Power Interface) Support
@@ -205,13 +207,11 @@ CONFIG_ACPI_CONTAINER=m
205# 207#
206CONFIG_PCI=y 208CONFIG_PCI=y
207CONFIG_PCI_DOMAINS=y 209CONFIG_PCI_DOMAINS=y
210CONFIG_PCI_SYSCALL=y
208# CONFIG_PCIEPORTBUS is not set 211# CONFIG_PCIEPORTBUS is not set
212CONFIG_ARCH_SUPPORTS_MSI=y
209# CONFIG_PCI_MSI is not set 213# CONFIG_PCI_MSI is not set
210# CONFIG_PCI_DEBUG is not set 214# CONFIG_PCI_DEBUG is not set
211
212#
213# PCI Hotplug Support
214#
215CONFIG_HOTPLUG_PCI=m 215CONFIG_HOTPLUG_PCI=m
216# CONFIG_HOTPLUG_PCI_FAKE is not set 216# CONFIG_HOTPLUG_PCI_FAKE is not set
217CONFIG_HOTPLUG_PCI_ACPI=m 217CONFIG_HOTPLUG_PCI_ACPI=m
@@ -232,7 +232,6 @@ CONFIG_NET=y
232# 232#
233# Networking options 233# Networking options
234# 234#
235# CONFIG_NETDEBUG is not set
236CONFIG_PACKET=y 235CONFIG_PACKET=y
237# CONFIG_PACKET_MMAP is not set 236# CONFIG_PACKET_MMAP is not set
238CONFIG_UNIX=y 237CONFIG_UNIX=y
@@ -270,20 +269,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
270# CONFIG_INET6_TUNNEL is not set 269# CONFIG_INET6_TUNNEL is not set
271# CONFIG_NETWORK_SECMARK is not set 270# CONFIG_NETWORK_SECMARK is not set
272# CONFIG_NETFILTER is not set 271# CONFIG_NETFILTER is not set
273
274#
275# DCCP Configuration (EXPERIMENTAL)
276#
277# CONFIG_IP_DCCP is not set 272# CONFIG_IP_DCCP is not set
278
279#
280# SCTP Configuration (EXPERIMENTAL)
281#
282# CONFIG_IP_SCTP is not set 273# CONFIG_IP_SCTP is not set
283
284#
285# TIPC Configuration (EXPERIMENTAL)
286#
287# CONFIG_TIPC is not set 274# CONFIG_TIPC is not set
288# CONFIG_ATM is not set 275# CONFIG_ATM is not set
289# CONFIG_BRIDGE is not set 276# CONFIG_BRIDGE is not set
@@ -309,7 +296,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
309# CONFIG_HAMRADIO is not set 296# CONFIG_HAMRADIO is not set
310# CONFIG_IRDA is not set 297# CONFIG_IRDA is not set
311# CONFIG_BT is not set 298# CONFIG_BT is not set
299# CONFIG_AF_RXRPC is not set
300
301#
302# Wireless
303#
304# CONFIG_CFG80211 is not set
305# CONFIG_WIRELESS_EXT is not set
306# CONFIG_MAC80211 is not set
312# CONFIG_IEEE80211 is not set 307# CONFIG_IEEE80211 is not set
308# CONFIG_RFKILL is not set
309# CONFIG_NET_9P is not set
313 310
314# 311#
315# Device Drivers 312# Device Drivers
@@ -324,25 +321,9 @@ CONFIG_FW_LOADER=m
324# CONFIG_DEBUG_DRIVER is not set 321# CONFIG_DEBUG_DRIVER is not set
325# CONFIG_DEBUG_DEVRES is not set 322# CONFIG_DEBUG_DEVRES is not set
326# CONFIG_SYS_HYPERVISOR is not set 323# CONFIG_SYS_HYPERVISOR is not set
327
328#
329# Connector - unified userspace <-> kernelspace linker
330#
331# CONFIG_CONNECTOR is not set 324# CONFIG_CONNECTOR is not set
332
333#
334# Memory Technology Devices (MTD)
335#
336# CONFIG_MTD is not set 325# CONFIG_MTD is not set
337
338#
339# Parallel port support
340#
341# CONFIG_PARPORT is not set 326# CONFIG_PARPORT is not set
342
343#
344# Plug and Play support
345#
346CONFIG_PNP=y 327CONFIG_PNP=y
347# CONFIG_PNP_DEBUG is not set 328# CONFIG_PNP_DEBUG is not set
348 329
@@ -350,10 +331,7 @@ CONFIG_PNP=y
350# Protocols 331# Protocols
351# 332#
352CONFIG_PNPACPI=y 333CONFIG_PNPACPI=y
353 334CONFIG_BLK_DEV=y
354#
355# Block devices
356#
357# CONFIG_BLK_CPQ_DA is not set 335# CONFIG_BLK_CPQ_DA is not set
358# CONFIG_BLK_CPQ_CISS_DA is not set 336# CONFIG_BLK_CPQ_CISS_DA is not set
359# CONFIG_BLK_DEV_DAC960 is not set 337# CONFIG_BLK_DEV_DAC960 is not set
@@ -370,16 +348,11 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
370CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 348CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
371# CONFIG_CDROM_PKTCDVD is not set 349# CONFIG_CDROM_PKTCDVD is not set
372# CONFIG_ATA_OVER_ETH is not set 350# CONFIG_ATA_OVER_ETH is not set
373 351CONFIG_MISC_DEVICES=y
374# 352# CONFIG_PHANTOM is not set
375# Misc devices 353# CONFIG_EEPROM_93CX6 is not set
376#
377# CONFIG_SGI_IOC4 is not set 354# CONFIG_SGI_IOC4 is not set
378# CONFIG_TIFM_CORE is not set 355# CONFIG_TIFM_CORE is not set
379
380#
381# ATA/ATAPI/MFM/RLL support
382#
383CONFIG_IDE=y 356CONFIG_IDE=y
384CONFIG_IDE_MAX_HWIFS=4 357CONFIG_IDE_MAX_HWIFS=4
385CONFIG_BLK_DEV_IDE=y 358CONFIG_BLK_DEV_IDE=y
@@ -396,6 +369,7 @@ CONFIG_BLK_DEV_IDEFLOPPY=y
396CONFIG_BLK_DEV_IDESCSI=m 369CONFIG_BLK_DEV_IDESCSI=m
397# CONFIG_BLK_DEV_IDEACPI is not set 370# CONFIG_BLK_DEV_IDEACPI is not set
398# CONFIG_IDE_TASK_IOCTL is not set 371# CONFIG_IDE_TASK_IOCTL is not set
372CONFIG_IDE_PROC_FS=y
399 373
400# 374#
401# IDE chipset support/bugfixes 375# IDE chipset support/bugfixes
@@ -404,12 +378,12 @@ CONFIG_BLK_DEV_IDESCSI=m
404# CONFIG_BLK_DEV_IDEPNP is not set 378# CONFIG_BLK_DEV_IDEPNP is not set
405CONFIG_BLK_DEV_IDEPCI=y 379CONFIG_BLK_DEV_IDEPCI=y
406# CONFIG_IDEPCI_SHARE_IRQ is not set 380# CONFIG_IDEPCI_SHARE_IRQ is not set
381CONFIG_IDEPCI_PCIBUS_ORDER=y
407# CONFIG_BLK_DEV_OFFBOARD is not set 382# CONFIG_BLK_DEV_OFFBOARD is not set
408CONFIG_BLK_DEV_GENERIC=y 383CONFIG_BLK_DEV_GENERIC=y
409# CONFIG_BLK_DEV_OPTI621 is not set 384# CONFIG_BLK_DEV_OPTI621 is not set
410CONFIG_BLK_DEV_IDEDMA_PCI=y 385CONFIG_BLK_DEV_IDEDMA_PCI=y
411# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 386# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
412CONFIG_IDEDMA_PCI_AUTO=y
413# CONFIG_IDEDMA_ONLYDISK is not set 387# CONFIG_IDEDMA_ONLYDISK is not set
414# CONFIG_BLK_DEV_AEC62XX is not set 388# CONFIG_BLK_DEV_AEC62XX is not set
415# CONFIG_BLK_DEV_ALI15X3 is not set 389# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -438,7 +412,6 @@ CONFIG_BLK_DEV_PIIX=y
438# CONFIG_IDE_ARM is not set 412# CONFIG_IDE_ARM is not set
439CONFIG_BLK_DEV_IDEDMA=y 413CONFIG_BLK_DEV_IDEDMA=y
440# CONFIG_IDEDMA_IVB is not set 414# CONFIG_IDEDMA_IVB is not set
441CONFIG_IDEDMA_AUTO=y
442# CONFIG_BLK_DEV_HD is not set 415# CONFIG_BLK_DEV_HD is not set
443 416
444# 417#
@@ -446,6 +419,7 @@ CONFIG_IDEDMA_AUTO=y
446# 419#
447# CONFIG_RAID_ATTRS is not set 420# CONFIG_RAID_ATTRS is not set
448CONFIG_SCSI=y 421CONFIG_SCSI=y
422CONFIG_SCSI_DMA=y
449# CONFIG_SCSI_TGT is not set 423# CONFIG_SCSI_TGT is not set
450CONFIG_SCSI_NETLINK=y 424CONFIG_SCSI_NETLINK=y
451CONFIG_SCSI_PROC_FS=y 425CONFIG_SCSI_PROC_FS=y
@@ -468,6 +442,7 @@ CONFIG_CHR_DEV_SG=m
468# CONFIG_SCSI_CONSTANTS is not set 442# CONFIG_SCSI_CONSTANTS is not set
469# CONFIG_SCSI_LOGGING is not set 443# CONFIG_SCSI_LOGGING is not set
470# CONFIG_SCSI_SCAN_ASYNC is not set 444# CONFIG_SCSI_SCAN_ASYNC is not set
445CONFIG_SCSI_WAIT_SCAN=m
471 446
472# 447#
473# SCSI Transports 448# SCSI Transports
@@ -514,15 +489,7 @@ CONFIG_SCSI_QLOGIC_1280=y
514# CONFIG_SCSI_DC390T is not set 489# CONFIG_SCSI_DC390T is not set
515# CONFIG_SCSI_DEBUG is not set 490# CONFIG_SCSI_DEBUG is not set
516# CONFIG_SCSI_SRP is not set 491# CONFIG_SCSI_SRP is not set
517
518#
519# Serial ATA (prod) and Parallel ATA (experimental) drivers
520#
521# CONFIG_ATA is not set 492# CONFIG_ATA is not set
522
523#
524# Multi-device support (RAID and LVM)
525#
526CONFIG_MD=y 493CONFIG_MD=y
527CONFIG_BLK_DEV_MD=m 494CONFIG_BLK_DEV_MD=m
528CONFIG_MD_LINEAR=m 495CONFIG_MD_LINEAR=m
@@ -539,6 +506,7 @@ CONFIG_DM_SNAPSHOT=m
539CONFIG_DM_MIRROR=m 506CONFIG_DM_MIRROR=m
540CONFIG_DM_ZERO=m 507CONFIG_DM_ZERO=m
541# CONFIG_DM_MULTIPATH is not set 508# CONFIG_DM_MULTIPATH is not set
509# CONFIG_DM_DELAY is not set
542 510
543# 511#
544# Fusion MPT device support 512# Fusion MPT device support
@@ -553,46 +521,25 @@ CONFIG_FUSION_CTL=y
553# 521#
554# IEEE 1394 (FireWire) support 522# IEEE 1394 (FireWire) support
555# 523#
524# CONFIG_FIREWIRE is not set
556# CONFIG_IEEE1394 is not set 525# CONFIG_IEEE1394 is not set
557
558#
559# I2O device support
560#
561# CONFIG_I2O is not set 526# CONFIG_I2O is not set
562
563#
564# Network device support
565#
566CONFIG_NETDEVICES=y 527CONFIG_NETDEVICES=y
528# CONFIG_NETDEVICES_MULTIQUEUE is not set
567CONFIG_DUMMY=m 529CONFIG_DUMMY=m
568# CONFIG_BONDING is not set 530# CONFIG_BONDING is not set
531# CONFIG_MACVLAN is not set
569# CONFIG_EQUALIZER is not set 532# CONFIG_EQUALIZER is not set
570# CONFIG_TUN is not set 533# CONFIG_TUN is not set
571# CONFIG_NET_SB1000 is not set 534# CONFIG_NET_SB1000 is not set
572
573#
574# ARCnet devices
575#
576# CONFIG_ARCNET is not set 535# CONFIG_ARCNET is not set
577
578#
579# PHY device support
580#
581# CONFIG_PHYLIB is not set 536# CONFIG_PHYLIB is not set
582
583#
584# Ethernet (10 or 100Mbit)
585#
586CONFIG_NET_ETHERNET=y 537CONFIG_NET_ETHERNET=y
587CONFIG_MII=m 538CONFIG_MII=m
588# CONFIG_HAPPYMEAL is not set 539# CONFIG_HAPPYMEAL is not set
589# CONFIG_SUNGEM is not set 540# CONFIG_SUNGEM is not set
590# CONFIG_CASSINI is not set 541# CONFIG_CASSINI is not set
591# CONFIG_NET_VENDOR_3COM is not set 542# CONFIG_NET_VENDOR_3COM is not set
592
593#
594# Tulip family network device support
595#
596CONFIG_NET_TULIP=y 543CONFIG_NET_TULIP=y
597# CONFIG_DE2104X is not set 544# CONFIG_DE2104X is not set
598CONFIG_TULIP=m 545CONFIG_TULIP=m
@@ -623,10 +570,7 @@ CONFIG_E100=m
623# CONFIG_SUNDANCE is not set 570# CONFIG_SUNDANCE is not set
624# CONFIG_VIA_RHINE is not set 571# CONFIG_VIA_RHINE is not set
625# CONFIG_SC92031 is not set 572# CONFIG_SC92031 is not set
626 573CONFIG_NETDEV_1000=y
627#
628# Ethernet (1000 Mbit)
629#
630# CONFIG_ACENIC is not set 574# CONFIG_ACENIC is not set
631# CONFIG_DL2K is not set 575# CONFIG_DL2K is not set
632CONFIG_E1000=y 576CONFIG_E1000=y
@@ -639,36 +583,36 @@ CONFIG_E1000=y
639# CONFIG_SIS190 is not set 583# CONFIG_SIS190 is not set
640# CONFIG_SKGE is not set 584# CONFIG_SKGE is not set
641# CONFIG_SKY2 is not set 585# CONFIG_SKY2 is not set
642# CONFIG_SK98LIN is not set
643# CONFIG_VIA_VELOCITY is not set 586# CONFIG_VIA_VELOCITY is not set
644CONFIG_TIGON3=y 587CONFIG_TIGON3=y
645# CONFIG_BNX2 is not set 588# CONFIG_BNX2 is not set
646# CONFIG_QLA3XXX is not set 589# CONFIG_QLA3XXX is not set
647# CONFIG_ATL1 is not set 590# CONFIG_ATL1 is not set
648 591CONFIG_NETDEV_10000=y
649#
650# Ethernet (10000 Mbit)
651#
652# CONFIG_CHELSIO_T1 is not set 592# CONFIG_CHELSIO_T1 is not set
653# CONFIG_CHELSIO_T3 is not set 593# CONFIG_CHELSIO_T3 is not set
654# CONFIG_IXGB is not set 594# CONFIG_IXGB is not set
655# CONFIG_S2IO is not set 595# CONFIG_S2IO is not set
656# CONFIG_MYRI10GE is not set 596# CONFIG_MYRI10GE is not set
657# CONFIG_NETXEN_NIC is not set 597# CONFIG_NETXEN_NIC is not set
658 598# CONFIG_MLX4_CORE is not set
659#
660# Token Ring devices
661#
662# CONFIG_TR is not set 599# CONFIG_TR is not set
663 600
664# 601#
665# Wireless LAN (non-hamradio) 602# Wireless LAN
666# 603#
667# CONFIG_NET_RADIO is not set 604# CONFIG_WLAN_PRE80211 is not set
605# CONFIG_WLAN_80211 is not set
668 606
669# 607#
670# Wan interfaces 608# USB Network Adapters
671# 609#
610# CONFIG_USB_CATC is not set
611# CONFIG_USB_KAWETH is not set
612# CONFIG_USB_PEGASUS is not set
613# CONFIG_USB_RTL8150 is not set
614# CONFIG_USB_USBNET_MII is not set
615# CONFIG_USB_USBNET is not set
672# CONFIG_WAN is not set 616# CONFIG_WAN is not set
673# CONFIG_FDDI is not set 617# CONFIG_FDDI is not set
674# CONFIG_HIPPI is not set 618# CONFIG_HIPPI is not set
@@ -678,18 +622,9 @@ CONFIG_TIGON3=y
678# CONFIG_SHAPER is not set 622# CONFIG_SHAPER is not set
679CONFIG_NETCONSOLE=y 623CONFIG_NETCONSOLE=y
680CONFIG_NETPOLL=y 624CONFIG_NETPOLL=y
681# CONFIG_NETPOLL_RX is not set
682# CONFIG_NETPOLL_TRAP is not set 625# CONFIG_NETPOLL_TRAP is not set
683CONFIG_NET_POLL_CONTROLLER=y 626CONFIG_NET_POLL_CONTROLLER=y
684
685#
686# ISDN subsystem
687#
688# CONFIG_ISDN is not set 627# CONFIG_ISDN is not set
689
690#
691# Telephony Support
692#
693# CONFIG_PHONE is not set 628# CONFIG_PHONE is not set
694 629
695# 630#
@@ -697,6 +632,7 @@ CONFIG_NET_POLL_CONTROLLER=y
697# 632#
698CONFIG_INPUT=y 633CONFIG_INPUT=y
699# CONFIG_INPUT_FF_MEMLESS is not set 634# CONFIG_INPUT_FF_MEMLESS is not set
635# CONFIG_INPUT_POLLDEV is not set
700 636
701# 637#
702# Userland interfaces 638# Userland interfaces
@@ -722,9 +658,17 @@ CONFIG_KEYBOARD_ATKBD=y
722# CONFIG_KEYBOARD_STOWAWAY is not set 658# CONFIG_KEYBOARD_STOWAWAY is not set
723CONFIG_INPUT_MOUSE=y 659CONFIG_INPUT_MOUSE=y
724CONFIG_MOUSE_PS2=y 660CONFIG_MOUSE_PS2=y
661CONFIG_MOUSE_PS2_ALPS=y
662CONFIG_MOUSE_PS2_LOGIPS2PP=y
663CONFIG_MOUSE_PS2_SYNAPTICS=y
664CONFIG_MOUSE_PS2_LIFEBOOK=y
665CONFIG_MOUSE_PS2_TRACKPOINT=y
666# CONFIG_MOUSE_PS2_TOUCHKIT is not set
725# CONFIG_MOUSE_SERIAL is not set 667# CONFIG_MOUSE_SERIAL is not set
668# CONFIG_MOUSE_APPLETOUCH is not set
726# CONFIG_MOUSE_VSXXXAA is not set 669# CONFIG_MOUSE_VSXXXAA is not set
727# CONFIG_INPUT_JOYSTICK is not set 670# CONFIG_INPUT_JOYSTICK is not set
671# CONFIG_INPUT_TABLET is not set
728# CONFIG_INPUT_TOUCHSCREEN is not set 672# CONFIG_INPUT_TOUCHSCREEN is not set
729# CONFIG_INPUT_MISC is not set 673# CONFIG_INPUT_MISC is not set
730 674
@@ -790,19 +734,10 @@ CONFIG_SERIAL_CORE_CONSOLE=y
790CONFIG_UNIX98_PTYS=y 734CONFIG_UNIX98_PTYS=y
791CONFIG_LEGACY_PTYS=y 735CONFIG_LEGACY_PTYS=y
792CONFIG_LEGACY_PTY_COUNT=256 736CONFIG_LEGACY_PTY_COUNT=256
793
794#
795# IPMI
796#
797# CONFIG_IPMI_HANDLER is not set 737# CONFIG_IPMI_HANDLER is not set
798
799#
800# Watchdog Cards
801#
802# CONFIG_WATCHDOG is not set 738# CONFIG_WATCHDOG is not set
803# CONFIG_HW_RANDOM is not set 739# CONFIG_HW_RANDOM is not set
804CONFIG_EFI_RTC=y 740CONFIG_EFI_RTC=y
805# CONFIG_DTLK is not set
806# CONFIG_R3964 is not set 741# CONFIG_R3964 is not set
807# CONFIG_APPLICOM is not set 742# CONFIG_APPLICOM is not set
808CONFIG_AGP=m 743CONFIG_AGP=m
@@ -821,15 +756,8 @@ CONFIG_HPET=y
821# CONFIG_HPET_RTC_IRQ is not set 756# CONFIG_HPET_RTC_IRQ is not set
822CONFIG_HPET_MMAP=y 757CONFIG_HPET_MMAP=y
823# CONFIG_HANGCHECK_TIMER is not set 758# CONFIG_HANGCHECK_TIMER is not set
824
825#
826# TPM devices
827#
828# CONFIG_TCG_TPM is not set 759# CONFIG_TCG_TPM is not set
829 760CONFIG_DEVPORT=y
830#
831# I2C support
832#
833# CONFIG_I2C is not set 761# CONFIG_I2C is not set
834 762
835# 763#
@@ -837,21 +765,17 @@ CONFIG_HPET_MMAP=y
837# 765#
838# CONFIG_SPI is not set 766# CONFIG_SPI is not set
839# CONFIG_SPI_MASTER is not set 767# CONFIG_SPI_MASTER is not set
840
841#
842# Dallas's 1-wire bus
843#
844# CONFIG_W1 is not set 768# CONFIG_W1 is not set
845 769# CONFIG_POWER_SUPPLY is not set
846#
847# Hardware Monitoring support
848#
849CONFIG_HWMON=y 770CONFIG_HWMON=y
850# CONFIG_HWMON_VID is not set 771# CONFIG_HWMON_VID is not set
851# CONFIG_SENSORS_ABITUGURU is not set 772# CONFIG_SENSORS_ABITUGURU is not set
852# CONFIG_SENSORS_F71805F is not set 773# CONFIG_SENSORS_F71805F is not set
853# CONFIG_SENSORS_PC87427 is not set 774# CONFIG_SENSORS_PC87427 is not set
775# CONFIG_SENSORS_SMSC47M1 is not set
776# CONFIG_SENSORS_SMSC47B397 is not set
854# CONFIG_SENSORS_VT1211 is not set 777# CONFIG_SENSORS_VT1211 is not set
778# CONFIG_SENSORS_W83627HF is not set
855# CONFIG_HWMON_DEBUG_CHIP is not set 779# CONFIG_HWMON_DEBUG_CHIP is not set
856 780
857# 781#
@@ -863,17 +787,20 @@ CONFIG_HWMON=y
863# Multimedia devices 787# Multimedia devices
864# 788#
865# CONFIG_VIDEO_DEV is not set 789# CONFIG_VIDEO_DEV is not set
866 790# CONFIG_DVB_CORE is not set
867# 791CONFIG_DAB=y
868# Digital Video Broadcasting Devices
869#
870# CONFIG_DVB is not set
871# CONFIG_USB_DABUSB is not set 792# CONFIG_USB_DABUSB is not set
872 793
873# 794#
874# Graphics support 795# Graphics support
875# 796#
876# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 797# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
798
799#
800# Display device support
801#
802# CONFIG_DISPLAY_SUPPORT is not set
803# CONFIG_VGASTATE is not set
877# CONFIG_FB is not set 804# CONFIG_FB is not set
878 805
879# 806#
@@ -887,16 +814,18 @@ CONFIG_DUMMY_CONSOLE=y
887# Sound 814# Sound
888# 815#
889# CONFIG_SOUND is not set 816# CONFIG_SOUND is not set
890 817CONFIG_HID_SUPPORT=y
891#
892# HID Devices
893#
894CONFIG_HID=y 818CONFIG_HID=y
895# CONFIG_HID_DEBUG is not set 819# CONFIG_HID_DEBUG is not set
896 820
897# 821#
898# USB support 822# USB Input Devices
899# 823#
824CONFIG_USB_HID=y
825# CONFIG_USB_HIDINPUT_POWERBOOK is not set
826# CONFIG_HID_FF is not set
827# CONFIG_USB_HIDDEV is not set
828CONFIG_USB_SUPPORT=y
900CONFIG_USB_ARCH_HAS_HCD=y 829CONFIG_USB_ARCH_HAS_HCD=y
901CONFIG_USB_ARCH_HAS_OHCI=y 830CONFIG_USB_ARCH_HAS_OHCI=y
902CONFIG_USB_ARCH_HAS_EHCI=y 831CONFIG_USB_ARCH_HAS_EHCI=y
@@ -907,8 +836,10 @@ CONFIG_USB=y
907# Miscellaneous USB options 836# Miscellaneous USB options
908# 837#
909CONFIG_USB_DEVICEFS=y 838CONFIG_USB_DEVICEFS=y
839CONFIG_USB_DEVICE_CLASS=y
910# CONFIG_USB_DYNAMIC_MINORS is not set 840# CONFIG_USB_DYNAMIC_MINORS is not set
911# CONFIG_USB_SUSPEND is not set 841# CONFIG_USB_SUSPEND is not set
842# CONFIG_USB_PERSIST is not set
912# CONFIG_USB_OTG is not set 843# CONFIG_USB_OTG is not set
913 844
914# 845#
@@ -918,7 +849,6 @@ CONFIG_USB_EHCI_HCD=m
918# CONFIG_USB_EHCI_SPLIT_ISO is not set 849# CONFIG_USB_EHCI_SPLIT_ISO is not set
919# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 850# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
920# CONFIG_USB_EHCI_TT_NEWSCHED is not set 851# CONFIG_USB_EHCI_TT_NEWSCHED is not set
921# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
922# CONFIG_USB_ISP116X_HCD is not set 852# CONFIG_USB_ISP116X_HCD is not set
923CONFIG_USB_OHCI_HCD=m 853CONFIG_USB_OHCI_HCD=m
924# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 854# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -926,6 +856,7 @@ CONFIG_USB_OHCI_HCD=m
926CONFIG_USB_OHCI_LITTLE_ENDIAN=y 856CONFIG_USB_OHCI_LITTLE_ENDIAN=y
927CONFIG_USB_UHCI_HCD=y 857CONFIG_USB_UHCI_HCD=y
928# CONFIG_USB_SL811_HCD is not set 858# CONFIG_USB_SL811_HCD is not set
859# CONFIG_USB_R8A66597_HCD is not set
929 860
930# 861#
931# USB Device Class drivers 862# USB Device Class drivers
@@ -955,41 +886,10 @@ CONFIG_USB_STORAGE=m
955# CONFIG_USB_LIBUSUAL is not set 886# CONFIG_USB_LIBUSUAL is not set
956 887
957# 888#
958# USB Input Devices
959#
960CONFIG_USB_HID=y
961# CONFIG_USB_HIDINPUT_POWERBOOK is not set
962# CONFIG_HID_FF is not set
963# CONFIG_USB_HIDDEV is not set
964# CONFIG_USB_AIPTEK is not set
965# CONFIG_USB_WACOM is not set
966# CONFIG_USB_ACECAD is not set
967# CONFIG_USB_KBTAB is not set
968# CONFIG_USB_POWERMATE is not set
969# CONFIG_USB_TOUCHSCREEN is not set
970# CONFIG_USB_YEALINK is not set
971# CONFIG_USB_XPAD is not set
972# CONFIG_USB_ATI_REMOTE is not set
973# CONFIG_USB_ATI_REMOTE2 is not set
974# CONFIG_USB_KEYSPAN_REMOTE is not set
975# CONFIG_USB_APPLETOUCH is not set
976# CONFIG_USB_GTCO is not set
977
978#
979# USB Imaging devices 889# USB Imaging devices
980# 890#
981# CONFIG_USB_MDC800 is not set 891# CONFIG_USB_MDC800 is not set
982# CONFIG_USB_MICROTEK is not set 892# CONFIG_USB_MICROTEK is not set
983
984#
985# USB Network Adapters
986#
987# CONFIG_USB_CATC is not set
988# CONFIG_USB_KAWETH is not set
989# CONFIG_USB_PEGASUS is not set
990# CONFIG_USB_RTL8150 is not set
991# CONFIG_USB_USBNET_MII is not set
992# CONFIG_USB_USBNET is not set
993# CONFIG_USB_MON is not set 893# CONFIG_USB_MON is not set
994 894
995# 895#
@@ -1033,10 +933,6 @@ CONFIG_USB_HID=y
1033# USB Gadget Support 933# USB Gadget Support
1034# 934#
1035# CONFIG_USB_GADGET is not set 935# CONFIG_USB_GADGET is not set
1036
1037#
1038# MMC/SD Card support
1039#
1040# CONFIG_MMC is not set 936# CONFIG_MMC is not set
1041 937
1042# 938#
@@ -1051,17 +947,9 @@ CONFIG_USB_HID=y
1051# 947#
1052# LED Triggers 948# LED Triggers
1053# 949#
1054
1055#
1056# InfiniBand support
1057#
1058# CONFIG_INFINIBAND is not set 950# CONFIG_INFINIBAND is not set
1059 951
1060# 952#
1061# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1062#
1063
1064#
1065# Real Time Clock 953# Real Time Clock
1066# 954#
1067# CONFIG_RTC_CLASS is not set 955# CONFIG_RTC_CLASS is not set
@@ -1080,12 +968,9 @@ CONFIG_USB_HID=y
1080# 968#
1081 969
1082# 970#
1083# Auxiliary Display support 971# Userspace I/O
1084#
1085
1086#
1087# Virtualization
1088# 972#
973# CONFIG_UIO is not set
1089# CONFIG_MSPEC is not set 974# CONFIG_MSPEC is not set
1090 975
1091# 976#
@@ -1200,7 +1085,8 @@ CONFIG_EXPORTFS=m
1200CONFIG_NFS_COMMON=y 1085CONFIG_NFS_COMMON=y
1201CONFIG_SUNRPC=m 1086CONFIG_SUNRPC=m
1202CONFIG_SUNRPC_GSS=m 1087CONFIG_SUNRPC_GSS=m
1203CONFIG_RPCSEC_GSS_KRB5=m 1088# CONFIG_SUNRPC_BIND34 is not set
1089CONFIG_RPCSEC_GSS_KRB5=y
1204# CONFIG_RPCSEC_GSS_SPKM3 is not set 1090# CONFIG_RPCSEC_GSS_SPKM3 is not set
1205CONFIG_SMB_FS=m 1091CONFIG_SMB_FS=m
1206CONFIG_SMB_NLS_DEFAULT=y 1092CONFIG_SMB_NLS_DEFAULT=y
@@ -1214,7 +1100,6 @@ CONFIG_CIFS=m
1214# CONFIG_NCP_FS is not set 1100# CONFIG_NCP_FS is not set
1215# CONFIG_CODA_FS is not set 1101# CONFIG_CODA_FS is not set
1216# CONFIG_AFS_FS is not set 1102# CONFIG_AFS_FS is not set
1217# CONFIG_9P_FS is not set
1218 1103
1219# 1104#
1220# Partition Types 1105# Partition Types
@@ -1236,6 +1121,7 @@ CONFIG_SGI_PARTITION=y
1236# CONFIG_SUN_PARTITION is not set 1121# CONFIG_SUN_PARTITION is not set
1237# CONFIG_KARMA_PARTITION is not set 1122# CONFIG_KARMA_PARTITION is not set
1238CONFIG_EFI_PARTITION=y 1123CONFIG_EFI_PARTITION=y
1124# CONFIG_SYSV68_PARTITION is not set
1239 1125
1240# 1126#
1241# Native Language Support 1127# Native Language Support
@@ -1292,11 +1178,14 @@ CONFIG_NLS_UTF8=m
1292CONFIG_BITREVERSE=y 1178CONFIG_BITREVERSE=y
1293# CONFIG_CRC_CCITT is not set 1179# CONFIG_CRC_CCITT is not set
1294# CONFIG_CRC16 is not set 1180# CONFIG_CRC16 is not set
1181# CONFIG_CRC_ITU_T is not set
1295CONFIG_CRC32=y 1182CONFIG_CRC32=y
1183# CONFIG_CRC7 is not set
1296# CONFIG_LIBCRC32C is not set 1184# CONFIG_LIBCRC32C is not set
1297CONFIG_PLIST=y 1185CONFIG_PLIST=y
1298CONFIG_HAS_IOMEM=y 1186CONFIG_HAS_IOMEM=y
1299CONFIG_HAS_IOPORT=y 1187CONFIG_HAS_IOPORT=y
1188CONFIG_HAS_DMA=y
1300CONFIG_GENERIC_HARDIRQS=y 1189CONFIG_GENERIC_HARDIRQS=y
1301CONFIG_GENERIC_IRQ_PROBE=y 1190CONFIG_GENERIC_IRQ_PROBE=y
1302CONFIG_GENERIC_PENDING_IRQ=y 1191CONFIG_GENERIC_PENDING_IRQ=y
@@ -1319,8 +1208,8 @@ CONFIG_MAGIC_SYSRQ=y
1319# CONFIG_HEADERS_CHECK is not set 1208# CONFIG_HEADERS_CHECK is not set
1320CONFIG_DEBUG_KERNEL=y 1209CONFIG_DEBUG_KERNEL=y
1321# CONFIG_DEBUG_SHIRQ is not set 1210# CONFIG_DEBUG_SHIRQ is not set
1322CONFIG_LOG_BUF_SHIFT=20
1323CONFIG_DETECT_SOFTLOCKUP=y 1211CONFIG_DETECT_SOFTLOCKUP=y
1212CONFIG_SCHED_DEBUG=y
1324# CONFIG_SCHEDSTATS is not set 1213# CONFIG_SCHEDSTATS is not set
1325# CONFIG_TIMER_STATS is not set 1214# CONFIG_TIMER_STATS is not set
1326# CONFIG_DEBUG_SLAB is not set 1215# CONFIG_DEBUG_SLAB is not set
@@ -1343,17 +1232,12 @@ CONFIG_IA64_GRANULE_16MB=y
1343# CONFIG_DISABLE_VHPT is not set 1232# CONFIG_DISABLE_VHPT is not set
1344# CONFIG_IA64_DEBUG_CMPXCHG is not set 1233# CONFIG_IA64_DEBUG_CMPXCHG is not set
1345# CONFIG_IA64_DEBUG_IRQ is not set 1234# CONFIG_IA64_DEBUG_IRQ is not set
1346CONFIG_SYSVIPC_COMPAT=y
1347 1235
1348# 1236#
1349# Security options 1237# Security options
1350# 1238#
1351# CONFIG_KEYS is not set 1239# CONFIG_KEYS is not set
1352# CONFIG_SECURITY is not set 1240# CONFIG_SECURITY is not set
1353
1354#
1355# Cryptographic options
1356#
1357CONFIG_CRYPTO=y 1241CONFIG_CRYPTO=y
1358CONFIG_CRYPTO_ALGAPI=y 1242CONFIG_CRYPTO_ALGAPI=y
1359CONFIG_CRYPTO_BLKCIPHER=m 1243CONFIG_CRYPTO_BLKCIPHER=m
@@ -1373,6 +1257,7 @@ CONFIG_CRYPTO_ECB=m
1373CONFIG_CRYPTO_CBC=m 1257CONFIG_CRYPTO_CBC=m
1374CONFIG_CRYPTO_PCBC=m 1258CONFIG_CRYPTO_PCBC=m
1375# CONFIG_CRYPTO_LRW is not set 1259# CONFIG_CRYPTO_LRW is not set
1260# CONFIG_CRYPTO_CRYPTD is not set
1376CONFIG_CRYPTO_DES=m 1261CONFIG_CRYPTO_DES=m
1377# CONFIG_CRYPTO_FCRYPT is not set 1262# CONFIG_CRYPTO_FCRYPT is not set
1378# CONFIG_CRYPTO_BLOWFISH is not set 1263# CONFIG_CRYPTO_BLOWFISH is not set
@@ -1390,7 +1275,4 @@ CONFIG_CRYPTO_DES=m
1390# CONFIG_CRYPTO_CRC32C is not set 1275# CONFIG_CRYPTO_CRC32C is not set
1391# CONFIG_CRYPTO_CAMELLIA is not set 1276# CONFIG_CRYPTO_CAMELLIA is not set
1392# CONFIG_CRYPTO_TEST is not set 1277# CONFIG_CRYPTO_TEST is not set
1393 1278CONFIG_CRYPTO_HW=y
1394#
1395# Hardware crypto devices
1396#
diff --git a/arch/ia64/configs/zx1_defconfig b/arch/ia64/configs/zx1_defconfig
index 1c7955c16358..4a060fc39934 100644
--- a/arch/ia64/configs/zx1_defconfig
+++ b/arch/ia64/configs/zx1_defconfig
@@ -96,7 +96,7 @@ CONFIG_RWSEM_XCHGADD_ALGORITHM=y
96# CONFIG_ARCH_HAS_ILOG2_U64 is not set 96# CONFIG_ARCH_HAS_ILOG2_U64 is not set
97CONFIG_GENERIC_FIND_NEXT_BIT=y 97CONFIG_GENERIC_FIND_NEXT_BIT=y
98CONFIG_GENERIC_CALIBRATE_DELAY=y 98CONFIG_GENERIC_CALIBRATE_DELAY=y
99CONFIG_TIME_INTERPOLATION=y 99CONFIG_GENERIC_TIME=y
100CONFIG_DMI=y 100CONFIG_DMI=y
101CONFIG_EFI=y 101CONFIG_EFI=y
102CONFIG_GENERIC_IOMAP=y 102CONFIG_GENERIC_IOMAP=y
diff --git a/arch/ia64/defconfig b/arch/ia64/defconfig
index 90bd9601cdde..03172dc8c403 100644
--- a/arch/ia64/defconfig
+++ b/arch/ia64/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.21-rc3 3# Linux kernel version: 2.6.22
4# Thu Mar 8 11:01:03 2007 4# Thu Jul 19 13:55:32 2007
5# 5#
6CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 6CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
7 7
@@ -19,15 +19,15 @@ CONFIG_LOCALVERSION=""
19CONFIG_LOCALVERSION_AUTO=y 19CONFIG_LOCALVERSION_AUTO=y
20CONFIG_SWAP=y 20CONFIG_SWAP=y
21CONFIG_SYSVIPC=y 21CONFIG_SYSVIPC=y
22# CONFIG_IPC_NS is not set
23CONFIG_SYSVIPC_SYSCTL=y 22CONFIG_SYSVIPC_SYSCTL=y
24CONFIG_POSIX_MQUEUE=y 23CONFIG_POSIX_MQUEUE=y
25# CONFIG_BSD_PROCESS_ACCT is not set 24# CONFIG_BSD_PROCESS_ACCT is not set
26# CONFIG_TASKSTATS is not set 25# CONFIG_TASKSTATS is not set
27# CONFIG_UTS_NS is not set 26# CONFIG_USER_NS is not set
28# CONFIG_AUDIT is not set 27# CONFIG_AUDIT is not set
29CONFIG_IKCONFIG=y 28CONFIG_IKCONFIG=y
30CONFIG_IKCONFIG_PROC=y 29CONFIG_IKCONFIG_PROC=y
30CONFIG_LOG_BUF_SHIFT=20
31# CONFIG_CPUSETS is not set 31# CONFIG_CPUSETS is not set
32CONFIG_SYSFS_DEPRECATED=y 32CONFIG_SYSFS_DEPRECATED=y
33# CONFIG_RELAY is not set 33# CONFIG_RELAY is not set
@@ -46,18 +46,19 @@ CONFIG_BUG=y
46CONFIG_ELF_CORE=y 46CONFIG_ELF_CORE=y
47CONFIG_BASE_FULL=y 47CONFIG_BASE_FULL=y
48CONFIG_FUTEX=y 48CONFIG_FUTEX=y
49CONFIG_ANON_INODES=y
49CONFIG_EPOLL=y 50CONFIG_EPOLL=y
51CONFIG_SIGNALFD=y
52CONFIG_TIMERFD=y
53CONFIG_EVENTFD=y
50CONFIG_SHMEM=y 54CONFIG_SHMEM=y
51CONFIG_SLAB=y
52CONFIG_VM_EVENT_COUNTERS=y 55CONFIG_VM_EVENT_COUNTERS=y
56CONFIG_SLAB=y
57# CONFIG_SLUB is not set
58# CONFIG_SLOB is not set
53CONFIG_RT_MUTEXES=y 59CONFIG_RT_MUTEXES=y
54# CONFIG_TINY_SHMEM is not set 60# CONFIG_TINY_SHMEM is not set
55CONFIG_BASE_SMALL=0 61CONFIG_BASE_SMALL=0
56# CONFIG_SLOB is not set
57
58#
59# Loadable module support
60#
61CONFIG_MODULES=y 62CONFIG_MODULES=y
62CONFIG_MODULE_UNLOAD=y 63CONFIG_MODULE_UNLOAD=y
63# CONFIG_MODULE_FORCE_UNLOAD is not set 64# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -65,12 +66,9 @@ CONFIG_MODVERSIONS=y
65# CONFIG_MODULE_SRCVERSION_ALL is not set 66# CONFIG_MODULE_SRCVERSION_ALL is not set
66CONFIG_KMOD=y 67CONFIG_KMOD=y
67CONFIG_STOP_MACHINE=y 68CONFIG_STOP_MACHINE=y
68
69#
70# Block layer
71#
72CONFIG_BLOCK=y 69CONFIG_BLOCK=y
73# CONFIG_BLK_DEV_IO_TRACE is not set 70# CONFIG_BLK_DEV_IO_TRACE is not set
71# CONFIG_BLK_DEV_BSG is not set
74 72
75# 73#
76# IO Schedulers 74# IO Schedulers
@@ -91,6 +89,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
91CONFIG_IA64=y 89CONFIG_IA64=y
92CONFIG_64BIT=y 90CONFIG_64BIT=y
93CONFIG_ZONE_DMA=y 91CONFIG_ZONE_DMA=y
92CONFIG_QUICKLIST=y
94CONFIG_MMU=y 93CONFIG_MMU=y
95CONFIG_SWIOTLB=y 94CONFIG_SWIOTLB=y
96CONFIG_RWSEM_XCHGADD_ALGORITHM=y 95CONFIG_RWSEM_XCHGADD_ALGORITHM=y
@@ -98,7 +97,7 @@ CONFIG_RWSEM_XCHGADD_ALGORITHM=y
98# CONFIG_ARCH_HAS_ILOG2_U64 is not set 97# CONFIG_ARCH_HAS_ILOG2_U64 is not set
99CONFIG_GENERIC_FIND_NEXT_BIT=y 98CONFIG_GENERIC_FIND_NEXT_BIT=y
100CONFIG_GENERIC_CALIBRATE_DELAY=y 99CONFIG_GENERIC_CALIBRATE_DELAY=y
101CONFIG_TIME_INTERPOLATION=y 100CONFIG_GENERIC_TIME=y
102CONFIG_DMI=y 101CONFIG_DMI=y
103CONFIG_EFI=y 102CONFIG_EFI=y
104CONFIG_GENERIC_IOMAP=y 103CONFIG_GENERIC_IOMAP=y
@@ -114,8 +113,8 @@ CONFIG_IA64_GENERIC=y
114CONFIG_MCKINLEY=y 113CONFIG_MCKINLEY=y
115# CONFIG_IA64_PAGE_SIZE_4KB is not set 114# CONFIG_IA64_PAGE_SIZE_4KB is not set
116# CONFIG_IA64_PAGE_SIZE_8KB is not set 115# CONFIG_IA64_PAGE_SIZE_8KB is not set
117CONFIG_IA64_PAGE_SIZE_16KB=y 116# CONFIG_IA64_PAGE_SIZE_16KB is not set
118# CONFIG_IA64_PAGE_SIZE_64KB is not set 117CONFIG_IA64_PAGE_SIZE_64KB=y
119CONFIG_PGTABLE_3=y 118CONFIG_PGTABLE_3=y
120# CONFIG_PGTABLE_4 is not set 119# CONFIG_PGTABLE_4 is not set
121# CONFIG_HZ_100 is not set 120# CONFIG_HZ_100 is not set
@@ -147,6 +146,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
147CONFIG_MIGRATION=y 146CONFIG_MIGRATION=y
148CONFIG_RESOURCES_64BIT=y 147CONFIG_RESOURCES_64BIT=y
149CONFIG_ZONE_DMA_FLAG=1 148CONFIG_ZONE_DMA_FLAG=1
149CONFIG_BOUNCE=y
150CONFIG_NR_QUICK=1
151CONFIG_VIRT_TO_BUS=y
150CONFIG_ARCH_SELECT_MEMORY_MODEL=y 152CONFIG_ARCH_SELECT_MEMORY_MODEL=y
151CONFIG_ARCH_DISCONTIGMEM_ENABLE=y 153CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
152CONFIG_ARCH_FLATMEM_ENABLE=y 154CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -164,7 +166,7 @@ CONFIG_COMPAT=y
164CONFIG_IA64_MCA_RECOVERY=y 166CONFIG_IA64_MCA_RECOVERY=y
165CONFIG_PERFMON=y 167CONFIG_PERFMON=y
166CONFIG_IA64_PALINFO=y 168CONFIG_IA64_PALINFO=y
167# CONFIG_MC_ERR_INJECT is not set 169# CONFIG_IA64_MC_ERR_INJECT is not set
168CONFIG_SGI_SN=y 170CONFIG_SGI_SN=y
169# CONFIG_IA64_ESI is not set 171# CONFIG_IA64_ESI is not set
170 172
@@ -180,6 +182,7 @@ CONFIG_CRASH_DUMP=y
180# 182#
181CONFIG_EFI_VARS=y 183CONFIG_EFI_VARS=y
182CONFIG_EFI_PCDP=y 184CONFIG_EFI_PCDP=y
185CONFIG_DMIID=y
183CONFIG_BINFMT_ELF=y 186CONFIG_BINFMT_ELF=y
184CONFIG_BINFMT_MISC=m 187CONFIG_BINFMT_MISC=m
185 188
@@ -189,7 +192,6 @@ CONFIG_BINFMT_MISC=m
189CONFIG_PM=y 192CONFIG_PM=y
190CONFIG_PM_LEGACY=y 193CONFIG_PM_LEGACY=y
191# CONFIG_PM_DEBUG is not set 194# CONFIG_PM_DEBUG is not set
192# CONFIG_PM_SYSFS_DEPRECATED is not set
193 195
194# 196#
195# ACPI (Advanced Configuration and Power Interface) Support 197# ACPI (Advanced Configuration and Power Interface) Support
@@ -220,13 +222,11 @@ CONFIG_ACPI_CONTAINER=m
220# 222#
221CONFIG_PCI=y 223CONFIG_PCI=y
222CONFIG_PCI_DOMAINS=y 224CONFIG_PCI_DOMAINS=y
225CONFIG_PCI_SYSCALL=y
223# CONFIG_PCIEPORTBUS is not set 226# CONFIG_PCIEPORTBUS is not set
227CONFIG_ARCH_SUPPORTS_MSI=y
224# CONFIG_PCI_MSI is not set 228# CONFIG_PCI_MSI is not set
225# CONFIG_PCI_DEBUG is not set 229# CONFIG_PCI_DEBUG is not set
226
227#
228# PCI Hotplug Support
229#
230CONFIG_HOTPLUG_PCI=m 230CONFIG_HOTPLUG_PCI=m
231# CONFIG_HOTPLUG_PCI_FAKE is not set 231# CONFIG_HOTPLUG_PCI_FAKE is not set
232CONFIG_HOTPLUG_PCI_ACPI=m 232CONFIG_HOTPLUG_PCI_ACPI=m
@@ -248,7 +248,6 @@ CONFIG_NET=y
248# 248#
249# Networking options 249# Networking options
250# 250#
251# CONFIG_NETDEBUG is not set
252CONFIG_PACKET=y 251CONFIG_PACKET=y
253# CONFIG_PACKET_MMAP is not set 252# CONFIG_PACKET_MMAP is not set
254CONFIG_UNIX=y 253CONFIG_UNIX=y
@@ -286,20 +285,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
286# CONFIG_INET6_TUNNEL is not set 285# CONFIG_INET6_TUNNEL is not set
287# CONFIG_NETWORK_SECMARK is not set 286# CONFIG_NETWORK_SECMARK is not set
288# CONFIG_NETFILTER is not set 287# CONFIG_NETFILTER is not set
289
290#
291# DCCP Configuration (EXPERIMENTAL)
292#
293# CONFIG_IP_DCCP is not set 288# CONFIG_IP_DCCP is not set
294
295#
296# SCTP Configuration (EXPERIMENTAL)
297#
298# CONFIG_IP_SCTP is not set 289# CONFIG_IP_SCTP is not set
299
300#
301# TIPC Configuration (EXPERIMENTAL)
302#
303# CONFIG_TIPC is not set 290# CONFIG_TIPC is not set
304# CONFIG_ATM is not set 291# CONFIG_ATM is not set
305# CONFIG_BRIDGE is not set 292# CONFIG_BRIDGE is not set
@@ -325,7 +312,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
325# CONFIG_HAMRADIO is not set 312# CONFIG_HAMRADIO is not set
326# CONFIG_IRDA is not set 313# CONFIG_IRDA is not set
327# CONFIG_BT is not set 314# CONFIG_BT is not set
315# CONFIG_AF_RXRPC is not set
316
317#
318# Wireless
319#
320# CONFIG_CFG80211 is not set
321# CONFIG_WIRELESS_EXT is not set
322# CONFIG_MAC80211 is not set
328# CONFIG_IEEE80211 is not set 323# CONFIG_IEEE80211 is not set
324# CONFIG_RFKILL is not set
325# CONFIG_NET_9P is not set
329 326
330# 327#
331# Device Drivers 328# Device Drivers
@@ -340,25 +337,9 @@ CONFIG_FW_LOADER=m
340# CONFIG_DEBUG_DRIVER is not set 337# CONFIG_DEBUG_DRIVER is not set
341# CONFIG_DEBUG_DEVRES is not set 338# CONFIG_DEBUG_DEVRES is not set
342# CONFIG_SYS_HYPERVISOR is not set 339# CONFIG_SYS_HYPERVISOR is not set
343
344#
345# Connector - unified userspace <-> kernelspace linker
346#
347# CONFIG_CONNECTOR is not set 340# CONFIG_CONNECTOR is not set
348
349#
350# Memory Technology Devices (MTD)
351#
352# CONFIG_MTD is not set 341# CONFIG_MTD is not set
353
354#
355# Parallel port support
356#
357# CONFIG_PARPORT is not set 342# CONFIG_PARPORT is not set
358
359#
360# Plug and Play support
361#
362CONFIG_PNP=y 343CONFIG_PNP=y
363# CONFIG_PNP_DEBUG is not set 344# CONFIG_PNP_DEBUG is not set
364 345
@@ -366,10 +347,7 @@ CONFIG_PNP=y
366# Protocols 347# Protocols
367# 348#
368CONFIG_PNPACPI=y 349CONFIG_PNPACPI=y
369 350CONFIG_BLK_DEV=y
370#
371# Block devices
372#
373# CONFIG_BLK_CPQ_DA is not set 351# CONFIG_BLK_CPQ_DA is not set
374# CONFIG_BLK_CPQ_CISS_DA is not set 352# CONFIG_BLK_CPQ_CISS_DA is not set
375# CONFIG_BLK_DEV_DAC960 is not set 353# CONFIG_BLK_DEV_DAC960 is not set
@@ -386,16 +364,11 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
386CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 364CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
387# CONFIG_CDROM_PKTCDVD is not set 365# CONFIG_CDROM_PKTCDVD is not set
388# CONFIG_ATA_OVER_ETH is not set 366# CONFIG_ATA_OVER_ETH is not set
389 367CONFIG_MISC_DEVICES=y
390# 368# CONFIG_PHANTOM is not set
391# Misc devices 369# CONFIG_EEPROM_93CX6 is not set
392#
393CONFIG_SGI_IOC4=y 370CONFIG_SGI_IOC4=y
394# CONFIG_TIFM_CORE is not set 371# CONFIG_TIFM_CORE is not set
395
396#
397# ATA/ATAPI/MFM/RLL support
398#
399CONFIG_IDE=y 372CONFIG_IDE=y
400CONFIG_IDE_MAX_HWIFS=4 373CONFIG_IDE_MAX_HWIFS=4
401CONFIG_BLK_DEV_IDE=y 374CONFIG_BLK_DEV_IDE=y
@@ -412,6 +385,7 @@ CONFIG_BLK_DEV_IDEFLOPPY=y
412CONFIG_BLK_DEV_IDESCSI=m 385CONFIG_BLK_DEV_IDESCSI=m
413# CONFIG_BLK_DEV_IDEACPI is not set 386# CONFIG_BLK_DEV_IDEACPI is not set
414# CONFIG_IDE_TASK_IOCTL is not set 387# CONFIG_IDE_TASK_IOCTL is not set
388CONFIG_IDE_PROC_FS=y
415 389
416# 390#
417# IDE chipset support/bugfixes 391# IDE chipset support/bugfixes
@@ -420,12 +394,12 @@ CONFIG_BLK_DEV_IDESCSI=m
420# CONFIG_BLK_DEV_IDEPNP is not set 394# CONFIG_BLK_DEV_IDEPNP is not set
421CONFIG_BLK_DEV_IDEPCI=y 395CONFIG_BLK_DEV_IDEPCI=y
422CONFIG_IDEPCI_SHARE_IRQ=y 396CONFIG_IDEPCI_SHARE_IRQ=y
397CONFIG_IDEPCI_PCIBUS_ORDER=y
423# CONFIG_BLK_DEV_OFFBOARD is not set 398# CONFIG_BLK_DEV_OFFBOARD is not set
424CONFIG_BLK_DEV_GENERIC=y 399CONFIG_BLK_DEV_GENERIC=y
425# CONFIG_BLK_DEV_OPTI621 is not set 400# CONFIG_BLK_DEV_OPTI621 is not set
426CONFIG_BLK_DEV_IDEDMA_PCI=y 401CONFIG_BLK_DEV_IDEDMA_PCI=y
427# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 402# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
428CONFIG_IDEDMA_PCI_AUTO=y
429# CONFIG_IDEDMA_ONLYDISK is not set 403# CONFIG_IDEDMA_ONLYDISK is not set
430# CONFIG_BLK_DEV_AEC62XX is not set 404# CONFIG_BLK_DEV_AEC62XX is not set
431# CONFIG_BLK_DEV_ALI15X3 is not set 405# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -455,7 +429,6 @@ CONFIG_BLK_DEV_SGIIOC4=y
455# CONFIG_IDE_ARM is not set 429# CONFIG_IDE_ARM is not set
456CONFIG_BLK_DEV_IDEDMA=y 430CONFIG_BLK_DEV_IDEDMA=y
457# CONFIG_IDEDMA_IVB is not set 431# CONFIG_IDEDMA_IVB is not set
458CONFIG_IDEDMA_AUTO=y
459# CONFIG_BLK_DEV_HD is not set 432# CONFIG_BLK_DEV_HD is not set
460 433
461# 434#
@@ -463,6 +436,7 @@ CONFIG_IDEDMA_AUTO=y
463# 436#
464# CONFIG_RAID_ATTRS is not set 437# CONFIG_RAID_ATTRS is not set
465CONFIG_SCSI=y 438CONFIG_SCSI=y
439CONFIG_SCSI_DMA=y
466# CONFIG_SCSI_TGT is not set 440# CONFIG_SCSI_TGT is not set
467CONFIG_SCSI_NETLINK=y 441CONFIG_SCSI_NETLINK=y
468CONFIG_SCSI_PROC_FS=y 442CONFIG_SCSI_PROC_FS=y
@@ -485,6 +459,7 @@ CONFIG_CHR_DEV_SG=m
485# CONFIG_SCSI_CONSTANTS is not set 459# CONFIG_SCSI_CONSTANTS is not set
486# CONFIG_SCSI_LOGGING is not set 460# CONFIG_SCSI_LOGGING is not set
487# CONFIG_SCSI_SCAN_ASYNC is not set 461# CONFIG_SCSI_SCAN_ASYNC is not set
462CONFIG_SCSI_WAIT_SCAN=m
488 463
489# 464#
490# SCSI Transports 465# SCSI Transports
@@ -492,7 +467,7 @@ CONFIG_CHR_DEV_SG=m
492CONFIG_SCSI_SPI_ATTRS=y 467CONFIG_SCSI_SPI_ATTRS=y
493CONFIG_SCSI_FC_ATTRS=y 468CONFIG_SCSI_FC_ATTRS=y
494# CONFIG_SCSI_ISCSI_ATTRS is not set 469# CONFIG_SCSI_ISCSI_ATTRS is not set
495# CONFIG_SCSI_SAS_ATTRS is not set 470CONFIG_SCSI_SAS_ATTRS=y
496# CONFIG_SCSI_SAS_LIBSAS is not set 471# CONFIG_SCSI_SAS_LIBSAS is not set
497 472
498# 473#
@@ -531,15 +506,7 @@ CONFIG_SCSI_QLOGIC_1280=y
531# CONFIG_SCSI_DC390T is not set 506# CONFIG_SCSI_DC390T is not set
532# CONFIG_SCSI_DEBUG is not set 507# CONFIG_SCSI_DEBUG is not set
533# CONFIG_SCSI_SRP is not set 508# CONFIG_SCSI_SRP is not set
534
535#
536# Serial ATA (prod) and Parallel ATA (experimental) drivers
537#
538# CONFIG_ATA is not set 509# CONFIG_ATA is not set
539
540#
541# Multi-device support (RAID and LVM)
542#
543CONFIG_MD=y 510CONFIG_MD=y
544CONFIG_BLK_DEV_MD=m 511CONFIG_BLK_DEV_MD=m
545CONFIG_MD_LINEAR=m 512CONFIG_MD_LINEAR=m
@@ -557,6 +524,8 @@ CONFIG_DM_MIRROR=m
557CONFIG_DM_ZERO=m 524CONFIG_DM_ZERO=m
558CONFIG_DM_MULTIPATH=m 525CONFIG_DM_MULTIPATH=m
559# CONFIG_DM_MULTIPATH_EMC is not set 526# CONFIG_DM_MULTIPATH_EMC is not set
527# CONFIG_DM_MULTIPATH_RDAC is not set
528# CONFIG_DM_DELAY is not set
560 529
561# 530#
562# Fusion MPT device support 531# Fusion MPT device support
@@ -564,53 +533,32 @@ CONFIG_DM_MULTIPATH=m
564CONFIG_FUSION=y 533CONFIG_FUSION=y
565CONFIG_FUSION_SPI=y 534CONFIG_FUSION_SPI=y
566CONFIG_FUSION_FC=m 535CONFIG_FUSION_FC=m
567# CONFIG_FUSION_SAS is not set 536CONFIG_FUSION_SAS=y
568CONFIG_FUSION_MAX_SGE=128 537CONFIG_FUSION_MAX_SGE=128
569# CONFIG_FUSION_CTL is not set 538# CONFIG_FUSION_CTL is not set
570 539
571# 540#
572# IEEE 1394 (FireWire) support 541# IEEE 1394 (FireWire) support
573# 542#
543# CONFIG_FIREWIRE is not set
574# CONFIG_IEEE1394 is not set 544# CONFIG_IEEE1394 is not set
575
576#
577# I2O device support
578#
579# CONFIG_I2O is not set 545# CONFIG_I2O is not set
580
581#
582# Network device support
583#
584CONFIG_NETDEVICES=y 546CONFIG_NETDEVICES=y
547# CONFIG_NETDEVICES_MULTIQUEUE is not set
585CONFIG_DUMMY=m 548CONFIG_DUMMY=m
586# CONFIG_BONDING is not set 549# CONFIG_BONDING is not set
550# CONFIG_MACVLAN is not set
587# CONFIG_EQUALIZER is not set 551# CONFIG_EQUALIZER is not set
588# CONFIG_TUN is not set 552# CONFIG_TUN is not set
589# CONFIG_NET_SB1000 is not set 553# CONFIG_NET_SB1000 is not set
590
591#
592# ARCnet devices
593#
594# CONFIG_ARCNET is not set 554# CONFIG_ARCNET is not set
595
596#
597# PHY device support
598#
599# CONFIG_PHYLIB is not set 555# CONFIG_PHYLIB is not set
600
601#
602# Ethernet (10 or 100Mbit)
603#
604CONFIG_NET_ETHERNET=y 556CONFIG_NET_ETHERNET=y
605CONFIG_MII=m 557CONFIG_MII=m
606# CONFIG_HAPPYMEAL is not set 558# CONFIG_HAPPYMEAL is not set
607# CONFIG_SUNGEM is not set 559# CONFIG_SUNGEM is not set
608# CONFIG_CASSINI is not set 560# CONFIG_CASSINI is not set
609# CONFIG_NET_VENDOR_3COM is not set 561# CONFIG_NET_VENDOR_3COM is not set
610
611#
612# Tulip family network device support
613#
614CONFIG_NET_TULIP=y 562CONFIG_NET_TULIP=y
615# CONFIG_DE2104X is not set 563# CONFIG_DE2104X is not set
616CONFIG_TULIP=m 564CONFIG_TULIP=m
@@ -641,10 +589,7 @@ CONFIG_E100=m
641# CONFIG_SUNDANCE is not set 589# CONFIG_SUNDANCE is not set
642# CONFIG_VIA_RHINE is not set 590# CONFIG_VIA_RHINE is not set
643# CONFIG_SC92031 is not set 591# CONFIG_SC92031 is not set
644 592CONFIG_NETDEV_1000=y
645#
646# Ethernet (1000 Mbit)
647#
648# CONFIG_ACENIC is not set 593# CONFIG_ACENIC is not set
649# CONFIG_DL2K is not set 594# CONFIG_DL2K is not set
650CONFIG_E1000=y 595CONFIG_E1000=y
@@ -657,36 +602,36 @@ CONFIG_E1000=y
657# CONFIG_SIS190 is not set 602# CONFIG_SIS190 is not set
658# CONFIG_SKGE is not set 603# CONFIG_SKGE is not set
659# CONFIG_SKY2 is not set 604# CONFIG_SKY2 is not set
660# CONFIG_SK98LIN is not set
661# CONFIG_VIA_VELOCITY is not set 605# CONFIG_VIA_VELOCITY is not set
662CONFIG_TIGON3=y 606CONFIG_TIGON3=y
663# CONFIG_BNX2 is not set 607# CONFIG_BNX2 is not set
664# CONFIG_QLA3XXX is not set 608# CONFIG_QLA3XXX is not set
665# CONFIG_ATL1 is not set 609# CONFIG_ATL1 is not set
666 610CONFIG_NETDEV_10000=y
667#
668# Ethernet (10000 Mbit)
669#
670# CONFIG_CHELSIO_T1 is not set 611# CONFIG_CHELSIO_T1 is not set
671# CONFIG_CHELSIO_T3 is not set 612# CONFIG_CHELSIO_T3 is not set
672# CONFIG_IXGB is not set 613# CONFIG_IXGB is not set
673# CONFIG_S2IO is not set 614# CONFIG_S2IO is not set
674# CONFIG_MYRI10GE is not set 615# CONFIG_MYRI10GE is not set
675# CONFIG_NETXEN_NIC is not set 616# CONFIG_NETXEN_NIC is not set
676 617# CONFIG_MLX4_CORE is not set
677#
678# Token Ring devices
679#
680# CONFIG_TR is not set 618# CONFIG_TR is not set
681 619
682# 620#
683# Wireless LAN (non-hamradio) 621# Wireless LAN
684# 622#
685# CONFIG_NET_RADIO is not set 623# CONFIG_WLAN_PRE80211 is not set
624# CONFIG_WLAN_80211 is not set
686 625
687# 626#
688# Wan interfaces 627# USB Network Adapters
689# 628#
629# CONFIG_USB_CATC is not set
630# CONFIG_USB_KAWETH is not set
631# CONFIG_USB_PEGASUS is not set
632# CONFIG_USB_RTL8150 is not set
633# CONFIG_USB_USBNET_MII is not set
634# CONFIG_USB_USBNET is not set
690# CONFIG_WAN is not set 635# CONFIG_WAN is not set
691# CONFIG_FDDI is not set 636# CONFIG_FDDI is not set
692# CONFIG_HIPPI is not set 637# CONFIG_HIPPI is not set
@@ -696,18 +641,9 @@ CONFIG_TIGON3=y
696# CONFIG_SHAPER is not set 641# CONFIG_SHAPER is not set
697CONFIG_NETCONSOLE=y 642CONFIG_NETCONSOLE=y
698CONFIG_NETPOLL=y 643CONFIG_NETPOLL=y
699# CONFIG_NETPOLL_RX is not set
700# CONFIG_NETPOLL_TRAP is not set 644# CONFIG_NETPOLL_TRAP is not set
701CONFIG_NET_POLL_CONTROLLER=y 645CONFIG_NET_POLL_CONTROLLER=y
702
703#
704# ISDN subsystem
705#
706# CONFIG_ISDN is not set 646# CONFIG_ISDN is not set
707
708#
709# Telephony Support
710#
711# CONFIG_PHONE is not set 647# CONFIG_PHONE is not set
712 648
713# 649#
@@ -715,6 +651,7 @@ CONFIG_NET_POLL_CONTROLLER=y
715# 651#
716CONFIG_INPUT=y 652CONFIG_INPUT=y
717# CONFIG_INPUT_FF_MEMLESS is not set 653# CONFIG_INPUT_FF_MEMLESS is not set
654# CONFIG_INPUT_POLLDEV is not set
718 655
719# 656#
720# Userland interfaces 657# Userland interfaces
@@ -740,9 +677,17 @@ CONFIG_KEYBOARD_ATKBD=y
740# CONFIG_KEYBOARD_STOWAWAY is not set 677# CONFIG_KEYBOARD_STOWAWAY is not set
741CONFIG_INPUT_MOUSE=y 678CONFIG_INPUT_MOUSE=y
742CONFIG_MOUSE_PS2=y 679CONFIG_MOUSE_PS2=y
680CONFIG_MOUSE_PS2_ALPS=y
681CONFIG_MOUSE_PS2_LOGIPS2PP=y
682CONFIG_MOUSE_PS2_SYNAPTICS=y
683CONFIG_MOUSE_PS2_LIFEBOOK=y
684CONFIG_MOUSE_PS2_TRACKPOINT=y
685# CONFIG_MOUSE_PS2_TOUCHKIT is not set
743# CONFIG_MOUSE_SERIAL is not set 686# CONFIG_MOUSE_SERIAL is not set
687# CONFIG_MOUSE_APPLETOUCH is not set
744# CONFIG_MOUSE_VSXXXAA is not set 688# CONFIG_MOUSE_VSXXXAA is not set
745# CONFIG_INPUT_JOYSTICK is not set 689# CONFIG_INPUT_JOYSTICK is not set
690# CONFIG_INPUT_TABLET is not set
746# CONFIG_INPUT_TOUCHSCREEN is not set 691# CONFIG_INPUT_TOUCHSCREEN is not set
747# CONFIG_INPUT_MISC is not set 692# CONFIG_INPUT_MISC is not set
748 693
@@ -814,19 +759,10 @@ CONFIG_SERIAL_SGI_IOC4=y
814CONFIG_UNIX98_PTYS=y 759CONFIG_UNIX98_PTYS=y
815CONFIG_LEGACY_PTYS=y 760CONFIG_LEGACY_PTYS=y
816CONFIG_LEGACY_PTY_COUNT=256 761CONFIG_LEGACY_PTY_COUNT=256
817
818#
819# IPMI
820#
821# CONFIG_IPMI_HANDLER is not set 762# CONFIG_IPMI_HANDLER is not set
822
823#
824# Watchdog Cards
825#
826# CONFIG_WATCHDOG is not set 763# CONFIG_WATCHDOG is not set
827# CONFIG_HW_RANDOM is not set 764# CONFIG_HW_RANDOM is not set
828CONFIG_EFI_RTC=y 765CONFIG_EFI_RTC=y
829# CONFIG_DTLK is not set
830# CONFIG_R3964 is not set 766# CONFIG_R3964 is not set
831# CONFIG_APPLICOM is not set 767# CONFIG_APPLICOM is not set
832CONFIG_AGP=m 768CONFIG_AGP=m
@@ -848,15 +784,8 @@ CONFIG_HPET=y
848CONFIG_HPET_MMAP=y 784CONFIG_HPET_MMAP=y
849# CONFIG_HANGCHECK_TIMER is not set 785# CONFIG_HANGCHECK_TIMER is not set
850CONFIG_MMTIMER=y 786CONFIG_MMTIMER=y
851
852#
853# TPM devices
854#
855# CONFIG_TCG_TPM is not set 787# CONFIG_TCG_TPM is not set
856 788CONFIG_DEVPORT=y
857#
858# I2C support
859#
860# CONFIG_I2C is not set 789# CONFIG_I2C is not set
861 790
862# 791#
@@ -864,21 +793,17 @@ CONFIG_MMTIMER=y
864# 793#
865# CONFIG_SPI is not set 794# CONFIG_SPI is not set
866# CONFIG_SPI_MASTER is not set 795# CONFIG_SPI_MASTER is not set
867
868#
869# Dallas's 1-wire bus
870#
871# CONFIG_W1 is not set 796# CONFIG_W1 is not set
872 797# CONFIG_POWER_SUPPLY is not set
873#
874# Hardware Monitoring support
875#
876CONFIG_HWMON=y 798CONFIG_HWMON=y
877# CONFIG_HWMON_VID is not set 799# CONFIG_HWMON_VID is not set
878# CONFIG_SENSORS_ABITUGURU is not set 800# CONFIG_SENSORS_ABITUGURU is not set
879# CONFIG_SENSORS_F71805F is not set 801# CONFIG_SENSORS_F71805F is not set
880# CONFIG_SENSORS_PC87427 is not set 802# CONFIG_SENSORS_PC87427 is not set
803# CONFIG_SENSORS_SMSC47M1 is not set
804# CONFIG_SENSORS_SMSC47B397 is not set
881# CONFIG_SENSORS_VT1211 is not set 805# CONFIG_SENSORS_VT1211 is not set
806# CONFIG_SENSORS_W83627HF is not set
882# CONFIG_HWMON_DEBUG_CHIP is not set 807# CONFIG_HWMON_DEBUG_CHIP is not set
883 808
884# 809#
@@ -890,17 +815,20 @@ CONFIG_HWMON=y
890# Multimedia devices 815# Multimedia devices
891# 816#
892# CONFIG_VIDEO_DEV is not set 817# CONFIG_VIDEO_DEV is not set
893 818# CONFIG_DVB_CORE is not set
894# 819CONFIG_DAB=y
895# Digital Video Broadcasting Devices
896#
897# CONFIG_DVB is not set
898# CONFIG_USB_DABUSB is not set 820# CONFIG_USB_DABUSB is not set
899 821
900# 822#
901# Graphics support 823# Graphics support
902# 824#
903# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 825# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
826
827#
828# Display device support
829#
830# CONFIG_DISPLAY_SUPPORT is not set
831# CONFIG_VGASTATE is not set
904# CONFIG_FB is not set 832# CONFIG_FB is not set
905 833
906# 834#
@@ -1014,9 +942,10 @@ CONFIG_SND_FM801=m
1014# USB devices 942# USB devices
1015# 943#
1016# CONFIG_SND_USB_AUDIO is not set 944# CONFIG_SND_USB_AUDIO is not set
945# CONFIG_SND_USB_CAIAQ is not set
1017 946
1018# 947#
1019# SoC audio support 948# System on Chip audio support
1020# 949#
1021# CONFIG_SND_SOC is not set 950# CONFIG_SND_SOC is not set
1022 951
@@ -1025,16 +954,24 @@ CONFIG_SND_FM801=m
1025# 954#
1026# CONFIG_SOUND_PRIME is not set 955# CONFIG_SOUND_PRIME is not set
1027CONFIG_AC97_BUS=m 956CONFIG_AC97_BUS=m
957CONFIG_HID_SUPPORT=y
958CONFIG_HID=y
959# CONFIG_HID_DEBUG is not set
1028 960
1029# 961#
1030# HID Devices 962# USB Input Devices
1031# 963#
1032CONFIG_HID=y 964CONFIG_USB_HID=m
1033# CONFIG_HID_DEBUG is not set 965# CONFIG_USB_HIDINPUT_POWERBOOK is not set
966# CONFIG_HID_FF is not set
967# CONFIG_USB_HIDDEV is not set
1034 968
1035# 969#
1036# USB support 970# USB HID Boot Protocol drivers
1037# 971#
972# CONFIG_USB_KBD is not set
973# CONFIG_USB_MOUSE is not set
974CONFIG_USB_SUPPORT=y
1038CONFIG_USB_ARCH_HAS_HCD=y 975CONFIG_USB_ARCH_HAS_HCD=y
1039CONFIG_USB_ARCH_HAS_OHCI=y 976CONFIG_USB_ARCH_HAS_OHCI=y
1040CONFIG_USB_ARCH_HAS_EHCI=y 977CONFIG_USB_ARCH_HAS_EHCI=y
@@ -1045,8 +982,10 @@ CONFIG_USB=m
1045# Miscellaneous USB options 982# Miscellaneous USB options
1046# 983#
1047CONFIG_USB_DEVICEFS=y 984CONFIG_USB_DEVICEFS=y
985CONFIG_USB_DEVICE_CLASS=y
1048# CONFIG_USB_DYNAMIC_MINORS is not set 986# CONFIG_USB_DYNAMIC_MINORS is not set
1049# CONFIG_USB_SUSPEND is not set 987# CONFIG_USB_SUSPEND is not set
988# CONFIG_USB_PERSIST is not set
1050# CONFIG_USB_OTG is not set 989# CONFIG_USB_OTG is not set
1051 990
1052# 991#
@@ -1056,7 +995,6 @@ CONFIG_USB_EHCI_HCD=m
1056# CONFIG_USB_EHCI_SPLIT_ISO is not set 995# CONFIG_USB_EHCI_SPLIT_ISO is not set
1057# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 996# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1058# CONFIG_USB_EHCI_TT_NEWSCHED is not set 997# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1059# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1060# CONFIG_USB_ISP116X_HCD is not set 998# CONFIG_USB_ISP116X_HCD is not set
1061CONFIG_USB_OHCI_HCD=m 999CONFIG_USB_OHCI_HCD=m
1062# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1000# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -1064,6 +1002,7 @@ CONFIG_USB_OHCI_HCD=m
1064CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1002CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1065CONFIG_USB_UHCI_HCD=m 1003CONFIG_USB_UHCI_HCD=m
1066# CONFIG_USB_SL811_HCD is not set 1004# CONFIG_USB_SL811_HCD is not set
1005# CONFIG_USB_R8A66597_HCD is not set
1067 1006
1068# 1007#
1069# USB Device Class drivers 1008# USB Device Class drivers
@@ -1093,47 +1032,10 @@ CONFIG_USB_STORAGE=m
1093# CONFIG_USB_LIBUSUAL is not set 1032# CONFIG_USB_LIBUSUAL is not set
1094 1033
1095# 1034#
1096# USB Input Devices
1097#
1098CONFIG_USB_HID=m
1099# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1100# CONFIG_HID_FF is not set
1101# CONFIG_USB_HIDDEV is not set
1102
1103#
1104# USB HID Boot Protocol drivers
1105#
1106# CONFIG_USB_KBD is not set
1107# CONFIG_USB_MOUSE is not set
1108# CONFIG_USB_AIPTEK is not set
1109# CONFIG_USB_WACOM is not set
1110# CONFIG_USB_ACECAD is not set
1111# CONFIG_USB_KBTAB is not set
1112# CONFIG_USB_POWERMATE is not set
1113# CONFIG_USB_TOUCHSCREEN is not set
1114# CONFIG_USB_YEALINK is not set
1115# CONFIG_USB_XPAD is not set
1116# CONFIG_USB_ATI_REMOTE is not set
1117# CONFIG_USB_ATI_REMOTE2 is not set
1118# CONFIG_USB_KEYSPAN_REMOTE is not set
1119# CONFIG_USB_APPLETOUCH is not set
1120# CONFIG_USB_GTCO is not set
1121
1122#
1123# USB Imaging devices 1035# USB Imaging devices
1124# 1036#
1125# CONFIG_USB_MDC800 is not set 1037# CONFIG_USB_MDC800 is not set
1126# CONFIG_USB_MICROTEK is not set 1038# CONFIG_USB_MICROTEK is not set
1127
1128#
1129# USB Network Adapters
1130#
1131# CONFIG_USB_CATC is not set
1132# CONFIG_USB_KAWETH is not set
1133# CONFIG_USB_PEGASUS is not set
1134# CONFIG_USB_RTL8150 is not set
1135# CONFIG_USB_USBNET_MII is not set
1136# CONFIG_USB_USBNET is not set
1137CONFIG_USB_MON=y 1039CONFIG_USB_MON=y
1138 1040
1139# 1041#
@@ -1177,10 +1079,6 @@ CONFIG_USB_MON=y
1177# USB Gadget Support 1079# USB Gadget Support
1178# 1080#
1179# CONFIG_USB_GADGET is not set 1081# CONFIG_USB_GADGET is not set
1180
1181#
1182# MMC/SD Card support
1183#
1184# CONFIG_MMC is not set 1082# CONFIG_MMC is not set
1185 1083
1186# 1084#
@@ -1195,10 +1093,6 @@ CONFIG_USB_MON=y
1195# 1093#
1196# LED Triggers 1094# LED Triggers
1197# 1095#
1198
1199#
1200# InfiniBand support
1201#
1202CONFIG_INFINIBAND=m 1096CONFIG_INFINIBAND=m
1203# CONFIG_INFINIBAND_USER_MAD is not set 1097# CONFIG_INFINIBAND_USER_MAD is not set
1204# CONFIG_INFINIBAND_USER_ACCESS is not set 1098# CONFIG_INFINIBAND_USER_ACCESS is not set
@@ -1206,6 +1100,7 @@ CONFIG_INFINIBAND_ADDR_TRANS=y
1206CONFIG_INFINIBAND_MTHCA=m 1100CONFIG_INFINIBAND_MTHCA=m
1207CONFIG_INFINIBAND_MTHCA_DEBUG=y 1101CONFIG_INFINIBAND_MTHCA_DEBUG=y
1208# CONFIG_INFINIBAND_AMSO1100 is not set 1102# CONFIG_INFINIBAND_AMSO1100 is not set
1103# CONFIG_MLX4_INFINIBAND is not set
1209CONFIG_INFINIBAND_IPOIB=m 1104CONFIG_INFINIBAND_IPOIB=m
1210# CONFIG_INFINIBAND_IPOIB_CM is not set 1105# CONFIG_INFINIBAND_IPOIB_CM is not set
1211CONFIG_INFINIBAND_IPOIB_DEBUG=y 1106CONFIG_INFINIBAND_IPOIB_DEBUG=y
@@ -1214,10 +1109,6 @@ CONFIG_INFINIBAND_IPOIB_DEBUG=y
1214# CONFIG_INFINIBAND_ISER is not set 1109# CONFIG_INFINIBAND_ISER is not set
1215 1110
1216# 1111#
1217# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1218#
1219
1220#
1221# Real Time Clock 1112# Real Time Clock
1222# 1113#
1223# CONFIG_RTC_CLASS is not set 1114# CONFIG_RTC_CLASS is not set
@@ -1236,12 +1127,9 @@ CONFIG_INFINIBAND_IPOIB_DEBUG=y
1236# 1127#
1237 1128
1238# 1129#
1239# Auxiliary Display support 1130# Userspace I/O
1240#
1241
1242#
1243# Virtualization
1244# 1131#
1132# CONFIG_UIO is not set
1245# CONFIG_MSPEC is not set 1133# CONFIG_MSPEC is not set
1246 1134
1247# 1135#
@@ -1357,7 +1245,8 @@ CONFIG_EXPORTFS=m
1357CONFIG_NFS_COMMON=y 1245CONFIG_NFS_COMMON=y
1358CONFIG_SUNRPC=m 1246CONFIG_SUNRPC=m
1359CONFIG_SUNRPC_GSS=m 1247CONFIG_SUNRPC_GSS=m
1360CONFIG_RPCSEC_GSS_KRB5=m 1248# CONFIG_SUNRPC_BIND34 is not set
1249CONFIG_RPCSEC_GSS_KRB5=y
1361# CONFIG_RPCSEC_GSS_SPKM3 is not set 1250# CONFIG_RPCSEC_GSS_SPKM3 is not set
1362CONFIG_SMB_FS=m 1251CONFIG_SMB_FS=m
1363CONFIG_SMB_NLS_DEFAULT=y 1252CONFIG_SMB_NLS_DEFAULT=y
@@ -1371,7 +1260,6 @@ CONFIG_CIFS=m
1371# CONFIG_NCP_FS is not set 1260# CONFIG_NCP_FS is not set
1372# CONFIG_CODA_FS is not set 1261# CONFIG_CODA_FS is not set
1373# CONFIG_AFS_FS is not set 1262# CONFIG_AFS_FS is not set
1374# CONFIG_9P_FS is not set
1375 1263
1376# 1264#
1377# Partition Types 1265# Partition Types
@@ -1393,6 +1281,7 @@ CONFIG_SGI_PARTITION=y
1393# CONFIG_SUN_PARTITION is not set 1281# CONFIG_SUN_PARTITION is not set
1394# CONFIG_KARMA_PARTITION is not set 1282# CONFIG_KARMA_PARTITION is not set
1395CONFIG_EFI_PARTITION=y 1283CONFIG_EFI_PARTITION=y
1284# CONFIG_SYSV68_PARTITION is not set
1396 1285
1397# 1286#
1398# Native Language Support 1287# Native Language Support
@@ -1449,11 +1338,14 @@ CONFIG_NLS_UTF8=m
1449CONFIG_BITREVERSE=y 1338CONFIG_BITREVERSE=y
1450# CONFIG_CRC_CCITT is not set 1339# CONFIG_CRC_CCITT is not set
1451# CONFIG_CRC16 is not set 1340# CONFIG_CRC16 is not set
1341# CONFIG_CRC_ITU_T is not set
1452CONFIG_CRC32=y 1342CONFIG_CRC32=y
1343# CONFIG_CRC7 is not set
1453# CONFIG_LIBCRC32C is not set 1344# CONFIG_LIBCRC32C is not set
1454CONFIG_PLIST=y 1345CONFIG_PLIST=y
1455CONFIG_HAS_IOMEM=y 1346CONFIG_HAS_IOMEM=y
1456CONFIG_HAS_IOPORT=y 1347CONFIG_HAS_IOPORT=y
1348CONFIG_HAS_DMA=y
1457CONFIG_GENERIC_HARDIRQS=y 1349CONFIG_GENERIC_HARDIRQS=y
1458CONFIG_GENERIC_IRQ_PROBE=y 1350CONFIG_GENERIC_IRQ_PROBE=y
1459CONFIG_GENERIC_PENDING_IRQ=y 1351CONFIG_GENERIC_PENDING_IRQ=y
@@ -1483,8 +1375,8 @@ CONFIG_MAGIC_SYSRQ=y
1483# CONFIG_HEADERS_CHECK is not set 1375# CONFIG_HEADERS_CHECK is not set
1484CONFIG_DEBUG_KERNEL=y 1376CONFIG_DEBUG_KERNEL=y
1485# CONFIG_DEBUG_SHIRQ is not set 1377# CONFIG_DEBUG_SHIRQ is not set
1486CONFIG_LOG_BUF_SHIFT=20
1487CONFIG_DETECT_SOFTLOCKUP=y 1378CONFIG_DETECT_SOFTLOCKUP=y
1379CONFIG_SCHED_DEBUG=y
1488# CONFIG_SCHEDSTATS is not set 1380# CONFIG_SCHEDSTATS is not set
1489# CONFIG_TIMER_STATS is not set 1381# CONFIG_TIMER_STATS is not set
1490# CONFIG_DEBUG_SLAB is not set 1382# CONFIG_DEBUG_SLAB is not set
@@ -1514,10 +1406,6 @@ CONFIG_SYSVIPC_COMPAT=y
1514# 1406#
1515# CONFIG_KEYS is not set 1407# CONFIG_KEYS is not set
1516# CONFIG_SECURITY is not set 1408# CONFIG_SECURITY is not set
1517
1518#
1519# Cryptographic options
1520#
1521CONFIG_CRYPTO=y 1409CONFIG_CRYPTO=y
1522CONFIG_CRYPTO_ALGAPI=y 1410CONFIG_CRYPTO_ALGAPI=y
1523CONFIG_CRYPTO_BLKCIPHER=m 1411CONFIG_CRYPTO_BLKCIPHER=m
@@ -1537,6 +1425,7 @@ CONFIG_CRYPTO_ECB=m
1537CONFIG_CRYPTO_CBC=m 1425CONFIG_CRYPTO_CBC=m
1538CONFIG_CRYPTO_PCBC=m 1426CONFIG_CRYPTO_PCBC=m
1539# CONFIG_CRYPTO_LRW is not set 1427# CONFIG_CRYPTO_LRW is not set
1428# CONFIG_CRYPTO_CRYPTD is not set
1540CONFIG_CRYPTO_DES=m 1429CONFIG_CRYPTO_DES=m
1541# CONFIG_CRYPTO_FCRYPT is not set 1430# CONFIG_CRYPTO_FCRYPT is not set
1542# CONFIG_CRYPTO_BLOWFISH is not set 1431# CONFIG_CRYPTO_BLOWFISH is not set
@@ -1554,7 +1443,4 @@ CONFIG_CRYPTO_DES=m
1554# CONFIG_CRYPTO_CRC32C is not set 1443# CONFIG_CRYPTO_CRC32C is not set
1555# CONFIG_CRYPTO_CAMELLIA is not set 1444# CONFIG_CRYPTO_CAMELLIA is not set
1556# CONFIG_CRYPTO_TEST is not set 1445# CONFIG_CRYPTO_TEST is not set
1557 1446CONFIG_CRYPTO_HW=y
1558#
1559# Hardware crypto devices
1560#
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index c1dca226b479..cd4adf52f174 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -34,6 +34,7 @@
34#include <linux/efi.h> 34#include <linux/efi.h>
35#include <linux/nodemask.h> 35#include <linux/nodemask.h>
36#include <linux/bitops.h> /* hweight64() */ 36#include <linux/bitops.h> /* hweight64() */
37#include <linux/crash_dump.h>
37 38
38#include <asm/delay.h> /* ia64_get_itc() */ 39#include <asm/delay.h> /* ia64_get_itc() */
39#include <asm/io.h> 40#include <asm/io.h>
@@ -43,6 +44,8 @@
43 44
44#include <asm/acpi-ext.h> 45#include <asm/acpi-ext.h>
45 46
47extern int swiotlb_late_init_with_default_size (size_t size);
48
46#define PFX "IOC: " 49#define PFX "IOC: "
47 50
48/* 51/*
@@ -2026,11 +2029,24 @@ sba_init(void)
2026 if (!ia64_platform_is("hpzx1") && !ia64_platform_is("hpzx1_swiotlb")) 2029 if (!ia64_platform_is("hpzx1") && !ia64_platform_is("hpzx1_swiotlb"))
2027 return 0; 2030 return 0;
2028 2031
2032#if defined(CONFIG_IA64_GENERIC) && defined(CONFIG_CRASH_DUMP)
2033 /* If we are booting a kdump kernel, the sba_iommu will
2034 * cause devices that were not shutdown properly to MCA
2035 * as soon as they are turned back on. Our only option for
2036 * a successful kdump kernel boot is to use the swiotlb.
2037 */
2038 if (elfcorehdr_addr < ELFCORE_ADDR_MAX) {
2039 if (swiotlb_late_init_with_default_size(64 * (1<<20)) != 0)
2040 panic("Unable to initialize software I/O TLB:"
2041 " Try machvec=dig boot option");
2042 machvec_init("dig");
2043 return 0;
2044 }
2045#endif
2046
2029 acpi_bus_register_driver(&acpi_sba_ioc_driver); 2047 acpi_bus_register_driver(&acpi_sba_ioc_driver);
2030 if (!ioc_list) { 2048 if (!ioc_list) {
2031#ifdef CONFIG_IA64_GENERIC 2049#ifdef CONFIG_IA64_GENERIC
2032 extern int swiotlb_late_init_with_default_size (size_t size);
2033
2034 /* 2050 /*
2035 * If we didn't find something sba_iommu can claim, we 2051 * If we didn't find something sba_iommu can claim, we
2036 * need to setup the swiotlb and switch to the dig machvec. 2052 * need to setup the swiotlb and switch to the dig machvec.
diff --git a/arch/ia64/hp/sim/boot/fw-emu.c b/arch/ia64/hp/sim/boot/fw-emu.c
index 300acd913d9c..1189d035d316 100644
--- a/arch/ia64/hp/sim/boot/fw-emu.c
+++ b/arch/ia64/hp/sim/boot/fw-emu.c
@@ -329,11 +329,6 @@ sys_fw_init (const char *args, int arglen)
329 strcpy(sal_systab->product_id, "HP-simulator"); 329 strcpy(sal_systab->product_id, "HP-simulator");
330#endif 330#endif
331 331
332#ifdef CONFIG_IA64_SDV
333 strcpy(sal_systab->oem_id, "Intel");
334 strcpy(sal_systab->product_id, "SDV");
335#endif
336
337 /* fill in an entry point: */ 332 /* fill in an entry point: */
338 sal_ed->type = SAL_DESC_ENTRY_POINT; 333 sal_ed->type = SAL_DESC_ENTRY_POINT;
339 sal_ed->pal_proc = __pa(pal_desc[0]); 334 sal_ed->pal_proc = __pa(pal_desc[0]);
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index 324ea7565e2c..ef252df50e1e 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -36,10 +36,6 @@
36#include <asm/hw_irq.h> 36#include <asm/hw_irq.h>
37#include <asm/uaccess.h> 37#include <asm/uaccess.h>
38 38
39#ifdef CONFIG_KDB
40# include <linux/kdb.h>
41#endif
42
43#undef SIMSERIAL_DEBUG /* define this to get some debug information */ 39#undef SIMSERIAL_DEBUG /* define this to get some debug information */
44 40
45#define KEYBOARD_INTR 3 /* must match with simulator! */ 41#define KEYBOARD_INTR 3 /* must match with simulator! */
diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c
index c05bda662364..1cfab326fb7e 100644
--- a/arch/ia64/ia32/binfmt_elf32.c
+++ b/arch/ia64/ia32/binfmt_elf32.c
@@ -195,62 +195,27 @@ ia64_elf32_init (struct pt_regs *regs)
195 ia32_load_state(current); 195 ia32_load_state(current);
196} 196}
197 197
198/*
199 * Undo the override of setup_arg_pages() without this ia32_setup_arg_pages()
200 * will suffer infinite self recursion.
201 */
202#undef setup_arg_pages
203
198int 204int
199ia32_setup_arg_pages (struct linux_binprm *bprm, int executable_stack) 205ia32_setup_arg_pages (struct linux_binprm *bprm, int executable_stack)
200{ 206{
201 unsigned long stack_base; 207 int ret;
202 struct vm_area_struct *mpnt; 208
203 struct mm_struct *mm = current->mm; 209 ret = setup_arg_pages(bprm, IA32_STACK_TOP, executable_stack);
204 int i, ret; 210 if (!ret) {
205 211 /*
206 stack_base = IA32_STACK_TOP - MAX_ARG_PAGES*PAGE_SIZE; 212 * Can't do it in ia64_elf32_init(). Needs to be done before
207 mm->arg_start = bprm->p + stack_base; 213 * calls to elf32_map()
208 214 */
209 bprm->p += stack_base; 215 current->thread.ppl = ia32_init_pp_list();
210 if (bprm->loader)
211 bprm->loader += stack_base;
212 bprm->exec += stack_base;
213
214 mpnt = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
215 if (!mpnt)
216 return -ENOMEM;
217
218 down_write(&current->mm->mmap_sem);
219 {
220 mpnt->vm_mm = current->mm;
221 mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p;
222 mpnt->vm_end = IA32_STACK_TOP;
223 if (executable_stack == EXSTACK_ENABLE_X)
224 mpnt->vm_flags = VM_STACK_FLAGS | VM_EXEC;
225 else if (executable_stack == EXSTACK_DISABLE_X)
226 mpnt->vm_flags = VM_STACK_FLAGS & ~VM_EXEC;
227 else
228 mpnt->vm_flags = VM_STACK_FLAGS;
229 mpnt->vm_page_prot = (mpnt->vm_flags & VM_EXEC)?
230 PAGE_COPY_EXEC: PAGE_COPY;
231 if ((ret = insert_vm_struct(current->mm, mpnt))) {
232 up_write(&current->mm->mmap_sem);
233 kmem_cache_free(vm_area_cachep, mpnt);
234 return ret;
235 }
236 current->mm->stack_vm = current->mm->total_vm = vma_pages(mpnt);
237 } 216 }
238 217
239 for (i = 0 ; i < MAX_ARG_PAGES ; i++) { 218 return ret;
240 struct page *page = bprm->page[i];
241 if (page) {
242 bprm->page[i] = NULL;
243 install_arg_page(mpnt, page, stack_base);
244 }
245 stack_base += PAGE_SIZE;
246 }
247 up_write(&current->mm->mmap_sem);
248
249 /* Can't do it in ia64_elf32_init(). Needs to be done before calls to
250 elf32_map() */
251 current->thread.ppl = ia32_init_pp_list();
252
253 return 0;
254} 219}
255 220
256static void 221static void
diff --git a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S
index 99b665e2b1d5..06efd1f9b800 100644
--- a/arch/ia64/ia32/ia32_entry.S
+++ b/arch/ia64/ia32/ia32_entry.S
@@ -304,7 +304,7 @@ ia32_syscall_table:
304 data8 sys_ni_syscall /* init_module */ 304 data8 sys_ni_syscall /* init_module */
305 data8 sys_ni_syscall /* delete_module */ 305 data8 sys_ni_syscall /* delete_module */
306 data8 sys_ni_syscall /* get_kernel_syms */ /* 130 */ 306 data8 sys_ni_syscall /* get_kernel_syms */ /* 130 */
307 data8 sys_quotactl 307 data8 sys32_quotactl
308 data8 sys_getpgid 308 data8 sys_getpgid
309 data8 sys_fchdir 309 data8 sys_fchdir
310 data8 sys_ni_syscall /* sys_bdflush */ 310 data8 sys_ni_syscall /* sys_bdflush */
diff --git a/arch/ia64/ia32/ia32_support.c b/arch/ia64/ia32/ia32_support.c
index beea7a0b9dc6..e13a1a1db4b5 100644
--- a/arch/ia64/ia32/ia32_support.c
+++ b/arch/ia64/ia32/ia32_support.c
@@ -253,7 +253,7 @@ ia32_init (void)
253 253
254 partial_page_cachep = kmem_cache_create("partial_page_cache", 254 partial_page_cachep = kmem_cache_create("partial_page_cache",
255 sizeof(struct partial_page), 255 sizeof(struct partial_page),
256 0, SLAB_PANIC, NULL, NULL); 256 0, SLAB_PANIC, NULL);
257 } 257 }
258#endif 258#endif
259 return 0; 259 return 0;
diff --git a/arch/ia64/kernel/asm-offsets.c b/arch/ia64/kernel/asm-offsets.c
index 2236fabbb3c6..0aebc6f79e95 100644
--- a/arch/ia64/kernel/asm-offsets.c
+++ b/arch/ia64/kernel/asm-offsets.c
@@ -7,6 +7,7 @@
7#define ASM_OFFSETS_C 1 7#define ASM_OFFSETS_C 1
8 8
9#include <linux/sched.h> 9#include <linux/sched.h>
10#include <linux/clocksource.h>
10 11
11#include <asm-ia64/processor.h> 12#include <asm-ia64/processor.h>
12#include <asm-ia64/ptrace.h> 13#include <asm-ia64/ptrace.h>
@@ -15,6 +16,7 @@
15#include <asm-ia64/mca.h> 16#include <asm-ia64/mca.h>
16 17
17#include "../kernel/sigframe.h" 18#include "../kernel/sigframe.h"
19#include "../kernel/fsyscall_gtod_data.h"
18 20
19#define DEFINE(sym, val) \ 21#define DEFINE(sym, val) \
20 asm volatile("\n->" #sym " %0 " #val : : "i" (val)) 22 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
@@ -256,17 +258,24 @@ void foo(void)
256 BLANK(); 258 BLANK();
257 259
258 /* used by fsys_gettimeofday in arch/ia64/kernel/fsys.S */ 260 /* used by fsys_gettimeofday in arch/ia64/kernel/fsys.S */
259 DEFINE(IA64_TIME_INTERPOLATOR_ADDRESS_OFFSET, offsetof (struct time_interpolator, addr)); 261 DEFINE(IA64_GTOD_LOCK_OFFSET,
260 DEFINE(IA64_TIME_INTERPOLATOR_SOURCE_OFFSET, offsetof (struct time_interpolator, source)); 262 offsetof (struct fsyscall_gtod_data_t, lock));
261 DEFINE(IA64_TIME_INTERPOLATOR_SHIFT_OFFSET, offsetof (struct time_interpolator, shift)); 263 DEFINE(IA64_GTOD_WALL_TIME_OFFSET,
262 DEFINE(IA64_TIME_INTERPOLATOR_NSEC_OFFSET, offsetof (struct time_interpolator, nsec_per_cyc)); 264 offsetof (struct fsyscall_gtod_data_t, wall_time));
263 DEFINE(IA64_TIME_INTERPOLATOR_OFFSET_OFFSET, offsetof (struct time_interpolator, offset)); 265 DEFINE(IA64_GTOD_MONO_TIME_OFFSET,
264 DEFINE(IA64_TIME_INTERPOLATOR_LAST_CYCLE_OFFSET, offsetof (struct time_interpolator, last_cycle)); 266 offsetof (struct fsyscall_gtod_data_t, monotonic_time));
265 DEFINE(IA64_TIME_INTERPOLATOR_LAST_COUNTER_OFFSET, offsetof (struct time_interpolator, last_counter)); 267 DEFINE(IA64_CLKSRC_MASK_OFFSET,
266 DEFINE(IA64_TIME_INTERPOLATOR_JITTER_OFFSET, offsetof (struct time_interpolator, jitter)); 268 offsetof (struct fsyscall_gtod_data_t, clk_mask));
267 DEFINE(IA64_TIME_INTERPOLATOR_MASK_OFFSET, offsetof (struct time_interpolator, mask)); 269 DEFINE(IA64_CLKSRC_MULT_OFFSET,
268 DEFINE(IA64_TIME_SOURCE_CPU, TIME_SOURCE_CPU); 270 offsetof (struct fsyscall_gtod_data_t, clk_mult));
269 DEFINE(IA64_TIME_SOURCE_MMIO64, TIME_SOURCE_MMIO64); 271 DEFINE(IA64_CLKSRC_SHIFT_OFFSET,
270 DEFINE(IA64_TIME_SOURCE_MMIO32, TIME_SOURCE_MMIO32); 272 offsetof (struct fsyscall_gtod_data_t, clk_shift));
271 DEFINE(IA64_TIMESPEC_TV_NSEC_OFFSET, offsetof (struct timespec, tv_nsec)); 273 DEFINE(IA64_CLKSRC_MMIO_OFFSET,
274 offsetof (struct fsyscall_gtod_data_t, clk_fsys_mmio));
275 DEFINE(IA64_CLKSRC_CYCLE_LAST_OFFSET,
276 offsetof (struct fsyscall_gtod_data_t, clk_cycle_last));
277 DEFINE(IA64_ITC_JITTER_OFFSET,
278 offsetof (struct itc_jitter_data_t, itc_jitter));
279 DEFINE(IA64_ITC_LASTCYCLE_OFFSET,
280 offsetof (struct itc_jitter_data_t, itc_lastcycle));
272} 281}
diff --git a/arch/ia64/kernel/cyclone.c b/arch/ia64/kernel/cyclone.c
index e00b21514f7c..2fd96d9062a1 100644
--- a/arch/ia64/kernel/cyclone.c
+++ b/arch/ia64/kernel/cyclone.c
@@ -3,6 +3,7 @@
3#include <linux/time.h> 3#include <linux/time.h>
4#include <linux/errno.h> 4#include <linux/errno.h>
5#include <linux/timex.h> 5#include <linux/timex.h>
6#include <linux/clocksource.h>
6#include <asm/io.h> 7#include <asm/io.h>
7 8
8/* IBM Summit (EXA) Cyclone counter code*/ 9/* IBM Summit (EXA) Cyclone counter code*/
@@ -18,13 +19,21 @@ void __init cyclone_setup(void)
18 use_cyclone = 1; 19 use_cyclone = 1;
19} 20}
20 21
22static void __iomem *cyclone_mc;
21 23
22struct time_interpolator cyclone_interpolator = { 24static cycle_t read_cyclone(void)
23 .source = TIME_SOURCE_MMIO64, 25{
24 .shift = 16, 26 return (cycle_t)readq((void __iomem *)cyclone_mc);
25 .frequency = CYCLONE_TIMER_FREQ, 27}
26 .drift = -100, 28
27 .mask = (1LL << 40) - 1 29static struct clocksource clocksource_cyclone = {
30 .name = "cyclone",
31 .rating = 300,
32 .read = read_cyclone,
33 .mask = (1LL << 40) - 1,
34 .mult = 0, /*to be caluclated*/
35 .shift = 16,
36 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
28}; 37};
29 38
30int __init init_cyclone_clock(void) 39int __init init_cyclone_clock(void)
@@ -44,13 +53,15 @@ int __init init_cyclone_clock(void)
44 offset = (CYCLONE_CBAR_ADDR); 53 offset = (CYCLONE_CBAR_ADDR);
45 reg = (u64*)ioremap_nocache(offset, sizeof(u64)); 54 reg = (u64*)ioremap_nocache(offset, sizeof(u64));
46 if(!reg){ 55 if(!reg){
47 printk(KERN_ERR "Summit chipset: Could not find valid CBAR register.\n"); 56 printk(KERN_ERR "Summit chipset: Could not find valid CBAR"
57 " register.\n");
48 use_cyclone = 0; 58 use_cyclone = 0;
49 return -ENODEV; 59 return -ENODEV;
50 } 60 }
51 base = readq(reg); 61 base = readq(reg);
52 if(!base){ 62 if(!base){
53 printk(KERN_ERR "Summit chipset: Could not find valid CBAR value.\n"); 63 printk(KERN_ERR "Summit chipset: Could not find valid CBAR"
64 " value.\n");
54 use_cyclone = 0; 65 use_cyclone = 0;
55 return -ENODEV; 66 return -ENODEV;
56 } 67 }
@@ -60,7 +71,8 @@ int __init init_cyclone_clock(void)
60 offset = (base + CYCLONE_PMCC_OFFSET); 71 offset = (base + CYCLONE_PMCC_OFFSET);
61 reg = (u64*)ioremap_nocache(offset, sizeof(u64)); 72 reg = (u64*)ioremap_nocache(offset, sizeof(u64));
62 if(!reg){ 73 if(!reg){
63 printk(KERN_ERR "Summit chipset: Could not find valid PMCC register.\n"); 74 printk(KERN_ERR "Summit chipset: Could not find valid PMCC"
75 " register.\n");
64 use_cyclone = 0; 76 use_cyclone = 0;
65 return -ENODEV; 77 return -ENODEV;
66 } 78 }
@@ -71,7 +83,8 @@ int __init init_cyclone_clock(void)
71 offset = (base + CYCLONE_MPCS_OFFSET); 83 offset = (base + CYCLONE_MPCS_OFFSET);
72 reg = (u64*)ioremap_nocache(offset, sizeof(u64)); 84 reg = (u64*)ioremap_nocache(offset, sizeof(u64));
73 if(!reg){ 85 if(!reg){
74 printk(KERN_ERR "Summit chipset: Could not find valid MPCS register.\n"); 86 printk(KERN_ERR "Summit chipset: Could not find valid MPCS"
87 " register.\n");
75 use_cyclone = 0; 88 use_cyclone = 0;
76 return -ENODEV; 89 return -ENODEV;
77 } 90 }
@@ -82,7 +95,8 @@ int __init init_cyclone_clock(void)
82 offset = (base + CYCLONE_MPMC_OFFSET); 95 offset = (base + CYCLONE_MPMC_OFFSET);
83 cyclone_timer = (u32*)ioremap_nocache(offset, sizeof(u32)); 96 cyclone_timer = (u32*)ioremap_nocache(offset, sizeof(u32));
84 if(!cyclone_timer){ 97 if(!cyclone_timer){
85 printk(KERN_ERR "Summit chipset: Could not find valid MPMC register.\n"); 98 printk(KERN_ERR "Summit chipset: Could not find valid MPMC"
99 " register.\n");
86 use_cyclone = 0; 100 use_cyclone = 0;
87 return -ENODEV; 101 return -ENODEV;
88 } 102 }
@@ -93,7 +107,8 @@ int __init init_cyclone_clock(void)
93 int stall = 100; 107 int stall = 100;
94 while(stall--) barrier(); 108 while(stall--) barrier();
95 if(readl(cyclone_timer) == old){ 109 if(readl(cyclone_timer) == old){
96 printk(KERN_ERR "Summit chipset: Counter not counting! DISABLED\n"); 110 printk(KERN_ERR "Summit chipset: Counter not counting!"
111 " DISABLED\n");
97 iounmap(cyclone_timer); 112 iounmap(cyclone_timer);
98 cyclone_timer = 0; 113 cyclone_timer = 0;
99 use_cyclone = 0; 114 use_cyclone = 0;
@@ -101,8 +116,11 @@ int __init init_cyclone_clock(void)
101 } 116 }
102 } 117 }
103 /* initialize last tick */ 118 /* initialize last tick */
104 cyclone_interpolator.addr = cyclone_timer; 119 cyclone_mc = cyclone_timer;
105 register_time_interpolator(&cyclone_interpolator); 120 clocksource_cyclone.fsys_mmio = cyclone_timer;
121 clocksource_cyclone.mult = clocksource_hz2mult(CYCLONE_TIMER_FREQ,
122 clocksource_cyclone.shift);
123 clocksource_register(&clocksource_cyclone);
106 124
107 return 0; 125 return 0;
108} 126}
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 75ec3478d8a2..73ca86d03810 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -28,6 +28,7 @@
28#include <linux/time.h> 28#include <linux/time.h>
29#include <linux/efi.h> 29#include <linux/efi.h>
30#include <linux/kexec.h> 30#include <linux/kexec.h>
31#include <linux/mm.h>
31 32
32#include <asm/io.h> 33#include <asm/io.h>
33#include <asm/kregs.h> 34#include <asm/kregs.h>
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index 95f517515235..c36f43c94600 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1581,7 +1581,7 @@ sys_call_table:
1581 data8 sys_sync_file_range // 1300 1581 data8 sys_sync_file_range // 1300
1582 data8 sys_tee 1582 data8 sys_tee
1583 data8 sys_vmsplice 1583 data8 sys_vmsplice
1584 data8 sys_ni_syscall // reserved for move_pages 1584 data8 sys_fallocate
1585 data8 sys_getcpu 1585 data8 sys_getcpu
1586 data8 sys_epoll_pwait // 1305 1586 data8 sys_epoll_pwait // 1305
1587 data8 sys_utimensat 1587 data8 sys_utimensat
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S
index 8589e84a27c6..44841971f077 100644
--- a/arch/ia64/kernel/fsys.S
+++ b/arch/ia64/kernel/fsys.S
@@ -147,12 +147,11 @@ ENTRY(fsys_set_tid_address)
147 FSYS_RETURN 147 FSYS_RETURN
148END(fsys_set_tid_address) 148END(fsys_set_tid_address)
149 149
150/* 150#if IA64_GTOD_LOCK_OFFSET !=0
151 * Ensure that the time interpolator structure is compatible with the asm code 151#error fsys_gettimeofday incompatible with changes to struct fsyscall_gtod_data_t
152 */ 152#endif
153#if IA64_TIME_INTERPOLATOR_SOURCE_OFFSET !=0 || IA64_TIME_INTERPOLATOR_SHIFT_OFFSET != 2 \ 153#if IA64_ITC_JITTER_OFFSET !=0
154 || IA64_TIME_INTERPOLATOR_JITTER_OFFSET != 3 || IA64_TIME_INTERPOLATOR_NSEC_OFFSET != 4 154#error fsys_gettimeofday incompatible with changes to struct itc_jitter_data_t
155#error fsys_gettimeofday incompatible with changes to struct time_interpolator
156#endif 155#endif
157#define CLOCK_REALTIME 0 156#define CLOCK_REALTIME 0
158#define CLOCK_MONOTONIC 1 157#define CLOCK_MONOTONIC 1
@@ -179,124 +178,124 @@ ENTRY(fsys_gettimeofday)
179 // r11 = preserved: saved ar.pfs 178 // r11 = preserved: saved ar.pfs
180 // r12 = preserved: memory stack 179 // r12 = preserved: memory stack
181 // r13 = preserved: thread pointer 180 // r13 = preserved: thread pointer
182 // r14 = address of mask / mask 181 // r14 = address of mask / mask value
183 // r15 = preserved: system call number 182 // r15 = preserved: system call number
184 // r16 = preserved: current task pointer 183 // r16 = preserved: current task pointer
185 // r17 = wall to monotonic use 184 // r17 = (not used)
186 // r18 = time_interpolator->offset 185 // r18 = (not used)
187 // r19 = address of wall_to_monotonic 186 // r19 = address of itc_lastcycle
188 // r20 = pointer to struct time_interpolator / pointer to time_interpolator->address 187 // r20 = struct fsyscall_gtod_data (= address of gtod_lock.sequence)
189 // r21 = shift factor 188 // r21 = address of mmio_ptr
190 // r22 = address of time interpolator->last_counter 189 // r22 = address of wall_time or monotonic_time
191 // r23 = address of time_interpolator->last_cycle 190 // r23 = address of shift / value
192 // r24 = adress of time_interpolator->offset 191 // r24 = address mult factor / cycle_last value
193 // r25 = last_cycle value 192 // r25 = itc_lastcycle value
194 // r26 = last_counter value 193 // r26 = address clocksource cycle_last
195 // r27 = pointer to xtime 194 // r27 = (not used)
196 // r28 = sequence number at the beginning of critcal section 195 // r28 = sequence number at the beginning of critcal section
197 // r29 = address of seqlock 196 // r29 = address of itc_jitter
198 // r30 = time processing flags / memory address 197 // r30 = time processing flags / memory address
199 // r31 = pointer to result 198 // r31 = pointer to result
200 // Predicates 199 // Predicates
201 // p6,p7 short term use 200 // p6,p7 short term use
202 // p8 = timesource ar.itc 201 // p8 = timesource ar.itc
203 // p9 = timesource mmio64 202 // p9 = timesource mmio64
204 // p10 = timesource mmio32 203 // p10 = timesource mmio32 - not used
205 // p11 = timesource not to be handled by asm code 204 // p11 = timesource not to be handled by asm code
206 // p12 = memory time source ( = p9 | p10) 205 // p12 = memory time source ( = p9 | p10) - not used
207 // p13 = do cmpxchg with time_interpolator_last_cycle 206 // p13 = do cmpxchg with itc_lastcycle
208 // p14 = Divide by 1000 207 // p14 = Divide by 1000
209 // p15 = Add monotonic 208 // p15 = Add monotonic
210 // 209 //
211 // Note that instructions are optimized for McKinley. McKinley can process two 210 // Note that instructions are optimized for McKinley. McKinley can
212 // bundles simultaneously and therefore we continuously try to feed the CPU 211 // process two bundles simultaneously and therefore we continuously
213 // two bundles and then a stop. 212 // try to feed the CPU two bundles and then a stop.
214 tnat.nz p6,p0 = r31 // branch deferred since it does not fit into bundle structure 213 //
214 // Additional note that code has changed a lot. Optimization is TBD.
215 // Comments begin with "?" are maybe outdated.
216 tnat.nz p6,p0 = r31 // ? branch deferred to fit later bundle
215 mov pr = r30,0xc000 // Set predicates according to function 217 mov pr = r30,0xc000 // Set predicates according to function
216 add r2 = TI_FLAGS+IA64_TASK_SIZE,r16 218 add r2 = TI_FLAGS+IA64_TASK_SIZE,r16
217 movl r20 = time_interpolator 219 movl r20 = fsyscall_gtod_data // load fsyscall gettimeofday data address
218 ;; 220 ;;
219 ld8 r20 = [r20] // get pointer to time_interpolator structure 221 movl r29 = itc_jitter_data // itc_jitter
220 movl r29 = xtime_lock 222 add r22 = IA64_GTOD_WALL_TIME_OFFSET,r20 // wall_time
221 ld4 r2 = [r2] // process work pending flags 223 ld4 r2 = [r2] // process work pending flags
222 movl r27 = xtime 224 ;;
223 ;; // only one bundle here 225(p15) add r22 = IA64_GTOD_MONO_TIME_OFFSET,r20 // monotonic_time
224 ld8 r21 = [r20] // first quad with control information 226 add r21 = IA64_CLKSRC_MMIO_OFFSET,r20
227 add r19 = IA64_ITC_LASTCYCLE_OFFSET,r29
225 and r2 = TIF_ALLWORK_MASK,r2 228 and r2 = TIF_ALLWORK_MASK,r2
226(p6) br.cond.spnt.few .fail_einval // deferred branch 229(p6) br.cond.spnt.few .fail_einval // ? deferred branch
227 ;; 230 ;;
228 add r10 = IA64_TIME_INTERPOLATOR_ADDRESS_OFFSET,r20 231 add r26 = IA64_CLKSRC_CYCLE_LAST_OFFSET,r20 // clksrc_cycle_last
229 extr r3 = r21,32,32 // time_interpolator->nsec_per_cyc
230 extr r8 = r21,0,16 // time_interpolator->source
231 cmp.ne p6, p0 = 0, r2 // Fallback if work is scheduled 232 cmp.ne p6, p0 = 0, r2 // Fallback if work is scheduled
232(p6) br.cond.spnt.many fsys_fallback_syscall 233(p6) br.cond.spnt.many fsys_fallback_syscall
233 ;; 234 ;;
234 cmp.eq p8,p12 = 0,r8 // Check for cpu timer 235 // Begin critical section
235 cmp.eq p9,p0 = 1,r8 // MMIO64 ? 236.time_redo:
236 extr r2 = r21,24,8 // time_interpolator->jitter 237 ld4.acq r28 = [r20] // gtod_lock.sequence, Must take first
237 cmp.eq p10,p0 = 2,r8 // MMIO32 ?
238 cmp.ltu p11,p0 = 2,r8 // function or other clock
239(p11) br.cond.spnt.many fsys_fallback_syscall
240 ;; 238 ;;
241 setf.sig f7 = r3 // Setup for scaling of counter 239 and r28 = ~1,r28 // And make sequence even to force retry if odd
242(p15) movl r19 = wall_to_monotonic
243(p12) ld8 r30 = [r10]
244 cmp.ne p13,p0 = r2,r0 // need jitter compensation?
245 extr r21 = r21,16,8 // shift factor
246 ;; 240 ;;
247.time_redo: 241 ld8 r30 = [r21] // clocksource->mmio_ptr
248 .pred.rel.mutex p8,p9,p10 242 add r24 = IA64_CLKSRC_MULT_OFFSET,r20
249 ld4.acq r28 = [r29] // xtime_lock.sequence. Must come first for locking purposes 243 ld4 r2 = [r29] // itc_jitter value
244 add r23 = IA64_CLKSRC_SHIFT_OFFSET,r20
245 add r14 = IA64_CLKSRC_MASK_OFFSET,r20
246 ;;
247 ld4 r3 = [r24] // clocksource mult value
248 ld8 r14 = [r14] // clocksource mask value
249 cmp.eq p8,p9 = 0,r30 // use cpu timer if no mmio_ptr
250 ;;
251 setf.sig f7 = r3 // Setup for mult scaling of counter
252(p8) cmp.ne p13,p0 = r2,r0 // need itc_jitter compensation, set p13
253 ld4 r23 = [r23] // clocksource shift value
254 ld8 r24 = [r26] // get clksrc_cycle_last value
255(p9) cmp.eq p13,p0 = 0,r30 // if mmio_ptr, clear p13 jitter control
256 ;;
257 .pred.rel.mutex p8,p9
250(p8) mov r2 = ar.itc // CPU_TIMER. 36 clocks latency!!! 258(p8) mov r2 = ar.itc // CPU_TIMER. 36 clocks latency!!!
251 add r22 = IA64_TIME_INTERPOLATOR_LAST_COUNTER_OFFSET,r20 259(p9) ld8 r2 = [r30] // MMIO_TIMER. Could also have latency issues..
252(p9) ld8 r2 = [r30] // readq(ti->address). Could also have latency issues.. 260(p13) ld8 r25 = [r19] // get itc_lastcycle value
253(p10) ld4 r2 = [r30] // readw(ti->address) 261 ;; // ? could be removed by moving the last add upward
254(p13) add r23 = IA64_TIME_INTERPOLATOR_LAST_CYCLE_OFFSET,r20 262 ld8 r9 = [r22],IA64_TIMESPEC_TV_NSEC_OFFSET // tv_sec
255 ;; // could be removed by moving the last add upward 263 ;;
256 ld8 r26 = [r22] // time_interpolator->last_counter 264 ld8 r8 = [r22],-IA64_TIMESPEC_TV_NSEC_OFFSET // tv_nsec
257(p13) ld8 r25 = [r23] // time interpolator->last_cycle 265(p13) sub r3 = r25,r2 // Diff needed before comparison (thanks davidm)
258 add r24 = IA64_TIME_INTERPOLATOR_OFFSET_OFFSET,r20 266 ;;
259(p15) ld8 r17 = [r19],IA64_TIMESPEC_TV_NSEC_OFFSET 267(p13) cmp.gt.unc p6,p7 = r3,r0 // check if it is less than last. p6,p7 cleared
260 ld8 r9 = [r27],IA64_TIMESPEC_TV_NSEC_OFFSET 268 sub r10 = r2,r24 // current_cycle - last_cycle
261 add r14 = IA64_TIME_INTERPOLATOR_MASK_OFFSET, r20 269 ;;
262 ;; 270(p6) sub r10 = r25,r24 // time we got was less than last_cycle
263 ld8 r18 = [r24] // time_interpolator->offset
264 ld8 r8 = [r27],-IA64_TIMESPEC_TV_NSEC_OFFSET // xtime.tv_nsec
265(p13) sub r3 = r25,r2 // Diff needed before comparison (thanks davidm)
266 ;;
267 ld8 r14 = [r14] // time_interpolator->mask
268(p13) cmp.gt.unc p6,p7 = r3,r0 // check if it is less than last. p6,p7 cleared
269 sub r10 = r2,r26 // current_counter - last_counter
270 ;;
271(p6) sub r10 = r25,r26 // time we got was less than last_cycle
272(p7) mov ar.ccv = r25 // more than last_cycle. Prep for cmpxchg 271(p7) mov ar.ccv = r25 // more than last_cycle. Prep for cmpxchg
273 ;; 272 ;;
273(p7) cmpxchg8.rel r3 = [r19],r2,ar.ccv
274 ;;
275(p7) cmp.ne p7,p0 = r25,r3 // if cmpxchg not successful
276 ;;
277(p7) sub r10 = r3,r24 // then use new last_cycle instead
278 ;;
274 and r10 = r10,r14 // Apply mask 279 and r10 = r10,r14 // Apply mask
275 ;; 280 ;;
276 setf.sig f8 = r10 281 setf.sig f8 = r10
277 nop.i 123 282 nop.i 123
278 ;; 283 ;;
279(p7) cmpxchg8.rel r3 = [r23],r2,ar.ccv 284 // fault check takes 5 cycles and we have spare time
280EX(.fail_efault, probe.w.fault r31, 3) // This takes 5 cycles and we have spare time 285EX(.fail_efault, probe.w.fault r31, 3)
281 xmpy.l f8 = f8,f7 // nsec_per_cyc*(counter-last_counter) 286 xmpy.l f8 = f8,f7 // nsec_per_cyc*(counter-last_counter)
282(p15) add r9 = r9,r17 // Add wall to monotonic.secs to result secs
283 ;; 287 ;;
284(p15) ld8 r17 = [r19],-IA64_TIMESPEC_TV_NSEC_OFFSET 288 // ? simulate tbit.nz.or p7,p0 = r28,0
285(p7) cmp.ne p7,p0 = r25,r3 // if cmpxchg not successful redo
286 // simulate tbit.nz.or p7,p0 = r28,0
287 and r28 = ~1,r28 // Make sequence even to force retry if odd
288 getf.sig r2 = f8 289 getf.sig r2 = f8
289 mf 290 mf
290 add r8 = r8,r18 // Add time interpolator offset
291 ;; 291 ;;
292 ld4 r10 = [r29] // xtime_lock.sequence 292 ld4 r10 = [r20] // gtod_lock.sequence
293(p15) add r8 = r8, r17 // Add monotonic.nsecs to nsecs 293 shr.u r2 = r2,r23 // shift by factor
294 shr.u r2 = r2,r21 294 ;; // ? overloaded 3 bundles!
295 ;; // overloaded 3 bundles!
296 // End critical section.
297 add r8 = r8,r2 // Add xtime.nsecs 295 add r8 = r8,r2 // Add xtime.nsecs
298 cmp4.ne.or p7,p0 = r28,r10 296 cmp4.ne p7,p0 = r28,r10
299(p7) br.cond.dpnt.few .time_redo // sequence number changed ? 297(p7) br.cond.dpnt.few .time_redo // sequence number changed, redo
298 // End critical section.
300 // Now r8=tv->tv_nsec and r9=tv->tv_sec 299 // Now r8=tv->tv_nsec and r9=tv->tv_sec
301 mov r10 = r0 300 mov r10 = r0
302 movl r2 = 1000000000 301 movl r2 = 1000000000
@@ -306,19 +305,19 @@ EX(.fail_efault, probe.w.fault r31, 3) // This takes 5 cycles and we have spare
306.time_normalize: 305.time_normalize:
307 mov r21 = r8 306 mov r21 = r8
308 cmp.ge p6,p0 = r8,r2 307 cmp.ge p6,p0 = r8,r2
309(p14) shr.u r20 = r8, 3 // We can repeat this if necessary just wasting some time 308(p14) shr.u r20 = r8, 3 // We can repeat this if necessary just wasting time
310 ;; 309 ;;
311(p14) setf.sig f8 = r20 310(p14) setf.sig f8 = r20
312(p6) sub r8 = r8,r2 311(p6) sub r8 = r8,r2
313(p6) add r9 = 1,r9 // two nops before the branch. 312(p6) add r9 = 1,r9 // two nops before the branch.
314(p14) setf.sig f7 = r3 // Chances for repeats are 1 in 10000 for gettod 313(p14) setf.sig f7 = r3 // Chances for repeats are 1 in 10000 for gettod
315(p6) br.cond.dpnt.few .time_normalize 314(p6) br.cond.dpnt.few .time_normalize
316 ;; 315 ;;
317 // Divided by 8 though shift. Now divide by 125 316 // Divided by 8 though shift. Now divide by 125
318 // The compiler was able to do that with a multiply 317 // The compiler was able to do that with a multiply
319 // and a shift and we do the same 318 // and a shift and we do the same
320EX(.fail_efault, probe.w.fault r23, 3) // This also costs 5 cycles 319EX(.fail_efault, probe.w.fault r23, 3) // This also costs 5 cycles
321(p14) xmpy.hu f8 = f8, f7 // xmpy has 5 cycles latency so use it... 320(p14) xmpy.hu f8 = f8, f7 // xmpy has 5 cycles latency so use it
322 ;; 321 ;;
323 mov r8 = r0 322 mov r8 = r0
324(p14) getf.sig r2 = f8 323(p14) getf.sig r2 = f8
diff --git a/arch/ia64/kernel/fsyscall_gtod_data.h b/arch/ia64/kernel/fsyscall_gtod_data.h
new file mode 100644
index 000000000000..490dab55fba3
--- /dev/null
+++ b/arch/ia64/kernel/fsyscall_gtod_data.h
@@ -0,0 +1,23 @@
1/*
2 * (c) Copyright 2007 Hewlett-Packard Development Company, L.P.
3 * Contributed by Peter Keilty <peter.keilty@hp.com>
4 *
5 * fsyscall gettimeofday data
6 */
7
8struct fsyscall_gtod_data_t {
9 seqlock_t lock;
10 struct timespec wall_time;
11 struct timespec monotonic_time;
12 cycle_t clk_mask;
13 u32 clk_mult;
14 u32 clk_shift;
15 void *clk_fsys_mmio;
16 cycle_t clk_cycle_last;
17} __attribute__ ((aligned (L1_CACHE_BYTES)));
18
19struct itc_jitter_data_t {
20 int itc_jitter;
21 cycle_t itc_lastcycle;
22} __attribute__ ((aligned (L1_CACHE_BYTES)));
23
diff --git a/arch/ia64/kernel/gate.S b/arch/ia64/kernel/gate.S
index 3274850cf272..74b1ccce4e84 100644
--- a/arch/ia64/kernel/gate.S
+++ b/arch/ia64/kernel/gate.S
@@ -30,6 +30,7 @@
30 .previous 30 .previous
31#define BRL_COND_FSYS_BUBBLE_DOWN(pr) \ 31#define BRL_COND_FSYS_BUBBLE_DOWN(pr) \
32[1:](pr)brl.cond.sptk 0; \ 32[1:](pr)brl.cond.sptk 0; \
33 ;; \
33 .xdata4 ".data.patch.brl_fsys_bubble_down", 1b-. 34 .xdata4 ".data.patch.brl_fsys_bubble_down", 1b-.
34 35
35GLOBAL_ENTRY(__kernel_syscall_via_break) 36GLOBAL_ENTRY(__kernel_syscall_via_break)
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index 37f46527d233..91e6dc1e7baf 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -118,15 +118,25 @@ static DEFINE_SPINLOCK(iosapic_lock);
118 * vector. 118 * vector.
119 */ 119 */
120 120
121struct iosapic_rte_info { 121#define NO_REF_RTE 0
122 struct list_head rte_list; /* node in list of RTEs sharing the 122
123 * same vector */ 123static struct iosapic {
124 char __iomem *addr; /* base address of IOSAPIC */ 124 char __iomem *addr; /* base address of IOSAPIC */
125 unsigned int gsi_base; /* first GSI assigned to this 125 unsigned int gsi_base; /* GSI base */
126 * IOSAPIC */ 126 unsigned short num_rte; /* # of RTEs on this IOSAPIC */
127 int rtes_inuse; /* # of RTEs in use on this IOSAPIC */
128#ifdef CONFIG_NUMA
129 unsigned short node; /* numa node association via pxm */
130#endif
131 spinlock_t lock; /* lock for indirect reg access */
132} iosapic_lists[NR_IOSAPICS];
133
134struct iosapic_rte_info {
135 struct list_head rte_list; /* RTEs sharing the same vector */
127 char rte_index; /* IOSAPIC RTE index */ 136 char rte_index; /* IOSAPIC RTE index */
128 int refcnt; /* reference counter */ 137 int refcnt; /* reference counter */
129 unsigned int flags; /* flags */ 138 unsigned int flags; /* flags */
139 struct iosapic *iosapic;
130} ____cacheline_aligned; 140} ____cacheline_aligned;
131 141
132static struct iosapic_intr_info { 142static struct iosapic_intr_info {
@@ -140,24 +150,23 @@ static struct iosapic_intr_info {
140 unsigned char polarity: 1; /* interrupt polarity 150 unsigned char polarity: 1; /* interrupt polarity
141 * (see iosapic.h) */ 151 * (see iosapic.h) */
142 unsigned char trigger : 1; /* trigger mode (see iosapic.h) */ 152 unsigned char trigger : 1; /* trigger mode (see iosapic.h) */
143} iosapic_intr_info[IA64_NUM_VECTORS]; 153} iosapic_intr_info[NR_IRQS];
144
145static struct iosapic {
146 char __iomem *addr; /* base address of IOSAPIC */
147 unsigned int gsi_base; /* first GSI assigned to this
148 * IOSAPIC */
149 unsigned short num_rte; /* # of RTEs on this IOSAPIC */
150 int rtes_inuse; /* # of RTEs in use on this IOSAPIC */
151#ifdef CONFIG_NUMA
152 unsigned short node; /* numa node association via pxm */
153#endif
154} iosapic_lists[NR_IOSAPICS];
155 154
156static unsigned char pcat_compat __devinitdata; /* 8259 compatibility flag */ 155static unsigned char pcat_compat __devinitdata; /* 8259 compatibility flag */
157 156
158static int iosapic_kmalloc_ok; 157static int iosapic_kmalloc_ok;
159static LIST_HEAD(free_rte_list); 158static LIST_HEAD(free_rte_list);
160 159
160static inline void
161iosapic_write(struct iosapic *iosapic, unsigned int reg, u32 val)
162{
163 unsigned long flags;
164
165 spin_lock_irqsave(&iosapic->lock, flags);
166 __iosapic_write(iosapic->addr, reg, val);
167 spin_unlock_irqrestore(&iosapic->lock, flags);
168}
169
161/* 170/*
162 * Find an IOSAPIC associated with a GSI 171 * Find an IOSAPIC associated with a GSI
163 */ 172 */
@@ -175,17 +184,18 @@ find_iosapic (unsigned int gsi)
175 return -1; 184 return -1;
176} 185}
177 186
178static inline int 187static inline int __gsi_to_irq(unsigned int gsi)
179_gsi_to_vector (unsigned int gsi)
180{ 188{
189 int irq;
181 struct iosapic_intr_info *info; 190 struct iosapic_intr_info *info;
182 struct iosapic_rte_info *rte; 191 struct iosapic_rte_info *rte;
183 192
184 for (info = iosapic_intr_info; info < 193 for (irq = 0; irq < NR_IRQS; irq++) {
185 iosapic_intr_info + IA64_NUM_VECTORS; ++info) 194 info = &iosapic_intr_info[irq];
186 list_for_each_entry(rte, &info->rtes, rte_list) 195 list_for_each_entry(rte, &info->rtes, rte_list)
187 if (rte->gsi_base + rte->rte_index == gsi) 196 if (rte->iosapic->gsi_base + rte->rte_index == gsi)
188 return info - iosapic_intr_info; 197 return irq;
198 }
189 return -1; 199 return -1;
190} 200}
191 201
@@ -196,7 +206,10 @@ _gsi_to_vector (unsigned int gsi)
196inline int 206inline int
197gsi_to_vector (unsigned int gsi) 207gsi_to_vector (unsigned int gsi)
198{ 208{
199 return _gsi_to_vector(gsi); 209 int irq = __gsi_to_irq(gsi);
210 if (check_irq_used(irq) < 0)
211 return -1;
212 return irq_to_vector(irq);
200} 213}
201 214
202int 215int
@@ -204,66 +217,48 @@ gsi_to_irq (unsigned int gsi)
204{ 217{
205 unsigned long flags; 218 unsigned long flags;
206 int irq; 219 int irq;
207 /* 220
208 * XXX fix me: this assumes an identity mapping between IA-64 vector
209 * and Linux irq numbers...
210 */
211 spin_lock_irqsave(&iosapic_lock, flags); 221 spin_lock_irqsave(&iosapic_lock, flags);
212 { 222 irq = __gsi_to_irq(gsi);
213 irq = _gsi_to_vector(gsi);
214 }
215 spin_unlock_irqrestore(&iosapic_lock, flags); 223 spin_unlock_irqrestore(&iosapic_lock, flags);
216
217 return irq; 224 return irq;
218} 225}
219 226
220static struct iosapic_rte_info *gsi_vector_to_rte(unsigned int gsi, 227static struct iosapic_rte_info *find_rte(unsigned int irq, unsigned int gsi)
221 unsigned int vec)
222{ 228{
223 struct iosapic_rte_info *rte; 229 struct iosapic_rte_info *rte;
224 230
225 list_for_each_entry(rte, &iosapic_intr_info[vec].rtes, rte_list) 231 list_for_each_entry(rte, &iosapic_intr_info[irq].rtes, rte_list)
226 if (rte->gsi_base + rte->rte_index == gsi) 232 if (rte->iosapic->gsi_base + rte->rte_index == gsi)
227 return rte; 233 return rte;
228 return NULL; 234 return NULL;
229} 235}
230 236
231static void 237static void
232set_rte (unsigned int gsi, unsigned int vector, unsigned int dest, int mask) 238set_rte (unsigned int gsi, unsigned int irq, unsigned int dest, int mask)
233{ 239{
234 unsigned long pol, trigger, dmode; 240 unsigned long pol, trigger, dmode;
235 u32 low32, high32; 241 u32 low32, high32;
236 char __iomem *addr;
237 int rte_index; 242 int rte_index;
238 char redir; 243 char redir;
239 struct iosapic_rte_info *rte; 244 struct iosapic_rte_info *rte;
245 ia64_vector vector = irq_to_vector(irq);
240 246
241 DBG(KERN_DEBUG"IOSAPIC: routing vector %d to 0x%x\n", vector, dest); 247 DBG(KERN_DEBUG"IOSAPIC: routing vector %d to 0x%x\n", vector, dest);
242 248
243 rte = gsi_vector_to_rte(gsi, vector); 249 rte = find_rte(irq, gsi);
244 if (!rte) 250 if (!rte)
245 return; /* not an IOSAPIC interrupt */ 251 return; /* not an IOSAPIC interrupt */
246 252
247 rte_index = rte->rte_index; 253 rte_index = rte->rte_index;
248 addr = rte->addr; 254 pol = iosapic_intr_info[irq].polarity;
249 pol = iosapic_intr_info[vector].polarity; 255 trigger = iosapic_intr_info[irq].trigger;
250 trigger = iosapic_intr_info[vector].trigger; 256 dmode = iosapic_intr_info[irq].dmode;
251 dmode = iosapic_intr_info[vector].dmode;
252 257
253 redir = (dmode == IOSAPIC_LOWEST_PRIORITY) ? 1 : 0; 258 redir = (dmode == IOSAPIC_LOWEST_PRIORITY) ? 1 : 0;
254 259
255#ifdef CONFIG_SMP 260#ifdef CONFIG_SMP
256 { 261 set_irq_affinity_info(irq, (int)(dest & 0xffff), redir);
257 unsigned int irq;
258
259 for (irq = 0; irq < NR_IRQS; ++irq)
260 if (irq_to_vector(irq) == vector) {
261 set_irq_affinity_info(irq,
262 (int)(dest & 0xffff),
263 redir);
264 break;
265 }
266 }
267#endif 262#endif
268 263
269 low32 = ((pol << IOSAPIC_POLARITY_SHIFT) | 264 low32 = ((pol << IOSAPIC_POLARITY_SHIFT) |
@@ -275,10 +270,10 @@ set_rte (unsigned int gsi, unsigned int vector, unsigned int dest, int mask)
275 /* dest contains both id and eid */ 270 /* dest contains both id and eid */
276 high32 = (dest << IOSAPIC_DEST_SHIFT); 271 high32 = (dest << IOSAPIC_DEST_SHIFT);
277 272
278 iosapic_write(addr, IOSAPIC_RTE_HIGH(rte_index), high32); 273 iosapic_write(rte->iosapic, IOSAPIC_RTE_HIGH(rte_index), high32);
279 iosapic_write(addr, IOSAPIC_RTE_LOW(rte_index), low32); 274 iosapic_write(rte->iosapic, IOSAPIC_RTE_LOW(rte_index), low32);
280 iosapic_intr_info[vector].low32 = low32; 275 iosapic_intr_info[irq].low32 = low32;
281 iosapic_intr_info[vector].dest = dest; 276 iosapic_intr_info[irq].dest = dest;
282} 277}
283 278
284static void 279static void
@@ -294,15 +289,18 @@ kexec_disable_iosapic(void)
294{ 289{
295 struct iosapic_intr_info *info; 290 struct iosapic_intr_info *info;
296 struct iosapic_rte_info *rte; 291 struct iosapic_rte_info *rte;
297 u8 vec = 0; 292 ia64_vector vec;
298 for (info = iosapic_intr_info; info < 293 int irq;
299 iosapic_intr_info + IA64_NUM_VECTORS; ++info, ++vec) { 294
295 for (irq = 0; irq < NR_IRQS; irq++) {
296 info = &iosapic_intr_info[irq];
297 vec = irq_to_vector(irq);
300 list_for_each_entry(rte, &info->rtes, 298 list_for_each_entry(rte, &info->rtes,
301 rte_list) { 299 rte_list) {
302 iosapic_write(rte->addr, 300 iosapic_write(rte->iosapic,
303 IOSAPIC_RTE_LOW(rte->rte_index), 301 IOSAPIC_RTE_LOW(rte->rte_index),
304 IOSAPIC_MASK|vec); 302 IOSAPIC_MASK|vec);
305 iosapic_eoi(rte->addr, vec); 303 iosapic_eoi(rte->iosapic->addr, vec);
306 } 304 }
307 } 305 }
308} 306}
@@ -311,54 +309,36 @@ kexec_disable_iosapic(void)
311static void 309static void
312mask_irq (unsigned int irq) 310mask_irq (unsigned int irq)
313{ 311{
314 unsigned long flags;
315 char __iomem *addr;
316 u32 low32; 312 u32 low32;
317 int rte_index; 313 int rte_index;
318 ia64_vector vec = irq_to_vector(irq);
319 struct iosapic_rte_info *rte; 314 struct iosapic_rte_info *rte;
320 315
321 if (list_empty(&iosapic_intr_info[vec].rtes)) 316 if (list_empty(&iosapic_intr_info[irq].rtes))
322 return; /* not an IOSAPIC interrupt! */ 317 return; /* not an IOSAPIC interrupt! */
323 318
324 spin_lock_irqsave(&iosapic_lock, flags); 319 /* set only the mask bit */
325 { 320 low32 = iosapic_intr_info[irq].low32 |= IOSAPIC_MASK;
326 /* set only the mask bit */ 321 list_for_each_entry(rte, &iosapic_intr_info[irq].rtes, rte_list) {
327 low32 = iosapic_intr_info[vec].low32 |= IOSAPIC_MASK; 322 rte_index = rte->rte_index;
328 list_for_each_entry(rte, &iosapic_intr_info[vec].rtes, 323 iosapic_write(rte->iosapic, IOSAPIC_RTE_LOW(rte_index), low32);
329 rte_list) {
330 addr = rte->addr;
331 rte_index = rte->rte_index;
332 iosapic_write(addr, IOSAPIC_RTE_LOW(rte_index), low32);
333 }
334 } 324 }
335 spin_unlock_irqrestore(&iosapic_lock, flags);
336} 325}
337 326
338static void 327static void
339unmask_irq (unsigned int irq) 328unmask_irq (unsigned int irq)
340{ 329{
341 unsigned long flags;
342 char __iomem *addr;
343 u32 low32; 330 u32 low32;
344 int rte_index; 331 int rte_index;
345 ia64_vector vec = irq_to_vector(irq);
346 struct iosapic_rte_info *rte; 332 struct iosapic_rte_info *rte;
347 333
348 if (list_empty(&iosapic_intr_info[vec].rtes)) 334 if (list_empty(&iosapic_intr_info[irq].rtes))
349 return; /* not an IOSAPIC interrupt! */ 335 return; /* not an IOSAPIC interrupt! */
350 336
351 spin_lock_irqsave(&iosapic_lock, flags); 337 low32 = iosapic_intr_info[irq].low32 &= ~IOSAPIC_MASK;
352 { 338 list_for_each_entry(rte, &iosapic_intr_info[irq].rtes, rte_list) {
353 low32 = iosapic_intr_info[vec].low32 &= ~IOSAPIC_MASK; 339 rte_index = rte->rte_index;
354 list_for_each_entry(rte, &iosapic_intr_info[vec].rtes, 340 iosapic_write(rte->iosapic, IOSAPIC_RTE_LOW(rte_index), low32);
355 rte_list) {
356 addr = rte->addr;
357 rte_index = rte->rte_index;
358 iosapic_write(addr, IOSAPIC_RTE_LOW(rte_index), low32);
359 }
360 } 341 }
361 spin_unlock_irqrestore(&iosapic_lock, flags);
362} 342}
363 343
364 344
@@ -366,23 +346,24 @@ static void
366iosapic_set_affinity (unsigned int irq, cpumask_t mask) 346iosapic_set_affinity (unsigned int irq, cpumask_t mask)
367{ 347{
368#ifdef CONFIG_SMP 348#ifdef CONFIG_SMP
369 unsigned long flags;
370 u32 high32, low32; 349 u32 high32, low32;
371 int dest, rte_index; 350 int dest, rte_index;
372 char __iomem *addr;
373 int redir = (irq & IA64_IRQ_REDIRECTED) ? 1 : 0; 351 int redir = (irq & IA64_IRQ_REDIRECTED) ? 1 : 0;
374 ia64_vector vec;
375 struct iosapic_rte_info *rte; 352 struct iosapic_rte_info *rte;
353 struct iosapic *iosapic;
376 354
377 irq &= (~IA64_IRQ_REDIRECTED); 355 irq &= (~IA64_IRQ_REDIRECTED);
378 vec = irq_to_vector(irq);
379 356
357 cpus_and(mask, mask, cpu_online_map);
380 if (cpus_empty(mask)) 358 if (cpus_empty(mask))
381 return; 359 return;
382 360
361 if (reassign_irq_vector(irq, first_cpu(mask)))
362 return;
363
383 dest = cpu_physical_id(first_cpu(mask)); 364 dest = cpu_physical_id(first_cpu(mask));
384 365
385 if (list_empty(&iosapic_intr_info[vec].rtes)) 366 if (list_empty(&iosapic_intr_info[irq].rtes))
386 return; /* not an IOSAPIC interrupt */ 367 return; /* not an IOSAPIC interrupt */
387 368
388 set_irq_affinity_info(irq, dest, redir); 369 set_irq_affinity_info(irq, dest, redir);
@@ -390,31 +371,24 @@ iosapic_set_affinity (unsigned int irq, cpumask_t mask)
390 /* dest contains both id and eid */ 371 /* dest contains both id and eid */
391 high32 = dest << IOSAPIC_DEST_SHIFT; 372 high32 = dest << IOSAPIC_DEST_SHIFT;
392 373
393 spin_lock_irqsave(&iosapic_lock, flags); 374 low32 = iosapic_intr_info[irq].low32 & ~(7 << IOSAPIC_DELIVERY_SHIFT);
394 { 375 if (redir)
395 low32 = iosapic_intr_info[vec].low32 & 376 /* change delivery mode to lowest priority */
396 ~(7 << IOSAPIC_DELIVERY_SHIFT); 377 low32 |= (IOSAPIC_LOWEST_PRIORITY << IOSAPIC_DELIVERY_SHIFT);
397 378 else
398 if (redir) 379 /* change delivery mode to fixed */
399 /* change delivery mode to lowest priority */ 380 low32 |= (IOSAPIC_FIXED << IOSAPIC_DELIVERY_SHIFT);
400 low32 |= (IOSAPIC_LOWEST_PRIORITY << 381 low32 &= IOSAPIC_VECTOR_MASK;
401 IOSAPIC_DELIVERY_SHIFT); 382 low32 |= irq_to_vector(irq);
402 else 383
403 /* change delivery mode to fixed */ 384 iosapic_intr_info[irq].low32 = low32;
404 low32 |= (IOSAPIC_FIXED << IOSAPIC_DELIVERY_SHIFT); 385 iosapic_intr_info[irq].dest = dest;
405 386 list_for_each_entry(rte, &iosapic_intr_info[irq].rtes, rte_list) {
406 iosapic_intr_info[vec].low32 = low32; 387 iosapic = rte->iosapic;
407 iosapic_intr_info[vec].dest = dest; 388 rte_index = rte->rte_index;
408 list_for_each_entry(rte, &iosapic_intr_info[vec].rtes, 389 iosapic_write(iosapic, IOSAPIC_RTE_HIGH(rte_index), high32);
409 rte_list) { 390 iosapic_write(iosapic, IOSAPIC_RTE_LOW(rte_index), low32);
410 addr = rte->addr;
411 rte_index = rte->rte_index;
412 iosapic_write(addr, IOSAPIC_RTE_HIGH(rte_index),
413 high32);
414 iosapic_write(addr, IOSAPIC_RTE_LOW(rte_index), low32);
415 }
416 } 391 }
417 spin_unlock_irqrestore(&iosapic_lock, flags);
418#endif 392#endif
419} 393}
420 394
@@ -434,10 +408,20 @@ iosapic_end_level_irq (unsigned int irq)
434{ 408{
435 ia64_vector vec = irq_to_vector(irq); 409 ia64_vector vec = irq_to_vector(irq);
436 struct iosapic_rte_info *rte; 410 struct iosapic_rte_info *rte;
411 int do_unmask_irq = 0;
437 412
438 move_native_irq(irq); 413 if (unlikely(irq_desc[irq].status & IRQ_MOVE_PENDING)) {
439 list_for_each_entry(rte, &iosapic_intr_info[vec].rtes, rte_list) 414 do_unmask_irq = 1;
440 iosapic_eoi(rte->addr, vec); 415 mask_irq(irq);
416 }
417
418 list_for_each_entry(rte, &iosapic_intr_info[irq].rtes, rte_list)
419 iosapic_eoi(rte->iosapic->addr, vec);
420
421 if (unlikely(do_unmask_irq)) {
422 move_masked_irq(irq);
423 unmask_irq(irq);
424 }
441} 425}
442 426
443#define iosapic_shutdown_level_irq mask_irq 427#define iosapic_shutdown_level_irq mask_irq
@@ -519,13 +503,12 @@ iosapic_version (char __iomem *addr)
519 * unsigned int reserved2 : 8; 503 * unsigned int reserved2 : 8;
520 * } 504 * }
521 */ 505 */
522 return iosapic_read(addr, IOSAPIC_VERSION); 506 return __iosapic_read(addr, IOSAPIC_VERSION);
523} 507}
524 508
525static int iosapic_find_sharable_vector (unsigned long trigger, 509static int iosapic_find_sharable_irq(unsigned long trigger, unsigned long pol)
526 unsigned long pol)
527{ 510{
528 int i, vector = -1, min_count = -1; 511 int i, irq = -ENOSPC, min_count = -1;
529 struct iosapic_intr_info *info; 512 struct iosapic_intr_info *info;
530 513
531 /* 514 /*
@@ -533,21 +516,21 @@ static int iosapic_find_sharable_vector (unsigned long trigger,
533 * supported yet 516 * supported yet
534 */ 517 */
535 if (trigger == IOSAPIC_EDGE) 518 if (trigger == IOSAPIC_EDGE)
536 return -1; 519 return -EINVAL;
537 520
538 for (i = IA64_FIRST_DEVICE_VECTOR; i <= IA64_LAST_DEVICE_VECTOR; i++) { 521 for (i = 0; i <= NR_IRQS; i++) {
539 info = &iosapic_intr_info[i]; 522 info = &iosapic_intr_info[i];
540 if (info->trigger == trigger && info->polarity == pol && 523 if (info->trigger == trigger && info->polarity == pol &&
541 (info->dmode == IOSAPIC_FIXED || info->dmode == 524 (info->dmode == IOSAPIC_FIXED ||
542 IOSAPIC_LOWEST_PRIORITY)) { 525 info->dmode == IOSAPIC_LOWEST_PRIORITY) &&
526 can_request_irq(i, IRQF_SHARED)) {
543 if (min_count == -1 || info->count < min_count) { 527 if (min_count == -1 || info->count < min_count) {
544 vector = i; 528 irq = i;
545 min_count = info->count; 529 min_count = info->count;
546 } 530 }
547 } 531 }
548 } 532 }
549 533 return irq;
550 return vector;
551} 534}
552 535
553/* 536/*
@@ -555,25 +538,25 @@ static int iosapic_find_sharable_vector (unsigned long trigger,
555 * assign a new vector for the other and make the vector available 538 * assign a new vector for the other and make the vector available
556 */ 539 */
557static void __init 540static void __init
558iosapic_reassign_vector (int vector) 541iosapic_reassign_vector (int irq)
559{ 542{
560 int new_vector; 543 int new_irq;
561 544
562 if (!list_empty(&iosapic_intr_info[vector].rtes)) { 545 if (!list_empty(&iosapic_intr_info[irq].rtes)) {
563 new_vector = assign_irq_vector(AUTO_ASSIGN); 546 new_irq = create_irq();
564 if (new_vector < 0) 547 if (new_irq < 0)
565 panic("%s: out of interrupt vectors!\n", __FUNCTION__); 548 panic("%s: out of interrupt vectors!\n", __FUNCTION__);
566 printk(KERN_INFO "Reassigning vector %d to %d\n", 549 printk(KERN_INFO "Reassigning vector %d to %d\n",
567 vector, new_vector); 550 irq_to_vector(irq), irq_to_vector(new_irq));
568 memcpy(&iosapic_intr_info[new_vector], &iosapic_intr_info[vector], 551 memcpy(&iosapic_intr_info[new_irq], &iosapic_intr_info[irq],
569 sizeof(struct iosapic_intr_info)); 552 sizeof(struct iosapic_intr_info));
570 INIT_LIST_HEAD(&iosapic_intr_info[new_vector].rtes); 553 INIT_LIST_HEAD(&iosapic_intr_info[new_irq].rtes);
571 list_move(iosapic_intr_info[vector].rtes.next, 554 list_move(iosapic_intr_info[irq].rtes.next,
572 &iosapic_intr_info[new_vector].rtes); 555 &iosapic_intr_info[new_irq].rtes);
573 memset(&iosapic_intr_info[vector], 0, 556 memset(&iosapic_intr_info[irq], 0,
574 sizeof(struct iosapic_intr_info)); 557 sizeof(struct iosapic_intr_info));
575 iosapic_intr_info[vector].low32 = IOSAPIC_MASK; 558 iosapic_intr_info[irq].low32 = IOSAPIC_MASK;
576 INIT_LIST_HEAD(&iosapic_intr_info[vector].rtes); 559 INIT_LIST_HEAD(&iosapic_intr_info[irq].rtes);
577 } 560 }
578} 561}
579 562
@@ -610,29 +593,18 @@ static struct iosapic_rte_info *iosapic_alloc_rte (void)
610 return rte; 593 return rte;
611} 594}
612 595
613static void iosapic_free_rte (struct iosapic_rte_info *rte) 596static inline int irq_is_shared (int irq)
614{ 597{
615 if (rte->flags & RTE_PREALLOCATED) 598 return (iosapic_intr_info[irq].count > 1);
616 list_add_tail(&rte->rte_list, &free_rte_list);
617 else
618 kfree(rte);
619}
620
621static inline int vector_is_shared (int vector)
622{
623 return (iosapic_intr_info[vector].count > 1);
624} 599}
625 600
626static int 601static int
627register_intr (unsigned int gsi, int vector, unsigned char delivery, 602register_intr (unsigned int gsi, int irq, unsigned char delivery,
628 unsigned long polarity, unsigned long trigger) 603 unsigned long polarity, unsigned long trigger)
629{ 604{
630 irq_desc_t *idesc; 605 irq_desc_t *idesc;
631 struct hw_interrupt_type *irq_type; 606 struct hw_interrupt_type *irq_type;
632 int rte_index;
633 int index; 607 int index;
634 unsigned long gsi_base;
635 void __iomem *iosapic_address;
636 struct iosapic_rte_info *rte; 608 struct iosapic_rte_info *rte;
637 609
638 index = find_iosapic(gsi); 610 index = find_iosapic(gsi);
@@ -642,10 +614,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery,
642 return -ENODEV; 614 return -ENODEV;
643 } 615 }
644 616
645 iosapic_address = iosapic_lists[index].addr; 617 rte = find_rte(irq, gsi);
646 gsi_base = iosapic_lists[index].gsi_base;
647
648 rte = gsi_vector_to_rte(gsi, vector);
649 if (!rte) { 618 if (!rte) {
650 rte = iosapic_alloc_rte(); 619 rte = iosapic_alloc_rte();
651 if (!rte) { 620 if (!rte) {
@@ -654,40 +623,42 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery,
654 return -ENOMEM; 623 return -ENOMEM;
655 } 624 }
656 625
657 rte_index = gsi - gsi_base; 626 rte->iosapic = &iosapic_lists[index];
658 rte->rte_index = rte_index; 627 rte->rte_index = gsi - rte->iosapic->gsi_base;
659 rte->addr = iosapic_address;
660 rte->gsi_base = gsi_base;
661 rte->refcnt++; 628 rte->refcnt++;
662 list_add_tail(&rte->rte_list, &iosapic_intr_info[vector].rtes); 629 list_add_tail(&rte->rte_list, &iosapic_intr_info[irq].rtes);
663 iosapic_intr_info[vector].count++; 630 iosapic_intr_info[irq].count++;
664 iosapic_lists[index].rtes_inuse++; 631 iosapic_lists[index].rtes_inuse++;
665 } 632 }
666 else if (vector_is_shared(vector)) { 633 else if (rte->refcnt == NO_REF_RTE) {
667 struct iosapic_intr_info *info = &iosapic_intr_info[vector]; 634 struct iosapic_intr_info *info = &iosapic_intr_info[irq];
668 if (info->trigger != trigger || info->polarity != polarity) { 635 if (info->count > 0 &&
636 (info->trigger != trigger || info->polarity != polarity)){
669 printk (KERN_WARNING 637 printk (KERN_WARNING
670 "%s: cannot override the interrupt\n", 638 "%s: cannot override the interrupt\n",
671 __FUNCTION__); 639 __FUNCTION__);
672 return -EINVAL; 640 return -EINVAL;
673 } 641 }
642 rte->refcnt++;
643 iosapic_intr_info[irq].count++;
644 iosapic_lists[index].rtes_inuse++;
674 } 645 }
675 646
676 iosapic_intr_info[vector].polarity = polarity; 647 iosapic_intr_info[irq].polarity = polarity;
677 iosapic_intr_info[vector].dmode = delivery; 648 iosapic_intr_info[irq].dmode = delivery;
678 iosapic_intr_info[vector].trigger = trigger; 649 iosapic_intr_info[irq].trigger = trigger;
679 650
680 if (trigger == IOSAPIC_EDGE) 651 if (trigger == IOSAPIC_EDGE)
681 irq_type = &irq_type_iosapic_edge; 652 irq_type = &irq_type_iosapic_edge;
682 else 653 else
683 irq_type = &irq_type_iosapic_level; 654 irq_type = &irq_type_iosapic_level;
684 655
685 idesc = irq_desc + vector; 656 idesc = irq_desc + irq;
686 if (idesc->chip != irq_type) { 657 if (idesc->chip != irq_type) {
687 if (idesc->chip != &no_irq_type) 658 if (idesc->chip != &no_irq_type)
688 printk(KERN_WARNING 659 printk(KERN_WARNING
689 "%s: changing vector %d from %s to %s\n", 660 "%s: changing vector %d from %s to %s\n",
690 __FUNCTION__, vector, 661 __FUNCTION__, irq_to_vector(irq),
691 idesc->chip->name, irq_type->name); 662 idesc->chip->name, irq_type->name);
692 idesc->chip = irq_type; 663 idesc->chip = irq_type;
693 } 664 }
@@ -695,18 +666,19 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery,
695} 666}
696 667
697static unsigned int 668static unsigned int
698get_target_cpu (unsigned int gsi, int vector) 669get_target_cpu (unsigned int gsi, int irq)
699{ 670{
700#ifdef CONFIG_SMP 671#ifdef CONFIG_SMP
701 static int cpu = -1; 672 static int cpu = -1;
702 extern int cpe_vector; 673 extern int cpe_vector;
674 cpumask_t domain = irq_to_domain(irq);
703 675
704 /* 676 /*
705 * In case of vector shared by multiple RTEs, all RTEs that 677 * In case of vector shared by multiple RTEs, all RTEs that
706 * share the vector need to use the same destination CPU. 678 * share the vector need to use the same destination CPU.
707 */ 679 */
708 if (!list_empty(&iosapic_intr_info[vector].rtes)) 680 if (!list_empty(&iosapic_intr_info[irq].rtes))
709 return iosapic_intr_info[vector].dest; 681 return iosapic_intr_info[irq].dest;
710 682
711 /* 683 /*
712 * If the platform supports redirection via XTP, let it 684 * If the platform supports redirection via XTP, let it
@@ -723,7 +695,7 @@ get_target_cpu (unsigned int gsi, int vector)
723 return cpu_physical_id(smp_processor_id()); 695 return cpu_physical_id(smp_processor_id());
724 696
725#ifdef CONFIG_ACPI 697#ifdef CONFIG_ACPI
726 if (cpe_vector > 0 && vector == IA64_CPEP_VECTOR) 698 if (cpe_vector > 0 && irq_to_vector(irq) == IA64_CPEP_VECTOR)
727 return get_cpei_target_cpu(); 699 return get_cpei_target_cpu();
728#endif 700#endif
729 701
@@ -738,7 +710,7 @@ get_target_cpu (unsigned int gsi, int vector)
738 goto skip_numa_setup; 710 goto skip_numa_setup;
739 711
740 cpu_mask = node_to_cpumask(iosapic_lists[iosapic_index].node); 712 cpu_mask = node_to_cpumask(iosapic_lists[iosapic_index].node);
741 713 cpus_and(cpu_mask, cpu_mask, domain);
742 for_each_cpu_mask(numa_cpu, cpu_mask) { 714 for_each_cpu_mask(numa_cpu, cpu_mask) {
743 if (!cpu_online(numa_cpu)) 715 if (!cpu_online(numa_cpu))
744 cpu_clear(numa_cpu, cpu_mask); 716 cpu_clear(numa_cpu, cpu_mask);
@@ -749,8 +721,8 @@ get_target_cpu (unsigned int gsi, int vector)
749 if (!num_cpus) 721 if (!num_cpus)
750 goto skip_numa_setup; 722 goto skip_numa_setup;
751 723
752 /* Use vector assignment to distribute across cpus in node */ 724 /* Use irq assignment to distribute across cpus in node */
753 cpu_index = vector % num_cpus; 725 cpu_index = irq % num_cpus;
754 726
755 for (numa_cpu = first_cpu(cpu_mask) ; i < cpu_index ; i++) 727 for (numa_cpu = first_cpu(cpu_mask) ; i < cpu_index ; i++)
756 numa_cpu = next_cpu(numa_cpu, cpu_mask); 728 numa_cpu = next_cpu(numa_cpu, cpu_mask);
@@ -768,7 +740,7 @@ skip_numa_setup:
768 do { 740 do {
769 if (++cpu >= NR_CPUS) 741 if (++cpu >= NR_CPUS)
770 cpu = 0; 742 cpu = 0;
771 } while (!cpu_online(cpu)); 743 } while (!cpu_online(cpu) || !cpu_isset(cpu, domain));
772 744
773 return cpu_physical_id(cpu); 745 return cpu_physical_id(cpu);
774#else /* CONFIG_SMP */ 746#else /* CONFIG_SMP */
@@ -785,84 +757,72 @@ int
785iosapic_register_intr (unsigned int gsi, 757iosapic_register_intr (unsigned int gsi,
786 unsigned long polarity, unsigned long trigger) 758 unsigned long polarity, unsigned long trigger)
787{ 759{
788 int vector, mask = 1, err; 760 int irq, mask = 1, err;
789 unsigned int dest; 761 unsigned int dest;
790 unsigned long flags; 762 unsigned long flags;
791 struct iosapic_rte_info *rte; 763 struct iosapic_rte_info *rte;
792 u32 low32; 764 u32 low32;
793again: 765
794 /* 766 /*
795 * If this GSI has already been registered (i.e., it's a 767 * If this GSI has already been registered (i.e., it's a
796 * shared interrupt, or we lost a race to register it), 768 * shared interrupt, or we lost a race to register it),
797 * don't touch the RTE. 769 * don't touch the RTE.
798 */ 770 */
799 spin_lock_irqsave(&iosapic_lock, flags); 771 spin_lock_irqsave(&iosapic_lock, flags);
800 { 772 irq = __gsi_to_irq(gsi);
801 vector = gsi_to_vector(gsi); 773 if (irq > 0) {
802 if (vector > 0) { 774 rte = find_rte(irq, gsi);
803 rte = gsi_vector_to_rte(gsi, vector); 775 if(iosapic_intr_info[irq].count == 0) {
776 assign_irq_vector(irq);
777 dynamic_irq_init(irq);
778 } else if (rte->refcnt != NO_REF_RTE) {
804 rte->refcnt++; 779 rte->refcnt++;
805 spin_unlock_irqrestore(&iosapic_lock, flags); 780 goto unlock_iosapic_lock;
806 return vector;
807 } 781 }
808 } 782 } else
809 spin_unlock_irqrestore(&iosapic_lock, flags); 783 irq = create_irq();
810 784
811 /* If vector is running out, we try to find a sharable vector */ 785 /* If vector is running out, we try to find a sharable vector */
812 vector = assign_irq_vector(AUTO_ASSIGN); 786 if (irq < 0) {
813 if (vector < 0) { 787 irq = iosapic_find_sharable_irq(trigger, polarity);
814 vector = iosapic_find_sharable_vector(trigger, polarity); 788 if (irq < 0)
815 if (vector < 0) 789 goto unlock_iosapic_lock;
816 return -ENOSPC;
817 } 790 }
818 791
819 spin_lock_irqsave(&irq_desc[vector].lock, flags); 792 spin_lock(&irq_desc[irq].lock);
820 spin_lock(&iosapic_lock); 793 dest = get_target_cpu(gsi, irq);
821 { 794 err = register_intr(gsi, irq, IOSAPIC_LOWEST_PRIORITY,
822 if (gsi_to_vector(gsi) > 0) { 795 polarity, trigger);
823 if (list_empty(&iosapic_intr_info[vector].rtes)) 796 if (err < 0) {
824 free_irq_vector(vector); 797 irq = err;
825 spin_unlock(&iosapic_lock); 798 goto unlock_all;
826 spin_unlock_irqrestore(&irq_desc[vector].lock,
827 flags);
828 goto again;
829 }
830
831 dest = get_target_cpu(gsi, vector);
832 err = register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY,
833 polarity, trigger);
834 if (err < 0) {
835 spin_unlock(&iosapic_lock);
836 spin_unlock_irqrestore(&irq_desc[vector].lock,
837 flags);
838 return err;
839 }
840
841 /*
842 * If the vector is shared and already unmasked for
843 * other interrupt sources, don't mask it.
844 */
845 low32 = iosapic_intr_info[vector].low32;
846 if (vector_is_shared(vector) && !(low32 & IOSAPIC_MASK))
847 mask = 0;
848 set_rte(gsi, vector, dest, mask);
849 } 799 }
850 spin_unlock(&iosapic_lock); 800
851 spin_unlock_irqrestore(&irq_desc[vector].lock, flags); 801 /*
802 * If the vector is shared and already unmasked for other
803 * interrupt sources, don't mask it.
804 */
805 low32 = iosapic_intr_info[irq].low32;
806 if (irq_is_shared(irq) && !(low32 & IOSAPIC_MASK))
807 mask = 0;
808 set_rte(gsi, irq, dest, mask);
852 809
853 printk(KERN_INFO "GSI %u (%s, %s) -> CPU %d (0x%04x) vector %d\n", 810 printk(KERN_INFO "GSI %u (%s, %s) -> CPU %d (0x%04x) vector %d\n",
854 gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"), 811 gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"),
855 (polarity == IOSAPIC_POL_HIGH ? "high" : "low"), 812 (polarity == IOSAPIC_POL_HIGH ? "high" : "low"),
856 cpu_logical_id(dest), dest, vector); 813 cpu_logical_id(dest), dest, irq_to_vector(irq));
857 814 unlock_all:
858 return vector; 815 spin_unlock(&irq_desc[irq].lock);
816 unlock_iosapic_lock:
817 spin_unlock_irqrestore(&iosapic_lock, flags);
818 return irq;
859} 819}
860 820
861void 821void
862iosapic_unregister_intr (unsigned int gsi) 822iosapic_unregister_intr (unsigned int gsi)
863{ 823{
864 unsigned long flags; 824 unsigned long flags;
865 int irq, vector, index; 825 int irq, index;
866 irq_desc_t *idesc; 826 irq_desc_t *idesc;
867 u32 low32; 827 u32 low32;
868 unsigned long trigger, polarity; 828 unsigned long trigger, polarity;
@@ -881,78 +841,56 @@ iosapic_unregister_intr (unsigned int gsi)
881 WARN_ON(1); 841 WARN_ON(1);
882 return; 842 return;
883 } 843 }
884 vector = irq_to_vector(irq);
885 844
886 idesc = irq_desc + irq; 845 spin_lock_irqsave(&iosapic_lock, flags);
887 spin_lock_irqsave(&idesc->lock, flags); 846 if ((rte = find_rte(irq, gsi)) == NULL) {
888 spin_lock(&iosapic_lock); 847 printk(KERN_ERR "iosapic_unregister_intr(%u) unbalanced\n",
889 { 848 gsi);
890 if ((rte = gsi_vector_to_rte(gsi, vector)) == NULL) { 849 WARN_ON(1);
891 printk(KERN_ERR 850 goto out;
892 "iosapic_unregister_intr(%u) unbalanced\n", 851 }
893 gsi);
894 WARN_ON(1);
895 goto out;
896 }
897 852
898 if (--rte->refcnt > 0) 853 if (--rte->refcnt > 0)
899 goto out; 854 goto out;
900 855
901 /* Mask the interrupt */ 856 idesc = irq_desc + irq;
902 low32 = iosapic_intr_info[vector].low32 | IOSAPIC_MASK; 857 rte->refcnt = NO_REF_RTE;
903 iosapic_write(rte->addr, IOSAPIC_RTE_LOW(rte->rte_index),
904 low32);
905 858
906 /* Remove the rte entry from the list */ 859 /* Mask the interrupt */
907 list_del(&rte->rte_list); 860 low32 = iosapic_intr_info[irq].low32 | IOSAPIC_MASK;
908 iosapic_intr_info[vector].count--; 861 iosapic_write(rte->iosapic, IOSAPIC_RTE_LOW(rte->rte_index), low32);
909 iosapic_free_rte(rte);
910 index = find_iosapic(gsi);
911 iosapic_lists[index].rtes_inuse--;
912 WARN_ON(iosapic_lists[index].rtes_inuse < 0);
913
914 trigger = iosapic_intr_info[vector].trigger;
915 polarity = iosapic_intr_info[vector].polarity;
916 dest = iosapic_intr_info[vector].dest;
917 printk(KERN_INFO
918 "GSI %u (%s, %s) -> CPU %d (0x%04x)"
919 " vector %d unregistered\n",
920 gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"),
921 (polarity == IOSAPIC_POL_HIGH ? "high" : "low"),
922 cpu_logical_id(dest), dest, vector);
923 862
924 if (list_empty(&iosapic_intr_info[vector].rtes)) { 863 iosapic_intr_info[irq].count--;
925 /* Sanity check */ 864 index = find_iosapic(gsi);
926 BUG_ON(iosapic_intr_info[vector].count); 865 iosapic_lists[index].rtes_inuse--;
866 WARN_ON(iosapic_lists[index].rtes_inuse < 0);
927 867
928 /* Clear the interrupt controller descriptor */ 868 trigger = iosapic_intr_info[irq].trigger;
929 idesc->chip = &no_irq_type; 869 polarity = iosapic_intr_info[irq].polarity;
870 dest = iosapic_intr_info[irq].dest;
871 printk(KERN_INFO
872 "GSI %u (%s, %s) -> CPU %d (0x%04x) vector %d unregistered\n",
873 gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"),
874 (polarity == IOSAPIC_POL_HIGH ? "high" : "low"),
875 cpu_logical_id(dest), dest, irq_to_vector(irq));
930 876
877 if (iosapic_intr_info[irq].count == 0) {
931#ifdef CONFIG_SMP 878#ifdef CONFIG_SMP
932 /* Clear affinity */ 879 /* Clear affinity */
933 cpus_setall(idesc->affinity); 880 cpus_setall(idesc->affinity);
934#endif 881#endif
935 882 /* Clear the interrupt information */
936 /* Clear the interrupt information */ 883 iosapic_intr_info[irq].dest = 0;
937 memset(&iosapic_intr_info[vector], 0, 884 iosapic_intr_info[irq].dmode = 0;
938 sizeof(struct iosapic_intr_info)); 885 iosapic_intr_info[irq].polarity = 0;
939 iosapic_intr_info[vector].low32 |= IOSAPIC_MASK; 886 iosapic_intr_info[irq].trigger = 0;
940 INIT_LIST_HEAD(&iosapic_intr_info[vector].rtes); 887 iosapic_intr_info[irq].low32 |= IOSAPIC_MASK;
941 888
942 if (idesc->action) { 889 /* Destroy and reserve IRQ */
943 printk(KERN_ERR 890 destroy_and_reserve_irq(irq);
944 "interrupt handlers still exist on"
945 "IRQ %u\n", irq);
946 WARN_ON(1);
947 }
948
949 /* Free the interrupt vector */
950 free_irq_vector(vector);
951 }
952 } 891 }
953 out: 892 out:
954 spin_unlock(&iosapic_lock); 893 spin_unlock_irqrestore(&iosapic_lock, flags);
955 spin_unlock_irqrestore(&idesc->lock, flags);
956} 894}
957 895
958/* 896/*
@@ -965,27 +903,30 @@ iosapic_register_platform_intr (u32 int_type, unsigned int gsi,
965{ 903{
966 static const char * const name[] = {"unknown", "PMI", "INIT", "CPEI"}; 904 static const char * const name[] = {"unknown", "PMI", "INIT", "CPEI"};
967 unsigned char delivery; 905 unsigned char delivery;
968 int vector, mask = 0; 906 int irq, vector, mask = 0;
969 unsigned int dest = ((id << 8) | eid) & 0xffff; 907 unsigned int dest = ((id << 8) | eid) & 0xffff;
970 908
971 switch (int_type) { 909 switch (int_type) {
972 case ACPI_INTERRUPT_PMI: 910 case ACPI_INTERRUPT_PMI:
973 vector = iosapic_vector; 911 irq = vector = iosapic_vector;
912 bind_irq_vector(irq, vector, CPU_MASK_ALL);
974 /* 913 /*
975 * since PMI vector is alloc'd by FW(ACPI) not by kernel, 914 * since PMI vector is alloc'd by FW(ACPI) not by kernel,
976 * we need to make sure the vector is available 915 * we need to make sure the vector is available
977 */ 916 */
978 iosapic_reassign_vector(vector); 917 iosapic_reassign_vector(irq);
979 delivery = IOSAPIC_PMI; 918 delivery = IOSAPIC_PMI;
980 break; 919 break;
981 case ACPI_INTERRUPT_INIT: 920 case ACPI_INTERRUPT_INIT:
982 vector = assign_irq_vector(AUTO_ASSIGN); 921 irq = create_irq();
983 if (vector < 0) 922 if (irq < 0)
984 panic("%s: out of interrupt vectors!\n", __FUNCTION__); 923 panic("%s: out of interrupt vectors!\n", __FUNCTION__);
924 vector = irq_to_vector(irq);
985 delivery = IOSAPIC_INIT; 925 delivery = IOSAPIC_INIT;
986 break; 926 break;
987 case ACPI_INTERRUPT_CPEI: 927 case ACPI_INTERRUPT_CPEI:
988 vector = IA64_CPE_VECTOR; 928 irq = vector = IA64_CPE_VECTOR;
929 BUG_ON(bind_irq_vector(irq, vector, CPU_MASK_ALL));
989 delivery = IOSAPIC_LOWEST_PRIORITY; 930 delivery = IOSAPIC_LOWEST_PRIORITY;
990 mask = 1; 931 mask = 1;
991 break; 932 break;
@@ -995,7 +936,7 @@ iosapic_register_platform_intr (u32 int_type, unsigned int gsi,
995 return -1; 936 return -1;
996 } 937 }
997 938
998 register_intr(gsi, vector, delivery, polarity, trigger); 939 register_intr(gsi, irq, delivery, polarity, trigger);
999 940
1000 printk(KERN_INFO 941 printk(KERN_INFO
1001 "PLATFORM int %s (0x%x): GSI %u (%s, %s) -> CPU %d (0x%04x)" 942 "PLATFORM int %s (0x%x): GSI %u (%s, %s) -> CPU %d (0x%04x)"
@@ -1005,7 +946,7 @@ iosapic_register_platform_intr (u32 int_type, unsigned int gsi,
1005 (polarity == IOSAPIC_POL_HIGH ? "high" : "low"), 946 (polarity == IOSAPIC_POL_HIGH ? "high" : "low"),
1006 cpu_logical_id(dest), dest, vector); 947 cpu_logical_id(dest), dest, vector);
1007 948
1008 set_rte(gsi, vector, dest, mask); 949 set_rte(gsi, irq, dest, mask);
1009 return vector; 950 return vector;
1010} 951}
1011 952
@@ -1017,30 +958,32 @@ iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi,
1017 unsigned long polarity, 958 unsigned long polarity,
1018 unsigned long trigger) 959 unsigned long trigger)
1019{ 960{
1020 int vector; 961 int vector, irq;
1021 unsigned int dest = cpu_physical_id(smp_processor_id()); 962 unsigned int dest = cpu_physical_id(smp_processor_id());
1022 963
1023 vector = isa_irq_to_vector(isa_irq); 964 irq = vector = isa_irq_to_vector(isa_irq);
1024 965 BUG_ON(bind_irq_vector(irq, vector, CPU_MASK_ALL));
1025 register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, polarity, trigger); 966 register_intr(gsi, irq, IOSAPIC_LOWEST_PRIORITY, polarity, trigger);
1026 967
1027 DBG("ISA: IRQ %u -> GSI %u (%s,%s) -> CPU %d (0x%04x) vector %d\n", 968 DBG("ISA: IRQ %u -> GSI %u (%s,%s) -> CPU %d (0x%04x) vector %d\n",
1028 isa_irq, gsi, trigger == IOSAPIC_EDGE ? "edge" : "level", 969 isa_irq, gsi, trigger == IOSAPIC_EDGE ? "edge" : "level",
1029 polarity == IOSAPIC_POL_HIGH ? "high" : "low", 970 polarity == IOSAPIC_POL_HIGH ? "high" : "low",
1030 cpu_logical_id(dest), dest, vector); 971 cpu_logical_id(dest), dest, vector);
1031 972
1032 set_rte(gsi, vector, dest, 1); 973 set_rte(gsi, irq, dest, 1);
1033} 974}
1034 975
1035void __init 976void __init
1036iosapic_system_init (int system_pcat_compat) 977iosapic_system_init (int system_pcat_compat)
1037{ 978{
1038 int vector; 979 int irq;
1039 980
1040 for (vector = 0; vector < IA64_NUM_VECTORS; ++vector) { 981 for (irq = 0; irq < NR_IRQS; ++irq) {
1041 iosapic_intr_info[vector].low32 = IOSAPIC_MASK; 982 iosapic_intr_info[irq].low32 = IOSAPIC_MASK;
1042 /* mark as unused */ 983 /* mark as unused */
1043 INIT_LIST_HEAD(&iosapic_intr_info[vector].rtes); 984 INIT_LIST_HEAD(&iosapic_intr_info[irq].rtes);
985
986 iosapic_intr_info[irq].count = 0;
1044 } 987 }
1045 988
1046 pcat_compat = system_pcat_compat; 989 pcat_compat = system_pcat_compat;
@@ -1108,31 +1051,35 @@ iosapic_init (unsigned long phys_addr, unsigned int gsi_base)
1108 unsigned long flags; 1051 unsigned long flags;
1109 1052
1110 spin_lock_irqsave(&iosapic_lock, flags); 1053 spin_lock_irqsave(&iosapic_lock, flags);
1111 { 1054 index = find_iosapic(gsi_base);
1112 addr = ioremap(phys_addr, 0); 1055 if (index >= 0) {
1113 ver = iosapic_version(addr); 1056 spin_unlock_irqrestore(&iosapic_lock, flags);
1057 return -EBUSY;
1058 }
1114 1059
1115 if ((err = iosapic_check_gsi_range(gsi_base, ver))) { 1060 addr = ioremap(phys_addr, 0);
1116 iounmap(addr); 1061 ver = iosapic_version(addr);
1117 spin_unlock_irqrestore(&iosapic_lock, flags); 1062 if ((err = iosapic_check_gsi_range(gsi_base, ver))) {
1118 return err; 1063 iounmap(addr);
1119 } 1064 spin_unlock_irqrestore(&iosapic_lock, flags);
1065 return err;
1066 }
1120 1067
1121 /* 1068 /*
1122 * The MAX_REDIR register holds the highest input pin 1069 * The MAX_REDIR register holds the highest input pin number
1123 * number (starting from 0). 1070 * (starting from 0). We add 1 so that we can use it for
1124 * We add 1 so that we can use it for number of pins (= RTEs) 1071 * number of pins (= RTEs)
1125 */ 1072 */
1126 num_rte = ((ver >> 16) & 0xff) + 1; 1073 num_rte = ((ver >> 16) & 0xff) + 1;
1127 1074
1128 index = iosapic_alloc(); 1075 index = iosapic_alloc();
1129 iosapic_lists[index].addr = addr; 1076 iosapic_lists[index].addr = addr;
1130 iosapic_lists[index].gsi_base = gsi_base; 1077 iosapic_lists[index].gsi_base = gsi_base;
1131 iosapic_lists[index].num_rte = num_rte; 1078 iosapic_lists[index].num_rte = num_rte;
1132#ifdef CONFIG_NUMA 1079#ifdef CONFIG_NUMA
1133 iosapic_lists[index].node = MAX_NUMNODES; 1080 iosapic_lists[index].node = MAX_NUMNODES;
1134#endif 1081#endif
1135 } 1082 spin_lock_init(&iosapic_lists[index].lock);
1136 spin_unlock_irqrestore(&iosapic_lock, flags); 1083 spin_unlock_irqrestore(&iosapic_lock, flags);
1137 1084
1138 if ((gsi_base == 0) && pcat_compat) { 1085 if ((gsi_base == 0) && pcat_compat) {
@@ -1157,25 +1104,22 @@ iosapic_remove (unsigned int gsi_base)
1157 unsigned long flags; 1104 unsigned long flags;
1158 1105
1159 spin_lock_irqsave(&iosapic_lock, flags); 1106 spin_lock_irqsave(&iosapic_lock, flags);
1160 { 1107 index = find_iosapic(gsi_base);
1161 index = find_iosapic(gsi_base); 1108 if (index < 0) {
1162 if (index < 0) { 1109 printk(KERN_WARNING "%s: No IOSAPIC for GSI base %u\n",
1163 printk(KERN_WARNING "%s: No IOSAPIC for GSI base %u\n", 1110 __FUNCTION__, gsi_base);
1164 __FUNCTION__, gsi_base); 1111 goto out;
1165 goto out; 1112 }
1166 }
1167
1168 if (iosapic_lists[index].rtes_inuse) {
1169 err = -EBUSY;
1170 printk(KERN_WARNING
1171 "%s: IOSAPIC for GSI base %u is busy\n",
1172 __FUNCTION__, gsi_base);
1173 goto out;
1174 }
1175 1113
1176 iounmap(iosapic_lists[index].addr); 1114 if (iosapic_lists[index].rtes_inuse) {
1177 iosapic_free(index); 1115 err = -EBUSY;
1116 printk(KERN_WARNING "%s: IOSAPIC for GSI base %u is busy\n",
1117 __FUNCTION__, gsi_base);
1118 goto out;
1178 } 1119 }
1120
1121 iounmap(iosapic_lists[index].addr);
1122 iosapic_free(index);
1179 out: 1123 out:
1180 spin_unlock_irqrestore(&iosapic_lock, flags); 1124 spin_unlock_irqrestore(&iosapic_lock, flags);
1181 return err; 1125 return err;
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index 407b45870489..cc3ee4ef37af 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -35,7 +35,7 @@ void ack_bad_irq(unsigned int irq)
35#ifdef CONFIG_IA64_GENERIC 35#ifdef CONFIG_IA64_GENERIC
36unsigned int __ia64_local_vector_to_irq (ia64_vector vec) 36unsigned int __ia64_local_vector_to_irq (ia64_vector vec)
37{ 37{
38 return (unsigned int) vec; 38 return __get_cpu_var(vector_irq)[vec];
39} 39}
40#endif 40#endif
41 41
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index bc47049f060f..91797c111162 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -46,6 +46,12 @@
46 46
47#define IRQ_DEBUG 0 47#define IRQ_DEBUG 0
48 48
49#define IRQ_VECTOR_UNASSIGNED (0)
50
51#define IRQ_UNUSED (0)
52#define IRQ_USED (1)
53#define IRQ_RSVD (2)
54
49/* These can be overridden in platform_irq_init */ 55/* These can be overridden in platform_irq_init */
50int ia64_first_device_vector = IA64_DEF_FIRST_DEVICE_VECTOR; 56int ia64_first_device_vector = IA64_DEF_FIRST_DEVICE_VECTOR;
51int ia64_last_device_vector = IA64_DEF_LAST_DEVICE_VECTOR; 57int ia64_last_device_vector = IA64_DEF_LAST_DEVICE_VECTOR;
@@ -54,6 +60,8 @@ int ia64_last_device_vector = IA64_DEF_LAST_DEVICE_VECTOR;
54void __iomem *ipi_base_addr = ((void __iomem *) 60void __iomem *ipi_base_addr = ((void __iomem *)
55 (__IA64_UNCACHED_OFFSET | IA64_IPI_DEFAULT_BASE_ADDR)); 61 (__IA64_UNCACHED_OFFSET | IA64_IPI_DEFAULT_BASE_ADDR));
56 62
63static cpumask_t vector_allocation_domain(int cpu);
64
57/* 65/*
58 * Legacy IRQ to IA-64 vector translation table. 66 * Legacy IRQ to IA-64 vector translation table.
59 */ 67 */
@@ -64,46 +72,269 @@ __u8 isa_irq_to_vector_map[16] = {
64}; 72};
65EXPORT_SYMBOL(isa_irq_to_vector_map); 73EXPORT_SYMBOL(isa_irq_to_vector_map);
66 74
67static unsigned long ia64_vector_mask[BITS_TO_LONGS(IA64_MAX_DEVICE_VECTORS)]; 75DEFINE_SPINLOCK(vector_lock);
76
77struct irq_cfg irq_cfg[NR_IRQS] __read_mostly = {
78 [0 ... NR_IRQS - 1] = {
79 .vector = IRQ_VECTOR_UNASSIGNED,
80 .domain = CPU_MASK_NONE
81 }
82};
83
84DEFINE_PER_CPU(int[IA64_NUM_VECTORS], vector_irq) = {
85 [0 ... IA64_NUM_VECTORS - 1] = IA64_SPURIOUS_INT_VECTOR
86};
87
88static cpumask_t vector_table[IA64_MAX_DEVICE_VECTORS] = {
89 [0 ... IA64_MAX_DEVICE_VECTORS - 1] = CPU_MASK_NONE
90};
91
92static int irq_status[NR_IRQS] = {
93 [0 ... NR_IRQS -1] = IRQ_UNUSED
94};
95
96int check_irq_used(int irq)
97{
98 if (irq_status[irq] == IRQ_USED)
99 return 1;
100
101 return -1;
102}
103
104static void reserve_irq(unsigned int irq)
105{
106 unsigned long flags;
107
108 spin_lock_irqsave(&vector_lock, flags);
109 irq_status[irq] = IRQ_RSVD;
110 spin_unlock_irqrestore(&vector_lock, flags);
111}
112
113static inline int find_unassigned_irq(void)
114{
115 int irq;
116
117 for (irq = IA64_FIRST_DEVICE_VECTOR; irq < NR_IRQS; irq++)
118 if (irq_status[irq] == IRQ_UNUSED)
119 return irq;
120 return -ENOSPC;
121}
122
123static inline int find_unassigned_vector(cpumask_t domain)
124{
125 cpumask_t mask;
126 int pos;
127
128 cpus_and(mask, domain, cpu_online_map);
129 if (cpus_empty(mask))
130 return -EINVAL;
131
132 for (pos = 0; pos < IA64_NUM_DEVICE_VECTORS; pos++) {
133 cpus_and(mask, domain, vector_table[pos]);
134 if (!cpus_empty(mask))
135 continue;
136 return IA64_FIRST_DEVICE_VECTOR + pos;
137 }
138 return -ENOSPC;
139}
140
141static int __bind_irq_vector(int irq, int vector, cpumask_t domain)
142{
143 cpumask_t mask;
144 int cpu, pos;
145 struct irq_cfg *cfg = &irq_cfg[irq];
146
147 cpus_and(mask, domain, cpu_online_map);
148 if (cpus_empty(mask))
149 return -EINVAL;
150 if ((cfg->vector == vector) && cpus_equal(cfg->domain, domain))
151 return 0;
152 if (cfg->vector != IRQ_VECTOR_UNASSIGNED)
153 return -EBUSY;
154 for_each_cpu_mask(cpu, mask)
155 per_cpu(vector_irq, cpu)[vector] = irq;
156 cfg->vector = vector;
157 cfg->domain = domain;
158 irq_status[irq] = IRQ_USED;
159 pos = vector - IA64_FIRST_DEVICE_VECTOR;
160 cpus_or(vector_table[pos], vector_table[pos], domain);
161 return 0;
162}
163
164int bind_irq_vector(int irq, int vector, cpumask_t domain)
165{
166 unsigned long flags;
167 int ret;
168
169 spin_lock_irqsave(&vector_lock, flags);
170 ret = __bind_irq_vector(irq, vector, domain);
171 spin_unlock_irqrestore(&vector_lock, flags);
172 return ret;
173}
174
175static void __clear_irq_vector(int irq)
176{
177 int vector, cpu, pos;
178 cpumask_t mask;
179 cpumask_t domain;
180 struct irq_cfg *cfg = &irq_cfg[irq];
181
182 BUG_ON((unsigned)irq >= NR_IRQS);
183 BUG_ON(cfg->vector == IRQ_VECTOR_UNASSIGNED);
184 vector = cfg->vector;
185 domain = cfg->domain;
186 cpus_and(mask, cfg->domain, cpu_online_map);
187 for_each_cpu_mask(cpu, mask)
188 per_cpu(vector_irq, cpu)[vector] = IA64_SPURIOUS_INT_VECTOR;
189 cfg->vector = IRQ_VECTOR_UNASSIGNED;
190 cfg->domain = CPU_MASK_NONE;
191 irq_status[irq] = IRQ_UNUSED;
192 pos = vector - IA64_FIRST_DEVICE_VECTOR;
193 cpus_andnot(vector_table[pos], vector_table[pos], domain);
194}
195
196static void clear_irq_vector(int irq)
197{
198 unsigned long flags;
199
200 spin_lock_irqsave(&vector_lock, flags);
201 __clear_irq_vector(irq);
202 spin_unlock_irqrestore(&vector_lock, flags);
203}
68 204
69int 205int
70assign_irq_vector (int irq) 206assign_irq_vector (int irq)
71{ 207{
72 int pos, vector; 208 unsigned long flags;
73 again: 209 int vector, cpu;
74 pos = find_first_zero_bit(ia64_vector_mask, IA64_NUM_DEVICE_VECTORS); 210 cpumask_t domain;
75 vector = IA64_FIRST_DEVICE_VECTOR + pos; 211
76 if (vector > IA64_LAST_DEVICE_VECTOR) 212 vector = -ENOSPC;
77 return -ENOSPC; 213
78 if (test_and_set_bit(pos, ia64_vector_mask)) 214 spin_lock_irqsave(&vector_lock, flags);
79 goto again; 215 if (irq < 0) {
216 goto out;
217 }
218 for_each_online_cpu(cpu) {
219 domain = vector_allocation_domain(cpu);
220 vector = find_unassigned_vector(domain);
221 if (vector >= 0)
222 break;
223 }
224 if (vector < 0)
225 goto out;
226 BUG_ON(__bind_irq_vector(irq, vector, domain));
227 out:
228 spin_unlock_irqrestore(&vector_lock, flags);
80 return vector; 229 return vector;
81} 230}
82 231
83void 232void
84free_irq_vector (int vector) 233free_irq_vector (int vector)
85{ 234{
86 int pos; 235 if (vector < IA64_FIRST_DEVICE_VECTOR ||
87 236 vector > IA64_LAST_DEVICE_VECTOR)
88 if (vector < IA64_FIRST_DEVICE_VECTOR || vector > IA64_LAST_DEVICE_VECTOR)
89 return; 237 return;
90 238 clear_irq_vector(vector);
91 pos = vector - IA64_FIRST_DEVICE_VECTOR;
92 if (!test_and_clear_bit(pos, ia64_vector_mask))
93 printk(KERN_WARNING "%s: double free!\n", __FUNCTION__);
94} 239}
95 240
96int 241int
97reserve_irq_vector (int vector) 242reserve_irq_vector (int vector)
98{ 243{
99 int pos;
100
101 if (vector < IA64_FIRST_DEVICE_VECTOR || 244 if (vector < IA64_FIRST_DEVICE_VECTOR ||
102 vector > IA64_LAST_DEVICE_VECTOR) 245 vector > IA64_LAST_DEVICE_VECTOR)
103 return -EINVAL; 246 return -EINVAL;
247 return !!bind_irq_vector(vector, vector, CPU_MASK_ALL);
248}
104 249
105 pos = vector - IA64_FIRST_DEVICE_VECTOR; 250/*
106 return test_and_set_bit(pos, ia64_vector_mask); 251 * Initialize vector_irq on a new cpu. This function must be called
252 * with vector_lock held.
253 */
254void __setup_vector_irq(int cpu)
255{
256 int irq, vector;
257
258 /* Clear vector_irq */
259 for (vector = 0; vector < IA64_NUM_VECTORS; ++vector)
260 per_cpu(vector_irq, cpu)[vector] = IA64_SPURIOUS_INT_VECTOR;
261 /* Mark the inuse vectors */
262 for (irq = 0; irq < NR_IRQS; ++irq) {
263 if (!cpu_isset(cpu, irq_cfg[irq].domain))
264 continue;
265 vector = irq_to_vector(irq);
266 per_cpu(vector_irq, cpu)[vector] = irq;
267 }
268}
269
270#if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG))
271static enum vector_domain_type {
272 VECTOR_DOMAIN_NONE,
273 VECTOR_DOMAIN_PERCPU
274} vector_domain_type = VECTOR_DOMAIN_NONE;
275
276static cpumask_t vector_allocation_domain(int cpu)
277{
278 if (vector_domain_type == VECTOR_DOMAIN_PERCPU)
279 return cpumask_of_cpu(cpu);
280 return CPU_MASK_ALL;
281}
282
283static int __init parse_vector_domain(char *arg)
284{
285 if (!arg)
286 return -EINVAL;
287 if (!strcmp(arg, "percpu")) {
288 vector_domain_type = VECTOR_DOMAIN_PERCPU;
289 no_int_routing = 1;
290 }
291 return 1;
292}
293early_param("vector", parse_vector_domain);
294#else
295static cpumask_t vector_allocation_domain(int cpu)
296{
297 return CPU_MASK_ALL;
298}
299#endif
300
301
302void destroy_and_reserve_irq(unsigned int irq)
303{
304 dynamic_irq_cleanup(irq);
305
306 clear_irq_vector(irq);
307 reserve_irq(irq);
308}
309
310static int __reassign_irq_vector(int irq, int cpu)
311{
312 struct irq_cfg *cfg = &irq_cfg[irq];
313 int vector;
314 cpumask_t domain;
315
316 if (cfg->vector == IRQ_VECTOR_UNASSIGNED || !cpu_online(cpu))
317 return -EINVAL;
318 if (cpu_isset(cpu, cfg->domain))
319 return 0;
320 domain = vector_allocation_domain(cpu);
321 vector = find_unassigned_vector(domain);
322 if (vector < 0)
323 return -ENOSPC;
324 __clear_irq_vector(irq);
325 BUG_ON(__bind_irq_vector(irq, vector, domain));
326 return 0;
327}
328
329int reassign_irq_vector(int irq, int cpu)
330{
331 unsigned long flags;
332 int ret;
333
334 spin_lock_irqsave(&vector_lock, flags);
335 ret = __reassign_irq_vector(irq, cpu);
336 spin_unlock_irqrestore(&vector_lock, flags);
337 return ret;
107} 338}
108 339
109/* 340/*
@@ -111,18 +342,35 @@ reserve_irq_vector (int vector)
111 */ 342 */
112int create_irq(void) 343int create_irq(void)
113{ 344{
114 int vector = assign_irq_vector(AUTO_ASSIGN); 345 unsigned long flags;
115 346 int irq, vector, cpu;
116 if (vector >= 0) 347 cpumask_t domain;
117 dynamic_irq_init(vector); 348
118 349 irq = vector = -ENOSPC;
119 return vector; 350 spin_lock_irqsave(&vector_lock, flags);
351 for_each_online_cpu(cpu) {
352 domain = vector_allocation_domain(cpu);
353 vector = find_unassigned_vector(domain);
354 if (vector >= 0)
355 break;
356 }
357 if (vector < 0)
358 goto out;
359 irq = find_unassigned_irq();
360 if (irq < 0)
361 goto out;
362 BUG_ON(__bind_irq_vector(irq, vector, domain));
363 out:
364 spin_unlock_irqrestore(&vector_lock, flags);
365 if (irq >= 0)
366 dynamic_irq_init(irq);
367 return irq;
120} 368}
121 369
122void destroy_irq(unsigned int irq) 370void destroy_irq(unsigned int irq)
123{ 371{
124 dynamic_irq_cleanup(irq); 372 dynamic_irq_cleanup(irq);
125 free_irq_vector(irq); 373 clear_irq_vector(irq);
126} 374}
127 375
128#ifdef CONFIG_SMP 376#ifdef CONFIG_SMP
@@ -301,14 +549,13 @@ register_percpu_irq (ia64_vector vec, struct irqaction *action)
301 irq_desc_t *desc; 549 irq_desc_t *desc;
302 unsigned int irq; 550 unsigned int irq;
303 551
304 for (irq = 0; irq < NR_IRQS; ++irq) 552 irq = vec;
305 if (irq_to_vector(irq) == vec) { 553 BUG_ON(bind_irq_vector(irq, vec, CPU_MASK_ALL));
306 desc = irq_desc + irq; 554 desc = irq_desc + irq;
307 desc->status |= IRQ_PER_CPU; 555 desc->status |= IRQ_PER_CPU;
308 desc->chip = &irq_type_ia64_lsapic; 556 desc->chip = &irq_type_ia64_lsapic;
309 if (action) 557 if (action)
310 setup_irq(irq, action); 558 setup_irq(irq, action);
311 }
312} 559}
313 560
314void __init 561void __init
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index 5bc46f151344..5dc98b5abcfb 100644
--- a/arch/ia64/kernel/kprobes.c
+++ b/arch/ia64/kernel/kprobes.c
@@ -936,10 +936,15 @@ static void ia64_get_bsp_cfm(struct unw_frame_info *info, void *arg)
936 return; 936 return;
937} 937}
938 938
939unsigned long arch_deref_entry_point(void *entry)
940{
941 return ((struct fnptr *)entry)->ip;
942}
943
939int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) 944int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
940{ 945{
941 struct jprobe *jp = container_of(p, struct jprobe, kp); 946 struct jprobe *jp = container_of(p, struct jprobe, kp);
942 unsigned long addr = ((struct fnptr *)(jp->entry))->ip; 947 unsigned long addr = arch_deref_entry_point(jp->entry);
943 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); 948 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
944 struct param_bsp_cfm pa; 949 struct param_bsp_cfm pa;
945 int bytes; 950 int bytes;
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 1ead5ea6c5ce..4b5daa3cc0fe 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -57,6 +57,9 @@
57 * 57 *
58 * 2006-09-15 Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> 58 * 2006-09-15 Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
59 * Add printing support for MCA/INIT. 59 * Add printing support for MCA/INIT.
60 *
61 * 2007-04-27 Russ Anderson <rja@sgi.com>
62 * Support multiple cpus going through OS_MCA in the same event.
60 */ 63 */
61#include <linux/types.h> 64#include <linux/types.h>
62#include <linux/init.h> 65#include <linux/init.h>
@@ -96,7 +99,6 @@
96#endif 99#endif
97 100
98/* Used by mca_asm.S */ 101/* Used by mca_asm.S */
99u32 ia64_mca_serialize;
100DEFINE_PER_CPU(u64, ia64_mca_data); /* == __per_cpu_mca[smp_processor_id()] */ 102DEFINE_PER_CPU(u64, ia64_mca_data); /* == __per_cpu_mca[smp_processor_id()] */
101DEFINE_PER_CPU(u64, ia64_mca_per_cpu_pte); /* PTE to map per-CPU area */ 103DEFINE_PER_CPU(u64, ia64_mca_per_cpu_pte); /* PTE to map per-CPU area */
102DEFINE_PER_CPU(u64, ia64_mca_pal_pte); /* PTE to map PAL code */ 104DEFINE_PER_CPU(u64, ia64_mca_pal_pte); /* PTE to map PAL code */
@@ -963,11 +965,12 @@ ia64_mca_modify_original_stack(struct pt_regs *regs,
963 goto no_mod; 965 goto no_mod;
964 } 966 }
965 967
968 if (r13 != sos->prev_IA64_KR_CURRENT) {
969 msg = "inconsistent previous current and r13";
970 goto no_mod;
971 }
972
966 if (!mca_recover_range(ms->pmsa_iip)) { 973 if (!mca_recover_range(ms->pmsa_iip)) {
967 if (r13 != sos->prev_IA64_KR_CURRENT) {
968 msg = "inconsistent previous current and r13";
969 goto no_mod;
970 }
971 if ((r12 - r13) >= KERNEL_STACK_SIZE) { 974 if ((r12 - r13) >= KERNEL_STACK_SIZE) {
972 msg = "inconsistent r12 and r13"; 975 msg = "inconsistent r12 and r13";
973 goto no_mod; 976 goto no_mod;
@@ -1187,6 +1190,13 @@ all_in:
1187 * further MCA logging is enabled by clearing logs. 1190 * further MCA logging is enabled by clearing logs.
1188 * Monarch also has the duty of sending wakeup-IPIs to pull the 1191 * Monarch also has the duty of sending wakeup-IPIs to pull the
1189 * slave processors out of rendezvous spinloop. 1192 * slave processors out of rendezvous spinloop.
1193 *
1194 * If multiple processors call into OS_MCA, the first will become
1195 * the monarch. Subsequent cpus will be recorded in the mca_cpu
1196 * bitmask. After the first monarch has processed its MCA, it
1197 * will wake up the next cpu in the mca_cpu bitmask and then go
1198 * into the rendezvous loop. When all processors have serviced
1199 * their MCA, the last monarch frees up the rest of the processors.
1190 */ 1200 */
1191void 1201void
1192ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw, 1202ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
@@ -1196,16 +1206,32 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
1196 struct task_struct *previous_current; 1206 struct task_struct *previous_current;
1197 struct ia64_mca_notify_die nd = 1207 struct ia64_mca_notify_die nd =
1198 { .sos = sos, .monarch_cpu = &monarch_cpu }; 1208 { .sos = sos, .monarch_cpu = &monarch_cpu };
1209 static atomic_t mca_count;
1210 static cpumask_t mca_cpu;
1199 1211
1212 if (atomic_add_return(1, &mca_count) == 1) {
1213 monarch_cpu = cpu;
1214 sos->monarch = 1;
1215 } else {
1216 cpu_set(cpu, mca_cpu);
1217 sos->monarch = 0;
1218 }
1200 mprintk(KERN_INFO "Entered OS MCA handler. PSP=%lx cpu=%d " 1219 mprintk(KERN_INFO "Entered OS MCA handler. PSP=%lx cpu=%d "
1201 "monarch=%ld\n", sos->proc_state_param, cpu, sos->monarch); 1220 "monarch=%ld\n", sos->proc_state_param, cpu, sos->monarch);
1202 1221
1203 previous_current = ia64_mca_modify_original_stack(regs, sw, sos, "MCA"); 1222 previous_current = ia64_mca_modify_original_stack(regs, sw, sos, "MCA");
1204 monarch_cpu = cpu; 1223
1205 if (notify_die(DIE_MCA_MONARCH_ENTER, "MCA", regs, (long)&nd, 0, 0) 1224 if (notify_die(DIE_MCA_MONARCH_ENTER, "MCA", regs, (long)&nd, 0, 0)
1206 == NOTIFY_STOP) 1225 == NOTIFY_STOP)
1207 ia64_mca_spin(__FUNCTION__); 1226 ia64_mca_spin(__FUNCTION__);
1208 ia64_wait_for_slaves(cpu, "MCA"); 1227 if (sos->monarch) {
1228 ia64_wait_for_slaves(cpu, "MCA");
1229 } else {
1230 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_CONCURRENT_MCA;
1231 while (cpu_isset(cpu, mca_cpu))
1232 cpu_relax(); /* spin until monarch wakes us */
1233 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_NOTDONE;
1234 }
1209 1235
1210 /* Wakeup all the processors which are spinning in the rendezvous loop. 1236 /* Wakeup all the processors which are spinning in the rendezvous loop.
1211 * They will leave SAL, then spin in the OS with interrupts disabled 1237 * They will leave SAL, then spin in the OS with interrupts disabled
@@ -1244,6 +1270,26 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
1244 == NOTIFY_STOP) 1270 == NOTIFY_STOP)
1245 ia64_mca_spin(__FUNCTION__); 1271 ia64_mca_spin(__FUNCTION__);
1246 1272
1273
1274 if (atomic_dec_return(&mca_count) > 0) {
1275 int i;
1276
1277 /* wake up the next monarch cpu,
1278 * and put this cpu in the rendez loop.
1279 */
1280 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_CONCURRENT_MCA;
1281 for_each_online_cpu(i) {
1282 if (cpu_isset(i, mca_cpu)) {
1283 monarch_cpu = i;
1284 cpu_clear(i, mca_cpu); /* wake next cpu */
1285 while (monarch_cpu != -1)
1286 cpu_relax(); /* spin until last cpu leaves */
1287 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_NOTDONE;
1288 set_curr_task(cpu, previous_current);
1289 return;
1290 }
1291 }
1292 }
1247 set_curr_task(cpu, previous_current); 1293 set_curr_task(cpu, previous_current);
1248 monarch_cpu = -1; 1294 monarch_cpu = -1;
1249} 1295}
diff --git a/arch/ia64/kernel/mca_asm.S b/arch/ia64/kernel/mca_asm.S
index 8c9c26aa6ae0..0f5965fcdf85 100644
--- a/arch/ia64/kernel/mca_asm.S
+++ b/arch/ia64/kernel/mca_asm.S
@@ -133,14 +133,6 @@ ia64_do_tlb_purge:
133//StartMain//////////////////////////////////////////////////////////////////// 133//StartMain////////////////////////////////////////////////////////////////////
134 134
135ia64_os_mca_dispatch: 135ia64_os_mca_dispatch:
136 // Serialize all MCA processing
137 mov r3=1;;
138 LOAD_PHYSICAL(p0,r2,ia64_mca_serialize);;
139ia64_os_mca_spin:
140 xchg4 r4=[r2],r3;;
141 cmp.ne p6,p0=r4,r0
142(p6) br ia64_os_mca_spin
143
144 mov r3=IA64_MCA_CPU_MCA_STACK_OFFSET // use the MCA stack 136 mov r3=IA64_MCA_CPU_MCA_STACK_OFFSET // use the MCA stack
145 LOAD_PHYSICAL(p0,r2,1f) // return address 137 LOAD_PHYSICAL(p0,r2,1f) // return address
146 mov r19=1 // All MCA events are treated as monarch (for now) 138 mov r19=1 // All MCA events are treated as monarch (for now)
@@ -291,10 +283,6 @@ END(ia64_os_mca_virtual_begin)
291 283
292 mov b0=r12 // SAL_CHECK return address 284 mov b0=r12 // SAL_CHECK return address
293 285
294 // release lock
295 LOAD_PHYSICAL(p0,r3,ia64_mca_serialize);;
296 st4.rel [r3]=r0
297
298 br b0 286 br b0
299 287
300//EndMain////////////////////////////////////////////////////////////////////// 288//EndMain//////////////////////////////////////////////////////////////////////
diff --git a/arch/ia64/kernel/mca_drv_asm.S b/arch/ia64/kernel/mca_drv_asm.S
index f2d4900751ba..3bccb06c8d21 100644
--- a/arch/ia64/kernel/mca_drv_asm.S
+++ b/arch/ia64/kernel/mca_drv_asm.S
@@ -40,7 +40,11 @@ GLOBAL_ENTRY(mca_handler_bhhook)
40 mov b6=loc1 40 mov b6=loc1
41 ;; 41 ;;
42 mov loc1=rp 42 mov loc1=rp
43 ssm psr.i | psr.ic 43 ssm psr.ic
44 ;;
45 srlz.i
46 ;;
47 ssm psr.i
44 br.call.sptk.many rp=b6 // does not return ... 48 br.call.sptk.many rp=b6 // does not return ...
45 ;; 49 ;;
46 mov ar.pfs=loc0 50 mov ar.pfs=loc0
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c
index c81080df70df..2fdbd5c3f213 100644
--- a/arch/ia64/kernel/msi_ia64.c
+++ b/arch/ia64/kernel/msi_ia64.c
@@ -13,6 +13,7 @@
13 13
14#define MSI_DATA_VECTOR_SHIFT 0 14#define MSI_DATA_VECTOR_SHIFT 0
15#define MSI_DATA_VECTOR(v) (((u8)v) << MSI_DATA_VECTOR_SHIFT) 15#define MSI_DATA_VECTOR(v) (((u8)v) << MSI_DATA_VECTOR_SHIFT)
16#define MSI_DATA_VECTOR_MASK 0xffffff00
16 17
17#define MSI_DATA_DELIVERY_SHIFT 8 18#define MSI_DATA_DELIVERY_SHIFT 8
18#define MSI_DATA_DELIVERY_FIXED (0 << MSI_DATA_DELIVERY_SHIFT) 19#define MSI_DATA_DELIVERY_FIXED (0 << MSI_DATA_DELIVERY_SHIFT)
@@ -50,17 +51,29 @@ static struct irq_chip ia64_msi_chip;
50static void ia64_set_msi_irq_affinity(unsigned int irq, cpumask_t cpu_mask) 51static void ia64_set_msi_irq_affinity(unsigned int irq, cpumask_t cpu_mask)
51{ 52{
52 struct msi_msg msg; 53 struct msi_msg msg;
53 u32 addr; 54 u32 addr, data;
55 int cpu = first_cpu(cpu_mask);
56
57 if (!cpu_online(cpu))
58 return;
59
60 if (reassign_irq_vector(irq, cpu))
61 return;
54 62
55 read_msi_msg(irq, &msg); 63 read_msi_msg(irq, &msg);
56 64
57 addr = msg.address_lo; 65 addr = msg.address_lo;
58 addr &= MSI_ADDR_DESTID_MASK; 66 addr &= MSI_ADDR_DESTID_MASK;
59 addr |= MSI_ADDR_DESTID_CPU(cpu_physical_id(first_cpu(cpu_mask))); 67 addr |= MSI_ADDR_DESTID_CPU(cpu_physical_id(cpu));
60 msg.address_lo = addr; 68 msg.address_lo = addr;
61 69
70 data = msg.data;
71 data &= MSI_DATA_VECTOR_MASK;
72 data |= MSI_DATA_VECTOR(irq_to_vector(irq));
73 msg.data = data;
74
62 write_msi_msg(irq, &msg); 75 write_msi_msg(irq, &msg);
63 irq_desc[irq].affinity = cpu_mask; 76 irq_desc[irq].affinity = cpumask_of_cpu(cpu);
64} 77}
65#endif /* CONFIG_SMP */ 78#endif /* CONFIG_SMP */
66 79
@@ -69,13 +82,15 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
69 struct msi_msg msg; 82 struct msi_msg msg;
70 unsigned long dest_phys_id; 83 unsigned long dest_phys_id;
71 int irq, vector; 84 int irq, vector;
85 cpumask_t mask;
72 86
73 irq = create_irq(); 87 irq = create_irq();
74 if (irq < 0) 88 if (irq < 0)
75 return irq; 89 return irq;
76 90
77 set_irq_msi(irq, desc); 91 set_irq_msi(irq, desc);
78 dest_phys_id = cpu_physical_id(first_cpu(cpu_online_map)); 92 cpus_and(mask, irq_to_domain(irq), cpu_online_map);
93 dest_phys_id = cpu_physical_id(first_cpu(mask));
79 vector = irq_to_vector(irq); 94 vector = irq_to_vector(irq);
80 95
81 msg.address_hi = 0; 96 msg.address_hi = 0;
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index af73b8dfde28..fa40cba43350 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -513,7 +513,8 @@ copy_thread (int nr, unsigned long clone_flags,
513static void 513static void
514do_copy_task_regs (struct task_struct *task, struct unw_frame_info *info, void *arg) 514do_copy_task_regs (struct task_struct *task, struct unw_frame_info *info, void *arg)
515{ 515{
516 unsigned long mask, sp, nat_bits = 0, ip, ar_rnat, urbs_end, cfm; 516 unsigned long mask, sp, nat_bits = 0, ar_rnat, urbs_end, cfm;
517 unsigned long uninitialized_var(ip); /* GCC be quiet */
517 elf_greg_t *dst = arg; 518 elf_greg_t *dst = arg;
518 struct pt_regs *pt; 519 struct pt_regs *pt;
519 char nat; 520 char nat;
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index eaa6a24bc0b6..cf06fe799041 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -390,10 +390,6 @@ early_console_setup (char *cmdline)
390 if (!efi_setup_pcdp_console(cmdline)) 390 if (!efi_setup_pcdp_console(cmdline))
391 earlycons++; 391 earlycons++;
392#endif 392#endif
393#ifdef CONFIG_SERIAL_8250_CONSOLE
394 if (!early_serial_console_init(cmdline))
395 earlycons++;
396#endif
397 393
398 return (earlycons) ? 0 : -1; 394 return (earlycons) ? 0 : -1;
399} 395}
@@ -805,7 +801,6 @@ static void __cpuinit
805get_max_cacheline_size (void) 801get_max_cacheline_size (void)
806{ 802{
807 unsigned long line_size, max = 1; 803 unsigned long line_size, max = 1;
808 unsigned int cache_size = 0;
809 u64 l, levels, unique_caches; 804 u64 l, levels, unique_caches;
810 pal_cache_config_info_t cci; 805 pal_cache_config_info_t cci;
811 s64 status; 806 s64 status;
@@ -835,8 +830,6 @@ get_max_cacheline_size (void)
835 line_size = 1 << cci.pcci_line_size; 830 line_size = 1 << cci.pcci_line_size;
836 if (line_size > max) 831 if (line_size > max)
837 max = line_size; 832 max = line_size;
838 if (cache_size < cci.pcci_cache_size)
839 cache_size = cci.pcci_cache_size;
840 if (!cci.pcci_unified) { 833 if (!cci.pcci_unified) {
841 status = ia64_pal_cache_config_info(l, 834 status = ia64_pal_cache_config_info(l,
842 /* cache_type (instruction)= */ 1, 835 /* cache_type (instruction)= */ 1,
@@ -853,9 +846,6 @@ get_max_cacheline_size (void)
853 ia64_i_cache_stride_shift = cci.pcci_stride; 846 ia64_i_cache_stride_shift = cci.pcci_stride;
854 } 847 }
855 out: 848 out:
856#ifdef CONFIG_SMP
857 max_cache_size = max(max_cache_size, cache_size);
858#endif
859 if (max > ia64_max_cacheline_size) 849 if (max > ia64_max_cacheline_size)
860 ia64_max_cacheline_size = max; 850 ia64_max_cacheline_size = max;
861} 851}
@@ -990,15 +980,6 @@ cpu_init (void)
990 pm_idle = default_idle; 980 pm_idle = default_idle;
991} 981}
992 982
993/*
994 * On SMP systems, when the scheduler does migration-cost autodetection,
995 * it needs a way to flush as much of the CPU's caches as possible.
996 */
997void sched_cacheflush(void)
998{
999 ia64_sal_cache_flush(3);
1000}
1001
1002void __init 983void __init
1003check_bugs (void) 984check_bugs (void)
1004{ 985{
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index b3a47f986e1e..9f72838db26e 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -82,7 +82,7 @@ static volatile struct call_data_struct *call_data;
82#define IPI_KDUMP_CPU_STOP 3 82#define IPI_KDUMP_CPU_STOP 3
83 83
84/* This needs to be cacheline aligned because it is written to by *other* CPUs. */ 84/* This needs to be cacheline aligned because it is written to by *other* CPUs. */
85static DEFINE_PER_CPU(u64, ipi_operation) ____cacheline_aligned; 85static DEFINE_PER_CPU_SHARED_ALIGNED(u64, ipi_operation);
86 86
87extern void cpu_halt (void); 87extern void cpu_halt (void);
88 88
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 3c9d8e6089cf..9f5c90b594b9 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -395,9 +395,13 @@ smp_callin (void)
395 fix_b0_for_bsp(); 395 fix_b0_for_bsp();
396 396
397 lock_ipi_calllock(); 397 lock_ipi_calllock();
398 spin_lock(&vector_lock);
399 /* Setup the per cpu irq handling data structures */
400 __setup_vector_irq(cpuid);
398 cpu_set(cpuid, cpu_online_map); 401 cpu_set(cpuid, cpu_online_map);
399 unlock_ipi_calllock(); 402 unlock_ipi_calllock();
400 per_cpu(cpu_state, cpuid) = CPU_ONLINE; 403 per_cpu(cpu_state, cpuid) = CPU_ONLINE;
404 spin_unlock(&vector_lock);
401 405
402 smp_setup_percpu_timer(); 406 smp_setup_percpu_timer();
403 407
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index a06667c7acc0..627785c48ea9 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -18,8 +18,8 @@
18#include <linux/time.h> 18#include <linux/time.h>
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/efi.h> 20#include <linux/efi.h>
21#include <linux/profile.h>
22#include <linux/timex.h> 21#include <linux/timex.h>
22#include <linux/clocksource.h>
23 23
24#include <asm/machvec.h> 24#include <asm/machvec.h>
25#include <asm/delay.h> 25#include <asm/delay.h>
@@ -29,6 +29,16 @@
29#include <asm/sections.h> 29#include <asm/sections.h>
30#include <asm/system.h> 30#include <asm/system.h>
31 31
32#include "fsyscall_gtod_data.h"
33
34static cycle_t itc_get_cycles(void);
35
36struct fsyscall_gtod_data_t fsyscall_gtod_data = {
37 .lock = SEQLOCK_UNLOCKED,
38};
39
40struct itc_jitter_data_t itc_jitter_data;
41
32volatile int time_keeper_id = 0; /* smp_processor_id() of time-keeper */ 42volatile int time_keeper_id = 0; /* smp_processor_id() of time-keeper */
33 43
34#ifdef CONFIG_IA64_DEBUG_IRQ 44#ifdef CONFIG_IA64_DEBUG_IRQ
@@ -38,11 +48,16 @@ EXPORT_SYMBOL(last_cli_ip);
38 48
39#endif 49#endif
40 50
41static struct time_interpolator itc_interpolator = { 51static struct clocksource clocksource_itc = {
42 .shift = 16, 52 .name = "itc",
43 .mask = 0xffffffffffffffffLL, 53 .rating = 350,
44 .source = TIME_SOURCE_CPU 54 .read = itc_get_cycles,
55 .mask = 0xffffffffffffffff,
56 .mult = 0, /*to be caluclated*/
57 .shift = 16,
58 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
45}; 59};
60static struct clocksource *itc_clocksource;
46 61
47static irqreturn_t 62static irqreturn_t
48timer_interrupt (int irq, void *dev_id) 63timer_interrupt (int irq, void *dev_id)
@@ -211,8 +226,6 @@ ia64_init_itm (void)
211 + itc_freq/2)/itc_freq; 226 + itc_freq/2)/itc_freq;
212 227
213 if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)) { 228 if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)) {
214 itc_interpolator.frequency = local_cpu_data->itc_freq;
215 itc_interpolator.drift = itc_drift;
216#ifdef CONFIG_SMP 229#ifdef CONFIG_SMP
217 /* On IA64 in an SMP configuration ITCs are never accurately synchronized. 230 /* On IA64 in an SMP configuration ITCs are never accurately synchronized.
218 * Jitter compensation requires a cmpxchg which may limit 231 * Jitter compensation requires a cmpxchg which may limit
@@ -224,15 +237,50 @@ ia64_init_itm (void)
224 * even going backward) if the ITC offsets between the individual CPUs 237 * even going backward) if the ITC offsets between the individual CPUs
225 * are too large. 238 * are too large.
226 */ 239 */
227 if (!nojitter) itc_interpolator.jitter = 1; 240 if (!nojitter)
241 itc_jitter_data.itc_jitter = 1;
228#endif 242#endif
229 register_time_interpolator(&itc_interpolator);
230 } 243 }
231 244
232 /* Setup the CPU local timer tick */ 245 /* Setup the CPU local timer tick */
233 ia64_cpu_local_tick(); 246 ia64_cpu_local_tick();
247
248 if (!itc_clocksource) {
249 /* Sort out mult/shift values: */
250 clocksource_itc.mult =
251 clocksource_hz2mult(local_cpu_data->itc_freq,
252 clocksource_itc.shift);
253 clocksource_register(&clocksource_itc);
254 itc_clocksource = &clocksource_itc;
255 }
256}
257
258static cycle_t itc_get_cycles()
259{
260 u64 lcycle, now, ret;
261
262 if (!itc_jitter_data.itc_jitter)
263 return get_cycles();
264
265 lcycle = itc_jitter_data.itc_lastcycle;
266 now = get_cycles();
267 if (lcycle && time_after(lcycle, now))
268 return lcycle;
269
270 /*
271 * Keep track of the last timer value returned.
272 * In an SMP environment, you could lose out in contention of
273 * cmpxchg. If so, your cmpxchg returns new value which the
274 * winner of contention updated to. Use the new value instead.
275 */
276 ret = cmpxchg(&itc_jitter_data.itc_lastcycle, lcycle, now);
277 if (unlikely(ret != lcycle))
278 return ret;
279
280 return now;
234} 281}
235 282
283
236static struct irqaction timer_irqaction = { 284static struct irqaction timer_irqaction = {
237 .handler = timer_interrupt, 285 .handler = timer_interrupt,
238 .flags = IRQF_DISABLED | IRQF_IRQPOLL, 286 .flags = IRQF_DISABLED | IRQF_IRQPOLL,
@@ -308,3 +356,34 @@ ia64_setup_printk_clock(void)
308 if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)) 356 if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT))
309 ia64_printk_clock = ia64_itc_printk_clock; 357 ia64_printk_clock = ia64_itc_printk_clock;
310} 358}
359
360void update_vsyscall(struct timespec *wall, struct clocksource *c)
361{
362 unsigned long flags;
363
364 write_seqlock_irqsave(&fsyscall_gtod_data.lock, flags);
365
366 /* copy fsyscall clock data */
367 fsyscall_gtod_data.clk_mask = c->mask;
368 fsyscall_gtod_data.clk_mult = c->mult;
369 fsyscall_gtod_data.clk_shift = c->shift;
370 fsyscall_gtod_data.clk_fsys_mmio = c->fsys_mmio;
371 fsyscall_gtod_data.clk_cycle_last = c->cycle_last;
372
373 /* copy kernel time structures */
374 fsyscall_gtod_data.wall_time.tv_sec = wall->tv_sec;
375 fsyscall_gtod_data.wall_time.tv_nsec = wall->tv_nsec;
376 fsyscall_gtod_data.monotonic_time.tv_sec = wall_to_monotonic.tv_sec
377 + wall->tv_sec;
378 fsyscall_gtod_data.monotonic_time.tv_nsec = wall_to_monotonic.tv_nsec
379 + wall->tv_nsec;
380
381 /* normalize */
382 while (fsyscall_gtod_data.monotonic_time.tv_nsec >= NSEC_PER_SEC) {
383 fsyscall_gtod_data.monotonic_time.tv_nsec -= NSEC_PER_SEC;
384 fsyscall_gtod_data.monotonic_time.tv_sec++;
385 }
386
387 write_sequnlock_irqrestore(&fsyscall_gtod_data.lock, flags);
388}
389
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c
index 15ad85da15a9..3aeaf15e468b 100644
--- a/arch/ia64/kernel/traps.c
+++ b/arch/ia64/kernel/traps.c
@@ -69,6 +69,7 @@ die (const char *str, struct pt_regs *regs, long err)
69 69
70 bust_spinlocks(0); 70 bust_spinlocks(0);
71 die.lock_owner = -1; 71 die.lock_owner = -1;
72 add_taint(TAINT_DIE);
72 spin_unlock_irq(&die.lock); 73 spin_unlock_irq(&die.lock);
73 74
74 if (panic_on_oops) 75 if (panic_on_oops)
diff --git a/arch/ia64/kernel/unwind.c b/arch/ia64/kernel/unwind.c
index b0b08b5f3eca..c1bdb5131814 100644
--- a/arch/ia64/kernel/unwind.c
+++ b/arch/ia64/kernel/unwind.c
@@ -1856,11 +1856,19 @@ find_save_locs (struct unw_frame_info *info)
1856 return 0; 1856 return 0;
1857} 1857}
1858 1858
1859static int
1860unw_valid(const struct unw_frame_info *info, unsigned long* p)
1861{
1862 unsigned long loc = (unsigned long)p;
1863 return (loc >= info->regstk.limit && loc < info->regstk.top) ||
1864 (loc >= info->memstk.top && loc < info->memstk.limit);
1865}
1866
1859int 1867int
1860unw_unwind (struct unw_frame_info *info) 1868unw_unwind (struct unw_frame_info *info)
1861{ 1869{
1862 unsigned long prev_ip, prev_sp, prev_bsp; 1870 unsigned long prev_ip, prev_sp, prev_bsp;
1863 unsigned long ip, pr, num_regs, rp_loc, pfs_loc; 1871 unsigned long ip, pr, num_regs;
1864 STAT(unsigned long start, flags;) 1872 STAT(unsigned long start, flags;)
1865 int retval; 1873 int retval;
1866 1874
@@ -1871,8 +1879,7 @@ unw_unwind (struct unw_frame_info *info)
1871 prev_bsp = info->bsp; 1879 prev_bsp = info->bsp;
1872 1880
1873 /* validate the return IP pointer */ 1881 /* validate the return IP pointer */
1874 rp_loc = (unsigned long) info->rp_loc; 1882 if (!unw_valid(info, info->rp_loc)) {
1875 if ((rp_loc < info->regstk.limit) || (rp_loc > info->regstk.top)) {
1876 /* FIXME: should really be level 0 but it occurs too often. KAO */ 1883 /* FIXME: should really be level 0 but it occurs too often. KAO */
1877 UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n", 1884 UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n",
1878 __FUNCTION__, info->ip); 1885 __FUNCTION__, info->ip);
@@ -1888,8 +1895,7 @@ unw_unwind (struct unw_frame_info *info)
1888 } 1895 }
1889 1896
1890 /* validate the previous stack frame pointer */ 1897 /* validate the previous stack frame pointer */
1891 pfs_loc = (unsigned long) info->pfs_loc; 1898 if (!unw_valid(info, info->pfs_loc)) {
1892 if ((pfs_loc < info->regstk.limit) || (pfs_loc > info->regstk.top)) {
1893 UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__); 1899 UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__);
1894 STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); 1900 STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
1895 return -1; 1901 return -1;
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index 5a65965c8b53..860f251d2fc2 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -206,6 +206,7 @@ SECTIONS
206 { 206 {
207 __per_cpu_start = .; 207 __per_cpu_start = .;
208 *(.data.percpu) 208 *(.data.percpu)
209 *(.data.percpu.shared_aligned)
209 __per_cpu_end = .; 210 __per_cpu_end = .;
210 } 211 }
211 . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits 212 . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits
diff --git a/arch/ia64/lib/checksum.c b/arch/ia64/lib/checksum.c
index 4411d9baeb21..9fc955026f86 100644
--- a/arch/ia64/lib/checksum.c
+++ b/arch/ia64/lib/checksum.c
@@ -60,6 +60,7 @@ csum_tcpudp_nofold (__be32 saddr, __be32 daddr, unsigned short len,
60 result = (result & 0xffffffff) + (result >> 32); 60 result = (result & 0xffffffff) + (result >> 32);
61 return (__force __wsum)result; 61 return (__force __wsum)result;
62} 62}
63EXPORT_SYMBOL(csum_tcpudp_nofold);
63 64
64extern unsigned long do_csum (const unsigned char *, long); 65extern unsigned long do_csum (const unsigned char *, long);
65 66
diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c
index b87f785c2416..73ccb6010c05 100644
--- a/arch/ia64/mm/fault.c
+++ b/arch/ia64/mm/fault.c
@@ -80,6 +80,7 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
80 struct mm_struct *mm = current->mm; 80 struct mm_struct *mm = current->mm;
81 struct siginfo si; 81 struct siginfo si;
82 unsigned long mask; 82 unsigned long mask;
83 int fault;
83 84
84 /* mmap_sem is performance critical.... */ 85 /* mmap_sem is performance critical.... */
85 prefetchw(&mm->mmap_sem); 86 prefetchw(&mm->mmap_sem);
@@ -147,26 +148,25 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
147 * sure we exit gracefully rather than endlessly redo the 148 * sure we exit gracefully rather than endlessly redo the
148 * fault. 149 * fault.
149 */ 150 */
150 switch (handle_mm_fault(mm, vma, address, (mask & VM_WRITE) != 0)) { 151 fault = handle_mm_fault(mm, vma, address, (mask & VM_WRITE) != 0);
151 case VM_FAULT_MINOR: 152 if (unlikely(fault & VM_FAULT_ERROR)) {
152 ++current->min_flt;
153 break;
154 case VM_FAULT_MAJOR:
155 ++current->maj_flt;
156 break;
157 case VM_FAULT_SIGBUS:
158 /* 153 /*
159 * We ran out of memory, or some other thing happened 154 * We ran out of memory, or some other thing happened
160 * to us that made us unable to handle the page fault 155 * to us that made us unable to handle the page fault
161 * gracefully. 156 * gracefully.
162 */ 157 */
163 signal = SIGBUS; 158 if (fault & VM_FAULT_OOM) {
164 goto bad_area; 159 goto out_of_memory;
165 case VM_FAULT_OOM: 160 } else if (fault & VM_FAULT_SIGBUS) {
166 goto out_of_memory; 161 signal = SIGBUS;
167 default: 162 goto bad_area;
163 }
168 BUG(); 164 BUG();
169 } 165 }
166 if (fault & VM_FAULT_MAJOR)
167 current->maj_flt++;
168 else
169 current->min_flt++;
170 up_read(&mm->mmap_sem); 170 up_read(&mm->mmap_sem);
171 return; 171 return;
172 172
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index 1346b7f05397..d22861c5b04c 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -15,6 +15,7 @@
15#include <linux/pagemap.h> 15#include <linux/pagemap.h>
16#include <linux/slab.h> 16#include <linux/slab.h>
17#include <linux/sysctl.h> 17#include <linux/sysctl.h>
18#include <linux/log2.h>
18#include <asm/mman.h> 19#include <asm/mman.h>
19#include <asm/pgalloc.h> 20#include <asm/pgalloc.h>
20#include <asm/tlb.h> 21#include <asm/tlb.h>
@@ -182,7 +183,7 @@ static int __init hugetlb_setup_sz(char *str)
182 tr_pages = 0x15557000UL; 183 tr_pages = 0x15557000UL;
183 184
184 size = memparse(str, &str); 185 size = memparse(str, &str);
185 if (*str || (size & (size-1)) || !(tr_pages & size) || 186 if (*str || !is_power_of_2(size) || !(tr_pages & size) ||
186 size <= PAGE_SIZE || 187 size <= PAGE_SIZE ||
187 size >= (1UL << PAGE_SHIFT << MAX_ORDER)) { 188 size >= (1UL << PAGE_SHIFT << MAX_ORDER)) {
188 printk(KERN_WARNING "Invalid huge page size specified\n"); 189 printk(KERN_WARNING "Invalid huge page size specified\n");
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c
index fa4e6d4810f3..1682fc639038 100644
--- a/arch/ia64/mm/tlb.c
+++ b/arch/ia64/mm/tlb.c
@@ -175,7 +175,7 @@ EXPORT_SYMBOL(flush_tlb_range);
175void __devinit 175void __devinit
176ia64_tlb_init (void) 176ia64_tlb_init (void)
177{ 177{
178 ia64_ptce_info_t ptce_info; 178 ia64_ptce_info_t uninitialized_var(ptce_info); /* GCC be quiet */
179 unsigned long tr_pgbits; 179 unsigned long tr_pgbits;
180 long status; 180 long status;
181 181
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 73696b4a2eed..07d0e92742c8 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -591,6 +591,9 @@ int
591pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma, 591pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma,
592 enum pci_mmap_state mmap_state, int write_combine) 592 enum pci_mmap_state mmap_state, int write_combine)
593{ 593{
594 unsigned long size = vma->vm_end - vma->vm_start;
595 pgprot_t prot;
596
594 /* 597 /*
595 * I/O space cannot be accessed via normal processor loads and 598 * I/O space cannot be accessed via normal processor loads and
596 * stores on this platform. 599 * stores on this platform.
@@ -604,15 +607,24 @@ pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma,
604 */ 607 */
605 return -EINVAL; 608 return -EINVAL;
606 609
610 if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size))
611 return -EINVAL;
612
613 prot = phys_mem_access_prot(NULL, vma->vm_pgoff, size,
614 vma->vm_page_prot);
615
607 /* 616 /*
608 * Leave vm_pgoff as-is, the PCI space address is the physical 617 * If the user requested WC, the kernel uses UC or WC for this region,
609 * address on this platform. 618 * and the chipset supports WC, we can use WC. Otherwise, we have to
619 * use the same attribute the kernel uses.
610 */ 620 */
611 if (write_combine && efi_range_is_wc(vma->vm_start, 621 if (write_combine &&
612 vma->vm_end - vma->vm_start)) 622 ((pgprot_val(prot) & _PAGE_MA_MASK) == _PAGE_MA_UC ||
623 (pgprot_val(prot) & _PAGE_MA_MASK) == _PAGE_MA_WC) &&
624 efi_range_is_wc(vma->vm_start, vma->vm_end - vma->vm_start))
613 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); 625 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
614 else 626 else
615 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); 627 vma->vm_page_prot = prot;
616 628
617 if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, 629 if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
618 vma->vm_end - vma->vm_start, vma->vm_page_prot)) 630 vma->vm_end - vma->vm_start, vma->vm_page_prot))
diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c
index c6216f454ffb..3c7178f5dce8 100644
--- a/arch/ia64/sn/kernel/io_acpi_init.c
+++ b/arch/ia64/sn/kernel/io_acpi_init.c
@@ -418,7 +418,7 @@ sn_acpi_slot_fixup(struct pci_dev *dev)
418 void __iomem *addr; 418 void __iomem *addr;
419 struct pcidev_info *pcidev_info = NULL; 419 struct pcidev_info *pcidev_info = NULL;
420 struct sn_irq_info *sn_irq_info = NULL; 420 struct sn_irq_info *sn_irq_info = NULL;
421 size_t size; 421 size_t image_size, size;
422 422
423 if (sn_acpi_get_pcidev_info(dev, &pcidev_info, &sn_irq_info)) { 423 if (sn_acpi_get_pcidev_info(dev, &pcidev_info, &sn_irq_info)) {
424 panic("%s: Failure obtaining pcidev_info for %s\n", 424 panic("%s: Failure obtaining pcidev_info for %s\n",
@@ -428,17 +428,16 @@ sn_acpi_slot_fixup(struct pci_dev *dev)
428 if (pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE]) { 428 if (pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE]) {
429 /* 429 /*
430 * A valid ROM image exists and has been shadowed by the 430 * A valid ROM image exists and has been shadowed by the
431 * PROM. Setup the pci_dev ROM resource to point to 431 * PROM. Setup the pci_dev ROM resource with the address
432 * the shadowed copy. 432 * of the shadowed copy, and the actual length of the ROM image.
433 */ 433 */
434 size = dev->resource[PCI_ROM_RESOURCE].end - 434 size = pci_resource_len(dev, PCI_ROM_RESOURCE);
435 dev->resource[PCI_ROM_RESOURCE].start; 435 addr = ioremap(pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE],
436 addr = 436 size);
437 ioremap(pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE], 437 image_size = pci_get_rom_size(addr, size);
438 size);
439 dev->resource[PCI_ROM_RESOURCE].start = (unsigned long) addr; 438 dev->resource[PCI_ROM_RESOURCE].start = (unsigned long) addr;
440 dev->resource[PCI_ROM_RESOURCE].end = 439 dev->resource[PCI_ROM_RESOURCE].end =
441 (unsigned long) addr + size; 440 (unsigned long) addr + image_size - 1;
442 dev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_BIOS_COPY; 441 dev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_BIOS_COPY;
443 } 442 }
444 sn_pci_fixup_slot(dev, pcidev_info, sn_irq_info); 443 sn_pci_fixup_slot(dev, pcidev_info, sn_irq_info);
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c
index 6b10e5d28488..906b93674b76 100644
--- a/arch/ia64/sn/kernel/io_init.c
+++ b/arch/ia64/sn/kernel/io_init.c
@@ -259,9 +259,23 @@ sn_io_slot_fixup(struct pci_dev *dev)
259 insert_resource(&ioport_resource, &dev->resource[idx]); 259 insert_resource(&ioport_resource, &dev->resource[idx]);
260 else 260 else
261 insert_resource(&iomem_resource, &dev->resource[idx]); 261 insert_resource(&iomem_resource, &dev->resource[idx]);
262 /* If ROM, mark as shadowed in PROM */ 262 /*
263 if (idx == PCI_ROM_RESOURCE) 263 * If ROM, set the actual ROM image size, and mark as
264 dev->resource[idx].flags |= IORESOURCE_ROM_BIOS_COPY; 264 * shadowed in PROM.
265 */
266 if (idx == PCI_ROM_RESOURCE) {
267 size_t image_size;
268 void __iomem *rom;
269
270 rom = ioremap(pci_resource_start(dev, PCI_ROM_RESOURCE),
271 size + 1);
272 image_size = pci_get_rom_size(rom, size + 1);
273 dev->resource[PCI_ROM_RESOURCE].end =
274 dev->resource[PCI_ROM_RESOURCE].start +
275 image_size - 1;
276 dev->resource[PCI_ROM_RESOURCE].flags |=
277 IORESOURCE_ROM_BIOS_COPY;
278 }
265 } 279 }
266 /* Create a pci_window in the pci_controller struct for 280 /* Create a pci_window in the pci_controller struct for
267 * each device resource. 281 * each device resource.
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index 6da9854751cd..df8d5bed6119 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -750,9 +750,10 @@ sn_hwperf_ioctl(struct inode *in, struct file *fp, u32 op, u64 arg)
750 goto error; 750 goto error;
751 } else 751 } else
752 if ((r = sn_hwperf_enum_objects(&nobj, &objs)) == 0) { 752 if ((r = sn_hwperf_enum_objects(&nobj, &objs)) == 0) {
753 int cpuobj_index = 0;
754
753 memset(p, 0, a.sz); 755 memset(p, 0, a.sz);
754 for (i = 0; i < nobj; i++) { 756 for (i = 0; i < nobj; i++) {
755 int cpuobj_index = 0;
756 if (!SN_HWPERF_IS_NODE(objs + i)) 757 if (!SN_HWPERF_IS_NODE(objs + i))
757 continue; 758 continue;
758 node = sn_hwperf_obj_to_cnode(objs + i); 759 node = sn_hwperf_obj_to_cnode(objs + i);
diff --git a/arch/ia64/sn/kernel/sn2/timer.c b/arch/ia64/sn/kernel/sn2/timer.c
index 56a88b6df4b4..19e25d2b64fc 100644
--- a/arch/ia64/sn/kernel/sn2/timer.c
+++ b/arch/ia64/sn/kernel/sn2/timer.c
@@ -11,6 +11,7 @@
11#include <linux/sched.h> 11#include <linux/sched.h>
12#include <linux/time.h> 12#include <linux/time.h>
13#include <linux/interrupt.h> 13#include <linux/interrupt.h>
14#include <linux/clocksource.h>
14 15
15#include <asm/hw_irq.h> 16#include <asm/hw_irq.h>
16#include <asm/system.h> 17#include <asm/system.h>
@@ -22,11 +23,21 @@
22 23
23extern unsigned long sn_rtc_cycles_per_second; 24extern unsigned long sn_rtc_cycles_per_second;
24 25
25static struct time_interpolator sn2_interpolator = { 26static void __iomem *sn2_mc;
26 .drift = -1, 27
27 .shift = 10, 28static cycle_t read_sn2(void)
28 .mask = (1LL << 55) - 1, 29{
29 .source = TIME_SOURCE_MMIO64 30 return (cycle_t)readq(sn2_mc);
31}
32
33static struct clocksource clocksource_sn2 = {
34 .name = "sn2_rtc",
35 .rating = 300,
36 .read = read_sn2,
37 .mask = (1LL << 55) - 1,
38 .mult = 0,
39 .shift = 10,
40 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
30}; 41};
31 42
32/* 43/*
@@ -47,9 +58,11 @@ ia64_sn_udelay (unsigned long usecs)
47 58
48void __init sn_timer_init(void) 59void __init sn_timer_init(void)
49{ 60{
50 sn2_interpolator.frequency = sn_rtc_cycles_per_second; 61 sn2_mc = RTC_COUNTER_ADDR;
51 sn2_interpolator.addr = RTC_COUNTER_ADDR; 62 clocksource_sn2.fsys_mmio = RTC_COUNTER_ADDR;
52 register_time_interpolator(&sn2_interpolator); 63 clocksource_sn2.mult = clocksource_hz2mult(sn_rtc_cycles_per_second,
64 clocksource_sn2.shift);
65 clocksource_register(&clocksource_sn2);
53 66
54 ia64_udelay = &ia64_sn_udelay; 67 ia64_udelay = &ia64_sn_udelay;
55} 68}
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c
index 493380b2c05f..5a289e4de838 100644
--- a/arch/ia64/sn/kernel/tiocx.c
+++ b/arch/ia64/sn/kernel/tiocx.c
@@ -369,7 +369,7 @@ static void tio_corelet_reset(nasid_t nasid, int corelet)
369 369
370static int is_fpga_tio(int nasid, int *bt) 370static int is_fpga_tio(int nasid, int *bt)
371{ 371{
372 u16 ioboard_type; 372 u16 uninitialized_var(ioboard_type); /* GCC be quiet */
373 s64 rc; 373 s64 rc;
374 374
375 rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard_type); 375 rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard_type);
diff --git a/arch/ia64/sn/kernel/xp_nofault.S b/arch/ia64/sn/kernel/xp_nofault.S
index b772543053c9..54e8973b6e99 100644
--- a/arch/ia64/sn/kernel/xp_nofault.S
+++ b/arch/ia64/sn/kernel/xp_nofault.S
@@ -21,7 +21,8 @@
21xp_nofault_PIOR: 21xp_nofault_PIOR:
22 mov r8=r0 // Stage a success return value 22 mov r8=r0 // Stage a success return value
23 ld8.acq r9=[r32];; // PIO Read the specified register 23 ld8.acq r9=[r32];; // PIO Read the specified register
24 adds r9=1,r9 // Add to force a consume 24 adds r9=1,r9;; // Add to force consumption
25 or r9=r9,r9;; // Or to force consumption
25 br.ret.sptk.many b0;; // Return success 26 br.ret.sptk.many b0;; // Return success
26 27
27 .global xp_error_PIOR 28 .global xp_error_PIOR
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index 04a8256017eb..42485ad50ceb 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -15,6 +15,7 @@
15#include <asm/sn/pcibus_provider_defs.h> 15#include <asm/sn/pcibus_provider_defs.h>
16#include <asm/sn/pcidev.h> 16#include <asm/sn/pcidev.h>
17#include <asm/sn/sn_sal.h> 17#include <asm/sn/sn_sal.h>
18#include <asm/sn/pic.h>
18#include <asm/sn/sn2/sn_hwperf.h> 19#include <asm/sn/sn2/sn_hwperf.h>
19#include "xtalk/xwidgetdev.h" 20#include "xtalk/xwidgetdev.h"
20#include "xtalk/hubdev.h" 21#include "xtalk/hubdev.h"
@@ -79,7 +80,7 @@ static int sal_pcibr_error_interrupt(struct pcibus_info *soft)
79u16 sn_ioboard_to_pci_bus(struct pci_bus *pci_bus) 80u16 sn_ioboard_to_pci_bus(struct pci_bus *pci_bus)
80{ 81{
81 s64 rc; 82 s64 rc;
82 u16 ioboard; 83 u16 uninitialized_var(ioboard); /* GCC be quiet */
83 nasid_t nasid = NASID_GET(SN_PCIBUS_BUSSOFT(pci_bus)->bs_base); 84 nasid_t nasid = NASID_GET(SN_PCIBUS_BUSSOFT(pci_bus)->bs_base);
84 85
85 rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard); 86 rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard);
@@ -130,9 +131,9 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
130 } 131 }
131 132
132 memcpy(soft, prom_bussoft, sizeof(struct pcibus_info)); 133 memcpy(soft, prom_bussoft, sizeof(struct pcibus_info));
133 soft->pbi_buscommon.bs_base = 134 soft->pbi_buscommon.bs_base = (unsigned long)
134 (((u64) soft->pbi_buscommon. 135 ioremap(REGION_OFFSET(soft->pbi_buscommon.bs_base),
135 bs_base << 4) >> 4) | __IA64_UNCACHED_OFFSET; 136 sizeof(struct pic));
136 137
137 spin_lock_init(&soft->pbi_lock); 138 spin_lock_init(&soft->pbi_lock);
138 139
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c
index b9bedbd6e1d6..d798dd4d0dc4 100644
--- a/arch/ia64/sn/pci/tioca_provider.c
+++ b/arch/ia64/sn/pci/tioca_provider.c
@@ -610,7 +610,9 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
610 return NULL; 610 return NULL;
611 611
612 memcpy(tioca_common, prom_bussoft, sizeof(struct tioca_common)); 612 memcpy(tioca_common, prom_bussoft, sizeof(struct tioca_common));
613 tioca_common->ca_common.bs_base |= __IA64_UNCACHED_OFFSET; 613 tioca_common->ca_common.bs_base = (unsigned long)
614 ioremap(REGION_OFFSET(tioca_common->ca_common.bs_base),
615 sizeof(struct tioca_common));
614 616
615 /* init kernel-private area */ 617 /* init kernel-private area */
616 618
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c
index f4c0b961a939..84b72b27e27f 100644
--- a/arch/ia64/sn/pci/tioce_provider.c
+++ b/arch/ia64/sn/pci/tioce_provider.c
@@ -1002,7 +1002,9 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
1002 return NULL; 1002 return NULL;
1003 1003
1004 memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common)); 1004 memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common));
1005 tioce_common->ce_pcibus.bs_base |= __IA64_UNCACHED_OFFSET; 1005 tioce_common->ce_pcibus.bs_base = (unsigned long)
1006 ioremap(REGION_OFFSET(tioce_common->ce_pcibus.bs_base),
1007 sizeof(struct tioce_common));
1006 1008
1007 tioce_kern = tioce_kern_init(tioce_common); 1009 tioce_kern = tioce_kern_init(tioce_common);
1008 if (tioce_kern == NULL) { 1010 if (tioce_kern == NULL) {
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index c3bb8a755b00..8ccf3e47bff8 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -31,6 +31,9 @@ config GENERIC_IRQ_PROBE
31config NO_IOPORT 31config NO_IOPORT
32 def_bool y 32 def_bool y
33 33
34config NO_DMA
35 def_bool y
36
34source "init/Kconfig" 37source "init/Kconfig"
35 38
36 39
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c
index 5f02b3144875..57a92ef31a90 100644
--- a/arch/m32r/kernel/ptrace.c
+++ b/arch/m32r/kernel/ptrace.c
@@ -595,7 +595,6 @@ void ptrace_disable(struct task_struct *child)
595static int 595static int
596do_ptrace(long request, struct task_struct *child, long addr, long data) 596do_ptrace(long request, struct task_struct *child, long addr, long data)
597{ 597{
598 unsigned long tmp;
599 int ret; 598 int ret;
600 599
601 switch (request) { 600 switch (request) {
@@ -604,11 +603,7 @@ do_ptrace(long request, struct task_struct *child, long addr, long data)
604 */ 603 */
605 case PTRACE_PEEKTEXT: 604 case PTRACE_PEEKTEXT:
606 case PTRACE_PEEKDATA: 605 case PTRACE_PEEKDATA:
607 ret = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); 606 ret = generic_ptrace_peekdata(child, addr, data);
608 if (ret == sizeof(tmp))
609 ret = put_user(tmp,(unsigned long __user *) data);
610 else
611 ret = -EIO;
612 break; 607 break;
613 608
614 /* 609 /*
@@ -624,15 +619,9 @@ do_ptrace(long request, struct task_struct *child, long addr, long data)
624 */ 619 */
625 case PTRACE_POKETEXT: 620 case PTRACE_POKETEXT:
626 case PTRACE_POKEDATA: 621 case PTRACE_POKEDATA:
627 ret = access_process_vm(child, addr, &data, sizeof(data), 1); 622 ret = generic_ptrace_pokedata(child, addr, data);
628 if (ret == sizeof(data)) { 623 if (ret == 0 && request == PTRACE_POKETEXT)
629 ret = 0; 624 invalidate_cache();
630 if (request == PTRACE_POKETEXT) {
631 invalidate_cache();
632 }
633 } else {
634 ret = -EIO;
635 }
636 break; 625 break;
637 626
638 /* 627 /*
diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S
index 4e2d5b9f0a9a..942a8c7a4417 100644
--- a/arch/m32r/kernel/vmlinux.lds.S
+++ b/arch/m32r/kernel/vmlinux.lds.S
@@ -110,10 +110,7 @@ SECTIONS
110 __initramfs_end = .; 110 __initramfs_end = .;
111#endif 111#endif
112 112
113 . = ALIGN(4096); 113 PERCPU(4096)
114 __per_cpu_start = .;
115 .data.percpu : { *(.data.percpu) }
116 __per_cpu_end = .;
117 . = ALIGN(4096); 114 . = ALIGN(4096);
118 __init_end = .; 115 __init_end = .;
119 /* freed after init ends here */ 116 /* freed after init ends here */
diff --git a/arch/m32r/m32104ut/defconfig.m32104ut b/arch/m32r/m32104ut/defconfig.m32104ut
index 7b68fe8d921e..1f88f493a9e2 100644
--- a/arch/m32r/m32104ut/defconfig.m32104ut
+++ b/arch/m32r/m32104ut/defconfig.m32104ut
@@ -699,7 +699,6 @@ CONFIG_I2C_ALGOPCF=m
699# I2C Hardware Bus support 699# I2C Hardware Bus support
700# 700#
701CONFIG_I2C_ELEKTOR=m 701CONFIG_I2C_ELEKTOR=m
702CONFIG_I2C_ISA=m
703# CONFIG_I2C_OCORES is not set 702# CONFIG_I2C_OCORES is not set
704# CONFIG_I2C_PARPORT is not set 703# CONFIG_I2C_PARPORT is not set
705# CONFIG_I2C_PARPORT_LIGHT is not set 704# CONFIG_I2C_PARPORT_LIGHT is not set
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c
index f3935ba24946..676a1c443d28 100644
--- a/arch/m32r/mm/fault.c
+++ b/arch/m32r/mm/fault.c
@@ -80,6 +80,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code,
80 struct vm_area_struct * vma; 80 struct vm_area_struct * vma;
81 unsigned long page, addr; 81 unsigned long page, addr;
82 int write; 82 int write;
83 int fault;
83 siginfo_t info; 84 siginfo_t info;
84 85
85 /* 86 /*
@@ -195,20 +196,18 @@ survive:
195 */ 196 */
196 addr = (address & PAGE_MASK); 197 addr = (address & PAGE_MASK);
197 set_thread_fault_code(error_code); 198 set_thread_fault_code(error_code);
198 switch (handle_mm_fault(mm, vma, addr, write)) { 199 fault = handle_mm_fault(mm, vma, addr, write);
199 case VM_FAULT_MINOR: 200 if (unlikely(fault & VM_FAULT_ERROR)) {
200 tsk->min_flt++; 201 if (fault & VM_FAULT_OOM)
201 break;
202 case VM_FAULT_MAJOR:
203 tsk->maj_flt++;
204 break;
205 case VM_FAULT_SIGBUS:
206 goto do_sigbus;
207 case VM_FAULT_OOM:
208 goto out_of_memory; 202 goto out_of_memory;
209 default: 203 else if (fault & VM_FAULT_SIGBUS)
210 BUG(); 204 goto do_sigbus;
205 BUG();
211 } 206 }
207 if (fault & VM_FAULT_MAJOR)
208 tsk->maj_flt++;
209 else
210 tsk->min_flt++;
212 set_thread_fault_code(0); 211 set_thread_fault_code(0);
213 up_read(&mm->mmap_sem); 212 up_read(&mm->mmap_sem);
214 return; 213 return;
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 85cdd23b0447..20a9c08e59c3 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -37,6 +37,10 @@ config TIME_LOW_RES
37 bool 37 bool
38 default y 38 default y
39 39
40config GENERIC_IOMAP
41 bool
42 default y
43
40config ARCH_MAY_HAVE_PC_FDC 44config ARCH_MAY_HAVE_PC_FDC
41 bool 45 bool
42 depends on Q40 || (BROKEN && SUN3X) 46 depends on Q40 || (BROKEN && SUN3X)
@@ -45,6 +49,9 @@ config ARCH_MAY_HAVE_PC_FDC
45config NO_IOPORT 49config NO_IOPORT
46 def_bool y 50 def_bool y
47 51
52config NO_DMA
53 def_bool SUN3
54
48mainmenu "Linux/68k Kernel Configuration" 55mainmenu "Linux/68k Kernel Configuration"
49 56
50source "init/Kconfig" 57source "init/Kconfig"
@@ -418,9 +425,6 @@ config STRAM_PROC
418 help 425 help
419 Say Y here to report ST-RAM usage statistics in /proc/stram. 426 Say Y here to report ST-RAM usage statistics in /proc/stram.
420 427
421config ATARI_KBD_CORE
422 bool
423
424config HEARTBEAT 428config HEARTBEAT
425 bool "Use power LED as a heartbeat" if AMIGA || APOLLO || ATARI || MAC ||Q40 429 bool "Use power LED as a heartbeat" if AMIGA || APOLLO || ATARI || MAC ||Q40
426 default y if !AMIGA && !APOLLO && !ATARI && !MAC && !Q40 && HP300 430 default y if !AMIGA && !APOLLO && !ATARI && !MAC && !Q40 && HP300
diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c
index cb8e7609df4c..78df98f2029a 100644
--- a/arch/m68k/apollo/config.c
+++ b/arch/m68k/apollo/config.c
@@ -148,8 +148,8 @@ void dn_serial_print (const char *str)
148 } 148 }
149} 149}
150 150
151void config_apollo(void) { 151void __init config_apollo(void)
152 152{
153 int i; 153 int i;
154 154
155 dn_setup_model(); 155 dn_setup_model();
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index 13bd41bed28e..5d47f3aa3810 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -37,7 +37,7 @@ static struct irq_controller apollo_irq_controller = {
37}; 37};
38 38
39 39
40void dn_init_IRQ(void) 40void __init dn_init_IRQ(void)
41{ 41{
42 m68k_setup_user_interrupt(VEC_USER + 96, 16, dn_process_int); 42 m68k_setup_user_interrupt(VEC_USER + 96, 16, dn_process_int);
43 m68k_setup_irq_controller(&apollo_irq_controller, IRQ_APOLLO, 16); 43 m68k_setup_irq_controller(&apollo_irq_controller, IRQ_APOLLO, 16);
diff --git a/arch/m68k/atari/atakeyb.c b/arch/m68k/atari/atakeyb.c
index 1c29603b16b3..2b5f64726a2e 100644
--- a/arch/m68k/atari/atakeyb.c
+++ b/arch/m68k/atari/atakeyb.c
@@ -13,6 +13,7 @@
13 * enhanced by Bjoern Brauel and Roman Hodek 13 * enhanced by Bjoern Brauel and Roman Hodek
14 */ 14 */
15 15
16#include <linux/module.h>
16#include <linux/sched.h> 17#include <linux/sched.h>
17#include <linux/kernel.h> 18#include <linux/kernel.h>
18#include <linux/interrupt.h> 19#include <linux/interrupt.h>
@@ -42,6 +43,9 @@ void (*atari_mouse_interrupt_hook) (char *);
42void (*atari_input_keyboard_interrupt_hook) (unsigned char, char); 43void (*atari_input_keyboard_interrupt_hook) (unsigned char, char);
43/* Hook for mouse inputdev driver */ 44/* Hook for mouse inputdev driver */
44void (*atari_input_mouse_interrupt_hook) (char *); 45void (*atari_input_mouse_interrupt_hook) (char *);
46EXPORT_SYMBOL(atari_mouse_interrupt_hook);
47EXPORT_SYMBOL(atari_input_keyboard_interrupt_hook);
48EXPORT_SYMBOL(atari_input_mouse_interrupt_hook);
45 49
46/* variables for IKBD self test: */ 50/* variables for IKBD self test: */
47 51
@@ -429,6 +433,7 @@ void ikbd_mouse_rel_pos(void)
429 433
430 ikbd_write(cmd, 1); 434 ikbd_write(cmd, 1);
431} 435}
436EXPORT_SYMBOL(ikbd_mouse_rel_pos);
432 437
433/* Set absolute mouse position reporting */ 438/* Set absolute mouse position reporting */
434void ikbd_mouse_abs_pos(int xmax, int ymax) 439void ikbd_mouse_abs_pos(int xmax, int ymax)
@@ -453,6 +458,7 @@ void ikbd_mouse_thresh(int x, int y)
453 458
454 ikbd_write(cmd, 3); 459 ikbd_write(cmd, 3);
455} 460}
461EXPORT_SYMBOL(ikbd_mouse_thresh);
456 462
457/* Set mouse scale */ 463/* Set mouse scale */
458void ikbd_mouse_scale(int x, int y) 464void ikbd_mouse_scale(int x, int y)
@@ -495,6 +501,7 @@ void ikbd_mouse_y0_top(void)
495 501
496 ikbd_write(cmd, 1); 502 ikbd_write(cmd, 1);
497} 503}
504EXPORT_SYMBOL(ikbd_mouse_y0_top);
498 505
499/* Resume */ 506/* Resume */
500void ikbd_resume(void) 507void ikbd_resume(void)
@@ -511,6 +518,7 @@ void ikbd_mouse_disable(void)
511 518
512 ikbd_write(cmd, 1); 519 ikbd_write(cmd, 1);
513} 520}
521EXPORT_SYMBOL(ikbd_mouse_disable);
514 522
515/* Pause output */ 523/* Pause output */
516void ikbd_pause(void) 524void ikbd_pause(void)
@@ -696,7 +704,6 @@ int __init atari_keyb_init(void)
696 return 0; 704 return 0;
697} 705}
698 706
699
700int atari_kbdrate(struct kbd_repeat *k) 707int atari_kbdrate(struct kbd_repeat *k)
701{ 708{
702 if (k->delay > 0) { 709 if (k->delay > 0) {
diff --git a/arch/m68k/bvme6000/config.c b/arch/m68k/bvme6000/config.c
index 896ae3d3d919..9433a88a33c4 100644
--- a/arch/m68k/bvme6000/config.c
+++ b/arch/m68k/bvme6000/config.c
@@ -97,7 +97,7 @@ static int bvme6000_get_hardware_list(char *buffer)
97 * This function is called during kernel startup to initialize 97 * This function is called during kernel startup to initialize
98 * the bvme6000 IRQ handling routines. 98 * the bvme6000 IRQ handling routines.
99 */ 99 */
100static void bvme6000_init_IRQ(void) 100static void __init bvme6000_init_IRQ(void)
101{ 101{
102 m68k_setup_user_interrupt(VEC_USER, 192, NULL); 102 m68k_setup_user_interrupt(VEC_USER, 192, NULL);
103} 103}
diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S
index 05741f233567..faa6764f1d13 100644
--- a/arch/m68k/kernel/head.S
+++ b/arch/m68k/kernel/head.S
@@ -577,7 +577,7 @@ func_define putn,1
577#endif 577#endif
578.endm 578.endm
579 579
580.text 580.section ".text.head","ax"
581ENTRY(_stext) 581ENTRY(_stext)
582/* 582/*
583 * Version numbers of the bootinfo interface 583 * Version numbers of the bootinfo interface
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c
index cdba9fd6d82f..2cf0690b7882 100644
--- a/arch/m68k/kernel/ptrace.c
+++ b/arch/m68k/kernel/ptrace.c
@@ -128,10 +128,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
128 /* when I and D space are separate, these will need to be fixed. */ 128 /* when I and D space are separate, these will need to be fixed. */
129 case PTRACE_PEEKTEXT: /* read word at location addr. */ 129 case PTRACE_PEEKTEXT: /* read word at location addr. */
130 case PTRACE_PEEKDATA: 130 case PTRACE_PEEKDATA:
131 i = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); 131 ret = generic_ptrace_peekdata(child, addr, data);
132 if (i != sizeof(tmp))
133 goto out_eio;
134 ret = put_user(tmp, (unsigned long *)data);
135 break; 132 break;
136 133
137 /* read the word at location addr in the USER area. */ 134 /* read the word at location addr in the USER area. */
@@ -160,8 +157,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
160 /* when I and D space are separate, this will have to be fixed. */ 157 /* when I and D space are separate, this will have to be fixed. */
161 case PTRACE_POKETEXT: /* write the word at location addr. */ 158 case PTRACE_POKETEXT: /* write the word at location addr. */
162 case PTRACE_POKEDATA: 159 case PTRACE_POKEDATA:
163 if (access_process_vm(child, addr, &data, sizeof(data), 1) != sizeof(data)) 160 ret = generic_ptrace_pokedata(child, addr, data);
164 goto out_eio;
165 break; 161 break;
166 162
167 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 163 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
diff --git a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c
index 215c7bd43924..7e6d5fb75390 100644
--- a/arch/m68k/kernel/setup.c
+++ b/arch/m68k/kernel/setup.c
@@ -58,6 +58,7 @@ extern int end;
58extern unsigned long availmem; 58extern unsigned long availmem;
59 59
60int m68k_num_memory; 60int m68k_num_memory;
61EXPORT_SYMBOL(m68k_num_memory);
61int m68k_realnum_memory; 62int m68k_realnum_memory;
62EXPORT_SYMBOL(m68k_realnum_memory); 63EXPORT_SYMBOL(m68k_realnum_memory);
63unsigned long m68k_memoffset; 64unsigned long m68k_memoffset;
diff --git a/arch/m68k/kernel/sun3-head.S b/arch/m68k/kernel/sun3-head.S
index 4b5f050204e8..aad01592dbbc 100644
--- a/arch/m68k/kernel/sun3-head.S
+++ b/arch/m68k/kernel/sun3-head.S
@@ -29,7 +29,7 @@ kernel_pmd_table: .skip 0x2000
29.globl kernel_pg_dir 29.globl kernel_pg_dir
30.equ kernel_pg_dir,kernel_pmd_table 30.equ kernel_pg_dir,kernel_pmd_table
31 31
32 .section .head 32 .section .text.head
33ENTRY(_stext) 33ENTRY(_stext)
34ENTRY(_start) 34ENTRY(_start)
35 35
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
index 4c065f9ceffc..7db41594d7b6 100644
--- a/arch/m68k/kernel/time.c
+++ b/arch/m68k/kernel/time.c
@@ -72,7 +72,7 @@ static irqreturn_t timer_interrupt(int irq, void *dummy)
72 return IRQ_HANDLED; 72 return IRQ_HANDLED;
73} 73}
74 74
75void time_init(void) 75void __init time_init(void)
76{ 76{
77 struct rtc_time time; 77 struct rtc_time time;
78 78
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c
index a27a4fa33296..4e2752a0e89b 100644
--- a/arch/m68k/kernel/traps.c
+++ b/arch/m68k/kernel/traps.c
@@ -1170,6 +1170,7 @@ void die_if_kernel (char *str, struct pt_regs *fp, int nr)
1170 console_verbose(); 1170 console_verbose();
1171 printk("%s: %08x\n",str,nr); 1171 printk("%s: %08x\n",str,nr);
1172 show_registers(fp); 1172 show_registers(fp);
1173 add_taint(TAINT_DIE);
1173 do_exit(SIGSEGV); 1174 do_exit(SIGSEGV);
1174} 1175}
1175 1176
diff --git a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds
index 40f02b128f22..c42245775a4d 100644
--- a/arch/m68k/kernel/vmlinux-std.lds
+++ b/arch/m68k/kernel/vmlinux-std.lds
@@ -11,6 +11,7 @@ SECTIONS
11 . = 0x1000; 11 . = 0x1000;
12 _text = .; /* Text and read-only data */ 12 _text = .; /* Text and read-only data */
13 .text : { 13 .text : {
14 *(.text.head)
14 TEXT_TEXT 15 TEXT_TEXT
15 SCHED_TEXT 16 SCHED_TEXT
16 LOCK_TEXT 17 LOCK_TEXT
diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds
index f06425b6d206..4adffefb5c48 100644
--- a/arch/m68k/kernel/vmlinux-sun3.lds
+++ b/arch/m68k/kernel/vmlinux-sun3.lds
@@ -11,7 +11,7 @@ SECTIONS
11 . = 0xE002000; 11 . = 0xE002000;
12 _text = .; /* Text and read-only data */ 12 _text = .; /* Text and read-only data */
13 .text : { 13 .text : {
14 *(.head) 14 *(.text.head)
15 TEXT_TEXT 15 TEXT_TEXT
16 SCHED_TEXT 16 SCHED_TEXT
17 LOCK_TEXT 17 LOCK_TEXT
diff --git a/arch/m68k/lib/checksum.c b/arch/m68k/lib/checksum.c
index cf6bb51945a2..6216f12a756b 100644
--- a/arch/m68k/lib/checksum.c
+++ b/arch/m68k/lib/checksum.c
@@ -422,3 +422,4 @@ csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum)
422 ); 422 );
423 return(sum); 423 return(sum);
424} 424}
425EXPORT_SYMBOL(csum_partial_copy_nocheck);
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index 5fd413246f89..8547dbc5e8d7 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -49,6 +49,7 @@ struct mac_booter_data mac_bi_data;
49int mac_bisize = sizeof mac_bi_data; 49int mac_bisize = sizeof mac_bi_data;
50 50
51struct mac_hw_present mac_hw_present; 51struct mac_hw_present mac_hw_present;
52EXPORT_SYMBOL(mac_hw_present);
52 53
53/* New m68k bootinfo stuff and videobase */ 54/* New m68k bootinfo stuff and videobase */
54 55
@@ -84,7 +85,7 @@ extern void nubus_sweep_video(void);
84 85
85static void mac_get_model(char *str); 86static void mac_get_model(char *str);
86 87
87static void mac_sched_init(irq_handler_t vector) 88static void __init mac_sched_init(irq_handler_t vector)
88{ 89{
89 via_init_clock(vector); 90 via_init_clock(vector);
90} 91}
@@ -769,7 +770,7 @@ static struct mac_model mac_data_table[] = {
769 } 770 }
770}; 771};
771 772
772void mac_identify(void) 773void __init mac_identify(void)
773{ 774{
774 struct mac_model *m; 775 struct mac_model *m;
775 776
@@ -846,7 +847,7 @@ void mac_identify(void)
846 baboon_init(); 847 baboon_init();
847} 848}
848 849
849void mac_report_hardware(void) 850void __init mac_report_hardware(void)
850{ 851{
851 printk(KERN_INFO "Apple Macintosh %s\n", macintosh_config->name); 852 printk(KERN_INFO "Apple Macintosh %s\n", macintosh_config->name);
852} 853}
diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c
index 0fc72d8f786e..ecddac4a02b9 100644
--- a/arch/m68k/mac/macints.c
+++ b/arch/m68k/mac/macints.c
@@ -114,6 +114,7 @@
114 * 114 *
115 */ 115 */
116 116
117#include <linux/module.h>
117#include <linux/types.h> 118#include <linux/types.h>
118#include <linux/kernel.h> 119#include <linux/kernel.h>
119#include <linux/sched.h> 120#include <linux/sched.h>
@@ -224,7 +225,7 @@ static struct irq_controller mac_irq_controller = {
224 .disable = mac_disable_irq, 225 .disable = mac_disable_irq,
225}; 226};
226 227
227void mac_init_IRQ(void) 228void __init mac_init_IRQ(void)
228{ 229{
229#ifdef DEBUG_MACINTS 230#ifdef DEBUG_MACINTS
230 printk("mac_init_IRQ(): Setting things up...\n"); 231 printk("mac_init_IRQ(): Setting things up...\n");
@@ -391,6 +392,7 @@ int mac_irq_pending(unsigned int irq)
391 } 392 }
392 return 0; 393 return 0;
393} 394}
395EXPORT_SYMBOL(mac_irq_pending);
394 396
395static int num_debug[8]; 397static int num_debug[8];
396 398
diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c
index 2adbeb16e1b8..578b48f47b9e 100644
--- a/arch/m68k/mm/fault.c
+++ b/arch/m68k/mm/fault.c
@@ -159,18 +159,17 @@ good_area:
159#ifdef DEBUG 159#ifdef DEBUG
160 printk("handle_mm_fault returns %d\n",fault); 160 printk("handle_mm_fault returns %d\n",fault);
161#endif 161#endif
162 switch (fault) { 162 if (unlikely(fault & VM_FAULT_ERROR)) {
163 case VM_FAULT_MINOR: 163 if (fault & VM_FAULT_OOM)
164 current->min_flt++; 164 goto out_of_memory;
165 break; 165 else if (fault & VM_FAULT_SIGBUS)
166 case VM_FAULT_MAJOR: 166 goto bus_err;
167 current->maj_flt++; 167 BUG();
168 break;
169 case VM_FAULT_SIGBUS:
170 goto bus_err;
171 default:
172 goto out_of_memory;
173 } 168 }
169 if (fault & VM_FAULT_MAJOR)
170 current->maj_flt++;
171 else
172 current->min_flt++;
174 173
175 up_read(&mm->mmap_sem); 174 up_read(&mm->mmap_sem);
176 return 0; 175 return 0;
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c
index f1de19e1dde6..f42caa79e4e8 100644
--- a/arch/m68k/mm/init.c
+++ b/arch/m68k/mm/init.c
@@ -44,7 +44,7 @@ pg_data_t *pg_data_table[65];
44EXPORT_SYMBOL(pg_data_table); 44EXPORT_SYMBOL(pg_data_table);
45#endif 45#endif
46 46
47void m68k_setup_node(int node) 47void __init m68k_setup_node(int node)
48{ 48{
49#ifndef CONFIG_SINGLE_MEMORY_CHUNK 49#ifndef CONFIG_SINGLE_MEMORY_CHUNK
50 struct mem_info *info = m68k_memory + node; 50 struct mem_info *info = m68k_memory + node;
diff --git a/arch/m68k/mm/sun3kmap.c b/arch/m68k/mm/sun3kmap.c
index 1af24cb5bfe1..3dc41158c05e 100644
--- a/arch/m68k/mm/sun3kmap.c
+++ b/arch/m68k/mm/sun3kmap.c
@@ -105,6 +105,7 @@ void __iomem *sun3_ioremap(unsigned long phys, unsigned long size,
105 return (void __iomem *)ret; 105 return (void __iomem *)ret;
106 106
107} 107}
108EXPORT_SYMBOL(sun3_ioremap);
108 109
109 110
110void __iomem *__ioremap(unsigned long phys, unsigned long size, int cache) 111void __iomem *__ioremap(unsigned long phys, unsigned long size, int cache)
@@ -157,3 +158,4 @@ int sun3_map_test(unsigned long addr, char *val)
157 158
158 return ret; 159 return ret;
159} 160}
161EXPORT_SYMBOL(sun3_map_test);
diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c
index 4a7df9c3f85a..92fe50714112 100644
--- a/arch/m68k/mvme147/config.c
+++ b/arch/m68k/mvme147/config.c
@@ -89,7 +89,7 @@ static int mvme147_get_hardware_list(char *buffer)
89 * the mvme147 IRQ handling routines. 89 * the mvme147 IRQ handling routines.
90 */ 90 */
91 91
92void mvme147_init_IRQ(void) 92void __init mvme147_init_IRQ(void)
93{ 93{
94 m68k_setup_user_interrupt(VEC_USER, 192, NULL); 94 m68k_setup_user_interrupt(VEC_USER, 192, NULL);
95} 95}
diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c
index c829ebb6b1af..daa785161401 100644
--- a/arch/m68k/mvme16x/config.c
+++ b/arch/m68k/mvme16x/config.c
@@ -119,7 +119,7 @@ static int mvme16x_get_hardware_list(char *buffer)
119 * that the base vectors for the VMEChip2 and PCCChip2 are valid. 119 * that the base vectors for the VMEChip2 and PCCChip2 are valid.
120 */ 120 */
121 121
122static void mvme16x_init_IRQ (void) 122static void __init mvme16x_init_IRQ (void)
123{ 123{
124 m68k_setup_user_interrupt(VEC_USER, 192, NULL); 124 m68k_setup_user_interrupt(VEC_USER, 192, NULL);
125} 125}
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index 2fb25ae46a8a..ad3ed1fb8879 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -79,7 +79,7 @@ static struct irq_controller q40_irq_controller = {
79 79
80static int disabled; 80static int disabled;
81 81
82void q40_init_IRQ(void) 82void __init q40_init_IRQ(void)
83{ 83{
84 m68k_setup_irq_controller(&q40_irq_controller, 1, Q40_IRQ_MAX); 84 m68k_setup_irq_controller(&q40_irq_controller, 1, Q40_IRQ_MAX);
85 85
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 50df34bf80e3..cf93481adb1d 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -97,7 +97,7 @@ static struct irq_controller sun3_irq_controller = {
97 .disable = sun3_disable_irq, 97 .disable = sun3_disable_irq,
98}; 98};
99 99
100void sun3_init_IRQ(void) 100void __init sun3_init_IRQ(void)
101{ 101{
102 *sun3_intreg = 1; 102 *sun3_intreg = 1;
103 103
diff --git a/arch/m68k/sun3x/prom.c b/arch/m68k/sun3x/prom.c
index 48f8eb7b1565..a7b7e818d627 100644
--- a/arch/m68k/sun3x/prom.c
+++ b/arch/m68k/sun3x/prom.c
@@ -92,7 +92,7 @@ static struct console sun3x_debug = {
92 .index = -1, 92 .index = -1,
93}; 93};
94 94
95void sun3x_prom_init(void) 95void __init sun3x_prom_init(void)
96{ 96{
97 /* Read the vector table */ 97 /* Read the vector table */
98 98
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index adc64a2bafbb..1175ceff8b2a 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -45,6 +45,10 @@ config GENERIC_HWEIGHT
45 bool 45 bool
46 default y 46 default y
47 47
48config GENERIC_HARDIRQS
49 bool
50 default y
51
48config GENERIC_CALIBRATE_DELAY 52config GENERIC_CALIBRATE_DELAY
49 bool 53 bool
50 default y 54 default y
diff --git a/arch/m68knommu/kernel/Makefile b/arch/m68knommu/kernel/Makefile
index 1c6cd1ab571e..1524b39ad63f 100644
--- a/arch/m68knommu/kernel/Makefile
+++ b/arch/m68knommu/kernel/Makefile
@@ -4,8 +4,8 @@
4 4
5extra-y := vmlinux.lds 5extra-y := vmlinux.lds
6 6
7obj-y += dma.o entry.o init_task.o m68k_ksyms.o process.o ptrace.o semaphore.o \ 7obj-y += dma.o entry.o init_task.o irq.o m68k_ksyms.o process.o ptrace.o \
8 setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o 8 semaphore.o setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
9 9
10obj-$(CONFIG_MODULES) += module.o 10obj-$(CONFIG_MODULES) += module.o
11obj-$(CONFIG_COMEMPCI) += comempci.o 11obj-$(CONFIG_COMEMPCI) += comempci.o
diff --git a/arch/m68knommu/kernel/asm-offsets.c b/arch/m68knommu/kernel/asm-offsets.c
index 7cd183d346ef..d97b89bae53c 100644
--- a/arch/m68knommu/kernel/asm-offsets.c
+++ b/arch/m68knommu/kernel/asm-offsets.c
@@ -15,7 +15,6 @@
15#include <linux/hardirq.h> 15#include <linux/hardirq.h>
16#include <asm/bootinfo.h> 16#include <asm/bootinfo.h>
17#include <asm/irq.h> 17#include <asm/irq.h>
18#include <asm/irqnode.h>
19#include <asm/thread_info.h> 18#include <asm/thread_info.h>
20 19
21#define DEFINE(sym, val) \ 20#define DEFINE(sym, val) \
@@ -72,10 +71,6 @@ int main(void)
72#else 71#else
73 /* bitfields are a bit difficult */ 72 /* bitfields are a bit difficult */
74 DEFINE(PT_VECTOR, offsetof(struct pt_regs, pc) + 4); 73 DEFINE(PT_VECTOR, offsetof(struct pt_regs, pc) + 4);
75 /* offsets into the irq_handler struct */
76 DEFINE(IRQ_HANDLER, offsetof(struct irq_node, handler));
77 DEFINE(IRQ_DEVID, offsetof(struct irq_node, dev_id));
78 DEFINE(IRQ_NEXT, offsetof(struct irq_node, next));
79#endif 74#endif
80 75
81 /* offsets into the kernel_stat struct */ 76 /* offsets into the kernel_stat struct */
diff --git a/arch/m68knommu/kernel/irq.c b/arch/m68knommu/kernel/irq.c
new file mode 100644
index 000000000000..bba1bb48a21f
--- /dev/null
+++ b/arch/m68knommu/kernel/irq.c
@@ -0,0 +1,82 @@
1/*
2 * irq.c
3 *
4 * (C) Copyright 2007, Greg Ungerer <gerg@snapgear.com>
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
11#include <linux/types.h>
12#include <linux/init.h>
13#include <linux/kernel.h>
14#include <linux/kernel_stat.h>
15#include <linux/interrupt.h>
16#include <linux/irq.h>
17#include <linux/seq_file.h>
18#include <asm/system.h>
19#include <asm/traps.h>
20
21asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
22{
23 struct pt_regs *oldregs = set_irq_regs(regs);
24
25 irq_enter();
26 __do_IRQ(irq);
27 irq_exit();
28
29 set_irq_regs(oldregs);
30}
31
32void ack_bad_irq(unsigned int irq)
33{
34 printk(KERN_ERR "IRQ: unexpected irq=%d\n", irq);
35}
36
37static struct irq_chip m_irq_chip = {
38 .name = "M68K-INTC",
39 .enable = enable_vector,
40 .disable = disable_vector,
41 .ack = ack_vector,
42};
43
44void __init init_IRQ(void)
45{
46 int irq;
47
48 init_vectors();
49
50 for (irq = 0; (irq < NR_IRQS); irq++) {
51 irq_desc[irq].status = IRQ_DISABLED;
52 irq_desc[irq].action = NULL;
53 irq_desc[irq].depth = 1;
54 irq_desc[irq].chip = &m_irq_chip;
55 }
56}
57
58int show_interrupts(struct seq_file *p, void *v)
59{
60 struct irqaction *ap;
61 int irq = *((loff_t *) v);
62
63 if (irq == 0)
64 seq_puts(p, " CPU0\n");
65
66 if (irq < NR_IRQS) {
67 ap = irq_desc[irq].action;
68 if (ap) {
69 seq_printf(p, "%3d: ", irq);
70 seq_printf(p, "%10u ", kstat_irqs(irq));
71 seq_printf(p, "%14s ", irq_desc[irq].chip->name);
72
73 seq_printf(p, "%s", ap->name);
74 for (ap = ap->next; ap; ap = ap->next)
75 seq_printf(p, ", %s", ap->name);
76 seq_putc(p, '\n');
77 }
78 }
79
80 return 0;
81}
82
diff --git a/arch/m68knommu/kernel/m68k_ksyms.c b/arch/m68knommu/kernel/m68k_ksyms.c
index 25327c9eadd7..f795062aba1e 100644
--- a/arch/m68knommu/kernel/m68k_ksyms.c
+++ b/arch/m68knommu/kernel/m68k_ksyms.c
@@ -81,8 +81,6 @@ EXPORT_SYMBOL(__mulsi3);
81EXPORT_SYMBOL(__udivsi3); 81EXPORT_SYMBOL(__udivsi3);
82EXPORT_SYMBOL(__umodsi3); 82EXPORT_SYMBOL(__umodsi3);
83 83
84EXPORT_SYMBOL(is_in_rom);
85
86#ifdef CONFIG_COLDFIRE 84#ifdef CONFIG_COLDFIRE
87extern unsigned int *dma_device_address; 85extern unsigned int *dma_device_address;
88extern unsigned long dma_base_addr, _ramend; 86extern unsigned long dma_base_addr, _ramend;
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
index 941955dc3b7c..846f97534685 100644
--- a/arch/m68knommu/kernel/process.c
+++ b/arch/m68knommu/kernel/process.c
@@ -377,7 +377,7 @@ unsigned long get_wchan(struct task_struct *p)
377 fp = ((struct switch_stack *)p->thread.ksp)->a6; 377 fp = ((struct switch_stack *)p->thread.ksp)->a6;
378 do { 378 do {
379 if (fp < stack_page+sizeof(struct thread_info) || 379 if (fp < stack_page+sizeof(struct thread_info) ||
380 fp >= 8184+stack_page) 380 fp >= THREAD_SIZE-8+stack_page)
381 return 0; 381 return 0;
382 pc = ((unsigned long *)fp)[1]; 382 pc = ((unsigned long *)fp)[1];
383 if (!in_sched_functions(pc)) 383 if (!in_sched_functions(pc))
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c
index f54b6a3dfecb..ef70ca070ce2 100644
--- a/arch/m68knommu/kernel/ptrace.c
+++ b/arch/m68knommu/kernel/ptrace.c
@@ -106,17 +106,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
106 switch (request) { 106 switch (request) {
107 /* when I and D space are separate, these will need to be fixed. */ 107 /* when I and D space are separate, these will need to be fixed. */
108 case PTRACE_PEEKTEXT: /* read word at location addr. */ 108 case PTRACE_PEEKTEXT: /* read word at location addr. */
109 case PTRACE_PEEKDATA: { 109 case PTRACE_PEEKDATA:
110 unsigned long tmp; 110 ret = generic_ptrace_peekdata(child, addr, data);
111 int copied;
112
113 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
114 ret = -EIO;
115 if (copied != sizeof(tmp))
116 break;
117 ret = put_user(tmp,(unsigned long *) data);
118 break; 111 break;
119 }
120 112
121 /* read the word at location addr in the USER area. */ 113 /* read the word at location addr in the USER area. */
122 case PTRACE_PEEKUSR: { 114 case PTRACE_PEEKUSR: {
@@ -159,10 +151,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
159 /* when I and D space are separate, this will have to be fixed. */ 151 /* when I and D space are separate, this will have to be fixed. */
160 case PTRACE_POKETEXT: /* write the word at location addr. */ 152 case PTRACE_POKETEXT: /* write the word at location addr. */
161 case PTRACE_POKEDATA: 153 case PTRACE_POKEDATA:
162 ret = 0; 154 ret = generic_ptrace_pokedata(child, addr, data);
163 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
164 break;
165 ret = -EIO;
166 break; 155 break;
167 156
168 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 157 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 8133b1047353..2203f694f26b 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -1,8 +1,8 @@
1/* 1/*
2 * linux/arch/m68knommu/kernel/setup.c 2 * linux/arch/m68knommu/kernel/setup.c
3 * 3 *
4 * Copyright (C) 1999-2004 Greg Ungerer (gerg@snapgear.com) 4 * Copyright (C) 1999-2007 Greg Ungerer (gerg@snapgear.com)
5 * Copyright (C) 1998,1999 D. Jeff Dionne <jeff@lineo.ca> 5 * Copyright (C) 1998,1999 D. Jeff Dionne <jeff@uClinux.org>
6 * Copyleft ()) 2000 James D. Schettine {james@telos-systems.com} 6 * Copyleft ()) 2000 James D. Schettine {james@telos-systems.com}
7 * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com> 7 * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>
8 * Copyright (C) 1995 Hamish Macdonald 8 * Copyright (C) 1995 Hamish Macdonald
@@ -20,17 +20,13 @@
20#include <linux/sched.h> 20#include <linux/sched.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/fs.h>
24#include <linux/fb.h> 23#include <linux/fb.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/console.h> 25#include <linux/console.h>
27#include <linux/genhd.h>
28#include <linux/errno.h> 26#include <linux/errno.h>
29#include <linux/string.h> 27#include <linux/string.h>
30#include <linux/major.h>
31#include <linux/bootmem.h> 28#include <linux/bootmem.h>
32#include <linux/seq_file.h> 29#include <linux/seq_file.h>
33#include <linux/root_dev.h>
34#include <linux/init.h> 30#include <linux/init.h>
35 31
36#include <asm/setup.h> 32#include <asm/setup.h>
@@ -46,34 +42,19 @@ EXPORT_SYMBOL(memory_end);
46 42
47char __initdata command_line[COMMAND_LINE_SIZE]; 43char __initdata command_line[COMMAND_LINE_SIZE];
48 44
49/* setup some dummy routines */ 45void (*mach_trap_init)(void);
50static void dummy_waitbut(void)
51{
52}
53 46
54void (*mach_sched_init) (irq_handler_t handler);
55void (*mach_tick)( void );
56/* machine dependent keyboard functions */
57int (*mach_keyb_init) (void);
58int (*mach_kbdrate) (struct kbd_repeat *);
59void (*mach_kbd_leds) (unsigned int);
60/* machine dependent irq functions */
61void (*mach_init_IRQ) (void);
62irq_handler_t mach_default_handler;
63int (*mach_get_irq_list) (struct seq_file *, void *);
64void (*mach_process_int) (int irq, struct pt_regs *fp);
65void (*mach_trap_init) (void);
66/* machine dependent timer functions */ 47/* machine dependent timer functions */
67unsigned long (*mach_gettimeoffset) (void); 48void (*mach_sched_init)(irq_handler_t handler);
68void (*mach_gettod) (int*, int*, int*, int*, int*, int*); 49void (*mach_tick)(void);
69int (*mach_hwclk) (int, struct rtc_time*); 50void (*mach_gettod)(int*, int*, int*, int*, int*, int*);
70int (*mach_set_clock_mmss) (unsigned long); 51int (*mach_set_clock_mmss)(unsigned long);
71void (*mach_mksound)( unsigned int count, unsigned int ticks ); 52unsigned long (*mach_gettimeoffset)(void);
72void (*mach_reset)( void ); 53
73void (*waitbut)(void) = dummy_waitbut; 54/* machine dependent reboot functions */
74void (*mach_debug_init)(void); 55void (*mach_reset)(void);
75void (*mach_halt)( void ); 56void (*mach_halt)(void);
76void (*mach_power_off)( void ); 57void (*mach_power_off)(void);
77 58
78 59
79#ifdef CONFIG_M68000 60#ifdef CONFIG_M68000
@@ -134,13 +115,6 @@ void (*mach_power_off)( void );
134 #define CPU "UNKNOWN" 115 #define CPU "UNKNOWN"
135#endif 116#endif
136 117
137/* (es) */
138/* note: why is this defined here? the must be a better place to put this */
139#if defined( CONFIG_TELOS) || defined( CONFIG_UCDIMM ) || defined( CONFIG_UCSIMM ) || defined(CONFIG_DRAGEN2) || (defined( CONFIG_PILOT ) && defined( CONFIG_M68328 ))
140#define CAT_ROMARRAY
141#endif
142/* (/es) */
143
144extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end; 118extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
145extern int _ramstart, _ramend; 119extern int _ramstart, _ramend;
146 120
@@ -148,15 +122,8 @@ void setup_arch(char **cmdline_p)
148{ 122{
149 int bootmap_size; 123 int bootmap_size;
150 124
151#if defined(CAT_ROMARRAY) && defined(DEBUG)
152 extern int __data_rom_start;
153 extern int __data_start;
154 int *romarray = (int *)((int) &__data_rom_start +
155 (int)&_edata - (int)&__data_start);
156#endif
157
158 memory_start = PAGE_ALIGN(_ramstart); 125 memory_start = PAGE_ALIGN(_ramstart);
159 memory_end = _ramend; /* by now the stack is part of the init task */ 126 memory_end = _ramend;
160 127
161 init_mm.start_code = (unsigned long) &_stext; 128 init_mm.start_code = (unsigned long) &_stext;
162 init_mm.end_code = (unsigned long) &_etext; 129 init_mm.end_code = (unsigned long) &_etext;
@@ -220,11 +187,7 @@ void setup_arch(char **cmdline_p)
220 (int) &_sbss, (int) &_ebss); 187 (int) &_sbss, (int) &_ebss);
221 printk(KERN_DEBUG "KERNEL -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x " 188 printk(KERN_DEBUG "KERNEL -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x "
222 "STACK=0x%06x-0x%06x\n", 189 "STACK=0x%06x-0x%06x\n",
223#ifdef CAT_ROMARRAY
224 (int) romarray, ((int) romarray) + romarray[2],
225#else
226 (int) &_ebss, (int) memory_start, 190 (int) &_ebss, (int) memory_start,
227#endif
228 (int) memory_start, (int) memory_end, 191 (int) memory_start, (int) memory_end,
229 (int) memory_end, (int) _ramend); 192 (int) memory_end, (int) _ramend);
230#endif 193#endif
@@ -268,32 +231,33 @@ void setup_arch(char **cmdline_p)
268/* 231/*
269 * Get CPU information for use by the procfs. 232 * Get CPU information for use by the procfs.
270 */ 233 */
271
272static int show_cpuinfo(struct seq_file *m, void *v) 234static int show_cpuinfo(struct seq_file *m, void *v)
273{ 235{
274 char *cpu, *mmu, *fpu; 236 char *cpu, *mmu, *fpu;
275 u_long clockfreq; 237 u_long clockfreq;
276 238
277 cpu = CPU; 239 cpu = CPU;
278 mmu = "none"; 240 mmu = "none";
279 fpu = "none"; 241 fpu = "none";
280 242
281#ifdef CONFIG_COLDFIRE 243#ifdef CONFIG_COLDFIRE
282 clockfreq = (loops_per_jiffy*HZ)*3; 244 clockfreq = (loops_per_jiffy * HZ) * 3;
283#else 245#else
284 clockfreq = (loops_per_jiffy*HZ)*16; 246 clockfreq = (loops_per_jiffy * HZ) * 16;
285#endif 247#endif
286 248
287 seq_printf(m, "CPU:\t\t%s\n" 249 seq_printf(m, "CPU:\t\t%s\n"
288 "MMU:\t\t%s\n" 250 "MMU:\t\t%s\n"
289 "FPU:\t\t%s\n" 251 "FPU:\t\t%s\n"
290 "Clocking:\t%lu.%1luMHz\n" 252 "Clocking:\t%lu.%1luMHz\n"
291 "BogoMips:\t%lu.%02lu\n" 253 "BogoMips:\t%lu.%02lu\n"
292 "Calibration:\t%lu loops\n", 254 "Calibration:\t%lu loops\n",
293 cpu, mmu, fpu, 255 cpu, mmu, fpu,
294 clockfreq/1000000,(clockfreq/100000)%10, 256 clockfreq / 1000000,
295 (loops_per_jiffy*HZ)/500000,((loops_per_jiffy*HZ)/5000)%100, 257 (clockfreq / 100000) % 10,
296 (loops_per_jiffy*HZ)); 258 (loops_per_jiffy * HZ) / 500000,
259 ((loops_per_jiffy * HZ) / 5000) % 100,
260 (loops_per_jiffy * HZ));
297 261
298 return 0; 262 return 0;
299} 263}
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c
index bed5f47bf568..437a061d8b94 100644
--- a/arch/m68knommu/kernel/traps.c
+++ b/arch/m68knommu/kernel/traps.c
@@ -62,8 +62,6 @@ static char const * const vec_names[] = {
62 62
63void __init trap_init(void) 63void __init trap_init(void)
64{ 64{
65 if (mach_trap_init)
66 mach_trap_init();
67} 65}
68 66
69void die_if_kernel(char *str, struct pt_regs *fp, int nr) 67void die_if_kernel(char *str, struct pt_regs *fp, int nr)
@@ -82,7 +80,8 @@ void die_if_kernel(char *str, struct pt_regs *fp, int nr)
82 80
83 printk(KERN_EMERG "Process %s (pid: %d, stackpage=%08lx)\n", 81 printk(KERN_EMERG "Process %s (pid: %d, stackpage=%08lx)\n",
84 current->comm, current->pid, PAGE_SIZE+(unsigned long)current); 82 current->comm, current->pid, PAGE_SIZE+(unsigned long)current);
85 show_stack(NULL, (unsigned long *)fp); 83 show_stack(NULL, (unsigned long *)(fp + 1));
84 add_taint(TAINT_DIE);
86 do_exit(SIGSEGV); 85 do_exit(SIGSEGV);
87} 86}
88 87
diff --git a/arch/m68knommu/mm/memory.c b/arch/m68knommu/mm/memory.c
index 411e45248e5c..f93b88b51f9f 100644
--- a/arch/m68knommu/mm/memory.c
+++ b/arch/m68knommu/mm/memory.c
@@ -17,90 +17,14 @@
17#include <linux/types.h> 17#include <linux/types.h>
18#include <linux/slab.h> 18#include <linux/slab.h>
19 19
20#include <asm/setup.h>
21#include <asm/segment.h> 20#include <asm/segment.h>
22#include <asm/page.h> 21#include <asm/page.h>
23#include <asm/pgtable.h> 22#include <asm/pgtable.h>
24#include <asm/system.h> 23#include <asm/system.h>
25#include <asm/traps.h>
26#include <asm/io.h>
27 24
28/* 25/*
29 * cache_clear() semantics: Clear any cache entries for the area in question, 26 * Map some physical address range into the kernel address space.
30 * without writing back dirty entries first. This is useful if the data will 27 * The code is copied and adapted from map_chunk().
31 * be overwritten anyway, e.g. by DMA to memory. The range is defined by a
32 * _physical_ address.
33 */
34
35void cache_clear (unsigned long paddr, int len)
36{
37}
38
39
40/*
41 * Define cache invalidate functions. The ColdFire 5407 is really
42 * the only processor that needs to do some work here. Anything
43 * that has separate data and instruction caches will be a problem.
44 */
45#ifdef CONFIG_M5407
46
47static __inline__ void cache_invalidate_lines(unsigned long paddr, int len)
48{
49 unsigned long sset, eset;
50
51 sset = (paddr & 0x00000ff0);
52 eset = ((paddr + len) & 0x0000ff0) + 0x10;
53
54 __asm__ __volatile__ (
55 "nop\n\t"
56 "clrl %%d0\n\t"
57 "1:\n\t"
58 "movel %0,%%a0\n\t"
59 "addl %%d0,%%a0\n\t"
60 "2:\n\t"
61 ".word 0xf4e8\n\t"
62 "addl #0x10,%%a0\n\t"
63 "cmpl %1,%%a0\n\t"
64 "blt 2b\n\t"
65 "addql #1,%%d0\n\t"
66 "cmpil #4,%%d0\n\t"
67 "bne 1b"
68 : : "a" (sset), "a" (eset) : "d0", "a0" );
69}
70
71#else
72#define cache_invalidate_lines(a,b)
73#endif
74
75
76/*
77 * cache_push() semantics: Write back any dirty cache data in the given area,
78 * and invalidate the range in the instruction cache. It needs not (but may)
79 * invalidate those entries also in the data cache. The range is defined by a
80 * _physical_ address.
81 */
82
83void cache_push (unsigned long paddr, int len)
84{
85 cache_invalidate_lines(paddr, len);
86}
87
88
89/*
90 * cache_push_v() semantics: Write back any dirty cache data in the given
91 * area, and invalidate those entries at least in the instruction cache. This
92 * is intended to be used after data has been written that can be executed as
93 * code later. The range is defined by a _user_mode_ _virtual_ address (or,
94 * more exactly, the space is defined by the %sfc/%dfc register.)
95 */
96
97void cache_push_v (unsigned long vaddr, int len)
98{
99 cache_invalidate_lines(vaddr, len);
100}
101
102/* Map some physical address range into the kernel address space. The
103 * code is copied and adapted from map_chunk().
104 */ 28 */
105 29
106unsigned long kernel_map(unsigned long paddr, unsigned long size, 30unsigned long kernel_map(unsigned long paddr, unsigned long size,
@@ -109,23 +33,3 @@ unsigned long kernel_map(unsigned long paddr, unsigned long size,
109 return paddr; 33 return paddr;
110} 34}
111 35
112
113int is_in_rom(unsigned long addr)
114{
115 extern unsigned long _ramstart, _ramend;
116
117 /*
118 * What we are really trying to do is determine if addr is
119 * in an allocated kernel memory region. If not then assume
120 * we cannot free it or otherwise de-allocate it. Ideally
121 * we could restrict this to really being in a ROM or flash,
122 * but that would need to be done on a board by board basis,
123 * not globally.
124 */
125 if ((addr < _ramstart) || (addr >= _ramend))
126 return(1);
127
128 /* Default case, not in ROM */
129 return(0);
130}
131
diff --git a/arch/m68knommu/platform/5307/Makefile b/arch/m68knommu/platform/5307/Makefile
index 2fd37dcc309b..719a313494bc 100644
--- a/arch/m68knommu/platform/5307/Makefile
+++ b/arch/m68knommu/platform/5307/Makefile
@@ -16,7 +16,7 @@ ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-$(CONFIG_COLDFIRE) += entry.o vectors.o ints.o 19obj-$(CONFIG_COLDFIRE) += entry.o vectors.o
20obj-$(CONFIG_M5206) += timers.o 20obj-$(CONFIG_M5206) += timers.o
21obj-$(CONFIG_M5206e) += timers.o 21obj-$(CONFIG_M5206e) += timers.o
22obj-$(CONFIG_M520x) += pit.o 22obj-$(CONFIG_M520x) += pit.o
diff --git a/arch/m68knommu/platform/5307/entry.S b/arch/m68knommu/platform/5307/entry.S
index f0dba84d9101..c358aebe0af3 100644
--- a/arch/m68knommu/platform/5307/entry.S
+++ b/arch/m68knommu/platform/5307/entry.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/arch/m68knommu/platform/5307/entry.S 2 * linux/arch/m68knommu/platform/5307/entry.S
3 * 3 *
4 * Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com) 4 * Copyright (C) 1999-2007, Greg Ungerer (gerg@snapgear.com)
5 * Copyright (C) 1998 D. Jeff Dionne <jeff@lineo.ca>, 5 * Copyright (C) 1998 D. Jeff Dionne <jeff@lineo.ca>,
6 * Kenneth Albanowski <kjahds@kjahds.com>, 6 * Kenneth Albanowski <kjahds@kjahds.com>,
7 * Copyright (C) 2000 Lineo Inc. (www.lineo.com) 7 * Copyright (C) 2000 Lineo Inc. (www.lineo.com)
@@ -155,34 +155,21 @@ Lsignal_return:
155 155
156/* 156/*
157 * This is the generic interrupt handler (for all hardware interrupt 157 * This is the generic interrupt handler (for all hardware interrupt
158 * sources). It figures out the vector number and calls the appropriate 158 * sources). Calls upto high level code to do all the work.
159 * interrupt service routine directly.
160 */ 159 */
161ENTRY(inthandler) 160ENTRY(inthandler)
162 SAVE_ALL 161 SAVE_ALL
163 moveq #-1,%d0 162 moveq #-1,%d0
164 movel %d0,%sp@(PT_ORIG_D0) 163 movel %d0,%sp@(PT_ORIG_D0)
165 addql #1,local_irq_count
166 164
167 movew %sp@(PT_FORMATVEC),%d0 /* put exception # in d0 */ 165 movew %sp@(PT_FORMATVEC),%d0 /* put exception # in d0 */
168 andl #0x03fc,%d0 /* mask out vector only */ 166 andl #0x03fc,%d0 /* mask out vector only */
169 167
170 leal per_cpu__kstat+STAT_IRQ,%a0 168 movel %sp,%sp@- /* push regs arg */
171 addql #1,%a0@(%d0)
172
173 lsrl #2,%d0 /* calculate real vector # */ 169 lsrl #2,%d0 /* calculate real vector # */
174 movel %d0,%d1 /* calculate array offset */ 170 movel %d0,%sp@- /* push vector number */
175 lsll #4,%d1 171 jbsr do_IRQ /* call high level irq handler */
176 lea irq_list,%a0 172 lea %sp@(8),%sp /* pop args off stack */
177 addl %d1,%a0 /* pointer to array struct */
178
179 movel %sp,%sp@- /* push regs arg onto stack */
180 movel %a0@(8),%sp@- /* push devid arg */
181 movel %d0,%sp@- /* push vector # on stack */
182
183 movel %a0@,%a0 /* get function to call */
184 jbsr %a0@ /* call vector handler */
185 lea %sp@(12),%sp /* pop parameters off stack */
186 173
187 bra ret_from_interrupt /* this was fallthrough */ 174 bra ret_from_interrupt /* this was fallthrough */
188 175
@@ -198,24 +185,15 @@ ENTRY(fasthandler)
198 movew %sp@(PT_FORMATVEC),%d0 185 movew %sp@(PT_FORMATVEC),%d0
199 andl #0x03fc,%d0 /* mask out vector only */ 186 andl #0x03fc,%d0 /* mask out vector only */
200 187
201 leal per_cpu__kstat+STAT_IRQ,%a0 188 movel %sp,%sp@- /* push regs arg */
202 addql #1,%a0@(%d0)
203
204 movel %sp,%sp@- /* push regs arg onto stack */
205 clrl %sp@- /* push devid arg */
206 lsrl #2,%d0 /* calculate real vector # */ 189 lsrl #2,%d0 /* calculate real vector # */
207 movel %d0,%sp@- /* push vector # on stack */ 190 movel %d0,%sp@- /* push vector number */
208 191 jbsr do_IRQ /* call high level irq handler */
209 lsll #4,%d0 /* adjust for array offset */ 192 lea %sp@(8),%sp /* pop args off stack */
210 lea irq_list,%a0
211 movel %a0@(%d0),%a0 /* get function to call */
212 jbsr %a0@ /* call vector handler */
213 lea %sp@(12),%sp /* pop parameters off stack */
214 193
215 RESTORE_LOCAL 194 RESTORE_LOCAL
216 195
217ENTRY(ret_from_interrupt) 196ENTRY(ret_from_interrupt)
218 subql #1,local_irq_count
219 jeq 2f 197 jeq 2f
2201: 1981:
221 RESTORE_ALL 199 RESTORE_ALL
diff --git a/arch/m68knommu/platform/5307/ints.c b/arch/m68knommu/platform/5307/ints.c
deleted file mode 100644
index 751633038c4b..000000000000
--- a/arch/m68knommu/platform/5307/ints.c
+++ /dev/null
@@ -1,279 +0,0 @@
1/*
2 * linux/arch/m68knommu/kernel/ints.c -- General interrupt handling code
3 *
4 * Copyright (C) 1999-2002 Greg Ungerer (gerg@snapgear.com)
5 * Copyright (C) 1998 D. Jeff Dionne <jeff@lineo.ca>,
6 * Kenneth Albanowski <kjahds@kjahds.com>,
7 * Copyright (C) 2000 Lineo Inc. (www.lineo.com)
8 *
9 * Based on:
10 *
11 * linux/arch/m68k/kernel/ints.c -- Linux/m68k general interrupt handling code
12 *
13 * This file is subject to the terms and conditions of the GNU General Public
14 * License. See the file COPYING in the main directory of this archive
15 * for more details.
16 */
17
18#include <linux/module.h>
19#include <linux/types.h>
20#include <linux/init.h>
21#include <linux/sched.h>
22#include <linux/interrupt.h>
23#include <linux/kernel_stat.h>
24#include <linux/errno.h>
25#include <linux/seq_file.h>
26
27#include <asm/system.h>
28#include <asm/irq.h>
29#include <asm/irqnode.h>
30#include <asm/traps.h>
31#include <asm/page.h>
32#include <asm/machdep.h>
33
34/*
35 * This table stores the address info for each vector handler.
36 */
37struct irq_entry irq_list[SYS_IRQS];
38
39#define NUM_IRQ_NODES 16
40static irq_node_t nodes[NUM_IRQ_NODES];
41
42/* The number of spurious interrupts */
43volatile unsigned int num_spurious;
44
45unsigned int local_irq_count[NR_CPUS];
46
47static irqreturn_t default_irq_handler(int irq, void *ptr)
48{
49#if 1
50 printk(KERN_INFO "%s(%d): default irq handler vec=%d [0x%x]\n",
51 __FILE__, __LINE__, irq, irq);
52#endif
53 return(IRQ_HANDLED);
54}
55
56/*
57 * void init_IRQ(void)
58 *
59 * Parameters: None
60 *
61 * Returns: Nothing
62 *
63 * This function should be called during kernel startup to initialize
64 * the IRQ handling routines.
65 */
66
67void __init init_IRQ(void)
68{
69 int i;
70
71 for (i = 0; i < SYS_IRQS; i++) {
72 if (mach_default_handler)
73 irq_list[i].handler = mach_default_handler;
74 else
75 irq_list[i].handler = default_irq_handler;
76 irq_list[i].flags = IRQ_FLG_STD;
77 irq_list[i].dev_id = NULL;
78 irq_list[i].devname = NULL;
79 }
80
81 for (i = 0; i < NUM_IRQ_NODES; i++)
82 nodes[i].handler = NULL;
83
84 if (mach_init_IRQ)
85 mach_init_IRQ();
86}
87
88irq_node_t *new_irq_node(void)
89{
90 irq_node_t *node;
91 short i;
92
93 for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--)
94 if (!node->handler)
95 return node;
96
97 printk(KERN_INFO "new_irq_node: out of nodes\n");
98 return NULL;
99}
100
101int request_irq(
102 unsigned int irq,
103 irq_handler_t handler,
104 unsigned long flags,
105 const char *devname,
106 void *dev_id)
107{
108 if (irq < 0 || irq >= NR_IRQS) {
109 printk(KERN_WARNING "%s: Incorrect IRQ %d from %s\n", __FUNCTION__,
110 irq, devname);
111 return -ENXIO;
112 }
113
114 if (!(irq_list[irq].flags & IRQ_FLG_STD)) {
115 if (irq_list[irq].flags & IRQ_FLG_LOCK) {
116 printk(KERN_WARNING "%s: IRQ %d from %s is not replaceable\n",
117 __FUNCTION__, irq, irq_list[irq].devname);
118 return -EBUSY;
119 }
120 if (flags & IRQ_FLG_REPLACE) {
121 printk(KERN_WARNING "%s: %s can't replace IRQ %d from %s\n",
122 __FUNCTION__, devname, irq, irq_list[irq].devname);
123 return -EBUSY;
124 }
125 }
126
127 if (flags & IRQ_FLG_FAST) {
128 extern asmlinkage void fasthandler(void);
129 extern void set_evector(int vecnum, void (*handler)(void));
130 set_evector(irq, fasthandler);
131 }
132
133 irq_list[irq].handler = handler;
134 irq_list[irq].flags = flags;
135 irq_list[irq].dev_id = dev_id;
136 irq_list[irq].devname = devname;
137 return 0;
138}
139
140EXPORT_SYMBOL(request_irq);
141
142void free_irq(unsigned int irq, void *dev_id)
143{
144 if (irq >= NR_IRQS) {
145 printk(KERN_WARNING "%s: Incorrect IRQ %d\n", __FUNCTION__, irq);
146 return;
147 }
148
149 if (irq_list[irq].dev_id != dev_id)
150 printk(KERN_WARNING "%s: Removing probably wrong IRQ %d from %s\n",
151 __FUNCTION__, irq, irq_list[irq].devname);
152
153 if (irq_list[irq].flags & IRQ_FLG_FAST) {
154 extern asmlinkage void inthandler(void);
155 extern void set_evector(int vecnum, void (*handler)(void));
156 set_evector(irq, inthandler);
157 }
158
159 if (mach_default_handler)
160 irq_list[irq].handler = mach_default_handler;
161 else
162 irq_list[irq].handler = default_irq_handler;
163 irq_list[irq].flags = IRQ_FLG_STD;
164 irq_list[irq].dev_id = NULL;
165 irq_list[irq].devname = NULL;
166}
167
168EXPORT_SYMBOL(free_irq);
169
170
171int sys_request_irq(unsigned int irq, irq_handler_t handler,
172 unsigned long flags, const char *devname, void *dev_id)
173{
174 if (irq > IRQ7) {
175 printk(KERN_WARNING "%s: Incorrect IRQ %d from %s\n",
176 __FUNCTION__, irq, devname);
177 return -ENXIO;
178 }
179
180#if 0
181 if (!(irq_list[irq].flags & IRQ_FLG_STD)) {
182 if (irq_list[irq].flags & IRQ_FLG_LOCK) {
183 printk(KERN_WARNING "%s: IRQ %d from %s is not replaceable\n",
184 __FUNCTION__, irq, irq_list[irq].devname);
185 return -EBUSY;
186 }
187 if (!(flags & IRQ_FLG_REPLACE)) {
188 printk(KERN_WARNING "%s: %s can't replace IRQ %d from %s\n",
189 __FUNCTION__, devname, irq, irq_list[irq].devname);
190 return -EBUSY;
191 }
192 }
193#endif
194
195 irq_list[irq].handler = handler;
196 irq_list[irq].flags = flags;
197 irq_list[irq].dev_id = dev_id;
198 irq_list[irq].devname = devname;
199 return 0;
200}
201
202void sys_free_irq(unsigned int irq, void *dev_id)
203{
204 if (irq > IRQ7) {
205 printk(KERN_WARNING "%s: Incorrect IRQ %d\n", __FUNCTION__, irq);
206 return;
207 }
208
209 if (irq_list[irq].dev_id != dev_id)
210 printk(KERN_WARNING "%s: Removing probably wrong IRQ %d from %s\n",
211 __FUNCTION__, irq, irq_list[irq].devname);
212
213 irq_list[irq].handler = mach_default_handler;
214 irq_list[irq].flags = 0;
215 irq_list[irq].dev_id = NULL;
216 irq_list[irq].devname = NULL;
217}
218
219/*
220 * Do we need these probe functions on the m68k?
221 *
222 * ... may be useful with ISA devices
223 */
224unsigned long probe_irq_on (void)
225{
226 return 0;
227}
228
229EXPORT_SYMBOL(probe_irq_on);
230
231int probe_irq_off (unsigned long irqs)
232{
233 return 0;
234}
235
236EXPORT_SYMBOL(probe_irq_off);
237
238asmlinkage void process_int(unsigned long vec, struct pt_regs *fp)
239{
240 if (vec >= VEC_INT1 && vec <= VEC_INT7) {
241 vec -= VEC_SPUR;
242 kstat_cpu(0).irqs[vec]++;
243 irq_list[vec].handler(vec, irq_list[vec].dev_id);
244 } else {
245 if (mach_process_int)
246 mach_process_int(vec, fp);
247 else
248 panic("Can't process interrupt vector %ld\n", vec);
249 return;
250 }
251}
252
253
254int show_interrupts(struct seq_file *p, void *v)
255{
256 int i = *(loff_t *) v;
257
258 if (i < NR_IRQS) {
259 if (! (irq_list[i].flags & IRQ_FLG_STD)) {
260 seq_printf(p, "%3d: %10u ", i,
261 (i ? kstat_cpu(0).irqs[i] : num_spurious));
262 if (irq_list[i].flags & IRQ_FLG_LOCK)
263 seq_printf(p, "L ");
264 else
265 seq_printf(p, " ");
266 seq_printf(p, "%s\n", irq_list[i].devname);
267 }
268 }
269
270 if (i == NR_IRQS && mach_get_irq_list)
271 mach_get_irq_list(p, v);
272 return 0;
273}
274
275void init_irq_proc(void)
276{
277 /* Insert /proc/irq driver here */
278}
279
diff --git a/arch/m68knommu/platform/5307/timers.c b/arch/m68knommu/platform/5307/timers.c
index 92e58070b016..fb66eadd5896 100644
--- a/arch/m68knommu/platform/5307/timers.c
+++ b/arch/m68knommu/platform/5307/timers.c
@@ -62,10 +62,13 @@ void coldfire_tick(void)
62 62
63/***************************************************************************/ 63/***************************************************************************/
64 64
65static int ticks_per_intr;
66
65void coldfire_timer_init(irq_handler_t handler) 67void coldfire_timer_init(irq_handler_t handler)
66{ 68{
67 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); 69 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR));
68 __raw_writetrr(((MCF_BUSCLK / 16) / HZ), TA(MCFTIMER_TRR)); 70 ticks_per_intr = (MCF_BUSCLK / 16) / HZ;
71 __raw_writetrr(ticks_per_intr - 1, TA(MCFTIMER_TRR));
69 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | 72 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
70 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); 73 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR));
71 74
@@ -81,11 +84,10 @@ void coldfire_timer_init(irq_handler_t handler)
81 84
82unsigned long coldfire_timer_offset(void) 85unsigned long coldfire_timer_offset(void)
83{ 86{
84 unsigned long trr, tcn, offset; 87 unsigned long tcn, offset;
85 88
86 tcn = __raw_readw(TA(MCFTIMER_TCN)); 89 tcn = __raw_readw(TA(MCFTIMER_TCN));
87 trr = __raw_readtrr(TA(MCFTIMER_TRR)); 90 offset = ((tcn + 1) * (1000000 / HZ)) / ticks_per_intr;
88 offset = (tcn * (1000000 / HZ)) / trr;
89 91
90 /* Check if we just wrapped the counters and maybe missed a tick */ 92 /* Check if we just wrapped the counters and maybe missed a tick */
91 if ((offset < (1000000 / HZ / 2)) && mcf_timerirqpending(1)) 93 if ((offset < (1000000 / HZ / 2)) && mcf_timerirqpending(1))
diff --git a/arch/m68knommu/platform/5307/vectors.c b/arch/m68knommu/platform/5307/vectors.c
index 2a8b0d044ce5..6cf894620234 100644
--- a/arch/m68knommu/platform/5307/vectors.c
+++ b/arch/m68knommu/platform/5307/vectors.c
@@ -3,23 +3,17 @@
3/* 3/*
4 * linux/arch/m68knommu/platform/5307/vectors.c 4 * linux/arch/m68knommu/platform/5307/vectors.c
5 * 5 *
6 * Copyright (C) 1999-2003, Greg Ungerer <gerg@snapgear.com> 6 * Copyright (C) 1999-2007, Greg Ungerer <gerg@snapgear.com>
7 */ 7 */
8 8
9/***************************************************************************/ 9/***************************************************************************/
10 10
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/sched.h>
13#include <linux/param.h>
14#include <linux/init.h> 12#include <linux/init.h>
15#include <linux/unistd.h> 13#include <linux/irq.h>
16#include <linux/delay.h>
17#include <asm/irq.h>
18#include <asm/dma.h>
19#include <asm/traps.h> 14#include <asm/traps.h>
20#include <asm/machdep.h> 15#include <asm/machdep.h>
21#include <asm/coldfire.h> 16#include <asm/coldfire.h>
22#include <asm/mcftimer.h>
23#include <asm/mcfsim.h> 17#include <asm/mcfsim.h>
24#include <asm/mcfdma.h> 18#include <asm/mcfdma.h>
25#include <asm/mcfwdebug.h> 19#include <asm/mcfwdebug.h>
@@ -56,7 +50,7 @@ asmlinkage void trap(void);
56asmlinkage void system_call(void); 50asmlinkage void system_call(void);
57asmlinkage void inthandler(void); 51asmlinkage void inthandler(void);
58 52
59void __init coldfire_trap_init(void) 53void __init init_vectors(void)
60{ 54{
61 int i; 55 int i;
62 56
@@ -86,6 +80,23 @@ void __init coldfire_trap_init(void)
86 80
87/***************************************************************************/ 81/***************************************************************************/
88 82
83void enable_vector(unsigned int irq)
84{
85 /* Currently no action on ColdFire */
86}
87
88void disable_vector(unsigned int irq)
89{
90 /* Currently no action on ColdFire */
91}
92
93void ack_vector(unsigned int irq)
94{
95 /* Currently no action on ColdFire */
96}
97
98/***************************************************************************/
99
89void coldfire_reset(void) 100void coldfire_reset(void)
90{ 101{
91 HARD_RESET_NOW(); 102 HARD_RESET_NOW();
diff --git a/arch/m68knommu/platform/68328/entry.S b/arch/m68knommu/platform/68328/entry.S
index f97862715450..b1aef72f3baf 100644
--- a/arch/m68knommu/platform/68328/entry.S
+++ b/arch/m68knommu/platform/68328/entry.S
@@ -133,7 +133,6 @@ Lreturn:
133 */ 133 */
134inthandler1: 134inthandler1:
135 SAVE_ALL 135 SAVE_ALL
136 addql #1,local_irq_count /* put exception # in d0*/
137 movew %sp@(PT_VECTOR), %d0 136 movew %sp@(PT_VECTOR), %d0
138 and #0x3ff, %d0 137 and #0x3ff, %d0
139 138
@@ -145,7 +144,6 @@ inthandler1:
145 144
146inthandler2: 145inthandler2:
147 SAVE_ALL 146 SAVE_ALL
148 addql #1,local_irq_count /* put exception # in d0*/
149 movew %sp@(PT_VECTOR), %d0 147 movew %sp@(PT_VECTOR), %d0
150 and #0x3ff, %d0 148 and #0x3ff, %d0
151 149
@@ -157,7 +155,6 @@ inthandler2:
157 155
158inthandler3: 156inthandler3:
159 SAVE_ALL 157 SAVE_ALL
160 addql #1,local_irq_count /* put exception # in d0*/
161 movew %sp@(PT_VECTOR), %d0 158 movew %sp@(PT_VECTOR), %d0
162 and #0x3ff, %d0 159 and #0x3ff, %d0
163 160
@@ -169,7 +166,6 @@ inthandler3:
169 166
170inthandler4: 167inthandler4:
171 SAVE_ALL 168 SAVE_ALL
172 addql #1,local_irq_count /* put exception # in d0*/
173 movew %sp@(PT_VECTOR), %d0 169 movew %sp@(PT_VECTOR), %d0
174 and #0x3ff, %d0 170 and #0x3ff, %d0
175 171
@@ -181,7 +177,6 @@ inthandler4:
181 177
182inthandler5: 178inthandler5:
183 SAVE_ALL 179 SAVE_ALL
184 addql #1,local_irq_count /* put exception # in d0*/
185 movew %sp@(PT_VECTOR), %d0 180 movew %sp@(PT_VECTOR), %d0
186 and #0x3ff, %d0 181 and #0x3ff, %d0
187 182
@@ -193,7 +188,6 @@ inthandler5:
193 188
194inthandler6: 189inthandler6:
195 SAVE_ALL 190 SAVE_ALL
196 addql #1,local_irq_count /* put exception # in d0*/
197 movew %sp@(PT_VECTOR), %d0 191 movew %sp@(PT_VECTOR), %d0
198 and #0x3ff, %d0 192 and #0x3ff, %d0
199 193
@@ -205,7 +199,6 @@ inthandler6:
205 199
206inthandler7: 200inthandler7:
207 SAVE_ALL 201 SAVE_ALL
208 addql #1,local_irq_count /* put exception # in d0*/
209 movew %sp@(PT_VECTOR), %d0 202 movew %sp@(PT_VECTOR), %d0
210 and #0x3ff, %d0 203 and #0x3ff, %d0
211 204
@@ -217,7 +210,6 @@ inthandler7:
217 210
218inthandler: 211inthandler:
219 SAVE_ALL 212 SAVE_ALL
220 addql #1,local_irq_count /* put exception # in d0*/
221 movew %sp@(PT_VECTOR), %d0 213 movew %sp@(PT_VECTOR), %d0
222 and #0x3ff, %d0 214 and #0x3ff, %d0
223 215
@@ -228,7 +220,6 @@ inthandler:
228 bra ret_from_interrupt 220 bra ret_from_interrupt
229 221
230ret_from_interrupt: 222ret_from_interrupt:
231 subql #1,local_irq_count
232 jeq 1f 223 jeq 1f
2332: 2242:
234 RESTORE_ALL 225 RESTORE_ALL
@@ -238,7 +229,6 @@ ret_from_interrupt:
238 jhi 2b 229 jhi 2b
239 230
240 /* check if we need to do software interrupts */ 231 /* check if we need to do software interrupts */
241 movel local_irq_count,%d0
242 jeq ret_from_exception 232 jeq ret_from_exception
243 233
244 pea ret_from_exception 234 pea ret_from_exception
diff --git a/arch/m68knommu/platform/68328/ints.c b/arch/m68knommu/platform/68328/ints.c
index 3de6e337554e..72e56d554f4f 100644
--- a/arch/m68knommu/platform/68328/ints.c
+++ b/arch/m68knommu/platform/68328/ints.c
@@ -9,21 +9,14 @@
9 * Copyright 1999 D. Jeff Dionne <jeff@rt-control.com> 9 * Copyright 1999 D. Jeff Dionne <jeff@rt-control.com>
10 */ 10 */
11 11
12#include <linux/module.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/sched.h> 14#include <linux/init.h>
16#include <linux/kernel_stat.h>
17#include <linux/errno.h>
18#include <linux/interrupt.h> 15#include <linux/interrupt.h>
19 16#include <linux/irq.h>
20#include <asm/system.h>
21#include <asm/irq.h>
22#include <asm/irqnode.h>
23#include <asm/traps.h> 17#include <asm/traps.h>
24#include <asm/io.h> 18#include <asm/io.h>
25#include <asm/machdep.h> 19#include <asm/machdep.h>
26#include <asm/setup.h>
27 20
28#if defined(CONFIG_M68328) 21#if defined(CONFIG_M68328)
29#include <asm/MC68328.h> 22#include <asm/MC68328.h>
@@ -79,16 +72,12 @@ extern e_vector *_ramvec;
79 72
80/* The number of spurious interrupts */ 73/* The number of spurious interrupts */
81volatile unsigned int num_spurious; 74volatile unsigned int num_spurious;
82unsigned int local_irq_count[NR_CPUS];
83
84/* irq node variables for the 32 (potential) on chip sources */
85static irq_node_t int_irq_list[NR_IRQS];
86 75
87/* 76/*
88 * This function should be called during kernel startup to initialize 77 * This function should be called during kernel startup to initialize
89 * the IRQ handling routines. 78 * the machine vector table.
90 */ 79 */
91void init_IRQ(void) 80void __init init_vectors(void)
92{ 81{
93 int i; 82 int i;
94 83
@@ -108,96 +97,10 @@ void init_IRQ(void)
108 97
109 IVR = 0x40; /* Set DragonBall IVR (interrupt base) to 64 */ 98 IVR = 0x40; /* Set DragonBall IVR (interrupt base) to 64 */
110 99
111 /* initialize handlers */
112 for (i = 0; i < NR_IRQS; i++) {
113 int_irq_list[i].handler = bad_interrupt;
114 int_irq_list[i].flags = IRQ_FLG_STD;
115 int_irq_list[i].dev_id = NULL;
116 int_irq_list[i].devname = NULL;
117 }
118
119 /* turn off all interrupts */ 100 /* turn off all interrupts */
120 IMR = ~0; 101 IMR = ~0;
121} 102}
122 103
123int request_irq(
124 unsigned int irq,
125 irq_handler_t handler,
126 unsigned long flags,
127 const char *devname,
128 void *dev_id)
129{
130 if (irq >= NR_IRQS) {
131 printk (KERN_ERR "%s: Unknown IRQ %d from %s\n", __FUNCTION__, irq, devname);
132 return -ENXIO;
133 }
134
135 if (!(int_irq_list[irq].flags & IRQ_FLG_STD)) {
136 if (int_irq_list[irq].flags & IRQ_FLG_LOCK) {
137 printk(KERN_ERR "%s: IRQ %d from %s is not replaceable\n",
138 __FUNCTION__, irq, int_irq_list[irq].devname);
139 return -EBUSY;
140 }
141 if (flags & IRQ_FLG_REPLACE) {
142 printk(KERN_ERR "%s: %s can't replace IRQ %d from %s\n",
143 __FUNCTION__, devname, irq, int_irq_list[irq].devname);
144 return -EBUSY;
145 }
146 }
147
148 int_irq_list[irq].handler = handler;
149 int_irq_list[irq].flags = flags;
150 int_irq_list[irq].dev_id = dev_id;
151 int_irq_list[irq].devname = devname;
152
153 IMR &= ~(1<<irq);
154
155 return 0;
156}
157
158EXPORT_SYMBOL(request_irq);
159
160void free_irq(unsigned int irq, void *dev_id)
161{
162 if (irq >= NR_IRQS) {
163 printk (KERN_ERR "%s: Unknown IRQ %d\n", __FUNCTION__, irq);
164 return;
165 }
166
167 if (int_irq_list[irq].dev_id != dev_id)
168 printk(KERN_INFO "%s: removing probably wrong IRQ %d from %s\n",
169 __FUNCTION__, irq, int_irq_list[irq].devname);
170
171 int_irq_list[irq].handler = bad_interrupt;
172 int_irq_list[irq].flags = IRQ_FLG_STD;
173 int_irq_list[irq].dev_id = NULL;
174 int_irq_list[irq].devname = NULL;
175
176 IMR |= 1<<irq;
177}
178
179EXPORT_SYMBOL(free_irq);
180
181int show_interrupts(struct seq_file *p, void *v)
182{
183 int i = *(loff_t *) v;
184
185 if (i < NR_IRQS) {
186 if (int_irq_list[i].devname) {
187 seq_printf(p, "%3d: %10u ", i, kstat_cpu(0).irqs[i]);
188 if (int_irq_list[i].flags & IRQ_FLG_LOCK)
189 seq_printf(p, "L ");
190 else
191 seq_printf(p, " ");
192 seq_printf(p, "%s\n", int_irq_list[i].devname);
193 }
194 }
195 if (i == NR_IRQS)
196 seq_printf(p, " : %10u spurious\n", num_spurious);
197
198 return 0;
199}
200
201/* The 68k family did not have a good way to determine the source 104/* The 68k family did not have a good way to determine the source
202 * of interrupts until later in the family. The EC000 core does 105 * of interrupts until later in the family. The EC000 core does
203 * not provide the vector number on the stack, we vector everything 106 * not provide the vector number on the stack, we vector everything
@@ -255,14 +158,23 @@ void process_int(int vec, struct pt_regs *fp)
255 irq++; 158 irq++;
256 } 159 }
257 160
258 kstat_cpu(0).irqs[irq]++; 161 do_IRQ(irq, fp);
259
260 if (int_irq_list[irq].handler) {
261 int_irq_list[irq].handler(irq, int_irq_list[irq].dev_id, fp);
262 } else {
263 printk(KERN_ERR "unregistered interrupt %d!\nTurning it off in the IMR...\n", irq);
264 IMR |= mask;
265 }
266 pend &= ~mask; 162 pend &= ~mask;
267 } 163 }
268} 164}
165
166void enable_vector(unsigned int irq)
167{
168 IMR &= ~(1<<irq);
169}
170
171void disable_vector(unsigned int irq)
172{
173 IMR |= (1<<irq);
174}
175
176void ack_vector(unsigned int irq)
177{
178 /* Nothing needed */
179}
180
diff --git a/arch/m68knommu/platform/68360/entry.S b/arch/m68knommu/platform/68360/entry.S
index f1af8977f294..55dfefe38642 100644
--- a/arch/m68knommu/platform/68360/entry.S
+++ b/arch/m68knommu/platform/68360/entry.S
@@ -120,23 +120,21 @@ Lreturn:
120 RESTORE_ALL 120 RESTORE_ALL
121 121
122/* 122/*
123 * This is the main interrupt handler, responsible for calling process_int() 123 * This is the main interrupt handler, responsible for calling do_IRQ()
124 */ 124 */
125inthandler: 125inthandler:
126 SAVE_ALL 126 SAVE_ALL
127 addql #1,local_irq_count /* put exception # in d0*/
128 movew %sp@(PT_VECTOR), %d0 127 movew %sp@(PT_VECTOR), %d0
129 and.l #0x3ff, %d0 128 and.l #0x3ff, %d0
130 lsr.l #0x02, %d0 129 lsr.l #0x02, %d0
131 130
132 movel %sp,%sp@- 131 movel %sp,%sp@-
133 movel %d0,%sp@- /* put vector # on stack*/ 132 movel %d0,%sp@- /* put vector # on stack*/
134 jbsr process_int /* process the IRQ*/ 133 jbsr do_IRQ /* process the IRQ*/
1353: addql #8,%sp /* pop parameters off stack*/ 1343: addql #8,%sp /* pop parameters off stack*/
136 bra ret_from_interrupt 135 bra ret_from_interrupt
137 136
138ret_from_interrupt: 137ret_from_interrupt:
139 subql #1,local_irq_count
140 jeq 1f 138 jeq 1f
1412: 1392:
142 RESTORE_ALL 140 RESTORE_ALL
diff --git a/arch/m68knommu/platform/68360/ints.c b/arch/m68knommu/platform/68360/ints.c
index 4df3c146eb74..c36781157e09 100644
--- a/arch/m68knommu/platform/68360/ints.c
+++ b/arch/m68knommu/platform/68360/ints.c
@@ -10,20 +10,13 @@
10 * Copyright (c) 1999 D. Jeff Dionne <jeff@uclinux.org> 10 * Copyright (c) 1999 D. Jeff Dionne <jeff@uclinux.org>
11 */ 11 */
12 12
13#include <linux/module.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/sched.h> 15#include <linux/init.h>
17#include <linux/kernel_stat.h> 16#include <linux/interrupt.h>
18#include <linux/errno.h> 17#include <linux/irq.h>
19
20#include <asm/system.h>
21#include <asm/irq.h>
22#include <asm/irqnode.h>
23#include <asm/traps.h> 18#include <asm/traps.h>
24#include <asm/io.h>
25#include <asm/machdep.h> 19#include <asm/machdep.h>
26#include <asm/setup.h>
27#include <asm/m68360.h> 20#include <asm/m68360.h>
28 21
29/* from quicc/commproc.c: */ 22/* from quicc/commproc.c: */
@@ -36,26 +29,19 @@ extern void cpm_interrupt_init(void);
36asmlinkage void system_call(void); 29asmlinkage void system_call(void);
37asmlinkage void buserr(void); 30asmlinkage void buserr(void);
38asmlinkage void trap(void); 31asmlinkage void trap(void);
39asmlinkage irqreturn_t bad_interrupt(void); 32asmlinkage void bad_interrupt(void);
40asmlinkage irqreturn_t inthandler(void); 33asmlinkage void inthandler(void);
41 34
42extern void *_ramvec[]; 35extern void *_ramvec[];
43 36
44/* The number of spurious interrupts */ 37/* The number of spurious interrupts */
45volatile unsigned int num_spurious; 38volatile unsigned int num_spurious;
46unsigned int local_irq_count[NR_CPUS];
47
48/* irq node variables for the 32 (potential) on chip sources */
49static irq_node_t int_irq_list[INTERNAL_IRQS];
50
51static short int_irq_ablecount[INTERNAL_IRQS];
52 39
53/* 40/*
54 * This function should be called during kernel startup to initialize 41 * This function should be called during kernel startup to initialize
55 * IRQ handling routines. 42 * the vector table.
56 */ 43 */
57 44void init_vectors(void)
58void init_IRQ(void)
59{ 45{
60 int i; 46 int i;
61 int vba = (CPM_VECTOR_BASE<<4); 47 int vba = (CPM_VECTOR_BASE<<4);
@@ -79,7 +65,6 @@ void init_IRQ(void)
79 _ramvec[32] = system_call; 65 _ramvec[32] = system_call;
80 _ramvec[33] = trap; 66 _ramvec[33] = trap;
81 67
82
83 cpm_interrupt_init(); 68 cpm_interrupt_init();
84 69
85 /* set up CICR for vector base address and irq level */ 70 /* set up CICR for vector base address and irq level */
@@ -124,212 +109,20 @@ void init_IRQ(void)
124 109
125 /* turn off all CPM interrupts */ 110 /* turn off all CPM interrupts */
126 pquicc->intr_cimr = 0x00000000; 111 pquicc->intr_cimr = 0x00000000;
127
128 /* initialize handlers */
129 for (i = 0; i < INTERNAL_IRQS; i++) {
130 int_irq_list[i].handler = NULL;
131 int_irq_list[i].flags = IRQ_FLG_STD;
132 int_irq_list[i].dev_id = NULL;
133 int_irq_list[i].devname = NULL;
134 }
135}
136
137#if 0
138void M68360_insert_irq(irq_node_t **list, irq_node_t *node)
139{
140 unsigned long flags;
141 irq_node_t *cur;
142
143 if (!node->dev_id)
144 printk(KERN_INFO "%s: Warning: dev_id of %s is zero\n",
145 __FUNCTION__, node->devname);
146
147 local_irq_save(flags);
148
149 cur = *list;
150
151 while (cur) {
152 list = &cur->next;
153 cur = cur->next;
154 }
155
156 node->next = cur;
157 *list = node;
158
159 local_irq_restore(flags);
160} 112}
161 113
162void M68360_delete_irq(irq_node_t **list, void *dev_id) 114void enable_vector(unsigned int irq)
163{ 115{
164 unsigned long flags; 116 pquicc->intr_cimr |= (1 << irq);
165 irq_node_t *node;
166
167 local_irq_save(flags);
168
169 for (node = *list; node; list = &node->next, node = *list) {
170 if (node->dev_id == dev_id) {
171 *list = node->next;
172 /* Mark it as free. */
173 node->handler = NULL;
174 local_irq_restore(flags);
175 return;
176 }
177 }
178 local_irq_restore(flags);
179 printk (KERN_INFO "%s: tried to remove invalid irq\n", __FUNCTION__);
180} 117}
181#endif
182 118
183int request_irq( 119void disable_vector(unsigned int irq)
184 unsigned int irq,
185 irqreturn_t (*handler)(int, void *, struct pt_regs *),
186 unsigned long flags,
187 const char *devname,
188 void *dev_id)
189{ 120{
190 int mask = (1<<irq); 121 pquicc->intr_cimr &= ~(1 << irq);
191
192 irq += (CPM_VECTOR_BASE<<4);
193
194 if (irq >= INTERNAL_IRQS) {
195 printk (KERN_ERR "%s: Unknown IRQ %d from %s\n", __FUNCTION__, irq, devname);
196 return -ENXIO;
197 }
198
199 if (!(int_irq_list[irq].flags & IRQ_FLG_STD)) {
200 if (int_irq_list[irq].flags & IRQ_FLG_LOCK) {
201 printk(KERN_ERR "%s: IRQ %d from %s is not replaceable\n",
202 __FUNCTION__, irq, int_irq_list[irq].devname);
203 return -EBUSY;
204 }
205 if (flags & IRQ_FLG_REPLACE) {
206 printk(KERN_ERR "%s: %s can't replace IRQ %d from %s\n",
207 __FUNCTION__, devname, irq, int_irq_list[irq].devname);
208 return -EBUSY;
209 }
210 }
211 int_irq_list[irq].handler = handler;
212 int_irq_list[irq].flags = flags;
213 int_irq_list[irq].dev_id = dev_id;
214 int_irq_list[irq].devname = devname;
215
216 /* enable in the CIMR */
217 if (!int_irq_ablecount[irq])
218 pquicc->intr_cimr |= mask;
219 /* *(volatile unsigned long *)0xfffff304 &= ~(1<<irq); */
220
221 return 0;
222} 122}
223 123
224EXPORT_SYMBOL(request_irq); 124void ack_vector(unsigned int irq)
225
226void free_irq(unsigned int irq, void *dev_id)
227{ 125{
228 if (irq >= INTERNAL_IRQS) { 126 pquicc->intr_cisr = (1 << irq);
229 printk (KERN_ERR "%s: Unknown IRQ %d\n", __FUNCTION__, irq);
230 return;
231 }
232
233 if (int_irq_list[irq].dev_id != dev_id)
234 printk(KERN_INFO "%s: removing probably wrong IRQ %d from %s\n",
235 __FUNCTION__, irq, int_irq_list[irq].devname);
236 int_irq_list[irq].handler = NULL;
237 int_irq_list[irq].flags = IRQ_FLG_STD;
238 int_irq_list[irq].dev_id = NULL;
239 int_irq_list[irq].devname = NULL;
240
241 *(volatile unsigned long *)0xfffff304 |= 1<<irq;
242} 127}
243 128
244EXPORT_SYMBOL(free_irq);
245
246#if 0
247/*
248 * Enable/disable a particular machine specific interrupt source.
249 * Note that this may affect other interrupts in case of a shared interrupt.
250 * This function should only be called for a _very_ short time to change some
251 * internal data, that may not be changed by the interrupt at the same time.
252 * int_(enable|disable)_irq calls may also be nested.
253 */
254void M68360_enable_irq(unsigned int irq)
255{
256 if (irq >= INTERNAL_IRQS) {
257 printk(KERN_ERR "%s: Unknown IRQ %d\n", __FUNCTION__, irq);
258 return;
259 }
260
261 if (--int_irq_ablecount[irq])
262 return;
263
264 /* enable the interrupt */
265 *(volatile unsigned long *)0xfffff304 &= ~(1<<irq);
266}
267
268void M68360_disable_irq(unsigned int irq)
269{
270 if (irq >= INTERNAL_IRQS) {
271 printk(KERN_ERR "%s: Unknown IRQ %d\n", __FUNCTION__, irq);
272 return;
273 }
274
275 if (int_irq_ablecount[irq]++)
276 return;
277
278 /* disable the interrupt */
279 *(volatile unsigned long *)0xfffff304 |= 1<<irq;
280}
281#endif
282
283int show_interrupts(struct seq_file *p, void *v)
284{
285 int i = *(loff_t *) v;
286
287 if (i < NR_IRQS) {
288 if (int_irq_list[i].devname) {
289 seq_printf(p, "%3d: %10u ", i, kstat_cpu(0).irqs[i]);
290 if (int_irq_list[i].flags & IRQ_FLG_LOCK)
291 seq_printf(p, "L ");
292 else
293 seq_printf(p, " ");
294 seq_printf(p, "%s\n", int_irq_list[i].devname);
295 }
296 }
297 if (i == NR_IRQS)
298 seq_printf(p, " : %10u spurious\n", num_spurious);
299
300 return 0;
301}
302
303/* The 68k family did not have a good way to determine the source
304 * of interrupts until later in the family. The EC000 core does
305 * not provide the vector number on the stack, we vector everything
306 * into one vector and look in the blasted mask register...
307 * This code is designed to be fast, almost constant time, not clean!
308 */
309void process_int(int vec, struct pt_regs *fp)
310{
311 int irq;
312 int mask;
313
314 /* unsigned long pend = *(volatile unsigned long *)0xfffff30c; */
315
316 /* irq = vec + (CPM_VECTOR_BASE<<4); */
317 irq = vec;
318
319 /* unsigned long pend = *(volatile unsigned long *)pquicc->intr_cipr; */
320
321 /* Bugger all that weirdness. For the moment, I seem to know where I came from;
322 * vec is passed from a specific ISR, so I'll use it. */
323
324 if (int_irq_list[irq].handler) {
325 int_irq_list[irq].handler(irq , int_irq_list[irq].dev_id, fp);
326 kstat_cpu(0).irqs[irq]++;
327 pquicc->intr_cisr = (1 << vec); /* indicate that irq has been serviced */
328 } else {
329 printk(KERN_ERR "unregistered interrupt %d!\nTurning it off in the CIMR...\n", irq);
330 /* *(volatile unsigned long *)0xfffff304 |= mask; */
331 pquicc->intr_cimr &= ~(1 << vec);
332 num_spurious += 1;
333 }
334 return(IRQ_HANDLED);
335}
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 0f09412e1b7f..1e3aeccd7322 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -15,6 +15,29 @@ choice
15 prompt "System type" 15 prompt "System type"
16 default SGI_IP22 16 default SGI_IP22
17 17
18config LEMOTE_FULONG
19 bool "Lemote Fulong mini-PC"
20 select ARCH_SPARSEMEM_ENABLE
21 select SYS_HAS_CPU_LOONGSON2
22 select DMA_NONCOHERENT
23 select BOOT_ELF32
24 select BOARD_SCACHE
25 select HAVE_STD_PC_SERIAL_PORT
26 select HW_HAS_PCI
27 select I8259
28 select ISA
29 select IRQ_CPU
30 select SYS_SUPPORTS_32BIT_KERNEL
31 select SYS_SUPPORTS_64BIT_KERNEL
32 select SYS_SUPPORTS_LITTLE_ENDIAN
33 select SYS_SUPPORTS_HIGHMEM
34 select SYS_HAS_EARLY_PRINTK
35 select GENERIC_HARDIRQS_NO__DO_IRQ
36 select CPU_HAS_WB
37 help
38 Lemote Fulong mini-PC board based on the Chinese Loongson-2E CPU and
39 an FPGA northbridge
40
18config MACH_ALCHEMY 41config MACH_ALCHEMY
19 bool "Alchemy processor based machines" 42 bool "Alchemy processor based machines"
20 43
@@ -63,7 +86,7 @@ config MACH_DECSTATION
63 bool "DECstations" 86 bool "DECstations"
64 select BOOT_ELF32 87 select BOOT_ELF32
65 select DMA_NONCOHERENT 88 select DMA_NONCOHERENT
66 select SYS_HAS_EARLY_PRINTK 89 select NO_IOPORT
67 select IRQ_CPU 90 select IRQ_CPU
68 select SYS_HAS_CPU_R3000 91 select SYS_HAS_CPU_R3000
69 select SYS_HAS_CPU_R4X00 92 select SYS_HAS_CPU_R4X00
@@ -88,33 +111,15 @@ config MACH_DECSTATION
88 111
89 otherwise choose R3000. 112 otherwise choose R3000.
90 113
91config MIPS_EV64120
92 bool "Galileo EV64120 Evaluation board (EXPERIMENTAL)"
93 depends on EXPERIMENTAL
94 select DMA_NONCOHERENT
95 select HW_HAS_PCI
96 select PCI_GT64XXX_PCI0
97 select SYS_HAS_CPU_R5000
98 select SYS_SUPPORTS_32BIT_KERNEL
99 select SYS_SUPPORTS_64BIT_KERNEL
100 select SYS_SUPPORTS_BIG_ENDIAN
101 select SYS_SUPPORTS_KGDB
102 help
103 This is an evaluation board based on the Galileo GT-64120
104 single-chip system controller that contains a MIPS R5000 compatible
105 core running at 75/100MHz. Their website is located at
106 <http://www.marvell.com/>. Say Y here if you wish to build a
107 kernel for this platform.
108
109config MACH_JAZZ 114config MACH_JAZZ
110 bool "Jazz family of machines" 115 bool "Jazz family of machines"
111 select ARC 116 select ARC
112 select ARC32 117 select ARC32
113 select ARCH_MAY_HAVE_PC_FDC 118 select ARCH_MAY_HAVE_PC_FDC
114 select GENERIC_ISA_DMA 119 select GENERIC_ISA_DMA
115 select I8253
116 select I8259 120 select I8259
117 select ISA 121 select ISA
122 select PCSPEAKER
118 select SYS_HAS_CPU_R4X00 123 select SYS_HAS_CPU_R4X00
119 select SYS_SUPPORTS_32BIT_KERNEL 124 select SYS_SUPPORTS_32BIT_KERNEL
120 select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL 125 select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
@@ -126,20 +131,6 @@ config MACH_JAZZ
126 Members include the Acer PICA, MIPS Magnum 4000, MIPS Millenium and 131 Members include the Acer PICA, MIPS Magnum 4000, MIPS Millenium and
127 Olivetti M700-10 workstations. 132 Olivetti M700-10 workstations.
128 133
129config LASAT
130 bool "LASAT Networks platforms"
131 select DMA_NONCOHERENT
132 select SYS_HAS_EARLY_PRINTK
133 select HW_HAS_PCI
134 select PCI_GT64XXX_PCI0
135 select MIPS_NILE4
136 select R5000_CPU_SCACHE
137 select SYS_HAS_CPU_R5000
138 select SYS_SUPPORTS_32BIT_KERNEL
139 select SYS_SUPPORTS_64BIT_KERNEL if BROKEN
140 select SYS_SUPPORTS_LITTLE_ENDIAN
141 select GENERIC_HARDIRQS_NO__DO_IRQ
142
143config MIPS_ATLAS 134config MIPS_ATLAS
144 bool "MIPS Atlas board" 135 bool "MIPS Atlas board"
145 select BOOT_ELF32 136 select BOOT_ELF32
@@ -173,7 +164,6 @@ config MIPS_MALTA
173 bool "MIPS Malta board" 164 bool "MIPS Malta board"
174 select ARCH_MAY_HAVE_PC_FDC 165 select ARCH_MAY_HAVE_PC_FDC
175 select BOOT_ELF32 166 select BOOT_ELF32
176 select HAVE_STD_PC_SERIAL_PORT
177 select DMA_NONCOHERENT 167 select DMA_NONCOHERENT
178 select GENERIC_ISA_DMA 168 select GENERIC_ISA_DMA
179 select IRQ_CPU 169 select IRQ_CPU
@@ -246,11 +236,13 @@ config MIPS_SIM
246 select DMA_NONCOHERENT 236 select DMA_NONCOHERENT
247 select SYS_HAS_EARLY_PRINTK 237 select SYS_HAS_EARLY_PRINTK
248 select IRQ_CPU 238 select IRQ_CPU
239 select BOOT_RAW
249 select SYS_HAS_CPU_MIPS32_R1 240 select SYS_HAS_CPU_MIPS32_R1
250 select SYS_HAS_CPU_MIPS32_R2 241 select SYS_HAS_CPU_MIPS32_R2
251 select SYS_HAS_EARLY_PRINTK 242 select SYS_HAS_EARLY_PRINTK
252 select SYS_SUPPORTS_32BIT_KERNEL 243 select SYS_SUPPORTS_32BIT_KERNEL
253 select SYS_SUPPORTS_BIG_ENDIAN 244 select SYS_SUPPORTS_BIG_ENDIAN
245 select SYS_SUPPORTS_MULTITHREADING
254 select SYS_SUPPORTS_LITTLE_ENDIAN 246 select SYS_SUPPORTS_LITTLE_ENDIAN
255 help 247 help
256 This option enables support for MIPS Technologies MIPSsim software 248 This option enables support for MIPS Technologies MIPSsim software
@@ -274,50 +266,13 @@ config MOMENCO_OCELOT
274 The Ocelot is a MIPS-based Single Board Computer (SBC) made by 266 The Ocelot is a MIPS-based Single Board Computer (SBC) made by
275 Momentum Computer <http://www.momenco.com/>. 267 Momentum Computer <http://www.momenco.com/>.
276 268
277config MOMENCO_OCELOT_3
278 bool "Momentum Ocelot-3 board"
279 select BOOT_ELF32
280 select DMA_NONCOHERENT
281 select HW_HAS_PCI
282 select IRQ_CPU
283 select IRQ_CPU_RM7K
284 select IRQ_MV64340
285 select PCI_MARVELL
286 select RM7000_CPU_SCACHE
287 select SWAP_IO_SPACE
288 select SYS_HAS_CPU_RM9000
289 select SYS_SUPPORTS_32BIT_KERNEL
290 select SYS_SUPPORTS_64BIT_KERNEL
291 select SYS_SUPPORTS_BIG_ENDIAN
292 help
293 The Ocelot-3 is based off Discovery III System Controller and
294 PMC-Sierra Rm79000 core.
295
296config MOMENCO_OCELOT_C
297 bool "Momentum Ocelot-C board"
298 select DMA_NONCOHERENT
299 select HW_HAS_PCI
300 select IRQ_CPU
301 select IRQ_MV64340
302 select PCI_MARVELL
303 select RM7000_CPU_SCACHE
304 select SWAP_IO_SPACE
305 select SYS_HAS_CPU_RM7000
306 select SYS_SUPPORTS_32BIT_KERNEL
307 select SYS_SUPPORTS_64BIT_KERNEL
308 select SYS_SUPPORTS_BIG_ENDIAN
309 select GENERIC_HARDIRQS_NO__DO_IRQ
310 help
311 The Ocelot is a MIPS-based Single Board Computer (SBC) made by
312 Momentum Computer <http://www.momenco.com/>.
313
314config PNX8550_JBS 269config PNX8550_JBS
315 bool "Philips PNX8550 based JBS board" 270 bool "Philips PNX8550 based JBS board"
316 select PNX8550 271 select PNX8550
317 select SYS_SUPPORTS_LITTLE_ENDIAN 272 select SYS_SUPPORTS_LITTLE_ENDIAN
318 273
319config PNX8550_STB810 274config PNX8550_STB810
320 bool "Support for Philips PNX8550 based STB810 board" 275 bool "Philips PNX8550 based STB810 board"
321 select PNX8550 276 select PNX8550
322 select SYS_SUPPORTS_LITTLE_ENDIAN 277 select SYS_SUPPORTS_LITTLE_ENDIAN
323 278
@@ -346,6 +301,27 @@ config MACH_VR41XX
346 select SYS_HAS_CPU_VR41XX 301 select SYS_HAS_CPU_VR41XX
347 select GENERIC_HARDIRQS_NO__DO_IRQ 302 select GENERIC_HARDIRQS_NO__DO_IRQ
348 303
304config PMC_MSP
305 bool "PMC-Sierra MSP chipsets"
306 depends on EXPERIMENTAL
307 select DMA_NONCOHERENT
308 select SWAP_IO_SPACE
309 select NO_EXCEPT_FILL
310 select BOOT_RAW
311 select SYS_HAS_CPU_MIPS32_R1
312 select SYS_HAS_CPU_MIPS32_R2
313 select SYS_SUPPORTS_32BIT_KERNEL
314 select SYS_SUPPORTS_BIG_ENDIAN
315 select SYS_SUPPORTS_KGDB
316 select IRQ_CPU
317 select SERIAL_8250
318 select SERIAL_8250_CONSOLE
319 help
320 This adds support for the PMC-Sierra family of Multi-Service
321 Processor System-On-A-Chips. These parts include a number
322 of integrated peripherals, interfaces and DSPs in addition to
323 a variety of MIPS cores.
324
349config PMC_YOSEMITE 325config PMC_YOSEMITE
350 bool "PMC-Sierra Yosemite eval board" 326 bool "PMC-Sierra Yosemite eval board"
351 select DMA_COHERENT 327 select DMA_COHERENT
@@ -371,9 +347,9 @@ config QEMU
371 select DMA_COHERENT 347 select DMA_COHERENT
372 select GENERIC_ISA_DMA 348 select GENERIC_ISA_DMA
373 select HAVE_STD_PC_SERIAL_PORT 349 select HAVE_STD_PC_SERIAL_PORT
374 select I8253
375 select I8259 350 select I8259
376 select ISA 351 select ISA
352 select PCSPEAKER
377 select SWAP_IO_SPACE 353 select SWAP_IO_SPACE
378 select SYS_HAS_CPU_MIPS32_R1 354 select SYS_HAS_CPU_MIPS32_R1
379 select SYS_SUPPORTS_32BIT_KERNEL 355 select SYS_SUPPORTS_32BIT_KERNEL
@@ -392,7 +368,7 @@ config QEMU
392 can be found at http://www.linux-mips.org/wiki/Qemu. 368 can be found at http://www.linux-mips.org/wiki/Qemu.
393 369
394config MARKEINS 370config MARKEINS
395 bool "Support for NEC EMMA2RH Mark-eins" 371 bool "NEC EMMA2RH Mark-eins"
396 select DMA_NONCOHERENT 372 select DMA_NONCOHERENT
397 select HW_HAS_PCI 373 select HW_HAS_PCI
398 select IRQ_CPU 374 select IRQ_CPU
@@ -450,8 +426,7 @@ config SGI_IP27
450 here. 426 here.
451 427
452config SGI_IP32 428config SGI_IP32
453 bool "SGI IP32 (O2) (EXPERIMENTAL)" 429 bool "SGI IP32 (O2)"
454 depends on EXPERIMENTAL
455 select ARC 430 select ARC
456 select ARC32 431 select ARC32
457 select BOOT_ELF32 432 select BOOT_ELF32
@@ -587,9 +562,9 @@ config SNI_RM
587 select HW_HAS_EISA 562 select HW_HAS_EISA
588 select HW_HAS_PCI 563 select HW_HAS_PCI
589 select IRQ_CPU 564 select IRQ_CPU
590 select I8253
591 select I8259 565 select I8259
592 select ISA 566 select ISA
567 select PCSPEAKER
593 select SWAP_IO_SPACE if CPU_BIG_ENDIAN 568 select SWAP_IO_SPACE if CPU_BIG_ENDIAN
594 select SYS_HAS_CPU_R4X00 569 select SYS_HAS_CPU_R4X00
595 select SYS_HAS_CPU_R5000 570 select SYS_HAS_CPU_R5000
@@ -652,6 +627,7 @@ config TOSHIBA_RBTX4938
652 select SYS_SUPPORTS_BIG_ENDIAN 627 select SYS_SUPPORTS_BIG_ENDIAN
653 select SYS_SUPPORTS_KGDB 628 select SYS_SUPPORTS_KGDB
654 select GENERIC_HARDIRQS_NO__DO_IRQ 629 select GENERIC_HARDIRQS_NO__DO_IRQ
630 select GENERIC_GPIO
655 help 631 help
656 This Toshiba board is based on the TX4938 processor. Say Y here to 632 This Toshiba board is based on the TX4938 processor. Say Y here to
657 support this machine type 633 support this machine type
@@ -660,9 +636,7 @@ endchoice
660 636
661source "arch/mips/au1000/Kconfig" 637source "arch/mips/au1000/Kconfig"
662source "arch/mips/ddb5xxx/Kconfig" 638source "arch/mips/ddb5xxx/Kconfig"
663source "arch/mips/gt64120/ev64120/Kconfig"
664source "arch/mips/jazz/Kconfig" 639source "arch/mips/jazz/Kconfig"
665source "arch/mips/lasat/Kconfig"
666source "arch/mips/pmc-sierra/Kconfig" 640source "arch/mips/pmc-sierra/Kconfig"
667source "arch/mips/sgi-ip27/Kconfig" 641source "arch/mips/sgi-ip27/Kconfig"
668source "arch/mips/sibyte/Kconfig" 642source "arch/mips/sibyte/Kconfig"
@@ -721,6 +695,9 @@ config ARC
721config ARCH_MAY_HAVE_PC_FDC 695config ARCH_MAY_HAVE_PC_FDC
722 bool 696 bool
723 697
698config BOOT_RAW
699 bool
700
724config DMA_COHERENT 701config DMA_COHERENT
725 bool 702 bool
726 703
@@ -747,9 +724,9 @@ config EARLY_PRINTK
747 to print messages very early in the bootup process. 724 to print messages very early in the bootup process.
748 725
749 This is useful for kernel debugging when your machine crashes very 726 This is useful for kernel debugging when your machine crashes very
750 early before the console code is initialized. For normal operation 727 early before the console code is initialized. For normal operation,
751 it is not recommended because it looks on some machines ugly and 728 it is not recommended because it looks ugly on some machines and
752 oesn't cooperate with an X server. You should normally N here, 729 doesn't cooperate with an X server. You should normally say N here,
753 unless you want to debug such a crash. 730 unless you want to debug such a crash.
754 731
755config SYS_HAS_EARLY_PRINTK 732config SYS_HAS_EARLY_PRINTK
@@ -768,16 +745,19 @@ config MIPS_BONITO64
768config MIPS_MSC 745config MIPS_MSC
769 bool 746 bool
770 747
771config MIPS_NILE4
772 bool
773
774config MIPS_DISABLE_OBSOLETE_IDE 748config MIPS_DISABLE_OBSOLETE_IDE
775 bool 749 bool
776 750
751config NO_IOPORT
752 def_bool n
753
777config GENERIC_ISA_DMA_SUPPORT_BROKEN 754config GENERIC_ISA_DMA_SUPPORT_BROKEN
778 bool 755 bool
779 select ZONE_DMA 756 select ZONE_DMA
780 757
758config GENERIC_GPIO
759 bool
760
781# 761#
782# Endianess selection. Sufficiently obscure so many users don't know what to 762# Endianess selection. Sufficiently obscure so many users don't know what to
783# answer,so we try hard to limit the available choices. Also the use of a 763# answer,so we try hard to limit the available choices. Also the use of a
@@ -821,7 +801,10 @@ config IRQ_CPU_RM7K
821config IRQ_CPU_RM9K 801config IRQ_CPU_RM9K
822 bool 802 bool
823 803
824config IRQ_MV64340 804config IRQ_MSP_SLP
805 bool
806
807config IRQ_MSP_CIC
825 bool 808 bool
826 809
827config DDB5XXX_COMMON 810config DDB5XXX_COMMON
@@ -834,6 +817,9 @@ config MIPS_BOARDS_GEN
834config PCI_GT64XXX_PCI0 817config PCI_GT64XXX_PCI0
835 bool 818 bool
836 819
820config NO_EXCEPT_FILL
821 bool
822
837config MIPS_TX3927 823config MIPS_TX3927
838 bool 824 bool
839 select HAS_TXX9_SERIAL 825 select HAS_TXX9_SERIAL
@@ -841,14 +827,6 @@ config MIPS_TX3927
841config MIPS_RM9122 827config MIPS_RM9122
842 bool 828 bool
843 select SERIAL_RM9000 829 select SERIAL_RM9000
844 select GPI_RM9000
845 select WDT_RM9000
846
847config PCI_MARVELL
848 bool
849
850config SERIAL_RM9000
851 bool
852 830
853config PNX8550 831config PNX8550
854 bool 832 bool
@@ -863,6 +841,7 @@ config SOC_PNX8550
863 select SYS_SUPPORTS_32BIT_KERNEL 841 select SYS_SUPPORTS_32BIT_KERNEL
864 select GENERIC_HARDIRQS_NO__DO_IRQ 842 select GENERIC_HARDIRQS_NO__DO_IRQ
865 select SYS_SUPPORTS_KGDB 843 select SYS_SUPPORTS_KGDB
844 select GENERIC_GPIO
866 845
867config SWAP_IO_SPACE 846config SWAP_IO_SPACE
868 bool 847 bool
@@ -875,31 +854,17 @@ config EMMA2RH
875config SERIAL_RM9000 854config SERIAL_RM9000
876 bool 855 bool
877 856
878config GPI_RM9000
879 bool
880
881config WDT_RM9000
882 bool
883
884# 857#
885# Unfortunately not all GT64120 systems run the chip at the same clock. 858# Unfortunately not all GT64120 systems run the chip at the same clock.
886# As the user for the clock rate and try to minimize the available options. 859# As the user for the clock rate and try to minimize the available options.
887# 860#
888choice 861choice
889 prompt "Galileo Chip Clock" 862 prompt "Galileo Chip Clock"
890 #default SYSCLK_83 if MIPS_EV64120 863 depends on MOMENCO_OCELOT
891 depends on MIPS_EV64120 || MOMENCO_OCELOT
892 default SYSCLK_83 if MIPS_EV64120
893 default SYSCLK_100 if MOMENCO_OCELOT 864 default SYSCLK_100 if MOMENCO_OCELOT
894 865
895config SYSCLK_75
896 bool "75" if MIPS_EV64120
897
898config SYSCLK_83
899 bool "83.3" if MIPS_EV64120
900
901config SYSCLK_100 866config SYSCLK_100
902 bool "100" if MIPS_EV64120 || MOMENCO_OCELOT 867 bool "100" if MOMENCO_OCELOT
903 868
904endchoice 869endchoice
905 870
@@ -911,8 +876,9 @@ config BOOT_ELF32
911 876
912config MIPS_L1_CACHE_SHIFT 877config MIPS_L1_CACHE_SHIFT
913 int 878 int
914 default "4" if MACH_DECSTATION || SNI_RM 879 default "4" if MACH_DECSTATION
915 default "7" if SGI_IP27 880 default "7" if SGI_IP27 || SNI_RM
881 default "4" if PMC_MSP4200_EVAL
916 default "5" 882 default "5"
917 883
918config HAVE_STD_PC_SERIAL_PORT 884config HAVE_STD_PC_SERIAL_PORT
@@ -944,6 +910,16 @@ choice
944 prompt "CPU type" 910 prompt "CPU type"
945 default CPU_R4X00 911 default CPU_R4X00
946 912
913config CPU_LOONGSON2
914 bool "Loongson 2"
915 depends on SYS_HAS_CPU_LOONGSON2
916 select CPU_SUPPORTS_32BIT_KERNEL
917 select CPU_SUPPORTS_64BIT_KERNEL
918 select CPU_SUPPORTS_HIGHMEM
919 help
920 The Loongson 2E processor implements the MIPS III instruction set
921 with many extensions.
922
947config CPU_MIPS32_R1 923config CPU_MIPS32_R1
948 bool "MIPS32 Release 1" 924 bool "MIPS32 Release 1"
949 depends on SYS_HAS_CPU_MIPS32_R1 925 depends on SYS_HAS_CPU_MIPS32_R1
@@ -1154,6 +1130,9 @@ config CPU_SB1
1154 1130
1155endchoice 1131endchoice
1156 1132
1133config SYS_HAS_CPU_LOONGSON2
1134 bool
1135
1157config SYS_HAS_CPU_MIPS32_R1 1136config SYS_HAS_CPU_MIPS32_R1
1158 bool 1137 bool
1159 1138
@@ -1211,8 +1190,19 @@ config SYS_HAS_CPU_RM9000
1211config SYS_HAS_CPU_SB1 1190config SYS_HAS_CPU_SB1
1212 bool 1191 bool
1213 1192
1193#
1194# CPU may reorder R->R, R->W, W->R, W->W
1195# Reordering beyond LL and SC is handled in WEAK_REORDERING_BEYOND_LLSC
1196#
1214config WEAK_ORDERING 1197config WEAK_ORDERING
1215 bool 1198 bool
1199
1200#
1201# CPU may reorder reads and writes beyond LL/SC
1202# CPU may reorder R->LL, R->LL, W->LL, W->LL, R->SC, R->SC, W->SC, W->SC
1203#
1204config WEAK_REORDERING_BEYOND_LLSC
1205 bool
1216endmenu 1206endmenu
1217 1207
1218# 1208#
@@ -1392,6 +1382,7 @@ config MIPS_VPE_LOADER
1392 depends on SYS_SUPPORTS_MULTITHREADING 1382 depends on SYS_SUPPORTS_MULTITHREADING
1393 select CPU_MIPSR2_IRQ_VI 1383 select CPU_MIPSR2_IRQ_VI
1394 select CPU_MIPSR2_IRQ_EI 1384 select CPU_MIPSR2_IRQ_EI
1385 select CPU_MIPSR2_SRS
1395 select MIPS_MT 1386 select MIPS_MT
1396 help 1387 help
1397 Includes a loader for loading an elf relocatable object 1388 Includes a loader for loading an elf relocatable object
@@ -1424,6 +1415,19 @@ config MIPS_MT_SMTC_INSTANT_REPLAY
1424 it off), but ensures that IPIs are handled promptly even under 1415 it off), but ensures that IPIs are handled promptly even under
1425 heavy I/O interrupt load. 1416 heavy I/O interrupt load.
1426 1417
1418config MIPS_MT_SMTC_IM_BACKSTOP
1419 bool "Use per-TC register bits as backstop for inhibited IM bits"
1420 depends on MIPS_MT_SMTC
1421 default y
1422 help
1423 To support multiple TC microthreads acting as "CPUs" within
1424 a VPE, VPE-wide interrupt mask bits must be specially manipulated
1425 during interrupt handling. To support legacy drivers and interrupt
1426 controller management code, SMTC has a "backstop" to track and
1427 if necessary restore the interrupt mask. This has some performance
1428 impact on interrupt service overhead. Disable it only if you know
1429 what you are doing.
1430
1427config MIPS_VPE_LOADER_TOM 1431config MIPS_VPE_LOADER_TOM
1428 bool "Load VPE program into memory hidden from linux" 1432 bool "Load VPE program into memory hidden from linux"
1429 depends on MIPS_VPE_LOADER 1433 depends on MIPS_VPE_LOADER
@@ -1487,6 +1491,15 @@ config CPU_HAS_SMARTMIPS
1487config CPU_HAS_WB 1491config CPU_HAS_WB
1488 bool 1492 bool
1489 1493
1494config 64BIT_CONTEXT
1495 bool "Save 64bit integer registers"
1496 depends on 32BIT && CPU_LOONGSON2
1497 help
1498 Loongson2 CPU is 64bit , when used in 32BIT mode, its integer
1499 registers can still be accessed as 64bit, mainly for multimedia
1500 instructions. We must have all 64bit save/restored to make sure
1501 those instructions to get correct result.
1502
1490# 1503#
1491# Vectored interrupt mode is an R2 feature 1504# Vectored interrupt mode is an R2 feature
1492# 1505#
@@ -1862,7 +1875,7 @@ config MMU
1862 bool 1875 bool
1863 default y 1876 default y
1864 1877
1865config I8253 1878config PCSPEAKER
1866 bool 1879 bool
1867 1880
1868source "drivers/pcmcia/Kconfig" 1881source "drivers/pcmcia/Kconfig"
diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug
index 72d5c198e790..3efe117721aa 100644
--- a/arch/mips/Kconfig.debug
+++ b/arch/mips/Kconfig.debug
@@ -37,7 +37,7 @@ config DEBUG_STACK_USAGE
37 37
38 This option will slow down process creation somewhat. 38 This option will slow down process creation somewhat.
39 39
40config CONFIG_SMTC_IDLE_HOOK_DEBUG 40config SMTC_IDLE_HOOK_DEBUG
41 bool "Enable additional debug checks before going into CPU idle loop" 41 bool "Enable additional debug checks before going into CPU idle loop"
42 depends on DEBUG_KERNEL && MIPS_MT_SMTC 42 depends on DEBUG_KERNEL && MIPS_MT_SMTC
43 help 43 help
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index f450066b6241..20d19c9b7761 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -118,6 +118,7 @@ cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap
118cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap 118cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap
119cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap 119cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap
120cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap 120cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap
121cflags-$(CONFIG_CPU_LOONGSON2) += -march=r4600 -Wa,--trap
121cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ 122cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
122 -Wa,-mips32 -Wa,--trap 123 -Wa,-mips32 -Wa,--trap
123cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ 124cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
@@ -283,14 +284,6 @@ load-$(CONFIG_MACH_DECSTATION) += 0xffffffff80040000
283CLEAN_FILES += drivers/tc/lk201-map.c 284CLEAN_FILES += drivers/tc/lk201-map.c
284 285
285# 286#
286# Galileo EV64120 Board
287#
288core-$(CONFIG_MIPS_EV64120) += arch/mips/gt64120/ev64120/
289core-$(CONFIG_MIPS_EV64120) += arch/mips/gt64120/common/
290cflags-$(CONFIG_MIPS_EV64120) += -Iinclude/asm-mips/mach-ev64120
291load-$(CONFIG_MIPS_EV64120) += 0xffffffff80100000
292
293#
294# Wind River PPMC Board (4KC + GT64120) 287# Wind River PPMC Board (4KC + GT64120)
295# 288#
296core-$(CONFIG_WR_PPMC) += arch/mips/gt64120/wrppmc/ 289core-$(CONFIG_WR_PPMC) += arch/mips/gt64120/wrppmc/
@@ -298,6 +291,13 @@ cflags-$(CONFIG_WR_PPMC) += -Iinclude/asm-mips/mach-wrppmc
298load-$(CONFIG_WR_PPMC) += 0xffffffff80100000 291load-$(CONFIG_WR_PPMC) += 0xffffffff80100000
299 292
300# 293#
294# lemote fulong mini-PC board
295#
296core-$(CONFIG_LEMOTE_FULONG) +=arch/mips/lemote/lm2e/
297load-$(CONFIG_LEMOTE_FULONG) +=0xffffffff80100000
298cflags-$(CONFIG_LEMOTE_FULONG) += -Iinclude/asm-mips/mach-lemote
299
300#
301# For all MIPS, Inc. eval boards 301# For all MIPS, Inc. eval boards
302# 302#
303core-$(CONFIG_MIPS_BOARDS_GEN) += arch/mips/mips-boards/generic/ 303core-$(CONFIG_MIPS_BOARDS_GEN) += arch/mips/mips-boards/generic/
@@ -327,7 +327,7 @@ load-$(CONFIG_MIPS_SEAD) += 0xffffffff80100000
327# 327#
328# MIPS SIM 328# MIPS SIM
329# 329#
330core-$(CONFIG_MIPS_SIM) += arch/mips/mips-boards/sim/ 330core-$(CONFIG_MIPS_SIM) += arch/mips/mipssim/
331cflags-$(CONFIG_MIPS_SIM) += -Iinclude/asm-mips/mach-sim 331cflags-$(CONFIG_MIPS_SIM) += -Iinclude/asm-mips/mach-sim
332load-$(CONFIG_MIPS_SIM) += 0x80100000 332load-$(CONFIG_MIPS_SIM) += 0x80100000
333 333
@@ -343,12 +343,12 @@ cflags-$(CONFIG_MOMENCO_OCELOT) += -Iinclude/asm-mips/mach-ocelot
343load-$(CONFIG_MOMENCO_OCELOT) += 0xffffffff80100000 343load-$(CONFIG_MOMENCO_OCELOT) += 0xffffffff80100000
344 344
345# 345#
346# Momentum Ocelot-C and -CS boards 346# PMC-Sierra MSP SOCs
347# 347#
348# The Ocelot-C[S] setup.o must be linked early - it does the ioremap() for the 348core-$(CONFIG_PMC_MSP) += arch/mips/pmc-sierra/msp71xx/
349# mips_io_port_base. 349cflags-$(CONFIG_PMC_MSP) += -Iinclude/asm-mips/pmc-sierra/msp71xx \
350core-$(CONFIG_MOMENCO_OCELOT_C) += arch/mips/momentum/ocelot_c/ 350 -mno-branch-likely
351load-$(CONFIG_MOMENCO_OCELOT_C) += 0xffffffff80100000 351load-$(CONFIG_PMC_MSP) += 0xffffffff80100000
352 352
353# 353#
354# PMC-Sierra Yosemite 354# PMC-Sierra Yosemite
@@ -365,13 +365,6 @@ cflags-$(CONFIG_QEMU) += -Iinclude/asm-mips/mach-qemu
365load-$(CONFIG_QEMU) += 0xffffffff80010000 365load-$(CONFIG_QEMU) += 0xffffffff80010000
366 366
367# 367#
368# Momentum Ocelot-3
369#
370core-$(CONFIG_MOMENCO_OCELOT_3) += arch/mips/momentum/ocelot_3/
371cflags-$(CONFIG_MOMENCO_OCELOT_3) += -Iinclude/asm-mips/mach-ocelot3
372load-$(CONFIG_MOMENCO_OCELOT_3) += 0xffffffff80100000
373
374#
375# Basler eXcite 368# Basler eXcite
376# 369#
377core-$(CONFIG_BASLER_EXCITE) += arch/mips/basler/excite/ 370core-$(CONFIG_BASLER_EXCITE) += arch/mips/basler/excite/
@@ -389,10 +382,6 @@ core-$(CONFIG_DDB5XXX_COMMON) += arch/mips/ddb5xxx/common/
389core-$(CONFIG_DDB5477) += arch/mips/ddb5xxx/ddb5477/ 382core-$(CONFIG_DDB5477) += arch/mips/ddb5xxx/ddb5477/
390load-$(CONFIG_DDB5477) += 0xffffffff80100000 383load-$(CONFIG_DDB5477) += 0xffffffff80100000
391 384
392core-$(CONFIG_LASAT) += arch/mips/lasat/
393cflags-$(CONFIG_LASAT) += -Iinclude/asm-mips/mach-lasat
394load-$(CONFIG_LASAT) += 0xffffffff80000000
395
396# 385#
397# Common VR41xx 386# Common VR41xx
398# 387#
@@ -580,6 +569,7 @@ load-$(CONFIG_TOSHIBA_JMR3927) += 0xffffffff80050000
580# 569#
581core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/toshiba_rbtx4927/ 570core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/toshiba_rbtx4927/
582core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/common/ 571core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/common/
572cflags-$(CONFIG_TOSHIBA_RBTX4927) += -Iinclude/asm-mips/mach-tx49xx
583load-$(CONFIG_TOSHIBA_RBTX4927) += 0xffffffff80020000 573load-$(CONFIG_TOSHIBA_RBTX4927) += 0xffffffff80020000
584 574
585# 575#
@@ -587,6 +577,7 @@ load-$(CONFIG_TOSHIBA_RBTX4927) += 0xffffffff80020000
587# 577#
588core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/toshiba_rbtx4938/ 578core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/toshiba_rbtx4938/
589core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/common/ 579core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/common/
580cflags-$(CONFIG_TOSHIBA_RBTX4938) += -Iinclude/asm-mips/mach-tx49xx
590load-$(CONFIG_TOSHIBA_RBTX4938) += 0xffffffff80100000 581load-$(CONFIG_TOSHIBA_RBTX4938) += 0xffffffff80100000
591 582
592cflags-y += -Iinclude/asm-mips/mach-generic 583cflags-y += -Iinclude/asm-mips/mach-generic
@@ -603,7 +594,8 @@ JIFFIES = jiffies_64
603endif 594endif
604 595
605AFLAGS += $(cflags-y) 596AFLAGS += $(cflags-y)
606CFLAGS += $(cflags-y) 597CFLAGS += $(cflags-y) \
598 -D"VMLINUX_LOAD_ADDRESS=$(load-y)"
607 599
608LDFLAGS += -m $(ld-emul) 600LDFLAGS += -m $(ld-emul)
609 601
@@ -633,18 +625,11 @@ CPPFLAGS_vmlinux.lds := \
633head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o 625head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
634 626
635libs-y += arch/mips/lib/ 627libs-y += arch/mips/lib/
636libs-$(CONFIG_32BIT) += arch/mips/lib-32/
637libs-$(CONFIG_64BIT) += arch/mips/lib-64/
638 628
639core-y += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/ 629core-y += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/
640 630
641drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/ 631drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/
642 632
643ifdef CONFIG_LASAT
644rom.bin rom.sw: vmlinux
645 $(Q)$(MAKE) $(build)=arch/mips/lasat/image $@
646endif
647
648# 633#
649# Some machines like the Indy need 32-bit ELF binaries for booting purposes. 634# Some machines like the Indy need 32-bit ELF binaries for booting purposes.
650# Other need ECOFF, so we build a 32-bit ELF binary for them which we then 635# Other need ECOFF, so we build a 32-bit ELF binary for them which we then
@@ -702,32 +687,19 @@ vmlinux.srec: $(vmlinux-32)
702CLEAN_FILES += vmlinux.ecoff \ 687CLEAN_FILES += vmlinux.ecoff \
703 vmlinux.srec 688 vmlinux.srec
704 689
690archprepare:
691ifdef CONFIG_MIPS32_N32
692 @echo ' Checking missing-syscalls for N32'
693 $(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=n32"
694endif
695ifdef CONFIG_MIPS32_O32
696 @echo ' Checking missing-syscalls for O32'
697 $(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=32"
698endif
699
705archclean: 700archclean:
706 @$(MAKE) $(clean)=arch/mips/boot 701 @$(MAKE) $(clean)=arch/mips/boot
707 @$(MAKE) $(clean)=arch/mips/lasat
708 702
709CLEAN_FILES += vmlinux.32 \ 703CLEAN_FILES += vmlinux.32 \
710 vmlinux.64 \ 704 vmlinux.64 \
711 vmlinux.ecoff 705 vmlinux.ecoff
712
713quiet_cmd_syscalls_n32 = CALL-N32 $<
714 cmd_syscalls_n32 = $(CONFIG_SHELL) $< $(CC) $(c_flags) -mabi=n32
715
716quiet_cmd_syscalls_o32 = CALL-O32 $<
717 cmd_syscalls_o32 = $(CONFIG_SHELL) $< $(CC) $(c_flags) -mabi=32
718
719PHONY += missing-syscalls-n32 missing-syscalls-o32
720
721missing-syscalls-n32: scripts/checksyscalls.sh FORCE
722 $(call cmd,syscalls_n32)
723
724missing-syscalls-o32: scripts/checksyscalls.sh FORCE
725 $(call cmd,syscalls_o32)
726
727archprepare:
728ifdef CONFIG_MIPS32_N32
729 $(Q)$(MAKE) $(build)=arch/mips missing-syscalls-n32
730endif
731ifdef CONFIG_MIPS32_O32
732 $(Q)$(MAKE) $(build)=arch/mips missing-syscalls-o32
733endif
diff --git a/arch/mips/au1000/common/gpio.c b/arch/mips/au1000/common/gpio.c
index ce55297dcb8c..7abe42099439 100644
--- a/arch/mips/au1000/common/gpio.c
+++ b/arch/mips/au1000/common/gpio.c
@@ -1,4 +1,7 @@
1/* 1/*
2 * Copyright (C) 2007, OpenWrt.org, Florian Fainelli <florian@openwrt.org>
3 * Architecture specific GPIO support
4 *
2 * 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
3 * under the terms of the GNU General Public License as published by the 6 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the License, or (at your 7 * Free Software Foundation; either version 2 of the License, or (at your
@@ -18,101 +21,136 @@
18 * You should have received a copy of the GNU General Public License along 21 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc., 22 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 675 Mass Ave, Cambridge, MA 02139, USA. 23 * 675 Mass Ave, Cambridge, MA 02139, USA.
24 *
25 * Notes :
26 * au1000 SoC have only one GPIO line : GPIO1
27 * others have a second one : GPIO2
21 */ 28 */
29
30#include <linux/autoconf.h>
31#include <linux/init.h>
32#include <linux/io.h>
33#include <linux/types.h>
22#include <linux/module.h> 34#include <linux/module.h>
23#include <au1000.h> 35
24#include <au1xxx_gpio.h> 36#include <asm/addrspace.h>
37
38#include <asm/mach-au1x00/au1000.h>
39#include <asm/gpio.h>
25 40
26#define gpio1 sys 41#define gpio1 sys
27#if !defined(CONFIG_SOC_AU1000) 42#if !defined(CONFIG_SOC_AU1000)
28static AU1X00_GPIO2 * const gpio2 = (AU1X00_GPIO2 *)GPIO2_BASE;
29 43
30#define GPIO2_OUTPUT_ENABLE_MASK 0x00010000 44static struct au1x00_gpio2 *const gpio2 = (struct au1x00_gpio2 *) GPIO2_BASE;
45#define GPIO2_OUTPUT_ENABLE_MASK 0x00010000
31 46
32int au1xxx_gpio2_read(int signal) 47static int au1xxx_gpio2_read(unsigned gpio)
33{ 48{
34 signal -= 200; 49 gpio -= AU1XXX_GPIO_BASE;
35/* gpio2->dir &= ~(0x01 << signal); //Set GPIO to input */ 50 return ((gpio2->pinstate >> gpio) & 0x01);
36 return ((gpio2->pinstate >> signal) & 0x01);
37} 51}
38 52
39void au1xxx_gpio2_write(int signal, int value) 53static void au1xxx_gpio2_write(unsigned gpio, int value)
40{ 54{
41 signal -= 200; 55 gpio -= AU1XXX_GPIO_BASE;
42 56
43 gpio2->output = (GPIO2_OUTPUT_ENABLE_MASK << signal) | 57 gpio2->output = (GPIO2_OUTPUT_ENABLE_MASK << gpio) | (value << gpio);
44 (value << signal);
45} 58}
46 59
47void au1xxx_gpio2_tristate(int signal) 60static int au1xxx_gpio2_direction_input(unsigned gpio)
48{ 61{
49 signal -= 200; 62 gpio -= AU1XXX_GPIO_BASE;
50 gpio2->dir &= ~(0x01 << signal); /* Set GPIO to input */ 63 gpio2->dir &= ~(0x01 << gpio);
64 return 0;
51} 65}
52#endif
53 66
54int au1xxx_gpio1_read(int signal) 67static int au1xxx_gpio2_direction_output(unsigned gpio, int value)
68{
69 gpio -= AU1XXX_GPIO_BASE;
70 gpio2->dir = (0x01 << gpio) | (value << gpio);
71 return 0;
72}
73
74#endif /* !defined(CONFIG_SOC_AU1000) */
75
76static int au1xxx_gpio1_read(unsigned gpio)
55{ 77{
56/* gpio1->trioutclr |= (0x01 << signal); */ 78 return ((gpio1->pinstaterd >> gpio) & 0x01);
57 return ((gpio1->pinstaterd >> signal) & 0x01);
58} 79}
59 80
60void au1xxx_gpio1_write(int signal, int value) 81static void au1xxx_gpio1_write(unsigned gpio, int value)
61{ 82{
62 if(value) 83 if (value)
63 gpio1->outputset = (0x01 << signal); 84 gpio1->outputset = (0x01 << gpio);
64 else 85 else
65 gpio1->outputclr = (0x01 << signal); /* Output a Zero */ 86 /* Output a zero */
87 gpio1->outputclr = (0x01 << gpio);
66} 88}
67 89
68void au1xxx_gpio1_tristate(int signal) 90static int au1xxx_gpio1_direction_input(unsigned gpio)
69{ 91{
70 gpio1->trioutclr = (0x01 << signal); /* Tristate signal */ 92 gpio1->pininputen = (0x01 << gpio);
93 return 0;
71} 94}
72 95
96static int au1xxx_gpio1_direction_output(unsigned gpio, int value)
97{
98 gpio1->trioutclr = (0x01 & gpio);
99 return 0;
100}
73 101
74int au1xxx_gpio_read(int signal) 102int au1xxx_gpio_get_value(unsigned gpio)
75{ 103{
76 if(signal >= 200) 104 if (gpio >= AU1XXX_GPIO_BASE)
77#if defined(CONFIG_SOC_AU1000) 105#if defined(CONFIG_SOC_AU1000)
78 return 0; 106 return 0;
79#else 107#else
80 return au1xxx_gpio2_read(signal); 108 return au1xxx_gpio2_read(gpio);
81#endif 109#endif
82 else 110 else
83 return au1xxx_gpio1_read(signal); 111 return au1xxx_gpio1_read(gpio);
84} 112}
85 113
86void au1xxx_gpio_write(int signal, int value) 114EXPORT_SYMBOL(au1xxx_gpio_get_value);
115
116void au1xxx_gpio_set_value(unsigned gpio, int value)
87{ 117{
88 if(signal >= 200) 118 if (gpio >= AU1XXX_GPIO_BASE)
89#if defined(CONFIG_SOC_AU1000) 119#if defined(CONFIG_SOC_AU1000)
90 ; 120 ;
91#else 121#else
92 au1xxx_gpio2_write(signal, value); 122 au1xxx_gpio2_write(gpio, value);
93#endif 123#endif
94 else 124 else
95 au1xxx_gpio1_write(signal, value); 125 au1xxx_gpio1_write(gpio, value);
96} 126}
97 127
98void au1xxx_gpio_tristate(int signal) 128EXPORT_SYMBOL(au1xxx_gpio_set_value);
129
130int au1xxx_gpio_direction_input(unsigned gpio)
99{ 131{
100 if(signal >= 200) 132 if (gpio >= AU1XXX_GPIO_BASE)
101#if defined(CONFIG_SOC_AU1000) 133#if defined(CONFIG_SOC_AU1000)
102 ; 134 ;
103#else 135#else
104 au1xxx_gpio2_tristate(signal); 136 return au1xxx_gpio2_direction_input(gpio);
105#endif 137#endif
106 else 138 else
107 au1xxx_gpio1_tristate(signal); 139 return au1xxx_gpio1_direction_input(gpio);
108} 140}
109 141
110void au1xxx_gpio1_set_inputs(void) 142EXPORT_SYMBOL(au1xxx_gpio_direction_input);
143
144int au1xxx_gpio_direction_output(unsigned gpio, int value)
111{ 145{
112 gpio1->pininputen = 0; 146 if (gpio >= AU1XXX_GPIO_BASE)
147#if defined(CONFIG_SOC_AU1000)
148 ;
149#else
150 return au1xxx_gpio2_direction_output(gpio, value);
151#endif
152 else
153 return au1xxx_gpio1_direction_output(gpio, value);
113} 154}
114 155
115EXPORT_SYMBOL(au1xxx_gpio1_set_inputs); 156EXPORT_SYMBOL(au1xxx_gpio_direction_output);
116EXPORT_SYMBOL(au1xxx_gpio_tristate);
117EXPORT_SYMBOL(au1xxx_gpio_write);
118EXPORT_SYMBOL(au1xxx_gpio_read);
diff --git a/arch/mips/au1000/common/platform.c b/arch/mips/au1000/common/platform.c
index 8fd203d4a339..d51e18fb789b 100644
--- a/arch/mips/au1000/common/platform.c
+++ b/arch/mips/au1000/common/platform.c
@@ -289,7 +289,7 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = {
289#endif 289#endif
290}; 290};
291 291
292int au1xxx_platform_init(void) 292int __init au1xxx_platform_init(void)
293{ 293{
294 return platform_add_devices(au1xxx_platform_devices, ARRAY_SIZE(au1xxx_platform_devices)); 294 return platform_add_devices(au1xxx_platform_devices, ARRAY_SIZE(au1xxx_platform_devices));
295} 295}
diff --git a/arch/mips/au1000/common/setup.c b/arch/mips/au1000/common/setup.c
index 13fe187f35d6..a95b37773196 100644
--- a/arch/mips/au1000/common/setup.c
+++ b/arch/mips/au1000/common/setup.c
@@ -100,18 +100,9 @@ void __init plat_mem_setup(void)
100 argptr = prom_getcmdline(); 100 argptr = prom_getcmdline();
101 /* default panel */ 101 /* default panel */
102 /*strcat(argptr, " video=au1100fb:panel:Sharp_320x240_16");*/ 102 /*strcat(argptr, " video=au1100fb:panel:Sharp_320x240_16");*/
103#ifdef CONFIG_MIPS_HYDROGEN3
104 strcat(argptr, " video=au1100fb:panel:Hydrogen_3_NEC_panel_320x240,nohwcursor");
105#endif
106 } 103 }
107#endif 104#endif
108 105
109#ifdef CONFIG_FB_XPERT98
110 if ((argptr = strstr(argptr, "video=")) == NULL) {
111 argptr = prom_getcmdline();
112 strcat(argptr, " video=atyfb:1024x768-8@70");
113 }
114#endif
115 106
116#if defined(CONFIG_SOUND_AU1X00) && !defined(CONFIG_SOC_AU1000) 107#if defined(CONFIG_SOUND_AU1X00) && !defined(CONFIG_SOC_AU1000)
117 /* au1000 does not support vra, au1500 and au1100 do */ 108 /* au1000 does not support vra, au1500 and au1100 do */
diff --git a/arch/mips/au1000/common/time.c b/arch/mips/au1000/common/time.c
index fa1c62f05515..8fc29982d700 100644
--- a/arch/mips/au1000/common/time.c
+++ b/arch/mips/au1000/common/time.c
@@ -203,11 +203,7 @@ wakeup_counter0_set(int ticks)
203/* I haven't found anyone that doesn't use a 12 MHz source clock, 203/* I haven't found anyone that doesn't use a 12 MHz source clock,
204 * but just in case..... 204 * but just in case.....
205 */ 205 */
206#ifdef CONFIG_AU1000_SRC_CLK
207#define AU1000_SRC_CLK CONFIG_AU1000_SRC_CLK
208#else
209#define AU1000_SRC_CLK 12000000 206#define AU1000_SRC_CLK 12000000
210#endif
211 207
212/* 208/*
213 * We read the real processor speed from the PLL. This is important 209 * We read the real processor speed from the PLL. This is important
@@ -247,33 +243,8 @@ unsigned long cal_r4koff(void)
247 au_writel (0, SYS_TOYWRITE); 243 au_writel (0, SYS_TOYWRITE);
248 while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S); 244 while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S);
249 245
250#if defined(CONFIG_AU1000_USE32K)
251 {
252 unsigned long start, end, count;
253
254 start = au_readl(SYS_RTCREAD);
255 start += 2;
256 /* wait for the beginning of a new tick
257 */
258 while (au_readl(SYS_RTCREAD) < start);
259
260 /* Start r4k counter.
261 */
262 write_c0_count(0);
263
264 /* Wait 0.5 seconds.
265 */
266 end = start + (32768 / trim_divide)/2;
267
268 while (end > au_readl(SYS_RTCREAD));
269
270 count = read_c0_count();
271 cpu_speed = count * 2;
272 }
273#else
274 cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * 246 cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) *
275 AU1000_SRC_CLK; 247 AU1000_SRC_CLK;
276#endif
277 } 248 }
278 else { 249 else {
279 /* The 32KHz oscillator isn't running, so assume there 250 /* The 32KHz oscillator isn't running, so assume there
diff --git a/arch/mips/au1000/pb1100/init.c b/arch/mips/au1000/pb1100/init.c
index 1fae39a608cf..6131b56f41b5 100644
--- a/arch/mips/au1000/pb1100/init.c
+++ b/arch/mips/au1000/pb1100/init.c
@@ -53,7 +53,7 @@ void __init prom_init(void)
53 53
54 prom_argc = fw_arg0; 54 prom_argc = fw_arg0;
55 prom_argv = (char **) fw_arg1; 55 prom_argv = (char **) fw_arg1;
56 prom_envp = (int *) fw_arg3; 56 prom_envp = (char **) fw_arg3;
57 57
58 mips_machgroup = MACH_GROUP_ALCHEMY; 58 mips_machgroup = MACH_GROUP_ALCHEMY;
59 mips_machtype = MACH_PB1100; 59 mips_machtype = MACH_PB1100;
diff --git a/arch/mips/au1000/pb1200/board_setup.c b/arch/mips/au1000/pb1200/board_setup.c
index 043302b7fe58..eea2092bde8d 100644
--- a/arch/mips/au1000/pb1200/board_setup.c
+++ b/arch/mips/au1000/pb1200/board_setup.c
@@ -131,14 +131,7 @@ void __init board_setup(void)
131 /* The Pb1200 development board uses external MUX for PSC0 to 131 /* The Pb1200 development board uses external MUX for PSC0 to
132 support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI 132 support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI
133 */ 133 */
134#if defined(CONFIG_AU1XXX_PSC_SPI) && defined(CONFIG_I2C_AU1550) 134#ifdef CONFIG_I2C_AU1550
135 #error I2C and SPI are mutually exclusive. Both are physically connected to PSC0.\
136 Refer to Pb1200/Db1200 documentation.
137#elif defined( CONFIG_AU1XXX_PSC_SPI )
138 bcsr->resets |= BCSR_RESETS_PCS0MUX;
139 /*Hard Coding Value to enable Temp Sensors [bit 14] Value for SOC Au1200. Pls refer documentation*/
140 bcsr->resets =0x900f;
141#elif defined( CONFIG_I2C_AU1550 )
142 bcsr->resets &= (~BCSR_RESETS_PCS0MUX); 135 bcsr->resets &= (~BCSR_RESETS_PCS0MUX);
143#endif 136#endif
144 au_sync(); 137 au_sync();
diff --git a/arch/mips/au1000/pb1500/board_setup.c b/arch/mips/au1000/pb1500/board_setup.c
index 0ffdb4fd575b..c9b655616fb3 100644
--- a/arch/mips/au1000/pb1500/board_setup.c
+++ b/arch/mips/au1000/pb1500/board_setup.c
@@ -125,7 +125,7 @@ void __init board_setup(void)
125 au_writel((au_readl(0xac000028) | 0x20), 0xac000028); 125 au_writel((au_readl(0xac000028) | 0x20), 0xac000028);
126 } 126 }
127 /* Put the clock in BCD mode */ 127 /* Put the clock in BCD mode */
128 if (readl(0xac00002C) & 0x4) { /* reg B */ 128 if (au_readl(0xac00002C) & 0x4) { /* reg B */
129 au_writel(au_readl(0xac00002c) & ~0x4, 0xac00002c); 129 au_writel(au_readl(0xac00002c) & ~0x4, 0xac00002c);
130 au_sync(); 130 au_sync();
131 } 131 }
diff --git a/arch/mips/basler/excite/excite_setup.c b/arch/mips/basler/excite/excite_setup.c
index 2f0e4c08eb04..56003188f17c 100644
--- a/arch/mips/basler/excite/excite_setup.c
+++ b/arch/mips/basler/excite/excite_setup.c
@@ -26,6 +26,7 @@
26#include <linux/tty.h> 26#include <linux/tty.h>
27#include <linux/serial_core.h> 27#include <linux/serial_core.h>
28#include <linux/serial.h> 28#include <linux/serial.h>
29#include <linux/serial_8250.h>
29#include <linux/ioport.h> 30#include <linux/ioport.h>
30#include <linux/spinlock.h> 31#include <linux/spinlock.h>
31#include <asm/bootinfo.h> 32#include <asm/bootinfo.h>
diff --git a/arch/mips/cobalt/pci.c b/arch/mips/cobalt/pci.c
index d91027f43de6..cfce7af1bca9 100644
--- a/arch/mips/cobalt/pci.c
+++ b/arch/mips/cobalt/pci.c
@@ -35,6 +35,7 @@ static struct pci_controller cobalt_pci_controller = {
35 .mem_resource = &cobalt_mem_resource, 35 .mem_resource = &cobalt_mem_resource,
36 .io_resource = &cobalt_io_resource, 36 .io_resource = &cobalt_io_resource,
37 .io_offset = 0 - GT_DEF_PCI0_IO_BASE, 37 .io_offset = 0 - GT_DEF_PCI0_IO_BASE,
38 .io_map_base = CKSEG1ADDR(GT_DEF_PCI0_IO_BASE),
38}; 39};
39 40
40static int __init cobalt_pci_init(void) 41static int __init cobalt_pci_init(void)
diff --git a/arch/mips/configs/atlas_defconfig b/arch/mips/configs/atlas_defconfig
index 39e251300c64..129e2c961fec 100644
--- a/arch/mips/configs/atlas_defconfig
+++ b/arch/mips/configs/atlas_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31CONFIG_MIPS_ATLAS=y 29CONFIG_MIPS_ATLAS=y
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_MIPS_ATLAS=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig
index 4713a13211ce..dc3e1bf4e42e 100644
--- a/arch/mips/configs/bigsur_defconfig
+++ b/arch/mips/configs/bigsur_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/capcella_defconfig b/arch/mips/configs/capcella_defconfig
index 5e7ae56b1f3c..4c7031222e64 100644
--- a/arch/mips/configs/capcella_defconfig
+++ b/arch/mips/configs/capcella_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig
index 631b2138ad68..c8c05785a86d 100644
--- a/arch/mips/configs/cobalt_defconfig
+++ b/arch/mips/configs/cobalt_defconfig
@@ -1,44 +1,24 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21-rc7 3# Linux kernel version: 2.6.22-rc2
4# Wed Apr 18 14:25:45 2007 4# Fri May 25 11:17:29 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
26CONFIG_MIPS_COBALT=y 13CONFIG_MIPS_COBALT=y
27# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 15# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 16# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 17# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 18# CONFIG_MIPS_SEAD is not set
34# CONFIG_WR_PPMC is not set 19# CONFIG_WR_PPMC is not set
35# CONFIG_MIPS_SIM is not set 20# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 21# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 22# CONFIG_PNX8550_JBS is not set
43# CONFIG_PNX8550_STB810 is not set 23# CONFIG_PNX8550_STB810 is not set
44# CONFIG_DDB5477 is not set 24# CONFIG_DDB5477 is not set
@@ -138,7 +118,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
138# CONFIG_SPARSEMEM_STATIC is not set 118# CONFIG_SPARSEMEM_STATIC is not set
139CONFIG_SPLIT_PTLOCK_CPUS=4 119CONFIG_SPLIT_PTLOCK_CPUS=4
140# CONFIG_RESOURCES_64BIT is not set 120# CONFIG_RESOURCES_64BIT is not set
141CONFIG_ZONE_DMA_FLAG=1 121CONFIG_ZONE_DMA_FLAG=0
142# CONFIG_HZ_48 is not set 122# CONFIG_HZ_48 is not set
143# CONFIG_HZ_100 is not set 123# CONFIG_HZ_100 is not set
144# CONFIG_HZ_128 is not set 124# CONFIG_HZ_128 is not set
@@ -178,6 +158,7 @@ CONFIG_SYSVIPC_SYSCTL=y
178# CONFIG_UTS_NS is not set 158# CONFIG_UTS_NS is not set
179# CONFIG_AUDIT is not set 159# CONFIG_AUDIT is not set
180# CONFIG_IKCONFIG is not set 160# CONFIG_IKCONFIG is not set
161CONFIG_LOG_BUF_SHIFT=14
181CONFIG_SYSFS_DEPRECATED=y 162CONFIG_SYSFS_DEPRECATED=y
182CONFIG_RELAY=y 163CONFIG_RELAY=y
183# CONFIG_BLK_DEV_INITRD is not set 164# CONFIG_BLK_DEV_INITRD is not set
@@ -193,14 +174,19 @@ CONFIG_BUG=y
193CONFIG_ELF_CORE=y 174CONFIG_ELF_CORE=y
194CONFIG_BASE_FULL=y 175CONFIG_BASE_FULL=y
195CONFIG_FUTEX=y 176CONFIG_FUTEX=y
177CONFIG_ANON_INODES=y
196CONFIG_EPOLL=y 178CONFIG_EPOLL=y
179CONFIG_SIGNALFD=y
180CONFIG_TIMERFD=y
181CONFIG_EVENTFD=y
197CONFIG_SHMEM=y 182CONFIG_SHMEM=y
198CONFIG_SLAB=y
199CONFIG_VM_EVENT_COUNTERS=y 183CONFIG_VM_EVENT_COUNTERS=y
184CONFIG_SLAB=y
185# CONFIG_SLUB is not set
186# CONFIG_SLOB is not set
200CONFIG_RT_MUTEXES=y 187CONFIG_RT_MUTEXES=y
201# CONFIG_TINY_SHMEM is not set 188# CONFIG_TINY_SHMEM is not set
202CONFIG_BASE_SMALL=0 189CONFIG_BASE_SMALL=0
203# CONFIG_SLOB is not set
204 190
205# 191#
206# Loadable module support 192# Loadable module support
@@ -233,16 +219,13 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
233# 219#
234CONFIG_HW_HAS_PCI=y 220CONFIG_HW_HAS_PCI=y
235CONFIG_PCI=y 221CONFIG_PCI=y
222# CONFIG_ARCH_SUPPORTS_MSI is not set
236CONFIG_MMU=y 223CONFIG_MMU=y
237 224
238# 225#
239# PCCARD (PCMCIA/CardBus) support 226# PCCARD (PCMCIA/CardBus) support
240# 227#
241# CONFIG_PCCARD is not set 228# CONFIG_PCCARD is not set
242
243#
244# PCI Hotplug Support
245#
246# CONFIG_HOTPLUG_PCI is not set 229# CONFIG_HOTPLUG_PCI is not set
247 230
248# 231#
@@ -268,7 +251,6 @@ CONFIG_NET=y
268# 251#
269# Networking options 252# Networking options
270# 253#
271# CONFIG_NETDEBUG is not set
272CONFIG_PACKET=y 254CONFIG_PACKET=y
273# CONFIG_PACKET_MMAP is not set 255# CONFIG_PACKET_MMAP is not set
274CONFIG_UNIX=y 256CONFIG_UNIX=y
@@ -300,11 +282,11 @@ CONFIG_INET_TCP_DIAG=y
300# CONFIG_TCP_CONG_ADVANCED is not set 282# CONFIG_TCP_CONG_ADVANCED is not set
301CONFIG_TCP_CONG_CUBIC=y 283CONFIG_TCP_CONG_CUBIC=y
302CONFIG_DEFAULT_TCP_CONG="cubic" 284CONFIG_DEFAULT_TCP_CONG="cubic"
303CONFIG_TCP_MD5SIG=y 285# CONFIG_TCP_MD5SIG is not set
304# CONFIG_IPV6 is not set 286# CONFIG_IPV6 is not set
305# CONFIG_INET6_XFRM_TUNNEL is not set 287# CONFIG_INET6_XFRM_TUNNEL is not set
306# CONFIG_INET6_TUNNEL is not set 288# CONFIG_INET6_TUNNEL is not set
307CONFIG_NETWORK_SECMARK=y 289# CONFIG_NETWORK_SECMARK is not set
308# CONFIG_NETFILTER is not set 290# CONFIG_NETFILTER is not set
309 291
310# 292#
@@ -345,13 +327,16 @@ CONFIG_NETWORK_SECMARK=y
345# CONFIG_HAMRADIO is not set 327# CONFIG_HAMRADIO is not set
346# CONFIG_IRDA is not set 328# CONFIG_IRDA is not set
347# CONFIG_BT is not set 329# CONFIG_BT is not set
348CONFIG_IEEE80211=y 330# CONFIG_AF_RXRPC is not set
349# CONFIG_IEEE80211_DEBUG is not set 331
350CONFIG_IEEE80211_CRYPT_WEP=y 332#
351CONFIG_IEEE80211_CRYPT_CCMP=y 333# Wireless
352CONFIG_IEEE80211_SOFTMAC=y 334#
353# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 335# CONFIG_CFG80211 is not set
354CONFIG_WIRELESS_EXT=y 336# CONFIG_WIRELESS_EXT is not set
337# CONFIG_MAC80211 is not set
338# CONFIG_IEEE80211 is not set
339# CONFIG_RFKILL is not set
355 340
356# 341#
357# Device Drivers 342# Device Drivers
@@ -370,10 +355,6 @@ CONFIG_FW_LOADER=y
370# 355#
371CONFIG_CONNECTOR=y 356CONFIG_CONNECTOR=y
372CONFIG_PROC_EVENTS=y 357CONFIG_PROC_EVENTS=y
373
374#
375# Memory Technology Devices (MTD)
376#
377CONFIG_MTD=y 358CONFIG_MTD=y
378# CONFIG_MTD_DEBUG is not set 359# CONFIG_MTD_DEBUG is not set
379# CONFIG_MTD_CONCAT is not set 360# CONFIG_MTD_CONCAT is not set
@@ -418,7 +399,6 @@ CONFIG_MTD_CFI_UTIL=y
418# CONFIG_MTD_RAM is not set 399# CONFIG_MTD_RAM is not set
419# CONFIG_MTD_ROM is not set 400# CONFIG_MTD_ROM is not set
420# CONFIG_MTD_ABSENT is not set 401# CONFIG_MTD_ABSENT is not set
421# CONFIG_MTD_OBSOLETE_CHIPS is not set
422 402
423# 403#
424# Mapping drivers for chip access 404# Mapping drivers for chip access
@@ -445,16 +425,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=0
445# CONFIG_MTD_DOC2000 is not set 425# CONFIG_MTD_DOC2000 is not set
446# CONFIG_MTD_DOC2001 is not set 426# CONFIG_MTD_DOC2001 is not set
447# CONFIG_MTD_DOC2001PLUS is not set 427# CONFIG_MTD_DOC2001PLUS is not set
448
449#
450# NAND Flash Device Drivers
451#
452# CONFIG_MTD_NAND is not set 428# CONFIG_MTD_NAND is not set
429# CONFIG_MTD_ONENAND is not set
453 430
454# 431#
455# OneNAND Flash Device Drivers 432# UBI - Unsorted block images
456# 433#
457# CONFIG_MTD_ONENAND is not set 434# CONFIG_MTD_UBI is not set
458 435
459# 436#
460# Parallel port support 437# Parallel port support
@@ -479,87 +456,145 @@ CONFIG_BLK_DEV_LOOP=y
479# CONFIG_BLK_DEV_NBD is not set 456# CONFIG_BLK_DEV_NBD is not set
480# CONFIG_BLK_DEV_SX8 is not set 457# CONFIG_BLK_DEV_SX8 is not set
481# CONFIG_BLK_DEV_RAM is not set 458# CONFIG_BLK_DEV_RAM is not set
482CONFIG_CDROM_PKTCDVD=y 459# CONFIG_CDROM_PKTCDVD is not set
483CONFIG_CDROM_PKTCDVD_BUFFERS=8 460# CONFIG_ATA_OVER_ETH is not set
484# CONFIG_CDROM_PKTCDVD_WCACHE is not set
485CONFIG_ATA_OVER_ETH=y
486 461
487# 462#
488# Misc devices 463# Misc devices
489# 464#
490CONFIG_SGI_IOC4=y 465# CONFIG_PHANTOM is not set
466# CONFIG_SGI_IOC4 is not set
491# CONFIG_TIFM_CORE is not set 467# CONFIG_TIFM_CORE is not set
492 468# CONFIG_BLINK is not set
493# 469# CONFIG_IDE is not set
494# ATA/ATAPI/MFM/RLL support
495#
496CONFIG_IDE=y
497CONFIG_IDE_MAX_HWIFS=4
498CONFIG_BLK_DEV_IDE=y
499
500#
501# Please see Documentation/ide.txt for help/info on IDE drives
502#
503# CONFIG_BLK_DEV_IDE_SATA is not set
504CONFIG_BLK_DEV_IDEDISK=y
505# CONFIG_IDEDISK_MULTI_MODE is not set
506# CONFIG_BLK_DEV_IDECD is not set
507# CONFIG_BLK_DEV_IDETAPE is not set
508# CONFIG_BLK_DEV_IDEFLOPPY is not set
509# CONFIG_IDE_TASK_IOCTL is not set
510
511#
512# IDE chipset support/bugfixes
513#
514CONFIG_IDE_GENERIC=y
515CONFIG_BLK_DEV_IDEPCI=y
516# CONFIG_IDEPCI_SHARE_IRQ is not set
517# CONFIG_BLK_DEV_OFFBOARD is not set
518# CONFIG_BLK_DEV_GENERIC is not set
519# CONFIG_BLK_DEV_OPTI621 is not set
520CONFIG_BLK_DEV_IDEDMA_PCI=y
521# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
522# CONFIG_IDEDMA_ONLYDISK is not set
523# CONFIG_BLK_DEV_AEC62XX is not set
524# CONFIG_BLK_DEV_ALI15X3 is not set
525# CONFIG_BLK_DEV_AMD74XX is not set
526# CONFIG_BLK_DEV_CMD64X is not set
527# CONFIG_BLK_DEV_TRIFLEX is not set
528# CONFIG_BLK_DEV_CY82C693 is not set
529# CONFIG_BLK_DEV_CS5520 is not set
530# CONFIG_BLK_DEV_CS5530 is not set
531# CONFIG_BLK_DEV_HPT34X is not set
532# CONFIG_BLK_DEV_HPT366 is not set
533# CONFIG_BLK_DEV_JMICRON is not set
534# CONFIG_BLK_DEV_SC1200 is not set
535# CONFIG_BLK_DEV_PIIX is not set
536CONFIG_BLK_DEV_IT8213=y
537# CONFIG_BLK_DEV_IT821X is not set
538# CONFIG_BLK_DEV_NS87415 is not set
539# CONFIG_BLK_DEV_PDC202XX_OLD is not set
540# CONFIG_BLK_DEV_PDC202XX_NEW is not set
541# CONFIG_BLK_DEV_SVWKS is not set
542# CONFIG_BLK_DEV_SIIMAGE is not set
543# CONFIG_BLK_DEV_SLC90E66 is not set
544# CONFIG_BLK_DEV_TRM290 is not set
545CONFIG_BLK_DEV_VIA82CXXX=y
546CONFIG_BLK_DEV_TC86C001=y
547# CONFIG_IDE_ARM is not set
548CONFIG_BLK_DEV_IDEDMA=y
549# CONFIG_IDEDMA_IVB is not set
550# CONFIG_BLK_DEV_HD is not set
551 470
552# 471#
553# SCSI device support 472# SCSI device support
554# 473#
555CONFIG_RAID_ATTRS=y 474CONFIG_RAID_ATTRS=y
556# CONFIG_SCSI is not set 475CONFIG_SCSI=y
476# CONFIG_SCSI_TGT is not set
557# CONFIG_SCSI_NETLINK is not set 477# CONFIG_SCSI_NETLINK is not set
558 478CONFIG_SCSI_PROC_FS=y
559# 479
560# Serial ATA (prod) and Parallel ATA (experimental) drivers 480#
561# 481# SCSI support type (disk, tape, CD-ROM)
562# CONFIG_ATA is not set 482#
483CONFIG_BLK_DEV_SD=y
484# CONFIG_CHR_DEV_ST is not set
485# CONFIG_CHR_DEV_OSST is not set
486# CONFIG_BLK_DEV_SR is not set
487# CONFIG_CHR_DEV_SG is not set
488# CONFIG_CHR_DEV_SCH is not set
489
490#
491# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
492#
493# CONFIG_SCSI_MULTI_LUN is not set
494# CONFIG_SCSI_CONSTANTS is not set
495# CONFIG_SCSI_LOGGING is not set
496# CONFIG_SCSI_SCAN_ASYNC is not set
497
498#
499# SCSI Transports
500#
501# CONFIG_SCSI_SPI_ATTRS is not set
502# CONFIG_SCSI_FC_ATTRS is not set
503# CONFIG_SCSI_ISCSI_ATTRS is not set
504# CONFIG_SCSI_SAS_ATTRS is not set
505# CONFIG_SCSI_SAS_LIBSAS is not set
506
507#
508# SCSI low-level drivers
509#
510# CONFIG_ISCSI_TCP is not set
511# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
512# CONFIG_SCSI_3W_9XXX is not set
513# CONFIG_SCSI_ACARD is not set
514# CONFIG_SCSI_AACRAID is not set
515# CONFIG_SCSI_AIC7XXX is not set
516# CONFIG_SCSI_AIC7XXX_OLD is not set
517# CONFIG_SCSI_AIC79XX is not set
518# CONFIG_SCSI_AIC94XX is not set
519# CONFIG_SCSI_DPT_I2O is not set
520# CONFIG_SCSI_ARCMSR is not set
521# CONFIG_MEGARAID_NEWGEN is not set
522# CONFIG_MEGARAID_LEGACY is not set
523# CONFIG_MEGARAID_SAS is not set
524# CONFIG_SCSI_HPTIOP is not set
525# CONFIG_SCSI_DMX3191D is not set
526# CONFIG_SCSI_FUTURE_DOMAIN is not set
527# CONFIG_SCSI_IPS is not set
528# CONFIG_SCSI_INITIO is not set
529# CONFIG_SCSI_INIA100 is not set
530# CONFIG_SCSI_STEX is not set
531# CONFIG_SCSI_SYM53C8XX_2 is not set
532# CONFIG_SCSI_IPR is not set
533# CONFIG_SCSI_QLOGIC_1280 is not set
534# CONFIG_SCSI_QLA_FC is not set
535# CONFIG_SCSI_QLA_ISCSI is not set
536# CONFIG_SCSI_LPFC is not set
537# CONFIG_SCSI_DC395x is not set
538# CONFIG_SCSI_DC390T is not set
539# CONFIG_SCSI_NSP32 is not set
540# CONFIG_SCSI_DEBUG is not set
541# CONFIG_SCSI_ESP_CORE is not set
542# CONFIG_SCSI_SRP is not set
543CONFIG_ATA=y
544# CONFIG_ATA_NONSTANDARD is not set
545# CONFIG_SATA_AHCI is not set
546# CONFIG_SATA_SVW is not set
547# CONFIG_ATA_PIIX is not set
548# CONFIG_SATA_MV is not set
549# CONFIG_SATA_NV is not set
550# CONFIG_PDC_ADMA is not set
551# CONFIG_SATA_QSTOR is not set
552# CONFIG_SATA_PROMISE is not set
553# CONFIG_SATA_SX4 is not set
554# CONFIG_SATA_SIL is not set
555# CONFIG_SATA_SIL24 is not set
556# CONFIG_SATA_SIS is not set
557# CONFIG_SATA_ULI is not set
558# CONFIG_SATA_VIA is not set
559# CONFIG_SATA_VITESSE is not set
560# CONFIG_SATA_INIC162X is not set
561# CONFIG_PATA_ALI is not set
562# CONFIG_PATA_AMD is not set
563# CONFIG_PATA_ARTOP is not set
564# CONFIG_PATA_ATIIXP is not set
565# CONFIG_PATA_CMD640_PCI is not set
566# CONFIG_PATA_CMD64X is not set
567# CONFIG_PATA_CS5520 is not set
568# CONFIG_PATA_CS5530 is not set
569# CONFIG_PATA_CYPRESS is not set
570# CONFIG_PATA_EFAR is not set
571# CONFIG_ATA_GENERIC is not set
572# CONFIG_PATA_HPT366 is not set
573# CONFIG_PATA_HPT37X is not set
574# CONFIG_PATA_HPT3X2N is not set
575# CONFIG_PATA_HPT3X3 is not set
576# CONFIG_PATA_IT821X is not set
577# CONFIG_PATA_IT8213 is not set
578# CONFIG_PATA_JMICRON is not set
579# CONFIG_PATA_TRIFLEX is not set
580# CONFIG_PATA_MARVELL is not set
581# CONFIG_PATA_MPIIX is not set
582# CONFIG_PATA_OLDPIIX is not set
583# CONFIG_PATA_NETCELL is not set
584# CONFIG_PATA_NS87410 is not set
585# CONFIG_PATA_OPTI is not set
586# CONFIG_PATA_OPTIDMA is not set
587# CONFIG_PATA_PDC_OLD is not set
588# CONFIG_PATA_RADISYS is not set
589# CONFIG_PATA_RZ1000 is not set
590# CONFIG_PATA_SC1200 is not set
591# CONFIG_PATA_SERVERWORKS is not set
592# CONFIG_PATA_PDC2027X is not set
593# CONFIG_PATA_SIL680 is not set
594# CONFIG_PATA_SIS is not set
595CONFIG_PATA_VIA=y
596# CONFIG_PATA_WINBOND is not set
597# CONFIG_PATA_PLATFORM is not set
563 598
564# 599#
565# Multi-device support (RAID and LVM) 600# Multi-device support (RAID and LVM)
@@ -570,10 +605,14 @@ CONFIG_RAID_ATTRS=y
570# Fusion MPT device support 605# Fusion MPT device support
571# 606#
572# CONFIG_FUSION is not set 607# CONFIG_FUSION is not set
608# CONFIG_FUSION_SPI is not set
609# CONFIG_FUSION_FC is not set
610# CONFIG_FUSION_SAS is not set
573 611
574# 612#
575# IEEE 1394 (FireWire) support 613# IEEE 1394 (FireWire) support
576# 614#
615# CONFIG_FIREWIRE is not set
577# CONFIG_IEEE1394 is not set 616# CONFIG_IEEE1394 is not set
578 617
579# 618#
@@ -594,24 +633,7 @@ CONFIG_NETDEVICES=y
594# ARCnet devices 633# ARCnet devices
595# 634#
596# CONFIG_ARCNET is not set 635# CONFIG_ARCNET is not set
597 636# CONFIG_PHYLIB is not set
598#
599# PHY device support
600#
601CONFIG_PHYLIB=y
602
603#
604# MII PHY device drivers
605#
606CONFIG_MARVELL_PHY=y
607CONFIG_DAVICOM_PHY=y
608CONFIG_QSEMI_PHY=y
609CONFIG_LXT_PHY=y
610CONFIG_CICADA_PHY=y
611CONFIG_VITESSE_PHY=y
612CONFIG_SMSC_PHY=y
613# CONFIG_BROADCOM_PHY is not set
614# CONFIG_FIXED_PHY is not set
615 637
616# 638#
617# Ethernet (10 or 100Mbit) 639# Ethernet (10 or 100Mbit)
@@ -639,35 +661,8 @@ CONFIG_TULIP=y
639# CONFIG_ULI526X is not set 661# CONFIG_ULI526X is not set
640# CONFIG_HP100 is not set 662# CONFIG_HP100 is not set
641# CONFIG_NET_PCI is not set 663# CONFIG_NET_PCI is not set
642 664# CONFIG_NETDEV_1000 is not set
643# 665# CONFIG_NETDEV_10000 is not set
644# Ethernet (1000 Mbit)
645#
646# CONFIG_ACENIC is not set
647# CONFIG_DL2K is not set
648# CONFIG_E1000 is not set
649# CONFIG_NS83820 is not set
650# CONFIG_HAMACHI is not set
651# CONFIG_YELLOWFIN is not set
652# CONFIG_R8169 is not set
653# CONFIG_SIS190 is not set
654# CONFIG_SKGE is not set
655# CONFIG_SKY2 is not set
656# CONFIG_SK98LIN is not set
657# CONFIG_TIGON3 is not set
658# CONFIG_BNX2 is not set
659CONFIG_QLA3XXX=y
660# CONFIG_ATL1 is not set
661
662#
663# Ethernet (10000 Mbit)
664#
665# CONFIG_CHELSIO_T1 is not set
666CONFIG_CHELSIO_T3=y
667# CONFIG_IXGB is not set
668# CONFIG_S2IO is not set
669# CONFIG_MYRI10GE is not set
670CONFIG_NETXEN_NIC=y
671 666
672# 667#
673# Token Ring devices 668# Token Ring devices
@@ -675,18 +670,16 @@ CONFIG_NETXEN_NIC=y
675# CONFIG_TR is not set 670# CONFIG_TR is not set
676 671
677# 672#
678# Wireless LAN (non-hamradio) 673# Wireless LAN
679#
680# CONFIG_NET_RADIO is not set
681
682#
683# Wan interfaces
684# 674#
675# CONFIG_WLAN_PRE80211 is not set
676# CONFIG_WLAN_80211 is not set
685# CONFIG_WAN is not set 677# CONFIG_WAN is not set
686# CONFIG_FDDI is not set 678# CONFIG_FDDI is not set
687# CONFIG_HIPPI is not set 679# CONFIG_HIPPI is not set
688# CONFIG_PPP is not set 680# CONFIG_PPP is not set
689# CONFIG_SLIP is not set 681# CONFIG_SLIP is not set
682# CONFIG_NET_FC is not set
690# CONFIG_SHAPER is not set 683# CONFIG_SHAPER is not set
691# CONFIG_NETCONSOLE is not set 684# CONFIG_NETCONSOLE is not set
692# CONFIG_NETPOLL is not set 685# CONFIG_NETPOLL is not set
@@ -711,10 +704,7 @@ CONFIG_INPUT=y
711# 704#
712# Userland interfaces 705# Userland interfaces
713# 706#
714CONFIG_INPUT_MOUSEDEV=y 707# CONFIG_INPUT_MOUSEDEV is not set
715CONFIG_INPUT_MOUSEDEV_PSAUX=y
716CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
717CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
718# CONFIG_INPUT_JOYDEV is not set 708# CONFIG_INPUT_JOYDEV is not set
719# CONFIG_INPUT_TSDEV is not set 709# CONFIG_INPUT_TSDEV is not set
720# CONFIG_INPUT_EVDEV is not set 710# CONFIG_INPUT_EVDEV is not set
@@ -726,18 +716,23 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
726# CONFIG_INPUT_KEYBOARD is not set 716# CONFIG_INPUT_KEYBOARD is not set
727# CONFIG_INPUT_MOUSE is not set 717# CONFIG_INPUT_MOUSE is not set
728# CONFIG_INPUT_JOYSTICK is not set 718# CONFIG_INPUT_JOYSTICK is not set
719# CONFIG_INPUT_TABLET is not set
729# CONFIG_INPUT_TOUCHSCREEN is not set 720# CONFIG_INPUT_TOUCHSCREEN is not set
730# CONFIG_INPUT_MISC is not set 721CONFIG_INPUT_MISC=y
722# CONFIG_INPUT_PCSPKR is not set
723CONFIG_INPUT_COBALT_BTNS=y
724# CONFIG_INPUT_ATI_REMOTE is not set
725# CONFIG_INPUT_ATI_REMOTE2 is not set
726# CONFIG_INPUT_KEYSPAN_REMOTE is not set
727# CONFIG_INPUT_POWERMATE is not set
728# CONFIG_INPUT_YEALINK is not set
729# CONFIG_INPUT_UINPUT is not set
730CONFIG_INPUT_POLLDEV=y
731 731
732# 732#
733# Hardware I/O ports 733# Hardware I/O ports
734# 734#
735CONFIG_SERIO=y 735# CONFIG_SERIO is not set
736# CONFIG_SERIO_I8042 is not set
737CONFIG_SERIO_SERPORT=y
738# CONFIG_SERIO_PCIPS2 is not set
739# CONFIG_SERIO_LIBPS2 is not set
740CONFIG_SERIO_RAW=y
741# CONFIG_GAMEPORT is not set 736# CONFIG_GAMEPORT is not set
742 737
743# 738#
@@ -754,7 +749,7 @@ CONFIG_VT_HW_CONSOLE_BINDING=y
754# 749#
755CONFIG_SERIAL_8250=y 750CONFIG_SERIAL_8250=y
756CONFIG_SERIAL_8250_CONSOLE=y 751CONFIG_SERIAL_8250_CONSOLE=y
757CONFIG_SERIAL_8250_PCI=y 752# CONFIG_SERIAL_8250_PCI is not set
758CONFIG_SERIAL_8250_NR_UARTS=4 753CONFIG_SERIAL_8250_NR_UARTS=4
759CONFIG_SERIAL_8250_RUNTIME_UARTS=4 754CONFIG_SERIAL_8250_RUNTIME_UARTS=4
760# CONFIG_SERIAL_8250_EXTENDED is not set 755# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -773,16 +768,11 @@ CONFIG_LEGACY_PTY_COUNT=256
773# IPMI 768# IPMI
774# 769#
775# CONFIG_IPMI_HANDLER is not set 770# CONFIG_IPMI_HANDLER is not set
776
777#
778# Watchdog Cards
779#
780# CONFIG_WATCHDOG is not set 771# CONFIG_WATCHDOG is not set
781# CONFIG_HW_RANDOM is not set 772# CONFIG_HW_RANDOM is not set
782# CONFIG_RTC is not set 773# CONFIG_RTC is not set
783# CONFIG_GEN_RTC is not set 774# CONFIG_GEN_RTC is not set
784CONFIG_COBALT_LCD=y 775CONFIG_COBALT_LCD=y
785# CONFIG_DTLK is not set
786# CONFIG_R3964 is not set 776# CONFIG_R3964 is not set
787# CONFIG_APPLICOM is not set 777# CONFIG_APPLICOM is not set
788# CONFIG_DRM is not set 778# CONFIG_DRM is not set
@@ -792,10 +782,7 @@ CONFIG_COBALT_LCD=y
792# TPM devices 782# TPM devices
793# 783#
794# CONFIG_TCG_TPM is not set 784# CONFIG_TCG_TPM is not set
795 785CONFIG_DEVPORT=y
796#
797# I2C support
798#
799# CONFIG_I2C is not set 786# CONFIG_I2C is not set
800 787
801# 788#
@@ -808,12 +795,7 @@ CONFIG_COBALT_LCD=y
808# Dallas's 1-wire bus 795# Dallas's 1-wire bus
809# 796#
810# CONFIG_W1 is not set 797# CONFIG_W1 is not set
811
812#
813# Hardware Monitoring support
814#
815# CONFIG_HWMON is not set 798# CONFIG_HWMON is not set
816# CONFIG_HWMON_VID is not set
817 799
818# 800#
819# Multifunction device drivers 801# Multifunction device drivers
@@ -824,16 +806,19 @@ CONFIG_COBALT_LCD=y
824# Multimedia devices 806# Multimedia devices
825# 807#
826# CONFIG_VIDEO_DEV is not set 808# CONFIG_VIDEO_DEV is not set
809# CONFIG_DVB_CORE is not set
810# CONFIG_DAB is not set
827 811
828# 812#
829# Digital Video Broadcasting Devices 813# Graphics support
830# 814#
831# CONFIG_DVB is not set 815# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
832 816
833# 817#
834# Graphics support 818# Display device support
835# 819#
836# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 820# CONFIG_DISPLAY_SUPPORT is not set
821# CONFIG_VGASTATE is not set
837# CONFIG_FB is not set 822# CONFIG_FB is not set
838 823
839# 824#
@@ -868,10 +853,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
868# USB Gadget Support 853# USB Gadget Support
869# 854#
870# CONFIG_USB_GADGET is not set 855# CONFIG_USB_GADGET is not set
871
872#
873# MMC/SD Card support
874#
875# CONFIG_MMC is not set 856# CONFIG_MMC is not set
876 857
877# 858#
@@ -912,18 +893,30 @@ CONFIG_RTC_INTF_SYSFS=y
912CONFIG_RTC_INTF_PROC=y 893CONFIG_RTC_INTF_PROC=y
913CONFIG_RTC_INTF_DEV=y 894CONFIG_RTC_INTF_DEV=y
914# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 895# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
896# CONFIG_RTC_DRV_TEST is not set
915 897
916# 898#
917# RTC drivers 899# I2C RTC drivers
900#
901
902#
903# SPI RTC drivers
904#
905
906#
907# Platform RTC drivers
918# 908#
919CONFIG_RTC_DRV_CMOS=y 909CONFIG_RTC_DRV_CMOS=y
920# CONFIG_RTC_DRV_DS1553 is not set 910# CONFIG_RTC_DRV_DS1553 is not set
921# CONFIG_RTC_DRV_DS1742 is not set 911# CONFIG_RTC_DRV_DS1742 is not set
922# CONFIG_RTC_DRV_M48T86 is not set 912# CONFIG_RTC_DRV_M48T86 is not set
923# CONFIG_RTC_DRV_TEST is not set
924# CONFIG_RTC_DRV_V3020 is not set 913# CONFIG_RTC_DRV_V3020 is not set
925 914
926# 915#
916# on-CPU RTC drivers
917#
918
919#
927# DMA Engine support 920# DMA Engine support
928# 921#
929# CONFIG_DMA_ENGINE is not set 922# CONFIG_DMA_ENGINE is not set
@@ -937,14 +930,6 @@ CONFIG_RTC_DRV_CMOS=y
937# 930#
938 931
939# 932#
940# Auxiliary Display support
941#
942
943#
944# Virtualization
945#
946
947#
948# File systems 933# File systems
949# 934#
950CONFIG_EXT2_FS=y 935CONFIG_EXT2_FS=y
@@ -952,8 +937,13 @@ CONFIG_EXT2_FS_XATTR=y
952CONFIG_EXT2_FS_POSIX_ACL=y 937CONFIG_EXT2_FS_POSIX_ACL=y
953CONFIG_EXT2_FS_SECURITY=y 938CONFIG_EXT2_FS_SECURITY=y
954# CONFIG_EXT2_FS_XIP is not set 939# CONFIG_EXT2_FS_XIP is not set
955# CONFIG_EXT3_FS is not set 940CONFIG_EXT3_FS=y
941CONFIG_EXT3_FS_XATTR=y
942CONFIG_EXT3_FS_POSIX_ACL=y
943CONFIG_EXT3_FS_SECURITY=y
956# CONFIG_EXT4DEV_FS is not set 944# CONFIG_EXT4DEV_FS is not set
945CONFIG_JBD=y
946# CONFIG_JBD_DEBUG is not set
957CONFIG_FS_MBCACHE=y 947CONFIG_FS_MBCACHE=y
958# CONFIG_REISERFS_FS is not set 948# CONFIG_REISERFS_FS is not set
959# CONFIG_JFS_FS is not set 949# CONFIG_JFS_FS is not set
@@ -969,7 +959,7 @@ CONFIG_INOTIFY_USER=y
969CONFIG_DNOTIFY=y 959CONFIG_DNOTIFY=y
970# CONFIG_AUTOFS_FS is not set 960# CONFIG_AUTOFS_FS is not set
971# CONFIG_AUTOFS4_FS is not set 961# CONFIG_AUTOFS4_FS is not set
972CONFIG_FUSE_FS=y 962# CONFIG_FUSE_FS is not set
973CONFIG_GENERIC_ACL=y 963CONFIG_GENERIC_ACL=y
974 964
975# 965#
@@ -1003,7 +993,6 @@ CONFIG_CONFIGFS_FS=y
1003# 993#
1004# CONFIG_ADFS_FS is not set 994# CONFIG_ADFS_FS is not set
1005# CONFIG_AFFS_FS is not set 995# CONFIG_AFFS_FS is not set
1006# CONFIG_ECRYPT_FS is not set
1007# CONFIG_HFS_FS is not set 996# CONFIG_HFS_FS is not set
1008# CONFIG_HFSPLUS_FS is not set 997# CONFIG_HFSPLUS_FS is not set
1009# CONFIG_BEFS_FS is not set 998# CONFIG_BEFS_FS is not set
@@ -1021,13 +1010,23 @@ CONFIG_CONFIGFS_FS=y
1021# Network File Systems 1010# Network File Systems
1022# 1011#
1023CONFIG_NFS_FS=y 1012CONFIG_NFS_FS=y
1024# CONFIG_NFS_V3 is not set 1013CONFIG_NFS_V3=y
1014CONFIG_NFS_V3_ACL=y
1025# CONFIG_NFS_V4 is not set 1015# CONFIG_NFS_V4 is not set
1026# CONFIG_NFS_DIRECTIO is not set 1016# CONFIG_NFS_DIRECTIO is not set
1027# CONFIG_NFSD is not set 1017CONFIG_NFSD=y
1018CONFIG_NFSD_V2_ACL=y
1019CONFIG_NFSD_V3=y
1020CONFIG_NFSD_V3_ACL=y
1021# CONFIG_NFSD_V4 is not set
1022CONFIG_NFSD_TCP=y
1028CONFIG_LOCKD=y 1023CONFIG_LOCKD=y
1024CONFIG_LOCKD_V4=y
1025CONFIG_EXPORTFS=y
1026CONFIG_NFS_ACL_SUPPORT=y
1029CONFIG_NFS_COMMON=y 1027CONFIG_NFS_COMMON=y
1030CONFIG_SUNRPC=y 1028CONFIG_SUNRPC=y
1029# CONFIG_SUNRPC_BIND34 is not set
1031# CONFIG_RPCSEC_GSS_KRB5 is not set 1030# CONFIG_RPCSEC_GSS_KRB5 is not set
1032# CONFIG_RPCSEC_GSS_SPKM3 is not set 1031# CONFIG_RPCSEC_GSS_SPKM3 is not set
1033# CONFIG_SMB_FS is not set 1032# CONFIG_SMB_FS is not set
@@ -1051,10 +1050,7 @@ CONFIG_MSDOS_PARTITION=y
1051# 1050#
1052# Distributed Lock Manager 1051# Distributed Lock Manager
1053# 1052#
1054CONFIG_DLM=y 1053# CONFIG_DLM is not set
1055CONFIG_DLM_TCP=y
1056# CONFIG_DLM_SCTP is not set
1057# CONFIG_DLM_DEBUG is not set
1058 1054
1059# 1055#
1060# Profiling support 1056# Profiling support
@@ -1072,72 +1068,30 @@ CONFIG_ENABLE_MUST_CHECK=y
1072# CONFIG_DEBUG_FS is not set 1068# CONFIG_DEBUG_FS is not set
1073# CONFIG_HEADERS_CHECK is not set 1069# CONFIG_HEADERS_CHECK is not set
1074# CONFIG_DEBUG_KERNEL is not set 1070# CONFIG_DEBUG_KERNEL is not set
1075CONFIG_LOG_BUF_SHIFT=14
1076CONFIG_CROSSCOMPILE=y 1071CONFIG_CROSSCOMPILE=y
1077CONFIG_CMDLINE="" 1072CONFIG_CMDLINE=""
1078 1073
1079# 1074#
1080# Security options 1075# Security options
1081# 1076#
1082CONFIG_KEYS=y 1077# CONFIG_KEYS is not set
1083CONFIG_KEYS_DEBUG_PROC_KEYS=y
1084# CONFIG_SECURITY is not set 1078# CONFIG_SECURITY is not set
1085 1079
1086# 1080#
1087# Cryptographic options 1081# Cryptographic options
1088# 1082#
1089CONFIG_CRYPTO=y 1083# CONFIG_CRYPTO is not set
1090CONFIG_CRYPTO_ALGAPI=y
1091CONFIG_CRYPTO_BLKCIPHER=y
1092CONFIG_CRYPTO_HASH=y
1093CONFIG_CRYPTO_MANAGER=y
1094CONFIG_CRYPTO_HMAC=y
1095CONFIG_CRYPTO_XCBC=y
1096CONFIG_CRYPTO_NULL=y
1097CONFIG_CRYPTO_MD4=y
1098CONFIG_CRYPTO_MD5=y
1099CONFIG_CRYPTO_SHA1=y
1100CONFIG_CRYPTO_SHA256=y
1101CONFIG_CRYPTO_SHA512=y
1102CONFIG_CRYPTO_WP512=y
1103CONFIG_CRYPTO_TGR192=y
1104CONFIG_CRYPTO_GF128MUL=y
1105CONFIG_CRYPTO_ECB=y
1106CONFIG_CRYPTO_CBC=y
1107CONFIG_CRYPTO_PCBC=y
1108CONFIG_CRYPTO_LRW=y
1109CONFIG_CRYPTO_DES=y
1110CONFIG_CRYPTO_FCRYPT=y
1111CONFIG_CRYPTO_BLOWFISH=y
1112CONFIG_CRYPTO_TWOFISH=y
1113CONFIG_CRYPTO_TWOFISH_COMMON=y
1114CONFIG_CRYPTO_SERPENT=y
1115CONFIG_CRYPTO_AES=y
1116CONFIG_CRYPTO_CAST5=y
1117CONFIG_CRYPTO_CAST6=y
1118CONFIG_CRYPTO_TEA=y
1119CONFIG_CRYPTO_ARC4=y
1120CONFIG_CRYPTO_KHAZAD=y
1121CONFIG_CRYPTO_ANUBIS=y
1122CONFIG_CRYPTO_DEFLATE=y
1123CONFIG_CRYPTO_MICHAEL_MIC=y
1124CONFIG_CRYPTO_CRC32C=y
1125CONFIG_CRYPTO_CAMELLIA=y
1126
1127#
1128# Hardware crypto devices
1129#
1130 1084
1131# 1085#
1132# Library routines 1086# Library routines
1133# 1087#
1134CONFIG_BITREVERSE=y 1088CONFIG_BITREVERSE=y
1135# CONFIG_CRC_CCITT is not set 1089# CONFIG_CRC_CCITT is not set
1136CONFIG_CRC16=y 1090# CONFIG_CRC16 is not set
1091# CONFIG_CRC_ITU_T is not set
1137CONFIG_CRC32=y 1092CONFIG_CRC32=y
1138CONFIG_LIBCRC32C=y 1093CONFIG_LIBCRC32C=y
1139CONFIG_ZLIB_INFLATE=y
1140CONFIG_ZLIB_DEFLATE=y
1141CONFIG_PLIST=y 1094CONFIG_PLIST=y
1142CONFIG_HAS_IOMEM=y 1095CONFIG_HAS_IOMEM=y
1143CONFIG_HAS_IOPORT=y 1096CONFIG_HAS_IOPORT=y
1097CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/db1000_defconfig b/arch/mips/configs/db1000_defconfig
index 10f6af43753d..ec60beb888b2 100644
--- a/arch/mips/configs/db1000_defconfig
+++ b/arch/mips/configs/db1000_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_DB1000=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_DB1000=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/db1100_defconfig b/arch/mips/configs/db1100_defconfig
index 4b0862927748..f3c25f08bfad 100644
--- a/arch/mips/configs/db1100_defconfig
+++ b/arch/mips/configs/db1100_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_DB1100=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_DB1100=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/db1200_defconfig b/arch/mips/configs/db1200_defconfig
index 820659e810dc..6d400befbacc 100644
--- a/arch/mips/configs/db1200_defconfig
+++ b/arch/mips/configs/db1200_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_DB1200=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_DB1200=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/db1500_defconfig b/arch/mips/configs/db1500_defconfig
index 4050b9b91bcb..82aea6e08823 100644
--- a/arch/mips/configs/db1500_defconfig
+++ b/arch/mips/configs/db1500_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_DB1500=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_DB1500=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/db1550_defconfig b/arch/mips/configs/db1550_defconfig
index 7b3519058ab8..82697714a9e3 100644
--- a/arch/mips/configs/db1550_defconfig
+++ b/arch/mips/configs/db1550_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_DB1550=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_DB1550=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/ddb5477_defconfig b/arch/mips/configs/ddb5477_defconfig
index 5b502a2013fb..a42ab9ae7d4b 100644
--- a/arch/mips/configs/ddb5477_defconfig
+++ b/arch/mips/configs/ddb5477_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/decstation_defconfig b/arch/mips/configs/decstation_defconfig
index 4bbdab078ff1..d6e3fffbc80d 100644
--- a/arch/mips/configs/decstation_defconfig
+++ b/arch/mips/configs/decstation_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27CONFIG_MACH_DECSTATION=y 27CONFIG_MACH_DECSTATION=y
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_MACH_DECSTATION=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/e55_defconfig b/arch/mips/configs/e55_defconfig
index b5714a6a5398..78f5004fb721 100644
--- a/arch/mips/configs/e55_defconfig
+++ b/arch/mips/configs/e55_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/emma2rh_defconfig b/arch/mips/configs/emma2rh_defconfig
index 3044579f171a..b29bff0f56c3 100644
--- a/arch/mips/configs/emma2rh_defconfig
+++ b/arch/mips/configs/emma2rh_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
@@ -951,8 +947,7 @@ CONFIG_LEGACY_PTY_COUNT=256
951# CONFIG_WATCHDOG is not set 947# CONFIG_WATCHDOG is not set
952# CONFIG_HW_RANDOM is not set 948# CONFIG_HW_RANDOM is not set
953CONFIG_RTC=m 949CONFIG_RTC=m
954CONFIG_GEN_RTC=m 950# CONFIG_GEN_RTC is not set
955CONFIG_GEN_RTC_X=y
956# CONFIG_DTLK is not set 951# CONFIG_DTLK is not set
957# CONFIG_R3964 is not set 952# CONFIG_R3964 is not set
958# CONFIG_APPLICOM is not set 953# CONFIG_APPLICOM is not set
diff --git a/arch/mips/configs/ev64120_defconfig b/arch/mips/configs/ev64120_defconfig
deleted file mode 100644
index c10e4e063226..000000000000
--- a/arch/mips/configs/ev64120_defconfig
+++ /dev/null
@@ -1,985 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Tue Feb 20 21:47:30 2007
5#
6CONFIG_MIPS=y
7
8#
9# Machine selection
10#
11CONFIG_ZONE_DMA=y
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set
28CONFIG_MIPS_EV64120=y
29# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set
34# CONFIG_WR_PPMC is not set
35# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set
43# CONFIG_PNX8550_STB810 is not set
44# CONFIG_DDB5477 is not set
45# CONFIG_MACH_VR41XX is not set
46# CONFIG_PMC_YOSEMITE is not set
47# CONFIG_QEMU is not set
48# CONFIG_MARKEINS is not set
49# CONFIG_SGI_IP22 is not set
50# CONFIG_SGI_IP27 is not set
51# CONFIG_SGI_IP32 is not set
52# CONFIG_SIBYTE_BIGSUR is not set
53# CONFIG_SIBYTE_SWARM is not set
54# CONFIG_SIBYTE_SENTOSA is not set
55# CONFIG_SIBYTE_RHONE is not set
56# CONFIG_SIBYTE_CARMEL is not set
57# CONFIG_SIBYTE_PTSWARM is not set
58# CONFIG_SIBYTE_LITTLESUR is not set
59# CONFIG_SIBYTE_CRHINE is not set
60# CONFIG_SIBYTE_CRHONE is not set
61# CONFIG_SNI_RM is not set
62# CONFIG_TOSHIBA_JMR3927 is not set
63# CONFIG_TOSHIBA_RBTX4927 is not set
64# CONFIG_TOSHIBA_RBTX4938 is not set
65# CONFIG_EVB_PCI1 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
69CONFIG_GENERIC_FIND_NEXT_BIT=y
70CONFIG_GENERIC_HWEIGHT=y
71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
75CONFIG_DMA_NONCOHERENT=y
76CONFIG_DMA_NEED_PCI_MAP_STATE=y
77CONFIG_CPU_BIG_ENDIAN=y
78# CONFIG_CPU_LITTLE_ENDIAN is not set
79CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
80CONFIG_MIPS_GT64120=y
81# CONFIG_SYSCLK_75 is not set
82# CONFIG_SYSCLK_83 is not set
83CONFIG_SYSCLK_100=y
84CONFIG_MIPS_L1_CACHE_SHIFT=5
85
86#
87# CPU selection
88#
89# CONFIG_CPU_MIPS32_R1 is not set
90# CONFIG_CPU_MIPS32_R2 is not set
91# CONFIG_CPU_MIPS64_R1 is not set
92# CONFIG_CPU_MIPS64_R2 is not set
93# CONFIG_CPU_R3000 is not set
94# CONFIG_CPU_TX39XX is not set
95# CONFIG_CPU_VR41XX is not set
96# CONFIG_CPU_R4300 is not set
97# CONFIG_CPU_R4X00 is not set
98# CONFIG_CPU_TX49XX is not set
99CONFIG_CPU_R5000=y
100# CONFIG_CPU_R5432 is not set
101# CONFIG_CPU_R6000 is not set
102# CONFIG_CPU_NEVADA is not set
103# CONFIG_CPU_R8000 is not set
104# CONFIG_CPU_R10000 is not set
105# CONFIG_CPU_RM7000 is not set
106# CONFIG_CPU_RM9000 is not set
107# CONFIG_CPU_SB1 is not set
108CONFIG_SYS_HAS_CPU_R5000=y
109CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
110CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
111CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
112CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
113
114#
115# Kernel type
116#
117CONFIG_32BIT=y
118# CONFIG_64BIT is not set
119CONFIG_PAGE_SIZE_4KB=y
120# CONFIG_PAGE_SIZE_8KB is not set
121# CONFIG_PAGE_SIZE_16KB is not set
122# CONFIG_PAGE_SIZE_64KB is not set
123CONFIG_MIPS_MT_DISABLED=y
124# CONFIG_MIPS_MT_SMP is not set
125# CONFIG_MIPS_MT_SMTC is not set
126# CONFIG_MIPS_VPE_LOADER is not set
127# CONFIG_64BIT_PHYS_ADDR is not set
128CONFIG_CPU_HAS_LLSC=y
129CONFIG_CPU_HAS_SYNC=y
130CONFIG_GENERIC_HARDIRQS=y
131CONFIG_GENERIC_IRQ_PROBE=y
132CONFIG_ARCH_FLATMEM_ENABLE=y
133CONFIG_SELECT_MEMORY_MODEL=y
134CONFIG_FLATMEM_MANUAL=y
135# CONFIG_DISCONTIGMEM_MANUAL is not set
136# CONFIG_SPARSEMEM_MANUAL is not set
137CONFIG_FLATMEM=y
138CONFIG_FLAT_NODE_MEM_MAP=y
139# CONFIG_SPARSEMEM_STATIC is not set
140CONFIG_SPLIT_PTLOCK_CPUS=4
141# CONFIG_RESOURCES_64BIT is not set
142CONFIG_ZONE_DMA_FLAG=1
143# CONFIG_HZ_48 is not set
144# CONFIG_HZ_100 is not set
145# CONFIG_HZ_128 is not set
146# CONFIG_HZ_250 is not set
147# CONFIG_HZ_256 is not set
148CONFIG_HZ_1000=y
149# CONFIG_HZ_1024 is not set
150CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
151CONFIG_HZ=1000
152CONFIG_PREEMPT_NONE=y
153# CONFIG_PREEMPT_VOLUNTARY is not set
154# CONFIG_PREEMPT is not set
155# CONFIG_KEXEC is not set
156CONFIG_LOCKDEP_SUPPORT=y
157CONFIG_STACKTRACE_SUPPORT=y
158CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
159
160#
161# Code maturity level options
162#
163CONFIG_EXPERIMENTAL=y
164CONFIG_BROKEN_ON_SMP=y
165CONFIG_INIT_ENV_ARG_LIMIT=32
166
167#
168# General setup
169#
170CONFIG_LOCALVERSION=""
171CONFIG_LOCALVERSION_AUTO=y
172CONFIG_SWAP=y
173CONFIG_SYSVIPC=y
174# CONFIG_IPC_NS is not set
175CONFIG_SYSVIPC_SYSCTL=y
176# CONFIG_POSIX_MQUEUE is not set
177# CONFIG_BSD_PROCESS_ACCT is not set
178# CONFIG_TASKSTATS is not set
179# CONFIG_UTS_NS is not set
180# CONFIG_AUDIT is not set
181# CONFIG_IKCONFIG is not set
182CONFIG_SYSFS_DEPRECATED=y
183CONFIG_RELAY=y
184# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
185CONFIG_SYSCTL=y
186CONFIG_EMBEDDED=y
187CONFIG_SYSCTL_SYSCALL=y
188CONFIG_KALLSYMS=y
189# CONFIG_KALLSYMS_EXTRA_PASS is not set
190CONFIG_HOTPLUG=y
191CONFIG_PRINTK=y
192CONFIG_BUG=y
193CONFIG_ELF_CORE=y
194CONFIG_BASE_FULL=y
195CONFIG_FUTEX=y
196CONFIG_EPOLL=y
197CONFIG_SHMEM=y
198CONFIG_SLAB=y
199CONFIG_VM_EVENT_COUNTERS=y
200CONFIG_RT_MUTEXES=y
201# CONFIG_TINY_SHMEM is not set
202CONFIG_BASE_SMALL=0
203# CONFIG_SLOB is not set
204
205#
206# Loadable module support
207#
208CONFIG_MODULES=y
209CONFIG_MODULE_UNLOAD=y
210# CONFIG_MODULE_FORCE_UNLOAD is not set
211CONFIG_MODVERSIONS=y
212CONFIG_MODULE_SRCVERSION_ALL=y
213# CONFIG_KMOD is not set
214
215#
216# Block layer
217#
218CONFIG_BLOCK=y
219# CONFIG_LBD is not set
220# CONFIG_BLK_DEV_IO_TRACE is not set
221# CONFIG_LSF is not set
222
223#
224# IO Schedulers
225#
226CONFIG_IOSCHED_NOOP=y
227CONFIG_IOSCHED_AS=y
228CONFIG_IOSCHED_DEADLINE=y
229CONFIG_IOSCHED_CFQ=y
230CONFIG_DEFAULT_AS=y
231# CONFIG_DEFAULT_DEADLINE is not set
232# CONFIG_DEFAULT_CFQ is not set
233# CONFIG_DEFAULT_NOOP is not set
234CONFIG_DEFAULT_IOSCHED="anticipatory"
235
236#
237# Bus options (PCI, PCMCIA, EISA, ISA, TC)
238#
239CONFIG_HW_HAS_PCI=y
240CONFIG_PCI=y
241CONFIG_MMU=y
242
243#
244# PCCARD (PCMCIA/CardBus) support
245#
246# CONFIG_PCCARD is not set
247
248#
249# PCI Hotplug Support
250#
251# CONFIG_HOTPLUG_PCI is not set
252
253#
254# Executable file formats
255#
256CONFIG_BINFMT_ELF=y
257# CONFIG_BINFMT_MISC is not set
258CONFIG_TRAD_SIGNALS=y
259
260#
261# Power management options
262#
263CONFIG_PM=y
264# CONFIG_PM_LEGACY is not set
265# CONFIG_PM_DEBUG is not set
266# CONFIG_PM_SYSFS_DEPRECATED is not set
267
268#
269# Networking
270#
271CONFIG_NET=y
272
273#
274# Networking options
275#
276# CONFIG_NETDEBUG is not set
277# CONFIG_PACKET is not set
278CONFIG_UNIX=y
279CONFIG_XFRM=y
280CONFIG_XFRM_USER=m
281# CONFIG_XFRM_SUB_POLICY is not set
282CONFIG_XFRM_MIGRATE=y
283CONFIG_NET_KEY=y
284CONFIG_NET_KEY_MIGRATE=y
285CONFIG_INET=y
286# CONFIG_IP_MULTICAST is not set
287# CONFIG_IP_ADVANCED_ROUTER is not set
288CONFIG_IP_FIB_HASH=y
289CONFIG_IP_PNP=y
290# CONFIG_IP_PNP_DHCP is not set
291# CONFIG_IP_PNP_BOOTP is not set
292# CONFIG_IP_PNP_RARP is not set
293# CONFIG_NET_IPIP is not set
294# CONFIG_NET_IPGRE is not set
295# CONFIG_ARPD is not set
296# CONFIG_SYN_COOKIES is not set
297# CONFIG_INET_AH is not set
298# CONFIG_INET_ESP is not set
299# CONFIG_INET_IPCOMP is not set
300# CONFIG_INET_XFRM_TUNNEL is not set
301# CONFIG_INET_TUNNEL is not set
302CONFIG_INET_XFRM_MODE_TRANSPORT=m
303CONFIG_INET_XFRM_MODE_TUNNEL=m
304CONFIG_INET_XFRM_MODE_BEET=m
305CONFIG_INET_DIAG=y
306CONFIG_INET_TCP_DIAG=y
307# CONFIG_TCP_CONG_ADVANCED is not set
308CONFIG_TCP_CONG_CUBIC=y
309CONFIG_DEFAULT_TCP_CONG="cubic"
310CONFIG_TCP_MD5SIG=y
311# CONFIG_IPV6 is not set
312# CONFIG_INET6_XFRM_TUNNEL is not set
313# CONFIG_INET6_TUNNEL is not set
314CONFIG_NETWORK_SECMARK=y
315# CONFIG_NETFILTER is not set
316
317#
318# DCCP Configuration (EXPERIMENTAL)
319#
320# CONFIG_IP_DCCP is not set
321
322#
323# SCTP Configuration (EXPERIMENTAL)
324#
325# CONFIG_IP_SCTP is not set
326
327#
328# TIPC Configuration (EXPERIMENTAL)
329#
330# CONFIG_TIPC is not set
331# CONFIG_ATM is not set
332# CONFIG_BRIDGE is not set
333# CONFIG_VLAN_8021Q is not set
334# CONFIG_DECNET is not set
335# CONFIG_LLC2 is not set
336# CONFIG_IPX is not set
337# CONFIG_ATALK is not set
338# CONFIG_X25 is not set
339# CONFIG_LAPB is not set
340# CONFIG_ECONET is not set
341# CONFIG_WAN_ROUTER is not set
342
343#
344# QoS and/or fair queueing
345#
346# CONFIG_NET_SCHED is not set
347
348#
349# Network testing
350#
351# CONFIG_NET_PKTGEN is not set
352# CONFIG_HAMRADIO is not set
353# CONFIG_IRDA is not set
354# CONFIG_BT is not set
355CONFIG_IEEE80211=m
356# CONFIG_IEEE80211_DEBUG is not set
357CONFIG_IEEE80211_CRYPT_WEP=m
358CONFIG_IEEE80211_CRYPT_CCMP=m
359CONFIG_IEEE80211_SOFTMAC=m
360# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
361CONFIG_WIRELESS_EXT=y
362
363#
364# Device Drivers
365#
366
367#
368# Generic Driver Options
369#
370CONFIG_STANDALONE=y
371CONFIG_PREVENT_FIRMWARE_BUILD=y
372CONFIG_FW_LOADER=m
373# CONFIG_SYS_HYPERVISOR is not set
374
375#
376# Connector - unified userspace <-> kernelspace linker
377#
378CONFIG_CONNECTOR=m
379
380#
381# Memory Technology Devices (MTD)
382#
383# CONFIG_MTD is not set
384
385#
386# Parallel port support
387#
388# CONFIG_PARPORT is not set
389
390#
391# Plug and Play support
392#
393# CONFIG_PNPACPI is not set
394
395#
396# Block devices
397#
398# CONFIG_BLK_CPQ_DA is not set
399# CONFIG_BLK_CPQ_CISS_DA is not set
400# CONFIG_BLK_DEV_DAC960 is not set
401# CONFIG_BLK_DEV_UMEM is not set
402# CONFIG_BLK_DEV_COW_COMMON is not set
403# CONFIG_BLK_DEV_LOOP is not set
404# CONFIG_BLK_DEV_NBD is not set
405# CONFIG_BLK_DEV_SX8 is not set
406# CONFIG_BLK_DEV_RAM is not set
407# CONFIG_BLK_DEV_INITRD is not set
408CONFIG_CDROM_PKTCDVD=m
409CONFIG_CDROM_PKTCDVD_BUFFERS=8
410# CONFIG_CDROM_PKTCDVD_WCACHE is not set
411CONFIG_ATA_OVER_ETH=m
412
413#
414# Misc devices
415#
416CONFIG_SGI_IOC4=m
417# CONFIG_TIFM_CORE is not set
418
419#
420# ATA/ATAPI/MFM/RLL support
421#
422# CONFIG_IDE is not set
423
424#
425# SCSI device support
426#
427CONFIG_RAID_ATTRS=m
428# CONFIG_SCSI is not set
429# CONFIG_SCSI_NETLINK is not set
430
431#
432# Serial ATA (prod) and Parallel ATA (experimental) drivers
433#
434# CONFIG_ATA is not set
435
436#
437# Multi-device support (RAID and LVM)
438#
439# CONFIG_MD is not set
440
441#
442# Fusion MPT device support
443#
444# CONFIG_FUSION is not set
445
446#
447# IEEE 1394 (FireWire) support
448#
449# CONFIG_IEEE1394 is not set
450
451#
452# I2O device support
453#
454# CONFIG_I2O is not set
455
456#
457# Network device support
458#
459CONFIG_NETDEVICES=y
460# CONFIG_DUMMY is not set
461# CONFIG_BONDING is not set
462# CONFIG_EQUALIZER is not set
463# CONFIG_TUN is not set
464
465#
466# ARCnet devices
467#
468# CONFIG_ARCNET is not set
469
470#
471# PHY device support
472#
473CONFIG_PHYLIB=m
474
475#
476# MII PHY device drivers
477#
478CONFIG_MARVELL_PHY=m
479CONFIG_DAVICOM_PHY=m
480CONFIG_QSEMI_PHY=m
481CONFIG_LXT_PHY=m
482CONFIG_CICADA_PHY=m
483CONFIG_VITESSE_PHY=m
484CONFIG_SMSC_PHY=m
485# CONFIG_BROADCOM_PHY is not set
486# CONFIG_FIXED_PHY is not set
487
488#
489# Ethernet (10 or 100Mbit)
490#
491CONFIG_NET_ETHERNET=y
492# CONFIG_MII is not set
493# CONFIG_HAPPYMEAL is not set
494# CONFIG_SUNGEM is not set
495# CONFIG_CASSINI is not set
496# CONFIG_NET_VENDOR_3COM is not set
497# CONFIG_DM9000 is not set
498
499#
500# Tulip family network device support
501#
502# CONFIG_NET_TULIP is not set
503# CONFIG_HP100 is not set
504# CONFIG_NET_PCI is not set
505
506#
507# Ethernet (1000 Mbit)
508#
509# CONFIG_ACENIC is not set
510# CONFIG_DL2K is not set
511# CONFIG_E1000 is not set
512# CONFIG_NS83820 is not set
513# CONFIG_HAMACHI is not set
514# CONFIG_YELLOWFIN is not set
515# CONFIG_R8169 is not set
516# CONFIG_SIS190 is not set
517# CONFIG_SKGE is not set
518# CONFIG_SKY2 is not set
519# CONFIG_SK98LIN is not set
520# CONFIG_TIGON3 is not set
521# CONFIG_BNX2 is not set
522CONFIG_QLA3XXX=m
523# CONFIG_ATL1 is not set
524
525#
526# Ethernet (10000 Mbit)
527#
528# CONFIG_CHELSIO_T1 is not set
529CONFIG_CHELSIO_T3=m
530# CONFIG_IXGB is not set
531# CONFIG_S2IO is not set
532# CONFIG_MYRI10GE is not set
533CONFIG_NETXEN_NIC=m
534
535#
536# Token Ring devices
537#
538# CONFIG_TR is not set
539
540#
541# Wireless LAN (non-hamradio)
542#
543# CONFIG_NET_RADIO is not set
544
545#
546# Wan interfaces
547#
548# CONFIG_WAN is not set
549# CONFIG_FDDI is not set
550# CONFIG_HIPPI is not set
551CONFIG_PPP=y
552# CONFIG_PPP_MULTILINK is not set
553# CONFIG_PPP_FILTER is not set
554CONFIG_PPP_ASYNC=y
555# CONFIG_PPP_SYNC_TTY is not set
556# CONFIG_PPP_DEFLATE is not set
557# CONFIG_PPP_BSDCOMP is not set
558CONFIG_PPP_MPPE=m
559# CONFIG_PPPOE is not set
560# CONFIG_SLIP is not set
561CONFIG_SLHC=y
562# CONFIG_SHAPER is not set
563# CONFIG_NETCONSOLE is not set
564# CONFIG_NETPOLL is not set
565# CONFIG_NET_POLL_CONTROLLER is not set
566
567#
568# ISDN subsystem
569#
570# CONFIG_ISDN is not set
571
572#
573# Telephony Support
574#
575# CONFIG_PHONE is not set
576
577#
578# Input device support
579#
580CONFIG_INPUT=y
581# CONFIG_INPUT_FF_MEMLESS is not set
582
583#
584# Userland interfaces
585#
586CONFIG_INPUT_MOUSEDEV=y
587CONFIG_INPUT_MOUSEDEV_PSAUX=y
588CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
589CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
590# CONFIG_INPUT_JOYDEV is not set
591# CONFIG_INPUT_TSDEV is not set
592# CONFIG_INPUT_EVDEV is not set
593# CONFIG_INPUT_EVBUG is not set
594
595#
596# Input Device Drivers
597#
598# CONFIG_INPUT_KEYBOARD is not set
599# CONFIG_INPUT_MOUSE is not set
600# CONFIG_INPUT_JOYSTICK is not set
601# CONFIG_INPUT_TOUCHSCREEN is not set
602# CONFIG_INPUT_MISC is not set
603
604#
605# Hardware I/O ports
606#
607CONFIG_SERIO=y
608# CONFIG_SERIO_I8042 is not set
609CONFIG_SERIO_SERPORT=y
610# CONFIG_SERIO_PCIPS2 is not set
611# CONFIG_SERIO_LIBPS2 is not set
612CONFIG_SERIO_RAW=m
613# CONFIG_GAMEPORT is not set
614
615#
616# Character devices
617#
618CONFIG_VT=y
619CONFIG_VT_CONSOLE=y
620CONFIG_HW_CONSOLE=y
621CONFIG_VT_HW_CONSOLE_BINDING=y
622# CONFIG_SERIAL_NONSTANDARD is not set
623
624#
625# Serial drivers
626#
627CONFIG_SERIAL_8250=y
628CONFIG_SERIAL_8250_CONSOLE=y
629CONFIG_SERIAL_8250_PCI=y
630CONFIG_SERIAL_8250_NR_UARTS=4
631CONFIG_SERIAL_8250_RUNTIME_UARTS=4
632# CONFIG_SERIAL_8250_EXTENDED is not set
633
634#
635# Non-8250 serial port support
636#
637CONFIG_SERIAL_CORE=y
638CONFIG_SERIAL_CORE_CONSOLE=y
639# CONFIG_SERIAL_JSM is not set
640CONFIG_UNIX98_PTYS=y
641CONFIG_LEGACY_PTYS=y
642CONFIG_LEGACY_PTY_COUNT=256
643
644#
645# IPMI
646#
647# CONFIG_IPMI_HANDLER is not set
648
649#
650# Watchdog Cards
651#
652# CONFIG_WATCHDOG is not set
653# CONFIG_HW_RANDOM is not set
654# CONFIG_RTC is not set
655# CONFIG_GEN_RTC is not set
656# CONFIG_DTLK is not set
657# CONFIG_R3964 is not set
658# CONFIG_APPLICOM is not set
659# CONFIG_DRM is not set
660# CONFIG_RAW_DRIVER is not set
661
662#
663# TPM devices
664#
665# CONFIG_TCG_TPM is not set
666
667#
668# I2C support
669#
670# CONFIG_I2C is not set
671
672#
673# SPI support
674#
675# CONFIG_SPI is not set
676# CONFIG_SPI_MASTER is not set
677
678#
679# Dallas's 1-wire bus
680#
681# CONFIG_W1 is not set
682
683#
684# Hardware Monitoring support
685#
686# CONFIG_HWMON is not set
687# CONFIG_HWMON_VID is not set
688
689#
690# Multimedia devices
691#
692# CONFIG_VIDEO_DEV is not set
693
694#
695# Digital Video Broadcasting Devices
696#
697# CONFIG_DVB is not set
698
699#
700# Graphics support
701#
702# CONFIG_FIRMWARE_EDID is not set
703# CONFIG_FB is not set
704
705#
706# Console display driver support
707#
708# CONFIG_VGA_CONSOLE is not set
709CONFIG_DUMMY_CONSOLE=y
710# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
711
712#
713# Sound
714#
715# CONFIG_SOUND is not set
716
717#
718# HID Devices
719#
720# CONFIG_HID is not set
721
722#
723# USB support
724#
725CONFIG_USB_ARCH_HAS_HCD=y
726CONFIG_USB_ARCH_HAS_OHCI=y
727CONFIG_USB_ARCH_HAS_EHCI=y
728# CONFIG_USB is not set
729
730#
731# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
732#
733
734#
735# USB Gadget Support
736#
737# CONFIG_USB_GADGET is not set
738
739#
740# MMC/SD Card support
741#
742# CONFIG_MMC is not set
743
744#
745# LED devices
746#
747# CONFIG_NEW_LEDS is not set
748
749#
750# LED drivers
751#
752
753#
754# LED Triggers
755#
756
757#
758# InfiniBand support
759#
760# CONFIG_INFINIBAND is not set
761
762#
763# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
764#
765
766#
767# Real Time Clock
768#
769# CONFIG_RTC_CLASS is not set
770
771#
772# DMA Engine support
773#
774# CONFIG_DMA_ENGINE is not set
775
776#
777# DMA Clients
778#
779
780#
781# DMA Devices
782#
783
784#
785# Auxiliary Display support
786#
787
788#
789# Virtualization
790#
791
792#
793# File systems
794#
795CONFIG_EXT2_FS=y
796# CONFIG_EXT2_FS_XATTR is not set
797# CONFIG_EXT2_FS_XIP is not set
798# CONFIG_EXT3_FS is not set
799# CONFIG_EXT4DEV_FS is not set
800# CONFIG_REISERFS_FS is not set
801# CONFIG_JFS_FS is not set
802# CONFIG_FS_POSIX_ACL is not set
803# CONFIG_XFS_FS is not set
804# CONFIG_GFS2_FS is not set
805# CONFIG_OCFS2_FS is not set
806# CONFIG_MINIX_FS is not set
807# CONFIG_ROMFS_FS is not set
808CONFIG_INOTIFY=y
809CONFIG_INOTIFY_USER=y
810# CONFIG_QUOTA is not set
811CONFIG_DNOTIFY=y
812# CONFIG_AUTOFS_FS is not set
813# CONFIG_AUTOFS4_FS is not set
814CONFIG_FUSE_FS=m
815
816#
817# CD-ROM/DVD Filesystems
818#
819# CONFIG_ISO9660_FS is not set
820# CONFIG_UDF_FS is not set
821
822#
823# DOS/FAT/NT Filesystems
824#
825# CONFIG_MSDOS_FS is not set
826# CONFIG_VFAT_FS is not set
827# CONFIG_NTFS_FS is not set
828
829#
830# Pseudo filesystems
831#
832CONFIG_PROC_FS=y
833CONFIG_PROC_KCORE=y
834CONFIG_PROC_SYSCTL=y
835CONFIG_SYSFS=y
836# CONFIG_TMPFS is not set
837# CONFIG_HUGETLB_PAGE is not set
838CONFIG_RAMFS=y
839CONFIG_CONFIGFS_FS=m
840
841#
842# Miscellaneous filesystems
843#
844# CONFIG_ADFS_FS is not set
845# CONFIG_AFFS_FS is not set
846# CONFIG_ECRYPT_FS is not set
847# CONFIG_HFS_FS is not set
848# CONFIG_HFSPLUS_FS is not set
849# CONFIG_BEFS_FS is not set
850# CONFIG_BFS_FS is not set
851# CONFIG_EFS_FS is not set
852# CONFIG_CRAMFS is not set
853# CONFIG_VXFS_FS is not set
854# CONFIG_HPFS_FS is not set
855# CONFIG_QNX4FS_FS is not set
856# CONFIG_SYSV_FS is not set
857# CONFIG_UFS_FS is not set
858
859#
860# Network File Systems
861#
862CONFIG_NFS_FS=y
863# CONFIG_NFS_V3 is not set
864# CONFIG_NFS_V4 is not set
865# CONFIG_NFS_DIRECTIO is not set
866# CONFIG_NFSD is not set
867CONFIG_ROOT_NFS=y
868CONFIG_LOCKD=y
869CONFIG_NFS_COMMON=y
870CONFIG_SUNRPC=y
871# CONFIG_RPCSEC_GSS_KRB5 is not set
872# CONFIG_RPCSEC_GSS_SPKM3 is not set
873# CONFIG_SMB_FS is not set
874# CONFIG_CIFS is not set
875# CONFIG_NCP_FS is not set
876# CONFIG_CODA_FS is not set
877# CONFIG_AFS_FS is not set
878# CONFIG_9P_FS is not set
879
880#
881# Partition Types
882#
883# CONFIG_PARTITION_ADVANCED is not set
884CONFIG_MSDOS_PARTITION=y
885
886#
887# Native Language Support
888#
889# CONFIG_NLS is not set
890
891#
892# Distributed Lock Manager
893#
894CONFIG_DLM=m
895CONFIG_DLM_TCP=y
896# CONFIG_DLM_SCTP is not set
897# CONFIG_DLM_DEBUG is not set
898
899#
900# Profiling support
901#
902# CONFIG_PROFILING is not set
903
904#
905# Kernel hacking
906#
907CONFIG_TRACE_IRQFLAGS_SUPPORT=y
908# CONFIG_PRINTK_TIME is not set
909CONFIG_ENABLE_MUST_CHECK=y
910# CONFIG_MAGIC_SYSRQ is not set
911# CONFIG_UNUSED_SYMBOLS is not set
912# CONFIG_DEBUG_FS is not set
913# CONFIG_HEADERS_CHECK is not set
914# CONFIG_DEBUG_KERNEL is not set
915CONFIG_LOG_BUF_SHIFT=14
916CONFIG_CROSSCOMPILE=y
917CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs rw nfsroot=192.168.1.1:/mnt/disk2/fs.gal ip=192.168.1.211:192.168.1.1:::gt::"
918CONFIG_SYS_SUPPORTS_KGDB=y
919
920#
921# Security options
922#
923CONFIG_KEYS=y
924CONFIG_KEYS_DEBUG_PROC_KEYS=y
925# CONFIG_SECURITY is not set
926
927#
928# Cryptographic options
929#
930CONFIG_CRYPTO=y
931CONFIG_CRYPTO_ALGAPI=y
932CONFIG_CRYPTO_BLKCIPHER=m
933CONFIG_CRYPTO_HASH=y
934CONFIG_CRYPTO_MANAGER=y
935CONFIG_CRYPTO_HMAC=y
936CONFIG_CRYPTO_XCBC=m
937CONFIG_CRYPTO_NULL=m
938CONFIG_CRYPTO_MD4=m
939CONFIG_CRYPTO_MD5=y
940CONFIG_CRYPTO_SHA1=m
941CONFIG_CRYPTO_SHA256=m
942CONFIG_CRYPTO_SHA512=m
943CONFIG_CRYPTO_WP512=m
944CONFIG_CRYPTO_TGR192=m
945CONFIG_CRYPTO_GF128MUL=m
946CONFIG_CRYPTO_ECB=m
947CONFIG_CRYPTO_CBC=m
948CONFIG_CRYPTO_PCBC=m
949CONFIG_CRYPTO_LRW=m
950CONFIG_CRYPTO_DES=m
951CONFIG_CRYPTO_FCRYPT=m
952CONFIG_CRYPTO_BLOWFISH=m
953CONFIG_CRYPTO_TWOFISH=m
954CONFIG_CRYPTO_TWOFISH_COMMON=m
955CONFIG_CRYPTO_SERPENT=m
956CONFIG_CRYPTO_AES=m
957CONFIG_CRYPTO_CAST5=m
958CONFIG_CRYPTO_CAST6=m
959CONFIG_CRYPTO_TEA=m
960CONFIG_CRYPTO_ARC4=m
961CONFIG_CRYPTO_KHAZAD=m
962CONFIG_CRYPTO_ANUBIS=m
963CONFIG_CRYPTO_DEFLATE=m
964CONFIG_CRYPTO_MICHAEL_MIC=m
965CONFIG_CRYPTO_CRC32C=m
966CONFIG_CRYPTO_CAMELLIA=m
967# CONFIG_CRYPTO_TEST is not set
968
969#
970# Hardware crypto devices
971#
972
973#
974# Library routines
975#
976CONFIG_BITREVERSE=m
977CONFIG_CRC_CCITT=y
978CONFIG_CRC16=m
979CONFIG_CRC32=m
980CONFIG_LIBCRC32C=m
981CONFIG_ZLIB_INFLATE=m
982CONFIG_ZLIB_DEFLATE=m
983CONFIG_PLIST=y
984CONFIG_HAS_IOMEM=y
985CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/excite_defconfig b/arch/mips/configs/excite_defconfig
index 460d7a26a8ba..69810592aa6b 100644
--- a/arch/mips/configs/excite_defconfig
+++ b/arch/mips/configs/excite_defconfig
@@ -26,9 +26,7 @@ CONFIG_BASLER_EXCITE=y
26# CONFIG_BASLER_EXCITE_PROTOTYPE is not set 26# CONFIG_BASLER_EXCITE_PROTOTYPE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_BASLER_EXCITE=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/fulong_defconfig b/arch/mips/configs/fulong_defconfig
new file mode 100644
index 000000000000..6ab94d8cf08b
--- /dev/null
+++ b/arch/mips/configs/fulong_defconfig
@@ -0,0 +1,1765 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc4
4# Mon Jun 11 00:23:51 2007
5#
6CONFIG_MIPS=y
7
8#
9# Machine selection
10#
11CONFIG_LEMOTE_FULONG=y
12# CONFIG_MACH_ALCHEMY is not set
13# CONFIG_BASLER_EXCITE is not set
14# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set
16# CONFIG_MACH_JAZZ is not set
17# CONFIG_MIPS_ATLAS is not set
18# CONFIG_MIPS_MALTA is not set
19# CONFIG_MIPS_SEAD is not set
20# CONFIG_WR_PPMC is not set
21# CONFIG_MIPS_SIM is not set
22# CONFIG_MOMENCO_OCELOT is not set
23# CONFIG_PNX8550_JBS is not set
24# CONFIG_PNX8550_STB810 is not set
25# CONFIG_DDB5477 is not set
26# CONFIG_MACH_VR41XX is not set
27# CONFIG_PMC_YOSEMITE is not set
28# CONFIG_QEMU is not set
29# CONFIG_MARKEINS is not set
30# CONFIG_SGI_IP22 is not set
31# CONFIG_SGI_IP27 is not set
32# CONFIG_SGI_IP32 is not set
33# CONFIG_SIBYTE_BIGSUR is not set
34# CONFIG_SIBYTE_SWARM is not set
35# CONFIG_SIBYTE_SENTOSA is not set
36# CONFIG_SIBYTE_RHONE is not set
37# CONFIG_SIBYTE_CARMEL is not set
38# CONFIG_SIBYTE_PTSWARM is not set
39# CONFIG_SIBYTE_LITTLESUR is not set
40# CONFIG_SIBYTE_CRHINE is not set
41# CONFIG_SIBYTE_CRHONE is not set
42# CONFIG_SNI_RM is not set
43# CONFIG_TOSHIBA_JMR3927 is not set
44# CONFIG_TOSHIBA_RBTX4927 is not set
45# CONFIG_TOSHIBA_RBTX4938 is not set
46CONFIG_RWSEM_GENERIC_SPINLOCK=y
47# CONFIG_ARCH_HAS_ILOG2_U32 is not set
48# CONFIG_ARCH_HAS_ILOG2_U64 is not set
49CONFIG_GENERIC_FIND_NEXT_BIT=y
50CONFIG_GENERIC_HWEIGHT=y
51CONFIG_GENERIC_CALIBRATE_DELAY=y
52CONFIG_GENERIC_TIME=y
53CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
54CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
55CONFIG_DMA_NONCOHERENT=y
56CONFIG_DMA_NEED_PCI_MAP_STATE=y
57CONFIG_EARLY_PRINTK=y
58CONFIG_SYS_HAS_EARLY_PRINTK=y
59CONFIG_I8259=y
60# CONFIG_NO_IOPORT is not set
61# CONFIG_CPU_BIG_ENDIAN is not set
62CONFIG_CPU_LITTLE_ENDIAN=y
63CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
64CONFIG_IRQ_CPU=y
65CONFIG_BOOT_ELF32=y
66CONFIG_MIPS_L1_CACHE_SHIFT=5
67
68#
69# CPU selection
70#
71CONFIG_CPU_LOONGSON2=y
72# CONFIG_CPU_MIPS32_R1 is not set
73# CONFIG_CPU_MIPS32_R2 is not set
74# CONFIG_CPU_MIPS64_R1 is not set
75# CONFIG_CPU_MIPS64_R2 is not set
76# CONFIG_CPU_R3000 is not set
77# CONFIG_CPU_TX39XX is not set
78# CONFIG_CPU_VR41XX is not set
79# CONFIG_CPU_R4300 is not set
80# CONFIG_CPU_R4X00 is not set
81# CONFIG_CPU_TX49XX is not set
82# CONFIG_CPU_R5000 is not set
83# CONFIG_CPU_R5432 is not set
84# CONFIG_CPU_R6000 is not set
85# CONFIG_CPU_NEVADA is not set
86# CONFIG_CPU_R8000 is not set
87# CONFIG_CPU_R10000 is not set
88# CONFIG_CPU_RM7000 is not set
89# CONFIG_CPU_RM9000 is not set
90# CONFIG_CPU_SB1 is not set
91CONFIG_SYS_HAS_CPU_LOONGSON2=y
92CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
93CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
94CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
95CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
96
97#
98# Kernel type
99#
100# CONFIG_32BIT is not set
101CONFIG_64BIT=y
102# CONFIG_PAGE_SIZE_4KB is not set
103# CONFIG_PAGE_SIZE_8KB is not set
104CONFIG_PAGE_SIZE_16KB=y
105# CONFIG_PAGE_SIZE_64KB is not set
106CONFIG_BOARD_SCACHE=y
107CONFIG_MIPS_MT_DISABLED=y
108# CONFIG_MIPS_MT_SMP is not set
109# CONFIG_MIPS_MT_SMTC is not set
110# CONFIG_MIPS_VPE_LOADER is not set
111CONFIG_CPU_HAS_WB=y
112CONFIG_CPU_HAS_SYNC=y
113CONFIG_GENERIC_HARDIRQS=y
114CONFIG_GENERIC_IRQ_PROBE=y
115CONFIG_CPU_SUPPORTS_HIGHMEM=y
116CONFIG_SYS_SUPPORTS_HIGHMEM=y
117CONFIG_ARCH_FLATMEM_ENABLE=y
118CONFIG_ARCH_SPARSEMEM_ENABLE=y
119CONFIG_SELECT_MEMORY_MODEL=y
120CONFIG_FLATMEM_MANUAL=y
121# CONFIG_DISCONTIGMEM_MANUAL is not set
122# CONFIG_SPARSEMEM_MANUAL is not set
123CONFIG_FLATMEM=y
124CONFIG_FLAT_NODE_MEM_MAP=y
125CONFIG_SPARSEMEM_STATIC=y
126CONFIG_SPLIT_PTLOCK_CPUS=4
127CONFIG_RESOURCES_64BIT=y
128CONFIG_ZONE_DMA_FLAG=0
129# CONFIG_HZ_48 is not set
130# CONFIG_HZ_100 is not set
131# CONFIG_HZ_128 is not set
132CONFIG_HZ_250=y
133# CONFIG_HZ_256 is not set
134# CONFIG_HZ_1000 is not set
135# CONFIG_HZ_1024 is not set
136CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
137CONFIG_HZ=250
138# CONFIG_PREEMPT_NONE is not set
139CONFIG_PREEMPT_VOLUNTARY=y
140# CONFIG_PREEMPT is not set
141# CONFIG_KEXEC is not set
142CONFIG_LOCKDEP_SUPPORT=y
143CONFIG_STACKTRACE_SUPPORT=y
144CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
145
146#
147# Code maturity level options
148#
149CONFIG_EXPERIMENTAL=y
150CONFIG_BROKEN_ON_SMP=y
151CONFIG_INIT_ENV_ARG_LIMIT=32
152
153#
154# General setup
155#
156CONFIG_LOCALVERSION="lm32"
157# CONFIG_LOCALVERSION_AUTO is not set
158CONFIG_SWAP=y
159CONFIG_SYSVIPC=y
160# CONFIG_IPC_NS is not set
161CONFIG_SYSVIPC_SYSCTL=y
162CONFIG_POSIX_MQUEUE=y
163CONFIG_BSD_PROCESS_ACCT=y
164# CONFIG_BSD_PROCESS_ACCT_V3 is not set
165# CONFIG_TASKSTATS is not set
166# CONFIG_UTS_NS is not set
167# CONFIG_AUDIT is not set
168CONFIG_IKCONFIG=y
169CONFIG_IKCONFIG_PROC=y
170CONFIG_LOG_BUF_SHIFT=14
171CONFIG_SYSFS_DEPRECATED=y
172# CONFIG_RELAY is not set
173# CONFIG_BLK_DEV_INITRD is not set
174# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
175CONFIG_SYSCTL=y
176CONFIG_EMBEDDED=y
177CONFIG_SYSCTL_SYSCALL=y
178CONFIG_KALLSYMS=y
179# CONFIG_KALLSYMS_EXTRA_PASS is not set
180CONFIG_HOTPLUG=y
181CONFIG_PRINTK=y
182CONFIG_BUG=y
183CONFIG_ELF_CORE=y
184CONFIG_BASE_FULL=y
185CONFIG_FUTEX=y
186CONFIG_ANON_INODES=y
187CONFIG_EPOLL=y
188CONFIG_SIGNALFD=y
189CONFIG_TIMERFD=y
190CONFIG_EVENTFD=y
191CONFIG_SHMEM=y
192CONFIG_VM_EVENT_COUNTERS=y
193CONFIG_SLAB=y
194# CONFIG_SLUB is not set
195# CONFIG_SLOB is not set
196CONFIG_RT_MUTEXES=y
197# CONFIG_TINY_SHMEM is not set
198CONFIG_BASE_SMALL=0
199
200#
201# Loadable module support
202#
203CONFIG_MODULES=y
204CONFIG_MODULE_UNLOAD=y
205CONFIG_MODULE_FORCE_UNLOAD=y
206# CONFIG_MODVERSIONS is not set
207# CONFIG_MODULE_SRCVERSION_ALL is not set
208CONFIG_KMOD=y
209
210#
211# Block layer
212#
213CONFIG_BLOCK=y
214# CONFIG_BLK_DEV_IO_TRACE is not set
215
216#
217# IO Schedulers
218#
219CONFIG_IOSCHED_NOOP=y
220CONFIG_IOSCHED_AS=y
221CONFIG_IOSCHED_DEADLINE=y
222CONFIG_IOSCHED_CFQ=y
223# CONFIG_DEFAULT_AS is not set
224# CONFIG_DEFAULT_DEADLINE is not set
225CONFIG_DEFAULT_CFQ=y
226# CONFIG_DEFAULT_NOOP is not set
227CONFIG_DEFAULT_IOSCHED="cfq"
228
229#
230# Bus options (PCI, PCMCIA, EISA, ISA, TC)
231#
232CONFIG_HW_HAS_PCI=y
233CONFIG_PCI=y
234# CONFIG_ARCH_SUPPORTS_MSI is not set
235CONFIG_ISA=y
236CONFIG_MMU=y
237
238#
239# PCCARD (PCMCIA/CardBus) support
240#
241# CONFIG_PCCARD is not set
242# CONFIG_HOTPLUG_PCI is not set
243
244#
245# Executable file formats
246#
247CONFIG_BINFMT_ELF=y
248CONFIG_BINFMT_MISC=y
249# CONFIG_BUILD_ELF64 is not set
250CONFIG_MIPS32_COMPAT=y
251CONFIG_COMPAT=y
252CONFIG_SYSVIPC_COMPAT=y
253CONFIG_MIPS32_O32=y
254CONFIG_MIPS32_N32=y
255CONFIG_BINFMT_ELF32=y
256
257#
258# Power management options
259#
260CONFIG_PM=y
261# CONFIG_PM_LEGACY is not set
262# CONFIG_PM_DEBUG is not set
263# CONFIG_PM_SYSFS_DEPRECATED is not set
264
265#
266# Networking
267#
268CONFIG_NET=y
269
270#
271# Networking options
272#
273CONFIG_PACKET=y
274CONFIG_PACKET_MMAP=y
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_NET_KEY is not set
281CONFIG_INET=y
282CONFIG_IP_MULTICAST=y
283# CONFIG_IP_ADVANCED_ROUTER is not set
284CONFIG_IP_FIB_HASH=y
285CONFIG_IP_PNP=y
286# CONFIG_IP_PNP_DHCP is not set
287CONFIG_IP_PNP_BOOTP=y
288# CONFIG_IP_PNP_RARP is not set
289CONFIG_NET_IPIP=m
290CONFIG_NET_IPGRE=m
291CONFIG_NET_IPGRE_BROADCAST=y
292# CONFIG_IP_MROUTE is not set
293# CONFIG_ARPD is not set
294# CONFIG_SYN_COOKIES is not set
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
299CONFIG_INET_TUNNEL=m
300# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
301# CONFIG_INET_XFRM_MODE_TUNNEL is not set
302CONFIG_INET_XFRM_MODE_BEET=y
303# CONFIG_INET_DIAG is not set
304# CONFIG_TCP_CONG_ADVANCED is not set
305CONFIG_TCP_CONG_CUBIC=y
306CONFIG_DEFAULT_TCP_CONG="cubic"
307# CONFIG_TCP_MD5SIG is not set
308# CONFIG_IP_VS is not set
309# CONFIG_IPV6 is not set
310# CONFIG_INET6_XFRM_TUNNEL is not set
311# CONFIG_INET6_TUNNEL is not set
312# CONFIG_NETWORK_SECMARK is not set
313CONFIG_NETFILTER=y
314# CONFIG_NETFILTER_DEBUG is not set
315
316#
317# Core Netfilter Configuration
318#
319CONFIG_NETFILTER_NETLINK=m
320CONFIG_NETFILTER_NETLINK_QUEUE=m
321CONFIG_NETFILTER_NETLINK_LOG=m
322# CONFIG_NF_CONNTRACK_ENABLED is not set
323# CONFIG_NF_CONNTRACK is not set
324CONFIG_NETFILTER_XTABLES=m
325CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
326# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
327CONFIG_NETFILTER_XT_TARGET_MARK=m
328CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
329# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
330# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
331CONFIG_NETFILTER_XT_MATCH_COMMENT=m
332CONFIG_NETFILTER_XT_MATCH_DCCP=m
333# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
334CONFIG_NETFILTER_XT_MATCH_ESP=m
335CONFIG_NETFILTER_XT_MATCH_LENGTH=m
336CONFIG_NETFILTER_XT_MATCH_LIMIT=m
337CONFIG_NETFILTER_XT_MATCH_MAC=m
338CONFIG_NETFILTER_XT_MATCH_MARK=m
339# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
340CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
341CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
342CONFIG_NETFILTER_XT_MATCH_QUOTA=m
343CONFIG_NETFILTER_XT_MATCH_REALM=m
344CONFIG_NETFILTER_XT_MATCH_SCTP=m
345CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
346CONFIG_NETFILTER_XT_MATCH_STRING=m
347CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
348# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
349
350#
351# IP: Netfilter Configuration
352#
353CONFIG_IP_NF_QUEUE=m
354CONFIG_IP_NF_IPTABLES=m
355CONFIG_IP_NF_MATCH_IPRANGE=m
356CONFIG_IP_NF_MATCH_TOS=m
357CONFIG_IP_NF_MATCH_RECENT=m
358CONFIG_IP_NF_MATCH_ECN=m
359CONFIG_IP_NF_MATCH_AH=m
360CONFIG_IP_NF_MATCH_TTL=m
361CONFIG_IP_NF_MATCH_OWNER=m
362CONFIG_IP_NF_MATCH_ADDRTYPE=m
363CONFIG_IP_NF_FILTER=m
364CONFIG_IP_NF_TARGET_REJECT=m
365CONFIG_IP_NF_TARGET_LOG=m
366CONFIG_IP_NF_TARGET_ULOG=m
367CONFIG_IP_NF_MANGLE=m
368CONFIG_IP_NF_TARGET_TOS=m
369CONFIG_IP_NF_TARGET_ECN=m
370CONFIG_IP_NF_TARGET_TTL=m
371CONFIG_IP_NF_RAW=m
372CONFIG_IP_NF_ARPTABLES=m
373CONFIG_IP_NF_ARPFILTER=m
374CONFIG_IP_NF_ARP_MANGLE=m
375# CONFIG_IP_DCCP is not set
376# CONFIG_IP_SCTP is not set
377# CONFIG_TIPC is not set
378# CONFIG_ATM is not set
379# CONFIG_BRIDGE is not set
380# CONFIG_VLAN_8021Q is not set
381# CONFIG_DECNET is not set
382# CONFIG_LLC2 is not set
383# CONFIG_IPX is not set
384# CONFIG_ATALK is not set
385# CONFIG_X25 is not set
386# CONFIG_LAPB is not set
387# CONFIG_ECONET is not set
388# CONFIG_WAN_ROUTER is not set
389
390#
391# QoS and/or fair queueing
392#
393# CONFIG_NET_SCHED is not set
394CONFIG_NET_CLS_ROUTE=y
395
396#
397# Network testing
398#
399# CONFIG_NET_PKTGEN is not set
400# CONFIG_HAMRADIO is not set
401# CONFIG_IRDA is not set
402# CONFIG_BT is not set
403# CONFIG_AF_RXRPC is not set
404
405#
406# Wireless
407#
408# CONFIG_CFG80211 is not set
409CONFIG_WIRELESS_EXT=y
410# CONFIG_MAC80211 is not set
411CONFIG_IEEE80211=m
412# CONFIG_IEEE80211_DEBUG is not set
413CONFIG_IEEE80211_CRYPT_WEP=m
414# CONFIG_IEEE80211_CRYPT_CCMP is not set
415# CONFIG_IEEE80211_CRYPT_TKIP is not set
416# CONFIG_IEEE80211_SOFTMAC is not set
417# CONFIG_RFKILL is not set
418
419#
420# Device Drivers
421#
422
423#
424# Generic Driver Options
425#
426CONFIG_STANDALONE=y
427CONFIG_PREVENT_FIRMWARE_BUILD=y
428CONFIG_FW_LOADER=m
429# CONFIG_SYS_HYPERVISOR is not set
430
431#
432# Connector - unified userspace <-> kernelspace linker
433#
434# CONFIG_CONNECTOR is not set
435CONFIG_MTD=m
436# CONFIG_MTD_DEBUG is not set
437# CONFIG_MTD_CONCAT is not set
438# CONFIG_MTD_PARTITIONS is not set
439
440#
441# User Modules And Translation Layers
442#
443CONFIG_MTD_CHAR=m
444CONFIG_MTD_BLKDEVS=m
445CONFIG_MTD_BLOCK=m
446# CONFIG_MTD_BLOCK_RO is not set
447# CONFIG_FTL is not set
448# CONFIG_NFTL is not set
449# CONFIG_INFTL is not set
450# CONFIG_RFD_FTL is not set
451# CONFIG_SSFDC is not set
452
453#
454# RAM/ROM/Flash chip drivers
455#
456CONFIG_MTD_CFI=m
457CONFIG_MTD_JEDECPROBE=m
458CONFIG_MTD_GEN_PROBE=m
459CONFIG_MTD_CFI_ADV_OPTIONS=y
460CONFIG_MTD_CFI_NOSWAP=y
461# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
462# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
463# CONFIG_MTD_CFI_GEOMETRY is not set
464CONFIG_MTD_MAP_BANK_WIDTH_1=y
465CONFIG_MTD_MAP_BANK_WIDTH_2=y
466CONFIG_MTD_MAP_BANK_WIDTH_4=y
467# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
468# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
469# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
470CONFIG_MTD_CFI_I1=y
471CONFIG_MTD_CFI_I2=y
472# CONFIG_MTD_CFI_I4 is not set
473# CONFIG_MTD_CFI_I8 is not set
474# CONFIG_MTD_OTP is not set
475# CONFIG_MTD_CFI_INTELEXT is not set
476CONFIG_MTD_CFI_AMDSTD=m
477CONFIG_MTD_CFI_STAA=m
478CONFIG_MTD_CFI_UTIL=m
479# CONFIG_MTD_RAM is not set
480# CONFIG_MTD_ROM is not set
481# CONFIG_MTD_ABSENT is not set
482
483#
484# Mapping drivers for chip access
485#
486# CONFIG_MTD_COMPLEX_MAPPINGS is not set
487CONFIG_MTD_PHYSMAP=m
488CONFIG_MTD_PHYSMAP_START=0x1fc00000
489CONFIG_MTD_PHYSMAP_LEN=0x80000
490CONFIG_MTD_PHYSMAP_BANKWIDTH=1
491# CONFIG_MTD_PLATRAM is not set
492
493#
494# Self-contained MTD device drivers
495#
496# CONFIG_MTD_PMC551 is not set
497# CONFIG_MTD_SLRAM is not set
498# CONFIG_MTD_PHRAM is not set
499# CONFIG_MTD_MTDRAM is not set
500# CONFIG_MTD_BLOCK2MTD is not set
501
502#
503# Disk-On-Chip Device Drivers
504#
505# CONFIG_MTD_DOC2000 is not set
506# CONFIG_MTD_DOC2001 is not set
507# CONFIG_MTD_DOC2001PLUS is not set
508# CONFIG_MTD_NAND is not set
509# CONFIG_MTD_ONENAND is not set
510
511#
512# UBI - Unsorted block images
513#
514# CONFIG_MTD_UBI is not set
515
516#
517# Parallel port support
518#
519# CONFIG_PARPORT is not set
520
521#
522# Plug and Play support
523#
524# CONFIG_PNP is not set
525# CONFIG_PNPACPI is not set
526
527#
528# Block devices
529#
530# CONFIG_BLK_CPQ_DA is not set
531# CONFIG_BLK_CPQ_CISS_DA is not set
532# CONFIG_BLK_DEV_DAC960 is not set
533# CONFIG_BLK_DEV_UMEM is not set
534# CONFIG_BLK_DEV_COW_COMMON is not set
535CONFIG_BLK_DEV_LOOP=y
536CONFIG_BLK_DEV_CRYPTOLOOP=m
537# CONFIG_BLK_DEV_NBD is not set
538# CONFIG_BLK_DEV_SX8 is not set
539# CONFIG_BLK_DEV_UB is not set
540CONFIG_BLK_DEV_RAM=m
541CONFIG_BLK_DEV_RAM_COUNT=16
542CONFIG_BLK_DEV_RAM_SIZE=4096
543CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
544CONFIG_CDROM_PKTCDVD=m
545CONFIG_CDROM_PKTCDVD_BUFFERS=8
546# CONFIG_CDROM_PKTCDVD_WCACHE is not set
547CONFIG_ATA_OVER_ETH=m
548
549#
550# Misc devices
551#
552# CONFIG_PHANTOM is not set
553# CONFIG_SGI_IOC4 is not set
554# CONFIG_TIFM_CORE is not set
555# CONFIG_BLINK is not set
556CONFIG_IDE=y
557CONFIG_IDE_MAX_HWIFS=4
558CONFIG_BLK_DEV_IDE=y
559
560#
561# Please see Documentation/ide.txt for help/info on IDE drives
562#
563# CONFIG_BLK_DEV_IDE_SATA is not set
564CONFIG_BLK_DEV_IDEDISK=y
565CONFIG_IDEDISK_MULTI_MODE=y
566CONFIG_BLK_DEV_IDECD=y
567# CONFIG_BLK_DEV_IDETAPE is not set
568# CONFIG_BLK_DEV_IDEFLOPPY is not set
569CONFIG_BLK_DEV_IDESCSI=y
570CONFIG_IDE_TASK_IOCTL=y
571CONFIG_IDE_PROC_FS=y
572
573#
574# IDE chipset support/bugfixes
575#
576CONFIG_IDE_GENERIC=y
577CONFIG_BLK_DEV_IDEPCI=y
578CONFIG_IDEPCI_SHARE_IRQ=y
579CONFIG_IDEPCI_PCIBUS_ORDER=y
580# CONFIG_BLK_DEV_OFFBOARD is not set
581CONFIG_BLK_DEV_GENERIC=y
582# CONFIG_BLK_DEV_OPTI621 is not set
583CONFIG_BLK_DEV_IDEDMA_PCI=y
584# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
585# CONFIG_IDEDMA_ONLYDISK is not set
586# CONFIG_BLK_DEV_AEC62XX is not set
587# CONFIG_BLK_DEV_ALI15X3 is not set
588# CONFIG_BLK_DEV_AMD74XX is not set
589# CONFIG_BLK_DEV_CMD64X is not set
590# CONFIG_BLK_DEV_TRIFLEX is not set
591# CONFIG_BLK_DEV_CY82C693 is not set
592# CONFIG_BLK_DEV_CS5520 is not set
593# CONFIG_BLK_DEV_CS5530 is not set
594# CONFIG_BLK_DEV_HPT34X is not set
595# CONFIG_BLK_DEV_HPT366 is not set
596# CONFIG_BLK_DEV_JMICRON is not set
597# CONFIG_BLK_DEV_SC1200 is not set
598# CONFIG_BLK_DEV_PIIX is not set
599# CONFIG_BLK_DEV_IT8213 is not set
600# CONFIG_BLK_DEV_IT821X is not set
601# CONFIG_BLK_DEV_NS87415 is not set
602# CONFIG_BLK_DEV_PDC202XX_OLD is not set
603# CONFIG_BLK_DEV_PDC202XX_NEW is not set
604# CONFIG_BLK_DEV_SVWKS is not set
605# CONFIG_BLK_DEV_SIIMAGE is not set
606# CONFIG_BLK_DEV_SLC90E66 is not set
607# CONFIG_BLK_DEV_TRM290 is not set
608CONFIG_BLK_DEV_VIA82CXXX=y
609# CONFIG_BLK_DEV_TC86C001 is not set
610# CONFIG_IDE_ARM is not set
611# CONFIG_IDE_CHIPSETS is not set
612CONFIG_BLK_DEV_IDEDMA=y
613# CONFIG_IDEDMA_IVB is not set
614# CONFIG_BLK_DEV_HD is not set
615
616#
617# SCSI device support
618#
619# CONFIG_RAID_ATTRS is not set
620CONFIG_SCSI=y
621# CONFIG_SCSI_TGT is not set
622# CONFIG_SCSI_NETLINK is not set
623CONFIG_SCSI_PROC_FS=y
624
625#
626# SCSI support type (disk, tape, CD-ROM)
627#
628CONFIG_BLK_DEV_SD=y
629# CONFIG_CHR_DEV_ST is not set
630# CONFIG_CHR_DEV_OSST is not set
631CONFIG_BLK_DEV_SR=y
632CONFIG_BLK_DEV_SR_VENDOR=y
633CONFIG_CHR_DEV_SG=y
634# CONFIG_CHR_DEV_SCH is not set
635
636#
637# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
638#
639# CONFIG_SCSI_MULTI_LUN is not set
640CONFIG_SCSI_CONSTANTS=y
641# CONFIG_SCSI_LOGGING is not set
642# CONFIG_SCSI_SCAN_ASYNC is not set
643CONFIG_SCSI_WAIT_SCAN=m
644
645#
646# SCSI Transports
647#
648# CONFIG_SCSI_SPI_ATTRS is not set
649# CONFIG_SCSI_FC_ATTRS is not set
650# CONFIG_SCSI_ISCSI_ATTRS is not set
651# CONFIG_SCSI_SAS_ATTRS is not set
652# CONFIG_SCSI_SAS_LIBSAS is not set
653
654#
655# SCSI low-level drivers
656#
657# CONFIG_ISCSI_TCP is not set
658# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
659# CONFIG_SCSI_3W_9XXX is not set
660# CONFIG_SCSI_ACARD is not set
661# CONFIG_SCSI_AACRAID is not set
662# CONFIG_SCSI_AIC7XXX is not set
663# CONFIG_SCSI_AIC7XXX_OLD is not set
664# CONFIG_SCSI_AIC79XX is not set
665# CONFIG_SCSI_AIC94XX is not set
666# CONFIG_SCSI_IN2000 is not set
667# CONFIG_SCSI_ARCMSR is not set
668# CONFIG_MEGARAID_NEWGEN is not set
669# CONFIG_MEGARAID_LEGACY is not set
670# CONFIG_MEGARAID_SAS is not set
671# CONFIG_SCSI_HPTIOP is not set
672# CONFIG_SCSI_DMX3191D is not set
673# CONFIG_SCSI_DTC3280 is not set
674# CONFIG_SCSI_FUTURE_DOMAIN is not set
675# CONFIG_SCSI_GENERIC_NCR5380 is not set
676# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
677# CONFIG_SCSI_IPS is not set
678# CONFIG_SCSI_INITIO is not set
679# CONFIG_SCSI_INIA100 is not set
680# CONFIG_SCSI_NCR53C406A is not set
681# CONFIG_SCSI_STEX is not set
682# CONFIG_SCSI_SYM53C8XX_2 is not set
683# CONFIG_SCSI_PAS16 is not set
684# CONFIG_SCSI_PSI240I is not set
685# CONFIG_SCSI_QLOGIC_FAS is not set
686# CONFIG_SCSI_QLOGIC_1280 is not set
687# CONFIG_SCSI_QLA_FC is not set
688# CONFIG_SCSI_QLA_ISCSI is not set
689# CONFIG_SCSI_LPFC is not set
690# CONFIG_SCSI_SYM53C416 is not set
691# CONFIG_SCSI_DC395x is not set
692# CONFIG_SCSI_DC390T is not set
693# CONFIG_SCSI_T128 is not set
694# CONFIG_SCSI_DEBUG is not set
695# CONFIG_SCSI_SRP is not set
696# CONFIG_ATA is not set
697
698#
699# Old CD-ROM drivers (not SCSI, not IDE)
700#
701# CONFIG_CD_NO_IDESCSI is not set
702
703#
704# Multi-device support (RAID and LVM)
705#
706# CONFIG_MD is not set
707
708#
709# Fusion MPT device support
710#
711# CONFIG_FUSION is not set
712# CONFIG_FUSION_SPI is not set
713# CONFIG_FUSION_FC is not set
714# CONFIG_FUSION_SAS is not set
715
716#
717# IEEE 1394 (FireWire) support
718#
719# CONFIG_FIREWIRE is not set
720# CONFIG_IEEE1394 is not set
721
722#
723# I2O device support
724#
725# CONFIG_I2O is not set
726
727#
728# Network device support
729#
730CONFIG_NETDEVICES=y
731# CONFIG_DUMMY is not set
732# CONFIG_BONDING is not set
733# CONFIG_EQUALIZER is not set
734# CONFIG_TUN is not set
735# CONFIG_ARCNET is not set
736CONFIG_PHYLIB=m
737
738#
739# MII PHY device drivers
740#
741CONFIG_MARVELL_PHY=m
742CONFIG_DAVICOM_PHY=m
743CONFIG_QSEMI_PHY=m
744CONFIG_LXT_PHY=m
745CONFIG_CICADA_PHY=m
746# CONFIG_VITESSE_PHY is not set
747# CONFIG_SMSC_PHY is not set
748# CONFIG_BROADCOM_PHY is not set
749# CONFIG_FIXED_PHY is not set
750
751#
752# Ethernet (10 or 100Mbit)
753#
754CONFIG_NET_ETHERNET=y
755CONFIG_MII=y
756# CONFIG_HAPPYMEAL is not set
757# CONFIG_SUNGEM is not set
758# CONFIG_CASSINI is not set
759# CONFIG_NET_VENDOR_3COM is not set
760# CONFIG_NET_VENDOR_SMC is not set
761# CONFIG_DM9000 is not set
762# CONFIG_NET_VENDOR_RACAL is not set
763
764#
765# Tulip family network device support
766#
767# CONFIG_NET_TULIP is not set
768# CONFIG_AT1700 is not set
769# CONFIG_DEPCA is not set
770# CONFIG_HP100 is not set
771# CONFIG_NET_ISA is not set
772CONFIG_NET_PCI=y
773# CONFIG_PCNET32 is not set
774# CONFIG_AMD8111_ETH is not set
775# CONFIG_ADAPTEC_STARFIRE is not set
776# CONFIG_AC3200 is not set
777# CONFIG_APRICOT is not set
778# CONFIG_B44 is not set
779# CONFIG_FORCEDETH is not set
780# CONFIG_CS89x0 is not set
781# CONFIG_TC35815 is not set
782# CONFIG_DGRS is not set
783# CONFIG_EEPRO100 is not set
784# CONFIG_E100 is not set
785# CONFIG_FEALNX is not set
786# CONFIG_NATSEMI is not set
787# CONFIG_NE2K_PCI is not set
788# CONFIG_8139CP is not set
789CONFIG_8139TOO=y
790# CONFIG_8139TOO_PIO is not set
791# CONFIG_8139TOO_TUNE_TWISTER is not set
792# CONFIG_8139TOO_8129 is not set
793# CONFIG_8139_OLD_RX_RESET is not set
794# CONFIG_SIS900 is not set
795# CONFIG_EPIC100 is not set
796# CONFIG_SUNDANCE is not set
797# CONFIG_VIA_RHINE is not set
798# CONFIG_SC92031 is not set
799CONFIG_NETDEV_1000=y
800# CONFIG_ACENIC is not set
801# CONFIG_DL2K is not set
802# CONFIG_E1000 is not set
803# CONFIG_NS83820 is not set
804# CONFIG_HAMACHI is not set
805# CONFIG_YELLOWFIN is not set
806# CONFIG_R8169 is not set
807# CONFIG_SIS190 is not set
808# CONFIG_SKGE is not set
809# CONFIG_SKY2 is not set
810# CONFIG_SK98LIN is not set
811# CONFIG_VIA_VELOCITY is not set
812# CONFIG_TIGON3 is not set
813# CONFIG_BNX2 is not set
814# CONFIG_QLA3XXX is not set
815# CONFIG_ATL1 is not set
816CONFIG_NETDEV_10000=y
817# CONFIG_CHELSIO_T1 is not set
818# CONFIG_CHELSIO_T3 is not set
819# CONFIG_IXGB is not set
820# CONFIG_S2IO is not set
821# CONFIG_MYRI10GE is not set
822# CONFIG_NETXEN_NIC is not set
823# CONFIG_MLX4_CORE is not set
824# CONFIG_TR is not set
825
826#
827# Wireless LAN
828#
829# CONFIG_WLAN_PRE80211 is not set
830# CONFIG_WLAN_80211 is not set
831
832#
833# USB Network Adapters
834#
835# CONFIG_USB_CATC is not set
836# CONFIG_USB_KAWETH is not set
837# CONFIG_USB_PEGASUS is not set
838# CONFIG_USB_RTL8150 is not set
839# CONFIG_USB_USBNET_MII is not set
840# CONFIG_USB_USBNET is not set
841# CONFIG_WAN is not set
842# CONFIG_FDDI is not set
843# CONFIG_HIPPI is not set
844CONFIG_PPP=m
845CONFIG_PPP_MULTILINK=y
846CONFIG_PPP_FILTER=y
847CONFIG_PPP_ASYNC=m
848CONFIG_PPP_SYNC_TTY=m
849CONFIG_PPP_DEFLATE=m
850CONFIG_PPP_BSDCOMP=m
851CONFIG_PPP_MPPE=m
852CONFIG_PPPOE=m
853CONFIG_SLIP=m
854CONFIG_SLIP_COMPRESSED=y
855CONFIG_SLHC=m
856CONFIG_SLIP_SMART=y
857CONFIG_SLIP_MODE_SLIP6=y
858CONFIG_NET_FC=y
859# CONFIG_SHAPER is not set
860# CONFIG_NETCONSOLE is not set
861# CONFIG_NETPOLL is not set
862# CONFIG_NET_POLL_CONTROLLER is not set
863
864#
865# ISDN subsystem
866#
867# CONFIG_ISDN is not set
868
869#
870# Telephony Support
871#
872# CONFIG_PHONE is not set
873
874#
875# Input device support
876#
877CONFIG_INPUT=y
878CONFIG_INPUT_FF_MEMLESS=y
879
880#
881# Userland interfaces
882#
883CONFIG_INPUT_MOUSEDEV=y
884CONFIG_INPUT_MOUSEDEV_PSAUX=y
885CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
886CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
887# CONFIG_INPUT_JOYDEV is not set
888# CONFIG_INPUT_TSDEV is not set
889# CONFIG_INPUT_EVDEV is not set
890# CONFIG_INPUT_EVBUG is not set
891
892#
893# Input Device Drivers
894#
895CONFIG_INPUT_KEYBOARD=y
896CONFIG_KEYBOARD_ATKBD=m
897# CONFIG_KEYBOARD_SUNKBD is not set
898# CONFIG_KEYBOARD_LKKBD is not set
899# CONFIG_KEYBOARD_XTKBD is not set
900# CONFIG_KEYBOARD_NEWTON is not set
901# CONFIG_KEYBOARD_STOWAWAY is not set
902CONFIG_INPUT_MOUSE=y
903CONFIG_MOUSE_PS2=y
904CONFIG_MOUSE_PS2_ALPS=y
905CONFIG_MOUSE_PS2_LOGIPS2PP=y
906CONFIG_MOUSE_PS2_SYNAPTICS=y
907CONFIG_MOUSE_PS2_LIFEBOOK=y
908CONFIG_MOUSE_PS2_TRACKPOINT=y
909# CONFIG_MOUSE_PS2_TOUCHKIT is not set
910CONFIG_MOUSE_SERIAL=y
911# CONFIG_MOUSE_APPLETOUCH is not set
912# CONFIG_MOUSE_INPORT is not set
913# CONFIG_MOUSE_LOGIBM is not set
914# CONFIG_MOUSE_PC110PAD is not set
915# CONFIG_MOUSE_VSXXXAA is not set
916# CONFIG_INPUT_JOYSTICK is not set
917# CONFIG_INPUT_TABLET is not set
918# CONFIG_INPUT_TOUCHSCREEN is not set
919# CONFIG_INPUT_MISC is not set
920
921#
922# Hardware I/O ports
923#
924CONFIG_SERIO=y
925CONFIG_SERIO_I8042=y
926CONFIG_SERIO_SERPORT=y
927# CONFIG_SERIO_PCIPS2 is not set
928CONFIG_SERIO_LIBPS2=y
929# CONFIG_SERIO_RAW is not set
930# CONFIG_GAMEPORT is not set
931
932#
933# Character devices
934#
935CONFIG_VT=y
936CONFIG_VT_CONSOLE=y
937CONFIG_HW_CONSOLE=y
938# CONFIG_VT_HW_CONSOLE_BINDING is not set
939# CONFIG_SERIAL_NONSTANDARD is not set
940
941#
942# Serial drivers
943#
944CONFIG_SERIAL_8250=y
945CONFIG_SERIAL_8250_CONSOLE=y
946CONFIG_SERIAL_8250_PCI=y
947CONFIG_SERIAL_8250_NR_UARTS=2
948CONFIG_SERIAL_8250_RUNTIME_UARTS=2
949# CONFIG_SERIAL_8250_EXTENDED is not set
950
951#
952# Non-8250 serial port support
953#
954CONFIG_SERIAL_CORE=y
955CONFIG_SERIAL_CORE_CONSOLE=y
956# CONFIG_SERIAL_JSM is not set
957CONFIG_UNIX98_PTYS=y
958CONFIG_LEGACY_PTYS=y
959CONFIG_LEGACY_PTY_COUNT=256
960
961#
962# IPMI
963#
964# CONFIG_IPMI_HANDLER is not set
965# CONFIG_WATCHDOG is not set
966CONFIG_HW_RANDOM=y
967CONFIG_RTC=y
968# CONFIG_DTLK is not set
969# CONFIG_R3964 is not set
970# CONFIG_APPLICOM is not set
971# CONFIG_DRM is not set
972# CONFIG_RAW_DRIVER is not set
973
974#
975# TPM devices
976#
977# CONFIG_TCG_TPM is not set
978CONFIG_DEVPORT=y
979CONFIG_I2C=m
980CONFIG_I2C_BOARDINFO=y
981CONFIG_I2C_CHARDEV=m
982
983#
984# I2C Algorithms
985#
986# CONFIG_I2C_ALGOBIT is not set
987# CONFIG_I2C_ALGOPCF is not set
988# CONFIG_I2C_ALGOPCA is not set
989
990#
991# I2C Hardware Bus support
992#
993# CONFIG_I2C_ALI1535 is not set
994# CONFIG_I2C_ALI1563 is not set
995# CONFIG_I2C_ALI15X3 is not set
996# CONFIG_I2C_AMD756 is not set
997# CONFIG_I2C_AMD8111 is not set
998# CONFIG_I2C_ELEKTOR is not set
999# CONFIG_I2C_I801 is not set
1000# CONFIG_I2C_I810 is not set
1001# CONFIG_I2C_PIIX4 is not set
1002# CONFIG_I2C_NFORCE2 is not set
1003# CONFIG_I2C_OCORES is not set
1004# CONFIG_I2C_PARPORT_LIGHT is not set
1005# CONFIG_I2C_PROSAVAGE is not set
1006# CONFIG_I2C_SAVAGE4 is not set
1007# CONFIG_I2C_SIMTEC is not set
1008# CONFIG_I2C_SIS5595 is not set
1009# CONFIG_I2C_SIS630 is not set
1010# CONFIG_I2C_SIS96X is not set
1011# CONFIG_I2C_STUB is not set
1012# CONFIG_I2C_TINY_USB is not set
1013# CONFIG_I2C_VIA is not set
1014CONFIG_I2C_VIAPRO=m
1015# CONFIG_I2C_VOODOO3 is not set
1016# CONFIG_I2C_PCA_ISA is not set
1017
1018#
1019# Miscellaneous I2C Chip support
1020#
1021# CONFIG_SENSORS_DS1337 is not set
1022# CONFIG_SENSORS_DS1374 is not set
1023# CONFIG_SENSORS_EEPROM is not set
1024# CONFIG_SENSORS_PCF8574 is not set
1025# CONFIG_SENSORS_PCA9539 is not set
1026# CONFIG_SENSORS_PCF8591 is not set
1027# CONFIG_SENSORS_MAX6875 is not set
1028# CONFIG_I2C_DEBUG_CORE is not set
1029# CONFIG_I2C_DEBUG_ALGO is not set
1030# CONFIG_I2C_DEBUG_BUS is not set
1031# CONFIG_I2C_DEBUG_CHIP is not set
1032
1033#
1034# SPI support
1035#
1036# CONFIG_SPI is not set
1037# CONFIG_SPI_MASTER is not set
1038
1039#
1040# Dallas's 1-wire bus
1041#
1042# CONFIG_W1 is not set
1043# CONFIG_HWMON is not set
1044
1045#
1046# Multifunction device drivers
1047#
1048# CONFIG_MFD_SM501 is not set
1049
1050#
1051# Multimedia devices
1052#
1053CONFIG_VIDEO_DEV=m
1054CONFIG_VIDEO_V4L1=y
1055CONFIG_VIDEO_V4L1_COMPAT=y
1056CONFIG_VIDEO_V4L2=y
1057CONFIG_VIDEO_CAPTURE_DRIVERS=y
1058# CONFIG_VIDEO_ADV_DEBUG is not set
1059CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
1060# CONFIG_VIDEO_VIVI is not set
1061# CONFIG_VIDEO_BT848 is not set
1062# CONFIG_VIDEO_PMS is not set
1063# CONFIG_VIDEO_CPIA is not set
1064# CONFIG_VIDEO_CPIA2 is not set
1065# CONFIG_VIDEO_SAA5246A is not set
1066# CONFIG_VIDEO_SAA5249 is not set
1067# CONFIG_TUNER_3036 is not set
1068# CONFIG_VIDEO_STRADIS is not set
1069# CONFIG_VIDEO_SAA7134 is not set
1070# CONFIG_VIDEO_MXB is not set
1071# CONFIG_VIDEO_DPC is not set
1072# CONFIG_VIDEO_HEXIUM_ORION is not set
1073# CONFIG_VIDEO_HEXIUM_GEMINI is not set
1074# CONFIG_VIDEO_CX88 is not set
1075# CONFIG_VIDEO_IVTV is not set
1076# CONFIG_VIDEO_CAFE_CCIC is not set
1077CONFIG_V4L_USB_DRIVERS=y
1078# CONFIG_VIDEO_PVRUSB2 is not set
1079# CONFIG_VIDEO_EM28XX is not set
1080# CONFIG_VIDEO_USBVISION is not set
1081CONFIG_VIDEO_USBVIDEO=m
1082CONFIG_USB_VICAM=m
1083CONFIG_USB_IBMCAM=m
1084CONFIG_USB_KONICAWC=m
1085CONFIG_USB_QUICKCAM_MESSENGER=m
1086CONFIG_USB_ET61X251=m
1087# CONFIG_VIDEO_OVCAMCHIP is not set
1088# CONFIG_USB_W9968CF is not set
1089CONFIG_USB_OV511=m
1090CONFIG_USB_SE401=m
1091CONFIG_USB_SN9C102=m
1092CONFIG_USB_STV680=m
1093CONFIG_USB_ZC0301=m
1094CONFIG_USB_PWC=m
1095# CONFIG_USB_PWC_DEBUG is not set
1096# CONFIG_USB_ZR364XX is not set
1097CONFIG_RADIO_ADAPTERS=y
1098# CONFIG_RADIO_CADET is not set
1099# CONFIG_RADIO_RTRACK is not set
1100# CONFIG_RADIO_RTRACK2 is not set
1101# CONFIG_RADIO_AZTECH is not set
1102# CONFIG_RADIO_GEMTEK is not set
1103# CONFIG_RADIO_GEMTEK_PCI is not set
1104# CONFIG_RADIO_MAXIRADIO is not set
1105# CONFIG_RADIO_MAESTRO is not set
1106# CONFIG_RADIO_SF16FMI is not set
1107# CONFIG_RADIO_SF16FMR2 is not set
1108# CONFIG_RADIO_TERRATEC is not set
1109# CONFIG_RADIO_TRUST is not set
1110# CONFIG_RADIO_TYPHOON is not set
1111# CONFIG_RADIO_ZOLTRIX is not set
1112# CONFIG_USB_DSBR is not set
1113# CONFIG_DVB_CORE is not set
1114CONFIG_DAB=y
1115# CONFIG_USB_DABUSB is not set
1116
1117#
1118# Graphics support
1119#
1120CONFIG_BACKLIGHT_LCD_SUPPORT=y
1121CONFIG_BACKLIGHT_CLASS_DEVICE=y
1122CONFIG_LCD_CLASS_DEVICE=m
1123
1124#
1125# Display device support
1126#
1127# CONFIG_DISPLAY_SUPPORT is not set
1128# CONFIG_VGASTATE is not set
1129CONFIG_FB=y
1130# CONFIG_FIRMWARE_EDID is not set
1131# CONFIG_FB_DDC is not set
1132CONFIG_FB_CFB_FILLRECT=y
1133CONFIG_FB_CFB_COPYAREA=y
1134CONFIG_FB_CFB_IMAGEBLIT=y
1135# CONFIG_FB_SYS_FILLRECT is not set
1136# CONFIG_FB_SYS_COPYAREA is not set
1137# CONFIG_FB_SYS_IMAGEBLIT is not set
1138# CONFIG_FB_SYS_FOPS is not set
1139CONFIG_FB_DEFERRED_IO=y
1140# CONFIG_FB_SVGALIB is not set
1141# CONFIG_FB_MACMODES is not set
1142CONFIG_FB_BACKLIGHT=y
1143CONFIG_FB_MODE_HELPERS=y
1144# CONFIG_FB_TILEBLITTING is not set
1145
1146#
1147# Frame buffer hardware drivers
1148#
1149# CONFIG_FB_CIRRUS is not set
1150# CONFIG_FB_PM2 is not set
1151# CONFIG_FB_CYBER2000 is not set
1152# CONFIG_FB_ASILIANT is not set
1153# CONFIG_FB_IMSTT is not set
1154# CONFIG_FB_S1D13XXX is not set
1155# CONFIG_FB_NVIDIA is not set
1156# CONFIG_FB_RIVA is not set
1157# CONFIG_FB_MATROX is not set
1158CONFIG_FB_RADEON=y
1159# CONFIG_FB_RADEON_I2C is not set
1160CONFIG_FB_RADEON_BACKLIGHT=y
1161# CONFIG_FB_RADEON_DEBUG is not set
1162# CONFIG_FB_ATY128 is not set
1163# CONFIG_FB_ATY is not set
1164# CONFIG_FB_S3 is not set
1165# CONFIG_FB_SAVAGE is not set
1166# CONFIG_FB_SIS is not set
1167# CONFIG_FB_NEOMAGIC is not set
1168# CONFIG_FB_KYRO is not set
1169# CONFIG_FB_3DFX is not set
1170# CONFIG_FB_VOODOO1 is not set
1171# CONFIG_FB_SMIVGX is not set
1172# CONFIG_FB_VT8623 is not set
1173# CONFIG_FB_TRIDENT is not set
1174# CONFIG_FB_ARK is not set
1175# CONFIG_FB_PM3 is not set
1176# CONFIG_FB_VIRTUAL is not set
1177
1178#
1179# Console display driver support
1180#
1181# CONFIG_VGA_CONSOLE is not set
1182# CONFIG_MDA_CONSOLE is not set
1183CONFIG_DUMMY_CONSOLE=y
1184CONFIG_FRAMEBUFFER_CONSOLE=y
1185# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1186# CONFIG_FONTS is not set
1187CONFIG_FONT_8x8=y
1188CONFIG_FONT_8x16=y
1189# CONFIG_LOGO is not set
1190
1191#
1192# Sound
1193#
1194CONFIG_SOUND=y
1195
1196#
1197# Advanced Linux Sound Architecture
1198#
1199CONFIG_SND=m
1200CONFIG_SND_TIMER=m
1201CONFIG_SND_PCM=m
1202CONFIG_SND_RAWMIDI=m
1203CONFIG_SND_SEQUENCER=m
1204CONFIG_SND_SEQ_DUMMY=m
1205CONFIG_SND_OSSEMUL=y
1206CONFIG_SND_MIXER_OSS=m
1207CONFIG_SND_PCM_OSS=m
1208CONFIG_SND_PCM_OSS_PLUGINS=y
1209CONFIG_SND_SEQUENCER_OSS=y
1210CONFIG_SND_RTCTIMER=m
1211CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
1212# CONFIG_SND_DYNAMIC_MINORS is not set
1213CONFIG_SND_SUPPORT_OLD_API=y
1214CONFIG_SND_VERBOSE_PROCFS=y
1215# CONFIG_SND_VERBOSE_PRINTK is not set
1216# CONFIG_SND_DEBUG is not set
1217
1218#
1219# Generic devices
1220#
1221CONFIG_SND_MPU401_UART=m
1222CONFIG_SND_AC97_CODEC=m
1223# CONFIG_SND_DUMMY is not set
1224# CONFIG_SND_VIRMIDI is not set
1225# CONFIG_SND_MTPAV is not set
1226# CONFIG_SND_SERIAL_U16550 is not set
1227# CONFIG_SND_MPU401 is not set
1228
1229#
1230# PCI devices
1231#
1232# CONFIG_SND_AD1889 is not set
1233# CONFIG_SND_ALS300 is not set
1234# CONFIG_SND_ALI5451 is not set
1235# CONFIG_SND_ATIIXP is not set
1236# CONFIG_SND_ATIIXP_MODEM is not set
1237# CONFIG_SND_AU8810 is not set
1238# CONFIG_SND_AU8820 is not set
1239# CONFIG_SND_AU8830 is not set
1240# CONFIG_SND_AZT3328 is not set
1241# CONFIG_SND_BT87X is not set
1242# CONFIG_SND_CA0106 is not set
1243# CONFIG_SND_CMIPCI is not set
1244# CONFIG_SND_CS4281 is not set
1245# CONFIG_SND_CS46XX is not set
1246# CONFIG_SND_DARLA20 is not set
1247# CONFIG_SND_GINA20 is not set
1248# CONFIG_SND_LAYLA20 is not set
1249# CONFIG_SND_DARLA24 is not set
1250# CONFIG_SND_GINA24 is not set
1251# CONFIG_SND_LAYLA24 is not set
1252# CONFIG_SND_MONA is not set
1253# CONFIG_SND_MIA is not set
1254# CONFIG_SND_ECHO3G is not set
1255# CONFIG_SND_INDIGO is not set
1256# CONFIG_SND_INDIGOIO is not set
1257# CONFIG_SND_INDIGODJ is not set
1258# CONFIG_SND_EMU10K1 is not set
1259# CONFIG_SND_EMU10K1X is not set
1260# CONFIG_SND_ENS1370 is not set
1261# CONFIG_SND_ENS1371 is not set
1262# CONFIG_SND_ES1938 is not set
1263# CONFIG_SND_ES1968 is not set
1264# CONFIG_SND_FM801 is not set
1265# CONFIG_SND_HDA_INTEL is not set
1266# CONFIG_SND_HDSP is not set
1267# CONFIG_SND_HDSPM is not set
1268# CONFIG_SND_ICE1712 is not set
1269# CONFIG_SND_ICE1724 is not set
1270# CONFIG_SND_INTEL8X0 is not set
1271# CONFIG_SND_INTEL8X0M is not set
1272# CONFIG_SND_KORG1212 is not set
1273# CONFIG_SND_MAESTRO3 is not set
1274# CONFIG_SND_MIXART is not set
1275# CONFIG_SND_NM256 is not set
1276# CONFIG_SND_PCXHR is not set
1277# CONFIG_SND_RIPTIDE is not set
1278# CONFIG_SND_RME32 is not set
1279# CONFIG_SND_RME96 is not set
1280# CONFIG_SND_RME9652 is not set
1281# CONFIG_SND_SONICVIBES is not set
1282# CONFIG_SND_TRIDENT is not set
1283CONFIG_SND_VIA82XX=m
1284# CONFIG_SND_VIA82XX_MODEM is not set
1285# CONFIG_SND_VX222 is not set
1286# CONFIG_SND_YMFPCI is not set
1287# CONFIG_SND_AC97_POWER_SAVE is not set
1288
1289#
1290# ALSA MIPS devices
1291#
1292
1293#
1294# USB devices
1295#
1296# CONFIG_SND_USB_AUDIO is not set
1297# CONFIG_SND_USB_CAIAQ is not set
1298
1299#
1300# System on Chip audio support
1301#
1302# CONFIG_SND_SOC is not set
1303
1304#
1305# Open Sound System
1306#
1307# CONFIG_SOUND_PRIME is not set
1308CONFIG_AC97_BUS=m
1309
1310#
1311# HID Devices
1312#
1313CONFIG_HID=y
1314# CONFIG_HID_DEBUG is not set
1315
1316#
1317# USB Input Devices
1318#
1319CONFIG_USB_HID=m
1320# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1321# CONFIG_HID_FF is not set
1322CONFIG_USB_HIDDEV=y
1323
1324#
1325# USB HID Boot Protocol drivers
1326#
1327# CONFIG_USB_KBD is not set
1328# CONFIG_USB_MOUSE is not set
1329
1330#
1331# USB support
1332#
1333CONFIG_USB_ARCH_HAS_HCD=y
1334CONFIG_USB_ARCH_HAS_OHCI=y
1335CONFIG_USB_ARCH_HAS_EHCI=y
1336CONFIG_USB=y
1337# CONFIG_USB_DEBUG is not set
1338
1339#
1340# Miscellaneous USB options
1341#
1342CONFIG_USB_DEVICEFS=y
1343# CONFIG_USB_DEVICE_CLASS is not set
1344# CONFIG_USB_DYNAMIC_MINORS is not set
1345# CONFIG_USB_SUSPEND is not set
1346# CONFIG_USB_OTG is not set
1347
1348#
1349# USB Host Controller Drivers
1350#
1351CONFIG_USB_EHCI_HCD=y
1352CONFIG_USB_EHCI_SPLIT_ISO=y
1353CONFIG_USB_EHCI_ROOT_HUB_TT=y
1354CONFIG_USB_EHCI_TT_NEWSCHED=y
1355# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1356# CONFIG_USB_ISP116X_HCD is not set
1357CONFIG_USB_OHCI_HCD=y
1358# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1359# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1360CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1361CONFIG_USB_UHCI_HCD=m
1362# CONFIG_USB_SL811_HCD is not set
1363
1364#
1365# USB Device Class drivers
1366#
1367CONFIG_USB_ACM=y
1368CONFIG_USB_PRINTER=y
1369
1370#
1371# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1372#
1373
1374#
1375# may also be needed; see USB_STORAGE Help for more information
1376#
1377CONFIG_USB_STORAGE=y
1378# CONFIG_USB_STORAGE_DEBUG is not set
1379# CONFIG_USB_STORAGE_DATAFAB is not set
1380# CONFIG_USB_STORAGE_FREECOM is not set
1381# CONFIG_USB_STORAGE_ISD200 is not set
1382# CONFIG_USB_STORAGE_DPCM is not set
1383# CONFIG_USB_STORAGE_USBAT is not set
1384# CONFIG_USB_STORAGE_SDDR09 is not set
1385# CONFIG_USB_STORAGE_SDDR55 is not set
1386# CONFIG_USB_STORAGE_JUMPSHOT is not set
1387# CONFIG_USB_STORAGE_ALAUDA is not set
1388# CONFIG_USB_STORAGE_KARMA is not set
1389CONFIG_USB_LIBUSUAL=y
1390
1391#
1392# USB Imaging devices
1393#
1394# CONFIG_USB_MDC800 is not set
1395# CONFIG_USB_MICROTEK is not set
1396# CONFIG_USB_MON is not set
1397
1398#
1399# USB port drivers
1400#
1401
1402#
1403# USB Serial Converter support
1404#
1405# CONFIG_USB_SERIAL is not set
1406
1407#
1408# USB Miscellaneous drivers
1409#
1410# CONFIG_USB_EMI62 is not set
1411# CONFIG_USB_EMI26 is not set
1412# CONFIG_USB_ADUTUX is not set
1413# CONFIG_USB_AUERSWALD is not set
1414# CONFIG_USB_RIO500 is not set
1415# CONFIG_USB_LEGOTOWER is not set
1416# CONFIG_USB_LCD is not set
1417# CONFIG_USB_BERRY_CHARGE is not set
1418# CONFIG_USB_LED is not set
1419# CONFIG_USB_CYPRESS_CY7C63 is not set
1420# CONFIG_USB_CYTHERM is not set
1421# CONFIG_USB_PHIDGET is not set
1422# CONFIG_USB_IDMOUSE is not set
1423# CONFIG_USB_FTDI_ELAN is not set
1424# CONFIG_USB_APPLEDISPLAY is not set
1425# CONFIG_USB_SISUSBVGA is not set
1426# CONFIG_USB_LD is not set
1427# CONFIG_USB_TRANCEVIBRATOR is not set
1428# CONFIG_USB_IOWARRIOR is not set
1429# CONFIG_USB_TEST is not set
1430
1431#
1432# USB DSL modem support
1433#
1434
1435#
1436# USB Gadget Support
1437#
1438# CONFIG_USB_GADGET is not set
1439# CONFIG_MMC is not set
1440
1441#
1442# LED devices
1443#
1444# CONFIG_NEW_LEDS is not set
1445
1446#
1447# LED drivers
1448#
1449
1450#
1451# LED Triggers
1452#
1453
1454#
1455# InfiniBand support
1456#
1457# CONFIG_INFINIBAND is not set
1458
1459#
1460# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1461#
1462
1463#
1464# Real Time Clock
1465#
1466# CONFIG_RTC_CLASS is not set
1467
1468#
1469# DMA Engine support
1470#
1471# CONFIG_DMA_ENGINE is not set
1472
1473#
1474# DMA Clients
1475#
1476
1477#
1478# DMA Devices
1479#
1480
1481#
1482# File systems
1483#
1484CONFIG_EXT2_FS=y
1485# CONFIG_EXT2_FS_XATTR is not set
1486CONFIG_EXT2_FS_XIP=y
1487CONFIG_FS_XIP=y
1488CONFIG_EXT3_FS=y
1489# CONFIG_EXT3_FS_XATTR is not set
1490# CONFIG_EXT4DEV_FS is not set
1491CONFIG_JBD=y
1492# CONFIG_JBD_DEBUG is not set
1493CONFIG_REISERFS_FS=m
1494# CONFIG_REISERFS_CHECK is not set
1495# CONFIG_REISERFS_PROC_INFO is not set
1496# CONFIG_REISERFS_FS_XATTR is not set
1497# CONFIG_JFS_FS is not set
1498CONFIG_FS_POSIX_ACL=y
1499# CONFIG_XFS_FS is not set
1500# CONFIG_GFS2_FS is not set
1501# CONFIG_OCFS2_FS is not set
1502# CONFIG_MINIX_FS is not set
1503# CONFIG_ROMFS_FS is not set
1504CONFIG_INOTIFY=y
1505CONFIG_INOTIFY_USER=y
1506# CONFIG_QUOTA is not set
1507CONFIG_DNOTIFY=y
1508CONFIG_AUTOFS_FS=y
1509CONFIG_AUTOFS4_FS=y
1510CONFIG_FUSE_FS=y
1511
1512#
1513# CD-ROM/DVD Filesystems
1514#
1515CONFIG_ISO9660_FS=m
1516CONFIG_JOLIET=y
1517CONFIG_ZISOFS=y
1518CONFIG_UDF_FS=m
1519CONFIG_UDF_NLS=y
1520
1521#
1522# DOS/FAT/NT Filesystems
1523#
1524CONFIG_FAT_FS=m
1525CONFIG_MSDOS_FS=m
1526CONFIG_VFAT_FS=m
1527CONFIG_FAT_DEFAULT_CODEPAGE=936
1528CONFIG_FAT_DEFAULT_IOCHARSET="utf8"
1529CONFIG_NTFS_FS=m
1530# CONFIG_NTFS_DEBUG is not set
1531CONFIG_NTFS_RW=y
1532
1533#
1534# Pseudo filesystems
1535#
1536CONFIG_PROC_FS=y
1537CONFIG_PROC_KCORE=y
1538CONFIG_PROC_SYSCTL=y
1539CONFIG_SYSFS=y
1540CONFIG_TMPFS=y
1541# CONFIG_TMPFS_POSIX_ACL is not set
1542# CONFIG_HUGETLB_PAGE is not set
1543CONFIG_RAMFS=y
1544# CONFIG_CONFIGFS_FS is not set
1545
1546#
1547# Miscellaneous filesystems
1548#
1549# CONFIG_ADFS_FS is not set
1550# CONFIG_AFFS_FS is not set
1551# CONFIG_HFS_FS is not set
1552# CONFIG_HFSPLUS_FS is not set
1553# CONFIG_BEFS_FS is not set
1554# CONFIG_BFS_FS is not set
1555# CONFIG_EFS_FS is not set
1556# CONFIG_JFFS2_FS is not set
1557# CONFIG_CRAMFS is not set
1558# CONFIG_VXFS_FS is not set
1559# CONFIG_HPFS_FS is not set
1560# CONFIG_QNX4FS_FS is not set
1561# CONFIG_SYSV_FS is not set
1562# CONFIG_UFS_FS is not set
1563
1564#
1565# Network File Systems
1566#
1567CONFIG_NFS_FS=m
1568CONFIG_NFS_V3=y
1569CONFIG_NFS_V3_ACL=y
1570CONFIG_NFS_V4=y
1571CONFIG_NFS_DIRECTIO=y
1572CONFIG_NFSD=m
1573CONFIG_NFSD_V2_ACL=y
1574CONFIG_NFSD_V3=y
1575CONFIG_NFSD_V3_ACL=y
1576CONFIG_NFSD_V4=y
1577CONFIG_NFSD_TCP=y
1578CONFIG_LOCKD=m
1579CONFIG_LOCKD_V4=y
1580CONFIG_EXPORTFS=m
1581CONFIG_NFS_ACL_SUPPORT=m
1582CONFIG_NFS_COMMON=y
1583CONFIG_SUNRPC=m
1584CONFIG_SUNRPC_GSS=m
1585# CONFIG_SUNRPC_BIND34 is not set
1586CONFIG_RPCSEC_GSS_KRB5=m
1587# CONFIG_RPCSEC_GSS_SPKM3 is not set
1588CONFIG_SMB_FS=m
1589CONFIG_SMB_NLS_DEFAULT=y
1590CONFIG_SMB_NLS_REMOTE="cp936"
1591CONFIG_CIFS=m
1592CONFIG_CIFS_STATS=y
1593CONFIG_CIFS_STATS2=y
1594CONFIG_CIFS_WEAK_PW_HASH=y
1595CONFIG_CIFS_XATTR=y
1596CONFIG_CIFS_POSIX=y
1597CONFIG_CIFS_DEBUG2=y
1598CONFIG_CIFS_EXPERIMENTAL=y
1599# CONFIG_NCP_FS is not set
1600# CONFIG_CODA_FS is not set
1601# CONFIG_AFS_FS is not set
1602# CONFIG_9P_FS is not set
1603
1604#
1605# Partition Types
1606#
1607CONFIG_PARTITION_ADVANCED=y
1608# CONFIG_ACORN_PARTITION is not set
1609# CONFIG_OSF_PARTITION is not set
1610# CONFIG_AMIGA_PARTITION is not set
1611# CONFIG_ATARI_PARTITION is not set
1612# CONFIG_MAC_PARTITION is not set
1613CONFIG_MSDOS_PARTITION=y
1614# CONFIG_BSD_DISKLABEL is not set
1615# CONFIG_MINIX_SUBPARTITION is not set
1616# CONFIG_SOLARIS_X86_PARTITION is not set
1617# CONFIG_UNIXWARE_DISKLABEL is not set
1618# CONFIG_LDM_PARTITION is not set
1619# CONFIG_SGI_PARTITION is not set
1620# CONFIG_ULTRIX_PARTITION is not set
1621# CONFIG_SUN_PARTITION is not set
1622# CONFIG_KARMA_PARTITION is not set
1623# CONFIG_EFI_PARTITION is not set
1624# CONFIG_SYSV68_PARTITION is not set
1625
1626#
1627# Native Language Support
1628#
1629CONFIG_NLS=y
1630CONFIG_NLS_DEFAULT="utf8"
1631# CONFIG_NLS_CODEPAGE_437 is not set
1632# CONFIG_NLS_CODEPAGE_737 is not set
1633# CONFIG_NLS_CODEPAGE_775 is not set
1634# CONFIG_NLS_CODEPAGE_850 is not set
1635# CONFIG_NLS_CODEPAGE_852 is not set
1636# CONFIG_NLS_CODEPAGE_855 is not set
1637# CONFIG_NLS_CODEPAGE_857 is not set
1638# CONFIG_NLS_CODEPAGE_860 is not set
1639# CONFIG_NLS_CODEPAGE_861 is not set
1640# CONFIG_NLS_CODEPAGE_862 is not set
1641# CONFIG_NLS_CODEPAGE_863 is not set
1642# CONFIG_NLS_CODEPAGE_864 is not set
1643# CONFIG_NLS_CODEPAGE_865 is not set
1644# CONFIG_NLS_CODEPAGE_866 is not set
1645# CONFIG_NLS_CODEPAGE_869 is not set
1646CONFIG_NLS_CODEPAGE_936=y
1647# CONFIG_NLS_CODEPAGE_950 is not set
1648# CONFIG_NLS_CODEPAGE_932 is not set
1649# CONFIG_NLS_CODEPAGE_949 is not set
1650# CONFIG_NLS_CODEPAGE_874 is not set
1651# CONFIG_NLS_ISO8859_8 is not set
1652# CONFIG_NLS_CODEPAGE_1250 is not set
1653# CONFIG_NLS_CODEPAGE_1251 is not set
1654# CONFIG_NLS_ASCII is not set
1655CONFIG_NLS_ISO8859_1=y
1656# CONFIG_NLS_ISO8859_2 is not set
1657# CONFIG_NLS_ISO8859_3 is not set
1658# CONFIG_NLS_ISO8859_4 is not set
1659# CONFIG_NLS_ISO8859_5 is not set
1660# CONFIG_NLS_ISO8859_6 is not set
1661# CONFIG_NLS_ISO8859_7 is not set
1662# CONFIG_NLS_ISO8859_9 is not set
1663# CONFIG_NLS_ISO8859_13 is not set
1664# CONFIG_NLS_ISO8859_14 is not set
1665# CONFIG_NLS_ISO8859_15 is not set
1666# CONFIG_NLS_KOI8_R is not set
1667# CONFIG_NLS_KOI8_U is not set
1668CONFIG_NLS_UTF8=y
1669
1670#
1671# Distributed Lock Manager
1672#
1673# CONFIG_DLM is not set
1674
1675#
1676# Profiling support
1677#
1678CONFIG_PROFILING=y
1679CONFIG_OPROFILE=m
1680
1681#
1682# Kernel hacking
1683#
1684CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1685# CONFIG_PRINTK_TIME is not set
1686# CONFIG_ENABLE_MUST_CHECK is not set
1687# CONFIG_MAGIC_SYSRQ is not set
1688# CONFIG_UNUSED_SYMBOLS is not set
1689# CONFIG_DEBUG_FS is not set
1690# CONFIG_HEADERS_CHECK is not set
1691# CONFIG_DEBUG_KERNEL is not set
1692CONFIG_CROSSCOMPILE=y
1693CONFIG_CMDLINE=""
1694
1695#
1696# Security options
1697#
1698# CONFIG_KEYS is not set
1699# CONFIG_SECURITY is not set
1700
1701#
1702# Cryptographic options
1703#
1704CONFIG_CRYPTO=y
1705CONFIG_CRYPTO_ALGAPI=y
1706CONFIG_CRYPTO_BLKCIPHER=m
1707CONFIG_CRYPTO_HASH=y
1708CONFIG_CRYPTO_MANAGER=y
1709CONFIG_CRYPTO_HMAC=y
1710# CONFIG_CRYPTO_XCBC is not set
1711# CONFIG_CRYPTO_NULL is not set
1712# CONFIG_CRYPTO_MD4 is not set
1713CONFIG_CRYPTO_MD5=m
1714CONFIG_CRYPTO_SHA1=m
1715# CONFIG_CRYPTO_SHA256 is not set
1716# CONFIG_CRYPTO_SHA512 is not set
1717# CONFIG_CRYPTO_WP512 is not set
1718# CONFIG_CRYPTO_TGR192 is not set
1719# CONFIG_CRYPTO_GF128MUL is not set
1720CONFIG_CRYPTO_ECB=m
1721CONFIG_CRYPTO_CBC=m
1722CONFIG_CRYPTO_PCBC=m
1723# CONFIG_CRYPTO_LRW is not set
1724# CONFIG_CRYPTO_CRYPTD is not set
1725CONFIG_CRYPTO_DES=m
1726# CONFIG_CRYPTO_FCRYPT is not set
1727# CONFIG_CRYPTO_BLOWFISH is not set
1728# CONFIG_CRYPTO_TWOFISH is not set
1729# CONFIG_CRYPTO_SERPENT is not set
1730# CONFIG_CRYPTO_AES is not set
1731# CONFIG_CRYPTO_CAST5 is not set
1732# CONFIG_CRYPTO_CAST6 is not set
1733# CONFIG_CRYPTO_TEA is not set
1734CONFIG_CRYPTO_ARC4=m
1735# CONFIG_CRYPTO_KHAZAD is not set
1736# CONFIG_CRYPTO_ANUBIS is not set
1737CONFIG_CRYPTO_DEFLATE=m
1738# CONFIG_CRYPTO_MICHAEL_MIC is not set
1739# CONFIG_CRYPTO_CRC32C is not set
1740# CONFIG_CRYPTO_CAMELLIA is not set
1741# CONFIG_CRYPTO_TEST is not set
1742
1743#
1744# Hardware crypto devices
1745#
1746
1747#
1748# Library routines
1749#
1750CONFIG_BITREVERSE=y
1751CONFIG_CRC_CCITT=y
1752# CONFIG_CRC16 is not set
1753# CONFIG_CRC_ITU_T is not set
1754CONFIG_CRC32=y
1755# CONFIG_LIBCRC32C is not set
1756CONFIG_ZLIB_INFLATE=m
1757CONFIG_ZLIB_DEFLATE=m
1758CONFIG_TEXTSEARCH=y
1759CONFIG_TEXTSEARCH_KMP=m
1760CONFIG_TEXTSEARCH_BM=m
1761CONFIG_TEXTSEARCH_FSM=m
1762CONFIG_PLIST=y
1763CONFIG_HAS_IOMEM=y
1764CONFIG_HAS_IOPORT=y
1765CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defconfig
index 7ec618f3c8b9..405c9f505a77 100644
--- a/arch/mips/configs/ip22_defconfig
+++ b/arch/mips/configs/ip22_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig
index 9ddc3eff4793..a9dcbcf563cb 100644
--- a/arch/mips/configs/ip27_defconfig
+++ b/arch/mips/configs/ip27_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defconfig
index 8fc18809d5ff..a040459bec11 100644
--- a/arch/mips/configs/ip32_defconfig
+++ b/arch/mips/configs/ip32_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/jazz_defconfig b/arch/mips/configs/jazz_defconfig
index 9331cb0a19b1..8a0b4ac5283d 100644
--- a/arch/mips/configs/jazz_defconfig
+++ b/arch/mips/configs/jazz_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29CONFIG_MACH_JAZZ=y 28CONFIG_MACH_JAZZ=y
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_MACH_JAZZ=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
@@ -245,7 +241,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
245# 241#
246CONFIG_ISA=y 242CONFIG_ISA=y
247CONFIG_MMU=y 243CONFIG_MMU=y
248CONFIG_I8253=y 244CONFIG_PCSPEAKER=y
249 245
250# 246#
251# PCCARD (PCMCIA/CardBus) support 247# PCCARD (PCMCIA/CardBus) support
diff --git a/arch/mips/configs/jmr3927_defconfig b/arch/mips/configs/jmr3927_defconfig
index 1b364cf69140..9a25e770abd8 100644
--- a/arch/mips/configs/jmr3927_defconfig
+++ b/arch/mips/configs/jmr3927_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/lasat200_defconfig b/arch/mips/configs/lasat200_defconfig
deleted file mode 100644
index fd4272c1458a..000000000000
--- a/arch/mips/configs/lasat200_defconfig
+++ /dev/null
@@ -1,1118 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Tue Feb 20 21:47:34 2007
5#
6CONFIG_MIPS=y
7
8#
9# Machine selection
10#
11CONFIG_ZONE_DMA=y
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set
30CONFIG_LASAT=y
31# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set
34# CONFIG_WR_PPMC is not set
35# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set
43# CONFIG_PNX8550_STB810 is not set
44# CONFIG_DDB5477 is not set
45# CONFIG_MACH_VR41XX is not set
46# CONFIG_PMC_YOSEMITE is not set
47# CONFIG_QEMU is not set
48# CONFIG_MARKEINS is not set
49# CONFIG_SGI_IP22 is not set
50# CONFIG_SGI_IP27 is not set
51# CONFIG_SGI_IP32 is not set
52# CONFIG_SIBYTE_BIGSUR is not set
53# CONFIG_SIBYTE_SWARM is not set
54# CONFIG_SIBYTE_SENTOSA is not set
55# CONFIG_SIBYTE_RHONE is not set
56# CONFIG_SIBYTE_CARMEL is not set
57# CONFIG_SIBYTE_PTSWARM is not set
58# CONFIG_SIBYTE_LITTLESUR is not set
59# CONFIG_SIBYTE_CRHINE is not set
60# CONFIG_SIBYTE_CRHONE is not set
61# CONFIG_SNI_RM is not set
62# CONFIG_TOSHIBA_JMR3927 is not set
63# CONFIG_TOSHIBA_RBTX4927 is not set
64# CONFIG_TOSHIBA_RBTX4938 is not set
65CONFIG_PICVUE=y
66CONFIG_PICVUE_PROC=y
67CONFIG_DS1603=y
68CONFIG_LASAT_SYSCTL=y
69CONFIG_RWSEM_GENERIC_SPINLOCK=y
70# CONFIG_ARCH_HAS_ILOG2_U32 is not set
71# CONFIG_ARCH_HAS_ILOG2_U64 is not set
72CONFIG_GENERIC_FIND_NEXT_BIT=y
73CONFIG_GENERIC_HWEIGHT=y
74CONFIG_GENERIC_CALIBRATE_DELAY=y
75CONFIG_GENERIC_TIME=y
76CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
77CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
78CONFIG_DMA_NONCOHERENT=y
79CONFIG_DMA_NEED_PCI_MAP_STATE=y
80CONFIG_MIPS_NILE4=y
81# CONFIG_CPU_BIG_ENDIAN is not set
82CONFIG_CPU_LITTLE_ENDIAN=y
83CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
84CONFIG_MIPS_GT64120=y
85CONFIG_MIPS_L1_CACHE_SHIFT=5
86
87#
88# CPU selection
89#
90# CONFIG_CPU_MIPS32_R1 is not set
91# CONFIG_CPU_MIPS32_R2 is not set
92# CONFIG_CPU_MIPS64_R1 is not set
93# CONFIG_CPU_MIPS64_R2 is not set
94# CONFIG_CPU_R3000 is not set
95# CONFIG_CPU_TX39XX is not set
96# CONFIG_CPU_VR41XX is not set
97# CONFIG_CPU_R4300 is not set
98# CONFIG_CPU_R4X00 is not set
99# CONFIG_CPU_TX49XX is not set
100CONFIG_CPU_R5000=y
101# CONFIG_CPU_R5432 is not set
102# CONFIG_CPU_R6000 is not set
103# CONFIG_CPU_NEVADA is not set
104# CONFIG_CPU_R8000 is not set
105# CONFIG_CPU_R10000 is not set
106# CONFIG_CPU_RM7000 is not set
107# CONFIG_CPU_RM9000 is not set
108# CONFIG_CPU_SB1 is not set
109CONFIG_SYS_HAS_CPU_R5000=y
110CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
111CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
112CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
113CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
114
115#
116# Kernel type
117#
118CONFIG_32BIT=y
119# CONFIG_64BIT is not set
120CONFIG_PAGE_SIZE_4KB=y
121# CONFIG_PAGE_SIZE_8KB is not set
122# CONFIG_PAGE_SIZE_16KB is not set
123# CONFIG_PAGE_SIZE_64KB is not set
124CONFIG_BOARD_SCACHE=y
125CONFIG_R5000_CPU_SCACHE=y
126CONFIG_MIPS_MT_DISABLED=y
127# CONFIG_MIPS_MT_SMP is not set
128# CONFIG_MIPS_MT_SMTC is not set
129# CONFIG_MIPS_VPE_LOADER is not set
130# CONFIG_64BIT_PHYS_ADDR is not set
131CONFIG_CPU_HAS_LLSC=y
132CONFIG_CPU_HAS_SYNC=y
133CONFIG_GENERIC_HARDIRQS=y
134CONFIG_GENERIC_IRQ_PROBE=y
135CONFIG_ARCH_FLATMEM_ENABLE=y
136CONFIG_SELECT_MEMORY_MODEL=y
137CONFIG_FLATMEM_MANUAL=y
138# CONFIG_DISCONTIGMEM_MANUAL is not set
139# CONFIG_SPARSEMEM_MANUAL is not set
140CONFIG_FLATMEM=y
141CONFIG_FLAT_NODE_MEM_MAP=y
142# CONFIG_SPARSEMEM_STATIC is not set
143CONFIG_SPLIT_PTLOCK_CPUS=4
144# CONFIG_RESOURCES_64BIT is not set
145CONFIG_ZONE_DMA_FLAG=1
146# CONFIG_HZ_48 is not set
147# CONFIG_HZ_100 is not set
148# CONFIG_HZ_128 is not set
149# CONFIG_HZ_250 is not set
150# CONFIG_HZ_256 is not set
151CONFIG_HZ_1000=y
152# CONFIG_HZ_1024 is not set
153CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
154CONFIG_HZ=1000
155CONFIG_PREEMPT_NONE=y
156# CONFIG_PREEMPT_VOLUNTARY is not set
157# CONFIG_PREEMPT is not set
158# CONFIG_KEXEC is not set
159CONFIG_LOCKDEP_SUPPORT=y
160CONFIG_STACKTRACE_SUPPORT=y
161CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
162
163#
164# Code maturity level options
165#
166CONFIG_EXPERIMENTAL=y
167CONFIG_BROKEN_ON_SMP=y
168CONFIG_INIT_ENV_ARG_LIMIT=32
169
170#
171# General setup
172#
173CONFIG_LOCALVERSION=""
174CONFIG_LOCALVERSION_AUTO=y
175CONFIG_SWAP=y
176CONFIG_SYSVIPC=y
177# CONFIG_IPC_NS is not set
178CONFIG_SYSVIPC_SYSCTL=y
179# CONFIG_POSIX_MQUEUE is not set
180# CONFIG_BSD_PROCESS_ACCT is not set
181# CONFIG_TASKSTATS is not set
182# CONFIG_UTS_NS is not set
183# CONFIG_AUDIT is not set
184# CONFIG_IKCONFIG is not set
185CONFIG_SYSFS_DEPRECATED=y
186CONFIG_RELAY=y
187# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
188CONFIG_SYSCTL=y
189CONFIG_EMBEDDED=y
190CONFIG_SYSCTL_SYSCALL=y
191CONFIG_KALLSYMS=y
192# CONFIG_KALLSYMS_EXTRA_PASS is not set
193CONFIG_HOTPLUG=y
194CONFIG_PRINTK=y
195CONFIG_BUG=y
196CONFIG_ELF_CORE=y
197CONFIG_BASE_FULL=y
198CONFIG_FUTEX=y
199CONFIG_EPOLL=y
200CONFIG_SHMEM=y
201CONFIG_SLAB=y
202CONFIG_VM_EVENT_COUNTERS=y
203CONFIG_RT_MUTEXES=y
204# CONFIG_TINY_SHMEM is not set
205CONFIG_BASE_SMALL=0
206# CONFIG_SLOB is not set
207
208#
209# Loadable module support
210#
211CONFIG_MODULES=y
212CONFIG_MODULE_UNLOAD=y
213# CONFIG_MODULE_FORCE_UNLOAD is not set
214CONFIG_MODVERSIONS=y
215CONFIG_MODULE_SRCVERSION_ALL=y
216CONFIG_KMOD=y
217
218#
219# Block layer
220#
221CONFIG_BLOCK=y
222# CONFIG_LBD is not set
223# CONFIG_BLK_DEV_IO_TRACE is not set
224# CONFIG_LSF is not set
225
226#
227# IO Schedulers
228#
229CONFIG_IOSCHED_NOOP=y
230CONFIG_IOSCHED_AS=y
231CONFIG_IOSCHED_DEADLINE=y
232CONFIG_IOSCHED_CFQ=y
233CONFIG_DEFAULT_AS=y
234# CONFIG_DEFAULT_DEADLINE is not set
235# CONFIG_DEFAULT_CFQ is not set
236# CONFIG_DEFAULT_NOOP is not set
237CONFIG_DEFAULT_IOSCHED="anticipatory"
238
239#
240# Bus options (PCI, PCMCIA, EISA, ISA, TC)
241#
242CONFIG_HW_HAS_PCI=y
243CONFIG_PCI=y
244CONFIG_MMU=y
245
246#
247# PCCARD (PCMCIA/CardBus) support
248#
249# CONFIG_PCCARD is not set
250
251#
252# PCI Hotplug Support
253#
254# CONFIG_HOTPLUG_PCI is not set
255
256#
257# Executable file formats
258#
259CONFIG_BINFMT_ELF=y
260# CONFIG_BINFMT_MISC is not set
261CONFIG_TRAD_SIGNALS=y
262
263#
264# Power management options
265#
266CONFIG_PM=y
267# CONFIG_PM_LEGACY is not set
268# CONFIG_PM_DEBUG is not set
269# CONFIG_PM_SYSFS_DEPRECATED is not set
270
271#
272# Networking
273#
274CONFIG_NET=y
275
276#
277# Networking options
278#
279# CONFIG_NETDEBUG is not set
280# CONFIG_PACKET is not set
281CONFIG_UNIX=y
282CONFIG_XFRM=y
283CONFIG_XFRM_USER=m
284# CONFIG_XFRM_SUB_POLICY is not set
285CONFIG_XFRM_MIGRATE=y
286CONFIG_NET_KEY=y
287CONFIG_NET_KEY_MIGRATE=y
288CONFIG_INET=y
289# CONFIG_IP_MULTICAST is not set
290# CONFIG_IP_ADVANCED_ROUTER is not set
291CONFIG_IP_FIB_HASH=y
292# CONFIG_IP_PNP is not set
293# CONFIG_NET_IPIP is not set
294# CONFIG_NET_IPGRE is not set
295# CONFIG_ARPD is not set
296# CONFIG_SYN_COOKIES is not set
297# CONFIG_INET_AH is not set
298# CONFIG_INET_ESP is not set
299# CONFIG_INET_IPCOMP is not set
300# CONFIG_INET_XFRM_TUNNEL is not set
301# CONFIG_INET_TUNNEL is not set
302CONFIG_INET_XFRM_MODE_TRANSPORT=m
303CONFIG_INET_XFRM_MODE_TUNNEL=m
304CONFIG_INET_XFRM_MODE_BEET=m
305CONFIG_INET_DIAG=y
306CONFIG_INET_TCP_DIAG=y
307# CONFIG_TCP_CONG_ADVANCED is not set
308CONFIG_TCP_CONG_CUBIC=y
309CONFIG_DEFAULT_TCP_CONG="cubic"
310CONFIG_TCP_MD5SIG=y
311# CONFIG_IPV6 is not set
312# CONFIG_INET6_XFRM_TUNNEL is not set
313# CONFIG_INET6_TUNNEL is not set
314CONFIG_NETWORK_SECMARK=y
315# CONFIG_NETFILTER is not set
316
317#
318# DCCP Configuration (EXPERIMENTAL)
319#
320# CONFIG_IP_DCCP is not set
321
322#
323# SCTP Configuration (EXPERIMENTAL)
324#
325# CONFIG_IP_SCTP is not set
326
327#
328# TIPC Configuration (EXPERIMENTAL)
329#
330# CONFIG_TIPC is not set
331# CONFIG_ATM is not set
332# CONFIG_BRIDGE is not set
333# CONFIG_VLAN_8021Q is not set
334# CONFIG_DECNET is not set
335# CONFIG_LLC2 is not set
336# CONFIG_IPX is not set
337# CONFIG_ATALK is not set
338# CONFIG_X25 is not set
339# CONFIG_LAPB is not set
340# CONFIG_ECONET is not set
341# CONFIG_WAN_ROUTER is not set
342
343#
344# QoS and/or fair queueing
345#
346# CONFIG_NET_SCHED is not set
347
348#
349# Network testing
350#
351# CONFIG_NET_PKTGEN is not set
352# CONFIG_HAMRADIO is not set
353# CONFIG_IRDA is not set
354# CONFIG_BT is not set
355CONFIG_IEEE80211=m
356# CONFIG_IEEE80211_DEBUG is not set
357CONFIG_IEEE80211_CRYPT_WEP=m
358CONFIG_IEEE80211_CRYPT_CCMP=m
359CONFIG_IEEE80211_SOFTMAC=m
360# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
361CONFIG_WIRELESS_EXT=y
362
363#
364# Device Drivers
365#
366
367#
368# Generic Driver Options
369#
370CONFIG_STANDALONE=y
371CONFIG_PREVENT_FIRMWARE_BUILD=y
372CONFIG_FW_LOADER=m
373# CONFIG_SYS_HYPERVISOR is not set
374
375#
376# Connector - unified userspace <-> kernelspace linker
377#
378CONFIG_CONNECTOR=m
379
380#
381# Memory Technology Devices (MTD)
382#
383CONFIG_MTD=y
384# CONFIG_MTD_DEBUG is not set
385# CONFIG_MTD_CONCAT is not set
386CONFIG_MTD_PARTITIONS=y
387# CONFIG_MTD_REDBOOT_PARTS is not set
388# CONFIG_MTD_CMDLINE_PARTS is not set
389
390#
391# User Modules And Translation Layers
392#
393CONFIG_MTD_CHAR=y
394CONFIG_MTD_BLKDEVS=y
395CONFIG_MTD_BLOCK=y
396# CONFIG_FTL is not set
397# CONFIG_NFTL is not set
398# CONFIG_INFTL is not set
399# CONFIG_RFD_FTL is not set
400# CONFIG_SSFDC is not set
401
402#
403# RAM/ROM/Flash chip drivers
404#
405CONFIG_MTD_CFI=y
406# CONFIG_MTD_JEDECPROBE is not set
407CONFIG_MTD_GEN_PROBE=y
408# CONFIG_MTD_CFI_ADV_OPTIONS is not set
409CONFIG_MTD_MAP_BANK_WIDTH_1=y
410CONFIG_MTD_MAP_BANK_WIDTH_2=y
411CONFIG_MTD_MAP_BANK_WIDTH_4=y
412# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
413# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
414# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
415CONFIG_MTD_CFI_I1=y
416CONFIG_MTD_CFI_I2=y
417# CONFIG_MTD_CFI_I4 is not set
418# CONFIG_MTD_CFI_I8 is not set
419# CONFIG_MTD_CFI_INTELEXT is not set
420CONFIG_MTD_CFI_AMDSTD=y
421# CONFIG_MTD_CFI_STAA is not set
422CONFIG_MTD_CFI_UTIL=y
423# CONFIG_MTD_RAM is not set
424# CONFIG_MTD_ROM is not set
425# CONFIG_MTD_ABSENT is not set
426# CONFIG_MTD_OBSOLETE_CHIPS is not set
427
428#
429# Mapping drivers for chip access
430#
431# CONFIG_MTD_COMPLEX_MAPPINGS is not set
432# CONFIG_MTD_PHYSMAP is not set
433CONFIG_MTD_LASAT=y
434# CONFIG_MTD_PLATRAM is not set
435
436#
437# Self-contained MTD device drivers
438#
439# CONFIG_MTD_PMC551 is not set
440# CONFIG_MTD_SLRAM is not set
441# CONFIG_MTD_PHRAM is not set
442# CONFIG_MTD_MTDRAM is not set
443# CONFIG_MTD_BLOCK2MTD is not set
444
445#
446# Disk-On-Chip Device Drivers
447#
448# CONFIG_MTD_DOC2000 is not set
449# CONFIG_MTD_DOC2001 is not set
450# CONFIG_MTD_DOC2001PLUS is not set
451
452#
453# NAND Flash Device Drivers
454#
455# CONFIG_MTD_NAND is not set
456
457#
458# OneNAND Flash Device Drivers
459#
460# CONFIG_MTD_ONENAND is not set
461
462#
463# Parallel port support
464#
465# CONFIG_PARPORT is not set
466
467#
468# Plug and Play support
469#
470# CONFIG_PNPACPI is not set
471
472#
473# Block devices
474#
475# CONFIG_BLK_CPQ_DA is not set
476# CONFIG_BLK_CPQ_CISS_DA is not set
477# CONFIG_BLK_DEV_DAC960 is not set
478# CONFIG_BLK_DEV_UMEM is not set
479# CONFIG_BLK_DEV_COW_COMMON is not set
480# CONFIG_BLK_DEV_LOOP is not set
481# CONFIG_BLK_DEV_NBD is not set
482# CONFIG_BLK_DEV_SX8 is not set
483# CONFIG_BLK_DEV_RAM is not set
484# CONFIG_BLK_DEV_INITRD is not set
485CONFIG_CDROM_PKTCDVD=m
486CONFIG_CDROM_PKTCDVD_BUFFERS=8
487# CONFIG_CDROM_PKTCDVD_WCACHE is not set
488CONFIG_ATA_OVER_ETH=m
489
490#
491# Misc devices
492#
493CONFIG_SGI_IOC4=m
494# CONFIG_TIFM_CORE is not set
495
496#
497# ATA/ATAPI/MFM/RLL support
498#
499CONFIG_IDE=y
500CONFIG_IDE_MAX_HWIFS=4
501CONFIG_BLK_DEV_IDE=y
502
503#
504# Please see Documentation/ide.txt for help/info on IDE drives
505#
506# CONFIG_BLK_DEV_IDE_SATA is not set
507CONFIG_BLK_DEV_IDEDISK=y
508CONFIG_IDEDISK_MULTI_MODE=y
509# CONFIG_BLK_DEV_IDECD is not set
510# CONFIG_BLK_DEV_IDETAPE is not set
511# CONFIG_BLK_DEV_IDEFLOPPY is not set
512# CONFIG_IDE_TASK_IOCTL is not set
513
514#
515# IDE chipset support/bugfixes
516#
517CONFIG_IDE_GENERIC=y
518CONFIG_BLK_DEV_IDEPCI=y
519# CONFIG_IDEPCI_SHARE_IRQ is not set
520# CONFIG_BLK_DEV_OFFBOARD is not set
521CONFIG_BLK_DEV_GENERIC=y
522# CONFIG_BLK_DEV_OPTI621 is not set
523CONFIG_BLK_DEV_IDEDMA_PCI=y
524# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
525CONFIG_IDEDMA_PCI_AUTO=y
526# CONFIG_IDEDMA_ONLYDISK is not set
527# CONFIG_BLK_DEV_AEC62XX is not set
528# CONFIG_BLK_DEV_ALI15X3 is not set
529# CONFIG_BLK_DEV_AMD74XX is not set
530CONFIG_BLK_DEV_CMD64X=y
531# CONFIG_BLK_DEV_TRIFLEX is not set
532# CONFIG_BLK_DEV_CY82C693 is not set
533# CONFIG_BLK_DEV_CS5520 is not set
534# CONFIG_BLK_DEV_CS5530 is not set
535# CONFIG_BLK_DEV_HPT34X is not set
536# CONFIG_BLK_DEV_HPT366 is not set
537# CONFIG_BLK_DEV_JMICRON is not set
538# CONFIG_BLK_DEV_SC1200 is not set
539# CONFIG_BLK_DEV_PIIX is not set
540CONFIG_BLK_DEV_IT8213=m
541# CONFIG_BLK_DEV_IT821X is not set
542# CONFIG_BLK_DEV_NS87415 is not set
543# CONFIG_BLK_DEV_PDC202XX_OLD is not set
544# CONFIG_BLK_DEV_PDC202XX_NEW is not set
545# CONFIG_BLK_DEV_SVWKS is not set
546# CONFIG_BLK_DEV_SIIMAGE is not set
547# CONFIG_BLK_DEV_SLC90E66 is not set
548# CONFIG_BLK_DEV_TRM290 is not set
549# CONFIG_BLK_DEV_VIA82CXXX is not set
550CONFIG_BLK_DEV_TC86C001=m
551# CONFIG_IDE_ARM is not set
552CONFIG_BLK_DEV_IDEDMA=y
553# CONFIG_IDEDMA_IVB is not set
554CONFIG_IDEDMA_AUTO=y
555# CONFIG_BLK_DEV_HD is not set
556
557#
558# SCSI device support
559#
560CONFIG_RAID_ATTRS=m
561# CONFIG_SCSI is not set
562# CONFIG_SCSI_NETLINK is not set
563
564#
565# Serial ATA (prod) and Parallel ATA (experimental) drivers
566#
567# CONFIG_ATA is not set
568
569#
570# Multi-device support (RAID and LVM)
571#
572# CONFIG_MD is not set
573
574#
575# Fusion MPT device support
576#
577# CONFIG_FUSION is not set
578
579#
580# IEEE 1394 (FireWire) support
581#
582# CONFIG_IEEE1394 is not set
583
584#
585# I2O device support
586#
587# CONFIG_I2O is not set
588
589#
590# Network device support
591#
592CONFIG_NETDEVICES=y
593# CONFIG_DUMMY is not set
594# CONFIG_BONDING is not set
595# CONFIG_EQUALIZER is not set
596# CONFIG_TUN is not set
597
598#
599# ARCnet devices
600#
601# CONFIG_ARCNET is not set
602
603#
604# PHY device support
605#
606CONFIG_PHYLIB=m
607
608#
609# MII PHY device drivers
610#
611CONFIG_MARVELL_PHY=m
612CONFIG_DAVICOM_PHY=m
613CONFIG_QSEMI_PHY=m
614CONFIG_LXT_PHY=m
615CONFIG_CICADA_PHY=m
616CONFIG_VITESSE_PHY=m
617CONFIG_SMSC_PHY=m
618# CONFIG_BROADCOM_PHY is not set
619# CONFIG_FIXED_PHY is not set
620
621#
622# Ethernet (10 or 100Mbit)
623#
624CONFIG_NET_ETHERNET=y
625# CONFIG_MII is not set
626# CONFIG_HAPPYMEAL is not set
627# CONFIG_SUNGEM is not set
628# CONFIG_CASSINI is not set
629# CONFIG_NET_VENDOR_3COM is not set
630# CONFIG_DM9000 is not set
631
632#
633# Tulip family network device support
634#
635# CONFIG_NET_TULIP is not set
636# CONFIG_HP100 is not set
637# CONFIG_NET_PCI is not set
638
639#
640# Ethernet (1000 Mbit)
641#
642# CONFIG_ACENIC is not set
643# CONFIG_DL2K is not set
644# CONFIG_E1000 is not set
645# CONFIG_NS83820 is not set
646# CONFIG_HAMACHI is not set
647# CONFIG_YELLOWFIN is not set
648# CONFIG_R8169 is not set
649# CONFIG_SIS190 is not set
650# CONFIG_SKGE is not set
651# CONFIG_SKY2 is not set
652# CONFIG_SK98LIN is not set
653# CONFIG_TIGON3 is not set
654# CONFIG_BNX2 is not set
655CONFIG_QLA3XXX=m
656# CONFIG_ATL1 is not set
657
658#
659# Ethernet (10000 Mbit)
660#
661# CONFIG_CHELSIO_T1 is not set
662CONFIG_CHELSIO_T3=m
663# CONFIG_IXGB is not set
664# CONFIG_S2IO is not set
665# CONFIG_MYRI10GE is not set
666CONFIG_NETXEN_NIC=m
667
668#
669# Token Ring devices
670#
671# CONFIG_TR is not set
672
673#
674# Wireless LAN (non-hamradio)
675#
676# CONFIG_NET_RADIO is not set
677
678#
679# Wan interfaces
680#
681# CONFIG_WAN is not set
682# CONFIG_FDDI is not set
683# CONFIG_HIPPI is not set
684# CONFIG_PPP is not set
685# CONFIG_SLIP is not set
686# CONFIG_SHAPER is not set
687# CONFIG_NETCONSOLE is not set
688# CONFIG_NETPOLL is not set
689# CONFIG_NET_POLL_CONTROLLER is not set
690
691#
692# ISDN subsystem
693#
694# CONFIG_ISDN is not set
695
696#
697# Telephony Support
698#
699# CONFIG_PHONE is not set
700
701#
702# Input device support
703#
704CONFIG_INPUT=y
705# CONFIG_INPUT_FF_MEMLESS is not set
706
707#
708# Userland interfaces
709#
710CONFIG_INPUT_MOUSEDEV=y
711CONFIG_INPUT_MOUSEDEV_PSAUX=y
712CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
713CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
714# CONFIG_INPUT_JOYDEV is not set
715# CONFIG_INPUT_TSDEV is not set
716# CONFIG_INPUT_EVDEV is not set
717# CONFIG_INPUT_EVBUG is not set
718
719#
720# Input Device Drivers
721#
722# CONFIG_INPUT_KEYBOARD is not set
723# CONFIG_INPUT_MOUSE is not set
724# CONFIG_INPUT_JOYSTICK is not set
725# CONFIG_INPUT_TOUCHSCREEN is not set
726# CONFIG_INPUT_MISC is not set
727
728#
729# Hardware I/O ports
730#
731CONFIG_SERIO=y
732CONFIG_SERIO_I8042=y
733CONFIG_SERIO_SERPORT=y
734# CONFIG_SERIO_PCIPS2 is not set
735# CONFIG_SERIO_LIBPS2 is not set
736CONFIG_SERIO_RAW=m
737# CONFIG_GAMEPORT is not set
738
739#
740# Character devices
741#
742CONFIG_VT=y
743CONFIG_VT_CONSOLE=y
744CONFIG_HW_CONSOLE=y
745CONFIG_VT_HW_CONSOLE_BINDING=y
746# CONFIG_SERIAL_NONSTANDARD is not set
747
748#
749# Serial drivers
750#
751CONFIG_SERIAL_8250=y
752CONFIG_SERIAL_8250_CONSOLE=y
753CONFIG_SERIAL_8250_PCI=y
754CONFIG_SERIAL_8250_NR_UARTS=4
755CONFIG_SERIAL_8250_RUNTIME_UARTS=4
756# CONFIG_SERIAL_8250_EXTENDED is not set
757
758#
759# Non-8250 serial port support
760#
761CONFIG_SERIAL_CORE=y
762CONFIG_SERIAL_CORE_CONSOLE=y
763# CONFIG_SERIAL_JSM is not set
764CONFIG_UNIX98_PTYS=y
765CONFIG_LEGACY_PTYS=y
766CONFIG_LEGACY_PTY_COUNT=256
767
768#
769# IPMI
770#
771# CONFIG_IPMI_HANDLER is not set
772
773#
774# Watchdog Cards
775#
776# CONFIG_WATCHDOG is not set
777# CONFIG_HW_RANDOM is not set
778# CONFIG_RTC is not set
779# CONFIG_GEN_RTC is not set
780# CONFIG_DTLK is not set
781# CONFIG_R3964 is not set
782# CONFIG_APPLICOM is not set
783# CONFIG_DRM is not set
784# CONFIG_RAW_DRIVER is not set
785
786#
787# TPM devices
788#
789# CONFIG_TCG_TPM is not set
790
791#
792# I2C support
793#
794# CONFIG_I2C is not set
795
796#
797# SPI support
798#
799# CONFIG_SPI is not set
800# CONFIG_SPI_MASTER is not set
801
802#
803# Dallas's 1-wire bus
804#
805# CONFIG_W1 is not set
806
807#
808# Hardware Monitoring support
809#
810# CONFIG_HWMON is not set
811# CONFIG_HWMON_VID is not set
812
813#
814# Multimedia devices
815#
816# CONFIG_VIDEO_DEV is not set
817
818#
819# Digital Video Broadcasting Devices
820#
821# CONFIG_DVB is not set
822
823#
824# Graphics support
825#
826# CONFIG_FIRMWARE_EDID is not set
827# CONFIG_FB is not set
828
829#
830# Console display driver support
831#
832# CONFIG_VGA_CONSOLE is not set
833CONFIG_DUMMY_CONSOLE=y
834# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
835
836#
837# Sound
838#
839# CONFIG_SOUND is not set
840
841#
842# HID Devices
843#
844# CONFIG_HID is not set
845
846#
847# USB support
848#
849CONFIG_USB_ARCH_HAS_HCD=y
850CONFIG_USB_ARCH_HAS_OHCI=y
851CONFIG_USB_ARCH_HAS_EHCI=y
852# CONFIG_USB is not set
853
854#
855# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
856#
857
858#
859# USB Gadget Support
860#
861# CONFIG_USB_GADGET is not set
862
863#
864# MMC/SD Card support
865#
866# CONFIG_MMC is not set
867
868#
869# LED devices
870#
871# CONFIG_NEW_LEDS is not set
872
873#
874# LED drivers
875#
876
877#
878# LED Triggers
879#
880
881#
882# InfiniBand support
883#
884# CONFIG_INFINIBAND is not set
885
886#
887# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
888#
889
890#
891# Real Time Clock
892#
893# CONFIG_RTC_CLASS is not set
894
895#
896# DMA Engine support
897#
898# CONFIG_DMA_ENGINE is not set
899
900#
901# DMA Clients
902#
903
904#
905# DMA Devices
906#
907
908#
909# Auxiliary Display support
910#
911
912#
913# Virtualization
914#
915
916#
917# File systems
918#
919CONFIG_EXT2_FS=y
920# CONFIG_EXT2_FS_XATTR is not set
921# CONFIG_EXT2_FS_XIP is not set
922CONFIG_EXT3_FS=y
923CONFIG_EXT3_FS_XATTR=y
924# CONFIG_EXT3_FS_POSIX_ACL is not set
925CONFIG_EXT3_FS_SECURITY=y
926# CONFIG_EXT4DEV_FS is not set
927CONFIG_JBD=y
928# CONFIG_JBD_DEBUG is not set
929CONFIG_FS_MBCACHE=y
930# CONFIG_REISERFS_FS is not set
931# CONFIG_JFS_FS is not set
932CONFIG_FS_POSIX_ACL=y
933# CONFIG_XFS_FS is not set
934# CONFIG_GFS2_FS is not set
935# CONFIG_OCFS2_FS is not set
936# CONFIG_MINIX_FS is not set
937# CONFIG_ROMFS_FS is not set
938CONFIG_INOTIFY=y
939CONFIG_INOTIFY_USER=y
940# CONFIG_QUOTA is not set
941CONFIG_DNOTIFY=y
942# CONFIG_AUTOFS_FS is not set
943# CONFIG_AUTOFS4_FS is not set
944CONFIG_FUSE_FS=m
945CONFIG_GENERIC_ACL=y
946
947#
948# CD-ROM/DVD Filesystems
949#
950# CONFIG_ISO9660_FS is not set
951# CONFIG_UDF_FS is not set
952
953#
954# DOS/FAT/NT Filesystems
955#
956# CONFIG_MSDOS_FS is not set
957# CONFIG_VFAT_FS is not set
958# CONFIG_NTFS_FS is not set
959
960#
961# Pseudo filesystems
962#
963CONFIG_PROC_FS=y
964CONFIG_PROC_KCORE=y
965CONFIG_PROC_SYSCTL=y
966CONFIG_SYSFS=y
967CONFIG_TMPFS=y
968CONFIG_TMPFS_POSIX_ACL=y
969# CONFIG_HUGETLB_PAGE is not set
970CONFIG_RAMFS=y
971CONFIG_CONFIGFS_FS=m
972
973#
974# Miscellaneous filesystems
975#
976# CONFIG_ADFS_FS is not set
977# CONFIG_AFFS_FS is not set
978# CONFIG_ECRYPT_FS is not set
979# CONFIG_HFS_FS is not set
980# CONFIG_HFSPLUS_FS is not set
981# CONFIG_BEFS_FS is not set
982# CONFIG_BFS_FS is not set
983# CONFIG_EFS_FS is not set
984# CONFIG_JFFS2_FS is not set
985# CONFIG_CRAMFS is not set
986# CONFIG_VXFS_FS is not set
987# CONFIG_HPFS_FS is not set
988# CONFIG_QNX4FS_FS is not set
989# CONFIG_SYSV_FS is not set
990# CONFIG_UFS_FS is not set
991
992#
993# Network File Systems
994#
995CONFIG_NFS_FS=y
996CONFIG_NFS_V3=y
997# CONFIG_NFS_V3_ACL is not set
998# CONFIG_NFS_V4 is not set
999# CONFIG_NFS_DIRECTIO is not set
1000# CONFIG_NFSD is not set
1001CONFIG_LOCKD=y
1002CONFIG_LOCKD_V4=y
1003CONFIG_NFS_COMMON=y
1004CONFIG_SUNRPC=y
1005# CONFIG_RPCSEC_GSS_KRB5 is not set
1006# CONFIG_RPCSEC_GSS_SPKM3 is not set
1007# CONFIG_SMB_FS is not set
1008# CONFIG_CIFS is not set
1009# CONFIG_NCP_FS is not set
1010# CONFIG_CODA_FS is not set
1011# CONFIG_AFS_FS is not set
1012# CONFIG_9P_FS is not set
1013
1014#
1015# Partition Types
1016#
1017# CONFIG_PARTITION_ADVANCED is not set
1018CONFIG_MSDOS_PARTITION=y
1019
1020#
1021# Native Language Support
1022#
1023# CONFIG_NLS is not set
1024
1025#
1026# Distributed Lock Manager
1027#
1028CONFIG_DLM=m
1029CONFIG_DLM_TCP=y
1030# CONFIG_DLM_SCTP is not set
1031# CONFIG_DLM_DEBUG is not set
1032
1033#
1034# Profiling support
1035#
1036# CONFIG_PROFILING is not set
1037
1038#
1039# Kernel hacking
1040#
1041CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1042# CONFIG_PRINTK_TIME is not set
1043CONFIG_ENABLE_MUST_CHECK=y
1044# CONFIG_MAGIC_SYSRQ is not set
1045# CONFIG_UNUSED_SYMBOLS is not set
1046# CONFIG_DEBUG_FS is not set
1047# CONFIG_HEADERS_CHECK is not set
1048# CONFIG_DEBUG_KERNEL is not set
1049CONFIG_LOG_BUF_SHIFT=14
1050CONFIG_CROSSCOMPILE=y
1051CONFIG_CMDLINE=""
1052
1053#
1054# Security options
1055#
1056CONFIG_KEYS=y
1057CONFIG_KEYS_DEBUG_PROC_KEYS=y
1058# CONFIG_SECURITY is not set
1059
1060#
1061# Cryptographic options
1062#
1063CONFIG_CRYPTO=y
1064CONFIG_CRYPTO_ALGAPI=y
1065CONFIG_CRYPTO_BLKCIPHER=m
1066CONFIG_CRYPTO_HASH=y
1067CONFIG_CRYPTO_MANAGER=y
1068CONFIG_CRYPTO_HMAC=y
1069CONFIG_CRYPTO_XCBC=m
1070CONFIG_CRYPTO_NULL=m
1071CONFIG_CRYPTO_MD4=m
1072CONFIG_CRYPTO_MD5=y
1073CONFIG_CRYPTO_SHA1=m
1074CONFIG_CRYPTO_SHA256=m
1075CONFIG_CRYPTO_SHA512=m
1076CONFIG_CRYPTO_WP512=m
1077CONFIG_CRYPTO_TGR192=m
1078CONFIG_CRYPTO_GF128MUL=m
1079CONFIG_CRYPTO_ECB=m
1080CONFIG_CRYPTO_CBC=m
1081CONFIG_CRYPTO_PCBC=m
1082CONFIG_CRYPTO_LRW=m
1083CONFIG_CRYPTO_DES=m
1084CONFIG_CRYPTO_FCRYPT=m
1085CONFIG_CRYPTO_BLOWFISH=m
1086CONFIG_CRYPTO_TWOFISH=m
1087CONFIG_CRYPTO_TWOFISH_COMMON=m
1088CONFIG_CRYPTO_SERPENT=m
1089CONFIG_CRYPTO_AES=m
1090CONFIG_CRYPTO_CAST5=m
1091CONFIG_CRYPTO_CAST6=m
1092CONFIG_CRYPTO_TEA=m
1093CONFIG_CRYPTO_ARC4=m
1094CONFIG_CRYPTO_KHAZAD=m
1095CONFIG_CRYPTO_ANUBIS=m
1096CONFIG_CRYPTO_DEFLATE=m
1097CONFIG_CRYPTO_MICHAEL_MIC=m
1098CONFIG_CRYPTO_CRC32C=m
1099CONFIG_CRYPTO_CAMELLIA=m
1100# CONFIG_CRYPTO_TEST is not set
1101
1102#
1103# Hardware crypto devices
1104#
1105
1106#
1107# Library routines
1108#
1109CONFIG_BITREVERSE=y
1110# CONFIG_CRC_CCITT is not set
1111CONFIG_CRC16=m
1112CONFIG_CRC32=y
1113CONFIG_LIBCRC32C=m
1114CONFIG_ZLIB_INFLATE=m
1115CONFIG_ZLIB_DEFLATE=m
1116CONFIG_PLIST=y
1117CONFIG_HAS_IOMEM=y
1118CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig
index 1f64d7632a03..546cb243fd09 100644
--- a/arch/mips/configs/malta_defconfig
+++ b/arch/mips/configs/malta_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32CONFIG_MIPS_MALTA=y 30CONFIG_MIPS_MALTA=y
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_MIPS_MALTA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/mipssim_defconfig b/arch/mips/configs/mipssim_defconfig
index a2db5c201216..6abad6f88313 100644
--- a/arch/mips/configs/mipssim_defconfig
+++ b/arch/mips/configs/mipssim_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35CONFIG_MIPS_SIM=y 33CONFIG_MIPS_SIM=y
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
@@ -496,36 +492,23 @@ CONFIG_NETDEVICES=y
496# CONFIG_BONDING is not set 492# CONFIG_BONDING is not set
497# CONFIG_EQUALIZER is not set 493# CONFIG_EQUALIZER is not set
498# CONFIG_TUN is not set 494# CONFIG_TUN is not set
499 495# CONFIG_PHYLIB is not set
500#
501# PHY device support
502#
503 496
504# 497#
505# Ethernet (10 or 100Mbit) 498# Ethernet (10 or 100Mbit)
506# 499#
507# CONFIG_NET_ETHERNET is not set 500CONFIG_NET_ETHERNET=y
508 501# CONFIG_MII is not set
509# 502CONFIG_MIPS_SIM_NET=y
510# Ethernet (1000 Mbit) 503# CONFIG_DM9000 is not set
511# 504# CONFIG_NETDEV_1000 is not set
512 505# CONFIG_NETDEV_10000 is not set
513#
514# Ethernet (10000 Mbit)
515#
516
517#
518# Token Ring devices
519#
520
521#
522# Wireless LAN (non-hamradio)
523#
524# CONFIG_NET_RADIO is not set
525 506
526# 507#
527# Wan interfaces 508# Wireless LAN
528# 509#
510# CONFIG_WLAN_PRE80211 is not set
511# CONFIG_WLAN_80211 is not set
529# CONFIG_WAN is not set 512# CONFIG_WAN is not set
530# CONFIG_PPP is not set 513# CONFIG_PPP is not set
531# CONFIG_SLIP is not set 514# CONFIG_SLIP is not set
diff --git a/arch/mips/configs/mpc30x_defconfig b/arch/mips/configs/mpc30x_defconfig
index ad5c0bf87b2b..4981ce425d82 100644
--- a/arch/mips/configs/mpc30x_defconfig
+++ b/arch/mips/configs/mpc30x_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/ocelot_3_defconfig b/arch/mips/configs/msp71xx_defconfig
index 28547313ce13..adca5f7ba533 100644
--- a/arch/mips/configs/ocelot_3_defconfig
+++ b/arch/mips/configs/msp71xx_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.20 3# Linux kernel version: 2.6.21-rc4
4# Tue Feb 20 21:47:35 2007 4# Thu Apr 26 18:11:29 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,14 +33,13 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38CONFIG_MOMENCO_OCELOT_3=y
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
43# CONFIG_PNX8550_STB810 is not set 39# CONFIG_PNX8550_STB810 is not set
44# CONFIG_DDB5477 is not set 40# CONFIG_DDB5477 is not set
45# CONFIG_MACH_VR41XX is not set 41# CONFIG_MACH_VR41XX is not set
42CONFIG_PMC_MSP=y
46# CONFIG_PMC_YOSEMITE is not set 43# CONFIG_PMC_YOSEMITE is not set
47# CONFIG_QEMU is not set 44# CONFIG_QEMU is not set
48# CONFIG_MARKEINS is not set 45# CONFIG_MARKEINS is not set
@@ -62,6 +59,16 @@ CONFIG_MOMENCO_OCELOT_3=y
62# CONFIG_TOSHIBA_JMR3927 is not set 59# CONFIG_TOSHIBA_JMR3927 is not set
63# CONFIG_TOSHIBA_RBTX4927 is not set 60# CONFIG_TOSHIBA_RBTX4927 is not set
64# CONFIG_TOSHIBA_RBTX4938 is not set 61# CONFIG_TOSHIBA_RBTX4938 is not set
62# CONFIG_PMC_MSP4200_EVAL is not set
63# CONFIG_PMC_MSP4200_GW is not set
64# CONFIG_PMC_MSP7120_EVAL is not set
65CONFIG_PMC_MSP7120_GW=y
66# CONFIG_PMC_MSP7120_FPGA is not set
67
68#
69# Options for PMC-Sierra MSP chipsets
70#
71CONFIG_PMC_MSP_EMBEDDED_ROOTFS=y
65CONFIG_RWSEM_GENERIC_SPINLOCK=y 72CONFIG_RWSEM_GENERIC_SPINLOCK=y
66# CONFIG_ARCH_HAS_ILOG2_U32 is not set 73# CONFIG_ARCH_HAS_ILOG2_U32 is not set
67# CONFIG_ARCH_HAS_ILOG2_U64 is not set 74# CONFIG_ARCH_HAS_ILOG2_U64 is not set
@@ -71,24 +78,24 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y
71CONFIG_GENERIC_TIME=y 78CONFIG_GENERIC_TIME=y
72CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 79CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
73# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set 80# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
81CONFIG_BOOT_RAW=y
74CONFIG_DMA_NONCOHERENT=y 82CONFIG_DMA_NONCOHERENT=y
75CONFIG_DMA_NEED_PCI_MAP_STATE=y 83CONFIG_DMA_NEED_PCI_MAP_STATE=y
84CONFIG_NO_EXCEPT_FILL=y
76CONFIG_CPU_BIG_ENDIAN=y 85CONFIG_CPU_BIG_ENDIAN=y
77# CONFIG_CPU_LITTLE_ENDIAN is not set 86# CONFIG_CPU_LITTLE_ENDIAN is not set
78CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 87CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
79CONFIG_IRQ_CPU=y 88CONFIG_IRQ_CPU=y
80CONFIG_IRQ_CPU_RM7K=y 89CONFIG_IRQ_MSP_CIC=y
81CONFIG_IRQ_MV64340=y 90CONFIG_MSP_USB=y
82CONFIG_PCI_MARVELL=y
83CONFIG_SWAP_IO_SPACE=y 91CONFIG_SWAP_IO_SPACE=y
84CONFIG_BOOT_ELF32=y
85CONFIG_MIPS_L1_CACHE_SHIFT=5 92CONFIG_MIPS_L1_CACHE_SHIFT=5
86 93
87# 94#
88# CPU selection 95# CPU selection
89# 96#
90# CONFIG_CPU_MIPS32_R1 is not set 97# CONFIG_CPU_MIPS32_R1 is not set
91# CONFIG_CPU_MIPS32_R2 is not set 98CONFIG_CPU_MIPS32_R2=y
92# CONFIG_CPU_MIPS64_R1 is not set 99# CONFIG_CPU_MIPS64_R1 is not set
93# CONFIG_CPU_MIPS64_R2 is not set 100# CONFIG_CPU_MIPS64_R2 is not set
94# CONFIG_CPU_R3000 is not set 101# CONFIG_CPU_R3000 is not set
@@ -104,14 +111,14 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
104# CONFIG_CPU_R8000 is not set 111# CONFIG_CPU_R8000 is not set
105# CONFIG_CPU_R10000 is not set 112# CONFIG_CPU_R10000 is not set
106# CONFIG_CPU_RM7000 is not set 113# CONFIG_CPU_RM7000 is not set
107CONFIG_CPU_RM9000=y 114# CONFIG_CPU_RM9000 is not set
108# CONFIG_CPU_SB1 is not set 115# CONFIG_CPU_SB1 is not set
109CONFIG_SYS_HAS_CPU_RM9000=y 116CONFIG_SYS_HAS_CPU_MIPS32_R1=y
110CONFIG_WEAK_ORDERING=y 117CONFIG_SYS_HAS_CPU_MIPS32_R2=y
118CONFIG_CPU_MIPS32=y
119CONFIG_CPU_MIPSR2=y
111CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 120CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
112CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
113CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 121CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
114CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
115 122
116# 123#
117# Kernel type 124# Kernel type
@@ -122,13 +129,12 @@ CONFIG_PAGE_SIZE_4KB=y
122# CONFIG_PAGE_SIZE_8KB is not set 129# CONFIG_PAGE_SIZE_8KB is not set
123# CONFIG_PAGE_SIZE_16KB is not set 130# CONFIG_PAGE_SIZE_16KB is not set
124# CONFIG_PAGE_SIZE_64KB is not set 131# CONFIG_PAGE_SIZE_64KB is not set
125CONFIG_BOARD_SCACHE=y
126CONFIG_RM7000_CPU_SCACHE=y
127CONFIG_CPU_HAS_PREFETCH=y 132CONFIG_CPU_HAS_PREFETCH=y
128CONFIG_MIPS_MT_DISABLED=y 133CONFIG_MIPS_MT_DISABLED=y
129# CONFIG_MIPS_MT_SMP is not set 134# CONFIG_MIPS_MT_SMP is not set
130# CONFIG_MIPS_MT_SMTC is not set 135# CONFIG_MIPS_MT_SMTC is not set
131# CONFIG_MIPS_VPE_LOADER is not set 136# CONFIG_MIPS_VPE_LOADER is not set
137CONFIG_SYS_SUPPORTS_MULTITHREADING=y
132# CONFIG_64BIT_PHYS_ADDR is not set 138# CONFIG_64BIT_PHYS_ADDR is not set
133CONFIG_CPU_HAS_LLSC=y 139CONFIG_CPU_HAS_LLSC=y
134CONFIG_CPU_HAS_SYNC=y 140CONFIG_CPU_HAS_SYNC=y
@@ -149,15 +155,16 @@ CONFIG_ZONE_DMA_FLAG=1
149# CONFIG_HZ_48 is not set 155# CONFIG_HZ_48 is not set
150# CONFIG_HZ_100 is not set 156# CONFIG_HZ_100 is not set
151# CONFIG_HZ_128 is not set 157# CONFIG_HZ_128 is not set
152# CONFIG_HZ_250 is not set 158CONFIG_HZ_250=y
153# CONFIG_HZ_256 is not set 159# CONFIG_HZ_256 is not set
154CONFIG_HZ_1000=y 160# CONFIG_HZ_1000 is not set
155# CONFIG_HZ_1024 is not set 161# CONFIG_HZ_1024 is not set
156CONFIG_SYS_SUPPORTS_ARBIT_HZ=y 162CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
157CONFIG_HZ=1000 163CONFIG_HZ=250
158CONFIG_PREEMPT_NONE=y 164# CONFIG_PREEMPT_NONE is not set
159# CONFIG_PREEMPT_VOLUNTARY is not set 165# CONFIG_PREEMPT_VOLUNTARY is not set
160# CONFIG_PREEMPT is not set 166CONFIG_PREEMPT=y
167# CONFIG_PREEMPT_BKL is not set
161# CONFIG_KEXEC is not set 168# CONFIG_KEXEC is not set
162CONFIG_LOCKDEP_SUPPORT=y 169CONFIG_LOCKDEP_SUPPORT=y
163CONFIG_STACKTRACE_SUPPORT=y 170CONFIG_STACKTRACE_SUPPORT=y
@@ -168,14 +175,15 @@ CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
168# 175#
169CONFIG_EXPERIMENTAL=y 176CONFIG_EXPERIMENTAL=y
170CONFIG_BROKEN_ON_SMP=y 177CONFIG_BROKEN_ON_SMP=y
178CONFIG_LOCK_KERNEL=y
171CONFIG_INIT_ENV_ARG_LIMIT=32 179CONFIG_INIT_ENV_ARG_LIMIT=32
172 180
173# 181#
174# General setup 182# General setup
175# 183#
176CONFIG_LOCALVERSION="" 184CONFIG_LOCALVERSION="-pmc"
177CONFIG_LOCALVERSION_AUTO=y 185CONFIG_LOCALVERSION_AUTO=y
178CONFIG_SWAP=y 186# CONFIG_SWAP is not set
179CONFIG_SYSVIPC=y 187CONFIG_SYSVIPC=y
180# CONFIG_IPC_NS is not set 188# CONFIG_IPC_NS is not set
181CONFIG_SYSVIPC_SYSCTL=y 189CONFIG_SYSVIPC_SYSCTL=y
@@ -184,15 +192,16 @@ CONFIG_SYSVIPC_SYSCTL=y
184# CONFIG_TASKSTATS is not set 192# CONFIG_TASKSTATS is not set
185# CONFIG_UTS_NS is not set 193# CONFIG_UTS_NS is not set
186# CONFIG_AUDIT is not set 194# CONFIG_AUDIT is not set
187CONFIG_IKCONFIG=y 195# CONFIG_IKCONFIG is not set
188CONFIG_IKCONFIG_PROC=y
189CONFIG_SYSFS_DEPRECATED=y 196CONFIG_SYSFS_DEPRECATED=y
190CONFIG_RELAY=y 197# CONFIG_RELAY is not set
198# CONFIG_BLK_DEV_INITRD is not set
191# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 199# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
192CONFIG_SYSCTL=y 200CONFIG_SYSCTL=y
193CONFIG_EMBEDDED=y 201CONFIG_EMBEDDED=y
194CONFIG_SYSCTL_SYSCALL=y 202CONFIG_SYSCTL_SYSCALL=y
195CONFIG_KALLSYMS=y 203CONFIG_KALLSYMS=y
204# CONFIG_KALLSYMS_ALL is not set
196# CONFIG_KALLSYMS_EXTRA_PASS is not set 205# CONFIG_KALLSYMS_EXTRA_PASS is not set
197CONFIG_HOTPLUG=y 206CONFIG_HOTPLUG=y
198CONFIG_PRINTK=y 207CONFIG_PRINTK=y
@@ -201,11 +210,11 @@ CONFIG_ELF_CORE=y
201CONFIG_BASE_FULL=y 210CONFIG_BASE_FULL=y
202CONFIG_FUTEX=y 211CONFIG_FUTEX=y
203CONFIG_EPOLL=y 212CONFIG_EPOLL=y
204CONFIG_SHMEM=y 213# CONFIG_SHMEM is not set
205CONFIG_SLAB=y 214CONFIG_SLAB=y
206CONFIG_VM_EVENT_COUNTERS=y 215CONFIG_VM_EVENT_COUNTERS=y
207CONFIG_RT_MUTEXES=y 216CONFIG_RT_MUTEXES=y
208# CONFIG_TINY_SHMEM is not set 217CONFIG_TINY_SHMEM=y
209CONFIG_BASE_SMALL=0 218CONFIG_BASE_SMALL=0
210# CONFIG_SLOB is not set 219# CONFIG_SLOB is not set
211 220
@@ -232,8 +241,8 @@ CONFIG_BLOCK=y
232# 241#
233CONFIG_IOSCHED_NOOP=y 242CONFIG_IOSCHED_NOOP=y
234CONFIG_IOSCHED_AS=y 243CONFIG_IOSCHED_AS=y
235CONFIG_IOSCHED_DEADLINE=y 244# CONFIG_IOSCHED_DEADLINE is not set
236CONFIG_IOSCHED_CFQ=y 245# CONFIG_IOSCHED_CFQ is not set
237CONFIG_DEFAULT_AS=y 246CONFIG_DEFAULT_AS=y
238# CONFIG_DEFAULT_DEADLINE is not set 247# CONFIG_DEFAULT_DEADLINE is not set
239# CONFIG_DEFAULT_CFQ is not set 248# CONFIG_DEFAULT_CFQ is not set
@@ -245,6 +254,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
245# 254#
246CONFIG_HW_HAS_PCI=y 255CONFIG_HW_HAS_PCI=y
247CONFIG_PCI=y 256CONFIG_PCI=y
257# CONFIG_PCI_DEBUG is not set
248CONFIG_MMU=y 258CONFIG_MMU=y
249 259
250# 260#
@@ -267,10 +277,7 @@ CONFIG_TRAD_SIGNALS=y
267# 277#
268# Power management options 278# Power management options
269# 279#
270CONFIG_PM=y 280# CONFIG_PM is not set
271# CONFIG_PM_LEGACY is not set
272# CONFIG_PM_DEBUG is not set
273# CONFIG_PM_SYSFS_DEPRECATED is not set
274 281
275# 282#
276# Networking 283# Networking
@@ -281,17 +288,16 @@ CONFIG_NET=y
281# Networking options 288# Networking options
282# 289#
283# CONFIG_NETDEBUG is not set 290# CONFIG_NETDEBUG is not set
284CONFIG_PACKET=y 291# CONFIG_PACKET is not set
285# CONFIG_PACKET_MMAP is not set
286CONFIG_UNIX=y 292CONFIG_UNIX=y
287CONFIG_XFRM=y 293CONFIG_XFRM=y
288# CONFIG_XFRM_USER is not set 294CONFIG_XFRM_USER=y
289# CONFIG_XFRM_SUB_POLICY is not set 295# CONFIG_XFRM_SUB_POLICY is not set
290CONFIG_XFRM_MIGRATE=y 296# CONFIG_XFRM_MIGRATE is not set
291CONFIG_NET_KEY=y 297CONFIG_NET_KEY=y
292CONFIG_NET_KEY_MIGRATE=y 298# CONFIG_NET_KEY_MIGRATE is not set
293CONFIG_INET=y 299CONFIG_INET=y
294# CONFIG_IP_MULTICAST is not set 300CONFIG_IP_MULTICAST=y
295# CONFIG_IP_ADVANCED_ROUTER is not set 301# CONFIG_IP_ADVANCED_ROUTER is not set
296CONFIG_IP_FIB_HASH=y 302CONFIG_IP_FIB_HASH=y
297CONFIG_IP_PNP=y 303CONFIG_IP_PNP=y
@@ -300,122 +306,92 @@ CONFIG_IP_PNP_BOOTP=y
300# CONFIG_IP_PNP_RARP is not set 306# CONFIG_IP_PNP_RARP is not set
301# CONFIG_NET_IPIP is not set 307# CONFIG_NET_IPIP is not set
302# CONFIG_NET_IPGRE is not set 308# CONFIG_NET_IPGRE is not set
309# CONFIG_IP_MROUTE is not set
303# CONFIG_ARPD is not set 310# CONFIG_ARPD is not set
304# CONFIG_SYN_COOKIES is not set 311# CONFIG_SYN_COOKIES is not set
305# CONFIG_INET_AH is not set 312CONFIG_INET_AH=y
306# CONFIG_INET_ESP is not set 313CONFIG_INET_ESP=y
307# CONFIG_INET_IPCOMP is not set 314CONFIG_INET_IPCOMP=y
308# CONFIG_INET_XFRM_TUNNEL is not set 315CONFIG_INET_XFRM_TUNNEL=y
309CONFIG_INET_TUNNEL=m 316CONFIG_INET_TUNNEL=y
310CONFIG_INET_XFRM_MODE_TRANSPORT=m 317CONFIG_INET_XFRM_MODE_TRANSPORT=y
311CONFIG_INET_XFRM_MODE_TUNNEL=m 318CONFIG_INET_XFRM_MODE_TUNNEL=y
312CONFIG_INET_XFRM_MODE_BEET=m 319CONFIG_INET_XFRM_MODE_BEET=y
313CONFIG_INET_DIAG=y 320CONFIG_INET_DIAG=y
314CONFIG_INET_TCP_DIAG=y 321CONFIG_INET_TCP_DIAG=y
315# CONFIG_TCP_CONG_ADVANCED is not set 322# CONFIG_TCP_CONG_ADVANCED is not set
316CONFIG_TCP_CONG_CUBIC=y 323CONFIG_TCP_CONG_CUBIC=y
317CONFIG_DEFAULT_TCP_CONG="cubic" 324CONFIG_DEFAULT_TCP_CONG="cubic"
318CONFIG_TCP_MD5SIG=y 325# CONFIG_TCP_MD5SIG is not set
319 326
320# 327#
321# IP: Virtual Server Configuration 328# IP: Virtual Server Configuration
322# 329#
323# CONFIG_IP_VS is not set 330# CONFIG_IP_VS is not set
324CONFIG_IPV6=m 331# CONFIG_IPV6 is not set
325# CONFIG_IPV6_PRIVACY is not set
326CONFIG_IPV6_ROUTER_PREF=y
327CONFIG_IPV6_ROUTE_INFO=y
328# CONFIG_INET6_AH is not set
329# CONFIG_INET6_ESP is not set
330# CONFIG_INET6_IPCOMP is not set
331CONFIG_IPV6_MIP6=y
332# CONFIG_INET6_XFRM_TUNNEL is not set 332# CONFIG_INET6_XFRM_TUNNEL is not set
333# CONFIG_INET6_TUNNEL is not set 333# CONFIG_INET6_TUNNEL is not set
334CONFIG_INET6_XFRM_MODE_TRANSPORT=m 334# CONFIG_NETWORK_SECMARK is not set
335CONFIG_INET6_XFRM_MODE_TUNNEL=m
336CONFIG_INET6_XFRM_MODE_BEET=m
337CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
338CONFIG_IPV6_SIT=m
339# CONFIG_IPV6_TUNNEL is not set
340CONFIG_IPV6_MULTIPLE_TABLES=y
341CONFIG_IPV6_SUBTREES=y
342CONFIG_NETWORK_SECMARK=y
343CONFIG_NETFILTER=y 335CONFIG_NETFILTER=y
344# CONFIG_NETFILTER_DEBUG is not set 336# CONFIG_NETFILTER_DEBUG is not set
337CONFIG_BRIDGE_NETFILTER=y
345 338
346# 339#
347# Core Netfilter Configuration 340# Core Netfilter Configuration
348# 341#
349CONFIG_NETFILTER_NETLINK=m 342# CONFIG_NETFILTER_NETLINK is not set
350CONFIG_NETFILTER_NETLINK_QUEUE=m 343# CONFIG_NF_CONNTRACK_ENABLED is not set
351CONFIG_NETFILTER_NETLINK_LOG=m 344CONFIG_NETFILTER_XTABLES=y
352CONFIG_NF_CONNTRACK_ENABLED=m 345# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
353CONFIG_NF_CONNTRACK_SUPPORT=y 346# CONFIG_NETFILTER_XT_TARGET_MARK is not set
354# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set 347# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
355CONFIG_NF_CONNTRACK=m 348# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
356CONFIG_NF_CT_ACCT=y 349# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
357CONFIG_NF_CONNTRACK_MARK=y 350# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
358CONFIG_NF_CONNTRACK_SECMARK=y 351# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
359CONFIG_NF_CONNTRACK_EVENTS=y 352# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
360CONFIG_NF_CT_PROTO_GRE=m 353# CONFIG_NETFILTER_XT_MATCH_ESP is not set
361CONFIG_NF_CT_PROTO_SCTP=m 354# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
362CONFIG_NF_CONNTRACK_AMANDA=m 355# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
363CONFIG_NF_CONNTRACK_FTP=m 356# CONFIG_NETFILTER_XT_MATCH_MAC is not set
364CONFIG_NF_CONNTRACK_H323=m 357# CONFIG_NETFILTER_XT_MATCH_MARK is not set
365CONFIG_NF_CONNTRACK_IRC=m 358# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
366# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set 359# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
367CONFIG_NF_CONNTRACK_PPTP=m 360# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
368CONFIG_NF_CONNTRACK_SANE=m 361# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
369CONFIG_NF_CONNTRACK_SIP=m 362# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
370CONFIG_NF_CONNTRACK_TFTP=m 363# CONFIG_NETFILTER_XT_MATCH_REALM is not set
371CONFIG_NF_CT_NETLINK=m 364# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
372CONFIG_NETFILTER_XTABLES=m 365# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
373CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 366# CONFIG_NETFILTER_XT_MATCH_STRING is not set
374CONFIG_NETFILTER_XT_TARGET_MARK=m 367# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
375CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 368# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
376CONFIG_NETFILTER_XT_TARGET_NFLOG=m
377CONFIG_NETFILTER_XT_TARGET_SECMARK=m
378CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
379CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
380CONFIG_NETFILTER_XT_MATCH_COMMENT=m
381CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
382CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
383CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
384CONFIG_NETFILTER_XT_MATCH_DCCP=m
385CONFIG_NETFILTER_XT_MATCH_DSCP=m
386CONFIG_NETFILTER_XT_MATCH_ESP=m
387CONFIG_NETFILTER_XT_MATCH_HELPER=m
388CONFIG_NETFILTER_XT_MATCH_LENGTH=m
389CONFIG_NETFILTER_XT_MATCH_LIMIT=m
390CONFIG_NETFILTER_XT_MATCH_MAC=m
391CONFIG_NETFILTER_XT_MATCH_MARK=m
392CONFIG_NETFILTER_XT_MATCH_POLICY=m
393CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
394CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
395CONFIG_NETFILTER_XT_MATCH_QUOTA=m
396CONFIG_NETFILTER_XT_MATCH_REALM=m
397CONFIG_NETFILTER_XT_MATCH_SCTP=m
398CONFIG_NETFILTER_XT_MATCH_STATE=m
399CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
400CONFIG_NETFILTER_XT_MATCH_STRING=m
401CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
402CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
403 369
404# 370#
405# IP: Netfilter Configuration 371# IP: Netfilter Configuration
406# 372#
407CONFIG_NF_CONNTRACK_IPV4=m
408CONFIG_NF_CONNTRACK_PROC_COMPAT=y
409# CONFIG_IP_NF_QUEUE is not set 373# CONFIG_IP_NF_QUEUE is not set
410# CONFIG_IP_NF_IPTABLES is not set 374CONFIG_IP_NF_IPTABLES=y
375# CONFIG_IP_NF_MATCH_IPRANGE is not set
376# CONFIG_IP_NF_MATCH_TOS is not set
377# CONFIG_IP_NF_MATCH_RECENT is not set
378# CONFIG_IP_NF_MATCH_ECN is not set
379# CONFIG_IP_NF_MATCH_AH is not set
380# CONFIG_IP_NF_MATCH_TTL is not set
381# CONFIG_IP_NF_MATCH_OWNER is not set
382# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
383CONFIG_IP_NF_FILTER=y
384CONFIG_IP_NF_TARGET_REJECT=y
385# CONFIG_IP_NF_TARGET_LOG is not set
386# CONFIG_IP_NF_TARGET_ULOG is not set
387# CONFIG_IP_NF_MANGLE is not set
388# CONFIG_IP_NF_RAW is not set
411# CONFIG_IP_NF_ARPTABLES is not set 389# CONFIG_IP_NF_ARPTABLES is not set
412 390
413# 391#
414# IPv6: Netfilter Configuration (EXPERIMENTAL) 392# Bridge: Netfilter Configuration
415# 393#
416CONFIG_NF_CONNTRACK_IPV6=m 394# CONFIG_BRIDGE_NF_EBTABLES is not set
417# CONFIG_IP6_NF_QUEUE is not set
418# CONFIG_IP6_NF_IPTABLES is not set
419 395
420# 396#
421# DCCP Configuration (EXPERIMENTAL) 397# DCCP Configuration (EXPERIMENTAL)
@@ -432,9 +408,10 @@ CONFIG_NF_CONNTRACK_IPV6=m
432# 408#
433# CONFIG_TIPC is not set 409# CONFIG_TIPC is not set
434# CONFIG_ATM is not set 410# CONFIG_ATM is not set
435# CONFIG_BRIDGE is not set 411CONFIG_BRIDGE=y
436# CONFIG_VLAN_8021Q is not set 412# CONFIG_VLAN_8021Q is not set
437# CONFIG_DECNET is not set 413# CONFIG_DECNET is not set
414CONFIG_LLC=y
438# CONFIG_LLC2 is not set 415# CONFIG_LLC2 is not set
439# CONFIG_IPX is not set 416# CONFIG_IPX is not set
440# CONFIG_ATALK is not set 417# CONFIG_ATALK is not set
@@ -447,7 +424,6 @@ CONFIG_NF_CONNTRACK_IPV6=m
447# QoS and/or fair queueing 424# QoS and/or fair queueing
448# 425#
449# CONFIG_NET_SCHED is not set 426# CONFIG_NET_SCHED is not set
450CONFIG_NET_CLS_ROUTE=y
451 427
452# 428#
453# Network testing 429# Network testing
@@ -456,14 +432,8 @@ CONFIG_NET_CLS_ROUTE=y
456# CONFIG_HAMRADIO is not set 432# CONFIG_HAMRADIO is not set
457# CONFIG_IRDA is not set 433# CONFIG_IRDA is not set
458# CONFIG_BT is not set 434# CONFIG_BT is not set
459CONFIG_IEEE80211=m 435# CONFIG_IEEE80211 is not set
460# CONFIG_IEEE80211_DEBUG is not set
461CONFIG_IEEE80211_CRYPT_WEP=m
462CONFIG_IEEE80211_CRYPT_CCMP=m
463CONFIG_IEEE80211_SOFTMAC=m
464# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
465CONFIG_WIRELESS_EXT=y 436CONFIG_WIRELESS_EXT=y
466CONFIG_FIB_RULES=y
467 437
468# 438#
469# Device Drivers 439# Device Drivers
@@ -473,19 +443,101 @@ CONFIG_FIB_RULES=y
473# Generic Driver Options 443# Generic Driver Options
474# 444#
475CONFIG_STANDALONE=y 445CONFIG_STANDALONE=y
476CONFIG_PREVENT_FIRMWARE_BUILD=y 446# CONFIG_PREVENT_FIRMWARE_BUILD is not set
477CONFIG_FW_LOADER=m 447# CONFIG_FW_LOADER is not set
448# CONFIG_DEBUG_DRIVER is not set
449# CONFIG_DEBUG_DEVRES is not set
478# CONFIG_SYS_HYPERVISOR is not set 450# CONFIG_SYS_HYPERVISOR is not set
479 451
480# 452#
481# Connector - unified userspace <-> kernelspace linker 453# Connector - unified userspace <-> kernelspace linker
482# 454#
483CONFIG_CONNECTOR=m 455# CONFIG_CONNECTOR is not set
484 456
485# 457#
486# Memory Technology Devices (MTD) 458# Memory Technology Devices (MTD)
487# 459#
488# CONFIG_MTD is not set 460CONFIG_MTD=y
461# CONFIG_MTD_DEBUG is not set
462# CONFIG_MTD_CONCAT is not set
463CONFIG_MTD_PARTITIONS=y
464# CONFIG_MTD_REDBOOT_PARTS is not set
465# CONFIG_MTD_CMDLINE_PARTS is not set
466
467#
468# User Modules And Translation Layers
469#
470CONFIG_MTD_CHAR=y
471CONFIG_MTD_BLKDEVS=y
472CONFIG_MTD_BLOCK=y
473# CONFIG_FTL is not set
474# CONFIG_NFTL is not set
475# CONFIG_INFTL is not set
476# CONFIG_RFD_FTL is not set
477# CONFIG_SSFDC is not set
478
479#
480# RAM/ROM/Flash chip drivers
481#
482CONFIG_MTD_CFI=y
483# CONFIG_MTD_JEDECPROBE is not set
484CONFIG_MTD_GEN_PROBE=y
485# CONFIG_MTD_CFI_ADV_OPTIONS is not set
486CONFIG_MTD_MAP_BANK_WIDTH_1=y
487CONFIG_MTD_MAP_BANK_WIDTH_2=y
488CONFIG_MTD_MAP_BANK_WIDTH_4=y
489# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
490# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
491# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
492CONFIG_MTD_CFI_I1=y
493CONFIG_MTD_CFI_I2=y
494# CONFIG_MTD_CFI_I4 is not set
495# CONFIG_MTD_CFI_I8 is not set
496# CONFIG_MTD_CFI_INTELEXT is not set
497CONFIG_MTD_CFI_AMDSTD=y
498# CONFIG_MTD_CFI_STAA is not set
499CONFIG_MTD_CFI_UTIL=y
500CONFIG_MTD_RAM=y
501# CONFIG_MTD_ROM is not set
502# CONFIG_MTD_ABSENT is not set
503# CONFIG_MTD_OBSOLETE_CHIPS is not set
504
505#
506# Mapping drivers for chip access
507#
508# CONFIG_MTD_COMPLEX_MAPPINGS is not set
509# CONFIG_MTD_PHYSMAP is not set
510CONFIG_MTD_PMC_MSP_EVM=y
511CONFIG_MSP_FLASH_MAP_LIMIT_32M=y
512CONFIG_MSP_FLASH_MAP_LIMIT=0x02000000
513CONFIG_MTD_PMC_MSP_RAMROOT=y
514# CONFIG_MTD_PLATRAM is not set
515
516#
517# Self-contained MTD device drivers
518#
519# CONFIG_MTD_PMC551 is not set
520# CONFIG_MTD_SLRAM is not set
521# CONFIG_MTD_PHRAM is not set
522# CONFIG_MTD_MTDRAM is not set
523# CONFIG_MTD_BLOCK2MTD is not set
524
525#
526# Disk-On-Chip Device Drivers
527#
528# CONFIG_MTD_DOC2000 is not set
529# CONFIG_MTD_DOC2001 is not set
530# CONFIG_MTD_DOC2001PLUS is not set
531
532#
533# NAND Flash Device Drivers
534#
535# CONFIG_MTD_NAND is not set
536
537#
538# OneNAND Flash Device Drivers
539#
540# CONFIG_MTD_ONENAND is not set
489 541
490# 542#
491# Parallel port support 543# Parallel port support
@@ -505,19 +557,21 @@ CONFIG_CONNECTOR=m
505# CONFIG_BLK_DEV_DAC960 is not set 557# CONFIG_BLK_DEV_DAC960 is not set
506# CONFIG_BLK_DEV_UMEM is not set 558# CONFIG_BLK_DEV_UMEM is not set
507# CONFIG_BLK_DEV_COW_COMMON is not set 559# CONFIG_BLK_DEV_COW_COMMON is not set
508CONFIG_BLK_DEV_LOOP=y 560# CONFIG_BLK_DEV_LOOP is not set
509# CONFIG_BLK_DEV_CRYPTOLOOP is not set
510# CONFIG_BLK_DEV_NBD is not set 561# CONFIG_BLK_DEV_NBD is not set
511# CONFIG_BLK_DEV_SX8 is not set 562# CONFIG_BLK_DEV_SX8 is not set
512# CONFIG_BLK_DEV_RAM is not set 563# CONFIG_BLK_DEV_UB is not set
513# CONFIG_BLK_DEV_INITRD is not set 564CONFIG_BLK_DEV_RAM=y
565CONFIG_BLK_DEV_RAM_COUNT=16
566CONFIG_BLK_DEV_RAM_SIZE=4096
567CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
514# CONFIG_CDROM_PKTCDVD is not set 568# CONFIG_CDROM_PKTCDVD is not set
515CONFIG_ATA_OVER_ETH=m 569# CONFIG_ATA_OVER_ETH is not set
516 570
517# 571#
518# Misc devices 572# Misc devices
519# 573#
520CONFIG_SGI_IOC4=m 574# CONFIG_SGI_IOC4 is not set
521# CONFIG_TIFM_CORE is not set 575# CONFIG_TIFM_CORE is not set
522 576
523# 577#
@@ -528,16 +582,16 @@ CONFIG_SGI_IOC4=m
528# 582#
529# SCSI device support 583# SCSI device support
530# 584#
531CONFIG_RAID_ATTRS=m 585# CONFIG_RAID_ATTRS is not set
532CONFIG_SCSI=m 586CONFIG_SCSI=y
533CONFIG_SCSI_TGT=m 587# CONFIG_SCSI_TGT is not set
534CONFIG_SCSI_NETLINK=y 588# CONFIG_SCSI_NETLINK is not set
535CONFIG_SCSI_PROC_FS=y 589CONFIG_SCSI_PROC_FS=y
536 590
537# 591#
538# SCSI support type (disk, tape, CD-ROM) 592# SCSI support type (disk, tape, CD-ROM)
539# 593#
540# CONFIG_BLK_DEV_SD is not set 594CONFIG_BLK_DEV_SD=y
541# CONFIG_CHR_DEV_ST is not set 595# CONFIG_CHR_DEV_ST is not set
542# CONFIG_CHR_DEV_OSST is not set 596# CONFIG_CHR_DEV_OSST is not set
543# CONFIG_BLK_DEV_SR is not set 597# CONFIG_BLK_DEV_SR is not set
@@ -550,22 +604,21 @@ CONFIG_SCSI_PROC_FS=y
550# CONFIG_SCSI_MULTI_LUN is not set 604# CONFIG_SCSI_MULTI_LUN is not set
551# CONFIG_SCSI_CONSTANTS is not set 605# CONFIG_SCSI_CONSTANTS is not set
552# CONFIG_SCSI_LOGGING is not set 606# CONFIG_SCSI_LOGGING is not set
553CONFIG_SCSI_SCAN_ASYNC=y 607# CONFIG_SCSI_SCAN_ASYNC is not set
554 608
555# 609#
556# SCSI Transports 610# SCSI Transports
557# 611#
558# CONFIG_SCSI_SPI_ATTRS is not set 612# CONFIG_SCSI_SPI_ATTRS is not set
559CONFIG_SCSI_FC_ATTRS=m 613# CONFIG_SCSI_FC_ATTRS is not set
560CONFIG_SCSI_ISCSI_ATTRS=m 614# CONFIG_SCSI_ISCSI_ATTRS is not set
561CONFIG_SCSI_SAS_ATTRS=m 615# CONFIG_SCSI_SAS_ATTRS is not set
562CONFIG_SCSI_SAS_LIBSAS=m 616# CONFIG_SCSI_SAS_LIBSAS is not set
563# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
564 617
565# 618#
566# SCSI low-level drivers 619# SCSI low-level drivers
567# 620#
568CONFIG_ISCSI_TCP=m 621# CONFIG_ISCSI_TCP is not set
569# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 622# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
570# CONFIG_SCSI_3W_9XXX is not set 623# CONFIG_SCSI_3W_9XXX is not set
571# CONFIG_SCSI_ACARD is not set 624# CONFIG_SCSI_ACARD is not set
@@ -573,8 +626,7 @@ CONFIG_ISCSI_TCP=m
573# CONFIG_SCSI_AIC7XXX is not set 626# CONFIG_SCSI_AIC7XXX is not set
574# CONFIG_SCSI_AIC7XXX_OLD is not set 627# CONFIG_SCSI_AIC7XXX_OLD is not set
575# CONFIG_SCSI_AIC79XX is not set 628# CONFIG_SCSI_AIC79XX is not set
576CONFIG_SCSI_AIC94XX=m 629# CONFIG_SCSI_AIC94XX is not set
577# CONFIG_AIC94XX_DEBUG is not set
578# CONFIG_SCSI_DPT_I2O is not set 630# CONFIG_SCSI_DPT_I2O is not set
579# CONFIG_SCSI_ARCMSR is not set 631# CONFIG_SCSI_ARCMSR is not set
580# CONFIG_MEGARAID_NEWGEN is not set 632# CONFIG_MEGARAID_NEWGEN is not set
@@ -630,10 +682,10 @@ CONFIG_SCSI_AIC94XX=m
630# Network device support 682# Network device support
631# 683#
632CONFIG_NETDEVICES=y 684CONFIG_NETDEVICES=y
633# CONFIG_DUMMY is not set 685CONFIG_DUMMY=y
634# CONFIG_BONDING is not set 686# CONFIG_BONDING is not set
635# CONFIG_EQUALIZER is not set 687# CONFIG_EQUALIZER is not set
636CONFIG_TUN=m 688# CONFIG_TUN is not set
637 689
638# 690#
639# ARCnet devices 691# ARCnet devices
@@ -643,26 +695,16 @@ CONFIG_TUN=m
643# 695#
644# PHY device support 696# PHY device support
645# 697#
646CONFIG_PHYLIB=m 698# CONFIG_PHYLIB is not set
647
648#
649# MII PHY device drivers
650#
651CONFIG_MARVELL_PHY=m
652CONFIG_DAVICOM_PHY=m
653CONFIG_QSEMI_PHY=m
654CONFIG_LXT_PHY=m
655CONFIG_CICADA_PHY=m
656CONFIG_VITESSE_PHY=m
657CONFIG_SMSC_PHY=m
658# CONFIG_BROADCOM_PHY is not set
659# CONFIG_FIXED_PHY is not set
660 699
661# 700#
662# Ethernet (10 or 100Mbit) 701# Ethernet (10 or 100Mbit)
663# 702#
664CONFIG_NET_ETHERNET=y 703CONFIG_NET_ETHERNET=y
665CONFIG_MII=y 704CONFIG_MII=y
705CONFIG_MSPETH=y
706CONFIG_MSPETH_NAPI=y
707# CONFIG_MSPETH_SKB_RECYCLE is not set
666# CONFIG_HAPPYMEAL is not set 708# CONFIG_HAPPYMEAL is not set
667# CONFIG_SUNGEM is not set 709# CONFIG_SUNGEM is not set
668# CONFIG_CASSINI is not set 710# CONFIG_CASSINI is not set
@@ -674,26 +716,7 @@ CONFIG_MII=y
674# 716#
675# CONFIG_NET_TULIP is not set 717# CONFIG_NET_TULIP is not set
676# CONFIG_HP100 is not set 718# CONFIG_HP100 is not set
677CONFIG_NET_PCI=y 719# CONFIG_NET_PCI is not set
678# CONFIG_PCNET32 is not set
679# CONFIG_AMD8111_ETH is not set
680# CONFIG_ADAPTEC_STARFIRE is not set
681# CONFIG_B44 is not set
682# CONFIG_FORCEDETH is not set
683# CONFIG_DGRS is not set
684# CONFIG_EEPRO100 is not set
685CONFIG_E100=y
686# CONFIG_FEALNX is not set
687# CONFIG_NATSEMI is not set
688# CONFIG_NE2K_PCI is not set
689# CONFIG_8139CP is not set
690# CONFIG_8139TOO is not set
691# CONFIG_SIS900 is not set
692# CONFIG_EPIC100 is not set
693# CONFIG_SUNDANCE is not set
694# CONFIG_TLAN is not set
695# CONFIG_VIA_RHINE is not set
696# CONFIG_SC92031 is not set
697 720
698# 721#
699# Ethernet (1000 Mbit) 722# Ethernet (1000 Mbit)
@@ -709,22 +732,20 @@ CONFIG_E100=y
709# CONFIG_SKGE is not set 732# CONFIG_SKGE is not set
710# CONFIG_SKY2 is not set 733# CONFIG_SKY2 is not set
711# CONFIG_SK98LIN is not set 734# CONFIG_SK98LIN is not set
712# CONFIG_VIA_VELOCITY is not set
713# CONFIG_TIGON3 is not set 735# CONFIG_TIGON3 is not set
714# CONFIG_BNX2 is not set 736# CONFIG_BNX2 is not set
715CONFIG_MV643XX_ETH=y 737# CONFIG_QLA3XXX is not set
716CONFIG_QLA3XXX=m
717# CONFIG_ATL1 is not set 738# CONFIG_ATL1 is not set
718 739
719# 740#
720# Ethernet (10000 Mbit) 741# Ethernet (10000 Mbit)
721# 742#
722# CONFIG_CHELSIO_T1 is not set 743# CONFIG_CHELSIO_T1 is not set
723CONFIG_CHELSIO_T3=m 744# CONFIG_CHELSIO_T3 is not set
724# CONFIG_IXGB is not set 745# CONFIG_IXGB is not set
725# CONFIG_S2IO is not set 746# CONFIG_S2IO is not set
726# CONFIG_MYRI10GE is not set 747# CONFIG_MYRI10GE is not set
727CONFIG_NETXEN_NIC=m 748# CONFIG_NETXEN_NIC is not set
728 749
729# 750#
730# Token Ring devices 751# Token Ring devices
@@ -734,7 +755,29 @@ CONFIG_NETXEN_NIC=m
734# 755#
735# Wireless LAN (non-hamradio) 756# Wireless LAN (non-hamradio)
736# 757#
737# CONFIG_NET_RADIO is not set 758CONFIG_NET_RADIO=y
759# CONFIG_NET_WIRELESS_RTNETLINK is not set
760
761#
762# Obsolete Wireless cards support (pre-802.11)
763#
764# CONFIG_STRIP is not set
765
766#
767# Wireless 802.11b ISA/PCI cards support
768#
769# CONFIG_IPW2100 is not set
770# CONFIG_IPW2200 is not set
771# CONFIG_HERMES is not set
772# CONFIG_ATMEL is not set
773
774#
775# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
776#
777# CONFIG_PRISM54 is not set
778# CONFIG_USB_ZD1201 is not set
779# CONFIG_HOSTAP is not set
780CONFIG_NET_WIRELESS=y
738 781
739# 782#
740# Wan interfaces 783# Wan interfaces
@@ -742,17 +785,17 @@ CONFIG_NETXEN_NIC=m
742# CONFIG_WAN is not set 785# CONFIG_WAN is not set
743# CONFIG_FDDI is not set 786# CONFIG_FDDI is not set
744# CONFIG_HIPPI is not set 787# CONFIG_HIPPI is not set
745CONFIG_PPP=m 788CONFIG_PPP=y
746# CONFIG_PPP_MULTILINK is not set 789# CONFIG_PPP_MULTILINK is not set
747# CONFIG_PPP_FILTER is not set 790# CONFIG_PPP_FILTER is not set
748CONFIG_PPP_ASYNC=m 791# CONFIG_PPP_ASYNC is not set
749CONFIG_PPP_SYNC_TTY=m 792# CONFIG_PPP_SYNC_TTY is not set
750CONFIG_PPP_DEFLATE=m 793# CONFIG_PPP_DEFLATE is not set
751# CONFIG_PPP_BSDCOMP is not set 794# CONFIG_PPP_BSDCOMP is not set
752CONFIG_PPP_MPPE=m 795# CONFIG_PPP_MPPE is not set
753CONFIG_PPPOE=m 796# CONFIG_PPPOE is not set
754# CONFIG_SLIP is not set 797# CONFIG_SLIP is not set
755CONFIG_SLHC=m 798CONFIG_SLHC=y
756# CONFIG_NET_FC is not set 799# CONFIG_NET_FC is not set
757# CONFIG_SHAPER is not set 800# CONFIG_SHAPER is not set
758# CONFIG_NETCONSOLE is not set 801# CONFIG_NETCONSOLE is not set
@@ -796,31 +839,24 @@ CONFIG_INPUT=y
796# 839#
797# Hardware I/O ports 840# Hardware I/O ports
798# 841#
799CONFIG_SERIO=y 842# CONFIG_SERIO is not set
800# CONFIG_SERIO_I8042 is not set
801# CONFIG_SERIO_SERPORT is not set
802# CONFIG_SERIO_PCIPS2 is not set
803# CONFIG_SERIO_LIBPS2 is not set
804# CONFIG_SERIO_RAW is not set
805# CONFIG_GAMEPORT is not set 843# CONFIG_GAMEPORT is not set
806 844
807# 845#
808# Character devices 846# Character devices
809# 847#
810CONFIG_VT=y 848# CONFIG_VT is not set
811CONFIG_VT_CONSOLE=y
812CONFIG_HW_CONSOLE=y
813CONFIG_VT_HW_CONSOLE_BINDING=y
814# CONFIG_SERIAL_NONSTANDARD is not set 849# CONFIG_SERIAL_NONSTANDARD is not set
850CONFIG_PMCMSP_GPIO=y
815 851
816# 852#
817# Serial drivers 853# Serial drivers
818# 854#
819CONFIG_SERIAL_8250=y 855CONFIG_SERIAL_8250=y
820CONFIG_SERIAL_8250_CONSOLE=y 856CONFIG_SERIAL_8250_CONSOLE=y
821CONFIG_SERIAL_8250_PCI=y 857# CONFIG_SERIAL_8250_PCI is not set
822CONFIG_SERIAL_8250_NR_UARTS=4 858CONFIG_SERIAL_8250_NR_UARTS=2
823CONFIG_SERIAL_8250_RUNTIME_UARTS=4 859CONFIG_SERIAL_8250_RUNTIME_UARTS=2
824# CONFIG_SERIAL_8250_EXTENDED is not set 860# CONFIG_SERIAL_8250_EXTENDED is not set
825 861
826# 862#
@@ -830,8 +866,7 @@ CONFIG_SERIAL_CORE=y
830CONFIG_SERIAL_CORE_CONSOLE=y 866CONFIG_SERIAL_CORE_CONSOLE=y
831# CONFIG_SERIAL_JSM is not set 867# CONFIG_SERIAL_JSM is not set
832CONFIG_UNIX98_PTYS=y 868CONFIG_UNIX98_PTYS=y
833CONFIG_LEGACY_PTYS=y 869# CONFIG_LEGACY_PTYS is not set
834CONFIG_LEGACY_PTY_COUNT=256
835 870
836# 871#
837# IPMI 872# IPMI
@@ -843,7 +878,8 @@ CONFIG_LEGACY_PTY_COUNT=256
843# 878#
844# CONFIG_WATCHDOG is not set 879# CONFIG_WATCHDOG is not set
845# CONFIG_HW_RANDOM is not set 880# CONFIG_HW_RANDOM is not set
846CONFIG_RTC=y 881# CONFIG_RTC is not set
882# CONFIG_GEN_RTC is not set
847# CONFIG_DTLK is not set 883# CONFIG_DTLK is not set
848# CONFIG_R3964 is not set 884# CONFIG_R3964 is not set
849# CONFIG_APPLICOM is not set 885# CONFIG_APPLICOM is not set
@@ -858,7 +894,58 @@ CONFIG_RTC=y
858# 894#
859# I2C support 895# I2C support
860# 896#
861# CONFIG_I2C is not set 897CONFIG_I2C=y
898CONFIG_I2C_CHARDEV=y
899
900#
901# I2C Algorithms
902#
903# CONFIG_I2C_ALGOBIT is not set
904# CONFIG_I2C_ALGOPCF is not set
905# CONFIG_I2C_ALGOPCA is not set
906
907#
908# I2C Hardware Bus support
909#
910# CONFIG_I2C_ALI1535 is not set
911# CONFIG_I2C_ALI1563 is not set
912# CONFIG_I2C_ALI15X3 is not set
913# CONFIG_I2C_AMD756 is not set
914# CONFIG_I2C_AMD8111 is not set
915# CONFIG_I2C_I801 is not set
916# CONFIG_I2C_I810 is not set
917# CONFIG_I2C_PIIX4 is not set
918# CONFIG_I2C_NFORCE2 is not set
919# CONFIG_I2C_OCORES is not set
920# CONFIG_I2C_PARPORT_LIGHT is not set
921# CONFIG_I2C_PASEMI is not set
922# CONFIG_I2C_PROSAVAGE is not set
923# CONFIG_I2C_SAVAGE4 is not set
924# CONFIG_I2C_SIS5595 is not set
925# CONFIG_I2C_SIS630 is not set
926# CONFIG_I2C_SIS96X is not set
927# CONFIG_I2C_STUB is not set
928# CONFIG_I2C_VIA is not set
929# CONFIG_I2C_VIAPRO is not set
930# CONFIG_I2C_VOODOO3 is not set
931# CONFIG_I2C_PCA_ISA is not set
932CONFIG_I2C_PMCMSP=y
933
934#
935# Miscellaneous I2C Chip support
936#
937# CONFIG_SENSORS_DS1337 is not set
938# CONFIG_SENSORS_DS1374 is not set
939# CONFIG_SENSORS_EEPROM is not set
940# CONFIG_SENSORS_PCF8574 is not set
941CONFIG_PMCTWILED=y
942# CONFIG_SENSORS_PCA9539 is not set
943# CONFIG_SENSORS_PCF8591 is not set
944# CONFIG_SENSORS_MAX6875 is not set
945# CONFIG_I2C_DEBUG_CORE is not set
946# CONFIG_I2C_DEBUG_ALGO is not set
947# CONFIG_I2C_DEBUG_BUS is not set
948# CONFIG_I2C_DEBUG_CHIP is not set
862 949
863# 950#
864# SPI support 951# SPI support
@@ -874,8 +961,57 @@ CONFIG_RTC=y
874# 961#
875# Hardware Monitoring support 962# Hardware Monitoring support
876# 963#
877# CONFIG_HWMON is not set 964CONFIG_HWMON=y
878# CONFIG_HWMON_VID is not set 965# CONFIG_HWMON_VID is not set
966# CONFIG_SENSORS_ABITUGURU is not set
967# CONFIG_SENSORS_ADM1021 is not set
968# CONFIG_SENSORS_ADM1025 is not set
969# CONFIG_SENSORS_ADM1026 is not set
970# CONFIG_SENSORS_ADM1029 is not set
971# CONFIG_SENSORS_ADM1031 is not set
972# CONFIG_SENSORS_ADM9240 is not set
973# CONFIG_SENSORS_ASB100 is not set
974# CONFIG_SENSORS_ATXP1 is not set
975# CONFIG_SENSORS_DS1621 is not set
976# CONFIG_SENSORS_F71805F is not set
977# CONFIG_SENSORS_FSCHER is not set
978# CONFIG_SENSORS_FSCPOS is not set
979# CONFIG_SENSORS_GL518SM is not set
980# CONFIG_SENSORS_GL520SM is not set
981# CONFIG_SENSORS_IT87 is not set
982# CONFIG_SENSORS_LM63 is not set
983# CONFIG_SENSORS_LM75 is not set
984# CONFIG_SENSORS_LM77 is not set
985# CONFIG_SENSORS_LM78 is not set
986# CONFIG_SENSORS_LM80 is not set
987# CONFIG_SENSORS_LM83 is not set
988# CONFIG_SENSORS_LM85 is not set
989# CONFIG_SENSORS_LM87 is not set
990# CONFIG_SENSORS_LM90 is not set
991# CONFIG_SENSORS_LM92 is not set
992# CONFIG_SENSORS_MAX1619 is not set
993# CONFIG_SENSORS_PC87360 is not set
994# CONFIG_SENSORS_PC87427 is not set
995# CONFIG_SENSORS_SIS5595 is not set
996# CONFIG_SENSORS_SMSC47M1 is not set
997# CONFIG_SENSORS_SMSC47M192 is not set
998# CONFIG_SENSORS_SMSC47B397 is not set
999# CONFIG_SENSORS_VIA686A is not set
1000# CONFIG_SENSORS_VT1211 is not set
1001# CONFIG_SENSORS_VT8231 is not set
1002# CONFIG_SENSORS_W83781D is not set
1003# CONFIG_SENSORS_W83791D is not set
1004# CONFIG_SENSORS_W83792D is not set
1005# CONFIG_SENSORS_W83793 is not set
1006# CONFIG_SENSORS_W83L785TS is not set
1007# CONFIG_SENSORS_W83627HF is not set
1008# CONFIG_SENSORS_W83627EHF is not set
1009# CONFIG_HWMON_DEBUG_CHIP is not set
1010
1011#
1012# Multifunction device drivers
1013#
1014# CONFIG_MFD_SM501 is not set
879 1015
880# 1016#
881# Multimedia devices 1017# Multimedia devices
@@ -886,62 +1022,13 @@ CONFIG_RTC=y
886# Digital Video Broadcasting Devices 1022# Digital Video Broadcasting Devices
887# 1023#
888# CONFIG_DVB is not set 1024# CONFIG_DVB is not set
1025# CONFIG_USB_DABUSB is not set
889 1026
890# 1027#
891# Graphics support 1028# Graphics support
892# 1029#
893# CONFIG_FIRMWARE_EDID is not set
894CONFIG_FB=y
895# CONFIG_FB_CFB_FILLRECT is not set
896# CONFIG_FB_CFB_COPYAREA is not set
897# CONFIG_FB_CFB_IMAGEBLIT is not set
898# CONFIG_FB_SVGALIB is not set
899# CONFIG_FB_MACMODES is not set
900# CONFIG_FB_BACKLIGHT is not set
901CONFIG_FB_MODE_HELPERS=y
902# CONFIG_FB_TILEBLITTING is not set
903# CONFIG_FB_CIRRUS is not set
904# CONFIG_FB_PM2 is not set
905# CONFIG_FB_CYBER2000 is not set
906# CONFIG_FB_ASILIANT is not set
907# CONFIG_FB_IMSTT is not set
908# CONFIG_FB_S1D13XXX is not set
909# CONFIG_FB_NVIDIA is not set
910# CONFIG_FB_RIVA is not set
911# CONFIG_FB_MATROX is not set
912# CONFIG_FB_RADEON is not set
913# CONFIG_FB_ATY128 is not set
914# CONFIG_FB_ATY is not set
915# CONFIG_FB_S3 is not set
916# CONFIG_FB_SAVAGE is not set
917# CONFIG_FB_SIS is not set
918# CONFIG_FB_NEOMAGIC is not set
919# CONFIG_FB_KYRO is not set
920# CONFIG_FB_3DFX is not set
921# CONFIG_FB_VOODOO1 is not set
922# CONFIG_FB_SMIVGX is not set
923# CONFIG_FB_TRIDENT is not set
924# CONFIG_FB_VIRTUAL is not set
925
926#
927# Console display driver support
928#
929# CONFIG_VGA_CONSOLE is not set
930CONFIG_DUMMY_CONSOLE=y
931CONFIG_FRAMEBUFFER_CONSOLE=y
932# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
933# CONFIG_FONTS is not set
934CONFIG_FONT_8x8=y
935CONFIG_FONT_8x16=y
936
937#
938# Logo configuration
939#
940CONFIG_LOGO=y
941CONFIG_LOGO_LINUX_MONO=y
942CONFIG_LOGO_LINUX_VGA16=y
943CONFIG_LOGO_LINUX_CLUT224=y
944# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 1030# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1031# CONFIG_FB is not set
945 1032
946# 1033#
947# Sound 1034# Sound
@@ -960,13 +1047,134 @@ CONFIG_HID=y
960CONFIG_USB_ARCH_HAS_HCD=y 1047CONFIG_USB_ARCH_HAS_HCD=y
961CONFIG_USB_ARCH_HAS_OHCI=y 1048CONFIG_USB_ARCH_HAS_OHCI=y
962CONFIG_USB_ARCH_HAS_EHCI=y 1049CONFIG_USB_ARCH_HAS_EHCI=y
963# CONFIG_USB is not set 1050CONFIG_USB=y
1051# CONFIG_USB_DEBUG is not set
1052
1053#
1054# Miscellaneous USB options
1055#
1056CONFIG_USB_DEVICEFS=y
1057# CONFIG_USB_DYNAMIC_MINORS is not set
1058# CONFIG_USB_OTG is not set
1059
1060#
1061# USB Host Controller Drivers
1062#
1063CONFIG_USB_EHCI_HCD=y
1064# CONFIG_USB_EHCI_SPLIT_ISO is not set
1065CONFIG_USB_EHCI_ROOT_HUB_TT=y
1066# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1067# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1068# CONFIG_USB_ISP116X_HCD is not set
1069# CONFIG_USB_OHCI_HCD is not set
1070# CONFIG_USB_UHCI_HCD is not set
1071# CONFIG_USB_SL811_HCD is not set
1072
1073#
1074# USB Device Class drivers
1075#
1076# CONFIG_USB_ACM is not set
1077# CONFIG_USB_PRINTER is not set
964 1078
965# 1079#
966# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1080# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
967# 1081#
968 1082
969# 1083#
1084# may also be needed; see USB_STORAGE Help for more information
1085#
1086CONFIG_USB_STORAGE=y
1087# CONFIG_USB_STORAGE_DEBUG is not set
1088# CONFIG_USB_STORAGE_DATAFAB is not set
1089# CONFIG_USB_STORAGE_FREECOM is not set
1090# CONFIG_USB_STORAGE_DPCM is not set
1091# CONFIG_USB_STORAGE_USBAT is not set
1092# CONFIG_USB_STORAGE_SDDR09 is not set
1093# CONFIG_USB_STORAGE_SDDR55 is not set
1094# CONFIG_USB_STORAGE_JUMPSHOT is not set
1095# CONFIG_USB_STORAGE_ALAUDA is not set
1096# CONFIG_USB_STORAGE_KARMA is not set
1097# CONFIG_USB_LIBUSUAL is not set
1098
1099#
1100# USB Input Devices
1101#
1102# CONFIG_USB_HID is not set
1103
1104#
1105# USB HID Boot Protocol drivers
1106#
1107# CONFIG_USB_KBD is not set
1108# CONFIG_USB_MOUSE is not set
1109# CONFIG_USB_AIPTEK is not set
1110# CONFIG_USB_WACOM is not set
1111# CONFIG_USB_ACECAD is not set
1112# CONFIG_USB_KBTAB is not set
1113# CONFIG_USB_POWERMATE is not set
1114# CONFIG_USB_TOUCHSCREEN is not set
1115# CONFIG_USB_YEALINK is not set
1116# CONFIG_USB_XPAD is not set
1117# CONFIG_USB_ATI_REMOTE is not set
1118# CONFIG_USB_ATI_REMOTE2 is not set
1119# CONFIG_USB_KEYSPAN_REMOTE is not set
1120# CONFIG_USB_APPLETOUCH is not set
1121# CONFIG_USB_GTCO is not set
1122
1123#
1124# USB Imaging devices
1125#
1126# CONFIG_USB_MDC800 is not set
1127# CONFIG_USB_MICROTEK is not set
1128
1129#
1130# USB Network Adapters
1131#
1132# CONFIG_USB_CATC is not set
1133# CONFIG_USB_KAWETH is not set
1134# CONFIG_USB_PEGASUS is not set
1135# CONFIG_USB_RTL8150 is not set
1136# CONFIG_USB_USBNET_MII is not set
1137# CONFIG_USB_USBNET is not set
1138CONFIG_USB_MON=y
1139
1140#
1141# USB port drivers
1142#
1143
1144#
1145# USB Serial Converter support
1146#
1147# CONFIG_USB_SERIAL is not set
1148
1149#
1150# USB Miscellaneous drivers
1151#
1152# CONFIG_USB_EMI62 is not set
1153# CONFIG_USB_EMI26 is not set
1154# CONFIG_USB_ADUTUX is not set
1155# CONFIG_USB_AUERSWALD is not set
1156# CONFIG_USB_RIO500 is not set
1157# CONFIG_USB_LEGOTOWER is not set
1158# CONFIG_USB_LCD is not set
1159# CONFIG_USB_BERRY_CHARGE is not set
1160# CONFIG_USB_LED is not set
1161# CONFIG_USB_CYPRESS_CY7C63 is not set
1162# CONFIG_USB_CYTHERM is not set
1163# CONFIG_USB_PHIDGET is not set
1164# CONFIG_USB_IDMOUSE is not set
1165# CONFIG_USB_FTDI_ELAN is not set
1166# CONFIG_USB_APPLEDISPLAY is not set
1167# CONFIG_USB_SISUSBVGA is not set
1168# CONFIG_USB_LD is not set
1169# CONFIG_USB_TRANCEVIBRATOR is not set
1170# CONFIG_USB_IOWARRIOR is not set
1171# CONFIG_USB_TEST is not set
1172
1173#
1174# USB DSL modem support
1175#
1176
1177#
970# USB Gadget Support 1178# USB Gadget Support
971# 1179#
972# CONFIG_USB_GADGET is not set 1180# CONFIG_USB_GADGET is not set
@@ -1030,37 +1238,22 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1030CONFIG_EXT2_FS=y 1238CONFIG_EXT2_FS=y
1031# CONFIG_EXT2_FS_XATTR is not set 1239# CONFIG_EXT2_FS_XATTR is not set
1032# CONFIG_EXT2_FS_XIP is not set 1240# CONFIG_EXT2_FS_XIP is not set
1033CONFIG_EXT3_FS=m 1241# CONFIG_EXT3_FS is not set
1034CONFIG_EXT3_FS_XATTR=y
1035# CONFIG_EXT3_FS_POSIX_ACL is not set
1036# CONFIG_EXT3_FS_SECURITY is not set
1037# CONFIG_EXT4DEV_FS is not set 1242# CONFIG_EXT4DEV_FS is not set
1038CONFIG_JBD=m 1243# CONFIG_REISERFS_FS is not set
1039# CONFIG_JBD_DEBUG is not set
1040CONFIG_FS_MBCACHE=y
1041CONFIG_REISERFS_FS=m
1042# CONFIG_REISERFS_CHECK is not set
1043# CONFIG_REISERFS_PROC_INFO is not set
1044# CONFIG_REISERFS_FS_XATTR is not set
1045# CONFIG_JFS_FS is not set 1244# CONFIG_JFS_FS is not set
1046CONFIG_FS_POSIX_ACL=y 1245# CONFIG_FS_POSIX_ACL is not set
1047CONFIG_XFS_FS=m 1246# CONFIG_XFS_FS is not set
1048# CONFIG_XFS_QUOTA is not set
1049# CONFIG_XFS_SECURITY is not set
1050# CONFIG_XFS_POSIX_ACL is not set
1051# CONFIG_XFS_RT is not set
1052# CONFIG_GFS2_FS is not set 1247# CONFIG_GFS2_FS is not set
1053# CONFIG_OCFS2_FS is not set 1248# CONFIG_OCFS2_FS is not set
1054# CONFIG_MINIX_FS is not set 1249# CONFIG_MINIX_FS is not set
1055# CONFIG_ROMFS_FS is not set 1250# CONFIG_ROMFS_FS is not set
1056CONFIG_INOTIFY=y 1251# CONFIG_INOTIFY is not set
1057CONFIG_INOTIFY_USER=y
1058# CONFIG_QUOTA is not set 1252# CONFIG_QUOTA is not set
1059CONFIG_DNOTIFY=y 1253# CONFIG_DNOTIFY is not set
1060CONFIG_AUTOFS_FS=y 1254# CONFIG_AUTOFS_FS is not set
1061CONFIG_AUTOFS4_FS=m 1255# CONFIG_AUTOFS4_FS is not set
1062CONFIG_FUSE_FS=m 1256# CONFIG_FUSE_FS is not set
1063CONFIG_GENERIC_ACL=y
1064 1257
1065# 1258#
1066# CD-ROM/DVD Filesystems 1259# CD-ROM/DVD Filesystems
@@ -1071,22 +1264,25 @@ CONFIG_GENERIC_ACL=y
1071# 1264#
1072# DOS/FAT/NT Filesystems 1265# DOS/FAT/NT Filesystems
1073# 1266#
1074# CONFIG_MSDOS_FS is not set 1267CONFIG_FAT_FS=y
1075# CONFIG_VFAT_FS is not set 1268CONFIG_MSDOS_FS=y
1269CONFIG_VFAT_FS=y
1270CONFIG_FAT_DEFAULT_CODEPAGE=437
1271CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1076# CONFIG_NTFS_FS is not set 1272# CONFIG_NTFS_FS is not set
1077 1273
1078# 1274#
1079# Pseudo filesystems 1275# Pseudo filesystems
1080# 1276#
1081CONFIG_PROC_FS=y 1277CONFIG_PROC_FS=y
1082CONFIG_PROC_KCORE=y 1278# CONFIG_PROC_KCORE is not set
1083CONFIG_PROC_SYSCTL=y 1279CONFIG_PROC_SYSCTL=y
1084CONFIG_SYSFS=y 1280CONFIG_SYSFS=y
1085CONFIG_TMPFS=y 1281CONFIG_TMPFS=y
1086CONFIG_TMPFS_POSIX_ACL=y 1282# CONFIG_TMPFS_POSIX_ACL is not set
1087# CONFIG_HUGETLB_PAGE is not set 1283# CONFIG_HUGETLB_PAGE is not set
1088CONFIG_RAMFS=y 1284CONFIG_RAMFS=y
1089CONFIG_CONFIGFS_FS=m 1285# CONFIG_CONFIGFS_FS is not set
1090 1286
1091# 1287#
1092# Miscellaneous filesystems 1288# Miscellaneous filesystems
@@ -1097,8 +1293,21 @@ CONFIG_CONFIGFS_FS=m
1097# CONFIG_HFSPLUS_FS is not set 1293# CONFIG_HFSPLUS_FS is not set
1098# CONFIG_BEFS_FS is not set 1294# CONFIG_BEFS_FS is not set
1099# CONFIG_BFS_FS is not set 1295# CONFIG_BFS_FS is not set
1100CONFIG_EFS_FS=y 1296# CONFIG_EFS_FS is not set
1101CONFIG_CRAMFS=y 1297CONFIG_JFFS2_FS=y
1298CONFIG_JFFS2_FS_DEBUG=0
1299CONFIG_JFFS2_FS_WRITEBUFFER=y
1300# CONFIG_JFFS2_SUMMARY is not set
1301# CONFIG_JFFS2_FS_XATTR is not set
1302# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1303CONFIG_JFFS2_ZLIB=y
1304CONFIG_JFFS2_RTIME=y
1305# CONFIG_JFFS2_RUBIN is not set
1306# CONFIG_CRAMFS is not set
1307CONFIG_SQUASHFS=y
1308CONFIG_SQUASHFS_EMBEDDED=y
1309CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
1310CONFIG_SQUASHFS_VMALLOC=y
1102# CONFIG_VXFS_FS is not set 1311# CONFIG_VXFS_FS is not set
1103# CONFIG_HPFS_FS is not set 1312# CONFIG_HPFS_FS is not set
1104# CONFIG_QNX4FS_FS is not set 1313# CONFIG_QNX4FS_FS is not set
@@ -1108,26 +1317,9 @@ CONFIG_CRAMFS=y
1108# 1317#
1109# Network File Systems 1318# Network File Systems
1110# 1319#
1111CONFIG_NFS_FS=y 1320# CONFIG_NFS_FS is not set
1112CONFIG_NFS_V3=y 1321# CONFIG_NFSD is not set
1113# CONFIG_NFS_V3_ACL is not set 1322# CONFIG_SMB_FS is not set
1114# CONFIG_NFS_V4 is not set
1115# CONFIG_NFS_DIRECTIO is not set
1116CONFIG_NFSD=y
1117CONFIG_NFSD_V3=y
1118# CONFIG_NFSD_V3_ACL is not set
1119# CONFIG_NFSD_V4 is not set
1120# CONFIG_NFSD_TCP is not set
1121CONFIG_ROOT_NFS=y
1122CONFIG_LOCKD=y
1123CONFIG_LOCKD_V4=y
1124CONFIG_EXPORTFS=y
1125CONFIG_NFS_COMMON=y
1126CONFIG_SUNRPC=y
1127# CONFIG_RPCSEC_GSS_KRB5 is not set
1128# CONFIG_RPCSEC_GSS_SPKM3 is not set
1129CONFIG_SMB_FS=m
1130# CONFIG_SMB_NLS_DEFAULT is not set
1131# CONFIG_CIFS is not set 1323# CONFIG_CIFS is not set
1132# CONFIG_NCP_FS is not set 1324# CONFIG_NCP_FS is not set
1133# CONFIG_CODA_FS is not set 1325# CONFIG_CODA_FS is not set
@@ -1143,9 +1335,9 @@ CONFIG_MSDOS_PARTITION=y
1143# 1335#
1144# Native Language Support 1336# Native Language Support
1145# 1337#
1146CONFIG_NLS=m 1338CONFIG_NLS=y
1147CONFIG_NLS_DEFAULT="iso8859-1" 1339CONFIG_NLS_DEFAULT="iso8859-1"
1148# CONFIG_NLS_CODEPAGE_437 is not set 1340CONFIG_NLS_CODEPAGE_437=y
1149# CONFIG_NLS_CODEPAGE_737 is not set 1341# CONFIG_NLS_CODEPAGE_737 is not set
1150# CONFIG_NLS_CODEPAGE_775 is not set 1342# CONFIG_NLS_CODEPAGE_775 is not set
1151# CONFIG_NLS_CODEPAGE_850 is not set 1343# CONFIG_NLS_CODEPAGE_850 is not set
@@ -1169,7 +1361,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1169# CONFIG_NLS_CODEPAGE_1250 is not set 1361# CONFIG_NLS_CODEPAGE_1250 is not set
1170# CONFIG_NLS_CODEPAGE_1251 is not set 1362# CONFIG_NLS_CODEPAGE_1251 is not set
1171# CONFIG_NLS_ASCII is not set 1363# CONFIG_NLS_ASCII is not set
1172# CONFIG_NLS_ISO8859_1 is not set 1364CONFIG_NLS_ISO8859_1=y
1173# CONFIG_NLS_ISO8859_2 is not set 1365# CONFIG_NLS_ISO8859_2 is not set
1174# CONFIG_NLS_ISO8859_3 is not set 1366# CONFIG_NLS_ISO8859_3 is not set
1175# CONFIG_NLS_ISO8859_4 is not set 1367# CONFIG_NLS_ISO8859_4 is not set
@@ -1187,10 +1379,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1187# 1379#
1188# Distributed Lock Manager 1380# Distributed Lock Manager
1189# 1381#
1190CONFIG_DLM=m 1382# CONFIG_DLM is not set
1191CONFIG_DLM_TCP=y
1192# CONFIG_DLM_SCTP is not set
1193# CONFIG_DLM_DEBUG is not set
1194 1383
1195# 1384#
1196# Profiling support 1385# Profiling support
@@ -1203,14 +1392,40 @@ CONFIG_DLM_TCP=y
1203CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1392CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1204# CONFIG_PRINTK_TIME is not set 1393# CONFIG_PRINTK_TIME is not set
1205CONFIG_ENABLE_MUST_CHECK=y 1394CONFIG_ENABLE_MUST_CHECK=y
1206# CONFIG_MAGIC_SYSRQ is not set 1395CONFIG_MAGIC_SYSRQ=y
1207# CONFIG_UNUSED_SYMBOLS is not set 1396# CONFIG_UNUSED_SYMBOLS is not set
1208# CONFIG_DEBUG_FS is not set 1397# CONFIG_DEBUG_FS is not set
1209# CONFIG_HEADERS_CHECK is not set 1398# CONFIG_HEADERS_CHECK is not set
1210# CONFIG_DEBUG_KERNEL is not set 1399CONFIG_DEBUG_KERNEL=y
1400# CONFIG_DEBUG_SHIRQ is not set
1211CONFIG_LOG_BUF_SHIFT=14 1401CONFIG_LOG_BUF_SHIFT=14
1402CONFIG_DETECT_SOFTLOCKUP=y
1403# CONFIG_SCHEDSTATS is not set
1404# CONFIG_TIMER_STATS is not set
1405# CONFIG_DEBUG_SLAB is not set
1406CONFIG_DEBUG_PREEMPT=y
1407# CONFIG_DEBUG_RT_MUTEXES is not set
1408# CONFIG_RT_MUTEX_TESTER is not set
1409# CONFIG_DEBUG_SPINLOCK is not set
1410# CONFIG_DEBUG_MUTEXES is not set
1411# CONFIG_DEBUG_LOCK_ALLOC is not set
1412# CONFIG_PROVE_LOCKING is not set
1413# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1414# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1415# CONFIG_DEBUG_KOBJECT is not set
1416# CONFIG_DEBUG_INFO is not set
1417# CONFIG_DEBUG_VM is not set
1418# CONFIG_DEBUG_LIST is not set
1419CONFIG_FORCED_INLINING=y
1420# CONFIG_RCU_TORTURE_TEST is not set
1421# CONFIG_FAULT_INJECTION is not set
1212CONFIG_CROSSCOMPILE=y 1422CONFIG_CROSSCOMPILE=y
1213CONFIG_CMDLINE="ip=any root=nfs" 1423CONFIG_CMDLINE=""
1424# CONFIG_DEBUG_STACK_USAGE is not set
1425# CONFIG_KGDB is not set
1426CONFIG_SYS_SUPPORTS_KGDB=y
1427# CONFIG_RUNTIME_DEBUG is not set
1428# CONFIG_MIPS_UNCACHED is not set
1214 1429
1215# 1430#
1216# Security options 1431# Security options
@@ -1223,41 +1438,40 @@ CONFIG_CMDLINE="ip=any root=nfs"
1223# 1438#
1224CONFIG_CRYPTO=y 1439CONFIG_CRYPTO=y
1225CONFIG_CRYPTO_ALGAPI=y 1440CONFIG_CRYPTO_ALGAPI=y
1226CONFIG_CRYPTO_BLKCIPHER=m 1441CONFIG_CRYPTO_BLKCIPHER=y
1227CONFIG_CRYPTO_HASH=y 1442CONFIG_CRYPTO_HASH=y
1228CONFIG_CRYPTO_MANAGER=y 1443CONFIG_CRYPTO_MANAGER=y
1229CONFIG_CRYPTO_HMAC=y 1444CONFIG_CRYPTO_HMAC=y
1230CONFIG_CRYPTO_XCBC=m 1445# CONFIG_CRYPTO_XCBC is not set
1231CONFIG_CRYPTO_NULL=m 1446CONFIG_CRYPTO_NULL=y
1232CONFIG_CRYPTO_MD4=m 1447# CONFIG_CRYPTO_MD4 is not set
1233CONFIG_CRYPTO_MD5=y 1448CONFIG_CRYPTO_MD5=y
1234CONFIG_CRYPTO_SHA1=m 1449CONFIG_CRYPTO_SHA1=y
1235CONFIG_CRYPTO_SHA256=m 1450# CONFIG_CRYPTO_SHA256 is not set
1236CONFIG_CRYPTO_SHA512=m 1451# CONFIG_CRYPTO_SHA512 is not set
1237CONFIG_CRYPTO_WP512=m 1452# CONFIG_CRYPTO_WP512 is not set
1238CONFIG_CRYPTO_TGR192=m 1453# CONFIG_CRYPTO_TGR192 is not set
1239CONFIG_CRYPTO_GF128MUL=m 1454# CONFIG_CRYPTO_GF128MUL is not set
1240CONFIG_CRYPTO_ECB=m 1455# CONFIG_CRYPTO_ECB is not set
1241CONFIG_CRYPTO_CBC=m 1456CONFIG_CRYPTO_CBC=y
1242CONFIG_CRYPTO_PCBC=m 1457# CONFIG_CRYPTO_PCBC is not set
1243CONFIG_CRYPTO_LRW=m 1458# CONFIG_CRYPTO_LRW is not set
1244CONFIG_CRYPTO_DES=m 1459CONFIG_CRYPTO_DES=y
1245CONFIG_CRYPTO_FCRYPT=m 1460# CONFIG_CRYPTO_FCRYPT is not set
1246CONFIG_CRYPTO_BLOWFISH=m 1461# CONFIG_CRYPTO_BLOWFISH is not set
1247CONFIG_CRYPTO_TWOFISH=m 1462# CONFIG_CRYPTO_TWOFISH is not set
1248CONFIG_CRYPTO_TWOFISH_COMMON=m 1463# CONFIG_CRYPTO_SERPENT is not set
1249CONFIG_CRYPTO_SERPENT=m 1464CONFIG_CRYPTO_AES=y
1250CONFIG_CRYPTO_AES=m 1465# CONFIG_CRYPTO_CAST5 is not set
1251CONFIG_CRYPTO_CAST5=m 1466# CONFIG_CRYPTO_CAST6 is not set
1252CONFIG_CRYPTO_CAST6=m 1467# CONFIG_CRYPTO_TEA is not set
1253CONFIG_CRYPTO_TEA=m 1468# CONFIG_CRYPTO_ARC4 is not set
1254CONFIG_CRYPTO_ARC4=m 1469# CONFIG_CRYPTO_KHAZAD is not set
1255CONFIG_CRYPTO_KHAZAD=m 1470# CONFIG_CRYPTO_ANUBIS is not set
1256CONFIG_CRYPTO_ANUBIS=m 1471CONFIG_CRYPTO_DEFLATE=y
1257CONFIG_CRYPTO_DEFLATE=m 1472# CONFIG_CRYPTO_MICHAEL_MIC is not set
1258CONFIG_CRYPTO_MICHAEL_MIC=m 1473# CONFIG_CRYPTO_CRC32C is not set
1259CONFIG_CRYPTO_CRC32C=m 1474# CONFIG_CRYPTO_CAMELLIA is not set
1260CONFIG_CRYPTO_CAMELLIA=m
1261# CONFIG_CRYPTO_TEST is not set 1475# CONFIG_CRYPTO_TEST is not set
1262 1476
1263# 1477#
@@ -1268,16 +1482,12 @@ CONFIG_CRYPTO_CAMELLIA=m
1268# Library routines 1482# Library routines
1269# 1483#
1270CONFIG_BITREVERSE=y 1484CONFIG_BITREVERSE=y
1271CONFIG_CRC_CCITT=m 1485# CONFIG_CRC_CCITT is not set
1272CONFIG_CRC16=m 1486# CONFIG_CRC16 is not set
1273CONFIG_CRC32=y 1487CONFIG_CRC32=y
1274CONFIG_LIBCRC32C=m 1488# CONFIG_LIBCRC32C is not set
1275CONFIG_ZLIB_INFLATE=y 1489CONFIG_ZLIB_INFLATE=y
1276CONFIG_ZLIB_DEFLATE=m 1490CONFIG_ZLIB_DEFLATE=y
1277CONFIG_TEXTSEARCH=y
1278CONFIG_TEXTSEARCH_KMP=m
1279CONFIG_TEXTSEARCH_BM=m
1280CONFIG_TEXTSEARCH_FSM=m
1281CONFIG_PLIST=y 1491CONFIG_PLIST=y
1282CONFIG_HAS_IOMEM=y 1492CONFIG_HAS_IOMEM=y
1283CONFIG_HAS_IOPORT=y 1493CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/ocelot_c_defconfig b/arch/mips/configs/ocelot_c_defconfig
deleted file mode 100644
index 82ff6fc0cd41..000000000000
--- a/arch/mips/configs/ocelot_c_defconfig
+++ /dev/null
@@ -1,982 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Tue Feb 20 21:47:36 2007
5#
6CONFIG_MIPS=y
7
8#
9# Machine selection
10#
11CONFIG_ZONE_DMA=y
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set
34# CONFIG_WR_PPMC is not set
35# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39CONFIG_MOMENCO_OCELOT_C=y
40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set
43# CONFIG_PNX8550_STB810 is not set
44# CONFIG_DDB5477 is not set
45# CONFIG_MACH_VR41XX is not set
46# CONFIG_PMC_YOSEMITE is not set
47# CONFIG_QEMU is not set
48# CONFIG_MARKEINS is not set
49# CONFIG_SGI_IP22 is not set
50# CONFIG_SGI_IP27 is not set
51# CONFIG_SGI_IP32 is not set
52# CONFIG_SIBYTE_BIGSUR is not set
53# CONFIG_SIBYTE_SWARM is not set
54# CONFIG_SIBYTE_SENTOSA is not set
55# CONFIG_SIBYTE_RHONE is not set
56# CONFIG_SIBYTE_CARMEL is not set
57# CONFIG_SIBYTE_PTSWARM is not set
58# CONFIG_SIBYTE_LITTLESUR is not set
59# CONFIG_SIBYTE_CRHINE is not set
60# CONFIG_SIBYTE_CRHONE is not set
61# CONFIG_SNI_RM is not set
62# CONFIG_TOSHIBA_JMR3927 is not set
63# CONFIG_TOSHIBA_RBTX4927 is not set
64# CONFIG_TOSHIBA_RBTX4938 is not set
65CONFIG_RWSEM_GENERIC_SPINLOCK=y
66# CONFIG_ARCH_HAS_ILOG2_U32 is not set
67# CONFIG_ARCH_HAS_ILOG2_U64 is not set
68CONFIG_GENERIC_FIND_NEXT_BIT=y
69CONFIG_GENERIC_HWEIGHT=y
70CONFIG_GENERIC_CALIBRATE_DELAY=y
71CONFIG_GENERIC_TIME=y
72CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
73CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
74CONFIG_DMA_NONCOHERENT=y
75CONFIG_DMA_NEED_PCI_MAP_STATE=y
76CONFIG_CPU_BIG_ENDIAN=y
77# CONFIG_CPU_LITTLE_ENDIAN is not set
78CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
79CONFIG_IRQ_CPU=y
80CONFIG_IRQ_MV64340=y
81CONFIG_PCI_MARVELL=y
82CONFIG_SWAP_IO_SPACE=y
83CONFIG_MIPS_L1_CACHE_SHIFT=5
84
85#
86# CPU selection
87#
88# CONFIG_CPU_MIPS32_R1 is not set
89# CONFIG_CPU_MIPS32_R2 is not set
90# CONFIG_CPU_MIPS64_R1 is not set
91# CONFIG_CPU_MIPS64_R2 is not set
92# CONFIG_CPU_R3000 is not set
93# CONFIG_CPU_TX39XX is not set
94# CONFIG_CPU_VR41XX is not set
95# CONFIG_CPU_R4300 is not set
96# CONFIG_CPU_R4X00 is not set
97# CONFIG_CPU_TX49XX is not set
98# CONFIG_CPU_R5000 is not set
99# CONFIG_CPU_R5432 is not set
100# CONFIG_CPU_R6000 is not set
101# CONFIG_CPU_NEVADA is not set
102# CONFIG_CPU_R8000 is not set
103# CONFIG_CPU_R10000 is not set
104CONFIG_CPU_RM7000=y
105# CONFIG_CPU_RM9000 is not set
106# CONFIG_CPU_SB1 is not set
107CONFIG_SYS_HAS_CPU_RM7000=y
108CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
109CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
110CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
111CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
112
113#
114# Kernel type
115#
116# CONFIG_32BIT is not set
117CONFIG_64BIT=y
118CONFIG_PAGE_SIZE_4KB=y
119# CONFIG_PAGE_SIZE_8KB is not set
120# CONFIG_PAGE_SIZE_16KB is not set
121# CONFIG_PAGE_SIZE_64KB is not set
122CONFIG_BOARD_SCACHE=y
123CONFIG_RM7000_CPU_SCACHE=y
124CONFIG_CPU_HAS_PREFETCH=y
125CONFIG_MIPS_MT_DISABLED=y
126# CONFIG_MIPS_MT_SMP is not set
127# CONFIG_MIPS_MT_SMTC is not set
128# CONFIG_MIPS_VPE_LOADER is not set
129CONFIG_CPU_HAS_LLSC=y
130CONFIG_CPU_HAS_SYNC=y
131CONFIG_GENERIC_HARDIRQS=y
132CONFIG_GENERIC_IRQ_PROBE=y
133CONFIG_CPU_SUPPORTS_HIGHMEM=y
134CONFIG_ARCH_FLATMEM_ENABLE=y
135CONFIG_SELECT_MEMORY_MODEL=y
136CONFIG_FLATMEM_MANUAL=y
137# CONFIG_DISCONTIGMEM_MANUAL is not set
138# CONFIG_SPARSEMEM_MANUAL is not set
139CONFIG_FLATMEM=y
140CONFIG_FLAT_NODE_MEM_MAP=y
141# CONFIG_SPARSEMEM_STATIC is not set
142CONFIG_SPLIT_PTLOCK_CPUS=4
143CONFIG_RESOURCES_64BIT=y
144CONFIG_ZONE_DMA_FLAG=1
145# CONFIG_HZ_48 is not set
146# CONFIG_HZ_100 is not set
147# CONFIG_HZ_128 is not set
148# CONFIG_HZ_250 is not set
149# CONFIG_HZ_256 is not set
150CONFIG_HZ_1000=y
151# CONFIG_HZ_1024 is not set
152CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
153CONFIG_HZ=1000
154CONFIG_PREEMPT_NONE=y
155# CONFIG_PREEMPT_VOLUNTARY is not set
156# CONFIG_PREEMPT is not set
157# CONFIG_KEXEC is not set
158CONFIG_LOCKDEP_SUPPORT=y
159CONFIG_STACKTRACE_SUPPORT=y
160CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
161
162#
163# Code maturity level options
164#
165CONFIG_EXPERIMENTAL=y
166CONFIG_BROKEN_ON_SMP=y
167CONFIG_INIT_ENV_ARG_LIMIT=32
168
169#
170# General setup
171#
172CONFIG_LOCALVERSION=""
173CONFIG_LOCALVERSION_AUTO=y
174CONFIG_SWAP=y
175CONFIG_SYSVIPC=y
176# CONFIG_IPC_NS is not set
177CONFIG_SYSVIPC_SYSCTL=y
178# CONFIG_POSIX_MQUEUE is not set
179# CONFIG_BSD_PROCESS_ACCT is not set
180# CONFIG_TASKSTATS is not set
181# CONFIG_UTS_NS is not set
182# CONFIG_AUDIT is not set
183# CONFIG_IKCONFIG is not set
184CONFIG_SYSFS_DEPRECATED=y
185CONFIG_RELAY=y
186# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
187CONFIG_SYSCTL=y
188CONFIG_EMBEDDED=y
189CONFIG_SYSCTL_SYSCALL=y
190CONFIG_KALLSYMS=y
191# CONFIG_KALLSYMS_EXTRA_PASS is not set
192CONFIG_HOTPLUG=y
193CONFIG_PRINTK=y
194CONFIG_BUG=y
195CONFIG_ELF_CORE=y
196CONFIG_BASE_FULL=y
197CONFIG_FUTEX=y
198CONFIG_EPOLL=y
199CONFIG_SHMEM=y
200CONFIG_SLAB=y
201CONFIG_VM_EVENT_COUNTERS=y
202CONFIG_RT_MUTEXES=y
203# CONFIG_TINY_SHMEM is not set
204CONFIG_BASE_SMALL=0
205# CONFIG_SLOB is not set
206
207#
208# Loadable module support
209#
210# CONFIG_MODULES is not set
211
212#
213# Block layer
214#
215CONFIG_BLOCK=y
216# CONFIG_BLK_DEV_IO_TRACE is not set
217
218#
219# IO Schedulers
220#
221CONFIG_IOSCHED_NOOP=y
222CONFIG_IOSCHED_AS=y
223CONFIG_IOSCHED_DEADLINE=y
224CONFIG_IOSCHED_CFQ=y
225CONFIG_DEFAULT_AS=y
226# CONFIG_DEFAULT_DEADLINE is not set
227# CONFIG_DEFAULT_CFQ is not set
228# CONFIG_DEFAULT_NOOP is not set
229CONFIG_DEFAULT_IOSCHED="anticipatory"
230
231#
232# Bus options (PCI, PCMCIA, EISA, ISA, TC)
233#
234CONFIG_HW_HAS_PCI=y
235CONFIG_PCI=y
236CONFIG_MMU=y
237
238#
239# PCCARD (PCMCIA/CardBus) support
240#
241# CONFIG_PCCARD is not set
242
243#
244# PCI Hotplug Support
245#
246# CONFIG_HOTPLUG_PCI is not set
247
248#
249# Executable file formats
250#
251CONFIG_BINFMT_ELF=y
252# CONFIG_BINFMT_MISC is not set
253# CONFIG_BUILD_ELF64 is not set
254CONFIG_MIPS32_COMPAT=y
255CONFIG_COMPAT=y
256CONFIG_SYSVIPC_COMPAT=y
257CONFIG_MIPS32_O32=y
258CONFIG_MIPS32_N32=y
259CONFIG_BINFMT_ELF32=y
260
261#
262# Power management options
263#
264CONFIG_PM=y
265# CONFIG_PM_LEGACY is not set
266# CONFIG_PM_DEBUG is not set
267# CONFIG_PM_SYSFS_DEPRECATED is not set
268
269#
270# Networking
271#
272CONFIG_NET=y
273
274#
275# Networking options
276#
277# CONFIG_NETDEBUG is not set
278# CONFIG_PACKET is not set
279CONFIG_UNIX=y
280CONFIG_XFRM=y
281CONFIG_XFRM_USER=y
282# CONFIG_XFRM_SUB_POLICY is not set
283CONFIG_XFRM_MIGRATE=y
284CONFIG_NET_KEY=y
285CONFIG_NET_KEY_MIGRATE=y
286CONFIG_INET=y
287# CONFIG_IP_MULTICAST is not set
288# CONFIG_IP_ADVANCED_ROUTER is not set
289CONFIG_IP_FIB_HASH=y
290CONFIG_IP_PNP=y
291CONFIG_IP_PNP_DHCP=y
292# CONFIG_IP_PNP_BOOTP is not set
293# CONFIG_IP_PNP_RARP is not set
294# CONFIG_NET_IPIP is not set
295# CONFIG_NET_IPGRE is not set
296# CONFIG_ARPD is not set
297# CONFIG_SYN_COOKIES is not set
298# CONFIG_INET_AH is not set
299# CONFIG_INET_ESP is not set
300# CONFIG_INET_IPCOMP is not set
301# CONFIG_INET_XFRM_TUNNEL is not set
302# CONFIG_INET_TUNNEL is not set
303CONFIG_INET_XFRM_MODE_TRANSPORT=y
304CONFIG_INET_XFRM_MODE_TUNNEL=y
305CONFIG_INET_XFRM_MODE_BEET=y
306CONFIG_INET_DIAG=y
307CONFIG_INET_TCP_DIAG=y
308# CONFIG_TCP_CONG_ADVANCED is not set
309CONFIG_TCP_CONG_CUBIC=y
310CONFIG_DEFAULT_TCP_CONG="cubic"
311CONFIG_TCP_MD5SIG=y
312# CONFIG_IPV6 is not set
313# CONFIG_INET6_XFRM_TUNNEL is not set
314# CONFIG_INET6_TUNNEL is not set
315CONFIG_NETWORK_SECMARK=y
316# CONFIG_NETFILTER is not set
317
318#
319# DCCP Configuration (EXPERIMENTAL)
320#
321# CONFIG_IP_DCCP is not set
322
323#
324# SCTP Configuration (EXPERIMENTAL)
325#
326# CONFIG_IP_SCTP is not set
327
328#
329# TIPC Configuration (EXPERIMENTAL)
330#
331# CONFIG_TIPC is not set
332# CONFIG_ATM is not set
333# CONFIG_BRIDGE is not set
334# CONFIG_VLAN_8021Q is not set
335# CONFIG_DECNET is not set
336# CONFIG_LLC2 is not set
337# CONFIG_IPX is not set
338# CONFIG_ATALK is not set
339# CONFIG_X25 is not set
340# CONFIG_LAPB is not set
341# CONFIG_ECONET is not set
342# CONFIG_WAN_ROUTER is not set
343
344#
345# QoS and/or fair queueing
346#
347# CONFIG_NET_SCHED is not set
348
349#
350# Network testing
351#
352# CONFIG_NET_PKTGEN is not set
353# CONFIG_HAMRADIO is not set
354# CONFIG_IRDA is not set
355# CONFIG_BT is not set
356CONFIG_IEEE80211=y
357# CONFIG_IEEE80211_DEBUG is not set
358CONFIG_IEEE80211_CRYPT_WEP=y
359CONFIG_IEEE80211_CRYPT_CCMP=y
360CONFIG_IEEE80211_SOFTMAC=y
361# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
362CONFIG_WIRELESS_EXT=y
363
364#
365# Device Drivers
366#
367
368#
369# Generic Driver Options
370#
371CONFIG_STANDALONE=y
372CONFIG_PREVENT_FIRMWARE_BUILD=y
373CONFIG_FW_LOADER=y
374# CONFIG_SYS_HYPERVISOR is not set
375
376#
377# Connector - unified userspace <-> kernelspace linker
378#
379CONFIG_CONNECTOR=y
380CONFIG_PROC_EVENTS=y
381
382#
383# Memory Technology Devices (MTD)
384#
385# CONFIG_MTD is not set
386
387#
388# Parallel port support
389#
390# CONFIG_PARPORT is not set
391
392#
393# Plug and Play support
394#
395# CONFIG_PNPACPI is not set
396
397#
398# Block devices
399#
400# CONFIG_BLK_CPQ_DA is not set
401# CONFIG_BLK_CPQ_CISS_DA is not set
402# CONFIG_BLK_DEV_DAC960 is not set
403# CONFIG_BLK_DEV_UMEM is not set
404# CONFIG_BLK_DEV_COW_COMMON is not set
405# CONFIG_BLK_DEV_LOOP is not set
406# CONFIG_BLK_DEV_NBD is not set
407# CONFIG_BLK_DEV_SX8 is not set
408# CONFIG_BLK_DEV_RAM is not set
409# CONFIG_BLK_DEV_INITRD is not set
410CONFIG_CDROM_PKTCDVD=y
411CONFIG_CDROM_PKTCDVD_BUFFERS=8
412# CONFIG_CDROM_PKTCDVD_WCACHE is not set
413CONFIG_ATA_OVER_ETH=y
414
415#
416# Misc devices
417#
418CONFIG_SGI_IOC4=y
419# CONFIG_TIFM_CORE is not set
420
421#
422# ATA/ATAPI/MFM/RLL support
423#
424# CONFIG_IDE is not set
425
426#
427# SCSI device support
428#
429CONFIG_RAID_ATTRS=y
430# CONFIG_SCSI is not set
431# CONFIG_SCSI_NETLINK is not set
432
433#
434# Serial ATA (prod) and Parallel ATA (experimental) drivers
435#
436# CONFIG_ATA is not set
437
438#
439# Multi-device support (RAID and LVM)
440#
441# CONFIG_MD is not set
442
443#
444# Fusion MPT device support
445#
446# CONFIG_FUSION is not set
447
448#
449# IEEE 1394 (FireWire) support
450#
451# CONFIG_IEEE1394 is not set
452
453#
454# I2O device support
455#
456# CONFIG_I2O is not set
457
458#
459# Network device support
460#
461CONFIG_NETDEVICES=y
462# CONFIG_DUMMY is not set
463# CONFIG_BONDING is not set
464# CONFIG_EQUALIZER is not set
465# CONFIG_TUN is not set
466
467#
468# ARCnet devices
469#
470# CONFIG_ARCNET is not set
471
472#
473# PHY device support
474#
475CONFIG_PHYLIB=y
476
477#
478# MII PHY device drivers
479#
480CONFIG_MARVELL_PHY=y
481CONFIG_DAVICOM_PHY=y
482CONFIG_QSEMI_PHY=y
483CONFIG_LXT_PHY=y
484CONFIG_CICADA_PHY=y
485CONFIG_VITESSE_PHY=y
486CONFIG_SMSC_PHY=y
487# CONFIG_BROADCOM_PHY is not set
488# CONFIG_FIXED_PHY is not set
489
490#
491# Ethernet (10 or 100Mbit)
492#
493CONFIG_NET_ETHERNET=y
494# CONFIG_MII is not set
495# CONFIG_HAPPYMEAL is not set
496# CONFIG_SUNGEM is not set
497# CONFIG_CASSINI is not set
498# CONFIG_NET_VENDOR_3COM is not set
499# CONFIG_DM9000 is not set
500
501#
502# Tulip family network device support
503#
504# CONFIG_NET_TULIP is not set
505# CONFIG_HP100 is not set
506# CONFIG_NET_PCI is not set
507
508#
509# Ethernet (1000 Mbit)
510#
511# CONFIG_ACENIC is not set
512# CONFIG_DL2K is not set
513# CONFIG_E1000 is not set
514# CONFIG_NS83820 is not set
515# CONFIG_HAMACHI is not set
516# CONFIG_YELLOWFIN is not set
517# CONFIG_R8169 is not set
518# CONFIG_SIS190 is not set
519# CONFIG_SKGE is not set
520# CONFIG_SKY2 is not set
521# CONFIG_SK98LIN is not set
522# CONFIG_TIGON3 is not set
523# CONFIG_BNX2 is not set
524# CONFIG_MV643XX_ETH is not set
525CONFIG_QLA3XXX=y
526# CONFIG_ATL1 is not set
527
528#
529# Ethernet (10000 Mbit)
530#
531# CONFIG_CHELSIO_T1 is not set
532CONFIG_CHELSIO_T3=y
533# CONFIG_IXGB is not set
534# CONFIG_S2IO is not set
535# CONFIG_MYRI10GE is not set
536CONFIG_NETXEN_NIC=y
537
538#
539# Token Ring devices
540#
541# CONFIG_TR is not set
542
543#
544# Wireless LAN (non-hamradio)
545#
546# CONFIG_NET_RADIO is not set
547
548#
549# Wan interfaces
550#
551# CONFIG_WAN is not set
552# CONFIG_FDDI is not set
553# CONFIG_HIPPI is not set
554# CONFIG_PPP is not set
555# CONFIG_SLIP is not set
556# CONFIG_SHAPER is not set
557# CONFIG_NETCONSOLE is not set
558# CONFIG_NETPOLL is not set
559# CONFIG_NET_POLL_CONTROLLER is not set
560
561#
562# ISDN subsystem
563#
564# CONFIG_ISDN is not set
565
566#
567# Telephony Support
568#
569# CONFIG_PHONE is not set
570
571#
572# Input device support
573#
574CONFIG_INPUT=y
575# CONFIG_INPUT_FF_MEMLESS is not set
576
577#
578# Userland interfaces
579#
580CONFIG_INPUT_MOUSEDEV=y
581CONFIG_INPUT_MOUSEDEV_PSAUX=y
582CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
583CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
584# CONFIG_INPUT_JOYDEV is not set
585# CONFIG_INPUT_TSDEV is not set
586# CONFIG_INPUT_EVDEV is not set
587# CONFIG_INPUT_EVBUG is not set
588
589#
590# Input Device Drivers
591#
592# CONFIG_INPUT_KEYBOARD is not set
593# CONFIG_INPUT_MOUSE is not set
594# CONFIG_INPUT_JOYSTICK is not set
595# CONFIG_INPUT_TOUCHSCREEN is not set
596# CONFIG_INPUT_MISC is not set
597
598#
599# Hardware I/O ports
600#
601CONFIG_SERIO=y
602# CONFIG_SERIO_I8042 is not set
603CONFIG_SERIO_SERPORT=y
604# CONFIG_SERIO_PCIPS2 is not set
605# CONFIG_SERIO_LIBPS2 is not set
606CONFIG_SERIO_RAW=y
607# CONFIG_GAMEPORT is not set
608
609#
610# Character devices
611#
612CONFIG_VT=y
613CONFIG_VT_CONSOLE=y
614CONFIG_HW_CONSOLE=y
615CONFIG_VT_HW_CONSOLE_BINDING=y
616# CONFIG_SERIAL_NONSTANDARD is not set
617
618#
619# Serial drivers
620#
621CONFIG_SERIAL_8250=y
622CONFIG_SERIAL_8250_CONSOLE=y
623CONFIG_SERIAL_8250_PCI=y
624CONFIG_SERIAL_8250_NR_UARTS=4
625CONFIG_SERIAL_8250_RUNTIME_UARTS=4
626# CONFIG_SERIAL_8250_EXTENDED is not set
627
628#
629# Non-8250 serial port support
630#
631CONFIG_SERIAL_CORE=y
632CONFIG_SERIAL_CORE_CONSOLE=y
633# CONFIG_SERIAL_JSM is not set
634CONFIG_UNIX98_PTYS=y
635CONFIG_LEGACY_PTYS=y
636CONFIG_LEGACY_PTY_COUNT=256
637
638#
639# IPMI
640#
641# CONFIG_IPMI_HANDLER is not set
642
643#
644# Watchdog Cards
645#
646# CONFIG_WATCHDOG is not set
647# CONFIG_HW_RANDOM is not set
648# CONFIG_RTC is not set
649# CONFIG_GEN_RTC is not set
650# CONFIG_DTLK is not set
651# CONFIG_R3964 is not set
652# CONFIG_APPLICOM is not set
653# CONFIG_DRM is not set
654# CONFIG_RAW_DRIVER is not set
655
656#
657# TPM devices
658#
659# CONFIG_TCG_TPM is not set
660
661#
662# I2C support
663#
664# CONFIG_I2C is not set
665
666#
667# SPI support
668#
669# CONFIG_SPI is not set
670# CONFIG_SPI_MASTER is not set
671
672#
673# Dallas's 1-wire bus
674#
675# CONFIG_W1 is not set
676
677#
678# Hardware Monitoring support
679#
680# CONFIG_HWMON is not set
681# CONFIG_HWMON_VID is not set
682
683#
684# Multimedia devices
685#
686# CONFIG_VIDEO_DEV is not set
687
688#
689# Digital Video Broadcasting Devices
690#
691# CONFIG_DVB is not set
692
693#
694# Graphics support
695#
696# CONFIG_FIRMWARE_EDID is not set
697# CONFIG_FB is not set
698
699#
700# Console display driver support
701#
702# CONFIG_VGA_CONSOLE is not set
703CONFIG_DUMMY_CONSOLE=y
704# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
705
706#
707# Sound
708#
709# CONFIG_SOUND is not set
710
711#
712# HID Devices
713#
714# CONFIG_HID is not set
715
716#
717# USB support
718#
719CONFIG_USB_ARCH_HAS_HCD=y
720CONFIG_USB_ARCH_HAS_OHCI=y
721CONFIG_USB_ARCH_HAS_EHCI=y
722# CONFIG_USB is not set
723
724#
725# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
726#
727
728#
729# USB Gadget Support
730#
731# CONFIG_USB_GADGET is not set
732
733#
734# MMC/SD Card support
735#
736# CONFIG_MMC is not set
737
738#
739# LED devices
740#
741# CONFIG_NEW_LEDS is not set
742
743#
744# LED drivers
745#
746
747#
748# LED Triggers
749#
750
751#
752# InfiniBand support
753#
754# CONFIG_INFINIBAND is not set
755
756#
757# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
758#
759
760#
761# Real Time Clock
762#
763# CONFIG_RTC_CLASS is not set
764
765#
766# DMA Engine support
767#
768# CONFIG_DMA_ENGINE is not set
769
770#
771# DMA Clients
772#
773
774#
775# DMA Devices
776#
777
778#
779# Auxiliary Display support
780#
781
782#
783# Virtualization
784#
785
786#
787# File systems
788#
789CONFIG_EXT2_FS=y
790# CONFIG_EXT2_FS_XATTR is not set
791# CONFIG_EXT2_FS_XIP is not set
792# CONFIG_EXT3_FS is not set
793# CONFIG_EXT4DEV_FS is not set
794# CONFIG_REISERFS_FS is not set
795# CONFIG_JFS_FS is not set
796CONFIG_FS_POSIX_ACL=y
797# CONFIG_XFS_FS is not set
798# CONFIG_GFS2_FS is not set
799# CONFIG_OCFS2_FS is not set
800# CONFIG_MINIX_FS is not set
801# CONFIG_ROMFS_FS is not set
802CONFIG_INOTIFY=y
803CONFIG_INOTIFY_USER=y
804# CONFIG_QUOTA is not set
805CONFIG_DNOTIFY=y
806# CONFIG_AUTOFS_FS is not set
807# CONFIG_AUTOFS4_FS is not set
808CONFIG_FUSE_FS=y
809CONFIG_GENERIC_ACL=y
810
811#
812# CD-ROM/DVD Filesystems
813#
814# CONFIG_ISO9660_FS is not set
815# CONFIG_UDF_FS is not set
816
817#
818# DOS/FAT/NT Filesystems
819#
820# CONFIG_MSDOS_FS is not set
821# CONFIG_VFAT_FS is not set
822# CONFIG_NTFS_FS is not set
823
824#
825# Pseudo filesystems
826#
827CONFIG_PROC_FS=y
828CONFIG_PROC_KCORE=y
829CONFIG_PROC_SYSCTL=y
830CONFIG_SYSFS=y
831CONFIG_TMPFS=y
832CONFIG_TMPFS_POSIX_ACL=y
833# CONFIG_HUGETLB_PAGE is not set
834CONFIG_RAMFS=y
835CONFIG_CONFIGFS_FS=y
836
837#
838# Miscellaneous filesystems
839#
840# CONFIG_ADFS_FS is not set
841# CONFIG_AFFS_FS is not set
842# CONFIG_ECRYPT_FS is not set
843# CONFIG_HFS_FS is not set
844# CONFIG_HFSPLUS_FS is not set
845# CONFIG_BEFS_FS is not set
846# CONFIG_BFS_FS is not set
847# CONFIG_EFS_FS is not set
848# CONFIG_CRAMFS is not set
849# CONFIG_VXFS_FS is not set
850# CONFIG_HPFS_FS is not set
851# CONFIG_QNX4FS_FS is not set
852# CONFIG_SYSV_FS is not set
853# CONFIG_UFS_FS is not set
854
855#
856# Network File Systems
857#
858CONFIG_NFS_FS=y
859# CONFIG_NFS_V3 is not set
860# CONFIG_NFS_V4 is not set
861# CONFIG_NFS_DIRECTIO is not set
862CONFIG_NFSD=y
863# CONFIG_NFSD_V3 is not set
864# CONFIG_NFSD_TCP is not set
865CONFIG_ROOT_NFS=y
866CONFIG_LOCKD=y
867CONFIG_EXPORTFS=y
868CONFIG_NFS_COMMON=y
869CONFIG_SUNRPC=y
870# CONFIG_RPCSEC_GSS_KRB5 is not set
871# CONFIG_RPCSEC_GSS_SPKM3 is not set
872# CONFIG_SMB_FS is not set
873# CONFIG_CIFS is not set
874# CONFIG_NCP_FS is not set
875# CONFIG_CODA_FS is not set
876# CONFIG_AFS_FS is not set
877# CONFIG_9P_FS is not set
878
879#
880# Partition Types
881#
882# CONFIG_PARTITION_ADVANCED is not set
883CONFIG_MSDOS_PARTITION=y
884
885#
886# Native Language Support
887#
888# CONFIG_NLS is not set
889
890#
891# Distributed Lock Manager
892#
893CONFIG_DLM=y
894CONFIG_DLM_TCP=y
895# CONFIG_DLM_SCTP is not set
896# CONFIG_DLM_DEBUG is not set
897
898#
899# Profiling support
900#
901# CONFIG_PROFILING is not set
902
903#
904# Kernel hacking
905#
906CONFIG_TRACE_IRQFLAGS_SUPPORT=y
907# CONFIG_PRINTK_TIME is not set
908CONFIG_ENABLE_MUST_CHECK=y
909# CONFIG_MAGIC_SYSRQ is not set
910# CONFIG_UNUSED_SYMBOLS is not set
911# CONFIG_DEBUG_FS is not set
912# CONFIG_HEADERS_CHECK is not set
913# CONFIG_DEBUG_KERNEL is not set
914CONFIG_LOG_BUF_SHIFT=14
915CONFIG_CROSSCOMPILE=y
916CONFIG_CMDLINE=""
917
918#
919# Security options
920#
921CONFIG_KEYS=y
922CONFIG_KEYS_DEBUG_PROC_KEYS=y
923# CONFIG_SECURITY is not set
924
925#
926# Cryptographic options
927#
928CONFIG_CRYPTO=y
929CONFIG_CRYPTO_ALGAPI=y
930CONFIG_CRYPTO_BLKCIPHER=y
931CONFIG_CRYPTO_HASH=y
932CONFIG_CRYPTO_MANAGER=y
933CONFIG_CRYPTO_HMAC=y
934CONFIG_CRYPTO_XCBC=y
935CONFIG_CRYPTO_NULL=y
936CONFIG_CRYPTO_MD4=y
937CONFIG_CRYPTO_MD5=y
938CONFIG_CRYPTO_SHA1=y
939CONFIG_CRYPTO_SHA256=y
940CONFIG_CRYPTO_SHA512=y
941CONFIG_CRYPTO_WP512=y
942CONFIG_CRYPTO_TGR192=y
943CONFIG_CRYPTO_GF128MUL=y
944CONFIG_CRYPTO_ECB=y
945CONFIG_CRYPTO_CBC=y
946CONFIG_CRYPTO_PCBC=y
947CONFIG_CRYPTO_LRW=y
948CONFIG_CRYPTO_DES=y
949CONFIG_CRYPTO_FCRYPT=y
950CONFIG_CRYPTO_BLOWFISH=y
951CONFIG_CRYPTO_TWOFISH=y
952CONFIG_CRYPTO_TWOFISH_COMMON=y
953CONFIG_CRYPTO_SERPENT=y
954CONFIG_CRYPTO_AES=y
955CONFIG_CRYPTO_CAST5=y
956CONFIG_CRYPTO_CAST6=y
957CONFIG_CRYPTO_TEA=y
958CONFIG_CRYPTO_ARC4=y
959CONFIG_CRYPTO_KHAZAD=y
960CONFIG_CRYPTO_ANUBIS=y
961CONFIG_CRYPTO_DEFLATE=y
962CONFIG_CRYPTO_MICHAEL_MIC=y
963CONFIG_CRYPTO_CRC32C=y
964CONFIG_CRYPTO_CAMELLIA=y
965
966#
967# Hardware crypto devices
968#
969
970#
971# Library routines
972#
973CONFIG_BITREVERSE=y
974# CONFIG_CRC_CCITT is not set
975CONFIG_CRC16=y
976CONFIG_CRC32=y
977CONFIG_LIBCRC32C=y
978CONFIG_ZLIB_INFLATE=y
979CONFIG_ZLIB_DEFLATE=y
980CONFIG_PLIST=y
981CONFIG_HAS_IOMEM=y
982CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/ocelot_defconfig b/arch/mips/configs/ocelot_defconfig
index 15a027e00eec..e1db1fb80cd0 100644
--- a/arch/mips/configs/ocelot_defconfig
+++ b/arch/mips/configs/ocelot_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37CONFIG_MOMENCO_OCELOT=y 35CONFIG_MOMENCO_OCELOT=y
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/pb1100_defconfig b/arch/mips/configs/pb1100_defconfig
index 37d696c64541..0028aef0af9d 100644
--- a/arch/mips/configs/pb1100_defconfig
+++ b/arch/mips/configs/pb1100_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_PB1100=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_PB1100=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig
index b11f0e8b6059..8a1d5888739c 100644
--- a/arch/mips/configs/pb1500_defconfig
+++ b/arch/mips/configs/pb1500_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_PB1500=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_PB1500=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/pb1550_defconfig b/arch/mips/configs/pb1550_defconfig
index 2927f38f4907..5581ad2ca411 100644
--- a/arch/mips/configs/pb1550_defconfig
+++ b/arch/mips/configs/pb1550_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_PB1550=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_PB1550=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/pnx8550-jbs_defconfig b/arch/mips/configs/pnx8550-jbs_defconfig
index fae16c5ec521..821c1cee5639 100644
--- a/arch/mips/configs/pnx8550-jbs_defconfig
+++ b/arch/mips/configs/pnx8550-jbs_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42CONFIG_PNX8550_JBS=y 38CONFIG_PNX8550_JBS=y
diff --git a/arch/mips/configs/pnx8550-stb810_defconfig b/arch/mips/configs/pnx8550-stb810_defconfig
index cd821e52181d..0e8bd92b38cf 100644
--- a/arch/mips/configs/pnx8550-stb810_defconfig
+++ b/arch/mips/configs/pnx8550-stb810_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/qemu_defconfig b/arch/mips/configs/qemu_defconfig
index 8e8d03157954..703de002e372 100644
--- a/arch/mips/configs/qemu_defconfig
+++ b/arch/mips/configs/qemu_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
@@ -225,7 +221,7 @@ CONFIG_DEFAULT_IOSCHED="noop"
225# 221#
226CONFIG_ISA=y 222CONFIG_ISA=y
227CONFIG_MMU=y 223CONFIG_MMU=y
228CONFIG_I8253=y 224CONFIG_PCSPEAKER=y
229 225
230# 226#
231# PCCARD (PCMCIA/CardBus) support 227# PCCARD (PCMCIA/CardBus) support
diff --git a/arch/mips/configs/rbhma4200_defconfig b/arch/mips/configs/rbhma4200_defconfig
index 35d64260917e..20a38526d483 100644
--- a/arch/mips/configs/rbhma4200_defconfig
+++ b/arch/mips/configs/rbhma4200_defconfig
@@ -24,17 +24,13 @@ CONFIG_MIPS=y
24# CONFIG_BASLER_EXCITE is not set 24# CONFIG_BASLER_EXCITE is not set
25# CONFIG_MIPS_COBALT is not set 25# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 26# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MACH_JAZZ is not set 27# CONFIG_MACH_JAZZ is not set
29# CONFIG_LASAT is not set
30# CONFIG_MIPS_ATLAS is not set 28# CONFIG_MIPS_ATLAS is not set
31# CONFIG_MIPS_MALTA is not set 29# CONFIG_MIPS_MALTA is not set
32# CONFIG_MIPS_SEAD is not set 30# CONFIG_MIPS_SEAD is not set
33# CONFIG_WR_PPMC is not set 31# CONFIG_WR_PPMC is not set
34# CONFIG_MIPS_SIM is not set 32# CONFIG_MIPS_SIM is not set
35# CONFIG_MOMENCO_OCELOT is not set 33# CONFIG_MOMENCO_OCELOT is not set
36# CONFIG_MOMENCO_OCELOT_3 is not set
37# CONFIG_MOMENCO_OCELOT_C is not set
38# CONFIG_MIPS_XXS1500 is not set 34# CONFIG_MIPS_XXS1500 is not set
39# CONFIG_PNX8550_JBS is not set 35# CONFIG_PNX8550_JBS is not set
40# CONFIG_PNX8550_STB810 is not set 36# CONFIG_PNX8550_STB810 is not set
diff --git a/arch/mips/configs/rbhma4500_defconfig b/arch/mips/configs/rbhma4500_defconfig
index 41011f770a67..5dbb250f71c7 100644
--- a/arch/mips/configs/rbhma4500_defconfig
+++ b/arch/mips/configs/rbhma4500_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.20 3# Linux kernel version: 2.6.22-rc5
4# Tue Feb 20 21:47:39 2007 4# Fri Jun 22 21:39:45 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
@@ -9,40 +9,23 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y 11CONFIG_ZONE_DMA=y
12# CONFIG_MIPS_MTX1 is not set 12# CONFIG_LEMOTE_FULONG is not set
13# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MACH_ALCHEMY is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 14# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 15# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 16# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 17# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 18# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 19# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 20# CONFIG_MIPS_SEAD is not set
34# CONFIG_WR_PPMC is not set 21# CONFIG_WR_PPMC is not set
35# CONFIG_MIPS_SIM is not set 22# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 23# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 24# CONFIG_PNX8550_JBS is not set
43# CONFIG_PNX8550_STB810 is not set 25# CONFIG_PNX8550_STB810 is not set
44# CONFIG_DDB5477 is not set 26# CONFIG_DDB5477 is not set
45# CONFIG_MACH_VR41XX is not set 27# CONFIG_MACH_VR41XX is not set
28# CONFIG_PMC_MSP is not set
46# CONFIG_PMC_YOSEMITE is not set 29# CONFIG_PMC_YOSEMITE is not set
47# CONFIG_QEMU is not set 30# CONFIG_QEMU is not set
48# CONFIG_MARKEINS is not set 31# CONFIG_MARKEINS is not set
@@ -82,6 +65,8 @@ CONFIG_DMA_NONCOHERENT=y
82CONFIG_DMA_NEED_PCI_MAP_STATE=y 65CONFIG_DMA_NEED_PCI_MAP_STATE=y
83CONFIG_GENERIC_ISA_DMA=y 66CONFIG_GENERIC_ISA_DMA=y
84CONFIG_I8259=y 67CONFIG_I8259=y
68# CONFIG_NO_IOPORT is not set
69CONFIG_GENERIC_GPIO=y
85# CONFIG_CPU_BIG_ENDIAN is not set 70# CONFIG_CPU_BIG_ENDIAN is not set
86CONFIG_CPU_LITTLE_ENDIAN=y 71CONFIG_CPU_LITTLE_ENDIAN=y
87CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 72CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
@@ -93,6 +78,7 @@ CONFIG_HAVE_STD_PC_SERIAL_PORT=y
93# 78#
94# CPU selection 79# CPU selection
95# 80#
81# CONFIG_CPU_LOONGSON2 is not set
96# CONFIG_CPU_MIPS32_R1 is not set 82# CONFIG_CPU_MIPS32_R1 is not set
97# CONFIG_CPU_MIPS32_R2 is not set 83# CONFIG_CPU_MIPS32_R2 is not set
98# CONFIG_CPU_MIPS64_R1 is not set 84# CONFIG_CPU_MIPS64_R1 is not set
@@ -149,12 +135,12 @@ CONFIG_ZONE_DMA_FLAG=1
149# CONFIG_HZ_48 is not set 135# CONFIG_HZ_48 is not set
150# CONFIG_HZ_100 is not set 136# CONFIG_HZ_100 is not set
151# CONFIG_HZ_128 is not set 137# CONFIG_HZ_128 is not set
152# CONFIG_HZ_250 is not set 138CONFIG_HZ_250=y
153# CONFIG_HZ_256 is not set 139# CONFIG_HZ_256 is not set
154CONFIG_HZ_1000=y 140# CONFIG_HZ_1000 is not set
155# CONFIG_HZ_1024 is not set 141# CONFIG_HZ_1024 is not set
156CONFIG_SYS_SUPPORTS_ARBIT_HZ=y 142CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
157CONFIG_HZ=1000 143CONFIG_HZ=250
158CONFIG_PREEMPT_NONE=y 144CONFIG_PREEMPT_NONE=y
159# CONFIG_PREEMPT_VOLUNTARY is not set 145# CONFIG_PREEMPT_VOLUNTARY is not set
160# CONFIG_PREEMPT is not set 146# CONFIG_PREEMPT is not set
@@ -186,28 +172,35 @@ CONFIG_SYSVIPC_SYSCTL=y
186# CONFIG_AUDIT is not set 172# CONFIG_AUDIT is not set
187CONFIG_IKCONFIG=y 173CONFIG_IKCONFIG=y
188CONFIG_IKCONFIG_PROC=y 174CONFIG_IKCONFIG_PROC=y
175CONFIG_LOG_BUF_SHIFT=14
189CONFIG_SYSFS_DEPRECATED=y 176CONFIG_SYSFS_DEPRECATED=y
190CONFIG_RELAY=y 177# CONFIG_RELAY is not set
178CONFIG_BLK_DEV_INITRD=y
191CONFIG_INITRAMFS_SOURCE="" 179CONFIG_INITRAMFS_SOURCE=""
192# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 180CONFIG_CC_OPTIMIZE_FOR_SIZE=y
193CONFIG_SYSCTL=y 181CONFIG_SYSCTL=y
194CONFIG_EMBEDDED=y 182CONFIG_EMBEDDED=y
195CONFIG_SYSCTL_SYSCALL=y 183CONFIG_SYSCTL_SYSCALL=y
196CONFIG_KALLSYMS=y 184CONFIG_KALLSYMS=y
197# CONFIG_KALLSYMS_EXTRA_PASS is not set 185# CONFIG_KALLSYMS_EXTRA_PASS is not set
198CONFIG_HOTPLUG=y 186# CONFIG_HOTPLUG is not set
199CONFIG_PRINTK=y 187CONFIG_PRINTK=y
200CONFIG_BUG=y 188CONFIG_BUG=y
201CONFIG_ELF_CORE=y 189CONFIG_ELF_CORE=y
202CONFIG_BASE_FULL=y 190CONFIG_BASE_FULL=y
203# CONFIG_FUTEX is not set 191# CONFIG_FUTEX is not set
192CONFIG_ANON_INODES=y
204# CONFIG_EPOLL is not set 193# CONFIG_EPOLL is not set
194CONFIG_SIGNALFD=y
195CONFIG_TIMERFD=y
196CONFIG_EVENTFD=y
205CONFIG_SHMEM=y 197CONFIG_SHMEM=y
206CONFIG_SLAB=y
207CONFIG_VM_EVENT_COUNTERS=y 198CONFIG_VM_EVENT_COUNTERS=y
199CONFIG_SLAB=y
200# CONFIG_SLUB is not set
201# CONFIG_SLOB is not set
208# CONFIG_TINY_SHMEM is not set 202# CONFIG_TINY_SHMEM is not set
209CONFIG_BASE_SMALL=0 203CONFIG_BASE_SMALL=0
210# CONFIG_SLOB is not set
211 204
212# 205#
213# Loadable module support 206# Loadable module support
@@ -244,17 +237,12 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
244# 237#
245CONFIG_HW_HAS_PCI=y 238CONFIG_HW_HAS_PCI=y
246CONFIG_PCI=y 239CONFIG_PCI=y
240# CONFIG_ARCH_SUPPORTS_MSI is not set
247CONFIG_MMU=y 241CONFIG_MMU=y
248 242
249# 243#
250# PCCARD (PCMCIA/CardBus) support 244# PCCARD (PCMCIA/CardBus) support
251# 245#
252# CONFIG_PCCARD is not set
253
254#
255# PCI Hotplug Support
256#
257# CONFIG_HOTPLUG_PCI is not set
258 246
259# 247#
260# Executable file formats 248# Executable file formats
@@ -266,10 +254,7 @@ CONFIG_TRAD_SIGNALS=y
266# 254#
267# Power management options 255# Power management options
268# 256#
269CONFIG_PM=y 257# CONFIG_PM is not set
270# CONFIG_PM_LEGACY is not set
271# CONFIG_PM_DEBUG is not set
272# CONFIG_PM_SYSFS_DEPRECATED is not set
273 258
274# 259#
275# Networking 260# Networking
@@ -279,14 +264,9 @@ CONFIG_NET=y
279# 264#
280# Networking options 265# Networking options
281# 266#
282# CONFIG_NETDEBUG is not set
283CONFIG_PACKET=y 267CONFIG_PACKET=y
284# CONFIG_PACKET_MMAP is not set 268# CONFIG_PACKET_MMAP is not set
285CONFIG_UNIX=y 269CONFIG_UNIX=y
286CONFIG_XFRM=y
287# CONFIG_XFRM_USER is not set
288# CONFIG_XFRM_SUB_POLICY is not set
289CONFIG_XFRM_MIGRATE=y
290# CONFIG_NET_KEY is not set 270# CONFIG_NET_KEY is not set
291CONFIG_INET=y 271CONFIG_INET=y
292CONFIG_IP_MULTICAST=y 272CONFIG_IP_MULTICAST=y
@@ -294,7 +274,7 @@ CONFIG_IP_MULTICAST=y
294CONFIG_IP_FIB_HASH=y 274CONFIG_IP_FIB_HASH=y
295CONFIG_IP_PNP=y 275CONFIG_IP_PNP=y
296# CONFIG_IP_PNP_DHCP is not set 276# CONFIG_IP_PNP_DHCP is not set
297CONFIG_IP_PNP_BOOTP=y 277# CONFIG_IP_PNP_BOOTP is not set
298# CONFIG_IP_PNP_RARP is not set 278# CONFIG_IP_PNP_RARP is not set
299# CONFIG_NET_IPIP is not set 279# CONFIG_NET_IPIP is not set
300# CONFIG_NET_IPGRE is not set 280# CONFIG_NET_IPGRE is not set
@@ -305,130 +285,23 @@ CONFIG_IP_PNP_BOOTP=y
305# CONFIG_INET_ESP is not set 285# CONFIG_INET_ESP is not set
306# CONFIG_INET_IPCOMP is not set 286# CONFIG_INET_IPCOMP is not set
307# CONFIG_INET_XFRM_TUNNEL is not set 287# CONFIG_INET_XFRM_TUNNEL is not set
308CONFIG_INET_TUNNEL=m 288# CONFIG_INET_TUNNEL is not set
309CONFIG_INET_XFRM_MODE_TRANSPORT=m 289# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
310CONFIG_INET_XFRM_MODE_TUNNEL=m 290# CONFIG_INET_XFRM_MODE_TUNNEL is not set
311CONFIG_INET_XFRM_MODE_BEET=m 291# CONFIG_INET_XFRM_MODE_BEET is not set
312CONFIG_INET_DIAG=y 292CONFIG_INET_DIAG=y
313CONFIG_INET_TCP_DIAG=y 293CONFIG_INET_TCP_DIAG=y
314# CONFIG_TCP_CONG_ADVANCED is not set 294# CONFIG_TCP_CONG_ADVANCED is not set
315CONFIG_TCP_CONG_CUBIC=y 295CONFIG_TCP_CONG_CUBIC=y
316CONFIG_DEFAULT_TCP_CONG="cubic" 296CONFIG_DEFAULT_TCP_CONG="cubic"
317CONFIG_TCP_MD5SIG=y 297# CONFIG_TCP_MD5SIG is not set
318 298# CONFIG_IPV6 is not set
319#
320# IP: Virtual Server Configuration
321#
322# CONFIG_IP_VS is not set
323CONFIG_IPV6=m
324# CONFIG_IPV6_PRIVACY is not set
325CONFIG_IPV6_ROUTER_PREF=y
326CONFIG_IPV6_ROUTE_INFO=y
327# CONFIG_INET6_AH is not set
328# CONFIG_INET6_ESP is not set
329# CONFIG_INET6_IPCOMP is not set
330CONFIG_IPV6_MIP6=y
331# CONFIG_INET6_XFRM_TUNNEL is not set 299# CONFIG_INET6_XFRM_TUNNEL is not set
332# CONFIG_INET6_TUNNEL is not set 300# CONFIG_INET6_TUNNEL is not set
333CONFIG_INET6_XFRM_MODE_TRANSPORT=m 301# CONFIG_NETWORK_SECMARK is not set
334CONFIG_INET6_XFRM_MODE_TUNNEL=m 302# CONFIG_NETFILTER is not set
335CONFIG_INET6_XFRM_MODE_BEET=m
336CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
337CONFIG_IPV6_SIT=m
338# CONFIG_IPV6_TUNNEL is not set
339CONFIG_IPV6_MULTIPLE_TABLES=y
340CONFIG_IPV6_SUBTREES=y
341CONFIG_NETWORK_SECMARK=y
342CONFIG_NETFILTER=y
343# CONFIG_NETFILTER_DEBUG is not set
344
345#
346# Core Netfilter Configuration
347#
348CONFIG_NETFILTER_NETLINK=m
349CONFIG_NETFILTER_NETLINK_QUEUE=m
350CONFIG_NETFILTER_NETLINK_LOG=m
351CONFIG_NF_CONNTRACK_ENABLED=m
352CONFIG_NF_CONNTRACK_SUPPORT=y
353# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
354CONFIG_NF_CONNTRACK=m
355CONFIG_NF_CT_ACCT=y
356CONFIG_NF_CONNTRACK_MARK=y
357CONFIG_NF_CONNTRACK_SECMARK=y
358CONFIG_NF_CONNTRACK_EVENTS=y
359CONFIG_NF_CT_PROTO_GRE=m
360CONFIG_NF_CT_PROTO_SCTP=m
361CONFIG_NF_CONNTRACK_AMANDA=m
362CONFIG_NF_CONNTRACK_FTP=m
363CONFIG_NF_CONNTRACK_H323=m
364CONFIG_NF_CONNTRACK_IRC=m
365# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
366CONFIG_NF_CONNTRACK_PPTP=m
367CONFIG_NF_CONNTRACK_SANE=m
368CONFIG_NF_CONNTRACK_SIP=m
369CONFIG_NF_CONNTRACK_TFTP=m
370CONFIG_NF_CT_NETLINK=m
371CONFIG_NETFILTER_XTABLES=m
372CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
373CONFIG_NETFILTER_XT_TARGET_MARK=m
374CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
375CONFIG_NETFILTER_XT_TARGET_NFLOG=m
376CONFIG_NETFILTER_XT_TARGET_SECMARK=m
377CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
378CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
379CONFIG_NETFILTER_XT_MATCH_COMMENT=m
380CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
381CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
382CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
383CONFIG_NETFILTER_XT_MATCH_DCCP=m
384CONFIG_NETFILTER_XT_MATCH_DSCP=m
385CONFIG_NETFILTER_XT_MATCH_ESP=m
386CONFIG_NETFILTER_XT_MATCH_HELPER=m
387CONFIG_NETFILTER_XT_MATCH_LENGTH=m
388CONFIG_NETFILTER_XT_MATCH_LIMIT=m
389CONFIG_NETFILTER_XT_MATCH_MAC=m
390CONFIG_NETFILTER_XT_MATCH_MARK=m
391# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
392CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
393CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
394CONFIG_NETFILTER_XT_MATCH_QUOTA=m
395CONFIG_NETFILTER_XT_MATCH_REALM=m
396CONFIG_NETFILTER_XT_MATCH_SCTP=m
397CONFIG_NETFILTER_XT_MATCH_STATE=m
398CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
399CONFIG_NETFILTER_XT_MATCH_STRING=m
400CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
401CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
402
403#
404# IP: Netfilter Configuration
405#
406CONFIG_NF_CONNTRACK_IPV4=m
407CONFIG_NF_CONNTRACK_PROC_COMPAT=y
408# CONFIG_IP_NF_QUEUE is not set
409# CONFIG_IP_NF_IPTABLES is not set
410# CONFIG_IP_NF_ARPTABLES is not set
411
412#
413# IPv6: Netfilter Configuration (EXPERIMENTAL)
414#
415CONFIG_NF_CONNTRACK_IPV6=m
416# CONFIG_IP6_NF_QUEUE is not set
417# CONFIG_IP6_NF_IPTABLES is not set
418
419#
420# DCCP Configuration (EXPERIMENTAL)
421#
422# CONFIG_IP_DCCP is not set 303# CONFIG_IP_DCCP is not set
423
424#
425# SCTP Configuration (EXPERIMENTAL)
426#
427# CONFIG_IP_SCTP is not set 304# CONFIG_IP_SCTP is not set
428
429#
430# TIPC Configuration (EXPERIMENTAL)
431#
432# CONFIG_TIPC is not set 305# CONFIG_TIPC is not set
433# CONFIG_ATM is not set 306# CONFIG_ATM is not set
434# CONFIG_BRIDGE is not set 307# CONFIG_BRIDGE is not set
@@ -446,7 +319,6 @@ CONFIG_NF_CONNTRACK_IPV6=m
446# QoS and/or fair queueing 319# QoS and/or fair queueing
447# 320#
448# CONFIG_NET_SCHED is not set 321# CONFIG_NET_SCHED is not set
449CONFIG_NET_CLS_ROUTE=y
450 322
451# 323#
452# Network testing 324# Network testing
@@ -455,15 +327,16 @@ CONFIG_NET_CLS_ROUTE=y
455# CONFIG_HAMRADIO is not set 327# CONFIG_HAMRADIO is not set
456# CONFIG_IRDA is not set 328# CONFIG_IRDA is not set
457# CONFIG_BT is not set 329# CONFIG_BT is not set
458CONFIG_IEEE80211=m 330# CONFIG_AF_RXRPC is not set
459# CONFIG_IEEE80211_DEBUG is not set 331
460CONFIG_IEEE80211_CRYPT_WEP=m 332#
461CONFIG_IEEE80211_CRYPT_CCMP=m 333# Wireless
462CONFIG_IEEE80211_CRYPT_TKIP=m 334#
463CONFIG_IEEE80211_SOFTMAC=m 335# CONFIG_CFG80211 is not set
464# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 336# CONFIG_WIRELESS_EXT is not set
465CONFIG_WIRELESS_EXT=y 337# CONFIG_MAC80211 is not set
466CONFIG_FIB_RULES=y 338# CONFIG_IEEE80211 is not set
339# CONFIG_RFKILL is not set
467 340
468# 341#
469# Device Drivers 342# Device Drivers
@@ -474,94 +347,13 @@ CONFIG_FIB_RULES=y
474# 347#
475CONFIG_STANDALONE=y 348CONFIG_STANDALONE=y
476CONFIG_PREVENT_FIRMWARE_BUILD=y 349CONFIG_PREVENT_FIRMWARE_BUILD=y
477CONFIG_FW_LOADER=m
478# CONFIG_SYS_HYPERVISOR is not set 350# CONFIG_SYS_HYPERVISOR is not set
479 351
480# 352#
481# Connector - unified userspace <-> kernelspace linker 353# Connector - unified userspace <-> kernelspace linker
482# 354#
483CONFIG_CONNECTOR=m 355# CONFIG_CONNECTOR is not set
484 356# CONFIG_MTD is not set
485#
486# Memory Technology Devices (MTD)
487#
488CONFIG_MTD=y
489# CONFIG_MTD_DEBUG is not set
490# CONFIG_MTD_CONCAT is not set
491CONFIG_MTD_PARTITIONS=y
492# CONFIG_MTD_REDBOOT_PARTS is not set
493# CONFIG_MTD_CMDLINE_PARTS is not set
494
495#
496# User Modules And Translation Layers
497#
498CONFIG_MTD_CHAR=y
499CONFIG_MTD_BLKDEVS=y
500CONFIG_MTD_BLOCK=y
501# CONFIG_FTL is not set
502# CONFIG_NFTL is not set
503# CONFIG_INFTL is not set
504# CONFIG_RFD_FTL is not set
505# CONFIG_SSFDC is not set
506
507#
508# RAM/ROM/Flash chip drivers
509#
510CONFIG_MTD_CFI=y
511# CONFIG_MTD_JEDECPROBE is not set
512CONFIG_MTD_GEN_PROBE=y
513# CONFIG_MTD_CFI_ADV_OPTIONS is not set
514CONFIG_MTD_MAP_BANK_WIDTH_1=y
515CONFIG_MTD_MAP_BANK_WIDTH_2=y
516CONFIG_MTD_MAP_BANK_WIDTH_4=y
517# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
518# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
519# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
520CONFIG_MTD_CFI_I1=y
521CONFIG_MTD_CFI_I2=y
522# CONFIG_MTD_CFI_I4 is not set
523# CONFIG_MTD_CFI_I8 is not set
524CONFIG_MTD_CFI_INTELEXT=y
525CONFIG_MTD_CFI_AMDSTD=y
526# CONFIG_MTD_CFI_STAA is not set
527CONFIG_MTD_CFI_UTIL=y
528# CONFIG_MTD_RAM is not set
529# CONFIG_MTD_ROM is not set
530# CONFIG_MTD_ABSENT is not set
531# CONFIG_MTD_OBSOLETE_CHIPS is not set
532
533#
534# Mapping drivers for chip access
535#
536# CONFIG_MTD_COMPLEX_MAPPINGS is not set
537# CONFIG_MTD_PHYSMAP is not set
538# CONFIG_MTD_PLATRAM is not set
539
540#
541# Self-contained MTD device drivers
542#
543# CONFIG_MTD_PMC551 is not set
544# CONFIG_MTD_SLRAM is not set
545# CONFIG_MTD_PHRAM is not set
546# CONFIG_MTD_MTDRAM is not set
547# CONFIG_MTD_BLOCK2MTD is not set
548
549#
550# Disk-On-Chip Device Drivers
551#
552# CONFIG_MTD_DOC2000 is not set
553# CONFIG_MTD_DOC2001 is not set
554# CONFIG_MTD_DOC2001PLUS is not set
555
556#
557# NAND Flash Device Drivers
558#
559# CONFIG_MTD_NAND is not set
560
561#
562# OneNAND Flash Device Drivers
563#
564# CONFIG_MTD_ONENAND is not set
565 357
566# 358#
567# Parallel port support 359# Parallel port support
@@ -583,93 +375,30 @@ CONFIG_MTD_CFI_UTIL=y
583# CONFIG_BLK_DEV_COW_COMMON is not set 375# CONFIG_BLK_DEV_COW_COMMON is not set
584CONFIG_BLK_DEV_LOOP=y 376CONFIG_BLK_DEV_LOOP=y
585# CONFIG_BLK_DEV_CRYPTOLOOP is not set 377# CONFIG_BLK_DEV_CRYPTOLOOP is not set
586CONFIG_BLK_DEV_NBD=m 378# CONFIG_BLK_DEV_NBD is not set
587# CONFIG_BLK_DEV_SX8 is not set 379# CONFIG_BLK_DEV_SX8 is not set
588# CONFIG_BLK_DEV_UB is not set
589CONFIG_BLK_DEV_RAM=y 380CONFIG_BLK_DEV_RAM=y
590CONFIG_BLK_DEV_RAM_COUNT=16 381CONFIG_BLK_DEV_RAM_COUNT=16
591CONFIG_BLK_DEV_RAM_SIZE=8192 382CONFIG_BLK_DEV_RAM_SIZE=8192
592CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 383CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
593CONFIG_BLK_DEV_INITRD=y
594# CONFIG_CDROM_PKTCDVD is not set 384# CONFIG_CDROM_PKTCDVD is not set
595# CONFIG_ATA_OVER_ETH is not set 385# CONFIG_ATA_OVER_ETH is not set
596 386
597# 387#
598# Misc devices 388# Misc devices
599# 389#
600CONFIG_SGI_IOC4=m 390# CONFIG_PHANTOM is not set
391# CONFIG_SGI_IOC4 is not set
601# CONFIG_TIFM_CORE is not set 392# CONFIG_TIFM_CORE is not set
602 393# CONFIG_BLINK is not set
603# 394# CONFIG_IDE is not set
604# ATA/ATAPI/MFM/RLL support
605#
606CONFIG_IDE=y
607CONFIG_IDE_MAX_HWIFS=4
608CONFIG_BLK_DEV_IDE=y
609
610#
611# Please see Documentation/ide.txt for help/info on IDE drives
612#
613# CONFIG_BLK_DEV_IDE_SATA is not set
614CONFIG_BLK_DEV_IDEDISK=y
615# CONFIG_IDEDISK_MULTI_MODE is not set
616CONFIG_BLK_DEV_IDECD=y
617# CONFIG_BLK_DEV_IDETAPE is not set
618# CONFIG_BLK_DEV_IDEFLOPPY is not set
619# CONFIG_IDE_TASK_IOCTL is not set
620
621#
622# IDE chipset support/bugfixes
623#
624CONFIG_IDE_GENERIC=y
625CONFIG_BLK_DEV_IDEPCI=y
626CONFIG_IDEPCI_SHARE_IRQ=y
627# CONFIG_BLK_DEV_OFFBOARD is not set
628# CONFIG_BLK_DEV_GENERIC is not set
629# CONFIG_BLK_DEV_OPTI621 is not set
630CONFIG_BLK_DEV_IDEDMA_PCI=y
631# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
632# CONFIG_IDEDMA_PCI_AUTO is not set
633# CONFIG_BLK_DEV_AEC62XX is not set
634# CONFIG_BLK_DEV_ALI15X3 is not set
635# CONFIG_BLK_DEV_AMD74XX is not set
636# CONFIG_BLK_DEV_CMD64X is not set
637# CONFIG_BLK_DEV_TRIFLEX is not set
638# CONFIG_BLK_DEV_CY82C693 is not set
639# CONFIG_BLK_DEV_CS5520 is not set
640# CONFIG_BLK_DEV_CS5530 is not set
641# CONFIG_BLK_DEV_HPT34X is not set
642# CONFIG_BLK_DEV_HPT366 is not set
643# CONFIG_BLK_DEV_JMICRON is not set
644# CONFIG_BLK_DEV_SC1200 is not set
645# CONFIG_BLK_DEV_PIIX is not set
646CONFIG_BLK_DEV_IT8213=m
647# CONFIG_BLK_DEV_IT821X is not set
648# CONFIG_BLK_DEV_NS87415 is not set
649# CONFIG_BLK_DEV_PDC202XX_OLD is not set
650# CONFIG_BLK_DEV_PDC202XX_NEW is not set
651# CONFIG_BLK_DEV_SVWKS is not set
652# CONFIG_BLK_DEV_SIIMAGE is not set
653# CONFIG_BLK_DEV_SLC90E66 is not set
654# CONFIG_BLK_DEV_TRM290 is not set
655# CONFIG_BLK_DEV_VIA82CXXX is not set
656CONFIG_BLK_DEV_TC86C001=m
657# CONFIG_IDE_ARM is not set
658CONFIG_BLK_DEV_IDEDMA=y
659# CONFIG_IDEDMA_IVB is not set
660# CONFIG_IDEDMA_AUTO is not set
661# CONFIG_BLK_DEV_HD is not set
662 395
663# 396#
664# SCSI device support 397# SCSI device support
665# 398#
666CONFIG_RAID_ATTRS=m 399# CONFIG_RAID_ATTRS is not set
667# CONFIG_SCSI is not set 400# CONFIG_SCSI is not set
668# CONFIG_SCSI_NETLINK is not set 401# CONFIG_SCSI_NETLINK is not set
669
670#
671# Serial ATA (prod) and Parallel ATA (experimental) drivers
672#
673# CONFIG_ATA is not set 402# CONFIG_ATA is not set
674 403
675# 404#
@@ -685,6 +414,7 @@ CONFIG_RAID_ATTRS=m
685# 414#
686# IEEE 1394 (FireWire) support 415# IEEE 1394 (FireWire) support
687# 416#
417# CONFIG_FIREWIRE is not set
688# CONFIG_IEEE1394 is not set 418# CONFIG_IEEE1394 is not set
689 419
690# 420#
@@ -699,36 +429,15 @@ CONFIG_NETDEVICES=y
699# CONFIG_DUMMY is not set 429# CONFIG_DUMMY is not set
700# CONFIG_BONDING is not set 430# CONFIG_BONDING is not set
701# CONFIG_EQUALIZER is not set 431# CONFIG_EQUALIZER is not set
702CONFIG_TUN=m 432# CONFIG_TUN is not set
703
704#
705# ARCnet devices
706#
707# CONFIG_ARCNET is not set 433# CONFIG_ARCNET is not set
708 434# CONFIG_PHYLIB is not set
709#
710# PHY device support
711#
712CONFIG_PHYLIB=m
713
714#
715# MII PHY device drivers
716#
717CONFIG_MARVELL_PHY=m
718CONFIG_DAVICOM_PHY=m
719CONFIG_QSEMI_PHY=m
720CONFIG_LXT_PHY=m
721CONFIG_CICADA_PHY=m
722CONFIG_VITESSE_PHY=m
723CONFIG_SMSC_PHY=m
724# CONFIG_BROADCOM_PHY is not set
725# CONFIG_FIXED_PHY is not set
726 435
727# 436#
728# Ethernet (10 or 100Mbit) 437# Ethernet (10 or 100Mbit)
729# 438#
730CONFIG_NET_ETHERNET=y 439CONFIG_NET_ETHERNET=y
731# CONFIG_MII is not set 440CONFIG_MII=y
732# CONFIG_HAPPYMEAL is not set 441# CONFIG_HAPPYMEAL is not set
733# CONFIG_SUNGEM is not set 442# CONFIG_SUNGEM is not set
734# CONFIG_CASSINI is not set 443# CONFIG_CASSINI is not set
@@ -747,6 +456,7 @@ CONFIG_NET_PCI=y
747# CONFIG_ADAPTEC_STARFIRE is not set 456# CONFIG_ADAPTEC_STARFIRE is not set
748# CONFIG_B44 is not set 457# CONFIG_B44 is not set
749# CONFIG_FORCEDETH is not set 458# CONFIG_FORCEDETH is not set
459CONFIG_TC35815=y
750# CONFIG_DGRS is not set 460# CONFIG_DGRS is not set
751# CONFIG_EEPRO100 is not set 461# CONFIG_EEPRO100 is not set
752# CONFIG_E100 is not set 462# CONFIG_E100 is not set
@@ -761,91 +471,20 @@ CONFIG_NET_PCI=y
761# CONFIG_TLAN is not set 471# CONFIG_TLAN is not set
762# CONFIG_VIA_RHINE is not set 472# CONFIG_VIA_RHINE is not set
763# CONFIG_SC92031 is not set 473# CONFIG_SC92031 is not set
764 474# CONFIG_NETDEV_1000 is not set
765# 475# CONFIG_NETDEV_10000 is not set
766# Ethernet (1000 Mbit)
767#
768# CONFIG_ACENIC is not set
769# CONFIG_DL2K is not set
770# CONFIG_E1000 is not set
771# CONFIG_NS83820 is not set
772# CONFIG_HAMACHI is not set
773# CONFIG_YELLOWFIN is not set
774# CONFIG_R8169 is not set
775# CONFIG_SIS190 is not set
776# CONFIG_SKGE is not set
777# CONFIG_SKY2 is not set
778# CONFIG_SK98LIN is not set
779# CONFIG_VIA_VELOCITY is not set
780# CONFIG_TIGON3 is not set
781# CONFIG_BNX2 is not set
782CONFIG_QLA3XXX=m
783# CONFIG_ATL1 is not set
784
785#
786# Ethernet (10000 Mbit)
787#
788# CONFIG_CHELSIO_T1 is not set
789CONFIG_CHELSIO_T3=m
790# CONFIG_IXGB is not set
791# CONFIG_S2IO is not set
792# CONFIG_MYRI10GE is not set
793CONFIG_NETXEN_NIC=m
794
795#
796# Token Ring devices
797#
798# CONFIG_TR is not set 476# CONFIG_TR is not set
799 477
800# 478#
801# Wireless LAN (non-hamradio) 479# Wireless LAN
802#
803CONFIG_NET_RADIO=y
804# CONFIG_NET_WIRELESS_RTNETLINK is not set
805
806#
807# Obsolete Wireless cards support (pre-802.11)
808#
809# CONFIG_STRIP is not set
810
811#
812# Wireless 802.11b ISA/PCI cards support
813#
814# CONFIG_IPW2100 is not set
815CONFIG_IPW2200=m
816# CONFIG_IPW2200_MONITOR is not set
817# CONFIG_IPW2200_QOS is not set
818# CONFIG_IPW2200_DEBUG is not set
819# CONFIG_HERMES is not set
820# CONFIG_ATMEL is not set
821
822#
823# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
824#
825# CONFIG_PRISM54 is not set
826# CONFIG_USB_ZD1201 is not set
827# CONFIG_HOSTAP is not set
828# CONFIG_BCM43XX is not set
829# CONFIG_ZD1211RW is not set
830CONFIG_NET_WIRELESS=y
831
832#
833# Wan interfaces
834# 480#
481# CONFIG_WLAN_PRE80211 is not set
482# CONFIG_WLAN_80211 is not set
835# CONFIG_WAN is not set 483# CONFIG_WAN is not set
836# CONFIG_FDDI is not set 484# CONFIG_FDDI is not set
837# CONFIG_HIPPI is not set 485# CONFIG_HIPPI is not set
838CONFIG_PPP=m 486# CONFIG_PPP is not set
839CONFIG_PPP_MULTILINK=y
840# CONFIG_PPP_FILTER is not set
841CONFIG_PPP_ASYNC=m
842CONFIG_PPP_SYNC_TTY=m
843CONFIG_PPP_DEFLATE=m
844# CONFIG_PPP_BSDCOMP is not set
845CONFIG_PPP_MPPE=m
846CONFIG_PPPOE=m
847# CONFIG_SLIP is not set 487# CONFIG_SLIP is not set
848CONFIG_SLHC=m
849# CONFIG_SHAPER is not set 488# CONFIG_SHAPER is not set
850# CONFIG_NETCONSOLE is not set 489# CONFIG_NETCONSOLE is not set
851# CONFIG_NETPOLL is not set 490# CONFIG_NETPOLL is not set
@@ -864,57 +503,18 @@ CONFIG_SLHC=m
864# 503#
865# Input device support 504# Input device support
866# 505#
867CONFIG_INPUT=y 506# CONFIG_INPUT is not set
868# CONFIG_INPUT_FF_MEMLESS is not set
869
870#
871# Userland interfaces
872#
873CONFIG_INPUT_MOUSEDEV=y
874CONFIG_INPUT_MOUSEDEV_PSAUX=y
875CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
876CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
877# CONFIG_INPUT_JOYDEV is not set
878# CONFIG_INPUT_TSDEV is not set
879CONFIG_INPUT_EVDEV=y
880# CONFIG_INPUT_EVBUG is not set
881
882#
883# Input Device Drivers
884#
885CONFIG_INPUT_KEYBOARD=y
886CONFIG_KEYBOARD_ATKBD=y
887# CONFIG_KEYBOARD_SUNKBD is not set
888# CONFIG_KEYBOARD_LKKBD is not set
889# CONFIG_KEYBOARD_XTKBD is not set
890# CONFIG_KEYBOARD_NEWTON is not set
891# CONFIG_KEYBOARD_STOWAWAY is not set
892CONFIG_INPUT_MOUSE=y
893CONFIG_MOUSE_PS2=y
894# CONFIG_MOUSE_SERIAL is not set
895# CONFIG_MOUSE_VSXXXAA is not set
896# CONFIG_INPUT_JOYSTICK is not set
897# CONFIG_INPUT_TOUCHSCREEN is not set
898# CONFIG_INPUT_MISC is not set
899 507
900# 508#
901# Hardware I/O ports 509# Hardware I/O ports
902# 510#
903CONFIG_SERIO=y 511# CONFIG_SERIO is not set
904CONFIG_SERIO_I8042=y
905CONFIG_SERIO_SERPORT=y
906# CONFIG_SERIO_PCIPS2 is not set
907CONFIG_SERIO_LIBPS2=y
908# CONFIG_SERIO_RAW is not set
909# CONFIG_GAMEPORT is not set 512# CONFIG_GAMEPORT is not set
910 513
911# 514#
912# Character devices 515# Character devices
913# 516#
914CONFIG_VT=y 517# CONFIG_VT is not set
915CONFIG_VT_CONSOLE=y
916CONFIG_HW_CONSOLE=y
917CONFIG_VT_HW_CONSOLE_BINDING=y
918# CONFIG_SERIAL_NONSTANDARD is not set 518# CONFIG_SERIAL_NONSTANDARD is not set
919 519
920# 520#
@@ -926,11 +526,12 @@ CONFIG_VT_HW_CONSOLE_BINDING=y
926# Non-8250 serial port support 526# Non-8250 serial port support
927# 527#
928CONFIG_SERIAL_CORE=y 528CONFIG_SERIAL_CORE=y
529CONFIG_SERIAL_CORE_CONSOLE=y
929CONFIG_SERIAL_TXX9=y 530CONFIG_SERIAL_TXX9=y
930CONFIG_HAS_TXX9_SERIAL=y 531CONFIG_HAS_TXX9_SERIAL=y
931CONFIG_SERIAL_TXX9_NR_UARTS=6 532CONFIG_SERIAL_TXX9_NR_UARTS=6
932# CONFIG_SERIAL_TXX9_CONSOLE is not set 533CONFIG_SERIAL_TXX9_CONSOLE=y
933# CONFIG_SERIAL_TXX9_STDSERIAL is not set 534CONFIG_SERIAL_TXX9_STDSERIAL=y
934# CONFIG_SERIAL_JSM is not set 535# CONFIG_SERIAL_JSM is not set
935CONFIG_UNIX98_PTYS=y 536CONFIG_UNIX98_PTYS=y
936CONFIG_LEGACY_PTYS=y 537CONFIG_LEGACY_PTYS=y
@@ -940,15 +541,10 @@ CONFIG_LEGACY_PTY_COUNT=256
940# IPMI 541# IPMI
941# 542#
942# CONFIG_IPMI_HANDLER is not set 543# CONFIG_IPMI_HANDLER is not set
943
944#
945# Watchdog Cards
946#
947# CONFIG_WATCHDOG is not set 544# CONFIG_WATCHDOG is not set
948# CONFIG_HW_RANDOM is not set 545# CONFIG_HW_RANDOM is not set
949# CONFIG_RTC is not set 546# CONFIG_RTC is not set
950# CONFIG_GEN_RTC is not set 547# CONFIG_GEN_RTC is not set
951# CONFIG_DTLK is not set
952# CONFIG_R3964 is not set 548# CONFIG_R3964 is not set
953# CONFIG_APPLICOM is not set 549# CONFIG_APPLICOM is not set
954# CONFIG_DRM is not set 550# CONFIG_DRM is not set
@@ -958,108 +554,61 @@ CONFIG_LEGACY_PTY_COUNT=256
958# TPM devices 554# TPM devices
959# 555#
960# CONFIG_TCG_TPM is not set 556# CONFIG_TCG_TPM is not set
557CONFIG_DEVPORT=y
558# CONFIG_I2C is not set
559
560#
561# SPI support
562#
563CONFIG_SPI=y
564CONFIG_SPI_MASTER=y
961 565
962# 566#
963# I2C support 567# SPI Master Controller Drivers
964# 568#
965# CONFIG_I2C is not set 569# CONFIG_SPI_BITBANG is not set
570CONFIG_SPI_TXX9=y
966 571
967# 572#
968# SPI support 573# SPI Protocol Masters
969# 574#
970# CONFIG_SPI is not set 575CONFIG_SPI_AT25=y
971# CONFIG_SPI_MASTER is not set 576# CONFIG_SPI_SPIDEV is not set
972 577
973# 578#
974# Dallas's 1-wire bus 579# Dallas's 1-wire bus
975# 580#
976# CONFIG_W1 is not set 581# CONFIG_W1 is not set
582# CONFIG_HWMON is not set
977 583
978# 584#
979# Hardware Monitoring support 585# Multifunction device drivers
980# 586#
981CONFIG_HWMON=y 587# CONFIG_MFD_SM501 is not set
982# CONFIG_HWMON_VID is not set
983# CONFIG_SENSORS_ABITUGURU is not set
984# CONFIG_SENSORS_F71805F is not set
985# CONFIG_SENSORS_PC87427 is not set
986# CONFIG_SENSORS_VT1211 is not set
987# CONFIG_HWMON_DEBUG_CHIP is not set
988 588
989# 589#
990# Multimedia devices 590# Multimedia devices
991# 591#
992# CONFIG_VIDEO_DEV is not set 592# CONFIG_VIDEO_DEV is not set
993 593# CONFIG_DVB_CORE is not set
994# 594# CONFIG_DAB is not set
995# Digital Video Broadcasting Devices
996#
997# CONFIG_DVB is not set
998# CONFIG_USB_DABUSB is not set
999 595
1000# 596#
1001# Graphics support 597# Graphics support
1002# 598#
1003# CONFIG_FIRMWARE_EDID is not set
1004CONFIG_FB=y
1005CONFIG_FB_CFB_FILLRECT=y
1006CONFIG_FB_CFB_COPYAREA=y
1007CONFIG_FB_CFB_IMAGEBLIT=y
1008# CONFIG_FB_SVGALIB is not set
1009# CONFIG_FB_MACMODES is not set
1010# CONFIG_FB_BACKLIGHT is not set
1011# CONFIG_FB_MODE_HELPERS is not set
1012# CONFIG_FB_TILEBLITTING is not set
1013# CONFIG_FB_CIRRUS is not set
1014# CONFIG_FB_PM2 is not set
1015# CONFIG_FB_CYBER2000 is not set
1016# CONFIG_FB_ASILIANT is not set
1017# CONFIG_FB_IMSTT is not set
1018# CONFIG_FB_S1D13XXX is not set
1019# CONFIG_FB_NVIDIA is not set
1020# CONFIG_FB_RIVA is not set
1021# CONFIG_FB_MATROX is not set
1022# CONFIG_FB_RADEON is not set
1023# CONFIG_FB_ATY128 is not set
1024CONFIG_FB_ATY=y
1025CONFIG_FB_ATY_CT=y
1026# CONFIG_FB_ATY_GENERIC_LCD is not set
1027# CONFIG_FB_ATY_GX is not set
1028# CONFIG_FB_S3 is not set
1029# CONFIG_FB_SAVAGE is not set
1030# CONFIG_FB_SIS is not set
1031# CONFIG_FB_NEOMAGIC is not set
1032# CONFIG_FB_KYRO is not set
1033# CONFIG_FB_3DFX is not set
1034# CONFIG_FB_VOODOO1 is not set
1035# CONFIG_FB_SMIVGX is not set
1036# CONFIG_FB_TRIDENT is not set
1037# CONFIG_FB_VIRTUAL is not set
1038
1039#
1040# Console display driver support
1041#
1042CONFIG_VGA_CONSOLE=y
1043# CONFIG_VGACON_SOFT_SCROLLBACK is not set
1044CONFIG_DUMMY_CONSOLE=y
1045# CONFIG_FRAMEBUFFER_CONSOLE is not set
1046
1047#
1048# Logo configuration
1049#
1050# CONFIG_LOGO is not set
1051# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 599# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1052 600
1053# 601#
1054# Sound 602# Display device support
1055# 603#
1056# CONFIG_SOUND is not set 604# CONFIG_DISPLAY_SUPPORT is not set
605# CONFIG_VGASTATE is not set
606# CONFIG_FB is not set
1057 607
1058# 608#
1059# HID Devices 609# Sound
1060# 610#
1061CONFIG_HID=y 611# CONFIG_SOUND is not set
1062# CONFIG_HID_DEBUG is not set
1063 612
1064# 613#
1065# USB support 614# USB support
@@ -1067,148 +616,80 @@ CONFIG_HID=y
1067CONFIG_USB_ARCH_HAS_HCD=y 616CONFIG_USB_ARCH_HAS_HCD=y
1068CONFIG_USB_ARCH_HAS_OHCI=y 617CONFIG_USB_ARCH_HAS_OHCI=y
1069CONFIG_USB_ARCH_HAS_EHCI=y 618CONFIG_USB_ARCH_HAS_EHCI=y
1070CONFIG_USB=y 619# CONFIG_USB is not set
1071# CONFIG_USB_DEBUG is not set
1072
1073#
1074# Miscellaneous USB options
1075#
1076# CONFIG_USB_DEVICEFS is not set
1077# CONFIG_USB_DYNAMIC_MINORS is not set
1078# CONFIG_USB_SUSPEND is not set
1079# CONFIG_USB_OTG is not set
1080
1081#
1082# USB Host Controller Drivers
1083#
1084# CONFIG_USB_EHCI_HCD is not set
1085# CONFIG_USB_ISP116X_HCD is not set
1086# CONFIG_USB_OHCI_HCD is not set
1087# CONFIG_USB_UHCI_HCD is not set
1088# CONFIG_USB_SL811_HCD is not set
1089
1090#
1091# USB Device Class drivers
1092#
1093# CONFIG_USB_ACM is not set
1094# CONFIG_USB_PRINTER is not set
1095 620
1096# 621#
1097# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 622# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1098# 623#
1099 624
1100# 625#
1101# may also be needed; see USB_STORAGE Help for more information 626# USB Gadget Support
1102#
1103# CONFIG_USB_LIBUSUAL is not set
1104
1105#
1106# USB Input Devices
1107#
1108CONFIG_USB_HID=y
1109# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1110# CONFIG_HID_FF is not set
1111CONFIG_USB_HIDDEV=y
1112# CONFIG_USB_AIPTEK is not set
1113# CONFIG_USB_WACOM is not set
1114# CONFIG_USB_ACECAD is not set
1115# CONFIG_USB_KBTAB is not set
1116# CONFIG_USB_POWERMATE is not set
1117# CONFIG_USB_TOUCHSCREEN is not set
1118CONFIG_USB_YEALINK=m
1119# CONFIG_USB_XPAD is not set
1120# CONFIG_USB_ATI_REMOTE is not set
1121# CONFIG_USB_ATI_REMOTE2 is not set
1122# CONFIG_USB_KEYSPAN_REMOTE is not set
1123# CONFIG_USB_APPLETOUCH is not set
1124# CONFIG_USB_GTCO is not set
1125
1126#
1127# USB Imaging devices
1128#
1129# CONFIG_USB_MDC800 is not set
1130
1131#
1132# USB Network Adapters
1133#
1134# CONFIG_USB_CATC is not set
1135# CONFIG_USB_KAWETH is not set
1136# CONFIG_USB_PEGASUS is not set
1137# CONFIG_USB_RTL8150 is not set
1138# CONFIG_USB_USBNET_MII is not set
1139# CONFIG_USB_USBNET is not set
1140CONFIG_USB_MON=y
1141
1142#
1143# USB port drivers
1144# 627#
628# CONFIG_USB_GADGET is not set
629# CONFIG_MMC is not set
1145 630
1146# 631#
1147# USB Serial Converter support 632# LED devices
1148# 633#
1149# CONFIG_USB_SERIAL is not set 634# CONFIG_NEW_LEDS is not set
1150 635
1151# 636#
1152# USB Miscellaneous drivers 637# LED drivers
1153# 638#
1154# CONFIG_USB_EMI62 is not set
1155# CONFIG_USB_EMI26 is not set
1156# CONFIG_USB_ADUTUX is not set
1157# CONFIG_USB_AUERSWALD is not set
1158# CONFIG_USB_RIO500 is not set
1159# CONFIG_USB_LEGOTOWER is not set
1160# CONFIG_USB_LCD is not set
1161# CONFIG_USB_BERRY_CHARGE is not set
1162# CONFIG_USB_LED is not set
1163# CONFIG_USB_CYPRESS_CY7C63 is not set
1164# CONFIG_USB_CYTHERM is not set
1165# CONFIG_USB_PHIDGET is not set
1166# CONFIG_USB_IDMOUSE is not set
1167# CONFIG_USB_FTDI_ELAN is not set
1168# CONFIG_USB_APPLEDISPLAY is not set
1169# CONFIG_USB_LD is not set
1170# CONFIG_USB_TRANCEVIBRATOR is not set
1171 639
1172# 640#
1173# USB DSL modem support 641# LED Triggers
1174# 642#
1175 643
1176# 644#
1177# USB Gadget Support 645# InfiniBand support
1178# 646#
1179# CONFIG_USB_GADGET is not set 647# CONFIG_INFINIBAND is not set
1180 648
1181# 649#
1182# MMC/SD Card support 650# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1183# 651#
1184# CONFIG_MMC is not set
1185 652
1186# 653#
1187# LED devices 654# Real Time Clock
1188# 655#
1189# CONFIG_NEW_LEDS is not set 656CONFIG_RTC_LIB=y
657CONFIG_RTC_CLASS=y
658CONFIG_RTC_HCTOSYS=y
659CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
660# CONFIG_RTC_DEBUG is not set
1190 661
1191# 662#
1192# LED drivers 663# RTC interfaces
1193# 664#
665CONFIG_RTC_INTF_SYSFS=y
666CONFIG_RTC_INTF_PROC=y
667CONFIG_RTC_INTF_DEV=y
668CONFIG_RTC_INTF_DEV_UIE_EMUL=y
669# CONFIG_RTC_DRV_TEST is not set
1194 670
1195# 671#
1196# LED Triggers 672# I2C RTC drivers
1197# 673#
1198 674
1199# 675#
1200# InfiniBand support 676# SPI RTC drivers
1201# 677#
1202# CONFIG_INFINIBAND is not set 678CONFIG_RTC_DRV_RS5C348=y
679# CONFIG_RTC_DRV_MAX6902 is not set
1203 680
1204# 681#
1205# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 682# Platform RTC drivers
1206# 683#
684# CONFIG_RTC_DRV_CMOS is not set
685# CONFIG_RTC_DRV_DS1553 is not set
686# CONFIG_RTC_DRV_DS1742 is not set
687# CONFIG_RTC_DRV_M48T86 is not set
688# CONFIG_RTC_DRV_V3020 is not set
1207 689
1208# 690#
1209# Real Time Clock 691# on-CPU RTC drivers
1210# 692#
1211# CONFIG_RTC_CLASS is not set
1212 693
1213# 694#
1214# DMA Engine support 695# DMA Engine support
@@ -1224,38 +705,15 @@ CONFIG_USB_MON=y
1224# 705#
1225 706
1226# 707#
1227# Auxiliary Display support
1228#
1229
1230#
1231# Virtualization
1232#
1233
1234#
1235# File systems 708# File systems
1236# 709#
1237CONFIG_EXT2_FS=y 710# CONFIG_EXT2_FS is not set
1238# CONFIG_EXT2_FS_XATTR is not set 711# CONFIG_EXT3_FS is not set
1239# CONFIG_EXT2_FS_XIP is not set
1240CONFIG_EXT3_FS=m
1241CONFIG_EXT3_FS_XATTR=y
1242# CONFIG_EXT3_FS_POSIX_ACL is not set
1243# CONFIG_EXT3_FS_SECURITY is not set
1244# CONFIG_EXT4DEV_FS is not set 712# CONFIG_EXT4DEV_FS is not set
1245CONFIG_JBD=m 713# CONFIG_REISERFS_FS is not set
1246# CONFIG_JBD_DEBUG is not set
1247CONFIG_FS_MBCACHE=y
1248CONFIG_REISERFS_FS=m
1249# CONFIG_REISERFS_CHECK is not set
1250# CONFIG_REISERFS_PROC_INFO is not set
1251# CONFIG_REISERFS_FS_XATTR is not set
1252# CONFIG_JFS_FS is not set 714# CONFIG_JFS_FS is not set
1253CONFIG_FS_POSIX_ACL=y 715CONFIG_FS_POSIX_ACL=y
1254CONFIG_XFS_FS=m 716# CONFIG_XFS_FS is not set
1255# CONFIG_XFS_QUOTA is not set
1256# CONFIG_XFS_SECURITY is not set
1257# CONFIG_XFS_POSIX_ACL is not set
1258# CONFIG_XFS_RT is not set
1259# CONFIG_GFS2_FS is not set 717# CONFIG_GFS2_FS is not set
1260# CONFIG_OCFS2_FS is not set 718# CONFIG_OCFS2_FS is not set
1261# CONFIG_MINIX_FS is not set 719# CONFIG_MINIX_FS is not set
@@ -1265,26 +723,21 @@ CONFIG_INOTIFY_USER=y
1265# CONFIG_QUOTA is not set 723# CONFIG_QUOTA is not set
1266# CONFIG_DNOTIFY is not set 724# CONFIG_DNOTIFY is not set
1267# CONFIG_AUTOFS_FS is not set 725# CONFIG_AUTOFS_FS is not set
1268CONFIG_AUTOFS4_FS=m 726# CONFIG_AUTOFS4_FS is not set
1269CONFIG_FUSE_FS=m 727# CONFIG_FUSE_FS is not set
1270CONFIG_GENERIC_ACL=y 728CONFIG_GENERIC_ACL=y
1271 729
1272# 730#
1273# CD-ROM/DVD Filesystems 731# CD-ROM/DVD Filesystems
1274# 732#
1275CONFIG_ISO9660_FS=y 733# CONFIG_ISO9660_FS is not set
1276# CONFIG_JOLIET is not set
1277# CONFIG_ZISOFS is not set
1278# CONFIG_UDF_FS is not set 734# CONFIG_UDF_FS is not set
1279 735
1280# 736#
1281# DOS/FAT/NT Filesystems 737# DOS/FAT/NT Filesystems
1282# 738#
1283CONFIG_FAT_FS=y
1284# CONFIG_MSDOS_FS is not set 739# CONFIG_MSDOS_FS is not set
1285CONFIG_VFAT_FS=y 740# CONFIG_VFAT_FS is not set
1286CONFIG_FAT_DEFAULT_CODEPAGE=437
1287CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1288# CONFIG_NTFS_FS is not set 741# CONFIG_NTFS_FS is not set
1289 742
1290# 743#
@@ -1298,7 +751,7 @@ CONFIG_TMPFS=y
1298CONFIG_TMPFS_POSIX_ACL=y 751CONFIG_TMPFS_POSIX_ACL=y
1299# CONFIG_HUGETLB_PAGE is not set 752# CONFIG_HUGETLB_PAGE is not set
1300CONFIG_RAMFS=y 753CONFIG_RAMFS=y
1301CONFIG_CONFIGFS_FS=m 754# CONFIG_CONFIGFS_FS is not set
1302 755
1303# 756#
1304# Miscellaneous filesystems 757# Miscellaneous filesystems
@@ -1310,16 +763,7 @@ CONFIG_CONFIGFS_FS=m
1310# CONFIG_BEFS_FS is not set 763# CONFIG_BEFS_FS is not set
1311# CONFIG_BFS_FS is not set 764# CONFIG_BFS_FS is not set
1312# CONFIG_EFS_FS is not set 765# CONFIG_EFS_FS is not set
1313CONFIG_JFFS2_FS=y 766# CONFIG_CRAMFS is not set
1314CONFIG_JFFS2_FS_DEBUG=0
1315CONFIG_JFFS2_FS_WRITEBUFFER=y
1316# CONFIG_JFFS2_SUMMARY is not set
1317# CONFIG_JFFS2_FS_XATTR is not set
1318# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1319CONFIG_JFFS2_ZLIB=y
1320CONFIG_JFFS2_RTIME=y
1321# CONFIG_JFFS2_RUBIN is not set
1322CONFIG_CRAMFS=y
1323# CONFIG_VXFS_FS is not set 767# CONFIG_VXFS_FS is not set
1324# CONFIG_HPFS_FS is not set 768# CONFIG_HPFS_FS is not set
1325# CONFIG_QNX4FS_FS is not set 769# CONFIG_QNX4FS_FS is not set
@@ -1334,19 +778,16 @@ CONFIG_NFS_V3=y
1334# CONFIG_NFS_V3_ACL is not set 778# CONFIG_NFS_V3_ACL is not set
1335# CONFIG_NFS_V4 is not set 779# CONFIG_NFS_V4 is not set
1336# CONFIG_NFS_DIRECTIO is not set 780# CONFIG_NFS_DIRECTIO is not set
1337CONFIG_NFSD=m 781# CONFIG_NFSD is not set
1338# CONFIG_NFSD_V3 is not set
1339# CONFIG_NFSD_TCP is not set
1340CONFIG_ROOT_NFS=y 782CONFIG_ROOT_NFS=y
1341CONFIG_LOCKD=y 783CONFIG_LOCKD=y
1342CONFIG_LOCKD_V4=y 784CONFIG_LOCKD_V4=y
1343CONFIG_EXPORTFS=m
1344CONFIG_NFS_COMMON=y 785CONFIG_NFS_COMMON=y
1345CONFIG_SUNRPC=y 786CONFIG_SUNRPC=y
787# CONFIG_SUNRPC_BIND34 is not set
1346# CONFIG_RPCSEC_GSS_KRB5 is not set 788# CONFIG_RPCSEC_GSS_KRB5 is not set
1347# CONFIG_RPCSEC_GSS_SPKM3 is not set 789# CONFIG_RPCSEC_GSS_SPKM3 is not set
1348CONFIG_SMB_FS=m 790# CONFIG_SMB_FS is not set
1349# CONFIG_SMB_NLS_DEFAULT is not set
1350# CONFIG_CIFS is not set 791# CONFIG_CIFS is not set
1351# CONFIG_NCP_FS is not set 792# CONFIG_NCP_FS is not set
1352# CONFIG_CODA_FS is not set 793# CONFIG_CODA_FS is not set
@@ -1362,54 +803,12 @@ CONFIG_MSDOS_PARTITION=y
1362# 803#
1363# Native Language Support 804# Native Language Support
1364# 805#
1365CONFIG_NLS=y 806# CONFIG_NLS is not set
1366CONFIG_NLS_DEFAULT="iso8859-1"
1367# CONFIG_NLS_CODEPAGE_437 is not set
1368# CONFIG_NLS_CODEPAGE_737 is not set
1369# CONFIG_NLS_CODEPAGE_775 is not set
1370# CONFIG_NLS_CODEPAGE_850 is not set
1371# CONFIG_NLS_CODEPAGE_852 is not set
1372# CONFIG_NLS_CODEPAGE_855 is not set
1373# CONFIG_NLS_CODEPAGE_857 is not set
1374# CONFIG_NLS_CODEPAGE_860 is not set
1375# CONFIG_NLS_CODEPAGE_861 is not set
1376# CONFIG_NLS_CODEPAGE_862 is not set
1377# CONFIG_NLS_CODEPAGE_863 is not set
1378# CONFIG_NLS_CODEPAGE_864 is not set
1379# CONFIG_NLS_CODEPAGE_865 is not set
1380# CONFIG_NLS_CODEPAGE_866 is not set
1381# CONFIG_NLS_CODEPAGE_869 is not set
1382# CONFIG_NLS_CODEPAGE_936 is not set
1383# CONFIG_NLS_CODEPAGE_950 is not set
1384# CONFIG_NLS_CODEPAGE_932 is not set
1385# CONFIG_NLS_CODEPAGE_949 is not set
1386# CONFIG_NLS_CODEPAGE_874 is not set
1387# CONFIG_NLS_ISO8859_8 is not set
1388# CONFIG_NLS_CODEPAGE_1250 is not set
1389# CONFIG_NLS_CODEPAGE_1251 is not set
1390# CONFIG_NLS_ASCII is not set
1391# CONFIG_NLS_ISO8859_1 is not set
1392# CONFIG_NLS_ISO8859_2 is not set
1393# CONFIG_NLS_ISO8859_3 is not set
1394# CONFIG_NLS_ISO8859_4 is not set
1395# CONFIG_NLS_ISO8859_5 is not set
1396# CONFIG_NLS_ISO8859_6 is not set
1397# CONFIG_NLS_ISO8859_7 is not set
1398# CONFIG_NLS_ISO8859_9 is not set
1399# CONFIG_NLS_ISO8859_13 is not set
1400# CONFIG_NLS_ISO8859_14 is not set
1401# CONFIG_NLS_ISO8859_15 is not set
1402# CONFIG_NLS_KOI8_R is not set
1403# CONFIG_NLS_KOI8_U is not set
1404# CONFIG_NLS_UTF8 is not set
1405 807
1406# 808#
1407# Distributed Lock Manager 809# Distributed Lock Manager
1408# 810#
1409CONFIG_DLM=m 811# CONFIG_DLM is not set
1410CONFIG_DLM_TCP=y
1411# CONFIG_DLM_SCTP is not set
1412# CONFIG_DLM_DEBUG is not set
1413 812
1414# 813#
1415# Profiling support 814# Profiling support
@@ -1427,7 +826,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1427# CONFIG_DEBUG_FS is not set 826# CONFIG_DEBUG_FS is not set
1428# CONFIG_HEADERS_CHECK is not set 827# CONFIG_HEADERS_CHECK is not set
1429# CONFIG_DEBUG_KERNEL is not set 828# CONFIG_DEBUG_KERNEL is not set
1430CONFIG_LOG_BUF_SHIFT=14
1431CONFIG_CROSSCOMPILE=y 829CONFIG_CROSSCOMPILE=y
1432CONFIG_CMDLINE="" 830CONFIG_CMDLINE=""
1433CONFIG_SYS_SUPPORTS_KGDB=y 831CONFIG_SYS_SUPPORTS_KGDB=y
@@ -1441,62 +839,17 @@ CONFIG_SYS_SUPPORTS_KGDB=y
1441# 839#
1442# Cryptographic options 840# Cryptographic options
1443# 841#
1444CONFIG_CRYPTO=y 842# CONFIG_CRYPTO is not set
1445CONFIG_CRYPTO_ALGAPI=y
1446CONFIG_CRYPTO_BLKCIPHER=m
1447CONFIG_CRYPTO_HASH=y
1448CONFIG_CRYPTO_MANAGER=y
1449CONFIG_CRYPTO_HMAC=y
1450CONFIG_CRYPTO_XCBC=m
1451CONFIG_CRYPTO_NULL=m
1452CONFIG_CRYPTO_MD4=m
1453CONFIG_CRYPTO_MD5=y
1454CONFIG_CRYPTO_SHA1=m
1455CONFIG_CRYPTO_SHA256=m
1456CONFIG_CRYPTO_SHA512=m
1457CONFIG_CRYPTO_WP512=m
1458CONFIG_CRYPTO_TGR192=m
1459CONFIG_CRYPTO_GF128MUL=m
1460CONFIG_CRYPTO_ECB=m
1461CONFIG_CRYPTO_CBC=m
1462CONFIG_CRYPTO_PCBC=m
1463CONFIG_CRYPTO_LRW=m
1464CONFIG_CRYPTO_DES=m
1465CONFIG_CRYPTO_FCRYPT=m
1466CONFIG_CRYPTO_BLOWFISH=m
1467CONFIG_CRYPTO_TWOFISH=m
1468CONFIG_CRYPTO_TWOFISH_COMMON=m
1469CONFIG_CRYPTO_SERPENT=m
1470CONFIG_CRYPTO_AES=m
1471CONFIG_CRYPTO_CAST5=m
1472CONFIG_CRYPTO_CAST6=m
1473CONFIG_CRYPTO_TEA=m
1474CONFIG_CRYPTO_ARC4=m
1475CONFIG_CRYPTO_KHAZAD=m
1476CONFIG_CRYPTO_ANUBIS=m
1477CONFIG_CRYPTO_DEFLATE=m
1478CONFIG_CRYPTO_MICHAEL_MIC=m
1479CONFIG_CRYPTO_CRC32C=m
1480CONFIG_CRYPTO_CAMELLIA=m
1481# CONFIG_CRYPTO_TEST is not set
1482
1483#
1484# Hardware crypto devices
1485#
1486 843
1487# 844#
1488# Library routines 845# Library routines
1489# 846#
1490CONFIG_BITREVERSE=y 847CONFIG_BITREVERSE=y
1491CONFIG_CRC_CCITT=m 848# CONFIG_CRC_CCITT is not set
1492CONFIG_CRC16=m 849# CONFIG_CRC16 is not set
850# CONFIG_CRC_ITU_T is not set
1493CONFIG_CRC32=y 851CONFIG_CRC32=y
1494CONFIG_LIBCRC32C=m 852# CONFIG_LIBCRC32C is not set
1495CONFIG_ZLIB_INFLATE=y
1496CONFIG_ZLIB_DEFLATE=y
1497CONFIG_TEXTSEARCH=y
1498CONFIG_TEXTSEARCH_KMP=m
1499CONFIG_TEXTSEARCH_BM=m
1500CONFIG_TEXTSEARCH_FSM=m
1501CONFIG_HAS_IOMEM=y 853CONFIG_HAS_IOMEM=y
1502CONFIG_HAS_IOPORT=y 854CONFIG_HAS_IOPORT=y
855CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig
index 5593cde9f74c..a5dc5cb97aae 100644
--- a/arch/mips/configs/rm200_defconfig
+++ b/arch/mips/configs/rm200_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
@@ -255,7 +251,7 @@ CONFIG_PCI=y
255CONFIG_ISA=y 251CONFIG_ISA=y
256# CONFIG_EISA is not set 252# CONFIG_EISA is not set
257CONFIG_MMU=y 253CONFIG_MMU=y
258CONFIG_I8253=y 254CONFIG_PCSPEAKER=y
259 255
260# 256#
261# PCCARD (PCMCIA/CardBus) support 257# PCCARD (PCMCIA/CardBus) support
diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig
index 6c4f09a381e2..98a914092258 100644
--- a/arch/mips/configs/sb1250-swarm_defconfig
+++ b/arch/mips/configs/sb1250-swarm_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/sead_defconfig b/arch/mips/configs/sead_defconfig
index 988b9cdef01f..69c08b24c82a 100644
--- a/arch/mips/configs/sead_defconfig
+++ b/arch/mips/configs/sead_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33CONFIG_MIPS_SEAD=y 31CONFIG_MIPS_SEAD=y
@@ -35,8 +33,6 @@ CONFIG_MIPS_SEAD=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/tb0219_defconfig b/arch/mips/configs/tb0219_defconfig
index 8b1675c07ec4..5d4fc0e4f729 100644
--- a/arch/mips/configs/tb0219_defconfig
+++ b/arch/mips/configs/tb0219_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig
index b5be8b74d896..1b92b48de051 100644
--- a/arch/mips/configs/tb0226_defconfig
+++ b/arch/mips/configs/tb0226_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/tb0287_defconfig b/arch/mips/configs/tb0287_defconfig
index 8bb6be4342b6..5b77c7a5d83a 100644
--- a/arch/mips/configs/tb0287_defconfig
+++ b/arch/mips/configs/tb0287_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/workpad_defconfig b/arch/mips/configs/workpad_defconfig
index 8f019ffcc71b..94a4f94a8b24 100644
--- a/arch/mips/configs/workpad_defconfig
+++ b/arch/mips/configs/workpad_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/wrppmc_defconfig b/arch/mips/configs/wrppmc_defconfig
index 52b48c0715d3..e38bd9b0eadc 100644
--- a/arch/mips/configs/wrppmc_defconfig
+++ b/arch/mips/configs/wrppmc_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_WR_PPMC=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/yosemite_defconfig b/arch/mips/configs/yosemite_defconfig
index 6824606309e5..f342d8c887b8 100644
--- a/arch/mips/configs/yosemite_defconfig
+++ b/arch/mips/configs/yosemite_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
@@ -596,8 +592,6 @@ CONFIG_LEGACY_PTY_COUNT=256
596# CONFIG_WATCHDOG is not set 592# CONFIG_WATCHDOG is not set
597# CONFIG_HW_RANDOM is not set 593# CONFIG_HW_RANDOM is not set
598# CONFIG_RTC is not set 594# CONFIG_RTC is not set
599CONFIG_GEN_RTC=y
600CONFIG_GEN_RTC_X=y
601# CONFIG_DTLK is not set 595# CONFIG_DTLK is not set
602# CONFIG_R3964 is not set 596# CONFIG_R3964 is not set
603# CONFIG_APPLICOM is not set 597# CONFIG_APPLICOM is not set
diff --git a/arch/mips/ddb5xxx/ddb5477/Makefile b/arch/mips/ddb5xxx/ddb5477/Makefile
index 23fd3b81fe1a..4864b8a659c7 100644
--- a/arch/mips/ddb5xxx/ddb5477/Makefile
+++ b/arch/mips/ddb5xxx/ddb5477/Makefile
@@ -2,7 +2,8 @@
2# Makefile for NEC DDB-Vrc5477 board 2# Makefile for NEC DDB-Vrc5477 board
3# 3#
4 4
5obj-y += irq.o irq_5477.o setup.o lcd44780.o 5obj-y += ddb5477-platform.o irq.o irq_5477.o setup.o \
6 lcd44780.o
6 7
7obj-$(CONFIG_RUNTIME_DEBUG) += debug.o 8obj-$(CONFIG_RUNTIME_DEBUG) += debug.o
8obj-$(CONFIG_KGDB) += kgdb_io.o 9obj-$(CONFIG_KGDB) += kgdb_io.o
diff --git a/arch/mips/ddb5xxx/ddb5477/ddb5477-platform.c b/arch/mips/ddb5xxx/ddb5477/ddb5477-platform.c
new file mode 100644
index 000000000000..c16020ad54c2
--- /dev/null
+++ b/arch/mips/ddb5xxx/ddb5477/ddb5477-platform.c
@@ -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 * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
7 */
8#include <linux/init.h>
9#include <linux/module.h>
10#include <linux/serial_8250.h>
11
12#include <asm/ddb5xxx/ddb5477.h>
13
14#define DDB_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)
15
16#define DDB5477_PORT(base, int) \
17{ \
18 .mapbase = base, \
19 .irq = int, \
20 .uartclk = 1843200, \
21 .iotype = UPIO_MEM, \
22 .flags = DDB_UART_FLAGS, \
23 .regshift = 3, \
24}
25
26static struct plat_serial8250_port uart8250_data[] = {
27 DDB5477_PORT(0xbfa04200, VRC5477_IRQ_UART0),
28 DDB5477_PORT(0xbfa04240, VRC5477_IRQ_UART1),
29 { },
30};
31
32static struct platform_device uart8250_device = {
33 .name = "serial8250",
34 .id = PLAT8250_DEV_PLATFORM,
35 .dev = {
36 .platform_data = uart8250_data,
37 },
38};
39
40static int __init uart8250_init(void)
41{
42 return platform_device_register(&uart8250_device);
43}
44
45module_init(uart8250_init);
46
47MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
48MODULE_LICENSE("GPL");
49MODULE_DESCRIPTION("8250 UART probe driver for the NEC DDB5477");
diff --git a/arch/mips/dec/prom/console.c b/arch/mips/dec/prom/console.c
index 65419bf32441..078e1a12421d 100644
--- a/arch/mips/dec/prom/console.c
+++ b/arch/mips/dec/prom/console.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * DECstation PROM-based early console support. 4 * DECstation PROM-based early console support.
5 * 5 *
6 * Copyright (C) 2004 Maciej W. Rozycki 6 * Copyright (C) 2004, 2007 Maciej W. Rozycki
7 * 7 *
8 * This program is free software; you can redistribute it and/or 8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License 9 * modify it under the terms of the GNU General Public License
@@ -13,15 +13,35 @@
13#include <linux/console.h> 13#include <linux/console.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/string.h>
16 17
17#include <asm/dec/prom.h> 18#include <asm/dec/prom.h>
18 19
19void prom_putchar(char c) 20static void __init prom_console_write(struct console *con, const char *s,
21 unsigned int c)
20{ 22{
21 char s[2]; 23 char buf[81];
24 unsigned int chunk = sizeof(buf) - 1;
22 25
23 s[0] = c; 26 while (c > 0) {
24 s[1] = '\0'; 27 if (chunk > c)
28 chunk = c;
29 memcpy(buf, s, chunk);
30 buf[chunk] = '\0';
31 prom_printf("%s", buf);
32 s += chunk;
33 c -= chunk;
34 }
35}
36
37static struct console promcons __initdata = {
38 .name = "prom",
39 .write = prom_console_write,
40 .flags = CON_BOOT | CON_PRINTBUFFER,
41 .index = -1,
42};
25 43
26 prom_printf( s); 44void __init register_prom_console(void)
45{
46 register_console(&promcons);
27} 47}
diff --git a/arch/mips/dec/prom/init.c b/arch/mips/dec/prom/init.c
index a217aafe59f6..808c182fd3fa 100644
--- a/arch/mips/dec/prom/init.c
+++ b/arch/mips/dec/prom/init.c
@@ -86,7 +86,7 @@ void __init which_prom(s32 magic, s32 *prom_vec)
86 86
87void __init prom_init(void) 87void __init prom_init(void)
88{ 88{
89 extern void ATTRIB_NORET dec_machine_halt(void); 89 extern void dec_machine_halt(void);
90 static char cpu_msg[] __initdata = 90 static char cpu_msg[] __initdata =
91 "Sorry, this kernel is compiled for a wrong CPU type!\n"; 91 "Sorry, this kernel is compiled for a wrong CPU type!\n";
92 s32 argc = fw_arg0; 92 s32 argc = fw_arg0;
@@ -103,6 +103,9 @@ void __init prom_init(void)
103 if (prom_is_rex(magic)) 103 if (prom_is_rex(magic))
104 rex_clear_cache(); 104 rex_clear_cache();
105 105
106 /* Register the early console. */
107 register_prom_console();
108
106 /* Were we compiled with the right CPU option? */ 109 /* Were we compiled with the right CPU option? */
107#if defined(CONFIG_CPU_R3000) 110#if defined(CONFIG_CPU_R3000)
108 if ((current_cpu_data.cputype == CPU_R4000SC) || 111 if ((current_cpu_data.cputype == CPU_R4000SC) ||
diff --git a/arch/mips/dec/reset.c b/arch/mips/dec/reset.c
index 56397227adb0..c15a879046e5 100644
--- a/arch/mips/dec/reset.c
+++ b/arch/mips/dec/reset.c
@@ -9,26 +9,26 @@
9 9
10#include <asm/addrspace.h> 10#include <asm/addrspace.h>
11 11
12typedef void ATTRIB_NORET (* noret_func_t)(void); 12typedef void __noreturn (* noret_func_t)(void);
13 13
14static inline void ATTRIB_NORET back_to_prom(void) 14static inline void __noreturn back_to_prom(void)
15{ 15{
16 noret_func_t func = (void *)CKSEG1ADDR(0x1fc00000); 16 noret_func_t func = (void *)CKSEG1ADDR(0x1fc00000);
17 17
18 func(); 18 func();
19} 19}
20 20
21void ATTRIB_NORET dec_machine_restart(char *command) 21void __noreturn dec_machine_restart(char *command)
22{ 22{
23 back_to_prom(); 23 back_to_prom();
24} 24}
25 25
26void ATTRIB_NORET dec_machine_halt(void) 26void __noreturn dec_machine_halt(void)
27{ 27{
28 back_to_prom(); 28 back_to_prom();
29} 29}
30 30
31void ATTRIB_NORET dec_machine_power_off(void) 31void __noreturn dec_machine_power_off(void)
32{ 32{
33 /* DECstations don't have a software power switch */ 33 /* DECstations don't have a software power switch */
34 back_to_prom(); 34 back_to_prom();
diff --git a/arch/mips/defconfig b/arch/mips/defconfig
index 41211f8b7738..b3b6e58058f6 100644
--- a/arch/mips/defconfig
+++ b/arch/mips/defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/emma2rh/markeins/setup.c b/arch/mips/emma2rh/markeins/setup.c
index b29a44739230..2f060e1ed36c 100644
--- a/arch/mips/emma2rh/markeins/setup.c
+++ b/arch/mips/emma2rh/markeins/setup.c
@@ -115,30 +115,6 @@ extern void markeins_irq_setup(void);
115 115
116static void inline __init markeins_sio_setup(void) 116static void inline __init markeins_sio_setup(void)
117{ 117{
118#ifdef CONFIG_KGDB_8250
119 struct uart_port emma_port;
120
121 memset(&emma_port, 0, sizeof(emma_port));
122
123 emma_port.flags =
124 UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
125 emma_port.iotype = UPIO_MEM;
126 emma_port.regshift = 4; /* I/O addresses are every 8 bytes */
127 emma_port.uartclk = 18544000; /* Clock rate of the chip */
128
129 emma_port.line = 0;
130 emma_port.mapbase = KSEG1ADDR(EMMA2RH_PFUR0_BASE + 3);
131 emma_port.membase = (u8*)emma_port.mapbase;
132 early_serial_setup(&emma_port);
133
134 emma_port.line = 1;
135 emma_port.mapbase = KSEG1ADDR(EMMA2RH_PFUR1_BASE + 3);
136 emma_port.membase = (u8*)emma_port.mapbase;
137 early_serial_setup(&emma_port);
138
139 emma_port.irq = EMMA2RH_IRQ_PFUR1;
140 kgdb8250_add_port(1, &emma_port);
141#endif
142} 118}
143 119
144void __init plat_mem_setup(void) 120void __init plat_mem_setup(void)
diff --git a/arch/mips/gt64120/ev64120/Kconfig b/arch/mips/gt64120/ev64120/Kconfig
deleted file mode 100644
index d691762cb0f7..000000000000
--- a/arch/mips/gt64120/ev64120/Kconfig
+++ /dev/null
@@ -1,3 +0,0 @@
1config EVB_PCI1
2 bool "Enable Second PCI (PCI1)"
3 depends on MIPS_EV64120
diff --git a/arch/mips/gt64120/ev64120/Makefile b/arch/mips/gt64120/ev64120/Makefile
deleted file mode 100644
index 323b2cebc691..000000000000
--- a/arch/mips/gt64120/ev64120/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
1#
2# Copyright 2000 RidgeRun, Inc.
3# Author: RidgeRun, Inc.
4# glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
5#
6# Makefile for the Galileo EV64120 board.
7#
8
9obj-y += irq.o promcon.o reset.o serialGT.o setup.o
diff --git a/arch/mips/gt64120/ev64120/irq.c b/arch/mips/gt64120/ev64120/irq.c
deleted file mode 100644
index 64e4c80b6139..000000000000
--- a/arch/mips/gt64120/ev64120/irq.c
+++ /dev/null
@@ -1,116 +0,0 @@
1/*
2 * BRIEF MODULE DESCRIPTION
3 * Code to handle irqs on GT64120A boards
4 * Derived from mips/orion and Cort <cort@fsmlabs.com>
5 *
6 * Copyright (C) 2000 RidgeRun, Inc.
7 * Author: RidgeRun, Inc.
8 * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
16 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
18 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
21 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
22 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * You should have received a copy of the GNU General Public License along
27 * with this program; if not, write to the Free Software Foundation, Inc.,
28 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 */
30#include <linux/errno.h>
31#include <linux/init.h>
32#include <linux/kernel_stat.h>
33#include <linux/module.h>
34#include <linux/signal.h>
35#include <linux/sched.h>
36#include <linux/types.h>
37#include <linux/interrupt.h>
38#include <linux/ioport.h>
39#include <linux/timex.h>
40#include <linux/slab.h>
41#include <linux/random.h>
42#include <linux/bitops.h>
43#include <asm/bootinfo.h>
44#include <asm/io.h>
45#include <asm/mipsregs.h>
46#include <asm/system.h>
47#include <asm/gt64120.h>
48
49asmlinkage void plat_irq_dispatch(void)
50{
51 unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
52
53 if (pending & STATUSF_IP4) /* int2 hardware line (timer) */
54 do_IRQ(4);
55 else if (pending & STATUSF_IP2) /* int0 hardware line */
56 do_IRQ(GT_INTA);
57 else if (pending & STATUSF_IP5) /* int3 hardware line */
58 do_IRQ(GT_INTD);
59 else if (pending & STATUSF_IP6) /* int4 hardware line */
60 do_IRQ(6);
61 else if (pending & STATUSF_IP7) /* compare int */
62 do_IRQ(7);
63 else
64 spurious_interrupt();
65}
66
67static void disable_ev64120_irq(unsigned int irq_nr)
68{
69 if (irq_nr >= 8) { // All PCI interrupts are on line 5 or 2
70 clear_c0_status(9 << 10);
71 } else {
72 clear_c0_status(1 << (irq_nr + 8));
73 }
74}
75
76static void enable_ev64120_irq(unsigned int irq_nr)
77{
78 if (irq_nr >= 8) // All PCI interrupts are on line 5 or 2
79 set_c0_status(9 << 10);
80 else
81 set_c0_status(1 << (irq_nr + 8));
82}
83
84static void end_ev64120_irq(unsigned int irq)
85{
86 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
87 enable_ev64120_irq(irq);
88}
89
90static struct irq_chip ev64120_irq_type = {
91 .name = "EV64120",
92 .ack = disable_ev64120_irq,
93 .mask = disable_ev64120_irq,
94 .mask_ack = disable_ev64120_irq,
95 .unmask = enable_ev64120_irq,
96 .end = end_ev64120_irq,
97};
98
99void gt64120_irq_setup(void)
100{
101 /*
102 * Clear all of the interrupts while we change the able around a bit.
103 */
104 clear_c0_status(ST0_IM);
105
106 /*
107 * Enable timer. Other interrupts will be enabled as they are
108 * registered.
109 */
110 set_c0_status(IE_IRQ2);
111}
112
113void __init arch_init_irq(void)
114{
115 gt64120_irq_setup();
116}
diff --git a/arch/mips/gt64120/ev64120/promcon.c b/arch/mips/gt64120/ev64120/promcon.c
deleted file mode 100644
index 6e0ecfed9640..000000000000
--- a/arch/mips/gt64120/ev64120/promcon.c
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * Wrap-around code for a console using the
3 * SGI PROM io-routines.
4 *
5 * Copyright (c) 1999 Ulf Carlsson
6 *
7 * Derived from DECstation promcon.c
8 * Copyright (c) 1998 Harald Koerfgen
9 */
10#include <linux/tty.h>
11#include <linux/init.h>
12#include <linux/console.h>
13
14static void prom_console_write(struct console *co, const char *s,
15 unsigned count)
16{
17 extern int CONSOLE_CHANNEL; // The default serial port
18 unsigned i;
19
20 for (i = 0; i < count; i++) {
21 if (*s == 10)
22 serial_putc(CONSOLE_CHANNEL, 13);
23 serial_putc(CONSOLE_CHANNEL, *s++);
24 }
25}
26
27static struct console sercons = {
28 .name = "ttyS",
29 .write = prom_console_write,
30 .flags = CON_PRINTBUFFER,
31 .index = -1,
32};
33
34/*
35 * Register console.
36 */
37
38static int gal_serial_console_init(void)
39{
40 // serial_init();
41 //serial_set(115200);
42
43 register_console(&sercons);
44
45 return 0;
46}
47
48console_initcall(gal_serial_console_init);
diff --git a/arch/mips/gt64120/ev64120/reset.c b/arch/mips/gt64120/ev64120/reset.c
deleted file mode 100644
index 7b9f5e5bf21f..000000000000
--- a/arch/mips/gt64120/ev64120/reset.c
+++ /dev/null
@@ -1,45 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1997 Ralf Baechle
7 */
8#include <linux/sched.h>
9#include <linux/mm.h>
10#include <asm/io.h>
11#include <asm/pgtable.h>
12#include <asm/processor.h>
13#include <asm/reboot.h>
14#include <asm/system.h>
15
16void galileo_machine_restart(char *command)
17{
18 *(volatile char *) 0xbc000000 = 0x0f;
19 /*
20 * Ouch, we're still alive ... This time we take the silver bullet ...
21 * ... and find that we leave the hardware in a state in which the
22 * kernel in the flush locks up somewhen during of after the PCI
23 * detection stuff.
24 */
25 set_c0_status(ST0_BEV | ST0_ERL);
26 change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED);
27 flush_cache_all();
28 write_c0_wired(0);
29 __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000));
30}
31
32void galileo_machine_halt(void)
33{
34 printk(KERN_NOTICE "You can safely turn off the power\n");
35 while (1)
36 __asm__(".set\tmips3\n\t"
37 "wait\n\t"
38 ".set\tmips0");
39
40}
41
42void galileo_machine_power_off(void)
43{
44 galileo_machine_halt();
45}
diff --git a/arch/mips/gt64120/ev64120/serialGT.c b/arch/mips/gt64120/ev64120/serialGT.c
deleted file mode 100644
index 8f0d835491ff..000000000000
--- a/arch/mips/gt64120/ev64120/serialGT.c
+++ /dev/null
@@ -1,212 +0,0 @@
1/*
2 * serialGT.c
3 *
4 * BRIEF MODULE DESCRIPTION
5 * Low Level Serial Port control for use
6 * with the Galileo EVB64120A MIPS eval board and
7 * its on board two channel 16552 Uart.
8 *
9 * Copyright (C) 2000 RidgeRun, Inc.
10 * Author: RidgeRun, Inc.
11 * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 *
18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
19 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
21 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
24 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * You should have received a copy of the GNU General Public License along
30 * with this program; if not, write to the Free Software Foundation, Inc.,
31 * 675 Mass Ave, Cambridge, MA 02139, USA.
32 *
33 */
34
35// Note:
36// Serial CHANNELS - 0 is the bottom connector of evb64120A.
37// (The one that maps to the "B" channel of the
38// board's uart)
39// 1 is the top connector of evb64120A.
40// (The one that maps to the "A" channel of the
41// board's uart)
42int DEBUG_CHANNEL = 0; // See Note Above
43int CONSOLE_CHANNEL = 1; // See Note Above
44
45#define DUART 0xBD000000 /* Base address of Uart. */
46#define CHANNELOFFSET 0x20 /* DUART+CHANNELOFFSET gets you to the ChanA
47 register set of the 16552 Uart device.
48 DUART+0 gets you to the ChanB register set.
49 */
50#define DUART_DELTA 0x4
51#define FIFO_ENABLE 0x07
52#define INT_ENABLE 0x04 /* default interrupt mask */
53
54#define RBR 0x00
55#define THR 0x00
56#define DLL 0x00
57#define IER 0x01
58#define DLM 0x01
59#define IIR 0x02
60#define FCR 0x02
61#define LCR 0x03
62#define MCR 0x04
63#define LSR 0x05
64#define MSR 0x06
65#define SCR 0x07
66
67#define LCR_DLAB 0x80
68#define XTAL 1843200
69#define LSR_THRE 0x20
70#define LSR_BI 0x10
71#define LSR_DR 0x01
72#define MCR_LOOP 0x10
73#define ACCESS_DELAY 0x10000
74
75/******************************
76 Routine:
77 Description:
78 ******************************/
79int inreg(int channel, int reg)
80{
81 int val;
82 val =
83 *((volatile unsigned char *) DUART +
84 (channel * CHANNELOFFSET) + (reg * DUART_DELTA));
85 return val;
86}
87
88/******************************
89 Routine:
90 Description:
91 ******************************/
92void outreg(int channel, int reg, unsigned char val)
93{
94 *((volatile unsigned char *) DUART + (channel * CHANNELOFFSET)
95 + (reg * DUART_DELTA)) = val;
96}
97
98/******************************
99 Routine:
100 Description:
101 Initialize the device driver.
102 ******************************/
103void serial_init(int channel)
104{
105 /*
106 * Configure active port, (CHANNELOFFSET already set.)
107 *
108 * Set 8 bits, 1 stop bit, no parity.
109 *
110 * LCR<7> 0 divisor latch access bit
111 * LCR<6> 0 break control (1=send break)
112 * LCR<5> 0 stick parity (0=space, 1=mark)
113 * LCR<4> 0 parity even (0=odd, 1=even)
114 * LCR<3> 0 parity enable (1=enabled)
115 * LCR<2> 0 # stop bits (0=1, 1=1.5)
116 * LCR<1:0> 11 bits per character(00=5, 01=6, 10=7, 11=8)
117 */
118 outreg(channel, LCR, 0x3);
119
120 outreg(channel, FCR, FIFO_ENABLE); /* Enable the FIFO */
121
122 outreg(channel, IER, INT_ENABLE); /* Enable appropriate interrupts */
123}
124
125/******************************
126 Routine:
127 Description:
128 Set the baud rate.
129 ******************************/
130void serial_set(int channel, unsigned long baud)
131{
132 unsigned char sav_lcr;
133
134 /*
135 * Enable access to the divisor latches by setting DLAB in LCR.
136 *
137 */
138 sav_lcr = inreg(channel, LCR);
139
140#if 0
141 /*
142 * Set baud rate
143 */
144 outreg(channel, LCR, LCR_DLAB | sav_lcr);
145 // outreg(DLL,(XTAL/(16*2*(baud))-2));
146 outreg(channel, DLL, XTAL / (16 * baud));
147 // outreg(DLM,(XTAL/(16*2*(baud))-2)>>8);
148 outreg(channel, DLM, (XTAL / (16 * baud)) >> 8);
149#else
150 /*
151 * Note: Set baud rate, hardcoded here for rate of 115200
152 * since became unsure of above "baud rate" algorithm (??).
153 */
154 outreg(channel, LCR, 0x83);
155 outreg(channel, DLM, 0x00); // See note above
156 outreg(channel, DLL, 0x02); // See note above.
157 outreg(channel, LCR, 0x03);
158#endif
159
160 /*
161 * Restore line control register
162 */
163 outreg(channel, LCR, sav_lcr);
164}
165
166
167/******************************
168 Routine:
169 Description:
170 Transmit a character.
171 ******************************/
172void serial_putc(int channel, int c)
173{
174 while ((inreg(channel, LSR) & LSR_THRE) == 0);
175 outreg(channel, THR, c);
176}
177
178/******************************
179 Routine:
180 Description:
181 Read a received character if one is
182 available. Return -1 otherwise.
183 ******************************/
184int serial_getc(int channel)
185{
186 if (inreg(channel, LSR) & LSR_DR) {
187 return inreg(channel, RBR);
188 }
189 return -1;
190}
191
192/******************************
193 Routine:
194 Description:
195 Used by embedded gdb client. (example; gdb-stub.c)
196 ******************************/
197char getDebugChar()
198{
199 int val;
200 while ((val = serial_getc(DEBUG_CHANNEL)) == -1); // loop until we get a character in.
201 return (char) val;
202}
203
204/******************************
205 Routine:
206 Description:
207 Used by embedded gdb target. (example; gdb-stub.c)
208 ******************************/
209void putDebugChar(char c)
210{
211 serial_putc(DEBUG_CHANNEL, (int) c);
212}
diff --git a/arch/mips/gt64120/ev64120/setup.c b/arch/mips/gt64120/ev64120/setup.c
deleted file mode 100644
index 477848c22a2c..000000000000
--- a/arch/mips/gt64120/ev64120/setup.c
+++ /dev/null
@@ -1,99 +0,0 @@
1/*
2 * Copyright (C) 2000 RidgeRun, Inc.
3 * Author: RidgeRun, Inc.
4 * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
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 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
12 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
14 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
15 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 *
26 */
27#include <linux/init.h>
28#include <linux/kernel.h>
29#include <linux/types.h>
30#include <linux/mm.h>
31#include <linux/swap.h>
32#include <linux/ioport.h>
33#include <linux/sched.h>
34#include <linux/interrupt.h>
35#include <linux/pci.h>
36#include <linux/timex.h>
37#include <linux/pm.h>
38
39#include <asm/bootinfo.h>
40#include <asm/page.h>
41#include <asm/io.h>
42#include <asm/irq.h>
43#include <asm/pci.h>
44#include <asm/processor.h>
45#include <asm/time.h>
46#include <asm/reboot.h>
47#include <asm/traps.h>
48#include <linux/bootmem.h>
49
50unsigned long gt64120_base = KSEG1ADDR(0x14000000);
51
52/* These functions are used for rebooting or halting the machine*/
53extern void galileo_machine_restart(char *command);
54extern void galileo_machine_halt(void);
55extern void galileo_machine_power_off(void);
56/*
57 *This structure holds pointers to the pci configuration space accesses
58 *and interrupts allocating routine for device over the PCI
59 */
60extern struct pci_ops galileo_pci_ops;
61
62void __init prom_free_prom_memory(void)
63{
64}
65
66/*
67 * Initializes basic routines and structures pointers, memory size (as
68 * given by the bios and saves the command line.
69 */
70
71void __init plat_mem_setup(void)
72{
73 _machine_restart = galileo_machine_restart;
74 _machine_halt = galileo_machine_halt;
75 pm_power_off = galileo_machine_power_off;
76
77 set_io_port_base(KSEG1);
78}
79
80const char *get_system_type(void)
81{
82 return "Galileo EV64120A";
83}
84
85/*
86 * Kernel arguments passed by the firmware
87 *
88 * $a0 - nothing
89 * $a1 - holds a pointer to the eprom parameters
90 * $a2 - nothing
91 */
92
93void __init prom_init(void)
94{
95 mips_machgroup = MACH_GROUP_GALILEO;
96 mips_machtype = MACH_EV64120A;
97
98 add_memory_region(0, 32 << 20, BOOT_MEM_RAM);
99}
diff --git a/arch/mips/gt64120/momenco_ocelot/Makefile b/arch/mips/gt64120/momenco_ocelot/Makefile
index 9f9a33fc76b9..1df5fe23c642 100644
--- a/arch/mips/gt64120/momenco_ocelot/Makefile
+++ b/arch/mips/gt64120/momenco_ocelot/Makefile
@@ -2,6 +2,6 @@
2# Makefile for Momentum's Ocelot board. 2# Makefile for Momentum's Ocelot board.
3# 3#
4 4
5obj-y += irq.o prom.o reset.o setup.o 5obj-y += irq.o ocelot-platform.o prom.o reset.o setup.o
6 6
7obj-$(CONFIG_KGDB) += dbg_io.o 7obj-$(CONFIG_KGDB) += dbg_io.o
diff --git a/arch/mips/gt64120/momenco_ocelot/ocelot-platform.c b/arch/mips/gt64120/momenco_ocelot/ocelot-platform.c
new file mode 100644
index 000000000000..81d9031a5a2a
--- /dev/null
+++ b/arch/mips/gt64120/momenco_ocelot/ocelot-platform.c
@@ -0,0 +1,46 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
7 *
8 * A NS16552 DUART with a 20MHz crystal.
9 *
10 */
11#include <linux/module.h>
12#include <linux/init.h>
13#include <linux/serial_8250.h>
14
15#define OCELOT_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)
16
17static struct plat_serial8250_port uart8250_data[] = {
18 {
19 .mapbase = 0xe0001020,
20 .irq = 4,
21 .uartclk = 20000000,
22 .iotype = UPIO_MEM,
23 .flags = OCELOT_UART_FLAGS,
24 .regshift = 2,
25 },
26 { },
27};
28
29static struct platform_device uart8250_device = {
30 .name = "serial8250",
31 .id = PLAT8250_DEV_PLATFORM,
32 .dev = {
33 .platform_data = uart8250_data,
34 },
35};
36
37static int __init uart8250_init(void)
38{
39 return platform_device_register(&uart8250_device);
40}
41
42module_init(uart8250_init);
43
44MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
45MODULE_LICENSE("GPL");
46MODULE_DESCRIPTION("8250 UART probe driver for the Momenco Ocelot");
diff --git a/arch/mips/gt64120/wrppmc/setup.c b/arch/mips/gt64120/wrppmc/setup.c
index 121188d5ec4a..ed58c13b6032 100644
--- a/arch/mips/gt64120/wrppmc/setup.c
+++ b/arch/mips/gt64120/wrppmc/setup.c
@@ -14,6 +14,7 @@
14#include <linux/tty.h> 14#include <linux/tty.h>
15#include <linux/serial.h> 15#include <linux/serial.h>
16#include <linux/serial_core.h> 16#include <linux/serial_core.h>
17#include <linux/serial_8250.h>
17#include <linux/pm.h> 18#include <linux/pm.h>
18 19
19#include <asm/io.h> 20#include <asm/io.h>
@@ -158,8 +159,8 @@ const char *get_system_type(void)
158 */ 159 */
159void __init prom_init(void) 160void __init prom_init(void)
160{ 161{
161 mips_machgroup = MACH_GROUP_GALILEO; 162 mips_machgroup = MACH_GROUP_WINDRIVER;
162 mips_machtype = MACH_EV64120A; 163 mips_machtype = MACH_WRPPMC;
163 164
164 add_memory_region(WRPPMC_SDRAM_SCS0_BASE, WRPPMC_SDRAM_SCS0_SIZE, BOOT_MEM_RAM); 165 add_memory_region(WRPPMC_SDRAM_SCS0_BASE, WRPPMC_SDRAM_SCS0_SIZE, BOOT_MEM_RAM);
165 add_memory_region(WRPPMC_BOOTROM_BASE, WRPPMC_BOOTROM_SIZE, BOOT_MEM_ROM_DATA); 166 add_memory_region(WRPPMC_BOOTROM_BASE, WRPPMC_BOOTROM_SIZE, BOOT_MEM_ROM_DATA);
diff --git a/arch/mips/jazz/Makefile b/arch/mips/jazz/Makefile
index dd9d99bfcf7a..ae4c402b5004 100644
--- a/arch/mips/jazz/Makefile
+++ b/arch/mips/jazz/Makefile
@@ -2,4 +2,4 @@
2# Makefile for the Jazz family specific parts of the kernel 2# Makefile for the Jazz family specific parts of the kernel
3# 3#
4 4
5obj-y := irq.o jazzdma.o reset.o setup.o 5obj-y := irq.o jazzdma.o jazz-platform.o reset.o setup.o
diff --git a/arch/mips/jazz/jazz-platform.c b/arch/mips/jazz/jazz-platform.c
new file mode 100644
index 000000000000..fd736703eef2
--- /dev/null
+++ b/arch/mips/jazz/jazz-platform.c
@@ -0,0 +1,60 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
7 */
8#include <linux/init.h>
9#include <linux/module.h>
10#include <linux/serial_8250.h>
11
12#include <asm/jazz.h>
13
14/*
15 * Confusion ... It seems the original Microsoft Jazz machine used to have a
16 * 4.096MHz clock for its UART while the MIPS Magnum and Millenium systems
17 * had 8MHz. The Olivetti M700-10 and the Acer PICA have 1.8432MHz like PCs.
18 */
19#ifdef CONFIG_OLIVETTI_M700
20#define JAZZ_BASE_BAUD 1843200
21#else
22#define JAZZ_BASE_BAUD 8000000 /* 3072000 */
23#endif
24
25#define JAZZ_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)
26
27#define JAZZ_PORT(base, int) \
28{ \
29 .mapbase = base, \
30 .irq = int, \
31 .uartclk = JAZZ_BASE_BAUD, \
32 .iotype = UPIO_MEM, \
33 .flags = JAZZ_UART_FLAGS, \
34 .regshift = 0, \
35}
36
37static struct plat_serial8250_port uart8250_data[] = {
38 JAZZ_PORT(JAZZ_SERIAL1_BASE, JAZZ_SERIAL1_IRQ),
39 JAZZ_PORT(JAZZ_SERIAL2_BASE, JAZZ_SERIAL2_IRQ),
40 { },
41};
42
43static struct platform_device uart8250_device = {
44 .name = "serial8250",
45 .id = PLAT8250_DEV_PLATFORM,
46 .dev = {
47 .platform_data = uart8250_data,
48 },
49};
50
51static int __init uart8250_init(void)
52{
53 return platform_device_register(&uart8250_device);
54}
55
56module_init(uart8250_init);
57
58MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
59MODULE_LICENSE("GPL");
60MODULE_DESCRIPTION("8250 UART probe driver for the Jazz family");
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c
index d848f1a07786..81ec559a1c26 100644
--- a/arch/mips/jazz/setup.c
+++ b/arch/mips/jazz/setup.c
@@ -54,7 +54,7 @@ static struct resource jazz_io_resources[] = {
54 .start = 0x40, 54 .start = 0x40,
55 .end = 0x5f, 55 .end = 0x5f,
56 .name = "timer", 56 .name = "timer",
57 .end = IORESOURCE_BUSY 57 .flags = IORESOURCE_BUSY
58 }, { 58 }, {
59 .start = 0x80, 59 .start = 0x80,
60 .end = 0x8f, 60 .end = 0x8f,
diff --git a/arch/mips/kernel/8250-platform.c b/arch/mips/kernel/8250-platform.c
new file mode 100644
index 000000000000..cbf3fe20ad17
--- /dev/null
+++ b/arch/mips/kernel/8250-platform.c
@@ -0,0 +1,47 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
7 */
8#include <linux/module.h>
9#include <linux/init.h>
10#include <linux/serial_8250.h>
11
12#define PORT(base, int) \
13{ \
14 .iobase = base, \
15 .irq = int, \
16 .uartclk = 1843200, \
17 .iotype = UPIO_PORT, \
18 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \
19 .regshift = 0, \
20}
21
22static struct plat_serial8250_port uart8250_data[] = {
23 PORT(0x3F8, 4),
24 PORT(0x2F8, 3),
25 PORT(0x3E8, 4),
26 PORT(0x2E8, 3),
27 { },
28};
29
30static struct platform_device uart8250_device = {
31 .name = "serial8250",
32 .id = PLAT8250_DEV_PLATFORM,
33 .dev = {
34 .platform_data = uart8250_data,
35 },
36};
37
38static int __init uart8250_init(void)
39{
40 return platform_device_register(&uart8250_device);
41}
42
43module_init(uart8250_init);
44
45MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
46MODULE_LICENSE("GPL");
47MODULE_DESCRIPTION("Generic 8250 UART probe driver");
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index 49246264cc7c..5c8085b6d7ab 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -14,14 +14,15 @@ binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \
14obj-$(CONFIG_STACKTRACE) += stacktrace.o 14obj-$(CONFIG_STACKTRACE) += stacktrace.o
15obj-$(CONFIG_MODULES) += mips_ksyms.o module.o 15obj-$(CONFIG_MODULES) += mips_ksyms.o module.o
16 16
17obj-$(CONFIG_CPU_LOONGSON2) += r4k_fpu.o r4k_switch.o
18obj-$(CONFIG_CPU_MIPS32) += r4k_fpu.o r4k_switch.o
19obj-$(CONFIG_CPU_MIPS64) += r4k_fpu.o r4k_switch.o
17obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o 20obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o
18obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o
19obj-$(CONFIG_CPU_TX49XX) += r4k_fpu.o r4k_switch.o
20obj-$(CONFIG_CPU_R4000) += r4k_fpu.o r4k_switch.o 21obj-$(CONFIG_CPU_R4000) += r4k_fpu.o r4k_switch.o
21obj-$(CONFIG_CPU_VR41XX) += r4k_fpu.o r4k_switch.o
22obj-$(CONFIG_CPU_R4300) += r4k_fpu.o r4k_switch.o 22obj-$(CONFIG_CPU_R4300) += r4k_fpu.o r4k_switch.o
23obj-$(CONFIG_CPU_R4X00) += r4k_fpu.o r4k_switch.o 23obj-$(CONFIG_CPU_R4X00) += r4k_fpu.o r4k_switch.o
24obj-$(CONFIG_CPU_R5000) += r4k_fpu.o r4k_switch.o 24obj-$(CONFIG_CPU_R5000) += r4k_fpu.o r4k_switch.o
25obj-$(CONFIG_CPU_R6000) += r6000_fpu.o r4k_switch.o
25obj-$(CONFIG_CPU_R5432) += r4k_fpu.o r4k_switch.o 26obj-$(CONFIG_CPU_R5432) += r4k_fpu.o r4k_switch.o
26obj-$(CONFIG_CPU_R8000) += r4k_fpu.o r4k_switch.o 27obj-$(CONFIG_CPU_R8000) += r4k_fpu.o r4k_switch.o
27obj-$(CONFIG_CPU_RM7000) += r4k_fpu.o r4k_switch.o 28obj-$(CONFIG_CPU_RM7000) += r4k_fpu.o r4k_switch.o
@@ -29,13 +30,14 @@ obj-$(CONFIG_CPU_RM9000) += r4k_fpu.o r4k_switch.o
29obj-$(CONFIG_CPU_NEVADA) += r4k_fpu.o r4k_switch.o 30obj-$(CONFIG_CPU_NEVADA) += r4k_fpu.o r4k_switch.o
30obj-$(CONFIG_CPU_R10000) += r4k_fpu.o r4k_switch.o 31obj-$(CONFIG_CPU_R10000) += r4k_fpu.o r4k_switch.o
31obj-$(CONFIG_CPU_SB1) += r4k_fpu.o r4k_switch.o 32obj-$(CONFIG_CPU_SB1) += r4k_fpu.o r4k_switch.o
32obj-$(CONFIG_CPU_MIPS32) += r4k_fpu.o r4k_switch.o 33obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o
33obj-$(CONFIG_CPU_MIPS64) += r4k_fpu.o r4k_switch.o 34obj-$(CONFIG_CPU_TX49XX) += r4k_fpu.o r4k_switch.o
34obj-$(CONFIG_CPU_R6000) += r6000_fpu.o r4k_switch.o 35obj-$(CONFIG_CPU_VR41XX) += r4k_fpu.o r4k_switch.o
35 36
36obj-$(CONFIG_SMP) += smp.o 37obj-$(CONFIG_SMP) += smp.o
37 38
38obj-$(CONFIG_MIPS_MT) += mips-mt.o 39obj-$(CONFIG_MIPS_MT) += mips-mt.o
40obj-$(CONFIG_MIPS_MT_FPAFF) += mips-mt-fpaff.o
39obj-$(CONFIG_MIPS_MT_SMTC) += smtc.o smtc-asm.o smtc-proc.o 41obj-$(CONFIG_MIPS_MT_SMTC) += smtc.o smtc-asm.o smtc-proc.o
40obj-$(CONFIG_MIPS_MT_SMP) += smp-mt.o 42obj-$(CONFIG_MIPS_MT_SMP) += smp-mt.o
41 43
@@ -47,7 +49,6 @@ obj-$(CONFIG_I8259) += i8259.o
47obj-$(CONFIG_IRQ_CPU) += irq_cpu.o 49obj-$(CONFIG_IRQ_CPU) += irq_cpu.o
48obj-$(CONFIG_IRQ_CPU_RM7K) += irq-rm7000.o 50obj-$(CONFIG_IRQ_CPU_RM7K) += irq-rm7000.o
49obj-$(CONFIG_IRQ_CPU_RM9K) += irq-rm9000.o 51obj-$(CONFIG_IRQ_CPU_RM9K) += irq-rm9000.o
50obj-$(CONFIG_IRQ_MV64340) += irq-mv6434x.o
51obj-$(CONFIG_MIPS_BOARDS_GEN) += irq-msc01.o 52obj-$(CONFIG_MIPS_BOARDS_GEN) += irq-msc01.o
52 53
53obj-$(CONFIG_32BIT) += scall32-o32.o 54obj-$(CONFIG_32BIT) += scall32-o32.o
@@ -62,9 +63,11 @@ obj-$(CONFIG_PROC_FS) += proc.o
62 63
63obj-$(CONFIG_64BIT) += cpu-bugs64.o 64obj-$(CONFIG_64BIT) += cpu-bugs64.o
64 65
65obj-$(CONFIG_I8253) += i8253.o 66obj-$(CONFIG_PCSPEAKER) += pcspeaker.o
66 67
67obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o 68obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
68obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 69obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
69 70
70CFLAGS_cpu-bugs64.o = $(shell if $(CC) $(CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi) 71CFLAGS_cpu-bugs64.o = $(shell if $(CC) $(CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi)
72
73obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o
diff --git a/arch/mips/kernel/branch.c b/arch/mips/kernel/branch.c
index 76fd3f22c766..6b5df8bfab85 100644
--- a/arch/mips/kernel/branch.c
+++ b/arch/mips/kernel/branch.c
@@ -22,7 +22,8 @@
22 */ 22 */
23int __compute_return_epc(struct pt_regs *regs) 23int __compute_return_epc(struct pt_regs *regs)
24{ 24{
25 unsigned int *addr, bit, fcr31, dspcontrol; 25 unsigned int __user *addr;
26 unsigned int bit, fcr31, dspcontrol;
26 long epc; 27 long epc;
27 union mips_instruction insn; 28 union mips_instruction insn;
28 29
@@ -33,7 +34,7 @@ int __compute_return_epc(struct pt_regs *regs)
33 /* 34 /*
34 * Read the instruction 35 * Read the instruction
35 */ 36 */
36 addr = (unsigned int *) epc; 37 addr = (unsigned int __user *) epc;
37 if (__get_user(insn.word, addr)) { 38 if (__get_user(insn.word, addr)) {
38 force_sig(SIGSEGV, current); 39 force_sig(SIGSEGV, current);
39 return -EFAULT; 40 return -EFAULT;
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index ab755ea26c6a..06448a9656dc 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -75,6 +75,27 @@ static void r4k_wait_irqoff(void)
75 local_irq_enable(); 75 local_irq_enable();
76} 76}
77 77
78/*
79 * The RM7000 variant has to handle erratum 38. The workaround is to not
80 * have any pending stores when the WAIT instruction is executed.
81 */
82static void rm7k_wait_irqoff(void)
83{
84 local_irq_disable();
85 if (!need_resched())
86 __asm__(
87 " .set push \n"
88 " .set mips3 \n"
89 " .set noat \n"
90 " mfc0 $1, $12 \n"
91 " sync \n"
92 " mtc0 $1, $12 # stalls until W stage \n"
93 " wait \n"
94 " mtc0 $1, $12 # stalls until W stage \n"
95 " .set pop \n");
96 local_irq_enable();
97}
98
78/* The Au1xxx wait is available only if using 32khz counter or 99/* The Au1xxx wait is available only if using 32khz counter or
79 * external timer source, but specifically not CP0 Counter. */ 100 * external timer source, but specifically not CP0 Counter. */
80int allow_au1k_wait; 101int allow_au1k_wait;
@@ -132,19 +153,32 @@ static inline void check_wait(void)
132 case CPU_R4700: 153 case CPU_R4700:
133 case CPU_R5000: 154 case CPU_R5000:
134 case CPU_NEVADA: 155 case CPU_NEVADA:
135 case CPU_RM7000:
136 case CPU_4KC: 156 case CPU_4KC:
137 case CPU_4KEC: 157 case CPU_4KEC:
138 case CPU_4KSC: 158 case CPU_4KSC:
139 case CPU_5KC: 159 case CPU_5KC:
140/* case CPU_20KC:*/
141 case CPU_24K:
142 case CPU_25KF: 160 case CPU_25KF:
161 case CPU_PR4450:
162 cpu_wait = r4k_wait;
163 break;
164
165 case CPU_RM7000:
166 cpu_wait = rm7k_wait_irqoff;
167 break;
168
169 case CPU_24K:
143 case CPU_34K: 170 case CPU_34K:
171 cpu_wait = r4k_wait;
172 if (read_c0_config7() & MIPS_CONF7_WII)
173 cpu_wait = r4k_wait_irqoff;
174 break;
175
144 case CPU_74K: 176 case CPU_74K:
145 case CPU_PR4450:
146 cpu_wait = r4k_wait; 177 cpu_wait = r4k_wait;
178 if ((c->processor_id & 0xff) >= PRID_REV_ENCODE_332(2, 1, 0))
179 cpu_wait = r4k_wait_irqoff;
147 break; 180 break;
181
148 case CPU_TX49XX: 182 case CPU_TX49XX:
149 cpu_wait = r4k_wait_irqoff; 183 cpu_wait = r4k_wait_irqoff;
150 break; 184 break;
@@ -156,6 +190,17 @@ static inline void check_wait(void)
156 if (allow_au1k_wait) 190 if (allow_au1k_wait)
157 cpu_wait = au1k_wait; 191 cpu_wait = au1k_wait;
158 break; 192 break;
193 case CPU_20KC:
194 /*
195 * WAIT on Rev1.0 has E1, E2, E3 and E16.
196 * WAIT on Rev2.0 and Rev3.0 has E16.
197 * Rev3.1 WAIT is nop, why bother
198 */
199 if ((c->processor_id & 0xff) <= 0x64)
200 break;
201
202 cpu_wait = r4k_wait;
203 break;
159 case CPU_RM9000: 204 case CPU_RM9000:
160 if ((c->processor_id & 0x00ff) >= 0x40) 205 if ((c->processor_id & 0x00ff) >= 0x40)
161 cpu_wait = r4k_wait; 206 cpu_wait = r4k_wait;
@@ -165,9 +210,29 @@ static inline void check_wait(void)
165 } 210 }
166} 211}
167 212
213static inline void check_errata(void)
214{
215 struct cpuinfo_mips *c = &current_cpu_data;
216
217 switch (c->cputype) {
218 case CPU_34K:
219 /*
220 * Erratum "RPS May Cause Incorrect Instruction Execution"
221 * This code only handles VPE0, any SMP/SMTC/RTOS code
222 * making use of VPE1 will be responsable for that VPE.
223 */
224 if ((c->processor_id & PRID_REV_MASK) <= PRID_REV_34K_V1_0_2)
225 write_c0_config7(read_c0_config7() | MIPS_CONF7_RPS);
226 break;
227 default:
228 break;
229 }
230}
231
168void __init check_bugs32(void) 232void __init check_bugs32(void)
169{ 233{
170 check_wait(); 234 check_wait();
235 check_errata();
171} 236}
172 237
173/* 238/*
@@ -464,6 +529,14 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
464 MIPS_CPU_LLSC; 529 MIPS_CPU_LLSC;
465 c->tlbsize = 64; 530 c->tlbsize = 64;
466 break; 531 break;
532 case PRID_IMP_LOONGSON2:
533 c->cputype = CPU_LOONGSON2;
534 c->isa_level = MIPS_CPU_ISA_III;
535 c->options = R4K_OPTS |
536 MIPS_CPU_FPU | MIPS_CPU_LLSC |
537 MIPS_CPU_32FPR;
538 c->tlbsize = 64;
539 break;
467 } 540 }
468} 541}
469 542
@@ -567,6 +640,8 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c)
567 c->options |= MIPS_CPU_VEIC; 640 c->options |= MIPS_CPU_VEIC;
568 if (config3 & MIPS_CONF3_MT) 641 if (config3 & MIPS_CONF3_MT)
569 c->ases |= MIPS_ASE_MIPSMT; 642 c->ases |= MIPS_ASE_MIPSMT;
643 if (config3 & MIPS_CONF3_ULRI)
644 c->options |= MIPS_CPU_ULRI;
570 645
571 return config3 & MIPS_CONF_M; 646 return config3 & MIPS_CONF_M;
572} 647}
diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S
index 686249c5c328..e29598ae939d 100644
--- a/arch/mips/kernel/entry.S
+++ b/arch/mips/kernel/entry.S
@@ -84,6 +84,7 @@ FEXPORT(restore_all) # restore full frame
84 LONG_S sp, TI_REGS($28) 84 LONG_S sp, TI_REGS($28)
85 jal deferred_smtc_ipi 85 jal deferred_smtc_ipi
86 LONG_S s0, TI_REGS($28) 86 LONG_S s0, TI_REGS($28)
87#ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP
87/* Re-arm any temporarily masked interrupts not explicitly "acked" */ 88/* Re-arm any temporarily masked interrupts not explicitly "acked" */
88 mfc0 v0, CP0_TCSTATUS 89 mfc0 v0, CP0_TCSTATUS
89 ori v1, v0, TCSTATUS_IXMT 90 ori v1, v0, TCSTATUS_IXMT
@@ -110,6 +111,7 @@ FEXPORT(restore_all) # restore full frame
110 _ehb 111 _ehb
111 xor t0, t0, t3 112 xor t0, t0, t3
112 mtc0 t0, CP0_TCCONTEXT 113 mtc0 t0, CP0_TCCONTEXT
114#endif /* CONFIG_MIPS_MT_SMTC_IM_BACKSTOP */
113#endif /* CONFIG_MIPS_MT_SMTC */ 115#endif /* CONFIG_MIPS_MT_SMTC */
114 .set noat 116 .set noat
115 RESTORE_TEMP 117 RESTORE_TEMP
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
index 297bd56c2347..c0f19d638b98 100644
--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -243,9 +243,11 @@ NESTED(except_vec_vi_handler, 0, sp)
243 */ 243 */
244 mfc0 t1, CP0_STATUS 244 mfc0 t1, CP0_STATUS
245 and t0, a0, t1 245 and t0, a0, t1
246#ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP
246 mfc0 t2, CP0_TCCONTEXT 247 mfc0 t2, CP0_TCCONTEXT
247 or t0, t0, t2 248 or t0, t0, t2
248 mtc0 t0, CP0_TCCONTEXT 249 mtc0 t0, CP0_TCCONTEXT
250#endif /* CONFIG_MIPS_MT_SMTC_IM_BACKSTOP */
249 xor t1, t1, t0 251 xor t1, t1, t0
250 mtc0 t1, CP0_STATUS 252 mtc0 t1, CP0_STATUS
251 _ehb 253 _ehb
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
index 6f57ca44291f..f78538eceef7 100644
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -16,6 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/threads.h> 17#include <linux/threads.h>
18 18
19#include <asm/addrspace.h>
19#include <asm/asm.h> 20#include <asm/asm.h>
20#include <asm/asmmacro.h> 21#include <asm/asmmacro.h>
21#include <asm/irqflags.h> 22#include <asm/irqflags.h>
@@ -129,24 +130,25 @@
129#endif 130#endif
130 .endm 131 .endm
131 132
133#ifndef CONFIG_NO_EXCEPT_FILL
132 /* 134 /*
133 * Reserved space for exception handlers. 135 * Reserved space for exception handlers.
134 * Necessary for machines which link their kernels at KSEG0. 136 * Necessary for machines which link their kernels at KSEG0.
135 */ 137 */
136 .fill 0x400 138 .fill 0x400
139#endif
137 140
138EXPORT(stext) # used for profiling 141EXPORT(stext) # used for profiling
139EXPORT(_stext) 142EXPORT(_stext)
140 143
141#ifdef CONFIG_MIPS_SIM 144#ifdef CONFIG_BOOT_RAW
142 /* 145 /*
143 * Give us a fighting chance of running if execution beings at the 146 * Give us a fighting chance of running if execution beings at the
144 * kernel load address. This is needed because this platform does 147 * kernel load address. This is needed because this platform does
145 * not have a ELF loader yet. 148 * not have a ELF loader yet.
146 */ 149 */
147 j kernel_entry
148#endif
149 __INIT 150 __INIT
151#endif
150 152
151NESTED(kernel_entry, 16, sp) # kernel entry point 153NESTED(kernel_entry, 16, sp) # kernel entry point
152 154
@@ -197,9 +199,7 @@ NESTED(kernel_entry, 16, sp) # kernel entry point
197 j start_kernel 199 j start_kernel
198 END(kernel_entry) 200 END(kernel_entry)
199 201
200#ifdef CONFIG_QEMU
201 __INIT 202 __INIT
202#endif
203 203
204#ifdef CONFIG_SMP 204#ifdef CONFIG_SMP
205/* 205/*
diff --git a/arch/mips/kernel/irq-mv6434x.c b/arch/mips/kernel/irq-mv6434x.c
deleted file mode 100644
index 3dd561832e4c..000000000000
--- a/arch/mips/kernel/irq-mv6434x.c
+++ /dev/null
@@ -1,111 +0,0 @@
1/*
2 * Copyright 2002 Momentum Computer
3 * Author: mdharm@momenco.com
4 * Copyright (C) 2004, 06 Ralf Baechle <ralf@linux-mips.org>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11#include <linux/module.h>
12#include <linux/interrupt.h>
13#include <linux/kernel.h>
14#include <linux/kernel_stat.h>
15#include <linux/mv643xx.h>
16#include <linux/sched.h>
17
18#include <asm/io.h>
19#include <asm/irq.h>
20#include <asm/marvell.h>
21
22static unsigned int irq_base;
23
24static inline int ls1bit32(unsigned int x)
25{
26 int b = 31, s;
27
28 s = 16; if (x << 16 == 0) s = 0; b -= s; x <<= s;
29 s = 8; if (x << 8 == 0) s = 0; b -= s; x <<= s;
30 s = 4; if (x << 4 == 0) s = 0; b -= s; x <<= s;
31 s = 2; if (x << 2 == 0) s = 0; b -= s; x <<= s;
32 s = 1; if (x << 1 == 0) s = 0; b -= s;
33
34 return b;
35}
36
37/* mask off an interrupt -- 1 is enable, 0 is disable */
38static inline void mask_mv64340_irq(unsigned int irq)
39{
40 uint32_t value;
41
42 if (irq < (irq_base + 32)) {
43 value = MV_READ(MV64340_INTERRUPT0_MASK_0_LOW);
44 value &= ~(1 << (irq - irq_base));
45 MV_WRITE(MV64340_INTERRUPT0_MASK_0_LOW, value);
46 } else {
47 value = MV_READ(MV64340_INTERRUPT0_MASK_0_HIGH);
48 value &= ~(1 << (irq - irq_base - 32));
49 MV_WRITE(MV64340_INTERRUPT0_MASK_0_HIGH, value);
50 }
51}
52
53/* unmask an interrupt -- 1 is enable, 0 is disable */
54static inline void unmask_mv64340_irq(unsigned int irq)
55{
56 uint32_t value;
57
58 if (irq < (irq_base + 32)) {
59 value = MV_READ(MV64340_INTERRUPT0_MASK_0_LOW);
60 value |= 1 << (irq - irq_base);
61 MV_WRITE(MV64340_INTERRUPT0_MASK_0_LOW, value);
62 } else {
63 value = MV_READ(MV64340_INTERRUPT0_MASK_0_HIGH);
64 value |= 1 << (irq - irq_base - 32);
65 MV_WRITE(MV64340_INTERRUPT0_MASK_0_HIGH, value);
66 }
67}
68
69/*
70 * Interrupt handler for interrupts coming from the Marvell chip.
71 * It could be built in ethernet ports etc...
72 */
73void ll_mv64340_irq(void)
74{
75 unsigned int irq_src_low, irq_src_high;
76 unsigned int irq_mask_low, irq_mask_high;
77
78 /* read the interrupt status registers */
79 irq_mask_low = MV_READ(MV64340_INTERRUPT0_MASK_0_LOW);
80 irq_mask_high = MV_READ(MV64340_INTERRUPT0_MASK_0_HIGH);
81 irq_src_low = MV_READ(MV64340_MAIN_INTERRUPT_CAUSE_LOW);
82 irq_src_high = MV_READ(MV64340_MAIN_INTERRUPT_CAUSE_HIGH);
83
84 /* mask for just the interrupts we want */
85 irq_src_low &= irq_mask_low;
86 irq_src_high &= irq_mask_high;
87
88 if (irq_src_low)
89 do_IRQ(ls1bit32(irq_src_low) + irq_base);
90 else
91 do_IRQ(ls1bit32(irq_src_high) + irq_base + 32);
92}
93
94struct irq_chip mv64340_irq_type = {
95 .name = "MV-64340",
96 .ack = mask_mv64340_irq,
97 .mask = mask_mv64340_irq,
98 .mask_ack = mask_mv64340_irq,
99 .unmask = unmask_mv64340_irq,
100};
101
102void __init mv64340_irq_init(unsigned int base)
103{
104 int i;
105
106 for (i = base; i < base + 64; i++)
107 set_irq_chip_and_handler(i, &mv64340_irq_type,
108 handle_level_irq);
109
110 irq_base = base;
111}
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
index 37849edd0645..06e04da211d5 100644
--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -556,6 +556,16 @@ asmlinkage long sys32_sync_file_range(int fd, int __pad,
556 flags); 556 flags);
557} 557}
558 558
559asmlinkage long sys32_fadvise64_64(int fd, int __pad,
560 unsigned long a2, unsigned long a3,
561 unsigned long a4, unsigned long a5,
562 int flags)
563{
564 return sys_fadvise64_64(fd,
565 merge_64(a2, a3), merge_64(a4, a5),
566 flags);
567}
568
559save_static_function(sys32_clone); 569save_static_function(sys32_clone);
560__attribute_used__ noinline static int 570__attribute_used__ noinline static int
561_sys32_clone(nabi_no_regargs struct pt_regs regs) 571_sys32_clone(nabi_no_regargs struct pt_regs regs)
diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c
new file mode 100644
index 000000000000..ede5d73d652e
--- /dev/null
+++ b/arch/mips/kernel/mips-mt-fpaff.c
@@ -0,0 +1,176 @@
1/*
2 * General MIPS MT support routines, usable in AP/SP, SMVP, or SMTC kernels
3 * Copyright (C) 2005 Mips Technologies, Inc
4 */
5#include <linux/cpu.h>
6#include <linux/cpumask.h>
7#include <linux/delay.h>
8#include <linux/kernel.h>
9#include <linux/init.h>
10#include <linux/sched.h>
11#include <linux/security.h>
12#include <linux/types.h>
13#include <asm/uaccess.h>
14
15/*
16 * CPU mask used to set process affinity for MT VPEs/TCs with FPUs
17 */
18cpumask_t mt_fpu_cpumask;
19
20static int fpaff_threshold = -1;
21unsigned long mt_fpemul_threshold = 0;
22
23/*
24 * Replacement functions for the sys_sched_setaffinity() and
25 * sys_sched_getaffinity() system calls, so that we can integrate
26 * FPU affinity with the user's requested processor affinity.
27 * This code is 98% identical with the sys_sched_setaffinity()
28 * and sys_sched_getaffinity() system calls, and should be
29 * updated when kernel/sched.c changes.
30 */
31
32/*
33 * find_process_by_pid - find a process with a matching PID value.
34 * used in sys_sched_set/getaffinity() in kernel/sched.c, so
35 * cloned here.
36 */
37static inline struct task_struct *find_process_by_pid(pid_t pid)
38{
39 return pid ? find_task_by_pid(pid) : current;
40}
41
42
43/*
44 * mipsmt_sys_sched_setaffinity - set the cpu affinity of a process
45 */
46asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len,
47 unsigned long __user *user_mask_ptr)
48{
49 cpumask_t new_mask;
50 cpumask_t effective_mask;
51 int retval;
52 struct task_struct *p;
53
54 if (len < sizeof(new_mask))
55 return -EINVAL;
56
57 if (copy_from_user(&new_mask, user_mask_ptr, sizeof(new_mask)))
58 return -EFAULT;
59
60 lock_cpu_hotplug();
61 read_lock(&tasklist_lock);
62
63 p = find_process_by_pid(pid);
64 if (!p) {
65 read_unlock(&tasklist_lock);
66 unlock_cpu_hotplug();
67 return -ESRCH;
68 }
69
70 /*
71 * It is not safe to call set_cpus_allowed with the
72 * tasklist_lock held. We will bump the task_struct's
73 * usage count and drop tasklist_lock before invoking
74 * set_cpus_allowed.
75 */
76 get_task_struct(p);
77
78 retval = -EPERM;
79 if ((current->euid != p->euid) && (current->euid != p->uid) &&
80 !capable(CAP_SYS_NICE)) {
81 read_unlock(&tasklist_lock);
82 goto out_unlock;
83 }
84
85 retval = security_task_setscheduler(p, 0, NULL);
86 if (retval)
87 goto out_unlock;
88
89 /* Record new user-specified CPU set for future reference */
90 p->thread.user_cpus_allowed = new_mask;
91
92 /* Unlock the task list */
93 read_unlock(&tasklist_lock);
94
95 /* Compute new global allowed CPU set if necessary */
96 if ((p->thread.mflags & MF_FPUBOUND)
97 && cpus_intersects(new_mask, mt_fpu_cpumask)) {
98 cpus_and(effective_mask, new_mask, mt_fpu_cpumask);
99 retval = set_cpus_allowed(p, effective_mask);
100 } else {
101 p->thread.mflags &= ~MF_FPUBOUND;
102 retval = set_cpus_allowed(p, new_mask);
103 }
104
105
106out_unlock:
107 put_task_struct(p);
108 unlock_cpu_hotplug();
109 return retval;
110}
111
112/*
113 * mipsmt_sys_sched_getaffinity - get the cpu affinity of a process
114 */
115asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len,
116 unsigned long __user *user_mask_ptr)
117{
118 unsigned int real_len;
119 cpumask_t mask;
120 int retval;
121 struct task_struct *p;
122
123 real_len = sizeof(mask);
124 if (len < real_len)
125 return -EINVAL;
126
127 lock_cpu_hotplug();
128 read_lock(&tasklist_lock);
129
130 retval = -ESRCH;
131 p = find_process_by_pid(pid);
132 if (!p)
133 goto out_unlock;
134 retval = security_task_getscheduler(p);
135 if (retval)
136 goto out_unlock;
137
138 cpus_and(mask, p->thread.user_cpus_allowed, cpu_possible_map);
139
140out_unlock:
141 read_unlock(&tasklist_lock);
142 unlock_cpu_hotplug();
143 if (retval)
144 return retval;
145 if (copy_to_user(user_mask_ptr, &mask, real_len))
146 return -EFAULT;
147 return real_len;
148}
149
150
151static int __init fpaff_thresh(char *str)
152{
153 get_option(&str, &fpaff_threshold);
154 return 1;
155}
156__setup("fpaff=", fpaff_thresh);
157
158/*
159 * FPU Use Factor empirically derived from experiments on 34K
160 */
161#define FPUSEFACTOR 333
162
163static __init int mt_fp_affinity_init(void)
164{
165 if (fpaff_threshold >= 0) {
166 mt_fpemul_threshold = fpaff_threshold;
167 } else {
168 mt_fpemul_threshold =
169 (FPUSEFACTOR * (loops_per_jiffy/(500000/HZ))) / HZ;
170 }
171 printk(KERN_DEBUG "FPU Affinity set after %ld emulations\n",
172 mt_fpemul_threshold);
173
174 return 0;
175}
176arch_initcall(mt_fp_affinity_init);
diff --git a/arch/mips/kernel/mips-mt.c b/arch/mips/kernel/mips-mt.c
index ba01800b6018..1a7d89231299 100644
--- a/arch/mips/kernel/mips-mt.c
+++ b/arch/mips/kernel/mips-mt.c
@@ -6,7 +6,6 @@
6#include <linux/device.h> 6#include <linux/device.h>
7#include <linux/kernel.h> 7#include <linux/kernel.h>
8#include <linux/sched.h> 8#include <linux/sched.h>
9#include <linux/cpumask.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/interrupt.h> 10#include <linux/interrupt.h>
12#include <linux/security.h> 11#include <linux/security.h>
@@ -23,149 +22,6 @@
23#include <asm/cacheflush.h> 22#include <asm/cacheflush.h>
24 23
25/* 24/*
26 * CPU mask used to set process affinity for MT VPEs/TCs with FPUs
27 */
28
29cpumask_t mt_fpu_cpumask;
30
31#ifdef CONFIG_MIPS_MT_FPAFF
32
33#include <linux/cpu.h>
34#include <linux/delay.h>
35#include <asm/uaccess.h>
36
37unsigned long mt_fpemul_threshold = 0;
38
39/*
40 * Replacement functions for the sys_sched_setaffinity() and
41 * sys_sched_getaffinity() system calls, so that we can integrate
42 * FPU affinity with the user's requested processor affinity.
43 * This code is 98% identical with the sys_sched_setaffinity()
44 * and sys_sched_getaffinity() system calls, and should be
45 * updated when kernel/sched.c changes.
46 */
47
48/*
49 * find_process_by_pid - find a process with a matching PID value.
50 * used in sys_sched_set/getaffinity() in kernel/sched.c, so
51 * cloned here.
52 */
53static inline struct task_struct *find_process_by_pid(pid_t pid)
54{
55 return pid ? find_task_by_pid(pid) : current;
56}
57
58
59/*
60 * mipsmt_sys_sched_setaffinity - set the cpu affinity of a process
61 */
62asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len,
63 unsigned long __user *user_mask_ptr)
64{
65 cpumask_t new_mask;
66 cpumask_t effective_mask;
67 int retval;
68 struct task_struct *p;
69
70 if (len < sizeof(new_mask))
71 return -EINVAL;
72
73 if (copy_from_user(&new_mask, user_mask_ptr, sizeof(new_mask)))
74 return -EFAULT;
75
76 lock_cpu_hotplug();
77 read_lock(&tasklist_lock);
78
79 p = find_process_by_pid(pid);
80 if (!p) {
81 read_unlock(&tasklist_lock);
82 unlock_cpu_hotplug();
83 return -ESRCH;
84 }
85
86 /*
87 * It is not safe to call set_cpus_allowed with the
88 * tasklist_lock held. We will bump the task_struct's
89 * usage count and drop tasklist_lock before invoking
90 * set_cpus_allowed.
91 */
92 get_task_struct(p);
93
94 retval = -EPERM;
95 if ((current->euid != p->euid) && (current->euid != p->uid) &&
96 !capable(CAP_SYS_NICE)) {
97 read_unlock(&tasklist_lock);
98 goto out_unlock;
99 }
100
101 retval = security_task_setscheduler(p, 0, NULL);
102 if (retval)
103 goto out_unlock;
104
105 /* Record new user-specified CPU set for future reference */
106 p->thread.user_cpus_allowed = new_mask;
107
108 /* Unlock the task list */
109 read_unlock(&tasklist_lock);
110
111 /* Compute new global allowed CPU set if necessary */
112 if( (p->thread.mflags & MF_FPUBOUND)
113 && cpus_intersects(new_mask, mt_fpu_cpumask)) {
114 cpus_and(effective_mask, new_mask, mt_fpu_cpumask);
115 retval = set_cpus_allowed(p, effective_mask);
116 } else {
117 p->thread.mflags &= ~MF_FPUBOUND;
118 retval = set_cpus_allowed(p, new_mask);
119 }
120
121
122out_unlock:
123 put_task_struct(p);
124 unlock_cpu_hotplug();
125 return retval;
126}
127
128/*
129 * mipsmt_sys_sched_getaffinity - get the cpu affinity of a process
130 */
131asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len,
132 unsigned long __user *user_mask_ptr)
133{
134 unsigned int real_len;
135 cpumask_t mask;
136 int retval;
137 struct task_struct *p;
138
139 real_len = sizeof(mask);
140 if (len < real_len)
141 return -EINVAL;
142
143 lock_cpu_hotplug();
144 read_lock(&tasklist_lock);
145
146 retval = -ESRCH;
147 p = find_process_by_pid(pid);
148 if (!p)
149 goto out_unlock;
150 retval = security_task_getscheduler(p);
151 if (retval)
152 goto out_unlock;
153
154 cpus_and(mask, p->thread.user_cpus_allowed, cpu_possible_map);
155
156out_unlock:
157 read_unlock(&tasklist_lock);
158 unlock_cpu_hotplug();
159 if (retval)
160 return retval;
161 if (copy_to_user(user_mask_ptr, &mask, real_len))
162 return -EFAULT;
163 return real_len;
164}
165
166#endif /* CONFIG_MIPS_MT_FPAFF */
167
168/*
169 * Dump new MIPS MT state for the core. Does not leave TCs halted. 25 * Dump new MIPS MT state for the core. Does not leave TCs halted.
170 * Takes an argument which taken to be a pre-call MVPControl value. 26 * Takes an argument which taken to be a pre-call MVPControl value.
171 */ 27 */
@@ -195,27 +51,31 @@ void mips_mt_regdump(unsigned long mvpctl)
195 nvpe = ((mvpconf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT) + 1; 51 nvpe = ((mvpconf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT) + 1;
196 ntc = ((mvpconf0 & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1; 52 ntc = ((mvpconf0 & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1;
197 printk("-- per-VPE State --\n"); 53 printk("-- per-VPE State --\n");
198 for(i = 0; i < nvpe; i++) { 54 for (i = 0; i < nvpe; i++) {
199 for(tc = 0; tc < ntc; tc++) { 55 for (tc = 0; tc < ntc; tc++) {
200 settc(tc); 56 settc(tc);
201 if((read_tc_c0_tcbind() & TCBIND_CURVPE) == i) { 57 if ((read_tc_c0_tcbind() & TCBIND_CURVPE) == i) {
202 printk(" VPE %d\n", i); 58 printk(" VPE %d\n", i);
203 printk(" VPEControl : %08lx\n", read_vpe_c0_vpecontrol()); 59 printk(" VPEControl : %08lx\n",
204 printk(" VPEConf0 : %08lx\n", read_vpe_c0_vpeconf0()); 60 read_vpe_c0_vpecontrol());
205 printk(" VPE%d.Status : %08lx\n", 61 printk(" VPEConf0 : %08lx\n",
206 i, read_vpe_c0_status()); 62 read_vpe_c0_vpeconf0());
207 printk(" VPE%d.EPC : %08lx\n", i, read_vpe_c0_epc()); 63 printk(" VPE%d.Status : %08lx\n",
208 printk(" VPE%d.Cause : %08lx\n", i, read_vpe_c0_cause()); 64 i, read_vpe_c0_status());
209 printk(" VPE%d.Config7 : %08lx\n", 65 printk(" VPE%d.EPC : %08lx\n",
210 i, read_vpe_c0_config7()); 66 i, read_vpe_c0_epc());
211 break; /* Next VPE */ 67 printk(" VPE%d.Cause : %08lx\n",
68 i, read_vpe_c0_cause());
69 printk(" VPE%d.Config7 : %08lx\n",
70 i, read_vpe_c0_config7());
71 break; /* Next VPE */
72 }
212 } 73 }
213 }
214 } 74 }
215 printk("-- per-TC State --\n"); 75 printk("-- per-TC State --\n");
216 for(tc = 0; tc < ntc; tc++) { 76 for (tc = 0; tc < ntc; tc++) {
217 settc(tc); 77 settc(tc);
218 if(read_tc_c0_tcbind() == read_c0_tcbind()) { 78 if (read_tc_c0_tcbind() == read_c0_tcbind()) {
219 /* Are we dumping ourself? */ 79 /* Are we dumping ourself? */
220 haltval = 0; /* Then we're not halted, and mustn't be */ 80 haltval = 0; /* Then we're not halted, and mustn't be */
221 tcstatval = flags; /* And pre-dump TCStatus is flags */ 81 tcstatval = flags; /* And pre-dump TCStatus is flags */
@@ -310,17 +170,6 @@ static int __init ndflush(char *s)
310 return 1; 170 return 1;
311} 171}
312__setup("ndflush=", ndflush); 172__setup("ndflush=", ndflush);
313#ifdef CONFIG_MIPS_MT_FPAFF
314static int fpaff_threshold = -1;
315
316static int __init fpaff_thresh(char *str)
317{
318 get_option(&str, &fpaff_threshold);
319 return 1;
320}
321
322__setup("fpaff=", fpaff_thresh);
323#endif /* CONFIG_MIPS_MT_FPAFF */
324 173
325static unsigned int itc_base = 0; 174static unsigned int itc_base = 0;
326 175
@@ -376,20 +225,6 @@ void mips_mt_set_cpuoptions(void)
376 if (mt_n_dflushes != 1) 225 if (mt_n_dflushes != 1)
377 printk("D-Cache Flushes Repeated %d times\n", mt_n_dflushes); 226 printk("D-Cache Flushes Repeated %d times\n", mt_n_dflushes);
378 227
379#ifdef CONFIG_MIPS_MT_FPAFF
380 /* FPU Use Factor empirically derived from experiments on 34K */
381#define FPUSEFACTOR 333
382
383 if (fpaff_threshold >= 0) {
384 mt_fpemul_threshold = fpaff_threshold;
385 } else {
386 mt_fpemul_threshold =
387 (FPUSEFACTOR * (loops_per_jiffy/(500000/HZ))) / HZ;
388 }
389 printk("FPU Affinity set after %ld emulations\n",
390 mt_fpemul_threshold);
391#endif /* CONFIG_MIPS_MT_FPAFF */
392
393 if (itc_base != 0) { 228 if (itc_base != 0) {
394 /* 229 /*
395 * Configure ITC mapping. This code is very 230 * Configure ITC mapping. This code is very
diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/pcspeaker.c
index 475df6904219..475df6904219 100644
--- a/arch/mips/kernel/i8253.c
+++ b/arch/mips/kernel/pcspeaker.c
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
index 5ddc2e9deecf..ec04f5a1a5ea 100644
--- a/arch/mips/kernel/proc.c
+++ b/arch/mips/kernel/proc.c
@@ -14,7 +14,6 @@
14#include <asm/cpu-features.h> 14#include <asm/cpu-features.h>
15#include <asm/mipsregs.h> 15#include <asm/mipsregs.h>
16#include <asm/processor.h> 16#include <asm/processor.h>
17#include <asm/watch.h>
18 17
19unsigned int vced_count, vcei_count; 18unsigned int vced_count, vcei_count;
20 19
@@ -84,6 +83,7 @@ static const char *cpu_name[] = {
84 [CPU_VR4181A] = "NEC VR4181A", 83 [CPU_VR4181A] = "NEC VR4181A",
85 [CPU_SR71000] = "Sandcraft SR71000", 84 [CPU_SR71000] = "Sandcraft SR71000",
86 [CPU_PR4450] = "Philips PR4450", 85 [CPU_PR4450] = "Philips PR4450",
86 [CPU_LOONGSON2] = "ICT Loongson-2",
87}; 87};
88 88
89 89
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 6bdfb5a9fa1a..bd05f5a927ea 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -25,7 +25,9 @@
25#include <linux/init.h> 25#include <linux/init.h>
26#include <linux/completion.h> 26#include <linux/completion.h>
27#include <linux/kallsyms.h> 27#include <linux/kallsyms.h>
28#include <linux/random.h>
28 29
30#include <asm/asm.h>
29#include <asm/bootinfo.h> 31#include <asm/bootinfo.h>
30#include <asm/cpu.h> 32#include <asm/cpu.h>
31#include <asm/dsp.h> 33#include <asm/dsp.h>
@@ -46,7 +48,7 @@
46 * power and have a low exit latency (ie sit in a loop waiting for somebody to 48 * power and have a low exit latency (ie sit in a loop waiting for somebody to
47 * say that they'd like to reschedule) 49 * say that they'd like to reschedule)
48 */ 50 */
49ATTRIB_NORET void cpu_idle(void) 51void __noreturn cpu_idle(void)
50{ 52{
51 /* endless idle loop with no priority at all */ 53 /* endless idle loop with no priority at all */
52 while (1) { 54 while (1) {
@@ -213,7 +215,7 @@ int dump_task_fpu (struct task_struct *t, elf_fpregset_t *fpr)
213/* 215/*
214 * Create a kernel thread 216 * Create a kernel thread
215 */ 217 */
216static ATTRIB_NORET void kernel_thread_helper(void *arg, int (*fn)(void *)) 218static void __noreturn kernel_thread_helper(void *arg, int (*fn)(void *))
217{ 219{
218 do_exit(fn(arg)); 220 do_exit(fn(arg));
219} 221}
@@ -460,3 +462,15 @@ unsigned long get_wchan(struct task_struct *task)
460out: 462out:
461 return pc; 463 return pc;
462} 464}
465
466/*
467 * Don't forget that the stack pointer must be aligned on a 8 bytes
468 * boundary for 32-bits ABI and 16 bytes for 64-bits ABI.
469 */
470unsigned long arch_align_stack(unsigned long sp)
471{
472 if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
473 sp -= get_random_int() & ~PAGE_MASK;
474
475 return sp & ALMASK;
476}
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index b5a7b46bbc49..893e7bccf226 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -174,17 +174,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
174 switch (request) { 174 switch (request) {
175 /* when I and D space are separate, these will need to be fixed. */ 175 /* when I and D space are separate, these will need to be fixed. */
176 case PTRACE_PEEKTEXT: /* read word at location addr. */ 176 case PTRACE_PEEKTEXT: /* read word at location addr. */
177 case PTRACE_PEEKDATA: { 177 case PTRACE_PEEKDATA:
178 unsigned long tmp; 178 ret = generic_ptrace_peekdata(child, addr, data);
179 int copied;
180
181 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
182 ret = -EIO;
183 if (copied != sizeof(tmp))
184 break;
185 ret = put_user(tmp,(unsigned long __user *) data);
186 break; 179 break;
187 }
188 180
189 /* Read the word at location addr in the USER area. */ 181 /* Read the word at location addr in the USER area. */
190 case PTRACE_PEEKUSR: { 182 case PTRACE_PEEKUSR: {
@@ -313,11 +305,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
313 /* when I and D space are separate, this will have to be fixed. */ 305 /* when I and D space are separate, this will have to be fixed. */
314 case PTRACE_POKETEXT: /* write the word at location addr. */ 306 case PTRACE_POKETEXT: /* write the word at location addr. */
315 case PTRACE_POKEDATA: 307 case PTRACE_POKEDATA:
316 ret = 0; 308 ret = generic_ptrace_pokedata(child, addr, data);
317 if (access_process_vm(child, addr, &data, sizeof(data), 1)
318 == sizeof(data))
319 break;
320 ret = -EIO;
321 break; 309 break;
322 310
323 case PTRACE_POKEUSR: { 311 case PTRACE_POKEUSR: {
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S
index cc566cf12246..d9bfae53c43f 100644
--- a/arch/mips/kernel/r4k_switch.S
+++ b/arch/mips/kernel/r4k_switch.S
@@ -85,12 +85,7 @@
85 move $28, a2 85 move $28, a2
86 cpu_restore_nonscratch a1 86 cpu_restore_nonscratch a1
87 87
88#if (_THREAD_SIZE - 32) < 0x10000 88 PTR_ADDU t0, $28, _THREAD_SIZE - 32
89 PTR_ADDIU t0, $28, _THREAD_SIZE - 32
90#else
91 PTR_LI t0, _THREAD_SIZE - 32
92 PTR_ADDU t0, $28
93#endif
94 set_saved_sp t0, t1, t2 89 set_saved_sp t0, t1, t2
95#ifdef CONFIG_MIPS_MT_SMTC 90#ifdef CONFIG_MIPS_MT_SMTC
96 /* Read-modify-writes of Status must be atomic on a VPE */ 91 /* Read-modify-writes of Status must be atomic on a VPE */
@@ -174,7 +169,7 @@ LEAF(_init_fpu)
174 or t0, t1 169 or t0, t1
175 mtc0 t0, CP0_STATUS 170 mtc0 t0, CP0_STATUS
176#endif /* CONFIG_MIPS_MT_SMTC */ 171#endif /* CONFIG_MIPS_MT_SMTC */
177 fpu_enable_hazard 172 enable_fpu_hazard
178 173
179 li t1, FPU_DEFAULT 174 li t1, FPU_DEFAULT
180 ctc1 t1, fcr31 175 ctc1 t1, fcr31
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index 0c9a9ff8cd25..ae985d1fcca1 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -657,7 +657,11 @@ einval: li v0, -EINVAL
657 sys sys_getcpu 3 657 sys sys_getcpu 3
658 sys sys_epoll_pwait 6 658 sys sys_epoll_pwait 6
659 sys sys_ioprio_set 3 659 sys sys_ioprio_set 3
660 sys sys_ioprio_get 2 660 sys sys_ioprio_get 2 /* 4315 */
661 sys sys_utimensat 4
662 sys sys_signalfd 3
663 sys sys_timerfd 4
664 sys sys_eventfd 1
661 .endm 665 .endm
662 666
663 /* We pre-compute the number of _instruction_ bytes needed to 667 /* 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 23f3b118f718..7bcd5a1a85f5 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -473,4 +473,8 @@ sys_call_table:
473 PTR sys_epoll_pwait 473 PTR sys_epoll_pwait
474 PTR sys_ioprio_set 474 PTR sys_ioprio_set
475 PTR sys_ioprio_get 475 PTR sys_ioprio_get
476 PTR sys_utimensat /* 5275 */
477 PTR sys_signalfd
478 PTR sys_timerfd
479 PTR sys_eventfd
476 .size sys_call_table,.-sys_call_table 480 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index 6eac28337423..532a2f3b42fc 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -299,7 +299,7 @@ EXPORT(sysn32_call_table)
299 PTR sys_ni_syscall /* res. for afs_syscall */ 299 PTR sys_ni_syscall /* res. for afs_syscall */
300 PTR sys_ni_syscall /* res. for security */ 300 PTR sys_ni_syscall /* res. for security */
301 PTR sys_gettid 301 PTR sys_gettid
302 PTR sys32_readahead 302 PTR sys_readahead
303 PTR sys_setxattr /* 6180 */ 303 PTR sys_setxattr /* 6180 */
304 PTR sys_lsetxattr 304 PTR sys_lsetxattr
305 PTR sys_fsetxattr 305 PTR sys_fsetxattr
@@ -399,4 +399,8 @@ EXPORT(sysn32_call_table)
399 PTR compat_sys_epoll_pwait 399 PTR compat_sys_epoll_pwait
400 PTR sys_ioprio_set 400 PTR sys_ioprio_set
401 PTR sys_ioprio_get 401 PTR sys_ioprio_get
402 PTR compat_sys_utimensat
403 PTR compat_sys_signalfd /* 5280 */
404 PTR compat_sys_timerfd
405 PTR sys_eventfd
402 .size sysn32_call_table,.-sysn32_call_table 406 .size sysn32_call_table,.-sysn32_call_table
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 7e74b412a782..6bbe0f4ed8ba 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -459,7 +459,7 @@ sys_call_table:
459 PTR sys_remap_file_pages 459 PTR sys_remap_file_pages
460 PTR sys_set_tid_address 460 PTR sys_set_tid_address
461 PTR sys_restart_syscall 461 PTR sys_restart_syscall
462 PTR sys_fadvise64_64 462 PTR sys32_fadvise64_64
463 PTR compat_sys_statfs64 /* 4255 */ 463 PTR compat_sys_statfs64 /* 4255 */
464 PTR compat_sys_fstatfs64 464 PTR compat_sys_fstatfs64
465 PTR compat_sys_timer_create 465 PTR compat_sys_timer_create
@@ -521,4 +521,8 @@ sys_call_table:
521 PTR compat_sys_epoll_pwait 521 PTR compat_sys_epoll_pwait
522 PTR sys_ioprio_set 522 PTR sys_ioprio_set
523 PTR sys_ioprio_get /* 4315 */ 523 PTR sys_ioprio_get /* 4315 */
524 PTR compat_sys_utimensat
525 PTR compat_sys_signalfd
526 PTR compat_sys_timerfd
527 PTR sys_eventfd
524 .size sys_call_table,.-sys_call_table 528 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 4975da0bfb63..316685fca059 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -20,6 +20,7 @@
20#include <linux/highmem.h> 20#include <linux/highmem.h>
21#include <linux/console.h> 21#include <linux/console.h>
22#include <linux/pfn.h> 22#include <linux/pfn.h>
23#include <linux/debugfs.h>
23 24
24#include <asm/addrspace.h> 25#include <asm/addrspace.h>
25#include <asm/bootinfo.h> 26#include <asm/bootinfo.h>
@@ -574,3 +575,18 @@ __setup("nodsp", dsp_disable);
574 575
575unsigned long kernelsp[NR_CPUS]; 576unsigned long kernelsp[NR_CPUS];
576unsigned long fw_arg0, fw_arg1, fw_arg2, fw_arg3; 577unsigned long fw_arg0, fw_arg1, fw_arg2, fw_arg3;
578
579#ifdef CONFIG_DEBUG_FS
580struct dentry *mips_debugfs_dir;
581static int __init debugfs_mips(void)
582{
583 struct dentry *d;
584
585 d = debugfs_create_dir("mips", NULL);
586 if (IS_ERR(d))
587 return PTR_ERR(d);
588 mips_debugfs_dir = d;
589 return 0;
590}
591arch_initcall(debugfs_mips);
592#endif
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index 003f8152b9ed..486b8e5f52d0 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -36,68 +36,6 @@
36 36
37#include "signal-common.h" 37#include "signal-common.h"
38 38
39#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3)
40
41typedef struct compat_siginfo {
42 int si_signo;
43 int si_code;
44 int si_errno;
45
46 union {
47 int _pad[SI_PAD_SIZE32];
48
49 /* kill() */
50 struct {
51 compat_pid_t _pid; /* sender's pid */
52 compat_uid_t _uid; /* sender's uid */
53 } _kill;
54
55 /* SIGCHLD */
56 struct {
57 compat_pid_t _pid; /* which child */
58 compat_uid_t _uid; /* sender's uid */
59 int _status; /* exit code */
60 compat_clock_t _utime;
61 compat_clock_t _stime;
62 } _sigchld;
63
64 /* IRIX SIGCHLD */
65 struct {
66 compat_pid_t _pid; /* which child */
67 compat_clock_t _utime;
68 int _status; /* exit code */
69 compat_clock_t _stime;
70 } _irix_sigchld;
71
72 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
73 struct {
74 s32 _addr; /* faulting insn/memory ref. */
75 } _sigfault;
76
77 /* SIGPOLL, SIGXFSZ (To do ...) */
78 struct {
79 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
80 int _fd;
81 } _sigpoll;
82
83 /* POSIX.1b timers */
84 struct {
85 timer_t _tid; /* timer id */
86 int _overrun; /* overrun count */
87 compat_sigval_t _sigval;/* same as below */
88 int _sys_private; /* not to be passed to user */
89 } _timer;
90
91 /* POSIX.1b signals */
92 struct {
93 compat_pid_t _pid; /* sender's pid */
94 compat_uid_t _uid; /* sender's uid */
95 compat_sigval_t _sigval;
96 } _rt;
97
98 } _sifields;
99} compat_siginfo_t;
100
101/* 39/*
102 * Including <asm/unistd.h> would give use the 64-bit syscall numbers ... 40 * Including <asm/unistd.h> would give use the 64-bit syscall numbers ...
103 */ 41 */
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c
index 4cf9ff24d1f7..eb7e05926ebe 100644
--- a/arch/mips/kernel/signal_n32.c
+++ b/arch/mips/kernel/signal_n32.c
@@ -72,7 +72,7 @@ struct ucontextn32 {
72struct rt_sigframe_n32 { 72struct rt_sigframe_n32 {
73 u32 rs_ass[4]; /* argument save space for o32 */ 73 u32 rs_ass[4]; /* argument save space for o32 */
74 u32 rs_code[2]; /* signal trampoline */ 74 u32 rs_code[2]; /* signal trampoline */
75 struct siginfo rs_info; 75 struct compat_siginfo rs_info;
76 struct ucontextn32 rs_uc; 76 struct ucontextn32 rs_uc;
77}; 77};
78 78
@@ -81,7 +81,7 @@ struct rt_sigframe_n32 {
81struct rt_sigframe_n32 { 81struct rt_sigframe_n32 {
82 u32 rs_ass[4]; /* argument save space for o32 */ 82 u32 rs_ass[4]; /* argument save space for o32 */
83 u32 rs_pad[2]; 83 u32 rs_pad[2];
84 struct siginfo rs_info; 84 struct compat_siginfo rs_info;
85 struct ucontextn32 rs_uc; 85 struct ucontextn32 rs_uc;
86 u32 rs_code[8] ____cacheline_aligned; /* signal trampoline */ 86 u32 rs_code[8] ____cacheline_aligned; /* signal trampoline */
87}; 87};
@@ -187,7 +187,7 @@ static int setup_rt_frame_n32(struct k_sigaction * ka,
187 install_sigtramp(frame->rs_code, __NR_N32_rt_sigreturn); 187 install_sigtramp(frame->rs_code, __NR_N32_rt_sigreturn);
188 188
189 /* Create siginfo. */ 189 /* Create siginfo. */
190 err |= copy_siginfo_to_user(&frame->rs_info, info); 190 err |= copy_siginfo_to_user32(&frame->rs_info, info);
191 191
192 /* Create the ucontext. */ 192 /* Create the ucontext. */
193 err |= __put_user(0, &frame->rs_uc.uc_flags); 193 err |= __put_user(0, &frame->rs_uc.uc_flags);
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index 64b62bdfb4f6..19b30d6f1727 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -129,13 +129,13 @@ static irqreturn_t ipi_call_interrupt(int irq, void *dev_id)
129 129
130static struct irqaction irq_resched = { 130static struct irqaction irq_resched = {
131 .handler = ipi_resched_interrupt, 131 .handler = ipi_resched_interrupt,
132 .flags = IRQF_DISABLED, 132 .flags = IRQF_DISABLED|IRQF_PERCPU,
133 .name = "IPI_resched" 133 .name = "IPI_resched"
134}; 134};
135 135
136static struct irqaction irq_call = { 136static struct irqaction irq_call = {
137 .handler = ipi_call_interrupt, 137 .handler = ipi_call_interrupt,
138 .flags = IRQF_DISABLED, 138 .flags = IRQF_DISABLED|IRQF_PERCPU,
139 .name = "IPI_call" 139 .name = "IPI_call"
140}; 140};
141 141
@@ -236,8 +236,6 @@ void __init plat_smp_setup(void)
236 dvpe(); 236 dvpe();
237 dmt(); 237 dmt();
238 238
239 mips_mt_set_cpuoptions();
240
241 /* Put MVPE's into 'configuration state' */ 239 /* Put MVPE's into 'configuration state' */
242 set_c0_mvpcontrol(MVPCONTROL_VPC); 240 set_c0_mvpcontrol(MVPCONTROL_VPC);
243 241
@@ -263,6 +261,8 @@ void __init plat_smp_setup(void)
263 261
264void __init plat_prepare_cpus(unsigned int max_cpus) 262void __init plat_prepare_cpus(unsigned int max_cpus)
265{ 263{
264 mips_mt_set_cpuoptions();
265
266 /* set up ipi interrupts */ 266 /* set up ipi interrupts */
267 if (cpu_has_vint) { 267 if (cpu_has_vint) {
268 set_vi_handler(MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch); 268 set_vi_handler(MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch);
@@ -275,10 +275,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
275 setup_irq(cpu_ipi_resched_irq, &irq_resched); 275 setup_irq(cpu_ipi_resched_irq, &irq_resched);
276 setup_irq(cpu_ipi_call_irq, &irq_call); 276 setup_irq(cpu_ipi_call_irq, &irq_call);
277 277
278 /* need to mark IPI's as IRQ_PER_CPU */
279 irq_desc[cpu_ipi_resched_irq].status |= IRQ_PER_CPU;
280 set_irq_handler(cpu_ipi_resched_irq, handle_percpu_irq); 278 set_irq_handler(cpu_ipi_resched_irq, handle_percpu_irq);
281 irq_desc[cpu_ipi_call_irq].status |= IRQ_PER_CPU;
282 set_irq_handler(cpu_ipi_call_irq, handle_percpu_irq); 279 set_irq_handler(cpu_ipi_call_irq, handle_percpu_irq);
283} 280}
284 281
@@ -326,8 +323,11 @@ void prom_boot_secondary(int cpu, struct task_struct *idle)
326 323
327void prom_init_secondary(void) 324void prom_init_secondary(void)
328{ 325{
326 /* Enable per-cpu interrupts */
327
328 /* This is Malta specific: IPI,performance and timer inetrrupts */
329 write_c0_status((read_c0_status() & ~ST0_IM ) | 329 write_c0_status((read_c0_status() & ~ST0_IM ) |
330 (STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP7)); 330 (STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP6 | STATUSF_IP7));
331} 331}
332 332
333void prom_smp_finish(void) 333void prom_smp_finish(void)
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index c46e479c992b..be7362bc2c9a 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -51,24 +51,14 @@ int __cpu_logical_map[NR_CPUS]; /* Map logical to physical */
51EXPORT_SYMBOL(phys_cpu_present_map); 51EXPORT_SYMBOL(phys_cpu_present_map);
52EXPORT_SYMBOL(cpu_online_map); 52EXPORT_SYMBOL(cpu_online_map);
53 53
54/* This happens early in bootup, can't really do it better */
55static void smp_tune_scheduling (void)
56{
57 struct cache_desc *cd = &current_cpu_data.scache;
58 unsigned long cachesize = cd->linesz * cd->sets * cd->ways;
59
60 if (cachesize > max_cache_size)
61 max_cache_size = cachesize;
62}
63
64extern void __init calibrate_delay(void); 54extern void __init calibrate_delay(void);
65extern ATTRIB_NORET void cpu_idle(void); 55extern void cpu_idle(void);
66 56
67/* 57/*
68 * First C code run on the secondary CPUs after being started up by 58 * First C code run on the secondary CPUs after being started up by
69 * the master. 59 * the master.
70 */ 60 */
71asmlinkage void start_secondary(void) 61asmlinkage __cpuinit void start_secondary(void)
72{ 62{
73 unsigned int cpu; 63 unsigned int cpu;
74 64
@@ -228,7 +218,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
228{ 218{
229 init_new_context(current, &init_mm); 219 init_new_context(current, &init_mm);
230 current_thread_info()->cpu = 0; 220 current_thread_info()->cpu = 0;
231 smp_tune_scheduling();
232 plat_prepare_cpus(max_cpus); 221 plat_prepare_cpus(max_cpus);
233#ifndef CONFIG_HOTPLUG_CPU 222#ifndef CONFIG_HOTPLUG_CPU
234 cpu_present_map = cpu_possible_map; 223 cpu_present_map = cpu_possible_map;
diff --git a/arch/mips/kernel/smtc-asm.S b/arch/mips/kernel/smtc-asm.S
index 921207c4a83c..20938a4cb52d 100644
--- a/arch/mips/kernel/smtc-asm.S
+++ b/arch/mips/kernel/smtc-asm.S
@@ -121,10 +121,7 @@ LEAF(self_ipi)
121 subu t1,sp,PT_SIZE 121 subu t1,sp,PT_SIZE
122 sw ra,PT_EPC(t1) 122 sw ra,PT_EPC(t1)
123 sw a0,PT_PADSLOT4(t1) 123 sw a0,PT_PADSLOT4(t1)
124 LONG_L s0, TI_REGS($28)
125 LONG_S sp, TI_REGS($28)
126 la t2,ipi_decode 124 la t2,ipi_decode
127 LONG_S s0, TI_REGS($28)
128 sw t2,PT_PADSLOT5(t1) 125 sw t2,PT_PADSLOT5(t1)
129 /* Save pre-disable value of TCStatus */ 126 /* Save pre-disable value of TCStatus */
130 sw t0,PT_TCSTATUS(t1) 127 sw t0,PT_TCSTATUS(t1)
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index b361edb83dc6..342d873b2ecc 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -13,9 +13,9 @@
13#include <asm/system.h> 13#include <asm/system.h>
14#include <asm/hardirq.h> 14#include <asm/hardirq.h>
15#include <asm/hazards.h> 15#include <asm/hazards.h>
16#include <asm/irq.h>
16#include <asm/mmu_context.h> 17#include <asm/mmu_context.h>
17#include <asm/smp.h> 18#include <asm/smp.h>
18#include <asm/mips-boards/maltaint.h>
19#include <asm/mipsregs.h> 19#include <asm/mipsregs.h>
20#include <asm/cacheflush.h> 20#include <asm/cacheflush.h>
21#include <asm/time.h> 21#include <asm/time.h>
@@ -611,12 +611,12 @@ void smtc_cpus_done(void)
611int setup_irq_smtc(unsigned int irq, struct irqaction * new, 611int setup_irq_smtc(unsigned int irq, struct irqaction * new,
612 unsigned long hwmask) 612 unsigned long hwmask)
613{ 613{
614#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
614 unsigned int vpe = current_cpu_data.vpe_id; 615 unsigned int vpe = current_cpu_data.vpe_id;
615 616
616 irq_hwmask[irq] = hwmask; 617 vpemask[vpe][irq - MIPS_CPU_IRQ_BASE] = 1;
617#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
618 vpemask[vpe][irq - MIPSCPU_INT_BASE] = 1;
619#endif 618#endif
619 irq_hwmask[irq] = hwmask;
620 620
621 return setup_irq(irq, new); 621 return setup_irq(irq, new);
622} 622}
@@ -822,7 +822,7 @@ void ipi_decode(struct smtc_ipi *pipi)
822 switch (type_copy) { 822 switch (type_copy) {
823 case SMTC_CLOCK_TICK: 823 case SMTC_CLOCK_TICK:
824 irq_enter(); 824 irq_enter();
825 kstat_this_cpu.irqs[MIPSCPU_INT_BASE + MIPSCPU_INT_CPUCTR]++; 825 kstat_this_cpu.irqs[MIPS_CPU_IRQ_BASE + cp0_compare_irq]++;
826 /* Invoke Clock "Interrupt" */ 826 /* Invoke Clock "Interrupt" */
827 ipi_timer_latch[dest_copy] = 0; 827 ipi_timer_latch[dest_copy] = 0;
828#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG 828#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
@@ -1104,7 +1104,7 @@ void smtc_idle_loop_hook(void)
1104 mtflags = dmt(); 1104 mtflags = dmt();
1105 pdb_msg = &id_ho_db_msg[0]; 1105 pdb_msg = &id_ho_db_msg[0];
1106 im = read_c0_status(); 1106 im = read_c0_status();
1107 vpe = cpu_data[smp_processor_id()].vpe_id; 1107 vpe = current_cpu_data.vpe_id;
1108 for (bit = 0; bit < 8; bit++) { 1108 for (bit = 0; bit < 8; bit++) {
1109 /* 1109 /*
1110 * In current prototype, I/O interrupts 1110 * In current prototype, I/O interrupts
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 9dd5a2df8eac..b947c61c0cc8 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -272,9 +272,8 @@ asmlinkage int sys_set_thread_area(unsigned long addr)
272 struct thread_info *ti = task_thread_info(current); 272 struct thread_info *ti = task_thread_info(current);
273 273
274 ti->tp_value = addr; 274 ti->tp_value = addr;
275 275 if (cpu_has_userlocal)
276 /* If some future MIPS implementation has this register in hardware, 276 write_c0_userlocal(addr);
277 * we will need to update it here (and in context switches). */
278 277
279 return 0; 278 return 0;
280} 279}
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index 751b4a18b133..d48d1d5bea0a 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -199,6 +199,35 @@ int (*perf_irq)(void) = null_perf_irq;
199EXPORT_SYMBOL(null_perf_irq); 199EXPORT_SYMBOL(null_perf_irq);
200EXPORT_SYMBOL(perf_irq); 200EXPORT_SYMBOL(perf_irq);
201 201
202/*
203 * Timer interrupt
204 */
205int cp0_compare_irq;
206
207/*
208 * Performance counter IRQ or -1 if shared with timer
209 */
210int cp0_perfcount_irq;
211EXPORT_SYMBOL_GPL(cp0_perfcount_irq);
212
213/*
214 * Possibly handle a performance counter interrupt.
215 * Return true if the timer interrupt should not be checked
216 */
217static inline int handle_perf_irq (int r2)
218{
219 /*
220 * The performance counter overflow interrupt may be shared with the
221 * timer interrupt (cp0_perfcount_irq < 0). If it is and a
222 * performance counter has overflowed (perf_irq() == IRQ_HANDLED)
223 * and we can't reliably determine if a counter interrupt has also
224 * happened (!r2) then don't check for a timer interrupt.
225 */
226 return (cp0_perfcount_irq < 0) &&
227 perf_irq() == IRQ_HANDLED &&
228 !r2;
229}
230
202asmlinkage void ll_timer_interrupt(int irq) 231asmlinkage void ll_timer_interrupt(int irq)
203{ 232{
204 int r2 = cpu_has_mips_r2; 233 int r2 = cpu_has_mips_r2;
@@ -206,19 +235,13 @@ asmlinkage void ll_timer_interrupt(int irq)
206 irq_enter(); 235 irq_enter();
207 kstat_this_cpu.irqs[irq]++; 236 kstat_this_cpu.irqs[irq]++;
208 237
209 /* 238 if (handle_perf_irq(r2))
210 * Suckage alert: 239 goto out;
211 * Before R2 of the architecture there was no way to see if a
212 * performance counter interrupt was pending, so we have to run the
213 * performance counter interrupt handler anyway.
214 */
215 if (!r2 || (read_c0_cause() & (1 << 26)))
216 if (perf_irq())
217 goto out;
218 240
219 /* we keep interrupt disabled all the time */ 241 if (r2 && ((read_c0_cause() & (1 << 30)) == 0))
220 if (!r2 || (read_c0_cause() & (1 << 30))) 242 goto out;
221 timer_interrupt(irq, NULL); 243
244 timer_interrupt(irq, NULL);
222 245
223out: 246out:
224 irq_exit(); 247 irq_exit();
@@ -258,7 +281,7 @@ unsigned int mips_hpt_frequency;
258 281
259static struct irqaction timer_irqaction = { 282static struct irqaction timer_irqaction = {
260 .handler = timer_interrupt, 283 .handler = timer_interrupt,
261 .flags = IRQF_DISABLED, 284 .flags = IRQF_DISABLED | IRQF_PERCPU,
262 .name = "timer", 285 .name = "timer",
263}; 286};
264 287
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 200de027f354..ce277cb34dd0 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -11,6 +11,7 @@
11 * Copyright (C) 2000, 01 MIPS Technologies, Inc. 11 * Copyright (C) 2000, 01 MIPS Technologies, Inc.
12 * Copyright (C) 2002, 2003, 2004, 2005 Maciej W. Rozycki 12 * Copyright (C) 2002, 2003, 2004, 2005 Maciej W. Rozycki
13 */ 13 */
14#include <linux/bug.h>
14#include <linux/init.h> 15#include <linux/init.h>
15#include <linux/mm.h> 16#include <linux/mm.h>
16#include <linux/module.h> 17#include <linux/module.h>
@@ -38,7 +39,6 @@
38#include <asm/traps.h> 39#include <asm/traps.h>
39#include <asm/uaccess.h> 40#include <asm/uaccess.h>
40#include <asm/mmu_context.h> 41#include <asm/mmu_context.h>
41#include <asm/watch.h>
42#include <asm/types.h> 42#include <asm/types.h>
43#include <asm/stacktrace.h> 43#include <asm/stacktrace.h>
44 44
@@ -69,6 +69,7 @@ extern asmlinkage void handle_reserved(void);
69extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, 69extern int fpu_emulator_cop1Handler(struct pt_regs *xcp,
70 struct mips_fpu_struct *ctx, int has_fpu); 70 struct mips_fpu_struct *ctx, int has_fpu);
71 71
72void (*board_watchpoint_handler)(struct pt_regs *regs);
72void (*board_be_init)(void); 73void (*board_be_init)(void);
73int (*board_be_handler)(struct pt_regs *regs, int is_fixup); 74int (*board_be_handler)(struct pt_regs *regs, int is_fixup);
74void (*board_nmi_handler_setup)(void); 75void (*board_nmi_handler_setup)(void);
@@ -130,7 +131,7 @@ static void show_stacktrace(struct task_struct *task, struct pt_regs *regs)
130 const int field = 2 * sizeof(unsigned long); 131 const int field = 2 * sizeof(unsigned long);
131 long stackdata; 132 long stackdata;
132 int i; 133 int i;
133 unsigned long *sp = (unsigned long *)regs->regs[29]; 134 unsigned long __user *sp = (unsigned long __user *)regs->regs[29];
134 135
135 printk("Stack :"); 136 printk("Stack :");
136 i = 0; 137 i = 0;
@@ -186,7 +187,7 @@ void dump_stack(void)
186 187
187EXPORT_SYMBOL(dump_stack); 188EXPORT_SYMBOL(dump_stack);
188 189
189void show_code(unsigned int *pc) 190static void show_code(unsigned int __user *pc)
190{ 191{
191 long i; 192 long i;
192 193
@@ -304,13 +305,13 @@ void show_registers(struct pt_regs *regs)
304 printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n", 305 printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n",
305 current->comm, current->pid, current_thread_info(), current); 306 current->comm, current->pid, current_thread_info(), current);
306 show_stacktrace(current, regs); 307 show_stacktrace(current, regs);
307 show_code((unsigned int *) regs->cp0_epc); 308 show_code((unsigned int __user *) regs->cp0_epc);
308 printk("\n"); 309 printk("\n");
309} 310}
310 311
311static DEFINE_SPINLOCK(die_lock); 312static DEFINE_SPINLOCK(die_lock);
312 313
313NORET_TYPE void ATTRIB_NORET die(const char * str, struct pt_regs * regs) 314void __noreturn die(const char * str, struct pt_regs * regs)
314{ 315{
315 static int die_counter; 316 static int die_counter;
316#ifdef CONFIG_MIPS_MT_SMTC 317#ifdef CONFIG_MIPS_MT_SMTC
@@ -325,6 +326,7 @@ NORET_TYPE void ATTRIB_NORET die(const char * str, struct pt_regs * regs)
325#endif /* CONFIG_MIPS_MT_SMTC */ 326#endif /* CONFIG_MIPS_MT_SMTC */
326 printk("%s[#%d]:\n", str, ++die_counter); 327 printk("%s[#%d]:\n", str, ++die_counter);
327 show_registers(regs); 328 show_registers(regs);
329 add_taint(TAINT_DIE);
328 spin_unlock_irq(&die_lock); 330 spin_unlock_irq(&die_lock);
329 331
330 if (in_interrupt()) 332 if (in_interrupt())
@@ -372,7 +374,7 @@ asmlinkage void do_be(struct pt_regs *regs)
372 action = MIPS_BE_FIXUP; 374 action = MIPS_BE_FIXUP;
373 375
374 if (board_be_handler) 376 if (board_be_handler)
375 action = board_be_handler(regs, fixup != 0); 377 action = board_be_handler(regs, fixup != NULL);
376 378
377 switch (action) { 379 switch (action) {
378 case MIPS_BE_DISCARD: 380 case MIPS_BE_DISCARD:
@@ -752,6 +754,33 @@ asmlinkage void do_ri(struct pt_regs *regs)
752 force_sig(SIGILL, current); 754 force_sig(SIGILL, current);
753} 755}
754 756
757/*
758 * MIPS MT processors may have fewer FPU contexts than CPU threads. If we've
759 * emulated more than some threshold number of instructions, force migration to
760 * a "CPU" that has FP support.
761 */
762static void mt_ase_fp_affinity(void)
763{
764#ifdef CONFIG_MIPS_MT_FPAFF
765 if (mt_fpemul_threshold > 0 &&
766 ((current->thread.emulated_fp++ > mt_fpemul_threshold))) {
767 /*
768 * If there's no FPU present, or if the application has already
769 * restricted the allowed set to exclude any CPUs with FPUs,
770 * we'll skip the procedure.
771 */
772 if (cpus_intersects(current->cpus_allowed, mt_fpu_cpumask)) {
773 cpumask_t tmask;
774
775 cpus_and(tmask, current->thread.user_cpus_allowed,
776 mt_fpu_cpumask);
777 set_cpus_allowed(current, tmask);
778 current->thread.mflags |= MF_FPUBOUND;
779 }
780 }
781#endif /* CONFIG_MIPS_MT_FPAFF */
782}
783
755asmlinkage void do_cpu(struct pt_regs *regs) 784asmlinkage void do_cpu(struct pt_regs *regs)
756{ 785{
757 unsigned int cpid; 786 unsigned int cpid;
@@ -785,36 +814,8 @@ asmlinkage void do_cpu(struct pt_regs *regs)
785 &current->thread.fpu, 0); 814 &current->thread.fpu, 0);
786 if (sig) 815 if (sig)
787 force_sig(sig, current); 816 force_sig(sig, current);
788#ifdef CONFIG_MIPS_MT_FPAFF 817 else
789 else { 818 mt_ase_fp_affinity();
790 /*
791 * MIPS MT processors may have fewer FPU contexts
792 * than CPU threads. If we've emulated more than
793 * some threshold number of instructions, force
794 * migration to a "CPU" that has FP support.
795 */
796 if(mt_fpemul_threshold > 0
797 && ((current->thread.emulated_fp++
798 > mt_fpemul_threshold))) {
799 /*
800 * If there's no FPU present, or if the
801 * application has already restricted
802 * the allowed set to exclude any CPUs
803 * with FPUs, we'll skip the procedure.
804 */
805 if (cpus_intersects(current->cpus_allowed,
806 mt_fpu_cpumask)) {
807 cpumask_t tmask;
808
809 cpus_and(tmask,
810 current->thread.user_cpus_allowed,
811 mt_fpu_cpumask);
812 set_cpus_allowed(current, tmask);
813 current->thread.mflags |= MF_FPUBOUND;
814 }
815 }
816 }
817#endif /* CONFIG_MIPS_MT_FPAFF */
818 } 819 }
819 820
820 return; 821 return;
@@ -834,6 +835,11 @@ asmlinkage void do_mdmx(struct pt_regs *regs)
834 835
835asmlinkage void do_watch(struct pt_regs *regs) 836asmlinkage void do_watch(struct pt_regs *regs)
836{ 837{
838 if (board_watchpoint_handler) {
839 (*board_watchpoint_handler)(regs);
840 return;
841 }
842
837 /* 843 /*
838 * We use the watch exception where available to detect stack 844 * We use the watch exception where available to detect stack
839 * overflows. 845 * overflows.
@@ -860,7 +866,7 @@ asmlinkage void do_mcheck(struct pt_regs *regs)
860 dump_tlb_all(); 866 dump_tlb_all();
861 } 867 }
862 868
863 show_code((unsigned int *) regs->cp0_epc); 869 show_code((unsigned int __user *) regs->cp0_epc);
864 870
865 /* 871 /*
866 * Some chips may have other causes of machine check (e.g. SB1 872 * Some chips may have other causes of machine check (e.g. SB1
@@ -927,12 +933,6 @@ asmlinkage void do_reserved(struct pt_regs *regs)
927 (regs->cp0_cause & 0x7f) >> 2); 933 (regs->cp0_cause & 0x7f) >> 2);
928} 934}
929 935
930static asmlinkage void do_default_vi(void)
931{
932 show_regs(get_irq_regs());
933 panic("Caught unexpected vectored interrupt.");
934}
935
936/* 936/*
937 * Some MIPS CPUs can enable/disable for cache parity detection, but do 937 * Some MIPS CPUs can enable/disable for cache parity detection, but do
938 * it different ways. 938 * it different ways.
@@ -1128,6 +1128,12 @@ void mips_srs_free(int set)
1128 clear_bit(set, &sr->sr_allocated); 1128 clear_bit(set, &sr->sr_allocated);
1129} 1129}
1130 1130
1131static asmlinkage void do_default_vi(void)
1132{
1133 show_regs(get_irq_regs());
1134 panic("Caught unexpected vectored interrupt.");
1135}
1136
1131static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs) 1137static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs)
1132{ 1138{
1133 unsigned long handler; 1139 unsigned long handler;
@@ -1190,8 +1196,8 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs)
1190 1196
1191 memcpy (b, &except_vec_vi, handler_len); 1197 memcpy (b, &except_vec_vi, handler_len);
1192#ifdef CONFIG_MIPS_MT_SMTC 1198#ifdef CONFIG_MIPS_MT_SMTC
1193 if (n > 7) 1199 BUG_ON(n > 7); /* Vector index %d exceeds SMTC maximum. */
1194 printk("Vector index %d exceeds SMTC maximum\n", n); 1200
1195 w = (u32 *)(b + mori_offset); 1201 w = (u32 *)(b + mori_offset);
1196 *w = (*w & 0xffff0000) | (0x100 << n); 1202 *w = (*w & 0xffff0000) | (0x100 << n);
1197#endif /* CONFIG_MIPS_MT_SMTC */ 1203#endif /* CONFIG_MIPS_MT_SMTC */
@@ -1342,16 +1348,20 @@ void __init per_cpu_trap_init(void)
1342 set_c0_status(ST0_MX); 1348 set_c0_status(ST0_MX);
1343 1349
1344#ifdef CONFIG_CPU_MIPSR2 1350#ifdef CONFIG_CPU_MIPSR2
1345 write_c0_hwrena (0x0000000f); /* Allow rdhwr to all registers */ 1351 if (cpu_has_mips_r2) {
1352 unsigned int enable = 0x0000000f;
1353
1354 if (cpu_has_userlocal)
1355 enable |= (1 << 29);
1356
1357 write_c0_hwrena(enable);
1358 }
1346#endif 1359#endif
1347 1360
1348#ifdef CONFIG_MIPS_MT_SMTC 1361#ifdef CONFIG_MIPS_MT_SMTC
1349 if (!secondaryTC) { 1362 if (!secondaryTC) {
1350#endif /* CONFIG_MIPS_MT_SMTC */ 1363#endif /* CONFIG_MIPS_MT_SMTC */
1351 1364
1352 /*
1353 * Interrupt handling.
1354 */
1355 if (cpu_has_veic || cpu_has_vint) { 1365 if (cpu_has_veic || cpu_has_vint) {
1356 write_c0_ebase (ebase); 1366 write_c0_ebase (ebase);
1357 /* Setting vector spacing enables EI/VI mode */ 1367 /* Setting vector spacing enables EI/VI mode */
@@ -1365,6 +1375,23 @@ void __init per_cpu_trap_init(void)
1365 } else 1375 } else
1366 set_c0_cause(CAUSEF_IV); 1376 set_c0_cause(CAUSEF_IV);
1367 } 1377 }
1378
1379 /*
1380 * Before R2 both interrupt numbers were fixed to 7, so on R2 only:
1381 *
1382 * o read IntCtl.IPTI to determine the timer interrupt
1383 * o read IntCtl.IPPCI to determine the performance counter interrupt
1384 */
1385 if (cpu_has_mips_r2) {
1386 cp0_compare_irq = (read_c0_intctl () >> 29) & 7;
1387 cp0_perfcount_irq = (read_c0_intctl () >> 26) & 7;
1388 if (cp0_perfcount_irq == cp0_compare_irq)
1389 cp0_perfcount_irq = -1;
1390 } else {
1391 cp0_compare_irq = CP0_LEGACY_COMPARE_IRQ;
1392 cp0_perfcount_irq = -1;
1393 }
1394
1368#ifdef CONFIG_MIPS_MT_SMTC 1395#ifdef CONFIG_MIPS_MT_SMTC
1369 } 1396 }
1370#endif /* CONFIG_MIPS_MT_SMTC */ 1397#endif /* CONFIG_MIPS_MT_SMTC */
@@ -1383,6 +1410,13 @@ void __init per_cpu_trap_init(void)
1383 cpu_cache_init(); 1410 cpu_cache_init();
1384 tlb_init(); 1411 tlb_init();
1385#ifdef CONFIG_MIPS_MT_SMTC 1412#ifdef CONFIG_MIPS_MT_SMTC
1413 } else if (!secondaryTC) {
1414 /*
1415 * First TC in non-boot VPE must do subset of tlb_init()
1416 * for MMU countrol registers.
1417 */
1418 write_c0_pagemask(PM_DEFAULT_MASK);
1419 write_c0_wired(0);
1386 } 1420 }
1387#endif /* CONFIG_MIPS_MT_SMTC */ 1421#endif /* CONFIG_MIPS_MT_SMTC */
1388} 1422}
@@ -1531,8 +1565,7 @@ void __init trap_init(void)
1531 if (cpu_has_mipsmt) 1565 if (cpu_has_mipsmt)
1532 set_except_vector(25, handle_mt); 1566 set_except_vector(25, handle_mt);
1533 1567
1534 if (cpu_has_dsp) 1568 set_except_vector(26, handle_dsp);
1535 set_except_vector(26, handle_dsp);
1536 1569
1537 if (cpu_has_vce) 1570 if (cpu_has_vce)
1538 /* Special exception: R4[04]00 uses also the divec space. */ 1571 /* Special exception: R4[04]00 uses also the divec space. */
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c
index 18c4a3c45a31..8b9c34ffae18 100644
--- a/arch/mips/kernel/unaligned.c
+++ b/arch/mips/kernel/unaligned.c
@@ -77,6 +77,7 @@
77#include <linux/signal.h> 77#include <linux/signal.h>
78#include <linux/smp.h> 78#include <linux/smp.h>
79#include <linux/sched.h> 79#include <linux/sched.h>
80#include <linux/debugfs.h>
80#include <asm/asm.h> 81#include <asm/asm.h>
81#include <asm/branch.h> 82#include <asm/branch.h>
82#include <asm/byteorder.h> 83#include <asm/byteorder.h>
@@ -87,9 +88,18 @@
87#define STR(x) __STR(x) 88#define STR(x) __STR(x)
88#define __STR(x) #x 89#define __STR(x) #x
89 90
90#ifdef CONFIG_PROC_FS 91enum {
91unsigned long unaligned_instructions; 92 UNALIGNED_ACTION_QUIET,
93 UNALIGNED_ACTION_SIGNAL,
94 UNALIGNED_ACTION_SHOW,
95};
96#ifdef CONFIG_DEBUG_FS
97static u32 unaligned_instructions;
98static u32 unaligned_action;
99#else
100#define unaligned_action UNALIGNED_ACTION_QUIET
92#endif 101#endif
102extern void show_registers(struct pt_regs *regs);
93 103
94static inline int emulate_load_store_insn(struct pt_regs *regs, 104static inline int emulate_load_store_insn(struct pt_regs *regs,
95 void __user *addr, unsigned int __user *pc, 105 void __user *addr, unsigned int __user *pc,
@@ -459,7 +469,7 @@ static inline int emulate_load_store_insn(struct pt_regs *regs,
459 goto sigill; 469 goto sigill;
460 } 470 }
461 471
462#ifdef CONFIG_PROC_FS 472#ifdef CONFIG_DEBUG_FS
463 unaligned_instructions++; 473 unaligned_instructions++;
464#endif 474#endif
465 475
@@ -516,6 +526,10 @@ asmlinkage void do_ade(struct pt_regs *regs)
516 pc = (unsigned int __user *) exception_epc(regs); 526 pc = (unsigned int __user *) exception_epc(regs);
517 if (user_mode(regs) && (current->thread.mflags & MF_FIXADE) == 0) 527 if (user_mode(regs) && (current->thread.mflags & MF_FIXADE) == 0)
518 goto sigbus; 528 goto sigbus;
529 if (unaligned_action == UNALIGNED_ACTION_SIGNAL)
530 goto sigbus;
531 else if (unaligned_action == UNALIGNED_ACTION_SHOW)
532 show_registers(regs);
519 533
520 /* 534 /*
521 * Do branch emulation only if we didn't forward the exception. 535 * Do branch emulation only if we didn't forward the exception.
@@ -546,3 +560,24 @@ sigbus:
546 * XXX On return from the signal handler we should advance the epc 560 * XXX On return from the signal handler we should advance the epc
547 */ 561 */
548} 562}
563
564#ifdef CONFIG_DEBUG_FS
565extern struct dentry *mips_debugfs_dir;
566static int __init debugfs_unaligned(void)
567{
568 struct dentry *d;
569
570 if (!mips_debugfs_dir)
571 return -ENODEV;
572 d = debugfs_create_u32("unaligned_instructions", S_IRUGO,
573 mips_debugfs_dir, &unaligned_instructions);
574 if (IS_ERR(d))
575 return PTR_ERR(d);
576 d = debugfs_create_u32("unaligned_action", S_IRUGO | S_IWUSR,
577 mips_debugfs_dir, &unaligned_action);
578 if (IS_ERR(d))
579 return PTR_ERR(d);
580 return 0;
581}
582__initcall(debugfs_unaligned);
583#endif
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 9b9992cd562a..bc9bae2a73f4 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -119,10 +119,7 @@ SECTIONS
119 .init.ramfs : { *(.init.ramfs) } 119 .init.ramfs : { *(.init.ramfs) }
120 __initramfs_end = .; 120 __initramfs_end = .;
121#endif 121#endif
122 . = ALIGN(_PAGE_SIZE); 122 PERCPU(_PAGE_SIZE)
123 __per_cpu_start = .;
124 .data.percpu : { *(.data.percpu) }
125 __per_cpu_end = .;
126 . = ALIGN(_PAGE_SIZE); 123 . = ALIGN(_PAGE_SIZE);
127 __init_end = .; 124 __init_end = .;
128 /* freed after init ends here */ 125 /* freed after init ends here */
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index c9ee9d2d5856..9e66354dee8b 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -1436,10 +1436,6 @@ static int __init vpe_module_init(void)
1436 write_vpe_c0_vpecontrol(read_vpe_c0_vpecontrol() & ~VPECONTROL_TE); 1436 write_vpe_c0_vpecontrol(read_vpe_c0_vpecontrol() & ~VPECONTROL_TE);
1437 1437
1438 if (i != 0) { 1438 if (i != 0) {
1439 write_vpe_c0_status((read_c0_status() &
1440 ~(ST0_IM | ST0_IE | ST0_KSU))
1441 | ST0_CU0);
1442
1443 /* 1439 /*
1444 * Set config to be the same as vpe0, 1440 * Set config to be the same as vpe0,
1445 * particularly kseg0 coherency alg 1441 * particularly kseg0 coherency alg
diff --git a/arch/mips/lasat/Kconfig b/arch/mips/lasat/Kconfig
deleted file mode 100644
index 1d2ee8a9be13..000000000000
--- a/arch/mips/lasat/Kconfig
+++ /dev/null
@@ -1,15 +0,0 @@
1config PICVUE
2 tristate "PICVUE LCD display driver"
3 depends on LASAT
4
5config PICVUE_PROC
6 tristate "PICVUE LCD display driver /proc interface"
7 depends on PICVUE
8
9config DS1603
10 bool "DS1603 RTC driver"
11 depends on LASAT
12
13config LASAT_SYSCTL
14 bool "LASAT sysctl interface"
15 depends on LASAT
diff --git a/arch/mips/lasat/Makefile b/arch/mips/lasat/Makefile
deleted file mode 100644
index 99f5046fdf49..000000000000
--- a/arch/mips/lasat/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
1#
2# Makefile for the LASAT specific kernel interface routines under Linux.
3#
4
5obj-y += reset.o setup.o prom.o lasat_board.o \
6 at93c.o interrupt.o
7
8obj-$(CONFIG_LASAT_SYSCTL) += sysctl.o
9obj-$(CONFIG_DS1603) += ds1603.o
10obj-$(CONFIG_PICVUE) += picvue.o
11obj-$(CONFIG_PICVUE_PROC) += picvue_proc.o
12
13clean:
14 make -C image clean
diff --git a/arch/mips/lasat/at93c.c b/arch/mips/lasat/at93c.c
deleted file mode 100644
index ca26e554615e..000000000000
--- a/arch/mips/lasat/at93c.c
+++ /dev/null
@@ -1,148 +0,0 @@
1/*
2 * Atmel AT93C46 serial eeprom driver
3 *
4 * Brian Murphy <brian.murphy@eicon.com>
5 *
6 */
7#include <linux/kernel.h>
8#include <linux/delay.h>
9#include <asm/lasat/lasat.h>
10#include <linux/module.h>
11#include <linux/init.h>
12
13#include "at93c.h"
14
15#define AT93C_ADDR_SHIFT 7
16#define AT93C_ADDR_MAX ((1 << AT93C_ADDR_SHIFT) - 1)
17#define AT93C_RCMD (0x6 << AT93C_ADDR_SHIFT)
18#define AT93C_WCMD (0x5 << AT93C_ADDR_SHIFT)
19#define AT93C_WENCMD 0x260
20#define AT93C_WDSCMD 0x200
21
22struct at93c_defs *at93c;
23
24static void at93c_reg_write(u32 val)
25{
26 *at93c->reg = val;
27}
28
29static u32 at93c_reg_read(void)
30{
31 u32 tmp = *at93c->reg;
32 return tmp;
33}
34
35static u32 at93c_datareg_read(void)
36{
37 u32 tmp = *at93c->rdata_reg;
38 return tmp;
39}
40
41static void at93c_cycle_clk(u32 data)
42{
43 at93c_reg_write(data | at93c->clk);
44 lasat_ndelay(250);
45 at93c_reg_write(data & ~at93c->clk);
46 lasat_ndelay(250);
47}
48
49static void at93c_write_databit(u8 bit)
50{
51 u32 data = at93c_reg_read();
52 if (bit)
53 data |= 1 << at93c->wdata_shift;
54 else
55 data &= ~(1 << at93c->wdata_shift);
56
57 at93c_reg_write(data);
58 lasat_ndelay(100);
59 at93c_cycle_clk(data);
60}
61
62static unsigned int at93c_read_databit(void)
63{
64 u32 data;
65
66 at93c_cycle_clk(at93c_reg_read());
67 data = (at93c_datareg_read() >> at93c->rdata_shift) & 1;
68 return data;
69}
70
71static u8 at93c_read_byte(void)
72{
73 int i;
74 u8 data = 0;
75
76 for (i = 0; i<=7; i++) {
77 data <<= 1;
78 data |= at93c_read_databit();
79 }
80 return data;
81}
82
83static void at93c_write_bits(u32 data, int size)
84{
85 int i;
86 int shift = size - 1;
87 u32 mask = (1 << shift);
88
89 for (i = 0; i < size; i++) {
90 at93c_write_databit((data & mask) >> shift);
91 data <<= 1;
92 }
93}
94
95static void at93c_init_op(void)
96{
97 at93c_reg_write((at93c_reg_read() | at93c->cs) & ~at93c->clk & ~(1 << at93c->rdata_shift));
98 lasat_ndelay(50);
99}
100
101static void at93c_end_op(void)
102{
103 at93c_reg_write(at93c_reg_read() & ~at93c->cs);
104 lasat_ndelay(250);
105}
106
107static void at93c_wait(void)
108{
109 at93c_init_op();
110 while (!at93c_read_databit())
111 ;
112 at93c_end_op();
113};
114
115static void at93c_disable_wp(void)
116{
117 at93c_init_op();
118 at93c_write_bits(AT93C_WENCMD, 10);
119 at93c_end_op();
120}
121
122static void at93c_enable_wp(void)
123{
124 at93c_init_op();
125 at93c_write_bits(AT93C_WDSCMD, 10);
126 at93c_end_op();
127}
128
129u8 at93c_read(u8 addr)
130{
131 u8 byte;
132 at93c_init_op();
133 at93c_write_bits((addr & AT93C_ADDR_MAX)|AT93C_RCMD, 10);
134 byte = at93c_read_byte();
135 at93c_end_op();
136 return byte;
137}
138
139void at93c_write(u8 addr, u8 data)
140{
141 at93c_disable_wp();
142 at93c_init_op();
143 at93c_write_bits((addr & AT93C_ADDR_MAX)|AT93C_WCMD, 10);
144 at93c_write_bits(data, 8);
145 at93c_end_op();
146 at93c_wait();
147 at93c_enable_wp();
148}
diff --git a/arch/mips/lasat/at93c.h b/arch/mips/lasat/at93c.h
deleted file mode 100644
index cfe2f99b1d44..000000000000
--- a/arch/mips/lasat/at93c.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * Atmel AT93C46 serial eeprom driver
3 *
4 * Brian Murphy <brian.murphy@eicon.com>
5 *
6 */
7
8extern struct at93c_defs {
9 volatile u32 *reg;
10 volatile u32 *rdata_reg;
11 int rdata_shift;
12 int wdata_shift;
13 u32 cs;
14 u32 clk;
15} *at93c;
16
17u8 at93c_read(u8 addr);
18void at93c_write(u8 addr, u8 data);
diff --git a/arch/mips/lasat/ds1603.c b/arch/mips/lasat/ds1603.c
deleted file mode 100644
index 7dced67c55eb..000000000000
--- a/arch/mips/lasat/ds1603.c
+++ /dev/null
@@ -1,183 +0,0 @@
1/*
2 * Dallas Semiconductors 1603 RTC driver
3 *
4 * Brian Murphy <brian@murphy.dk>
5 *
6 */
7#include <linux/kernel.h>
8#include <asm/lasat/lasat.h>
9#include <linux/delay.h>
10#include <asm/lasat/ds1603.h>
11#include <asm/time.h>
12
13#include "ds1603.h"
14
15#define READ_TIME_CMD 0x81
16#define SET_TIME_CMD 0x80
17#define TRIMMER_SET_CMD 0xC0
18#define TRIMMER_VALUE_MASK 0x38
19#define TRIMMER_SHIFT 3
20
21struct ds_defs *ds1603 = NULL;
22
23/* HW specific register functions */
24static void rtc_reg_write(unsigned long val)
25{
26 *ds1603->reg = val;
27}
28
29static unsigned long rtc_reg_read(void)
30{
31 unsigned long tmp = *ds1603->reg;
32 return tmp;
33}
34
35static unsigned long rtc_datareg_read(void)
36{
37 unsigned long tmp = *ds1603->data_reg;
38 return tmp;
39}
40
41static void rtc_nrst_high(void)
42{
43 rtc_reg_write(rtc_reg_read() | ds1603->rst);
44}
45
46static void rtc_nrst_low(void)
47{
48 rtc_reg_write(rtc_reg_read() & ~ds1603->rst);
49}
50
51static void rtc_cycle_clock(unsigned long data)
52{
53 data |= ds1603->clk;
54 rtc_reg_write(data);
55 lasat_ndelay(250);
56 if (ds1603->data_reversed)
57 data &= ~ds1603->data;
58 else
59 data |= ds1603->data;
60 data &= ~ds1603->clk;
61 rtc_reg_write(data);
62 lasat_ndelay(250 + ds1603->huge_delay);
63}
64
65static void rtc_write_databit(unsigned int bit)
66{
67 unsigned long data = rtc_reg_read();
68 if (ds1603->data_reversed)
69 bit = !bit;
70 if (bit)
71 data |= ds1603->data;
72 else
73 data &= ~ds1603->data;
74
75 rtc_reg_write(data);
76 lasat_ndelay(50 + ds1603->huge_delay);
77 rtc_cycle_clock(data);
78}
79
80static unsigned int rtc_read_databit(void)
81{
82 unsigned int data;
83
84 data = (rtc_datareg_read() & (1 << ds1603->data_read_shift))
85 >> ds1603->data_read_shift;
86 rtc_cycle_clock(rtc_reg_read());
87 return data;
88}
89
90static void rtc_write_byte(unsigned int byte)
91{
92 int i;
93
94 for (i = 0; i<=7; i++) {
95 rtc_write_databit(byte & 1L);
96 byte >>= 1;
97 }
98}
99
100static void rtc_write_word(unsigned long word)
101{
102 int i;
103
104 for (i = 0; i<=31; i++) {
105 rtc_write_databit(word & 1L);
106 word >>= 1;
107 }
108}
109
110static unsigned long rtc_read_word(void)
111{
112 int i;
113 unsigned long word = 0;
114 unsigned long shift = 0;
115
116 for (i = 0; i<=31; i++) {
117 word |= rtc_read_databit() << shift;
118 shift++;
119 }
120 return word;
121}
122
123static void rtc_init_op(void)
124{
125 rtc_nrst_high();
126
127 rtc_reg_write(rtc_reg_read() & ~ds1603->clk);
128
129 lasat_ndelay(50);
130}
131
132static void rtc_end_op(void)
133{
134 rtc_nrst_low();
135 lasat_ndelay(1000);
136}
137
138/* interface */
139unsigned long ds1603_read(void)
140{
141 unsigned long word;
142 unsigned long flags;
143
144 spin_lock_irqsave(&rtc_lock, flags);
145 rtc_init_op();
146 rtc_write_byte(READ_TIME_CMD);
147 word = rtc_read_word();
148 rtc_end_op();
149 spin_unlock_irqrestore(&rtc_lock, flags);
150 return word;
151}
152
153int ds1603_set(unsigned long time)
154{
155 unsigned long flags;
156
157 spin_lock_irqsave(&rtc_lock, flags);
158 rtc_init_op();
159 rtc_write_byte(SET_TIME_CMD);
160 rtc_write_word(time);
161 rtc_end_op();
162 spin_unlock_irqrestore(&rtc_lock, flags);
163
164 return 0;
165}
166
167void ds1603_set_trimmer(unsigned int trimval)
168{
169 rtc_init_op();
170 rtc_write_byte(((trimval << TRIMMER_SHIFT) & TRIMMER_VALUE_MASK)
171 | (TRIMMER_SET_CMD));
172 rtc_end_op();
173}
174
175void ds1603_disable(void)
176{
177 ds1603_set_trimmer(TRIMMER_DISABLE_RTC);
178}
179
180void ds1603_enable(void)
181{
182 ds1603_set_trimmer(TRIMMER_DEFAULT);
183}
diff --git a/arch/mips/lasat/ds1603.h b/arch/mips/lasat/ds1603.h
deleted file mode 100644
index c2e5c76a379d..000000000000
--- a/arch/mips/lasat/ds1603.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * Dallas Semiconductors 1603 RTC driver
3 *
4 * Brian Murphy <brian@murphy.dk>
5 *
6 */
7#ifndef __DS1603_H
8#define __DS1603_H
9
10struct ds_defs {
11 volatile u32 *reg;
12 volatile u32 *data_reg;
13 u32 rst;
14 u32 clk;
15 u32 data;
16 u32 data_read_shift;
17 char data_reversed;
18 u32 huge_delay;
19};
20
21extern struct ds_defs *ds1603;
22
23unsigned long ds1603_read(void);
24int ds1603_set(unsigned long);
25void ds1603_set_trimmer(unsigned int);
26void ds1603_enable(void);
27void ds1603_disable(void);
28void ds1603_init(struct ds_defs *);
29
30#define TRIMMER_DEFAULT 3
31#define TRIMMER_DISABLE_RTC 0
32
33#endif
diff --git a/arch/mips/lasat/image/Makefile b/arch/mips/lasat/image/Makefile
deleted file mode 100644
index 35ecd6483ef6..000000000000
--- a/arch/mips/lasat/image/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
1#
2# MAKEFILE FOR THE MIPS LINUX BOOTLOADER AND ROM DEBUGGER
3#
4# i-data Networks
5#
6# Author: Thomas Horsten <thh@i-data.com>
7#
8
9ifndef Version
10 Version = "$(USER)-test"
11endif
12
13MKLASATIMG = mklasatimg
14MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200
15KERNEL_IMAGE = $(TOPDIR)/vmlinux
16KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ )
17KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ )
18
19LDSCRIPT= -L$(obj) -Tromscript.normal
20
21HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \
22 -D_kernel_entry=0x$(KERNEL_ENTRY) \
23 -D VERSION="\"$(Version)\"" \
24 -D TIMESTAMP=$(shell date +%s)
25
26$(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE)
27 $(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $<
28
29OBJECTS = head.o kImage.o
30
31rom.sw: $(obj)/rom.sw
32
33$(obj)/rom.sw: $(obj)/rom.bin
34 $(MKLASATIMG) -o $@ -k $^ -m $(MKLASATIMG_ARCH)
35
36$(obj)/rom.bin: $(obj)/rom
37 $(OBJCOPY) -O binary -S $^ $@
38
39# Rule to make the bootloader
40$(obj)/rom: $(addprefix $(obj)/,$(OBJECTS))
41 $(LD) $(LDFLAGS) $(LDSCRIPT) -o $@ $^
42
43$(obj)/%.o: $(obj)/%.gz
44 $(LD) -r -o $@ -b binary $<
45
46$(obj)/%.gz: $(obj)/%.bin
47 gzip -cf -9 $< > $@
48
49$(obj)/kImage.bin: $(KERNEL_IMAGE)
50 $(OBJCOPY) -O binary -S $^ $@
51
52clean:
53 rm -f rom rom.bin rom.sw kImage.bin kImage.o
diff --git a/arch/mips/lasat/image/head.S b/arch/mips/lasat/image/head.S
deleted file mode 100644
index efb95f2609c2..000000000000
--- a/arch/mips/lasat/image/head.S
+++ /dev/null
@@ -1,31 +0,0 @@
1#include <asm/lasat/head.h>
2
3 .text
4 .section .text.start, "ax"
5 .set noreorder
6 .set mips3
7
8 /* Magic words identifying a software image */
9 .word LASAT_K_MAGIC0_VAL
10 .word LASAT_K_MAGIC1_VAL
11
12 /* Image header version */
13 .word 0x00000002
14
15 /* image start and size */
16 .word _image_start
17 .word _image_size
18
19 /* start of kernel and entrypoint in uncompressed image */
20 .word _kernel_start
21 .word _kernel_entry
22
23 /* Here we have room for future flags */
24
25 .org 0x40
26reldate:
27 .word TIMESTAMP
28
29 .org 0x50
30release:
31 .string VERSION
diff --git a/arch/mips/lasat/image/romscript.normal b/arch/mips/lasat/image/romscript.normal
deleted file mode 100644
index 988f8ad189cb..000000000000
--- a/arch/mips/lasat/image/romscript.normal
+++ /dev/null
@@ -1,23 +0,0 @@
1OUTPUT_ARCH(mips)
2
3SECTIONS
4{
5 .text :
6 {
7 *(.text.start)
8 }
9
10 /* Data in ROM */
11
12 .data ALIGN(0x10) :
13 {
14 *(.data)
15 }
16 _image_start = ADDR(.data);
17 _image_size = SIZEOF(.data);
18
19 .other :
20 {
21 *(.*)
22 }
23}
diff --git a/arch/mips/lasat/interrupt.c b/arch/mips/lasat/interrupt.c
deleted file mode 100644
index 9a622b9a1051..000000000000
--- a/arch/mips/lasat/interrupt.c
+++ /dev/null
@@ -1,130 +0,0 @@
1/*
2 * Carsten Langgaard, carstenl@mips.com
3 * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
4 *
5 * This program is free software; you can distribute it and/or modify it
6 * under the terms of the GNU General Public License (Version 2) as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
17 *
18 * Routines for generic manipulation of the interrupts found on the
19 * Lasat boards.
20 */
21#include <linux/init.h>
22#include <linux/sched.h>
23#include <linux/slab.h>
24#include <linux/interrupt.h>
25#include <linux/kernel_stat.h>
26
27#include <asm/bootinfo.h>
28#include <asm/irq.h>
29#include <asm/lasat/lasatint.h>
30#include <asm/time.h>
31#include <asm/gdb-stub.h>
32
33static volatile int *lasat_int_status = NULL;
34static volatile int *lasat_int_mask = NULL;
35static volatile int lasat_int_mask_shift;
36
37void disable_lasat_irq(unsigned int irq_nr)
38{
39 *lasat_int_mask &= ~(1 << irq_nr) << lasat_int_mask_shift;
40}
41
42void enable_lasat_irq(unsigned int irq_nr)
43{
44 *lasat_int_mask |= (1 << irq_nr) << lasat_int_mask_shift;
45}
46
47static struct irq_chip lasat_irq_type = {
48 .name = "Lasat",
49 .ack = disable_lasat_irq,
50 .mask = disable_lasat_irq,
51 .mask_ack = disable_lasat_irq,
52 .unmask = enable_lasat_irq,
53};
54
55static inline int ls1bit32(unsigned int x)
56{
57 int b = 31, s;
58
59 s = 16; if (x << 16 == 0) s = 0; b -= s; x <<= s;
60 s = 8; if (x << 8 == 0) s = 0; b -= s; x <<= s;
61 s = 4; if (x << 4 == 0) s = 0; b -= s; x <<= s;
62 s = 2; if (x << 2 == 0) s = 0; b -= s; x <<= s;
63 s = 1; if (x << 1 == 0) s = 0; b -= s;
64
65 return b;
66}
67
68static unsigned long (* get_int_status)(void);
69
70static unsigned long get_int_status_100(void)
71{
72 return *lasat_int_status & *lasat_int_mask;
73}
74
75static unsigned long get_int_status_200(void)
76{
77 unsigned long int_status;
78
79 int_status = *lasat_int_status;
80 int_status &= (int_status >> LASATINT_MASK_SHIFT_200) & 0xffff;
81 return int_status;
82}
83
84asmlinkage void plat_irq_dispatch(void)
85{
86 unsigned long int_status;
87 unsigned int cause = read_c0_cause();
88 int irq;
89
90 if (cause & CAUSEF_IP7) { /* R4000 count / compare IRQ */
91 ll_timer_interrupt(7);
92 return;
93 }
94
95 int_status = get_int_status();
96
97 /* if int_status == 0, then the interrupt has already been cleared */
98 if (int_status) {
99 irq = ls1bit32(int_status);
100
101 do_IRQ(irq);
102 }
103}
104
105void __init arch_init_irq(void)
106{
107 int i;
108
109 switch (mips_machtype) {
110 case MACH_LASAT_100:
111 lasat_int_status = (void *)LASAT_INT_STATUS_REG_100;
112 lasat_int_mask = (void *)LASAT_INT_MASK_REG_100;
113 lasat_int_mask_shift = LASATINT_MASK_SHIFT_100;
114 get_int_status = get_int_status_100;
115 *lasat_int_mask = 0;
116 break;
117 case MACH_LASAT_200:
118 lasat_int_status = (void *)LASAT_INT_STATUS_REG_200;
119 lasat_int_mask = (void *)LASAT_INT_MASK_REG_200;
120 lasat_int_mask_shift = LASATINT_MASK_SHIFT_200;
121 get_int_status = get_int_status_200;
122 *lasat_int_mask &= 0xffff;
123 break;
124 default:
125 panic("arch_init_irq: mips_machtype incorrect");
126 }
127
128 for (i = 0; i <= LASATINT_END; i++)
129 set_irq_chip_and_handler(i, &lasat_irq_type, handle_level_irq);
130}
diff --git a/arch/mips/lasat/lasat_board.c b/arch/mips/lasat/lasat_board.c
deleted file mode 100644
index fbe9a87bd0ad..000000000000
--- a/arch/mips/lasat/lasat_board.c
+++ /dev/null
@@ -1,279 +0,0 @@
1/*
2 * Thomas Horsten <thh@lasat.com>
3 * Copyright (C) 2000 LASAT Networks A/S.
4 *
5 * This program is free software; you can distribute it and/or modify it
6 * under the terms of the GNU General Public License (Version 2) as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
17 *
18 * Routines specific to the LASAT boards
19 */
20#include <linux/types.h>
21#include <linux/crc32.h>
22#include <asm/lasat/lasat.h>
23#include <linux/kernel.h>
24#include <linux/string.h>
25#include <linux/ctype.h>
26#include <asm/bootinfo.h>
27#include <asm/addrspace.h>
28#include "at93c.h"
29/* New model description table */
30#include "lasat_models.h"
31
32#define EEPROM_CRC(data, len) (~0 ^ crc32(~0, data, len))
33
34struct lasat_info lasat_board_info;
35
36void update_bcastaddr(void);
37
38int EEPROMRead(unsigned int pos, unsigned char *data, int len)
39{
40 int i;
41
42 for (i=0; i<len; i++)
43 *data++ = at93c_read(pos++);
44
45 return 0;
46}
47int EEPROMWrite(unsigned int pos, unsigned char *data, int len)
48{
49 int i;
50
51 for (i=0; i<len; i++)
52 at93c_write(pos++, *data++);
53
54 return 0;
55}
56
57static void init_flash_sizes(void)
58{
59 int i;
60 unsigned long *lb = lasat_board_info.li_flashpart_base;
61 unsigned long *ls = lasat_board_info.li_flashpart_size;
62
63 ls[LASAT_MTD_BOOTLOADER] = 0x40000;
64 ls[LASAT_MTD_SERVICE] = 0xC0000;
65 ls[LASAT_MTD_NORMAL] = 0x100000;
66
67 if (mips_machtype == MACH_LASAT_100) {
68 lasat_board_info.li_flash_base = 0x1e000000;
69
70 lb[LASAT_MTD_BOOTLOADER] = 0x1e400000;
71
72 if (lasat_board_info.li_flash_size > 0x200000) {
73 ls[LASAT_MTD_CONFIG] = 0x100000;
74 ls[LASAT_MTD_FS] = 0x500000;
75 }
76 } else {
77 lasat_board_info.li_flash_base = 0x10000000;
78
79 if (lasat_board_info.li_flash_size < 0x1000000) {
80 lb[LASAT_MTD_BOOTLOADER] = 0x10000000;
81 ls[LASAT_MTD_CONFIG] = 0x100000;
82 if (lasat_board_info.li_flash_size >= 0x400000) {
83 ls[LASAT_MTD_FS] = lasat_board_info.li_flash_size - 0x300000;
84 }
85 }
86 }
87
88 for (i = 1; i < LASAT_MTD_LAST; i++)
89 lb[i] = lb[i-1] + ls[i-1];
90}
91
92int lasat_init_board_info(void)
93{
94 int c;
95 unsigned long crc;
96 unsigned long cfg0, cfg1;
97 const product_info_t *ppi;
98 int i_n_base_models = N_BASE_MODELS;
99 const char * const * i_txt_base_models = txt_base_models;
100 int i_n_prids = N_PRIDS;
101
102 memset(&lasat_board_info, 0, sizeof(lasat_board_info));
103
104 /* First read the EEPROM info */
105 EEPROMRead(0, (unsigned char *)&lasat_board_info.li_eeprom_info,
106 sizeof(struct lasat_eeprom_struct));
107
108 /* Check the CRC */
109 crc = EEPROM_CRC((unsigned char *)(&lasat_board_info.li_eeprom_info),
110 sizeof(struct lasat_eeprom_struct) - 4);
111
112 if (crc != lasat_board_info.li_eeprom_info.crc32) {
113 printk(KERN_WARNING "WARNING...\nWARNING...\nEEPROM CRC does "
114 "not match calculated, attempting to soldier on...\n");
115 }
116
117 if (lasat_board_info.li_eeprom_info.version != LASAT_EEPROM_VERSION) {
118 printk(KERN_WARNING "WARNING...\nWARNING...\nEEPROM version "
119 "%d, wanted version %d, attempting to soldier on...\n",
120 (unsigned int)lasat_board_info.li_eeprom_info.version,
121 LASAT_EEPROM_VERSION);
122 }
123
124 cfg0 = lasat_board_info.li_eeprom_info.cfg[0];
125 cfg1 = lasat_board_info.li_eeprom_info.cfg[1];
126
127 if ( LASAT_W0_DSCTYPE(cfg0) != 1) {
128 printk(KERN_WARNING "WARNING...\nWARNING...\n"
129 "Invalid configuration read from EEPROM, attempting to "
130 "soldier on...");
131 }
132 /* We have a valid configuration */
133
134 switch (LASAT_W0_SDRAMBANKSZ(cfg0)) {
135 case 0:
136 lasat_board_info.li_memsize = 0x0800000;
137 break;
138 case 1:
139 lasat_board_info.li_memsize = 0x1000000;
140 break;
141 case 2:
142 lasat_board_info.li_memsize = 0x2000000;
143 break;
144 case 3:
145 lasat_board_info.li_memsize = 0x4000000;
146 break;
147 case 4:
148 lasat_board_info.li_memsize = 0x8000000;
149 break;
150 default:
151 lasat_board_info.li_memsize = 0;
152 }
153
154 switch (LASAT_W0_SDRAMBANKS(cfg0)) {
155 case 0:
156 break;
157 case 1:
158 lasat_board_info.li_memsize *= 2;
159 break;
160 default:
161 break;
162 }
163
164 switch (LASAT_W0_BUSSPEED(cfg0)) {
165 case 0x0:
166 lasat_board_info.li_bus_hz = 60000000;
167 break;
168 case 0x1:
169 lasat_board_info.li_bus_hz = 66000000;
170 break;
171 case 0x2:
172 lasat_board_info.li_bus_hz = 66666667;
173 break;
174 case 0x3:
175 lasat_board_info.li_bus_hz = 80000000;
176 break;
177 case 0x4:
178 lasat_board_info.li_bus_hz = 83333333;
179 break;
180 case 0x5:
181 lasat_board_info.li_bus_hz = 100000000;
182 break;
183 }
184
185 switch (LASAT_W0_CPUCLK(cfg0)) {
186 case 0x0:
187 lasat_board_info.li_cpu_hz =
188 lasat_board_info.li_bus_hz;
189 break;
190 case 0x1:
191 lasat_board_info.li_cpu_hz =
192 lasat_board_info.li_bus_hz +
193 (lasat_board_info.li_bus_hz >> 1);
194 break;
195 case 0x2:
196 lasat_board_info.li_cpu_hz =
197 lasat_board_info.li_bus_hz +
198 lasat_board_info.li_bus_hz;
199 break;
200 case 0x3:
201 lasat_board_info.li_cpu_hz =
202 lasat_board_info.li_bus_hz +
203 lasat_board_info.li_bus_hz +
204 (lasat_board_info.li_bus_hz >> 1);
205 break;
206 case 0x4:
207 lasat_board_info.li_cpu_hz =
208 lasat_board_info.li_bus_hz +
209 lasat_board_info.li_bus_hz +
210 lasat_board_info.li_bus_hz;
211 break;
212 }
213
214 /* Flash size */
215 switch (LASAT_W1_FLASHSIZE(cfg1)) {
216 case 0:
217 lasat_board_info.li_flash_size = 0x200000;
218 break;
219 case 1:
220 lasat_board_info.li_flash_size = 0x400000;
221 break;
222 case 2:
223 lasat_board_info.li_flash_size = 0x800000;
224 break;
225 case 3:
226 lasat_board_info.li_flash_size = 0x1000000;
227 break;
228 case 4:
229 lasat_board_info.li_flash_size = 0x2000000;
230 break;
231 }
232
233 init_flash_sizes();
234
235 lasat_board_info.li_bmid = LASAT_W0_BMID(cfg0);
236 lasat_board_info.li_prid = lasat_board_info.li_eeprom_info.prid;
237 if (lasat_board_info.li_prid == 0xffff || lasat_board_info.li_prid == 0)
238 lasat_board_info.li_prid = lasat_board_info.li_bmid;
239
240 /* Base model stuff */
241 if (lasat_board_info.li_bmid > i_n_base_models)
242 lasat_board_info.li_bmid = i_n_base_models;
243 strcpy(lasat_board_info.li_bmstr, i_txt_base_models[lasat_board_info.li_bmid]);
244
245 /* Product ID dependent values */
246 c = lasat_board_info.li_prid;
247 if (c >= i_n_prids) {
248 strcpy(lasat_board_info.li_namestr, "Unknown Model");
249 strcpy(lasat_board_info.li_typestr, "Unknown Type");
250 } else {
251 ppi = &vendor_info_table[0].vi_product_info[c];
252 strcpy(lasat_board_info.li_namestr, ppi->pi_name);
253 if (ppi->pi_type)
254 strcpy(lasat_board_info.li_typestr, ppi->pi_type);
255 else
256 sprintf(lasat_board_info.li_typestr, "%d",10*c);
257 }
258
259#if defined(CONFIG_INET) && defined(CONFIG_SYSCTL)
260 update_bcastaddr();
261#endif
262
263 return 0;
264}
265
266void lasat_write_eeprom_info(void)
267{
268 unsigned long crc;
269
270 /* Generate the CRC */
271 crc = EEPROM_CRC((unsigned char *)(&lasat_board_info.li_eeprom_info),
272 sizeof(struct lasat_eeprom_struct) - 4);
273 lasat_board_info.li_eeprom_info.crc32 = crc;
274
275 /* Write the EEPROM info */
276 EEPROMWrite(0, (unsigned char *)&lasat_board_info.li_eeprom_info,
277 sizeof(struct lasat_eeprom_struct));
278}
279
diff --git a/arch/mips/lasat/lasat_models.h b/arch/mips/lasat/lasat_models.h
deleted file mode 100644
index ae0c5d0bd403..000000000000
--- a/arch/mips/lasat/lasat_models.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * Model description tables
3 */
4
5typedef struct product_info_t {
6 const char *pi_name;
7 const char *pi_type;
8} product_info_t;
9
10typedef struct vendor_info_t {
11 const char *vi_name;
12 const product_info_t *vi_product_info;
13} vendor_info_t;
14
15/*
16 * Base models
17 */
18static const char * const txt_base_models[] = {
19 "MQ 2", "MQ Pro", "SP 25", "SP 50", "SP 100", "SP 5000", "SP 7000", "SP 1000", "Unknown"
20};
21#define N_BASE_MODELS (sizeof(txt_base_models)/sizeof(char*)-1)
22
23/*
24 * Eicon Networks
25 */
26static const char txt_en_mq[] = "Masquerade";
27static const char txt_en_sp[] = "Safepipe";
28
29static const product_info_t product_info_eicon[] = {
30 { txt_en_mq, "II" }, /* 0 */
31 { txt_en_mq, "Pro" }, /* 1 */
32 { txt_en_sp, "25" }, /* 2 */
33 { txt_en_sp, "50" }, /* 3 */
34 { txt_en_sp, "100" }, /* 4 */
35 { txt_en_sp, "5000" }, /* 5 */
36 { txt_en_sp, "7000" }, /* 6 */
37 { txt_en_sp, "30" }, /* 7 */
38 { txt_en_sp, "5100" }, /* 8 */
39 { txt_en_sp, "7100" }, /* 9 */
40 { txt_en_sp, "1110" }, /* 10 */
41 { txt_en_sp, "3020" }, /* 11 */
42 { txt_en_sp, "3030" }, /* 12 */
43 { txt_en_sp, "5020" }, /* 13 */
44 { txt_en_sp, "5030" }, /* 14 */
45 { txt_en_sp, "1120" }, /* 15 */
46 { txt_en_sp, "1130" }, /* 16 */
47 { txt_en_sp, "6010" }, /* 17 */
48 { txt_en_sp, "6110" }, /* 18 */
49 { txt_en_sp, "6210" }, /* 19 */
50 { txt_en_sp, "1020" }, /* 20 */
51 { txt_en_sp, "1040" }, /* 21 */
52 { txt_en_sp, "1050" }, /* 22 */
53 { txt_en_sp, "1060" }, /* 23 */
54};
55#define N_PRIDS (sizeof(product_info_eicon)/sizeof(product_info_t))
56
57/*
58 * The vendor table
59 */
60static vendor_info_t const vendor_info_table[] = {
61 { "Eicon Networks", product_info_eicon },
62};
63#define N_VENDORS (sizeof(vendor_info_table)/sizeof(vendor_info_t))
diff --git a/arch/mips/lasat/picvue.c b/arch/mips/lasat/picvue.c
deleted file mode 100644
index 9ae82c3ffb07..000000000000
--- a/arch/mips/lasat/picvue.c
+++ /dev/null
@@ -1,240 +0,0 @@
1/*
2 * Picvue PVC160206 display driver
3 *
4 * Brian Murphy <brian@murphy.dk>
5 *
6 */
7#include <linux/kernel.h>
8#include <linux/delay.h>
9#include <asm/bootinfo.h>
10#include <asm/lasat/lasat.h>
11#include <linux/module.h>
12#include <linux/init.h>
13#include <linux/errno.h>
14#include <linux/string.h>
15
16#include "picvue.h"
17
18#define PVC_BUSY 0x80
19#define PVC_NLINES 2
20#define PVC_DISPMEM 80
21#define PVC_LINELEN PVC_DISPMEM / PVC_NLINES
22
23struct pvc_defs *picvue = NULL;
24
25DECLARE_MUTEX(pvc_sem);
26
27static void pvc_reg_write(u32 val)
28{
29 *picvue->reg = val;
30}
31
32static u32 pvc_reg_read(void)
33{
34 u32 tmp = *picvue->reg;
35 return tmp;
36}
37
38static void pvc_write_byte(u32 data, u8 byte)
39{
40 data |= picvue->e;
41 pvc_reg_write(data);
42 data &= ~picvue->data_mask;
43 data |= byte << picvue->data_shift;
44 pvc_reg_write(data);
45 ndelay(220);
46 pvc_reg_write(data & ~picvue->e);
47 ndelay(220);
48}
49
50static u8 pvc_read_byte(u32 data)
51{
52 u8 byte;
53
54 data |= picvue->e;
55 pvc_reg_write(data);
56 ndelay(220);
57 byte = (pvc_reg_read() & picvue->data_mask) >> picvue->data_shift;
58 data &= ~picvue->e;
59 pvc_reg_write(data);
60 ndelay(220);
61 return byte;
62}
63
64static u8 pvc_read_data(void)
65{
66 u32 data = pvc_reg_read();
67 u8 byte;
68 data |= picvue->rw;
69 data &= ~picvue->rs;
70 pvc_reg_write(data);
71 ndelay(40);
72 byte = pvc_read_byte(data);
73 data |= picvue->rs;
74 pvc_reg_write(data);
75 return byte;
76}
77
78#define TIMEOUT 1000
79static int pvc_wait(void)
80{
81 int i = TIMEOUT;
82 int err = 0;
83
84 while ((pvc_read_data() & PVC_BUSY) && i)
85 i--;
86 if (i == 0)
87 err = -ETIME;
88
89 return err;
90}
91
92#define MODE_INST 0
93#define MODE_DATA 1
94static void pvc_write(u8 byte, int mode)
95{
96 u32 data = pvc_reg_read();
97 data &= ~picvue->rw;
98 if (mode == MODE_DATA)
99 data |= picvue->rs;
100 else
101 data &= ~picvue->rs;
102 pvc_reg_write(data);
103 ndelay(40);
104 pvc_write_byte(data, byte);
105 if (mode == MODE_DATA)
106 data &= ~picvue->rs;
107 else
108 data |= picvue->rs;
109 pvc_reg_write(data);
110 pvc_wait();
111}
112
113void pvc_write_string(const unsigned char *str, u8 addr, int line)
114{
115 int i = 0;
116
117 if (line > 0 && (PVC_NLINES > 1))
118 addr += 0x40 * line;
119 pvc_write(0x80 | addr, MODE_INST);
120
121 while (*str != 0 && i < PVC_LINELEN) {
122 pvc_write(*str++, MODE_DATA);
123 i++;
124 }
125}
126
127void pvc_write_string_centered(const unsigned char *str, int line)
128{
129 int len = strlen(str);
130 u8 addr;
131
132 if (len > PVC_VISIBLE_CHARS)
133 addr = 0;
134 else
135 addr = (PVC_VISIBLE_CHARS - strlen(str))/2;
136
137 pvc_write_string(str, addr, line);
138}
139
140void pvc_dump_string(const unsigned char *str)
141{
142 int len = strlen(str);
143
144 pvc_write_string(str, 0, 0);
145 if (len > PVC_VISIBLE_CHARS)
146 pvc_write_string(&str[PVC_VISIBLE_CHARS], 0, 1);
147}
148
149#define BM_SIZE 8
150#define MAX_PROGRAMMABLE_CHARS 8
151int pvc_program_cg(int charnum, u8 bitmap[BM_SIZE])
152{
153 int i;
154 int addr;
155
156 if (charnum > MAX_PROGRAMMABLE_CHARS)
157 return -ENOENT;
158
159 addr = charnum * 8;
160 pvc_write(0x40 | addr, MODE_INST);
161
162 for (i=0; i<BM_SIZE; i++)
163 pvc_write(bitmap[i], MODE_DATA);
164 return 0;
165}
166
167#define FUNC_SET_CMD 0x20
168#define EIGHT_BYTE (1 << 4)
169#define FOUR_BYTE 0
170#define TWO_LINES (1 << 3)
171#define ONE_LINE 0
172#define LARGE_FONT (1 << 2)
173#define SMALL_FONT 0
174static void pvc_funcset(u8 cmd)
175{
176 pvc_write(FUNC_SET_CMD | (cmd & (EIGHT_BYTE|TWO_LINES|LARGE_FONT)), MODE_INST);
177}
178
179#define ENTRYMODE_CMD 0x4
180#define AUTO_INC (1 << 1)
181#define AUTO_DEC 0
182#define CURSOR_FOLLOWS_DISP (1 << 0)
183static void pvc_entrymode(u8 cmd)
184{
185 pvc_write(ENTRYMODE_CMD | (cmd & (AUTO_INC|CURSOR_FOLLOWS_DISP)), MODE_INST);
186}
187
188#define DISP_CNT_CMD 0x08
189#define DISP_OFF 0
190#define DISP_ON (1 << 2)
191#define CUR_ON (1 << 1)
192#define CUR_BLINK (1 << 0)
193void pvc_dispcnt(u8 cmd)
194{
195 pvc_write(DISP_CNT_CMD | (cmd & (DISP_ON|CUR_ON|CUR_BLINK)), MODE_INST);
196}
197
198#define MOVE_CMD 0x10
199#define DISPLAY (1 << 3)
200#define CURSOR 0
201#define RIGHT (1 << 2)
202#define LEFT 0
203void pvc_move(u8 cmd)
204{
205 pvc_write(MOVE_CMD | (cmd & (DISPLAY|RIGHT)), MODE_INST);
206}
207
208#define CLEAR_CMD 0x1
209void pvc_clear(void)
210{
211 pvc_write(CLEAR_CMD, MODE_INST);
212}
213
214#define HOME_CMD 0x2
215void pvc_home(void)
216{
217 pvc_write(HOME_CMD, MODE_INST);
218}
219
220int pvc_init(void)
221{
222 u8 cmd = EIGHT_BYTE;
223
224 if (PVC_NLINES == 2)
225 cmd |= (SMALL_FONT|TWO_LINES);
226 else
227 cmd |= (LARGE_FONT|ONE_LINE);
228 pvc_funcset(cmd);
229 pvc_dispcnt(DISP_ON);
230 pvc_entrymode(AUTO_INC);
231
232 pvc_clear();
233 pvc_write_string_centered("Display", 0);
234 pvc_write_string_centered("Initialized", 1);
235
236 return 0;
237}
238
239module_init(pvc_init);
240MODULE_LICENSE("GPL");
diff --git a/arch/mips/lasat/picvue.h b/arch/mips/lasat/picvue.h
deleted file mode 100644
index 2a96bf971897..000000000000
--- a/arch/mips/lasat/picvue.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * Picvue PVC160206 display driver
3 *
4 * Brian Murphy <brian.murphy@eicon.com>
5 *
6 */
7#include <asm/semaphore.h>
8
9struct pvc_defs {
10 volatile u32 *reg;
11 u32 data_shift;
12 u32 data_mask;
13 u32 e;
14 u32 rw;
15 u32 rs;
16};
17
18extern struct pvc_defs *picvue;
19
20#define PVC_NLINES 2
21#define PVC_DISPMEM 80
22#define PVC_LINELEN PVC_DISPMEM / PVC_NLINES
23#define PVC_VISIBLE_CHARS 16
24
25void pvc_write_string(const unsigned char *str, u8 addr, int line);
26void pvc_write_string_centered(const unsigned char *str, int line);
27void pvc_dump_string(const unsigned char *str);
28
29#define BM_SIZE 8
30#define MAX_PROGRAMMABLE_CHARS 8
31int pvc_program_cg(int charnum, u8 bitmap[BM_SIZE]);
32
33void pvc_dispcnt(u8 cmd);
34#define DISP_OFF 0
35#define DISP_ON (1 << 2)
36#define CUR_ON (1 << 1)
37#define CUR_BLINK (1 << 0)
38
39void pvc_move(u8 cmd);
40#define DISPLAY (1 << 3)
41#define CURSOR 0
42#define RIGHT (1 << 2)
43#define LEFT 0
44
45void pvc_clear(void);
46void pvc_home(void);
47
48extern struct semaphore pvc_sem;
diff --git a/arch/mips/lasat/picvue_proc.c b/arch/mips/lasat/picvue_proc.c
deleted file mode 100644
index cce7cddcdb08..000000000000
--- a/arch/mips/lasat/picvue_proc.c
+++ /dev/null
@@ -1,186 +0,0 @@
1/*
2 * Picvue PVC160206 display driver
3 *
4 * Brian Murphy <brian.murphy@eicon.com>
5 *
6 */
7#include <linux/kernel.h>
8#include <linux/module.h>
9#include <linux/init.h>
10#include <linux/errno.h>
11
12#include <linux/proc_fs.h>
13#include <linux/interrupt.h>
14
15#include <linux/timer.h>
16
17#include "picvue.h"
18
19static char pvc_lines[PVC_NLINES][PVC_LINELEN+1];
20static int pvc_linedata[PVC_NLINES];
21static struct proc_dir_entry *pvc_display_dir;
22static char *pvc_linename[PVC_NLINES] = {"line1", "line2"};
23#define DISPLAY_DIR_NAME "display"
24static int scroll_dir = 0, scroll_interval = 0;
25
26static struct timer_list timer;
27
28static void pvc_display(unsigned long data) {
29 int i;
30
31 pvc_clear();
32 for (i=0; i<PVC_NLINES; i++)
33 pvc_write_string(pvc_lines[i], 0, i);
34}
35
36static DECLARE_TASKLET(pvc_display_tasklet, &pvc_display, 0);
37
38static int pvc_proc_read_line(char *page, char **start,
39 off_t off, int count,
40 int *eof, void *data)
41{
42 char *origpage = page;
43 int lineno = *(int *)data;
44
45 if (lineno < 0 || lineno > PVC_NLINES) {
46 printk("proc_read_line: invalid lineno %d\n", lineno);
47 return 0;
48 }
49
50 down(&pvc_sem);
51 page += sprintf(page, "%s\n", pvc_lines[lineno]);
52 up(&pvc_sem);
53
54 return page - origpage;
55}
56
57static int pvc_proc_write_line(struct file *file, const char *buffer,
58 unsigned long count, void *data)
59{
60 int origcount = count;
61 int lineno = *(int *)data;
62
63 if (lineno < 0 || lineno > PVC_NLINES) {
64 printk("proc_write_line: invalid lineno %d\n", lineno);
65 return origcount;
66 }
67
68 if (count > PVC_LINELEN)
69 count = PVC_LINELEN;
70
71 if (buffer[count-1] == '\n')
72 count--;
73
74 down(&pvc_sem);
75 strncpy(pvc_lines[lineno], buffer, count);
76 pvc_lines[lineno][count] = '\0';
77 up(&pvc_sem);
78
79 tasklet_schedule(&pvc_display_tasklet);
80
81 return origcount;
82}
83
84static int pvc_proc_write_scroll(struct file *file, const char *buffer,
85 unsigned long count, void *data)
86{
87 int origcount = count;
88 int cmd = simple_strtol(buffer, NULL, 10);
89
90 down(&pvc_sem);
91 if (scroll_interval != 0)
92 del_timer(&timer);
93
94 if (cmd == 0) {
95 scroll_dir = 0;
96 scroll_interval = 0;
97 } else {
98 if (cmd < 0) {
99 scroll_dir = -1;
100 scroll_interval = -cmd;
101 } else {
102 scroll_dir = 1;
103 scroll_interval = cmd;
104 }
105 add_timer(&timer);
106 }
107 up(&pvc_sem);
108
109 return origcount;
110}
111
112static int pvc_proc_read_scroll(char *page, char **start,
113 off_t off, int count,
114 int *eof, void *data)
115{
116 char *origpage = page;
117
118 down(&pvc_sem);
119 page += sprintf(page, "%d\n", scroll_dir * scroll_interval);
120 up(&pvc_sem);
121
122 return page - origpage;
123}
124
125
126void pvc_proc_timerfunc(unsigned long data)
127{
128 if (scroll_dir < 0)
129 pvc_move(DISPLAY|RIGHT);
130 else if (scroll_dir > 0)
131 pvc_move(DISPLAY|LEFT);
132
133 timer.expires = jiffies + scroll_interval;
134 add_timer(&timer);
135}
136
137static void pvc_proc_cleanup(void)
138{
139 int i;
140 for (i=0; i<PVC_NLINES; i++)
141 remove_proc_entry(pvc_linename[i], pvc_display_dir);
142 remove_proc_entry("scroll", pvc_display_dir);
143 remove_proc_entry(DISPLAY_DIR_NAME, NULL);
144
145 del_timer(&timer);
146}
147
148static int __init pvc_proc_init(void)
149{
150 struct proc_dir_entry *proc_entry;
151 int i;
152
153 pvc_display_dir = proc_mkdir(DISPLAY_DIR_NAME, NULL);
154 if (pvc_display_dir == NULL)
155 goto error;
156
157 for (i=0; i<PVC_NLINES; i++) {
158 strcpy(pvc_lines[i], "");
159 pvc_linedata[i] = i;
160 }
161 for (i=0; i<PVC_NLINES; i++) {
162 proc_entry = create_proc_entry(pvc_linename[i], 0644, pvc_display_dir);
163 if (proc_entry == NULL)
164 goto error;
165 proc_entry->read_proc = pvc_proc_read_line;
166 proc_entry->write_proc = pvc_proc_write_line;
167 proc_entry->data = &pvc_linedata[i];
168 }
169 proc_entry = create_proc_entry("scroll", 0644, pvc_display_dir);
170 if (proc_entry == NULL)
171 goto error;
172 proc_entry->write_proc = pvc_proc_write_scroll;
173 proc_entry->read_proc = pvc_proc_read_scroll;
174
175 init_timer(&timer);
176 timer.function = pvc_proc_timerfunc;
177
178 return 0;
179error:
180 pvc_proc_cleanup();
181 return -ENOMEM;
182}
183
184module_init(pvc_proc_init);
185module_exit(pvc_proc_cleanup);
186MODULE_LICENSE("GPL");
diff --git a/arch/mips/lasat/prom.c b/arch/mips/lasat/prom.c
deleted file mode 100644
index 812c6ac366be..000000000000
--- a/arch/mips/lasat/prom.c
+++ /dev/null
@@ -1,117 +0,0 @@
1/*
2 * PROM interface routines.
3 */
4#include <linux/types.h>
5#include <linux/init.h>
6#include <linux/string.h>
7#include <linux/ctype.h>
8#include <linux/kernel.h>
9#include <linux/mm.h>
10#include <linux/bootmem.h>
11#include <linux/ioport.h>
12#include <asm/bootinfo.h>
13#include <asm/lasat/lasat.h>
14#include <asm/cpu.h>
15
16#include "at93c.h"
17#include <asm/lasat/eeprom.h>
18#include "prom.h"
19
20#define RESET_VECTOR 0xbfc00000
21#define PROM_JUMP_TABLE_ENTRY(n) (*((u32 *)(RESET_VECTOR + 0x20) + n))
22#define PROM_DISPLAY_ADDR PROM_JUMP_TABLE_ENTRY(0)
23#define PROM_PUTC_ADDR PROM_JUMP_TABLE_ENTRY(1)
24#define PROM_MONITOR_ADDR PROM_JUMP_TABLE_ENTRY(2)
25
26static void null_prom_display(const char *string, int pos, int clear)
27{
28}
29
30static void null_prom_monitor(void)
31{
32}
33
34static void null_prom_putc(char c)
35{
36}
37
38/* these are functions provided by the bootloader */
39static void (* __prom_putc)(char c) = null_prom_putc;
40
41void prom_putchar(char c)
42{
43 __prom_putc(c);
44}
45
46void (* prom_display)(const char *string, int pos, int clear) =
47 null_prom_display;
48void (* prom_monitor)(void) = null_prom_monitor;
49
50unsigned int lasat_ndelay_divider;
51
52static void setup_prom_vectors(void)
53{
54 u32 version = *(u32 *)(RESET_VECTOR + 0x90);
55
56 if (version >= 307) {
57 prom_display = (void *)PROM_DISPLAY_ADDR;
58 __prom_putc = (void *)PROM_PUTC_ADDR;
59 prom_monitor = (void *)PROM_MONITOR_ADDR;
60 }
61 printk("prom vectors set up\n");
62}
63
64static struct at93c_defs at93c_defs[N_MACHTYPES] = {
65 {(void *)AT93C_REG_100, (void *)AT93C_RDATA_REG_100, AT93C_RDATA_SHIFT_100,
66 AT93C_WDATA_SHIFT_100, AT93C_CS_M_100, AT93C_CLK_M_100},
67 {(void *)AT93C_REG_200, (void *)AT93C_RDATA_REG_200, AT93C_RDATA_SHIFT_200,
68 AT93C_WDATA_SHIFT_200, AT93C_CS_M_200, AT93C_CLK_M_200},
69};
70
71void __init prom_init(void)
72{
73 int argc = fw_arg0;
74 char **argv = (char **) fw_arg1;
75
76 setup_prom_vectors();
77
78 if (current_cpu_data.cputype == CPU_R5000) {
79 printk("LASAT 200 board\n");
80 mips_machtype = MACH_LASAT_200;
81 lasat_ndelay_divider = LASAT_200_DIVIDER;
82 } else {
83 printk("LASAT 100 board\n");
84 mips_machtype = MACH_LASAT_100;
85 lasat_ndelay_divider = LASAT_100_DIVIDER;
86 }
87
88 at93c = &at93c_defs[mips_machtype];
89
90 lasat_init_board_info(); /* Read info from EEPROM */
91
92 mips_machgroup = MACH_GROUP_LASAT;
93
94 /* Get the command line */
95 if (argc > 0) {
96 strncpy(arcs_cmdline, argv[0], CL_SIZE-1);
97 arcs_cmdline[CL_SIZE-1] = '\0';
98 }
99
100 /* Set the I/O base address */
101 set_io_port_base(KSEG1);
102
103 /* Set memory regions */
104 ioport_resource.start = 0;
105 ioport_resource.end = 0xffffffff; /* Wrong, fixme. */
106
107 add_memory_region(0, lasat_board_info.li_memsize, BOOT_MEM_RAM);
108}
109
110void __init prom_free_prom_memory(void)
111{
112}
113
114const char *get_system_type(void)
115{
116 return lasat_board_info.li_bmstr;
117}
diff --git a/arch/mips/lasat/prom.h b/arch/mips/lasat/prom.h
deleted file mode 100644
index 019d45fbd268..000000000000
--- a/arch/mips/lasat/prom.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifndef PROM_H
2#define PROM_H
3extern void (* prom_display)(const char *string, int pos, int clear);
4extern void (* prom_monitor)(void);
5#endif
diff --git a/arch/mips/lasat/reset.c b/arch/mips/lasat/reset.c
deleted file mode 100644
index 9e22acf03083..000000000000
--- a/arch/mips/lasat/reset.c
+++ /dev/null
@@ -1,69 +0,0 @@
1/*
2 * Thomas Horsten <thh@lasat.com>
3 * Copyright (C) 2000 LASAT Networks A/S.
4 *
5 * This program is free software; you can distribute it and/or modify it
6 * under the terms of the GNU General Public License (Version 2) as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
17 *
18 * Reset the LASAT board.
19 */
20#include <linux/kernel.h>
21#include <linux/pm.h>
22
23#include <asm/reboot.h>
24#include <asm/system.h>
25#include <asm/lasat/lasat.h>
26
27#include "picvue.h"
28#include "prom.h"
29
30static void lasat_machine_restart(char *command);
31static void lasat_machine_halt(void);
32
33/* Used to set machine to boot in service mode via /proc interface */
34int lasat_boot_to_service = 0;
35
36static void lasat_machine_restart(char *command)
37{
38 local_irq_disable();
39
40 if (lasat_boot_to_service) {
41 printk("machine_restart: Rebooting to service mode\n");
42 *(volatile unsigned int *)0xa0000024 = 0xdeadbeef;
43 *(volatile unsigned int *)0xa00000fc = 0xfedeabba;
44 }
45 *lasat_misc->reset_reg = 0xbedead;
46 for (;;) ;
47}
48
49#define MESSAGE "System halted"
50static void lasat_machine_halt(void)
51{
52 local_irq_disable();
53
54 /* Disable interrupts and loop forever */
55 printk(KERN_NOTICE MESSAGE "\n");
56#ifdef CONFIG_PICVUE
57 pvc_clear();
58 pvc_write_string(MESSAGE, 0, 0);
59#endif
60 prom_monitor();
61 for (;;) ;
62}
63
64void lasat_reboot_setup(void)
65{
66 _machine_restart = lasat_machine_restart;
67 _machine_halt = lasat_machine_halt;
68 pm_power_off = lasat_machine_halt;
69}
diff --git a/arch/mips/lasat/setup.c b/arch/mips/lasat/setup.c
deleted file mode 100644
index 488007f13988..000000000000
--- a/arch/mips/lasat/setup.c
+++ /dev/null
@@ -1,182 +0,0 @@
1/*
2 * Carsten Langgaard, carstenl@mips.com
3 * Copyright (C) 1999 MIPS Technologies, Inc. All rights reserved.
4 *
5 * Thomas Horsten <thh@lasat.com>
6 * Copyright (C) 2000 LASAT Networks A/S.
7 *
8 * Brian Murphy <brian@murphy.dk>
9 *
10 * This program is free software; you can distribute it and/or modify it
11 * under the terms of the GNU General Public License (Version 2) as
12 * published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
22 *
23 * Lasat specific setup.
24 */
25#include <linux/init.h>
26#include <linux/sched.h>
27#include <linux/pci.h>
28#include <linux/interrupt.h>
29#include <linux/tty.h>
30#include <linux/serial.h>
31#include <linux/serial_core.h>
32
33#include <asm/time.h>
34#include <asm/cpu.h>
35#include <asm/bootinfo.h>
36#include <asm/irq.h>
37#include <asm/lasat/lasat.h>
38#include <asm/lasat/serial.h>
39
40#ifdef CONFIG_PICVUE
41#include <linux/notifier.h>
42#endif
43
44#include "ds1603.h"
45#include <asm/lasat/ds1603.h>
46#include <asm/lasat/picvue.h>
47#include <asm/lasat/eeprom.h>
48
49#include "prom.h"
50
51int lasat_command_line = 0;
52void lasatint_init(void);
53
54extern void lasat_reboot_setup(void);
55extern void pcisetup(void);
56extern void edhac_init(void *, void *, void *);
57extern void addrflt_init(void);
58
59struct lasat_misc lasat_misc_info[N_MACHTYPES] = {
60 {(void *)KSEG1ADDR(0x1c840000), (void *)KSEG1ADDR(0x1c800000), 2},
61 {(void *)KSEG1ADDR(0x11080000), (void *)KSEG1ADDR(0x11000000), 6}
62};
63
64struct lasat_misc *lasat_misc = NULL;
65
66#ifdef CONFIG_DS1603
67static struct ds_defs ds_defs[N_MACHTYPES] = {
68 { (void *)DS1603_REG_100, (void *)DS1603_REG_100,
69 DS1603_RST_100, DS1603_CLK_100, DS1603_DATA_100,
70 DS1603_DATA_SHIFT_100, 0, 0 },
71 { (void *)DS1603_REG_200, (void *)DS1603_DATA_REG_200,
72 DS1603_RST_200, DS1603_CLK_200, DS1603_DATA_200,
73 DS1603_DATA_READ_SHIFT_200, 1, 2000 }
74};
75#endif
76
77#ifdef CONFIG_PICVUE
78#include "picvue.h"
79static struct pvc_defs pvc_defs[N_MACHTYPES] = {
80 { (void *)PVC_REG_100, PVC_DATA_SHIFT_100, PVC_DATA_M_100,
81 PVC_E_100, PVC_RW_100, PVC_RS_100 },
82 { (void *)PVC_REG_200, PVC_DATA_SHIFT_200, PVC_DATA_M_200,
83 PVC_E_200, PVC_RW_200, PVC_RS_200 }
84};
85#endif
86
87static int lasat_panic_display(struct notifier_block *this,
88 unsigned long event, void *ptr)
89{
90#ifdef CONFIG_PICVUE
91 unsigned char *string = ptr;
92 if (string == NULL)
93 string = "Kernel Panic";
94 pvc_dump_string(string);
95#endif
96 return NOTIFY_DONE;
97}
98
99static int lasat_panic_prom_monitor(struct notifier_block *this,
100 unsigned long event, void *ptr)
101{
102 prom_monitor();
103 return NOTIFY_DONE;
104}
105
106static struct notifier_block lasat_panic_block[] =
107{
108 { lasat_panic_display, NULL, INT_MAX },
109 { lasat_panic_prom_monitor, NULL, INT_MIN }
110};
111
112static void lasat_time_init(void)
113{
114 mips_hpt_frequency = lasat_board_info.li_cpu_hz / 2;
115}
116
117void __init plat_timer_setup(struct irqaction *irq)
118{
119 change_c0_status(ST0_IM, IE_IRQ0 | IE_IRQ5);
120}
121
122#define DYNAMIC_SERIAL_INIT
123#ifdef DYNAMIC_SERIAL_INIT
124void __init serial_init(void)
125{
126#ifdef CONFIG_SERIAL_8250
127 struct uart_port s;
128
129 memset(&s, 0, sizeof(s));
130
131 s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
132 s.iotype = UPIO_MEM;
133
134 if (mips_machtype == MACH_LASAT_100) {
135 s.uartclk = LASAT_BASE_BAUD_100 * 16;
136 s.irq = LASATINT_UART_100;
137 s.regshift = LASAT_UART_REGS_SHIFT_100;
138 s.membase = (char *)KSEG1ADDR(LASAT_UART_REGS_BASE_100);
139 } else {
140 s.uartclk = LASAT_BASE_BAUD_200 * 16;
141 s.irq = LASATINT_UART_200;
142 s.regshift = LASAT_UART_REGS_SHIFT_200;
143 s.membase = (char *)KSEG1ADDR(LASAT_UART_REGS_BASE_200);
144 }
145
146 if (early_serial_setup(&s) != 0)
147 printk(KERN_ERR "Serial setup failed!\n");
148#endif
149}
150#endif
151
152void __init plat_mem_setup(void)
153{
154 int i;
155 lasat_misc = &lasat_misc_info[mips_machtype];
156#ifdef CONFIG_PICVUE
157 picvue = &pvc_defs[mips_machtype];
158#endif
159
160 /* Set up panic notifier */
161 for (i = 0; i < sizeof(lasat_panic_block) / sizeof(struct notifier_block); i++)
162 atomic_notifier_chain_register(&panic_notifier_list,
163 &lasat_panic_block[i]);
164
165 lasat_reboot_setup();
166
167 board_time_init = lasat_time_init;
168
169#ifdef CONFIG_DS1603
170 ds1603 = &ds_defs[mips_machtype];
171 rtc_mips_get_time = ds1603_read;
172 rtc_mips_set_time = ds1603_set;
173#endif
174
175#ifdef DYNAMIC_SERIAL_INIT
176 serial_init();
177#endif
178 /* Switch from prom exception handler to normal mode */
179 change_c0_status(ST0_BEV,0);
180
181 pr_info("Lasat specific initialization complete\n");
182}
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
deleted file mode 100644
index 699ab1886ceb..000000000000
--- a/arch/mips/lasat/sysctl.c
+++ /dev/null
@@ -1,441 +0,0 @@
1/*
2 * Thomas Horsten <thh@lasat.com>
3 * Copyright (C) 2000 LASAT Networks A/S.
4 *
5 * This program is free software; you can distribute it and/or modify it
6 * under the terms of the GNU General Public License (Version 2) as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
17 *
18 * Routines specific to the LASAT boards
19 */
20#include <linux/types.h>
21#include <asm/lasat/lasat.h>
22
23#include <linux/module.h>
24#include <linux/sysctl.h>
25#include <linux/stddef.h>
26#include <linux/init.h>
27#include <linux/fs.h>
28#include <linux/ctype.h>
29#include <linux/string.h>
30#include <linux/net.h>
31#include <linux/inet.h>
32#include <linux/mutex.h>
33#include <asm/uaccess.h>
34
35#include "sysctl.h"
36#include "ds1603.h"
37
38static DEFINE_MUTEX(lasat_info_mutex);
39
40/* Strategy function to write EEPROM after changing string entry */
41int sysctl_lasatstring(ctl_table *table, int *name, int nlen,
42 void *oldval, size_t *oldlenp,
43 void *newval, size_t newlen)
44{
45 int r;
46 mutex_lock(&lasat_info_mutex);
47 r = sysctl_string(table, name,
48 nlen, oldval, oldlenp, newval, newlen);
49 if (r < 0) {
50 mutex_unlock(&lasat_info_mutex);
51 return r;
52 }
53 if (newval && newlen) {
54 lasat_write_eeprom_info();
55 }
56 mutex_unlock(&lasat_info_mutex);
57 return 1;
58}
59
60
61/* And the same for proc */
62int proc_dolasatstring(ctl_table *table, int write, struct file *filp,
63 void *buffer, size_t *lenp, loff_t *ppos)
64{
65 int r;
66 mutex_lock(&lasat_info_mutex);
67 r = proc_dostring(table, write, filp, buffer, lenp, ppos);
68 if ( (!write) || r) {
69 mutex_unlock(&lasat_info_mutex);
70 return r;
71 }
72 lasat_write_eeprom_info();
73 mutex_unlock(&lasat_info_mutex);
74 return 0;
75}
76
77/* proc function to write EEPROM after changing int entry */
78int proc_dolasatint(ctl_table *table, int write, struct file *filp,
79 void *buffer, size_t *lenp, loff_t *ppos)
80{
81 int r;
82 mutex_lock(&lasat_info_mutex);
83 r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
84 if ( (!write) || r) {
85 mutex_unlock(&lasat_info_mutex);
86 return r;
87 }
88 lasat_write_eeprom_info();
89 mutex_unlock(&lasat_info_mutex);
90 return 0;
91}
92
93static int rtctmp;
94
95#ifdef CONFIG_DS1603
96/* proc function to read/write RealTime Clock */
97int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
98 void *buffer, size_t *lenp, loff_t *ppos)
99{
100 int r;
101 mutex_lock(&lasat_info_mutex);
102 if (!write) {
103 rtctmp = ds1603_read();
104 /* check for time < 0 and set to 0 */
105 if (rtctmp < 0)
106 rtctmp = 0;
107 }
108 r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
109 if ( (!write) || r) {
110 mutex_unlock(&lasat_info_mutex);
111 return r;
112 }
113 ds1603_set(rtctmp);
114 mutex_unlock(&lasat_info_mutex);
115 return 0;
116}
117#endif
118
119/* Sysctl for setting the IP addresses */
120int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen,
121 void *oldval, size_t *oldlenp,
122 void *newval, size_t newlen)
123{
124 int r;
125 mutex_lock(&lasat_info_mutex);
126 r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
127 if (r < 0) {
128 mutex_unlock(&lasat_info_mutex);
129 return r;
130 }
131 if (newval && newlen) {
132 lasat_write_eeprom_info();
133 }
134 mutex_unlock(&lasat_info_mutex);
135 return 1;
136}
137
138#ifdef CONFIG_DS1603
139/* Same for RTC */
140int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen,
141 void *oldval, size_t *oldlenp,
142 void *newval, size_t newlen)
143{
144 int r;
145 mutex_lock(&lasat_info_mutex);
146 rtctmp = ds1603_read();
147 if (rtctmp < 0)
148 rtctmp = 0;
149 r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
150 if (r < 0) {
151 mutex_unlock(&lasat_info_mutex);
152 return r;
153 }
154 if (newval && newlen) {
155 ds1603_set(rtctmp);
156 }
157 mutex_unlock(&lasat_info_mutex);
158 return 1;
159}
160#endif
161
162#ifdef CONFIG_INET
163static char lasat_bcastaddr[16];
164
165void update_bcastaddr(void)
166{
167 unsigned int ip;
168
169 ip = (lasat_board_info.li_eeprom_info.ipaddr &
170 lasat_board_info.li_eeprom_info.netmask) |
171 ~lasat_board_info.li_eeprom_info.netmask;
172
173 sprintf(lasat_bcastaddr, "%d.%d.%d.%d",
174 (ip ) & 0xff,
175 (ip >> 8) & 0xff,
176 (ip >> 16) & 0xff,
177 (ip >> 24) & 0xff);
178}
179
180static char proc_lasat_ipbuf[32];
181/* Parsing of IP address */
182int proc_lasat_ip(ctl_table *table, int write, struct file *filp,
183 void *buffer, size_t *lenp, loff_t *ppos)
184{
185 int len;
186 unsigned int ip;
187 char *p, c;
188
189 if (!table->data || !table->maxlen || !*lenp ||
190 (*ppos && !write)) {
191 *lenp = 0;
192 return 0;
193 }
194
195 mutex_lock(&lasat_info_mutex);
196 if (write) {
197 len = 0;
198 p = buffer;
199 while (len < *lenp) {
200 if(get_user(c, p++)) {
201 mutex_unlock(&lasat_info_mutex);
202 return -EFAULT;
203 }
204 if (c == 0 || c == '\n')
205 break;
206 len++;
207 }
208 if (len >= sizeof(proc_lasat_ipbuf)-1)
209 len = sizeof(proc_lasat_ipbuf) - 1;
210 if (copy_from_user(proc_lasat_ipbuf, buffer, len))
211 {
212 mutex_unlock(&lasat_info_mutex);
213 return -EFAULT;
214 }
215 proc_lasat_ipbuf[len] = 0;
216 *ppos += *lenp;
217 /* Now see if we can convert it to a valid IP */
218 ip = in_aton(proc_lasat_ipbuf);
219 *(unsigned int *)(table->data) = ip;
220 lasat_write_eeprom_info();
221 } else {
222 ip = *(unsigned int *)(table->data);
223 sprintf(proc_lasat_ipbuf, "%d.%d.%d.%d",
224 (ip ) & 0xff,
225 (ip >> 8) & 0xff,
226 (ip >> 16) & 0xff,
227 (ip >> 24) & 0xff);
228 len = strlen(proc_lasat_ipbuf);
229 if (len > *lenp)
230 len = *lenp;
231 if (len)
232 if(copy_to_user(buffer, proc_lasat_ipbuf, len)) {
233 mutex_unlock(&lasat_info_mutex);
234 return -EFAULT;
235 }
236 if (len < *lenp) {
237 if(put_user('\n', ((char *) buffer) + len)) {
238 mutex_unlock(&lasat_info_mutex);
239 return -EFAULT;
240 }
241 len++;
242 }
243 *lenp = len;
244 *ppos += len;
245 }
246 update_bcastaddr();
247 mutex_unlock(&lasat_info_mutex);
248 return 0;
249}
250#endif /* defined(CONFIG_INET) */
251
252static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen,
253 void *oldval, size_t *oldlenp,
254 void *newval, size_t newlen)
255{
256 int r;
257
258 mutex_lock(&lasat_info_mutex);
259 r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
260 if (r < 0) {
261 mutex_unlock(&lasat_info_mutex);
262 return r;
263 }
264
265 if (newval && newlen)
266 {
267 if (name && *name == LASAT_PRID)
268 lasat_board_info.li_eeprom_info.prid = *(int*)newval;
269
270 lasat_write_eeprom_info();
271 lasat_init_board_info();
272 }
273 mutex_unlock(&lasat_info_mutex);
274
275 return 0;
276}
277
278int proc_lasat_eeprom_value(ctl_table *table, int write, struct file *filp,
279 void *buffer, size_t *lenp, loff_t *ppos)
280{
281 int r;
282 mutex_lock(&lasat_info_mutex);
283 r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
284 if ( (!write) || r) {
285 mutex_unlock(&lasat_info_mutex);
286 return r;
287 }
288 if (filp && filp->f_path.dentry)
289 {
290 if (!strcmp(filp->f_path.dentry->d_name.name, "prid"))
291 lasat_board_info.li_eeprom_info.prid = lasat_board_info.li_prid;
292 if (!strcmp(filp->f_path.dentry->d_name.name, "debugaccess"))
293 lasat_board_info.li_eeprom_info.debugaccess = lasat_board_info.li_debugaccess;
294 }
295 lasat_write_eeprom_info();
296 mutex_unlock(&lasat_info_mutex);
297 return 0;
298}
299
300extern int lasat_boot_to_service;
301
302#ifdef CONFIG_SYSCTL
303
304static ctl_table lasat_table[] = {
305 {
306 .ctl_name = CTL_UNNUMBERED,
307 .procname = "cpu-hz",
308 .data = &lasat_board_info.li_cpu_hz,
309 .maxlen = sizeof(int),
310 .mode = 0444,
311 .proc_handler = &proc_dointvec,
312 .strategy = &sysctl_intvec
313 },
314 {
315 .ctl_name = CTL_UNNUMBERED,
316 .procname = "bus-hz",
317 .data = &lasat_board_info.li_bus_hz,
318 .maxlen = sizeof(int),
319 .mode = 0444,
320 .proc_handler = &proc_dointvec,
321 .strategy = &sysctl_intvec
322 },
323 {
324 .ctl_name = CTL_UNNUMBERED,
325 .procname = "bmid",
326 .data = &lasat_board_info.li_bmid,
327 .maxlen = sizeof(int),
328 .mode = 0444,
329 .proc_handler = &proc_dointvec,
330 .strategy = &sysctl_intvec
331 },
332 {
333 .ctl_name = CTL_UNNUMBERED,
334 .procname = "prid",
335 .data = &lasat_board_info.li_prid,
336 .maxlen = sizeof(int),
337 .mode = 0644,
338 .proc_handler = &proc_lasat_eeprom_value,
339 .strategy = &sysctl_lasat_eeprom_value
340 },
341#ifdef CONFIG_INET
342 {
343 .ctl_name = CTL_UNNUMBERED,
344 .procname = "ipaddr",
345 .data = &lasat_board_info.li_eeprom_info.ipaddr,
346 .maxlen = sizeof(int),
347 .mode = 0644,
348 .proc_handler = &proc_lasat_ip,
349 .strategy = &sysctl_lasat_intvec
350 },
351 {
352 .ctl_name = LASAT_NETMASK,
353 .procname = "netmask",
354 .data = &lasat_board_info.li_eeprom_info.netmask,
355 .maxlen = sizeof(int),
356 .mode = 0644,
357 .proc_handler = &proc_lasat_ip,
358 .strategy = &sysctl_lasat_intvec
359 },
360 {
361 .ctl_name = CTL_UNNUMBERED,
362 .procname = "bcastaddr",
363 .data = &lasat_bcastaddr,
364 .maxlen = sizeof(lasat_bcastaddr),
365 .mode = 0600,
366 .proc_handler = &proc_dostring,
367 .strategy = &sysctl_string
368 },
369#endif
370 {
371 .ctl_name = CTL_UNNUMBERED,
372 .procname = "passwd_hash",
373 .data = &lasat_board_info.li_eeprom_info.passwd_hash,
374 .maxlen = sizeof(lasat_board_info.li_eeprom_info.passwd_hash),
375 .mode = 0600,
376 .proc_handler = &proc_dolasatstring,
377 .strategy = &sysctl_lasatstring
378 },
379 {
380 .ctl_name = CTL_UNNUMBERED,
381 .procname = "boot-service",
382 .data = &lasat_boot_to_service,
383 .maxlen = sizeof(int),
384 .mode = 0644,
385 .proc_handler = &proc_dointvec,
386 .strategy = &sysctl_intvec
387 },
388#ifdef CONFIG_DS1603
389 {
390 .ctl_name = CTL_UNNUMBERED,
391 .procname = "rtc",
392 .data = &rtctmp,
393 .maxlen = sizeof(int),
394 .mode = 0644,
395 .proc_handler = &proc_dolasatrtc,
396 .strategy = &sysctl_lasat_rtc
397 },
398#endif
399 {
400 .ctl_name = CTL_UNNUMBERED,
401 .procname = "namestr",
402 .data = &lasat_board_info.li_namestr,
403 .maxlen = sizeof(lasat_board_info.li_namestr),
404 .mode = 0444,
405 .proc_handler = &proc_dostring,
406 .strategy = &sysctl_string
407 },
408 {
409 .ctl_name = CTL_UNNUMBERED,
410 .procname = "typestr",
411 .data = &lasat_board_info.li_typestr,
412 .maxlen = sizeof(lasat_board_info.li_typestr),
413 .mode = 0444,
414 .proc_handler = &proc_dostring,
415 .strategy = &sysctl_string
416 },
417 {}
418};
419
420static ctl_table lasat_root_table[] = {
421 {
422 .ctl_name = CTL_UNNUMBERED,
423 .procname = "lasat",
424 .mode = 0555,
425 .child = lasat_table
426 },
427 {}
428};
429
430static int __init lasat_register_sysctl(void)
431{
432 struct ctl_table_header *lasat_table_header;
433
434 lasat_table_header =
435 register_sysctl_table(lasat_root_table);
436
437 return 0;
438}
439
440__initcall(lasat_register_sysctl);
441#endif /* CONFIG_SYSCTL */
diff --git a/arch/mips/lasat/sysctl.h b/arch/mips/lasat/sysctl.h
deleted file mode 100644
index 4d139d2adbdf..000000000000
--- a/arch/mips/lasat/sysctl.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * LASAT sysctl values
3 */
4
5#ifndef _LASAT_SYSCTL_H
6#define _LASAT_SYSCTL_H
7
8/* /proc/sys/lasat */
9enum {
10 LASAT_CPU_HZ=1,
11 LASAT_BUS_HZ,
12 LASAT_MODEL,
13 LASAT_PRID,
14 LASAT_IPADDR,
15 LASAT_NETMASK,
16 LASAT_BCAST,
17 LASAT_PASSWORD,
18 LASAT_SBOOT,
19 LASAT_RTC,
20 LASAT_NAMESTR,
21 LASAT_TYPESTR,
22};
23
24#endif /* _LASAT_SYSCTL_H */
diff --git a/arch/mips/lemote/lm2e/Makefile b/arch/mips/lemote/lm2e/Makefile
new file mode 100644
index 000000000000..fb1b48c48cb3
--- /dev/null
+++ b/arch/mips/lemote/lm2e/Makefile
@@ -0,0 +1,7 @@
1#
2# Makefile for Lemote Fulong mini-PC board.
3#
4
5obj-y += setup.o prom.o reset.o irq.o pci.o bonito-irq.o dbg_io.o mem.o
6EXTRA_AFLAGS := $(CFLAGS)
7
diff --git a/arch/mips/lemote/lm2e/bonito-irq.c b/arch/mips/lemote/lm2e/bonito-irq.c
new file mode 100644
index 000000000000..8fc3bce7075b
--- /dev/null
+++ b/arch/mips/lemote/lm2e/bonito-irq.c
@@ -0,0 +1,74 @@
1/*
2 * Copyright 2001 MontaVista Software Inc.
3 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
4 * Copyright (C) 2000, 2001 Ralf Baechle (ralf@gnu.org)
5 *
6 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
7 * Author: Fuxin Zhang, zhangfx@lemote.com
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 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
20 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 *
29 */
30#include <linux/errno.h>
31#include <linux/init.h>
32#include <linux/io.h>
33#include <linux/types.h>
34#include <linux/interrupt.h>
35#include <linux/irq.h>
36
37#include <asm/mips-boards/bonito64.h>
38
39
40static inline void bonito_irq_enable(unsigned int irq)
41{
42 BONITO_INTENSET = (1 << (irq - BONITO_IRQ_BASE));
43 mmiowb();
44}
45
46static inline void bonito_irq_disable(unsigned int irq)
47{
48 BONITO_INTENCLR = (1 << (irq - BONITO_IRQ_BASE));
49 mmiowb();
50}
51
52static struct irq_chip bonito_irq_type = {
53 .name = "bonito_irq",
54 .ack = bonito_irq_disable,
55 .mask = bonito_irq_disable,
56 .mask_ack = bonito_irq_disable,
57 .unmask = bonito_irq_enable,
58};
59
60static struct irqaction dma_timeout_irqaction = {
61 .handler = no_action,
62 .name = "dma_timeout",
63};
64
65void bonito_irq_init(void)
66{
67 u32 i;
68
69 for (i = BONITO_IRQ_BASE; i < BONITO_IRQ_BASE + 32; i++) {
70 set_irq_chip_and_handler(i, &bonito_irq_type, handle_level_irq);
71 }
72
73 setup_irq(BONITO_IRQ_BASE + 10, &dma_timeout_irqaction);
74}
diff --git a/arch/mips/lemote/lm2e/dbg_io.c b/arch/mips/lemote/lm2e/dbg_io.c
new file mode 100644
index 000000000000..6c95da3ca76f
--- /dev/null
+++ b/arch/mips/lemote/lm2e/dbg_io.c
@@ -0,0 +1,146 @@
1/*
2 * Copyright 2001 MontaVista Software Inc.
3 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
4 * Copyright (C) 2000, 2001 Ralf Baechle (ralf@gnu.org)
5 *
6 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
7 * Author: Fuxin Zhang, zhangfx@lemote.com
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 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
20 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 *
29 */
30
31#include <linux/io.h>
32#include <linux/init.h>
33#include <linux/types.h>
34
35#include <asm/serial.h>
36
37#define UART16550_BAUD_2400 2400
38#define UART16550_BAUD_4800 4800
39#define UART16550_BAUD_9600 9600
40#define UART16550_BAUD_19200 19200
41#define UART16550_BAUD_38400 38400
42#define UART16550_BAUD_57600 57600
43#define UART16550_BAUD_115200 115200
44
45#define UART16550_PARITY_NONE 0
46#define UART16550_PARITY_ODD 0x08
47#define UART16550_PARITY_EVEN 0x18
48#define UART16550_PARITY_MARK 0x28
49#define UART16550_PARITY_SPACE 0x38
50
51#define UART16550_DATA_5BIT 0x0
52#define UART16550_DATA_6BIT 0x1
53#define UART16550_DATA_7BIT 0x2
54#define UART16550_DATA_8BIT 0x3
55
56#define UART16550_STOP_1BIT 0x0
57#define UART16550_STOP_2BIT 0x4
58
59/* ----------------------------------------------------- */
60
61/* === CONFIG === */
62#ifdef CONFIG_64BIT
63#define BASE (0xffffffffbfd003f8)
64#else
65#define BASE (0xbfd003f8)
66#endif
67
68#define MAX_BAUD BASE_BAUD
69/* === END OF CONFIG === */
70
71#define REG_OFFSET 1
72
73/* register offset */
74#define OFS_RCV_BUFFER 0
75#define OFS_TRANS_HOLD 0
76#define OFS_SEND_BUFFER 0
77#define OFS_INTR_ENABLE (1*REG_OFFSET)
78#define OFS_INTR_ID (2*REG_OFFSET)
79#define OFS_DATA_FORMAT (3*REG_OFFSET)
80#define OFS_LINE_CONTROL (3*REG_OFFSET)
81#define OFS_MODEM_CONTROL (4*REG_OFFSET)
82#define OFS_RS232_OUTPUT (4*REG_OFFSET)
83#define OFS_LINE_STATUS (5*REG_OFFSET)
84#define OFS_MODEM_STATUS (6*REG_OFFSET)
85#define OFS_RS232_INPUT (6*REG_OFFSET)
86#define OFS_SCRATCH_PAD (7*REG_OFFSET)
87
88#define OFS_DIVISOR_LSB (0*REG_OFFSET)
89#define OFS_DIVISOR_MSB (1*REG_OFFSET)
90
91/* memory-mapped read/write of the port */
92#define UART16550_READ(y) readb((char *)BASE + (y))
93#define UART16550_WRITE(y, z) writeb(z, (char *)BASE + (y))
94
95void debugInit(u32 baud, u8 data, u8 parity, u8 stop)
96{
97 u32 divisor;
98
99 /* disable interrupts */
100 UART16550_WRITE(OFS_INTR_ENABLE, 0);
101
102 /* set up buad rate */
103 /* set DIAB bit */
104 UART16550_WRITE(OFS_LINE_CONTROL, 0x80);
105
106 /* set divisor */
107 divisor = MAX_BAUD / baud;
108 UART16550_WRITE(OFS_DIVISOR_LSB, divisor & 0xff);
109 UART16550_WRITE(OFS_DIVISOR_MSB, (divisor & 0xff00) >> 8);
110
111 /* clear DIAB bit */
112 UART16550_WRITE(OFS_LINE_CONTROL, 0x0);
113
114 /* set data format */
115 UART16550_WRITE(OFS_DATA_FORMAT, data | parity | stop);
116}
117
118static int remoteDebugInitialized;
119
120u8 getDebugChar(void)
121{
122 if (!remoteDebugInitialized) {
123 remoteDebugInitialized = 1;
124 debugInit(UART16550_BAUD_115200,
125 UART16550_DATA_8BIT,
126 UART16550_PARITY_NONE, UART16550_STOP_1BIT);
127 }
128
129 while ((UART16550_READ(OFS_LINE_STATUS) & 0x1) == 0) ;
130 return UART16550_READ(OFS_RCV_BUFFER);
131}
132
133int putDebugChar(u8 byte)
134{
135 if (!remoteDebugInitialized) {
136 remoteDebugInitialized = 1;
137 /*
138 debugInit(UART16550_BAUD_115200,
139 UART16550_DATA_8BIT,
140 UART16550_PARITY_NONE, UART16550_STOP_1BIT); */
141 }
142
143 while ((UART16550_READ(OFS_LINE_STATUS) & 0x20) == 0) ;
144 UART16550_WRITE(OFS_SEND_BUFFER, byte);
145 return 1;
146}
diff --git a/arch/mips/lemote/lm2e/irq.c b/arch/mips/lemote/lm2e/irq.c
new file mode 100644
index 000000000000..05693bceaeaf
--- /dev/null
+++ b/arch/mips/lemote/lm2e/irq.c
@@ -0,0 +1,145 @@
1/*
2 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
3 * Author: Fuxin Zhang, zhangfx@lemote.com
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 *
10 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
11 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
13 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
14 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
16 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
17 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
19 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20 *
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 675 Mass Ave, Cambridge, MA 02139, USA.
24 *
25 */
26#include <linux/delay.h>
27#include <linux/io.h>
28#include <linux/irq.h>
29#include <linux/init.h>
30#include <linux/interrupt.h>
31#include <linux/irq.h>
32
33#include <asm/irq_cpu.h>
34#include <asm/i8259.h>
35#include <asm/mipsregs.h>
36#include <asm/mips-boards/bonito64.h>
37
38
39/*
40 * the first level int-handler will jump here if it is a bonito irq
41 */
42static void bonito_irqdispatch(void)
43{
44 u32 int_status;
45 int i;
46
47 /* workaround the IO dma problem: let cpu looping to allow DMA finish */
48 int_status = BONITO_INTISR;
49 if (int_status & (1 << 10)) {
50 while (int_status & (1 << 10)) {
51 udelay(1);
52 int_status = BONITO_INTISR;
53 }
54 }
55
56 /* Get pending sources, masked by current enables */
57 int_status = BONITO_INTISR & BONITO_INTEN;
58
59 if (int_status != 0) {
60 i = __ffs(int_status);
61 int_status &= ~(1 << i);
62 do_IRQ(BONITO_IRQ_BASE + i);
63 }
64}
65
66static void i8259_irqdispatch(void)
67{
68 int irq;
69
70 irq = i8259_irq();
71 if (irq >= 0) {
72 do_IRQ(irq);
73 } else {
74 spurious_interrupt();
75 }
76
77}
78
79asmlinkage void plat_irq_dispatch(void)
80{
81 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
82
83 if (pending & CAUSEF_IP7) {
84 do_IRQ(MIPS_CPU_IRQ_BASE + 7);
85 } else if (pending & CAUSEF_IP5) {
86 i8259_irqdispatch();
87 } else if (pending & CAUSEF_IP2) {
88 bonito_irqdispatch();
89 } else {
90 spurious_interrupt();
91 }
92}
93
94static struct irqaction cascade_irqaction = {
95 .handler = no_action,
96 .mask = CPU_MASK_NONE,
97 .name = "cascade",
98};
99
100void __init arch_init_irq(void)
101{
102 extern void bonito_irq_init(void);
103
104 /*
105 * Clear all of the interrupts while we change the able around a bit.
106 * int-handler is not on bootstrap
107 */
108 clear_c0_status(ST0_IM | ST0_BEV);
109 local_irq_disable();
110
111 /* most bonito irq should be level triggered */
112 BONITO_INTEDGE = BONITO_ICU_SYSTEMERR | BONITO_ICU_MASTERERR |
113 BONITO_ICU_RETRYERR | BONITO_ICU_MBOXES;
114 BONITO_INTSTEER = 0;
115
116 /*
117 * Mask out all interrupt by writing "1" to all bit position in
118 * the interrupt reset reg.
119 */
120 BONITO_INTENCLR = ~0;
121
122 /* init all controller
123 * 0-15 ------> i8259 interrupt
124 * 16-23 ------> mips cpu interrupt
125 * 32-63 ------> bonito irq
126 */
127
128 /* Sets the first-level interrupt dispatcher. */
129 mips_cpu_irq_init();
130 init_i8259_irqs();
131 bonito_irq_init();
132
133 /*
134 printk("GPIODATA=%x, GPIOIE=%x\n", BONITO_GPIODATA, BONITO_GPIOIE);
135 printk("INTEN=%x, INTSET=%x, INTCLR=%x, INTISR=%x\n",
136 BONITO_INTEN, BONITO_INTENSET,
137 BONITO_INTENCLR, BONITO_INTISR);
138 */
139
140 /* bonito irq at IP2 */
141 setup_irq(MIPS_CPU_IRQ_BASE + 2, &cascade_irqaction);
142 /* 8259 irq at IP5 */
143 setup_irq(MIPS_CPU_IRQ_BASE + 5, &cascade_irqaction);
144
145}
diff --git a/arch/mips/lemote/lm2e/mem.c b/arch/mips/lemote/lm2e/mem.c
new file mode 100644
index 000000000000..16cd21587d34
--- /dev/null
+++ b/arch/mips/lemote/lm2e/mem.c
@@ -0,0 +1,23 @@
1/*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the License, or (at your
5 * option) any later version.
6 */
7#include <linux/fs.h>
8#include <linux/fcntl.h>
9#include <linux/mm.h>
10
11/* override of arch/mips/mm/cache.c: __uncached_access */
12int __uncached_access(struct file *file, unsigned long addr)
13{
14 if (file->f_flags & O_SYNC)
15 return 1;
16
17 /*
18 * On the Lemote Loongson 2e system, the peripheral registers
19 * reside between 0x1000:0000 and 0x2000:0000.
20 */
21 return addr >= __pa(high_memory) ||
22 ((addr >= 0x10000000) && (addr < 0x20000000));
23}
diff --git a/arch/mips/lemote/lm2e/pci.c b/arch/mips/lemote/lm2e/pci.c
new file mode 100644
index 000000000000..1ade1cef3899
--- /dev/null
+++ b/arch/mips/lemote/lm2e/pci.c
@@ -0,0 +1,93 @@
1/*
2 * pci.c
3 *
4 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
5 * Author: Fuxin Zhang, zhangfx@lemote.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 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 *
27 */
28#include <linux/types.h>
29#include <linux/pci.h>
30#include <linux/kernel.h>
31#include <linux/init.h>
32#include <asm/mips-boards/bonito64.h>
33
34extern struct pci_ops bonito64_pci_ops;
35
36static struct resource loongson2e_pci_mem_resource = {
37 .name = "LOONGSON2E PCI MEM",
38 .start = 0x14000000UL,
39 .end = 0x1fffffffUL,
40 .flags = IORESOURCE_MEM,
41};
42
43static struct resource loongson2e_pci_io_resource = {
44 .name = "LOONGSON2E PCI IO MEM",
45 .start = 0x00004000UL,
46 .end = IO_SPACE_LIMIT,
47 .flags = IORESOURCE_IO,
48};
49
50static struct pci_controller loongson2e_pci_controller = {
51 .pci_ops = &bonito64_pci_ops,
52 .io_resource = &loongson2e_pci_io_resource,
53 .mem_resource = &loongson2e_pci_mem_resource,
54 .mem_offset = 0x00000000UL,
55 .io_offset = 0x00000000UL,
56};
57
58static void __init ict_pcimap(void)
59{
60 /*
61 * local to PCI mapping: [256M,512M] -> [256M,512M]; differ from PMON
62 *
63 * CPU address space [256M,448M] is window for accessing pci space
64 * we set pcimap_lo[0,1,2] to map it to pci space [256M,448M]
65 * pcimap: bit18,pcimap_2; bit[17-12],lo2;bit[11-6],lo1;bit[5-0],lo0
66 */
67 /* 1,00 0110 ,0001 01,00 0000 */
68 BONITO_PCIMAP = 0x46140;
69
70 /* 1, 00 0010, 0000,01, 00 0000 */
71 /* BONITO_PCIMAP = 0x42040; */
72
73 /*
74 * PCI to local mapping: [2G,2G+256M] -> [0,256M]
75 */
76 BONITO_PCIBASE0 = 0x80000000;
77 BONITO_PCIBASE1 = 0x00800000;
78 BONITO_PCIBASE2 = 0x90000000;
79
80}
81
82static int __init pcibios_init(void)
83{
84 extern int pci_probe_only;
85 pci_probe_only = 0;
86
87 ict_pcimap();
88 register_pci_controller(&loongson2e_pci_controller);
89
90 return 0;
91}
92
93arch_initcall(pcibios_init);
diff --git a/arch/mips/lemote/lm2e/prom.c b/arch/mips/lemote/lm2e/prom.c
new file mode 100644
index 000000000000..67312d7acf2a
--- /dev/null
+++ b/arch/mips/lemote/lm2e/prom.c
@@ -0,0 +1,104 @@
1/*
2 * Based on Ocelot Linux port, which is
3 * Copyright 2001 MontaVista Software Inc.
4 * Author: jsun@mvista.com or jsun@junsun.net
5 *
6 * Copyright 2003 ICT CAS
7 * Author: Michael Guo <guoyi@ict.ac.cn>
8 *
9 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
10 * Author: Fuxin Zhang, zhangfx@lemote.com
11 *
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
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17#include <linux/init.h>
18#include <linux/mm.h>
19#include <linux/sched.h>
20#include <linux/bootmem.h>
21
22#include <asm/addrspace.h>
23#include <asm/bootinfo.h>
24
25extern unsigned long bus_clock;
26extern unsigned long cpu_clock;
27extern unsigned int memsize, highmemsize;
28extern int putDebugChar(unsigned char byte);
29
30static int argc;
31/* pmon passes arguments in 32bit pointers */
32static int *arg;
33static int *env;
34
35const char *get_system_type(void)
36{
37 return "lemote-fulong";
38}
39
40void __init prom_init_cmdline(void)
41{
42 int i;
43 long l;
44
45 /* arg[0] is "g", the rest is boot parameters */
46 arcs_cmdline[0] = '\0';
47 for (i = 1; i < argc; i++) {
48 l = (long)arg[i];
49 if (strlen(arcs_cmdline) + strlen(((char *)l) + 1)
50 >= sizeof(arcs_cmdline))
51 break;
52 strcat(arcs_cmdline, ((char *)l));
53 strcat(arcs_cmdline, " ");
54 }
55}
56
57void __init prom_init(void)
58{
59 long l;
60 argc = fw_arg0;
61 arg = (int *)fw_arg1;
62 env = (int *)fw_arg2;
63
64 mips_machgroup = MACH_GROUP_LEMOTE;
65 mips_machtype = MACH_LEMOTE_FULONG;
66
67 prom_init_cmdline();
68
69 if ((strstr(arcs_cmdline, "console=")) == NULL)
70 strcat(arcs_cmdline, " console=ttyS0,115200");
71 if ((strstr(arcs_cmdline, "root=")) == NULL)
72 strcat(arcs_cmdline, " root=/dev/hda1");
73
74#define parse_even_earlier(res, option, p) \
75do { \
76 if (strncmp(option, (char *)p, strlen(option)) == 0) \
77 res = simple_strtol((char *)p + strlen(option"="), \
78 NULL, 10); \
79} while (0)
80
81 l = (long)*env;
82 while (l != 0) {
83 parse_even_earlier(bus_clock, "busclock", l);
84 parse_even_earlier(cpu_clock, "cpuclock", l);
85 parse_even_earlier(memsize, "memsize", l);
86 parse_even_earlier(highmemsize, "highmemsize", l);
87 env++;
88 l = (long)*env;
89 }
90 if (memsize == 0)
91 memsize = 256;
92
93 pr_info("busclock=%ld, cpuclock=%ld,memsize=%d,highmemsize=%d\n",
94 bus_clock, cpu_clock, memsize, highmemsize);
95}
96
97void __init prom_free_prom_memory(void)
98{
99}
100
101void prom_putchar(char c)
102{
103 putDebugChar(c);
104}
diff --git a/arch/mips/lemote/lm2e/reset.c b/arch/mips/lemote/lm2e/reset.c
new file mode 100644
index 000000000000..099387a3827a
--- /dev/null
+++ b/arch/mips/lemote/lm2e/reset.c
@@ -0,0 +1,41 @@
1/*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the License, or (at your
5 * option) any later version.
6 *
7 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
8 * Author: Fuxin Zhang, zhangfx@lemote.com
9 */
10#include <linux/pm.h>
11
12#include <asm/reboot.h>
13
14static void loongson2e_restart(char *command)
15{
16#ifdef CONFIG_32BIT
17 *(unsigned long *)0xbfe00104 &= ~(1 << 2);
18 *(unsigned long *)0xbfe00104 |= (1 << 2);
19#else
20 *(unsigned long *)0xffffffffbfe00104 &= ~(1 << 2);
21 *(unsigned long *)0xffffffffbfe00104 |= (1 << 2);
22#endif
23 __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000));
24}
25
26static void loongson2e_halt(void)
27{
28 while (1) ;
29}
30
31static void loongson2e_power_off(void)
32{
33 loongson2e_halt();
34}
35
36void mips_reboot_setup(void)
37{
38 _machine_restart = loongson2e_restart;
39 _machine_halt = loongson2e_halt;
40 pm_power_off = loongson2e_power_off;
41}
diff --git a/arch/mips/lemote/lm2e/setup.c b/arch/mips/lemote/lm2e/setup.c
new file mode 100644
index 000000000000..0e4d1fa572b5
--- /dev/null
+++ b/arch/mips/lemote/lm2e/setup.c
@@ -0,0 +1,134 @@
1/*
2 * BRIEF MODULE DESCRIPTION
3 * setup.c - board dependent boot routines
4 *
5 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
6 * Author: Fuxin Zhang, zhangfx@lemote.com
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 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 *
28 */
29#include <linux/bootmem.h>
30#include <linux/init.h>
31#include <linux/io.h>
32#include <linux/ioport.h>
33#include <linux/interrupt.h>
34#include <linux/irq.h>
35#include <linux/kernel.h>
36#include <linux/mc146818rtc.h>
37#include <linux/mm.h>
38#include <linux/module.h>
39#include <linux/pci.h>
40#include <linux/tty.h>
41#include <linux/types.h>
42
43#include <asm/bootinfo.h>
44#include <asm/mc146818-time.h>
45#include <asm/time.h>
46#include <asm/wbflush.h>
47
48#ifdef CONFIG_VT
49#include <linux/console.h>
50#include <linux/screen_info.h>
51#endif
52
53extern void mips_reboot_setup(void);
54
55#ifdef CONFIG_64BIT
56#define PTR_PAD(p) ((0xffffffff00000000)|((unsigned long long)(p)))
57#else
58#define PTR_PAD(p) (p)
59#endif
60
61unsigned long cpu_clock;
62unsigned long bus_clock;
63unsigned int memsize;
64unsigned int highmemsize = 0;
65
66void __init plat_timer_setup(struct irqaction *irq)
67{
68 setup_irq(MIPS_CPU_IRQ_BASE + 7, irq);
69}
70
71static void __init loongson2e_time_init(void)
72{
73 /* setup mips r4k timer */
74 mips_hpt_frequency = cpu_clock / 2;
75}
76
77static unsigned long __init mips_rtc_get_time(void)
78{
79 return mc146818_get_cmos_time();
80}
81
82void (*__wbflush)(void);
83EXPORT_SYMBOL(__wbflush);
84
85static void wbflush_loongson2e(void)
86{
87 asm(".set\tpush\n\t"
88 ".set\tnoreorder\n\t"
89 ".set mips3\n\t"
90 "sync\n\t"
91 "nop\n\t"
92 ".set\tpop\n\t"
93 ".set mips0\n\t");
94}
95
96void __init plat_mem_setup(void)
97{
98 set_io_port_base(PTR_PAD(0xbfd00000));
99
100 mips_reboot_setup();
101
102 board_time_init = loongson2e_time_init;
103 rtc_mips_get_time = mips_rtc_get_time;
104
105 __wbflush = wbflush_loongson2e;
106
107 add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM);
108#ifdef CONFIG_64BIT
109 if (highmemsize > 0) {
110 add_memory_region(0x20000000, highmemsize << 20, BOOT_MEM_RAM);
111 }
112#endif
113
114#ifdef CONFIG_VT
115#if defined(CONFIG_VGA_CONSOLE)
116 conswitchp = &vga_con;
117
118 screen_info = (struct screen_info) {
119 0, 25, /* orig-x, orig-y */
120 0, /* unused */
121 0, /* orig-video-page */
122 0, /* orig-video-mode */
123 80, /* orig-video-cols */
124 0, 0, 0, /* ega_ax, ega_bx, ega_cx */
125 25, /* orig-video-lines */
126 VIDEO_TYPE_VGAC, /* orig-video-isVGA */
127 16 /* orig-video-points */
128 };
129#elif defined(CONFIG_DUMMY_CONSOLE)
130 conswitchp = &dummy_con;
131#endif
132#endif
133
134}
diff --git a/arch/mips/lib-32/Makefile b/arch/mips/lib-32/Makefile
deleted file mode 100644
index 8b94d4cc5a30..000000000000
--- a/arch/mips/lib-32/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
1#
2# Makefile for MIPS-specific library files..
3#
4
5lib-y += watch.o
6
7obj-$(CONFIG_CPU_MIPS32) += dump_tlb.o
8obj-$(CONFIG_CPU_MIPS64) += dump_tlb.o
9obj-$(CONFIG_CPU_NEVADA) += dump_tlb.o
10obj-$(CONFIG_CPU_R10000) += dump_tlb.o
11obj-$(CONFIG_CPU_R3000) += r3k_dump_tlb.o
12obj-$(CONFIG_CPU_R4300) += dump_tlb.o
13obj-$(CONFIG_CPU_R4X00) += dump_tlb.o
14obj-$(CONFIG_CPU_R5000) += dump_tlb.o
15obj-$(CONFIG_CPU_R5432) += dump_tlb.o
16obj-$(CONFIG_CPU_R6000) +=
17obj-$(CONFIG_CPU_R8000) +=
18obj-$(CONFIG_CPU_RM7000) += dump_tlb.o
19obj-$(CONFIG_CPU_RM9000) += dump_tlb.o
20obj-$(CONFIG_CPU_SB1) += dump_tlb.o
21obj-$(CONFIG_CPU_TX39XX) += r3k_dump_tlb.o
22obj-$(CONFIG_CPU_TX49XX) += dump_tlb.o
23obj-$(CONFIG_CPU_VR41XX) += dump_tlb.o
diff --git a/arch/mips/lib-32/dump_tlb.c b/arch/mips/lib-32/dump_tlb.c
deleted file mode 100644
index 6a68deb51aae..000000000000
--- a/arch/mips/lib-32/dump_tlb.c
+++ /dev/null
@@ -1,242 +0,0 @@
1/*
2 * Dump R4x00 TLB for debugging purposes.
3 *
4 * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle.
5 * Copyright (C) 1999 by Silicon Graphics, Inc.
6 */
7#include <linux/kernel.h>
8#include <linux/mm.h>
9#include <linux/sched.h>
10#include <linux/string.h>
11
12#include <asm/bootinfo.h>
13#include <asm/cachectl.h>
14#include <asm/cpu.h>
15#include <asm/mipsregs.h>
16#include <asm/page.h>
17#include <asm/pgtable.h>
18
19static inline const char *msk2str(unsigned int mask)
20{
21 switch (mask) {
22 case PM_4K:
23 return "4kb";
24 case PM_16K:
25 return "16kb";
26 case PM_64K:
27 return "64kb";
28 case PM_256K:
29 return "256kb";
30#ifndef CONFIG_CPU_VR41XX
31 case PM_1M:
32 return "1Mb";
33 case PM_4M:
34 return "4Mb";
35 case PM_16M:
36 return "16Mb";
37 case PM_64M:
38 return "64Mb";
39 case PM_256M:
40 return "256Mb";
41#endif
42 }
43
44 return "unknown";
45}
46
47#define BARRIER() \
48 __asm__ __volatile__( \
49 ".set\tnoreorder\n\t" \
50 "nop;nop;nop;nop;nop;nop;nop\n\t" \
51 ".set\treorder");
52
53void dump_tlb(int first, int last)
54{
55 unsigned int pagemask, c0, c1, asid;
56 unsigned long long entrylo0, entrylo1;
57 unsigned long entryhi;
58 int i;
59
60 asid = read_c0_entryhi() & 0xff;
61
62 printk("\n");
63 for (i = first; i <= last; i++) {
64 write_c0_index(i);
65 BARRIER();
66 tlb_read();
67 BARRIER();
68 pagemask = read_c0_pagemask();
69 entryhi = read_c0_entryhi();
70 entrylo0 = read_c0_entrylo0();
71 entrylo1 = read_c0_entrylo1();
72
73 /* Unused entries have a virtual address in KSEG0. */
74 if ((entryhi & 0xf0000000) != 0x80000000
75 && (entryhi & 0xff) == asid) {
76 /*
77 * Only print entries in use
78 */
79 printk("Index: %2d pgmask=%s ", i, msk2str(pagemask));
80
81 c0 = (entrylo0 >> 3) & 7;
82 c1 = (entrylo1 >> 3) & 7;
83
84 printk("va=%08lx asid=%02lx\n",
85 (entryhi & 0xffffe000), (entryhi & 0xff));
86 printk("\t\t\t[pa=%08Lx c=%d d=%d v=%d g=%Ld]\n",
87 (entrylo0 << 6) & PAGE_MASK, c0,
88 (entrylo0 & 4) ? 1 : 0,
89 (entrylo0 & 2) ? 1 : 0, (entrylo0 & 1));
90 printk("\t\t\t[pa=%08Lx c=%d d=%d v=%d g=%Ld]\n",
91 (entrylo1 << 6) & PAGE_MASK, c1,
92 (entrylo1 & 4) ? 1 : 0,
93 (entrylo1 & 2) ? 1 : 0, (entrylo1 & 1));
94 printk("\n");
95 }
96 }
97
98 write_c0_entryhi(asid);
99}
100
101void dump_tlb_all(void)
102{
103 dump_tlb(0, current_cpu_data.tlbsize - 1);
104}
105
106void dump_tlb_wired(void)
107{
108 int wired;
109
110 wired = read_c0_wired();
111 printk("Wired: %d", wired);
112 dump_tlb(0, read_c0_wired());
113}
114
115void dump_tlb_addr(unsigned long addr)
116{
117 unsigned int flags, oldpid;
118 int index;
119
120 local_irq_save(flags);
121 oldpid = read_c0_entryhi() & 0xff;
122 BARRIER();
123 write_c0_entryhi((addr & PAGE_MASK) | oldpid);
124 BARRIER();
125 tlb_probe();
126 BARRIER();
127 index = read_c0_index();
128 write_c0_entryhi(oldpid);
129 local_irq_restore(flags);
130
131 if (index < 0) {
132 printk("No entry for address 0x%08lx in TLB\n", addr);
133 return;
134 }
135
136 printk("Entry %d maps address 0x%08lx\n", index, addr);
137 dump_tlb(index, index);
138}
139
140void dump_tlb_nonwired(void)
141{
142 dump_tlb(read_c0_wired(), current_cpu_data.tlbsize - 1);
143}
144
145void dump_list_process(struct task_struct *t, void *address)
146{
147 pgd_t *page_dir, *pgd;
148 pud_t *pud;
149 pmd_t *pmd;
150 pte_t *pte, page;
151 unsigned long addr, val;
152
153 addr = (unsigned long) address;
154
155 printk("Addr == %08lx\n", addr);
156 printk("task == %8p\n", t);
157 printk("task->mm == %8p\n", t->mm);
158 //printk("tasks->mm.pgd == %08x\n", (unsigned int) t->mm->pgd);
159
160 if (addr > KSEG0) {
161 page_dir = pgd_offset_k(0);
162 pgd = pgd_offset_k(addr);
163 } else if (t->mm) {
164 page_dir = pgd_offset(t->mm, 0);
165 pgd = pgd_offset(t->mm, addr);
166 } else {
167 printk("Current thread has no mm\n");
168 return;
169 }
170 printk("page_dir == %08x\n", (unsigned int) page_dir);
171 printk("pgd == %08x, ", (unsigned int) pgd);
172 pud = pud_offset(pgd, addr);
173 printk("pud == %08x, ", (unsigned int) pud);
174
175 pmd = pmd_offset(pud, addr);
176 printk("pmd == %08x, ", (unsigned int) pmd);
177
178 pte = pte_offset(pmd, addr);
179 printk("pte == %08x, ", (unsigned int) pte);
180
181 page = *pte;
182#ifdef CONFIG_64BIT_PHYS_ADDR
183 printk("page == %08Lx\n", pte_val(page));
184#else
185 printk("page == %08lx\n", pte_val(page));
186#endif
187
188 val = pte_val(page);
189 if (val & _PAGE_PRESENT)
190 printk("present ");
191 if (val & _PAGE_READ)
192 printk("read ");
193 if (val & _PAGE_WRITE)
194 printk("write ");
195 if (val & _PAGE_ACCESSED)
196 printk("accessed ");
197 if (val & _PAGE_MODIFIED)
198 printk("modified ");
199 if (val & _PAGE_R4KBUG)
200 printk("r4kbug ");
201 if (val & _PAGE_GLOBAL)
202 printk("global ");
203 if (val & _PAGE_VALID)
204 printk("valid ");
205 printk("\n");
206}
207
208void dump_list_current(void *address)
209{
210 dump_list_process(current, address);
211}
212
213unsigned int vtop(void *address)
214{
215 pgd_t *pgd;
216 pud_t *pud;
217 pmd_t *pmd;
218 pte_t *pte;
219 unsigned int addr, paddr;
220
221 addr = (unsigned long) address;
222 pgd = pgd_offset(current->mm, addr);
223 pud = pud_offset(pgd, addr);
224 pmd = pmd_offset(pud, addr);
225 pte = pte_offset(pmd, addr);
226 paddr = (KSEG1 | (unsigned int) pte_val(*pte)) & PAGE_MASK;
227 paddr |= (addr & ~PAGE_MASK);
228
229 return paddr;
230}
231
232void dump16(unsigned long *p)
233{
234 int i;
235
236 for (i = 0; i < 8; i++) {
237 printk("*%08lx == %08lx, ", (unsigned long) p, *p);
238 p++;
239 printk("*%08lx == %08lx\n", (unsigned long) p, *p);
240 p++;
241 }
242}
diff --git a/arch/mips/lib-32/r3k_dump_tlb.c b/arch/mips/lib-32/r3k_dump_tlb.c
deleted file mode 100644
index 4f2cb74f0766..000000000000
--- a/arch/mips/lib-32/r3k_dump_tlb.c
+++ /dev/null
@@ -1,182 +0,0 @@
1/*
2 * Dump R3000 TLB for debugging purposes.
3 *
4 * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle.
5 * Copyright (C) 1999 by Silicon Graphics, Inc.
6 * Copyright (C) 1999 by Harald Koerfgen
7 */
8#include <linux/kernel.h>
9#include <linux/mm.h>
10#include <linux/sched.h>
11#include <linux/string.h>
12
13#include <asm/bootinfo.h>
14#include <asm/cachectl.h>
15#include <asm/cpu.h>
16#include <asm/mipsregs.h>
17#include <asm/page.h>
18#include <asm/pgtable.h>
19
20extern int r3k_have_wired_reg; /* defined in tlb-r3k.c */
21
22void dump_tlb(int first, int last)
23{
24 int i;
25 unsigned int asid;
26 unsigned long entryhi, entrylo0;
27
28 asid = read_c0_entryhi() & 0xfc0;
29
30 for (i = first; i <= last; i++) {
31 write_c0_index(i<<8);
32 __asm__ __volatile__(
33 ".set\tnoreorder\n\t"
34 "tlbr\n\t"
35 "nop\n\t"
36 ".set\treorder");
37 entryhi = read_c0_entryhi();
38 entrylo0 = read_c0_entrylo0();
39
40 /* Unused entries have a virtual address of KSEG0. */
41 if ((entryhi & 0xffffe000) != 0x80000000
42 && (entryhi & 0xfc0) == asid) {
43 /*
44 * Only print entries in use
45 */
46 printk("Index: %2d ", i);
47
48 printk("va=%08lx asid=%08lx"
49 " [pa=%06lx n=%d d=%d v=%d g=%d]",
50 (entryhi & 0xffffe000),
51 entryhi & 0xfc0,
52 entrylo0 & PAGE_MASK,
53 (entrylo0 & (1 << 11)) ? 1 : 0,
54 (entrylo0 & (1 << 10)) ? 1 : 0,
55 (entrylo0 & (1 << 9)) ? 1 : 0,
56 (entrylo0 & (1 << 8)) ? 1 : 0);
57 }
58 }
59 printk("\n");
60
61 write_c0_entryhi(asid);
62}
63
64void dump_tlb_all(void)
65{
66 dump_tlb(0, current_cpu_data.tlbsize - 1);
67}
68
69void dump_tlb_wired(void)
70{
71 int wired = r3k_have_wired_reg ? read_c0_wired() : 8;
72
73 printk("Wired: %d", wired);
74 dump_tlb(0, wired - 1);
75}
76
77void dump_tlb_addr(unsigned long addr)
78{
79 unsigned long flags, oldpid;
80 int index;
81
82 local_irq_save(flags);
83 oldpid = read_c0_entryhi() & 0xff;
84 write_c0_entryhi((addr & PAGE_MASK) | oldpid);
85 tlb_probe();
86 index = read_c0_index();
87 write_c0_entryhi(oldpid);
88 local_irq_restore(flags);
89
90 if (index < 0) {
91 printk("No entry for address 0x%08lx in TLB\n", addr);
92 return;
93 }
94
95 printk("Entry %d maps address 0x%08lx\n", index, addr);
96 dump_tlb(index, index);
97}
98
99void dump_tlb_nonwired(void)
100{
101 int wired = r3k_have_wired_reg ? read_c0_wired() : 8;
102 dump_tlb(wired, current_cpu_data.tlbsize - 1);
103}
104
105void dump_list_process(struct task_struct *t, void *address)
106{
107 pgd_t *page_dir, *pgd;
108 pud_t *pud;
109 pmd_t *pmd;
110 pte_t *pte, page;
111 unsigned int addr;
112 unsigned long val;
113
114 addr = (unsigned int) address;
115
116 printk("Addr == %08x\n", addr);
117 printk("tasks->mm.pgd == %08x\n", (unsigned int) t->mm->pgd);
118
119 page_dir = pgd_offset(t->mm, 0);
120 printk("page_dir == %08x\n", (unsigned int) page_dir);
121
122 pgd = pgd_offset(t->mm, addr);
123 printk("pgd == %08x, ", (unsigned int) pgd);
124
125 pud = pud_offset(pgd, addr);
126 printk("pud == %08x, ", (unsigned int) pud);
127
128 pmd = pmd_offset(pud, addr);
129 printk("pmd == %08x, ", (unsigned int) pmd);
130
131 pte = pte_offset(pmd, addr);
132 printk("pte == %08x, ", (unsigned int) pte);
133
134 page = *pte;
135 printk("page == %08x\n", (unsigned int) pte_val(page));
136
137 val = pte_val(page);
138 if (val & _PAGE_PRESENT) printk("present ");
139 if (val & _PAGE_READ) printk("read ");
140 if (val & _PAGE_WRITE) printk("write ");
141 if (val & _PAGE_ACCESSED) printk("accessed ");
142 if (val & _PAGE_MODIFIED) printk("modified ");
143 if (val & _PAGE_GLOBAL) printk("global ");
144 if (val & _PAGE_VALID) printk("valid ");
145 printk("\n");
146}
147
148void dump_list_current(void *address)
149{
150 dump_list_process(current, address);
151}
152
153unsigned int vtop(void *address)
154{
155 pgd_t *pgd;
156 pud_t *pud;
157 pmd_t *pmd;
158 pte_t *pte;
159 unsigned int addr, paddr;
160
161 addr = (unsigned long) address;
162 pgd = pgd_offset(current->mm, addr);
163 pud = pud_offset(pgd, addr);
164 pmd = pmd_offset(pud, addr);
165 pte = pte_offset(pmd, addr);
166 paddr = (KSEG1 | (unsigned int) pte_val(*pte)) & PAGE_MASK;
167 paddr |= (addr & ~PAGE_MASK);
168
169 return paddr;
170}
171
172void dump16(unsigned long *p)
173{
174 int i;
175
176 for (i = 0; i < 8; i++) {
177 printk("*%08lx == %08lx, ", (unsigned long)p, *p);
178 p++;
179 printk("*%08lx == %08lx\n", (unsigned long)p, *p);
180 p++;
181 }
182}
diff --git a/arch/mips/lib-32/watch.S b/arch/mips/lib-32/watch.S
deleted file mode 100644
index 808b3af1a605..000000000000
--- a/arch/mips/lib-32/watch.S
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Kernel debug stuff to use the Watch registers.
7 * Useful to find stack overflows, dangling pointers etc.
8 *
9 * Copyright (C) 1995, 1996, 1999 by Ralf Baechle
10 */
11#include <asm/asm.h>
12#include <asm/mipsregs.h>
13#include <asm/regdef.h>
14
15 .set noreorder
16/*
17 * Parameter: a0 - logic address to watch
18 * Currently only KSEG0 addresses are allowed!
19 * a1 - set bit #1 to trap on load references
20 * bit #0 to trap on store references
21 * Results : none
22 */
23 LEAF(__watch_set)
24 li t0, 0x80000000
25 subu a0, t0
26 ori a0, 7
27 xori a0, 7
28 or a0, a1
29 mtc0 a0, CP0_WATCHLO
30 sw a0, watch_savelo
31
32 jr ra
33 mtc0 zero, CP0_WATCHHI
34 END(__watch_set)
35
36/*
37 * Parameter: none
38 * Results : none
39 */
40 LEAF(__watch_clear)
41 jr ra
42 mtc0 zero, CP0_WATCHLO
43 END(__watch_clear)
44
45/*
46 * Parameter: none
47 * Results : none
48 */
49 LEAF(__watch_reenable)
50 lw t0, watch_savelo
51 jr ra
52 mtc0 t0, CP0_WATCHLO
53 END(__watch_reenable)
54
55/*
56 * Saved value of the c0_watchlo register for watch_reenable()
57 */
58 .data
59watch_savelo: .word 0
60 .text
diff --git a/arch/mips/lib-64/Makefile b/arch/mips/lib-64/Makefile
deleted file mode 100644
index 8b94d4cc5a30..000000000000
--- a/arch/mips/lib-64/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
1#
2# Makefile for MIPS-specific library files..
3#
4
5lib-y += watch.o
6
7obj-$(CONFIG_CPU_MIPS32) += dump_tlb.o
8obj-$(CONFIG_CPU_MIPS64) += dump_tlb.o
9obj-$(CONFIG_CPU_NEVADA) += dump_tlb.o
10obj-$(CONFIG_CPU_R10000) += dump_tlb.o
11obj-$(CONFIG_CPU_R3000) += r3k_dump_tlb.o
12obj-$(CONFIG_CPU_R4300) += dump_tlb.o
13obj-$(CONFIG_CPU_R4X00) += dump_tlb.o
14obj-$(CONFIG_CPU_R5000) += dump_tlb.o
15obj-$(CONFIG_CPU_R5432) += dump_tlb.o
16obj-$(CONFIG_CPU_R6000) +=
17obj-$(CONFIG_CPU_R8000) +=
18obj-$(CONFIG_CPU_RM7000) += dump_tlb.o
19obj-$(CONFIG_CPU_RM9000) += dump_tlb.o
20obj-$(CONFIG_CPU_SB1) += dump_tlb.o
21obj-$(CONFIG_CPU_TX39XX) += r3k_dump_tlb.o
22obj-$(CONFIG_CPU_TX49XX) += dump_tlb.o
23obj-$(CONFIG_CPU_VR41XX) += dump_tlb.o
diff --git a/arch/mips/lib-64/dump_tlb.c b/arch/mips/lib-64/dump_tlb.c
deleted file mode 100644
index 594df1a05ecc..000000000000
--- a/arch/mips/lib-64/dump_tlb.c
+++ /dev/null
@@ -1,216 +0,0 @@
1/*
2 * Dump R4x00 TLB for debugging purposes.
3 *
4 * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle.
5 * Copyright (C) 1999 by Silicon Graphics, Inc.
6 */
7#include <linux/kernel.h>
8#include <linux/mm.h>
9#include <linux/sched.h>
10#include <linux/string.h>
11
12#include <asm/bootinfo.h>
13#include <asm/cachectl.h>
14#include <asm/cpu.h>
15#include <asm/mipsregs.h>
16#include <asm/page.h>
17#include <asm/pgtable.h>
18
19static inline const char *msk2str(unsigned int mask)
20{
21 switch (mask) {
22 case PM_4K: return "4kb";
23 case PM_16K: return "16kb";
24 case PM_64K: return "64kb";
25 case PM_256K: return "256kb";
26#ifndef CONFIG_CPU_VR41XX
27 case PM_1M: return "1Mb";
28 case PM_4M: return "4Mb";
29 case PM_16M: return "16Mb";
30 case PM_64M: return "64Mb";
31 case PM_256M: return "256Mb";
32#endif
33 }
34
35 return "unknown";
36}
37
38#define BARRIER() \
39 __asm__ __volatile__( \
40 ".set\tnoreorder\n\t" \
41 "nop;nop;nop;nop;nop;nop;nop\n\t" \
42 ".set\treorder");
43
44void dump_tlb(int first, int last)
45{
46 unsigned long s_entryhi, entryhi, entrylo0, entrylo1, asid;
47 unsigned int s_index, pagemask, c0, c1, i;
48
49 s_entryhi = read_c0_entryhi();
50 s_index = read_c0_index();
51 asid = s_entryhi & 0xff;
52
53 for (i = first; i <= last; i++) {
54 write_c0_index(i);
55 BARRIER();
56 tlb_read();
57 BARRIER();
58 pagemask = read_c0_pagemask();
59 entryhi = read_c0_entryhi();
60 entrylo0 = read_c0_entrylo0();
61 entrylo1 = read_c0_entrylo1();
62
63 /* Unused entries have a virtual address of CKSEG0. */
64 if ((entryhi & ~0x1ffffUL) != CKSEG0
65 && (entryhi & 0xff) == asid) {
66 /*
67 * Only print entries in use
68 */
69 printk("Index: %2d pgmask=%s ", i, msk2str(pagemask));
70
71 c0 = (entrylo0 >> 3) & 7;
72 c1 = (entrylo1 >> 3) & 7;
73
74 printk("va=%011lx asid=%02lx\n",
75 (entryhi & ~0x1fffUL),
76 entryhi & 0xff);
77 printk("\t[pa=%011lx c=%d d=%d v=%d g=%ld] ",
78 (entrylo0 << 6) & PAGE_MASK, c0,
79 (entrylo0 & 4) ? 1 : 0,
80 (entrylo0 & 2) ? 1 : 0,
81 (entrylo0 & 1));
82 printk("[pa=%011lx c=%d d=%d v=%d g=%ld]\n",
83 (entrylo1 << 6) & PAGE_MASK, c1,
84 (entrylo1 & 4) ? 1 : 0,
85 (entrylo1 & 2) ? 1 : 0,
86 (entrylo1 & 1));
87 }
88 }
89 printk("\n");
90
91 write_c0_entryhi(s_entryhi);
92 write_c0_index(s_index);
93}
94
95void dump_tlb_all(void)
96{
97 dump_tlb(0, current_cpu_data.tlbsize - 1);
98}
99
100void dump_tlb_wired(void)
101{
102 int wired;
103
104 wired = read_c0_wired();
105 printk("Wired: %d", wired);
106 dump_tlb(0, read_c0_wired());
107}
108
109void dump_tlb_addr(unsigned long addr)
110{
111 unsigned int flags, oldpid;
112 int index;
113
114 local_irq_save(flags);
115 oldpid = read_c0_entryhi() & 0xff;
116 BARRIER();
117 write_c0_entryhi((addr & PAGE_MASK) | oldpid);
118 BARRIER();
119 tlb_probe();
120 BARRIER();
121 index = read_c0_index();
122 write_c0_entryhi(oldpid);
123 local_irq_restore(flags);
124
125 if (index < 0) {
126 printk("No entry for address 0x%08lx in TLB\n", addr);
127 return;
128 }
129
130 printk("Entry %d maps address 0x%08lx\n", index, addr);
131 dump_tlb(index, index);
132}
133
134void dump_tlb_nonwired(void)
135{
136 dump_tlb(read_c0_wired(), current_cpu_data.tlbsize - 1);
137}
138
139void dump_list_process(struct task_struct *t, void *address)
140{
141 pgd_t *page_dir, *pgd;
142 pud_t *pud;
143 pmd_t *pmd;
144 pte_t *pte, page;
145 unsigned long addr, val;
146
147 addr = (unsigned long) address;
148
149 printk("Addr == %08lx\n", addr);
150 printk("tasks->mm.pgd == %08lx\n", (unsigned long) t->mm->pgd);
151
152 page_dir = pgd_offset(t->mm, 0UL);
153 printk("page_dir == %016lx\n", (unsigned long) page_dir);
154
155 pgd = pgd_offset(t->mm, addr);
156 printk("pgd == %016lx\n", (unsigned long) pgd);
157
158 pud = pud_offset(pgd, addr);
159 printk("pud == %016lx\n", (unsigned long) pud);
160
161 pmd = pmd_offset(pud, addr);
162 printk("pmd == %016lx\n", (unsigned long) pmd);
163
164 pte = pte_offset(pmd, addr);
165 printk("pte == %016lx\n", (unsigned long) pte);
166
167 page = *pte;
168 printk("page == %08lx\n", pte_val(page));
169
170 val = pte_val(page);
171 if (val & _PAGE_PRESENT) printk("present ");
172 if (val & _PAGE_READ) printk("read ");
173 if (val & _PAGE_WRITE) printk("write ");
174 if (val & _PAGE_ACCESSED) printk("accessed ");
175 if (val & _PAGE_MODIFIED) printk("modified ");
176 if (val & _PAGE_R4KBUG) printk("r4kbug ");
177 if (val & _PAGE_GLOBAL) printk("global ");
178 if (val & _PAGE_VALID) printk("valid ");
179 printk("\n");
180}
181
182void dump_list_current(void *address)
183{
184 dump_list_process(current, address);
185}
186
187unsigned long vtop(void *address)
188{
189 pgd_t *pgd;
190 pud_t *pud;
191 pmd_t *pmd;
192 pte_t *pte;
193 unsigned long addr, paddr;
194
195 addr = (unsigned long) address;
196 pgd = pgd_offset(current->mm, addr);
197 pud = pud_offset(pgd, addr);
198 pmd = pmd_offset(pud, addr);
199 pte = pte_offset(pmd, addr);
200 paddr = (CKSEG1 | (unsigned int) pte_val(*pte)) & PAGE_MASK;
201 paddr |= (addr & ~PAGE_MASK);
202
203 return paddr;
204}
205
206void dump16(unsigned long *p)
207{
208 int i;
209
210 for (i = 0; i < 8; i++) {
211 printk("*%08lx == %08lx, ", (unsigned long)p, *p);
212 p++;
213 printk("*%08lx == %08lx\n", (unsigned long)p, *p);
214 p++;
215 }
216}
diff --git a/arch/mips/lib-64/watch.S b/arch/mips/lib-64/watch.S
deleted file mode 100644
index f91434013695..000000000000
--- a/arch/mips/lib-64/watch.S
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Kernel debug stuff to use the Watch registers.
7 * Useful to find stack overflows, dangling pointers etc.
8 *
9 * Copyright (C) 1995, 1996, 1999, 2001 by Ralf Baechle
10 */
11#include <asm/asm.h>
12#include <asm/mipsregs.h>
13#include <asm/regdef.h>
14
15 .set noreorder
16/*
17 * Parameter: a0 - physical address to watch
18 * a1 - set bit #1 to trap on load references
19 * bit #0 to trap on store references
20 * Results : none
21 */
22 LEAF(__watch_set)
23 ori a0, 7
24 xori a0, 7
25 or a0, a1
26 mtc0 a0, CP0_WATCHLO
27 sd a0, watch_savelo
28 dsrl32 a0, a0, 0
29
30 jr ra
31 mtc0 zero, CP0_WATCHHI
32 END(__watch_set)
33
34/*
35 * Parameter: none
36 * Results : none
37 */
38 LEAF(__watch_clear)
39 jr ra
40 mtc0 zero, CP0_WATCHLO
41 END(__watch_clear)
42
43/*
44 * Parameter: none
45 * Results : none
46 */
47 LEAF(__watch_reenable)
48 ld t0, watch_savelo
49 jr ra
50 mtc0 t0, CP0_WATCHLO
51 END(__watch_reenable)
52
53/*
54 * Saved value of the c0_watchlo register for watch_reenable()
55 */
56 .local watch_savelo
57 .comm watch_savelo, 8, 8
diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile
index 5dad13efba7e..91ed1eb33102 100644
--- a/arch/mips/lib/Makefile
+++ b/arch/mips/lib/Makefile
@@ -8,5 +8,24 @@ lib-y += csum_partial.o memcpy.o memcpy-inatomic.o memset.o strlen_user.o \
8obj-y += iomap.o 8obj-y += iomap.o
9obj-$(CONFIG_PCI) += iomap-pci.o 9obj-$(CONFIG_PCI) += iomap-pci.o
10 10
11obj-$(CONFIG_CPU_LOONGSON2) += dump_tlb.o
12obj-$(CONFIG_CPU_MIPS32) += dump_tlb.o
13obj-$(CONFIG_CPU_MIPS64) += dump_tlb.o
14obj-$(CONFIG_CPU_NEVADA) += dump_tlb.o
15obj-$(CONFIG_CPU_R10000) += dump_tlb.o
16obj-$(CONFIG_CPU_R3000) += r3k_dump_tlb.o
17obj-$(CONFIG_CPU_R4300) += dump_tlb.o
18obj-$(CONFIG_CPU_R4X00) += dump_tlb.o
19obj-$(CONFIG_CPU_R5000) += dump_tlb.o
20obj-$(CONFIG_CPU_R5432) += dump_tlb.o
21obj-$(CONFIG_CPU_R6000) +=
22obj-$(CONFIG_CPU_R8000) +=
23obj-$(CONFIG_CPU_RM7000) += dump_tlb.o
24obj-$(CONFIG_CPU_RM9000) += dump_tlb.o
25obj-$(CONFIG_CPU_SB1) += dump_tlb.o
26obj-$(CONFIG_CPU_TX39XX) += r3k_dump_tlb.o
27obj-$(CONFIG_CPU_TX49XX) += dump_tlb.o
28obj-$(CONFIG_CPU_VR41XX) += dump_tlb.o
29
11# libgcc-style stuff needed in the kernel 30# libgcc-style stuff needed in the kernel
12lib-y += ashldi3.o ashrdi3.o lshrdi3.o ucmpdi2.o 31obj-y += ashldi3.o ashrdi3.o lshrdi3.o ucmpdi2.o
diff --git a/arch/mips/lib/dump_tlb.c b/arch/mips/lib/dump_tlb.c
new file mode 100644
index 000000000000..465ff0ec85b9
--- /dev/null
+++ b/arch/mips/lib/dump_tlb.c
@@ -0,0 +1,101 @@
1/*
2 * Dump R4x00 TLB for debugging purposes.
3 *
4 * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle.
5 * Copyright (C) 1999 by Silicon Graphics, Inc.
6 */
7#include <linux/kernel.h>
8#include <linux/mm.h>
9
10#include <asm/mipsregs.h>
11#include <asm/page.h>
12#include <asm/pgtable.h>
13#include <asm/tlbdebug.h>
14
15static inline const char *msk2str(unsigned int mask)
16{
17 switch (mask) {
18 case PM_4K: return "4kb";
19 case PM_16K: return "16kb";
20 case PM_64K: return "64kb";
21 case PM_256K: return "256kb";
22#ifndef CONFIG_CPU_VR41XX
23 case PM_1M: return "1Mb";
24 case PM_4M: return "4Mb";
25 case PM_16M: return "16Mb";
26 case PM_64M: return "64Mb";
27 case PM_256M: return "256Mb";
28#endif
29 }
30 return "";
31}
32
33#define BARRIER() \
34 __asm__ __volatile__( \
35 ".set\tnoreorder\n\t" \
36 "nop;nop;nop;nop;nop;nop;nop\n\t" \
37 ".set\treorder");
38
39static void dump_tlb(int first, int last)
40{
41 unsigned long s_entryhi, entryhi, asid;
42 unsigned long long entrylo0, entrylo1;
43 unsigned int s_index, pagemask, c0, c1, i;
44
45 s_entryhi = read_c0_entryhi();
46 s_index = read_c0_index();
47 asid = s_entryhi & 0xff;
48
49 for (i = first; i <= last; i++) {
50 write_c0_index(i);
51 BARRIER();
52 tlb_read();
53 BARRIER();
54 pagemask = read_c0_pagemask();
55 entryhi = read_c0_entryhi();
56 entrylo0 = read_c0_entrylo0();
57 entrylo1 = read_c0_entrylo1();
58
59 /* Unused entries have a virtual address of CKSEG0. */
60 if ((entryhi & ~0x1ffffUL) != CKSEG0
61 && (entryhi & 0xff) == asid) {
62#ifdef CONFIG_32BIT
63 int width = 8;
64#else
65 int width = 11;
66#endif
67 /*
68 * Only print entries in use
69 */
70 printk("Index: %2d pgmask=%s ", i, msk2str(pagemask));
71
72 c0 = (entrylo0 >> 3) & 7;
73 c1 = (entrylo1 >> 3) & 7;
74
75 printk("va=%0*lx asid=%02lx\n",
76 width, (entryhi & ~0x1fffUL),
77 entryhi & 0xff);
78 printk("\t[pa=%0*llx c=%d d=%d v=%d g=%d] ",
79 width,
80 (entrylo0 << 6) & PAGE_MASK, c0,
81 (entrylo0 & 4) ? 1 : 0,
82 (entrylo0 & 2) ? 1 : 0,
83 (entrylo0 & 1) ? 1 : 0);
84 printk("[pa=%0*llx c=%d d=%d v=%d g=%d]\n",
85 width,
86 (entrylo1 << 6) & PAGE_MASK, c1,
87 (entrylo1 & 4) ? 1 : 0,
88 (entrylo1 & 2) ? 1 : 0,
89 (entrylo1 & 1) ? 1 : 0);
90 }
91 }
92 printk("\n");
93
94 write_c0_entryhi(s_entryhi);
95 write_c0_index(s_index);
96}
97
98void dump_tlb_all(void)
99{
100 dump_tlb(0, current_cpu_data.tlbsize - 1);
101}
diff --git a/arch/mips/lib/r3k_dump_tlb.c b/arch/mips/lib/r3k_dump_tlb.c
new file mode 100644
index 000000000000..9cee907975ae
--- /dev/null
+++ b/arch/mips/lib/r3k_dump_tlb.c
@@ -0,0 +1,63 @@
1/*
2 * Dump R3000 TLB for debugging purposes.
3 *
4 * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle.
5 * Copyright (C) 1999 by Silicon Graphics, Inc.
6 * Copyright (C) 1999 by Harald Koerfgen
7 */
8#include <linux/kernel.h>
9#include <linux/mm.h>
10
11#include <asm/mipsregs.h>
12#include <asm/page.h>
13#include <asm/pgtable.h>
14#include <asm/tlbdebug.h>
15
16extern int r3k_have_wired_reg; /* defined in tlb-r3k.c */
17
18static void dump_tlb(int first, int last)
19{
20 int i;
21 unsigned int asid;
22 unsigned long entryhi, entrylo0;
23
24 asid = read_c0_entryhi() & 0xfc0;
25
26 for (i = first; i <= last; i++) {
27 write_c0_index(i<<8);
28 __asm__ __volatile__(
29 ".set\tnoreorder\n\t"
30 "tlbr\n\t"
31 "nop\n\t"
32 ".set\treorder");
33 entryhi = read_c0_entryhi();
34 entrylo0 = read_c0_entrylo0();
35
36 /* Unused entries have a virtual address of KSEG0. */
37 if ((entryhi & 0xffffe000) != 0x80000000
38 && (entryhi & 0xfc0) == asid) {
39 /*
40 * Only print entries in use
41 */
42 printk("Index: %2d ", i);
43
44 printk("va=%08lx asid=%08lx"
45 " [pa=%06lx n=%d d=%d v=%d g=%d]",
46 (entryhi & 0xffffe000),
47 entryhi & 0xfc0,
48 entrylo0 & PAGE_MASK,
49 (entrylo0 & (1 << 11)) ? 1 : 0,
50 (entrylo0 & (1 << 10)) ? 1 : 0,
51 (entrylo0 & (1 << 9)) ? 1 : 0,
52 (entrylo0 & (1 << 8)) ? 1 : 0);
53 }
54 }
55 printk("\n");
56
57 write_c0_entryhi(asid);
58}
59
60void dump_tlb_all(void)
61{
62 dump_tlb(0, current_cpu_data.tlbsize - 1);
63}
diff --git a/arch/mips/lib/ucmpdi2.c b/arch/mips/lib/ucmpdi2.c
index e9ff258ef028..e2ff6072b5a3 100644
--- a/arch/mips/lib/ucmpdi2.c
+++ b/arch/mips/lib/ucmpdi2.c
@@ -2,7 +2,7 @@
2 2
3#include "libgcc.h" 3#include "libgcc.h"
4 4
5word_type __ucmpdi2 (unsigned long a, unsigned long b) 5word_type __ucmpdi2 (unsigned long long a, unsigned long long b)
6{ 6{
7 const DWunion au = {.ll = a}; 7 const DWunion au = {.ll = a};
8 const DWunion bu = {.ll = b}; 8 const DWunion bu = {.ll = b};
diff --git a/arch/mips/lib/uncached.c b/arch/mips/lib/uncached.c
index 2388f7f3ffde..58d14f4d9349 100644
--- a/arch/mips/lib/uncached.c
+++ b/arch/mips/lib/uncached.c
@@ -12,6 +12,7 @@
12 12
13#include <asm/addrspace.h> 13#include <asm/addrspace.h>
14#include <asm/bug.h> 14#include <asm/bug.h>
15#include <asm/cacheflush.h>
15 16
16#ifndef CKSEG2 17#ifndef CKSEG2
17#define CKSEG2 CKSSEG 18#define CKSEG2 CKSSEG
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index 80531b35cd61..17419e11ecad 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -35,6 +35,7 @@
35 * better performance by compiling with -msoft-float! 35 * better performance by compiling with -msoft-float!
36 */ 36 */
37#include <linux/sched.h> 37#include <linux/sched.h>
38#include <linux/debugfs.h>
38 39
39#include <asm/inst.h> 40#include <asm/inst.h>
40#include <asm/bootinfo.h> 41#include <asm/bootinfo.h>
@@ -204,7 +205,7 @@ static int isBranchInstr(mips_instruction * i)
204static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx) 205static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
205{ 206{
206 mips_instruction ir; 207 mips_instruction ir;
207 void * emulpc, *contpc; 208 unsigned long emulpc, contpc;
208 unsigned int cond; 209 unsigned int cond;
209 210
210 if (get_user(ir, (mips_instruction __user *) xcp->cp0_epc)) { 211 if (get_user(ir, (mips_instruction __user *) xcp->cp0_epc)) {
@@ -229,7 +230,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
229 * Linux MIPS branch emulator operates on context, updating the 230 * Linux MIPS branch emulator operates on context, updating the
230 * cp0_epc. 231 * cp0_epc.
231 */ 232 */
232 emulpc = (void *) (xcp->cp0_epc + 4); /* Snapshot emulation target */ 233 emulpc = xcp->cp0_epc + 4; /* Snapshot emulation target */
233 234
234 if (__compute_return_epc(xcp)) { 235 if (__compute_return_epc(xcp)) {
235#ifdef CP1DBG 236#ifdef CP1DBG
@@ -243,12 +244,12 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
243 return SIGBUS; 244 return SIGBUS;
244 } 245 }
245 /* __compute_return_epc() will have updated cp0_epc */ 246 /* __compute_return_epc() will have updated cp0_epc */
246 contpc = (void *) xcp->cp0_epc; 247 contpc = xcp->cp0_epc;
247 /* In order not to confuse ptrace() et al, tweak context */ 248 /* In order not to confuse ptrace() et al, tweak context */
248 xcp->cp0_epc = (unsigned long) emulpc - 4; 249 xcp->cp0_epc = emulpc - 4;
249 } else { 250 } else {
250 emulpc = (void *) xcp->cp0_epc; 251 emulpc = xcp->cp0_epc;
251 contpc = (void *) (xcp->cp0_epc + 4); 252 contpc = xcp->cp0_epc + 4;
252 } 253 }
253 254
254 emul: 255 emul:
@@ -426,8 +427,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
426 * instruction 427 * instruction
427 */ 428 */
428 xcp->cp0_epc += 4; 429 xcp->cp0_epc += 4;
429 contpc = (void *) 430 contpc = (xcp->cp0_epc +
430 (xcp->cp0_epc +
431 (MIPSInst_SIMM(ir) << 2)); 431 (MIPSInst_SIMM(ir) << 2));
432 432
433 if (get_user(ir, 433 if (get_user(ir,
@@ -461,7 +461,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
461 * Single step the non-cp1 461 * Single step the non-cp1
462 * instruction in the dslot 462 * instruction in the dslot
463 */ 463 */
464 return mips_dsemul(xcp, ir, (unsigned long) contpc); 464 return mips_dsemul(xcp, ir, contpc);
465 } 465 }
466 else { 466 else {
467 /* branch not taken */ 467 /* branch not taken */
@@ -520,7 +520,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
520 } 520 }
521 521
522 /* we did it !! */ 522 /* we did it !! */
523 xcp->cp0_epc = (unsigned long) contpc; 523 xcp->cp0_epc = contpc;
524 xcp->cp0_cause &= ~CAUSEF_BD; 524 xcp->cp0_cause &= ~CAUSEF_BD;
525 525
526 return 0; 526 return 0;
@@ -1277,3 +1277,36 @@ int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
1277 1277
1278 return sig; 1278 return sig;
1279} 1279}
1280
1281#ifdef CONFIG_DEBUG_FS
1282extern struct dentry *mips_debugfs_dir;
1283static int __init debugfs_fpuemu(void)
1284{
1285 struct dentry *d, *dir;
1286 int i;
1287 static struct {
1288 const char *name;
1289 unsigned int *v;
1290 } vars[] __initdata = {
1291 { "emulated", &fpuemustats.emulated },
1292 { "loads", &fpuemustats.loads },
1293 { "stores", &fpuemustats.stores },
1294 { "cp1ops", &fpuemustats.cp1ops },
1295 { "cp1xops", &fpuemustats.cp1xops },
1296 { "errors", &fpuemustats.errors },
1297 };
1298
1299 if (!mips_debugfs_dir)
1300 return -ENODEV;
1301 dir = debugfs_create_dir("fpuemustats", mips_debugfs_dir);
1302 if (IS_ERR(dir))
1303 return PTR_ERR(dir);
1304 for (i = 0; i < ARRAY_SIZE(vars); i++) {
1305 d = debugfs_create_u32(vars[i].name, S_IRUGO, dir, vars[i].v);
1306 if (IS_ERR(d))
1307 return PTR_ERR(d);
1308 }
1309 return 0;
1310}
1311__initcall(debugfs_fpuemu);
1312#endif
diff --git a/arch/mips/math-emu/dsemul.c b/arch/mips/math-emu/dsemul.c
index ea6ba7248489..653e325849e4 100644
--- a/arch/mips/math-emu/dsemul.c
+++ b/arch/mips/math-emu/dsemul.c
@@ -54,8 +54,7 @@ struct emuframe {
54int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc) 54int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc)
55{ 55{
56 extern asmlinkage void handle_dsemulret(void); 56 extern asmlinkage void handle_dsemulret(void);
57 mips_instruction *dsemul_insns; 57 struct emuframe __user *fr;
58 struct emuframe *fr;
59 int err; 58 int err;
60 59
61 if (ir == 0) { /* a nop is easy */ 60 if (ir == 0) { /* a nop is easy */
@@ -87,8 +86,8 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc)
87 */ 86 */
88 87
89 /* Ensure that the two instructions are in the same cache line */ 88 /* Ensure that the two instructions are in the same cache line */
90 dsemul_insns = (mips_instruction *) ((regs->regs[29] - sizeof(struct emuframe)) & ~0x7); 89 fr = (struct emuframe __user *)
91 fr = (struct emuframe *) dsemul_insns; 90 ((regs->regs[29] - sizeof(struct emuframe)) & ~0x7);
92 91
93 /* Verify that the stack pointer is not competely insane */ 92 /* Verify that the stack pointer is not competely insane */
94 if (unlikely(!access_ok(VERIFY_WRITE, fr, sizeof(struct emuframe)))) 93 if (unlikely(!access_ok(VERIFY_WRITE, fr, sizeof(struct emuframe))))
@@ -113,12 +112,13 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc)
113 112
114int do_dsemulret(struct pt_regs *xcp) 113int do_dsemulret(struct pt_regs *xcp)
115{ 114{
116 struct emuframe *fr; 115 struct emuframe __user *fr;
117 unsigned long epc; 116 unsigned long epc;
118 u32 insn, cookie; 117 u32 insn, cookie;
119 int err = 0; 118 int err = 0;
120 119
121 fr = (struct emuframe *) (xcp->cp0_epc - sizeof(mips_instruction)); 120 fr = (struct emuframe __user *)
121 (xcp->cp0_epc - sizeof(mips_instruction));
122 122
123 /* 123 /*
124 * If we can't even access the area, something is very wrong, but we'll 124 * If we can't even access the area, something is very wrong, but we'll
diff --git a/arch/mips/mips-boards/atlas/atlas_int.c b/arch/mips/mips-boards/atlas/atlas_int.c
index dfa0acbd7fc2..6c8f0255e85d 100644
--- a/arch/mips/mips-boards/atlas/atlas_int.c
+++ b/arch/mips/mips-boards/atlas/atlas_int.c
@@ -189,7 +189,7 @@ asmlinkage void plat_irq_dispatch(void)
189 if (irq == MIPSCPU_INT_ATLAS) 189 if (irq == MIPSCPU_INT_ATLAS)
190 atlas_hw0_irqdispatch(); 190 atlas_hw0_irqdispatch();
191 else if (irq >= 0) 191 else if (irq >= 0)
192 do_IRQ(MIPSCPU_INT_BASE + irq); 192 do_IRQ(MIPS_CPU_IRQ_BASE + irq);
193 else 193 else
194 spurious_interrupt(); 194 spurious_interrupt();
195} 195}
@@ -248,25 +248,24 @@ void __init arch_init_irq(void)
248 case MIPS_REVISION_CORID_CORE_24K: 248 case MIPS_REVISION_CORID_CORE_24K:
249 case MIPS_REVISION_CORID_CORE_EMUL_MSC: 249 case MIPS_REVISION_CORID_CORE_EMUL_MSC:
250 if (cpu_has_veic) 250 if (cpu_has_veic)
251 init_msc_irqs (MSC01E_INT_BASE, 251 init_msc_irqs (MSC01E_INT_BASE, MSC01E_INT_BASE,
252 msc_eicirqmap, msc_nr_eicirqs); 252 msc_eicirqmap, msc_nr_eicirqs);
253 else 253 else
254 init_msc_irqs (MSC01C_INT_BASE, 254 init_msc_irqs (MSC01E_INT_BASE, MSC01C_INT_BASE,
255 msc_irqmap, msc_nr_irqs); 255 msc_irqmap, msc_nr_irqs);
256 } 256 }
257 257
258
259 if (cpu_has_veic) { 258 if (cpu_has_veic) {
260 set_vi_handler (MSC01E_INT_ATLAS, atlas_hw0_irqdispatch); 259 set_vi_handler (MSC01E_INT_ATLAS, atlas_hw0_irqdispatch);
261 setup_irq (MSC01E_INT_BASE + MSC01E_INT_ATLAS, &atlasirq); 260 setup_irq (MSC01E_INT_BASE + MSC01E_INT_ATLAS, &atlasirq);
262 } else if (cpu_has_vint) { 261 } else if (cpu_has_vint) {
263 set_vi_handler (MIPSCPU_INT_ATLAS, atlas_hw0_irqdispatch); 262 set_vi_handler (MIPSCPU_INT_ATLAS, atlas_hw0_irqdispatch);
264#ifdef CONFIG_MIPS_MT_SMTC 263#ifdef CONFIG_MIPS_MT_SMTC
265 setup_irq_smtc (MIPSCPU_INT_BASE + MIPSCPU_INT_ATLAS, 264 setup_irq_smtc (MIPS_CPU_IRQ_BASE + MIPSCPU_INT_ATLAS,
266 &atlasirq, (0x100 << MIPSCPU_INT_ATLAS)); 265 &atlasirq, (0x100 << MIPSCPU_INT_ATLAS));
267#else /* Not SMTC */ 266#else /* Not SMTC */
268 setup_irq(MIPSCPU_INT_BASE + MIPSCPU_INT_ATLAS, &atlasirq); 267 setup_irq(MIPS_CPU_IRQ_BASE + MIPSCPU_INT_ATLAS, &atlasirq);
269#endif /* CONFIG_MIPS_MT_SMTC */ 268#endif /* CONFIG_MIPS_MT_SMTC */
270 } else 269 } else
271 setup_irq(MIPSCPU_INT_BASE + MIPSCPU_INT_ATLAS, &atlasirq); 270 setup_irq(MIPS_CPU_IRQ_BASE + MIPSCPU_INT_ATLAS, &atlasirq);
272} 271}
diff --git a/arch/mips/mips-boards/atlas/atlas_setup.c b/arch/mips/mips-boards/atlas/atlas_setup.c
index 0c6b0ce15028..c68358a476dd 100644
--- a/arch/mips/mips-boards/atlas/atlas_setup.c
+++ b/arch/mips/mips-boards/atlas/atlas_setup.c
@@ -22,6 +22,7 @@
22#include <linux/tty.h> 22#include <linux/tty.h>
23#include <linux/serial.h> 23#include <linux/serial.h>
24#include <linux/serial_core.h> 24#include <linux/serial_core.h>
25#include <linux/serial_8250.h>
25 26
26#include <asm/cpu.h> 27#include <asm/cpu.h>
27#include <asm/bootinfo.h> 28#include <asm/bootinfo.h>
@@ -48,6 +49,8 @@ const char *get_system_type(void)
48 return "MIPS Atlas"; 49 return "MIPS Atlas";
49} 50}
50 51
52const char display_string[] = " LINUX ON ATLAS ";
53
51void __init plat_mem_setup(void) 54void __init plat_mem_setup(void)
52{ 55{
53 mips_pcibios_init(); 56 mips_pcibios_init();
diff --git a/arch/mips/mips-boards/generic/display.c b/arch/mips/mips-boards/generic/display.c
index 548dbe5ce7c8..5d600054090a 100644
--- a/arch/mips/mips-boards/generic/display.c
+++ b/arch/mips/mips-boards/generic/display.c
@@ -19,9 +19,14 @@
19 */ 19 */
20 20
21#include <linux/compiler.h> 21#include <linux/compiler.h>
22#include <linux/timer.h>
22#include <asm/io.h> 23#include <asm/io.h>
23#include <asm/mips-boards/generic.h> 24#include <asm/mips-boards/generic.h>
24 25
26extern const char display_string[];
27static unsigned int display_count;
28static unsigned int max_display_count;
29
25void mips_display_message(const char *str) 30void mips_display_message(const char *str)
26{ 31{
27 static unsigned int __iomem *display = NULL; 32 static unsigned int __iomem *display = NULL;
@@ -37,3 +42,22 @@ void mips_display_message(const char *str)
37 writel(' ', display + i); 42 writel(' ', display + i);
38 } 43 }
39} 44}
45
46static void scroll_display_message(unsigned long data);
47static DEFINE_TIMER(mips_scroll_timer, scroll_display_message, HZ, 0);
48
49static void scroll_display_message(unsigned long data)
50{
51 mips_display_message(&display_string[display_count++]);
52 if (display_count == max_display_count)
53 display_count = 0;
54
55 mod_timer(&mips_scroll_timer, jiffies + HZ);
56}
57
58void mips_scroll_message(void)
59{
60 del_timer_sync(&mips_scroll_timer);
61 max_display_count = strlen(display_string) + 1 - 8;
62 mod_timer(&mips_scroll_timer, jiffies + 1);
63}
diff --git a/arch/mips/mips-boards/generic/init.c b/arch/mips/mips-boards/generic/init.c
index 88e9c2a7a2f9..4eabc1eadd23 100644
--- a/arch/mips/mips-boards/generic/init.c
+++ b/arch/mips/mips-boards/generic/init.c
@@ -57,7 +57,8 @@ int *_prom_argv, *_prom_envp;
57 57
58int init_debug = 0; 58int init_debug = 0;
59 59
60unsigned int mips_revision_corid; 60int mips_revision_corid;
61int mips_revision_sconid;
61 62
62/* Bonito64 system controller register base. */ 63/* Bonito64 system controller register base. */
63unsigned long _pcictrl_bonito; 64unsigned long _pcictrl_bonito;
@@ -275,13 +276,38 @@ void __init prom_init(void)
275 else 276 else
276 mips_revision_corid = MIPS_REVISION_CORID_CORE_EMUL_MSC; 277 mips_revision_corid = MIPS_REVISION_CORID_CORE_EMUL_MSC;
277 } 278 }
278 switch(mips_revision_corid) { 279
280 mips_revision_sconid = MIPS_REVISION_SCONID;
281 if (mips_revision_sconid == MIPS_REVISION_SCON_OTHER) {
282 switch (mips_revision_corid) {
283 case MIPS_REVISION_CORID_QED_RM5261:
284 case MIPS_REVISION_CORID_CORE_LV:
285 case MIPS_REVISION_CORID_CORE_FPGA:
286 case MIPS_REVISION_CORID_CORE_FPGAR2:
287 mips_revision_sconid = MIPS_REVISION_SCON_GT64120;
288 break;
289 case MIPS_REVISION_CORID_CORE_EMUL_BON:
290 case MIPS_REVISION_CORID_BONITO64:
291 case MIPS_REVISION_CORID_CORE_20K:
292 mips_revision_sconid = MIPS_REVISION_SCON_BONITO;
293 break;
294 case MIPS_REVISION_CORID_CORE_MSC:
295 case MIPS_REVISION_CORID_CORE_FPGA2:
296 case MIPS_REVISION_CORID_CORE_FPGA3:
297 case MIPS_REVISION_CORID_CORE_24K:
298 case MIPS_REVISION_CORID_CORE_EMUL_MSC:
299 mips_revision_sconid = MIPS_REVISION_SCON_SOCIT;
300 break;
301 default:
302 mips_display_message("CC Error");
303 while (1); /* We die here... */
304 }
305 }
306
307 switch (mips_revision_sconid) {
279 u32 start, map, mask, data; 308 u32 start, map, mask, data;
280 309
281 case MIPS_REVISION_CORID_QED_RM5261: 310 case MIPS_REVISION_SCON_GT64120:
282 case MIPS_REVISION_CORID_CORE_LV:
283 case MIPS_REVISION_CORID_CORE_FPGA:
284 case MIPS_REVISION_CORID_CORE_FPGAR2:
285 /* 311 /*
286 * Setup the North bridge to do Master byte-lane swapping 312 * Setup the North bridge to do Master byte-lane swapping
287 * when running in bigendian. 313 * when running in bigendian.
@@ -305,9 +331,7 @@ void __init prom_init(void)
305 set_io_port_base(MALTA_GT_PORT_BASE); 331 set_io_port_base(MALTA_GT_PORT_BASE);
306 break; 332 break;
307 333
308 case MIPS_REVISION_CORID_CORE_EMUL_BON: 334 case MIPS_REVISION_SCON_BONITO:
309 case MIPS_REVISION_CORID_BONITO64:
310 case MIPS_REVISION_CORID_CORE_20K:
311 _pcictrl_bonito_pcicfg = (unsigned long)ioremap(BONITO_PCICFG_BASE, BONITO_PCICFG_SIZE); 335 _pcictrl_bonito_pcicfg = (unsigned long)ioremap(BONITO_PCICFG_BASE, BONITO_PCICFG_SIZE);
312 336
313 /* 337 /*
@@ -334,13 +358,10 @@ void __init prom_init(void)
334 set_io_port_base(MALTA_BONITO_PORT_BASE); 358 set_io_port_base(MALTA_BONITO_PORT_BASE);
335 break; 359 break;
336 360
337 case MIPS_REVISION_CORID_CORE_MSC: 361 case MIPS_REVISION_SCON_SOCIT:
338 case MIPS_REVISION_CORID_CORE_FPGA2: 362 case MIPS_REVISION_SCON_ROCIT:
339 case MIPS_REVISION_CORID_CORE_FPGA3:
340 case MIPS_REVISION_CORID_CORE_24K:
341 case MIPS_REVISION_CORID_CORE_EMUL_MSC:
342 _pcictrl_msc = (unsigned long)ioremap(MIPS_MSC01_PCI_REG_BASE, 0x2000); 363 _pcictrl_msc = (unsigned long)ioremap(MIPS_MSC01_PCI_REG_BASE, 0x2000);
343 364 mips_pci_controller:
344 mb(); 365 mb();
345 MSC_READ(MSC01_PCI_CFG, data); 366 MSC_READ(MSC01_PCI_CFG, data);
346 MSC_WRITE(MSC01_PCI_CFG, data & ~MSC01_PCI_CFG_EN_BIT); 367 MSC_WRITE(MSC01_PCI_CFG, data & ~MSC01_PCI_CFG_EN_BIT);
@@ -374,10 +395,15 @@ void __init prom_init(void)
374 set_io_port_base(MALTA_MSC_PORT_BASE); 395 set_io_port_base(MALTA_MSC_PORT_BASE);
375 break; 396 break;
376 397
398 case MIPS_REVISION_SCON_SOCITSC:
399 case MIPS_REVISION_SCON_SOCITSCP:
400 _pcictrl_msc = (unsigned long)ioremap(MIPS_SOCITSC_PCI_REG_BASE, 0x2000);
401 goto mips_pci_controller;
402
377 default: 403 default:
378 /* Unknown Core card */ 404 /* Unknown system controller */
379 mips_display_message("CC Error"); 405 mips_display_message("SC Error");
380 while(1); /* We die here... */ 406 while (1); /* We die here... */
381 } 407 }
382#endif 408#endif
383 board_nmi_handler_setup = mips_nmi_setup; 409 board_nmi_handler_setup = mips_nmi_setup;
diff --git a/arch/mips/mips-boards/generic/pci.c b/arch/mips/mips-boards/generic/pci.c
index f98d60f78658..c9852206890a 100644
--- a/arch/mips/mips-boards/generic/pci.c
+++ b/arch/mips/mips-boards/generic/pci.c
@@ -92,11 +92,8 @@ void __init mips_pcibios_init(void)
92 struct pci_controller *controller; 92 struct pci_controller *controller;
93 resource_size_t start, end, map, start1, end1, map1, map2, map3, mask; 93 resource_size_t start, end, map, start1, end1, map1, map2, map3, mask;
94 94
95 switch (mips_revision_corid) { 95 switch (mips_revision_sconid) {
96 case MIPS_REVISION_CORID_QED_RM5261: 96 case MIPS_REVISION_SCON_GT64120:
97 case MIPS_REVISION_CORID_CORE_LV:
98 case MIPS_REVISION_CORID_CORE_FPGA:
99 case MIPS_REVISION_CORID_CORE_FPGAR2:
100 /* 97 /*
101 * Due to a bug in the Galileo system controller, we need 98 * Due to a bug in the Galileo system controller, we need
102 * to setup the PCI BAR for the Galileo internal registers. 99 * to setup the PCI BAR for the Galileo internal registers.
@@ -161,9 +158,7 @@ void __init mips_pcibios_init(void)
161 controller = &gt64120_controller; 158 controller = &gt64120_controller;
162 break; 159 break;
163 160
164 case MIPS_REVISION_CORID_BONITO64: 161 case MIPS_REVISION_SCON_BONITO:
165 case MIPS_REVISION_CORID_CORE_20K:
166 case MIPS_REVISION_CORID_CORE_EMUL_BON:
167 /* Set up resource ranges from the controller's registers. */ 162 /* Set up resource ranges from the controller's registers. */
168 map = BONITO_PCIMAP; 163 map = BONITO_PCIMAP;
169 map1 = (BONITO_PCIMAP & BONITO_PCIMAP_PCIMAP_LO0) >> 164 map1 = (BONITO_PCIMAP & BONITO_PCIMAP_PCIMAP_LO0) >>
@@ -195,11 +190,10 @@ void __init mips_pcibios_init(void)
195 controller = &bonito64_controller; 190 controller = &bonito64_controller;
196 break; 191 break;
197 192
198 case MIPS_REVISION_CORID_CORE_MSC: 193 case MIPS_REVISION_SCON_SOCIT:
199 case MIPS_REVISION_CORID_CORE_FPGA2: 194 case MIPS_REVISION_SCON_ROCIT:
200 case MIPS_REVISION_CORID_CORE_FPGA3: 195 case MIPS_REVISION_SCON_SOCITSC:
201 case MIPS_REVISION_CORID_CORE_24K: 196 case MIPS_REVISION_SCON_SOCITSCP:
202 case MIPS_REVISION_CORID_CORE_EMUL_MSC:
203 /* Set up resource ranges from the controller's registers. */ 197 /* Set up resource ranges from the controller's registers. */
204 MSC_READ(MSC01_PCI_SC2PMBASL, start); 198 MSC_READ(MSC01_PCI_SC2PMBASL, start);
205 MSC_READ(MSC01_PCI_SC2PMMSKL, mask); 199 MSC_READ(MSC01_PCI_SC2PMMSKL, mask);
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c
index df2a2bd3aa5d..c45d556aa96b 100644
--- a/arch/mips/mips-boards/generic/time.c
+++ b/arch/mips/mips-boards/generic/time.c
@@ -53,40 +53,18 @@
53 53
54unsigned long cpu_khz; 54unsigned long cpu_khz;
55 55
56#if defined(CONFIG_MIPS_ATLAS)
57static char display_string[] = " LINUX ON ATLAS ";
58#endif
59#if defined(CONFIG_MIPS_MALTA)
60#if defined(CONFIG_MIPS_MT_SMTC)
61static char display_string[] = " SMTC LINUX ON MALTA ";
62#else
63static char display_string[] = " LINUX ON MALTA ";
64#endif /* CONFIG_MIPS_MT_SMTC */
65#endif
66#if defined(CONFIG_MIPS_SEAD)
67static char display_string[] = " LINUX ON SEAD ";
68#endif
69static unsigned int display_count;
70#define MAX_DISPLAY_COUNT (sizeof(display_string) - 8)
71
72#define CPUCTR_IMASKBIT (0x100 << MIPSCPU_INT_CPUCTR)
73
74static unsigned int timer_tick_count;
75static int mips_cpu_timer_irq; 56static int mips_cpu_timer_irq;
57extern int cp0_perfcount_irq;
76extern void smtc_timer_broadcast(int); 58extern void smtc_timer_broadcast(int);
77 59
78static inline void scroll_display_message(void) 60static void mips_timer_dispatch(void)
79{ 61{
80 if ((timer_tick_count++ % HZ) == 0) { 62 do_IRQ(mips_cpu_timer_irq);
81 mips_display_message(&display_string[display_count++]);
82 if (display_count == MAX_DISPLAY_COUNT)
83 display_count = 0;
84 }
85} 63}
86 64
87static void mips_timer_dispatch(void) 65static void mips_perf_dispatch(void)
88{ 66{
89 do_IRQ(mips_cpu_timer_irq); 67 do_IRQ(cp0_perfcount_irq);
90} 68}
91 69
92/* 70/*
@@ -96,6 +74,24 @@ extern int null_perf_irq(void);
96 74
97extern int (*perf_irq)(void); 75extern int (*perf_irq)(void);
98 76
77/*
78 * Possibly handle a performance counter interrupt.
79 * Return true if the timer interrupt should not be checked
80 */
81static inline int handle_perf_irq (int r2)
82{
83 /*
84 * The performance counter overflow interrupt may be shared with the
85 * timer interrupt (cp0_perfcount_irq < 0). If it is and a
86 * performance counter has overflowed (perf_irq() == IRQ_HANDLED)
87 * and we can't reliably determine if a counter interrupt has also
88 * happened (!r2) then don't check for a timer interrupt.
89 */
90 return (cp0_perfcount_irq < 0) &&
91 perf_irq() == IRQ_HANDLED &&
92 !r2;
93}
94
99irqreturn_t mips_timer_interrupt(int irq, void *dev_id) 95irqreturn_t mips_timer_interrupt(int irq, void *dev_id)
100{ 96{
101 int cpu = smp_processor_id(); 97 int cpu = smp_processor_id();
@@ -114,25 +110,13 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id)
114 * the general MIPS timer_interrupt routine. 110 * the general MIPS timer_interrupt routine.
115 */ 111 */
116 112
117 int vpflags;
118
119 /* 113 /*
120 * We could be here due to timer interrupt, 114 * We could be here due to timer interrupt,
121 * perf counter overflow, or both. 115 * perf counter overflow, or both.
122 */ 116 */
123 if (read_c0_cause() & (1 << 26)) 117 (void) handle_perf_irq(1);
124 perf_irq();
125 118
126 if (read_c0_cause() & (1 << 30)) { 119 if (read_c0_cause() & (1 << 30)) {
127 /* If timer interrupt, make it de-assert */
128 write_c0_compare (read_c0_count() - 1);
129 /*
130 * DVPE is necessary so long as cross-VPE interrupts
131 * are done via read-modify-write of Cause register.
132 */
133 vpflags = dvpe();
134 clear_c0_cause(CPUCTR_IMASKBIT);
135 evpe(vpflags);
136 /* 120 /*
137 * There are things we only want to do once per tick 121 * There are things we only want to do once per tick
138 * in an "MP" system. One TC of each VPE will take 122 * in an "MP" system. One TC of each VPE will take
@@ -141,34 +125,30 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id)
141 * the tick on VPE 0 to run the full timer_interrupt(). 125 * the tick on VPE 0 to run the full timer_interrupt().
142 */ 126 */
143 if (cpu_data[cpu].vpe_id == 0) { 127 if (cpu_data[cpu].vpe_id == 0) {
144 timer_interrupt(irq, NULL); 128 timer_interrupt(irq, NULL);
145 smtc_timer_broadcast(cpu_data[cpu].vpe_id);
146 scroll_display_message();
147 } else { 129 } else {
148 write_c0_compare(read_c0_count() + 130 write_c0_compare(read_c0_count() +
149 (mips_hpt_frequency/HZ)); 131 (mips_hpt_frequency/HZ));
150 local_timer_interrupt(irq, dev_id); 132 local_timer_interrupt(irq, dev_id);
151 smtc_timer_broadcast(cpu_data[cpu].vpe_id);
152 } 133 }
134 smtc_timer_broadcast(cpu_data[cpu].vpe_id);
153 } 135 }
154#else /* CONFIG_MIPS_MT_SMTC */ 136#else /* CONFIG_MIPS_MT_SMTC */
155 int r2 = cpu_has_mips_r2; 137 int r2 = cpu_has_mips_r2;
156 138
139 if (handle_perf_irq(r2))
140 goto out;
141
142 if (r2 && ((read_c0_cause() & (1 << 30)) == 0))
143 goto out;
144
157 if (cpu == 0) { 145 if (cpu == 0) {
158 /* 146 /*
159 * CPU 0 handles the global timer interrupt job and process 147 * CPU 0 handles the global timer interrupt job and process
160 * accounting resets count/compare registers to trigger next 148 * accounting resets count/compare registers to trigger next
161 * timer int. 149 * timer int.
162 */ 150 */
163 if (!r2 || (read_c0_cause() & (1 << 26))) 151 timer_interrupt(irq, NULL);
164 if (perf_irq())
165 goto out;
166
167 /* we keep interrupt disabled all the time */
168 if (!r2 || (read_c0_cause() & (1 << 30)))
169 timer_interrupt(irq, NULL);
170
171 scroll_display_message();
172 } else { 152 } else {
173 /* Everyone else needs to reset the timer int here as 153 /* Everyone else needs to reset the timer int here as
174 ll_local_timer_interrupt doesn't */ 154 ll_local_timer_interrupt doesn't */
@@ -262,6 +242,44 @@ void __init mips_time_init(void)
262 (est_freq%1000000)*100/1000000); 242 (est_freq%1000000)*100/1000000);
263 243
264 cpu_khz = est_freq / 1000; 244 cpu_khz = est_freq / 1000;
245
246 mips_scroll_message();
247}
248
249irqreturn_t mips_perf_interrupt(int irq, void *dev_id)
250{
251 return perf_irq();
252}
253
254static struct irqaction perf_irqaction = {
255 .handler = mips_perf_interrupt,
256 .flags = IRQF_DISABLED | IRQF_PERCPU,
257 .name = "performance",
258};
259
260void __init plat_perf_setup(struct irqaction *irq)
261{
262 cp0_perfcount_irq = -1;
263
264#ifdef MSC01E_INT_BASE
265 if (cpu_has_veic) {
266 set_vi_handler (MSC01E_INT_PERFCTR, mips_perf_dispatch);
267 cp0_perfcount_irq = MSC01E_INT_BASE + MSC01E_INT_PERFCTR;
268 } else
269#endif
270 if (cp0_perfcount_irq >= 0) {
271 if (cpu_has_vint)
272 set_vi_handler(cp0_perfcount_irq, mips_perf_dispatch);
273#ifdef CONFIG_MIPS_MT_SMTC
274 setup_irq_smtc(cp0_perfcount_irq, irq,
275 0x100 << cp0_perfcount_irq);
276#else
277 setup_irq(cp0_perfcount_irq, irq);
278#endif /* CONFIG_MIPS_MT_SMTC */
279#ifdef CONFIG_SMP
280 set_irq_handler(cp0_perfcount_irq, handle_percpu_irq);
281#endif
282 }
265} 283}
266 284
267void __init plat_timer_setup(struct irqaction *irq) 285void __init plat_timer_setup(struct irqaction *irq)
@@ -270,29 +288,25 @@ void __init plat_timer_setup(struct irqaction *irq)
270 if (cpu_has_veic) { 288 if (cpu_has_veic) {
271 set_vi_handler (MSC01E_INT_CPUCTR, mips_timer_dispatch); 289 set_vi_handler (MSC01E_INT_CPUCTR, mips_timer_dispatch);
272 mips_cpu_timer_irq = MSC01E_INT_BASE + MSC01E_INT_CPUCTR; 290 mips_cpu_timer_irq = MSC01E_INT_BASE + MSC01E_INT_CPUCTR;
273 } else 291 }
292 else
274#endif 293#endif
275 { 294 {
276 if (cpu_has_vint) 295 if (cpu_has_vint)
277 set_vi_handler (MIPSCPU_INT_CPUCTR, mips_timer_dispatch); 296 set_vi_handler(cp0_compare_irq, mips_timer_dispatch);
278 mips_cpu_timer_irq = MIPSCPU_INT_BASE + MIPSCPU_INT_CPUCTR; 297 mips_cpu_timer_irq = MIPS_CPU_IRQ_BASE + cp0_compare_irq;
279 } 298 }
280 299
281
282 /* we are using the cpu counter for timer interrupts */ 300 /* we are using the cpu counter for timer interrupts */
283 irq->handler = mips_timer_interrupt; /* we use our own handler */ 301 irq->handler = mips_timer_interrupt; /* we use our own handler */
284#ifdef CONFIG_MIPS_MT_SMTC 302#ifdef CONFIG_MIPS_MT_SMTC
285 setup_irq_smtc(mips_cpu_timer_irq, irq, CPUCTR_IMASKBIT); 303 setup_irq_smtc(mips_cpu_timer_irq, irq, 0x100 << cp0_compare_irq);
286#else 304#else
287 setup_irq(mips_cpu_timer_irq, irq); 305 setup_irq(mips_cpu_timer_irq, irq);
288#endif /* CONFIG_MIPS_MT_SMTC */ 306#endif /* CONFIG_MIPS_MT_SMTC */
289
290#ifdef CONFIG_SMP 307#ifdef CONFIG_SMP
291 /* irq_desc(riptor) is a global resource, when the interrupt overlaps
292 on seperate cpu's the first one tries to handle the second interrupt.
293 The effect is that the int remains disabled on the second cpu.
294 Mark the interrupt with IRQ_PER_CPU to avoid any confusion */
295 irq_desc[mips_cpu_timer_irq].status |= IRQ_PER_CPU;
296 set_irq_handler(mips_cpu_timer_irq, handle_percpu_irq); 308 set_irq_handler(mips_cpu_timer_irq, handle_percpu_irq);
297#endif 309#endif
310
311 plat_perf_setup(&perf_irqaction);
298} 312}
diff --git a/arch/mips/mips-boards/malta/Makefile b/arch/mips/mips-boards/malta/Makefile
index 377d9e8f250a..a242b0fc377d 100644
--- a/arch/mips/mips-boards/malta/Makefile
+++ b/arch/mips/mips-boards/malta/Makefile
@@ -19,6 +19,7 @@
19# under Linux. 19# under Linux.
20# 20#
21 21
22obj-y := malta_int.o malta_setup.o 22obj-y := malta_int.o malta_platform.o malta_setup.o
23
23obj-$(CONFIG_MTD) += malta_mtd.o 24obj-$(CONFIG_MTD) += malta_mtd.o
24obj-$(CONFIG_MIPS_MT_SMTC) += malta_smtc.o 25obj-$(CONFIG_MIPS_MT_SMTC) += malta_smtc.o
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index 1cd830e3d933..c78d48349600 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -53,25 +53,19 @@ static inline int mips_pcibios_iack(void)
53 * Determine highest priority pending interrupt by performing 53 * Determine highest priority pending interrupt by performing
54 * a PCI Interrupt Acknowledge cycle. 54 * a PCI Interrupt Acknowledge cycle.
55 */ 55 */
56 switch(mips_revision_corid) { 56 switch (mips_revision_sconid) {
57 case MIPS_REVISION_CORID_CORE_MSC: 57 case MIPS_REVISION_SCON_SOCIT:
58 case MIPS_REVISION_CORID_CORE_FPGA2: 58 case MIPS_REVISION_SCON_ROCIT:
59 case MIPS_REVISION_CORID_CORE_FPGA3: 59 case MIPS_REVISION_SCON_SOCITSC:
60 case MIPS_REVISION_CORID_CORE_24K: 60 case MIPS_REVISION_SCON_SOCITSCP:
61 case MIPS_REVISION_CORID_CORE_EMUL_MSC:
62 MSC_READ(MSC01_PCI_IACK, irq); 61 MSC_READ(MSC01_PCI_IACK, irq);
63 irq &= 0xff; 62 irq &= 0xff;
64 break; 63 break;
65 case MIPS_REVISION_CORID_QED_RM5261: 64 case MIPS_REVISION_SCON_GT64120:
66 case MIPS_REVISION_CORID_CORE_LV:
67 case MIPS_REVISION_CORID_CORE_FPGA:
68 case MIPS_REVISION_CORID_CORE_FPGAR2:
69 irq = GT_READ(GT_PCI0_IACK_OFS); 65 irq = GT_READ(GT_PCI0_IACK_OFS);
70 irq &= 0xff; 66 irq &= 0xff;
71 break; 67 break;
72 case MIPS_REVISION_CORID_BONITO64: 68 case MIPS_REVISION_SCON_BONITO:
73 case MIPS_REVISION_CORID_CORE_20K:
74 case MIPS_REVISION_CORID_CORE_EMUL_BON:
75 /* The following will generate a PCI IACK cycle on the 69 /* The following will generate a PCI IACK cycle on the
76 * Bonito controller. It's a little bit kludgy, but it 70 * Bonito controller. It's a little bit kludgy, but it
77 * was the easiest way to implement it in hardware at 71 * was the easiest way to implement it in hardware at
@@ -89,7 +83,7 @@ static inline int mips_pcibios_iack(void)
89 BONITO_PCIMAP_CFG = 0; 83 BONITO_PCIMAP_CFG = 0;
90 break; 84 break;
91 default: 85 default:
92 printk("Unknown Core card, don't know the system controller.\n"); 86 printk("Unknown system controller.\n");
93 return -1; 87 return -1;
94 } 88 }
95 return irq; 89 return irq;
@@ -144,27 +138,21 @@ static void corehi_irqdispatch(void)
144 Do it for the others too. 138 Do it for the others too.
145 */ 139 */
146 140
147 switch(mips_revision_corid) { 141 switch (mips_revision_sconid) {
148 case MIPS_REVISION_CORID_CORE_MSC: 142 case MIPS_REVISION_SCON_SOCIT:
149 case MIPS_REVISION_CORID_CORE_FPGA2: 143 case MIPS_REVISION_SCON_ROCIT:
150 case MIPS_REVISION_CORID_CORE_FPGA3: 144 case MIPS_REVISION_SCON_SOCITSC:
151 case MIPS_REVISION_CORID_CORE_24K: 145 case MIPS_REVISION_SCON_SOCITSCP:
152 case MIPS_REVISION_CORID_CORE_EMUL_MSC:
153 ll_msc_irq(); 146 ll_msc_irq();
154 break; 147 break;
155 case MIPS_REVISION_CORID_QED_RM5261: 148 case MIPS_REVISION_SCON_GT64120:
156 case MIPS_REVISION_CORID_CORE_LV:
157 case MIPS_REVISION_CORID_CORE_FPGA:
158 case MIPS_REVISION_CORID_CORE_FPGAR2:
159 intrcause = GT_READ(GT_INTRCAUSE_OFS); 149 intrcause = GT_READ(GT_INTRCAUSE_OFS);
160 datalo = GT_READ(GT_CPUERR_ADDRLO_OFS); 150 datalo = GT_READ(GT_CPUERR_ADDRLO_OFS);
161 datahi = GT_READ(GT_CPUERR_ADDRHI_OFS); 151 datahi = GT_READ(GT_CPUERR_ADDRHI_OFS);
162 printk("GT_INTRCAUSE = %08x\n", intrcause); 152 printk("GT_INTRCAUSE = %08x\n", intrcause);
163 printk("GT_CPUERR_ADDR = %02x%08x\n", datahi, datalo); 153 printk("GT_CPUERR_ADDR = %02x%08x\n", datahi, datalo);
164 break; 154 break;
165 case MIPS_REVISION_CORID_BONITO64: 155 case MIPS_REVISION_SCON_BONITO:
166 case MIPS_REVISION_CORID_CORE_20K:
167 case MIPS_REVISION_CORID_CORE_EMUL_BON:
168 pcibadaddr = BONITO_PCIBADADDR; 156 pcibadaddr = BONITO_PCIBADADDR;
169 pcimstat = BONITO_PCIMSTAT; 157 pcimstat = BONITO_PCIMSTAT;
170 intisr = BONITO_INTISR; 158 intisr = BONITO_INTISR;
@@ -269,7 +257,7 @@ asmlinkage void plat_irq_dispatch(void)
269 if (irq == MIPSCPU_INT_I8259A) 257 if (irq == MIPSCPU_INT_I8259A)
270 malta_hw0_irqdispatch(); 258 malta_hw0_irqdispatch();
271 else if (irq > 0) 259 else if (irq > 0)
272 do_IRQ(MIPSCPU_INT_BASE + irq); 260 do_IRQ(MIPS_CPU_IRQ_BASE + irq);
273 else 261 else
274 spurious_interrupt(); 262 spurious_interrupt();
275} 263}
@@ -338,17 +326,17 @@ void __init arch_init_irq(void)
338 set_vi_handler (MIPSCPU_INT_I8259A, malta_hw0_irqdispatch); 326 set_vi_handler (MIPSCPU_INT_I8259A, malta_hw0_irqdispatch);
339 set_vi_handler (MIPSCPU_INT_COREHI, corehi_irqdispatch); 327 set_vi_handler (MIPSCPU_INT_COREHI, corehi_irqdispatch);
340#ifdef CONFIG_MIPS_MT_SMTC 328#ifdef CONFIG_MIPS_MT_SMTC
341 setup_irq_smtc (MIPSCPU_INT_BASE+MIPSCPU_INT_I8259A, &i8259irq, 329 setup_irq_smtc (MIPS_CPU_IRQ_BASE+MIPSCPU_INT_I8259A, &i8259irq,
342 (0x100 << MIPSCPU_INT_I8259A)); 330 (0x100 << MIPSCPU_INT_I8259A));
343 setup_irq_smtc (MIPSCPU_INT_BASE+MIPSCPU_INT_COREHI, 331 setup_irq_smtc (MIPS_CPU_IRQ_BASE+MIPSCPU_INT_COREHI,
344 &corehi_irqaction, (0x100 << MIPSCPU_INT_COREHI)); 332 &corehi_irqaction, (0x100 << MIPSCPU_INT_COREHI));
345#else /* Not SMTC */ 333#else /* Not SMTC */
346 setup_irq (MIPSCPU_INT_BASE+MIPSCPU_INT_I8259A, &i8259irq); 334 setup_irq (MIPS_CPU_IRQ_BASE+MIPSCPU_INT_I8259A, &i8259irq);
347 setup_irq (MIPSCPU_INT_BASE+MIPSCPU_INT_COREHI, &corehi_irqaction); 335 setup_irq (MIPS_CPU_IRQ_BASE+MIPSCPU_INT_COREHI, &corehi_irqaction);
348#endif /* CONFIG_MIPS_MT_SMTC */ 336#endif /* CONFIG_MIPS_MT_SMTC */
349 } 337 }
350 else { 338 else {
351 setup_irq (MIPSCPU_INT_BASE+MIPSCPU_INT_I8259A, &i8259irq); 339 setup_irq (MIPS_CPU_IRQ_BASE+MIPSCPU_INT_I8259A, &i8259irq);
352 setup_irq (MIPSCPU_INT_BASE+MIPSCPU_INT_COREHI, &corehi_irqaction); 340 setup_irq (MIPS_CPU_IRQ_BASE+MIPSCPU_INT_COREHI, &corehi_irqaction);
353 } 341 }
354} 342}
diff --git a/arch/mips/mips-boards/malta/malta_platform.c b/arch/mips/mips-boards/malta/malta_platform.c
new file mode 100644
index 000000000000..83b9bab3cd3f
--- /dev/null
+++ b/arch/mips/mips-boards/malta/malta_platform.c
@@ -0,0 +1,65 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2007 MIPS Technologies, Inc.
7 * written by Ralf Baechle (ralf@linux-mips.org)
8 *
9 * Probe driver for the Malta's UART ports:
10 *
11 * o 2 ports in the SMC SuperIO
12 * o 1 port in the CBUS UART, a discrete 16550 which normally is only used
13 * for bringups.
14 *
15 * We don't use 8250_platform.c on Malta as it would result in the CBUS
16 * UART becoming ttyS0.
17 */
18#include <linux/module.h>
19#include <linux/init.h>
20#include <linux/serial_8250.h>
21
22#define SMC_PORT(base, int) \
23{ \
24 .iobase = base, \
25 .irq = int, \
26 .uartclk = 1843200, \
27 .iotype = UPIO_PORT, \
28 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \
29 .regshift = 0, \
30}
31
32#define CBUS_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)
33
34static struct plat_serial8250_port uart8250_data[] = {
35 SMC_PORT(0x3F8, 4),
36 SMC_PORT(0x2F8, 3),
37 {
38 .mapbase = 0x1f000900, /* The CBUS UART */
39 .irq = MIPS_CPU_IRQ_BASE + 2,
40 .uartclk = 3686400, /* Twice the usual clk! */
41 .iotype = UPIO_MEM32,
42 .flags = CBUS_UART_FLAGS,
43 .regshift = 3,
44 },
45 { },
46};
47
48static struct platform_device uart8250_device = {
49 .name = "serial8250",
50 .id = PLAT8250_DEV_PLATFORM2,
51 .dev = {
52 .platform_data = uart8250_data,
53 },
54};
55
56static int __init uart8250_init(void)
57{
58 return platform_device_register(&uart8250_device);
59}
60
61module_init(uart8250_init);
62
63MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
64MODULE_LICENSE("GPL");
65MODULE_DESCRIPTION("8250 UART probe driver for the Malta CBUS UART");
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index 7873932532a1..8f1b78dfd89f 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -56,6 +56,12 @@ const char *get_system_type(void)
56 return "MIPS Malta"; 56 return "MIPS Malta";
57} 57}
58 58
59#if defined(CONFIG_MIPS_MT_SMTC)
60const char display_string[] = " SMTC LINUX ON MALTA ";
61#else
62const char display_string[] = " LINUX ON MALTA ";
63#endif /* CONFIG_MIPS_MT_SMTC */
64
59#ifdef CONFIG_BLK_DEV_FD 65#ifdef CONFIG_BLK_DEV_FD
60void __init fd_activate(void) 66void __init fd_activate(void)
61{ 67{
@@ -97,9 +103,7 @@ void __init plat_mem_setup(void)
97 kgdb_config (); 103 kgdb_config ();
98#endif 104#endif
99 105
100 if ((mips_revision_corid == MIPS_REVISION_CORID_BONITO64) || 106 if (mips_revision_sconid == MIPS_REVISION_SCON_BONITO) {
101 (mips_revision_corid == MIPS_REVISION_CORID_CORE_20K) ||
102 (mips_revision_corid == MIPS_REVISION_CORID_CORE_EMUL_BON)) {
103 char *argptr; 107 char *argptr;
104 108
105 argptr = prom_getcmdline(); 109 argptr = prom_getcmdline();
diff --git a/arch/mips/mips-boards/sead/sead_int.c b/arch/mips/mips-boards/sead/sead_int.c
index c4b9de3a7f27..9ca0f82f1360 100644
--- a/arch/mips/mips-boards/sead/sead_int.c
+++ b/arch/mips/mips-boards/sead/sead_int.c
@@ -106,7 +106,7 @@ asmlinkage void plat_irq_dispatch(void)
106 irq = irq_ffs(pending); 106 irq = irq_ffs(pending);
107 107
108 if (irq >= 0) 108 if (irq >= 0)
109 do_IRQ(MIPSCPU_INT_BASE + irq); 109 do_IRQ(MIPS_CPU_IRQ_BASE + irq);
110 else 110 else
111 spurious_interrupt(); 111 spurious_interrupt();
112} 112}
diff --git a/arch/mips/mips-boards/sead/sead_setup.c b/arch/mips/mips-boards/sead/sead_setup.c
index a189dec7c7bc..5f70eaf01fab 100644
--- a/arch/mips/mips-boards/sead/sead_setup.c
+++ b/arch/mips/mips-boards/sead/sead_setup.c
@@ -23,6 +23,7 @@
23#include <linux/tty.h> 23#include <linux/tty.h>
24#include <linux/serial.h> 24#include <linux/serial.h>
25#include <linux/serial_core.h> 25#include <linux/serial_core.h>
26#include <linux/serial_8250.h>
26 27
27#include <asm/cpu.h> 28#include <asm/cpu.h>
28#include <asm/bootinfo.h> 29#include <asm/bootinfo.h>
@@ -43,6 +44,8 @@ const char *get_system_type(void)
43 return "MIPS SEAD"; 44 return "MIPS SEAD";
44} 45}
45 46
47const char display_string[] = " LINUX ON SEAD ";
48
46void __init plat_mem_setup(void) 49void __init plat_mem_setup(void)
47{ 50{
48 ioport_resource.end = 0x7fffffff; 51 ioport_resource.end = 0x7fffffff;
@@ -66,7 +69,7 @@ static void __init serial_init(void)
66#else 69#else
67 s.iobase = SEAD_UART0_REGS_BASE+3; 70 s.iobase = SEAD_UART0_REGS_BASE+3;
68#endif 71#endif
69 s.irq = MIPSCPU_INT_BASE + MIPSCPU_INT_UART0; 72 s.irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_UART0;
70 s.uartclk = SEAD_BASE_BAUD * 16; 73 s.uartclk = SEAD_BASE_BAUD * 16;
71 s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ; 74 s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ;
72 s.iotype = UPIO_PORT; 75 s.iotype = UPIO_PORT;
diff --git a/arch/mips/mips-boards/sim/sim_int.c b/arch/mips/mips-boards/sim/sim_int.c
index 15ac0655c1ff..766e0159ee5b 100644
--- a/arch/mips/mips-boards/sim/sim_int.c
+++ b/arch/mips/mips-boards/sim/sim_int.c
@@ -77,7 +77,7 @@ asmlinkage void plat_irq_dispatch(void)
77 irq = irq_ffs(pending); 77 irq = irq_ffs(pending);
78 78
79 if (irq > 0) 79 if (irq > 0)
80 do_IRQ(MIPSCPU_INT_BASE + irq); 80 do_IRQ(MIPS_CPU_IRQ_BASE + irq);
81 else 81 else
82 spurious_interrupt(); 82 spurious_interrupt();
83} 83}
diff --git a/arch/mips/mips-boards/sim/Makefile b/arch/mips/mipssim/Makefile
index dc0bfda11427..dc0bfda11427 100644
--- a/arch/mips/mips-boards/sim/Makefile
+++ b/arch/mips/mipssim/Makefile
diff --git a/arch/mips/mips-boards/sim/sim_cmdline.c b/arch/mips/mipssim/sim_cmdline.c
index c63021a5dc6c..c63021a5dc6c 100644
--- a/arch/mips/mips-boards/sim/sim_cmdline.c
+++ b/arch/mips/mipssim/sim_cmdline.c
diff --git a/arch/mips/mips-boards/sim/sim_console.c b/arch/mips/mipssim/sim_console.c
index de595a9ccb27..a2f41672cd5d 100644
--- a/arch/mips/mips-boards/sim/sim_console.c
+++ b/arch/mips/mipssim/sim_console.c
@@ -18,8 +18,8 @@
18 * written by Ralf Baechle 18 * written by Ralf Baechle
19 */ 19 */
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/io.h>
21#include <linux/serial_reg.h> 22#include <linux/serial_reg.h>
22#include <asm/io.h>
23 23
24static inline unsigned int serial_in(int offset) 24static inline unsigned int serial_in(int offset)
25{ 25{
diff --git a/arch/mips/mipssim/sim_int.c b/arch/mips/mipssim/sim_int.c
new file mode 100644
index 000000000000..5cbc3509ab52
--- /dev/null
+++ b/arch/mips/mipssim/sim_int.c
@@ -0,0 +1,88 @@
1/*
2 * Copyright (C) 1999, 2005 MIPS Technologies, Inc. All rights reserved.
3 *
4 * This program is free software; you can distribute it and/or modify it
5 * under the terms of the GNU General Public License (Version 2) as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
16 *
17 */
18#include <linux/init.h>
19#include <linux/sched.h>
20#include <linux/slab.h>
21#include <linux/interrupt.h>
22#include <linux/kernel_stat.h>
23#include <asm/mips-boards/simint.h>
24#include <asm/irq_cpu.h>
25
26static inline int clz(unsigned long x)
27{
28 __asm__ (
29 " .set push \n"
30 " .set mips32 \n"
31 " clz %0, %1 \n"
32 " .set pop \n"
33 : "=r" (x)
34 : "r" (x));
35
36 return x;
37}
38
39/*
40 * Version of ffs that only looks at bits 12..15.
41 */
42static inline unsigned int irq_ffs(unsigned int pending)
43{
44#if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64)
45 return -clz(pending) + 31 - CAUSEB_IP;
46#else
47 unsigned int a0 = 7;
48 unsigned int t0;
49
50 t0 = s0 & 0xf000;
51 t0 = t0 < 1;
52 t0 = t0 << 2;
53 a0 = a0 - t0;
54 s0 = s0 << t0;
55
56 t0 = s0 & 0xc000;
57 t0 = t0 < 1;
58 t0 = t0 << 1;
59 a0 = a0 - t0;
60 s0 = s0 << t0;
61
62 t0 = s0 & 0x8000;
63 t0 = t0 < 1;
64 /* t0 = t0 << 2; */
65 a0 = a0 - t0;
66 /* s0 = s0 << t0; */
67
68 return a0;
69#endif
70}
71
72asmlinkage void plat_irq_dispatch(void)
73{
74 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
75 int irq;
76
77 irq = irq_ffs(pending);
78
79 if (irq > 0)
80 do_IRQ(MIPS_CPU_IRQ_BASE + irq);
81 else
82 spurious_interrupt();
83}
84
85void __init arch_init_irq(void)
86{
87 mips_cpu_irq_init();
88}
diff --git a/arch/mips/mips-boards/sim/sim_mem.c b/arch/mips/mipssim/sim_mem.c
index e408ef0bcd6e..2312483eb838 100644
--- a/arch/mips/mips-boards/sim/sim_mem.c
+++ b/arch/mips/mipssim/sim_mem.c
@@ -95,7 +95,7 @@ void __init prom_meminit(void)
95 size = p->size; 95 size = p->size;
96 96
97 add_memory_region(base, size, type); 97 add_memory_region(base, size, type);
98 p++; 98 p++;
99 } 99 }
100} 100}
101 101
diff --git a/arch/mips/mips-boards/sim/sim_platform.c b/arch/mips/mipssim/sim_platform.c
index 53210a8c5dec..53210a8c5dec 100644
--- a/arch/mips/mips-boards/sim/sim_platform.c
+++ b/arch/mips/mipssim/sim_platform.c
diff --git a/arch/mips/mips-boards/sim/sim_setup.c b/arch/mips/mipssim/sim_setup.c
index b705f09e57c3..17819b594105 100644
--- a/arch/mips/mips-boards/sim/sim_setup.c
+++ b/arch/mips/mipssim/sim_setup.c
@@ -19,18 +19,19 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/string.h> 20#include <linux/string.h>
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/io.h>
23#include <linux/irq.h>
22#include <linux/ioport.h> 24#include <linux/ioport.h>
25#include <linux/serial.h>
23#include <linux/tty.h> 26#include <linux/tty.h>
24#include <linux/serial.h> 27#include <linux/serial.h>
25#include <linux/serial_core.h> 28#include <linux/serial_core.h>
29#include <linux/serial_8250.h>
26 30
27#include <asm/cpu.h> 31#include <asm/cpu.h>
28#include <asm/bootinfo.h> 32#include <asm/bootinfo.h>
29#include <asm/irq.h>
30#include <asm/mips-boards/generic.h> 33#include <asm/mips-boards/generic.h>
31#include <asm/mips-boards/prom.h> 34#include <asm/mips-boards/prom.h>
32#include <asm/serial.h>
33#include <asm/io.h>
34#include <asm/time.h> 35#include <asm/time.h>
35#include <asm/mips-boards/sim.h> 36#include <asm/mips-boards/sim.h>
36#include <asm/mips-boards/simint.h> 37#include <asm/mips-boards/simint.h>
@@ -62,7 +63,7 @@ void __init plat_mem_setup(void)
62#endif 63#endif
63} 64}
64 65
65void prom_init(void) 66void __init prom_init(void)
66{ 67{
67 set_io_port_base(0xbfd00000); 68 set_io_port_base(0xbfd00000);
68 69
@@ -84,7 +85,7 @@ static void __init serial_init(void)
84 /* hardware int 4 - the serial int, is CPU int 6 85 /* hardware int 4 - the serial int, is CPU int 6
85 but poll for now */ 86 but poll for now */
86 s.irq = 0; 87 s.irq = 0;
87 s.uartclk = BASE_BAUD * 16; 88 s.uartclk = 1843200;
88 s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; 89 s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
89 s.iotype = UPIO_PORT; 90 s.iotype = UPIO_PORT;
90 s.regshift = 0; 91 s.regshift = 0;
diff --git a/arch/mips/mips-boards/sim/sim_smp.c b/arch/mips/mipssim/sim_smp.c
index cb47863ecf10..38fa807b99f9 100644
--- a/arch/mips/mips-boards/sim/sim_smp.c
+++ b/arch/mips/mipssim/sim_smp.c
@@ -22,13 +22,13 @@
22#include <linux/sched.h> 22#include <linux/sched.h>
23#include <linux/cpumask.h> 23#include <linux/cpumask.h>
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/smp.h>
26
25#include <asm/atomic.h> 27#include <asm/atomic.h>
26#include <asm/cpu.h> 28#include <asm/cpu.h>
27#include <asm/processor.h> 29#include <asm/processor.h>
28#include <asm/system.h> 30#include <asm/system.h>
29#include <asm/hardirq.h>
30#include <asm/mmu_context.h> 31#include <asm/mmu_context.h>
31#include <asm/smp.h>
32#ifdef CONFIG_MIPS_MT_SMTC 32#ifdef CONFIG_MIPS_MT_SMTC
33#include <asm/smtc_ipi.h> 33#include <asm/smtc_ipi.h>
34#endif /* CONFIG_MIPS_MT_SMTC */ 34#endif /* CONFIG_MIPS_MT_SMTC */
@@ -73,11 +73,19 @@ void prom_init_secondary(void)
73#endif /* CONFIG_MIPS_MT_SMTC */ 73#endif /* CONFIG_MIPS_MT_SMTC */
74} 74}
75 75
76void plat_smp_setup(void)
77{
78#ifdef CONFIG_MIPS_MT_SMTC
79 if (read_c0_config3() & (1 << 2))
80 mipsmt_build_cpu_map(0);
81#endif /* CONFIG_MIPS_MT_SMTC */
82}
83
76/* 84/*
77 * Platform SMP pre-initialization 85 * Platform SMP pre-initialization
78 */ 86 */
79 87
80void prom_prepare_cpus(unsigned int max_cpus) 88void plat_prepare_cpus(unsigned int max_cpus)
81{ 89{
82#ifdef CONFIG_MIPS_MT_SMTC 90#ifdef CONFIG_MIPS_MT_SMTC
83 /* 91 /*
@@ -85,8 +93,8 @@ void prom_prepare_cpus(unsigned int max_cpus)
85 * but it may be multithreaded. 93 * but it may be multithreaded.
86 */ 94 */
87 95
88 if (read_c0_config3() & (1<<2)) { 96 if (read_c0_config3() & (1 << 2)) {
89 mipsmt_prepare_cpus(max_cpus); 97 mipsmt_prepare_cpus();
90 } 98 }
91#endif /* CONFIG_MIPS_MT_SMTC */ 99#endif /* CONFIG_MIPS_MT_SMTC */
92} 100}
diff --git a/arch/mips/mips-boards/sim/sim_time.c b/arch/mips/mipssim/sim_time.c
index d3a21c741514..a0f5a5dca1b2 100644
--- a/arch/mips/mips-boards/sim/sim_time.c
+++ b/arch/mips/mipssim/sim_time.c
@@ -5,10 +5,9 @@
5#include <linux/spinlock.h> 5#include <linux/spinlock.h>
6#include <linux/interrupt.h> 6#include <linux/interrupt.h>
7#include <linux/mc146818rtc.h> 7#include <linux/mc146818rtc.h>
8#include <linux/smp.h>
8#include <linux/timex.h> 9#include <linux/timex.h>
9 10
10#include <asm/mipsregs.h>
11#include <asm/ptrace.h>
12#include <asm/hardirq.h> 11#include <asm/hardirq.h>
13#include <asm/div64.h> 12#include <asm/div64.h>
14#include <asm/cpu.h> 13#include <asm/cpu.h>
@@ -16,7 +15,6 @@
16#include <asm/irq.h> 15#include <asm/irq.h>
17#include <asm/mc146818-time.h> 16#include <asm/mc146818-time.h>
18#include <asm/msc01_ic.h> 17#include <asm/msc01_ic.h>
19#include <asm/smp.h>
20 18
21#include <asm/mips-boards/generic.h> 19#include <asm/mips-boards/generic.h>
22#include <asm/mips-boards/prom.h> 20#include <asm/mips-boards/prom.h>
@@ -37,8 +35,7 @@ irqreturn_t sim_timer_interrupt(int irq, void *dev_id)
37#ifndef CONFIG_MIPS_MT_SMTC 35#ifndef CONFIG_MIPS_MT_SMTC
38 if (cpu == 0) { 36 if (cpu == 0) {
39 timer_interrupt(irq, dev_id); 37 timer_interrupt(irq, dev_id);
40 } 38 } else {
41 else {
42 /* Everyone else needs to reset the timer int here as 39 /* Everyone else needs to reset the timer int here as
43 ll_local_timer_interrupt doesn't */ 40 ll_local_timer_interrupt doesn't */
44 /* 41 /*
@@ -71,13 +68,15 @@ irqreturn_t sim_timer_interrupt(int irq, void *dev_id)
71 68
72 int vpflags = dvpe(); 69 int vpflags = dvpe();
73 write_c0_compare (read_c0_count() - 1); 70 write_c0_compare (read_c0_count() - 1);
74 clear_c0_cause(0x100 << MIPSCPU_INT_CPUCTR); 71 clear_c0_cause(0x100 << cp0_compare_irq);
75 set_c0_status(0x100 << MIPSCPU_INT_CPUCTR); 72 set_c0_status(0x100 << cp0_compare_irq);
76 irq_enable_hazard(); 73 irq_enable_hazard();
77 evpe(vpflags); 74 evpe(vpflags);
78 75
79 if(cpu_data[cpu].vpe_id == 0) timer_interrupt(irq, dev_id); 76 if (cpu_data[cpu].vpe_id == 0)
80 else write_c0_compare (read_c0_count() + ( mips_hpt_frequency/HZ)); 77 timer_interrupt(irq, dev_id);
78 else
79 write_c0_compare (read_c0_count() + ( mips_hpt_frequency/HZ));
81 smtc_timer_broadcast(cpu_data[cpu].vpe_id); 80 smtc_timer_broadcast(cpu_data[cpu].vpe_id);
82 81
83#endif /* CONFIG_MIPS_MT_SMTC */ 82#endif /* CONFIG_MIPS_MT_SMTC */
@@ -85,7 +84,8 @@ irqreturn_t sim_timer_interrupt(int irq, void *dev_id)
85 /* 84 /*
86 * every CPU should do profiling and process accounting 85 * every CPU should do profiling and process accounting
87 */ 86 */
88 local_timer_interrupt (irq, dev_id); 87 local_timer_interrupt (irq, dev_id);
88
89 return IRQ_HANDLED; 89 return IRQ_HANDLED;
90#else 90#else
91 return timer_interrupt (irq, dev_id); 91 return timer_interrupt (irq, dev_id);
@@ -152,17 +152,15 @@ void __init sim_time_init(void)
152 152
153 local_irq_save(flags); 153 local_irq_save(flags);
154 154
155 155 /* Set Data mode - binary. */
156 /* Set Data mode - binary. */
157 CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL); 156 CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL);
158 157
159
160 est_freq = estimate_cpu_frequency (); 158 est_freq = estimate_cpu_frequency ();
161 159
162 printk("CPU frequency %d.%02d MHz\n", est_freq/1000000, 160 printk(KERN_INFO "CPU frequency %d.%02d MHz\n", est_freq / 1000000,
163 (est_freq%1000000)*100/1000000); 161 (est_freq % 1000000) * 100 / 1000000);
164 162
165 cpu_khz = est_freq / 1000; 163 cpu_khz = est_freq / 1000;
166 164
167 local_irq_restore(flags); 165 local_irq_restore(flags);
168} 166}
@@ -180,11 +178,10 @@ void __init plat_timer_setup(struct irqaction *irq)
180 if (cpu_has_veic) { 178 if (cpu_has_veic) {
181 set_vi_handler(MSC01E_INT_CPUCTR, mips_timer_dispatch); 179 set_vi_handler(MSC01E_INT_CPUCTR, mips_timer_dispatch);
182 mips_cpu_timer_irq = MSC01E_INT_BASE + MSC01E_INT_CPUCTR; 180 mips_cpu_timer_irq = MSC01E_INT_BASE + MSC01E_INT_CPUCTR;
183 } 181 } else {
184 else {
185 if (cpu_has_vint) 182 if (cpu_has_vint)
186 set_vi_handler(MIPSCPU_INT_CPUCTR, mips_timer_dispatch); 183 set_vi_handler(cp0_compare_irq, mips_timer_dispatch);
187 mips_cpu_timer_irq = MIPSCPU_INT_BASE + MIPSCPU_INT_CPUCTR; 184 mips_cpu_timer_irq = MIPS_CPU_IRQ_BASE + cp0_compare_irq;
188 } 185 }
189 186
190 /* we are using the cpu counter for timer interrupts */ 187 /* we are using the cpu counter for timer interrupts */
diff --git a/arch/mips/mm/Makefile b/arch/mips/mm/Makefile
index 293697b15603..19a0e544c4e9 100644
--- a/arch/mips/mm/Makefile
+++ b/arch/mips/mm/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_32BIT) += ioremap.o pgtable-32.o
9obj-$(CONFIG_64BIT) += pgtable-64.o 9obj-$(CONFIG_64BIT) += pgtable-64.o
10obj-$(CONFIG_HIGHMEM) += highmem.o 10obj-$(CONFIG_HIGHMEM) += highmem.o
11 11
12obj-$(CONFIG_CPU_LOONGSON2) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
12obj-$(CONFIG_CPU_MIPS32) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o 13obj-$(CONFIG_CPU_MIPS32) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
13obj-$(CONFIG_CPU_MIPS64) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o 14obj-$(CONFIG_CPU_MIPS64) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
14obj-$(CONFIG_CPU_NEVADA) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o 15obj-$(CONFIG_CPU_NEVADA) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index df04a315d830..be96231dccb6 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -335,6 +335,10 @@ static void r4k_flush_cache_all(void)
335 335
336static inline void local_r4k___flush_cache_all(void * args) 336static inline void local_r4k___flush_cache_all(void * args)
337{ 337{
338#if defined(CONFIG_CPU_LOONGSON2)
339 r4k_blast_scache();
340 return;
341#endif
338 r4k_blast_dcache(); 342 r4k_blast_dcache();
339 r4k_blast_icache(); 343 r4k_blast_icache();
340 344
@@ -848,6 +852,24 @@ static void __init probe_pcache(void)
848 c->options |= MIPS_CPU_PREFETCH; 852 c->options |= MIPS_CPU_PREFETCH;
849 break; 853 break;
850 854
855 case CPU_LOONGSON2:
856 icache_size = 1 << (12 + ((config & CONF_IC) >> 9));
857 c->icache.linesz = 16 << ((config & CONF_IB) >> 5);
858 if (prid & 0x3)
859 c->icache.ways = 4;
860 else
861 c->icache.ways = 2;
862 c->icache.waybit = 0;
863
864 dcache_size = 1 << (12 + ((config & CONF_DC) >> 6));
865 c->dcache.linesz = 16 << ((config & CONF_DB) >> 4);
866 if (prid & 0x3)
867 c->dcache.ways = 4;
868 else
869 c->dcache.ways = 2;
870 c->dcache.waybit = 0;
871 break;
872
851 default: 873 default:
852 if (!(config & MIPS_CONF_M)) 874 if (!(config & MIPS_CONF_M))
853 panic("Don't know how to probe P-caches on this cpu."); 875 panic("Don't know how to probe P-caches on this cpu.");
@@ -963,6 +985,14 @@ static void __init probe_pcache(void)
963 break; 985 break;
964 } 986 }
965 987
988#ifdef CONFIG_CPU_LOONGSON2
989 /*
990 * LOONGSON2 has 4 way icache, but when using indexed cache op,
991 * one op will act on all 4 ways
992 */
993 c->icache.ways = 1;
994#endif
995
966 printk("Primary instruction cache %ldkB, %s, %s, linesize %d bytes.\n", 996 printk("Primary instruction cache %ldkB, %s, %s, linesize %d bytes.\n",
967 icache_size >> 10, 997 icache_size >> 10,
968 cpu_has_vtag_icache ? "virtually tagged" : "physically tagged", 998 cpu_has_vtag_icache ? "virtually tagged" : "physically tagged",
@@ -1036,6 +1066,24 @@ static int __init probe_scache(void)
1036 return 1; 1066 return 1;
1037} 1067}
1038 1068
1069#if defined(CONFIG_CPU_LOONGSON2)
1070static void __init loongson2_sc_init(void)
1071{
1072 struct cpuinfo_mips *c = &current_cpu_data;
1073
1074 scache_size = 512*1024;
1075 c->scache.linesz = 32;
1076 c->scache.ways = 4;
1077 c->scache.waybit = 0;
1078 c->scache.waysize = scache_size / (c->scache.ways);
1079 c->scache.sets = scache_size / (c->scache.linesz * c->scache.ways);
1080 pr_info("Unified secondary cache %ldkB %s, linesize %d bytes.\n",
1081 scache_size >> 10, way_string[c->scache.ways], c->scache.linesz);
1082
1083 c->options |= MIPS_CPU_INCLUSIVE_CACHES;
1084}
1085#endif
1086
1039extern int r5k_sc_init(void); 1087extern int r5k_sc_init(void);
1040extern int rm7k_sc_init(void); 1088extern int rm7k_sc_init(void);
1041extern int mips_sc_init(void); 1089extern int mips_sc_init(void);
@@ -1085,6 +1133,12 @@ static void __init setup_scache(void)
1085#endif 1133#endif
1086 return; 1134 return;
1087 1135
1136#if defined(CONFIG_CPU_LOONGSON2)
1137 case CPU_LOONGSON2:
1138 loongson2_sc_init();
1139 return;
1140#endif
1141
1088 default: 1142 default:
1089 if (c->isa_level == MIPS_CPU_ISA_M32R1 || 1143 if (c->isa_level == MIPS_CPU_ISA_M32R1 ||
1090 c->isa_level == MIPS_CPU_ISA_M32R2 || 1144 c->isa_level == MIPS_CPU_ISA_M32R2 ||
diff --git a/arch/mips/mm/c-sb1.c b/arch/mips/mm/c-sb1.c
index 9ea460b16bda..6f9bd7fbd481 100644
--- a/arch/mips/mm/c-sb1.c
+++ b/arch/mips/mm/c-sb1.c
@@ -476,7 +476,7 @@ static __init void probe_cache_sizes(void)
476 * memory management function pointers, as well as initialize 476 * memory management function pointers, as well as initialize
477 * the caches and tlbs 477 * the caches and tlbs
478 */ 478 */
479void sb1_cache_init(void) 479void __init sb1_cache_init(void)
480{ 480{
481 extern char except_vec2_sb1; 481 extern char except_vec2_sb1;
482 482
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index abf99b1eba13..81f925a9a731 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -6,6 +6,8 @@
6 * Copyright (C) 1994 - 2003, 07 by Ralf Baechle (ralf@linux-mips.org) 6 * Copyright (C) 1994 - 2003, 07 by Ralf Baechle (ralf@linux-mips.org)
7 * Copyright (C) 2007 MIPS Technologies, Inc. 7 * Copyright (C) 2007 MIPS Technologies, Inc.
8 */ 8 */
9#include <linux/fs.h>
10#include <linux/fcntl.h>
9#include <linux/init.h> 11#include <linux/init.h>
10#include <linux/kernel.h> 12#include <linux/kernel.h>
11#include <linux/module.h> 13#include <linux/module.h>
@@ -164,3 +166,11 @@ void __init cpu_cache_init(void)
164 166
165 panic(cache_panic); 167 panic(cache_panic);
166} 168}
169
170int __weak __uncached_access(struct file *file, unsigned long addr)
171{
172 if (file->f_flags & O_SYNC)
173 return 1;
174
175 return addr >= __pa(high_memory);
176}
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
index f0eb29917d9a..76903c727647 100644
--- a/arch/mips/mm/dma-default.c
+++ b/arch/mips/mm/dma-default.c
@@ -168,8 +168,9 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
168 addr = (unsigned long) page_address(sg->page); 168 addr = (unsigned long) page_address(sg->page);
169 if (!plat_device_is_coherent(dev) && addr) 169 if (!plat_device_is_coherent(dev) && addr)
170 __dma_sync(addr + sg->offset, sg->length, direction); 170 __dma_sync(addr + sg->offset, sg->length, direction);
171 sg->dma_address = plat_map_dma_mem_page(dev, sg->page) + 171 sg->dma_address = plat_map_dma_mem(dev,
172 sg->offset; 172 (void *)(addr + sg->offset),
173 sg->length);
173 } 174 }
174 175
175 return nents; 176 return nents;
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
index 7ebea331edb8..521771b373de 100644
--- a/arch/mips/mm/fault.c
+++ b/arch/mips/mm/fault.c
@@ -39,6 +39,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write,
39 struct mm_struct *mm = tsk->mm; 39 struct mm_struct *mm = tsk->mm;
40 const int field = sizeof(unsigned long) * 2; 40 const int field = sizeof(unsigned long) * 2;
41 siginfo_t info; 41 siginfo_t info;
42 int fault;
42 43
43#if 0 44#if 0
44 printk("Cpu%d[%s:%d:%0*lx:%ld:%0*lx]\n", raw_smp_processor_id(), 45 printk("Cpu%d[%s:%d:%0*lx:%ld:%0*lx]\n", raw_smp_processor_id(),
@@ -102,20 +103,18 @@ survive:
102 * make sure we exit gracefully rather than endlessly redo 103 * make sure we exit gracefully rather than endlessly redo
103 * the fault. 104 * the fault.
104 */ 105 */
105 switch (handle_mm_fault(mm, vma, address, write)) { 106 fault = handle_mm_fault(mm, vma, address, write);
106 case VM_FAULT_MINOR: 107 if (unlikely(fault & VM_FAULT_ERROR)) {
107 tsk->min_flt++; 108 if (fault & VM_FAULT_OOM)
108 break; 109 goto out_of_memory;
109 case VM_FAULT_MAJOR: 110 else if (fault & VM_FAULT_SIGBUS)
110 tsk->maj_flt++; 111 goto do_sigbus;
111 break;
112 case VM_FAULT_SIGBUS:
113 goto do_sigbus;
114 case VM_FAULT_OOM:
115 goto out_of_memory;
116 default:
117 BUG(); 112 BUG();
118 } 113 }
114 if (fault & VM_FAULT_MAJOR)
115 tsk->maj_flt++;
116 else
117 tsk->min_flt++;
119 118
120 up_read(&mm->mmap_sem); 119 up_read(&mm->mmap_sem);
121 return; 120 return;
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index 65160d4984d9..dcd6913dc1ff 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -48,6 +48,22 @@ extern void build_tlb_refill_handler(void);
48 48
49#endif /* CONFIG_MIPS_MT_SMTC */ 49#endif /* CONFIG_MIPS_MT_SMTC */
50 50
51#if defined(CONFIG_CPU_LOONGSON2)
52/*
53 * LOONGSON2 has a 4 entry itlb which is a subset of dtlb,
54 * unfortrunately, itlb is not totally transparent to software.
55 */
56#define FLUSH_ITLB write_c0_diag(4);
57
58#define FLUSH_ITLB_VM(vma) { if ((vma)->vm_flags & VM_EXEC) write_c0_diag(4); }
59
60#else
61
62#define FLUSH_ITLB
63#define FLUSH_ITLB_VM(vma)
64
65#endif
66
51void local_flush_tlb_all(void) 67void local_flush_tlb_all(void)
52{ 68{
53 unsigned long flags; 69 unsigned long flags;
@@ -73,6 +89,7 @@ void local_flush_tlb_all(void)
73 } 89 }
74 tlbw_use_hazard(); 90 tlbw_use_hazard();
75 write_c0_entryhi(old_ctx); 91 write_c0_entryhi(old_ctx);
92 FLUSH_ITLB;
76 EXIT_CRITICAL(flags); 93 EXIT_CRITICAL(flags);
77} 94}
78 95
@@ -136,6 +153,7 @@ void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
136 } else { 153 } else {
137 drop_mmu_context(mm, cpu); 154 drop_mmu_context(mm, cpu);
138 } 155 }
156 FLUSH_ITLB;
139 EXIT_CRITICAL(flags); 157 EXIT_CRITICAL(flags);
140 } 158 }
141} 159}
@@ -178,6 +196,7 @@ void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
178 } else { 196 } else {
179 local_flush_tlb_all(); 197 local_flush_tlb_all();
180 } 198 }
199 FLUSH_ITLB;
181 EXIT_CRITICAL(flags); 200 EXIT_CRITICAL(flags);
182} 201}
183 202
@@ -210,6 +229,7 @@ void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
210 229
211 finish: 230 finish:
212 write_c0_entryhi(oldpid); 231 write_c0_entryhi(oldpid);
232 FLUSH_ITLB_VM(vma);
213 EXIT_CRITICAL(flags); 233 EXIT_CRITICAL(flags);
214 } 234 }
215} 235}
@@ -241,7 +261,7 @@ void local_flush_tlb_one(unsigned long page)
241 tlbw_use_hazard(); 261 tlbw_use_hazard();
242 } 262 }
243 write_c0_entryhi(oldpid); 263 write_c0_entryhi(oldpid);
244 264 FLUSH_ITLB;
245 EXIT_CRITICAL(flags); 265 EXIT_CRITICAL(flags);
246} 266}
247 267
@@ -293,6 +313,7 @@ void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte)
293 else 313 else
294 tlb_write_indexed(); 314 tlb_write_indexed();
295 tlbw_use_hazard(); 315 tlbw_use_hazard();
316 FLUSH_ITLB_VM(vma);
296 EXIT_CRITICAL(flags); 317 EXIT_CRITICAL(flags);
297} 318}
298 319
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index e7149290d1cb..4ec0964b8394 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -893,6 +893,7 @@ static __init void build_tlb_write_entry(u32 **p, struct label **l,
893 case CPU_4KSC: 893 case CPU_4KSC:
894 case CPU_20KC: 894 case CPU_20KC:
895 case CPU_25KF: 895 case CPU_25KF:
896 case CPU_LOONGSON2:
896 tlbw(p); 897 tlbw(p);
897 break; 898 break;
898 899
@@ -1276,7 +1277,8 @@ static void __init build_r4000_tlb_refill_handler(void)
1276 * need three, with the second nop'ed and the third being 1277 * need three, with the second nop'ed and the third being
1277 * unused. 1278 * unused.
1278 */ 1279 */
1279#ifdef CONFIG_32BIT 1280 /* Loongson2 ebase is different than r4k, we have more space */
1281#if defined(CONFIG_32BIT) || defined(CONFIG_CPU_LOONGSON2)
1280 if ((p - tlb_handler) > 64) 1282 if ((p - tlb_handler) > 64)
1281 panic("TLB refill handler space exceeded"); 1283 panic("TLB refill handler space exceeded");
1282#else 1284#else
@@ -1289,7 +1291,7 @@ static void __init build_r4000_tlb_refill_handler(void)
1289 /* 1291 /*
1290 * Now fold the handler in the TLB refill handler space. 1292 * Now fold the handler in the TLB refill handler space.
1291 */ 1293 */
1292#ifdef CONFIG_32BIT 1294#if defined(CONFIG_32BIT) || defined(CONFIG_CPU_LOONGSON2)
1293 f = final_handler; 1295 f = final_handler;
1294 /* Simplest case, just copy the handler. */ 1296 /* Simplest case, just copy the handler. */
1295 copy_handler(relocs, labels, tlb_handler, p, f); 1297 copy_handler(relocs, labels, tlb_handler, p, f);
@@ -1336,7 +1338,7 @@ static void __init build_r4000_tlb_refill_handler(void)
1336 final_len); 1338 final_len);
1337 1339
1338 f = final_handler; 1340 f = final_handler;
1339#ifdef CONFIG_64BIT 1341#if defined(CONFIG_64BIT) && !defined(CONFIG_CPU_LOONGSON2)
1340 if (final_len > 32) 1342 if (final_len > 32)
1341 final_len = 64; 1343 final_len = 64;
1342 else 1344 else
diff --git a/arch/mips/momentum/ocelot_3/Makefile b/arch/mips/momentum/ocelot_3/Makefile
deleted file mode 100644
index d5a090a85a15..000000000000
--- a/arch/mips/momentum/ocelot_3/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
1#
2# Makefile for Momentum Computer's Ocelot-3 board.
3#
4# Note! Dependencies are done automagically by 'make dep', which also
5# removes any old dependencies. DON'T put your own dependencies here
6# unless it's something special (ie not a .c file).
7#
8obj-y += irq.o platform.o prom.o reset.o setup.o
diff --git a/arch/mips/momentum/ocelot_3/irq.c b/arch/mips/momentum/ocelot_3/irq.c
deleted file mode 100644
index 3862d1d1add4..000000000000
--- a/arch/mips/momentum/ocelot_3/irq.c
+++ /dev/null
@@ -1,109 +0,0 @@
1/*
2 * Copyright (C) 2000 RidgeRun, Inc.
3 * Author: RidgeRun, Inc.
4 * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
5 *
6 * Copyright 2001 MontaVista Software Inc.
7 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
8 * Copyright (C) 2000, 2001 Ralf Baechle (ralf@gnu.org)
9 *
10 * Copyright 2004 PMC-Sierra
11 * Author: Manish Lachwani (lachwani@pmc-sierra.com)
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 *
18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
19 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
21 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
24 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * You should have received a copy of the GNU General Public License along
30 * with this program; if not, write to the Free Software Foundation, Inc.,
31 * 675 Mass Ave, Cambridge, MA 02139, USA.
32 *
33 * Copyright (C) 2004 MontaVista Software Inc.
34 * Author: Manish Lachwani, mlachwani@mvista.com
35 *
36 */
37#include <linux/errno.h>
38#include <linux/init.h>
39#include <linux/kernel_stat.h>
40#include <linux/module.h>
41#include <linux/signal.h>
42#include <linux/sched.h>
43#include <linux/types.h>
44#include <linux/interrupt.h>
45#include <linux/ioport.h>
46#include <linux/timex.h>
47#include <linux/slab.h>
48#include <linux/random.h>
49#include <asm/bitops.h>
50#include <asm/bootinfo.h>
51#include <asm/io.h>
52#include <asm/irq.h>
53#include <asm/mipsregs.h>
54#include <asm/system.h>
55
56static struct irqaction cascade_mv64340 = {
57 no_action, IRQF_DISABLED, CPU_MASK_NONE, "MV64340-Cascade", NULL, NULL
58};
59
60void __init arch_init_irq(void)
61{
62 /*
63 * Clear all of the interrupts while we change the able around a bit.
64 * int-handler is not on bootstrap
65 */
66 clear_c0_status(ST0_IM | ST0_BEV);
67
68 rm7k_cpu_irq_init();
69
70 /* set up the cascading interrupts */
71 setup_irq(8, &cascade_mv64340); /* unmask intControl IM8, IRQ 9 */
72 mv64340_irq_init(16);
73
74 set_c0_status(ST0_IM); /* IE in the status register */
75
76}
77
78asmlinkage void plat_irq_dispatch(void)
79{
80 unsigned int pending = read_c0_cause() & read_c0_status();
81
82 if (pending & STATUSF_IP0)
83 do_IRQ(0);
84 else if (pending & STATUSF_IP1)
85 do_IRQ(1);
86 else if (pending & STATUSF_IP2)
87 do_IRQ(2);
88 else if (pending & STATUSF_IP3)
89 do_IRQ(3);
90 else if (pending & STATUSF_IP4)
91 do_IRQ(4);
92 else if (pending & STATUSF_IP5)
93 do_IRQ(5);
94 else if (pending & STATUSF_IP6)
95 do_IRQ(6);
96 else if (pending & STATUSF_IP7)
97 do_IRQ(7);
98 else {
99 /*
100 * Now look at the extended interrupts
101 */
102 pending = (read_c0_cause() & (read_c0_intcontrol() << 8)) >> 16;
103
104 if (pending & STATUSF_IP8)
105 ll_mv64340_irq();
106 else
107 spurious_interrupt();
108 }
109}
diff --git a/arch/mips/momentum/ocelot_3/platform.c b/arch/mips/momentum/ocelot_3/platform.c
deleted file mode 100644
index 44e4c3fc7403..000000000000
--- a/arch/mips/momentum/ocelot_3/platform.c
+++ /dev/null
@@ -1,208 +0,0 @@
1#include <linux/delay.h>
2#include <linux/if_ether.h>
3#include <linux/ioport.h>
4#include <linux/mv643xx.h>
5#include <linux/platform_device.h>
6
7#include "ocelot_3_fpga.h"
8
9#if defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE)
10
11static struct resource mv643xx_eth_shared_resources[] = {
12 [0] = {
13 .name = "ethernet shared base",
14 .start = 0xf1000000 + MV643XX_ETH_SHARED_REGS,
15 .end = 0xf1000000 + MV643XX_ETH_SHARED_REGS +
16 MV643XX_ETH_SHARED_REGS_SIZE - 1,
17 .flags = IORESOURCE_MEM,
18 },
19};
20
21static struct platform_device mv643xx_eth_shared_device = {
22 .name = MV643XX_ETH_SHARED_NAME,
23 .id = 0,
24 .num_resources = ARRAY_SIZE(mv643xx_eth_shared_resources),
25 .resource = mv643xx_eth_shared_resources,
26};
27
28#define MV_SRAM_BASE 0xfe000000UL
29#define MV_SRAM_SIZE (256 * 1024)
30
31#define MV_SRAM_RXRING_SIZE (MV_SRAM_SIZE / 4)
32#define MV_SRAM_TXRING_SIZE (MV_SRAM_SIZE / 4)
33
34#define MV_SRAM_BASE_ETH0 MV_SRAM_BASE
35#define MV_SRAM_BASE_ETH1 (MV_SRAM_BASE + (MV_SRAM_SIZE / 2))
36
37#define MV64x60_IRQ_ETH_0 48
38#define MV64x60_IRQ_ETH_1 49
39#define MV64x60_IRQ_ETH_2 50
40
41static struct resource mv64x60_eth0_resources[] = {
42 [0] = {
43 .name = "eth0 irq",
44 .start = MV64x60_IRQ_ETH_0,
45 .end = MV64x60_IRQ_ETH_0,
46 .flags = IORESOURCE_IRQ,
47 },
48};
49
50static struct mv643xx_eth_platform_data eth0_pd = {
51 .port_number = 0,
52
53 .tx_sram_addr = MV_SRAM_BASE_ETH0,
54 .tx_sram_size = MV_SRAM_TXRING_SIZE,
55 .tx_queue_size = MV_SRAM_TXRING_SIZE / 16,
56
57 .rx_sram_addr = MV_SRAM_BASE_ETH0 + MV_SRAM_TXRING_SIZE,
58 .rx_sram_size = MV_SRAM_RXRING_SIZE,
59 .rx_queue_size = MV_SRAM_RXRING_SIZE / 16,
60};
61
62static struct platform_device eth0_device = {
63 .name = MV643XX_ETH_NAME,
64 .id = 0,
65 .num_resources = ARRAY_SIZE(mv64x60_eth0_resources),
66 .resource = mv64x60_eth0_resources,
67 .dev = {
68 .platform_data = &eth0_pd,
69 },
70};
71
72static struct resource mv64x60_eth1_resources[] = {
73 [0] = {
74 .name = "eth1 irq",
75 .start = MV64x60_IRQ_ETH_1,
76 .end = MV64x60_IRQ_ETH_1,
77 .flags = IORESOURCE_IRQ,
78 },
79};
80
81static struct mv643xx_eth_platform_data eth1_pd = {
82 .port_number = 1,
83
84 .tx_sram_addr = MV_SRAM_BASE_ETH1,
85 .tx_sram_size = MV_SRAM_TXRING_SIZE,
86 .tx_queue_size = MV_SRAM_TXRING_SIZE / 16,
87
88 .rx_sram_addr = MV_SRAM_BASE_ETH1 + MV_SRAM_TXRING_SIZE,
89 .rx_sram_size = MV_SRAM_RXRING_SIZE,
90 .rx_queue_size = MV_SRAM_RXRING_SIZE / 16,
91};
92
93static struct platform_device eth1_device = {
94 .name = MV643XX_ETH_NAME,
95 .id = 1,
96 .num_resources = ARRAY_SIZE(mv64x60_eth1_resources),
97 .resource = mv64x60_eth1_resources,
98 .dev = {
99 .platform_data = &eth1_pd,
100 },
101};
102
103static struct resource mv64x60_eth2_resources[] = {
104 [0] = {
105 .name = "eth2 irq",
106 .start = MV64x60_IRQ_ETH_2,
107 .end = MV64x60_IRQ_ETH_2,
108 .flags = IORESOURCE_IRQ,
109 },
110};
111
112static struct mv643xx_eth_platform_data eth2_pd = {
113 .port_number = 2,
114};
115
116static struct platform_device eth2_device = {
117 .name = MV643XX_ETH_NAME,
118 .id = 2,
119 .num_resources = ARRAY_SIZE(mv64x60_eth2_resources),
120 .resource = mv64x60_eth2_resources,
121 .dev = {
122 .platform_data = &eth2_pd,
123 },
124};
125
126static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
127 &mv643xx_eth_shared_device,
128 &eth0_device,
129 &eth1_device,
130 &eth2_device,
131};
132
133static u8 __init exchange_bit(u8 val, u8 cs)
134{
135 /* place the data */
136 OCELOT_FPGA_WRITE((val << 2) | cs, EEPROM_MODE);
137 udelay(1);
138
139 /* turn the clock on */
140 OCELOT_FPGA_WRITE((val << 2) | cs | 0x2, EEPROM_MODE);
141 udelay(1);
142
143 /* turn the clock off and read-strobe */
144 OCELOT_FPGA_WRITE((val << 2) | cs | 0x10, EEPROM_MODE);
145
146 /* return the data */
147 return (OCELOT_FPGA_READ(EEPROM_MODE) >> 3) & 0x1;
148}
149
150static void __init get_mac(char dest[6])
151{
152 u8 read_opcode[12] = {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
153 int i,j;
154
155 for (i = 0; i < 12; i++)
156 exchange_bit(read_opcode[i], 1);
157
158 for (j = 0; j < 6; j++) {
159 dest[j] = 0;
160 for (i = 0; i < 8; i++) {
161 dest[j] <<= 1;
162 dest[j] |= exchange_bit(0, 1);
163 }
164 }
165
166 /* turn off CS */
167 exchange_bit(0,0);
168}
169
170/*
171 * Copy and increment ethernet MAC address by a small value.
172 *
173 * This is useful for systems where the only one MAC address is stored in
174 * non-volatile memory for multiple ports.
175 */
176static inline void eth_mac_add(unsigned char *dst, unsigned char *src,
177 unsigned int add)
178{
179 int i;
180
181 BUG_ON(add >= 256);
182
183 for (i = ETH_ALEN; i >= 0; i--) {
184 dst[i] = src[i] + add;
185 add = dst[i] < src[i]; /* compute carry */
186 }
187
188 WARN_ON(add);
189}
190
191static int __init mv643xx_eth_add_pds(void)
192{
193 unsigned char mac[ETH_ALEN];
194 int ret;
195
196 get_mac(mac);
197 eth_mac_add(eth0_pd.mac_addr, mac, 0);
198 eth_mac_add(eth1_pd.mac_addr, mac, 1);
199 eth_mac_add(eth2_pd.mac_addr, mac, 2);
200 ret = platform_add_devices(mv643xx_eth_pd_devs,
201 ARRAY_SIZE(mv643xx_eth_pd_devs));
202
203 return ret;
204}
205
206device_initcall(mv643xx_eth_add_pds);
207
208#endif /* defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE) */
diff --git a/arch/mips/momentum/ocelot_3/prom.c b/arch/mips/momentum/ocelot_3/prom.c
deleted file mode 100644
index 8e02df63578a..000000000000
--- a/arch/mips/momentum/ocelot_3/prom.c
+++ /dev/null
@@ -1,189 +0,0 @@
1/*
2 * Copyright 2002 Momentum Computer Inc.
3 * Author: Matthew Dharm <mdharm@momenco.com>
4 *
5 * Louis Hamilton, Red Hat, Inc.
6 * hamilton@redhat.com [MIPS64 modifications]
7 *
8 * Copyright 2004 PMC-Sierra
9 * Author: Manish Lachwani (lachwani@pmc-sierra.com)
10 *
11 * Based on Ocelot Linux port, which is
12 * Copyright 2001 MontaVista Software Inc.
13 * Author: jsun@mvista.com or jsun@junsun.net
14 *
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
19 *
20 * Copyright (C) 2004 MontaVista Software Inc.
21 * Author: Manish Lachwani, mlachwani@mvista.com
22 *
23 */
24#include <linux/init.h>
25#include <linux/bootmem.h>
26#include <linux/mv643xx.h>
27
28#include <asm/addrspace.h>
29#include <asm/bootinfo.h>
30#include <asm/pmon.h>
31#include "ocelot_3_fpga.h"
32
33struct callvectors* debug_vectors;
34extern unsigned long marvell_base;
35extern unsigned long cpu_clock;
36
37const char *get_system_type(void)
38{
39 return "Momentum Ocelot-3";
40}
41
42#ifdef CONFIG_64BIT
43
44unsigned long signext(unsigned long addr)
45{
46 addr &= 0xffffffff;
47 return (unsigned long)((int)addr);
48}
49
50void *get_arg(unsigned long args, int arc)
51{
52 unsigned long ul;
53 unsigned char *puc, uc;
54
55 args += (arc * 4);
56 ul = (unsigned long)signext(args);
57 puc = (unsigned char *)ul;
58 if (puc == 0)
59 return (void *)0;
60
61#ifdef CONFIG_CPU_LITTLE_ENDIAN
62 uc = *puc++;
63 ul = (unsigned long)uc;
64 uc = *puc++;
65 ul |= (((unsigned long)uc) << 8);
66 uc = *puc++;
67 ul |= (((unsigned long)uc) << 16);
68 uc = *puc++;
69 ul |= (((unsigned long)uc) << 24);
70#else /* CONFIG_CPU_LITTLE_ENDIAN */
71 uc = *puc++;
72 ul = ((unsigned long)uc) << 24;
73 uc = *puc++;
74 ul |= (((unsigned long)uc) << 16);
75 uc = *puc++;
76 ul |= (((unsigned long)uc) << 8);
77 uc = *puc++;
78 ul |= ((unsigned long)uc);
79#endif /* CONFIG_CPU_LITTLE_ENDIAN */
80 ul = signext(ul);
81 return (void *)ul;
82}
83
84char *arg64(unsigned long addrin, int arg_index)
85{
86 unsigned long args;
87 char *p;
88
89 args = signext(addrin);
90 p = (char *)get_arg(args, arg_index);
91
92 return p;
93}
94#endif /* CONFIG_64BIT */
95
96void __init prom_init(void)
97{
98 int argc = fw_arg0;
99 char **arg = (char **) fw_arg1;
100 char **env = (char **) fw_arg2;
101 struct callvectors *cv = (struct callvectors *) fw_arg3;
102 int i;
103
104#ifdef CONFIG_64BIT
105 char *ptr;
106 printk("prom_init - MIPS64\n");
107
108 /* save the PROM vectors for debugging use */
109 debug_vectors = (struct callvectors *)signext((unsigned long)cv);
110
111 /* arg[0] is "g", the rest is boot parameters */
112 arcs_cmdline[0] = '\0';
113
114 for (i = 1; i < argc; i++) {
115 ptr = (char *)arg64((unsigned long)arg, i);
116 if ((strlen(arcs_cmdline) + strlen(ptr) + 1) >=
117 sizeof(arcs_cmdline))
118 break;
119 strcat(arcs_cmdline, ptr);
120 strcat(arcs_cmdline, " ");
121 }
122 i = 0;
123
124 while (1) {
125 ptr = (char *)arg64((unsigned long)env, i);
126 if (! ptr)
127 break;
128
129 if (strncmp("gtbase", ptr, strlen("gtbase")) == 0) {
130 marvell_base = simple_strtol(ptr + strlen("gtbase="),
131 NULL, 16);
132
133 if ((marvell_base & 0xffffffff00000000) == 0)
134 marvell_base |= 0xffffffff00000000;
135
136 printk("marvell_base set to 0x%016lx\n", marvell_base);
137 }
138 if (strncmp("cpuclock", ptr, strlen("cpuclock")) == 0) {
139 cpu_clock = simple_strtol(ptr + strlen("cpuclock="),
140 NULL, 10);
141 printk("cpu_clock set to %d\n", cpu_clock);
142 }
143 i++;
144 }
145 printk("arcs_cmdline: %s\n", arcs_cmdline);
146
147#else /* CONFIG_64BIT */
148
149 /* save the PROM vectors for debugging use */
150 debug_vectors = cv;
151
152 /* arg[0] is "g", the rest is boot parameters */
153 arcs_cmdline[0] = '\0';
154 for (i = 1; i < argc; i++) {
155 if (strlen(arcs_cmdline) + strlen(arg[i] + 1)
156 >= sizeof(arcs_cmdline))
157 break;
158 strcat(arcs_cmdline, arg[i]);
159 strcat(arcs_cmdline, " ");
160 }
161
162 while (*env) {
163 if (strncmp("gtbase", *env, strlen("gtbase")) == 0) {
164 marvell_base = simple_strtol(*env + strlen("gtbase="),
165 NULL, 16);
166 }
167 if (strncmp("cpuclock", *env, strlen("cpuclock")) == 0) {
168 cpu_clock = simple_strtol(*env + strlen("cpuclock="),
169 NULL, 10);
170 }
171 env++;
172 }
173#endif /* CONFIG_64BIT */
174
175 mips_machgroup = MACH_GROUP_MOMENCO;
176 mips_machtype = MACH_MOMENCO_OCELOT_3;
177
178#ifndef CONFIG_64BIT
179 debug_vectors->printf("Booting Linux kernel...\n");
180#endif
181}
182
183void __init prom_free_prom_memory(void)
184{
185}
186
187void __init prom_fixup_mem_map(unsigned long start, unsigned long end)
188{
189}
diff --git a/arch/mips/momentum/ocelot_3/reset.c b/arch/mips/momentum/ocelot_3/reset.c
deleted file mode 100644
index 9d86d2468376..000000000000
--- a/arch/mips/momentum/ocelot_3/reset.c
+++ /dev/null
@@ -1,59 +0,0 @@
1/*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the License, or (at your
5 * option) any later version.
6 *
7 * Copyright (C) 1997, 01, 05 Ralf Baechle
8 * Copyright 2001 MontaVista Software Inc.
9 * Author: jsun@mvista.com or jsun@junsun.net
10 *
11 * Copyright (C) 2002 Momentum Computer Inc.
12 * Author: Matthew Dharm <mdharm@momenco.com>
13 *
14 * Louis Hamilton, Red Hat, Inc.
15 * hamilton@redhat.com [MIPS64 modifications]
16 *
17 * Copyright 2004 PMC-Sierra
18 * Author: Manish Lachwani (lachwani@pmc-sierra.com)
19 *
20 * Copyright (C) 2004 MontaVista Software Inc.
21 * Author: Manish Lachwani, mlachwani@mvista.com
22 */
23#include <linux/sched.h>
24#include <linux/mm.h>
25#include <linux/delay.h>
26#include <asm/io.h>
27#include <asm/pgtable.h>
28#include <asm/processor.h>
29#include <asm/reboot.h>
30#include <asm/system.h>
31
32void momenco_ocelot_restart(char *command)
33{
34 /* base address of timekeeper portion of part */
35 void *nvram = (void *) 0xfc807000L;
36
37 /* Ask the NVRAM/RTC/watchdog chip to assert reset in 1/16 second */
38 writeb(0x84, nvram + 0xff7);
39
40 /* wait for the watchdog to go off */
41 mdelay(100+(1000/16));
42
43 /* if the watchdog fails for some reason, let people know */
44 printk(KERN_NOTICE "Watchdog reset failed\n");
45}
46
47void momenco_ocelot_halt(void)
48{
49 printk(KERN_NOTICE "\n** You can safely turn off the power\n");
50 while (1)
51 __asm__(".set\tmips3\n\t"
52 "wait\n\t"
53 ".set\tmips0");
54}
55
56void momenco_ocelot_power_off(void)
57{
58 momenco_ocelot_halt();
59}
diff --git a/arch/mips/momentum/ocelot_3/setup.c b/arch/mips/momentum/ocelot_3/setup.c
deleted file mode 100644
index ff0829f81116..000000000000
--- a/arch/mips/momentum/ocelot_3/setup.c
+++ /dev/null
@@ -1,398 +0,0 @@
1/*
2 * setup.c
3 *
4 * BRIEF MODULE DESCRIPTION
5 * Momentum Computer Ocelot-3 board dependent boot routines
6 *
7 * Copyright (C) 1996, 1997, 01, 05 - 06 Ralf Baechle
8 * Copyright (C) 2000 RidgeRun, Inc.
9 * Copyright (C) 2001 Red Hat, Inc.
10 * Copyright (C) 2002 Momentum Computer
11 *
12 * Author: Matthew Dharm, Momentum Computer
13 * mdharm@momenco.com
14 *
15 * Louis Hamilton, Red Hat, Inc.
16 * hamilton@redhat.com [MIPS64 modifications]
17 *
18 * Author: RidgeRun, Inc.
19 * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
20 *
21 * Copyright 2001 MontaVista Software Inc.
22 * Author: jsun@mvista.com or jsun@junsun.net
23 *
24 * Copyright 2004 PMC-Sierra
25 * Author: Manish Lachwani (lachwani@pmc-sierra.com)
26 *
27 * Copyright (C) 2004 MontaVista Software Inc.
28 * Author: Manish Lachwani, mlachwani@mvista.com
29 *
30 * This program is free software; you can redistribute it and/or modify it
31 * under the terms of the GNU General Public License as published by the
32 * Free Software Foundation; either version 2 of the License, or (at your
33 * option) any later version.
34 *
35 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
36 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
37 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
38 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
39 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
40 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
41 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
42 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
43 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
44 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45 *
46 * You should have received a copy of the GNU General Public License along
47 * with this program; if not, write to the Free Software Foundation, Inc.,
48 * 675 Mass Ave, Cambridge, MA 02139, USA.
49 */
50#include <linux/init.h>
51#include <linux/kernel.h>
52#include <linux/types.h>
53#include <linux/mc146818rtc.h>
54#include <linux/ioport.h>
55#include <linux/interrupt.h>
56#include <linux/pci.h>
57#include <linux/timex.h>
58#include <linux/bootmem.h>
59#include <linux/mv643xx.h>
60#include <linux/pm.h>
61#include <linux/bcd.h>
62
63#include <asm/time.h>
64#include <asm/page.h>
65#include <asm/bootinfo.h>
66#include <asm/io.h>
67#include <asm/irq.h>
68#include <asm/pci.h>
69#include <asm/processor.h>
70#include <asm/reboot.h>
71#include <asm/mc146818rtc.h>
72#include <asm/tlbflush.h>
73#include "ocelot_3_fpga.h"
74
75/* Marvell Discovery Register Base */
76unsigned long marvell_base = (signed)0xf4000000;
77
78/* CPU clock */
79unsigned long cpu_clock;
80
81/* RTC/NVRAM */
82unsigned char* rtc_base = (unsigned char*)(signed)0xfc800000;
83
84/* FPGA Base */
85unsigned long ocelot_fpga_base = (signed)0xfc000000;
86
87/* Serial base */
88unsigned long uart_base = (signed)0xfd000000;
89
90/*
91 * Marvell Discovery SRAM. This is one place where Ethernet
92 * Tx and Rx descriptors can be placed to improve performance
93 */
94extern unsigned long mv64340_sram_base;
95
96/* These functions are used for rebooting or halting the machine*/
97extern void momenco_ocelot_restart(char *command);
98extern void momenco_ocelot_halt(void);
99extern void momenco_ocelot_power_off(void);
100
101void momenco_time_init(void);
102static char reset_reason;
103
104void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
105 unsigned long entryhi, unsigned long pagemask);
106
107static inline unsigned long ENTRYLO(unsigned long paddr)
108{
109 return ((paddr & PAGE_MASK) |
110 (_PAGE_PRESENT | __READABLE | __WRITEABLE | _PAGE_GLOBAL |
111 _CACHE_UNCACHED)) >> 6;
112}
113
114void __init bus_error_init(void)
115{
116 /* nothing */
117}
118
119/*
120 * setup code for a handoff from a version 2 PMON 2000 PROM
121 */
122void setup_wired_tlb_entries(void)
123{
124 write_c0_wired(0);
125 local_flush_tlb_all();
126
127 /* marvell and extra space */
128 add_wired_entry(ENTRYLO(0xf4000000), ENTRYLO(0xf4010000), (signed)0xf4000000, PM_64K);
129
130 /* fpga, rtc, and uart */
131 add_wired_entry(ENTRYLO(0xfc000000), ENTRYLO(0xfd000000), (signed)0xfc000000, PM_16M);
132}
133
134unsigned long m48t37y_get_time(void)
135{
136 unsigned int year, month, day, hour, min, sec;
137 unsigned long flags;
138
139 spin_lock_irqsave(&rtc_lock, flags);
140 /* stop the update */
141 rtc_base[0x7ff8] = 0x40;
142
143 year = BCD2BIN(rtc_base[0x7fff]);
144 year += BCD2BIN(rtc_base[0x7ff1]) * 100;
145
146 month = BCD2BIN(rtc_base[0x7ffe]);
147
148 day = BCD2BIN(rtc_base[0x7ffd]);
149
150 hour = BCD2BIN(rtc_base[0x7ffb]);
151 min = BCD2BIN(rtc_base[0x7ffa]);
152 sec = BCD2BIN(rtc_base[0x7ff9]);
153
154 /* start the update */
155 rtc_base[0x7ff8] = 0x00;
156 spin_unlock_irqrestore(&rtc_lock, flags);
157
158 return mktime(year, month, day, hour, min, sec);
159}
160
161int m48t37y_set_time(unsigned long sec)
162{
163 struct rtc_time tm;
164 unsigned long flags;
165
166 /* convert to a more useful format -- note months count from 0 */
167 to_tm(sec, &tm);
168 tm.tm_mon += 1;
169
170 spin_lock_irqsave(&rtc_lock, flags);
171 /* enable writing */
172 rtc_base[0x7ff8] = 0x80;
173
174 /* year */
175 rtc_base[0x7fff] = BIN2BCD(tm.tm_year % 100);
176 rtc_base[0x7ff1] = BIN2BCD(tm.tm_year / 100);
177
178 /* month */
179 rtc_base[0x7ffe] = BIN2BCD(tm.tm_mon);
180
181 /* day */
182 rtc_base[0x7ffd] = BIN2BCD(tm.tm_mday);
183
184 /* hour/min/sec */
185 rtc_base[0x7ffb] = BIN2BCD(tm.tm_hour);
186 rtc_base[0x7ffa] = BIN2BCD(tm.tm_min);
187 rtc_base[0x7ff9] = BIN2BCD(tm.tm_sec);
188
189 /* day of week -- not really used, but let's keep it up-to-date */
190 rtc_base[0x7ffc] = BIN2BCD(tm.tm_wday + 1);
191
192 /* disable writing */
193 rtc_base[0x7ff8] = 0x00;
194 spin_unlock_irqrestore(&rtc_lock, flags);
195
196 return 0;
197}
198
199void __init plat_timer_setup(struct irqaction *irq)
200{
201 setup_irq(7, irq); /* Timer interrupt, unmask status IM7 */
202}
203
204void momenco_time_init(void)
205{
206 setup_wired_tlb_entries();
207
208 /*
209 * Ocelot-3 board has been built with both
210 * the Rm7900 and the Rm7065C
211 */
212 mips_hpt_frequency = cpu_clock / 2;
213
214 rtc_mips_get_time = m48t37y_get_time;
215 rtc_mips_set_time = m48t37y_set_time;
216}
217
218/*
219 * PCI Support for Ocelot-3
220 */
221
222/* Bus #0 IO and MEM space */
223#define OCELOT_3_PCI_IO_0_START 0xe0000000
224#define OCELOT_3_PCI_IO_0_SIZE 0x08000000
225#define OCELOT_3_PCI_MEM_0_START 0xc0000000
226#define OCELOT_3_PCI_MEM_0_SIZE 0x10000000
227
228/* Bus #1 IO and MEM space */
229#define OCELOT_3_PCI_IO_1_START 0xe8000000
230#define OCELOT_3_PCI_IO_1_SIZE 0x08000000
231#define OCELOT_3_PCI_MEM_1_START 0xd0000000
232#define OCELOT_3_PCI_MEM_1_SIZE 0x10000000
233
234static struct resource mv_pci_io_mem0_resource = {
235 .name = "MV64340 PCI0 IO MEM",
236 .start = OCELOT_3_PCI_IO_0_START,
237 .end = OCELOT_3_PCI_IO_0_START + OCELOT_3_PCI_IO_0_SIZE - 1,
238 .flags = IORESOURCE_IO,
239};
240
241static struct resource mv_pci_io_mem1_resource = {
242 .name = "MV64340 PCI1 IO MEM",
243 .start = OCELOT_3_PCI_IO_1_START,
244 .end = OCELOT_3_PCI_IO_1_START + OCELOT_3_PCI_IO_1_SIZE - 1,
245 .flags = IORESOURCE_IO,
246};
247
248static struct resource mv_pci_mem0_resource = {
249 .name = "MV64340 PCI0 MEM",
250 .start = OCELOT_3_PCI_MEM_0_START,
251 .end = OCELOT_3_PCI_MEM_0_START + OCELOT_3_PCI_MEM_0_SIZE - 1,
252 .flags = IORESOURCE_MEM,
253};
254
255static struct resource mv_pci_mem1_resource = {
256 .name = "MV64340 PCI1 MEM",
257 .start = OCELOT_3_PCI_MEM_1_START,
258 .end = OCELOT_3_PCI_MEM_1_START + OCELOT_3_PCI_MEM_1_SIZE - 1,
259 .flags = IORESOURCE_MEM,
260};
261
262static struct mv_pci_controller mv_bus0_controller = {
263 .pcic = {
264 .pci_ops = &mv_pci_ops,
265 .mem_resource = &mv_pci_mem0_resource,
266 .io_resource = &mv_pci_io_mem0_resource,
267 },
268 .config_addr = MV64340_PCI_0_CONFIG_ADDR,
269 .config_vreg = MV64340_PCI_0_CONFIG_DATA_VIRTUAL_REG,
270};
271
272static struct mv_pci_controller mv_bus1_controller = {
273 .pcic = {
274 .pci_ops = &mv_pci_ops,
275 .mem_resource = &mv_pci_mem1_resource,
276 .io_resource = &mv_pci_io_mem1_resource,
277 },
278 .config_addr = MV64340_PCI_1_CONFIG_ADDR,
279 .config_vreg = MV64340_PCI_1_CONFIG_DATA_VIRTUAL_REG,
280};
281
282static __init int __init ja_pci_init(void)
283{
284 uint32_t enable;
285 extern int pci_probe_only;
286
287 /* PMON will assign PCI resources */
288 pci_probe_only = 1;
289
290 enable = ~MV_READ(MV64340_BASE_ADDR_ENABLE);
291 /*
292 * We require at least one enabled I/O or PCI memory window or we
293 * will ignore this PCI bus. We ignore PCI windows 1, 2 and 3.
294 */
295 if (enable & (0x01 << 9) || enable & (0x01 << 10))
296 register_pci_controller(&mv_bus0_controller.pcic);
297
298 if (enable & (0x01 << 14) || enable & (0x01 << 15))
299 register_pci_controller(&mv_bus1_controller.pcic);
300
301 ioport_resource.end = OCELOT_3_PCI_IO_0_START + OCELOT_3_PCI_IO_0_SIZE +
302 OCELOT_3_PCI_IO_1_SIZE - 1;
303
304 iomem_resource.end = OCELOT_3_PCI_MEM_0_START + OCELOT_3_PCI_MEM_0_SIZE +
305 OCELOT_3_PCI_MEM_1_SIZE - 1;
306
307 set_io_port_base(OCELOT_3_PCI_IO_0_START); /* mips_io_port_base */
308
309 return 0;
310}
311
312arch_initcall(ja_pci_init);
313
314void __init plat_mem_setup(void)
315{
316 unsigned int tmpword;
317
318 board_time_init = momenco_time_init;
319
320 _machine_restart = momenco_ocelot_restart;
321 _machine_halt = momenco_ocelot_halt;
322 pm_power_off = momenco_ocelot_power_off;
323
324 /* Wired TLB entries */
325 setup_wired_tlb_entries();
326
327 /* shut down ethernet ports, just to be sure our memory doesn't get
328 * corrupted by random ethernet traffic.
329 */
330 MV_WRITE(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(0), 0xff << 8);
331 MV_WRITE(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(1), 0xff << 8);
332 MV_WRITE(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(0), 0xff << 8);
333 MV_WRITE(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(1), 0xff << 8);
334 do {}
335 while (MV_READ(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(0)) & 0xff);
336 do {}
337 while (MV_READ(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(1)) & 0xff);
338 do {}
339 while (MV_READ(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(0)) & 0xff);
340 do {}
341 while (MV_READ(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(1)) & 0xff);
342 MV_WRITE(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(0),
343 MV_READ(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(0)) & ~1);
344 MV_WRITE(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(1),
345 MV_READ(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(1)) & ~1);
346
347 /* Turn off the Bit-Error LED */
348 OCELOT_FPGA_WRITE(0x80, CLR);
349
350 tmpword = OCELOT_FPGA_READ(BOARDREV);
351 if (tmpword < 26)
352 printk("Momenco Ocelot-3: Board Assembly Rev. %c\n",
353 'A'+tmpword);
354 else
355 printk("Momenco Ocelot-3: Board Assembly Revision #0x%x\n",
356 tmpword);
357
358 tmpword = OCELOT_FPGA_READ(FPGA_REV);
359 printk("FPGA Rev: %d.%d\n", tmpword>>4, tmpword&15);
360 tmpword = OCELOT_FPGA_READ(RESET_STATUS);
361 printk("Reset reason: 0x%x\n", tmpword);
362 switch (tmpword) {
363 case 0x1:
364 printk(" - Power-up reset\n");
365 break;
366 case 0x2:
367 printk(" - Push-button reset\n");
368 break;
369 case 0x4:
370 printk(" - cPCI bus reset\n");
371 break;
372 case 0x8:
373 printk(" - Watchdog reset\n");
374 break;
375 case 0x10:
376 printk(" - Software reset\n");
377 break;
378 default:
379 printk(" - Unknown reset cause\n");
380 }
381 reset_reason = tmpword;
382 OCELOT_FPGA_WRITE(0xff, RESET_STATUS);
383
384 tmpword = OCELOT_FPGA_READ(CPCI_ID);
385 printk("cPCI ID register: 0x%02x\n", tmpword);
386 printk(" - Slot number: %d\n", tmpword & 0x1f);
387 printk(" - PCI bus present: %s\n", tmpword & 0x40 ? "yes" : "no");
388 printk(" - System Slot: %s\n", tmpword & 0x20 ? "yes" : "no");
389
390 tmpword = OCELOT_FPGA_READ(BOARD_STATUS);
391 printk("Board Status register: 0x%02x\n", tmpword);
392 printk(" - User jumper: %s\n", (tmpword & 0x80)?"installed":"absent");
393 printk(" - Boot flash write jumper: %s\n", (tmpword&0x40)?"installed":"absent");
394 printk(" - L3 cache size: %d MB\n", (1<<((tmpword&12) >> 2))&~1);
395
396 /* Support for 128 MB memory */
397 add_memory_region(0x0, 0x08000000, BOOT_MEM_RAM);
398}
diff --git a/arch/mips/momentum/ocelot_c/Makefile b/arch/mips/momentum/ocelot_c/Makefile
deleted file mode 100644
index d69161aa1675..000000000000
--- a/arch/mips/momentum/ocelot_c/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
1#
2# Makefile for Momentum Computer's Ocelot-C and -CS boards.
3#
4
5obj-y += cpci-irq.o irq.o platform.o prom.o reset.o \
6 setup.o uart-irq.o
7
8obj-$(CONFIG_KGDB) += dbg_io.o
diff --git a/arch/mips/momentum/ocelot_c/cpci-irq.c b/arch/mips/momentum/ocelot_c/cpci-irq.c
deleted file mode 100644
index 186a140fd2a9..000000000000
--- a/arch/mips/momentum/ocelot_c/cpci-irq.c
+++ /dev/null
@@ -1,100 +0,0 @@
1/*
2 * Copyright 2002 Momentum Computer
3 * Author: mdharm@momenco.com
4 *
5 * arch/mips/momentum/ocelot_c/cpci-irq.c
6 * Interrupt routines for cpci. Interrupt numbers are assigned from
7 * CPCI_IRQ_BASE to CPCI_IRQ_BASE+8 (8 interrupt sources).
8 *
9 * Note that the high-level software will need to be careful about using
10 * these interrupts. If this board is asserting a cPCI interrupt, it will
11 * also see the asserted interrupt. Care must be taken to avoid an
12 * interrupt flood.
13 *
14 * This program is free software; you can redistribute it and/or modify it
15 * under the terms of the GNU General Public License as published by the
16 * Free Software Foundation; either version 2 of the License, or (at your
17 * option) any later version.
18 */
19
20#include <linux/module.h>
21#include <linux/interrupt.h>
22#include <linux/irq.h>
23#include <linux/kernel.h>
24#include <linux/sched.h>
25#include <linux/kernel_stat.h>
26#include <asm/io.h>
27#include "ocelot_c_fpga.h"
28
29#define CPCI_IRQ_BASE 8
30
31static inline int ls1bit8(unsigned int x)
32{
33 int b = 7, s;
34
35 s = 4; if (((unsigned char)(x << 4)) == 0) s = 0; b -= s; x <<= s;
36 s = 2; if (((unsigned char)(x << 2)) == 0) s = 0; b -= s; x <<= s;
37 s = 1; if (((unsigned char)(x << 1)) == 0) s = 0; b -= s;
38
39 return b;
40}
41
42/* mask off an interrupt -- 0 is enable, 1 is disable */
43static inline void mask_cpci_irq(unsigned int irq)
44{
45 uint32_t value;
46
47 value = OCELOT_FPGA_READ(INTMASK);
48 value |= 1 << (irq - CPCI_IRQ_BASE);
49 OCELOT_FPGA_WRITE(value, INTMASK);
50
51 /* read the value back to assure that it's really been written */
52 value = OCELOT_FPGA_READ(INTMASK);
53}
54
55/* unmask an interrupt -- 0 is enable, 1 is disable */
56static inline void unmask_cpci_irq(unsigned int irq)
57{
58 uint32_t value;
59
60 value = OCELOT_FPGA_READ(INTMASK);
61 value &= ~(1 << (irq - CPCI_IRQ_BASE));
62 OCELOT_FPGA_WRITE(value, INTMASK);
63
64 /* read the value back to assure that it's really been written */
65 value = OCELOT_FPGA_READ(INTMASK);
66}
67
68/*
69 * Interrupt handler for interrupts coming from the FPGA chip.
70 * It could be built in ethernet ports etc...
71 */
72void ll_cpci_irq(void)
73{
74 unsigned int irq_src, irq_mask;
75
76 /* read the interrupt status registers */
77 irq_src = OCELOT_FPGA_READ(INTSTAT);
78 irq_mask = OCELOT_FPGA_READ(INTMASK);
79
80 /* mask for just the interrupts we want */
81 irq_src &= ~irq_mask;
82
83 do_IRQ(ls1bit8(irq_src) + CPCI_IRQ_BASE);
84}
85
86struct irq_chip cpci_irq_type = {
87 .name = "CPCI/FPGA",
88 .ack = mask_cpci_irq,
89 .mask = mask_cpci_irq,
90 .mask_ack = mask_cpci_irq,
91 .unmask = unmask_cpci_irq,
92};
93
94void cpci_irq_init(void)
95{
96 int i;
97
98 for (i = CPCI_IRQ_BASE; i < (CPCI_IRQ_BASE + 8); i++)
99 set_irq_chip_and_handler(i, &cpci_irq_type, handle_level_irq);
100}
diff --git a/arch/mips/momentum/ocelot_c/dbg_io.c b/arch/mips/momentum/ocelot_c/dbg_io.c
deleted file mode 100644
index 32d6fb4ee679..000000000000
--- a/arch/mips/momentum/ocelot_c/dbg_io.c
+++ /dev/null
@@ -1,121 +0,0 @@
1
2#include <asm/serial.h> /* For the serial port location and base baud */
3
4/* --- CONFIG --- */
5
6typedef unsigned char uint8;
7typedef unsigned int uint32;
8
9/* --- END OF CONFIG --- */
10
11#define UART16550_BAUD_2400 2400
12#define UART16550_BAUD_4800 4800
13#define UART16550_BAUD_9600 9600
14#define UART16550_BAUD_19200 19200
15#define UART16550_BAUD_38400 38400
16#define UART16550_BAUD_57600 57600
17#define UART16550_BAUD_115200 115200
18
19#define UART16550_PARITY_NONE 0
20#define UART16550_PARITY_ODD 0x08
21#define UART16550_PARITY_EVEN 0x18
22#define UART16550_PARITY_MARK 0x28
23#define UART16550_PARITY_SPACE 0x38
24
25#define UART16550_DATA_5BIT 0x0
26#define UART16550_DATA_6BIT 0x1
27#define UART16550_DATA_7BIT 0x2
28#define UART16550_DATA_8BIT 0x3
29
30#define UART16550_STOP_1BIT 0x0
31#define UART16550_STOP_2BIT 0x4
32
33/* ----------------------------------------------------- */
34
35/* === CONFIG === */
36
37/* [jsun] we use the second serial port for kdb */
38#define BASE OCELOT_SERIAL1_BASE
39#define MAX_BAUD OCELOT_BASE_BAUD
40
41/* === END OF CONFIG === */
42
43#define REG_OFFSET 4
44
45/* register offset */
46#define OFS_RCV_BUFFER 0
47#define OFS_TRANS_HOLD 0
48#define OFS_SEND_BUFFER 0
49#define OFS_INTR_ENABLE (1*REG_OFFSET)
50#define OFS_INTR_ID (2*REG_OFFSET)
51#define OFS_DATA_FORMAT (3*REG_OFFSET)
52#define OFS_LINE_CONTROL (3*REG_OFFSET)
53#define OFS_MODEM_CONTROL (4*REG_OFFSET)
54#define OFS_RS232_OUTPUT (4*REG_OFFSET)
55#define OFS_LINE_STATUS (5*REG_OFFSET)
56#define OFS_MODEM_STATUS (6*REG_OFFSET)
57#define OFS_RS232_INPUT (6*REG_OFFSET)
58#define OFS_SCRATCH_PAD (7*REG_OFFSET)
59
60#define OFS_DIVISOR_LSB (0*REG_OFFSET)
61#define OFS_DIVISOR_MSB (1*REG_OFFSET)
62
63
64/* memory-mapped read/write of the port */
65#define UART16550_READ(y) (*((volatile uint8*)(BASE + y)))
66#define UART16550_WRITE(y, z) ((*((volatile uint8*)(BASE + y))) = z)
67
68void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop)
69{
70 /* disable interrupts */
71 UART16550_WRITE(OFS_INTR_ENABLE, 0);
72
73 /* set up baud rate */
74 {
75 uint32 divisor;
76
77 /* set DIAB bit */
78 UART16550_WRITE(OFS_LINE_CONTROL, 0x80);
79
80 /* set divisor */
81 divisor = MAX_BAUD / baud;
82 UART16550_WRITE(OFS_DIVISOR_LSB, divisor & 0xff);
83 UART16550_WRITE(OFS_DIVISOR_MSB, (divisor & 0xff00) >> 8);
84
85 /* clear DIAB bit */
86 UART16550_WRITE(OFS_LINE_CONTROL, 0x0);
87 }
88
89 /* set data format */
90 UART16550_WRITE(OFS_DATA_FORMAT, data | parity | stop);
91}
92
93static int remoteDebugInitialized = 0;
94
95uint8 getDebugChar(void)
96{
97 if (!remoteDebugInitialized) {
98 remoteDebugInitialized = 1;
99 debugInit(UART16550_BAUD_38400,
100 UART16550_DATA_8BIT,
101 UART16550_PARITY_NONE, UART16550_STOP_1BIT);
102 }
103
104 while ((UART16550_READ(OFS_LINE_STATUS) & 0x1) == 0);
105 return UART16550_READ(OFS_RCV_BUFFER);
106}
107
108
109int putDebugChar(uint8 byte)
110{
111 if (!remoteDebugInitialized) {
112 remoteDebugInitialized = 1;
113 debugInit(UART16550_BAUD_38400,
114 UART16550_DATA_8BIT,
115 UART16550_PARITY_NONE, UART16550_STOP_1BIT);
116 }
117
118 while ((UART16550_READ(OFS_LINE_STATUS) & 0x20) == 0);
119 UART16550_WRITE(OFS_SEND_BUFFER, byte);
120 return 1;
121}
diff --git a/arch/mips/momentum/ocelot_c/irq.c b/arch/mips/momentum/ocelot_c/irq.c
deleted file mode 100644
index 844d566c9de3..000000000000
--- a/arch/mips/momentum/ocelot_c/irq.c
+++ /dev/null
@@ -1,107 +0,0 @@
1/*
2 * Copyright (C) 2000 RidgeRun, Inc.
3 * Author: RidgeRun, Inc.
4 * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
5 *
6 * Copyright 2001 MontaVista Software Inc.
7 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
8 * Copyright (C) 2000, 01, 05 Ralf Baechle (ralf@linux-mips.org)
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
16 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
18 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
21 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
22 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * You should have received a copy of the GNU General Public License along
27 * with this program; if not, write to the Free Software Foundation, Inc.,
28 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 *
30 */
31#include <linux/errno.h>
32#include <linux/init.h>
33#include <linux/kernel_stat.h>
34#include <linux/module.h>
35#include <linux/signal.h>
36#include <linux/sched.h>
37#include <linux/types.h>
38#include <linux/interrupt.h>
39#include <linux/ioport.h>
40#include <linux/timex.h>
41#include <linux/slab.h>
42#include <linux/random.h>
43#include <linux/bitops.h>
44#include <linux/mv643xx.h>
45#include <asm/bootinfo.h>
46#include <asm/io.h>
47#include <asm/irq_cpu.h>
48#include <asm/mipsregs.h>
49#include <asm/system.h>
50
51extern void uart_irq_init(void);
52extern void cpci_irq_init(void);
53
54static struct irqaction cascade_fpga = {
55 no_action, IRQF_DISABLED, CPU_MASK_NONE, "cascade via FPGA", NULL, NULL
56};
57
58static struct irqaction cascade_mv64340 = {
59 no_action, IRQF_DISABLED, CPU_MASK_NONE, "cascade via MV64340", NULL, NULL
60};
61
62extern void ll_uart_irq(void);
63extern void ll_cpci_irq(void);
64
65asmlinkage void plat_irq_dispatch(void)
66{
67 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
68
69 if (pending & STATUSF_IP0)
70 do_IRQ(0);
71 else if (pending & STATUSF_IP1)
72 do_IRQ(1);
73 else if (pending & STATUSF_IP2)
74 do_IRQ(2);
75 else if (pending & STATUSF_IP3)
76 ll_uart_irq();
77 else if (pending & STATUSF_IP4)
78 do_IRQ(4);
79 else if (pending & STATUSF_IP5)
80 ll_cpci_irq();
81 else if (pending & STATUSF_IP6)
82 ll_mv64340_irq();
83 else if (pending & STATUSF_IP7)
84 do_IRQ(7);
85 else
86 spurious_interrupt();
87}
88
89void __init arch_init_irq(void)
90{
91 /*
92 * Clear all of the interrupts while we change the able around a bit.
93 * int-handler is not on bootstrap
94 */
95 clear_c0_status(ST0_IM);
96
97 mips_cpu_irq_init();
98
99 /* set up the cascading interrupts */
100 setup_irq(3, &cascade_fpga);
101 setup_irq(5, &cascade_fpga);
102 setup_irq(6, &cascade_mv64340);
103
104 mv64340_irq_init(16);
105 uart_irq_init();
106 cpci_irq_init();
107}
diff --git a/arch/mips/momentum/ocelot_c/platform.c b/arch/mips/momentum/ocelot_c/platform.c
deleted file mode 100644
index 7780aa0c6555..000000000000
--- a/arch/mips/momentum/ocelot_c/platform.c
+++ /dev/null
@@ -1,183 +0,0 @@
1#include <linux/delay.h>
2#include <linux/if_ether.h>
3#include <linux/ioport.h>
4#include <linux/mv643xx.h>
5#include <linux/platform_device.h>
6
7#include "ocelot_c_fpga.h"
8
9#if defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE)
10
11static struct resource mv643xx_eth_shared_resources[] = {
12 [0] = {
13 .name = "ethernet shared base",
14 .start = 0xf1000000 + MV643XX_ETH_SHARED_REGS,
15 .end = 0xf1000000 + MV643XX_ETH_SHARED_REGS +
16 MV643XX_ETH_SHARED_REGS_SIZE - 1,
17 .flags = IORESOURCE_MEM,
18 },
19};
20
21static struct platform_device mv643xx_eth_shared_device = {
22 .name = MV643XX_ETH_SHARED_NAME,
23 .id = 0,
24 .num_resources = ARRAY_SIZE(mv643xx_eth_shared_resources),
25 .resource = mv643xx_eth_shared_resources,
26};
27
28#define MV_SRAM_BASE 0xfe000000UL
29#define MV_SRAM_SIZE (256 * 1024)
30
31#define MV_SRAM_RXRING_SIZE (MV_SRAM_SIZE / 4)
32#define MV_SRAM_TXRING_SIZE (MV_SRAM_SIZE / 4)
33
34#define MV_SRAM_BASE_ETH0 MV_SRAM_BASE
35#define MV_SRAM_BASE_ETH1 (MV_SRAM_BASE + (MV_SRAM_SIZE / 2))
36
37#define MV64x60_IRQ_ETH_0 48
38#define MV64x60_IRQ_ETH_1 49
39
40static struct resource mv64x60_eth0_resources[] = {
41 [0] = {
42 .name = "eth0 irq",
43 .start = MV64x60_IRQ_ETH_0,
44 .end = MV64x60_IRQ_ETH_0,
45 .flags = IORESOURCE_IRQ,
46 },
47};
48
49static struct mv643xx_eth_platform_data eth0_pd = {
50 .port_number = 0,
51
52 .tx_sram_addr = MV_SRAM_BASE_ETH0,
53 .tx_sram_size = MV_SRAM_TXRING_SIZE,
54 .tx_queue_size = MV_SRAM_TXRING_SIZE / 16,
55
56 .rx_sram_addr = MV_SRAM_BASE_ETH0 + MV_SRAM_TXRING_SIZE,
57 .rx_sram_size = MV_SRAM_RXRING_SIZE,
58 .rx_queue_size = MV_SRAM_RXRING_SIZE / 16,
59};
60
61static struct platform_device eth0_device = {
62 .name = MV643XX_ETH_NAME,
63 .id = 0,
64 .num_resources = ARRAY_SIZE(mv64x60_eth0_resources),
65 .resource = mv64x60_eth0_resources,
66 .dev = {
67 .platform_data = &eth0_pd,
68 },
69};
70
71static struct resource mv64x60_eth1_resources[] = {
72 [0] = {
73 .name = "eth1 irq",
74 .start = MV64x60_IRQ_ETH_1,
75 .end = MV64x60_IRQ_ETH_1,
76 .flags = IORESOURCE_IRQ,
77 },
78};
79
80static struct mv643xx_eth_platform_data eth1_pd = {
81 .port_number = 1,
82
83 .tx_sram_addr = MV_SRAM_BASE_ETH1,
84 .tx_sram_size = MV_SRAM_TXRING_SIZE,
85 .tx_queue_size = MV_SRAM_TXRING_SIZE / 16,
86
87 .rx_sram_addr = MV_SRAM_BASE_ETH1 + MV_SRAM_TXRING_SIZE,
88 .rx_sram_size = MV_SRAM_RXRING_SIZE,
89 .rx_queue_size = MV_SRAM_RXRING_SIZE / 16,
90};
91
92static struct platform_device eth1_device = {
93 .name = MV643XX_ETH_NAME,
94 .id = 1,
95 .num_resources = ARRAY_SIZE(mv64x60_eth1_resources),
96 .resource = mv64x60_eth1_resources,
97 .dev = {
98 .platform_data = &eth1_pd,
99 },
100};
101
102static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
103 &mv643xx_eth_shared_device,
104 &eth0_device,
105 &eth1_device,
106 /* The third port is not wired up on the Ocelot C */
107};
108
109static u8 __init exchange_bit(u8 val, u8 cs)
110{
111 /* place the data */
112 OCELOT_FPGA_WRITE((val << 2) | cs, EEPROM_MODE);
113 udelay(1);
114
115 /* turn the clock on */
116 OCELOT_FPGA_WRITE((val << 2) | cs | 0x2, EEPROM_MODE);
117 udelay(1);
118
119 /* turn the clock off and read-strobe */
120 OCELOT_FPGA_WRITE((val << 2) | cs | 0x10, EEPROM_MODE);
121
122 /* return the data */
123 return (OCELOT_FPGA_READ(EEPROM_MODE) >> 3) & 0x1;
124}
125
126static void __init get_mac(char dest[6])
127{
128 u8 read_opcode[12] = {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
129 int i,j;
130
131 for (i = 0; i < 12; i++)
132 exchange_bit(read_opcode[i], 1);
133
134 for (j = 0; j < 6; j++) {
135 dest[j] = 0;
136 for (i = 0; i < 8; i++) {
137 dest[j] <<= 1;
138 dest[j] |= exchange_bit(0, 1);
139 }
140 }
141
142 /* turn off CS */
143 exchange_bit(0,0);
144}
145
146/*
147 * Copy and increment ethernet MAC address by a small value.
148 *
149 * This is useful for systems where the only one MAC address is stored in
150 * non-volatile memory for multiple ports.
151 */
152static inline void eth_mac_add(unsigned char *dst, unsigned char *src,
153 unsigned int add)
154{
155 int i;
156
157 BUG_ON(add >= 256);
158
159 for (i = ETH_ALEN; i >= 0; i--) {
160 dst[i] = src[i] + add;
161 add = dst[i] < src[i]; /* compute carry */
162 }
163
164 WARN_ON(add);
165}
166
167static int __init mv643xx_eth_add_pds(void)
168{
169 unsigned char mac[ETH_ALEN];
170 int ret;
171
172 get_mac(mac);
173 eth_mac_add(eth0_pd.mac_addr, mac, 0);
174 eth_mac_add(eth1_pd.mac_addr, mac, 1);
175 ret = platform_add_devices(mv643xx_eth_pd_devs,
176 ARRAY_SIZE(mv643xx_eth_pd_devs));
177
178 return ret;
179}
180
181device_initcall(mv643xx_eth_add_pds);
182
183#endif /* defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE) */
diff --git a/arch/mips/momentum/ocelot_c/prom.c b/arch/mips/momentum/ocelot_c/prom.c
deleted file mode 100644
index b689ceea8cfb..000000000000
--- a/arch/mips/momentum/ocelot_c/prom.c
+++ /dev/null
@@ -1,183 +0,0 @@
1/*
2 * Copyright 2002 Momentum Computer Inc.
3 * Author: Matthew Dharm <mdharm@momenco.com>
4 *
5 * Louis Hamilton, Red Hat, Inc.
6 * hamilton@redhat.com [MIPS64 modifications]
7 *
8 * Based on Ocelot Linux port, which is
9 * Copyright 2001 MontaVista Software Inc.
10 * Author: jsun@mvista.com or jsun@junsun.net
11 *
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
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17#include <linux/init.h>
18#include <linux/mm.h>
19#include <linux/sched.h>
20#include <linux/bootmem.h>
21#include <linux/mv643xx.h>
22
23#include <asm/addrspace.h>
24#include <asm/bootinfo.h>
25#include <asm/pmon.h>
26
27#include "ocelot_c_fpga.h"
28
29struct callvectors* debug_vectors;
30
31extern unsigned long marvell_base;
32extern unsigned int cpu_clock;
33
34const char *get_system_type(void)
35{
36#ifdef CONFIG_CPU_SR71000
37 return "Momentum Ocelot-CS";
38#else
39 return "Momentum Ocelot-C";
40#endif
41}
42
43#ifdef CONFIG_64BIT
44
45unsigned long signext(unsigned long addr)
46{
47 addr &= 0xffffffff;
48 return (unsigned long)((int)addr);
49}
50
51void *get_arg(unsigned long args, int arc)
52{
53 unsigned long ul;
54 unsigned char *puc, uc;
55
56 args += (arc * 4);
57 ul = (unsigned long)signext(args);
58 puc = (unsigned char *)ul;
59 if (puc == 0)
60 return (void *)0;
61
62#ifdef CONFIG_CPU_LITTLE_ENDIAN
63 uc = *puc++;
64 ul = (unsigned long)uc;
65 uc = *puc++;
66 ul |= (((unsigned long)uc) << 8);
67 uc = *puc++;
68 ul |= (((unsigned long)uc) << 16);
69 uc = *puc++;
70 ul |= (((unsigned long)uc) << 24);
71#else /* CONFIG_CPU_LITTLE_ENDIAN */
72 uc = *puc++;
73 ul = ((unsigned long)uc) << 24;
74 uc = *puc++;
75 ul |= (((unsigned long)uc) << 16);
76 uc = *puc++;
77 ul |= (((unsigned long)uc) << 8);
78 uc = *puc++;
79 ul |= ((unsigned long)uc);
80#endif /* CONFIG_CPU_LITTLE_ENDIAN */
81 ul = signext(ul);
82 return (void *)ul;
83}
84
85char *arg64(unsigned long addrin, int arg_index)
86{
87 unsigned long args;
88 char *p;
89 args = signext(addrin);
90 p = (char *)get_arg(args, arg_index);
91 return p;
92}
93#endif /* CONFIG_64BIT */
94
95
96void __init prom_init(void)
97{
98 int argc = fw_arg0;
99 char **arg = (char **) fw_arg1;
100 char **env = (char **) fw_arg2;
101 struct callvectors *cv = (struct callvectors *) fw_arg3;
102 int i;
103
104#ifdef CONFIG_64BIT
105 char *ptr;
106
107 printk("prom_init - MIPS64\n");
108 /* save the PROM vectors for debugging use */
109 debug_vectors = (struct callvectors *)signext((unsigned long)cv);
110
111 /* arg[0] is "g", the rest is boot parameters */
112 arcs_cmdline[0] = '\0';
113
114 for (i = 1; i < argc; i++) {
115 ptr = (char *)arg64((unsigned long)arg, i);
116 if ((strlen(arcs_cmdline) + strlen(ptr) + 1) >=
117 sizeof(arcs_cmdline))
118 break;
119 strcat(arcs_cmdline, ptr);
120 strcat(arcs_cmdline, " ");
121 }
122 i = 0;
123 while (1) {
124 ptr = (char *)arg64((unsigned long)env, i);
125 if (! ptr)
126 break;
127
128 if (strncmp("gtbase", ptr, strlen("gtbase")) == 0) {
129 marvell_base = simple_strtol(ptr + strlen("gtbase="),
130 NULL, 16);
131
132 if ((marvell_base & 0xffffffff00000000) == 0)
133 marvell_base |= 0xffffffff00000000;
134
135 printk("marvell_base set to 0x%016lx\n", marvell_base);
136 }
137 if (strncmp("cpuclock", ptr, strlen("cpuclock")) == 0) {
138 cpu_clock = simple_strtol(ptr + strlen("cpuclock="),
139 NULL, 10);
140 printk("cpu_clock set to %d\n", cpu_clock);
141 }
142 i++;
143 }
144 printk("arcs_cmdline: %s\n", arcs_cmdline);
145
146#else /* CONFIG_64BIT */
147 /* save the PROM vectors for debugging use */
148 debug_vectors = cv;
149
150 /* arg[0] is "g", the rest is boot parameters */
151 arcs_cmdline[0] = '\0';
152 for (i = 1; i < argc; i++) {
153 if (strlen(arcs_cmdline) + strlen(arg[i] + 1)
154 >= sizeof(arcs_cmdline))
155 break;
156 strcat(arcs_cmdline, arg[i]);
157 strcat(arcs_cmdline, " ");
158 }
159
160 while (*env) {
161 if (strncmp("gtbase", *env, strlen("gtbase")) == 0) {
162 marvell_base = simple_strtol(*env + strlen("gtbase="),
163 NULL, 16);
164 }
165 if (strncmp("cpuclock", *env, strlen("cpuclock")) == 0) {
166 cpu_clock = simple_strtol(*env + strlen("cpuclock="),
167 NULL, 10);
168 }
169 env++;
170 }
171#endif /* CONFIG_64BIT */
172
173 mips_machgroup = MACH_GROUP_MOMENCO;
174 mips_machtype = MACH_MOMENCO_OCELOT_C;
175
176#ifndef CONFIG_64BIT
177 debug_vectors->printf("Booting Linux kernel...\n");
178#endif
179}
180
181void __init prom_free_prom_memory(void)
182{
183}
diff --git a/arch/mips/momentum/ocelot_c/reset.c b/arch/mips/momentum/ocelot_c/reset.c
deleted file mode 100644
index 3fdcb64ff1e6..000000000000
--- a/arch/mips/momentum/ocelot_c/reset.c
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the License, or (at your
5 * option) any later version.
6 *
7 * Copyright (C) 1997, 2001 Ralf Baechle
8 * Copyright 2001 MontaVista Software Inc.
9 * Author: jsun@mvista.com or jsun@junsun.net
10 *
11 * Copyright (C) 2002 Momentum Computer Inc.
12 * Author: Matthew Dharm <mdharm@momenco.com>
13 *
14 * Louis Hamilton, Red Hat, Inc.
15 * hamilton@redhat.com [MIPS64 modifications]
16 */
17#include <linux/sched.h>
18#include <linux/mm.h>
19#include <asm/io.h>
20#include <asm/pgtable.h>
21#include <asm/processor.h>
22#include <asm/reboot.h>
23#include <asm/system.h>
24#include <linux/delay.h>
25
26void momenco_ocelot_restart(char *command)
27{
28 /* base address of timekeeper portion of part */
29 void *nvram = (void *)
30#ifdef CONFIG_64BIT
31 0xfffffffffc807000;
32#else
33 0xfc807000;
34#endif
35
36 /* Ask the NVRAM/RTC/watchdog chip to assert reset in 1/16 second */
37 writeb(0x84, nvram + 0xff7);
38
39 /* wait for the watchdog to go off */
40 mdelay(100+(1000/16));
41
42 /* if the watchdog fails for some reason, let people know */
43 printk(KERN_NOTICE "Watchdog reset failed\n");
44}
45
46void momenco_ocelot_halt(void)
47{
48 printk(KERN_NOTICE "\n** You can safely turn off the power\n");
49 while (1)
50 __asm__(".set\tmips3\n\t"
51 "wait\n\t"
52 ".set\tmips0");
53}
54
55void momenco_ocelot_power_off(void)
56{
57 momenco_ocelot_halt();
58}
diff --git a/arch/mips/momentum/ocelot_c/setup.c b/arch/mips/momentum/ocelot_c/setup.c
deleted file mode 100644
index 0b6b2338cfb4..000000000000
--- a/arch/mips/momentum/ocelot_c/setup.c
+++ /dev/null
@@ -1,362 +0,0 @@
1/*
2 * BRIEF MODULE DESCRIPTION
3 * Momentum Computer Ocelot-C and -CS board dependent boot routines
4 *
5 * Copyright (C) 1996, 1997, 2001 Ralf Baechle
6 * Copyright (C) 2000 RidgeRun, Inc.
7 * Copyright (C) 2001 Red Hat, Inc.
8 * Copyright (C) 2002 Momentum Computer
9 *
10 * Author: Matthew Dharm, Momentum Computer
11 * mdharm@momenco.com
12 *
13 * Louis Hamilton, Red Hat, Inc.
14 * hamilton@redhat.com [MIPS64 modifications]
15 *
16 * Author: RidgeRun, Inc.
17 * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
18 *
19 * Copyright 2001 MontaVista Software Inc.
20 * Author: jsun@mvista.com or jsun@junsun.net
21 *
22 * This program is free software; you can redistribute it and/or modify it
23 * under the terms of the GNU General Public License as published by the
24 * Free Software Foundation; either version 2 of the License, or (at your
25 * option) any later version.
26 *
27 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
28 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
29 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
30 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
31 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
33 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
34 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
36 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 *
38 * You should have received a copy of the GNU General Public License along
39 * with this program; if not, write to the Free Software Foundation, Inc.,
40 * 675 Mass Ave, Cambridge, MA 02139, USA.
41 *
42 */
43#include <linux/bcd.h>
44#include <linux/init.h>
45#include <linux/kernel.h>
46#include <linux/types.h>
47#include <linux/mm.h>
48#include <linux/swap.h>
49#include <linux/ioport.h>
50#include <linux/sched.h>
51#include <linux/interrupt.h>
52#include <linux/pci.h>
53#include <linux/pm.h>
54#include <linux/timex.h>
55#include <linux/vmalloc.h>
56#include <linux/mv643xx.h>
57
58#include <asm/time.h>
59#include <asm/bootinfo.h>
60#include <asm/page.h>
61#include <asm/io.h>
62#include <asm/irq.h>
63#include <asm/pci.h>
64#include <asm/processor.h>
65#include <asm/reboot.h>
66#include <asm/marvell.h>
67#include <linux/bootmem.h>
68#include <linux/blkdev.h>
69#include "ocelot_c_fpga.h"
70
71unsigned long marvell_base;
72unsigned int cpu_clock;
73
74/* These functions are used for rebooting or halting the machine*/
75extern void momenco_ocelot_restart(char *command);
76extern void momenco_ocelot_halt(void);
77extern void momenco_ocelot_power_off(void);
78
79void momenco_time_init(void);
80
81static char reset_reason;
82
83void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1, unsigned long entryhi, unsigned long pagemask);
84
85static unsigned long ENTRYLO(unsigned long paddr)
86{
87 return ((paddr & PAGE_MASK) |
88 (_PAGE_PRESENT | __READABLE | __WRITEABLE | _PAGE_GLOBAL |
89 _CACHE_UNCACHED)) >> 6;
90}
91
92/* setup code for a handoff from a version 2 PMON 2000 PROM */
93void PMON_v2_setup(void)
94{
95 /* Some wired TLB entries for the MV64340 and perhiperals. The
96 MV64340 is going to be hit on every IRQ anyway - there's
97 absolutely no point in letting it be a random TLB entry, as
98 it'll just cause needless churning of the TLB. And we use
99 the other half for the serial port, which is just a PITA
100 otherwise :)
101
102 Device Physical Virtual
103 MV64340 Internal Regs 0xf4000000 0xf4000000
104 Ocelot-C[S] PLD (CS0) 0xfc000000 0xfc000000
105 NVRAM (CS1) 0xfc800000 0xfc800000
106 UARTs (CS2) 0xfd000000 0xfd000000
107 Internal SRAM 0xfe000000 0xfe000000
108 M-Systems DOC (CS3) 0xff000000 0xff000000
109 */
110 printk("PMON_v2_setup\n");
111
112#ifdef CONFIG_64BIT
113 /* marvell and extra space */
114 add_wired_entry(ENTRYLO(0xf4000000), ENTRYLO(0xf4010000), 0xfffffffff4000000, PM_64K);
115 /* fpga, rtc, and uart */
116 add_wired_entry(ENTRYLO(0xfc000000), ENTRYLO(0xfd000000), 0xfffffffffc000000, PM_16M);
117 /* m-sys and internal SRAM */
118 add_wired_entry(ENTRYLO(0xfe000000), ENTRYLO(0xff000000), 0xfffffffffe000000, PM_16M);
119
120 marvell_base = 0xfffffffff4000000;
121#else
122 /* marvell and extra space */
123 add_wired_entry(ENTRYLO(0xf4000000), ENTRYLO(0xf4010000), 0xf4000000, PM_64K);
124 /* fpga, rtc, and uart */
125 add_wired_entry(ENTRYLO(0xfc000000), ENTRYLO(0xfd000000), 0xfc000000, PM_16M);
126 /* m-sys and internal SRAM */
127 add_wired_entry(ENTRYLO(0xfe000000), ENTRYLO(0xff000000), 0xfe000000, PM_16M);
128
129 marvell_base = 0xf4000000;
130#endif
131}
132
133unsigned long m48t37y_get_time(void)
134{
135#ifdef CONFIG_64BIT
136 unsigned char *rtc_base = (unsigned char*)0xfffffffffc800000;
137#else
138 unsigned char* rtc_base = (unsigned char*)0xfc800000;
139#endif
140 unsigned int year, month, day, hour, min, sec;
141 unsigned long flags;
142
143 spin_lock_irqsave(&rtc_lock, flags);
144 /* stop the update */
145 rtc_base[0x7ff8] = 0x40;
146
147 year = BCD2BIN(rtc_base[0x7fff]);
148 year += BCD2BIN(rtc_base[0x7ff1]) * 100;
149
150 month = BCD2BIN(rtc_base[0x7ffe]);
151
152 day = BCD2BIN(rtc_base[0x7ffd]);
153
154 hour = BCD2BIN(rtc_base[0x7ffb]);
155 min = BCD2BIN(rtc_base[0x7ffa]);
156 sec = BCD2BIN(rtc_base[0x7ff9]);
157
158 /* start the update */
159 rtc_base[0x7ff8] = 0x00;
160 spin_unlock_irqrestore(&rtc_lock, flags);
161
162 return mktime(year, month, day, hour, min, sec);
163}
164
165int m48t37y_set_time(unsigned long sec)
166{
167#ifdef CONFIG_64BIT
168 unsigned char* rtc_base = (unsigned char*)0xfffffffffc800000;
169#else
170 unsigned char* rtc_base = (unsigned char*)0xfc800000;
171#endif
172 struct rtc_time tm;
173 unsigned long flags;
174
175 /* convert to a more useful format -- note months count from 0 */
176 to_tm(sec, &tm);
177 tm.tm_mon += 1;
178
179 spin_lock_irqsave(&rtc_lock, flags);
180 /* enable writing */
181 rtc_base[0x7ff8] = 0x80;
182
183 /* year */
184 rtc_base[0x7fff] = BIN2BCD(tm.tm_year % 100);
185 rtc_base[0x7ff1] = BIN2BCD(tm.tm_year / 100);
186
187 /* month */
188 rtc_base[0x7ffe] = BIN2BCD(tm.tm_mon);
189
190 /* day */
191 rtc_base[0x7ffd] = BIN2BCD(tm.tm_mday);
192
193 /* hour/min/sec */
194 rtc_base[0x7ffb] = BIN2BCD(tm.tm_hour);
195 rtc_base[0x7ffa] = BIN2BCD(tm.tm_min);
196 rtc_base[0x7ff9] = BIN2BCD(tm.tm_sec);
197
198 /* day of week -- not really used, but let's keep it up-to-date */
199 rtc_base[0x7ffc] = BIN2BCD(tm.tm_wday + 1);
200
201 /* disable writing */
202 rtc_base[0x7ff8] = 0x00;
203 spin_unlock_irqrestore(&rtc_lock, flags);
204
205 return 0;
206}
207
208void __init plat_timer_setup(struct irqaction *irq)
209{
210 setup_irq(7, irq);
211}
212
213void momenco_time_init(void)
214{
215#ifdef CONFIG_CPU_SR71000
216 mips_hpt_frequency = cpu_clock;
217#elif defined(CONFIG_CPU_RM7000)
218 mips_hpt_frequency = cpu_clock / 2;
219#else
220#error Unknown CPU for this board
221#endif
222 printk("momenco_time_init cpu_clock=%d\n", cpu_clock);
223
224 rtc_mips_get_time = m48t37y_get_time;
225 rtc_mips_set_time = m48t37y_set_time;
226}
227
228void __init plat_mem_setup(void)
229{
230 unsigned int tmpword;
231
232 board_time_init = momenco_time_init;
233
234 _machine_restart = momenco_ocelot_restart;
235 _machine_halt = momenco_ocelot_halt;
236 pm_power_off = momenco_ocelot_power_off;
237
238 /*
239 * initrd_start = (unsigned long)ocelot_initrd_start;
240 * initrd_end = (unsigned long)ocelot_initrd_start + (ulong)ocelot_initrd_size;
241 * initrd_below_start_ok = 1;
242 */
243
244 /* do handoff reconfiguration */
245 PMON_v2_setup();
246
247 /* shut down ethernet ports, just to be sure our memory doesn't get
248 * corrupted by random ethernet traffic.
249 */
250 MV_WRITE(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(0), 0xff << 8);
251 MV_WRITE(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(1), 0xff << 8);
252 MV_WRITE(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(0), 0xff << 8);
253 MV_WRITE(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(1), 0xff << 8);
254 do {}
255 while (MV_READ(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(0)) & 0xff);
256 do {}
257 while (MV_READ(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(1)) & 0xff);
258 do {}
259 while (MV_READ(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(0)) & 0xff);
260 do {}
261 while (MV_READ(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(1)) & 0xff);
262 MV_WRITE(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(0),
263 MV_READ(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(0)) & ~1);
264 MV_WRITE(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(1),
265 MV_READ(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(1)) & ~1);
266
267 /* Turn off the Bit-Error LED */
268 OCELOT_FPGA_WRITE(0x80, CLR);
269
270 tmpword = OCELOT_FPGA_READ(BOARDREV);
271#ifdef CONFIG_CPU_SR71000
272 if (tmpword < 26)
273 printk("Momenco Ocelot-CS: Board Assembly Rev. %c\n",
274 'A'+tmpword);
275 else
276 printk("Momenco Ocelot-CS: Board Assembly Revision #0x%x\n",
277 tmpword);
278#else
279 if (tmpword < 26)
280 printk("Momenco Ocelot-C: Board Assembly Rev. %c\n",
281 'A'+tmpword);
282 else
283 printk("Momenco Ocelot-C: Board Assembly Revision #0x%x\n",
284 tmpword);
285#endif
286
287 tmpword = OCELOT_FPGA_READ(FPGA_REV);
288 printk("FPGA Rev: %d.%d\n", tmpword>>4, tmpword&15);
289 tmpword = OCELOT_FPGA_READ(RESET_STATUS);
290 printk("Reset reason: 0x%x\n", tmpword);
291 switch (tmpword) {
292 case 0x1:
293 printk(" - Power-up reset\n");
294 break;
295 case 0x2:
296 printk(" - Push-button reset\n");
297 break;
298 case 0x4:
299 printk(" - cPCI bus reset\n");
300 break;
301 case 0x8:
302 printk(" - Watchdog reset\n");
303 break;
304 case 0x10:
305 printk(" - Software reset\n");
306 break;
307 default:
308 printk(" - Unknown reset cause\n");
309 }
310 reset_reason = tmpword;
311 OCELOT_FPGA_WRITE(0xff, RESET_STATUS);
312
313 tmpword = OCELOT_FPGA_READ(CPCI_ID);
314 printk("cPCI ID register: 0x%02x\n", tmpword);
315 printk(" - Slot number: %d\n", tmpword & 0x1f);
316 printk(" - PCI bus present: %s\n", tmpword & 0x40 ? "yes" : "no");
317 printk(" - System Slot: %s\n", tmpword & 0x20 ? "yes" : "no");
318
319 tmpword = OCELOT_FPGA_READ(BOARD_STATUS);
320 printk("Board Status register: 0x%02x\n", tmpword);
321 printk(" - User jumper: %s\n", (tmpword & 0x80)?"installed":"absent");
322 printk(" - Boot flash write jumper: %s\n", (tmpword&0x40)?"installed":"absent");
323 printk(" - L3 Cache size: %d MiB\n", (1<<((tmpword&12) >> 2))&~1);
324 printk(" - SDRAM size: %d MiB\n", 1<<(6+(tmpword&3)));
325
326 switch(tmpword &3) {
327 case 3:
328 /* 512MiB */
329 add_memory_region(0x0, 0x200<<20, BOOT_MEM_RAM);
330 break;
331 case 2:
332 /* 256MiB */
333 add_memory_region(0x0, 0x100<<20, BOOT_MEM_RAM);
334 break;
335 case 1:
336 /* 128MiB */
337 add_memory_region(0x0, 0x80<<20, BOOT_MEM_RAM);
338 break;
339 case 0:
340 /* 1GiB -- needs CONFIG_HIGHMEM */
341 add_memory_region(0x0, 0x400<<20, BOOT_MEM_RAM);
342 break;
343 }
344}
345
346/*
347 * This needs to be one of the first initcalls, because no I/O port access
348 * can work before this
349 */
350static int io_base_ioremap(void)
351{
352 void __iomem * io_remap_range = ioremap(0xc0000000UL, 0x10000);
353
354 if (!io_remap_range)
355 panic("Could not ioremap I/O port range");
356
357 set_io_port_base((unsigned long) io_remap_range);
358
359 return 0;
360}
361
362module_init(io_base_ioremap);
diff --git a/arch/mips/momentum/ocelot_c/uart-irq.c b/arch/mips/momentum/ocelot_c/uart-irq.c
deleted file mode 100644
index de1a31ee52f3..000000000000
--- a/arch/mips/momentum/ocelot_c/uart-irq.c
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * Copyright 2002 Momentum Computer
3 * Author: mdharm@momenco.com
4 *
5 * arch/mips/momentum/ocelot_c/uart-irq.c
6 * Interrupt routines for UARTs. Interrupt numbers are assigned from
7 * 80 to 81 (2 interrupt sources).
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/module.h>
16#include <linux/interrupt.h>
17#include <linux/irq.h>
18#include <linux/kernel.h>
19#include <linux/sched.h>
20#include <linux/kernel_stat.h>
21#include <asm/io.h>
22#include <asm/irq.h>
23#include "ocelot_c_fpga.h"
24
25static inline int ls1bit8(unsigned int x)
26{
27 int b = 7, s;
28
29 s = 4; if (((unsigned char)(x << 4)) == 0) s = 0; b -= s; x <<= s;
30 s = 2; if (((unsigned char)(x << 2)) == 0) s = 0; b -= s; x <<= s;
31 s = 1; if (((unsigned char)(x << 1)) == 0) s = 0; b -= s;
32
33 return b;
34}
35
36/* mask off an interrupt -- 0 is enable, 1 is disable */
37static inline void mask_uart_irq(unsigned int irq)
38{
39 uint8_t value;
40
41 value = OCELOT_FPGA_READ(UART_INTMASK);
42 value |= 1 << (irq - 74);
43 OCELOT_FPGA_WRITE(value, UART_INTMASK);
44
45 /* read the value back to assure that it's really been written */
46 value = OCELOT_FPGA_READ(UART_INTMASK);
47}
48
49/* unmask an interrupt -- 0 is enable, 1 is disable */
50static inline void unmask_uart_irq(unsigned int irq)
51{
52 uint8_t value;
53
54 value = OCELOT_FPGA_READ(UART_INTMASK);
55 value &= ~(1 << (irq - 74));
56 OCELOT_FPGA_WRITE(value, UART_INTMASK);
57
58 /* read the value back to assure that it's really been written */
59 value = OCELOT_FPGA_READ(UART_INTMASK);
60}
61
62/*
63 * Interrupt handler for interrupts coming from the FPGA chip.
64 */
65void ll_uart_irq(void)
66{
67 unsigned int irq_src, irq_mask;
68
69 /* read the interrupt status registers */
70 irq_src = OCELOT_FPGA_READ(UART_INTSTAT);
71 irq_mask = OCELOT_FPGA_READ(UART_INTMASK);
72
73 /* mask for just the interrupts we want */
74 irq_src &= ~irq_mask;
75
76 do_IRQ(ls1bit8(irq_src) + 74);
77}
78
79struct irq_chip uart_irq_type = {
80 .name = "UART/FPGA",
81 .ack = mask_uart_irq,
82 .mask = mask_uart_irq,
83 .mask_ack = mask_uart_irq,
84 .unmask = unmask_uart_irq,
85};
86
87void uart_irq_init(void)
88{
89 set_irq_chip_and_handler(80, &uart_irq_type, handle_level_irq);
90 set_irq_chip_and_handler(81, &uart_irq_type, handle_level_irq);
91}
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c
index 4f94fa261aae..1ea5c9c1010b 100644
--- a/arch/mips/oprofile/op_model_mipsxx.c
+++ b/arch/mips/oprofile/op_model_mipsxx.c
@@ -177,7 +177,10 @@ static int mipsxx_perfcount_handler(void)
177 unsigned int counters = op_model_mipsxx_ops.num_counters; 177 unsigned int counters = op_model_mipsxx_ops.num_counters;
178 unsigned int control; 178 unsigned int control;
179 unsigned int counter; 179 unsigned int counter;
180 int handled = 0; 180 int handled = IRQ_NONE;
181
182 if (cpu_has_mips_r2 && !(read_c0_cause() & (1 << 26)))
183 return handled;
181 184
182 switch (counters) { 185 switch (counters) {
183#define HANDLE_COUNTER(n) \ 186#define HANDLE_COUNTER(n) \
@@ -188,7 +191,7 @@ static int mipsxx_perfcount_handler(void)
188 (counter & M_COUNTER_OVERFLOW)) { \ 191 (counter & M_COUNTER_OVERFLOW)) { \
189 oprofile_add_sample(get_irq_regs(), n); \ 192 oprofile_add_sample(get_irq_regs(), n); \
190 w_c0_perfcntr ## n(reg.counter[n]); \ 193 w_c0_perfcntr ## n(reg.counter[n]); \
191 handled = 1; \ 194 handled = IRQ_HANDLED; \
192 } 195 }
193 HANDLE_COUNTER(3) 196 HANDLE_COUNTER(3)
194 HANDLE_COUNTER(2) 197 HANDLE_COUNTER(2)
diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile
index aba3dbf47eda..c58bd3d036f4 100644
--- a/arch/mips/pci/Makefile
+++ b/arch/mips/pci/Makefile
@@ -2,16 +2,14 @@
2# Makefile for the PCI specific kernel interface routines under Linux. 2# Makefile for the PCI specific kernel interface routines under Linux.
3# 3#
4 4
5obj-y += pci.o pci-dac.o 5obj-y += pci.o
6 6
7# 7#
8# PCI bus host bridge specific code 8# PCI bus host bridge specific code
9# 9#
10obj-$(CONFIG_MIPS_BONITO64) += ops-bonito64.o 10obj-$(CONFIG_MIPS_BONITO64) += ops-bonito64.o
11obj-$(CONFIG_PCI_GT64XXX_PCI0) += ops-gt64xxx_pci0.o 11obj-$(CONFIG_PCI_GT64XXX_PCI0) += ops-gt64xxx_pci0.o
12obj-$(CONFIG_PCI_MARVELL) += ops-marvell.o
13obj-$(CONFIG_MIPS_MSC) += ops-msc.o 12obj-$(CONFIG_MIPS_MSC) += ops-msc.o
14obj-$(CONFIG_MIPS_NILE4) += ops-nile4.o
15obj-$(CONFIG_MIPS_TX3927) += ops-tx3927.o 13obj-$(CONFIG_MIPS_TX3927) += ops-tx3927.o
16obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o 14obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o
17obj-$(CONFIG_NEC_CMBVR4133) += fixup-vr4133.o 15obj-$(CONFIG_NEC_CMBVR4133) += fixup-vr4133.o
@@ -22,17 +20,17 @@ obj-$(CONFIG_MARKEINS) += ops-emma2rh.o pci-emma2rh.o fixup-emma2rh.o
22# 20#
23obj-$(CONFIG_BASLER_EXCITE) += ops-titan.o pci-excite.o fixup-excite.o 21obj-$(CONFIG_BASLER_EXCITE) += ops-titan.o pci-excite.o fixup-excite.o
24obj-$(CONFIG_DDB5477) += fixup-ddb5477.o pci-ddb5477.o ops-ddb5477.o 22obj-$(CONFIG_DDB5477) += fixup-ddb5477.o pci-ddb5477.o ops-ddb5477.o
25obj-$(CONFIG_LASAT) += pci-lasat.o
26obj-$(CONFIG_MIPS_ATLAS) += fixup-atlas.o 23obj-$(CONFIG_MIPS_ATLAS) += fixup-atlas.o
27obj-$(CONFIG_MIPS_COBALT) += fixup-cobalt.o 24obj-$(CONFIG_MIPS_COBALT) += fixup-cobalt.o
28obj-$(CONFIG_MIPS_EV64120) += pci-ev64120.o
29obj-$(CONFIG_SOC_AU1500) += fixup-au1000.o ops-au1000.o 25obj-$(CONFIG_SOC_AU1500) += fixup-au1000.o ops-au1000.o
30obj-$(CONFIG_SOC_AU1550) += fixup-au1000.o ops-au1000.o 26obj-$(CONFIG_SOC_AU1550) += fixup-au1000.o ops-au1000.o
31obj-$(CONFIG_SOC_PNX8550) += fixup-pnx8550.o ops-pnx8550.o 27obj-$(CONFIG_SOC_PNX8550) += fixup-pnx8550.o ops-pnx8550.o
28obj-$(CONFIG_LEMOTE_FULONG) += fixup-lm2e.o ops-bonito64.o
32obj-$(CONFIG_MIPS_MALTA) += fixup-malta.o 29obj-$(CONFIG_MIPS_MALTA) += fixup-malta.o
33obj-$(CONFIG_MOMENCO_OCELOT) += fixup-ocelot.o pci-ocelot.o 30obj-$(CONFIG_MOMENCO_OCELOT) += fixup-ocelot.o pci-ocelot.o
34obj-$(CONFIG_MOMENCO_OCELOT_3) += fixup-ocelot3.o 31obj-$(CONFIG_PMC_MSP7120_GW) += fixup-pmcmsp.o ops-pmcmsp.o
35obj-$(CONFIG_MOMENCO_OCELOT_C) += fixup-ocelot-c.o pci-ocelot-c.o 32obj-$(CONFIG_PMC_MSP7120_EVAL) += fixup-pmcmsp.o ops-pmcmsp.o
33obj-$(CONFIG_PMC_MSP7120_FPGA) += fixup-pmcmsp.o ops-pmcmsp.o
36obj-$(CONFIG_PMC_YOSEMITE) += fixup-yosemite.o ops-titan.o ops-titan-ht.o \ 34obj-$(CONFIG_PMC_YOSEMITE) += fixup-yosemite.o ops-titan.o ops-titan-ht.o \
37 pci-yosemite.o 35 pci-yosemite.o
38obj-$(CONFIG_SGI_IP27) += ops-bridge.o pci-ip27.o 36obj-$(CONFIG_SGI_IP27) += ops-bridge.o pci-ip27.o
diff --git a/arch/mips/pci/fixup-atlas.c b/arch/mips/pci/fixup-atlas.c
index c6cd6e9cdfbc..45224fd2c7ba 100644
--- a/arch/mips/pci/fixup-atlas.c
+++ b/arch/mips/pci/fixup-atlas.c
@@ -58,7 +58,7 @@ static char irq_tab[][5] __initdata = {
58 {0, 0, 0, 0, 0 } /* 21: Unused */ 58 {0, 0, 0, 0, 0 } /* 21: Unused */
59}; 59};
60 60
61int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 61int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
62{ 62{
63 return irq_tab[slot][pin]; 63 return irq_tab[slot][pin];
64} 64}
diff --git a/arch/mips/pci/fixup-au1000.c b/arch/mips/pci/fixup-au1000.c
index c2f8304fe55b..ca0276c8070a 100644
--- a/arch/mips/pci/fixup-au1000.c
+++ b/arch/mips/pci/fixup-au1000.c
@@ -35,7 +35,7 @@
35 35
36extern char irq_tab_alchemy[][5]; 36extern char irq_tab_alchemy[][5];
37 37
38int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 38int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
39{ 39{
40 return irq_tab_alchemy[slot][pin]; 40 return irq_tab_alchemy[slot][pin];
41} 41}
diff --git a/arch/mips/pci/fixup-capcella.c b/arch/mips/pci/fixup-capcella.c
index 1e530751936c..1416bca6d1a3 100644
--- a/arch/mips/pci/fixup-capcella.c
+++ b/arch/mips/pci/fixup-capcella.c
@@ -38,7 +38,7 @@ static char irq_tab_capcella[][5] __initdata = {
38 [14] = { -1, INTA, INTB, INTC, INTD } 38 [14] = { -1, INTA, INTB, INTC, INTD }
39}; 39};
40 40
41int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 41int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
42{ 42{
43 return irq_tab_capcella[slot][pin]; 43 return irq_tab_capcella[slot][pin];
44} 44}
diff --git a/arch/mips/pci/fixup-cobalt.c b/arch/mips/pci/fixup-cobalt.c
index d57ffd7242ca..76b4f0ffb1e5 100644
--- a/arch/mips/pci/fixup-cobalt.c
+++ b/arch/mips/pci/fixup-cobalt.c
@@ -58,8 +58,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1,
58 58
59static void qube_raq_galileo_fixup(struct pci_dev *dev) 59static void qube_raq_galileo_fixup(struct pci_dev *dev)
60{ 60{
61 unsigned short galileo_id;
62
63 if (dev->devfn != PCI_DEVFN(0, 0)) 61 if (dev->devfn != PCI_DEVFN(0, 0))
64 return; 62 return;
65 63
@@ -84,16 +82,14 @@ static void qube_raq_galileo_fixup(struct pci_dev *dev)
84 * Therefore we must set the disconnect/retry cycle values to 82 * Therefore we must set the disconnect/retry cycle values to
85 * something sensible when using the new Galileo. 83 * something sensible when using the new Galileo.
86 */ 84 */
87 pci_read_config_word(dev, PCI_REVISION_ID, &galileo_id);
88 galileo_id &= 0xff; /* mask off class info */
89 85
90 printk(KERN_INFO "Galileo: revision %u\n", galileo_id); 86 printk(KERN_INFO "Galileo: revision %u\n", dev->revision);
91 87
92#if 0 88#if 0
93 if (galileo_id >= 0x10) { 89 if (dev->revision >= 0x10) {
94 /* New Galileo, assumes PCI stop line to VIA is connected. */ 90 /* New Galileo, assumes PCI stop line to VIA is connected. */
95 GT_WRITE(GT_PCI0_TOR_OFS, 0x4020); 91 GT_WRITE(GT_PCI0_TOR_OFS, 0x4020);
96 } else if (galileo_id == 0x1 || galileo_id == 0x2) 92 } else if (dev->revision == 0x1 || dev->revision == 0x2)
97#endif 93#endif
98 { 94 {
99 signed int timeo; 95 signed int timeo;
@@ -161,7 +157,7 @@ static char irq_tab_raq2[] __initdata = {
161 [COBALT_PCICONF_ETH1] = COBALT_ETH1_IRQ 157 [COBALT_PCICONF_ETH1] = COBALT_ETH1_IRQ
162}; 158};
163 159
164int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 160int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
165{ 161{
166 if (cobalt_board_id < COBALT_BRD_ID_QUBE2) 162 if (cobalt_board_id < COBALT_BRD_ID_QUBE2)
167 return irq_tab_qube1[slot]; 163 return irq_tab_qube1[slot];
diff --git a/arch/mips/pci/fixup-emma2rh.c b/arch/mips/pci/fixup-emma2rh.c
index 7abcfd175d43..a2705895561d 100644
--- a/arch/mips/pci/fixup-emma2rh.c
+++ b/arch/mips/pci/fixup-emma2rh.c
@@ -89,7 +89,7 @@ static void __devinit emma2rh_pci_host_fixup(struct pci_dev *dev)
89DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_EMMA2RH, 89DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_EMMA2RH,
90 emma2rh_pci_host_fixup); 90 emma2rh_pci_host_fixup);
91 91
92int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 92int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
93{ 93{
94 return irq_map[slot][pin]; 94 return irq_map[slot][pin];
95} 95}
diff --git a/arch/mips/pci/fixup-excite.c b/arch/mips/pci/fixup-excite.c
index 1da696d43f00..cd64d9f177c4 100644
--- a/arch/mips/pci/fixup-excite.c
+++ b/arch/mips/pci/fixup-excite.c
@@ -21,7 +21,7 @@
21#include <linux/pci.h> 21#include <linux/pci.h>
22#include <excite.h> 22#include <excite.h>
23 23
24int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 24int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
25{ 25{
26 if (pin == 0) 26 if (pin == 0)
27 return -1; 27 return -1;
diff --git a/arch/mips/pci/fixup-ip32.c b/arch/mips/pci/fixup-ip32.c
index 3e66b0aa63ca..190fffd08d3e 100644
--- a/arch/mips/pci/fixup-ip32.c
+++ b/arch/mips/pci/fixup-ip32.c
@@ -39,7 +39,7 @@ static char irq_tab_mace[][5] __initdata = {
39 * irqs. I suppose a device without a pin A will thank us for doing it 39 * irqs. I suppose a device without a pin A will thank us for doing it
40 * right if there exists such a broken piece of crap. 40 * right if there exists such a broken piece of crap.
41 */ 41 */
42int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 42int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
43{ 43{
44 return irq_tab_mace[slot][pin]; 44 return irq_tab_mace[slot][pin];
45} 45}
diff --git a/arch/mips/pci/fixup-jmr3927.c b/arch/mips/pci/fixup-jmr3927.c
index 73d18503517c..e974394be7bc 100644
--- a/arch/mips/pci/fixup-jmr3927.c
+++ b/arch/mips/pci/fixup-jmr3927.c
@@ -33,7 +33,7 @@
33 33
34#include <asm/jmr3927/jmr3927.h> 34#include <asm/jmr3927/jmr3927.h>
35 35
36int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 36int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
37{ 37{
38 unsigned char irq = pin; 38 unsigned char irq = pin;
39 39
diff --git a/arch/mips/pci/fixup-lm2e.c b/arch/mips/pci/fixup-lm2e.c
new file mode 100644
index 000000000000..e18ae4f574c1
--- /dev/null
+++ b/arch/mips/pci/fixup-lm2e.c
@@ -0,0 +1,242 @@
1/*
2 * fixup-lm2e.c
3 *
4 * Copyright (C) 2004 ICT CAS
5 * Author: Li xiaoyu, ICT CAS
6 * lixy@ict.ac.cn
7 *
8 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
9 * Author: Fuxin Zhang, zhangfx@lemote.com
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
15 *
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
19 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
22 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * You should have received a copy of the GNU General Public License along
28 * with this program; if not, write to the Free Software Foundation, Inc.,
29 * 675 Mass Ave, Cambridge, MA 02139, USA.
30 *
31 */
32#include <linux/init.h>
33#include <linux/pci.h>
34#include <asm/mips-boards/bonito64.h>
35
36/* South bridge slot number is set by the pci probe process */
37static u8 sb_slot = 5;
38
39int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
40{
41 int irq = 0;
42
43 if (slot == sb_slot) {
44 switch (PCI_FUNC(dev->devfn)) {
45 case 2:
46 irq = 10;
47 break;
48 case 3:
49 irq = 11;
50 break;
51 case 5:
52 irq = 9;
53 break;
54 }
55 } else {
56 irq = BONITO_IRQ_BASE + 25 + pin;
57 }
58 return irq;
59
60}
61
62/* Do platform specific device initialization at pci_enable_device() time */
63int pcibios_plat_dev_init(struct pci_dev *dev)
64{
65 return 0;
66}
67
68static void __init loongson2e_nec_fixup(struct pci_dev *pdev)
69{
70 unsigned int val;
71
72 /* Configues port 1, 2, 3, 4 to be validate*/
73 pci_read_config_dword(pdev, 0xe0, &val);
74 pci_write_config_dword(pdev, 0xe0, (val & ~7) | 0x4);
75
76 /* System clock is 48-MHz Oscillator. */
77 pci_write_config_dword(pdev, 0xe4, 1 << 5);
78}
79
80static void __init loongson2e_686b_func0_fixup(struct pci_dev *pdev)
81{
82 unsigned char c;
83
84 sb_slot = PCI_SLOT(pdev->devfn);
85
86 printk(KERN_INFO "via686b fix: ISA bridge\n");
87
88 /* Enable I/O Recovery time */
89 pci_write_config_byte(pdev, 0x40, 0x08);
90
91 /* Enable ISA refresh */
92 pci_write_config_byte(pdev, 0x41, 0x01);
93
94 /* disable ISA line buffer */
95 pci_write_config_byte(pdev, 0x45, 0x00);
96
97 /* Gate INTR, and flush line buffer */
98 pci_write_config_byte(pdev, 0x46, 0xe0);
99
100 /* Disable PCI Delay Transaction, Enable EISA ports 4D0/4D1. */
101 /* pci_write_config_byte(pdev, 0x47, 0x20); */
102
103 /*
104 * enable PCI Delay Transaction, Enable EISA ports 4D0/4D1.
105 * enable time-out timer
106 */
107 pci_write_config_byte(pdev, 0x47, 0xe6);
108
109 /*
110 * enable level trigger on pci irqs: 9,10,11,13
111 * important! without this PCI interrupts won't work
112 */
113 outb(0x2e, 0x4d1);
114
115 /* 512 K PCI Decode */
116 pci_write_config_byte(pdev, 0x48, 0x01);
117
118 /* Wait for PGNT before grant to ISA Master/DMA */
119 pci_write_config_byte(pdev, 0x4a, 0x84);
120
121 /*
122 * Plug'n'Play
123 *
124 * Parallel DRQ 3, Floppy DRQ 2 (default)
125 */
126 pci_write_config_byte(pdev, 0x50, 0x0e);
127
128 /*
129 * IRQ Routing for Floppy and Parallel port
130 *
131 * IRQ 6 for floppy, IRQ 7 for parallel port
132 */
133 pci_write_config_byte(pdev, 0x51, 0x76);
134
135 /* IRQ Routing for serial ports (take IRQ 3 and 4) */
136 pci_write_config_byte(pdev, 0x52, 0x34);
137
138 /* All IRQ's level triggered. */
139 pci_write_config_byte(pdev, 0x54, 0x00);
140
141 /* route PIRQA-D irq */
142 pci_write_config_byte(pdev, 0x55, 0x90); /* bit 7-4, PIRQA */
143 pci_write_config_byte(pdev, 0x56, 0xba); /* bit 7-4, PIRQC; */
144 /* 3-0, PIRQB */
145 pci_write_config_byte(pdev, 0x57, 0xd0); /* bit 7-4, PIRQD */
146
147 /* enable function 5/6, audio/modem */
148 pci_read_config_byte(pdev, 0x85, &c);
149 c &= ~(0x3 << 2);
150 pci_write_config_byte(pdev, 0x85, c);
151
152 printk(KERN_INFO"via686b fix: ISA bridge done\n");
153}
154
155static void __init loongson2e_686b_func1_fixup(struct pci_dev *pdev)
156{
157 printk(KERN_INFO"via686b fix: IDE\n");
158
159 /* Modify IDE controller setup */
160 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 48);
161 pci_write_config_byte(pdev, PCI_COMMAND,
162 PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
163 PCI_COMMAND_MASTER);
164 pci_write_config_byte(pdev, 0x40, 0x0b);
165 /* legacy mode */
166 pci_write_config_byte(pdev, 0x42, 0x09);
167
168#if 1/* play safe, otherwise we may see notebook's usb keyboard lockup */
169 /* disable read prefetch/write post buffers */
170 pci_write_config_byte(pdev, 0x41, 0x02);
171
172 /* use 3/4 as fifo thresh hold */
173 pci_write_config_byte(pdev, 0x43, 0x0a);
174 pci_write_config_byte(pdev, 0x44, 0x00);
175
176 pci_write_config_byte(pdev, 0x45, 0x00);
177#else
178 pci_write_config_byte(pdev, 0x41, 0xc2);
179 pci_write_config_byte(pdev, 0x43, 0x35);
180 pci_write_config_byte(pdev, 0x44, 0x1c);
181
182 pci_write_config_byte(pdev, 0x45, 0x10);
183#endif
184
185 printk(KERN_INFO"via686b fix: IDE done\n");
186}
187
188static void __init loongson2e_686b_func2_fixup(struct pci_dev *pdev)
189{
190 /* irq routing */
191 pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 10);
192}
193
194static void __init loongson2e_686b_func3_fixup(struct pci_dev *pdev)
195{
196 /* irq routing */
197 pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 11);
198}
199
200static void __init loongson2e_686b_func5_fixup(struct pci_dev *pdev)
201{
202 unsigned int val;
203 unsigned char c;
204
205 /* enable IO */
206 pci_write_config_byte(pdev, PCI_COMMAND,
207 PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
208 PCI_COMMAND_MASTER);
209 pci_read_config_dword(pdev, 0x4, &val);
210 pci_write_config_dword(pdev, 0x4, val | 1);
211
212 /* route ac97 IRQ */
213 pci_write_config_byte(pdev, 0x3c, 9);
214
215 pci_read_config_byte(pdev, 0x8, &c);
216
217 /* link control: enable link & SGD PCM output */
218 pci_write_config_byte(pdev, 0x41, 0xcc);
219
220 /* disable game port, FM, midi, sb, enable write to reg2c-2f */
221 pci_write_config_byte(pdev, 0x42, 0x20);
222
223 /* we are using Avance logic codec */
224 pci_write_config_word(pdev, 0x2c, 0x1005);
225 pci_write_config_word(pdev, 0x2e, 0x4710);
226 pci_read_config_dword(pdev, 0x2c, &val);
227
228 pci_write_config_byte(pdev, 0x42, 0x0);
229}
230
231DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686,
232 loongson2e_686b_func0_fixup);
233DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1,
234 loongson2e_686b_func1_fixup);
235DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2,
236 loongson2e_686b_func2_fixup);
237DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3,
238 loongson2e_686b_func3_fixup);
239DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5,
240 loongson2e_686b_func5_fixup);
241DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB,
242 loongson2e_nec_fixup);
diff --git a/arch/mips/pci/fixup-malta.c b/arch/mips/pci/fixup-malta.c
index bf2c41d1e9c5..0f48498bc231 100644
--- a/arch/mips/pci/fixup-malta.c
+++ b/arch/mips/pci/fixup-malta.c
@@ -36,7 +36,7 @@ static char irq_tab[][5] __initdata = {
36 {0, PCID, PCIA, PCIB, PCIC } /* 21: PCI Slot 4 */ 36 {0, PCID, PCIA, PCIB, PCIC } /* 21: PCI Slot 4 */
37}; 37};
38 38
39int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 39int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
40{ 40{
41 int virq; 41 int virq;
42 virq = irq_tab[slot][pin]; 42 virq = irq_tab[slot][pin];
diff --git a/arch/mips/pci/fixup-mpc30x.c b/arch/mips/pci/fixup-mpc30x.c
index 3c9ae41f7517..591159625722 100644
--- a/arch/mips/pci/fixup-mpc30x.c
+++ b/arch/mips/pci/fixup-mpc30x.c
@@ -34,7 +34,7 @@ static const int irq_tab_mpc30x[] __initdata = {
34 [29] = MQ200_IRQ, 34 [29] = MQ200_IRQ,
35}; 35};
36 36
37int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 37int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
38{ 38{
39 if (slot == 30) 39 if (slot == 30)
40 return internal_func_irqs[PCI_FUNC(dev->devfn)]; 40 return internal_func_irqs[PCI_FUNC(dev->devfn)];
diff --git a/arch/mips/pci/fixup-ocelot-c.c b/arch/mips/pci/fixup-ocelot-c.c
deleted file mode 100644
index d45494807a33..000000000000
--- a/arch/mips/pci/fixup-ocelot-c.c
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * Copyright 2002 Momentum Computer Inc.
3 * Author: Matthew Dharm <mdharm@momenco.com>
4 *
5 * Based on work for the Linux port to the Ocelot board, which is
6 * Copyright 2001 MontaVista Software Inc.
7 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
8 *
9 * arch/mips/momentum/ocelot_g/pci.c
10 * Board-specific PCI routines for mv64340 controller.
11 *
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
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17#include <linux/types.h>
18#include <linux/pci.h>
19#include <linux/kernel.h>
20#include <linux/init.h>
21
22int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
23{
24 int bus = dev->bus->number;
25
26 if (bus == 0 && slot == 1)
27 return 2; /* PCI-X A */
28 if (bus == 1 && slot == 1)
29 return 12; /* PCI-X B */
30 if (bus == 1 && slot == 2)
31 return 4; /* PCI B */
32
33return 0;
34 panic("Whooops in pcibios_map_irq");
35}
36
37/* Do platform specific device initialization at pci_enable_device() time */
38int pcibios_plat_dev_init(struct pci_dev *dev)
39{
40 return 0;
41}
diff --git a/arch/mips/pci/fixup-ocelot3.c b/arch/mips/pci/fixup-ocelot3.c
deleted file mode 100644
index ececc03ec620..000000000000
--- a/arch/mips/pci/fixup-ocelot3.c
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2004 Montavista Software Inc.
7 * Author: Manish Lachwani (mlachwani@mvista.com)
8 *
9 * Looking at the schematics for the Ocelot-3 board, there are
10 * two PCI busses and each bus has two PCI slots.
11 */
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/pci.h>
15#include <asm/mipsregs.h>
16
17/*
18 * Do platform specific device initialization at
19 * pci_enable_device() time
20 */
21int pcibios_plat_dev_init(struct pci_dev *dev)
22{
23 return 0;
24}
25
26int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
27{
28 int bus = dev->bus->number;
29
30 if (bus == 0 && slot == 1)
31 return 2; /* PCI-X A */
32 if (bus == 0 && slot == 2)
33 return 3; /* PCI-X B */
34 if (bus == 1 && slot == 1)
35 return 4; /* PCI A */
36 if (bus == 1 && slot == 2)
37 return 5; /* PCI B */
38
39return 0;
40 panic("Whooops in pcibios_map_irq");
41}
diff --git a/arch/mips/pci/fixup-pmcmsp.c b/arch/mips/pci/fixup-pmcmsp.c
new file mode 100644
index 000000000000..00261211dbfa
--- /dev/null
+++ b/arch/mips/pci/fixup-pmcmsp.c
@@ -0,0 +1,216 @@
1/*
2 * PMC-Sierra MSP board specific pci fixups.
3 *
4 * Copyright 2001 MontaVista Software Inc.
5 * Copyright 2005-2007 PMC-Sierra, Inc
6 *
7 * Author: MontaVista Software, Inc.
8 * ppopov@mvista.com or source@mvista.com
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
16 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
18 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
21 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
22 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * You should have received a copy of the GNU General Public License along
27 * with this program; if not, write to the Free Software Foundation, Inc.,
28 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 */
30
31#ifdef CONFIG_PCI
32
33#include <linux/types.h>
34#include <linux/pci.h>
35#include <linux/kernel.h>
36#include <linux/init.h>
37
38#include <asm/byteorder.h>
39
40#include <msp_pci.h>
41#include <msp_cic_int.h>
42
43/* PCI interrupt pins */
44#define IRQ4 MSP_INT_EXT4
45#define IRQ5 MSP_INT_EXT5
46#define IRQ6 MSP_INT_EXT6
47
48#if defined(CONFIG_PMC_MSP7120_GW)
49/* Garibaldi Board IRQ wiring to PCI slots */
50static char irq_tab[][5] __initdata = {
51 /* INTA INTB INTC INTD */
52 {0, 0, 0, 0, 0 }, /* (AD[0]): Unused */
53 {0, 0, 0, 0, 0 }, /* (AD[1]): Unused */
54 {0, 0, 0, 0, 0 }, /* (AD[2]): Unused */
55 {0, 0, 0, 0, 0 }, /* (AD[3]): Unused */
56 {0, 0, 0, 0, 0 }, /* (AD[4]): Unused */
57 {0, 0, 0, 0, 0 }, /* (AD[5]): Unused */
58 {0, 0, 0, 0, 0 }, /* (AD[6]): Unused */
59 {0, 0, 0, 0, 0 }, /* (AD[7]): Unused */
60 {0, 0, 0, 0, 0 }, /* (AD[8]): Unused */
61 {0, 0, 0, 0, 0 }, /* (AD[9]): Unused */
62 {0, 0, 0, 0, 0 }, /* 0 (AD[10]): Unused */
63 {0, 0, 0, 0, 0 }, /* 1 (AD[11]): Unused */
64 {0, 0, 0, 0, 0 }, /* 2 (AD[12]): Unused */
65 {0, 0, 0, 0, 0 }, /* 3 (AD[13]): Unused */
66 {0, 0, 0, 0, 0 }, /* 4 (AD[14]): Unused */
67 {0, 0, 0, 0, 0 }, /* 5 (AD[15]): Unused */
68 {0, 0, 0, 0, 0 }, /* 6 (AD[16]): Unused */
69 {0, 0, 0, 0, 0 }, /* 7 (AD[17]): Unused */
70 {0, 0, 0, 0, 0 }, /* 8 (AD[18]): Unused */
71 {0, 0, 0, 0, 0 }, /* 9 (AD[19]): Unused */
72 {0, 0, 0, 0, 0 }, /* 10 (AD[20]): Unused */
73 {0, 0, 0, 0, 0 }, /* 11 (AD[21]): Unused */
74 {0, 0, 0, 0, 0 }, /* 12 (AD[22]): Unused */
75 {0, 0, 0, 0, 0 }, /* 13 (AD[23]): Unused */
76 {0, 0, 0, 0, 0 }, /* 14 (AD[24]): Unused */
77 {0, 0, 0, 0, 0 }, /* 15 (AD[25]): Unused */
78 {0, 0, 0, 0, 0 }, /* 16 (AD[26]): Unused */
79 {0, 0, 0, 0, 0 }, /* 17 (AD[27]): Unused */
80 {0, IRQ4, IRQ4, 0, 0 }, /* 18 (AD[28]): slot 0 */
81 {0, 0, 0, 0, 0 }, /* 19 (AD[29]): Unused */
82 {0, IRQ5, IRQ5, 0, 0 }, /* 20 (AD[30]): slot 1 */
83 {0, IRQ6, IRQ6, 0, 0 } /* 21 (AD[31]): slot 2 */
84};
85
86#elif defined(CONFIG_PMC_MSP7120_EVAL)
87
88/* MSP7120 Eval Board IRQ wiring to PCI slots */
89static char irq_tab[][5] __initdata = {
90 /* INTA INTB INTC INTD */
91 {0, 0, 0, 0, 0 }, /* (AD[0]): Unused */
92 {0, 0, 0, 0, 0 }, /* (AD[1]): Unused */
93 {0, 0, 0, 0, 0 }, /* (AD[2]): Unused */
94 {0, 0, 0, 0, 0 }, /* (AD[3]): Unused */
95 {0, 0, 0, 0, 0 }, /* (AD[4]): Unused */
96 {0, 0, 0, 0, 0 }, /* (AD[5]): Unused */
97 {0, 0, 0, 0, 0 }, /* (AD[6]): Unused */
98 {0, 0, 0, 0, 0 }, /* (AD[7]): Unused */
99 {0, 0, 0, 0, 0 }, /* (AD[8]): Unused */
100 {0, 0, 0, 0, 0 }, /* (AD[9]): Unused */
101 {0, 0, 0, 0, 0 }, /* 0 (AD[10]): Unused */
102 {0, 0, 0, 0, 0 }, /* 1 (AD[11]): Unused */
103 {0, 0, 0, 0, 0 }, /* 2 (AD[12]): Unused */
104 {0, 0, 0, 0, 0 }, /* 3 (AD[13]): Unused */
105 {0, 0, 0, 0, 0 }, /* 4 (AD[14]): Unused */
106 {0, 0, 0, 0, 0 }, /* 5 (AD[15]): Unused */
107 {0, IRQ6, IRQ6, 0, 0 }, /* 6 (AD[16]): slot 3 (mini) */
108 {0, IRQ5, IRQ5, 0, 0 }, /* 7 (AD[17]): slot 2 (mini) */
109 {0, IRQ4, IRQ4, IRQ4, IRQ4}, /* 8 (AD[18]): slot 0 (PCI) */
110 {0, IRQ5, IRQ5, IRQ5, IRQ5}, /* 9 (AD[19]): slot 1 (PCI) */
111 {0, 0, 0, 0, 0 }, /* 10 (AD[20]): Unused */
112 {0, 0, 0, 0, 0 }, /* 11 (AD[21]): Unused */
113 {0, 0, 0, 0, 0 }, /* 12 (AD[22]): Unused */
114 {0, 0, 0, 0, 0 }, /* 13 (AD[23]): Unused */
115 {0, 0, 0, 0, 0 }, /* 14 (AD[24]): Unused */
116 {0, 0, 0, 0, 0 }, /* 15 (AD[25]): Unused */
117 {0, 0, 0, 0, 0 }, /* 16 (AD[26]): Unused */
118 {0, 0, 0, 0, 0 }, /* 17 (AD[27]): Unused */
119 {0, 0, 0, 0, 0 }, /* 18 (AD[28]): Unused */
120 {0, 0, 0, 0, 0 }, /* 19 (AD[29]): Unused */
121 {0, 0, 0, 0, 0 }, /* 20 (AD[30]): Unused */
122 {0, 0, 0, 0, 0 } /* 21 (AD[31]): Unused */
123};
124
125#else
126
127/* Unknown board -- don't assign any IRQs */
128static char irq_tab[][5] __initdata = {
129 /* INTA INTB INTC INTD */
130 {0, 0, 0, 0, 0 }, /* (AD[0]): Unused */
131 {0, 0, 0, 0, 0 }, /* (AD[1]): Unused */
132 {0, 0, 0, 0, 0 }, /* (AD[2]): Unused */
133 {0, 0, 0, 0, 0 }, /* (AD[3]): Unused */
134 {0, 0, 0, 0, 0 }, /* (AD[4]): Unused */
135 {0, 0, 0, 0, 0 }, /* (AD[5]): Unused */
136 {0, 0, 0, 0, 0 }, /* (AD[6]): Unused */
137 {0, 0, 0, 0, 0 }, /* (AD[7]): Unused */
138 {0, 0, 0, 0, 0 }, /* (AD[8]): Unused */
139 {0, 0, 0, 0, 0 }, /* (AD[9]): Unused */
140 {0, 0, 0, 0, 0 }, /* 0 (AD[10]): Unused */
141 {0, 0, 0, 0, 0 }, /* 1 (AD[11]): Unused */
142 {0, 0, 0, 0, 0 }, /* 2 (AD[12]): Unused */
143 {0, 0, 0, 0, 0 }, /* 3 (AD[13]): Unused */
144 {0, 0, 0, 0, 0 }, /* 4 (AD[14]): Unused */
145 {0, 0, 0, 0, 0 }, /* 5 (AD[15]): Unused */
146 {0, 0, 0, 0, 0 }, /* 6 (AD[16]): Unused */
147 {0, 0, 0, 0, 0 }, /* 7 (AD[17]): Unused */
148 {0, 0, 0, 0, 0 }, /* 8 (AD[18]): Unused */
149 {0, 0, 0, 0, 0 }, /* 9 (AD[19]): Unused */
150 {0, 0, 0, 0, 0 }, /* 10 (AD[20]): Unused */
151 {0, 0, 0, 0, 0 }, /* 11 (AD[21]): Unused */
152 {0, 0, 0, 0, 0 }, /* 12 (AD[22]): Unused */
153 {0, 0, 0, 0, 0 }, /* 13 (AD[23]): Unused */
154 {0, 0, 0, 0, 0 }, /* 14 (AD[24]): Unused */
155 {0, 0, 0, 0, 0 }, /* 15 (AD[25]): Unused */
156 {0, 0, 0, 0, 0 }, /* 16 (AD[26]): Unused */
157 {0, 0, 0, 0, 0 }, /* 17 (AD[27]): Unused */
158 {0, 0, 0, 0, 0 }, /* 18 (AD[28]): Unused */
159 {0, 0, 0, 0, 0 }, /* 19 (AD[29]): Unused */
160 {0, 0, 0, 0, 0 }, /* 20 (AD[30]): Unused */
161 {0, 0, 0, 0, 0 } /* 21 (AD[31]): Unused */
162};
163#endif
164
165/*****************************************************************************
166 *
167 * FUNCTION: pcibios_plat_dev_init
168 * _________________________________________________________________________
169 *
170 * DESCRIPTION: Perform platform specific device initialization at
171 * pci_enable_device() time.
172 * None are needed for the MSP7120 PCI Controller.
173 *
174 * INPUTS: dev - structure describing the PCI device
175 *
176 * OUTPUTS: none
177 *
178 * RETURNS: PCIBIOS_SUCCESSFUL
179 *
180 ****************************************************************************/
181int pcibios_plat_dev_init(struct pci_dev *dev)
182{
183 return PCIBIOS_SUCCESSFUL;
184}
185
186/*****************************************************************************
187 *
188 * FUNCTION: pcibios_map_irq
189 * _________________________________________________________________________
190 *
191 * DESCRIPTION: Perform board supplied PCI IRQ mapping routine.
192 *
193 * INPUTS: dev - unused
194 * slot - PCI slot. Identified by which bit of the AD[] bus
195 * drives the IDSEL line. AD[10] is 0, AD[31] is
196 * slot 21.
197 * pin - numbered using the scheme of the PCI_INTERRUPT_PIN
198 * field of the config header.
199 *
200 * OUTPUTS: none
201 *
202 * RETURNS: IRQ number
203 *
204 ****************************************************************************/
205int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
206{
207#if !defined(CONFIG_PMC_MSP7120_GW) && !defined(CONFIG_PMC_MSP7120_EVAL)
208 printk(KERN_WARNING "PCI: unknown board, no PCI IRQs assigned.\n");
209#endif
210 printk(KERN_WARNING "PCI: irq_tab returned %d for slot=%d pin=%d\n",
211 irq_tab[slot][pin], slot, pin);
212
213 return irq_tab[slot][pin];
214}
215
216#endif /* CONFIG_PCI */
diff --git a/arch/mips/pci/fixup-pnx8550.c b/arch/mips/pci/fixup-pnx8550.c
index 50546dab6689..96857ac63bf5 100644
--- a/arch/mips/pci/fixup-pnx8550.c
+++ b/arch/mips/pci/fixup-pnx8550.c
@@ -45,7 +45,7 @@ void __init pcibios_fixup(void)
45 /* nothing to do here */ 45 /* nothing to do here */
46} 46}
47 47
48int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 48int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
49{ 49{
50 return pnx8550_irq_tab[slot][pin]; 50 return pnx8550_irq_tab[slot][pin];
51} 51}
diff --git a/arch/mips/pci/fixup-rbtx4927.c b/arch/mips/pci/fixup-rbtx4927.c
index ceeb1860895a..3cdbecb8e714 100644
--- a/arch/mips/pci/fixup-rbtx4927.c
+++ b/arch/mips/pci/fixup-rbtx4927.c
@@ -119,7 +119,7 @@ int pci_get_irq(struct pci_dev *dev, int pin)
119 return irq; 119 return irq;
120} 120}
121 121
122int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 122int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
123{ 123{
124 unsigned char irq; 124 unsigned char irq;
125 125
diff --git a/arch/mips/pci/fixup-sni.c b/arch/mips/pci/fixup-sni.c
index 36e5fb1b3786..a45bedd17233 100644
--- a/arch/mips/pci/fixup-sni.c
+++ b/arch/mips/pci/fixup-sni.c
@@ -120,7 +120,7 @@ static inline int is_rm300_revd(void)
120 return (csmsr & 0xa0) == 0x20; 120 return (csmsr & 0xa0) == 0x20;
121} 121}
122 122
123int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 123int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
124{ 124{
125 switch (sni_brd_type) { 125 switch (sni_brd_type) {
126 case SNI_BRD_PCI_TOWER: 126 case SNI_BRD_PCI_TOWER:
diff --git a/arch/mips/pci/fixup-tb0219.c b/arch/mips/pci/fixup-tb0219.c
index 734f2b71e164..720a2b720c5c 100644
--- a/arch/mips/pci/fixup-tb0219.c
+++ b/arch/mips/pci/fixup-tb0219.c
@@ -23,7 +23,7 @@
23 23
24#include <asm/vr41xx/tb0219.h> 24#include <asm/vr41xx/tb0219.h>
25 25
26int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 26int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
27{ 27{
28 int irq = -1; 28 int irq = -1;
29 29
diff --git a/arch/mips/pci/fixup-tb0226.c b/arch/mips/pci/fixup-tb0226.c
index c9e7cb4361a1..e3eedf4bf9bd 100644
--- a/arch/mips/pci/fixup-tb0226.c
+++ b/arch/mips/pci/fixup-tb0226.c
@@ -23,7 +23,7 @@
23#include <asm/vr41xx/giu.h> 23#include <asm/vr41xx/giu.h>
24#include <asm/vr41xx/tb0226.h> 24#include <asm/vr41xx/tb0226.h>
25 25
26int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 26int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
27{ 27{
28 int irq = -1; 28 int irq = -1;
29 29
diff --git a/arch/mips/pci/fixup-tb0287.c b/arch/mips/pci/fixup-tb0287.c
index fbe6bcb28199..267ab3dc3d42 100644
--- a/arch/mips/pci/fixup-tb0287.c
+++ b/arch/mips/pci/fixup-tb0287.c
@@ -22,7 +22,7 @@
22 22
23#include <asm/vr41xx/tb0287.h> 23#include <asm/vr41xx/tb0287.h>
24 24
25int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 25int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
26{ 26{
27 unsigned char bus; 27 unsigned char bus;
28 int irq = -1; 28 int irq = -1;
diff --git a/arch/mips/pci/fixup-tx4938.c b/arch/mips/pci/fixup-tx4938.c
index f455520ada88..2485f47dfe6f 100644
--- a/arch/mips/pci/fixup-tx4938.c
+++ b/arch/mips/pci/fixup-tx4938.c
@@ -69,7 +69,7 @@ int pci_get_irq(struct pci_dev *dev, int pin)
69 return irq; 69 return irq;
70} 70}
71 71
72int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 72int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
73{ 73{
74 unsigned char irq = 0; 74 unsigned char irq = 0;
75 75
diff --git a/arch/mips/pci/fixup-vr4133.c b/arch/mips/pci/fixup-vr4133.c
index a8d9d22b13df..de5e5f6bbf4c 100644
--- a/arch/mips/pci/fixup-vr4133.c
+++ b/arch/mips/pci/fixup-vr4133.c
@@ -169,7 +169,7 @@ void i8259_init(void)
169} 169}
170#endif 170#endif
171 171
172int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 172int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
173{ 173{
174 extern int pci_probe_only; 174 extern int pci_probe_only;
175 pci_probe_only = 1; 175 pci_probe_only = 1;
diff --git a/arch/mips/pci/fixup-wrppmc.c b/arch/mips/pci/fixup-wrppmc.c
index 3357c1300bb1..3d277549d5df 100644
--- a/arch/mips/pci/fixup-wrppmc.c
+++ b/arch/mips/pci/fixup-wrppmc.c
@@ -25,7 +25,7 @@ static char pci_irq_tab[PCI_SLOT_MAXNR][5] __initdata = {
25 [6] = {0, WRPPMC_PCI_INTA_IRQ, 0, 0, 0}, 25 [6] = {0, WRPPMC_PCI_INTA_IRQ, 0, 0, 0},
26}; 26};
27 27
28int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 28int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
29{ 29{
30 return pci_irq_tab[slot][pin]; 30 return pci_irq_tab[slot][pin];
31} 31}
diff --git a/arch/mips/pci/fixup-yosemite.c b/arch/mips/pci/fixup-yosemite.c
index 81d77a587a51..fdafb13a793b 100644
--- a/arch/mips/pci/fixup-yosemite.c
+++ b/arch/mips/pci/fixup-yosemite.c
@@ -26,7 +26,7 @@
26#include <linux/init.h> 26#include <linux/init.h>
27#include <linux/pci.h> 27#include <linux/pci.h>
28 28
29int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 29int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
30{ 30{
31 if (pin == 0) 31 if (pin == 0)
32 return -1; 32 return -1;
diff --git a/arch/mips/pci/ops-bonito64.c b/arch/mips/pci/ops-bonito64.c
index dc35270b65a2..f742c51acf0d 100644
--- a/arch/mips/pci/ops-bonito64.c
+++ b/arch/mips/pci/ops-bonito64.c
@@ -29,83 +29,60 @@
29#define PCI_ACCESS_READ 0 29#define PCI_ACCESS_READ 0
30#define PCI_ACCESS_WRITE 1 30#define PCI_ACCESS_WRITE 1
31 31
32/* 32#ifdef CONFIG_LEMOTE_FULONG
33 * PCI configuration cycle AD bus definition 33#define CFG_SPACE_REG(offset) (void *)CKSEG1ADDR(BONITO_PCICFG_BASE | (offset))
34 */ 34#define ID_SEL_BEGIN 11
35/* Type 0 */ 35#else
36#define PCI_CFG_TYPE0_REG_SHF 0 36#define CFG_SPACE_REG(offset) (void *)CKSEG1ADDR(_pcictrl_bonito_pcicfg + (offset))
37#define PCI_CFG_TYPE0_FUNC_SHF 8 37#define ID_SEL_BEGIN 10
38#endif
39#define MAX_DEV_NUM (31 - ID_SEL_BEGIN)
38 40
39/* Type 1 */
40#define PCI_CFG_TYPE1_REG_SHF 0
41#define PCI_CFG_TYPE1_FUNC_SHF 8
42#define PCI_CFG_TYPE1_DEV_SHF 11
43#define PCI_CFG_TYPE1_BUS_SHF 16
44 41
45static int bonito64_pcibios_config_access(unsigned char access_type, 42static int bonito64_pcibios_config_access(unsigned char access_type,
46 struct pci_bus *bus, 43 struct pci_bus *bus,
47 unsigned int devfn, int where, 44 unsigned int devfn, int where,
48 u32 * data) 45 u32 * data)
49{ 46{
50 unsigned char busnum = bus->number; 47 u32 busnum = bus->number;
48 u32 addr, type;
51 u32 dummy; 49 u32 dummy;
52 u64 pci_addr; 50 void *addrp;
53 51 int device = PCI_SLOT(devfn);
54 /* Algorithmics Bonito64 system controller. */ 52 int function = PCI_FUNC(devfn);
53 int reg = where & ~3;
55 54
56 if ((busnum == 0) && (PCI_SLOT(devfn) > 21)) {
57 /* We number bus 0 devices from 0..21 */
58 return -1;
59 }
60
61 /* Clear cause register bits */
62 BONITO_PCICMD |= (BONITO_PCICMD_MABORT_CLR |
63 BONITO_PCICMD_MTABORT_CLR);
64
65 /*
66 * Setup pattern to be used as PCI "address" for
67 * Type 0 cycle
68 */
69 if (busnum == 0) { 55 if (busnum == 0) {
70 /* IDSEL */ 56 /* Type 0 configuration for onboard PCI bus */
71 pci_addr = (u64) 1 << (PCI_SLOT(devfn) + 10); 57 if (device > MAX_DEV_NUM)
72 } else { 58 return -1;
73 /* Bus number */
74 pci_addr = busnum << PCI_CFG_TYPE1_BUS_SHF;
75
76 /* Device number */
77 pci_addr |=
78 PCI_SLOT(devfn) << PCI_CFG_TYPE1_DEV_SHF;
79 }
80
81 /* Function (same for Type 0/1) */
82 pci_addr |= PCI_FUNC(devfn) << PCI_CFG_TYPE0_FUNC_SHF;
83
84 /* Register number (same for Type 0/1) */
85 pci_addr |= (where & ~0x3) << PCI_CFG_TYPE0_REG_SHF;
86 59
87 if (busnum == 0) { 60 addr = (1 << (device + ID_SEL_BEGIN)) | (function << 8) | reg;
88 /* Type 0 */ 61 type = 0;
89 BONITO_PCIMAP_CFG = pci_addr >> 16;
90 } else { 62 } else {
91 /* Type 1 */ 63 /* Type 1 configuration for offboard PCI bus */
92 BONITO_PCIMAP_CFG = (pci_addr >> 16) | 0x10000; 64 addr = (busnum << 16) | (device << 11) | (function << 8) | reg;
65 type = 0x10000;
93 } 66 }
94 67
95 pci_addr &= 0xffff; 68 /* Clear aborts */
69 BONITO_PCICMD |= BONITO_PCICMD_MABORT_CLR | BONITO_PCICMD_MTABORT_CLR;
70
71 BONITO_PCIMAP_CFG = (addr >> 16) | type;
96 72
97 /* Flush Bonito register block */ 73 /* Flush Bonito register block */
98 dummy = BONITO_PCIMAP_CFG; 74 dummy = BONITO_PCIMAP_CFG;
99 iob(); /* sync */ 75 mmiowb();
100 76
101 /* Perform access */ 77 addrp = CFG_SPACE_REG(addr & 0xffff);
102 if (access_type == PCI_ACCESS_WRITE) { 78 if (access_type == PCI_ACCESS_WRITE) {
103 *(volatile u32 *) (_pcictrl_bonito_pcicfg + (u32)pci_addr) = *(u32 *) data; 79 writel(cpu_to_le32(*data), addrp);
104 80#ifndef CONFIG_LEMOTE_FULONG
105 /* Wait till done */ 81 /* Wait till done */
106 while (BONITO_PCIMSTAT & 0xF); 82 while (BONITO_PCIMSTAT & 0xF);
83#endif
107 } else { 84 } else {
108 *(u32 *) data = *(volatile u32 *) (_pcictrl_bonito_pcicfg + (u32)pci_addr); 85 *data = le32_to_cpu(readl(addrp));
109 } 86 }
110 87
111 /* Detect Master/Target abort */ 88 /* Detect Master/Target abort */
@@ -121,6 +98,7 @@ static int bonito64_pcibios_config_access(unsigned char access_type,
121 } 98 }
122 99
123 return 0; 100 return 0;
101
124} 102}
125 103
126 104
diff --git a/arch/mips/pci/ops-marvell.c b/arch/mips/pci/ops-marvell.c
deleted file mode 100644
index 1ac5c59199d1..000000000000
--- a/arch/mips/pci/ops-marvell.c
+++ /dev/null
@@ -1,93 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2003, 2004 Ralf Baechle (ralf@linux-mips.org)
7 */
8#include <linux/kernel.h>
9#include <linux/types.h>
10#include <linux/pci.h>
11
12#include <asm/marvell.h>
13
14static int mv_read_config(struct pci_bus *bus, unsigned int devfn,
15 int where, int size, u32 * val)
16{
17 struct mv_pci_controller *mvbc = bus->sysdata;
18 unsigned long address_reg, data_reg;
19 u32 address;
20
21 address_reg = mvbc->config_addr;
22 data_reg = mvbc->config_vreg;
23
24 /* Accessing device 31 crashes those Marvells. Since years.
25 Will they ever make sane controllers ... */
26 if (PCI_SLOT(devfn) == 31)
27 return PCIBIOS_DEVICE_NOT_FOUND;
28
29 address = (bus->number << 16) | (devfn << 8) |
30 (where & 0xfc) | 0x80000000;
31
32 /* start the configuration cycle */
33 MV_WRITE(address_reg, address);
34
35 switch (size) {
36 case 1:
37 *val = MV_READ_8(data_reg + (where & 0x3));
38 break;
39
40 case 2:
41 *val = MV_READ_16(data_reg + (where & 0x3));
42 break;
43
44 case 4:
45 *val = MV_READ(data_reg);
46 break;
47 }
48
49 return PCIBIOS_SUCCESSFUL;
50}
51
52static int mv_write_config(struct pci_bus *bus, unsigned int devfn,
53 int where, int size, u32 val)
54{
55 struct mv_pci_controller *mvbc = bus->sysdata;
56 unsigned long address_reg, data_reg;
57 u32 address;
58
59 address_reg = mvbc->config_addr;
60 data_reg = mvbc->config_vreg;
61
62 /* Accessing device 31 crashes those Marvells. Since years.
63 Will they ever make sane controllers ... */
64 if (PCI_SLOT(devfn) == 31)
65 return PCIBIOS_DEVICE_NOT_FOUND;
66
67 address = (bus->number << 16) | (devfn << 8) |
68 (where & 0xfc) | 0x80000000;
69
70 /* start the configuration cycle */
71 MV_WRITE(address_reg, address);
72
73 switch (size) {
74 case 1:
75 MV_WRITE_8(data_reg + (where & 0x3), val);
76 break;
77
78 case 2:
79 MV_WRITE_16(data_reg + (where & 0x3), val);
80 break;
81
82 case 4:
83 MV_WRITE(data_reg, val);
84 break;
85 }
86
87 return PCIBIOS_SUCCESSFUL;
88}
89
90struct pci_ops mv_pci_ops = {
91 .read = mv_read_config,
92 .write = mv_write_config
93};
diff --git a/arch/mips/pci/ops-nile4.c b/arch/mips/pci/ops-nile4.c
deleted file mode 100644
index a8d38dc8c504..000000000000
--- a/arch/mips/pci/ops-nile4.c
+++ /dev/null
@@ -1,147 +0,0 @@
1#include <linux/kernel.h>
2#include <linux/init.h>
3#include <linux/pci.h>
4#include <asm/bootinfo.h>
5
6#include <asm/lasat/lasat.h>
7#include <asm/gt64120.h>
8#include <asm/nile4.h>
9
10#define PCI_ACCESS_READ 0
11#define PCI_ACCESS_WRITE 1
12
13#define LO(reg) (reg / 4)
14#define HI(reg) (reg / 4 + 1)
15
16volatile unsigned long *const vrc_pciregs = (void *) Vrc5074_BASE;
17
18static DEFINE_SPINLOCK(nile4_pci_lock);
19
20static int nile4_pcibios_config_access(unsigned char access_type,
21 struct pci_bus *bus, unsigned int devfn, int where, u32 * val)
22{
23 unsigned char busnum = bus->number;
24 u32 adr, mask, err;
25
26 if ((busnum == 0) && (PCI_SLOT(devfn) > 8))
27 /* The addressing scheme chosen leaves room for just
28 * 8 devices on the first busnum (besides the PCI
29 * controller itself) */
30 return PCIBIOS_DEVICE_NOT_FOUND;
31
32 if ((busnum == 0) && (devfn == PCI_DEVFN(0, 0))) {
33 /* Access controller registers directly */
34 if (access_type == PCI_ACCESS_WRITE) {
35 vrc_pciregs[(0x200 + where) >> 2] = *val;
36 } else {
37 *val = vrc_pciregs[(0x200 + where) >> 2];
38 }
39 return PCIBIOS_SUCCESSFUL;
40 }
41
42 /* Temporarily map PCI Window 1 to config space */
43 mask = vrc_pciregs[LO(NILE4_PCIINIT1)];
44 vrc_pciregs[LO(NILE4_PCIINIT1)] = 0x0000001a | (busnum ? 0x200 : 0);
45
46 /* Clear PCI Error register. This also clears the Error Type
47 * bits in the Control register */
48 vrc_pciregs[LO(NILE4_PCIERR)] = 0;
49 vrc_pciregs[HI(NILE4_PCIERR)] = 0;
50
51 /* Setup address */
52 if (busnum == 0)
53 adr =
54 KSEG1ADDR(PCI_WINDOW1) +
55 ((1 << (PCI_SLOT(devfn) + 15)) | (PCI_FUNC(devfn) << 8)
56 | (where & ~3));
57 else
58 adr = KSEG1ADDR(PCI_WINDOW1) | (busnum << 16) | (devfn << 8) |
59 (where & ~3);
60
61 if (access_type == PCI_ACCESS_WRITE)
62 *(u32 *) adr = *val;
63 else
64 *val = *(u32 *) adr;
65
66 /* Check for master or target abort */
67 err = (vrc_pciregs[HI(NILE4_PCICTRL)] >> 5) & 0x7;
68
69 /* Restore PCI Window 1 */
70 vrc_pciregs[LO(NILE4_PCIINIT1)] = mask;
71
72 if (err)
73 return PCIBIOS_DEVICE_NOT_FOUND;
74
75 return PCIBIOS_SUCCESSFUL;
76}
77
78static int nile4_pcibios_read(struct pci_bus *bus, unsigned int devfn,
79 int where, int size, u32 * val)
80{
81 unsigned long flags;
82 u32 data = 0;
83 int err;
84
85 if ((size == 2) && (where & 1))
86 return PCIBIOS_BAD_REGISTER_NUMBER;
87 else if ((size == 4) && (where & 3))
88 return PCIBIOS_BAD_REGISTER_NUMBER;
89
90 spin_lock_irqsave(&nile4_pci_lock, flags);
91 err = nile4_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where,
92 &data);
93 spin_unlock_irqrestore(&nile4_pci_lock, flags);
94
95 if (err)
96 return err;
97
98 if (size == 1)
99 *val = (data >> ((where & 3) << 3)) & 0xff;
100 else if (size == 2)
101 *val = (data >> ((where & 3) << 3)) & 0xffff;
102 else
103 *val = data;
104
105 return PCIBIOS_SUCCESSFUL;
106}
107
108static int nile4_pcibios_write(struct pci_bus *bus, unsigned int devfn,
109 int where, int size, u32 val)
110{
111 unsigned long flags;
112 u32 data = 0;
113 int err;
114
115 if ((size == 2) && (where & 1))
116 return PCIBIOS_BAD_REGISTER_NUMBER;
117 else if ((size == 4) && (where & 3))
118 return PCIBIOS_BAD_REGISTER_NUMBER;
119
120 spin_lock_irqsave(&nile4_pci_lock, flags);
121 err = nile4_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where,
122 &data);
123 spin_unlock_irqrestore(&nile4_pci_lock, flags);
124
125 if (err)
126 return err;
127
128 if (size == 1)
129 data = (data & ~(0xff << ((where & 3) << 3))) |
130 (val << ((where & 3) << 3));
131 else if (size == 2)
132 data = (data & ~(0xffff << ((where & 3) << 3))) |
133 (val << ((where & 3) << 3));
134 else
135 data = val;
136
137 if (nile4_pcibios_config_access
138 (PCI_ACCESS_WRITE, bus, devfn, where, &data))
139 return -1;
140
141 return PCIBIOS_SUCCESSFUL;
142}
143
144struct pci_ops nile4_pci_ops = {
145 .read = nile4_pcibios_read,
146 .write = nile4_pcibios_write,
147};
diff --git a/arch/mips/pci/ops-pmcmsp.c b/arch/mips/pci/ops-pmcmsp.c
new file mode 100644
index 000000000000..09fa007c1d1b
--- /dev/null
+++ b/arch/mips/pci/ops-pmcmsp.c
@@ -0,0 +1,994 @@
1/*
2 * PMC-Sierra MSP board specific pci_ops
3 *
4 * Copyright 2001 MontaVista Software Inc.
5 * Copyright 2005-2007 PMC-Sierra, Inc
6 *
7 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
8 *
9 * Much of the code is derived from the original DDB5074 port by
10 * Geert Uytterhoeven <geert@sonycom.com>
11 *
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
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 *
17 */
18
19#define PCI_COUNTERS 1
20
21#include <linux/types.h>
22#include <linux/pci.h>
23#include <linux/interrupt.h>
24
25#if defined(CONFIG_PROC_FS) && defined(PCI_COUNTERS)
26#include <linux/proc_fs.h>
27#include <linux/seq_file.h>
28#endif /* CONFIG_PROC_FS && PCI_COUNTERS */
29
30#include <linux/kernel.h>
31#include <linux/init.h>
32
33#include <asm/byteorder.h>
34#if defined(CONFIG_PMC_MSP7120_GW) || defined(CONFIG_PMC_MSP7120_EVAL)
35#include <asm/mipsmtregs.h>
36#endif
37
38#include <msp_prom.h>
39#include <msp_cic_int.h>
40#include <msp_pci.h>
41#include <msp_regs.h>
42#include <msp_regops.h>
43
44#define PCI_ACCESS_READ 0
45#define PCI_ACCESS_WRITE 1
46
47#if defined(CONFIG_PROC_FS) && defined(PCI_COUNTERS)
48static char proc_init;
49extern struct proc_dir_entry *proc_bus_pci_dir;
50unsigned int pci_int_count[32];
51
52static void pci_proc_init(void);
53
54/*****************************************************************************
55 *
56 * FUNCTION: read_msp_pci_counts
57 * _________________________________________________________________________
58 *
59 * DESCRIPTION: Prints the count of how many times each PCI
60 * interrupt has asserted. Can be invoked by the
61 * /proc filesystem.
62 *
63 * INPUTS: page - part of STDOUT calculation
64 * off - part of STDOUT calculation
65 * count - part of STDOUT calculation
66 * data - unused
67 *
68 * OUTPUTS: start - new start location
69 * eof - end of file pointer
70 *
71 * RETURNS: len - STDOUT length
72 *
73 ****************************************************************************/
74static int read_msp_pci_counts(char *page, char **start, off_t off,
75 int count, int *eof, void *data)
76{
77 int i;
78 int len = 0;
79 unsigned int intcount, total = 0;
80
81 for (i = 0; i < 32; ++i) {
82 intcount = pci_int_count[i];
83 if (intcount != 0) {
84 len += sprintf(page + len, "[%d] = %u\n", i, intcount);
85 total += intcount;
86 }
87 }
88
89 len += sprintf(page + len, "total = %u\n", total);
90 if (len <= off+count)
91 *eof = 1;
92
93 *start = page + off;
94 len -= off;
95 if (len > count)
96 len = count;
97 if (len < 0)
98 len = 0;
99
100 return len;
101}
102
103/*****************************************************************************
104 *
105 * FUNCTION: gen_pci_cfg_wr
106 * _________________________________________________________________________
107 *
108 * DESCRIPTION: Generates a configuration write cycle for debug purposes.
109 * The IDSEL line asserted and location and data written are
110 * immaterial. Just want to be able to prove that a
111 * configuration write can be correctly generated on the
112 * PCI bus. Intent is that this function by invocable from
113 * the /proc filesystem.
114 *
115 * INPUTS: page - part of STDOUT calculation
116 * off - part of STDOUT calculation
117 * count - part of STDOUT calculation
118 * data - unused
119 *
120 * OUTPUTS: start - new start location
121 * eof - end of file pointer
122 *
123 * RETURNS: len - STDOUT length
124 *
125 ****************************************************************************/
126static int gen_pci_cfg_wr(char *page, char **start, off_t off,
127 int count, int *eof, void *data)
128{
129 unsigned char where = 0; /* Write to static Device/Vendor ID */
130 unsigned char bus_num = 0; /* Bus 0 */
131 unsigned char dev_fn = 0xF; /* Arbitrary device number */
132 u32 wr_data = 0xFF00AA00; /* Arbitrary data */
133 struct msp_pci_regs *preg = (void *)PCI_BASE_REG;
134 int len = 0;
135 unsigned long value;
136 int intr;
137
138 len += sprintf(page + len, "PMC MSP PCI: Beginning\n");
139
140 if (proc_init == 0) {
141 pci_proc_init();
142 proc_init = ~0;
143 }
144
145 len += sprintf(page + len, "PMC MSP PCI: Before Cfg Wr\n");
146
147 /*
148 * Generate PCI Configuration Write Cycle
149 */
150
151 /* Clear cause register bits */
152 preg->if_status = ~(BPCI_IFSTATUS_BC0F | BPCI_IFSTATUS_BC1F);
153
154 /* Setup address that is to appear on PCI bus */
155 preg->config_addr = BPCI_CFGADDR_ENABLE |
156 (bus_num << BPCI_CFGADDR_BUSNUM_SHF) |
157 (dev_fn << BPCI_CFGADDR_FUNCTNUM_SHF) |
158 (where & 0xFC);
159
160 value = cpu_to_le32(wr_data);
161
162 /* Launch the PCI configuration write cycle */
163 *PCI_CONFIG_SPACE_REG = value;
164
165 /*
166 * Check if the PCI configuration cycle (rd or wr) succeeded, by
167 * checking the status bits for errors like master or target abort.
168 */
169 intr = preg->if_status;
170
171 len += sprintf(page + len, "PMC MSP PCI: After Cfg Wr\n");
172
173 /* Handle STDOUT calculations */
174 if (len <= off+count)
175 *eof = 1;
176 *start = page + off;
177 len -= off;
178 if (len > count)
179 len = count;
180 if (len < 0)
181 len = 0;
182
183 return len;
184}
185
186/*****************************************************************************
187 *
188 * FUNCTION: pci_proc_init
189 * _________________________________________________________________________
190 *
191 * DESCRIPTION: Create entries in the /proc filesystem for debug access.
192 *
193 * INPUTS: none
194 *
195 * OUTPUTS: none
196 *
197 * RETURNS: none
198 *
199 ****************************************************************************/
200static void pci_proc_init(void)
201{
202 create_proc_read_entry("pmc_msp_pci_rd_cnt", 0, NULL,
203 read_msp_pci_counts, NULL);
204 create_proc_read_entry("pmc_msp_pci_cfg_wr", 0, NULL,
205 gen_pci_cfg_wr, NULL);
206}
207#endif /* CONFIG_PROC_FS && PCI_COUNTERS */
208
209spinlock_t bpci_lock = SPIN_LOCK_UNLOCKED;
210
211/*****************************************************************************
212 *
213 * STRUCT: pci_io_resource
214 * _________________________________________________________________________
215 *
216 * DESCRIPTION: Defines the address range that pciauto() will use to
217 * assign to the I/O BARs of PCI devices.
218 *
219 * Use the start and end addresses of the MSP7120 PCI Host
220 * Controller I/O space, in the form that they appear on the
221 * PCI bus AFTER MSP7120 has performed address translation.
222 *
223 * For I/O accesses, MSP7120 ignores OATRAN and maps I/O
224 * accesses into the bottom 0xFFF region of address space,
225 * so that is the range to put into the pci_io_resource
226 * struct.
227 *
228 * In MSP4200, the start address was 0x04 instead of the
229 * expected 0x00. Will just assume there was a good reason
230 * for this!
231 *
232 * NOTES: Linux, by default, will assign I/O space to the lowest
233 * region of address space. Since MSP7120 and Linux,
234 * by default, have no offset in between how they map, the
235 * io_offset element of pci_controller struct should be set
236 * to zero.
237 * ELEMENTS:
238 * name - String used for a meaningful name.
239 *
240 * start - Start address of MSP7120's I/O space, as MSP7120 presents
241 * the address on the PCI bus.
242 *
243 * end - End address of MSP7120's I/O space, as MSP7120 presents
244 * the address on the PCI bus.
245 *
246 * flags - Attributes indicating the type of resource. In this case,
247 * indicate I/O space.
248 *
249 ****************************************************************************/
250static struct resource pci_io_resource = {
251 .name = "pci IO space",
252 .start = 0x04,
253 .end = 0x0FFF,
254 .flags = IORESOURCE_IO /* I/O space */
255};
256
257/*****************************************************************************
258 *
259 * STRUCT: pci_mem_resource
260 * _________________________________________________________________________
261 *
262 * DESCRIPTION: Defines the address range that pciauto() will use to
263 * assign to the memory BARs of PCI devices.
264 *
265 * The .start and .end values are dependent upon how address
266 * translation is performed by the OATRAN regiser.
267 *
268 * The values to use for .start and .end are the values
269 * in the form they appear on the PCI bus AFTER MSP7120 has
270 * performed OATRAN address translation.
271 *
272 * ELEMENTS:
273 * name - String used for a meaningful name.
274 *
275 * start - Start address of MSP7120's memory space, as MSP7120 presents
276 * the address on the PCI bus.
277 *
278 * end - End address of MSP7120's memory space, as MSP7120 presents
279 * the address on the PCI bus.
280 *
281 * flags - Attributes indicating the type of resource. In this case,
282 * indicate memory space.
283 *
284 ****************************************************************************/
285static struct resource pci_mem_resource = {
286 .name = "pci memory space",
287 .start = MSP_PCI_SPACE_BASE,
288 .end = MSP_PCI_SPACE_END,
289 .flags = IORESOURCE_MEM /* memory space */
290};
291
292/*****************************************************************************
293 *
294 * FUNCTION: bpci_interrupt
295 * _________________________________________________________________________
296 *
297 * DESCRIPTION: PCI status interrupt handler. Updates the count of how
298 * many times each status bit has been set, then clears
299 * the status bits. If the appropriate macros are defined,
300 * these counts can be viewed via the /proc filesystem.
301 *
302 * INPUTS: irq - unused
303 * dev_id - unused
304 * pt_regs - unused
305 *
306 * OUTPUTS: none
307 *
308 * RETURNS: PCIBIOS_SUCCESSFUL - success
309 *
310 ****************************************************************************/
311static int bpci_interrupt(int irq, void *dev_id)
312{
313 struct msp_pci_regs *preg = (void *)PCI_BASE_REG;
314 unsigned int stat = preg->if_status;
315
316#if defined(CONFIG_PROC_FS) && defined(PCI_COUNTERS)
317 int i;
318 for (i = 0; i < 32; ++i) {
319 if ((1 << i) & stat)
320 ++pci_int_count[i];
321 }
322#endif /* PROC_FS && PCI_COUNTERS */
323
324 /* printk("PCI ISR: Status=%08X\n", stat); */
325
326 /* write to clear all asserted interrupts */
327 preg->if_status = stat;
328
329 return PCIBIOS_SUCCESSFUL;
330}
331
332/*****************************************************************************
333 *
334 * FUNCTION: msp_pcibios_config_access
335 * _________________________________________________________________________
336 *
337 * DESCRIPTION: Performs a PCI configuration access (rd or wr), then
338 * checks that the access succeeded by querying MSP7120's
339 * PCI status bits.
340 *
341 * INPUTS:
342 * access_type - kind of PCI configuration cycle to perform
343 * (read or write). Legal values are
344 * PCI_ACCESS_WRITE and PCI_ACCESS_READ.
345 *
346 * bus - pointer to the bus number of the device to
347 * be targetted for the configuration cycle.
348 * The only element of the pci_bus structure
349 * used is bus->number. This argument determines
350 * if the configuration access will be Type 0 or
351 * Type 1. Since MSP7120 assumes itself to be the
352 * PCI Host, any non-zero bus->number generates
353 * a Type 1 access.
354 *
355 * devfn - this is an 8-bit field. The lower three bits
356 * specify the function number of the device to
357 * be targetted for the configuration cycle, with
358 * all three-bit combinations being legal. The
359 * upper five bits specify the device number,
360 * with legal values being 10 to 31.
361 *
362 * where - address within the Configuration Header
363 * space to access.
364 *
365 * data - for write accesses, contains the data to
366 * write.
367 *
368 * OUTPUTS:
369 * data - for read accesses, contains the value read.
370 *
371 * RETURNS: PCIBIOS_SUCCESSFUL - success
372 * -1 - access failure
373 *
374 ****************************************************************************/
375int msp_pcibios_config_access(unsigned char access_type,
376 struct pci_bus *bus,
377 unsigned int devfn,
378 unsigned char where,
379 u32 *data)
380{
381 struct msp_pci_regs *preg = (void *)PCI_BASE_REG;
382 unsigned char bus_num = bus->number;
383 unsigned char dev_fn = (unsigned char)devfn;
384 unsigned long flags;
385 unsigned long intr;
386 unsigned long value;
387 static char pciirqflag;
388#if defined(CONFIG_PMC_MSP7120_GW) || defined(CONFIG_PMC_MSP7120_EVAL)
389 unsigned int vpe_status;
390#endif
391
392#if defined(CONFIG_PROC_FS) && defined(PCI_COUNTERS)
393 if (proc_init == 0) {
394 pci_proc_init();
395 proc_init = ~0;
396 }
397#endif /* CONFIG_PROC_FS && PCI_COUNTERS */
398
399 /*
400 * Just the first time this function invokes, allocate
401 * an interrupt line for PCI host status interrupts. The
402 * allocation assigns an interrupt handler to the interrupt.
403 */
404 if (pciirqflag == 0) {
405 request_irq(MSP_INT_PCI,/* Hardcoded internal MSP7120 wiring */
406 bpci_interrupt,
407 SA_SHIRQ | SA_INTERRUPT,
408 "PMC MSP PCI Host",
409 preg);
410 pciirqflag = ~0;
411 }
412
413#if defined(CONFIG_PMC_MSP7120_GW) || defined(CONFIG_PMC_MSP7120_EVAL)
414 local_irq_save(flags);
415 vpe_status = dvpe();
416#else
417 spin_lock_irqsave(&bpci_lock, flags);
418#endif
419
420 /*
421 * Clear PCI cause register bits.
422 *
423 * In Polo, the PCI Host had a dedicated DMA called the
424 * Block Copy (not to be confused with the general purpose Block
425 * Copy Engine block). There appear to have been special interrupts
426 * for this Block Copy, called Block Copy 0 Fault (BC0F) and
427 * Block Copy 1 Fault (BC1F). MSP4200 and MSP7120 don't have this
428 * dedicated Block Copy block, so these two interrupts are now
429 * marked reserved. In case the Block Copy is resurrected in a
430 * future design, maintain the code that treats these two interrupts
431 * specially.
432 *
433 * Write to clear all interrupts in the PCI status register, aside
434 * from BC0F and BC1F.
435 */
436 preg->if_status = ~(BPCI_IFSTATUS_BC0F | BPCI_IFSTATUS_BC1F);
437
438 /* Setup address that is to appear on PCI bus */
439 preg->config_addr = BPCI_CFGADDR_ENABLE |
440 (bus_num << BPCI_CFGADDR_BUSNUM_SHF) |
441 (dev_fn << BPCI_CFGADDR_FUNCTNUM_SHF) |
442 (where & 0xFC);
443
444 /* IF access is a PCI configuration write */
445 if (access_type == PCI_ACCESS_WRITE) {
446 value = cpu_to_le32(*data);
447 *PCI_CONFIG_SPACE_REG = value;
448 } else {
449 /* ELSE access is a PCI configuration read */
450 value = le32_to_cpu(*PCI_CONFIG_SPACE_REG);
451 *data = value;
452 }
453
454 /*
455 * Check if the PCI configuration cycle (rd or wr) succeeded, by
456 * checking the status bits for errors like master or target abort.
457 */
458 intr = preg->if_status;
459
460 /* Clear config access */
461 preg->config_addr = 0;
462
463 /* IF error occurred */
464 if (intr & ~(BPCI_IFSTATUS_BC0F | BPCI_IFSTATUS_BC1F)) {
465 /* Clear status bits */
466 preg->if_status = ~(BPCI_IFSTATUS_BC0F | BPCI_IFSTATUS_BC1F);
467
468#if defined(CONFIG_PMC_MSP7120_GW) || defined(CONFIG_PMC_MSP7120_EVAL)
469 evpe(vpe_status);
470 local_irq_restore(flags);
471#else
472 spin_unlock_irqrestore(&bpci_lock, flags);
473#endif
474
475 return -1;
476 }
477
478#if defined(CONFIG_PMC_MSP7120_GW) || defined(CONFIG_PMC_MSP7120_EVAL)
479 evpe(vpe_status);
480 local_irq_restore(flags);
481#else
482 spin_unlock_irqrestore(&bpci_lock, flags);
483#endif
484
485 return PCIBIOS_SUCCESSFUL;
486}
487
488/*****************************************************************************
489 *
490 * FUNCTION: msp_pcibios_read_config_byte
491 * _________________________________________________________________________
492 *
493 * DESCRIPTION: Read a byte from PCI configuration address spac
494 * Since the hardware can't address 8 bit chunks
495 * directly, read a 32-bit chunk, then mask off extraneous
496 * bits.
497 *
498 * INPUTS bus - structure containing attributes for the PCI bus
499 * that the read is destined for.
500 * devfn - device/function combination that the read is
501 * destined for.
502 * where - register within the Configuration Header space
503 * to access.
504 *
505 * OUTPUTS val - read data
506 *
507 * RETURNS: PCIBIOS_SUCCESSFUL - success
508 * -1 - read access failure
509 *
510 ****************************************************************************/
511static int
512msp_pcibios_read_config_byte(struct pci_bus *bus,
513 unsigned int devfn,
514 int where,
515 u32 *val)
516{
517 u32 data = 0;
518
519 /*
520 * If the config access did not complete normally (e.g., underwent
521 * master abort) do the PCI compliant thing, which is to supply an
522 * all ones value.
523 */
524 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn,
525 where, &data)) {
526 *val = 0xFFFFFFFF;
527 return -1;
528 }
529
530 *val = (data >> ((where & 3) << 3)) & 0x0ff;
531
532 return PCIBIOS_SUCCESSFUL;
533}
534
535/*****************************************************************************
536 *
537 * FUNCTION: msp_pcibios_read_config_word
538 * _________________________________________________________________________
539 *
540 * DESCRIPTION: Read a word (16 bits) from PCI configuration address space.
541 * Since the hardware can't address 16 bit chunks
542 * directly, read a 32-bit chunk, then mask off extraneous
543 * bits.
544 *
545 * INPUTS bus - structure containing attributes for the PCI bus
546 * that the read is destined for.
547 * devfn - device/function combination that the read is
548 * destined for.
549 * where - register within the Configuration Header space
550 * to access.
551 *
552 * OUTPUTS val - read data
553 *
554 * RETURNS: PCIBIOS_SUCCESSFUL - success
555 * PCIBIOS_BAD_REGISTER_NUMBER - bad register address
556 * -1 - read access failure
557 *
558 ****************************************************************************/
559static int
560msp_pcibios_read_config_word(struct pci_bus *bus,
561 unsigned int devfn,
562 int where,
563 u32 *val)
564{
565 u32 data = 0;
566
567 /* if (where & 1) */ /* Commented out non-compliant code.
568 * Should allow word access to configuration
569 * registers, with only exception being when
570 * the word access would wrap around into
571 * the next dword.
572 */
573 if ((where & 3) == 3) {
574 *val = 0xFFFFFFFF;
575 return PCIBIOS_BAD_REGISTER_NUMBER;
576 }
577
578 /*
579 * If the config access did not complete normally (e.g., underwent
580 * master abort) do the PCI compliant thing, which is to supply an
581 * all ones value.
582 */
583 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn,
584 where, &data)) {
585 *val = 0xFFFFFFFF;
586 return -1;
587 }
588
589 *val = (data >> ((where & 3) << 3)) & 0x0ffff;
590
591 return PCIBIOS_SUCCESSFUL;
592}
593
594/*****************************************************************************
595 *
596 * FUNCTION: msp_pcibios_read_config_dword
597 * _________________________________________________________________________
598 *
599 * DESCRIPTION: Read a double word (32 bits) from PCI configuration
600 * address space.
601 *
602 * INPUTS bus - structure containing attributes for the PCI bus
603 * that the read is destined for.
604 * devfn - device/function combination that the read is
605 * destined for.
606 * where - register within the Configuration Header space
607 * to access.
608 *
609 * OUTPUTS val - read data
610 *
611 * RETURNS: PCIBIOS_SUCCESSFUL - success
612 * PCIBIOS_BAD_REGISTER_NUMBER - bad register address
613 * -1 - read access failure
614 *
615 ****************************************************************************/
616static int
617msp_pcibios_read_config_dword(struct pci_bus *bus,
618 unsigned int devfn,
619 int where,
620 u32 *val)
621{
622 u32 data = 0;
623
624 /* Address must be dword aligned. */
625 if (where & 3) {
626 *val = 0xFFFFFFFF;
627 return PCIBIOS_BAD_REGISTER_NUMBER;
628 }
629
630 /*
631 * If the config access did not complete normally (e.g., underwent
632 * master abort) do the PCI compliant thing, which is to supply an
633 * all ones value.
634 */
635 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn,
636 where, &data)) {
637 *val = 0xFFFFFFFF;
638 return -1;
639 }
640
641 *val = data;
642
643 return PCIBIOS_SUCCESSFUL;
644}
645
646/*****************************************************************************
647 *
648 * FUNCTION: msp_pcibios_write_config_byte
649 * _________________________________________________________________________
650 *
651 * DESCRIPTION: Write a byte to PCI configuration address space.
652 * Since the hardware can't address 8 bit chunks
653 * directly, a read-modify-write is performed.
654 *
655 * INPUTS bus - structure containing attributes for the PCI bus
656 * that the write is destined for.
657 * devfn - device/function combination that the write is
658 * destined for.
659 * where - register within the Configuration Header space
660 * to access.
661 * val - value to write
662 *
663 * OUTPUTS none
664 *
665 * RETURNS: PCIBIOS_SUCCESSFUL - success
666 * -1 - write access failure
667 *
668 ****************************************************************************/
669static int
670msp_pcibios_write_config_byte(struct pci_bus *bus,
671 unsigned int devfn,
672 int where,
673 u8 val)
674{
675 u32 data = 0;
676
677 /* read config space */
678 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn,
679 where, &data))
680 return -1;
681
682 /* modify the byte within the dword */
683 data = (data & ~(0xff << ((where & 3) << 3))) |
684 (val << ((where & 3) << 3));
685
686 /* write back the full dword */
687 if (msp_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn,
688 where, &data))
689 return -1;
690
691 return PCIBIOS_SUCCESSFUL;
692}
693
694/*****************************************************************************
695 *
696 * FUNCTION: msp_pcibios_write_config_word
697 * _________________________________________________________________________
698 *
699 * DESCRIPTION: Write a word (16-bits) to PCI configuration address space.
700 * Since the hardware can't address 16 bit chunks
701 * directly, a read-modify-write is performed.
702 *
703 * INPUTS bus - structure containing attributes for the PCI bus
704 * that the write is destined for.
705 * devfn - device/function combination that the write is
706 * destined for.
707 * where - register within the Configuration Header space
708 * to access.
709 * val - value to write
710 *
711 * OUTPUTS none
712 *
713 * RETURNS: PCIBIOS_SUCCESSFUL - success
714 * PCIBIOS_BAD_REGISTER_NUMBER - bad register address
715 * -1 - write access failure
716 *
717 ****************************************************************************/
718static int
719msp_pcibios_write_config_word(struct pci_bus *bus,
720 unsigned int devfn,
721 int where,
722 u16 val)
723{
724 u32 data = 0;
725
726 /* Fixed non-compliance: if (where & 1) */
727 if ((where & 3) == 3)
728 return PCIBIOS_BAD_REGISTER_NUMBER;
729
730 /* read config space */
731 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn,
732 where, &data))
733 return -1;
734
735 /* modify the word within the dword */
736 data = (data & ~(0xffff << ((where & 3) << 3))) |
737 (val << ((where & 3) << 3));
738
739 /* write back the full dword */
740 if (msp_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn,
741 where, &data))
742 return -1;
743
744 return PCIBIOS_SUCCESSFUL;
745}
746
747/*****************************************************************************
748 *
749 * FUNCTION: msp_pcibios_write_config_dword
750 * _________________________________________________________________________
751 *
752 * DESCRIPTION: Write a double word (32-bits) to PCI configuration address
753 * space.
754 *
755 * INPUTS bus - structure containing attributes for the PCI bus
756 * that the write is destined for.
757 * devfn - device/function combination that the write is
758 * destined for.
759 * where - register within the Configuration Header space
760 * to access.
761 * val - value to write
762 *
763 * OUTPUTS none
764 *
765 * RETURNS: PCIBIOS_SUCCESSFUL - success
766 * PCIBIOS_BAD_REGISTER_NUMBER - bad register address
767 * -1 - write access failure
768 *
769 ****************************************************************************/
770static int
771msp_pcibios_write_config_dword(struct pci_bus *bus,
772 unsigned int devfn,
773 int where,
774 u32 val)
775{
776 /* check that address is dword aligned */
777 if (where & 3)
778 return PCIBIOS_BAD_REGISTER_NUMBER;
779
780 /* perform write */
781 if (msp_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn,
782 where, &val))
783 return -1;
784
785 return PCIBIOS_SUCCESSFUL;
786}
787
788/*****************************************************************************
789 *
790 * FUNCTION: msp_pcibios_read_config
791 * _________________________________________________________________________
792 *
793 * DESCRIPTION: Interface the PCI configuration read request with
794 * the appropriate function, based on how many bytes
795 * the read request is.
796 *
797 * INPUTS bus - structure containing attributes for the PCI bus
798 * that the write is destined for.
799 * devfn - device/function combination that the write is
800 * destined for.
801 * where - register within the Configuration Header space
802 * to access.
803 * size - in units of bytes, should be 1, 2, or 4.
804 *
805 * OUTPUTS val - value read, with any extraneous bytes masked
806 * to zero.
807 *
808 * RETURNS: PCIBIOS_SUCCESSFUL - success
809 * -1 - failure
810 *
811 ****************************************************************************/
812int
813msp_pcibios_read_config(struct pci_bus *bus,
814 unsigned int devfn,
815 int where,
816 int size,
817 u32 *val)
818{
819 if (size == 1) {
820 if (msp_pcibios_read_config_byte(bus, devfn, where, val)) {
821 return -1;
822 }
823 } else if (size == 2) {
824 if (msp_pcibios_read_config_word(bus, devfn, where, val)) {
825 return -1;
826 }
827 } else if (size == 4) {
828 if (msp_pcibios_read_config_dword(bus, devfn, where, val)) {
829 return -1;
830 }
831 } else {
832 *val = 0xFFFFFFFF;
833 return -1;
834 }
835
836 return PCIBIOS_SUCCESSFUL;
837}
838
839/*****************************************************************************
840 *
841 * FUNCTION: msp_pcibios_write_config
842 * _________________________________________________________________________
843 *
844 * DESCRIPTION: Interface the PCI configuration write request with
845 * the appropriate function, based on how many bytes
846 * the read request is.
847 *
848 * INPUTS bus - structure containing attributes for the PCI bus
849 * that the write is destined for.
850 * devfn - device/function combination that the write is
851 * destined for.
852 * where - register within the Configuration Header space
853 * to access.
854 * size - in units of bytes, should be 1, 2, or 4.
855 * val - value to write
856 *
857 * OUTPUTS: none
858 *
859 * RETURNS: PCIBIOS_SUCCESSFUL - success
860 * -1 - failure
861 *
862 ****************************************************************************/
863int
864msp_pcibios_write_config(struct pci_bus *bus,
865 unsigned int devfn,
866 int where,
867 int size,
868 u32 val)
869{
870 if (size == 1) {
871 if (msp_pcibios_write_config_byte(bus, devfn,
872 where, (u8)(0xFF & val))) {
873 return -1;
874 }
875 } else if (size == 2) {
876 if (msp_pcibios_write_config_word(bus, devfn,
877 where, (u16)(0xFFFF & val))) {
878 return -1;
879 }
880 } else if (size == 4) {
881 if (msp_pcibios_write_config_dword(bus, devfn, where, val)) {
882 return -1;
883 }
884 } else {
885 return -1;
886 }
887
888 return PCIBIOS_SUCCESSFUL;
889}
890
891/*****************************************************************************
892 *
893 * STRUCTURE: msp_pci_ops
894 * _________________________________________________________________________
895 *
896 * DESCRIPTION: structure to abstract the hardware specific PCI
897 * configuration accesses.
898 *
899 * ELEMENTS:
900 * read - function for Linux to generate PCI Configuration reads.
901 * write - function for Linux to generate PCI Configuration writes.
902 *
903 ****************************************************************************/
904struct pci_ops msp_pci_ops = {
905 .read = msp_pcibios_read_config,
906 .write = msp_pcibios_write_config
907};
908
909/*****************************************************************************
910 *
911 * STRUCTURE: msp_pci_controller
912 * _________________________________________________________________________
913 *
914 * Describes the attributes of the MSP7120 PCI Host Controller
915 *
916 * ELEMENTS:
917 * pci_ops - abstracts the hardware specific PCI configuration
918 * accesses.
919 *
920 * mem_resource - address range pciauto() uses to assign to PCI device
921 * memory BARs.
922 *
923 * mem_offset - offset between how MSP7120 outbound PCI memory
924 * transaction addresses appear on the PCI bus and how Linux
925 * wants to configure memory BARs of the PCI devices.
926 * MSP7120 does nothing funky, so just set to zero.
927 *
928 * io_resource - address range pciauto() uses to assign to PCI device
929 * I/O BARs.
930 *
931 * io_offset - offset between how MSP7120 outbound PCI I/O
932 * transaction addresses appear on the PCI bus and how
933 * Linux defaults to configure I/O BARs of the PCI devices.
934 * MSP7120 maps outbound I/O accesses into the bottom
935 * bottom 4K of PCI address space (and ignores OATRAN).
936 * Since the Linux default is to configure I/O BARs to the
937 * bottom 4K, no special offset is needed. Just set to zero.
938 *
939 ****************************************************************************/
940static struct pci_controller msp_pci_controller = {
941 .pci_ops = &msp_pci_ops,
942 .mem_resource = &pci_mem_resource,
943 .mem_offset = 0,
944 .io_resource = &pci_io_resource,
945 .io_offset = 0
946};
947
948/*****************************************************************************
949 *
950 * FUNCTION: msp_pci_init
951 * _________________________________________________________________________
952 *
953 * DESCRIPTION: Initialize the PCI Host Controller and register it with
954 * Linux so Linux can seize control of the PCI bus.
955 *
956 ****************************************************************************/
957void __init msp_pci_init(void)
958{
959 struct msp_pci_regs *preg = (void *)PCI_BASE_REG;
960 u32 id;
961
962 /* Extract Device ID */
963 id = read_reg32(PCI_JTAG_DEVID_REG, 0xFFFF) >> 12;
964
965 /* Check if JTAG ID identifies MSP7120 */
966 if (!MSP_HAS_PCI(id)) {
967 printk(KERN_WARNING "PCI: No PCI; id reads as %x\n", id);
968 goto no_pci;
969 }
970
971 /*
972 * Enable flushing of the PCI-SDRAM queue upon a read
973 * of the SDRAM's Memory Configuration Register.
974 */
975 *(unsigned long *)QFLUSH_REG_1 = 3;
976
977 /* Configure PCI Host Controller. */
978 preg->if_status = ~0; /* Clear cause register bits */
979 preg->config_addr = 0; /* Clear config access */
980 preg->oatran = MSP_PCI_OATRAN; /* PCI outbound addr translation */
981 preg->if_mask = 0xF8BF87C0; /* Enable all PCI status interrupts */
982
983 /* configure so inb(), outb(), and family are functional */
984 set_io_port_base(MSP_PCI_IOSPACE_BASE);
985
986 /* Tell Linux the details of the MSP7120 PCI Host Controller */
987 register_pci_controller(&msp_pci_controller);
988
989 return;
990
991no_pci:
992 /* Disable PCI channel */
993 printk(KERN_WARNING "PCI: no host PCI bus detected\n");
994}
diff --git a/arch/mips/pci/ops-tx4938.c b/arch/mips/pci/ops-tx4938.c
index 445007084515..a450c4062031 100644
--- a/arch/mips/pci/ops-tx4938.c
+++ b/arch/mips/pci/ops-tx4938.c
@@ -46,50 +46,63 @@ struct resource tx4938_pcic1_pci_mem_resource = {
46 .flags = IORESOURCE_MEM 46 .flags = IORESOURCE_MEM
47}; 47};
48 48
49static int mkaddr(int bus, int dev_fn, int where, int *flagsp) 49static int mkaddr(int bus, int dev_fn, int where,
50 struct tx4938_pcic_reg *pcicptr)
50{ 51{
51 if (bus > 0) { 52 if (bus > 0) {
52 /* Type 1 configuration */ 53 /* Type 1 configuration */
53 tx4938_pcicptr->g2pcfgadrs = ((bus & 0xff) << 0x10) | 54 pcicptr->g2pcfgadrs = ((bus & 0xff) << 0x10) |
54 ((dev_fn & 0xff) << 0x08) | (where & 0xfc) | 1; 55 ((dev_fn & 0xff) << 0x08) | (where & 0xfc) | 1;
55 } else { 56 } else {
56 if (dev_fn >= PCI_DEVFN(TX4938_PCIC_MAX_DEVNU, 0)) 57 if (dev_fn >= PCI_DEVFN(TX4938_PCIC_MAX_DEVNU, 0))
57 return -1; 58 return -1;
58 59
59 /* Type 0 configuration */ 60 /* Type 0 configuration */
60 tx4938_pcicptr->g2pcfgadrs = ((bus & 0xff) << 0x10) | 61 pcicptr->g2pcfgadrs = ((bus & 0xff) << 0x10) |
61 ((dev_fn & 0xff) << 0x08) | (where & 0xfc); 62 ((dev_fn & 0xff) << 0x08) | (where & 0xfc);
62 } 63 }
63 /* clear M_ABORT and Disable M_ABORT Int. */ 64 /* clear M_ABORT and Disable M_ABORT Int. */
64 tx4938_pcicptr->pcistatus = 65 pcicptr->pcistatus =
65 (tx4938_pcicptr->pcistatus & 0x0000ffff) | 66 (pcicptr->pcistatus & 0x0000ffff) |
66 (PCI_STATUS_REC_MASTER_ABORT << 16); 67 (PCI_STATUS_REC_MASTER_ABORT << 16);
67 tx4938_pcicptr->pcimask &= ~PCI_STATUS_REC_MASTER_ABORT; 68 pcicptr->pcimask &= ~PCI_STATUS_REC_MASTER_ABORT;
68 69
69 return 0; 70 return 0;
70} 71}
71 72
72static int check_abort(int flags) 73static int check_abort(struct tx4938_pcic_reg *pcicptr)
73{ 74{
74 int code = PCIBIOS_SUCCESSFUL; 75 int code = PCIBIOS_SUCCESSFUL;
75 /* wait write cycle completion before checking error status */ 76 /* wait write cycle completion before checking error status */
76 while (tx4938_pcicptr->pcicstatus & TX4938_PCIC_PCICSTATUS_IWB) 77 while (pcicptr->pcicstatus & TX4938_PCIC_PCICSTATUS_IWB)
77 ; 78 ;
78 if (tx4938_pcicptr->pcistatus & (PCI_STATUS_REC_MASTER_ABORT << 16)) { 79 if (pcicptr->pcistatus & (PCI_STATUS_REC_MASTER_ABORT << 16)) {
79 tx4938_pcicptr->pcistatus = 80 pcicptr->pcistatus =
80 (tx4938_pcicptr-> 81 (pcicptr->
81 pcistatus & 0x0000ffff) | (PCI_STATUS_REC_MASTER_ABORT 82 pcistatus & 0x0000ffff) | (PCI_STATUS_REC_MASTER_ABORT
82 << 16); 83 << 16);
83 tx4938_pcicptr->pcimask |= PCI_STATUS_REC_MASTER_ABORT; 84 pcicptr->pcimask |= PCI_STATUS_REC_MASTER_ABORT;
84 code = PCIBIOS_DEVICE_NOT_FOUND; 85 code = PCIBIOS_DEVICE_NOT_FOUND;
85 } 86 }
86 return code; 87 return code;
87} 88}
88 89
90extern struct pci_controller tx4938_pci_controller[];
91extern struct tx4938_pcic_reg *get_tx4938_pcicptr(int ch);
92
93static struct tx4938_pcic_reg *pci_bus_to_pcicptr(struct pci_bus *bus)
94{
95 struct pci_controller *channel = bus->sysdata;
96 return get_tx4938_pcicptr(channel - &tx4938_pci_controller[0]);
97}
98
89static int tx4938_pcibios_read_config(struct pci_bus *bus, unsigned int devfn, 99static int tx4938_pcibios_read_config(struct pci_bus *bus, unsigned int devfn,
90 int where, int size, u32 * val) 100 int where, int size, u32 * val)
91{ 101{
92 int flags, retval, dev, busno, func; 102 int retval, dev, busno, func;
103 struct tx4938_pcic_reg *pcicptr = pci_bus_to_pcicptr(bus);
104 void __iomem *cfgdata =
105 (void __iomem *)(unsigned long)&pcicptr->g2pcfgdata;
93 106
94 dev = PCI_SLOT(devfn); 107 dev = PCI_SLOT(devfn);
95 func = PCI_FUNC(devfn); 108 func = PCI_FUNC(devfn);
@@ -101,32 +114,32 @@ static int tx4938_pcibios_read_config(struct pci_bus *bus, unsigned int devfn,
101 busno = 0; 114 busno = 0;
102 } 115 }
103 116
104 if (mkaddr(busno, devfn, where, &flags)) 117 if (mkaddr(busno, devfn, where, pcicptr))
105 return -1; 118 return -1;
106 119
107 switch (size) { 120 switch (size) {
108 case 1: 121 case 1:
109 *val = *(volatile u8 *) ((unsigned long) & tx4938_pcicptr->g2pcfgdata |
110#ifdef __BIG_ENDIAN 122#ifdef __BIG_ENDIAN
111 ((where & 3) ^ 3)); 123 cfgdata += (where & 3) ^ 3;
112#else 124#else
113 (where & 3)); 125 cfgdata += where & 3;
114#endif 126#endif
127 *val = __raw_readb(cfgdata);
115 break; 128 break;
116 case 2: 129 case 2:
117 *val = *(volatile u16 *) ((unsigned long) & tx4938_pcicptr->g2pcfgdata |
118#ifdef __BIG_ENDIAN 130#ifdef __BIG_ENDIAN
119 ((where & 3) ^ 2)); 131 cfgdata += (where & 2) ^ 2;
120#else 132#else
121 (where & 3)); 133 cfgdata += where & 2;
122#endif 134#endif
135 *val = __raw_readw(cfgdata);
123 break; 136 break;
124 case 4: 137 case 4:
125 *val = tx4938_pcicptr->g2pcfgdata; 138 *val = __raw_readl(cfgdata);
126 break; 139 break;
127 } 140 }
128 141
129 retval = check_abort(flags); 142 retval = check_abort(pcicptr);
130 if (retval == PCIBIOS_DEVICE_NOT_FOUND) 143 if (retval == PCIBIOS_DEVICE_NOT_FOUND)
131 *val = 0xffffffff; 144 *val = 0xffffffff;
132 145
@@ -136,7 +149,10 @@ static int tx4938_pcibios_read_config(struct pci_bus *bus, unsigned int devfn,
136static int tx4938_pcibios_write_config(struct pci_bus *bus, unsigned int devfn, int where, 149static int tx4938_pcibios_write_config(struct pci_bus *bus, unsigned int devfn, int where,
137 int size, u32 val) 150 int size, u32 val)
138{ 151{
139 int flags, dev, busno, func; 152 int dev, busno, func;
153 struct tx4938_pcic_reg *pcicptr = pci_bus_to_pcicptr(bus);
154 void __iomem *cfgdata =
155 (void __iomem *)(unsigned long)&pcicptr->g2pcfgdata;
140 156
141 busno = bus->number; 157 busno = bus->number;
142 dev = PCI_SLOT(devfn); 158 dev = PCI_SLOT(devfn);
@@ -149,32 +165,32 @@ static int tx4938_pcibios_write_config(struct pci_bus *bus, unsigned int devfn,
149 busno = 0; 165 busno = 0;
150 } 166 }
151 167
152 if (mkaddr(busno, devfn, where, &flags)) 168 if (mkaddr(busno, devfn, where, pcicptr))
153 return -1; 169 return -1;
154 170
155 switch (size) { 171 switch (size) {
156 case 1: 172 case 1:
157 *(volatile u8 *) ((unsigned long) & tx4938_pcicptr->g2pcfgdata |
158#ifdef __BIG_ENDIAN 173#ifdef __BIG_ENDIAN
159 ((where & 3) ^ 3)) = val; 174 cfgdata += (where & 3) ^ 3;
160#else 175#else
161 (where & 3)) = val; 176 cfgdata += where & 3;
162#endif 177#endif
178 __raw_writeb(val, cfgdata);
163 break; 179 break;
164 case 2: 180 case 2:
165 *(volatile u16 *) ((unsigned long) & tx4938_pcicptr->g2pcfgdata |
166#ifdef __BIG_ENDIAN 181#ifdef __BIG_ENDIAN
167 ((where & 0x3) ^ 0x2)) = val; 182 cfgdata += (where & 2) ^ 2;
168#else 183#else
169 (where & 3)) = val; 184 cfgdata += where & 2;
170#endif 185#endif
186 __raw_writew(val, cfgdata);
171 break; 187 break;
172 case 4: 188 case 4:
173 tx4938_pcicptr->g2pcfgdata = val; 189 __raw_writel(val, cfgdata);
174 break; 190 break;
175 } 191 }
176 192
177 return check_abort(flags); 193 return check_abort(pcicptr);
178} 194}
179 195
180struct pci_ops tx4938_pci_ops = { 196struct pci_ops tx4938_pci_ops = {
diff --git a/arch/mips/pci/pci-bcm1480.c b/arch/mips/pci/pci-bcm1480.c
index d7b9e1349f6d..2b4e30c7d105 100644
--- a/arch/mips/pci/pci-bcm1480.c
+++ b/arch/mips/pci/pci-bcm1480.c
@@ -74,8 +74,9 @@ static inline void WRITECFG32(u32 addr, u32 data)
74 *(u32 *)(cfg_space + (addr & ~3)) = data; 74 *(u32 *)(cfg_space + (addr & ~3)) = data;
75} 75}
76 76
77int pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 77int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
78{ 78{
79 This is b0rked.
79 return dev->irq; 80 return dev->irq;
80} 81}
81 82
diff --git a/arch/mips/pci/pci-dac.c b/arch/mips/pci/pci-dac.c
deleted file mode 100644
index 0f0ea1b7d4dd..000000000000
--- a/arch/mips/pci/pci-dac.c
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2000 Ani Joshi <ajoshi@unixbox.com>
7 * Copyright (C) 2000, 2001, 06 Ralf Baechle <ralf@linux-mips.org>
8 * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
9 */
10
11#include <linux/types.h>
12#include <linux/dma-mapping.h>
13#include <linux/mm.h>
14#include <linux/module.h>
15#include <linux/string.h>
16
17#include <asm/cache.h>
18#include <asm/io.h>
19
20#include <dma-coherence.h>
21
22#include <linux/pci.h>
23
24dma64_addr_t pci_dac_page_to_dma(struct pci_dev *pdev,
25 struct page *page, unsigned long offset, int direction)
26{
27 struct device *dev = &pdev->dev;
28
29 BUG_ON(direction == DMA_NONE);
30
31 if (!plat_device_is_coherent(dev)) {
32 unsigned long addr;
33
34 addr = (unsigned long) page_address(page) + offset;
35 dma_cache_wback_inv(addr, PAGE_SIZE);
36 }
37
38 return plat_map_dma_mem_page(dev, page) + offset;
39}
40
41EXPORT_SYMBOL(pci_dac_page_to_dma);
42
43struct page *pci_dac_dma_to_page(struct pci_dev *pdev,
44 dma64_addr_t dma_addr)
45{
46 return pfn_to_page(plat_dma_addr_to_phys(dma_addr) >> PAGE_SHIFT);
47}
48
49EXPORT_SYMBOL(pci_dac_dma_to_page);
50
51unsigned long pci_dac_dma_to_offset(struct pci_dev *pdev,
52 dma64_addr_t dma_addr)
53{
54 return dma_addr & ~PAGE_MASK;
55}
56
57EXPORT_SYMBOL(pci_dac_dma_to_offset);
58
59void pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev,
60 dma64_addr_t dma_addr, size_t len, int direction)
61{
62 BUG_ON(direction == PCI_DMA_NONE);
63
64 if (!plat_device_is_coherent(&pdev->dev))
65 dma_cache_wback_inv(dma_addr + PAGE_OFFSET, len);
66}
67
68EXPORT_SYMBOL(pci_dac_dma_sync_single_for_cpu);
69
70void pci_dac_dma_sync_single_for_device(struct pci_dev *pdev,
71 dma64_addr_t dma_addr, size_t len, int direction)
72{
73 BUG_ON(direction == PCI_DMA_NONE);
74
75 if (!plat_device_is_coherent(&pdev->dev))
76 dma_cache_wback_inv(dma_addr + PAGE_OFFSET, len);
77}
78
79EXPORT_SYMBOL(pci_dac_dma_sync_single_for_device);
diff --git a/arch/mips/pci/pci-ddb5477.c b/arch/mips/pci/pci-ddb5477.c
index d071bc375b11..7363e1877842 100644
--- a/arch/mips/pci/pci-ddb5477.c
+++ b/arch/mips/pci/pci-ddb5477.c
@@ -131,7 +131,7 @@ static unsigned char rockhopperII_irq_map[MAX_SLOT_NUM] = {
131 /* SLOT: 20, AD:31 */ VRC5477_IRQ_IOPCI_INTA, /* vrc5477 usb host */ 131 /* SLOT: 20, AD:31 */ VRC5477_IRQ_IOPCI_INTA, /* vrc5477 usb host */
132}; 132};
133 133
134int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 134int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
135{ 135{
136 int slot_num; 136 int slot_num;
137 unsigned char *slot_irq_map; 137 unsigned char *slot_irq_map;
diff --git a/arch/mips/pci/pci-ev64120.c b/arch/mips/pci/pci-ev64120.c
deleted file mode 100644
index a84f594b5a18..000000000000
--- a/arch/mips/pci/pci-ev64120.c
+++ /dev/null
@@ -1,22 +0,0 @@
1#include <linux/pci.h>
2#include <asm/irq.h>
3
4int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
5{
6 int irq;
7
8 if (!pin)
9 return 0;
10
11 irq = allocate_irqno();
12 if (irq < 0)
13 return 0;
14
15 return irq;
16}
17
18/* Do platform specific device initialization at pci_enable_device() time */
19int pcibios_plat_dev_init(struct pci_dev *dev)
20{
21 return 0;
22}
diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c
index 405ce0152739..a322543ac34e 100644
--- a/arch/mips/pci/pci-ip27.c
+++ b/arch/mips/pci/pci-ip27.c
@@ -134,7 +134,7 @@ int __init bridge_probe(nasid_t nasid, int widget_id, int masterwid)
134 * A given PCI device, in general, should be able to intr any of the cpus 134 * A given PCI device, in general, should be able to intr any of the cpus
135 * on any one of the hubs connected to its xbow. 135 * on any one of the hubs connected to its xbow.
136 */ 136 */
137int __devinit pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 137int __devinit pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
138{ 138{
139 struct bridge_controller *bc = BRIDGE_CONTROLLER(dev->bus); 139 struct bridge_controller *bc = BRIDGE_CONTROLLER(dev->bus);
140 int irq = bc->pci_int[slot]; 140 int irq = bc->pci_int[slot];
diff --git a/arch/mips/pci/pci-lasat.c b/arch/mips/pci/pci-lasat.c
deleted file mode 100644
index 985784a3e6f8..000000000000
--- a/arch/mips/pci/pci-lasat.c
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2000, 2001, 04 Keith M Wesolowski
7 */
8#include <linux/kernel.h>
9#include <linux/init.h>
10#include <linux/pci.h>
11#include <linux/types.h>
12#include <asm/bootinfo.h>
13
14extern struct pci_ops nile4_pci_ops;
15extern struct pci_ops gt64xxx_pci0_ops;
16static struct resource lasat_pci_mem_resource = {
17 .name = "LASAT PCI MEM",
18 .start = 0x18000000,
19 .end = 0x19ffffff,
20 .flags = IORESOURCE_MEM,
21};
22
23static struct resource lasat_pci_io_resource = {
24 .name = "LASAT PCI IO",
25 .start = 0x1a000000,
26 .end = 0x1bffffff,
27 .flags = IORESOURCE_IO,
28};
29
30static struct pci_controller lasat_pci_controller = {
31 .mem_resource = &lasat_pci_mem_resource,
32 .io_resource = &lasat_pci_io_resource,
33};
34
35static int __init lasat_pci_setup(void)
36{
37 printk("PCI: starting\n");
38
39 switch (mips_machtype) {
40 case MACH_LASAT_100:
41 lasat_pci_controller.pci_ops = &gt64xxx_pci0_ops;
42 break;
43 case MACH_LASAT_200:
44 lasat_pci_controller.pci_ops = &nile4_pci_ops;
45 break;
46 default:
47 panic("pcibios_init: mips_machtype incorrect");
48 }
49
50 register_pci_controller(&lasat_pci_controller);
51
52 return 0;
53}
54
55arch_initcall(lasat_pci_setup);
56
57#define LASATINT_ETH1 0
58#define LASATINT_ETH0 1
59#define LASATINT_HDC 2
60#define LASATINT_COMP 3
61#define LASATINT_HDLC 4
62#define LASATINT_PCIA 5
63#define LASATINT_PCIB 6
64#define LASATINT_PCIC 7
65#define LASATINT_PCID 8
66
67int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
68{
69 switch (slot) {
70 case 1:
71 case 2:
72 case 3:
73 return LASATINT_PCIA + (((slot-1) + (pin-1)) % 4);
74 case 4:
75 return LASATINT_ETH1; /* Ethernet 1 (LAN 2) */
76 case 5:
77 return LASATINT_ETH0; /* Ethernet 0 (LAN 1) */
78 case 6:
79 return LASATINT_HDC; /* IDE controller */
80 default:
81 return 0xff; /* Illegal */
82 }
83
84 return -1;
85}
86
87/* Do platform specific device initialization at pci_enable_device() time */
88int pcibios_plat_dev_init(struct pci_dev *dev)
89{
90 return 0;
91}
diff --git a/arch/mips/pci/pci-ocelot-c.c b/arch/mips/pci/pci-ocelot-c.c
deleted file mode 100644
index 027759f7c904..000000000000
--- a/arch/mips/pci/pci-ocelot-c.c
+++ /dev/null
@@ -1,145 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2004, 06 by Ralf Baechle (ralf@linux-mips.org)
7 */
8
9#include <linux/types.h>
10#include <linux/pci.h>
11#include <linux/mv643xx.h>
12
13#include <linux/init.h>
14
15#include <asm/marvell.h>
16
17/*
18 * We assume the address ranges have already been setup appropriately by
19 * the firmware. PMON in case of the Ocelot C does that.
20 */
21static struct resource mv_pci_io_mem0_resource = {
22 .name = "MV64340 PCI0 IO MEM",
23 .flags = IORESOURCE_IO
24};
25
26static struct resource mv_pci_mem0_resource = {
27 .name = "MV64340 PCI0 MEM",
28 .flags = IORESOURCE_MEM
29};
30
31static struct mv_pci_controller mv_bus0_controller = {
32 .pcic = {
33 .pci_ops = &mv_pci_ops,
34 .mem_resource = &mv_pci_mem0_resource,
35 .io_resource = &mv_pci_io_mem0_resource,
36 },
37 .config_addr = MV64340_PCI_0_CONFIG_ADDR,
38 .config_vreg = MV64340_PCI_0_CONFIG_DATA_VIRTUAL_REG,
39};
40
41static uint32_t mv_io_base, mv_io_size;
42
43static void mv64340_pci0_init(void)
44{
45 uint32_t mem0_base, mem0_size;
46 uint32_t io_base, io_size;
47
48 io_base = MV_READ(MV64340_PCI_0_IO_BASE_ADDR) << 16;
49 io_size = (MV_READ(MV64340_PCI_0_IO_SIZE) + 1) << 16;
50 mem0_base = MV_READ(MV64340_PCI_0_MEMORY0_BASE_ADDR) << 16;
51 mem0_size = (MV_READ(MV64340_PCI_0_MEMORY0_SIZE) + 1) << 16;
52
53 mv_pci_io_mem0_resource.start = 0;
54 mv_pci_io_mem0_resource.end = io_size - 1;
55 mv_pci_mem0_resource.start = mem0_base;
56 mv_pci_mem0_resource.end = mem0_base + mem0_size - 1;
57 mv_bus0_controller.pcic.mem_offset = mem0_base;
58 mv_bus0_controller.pcic.io_offset = 0;
59
60 ioport_resource.end = io_size - 1;
61
62 register_pci_controller(&mv_bus0_controller.pcic);
63
64 mv_io_base = io_base;
65 mv_io_size = io_size;
66}
67
68static struct resource mv_pci_io_mem1_resource = {
69 .name = "MV64340 PCI1 IO MEM",
70 .flags = IORESOURCE_IO
71};
72
73static struct resource mv_pci_mem1_resource = {
74 .name = "MV64340 PCI1 MEM",
75 .flags = IORESOURCE_MEM
76};
77
78static struct mv_pci_controller mv_bus1_controller = {
79 .pcic = {
80 .pci_ops = &mv_pci_ops,
81 .mem_resource = &mv_pci_mem1_resource,
82 .io_resource = &mv_pci_io_mem1_resource,
83 },
84 .config_addr = MV64340_PCI_1_CONFIG_ADDR,
85 .config_vreg = MV64340_PCI_1_CONFIG_DATA_VIRTUAL_REG,
86};
87
88static __init void mv64340_pci1_init(void)
89{
90 uint32_t mem0_base, mem0_size;
91 uint32_t io_base, io_size;
92
93 io_base = MV_READ(MV64340_PCI_1_IO_BASE_ADDR) << 16;
94 io_size = (MV_READ(MV64340_PCI_1_IO_SIZE) + 1) << 16;
95 mem0_base = MV_READ(MV64340_PCI_1_MEMORY0_BASE_ADDR) << 16;
96 mem0_size = (MV_READ(MV64340_PCI_1_MEMORY0_SIZE) + 1) << 16;
97
98 /*
99 * Here we assume the I/O window of second bus to be contiguous with
100 * the first. A gap is no problem but would waste address space for
101 * remapping the port space.
102 */
103 mv_pci_io_mem1_resource.start = mv_io_size;
104 mv_pci_io_mem1_resource.end = mv_io_size + io_size - 1;
105 mv_pci_mem1_resource.start = mem0_base;
106 mv_pci_mem1_resource.end = mem0_base + mem0_size - 1;
107 mv_bus1_controller.pcic.mem_offset = mem0_base;
108 mv_bus1_controller.pcic.io_offset = 0;
109
110 ioport_resource.end = io_base + io_size -mv_io_base - 1;
111
112 register_pci_controller(&mv_bus1_controller.pcic);
113
114 mv_io_size = io_base + io_size - mv_io_base;
115}
116
117static __init int __init ocelot_c_pci_init(void)
118{
119 unsigned long io_v_base;
120 uint32_t enable;
121
122 enable = ~MV_READ(MV64340_BASE_ADDR_ENABLE);
123
124 /*
125 * We require at least one enabled I/O or PCI memory window or we
126 * will ignore this PCI bus. We ignore PCI windows 1, 2 and 3.
127 */
128 if (enable & (0x01 << 9) || enable & (0x01 << 10))
129 mv64340_pci0_init();
130
131 if (enable & (0x01 << 14) || enable & (0x01 << 15))
132 mv64340_pci1_init();
133
134 if (mv_io_size) {
135 io_v_base = (unsigned long) ioremap(mv_io_base, mv_io_size);
136 if (!io_v_base)
137 panic("Could not ioremap I/O port range");
138
139 set_io_port_base(io_v_base);
140 }
141
142 return 0;
143}
144
145arch_initcall(ocelot_c_pci_init);
diff --git a/arch/mips/pci/pci-sb1250.c b/arch/mips/pci/pci-sb1250.c
index 75c1246ced5f..c1ac6493155e 100644
--- a/arch/mips/pci/pci-sb1250.c
+++ b/arch/mips/pci/pci-sb1250.c
@@ -84,7 +84,7 @@ static inline void WRITECFG32(u32 addr, u32 data)
84 *(u32 *) (cfg_space + (addr & ~3)) = data; 84 *(u32 *) (cfg_space + (addr & ~3)) = data;
85} 85}
86 86
87int pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 87int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
88{ 88{
89 return dev->irq; 89 return dev->irq;
90} 90}
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 8108231f2e20..99d8f4fd3ff4 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -269,7 +269,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
269 } 269 }
270 270
271 for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) { 271 for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) {
272 struct pci_dev *dev = pci_dev_b(ln); 272 dev = pci_dev_b(ln);
273 273
274 if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) 274 if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)
275 pcibios_fixup_device_resources(dev, bus); 275 pcibios_fixup_device_resources(dev, bus);
diff --git a/arch/mips/philips/pnx8550/common/platform.c b/arch/mips/philips/pnx8550/common/platform.c
index d43f56e2cd78..c839436bd012 100644
--- a/arch/mips/philips/pnx8550/common/platform.c
+++ b/arch/mips/philips/pnx8550/common/platform.c
@@ -123,7 +123,7 @@ static struct platform_device *pnx8550_platform_devices[] __initdata = {
123 &pnx8550_uart_device, 123 &pnx8550_uart_device,
124}; 124};
125 125
126int pnx8550_platform_init(void) 126static int __init pnx8550_platform_init(void)
127{ 127{
128 return platform_add_devices(pnx8550_platform_devices, 128 return platform_add_devices(pnx8550_platform_devices,
129 ARRAY_SIZE(pnx8550_platform_devices)); 129 ARRAY_SIZE(pnx8550_platform_devices));
diff --git a/arch/mips/philips/pnx8550/common/proc.c b/arch/mips/philips/pnx8550/common/proc.c
index 3f097558ef13..92311e95b700 100644
--- a/arch/mips/philips/pnx8550/common/proc.c
+++ b/arch/mips/philips/pnx8550/common/proc.c
@@ -78,29 +78,33 @@ static int pnx8550_proc_init( void )
78{ 78{
79 79
80 // Create /proc/pnx8550 80 // Create /proc/pnx8550
81 pnx8550_dir = create_proc_entry("pnx8550", S_IFDIR|S_IRUGO, NULL); 81 pnx8550_dir = proc_mkdir("pnx8550", NULL);
82 if (!pnx8550_dir) { 82 if (!pnx8550_dir) {
83 printk(KERN_ERR "Can't create pnx8550 proc dir\n"); 83 printk(KERN_ERR "Can't create pnx8550 proc dir\n");
84 return -1; 84 return -1;
85 } 85 }
86 86
87 // Create /proc/pnx8550/timers 87 // Create /proc/pnx8550/timers
88 pnx8550_timers = create_proc_entry("timers", S_IFREG|S_IRUGO, pnx8550_dir ); 88 pnx8550_timers = create_proc_read_entry(
89 if (pnx8550_timers){ 89 "timers",
90 pnx8550_timers->read_proc = pnx8550_timers_read; 90 0,
91 } 91 pnx8550_dir,
92 else { 92 pnx8550_timers_read,
93 NULL);
94
95 if (!pnx8550_timers)
93 printk(KERN_ERR "Can't create pnx8550 timers proc file\n"); 96 printk(KERN_ERR "Can't create pnx8550 timers proc file\n");
94 }
95 97
96 // Create /proc/pnx8550/registers 98 // Create /proc/pnx8550/registers
97 pnx8550_registers = create_proc_entry("registers", S_IFREG|S_IRUGO, pnx8550_dir ); 99 pnx8550_registers = create_proc_read_entry(
98 if (pnx8550_registers){ 100 "registers",
99 pnx8550_registers->read_proc = pnx8550_registers_read; 101 0,
100 } 102 pnx8550_dir,
101 else { 103 pnx8550_registers_read,
104 NULL);
105
106 if (!pnx8550_registers)
102 printk(KERN_ERR "Can't create pnx8550 registers proc file\n"); 107 printk(KERN_ERR "Can't create pnx8550 registers proc file\n");
103 }
104 108
105 return 0; 109 return 0;
106} 110}
diff --git a/arch/mips/pmc-sierra/Kconfig b/arch/mips/pmc-sierra/Kconfig
index 24d514c9dff9..abbd0bbfabd7 100644
--- a/arch/mips/pmc-sierra/Kconfig
+++ b/arch/mips/pmc-sierra/Kconfig
@@ -1,3 +1,49 @@
1choice
2 prompt "PMC-Sierra MSP SOC type"
3 depends on PMC_MSP
4
5config PMC_MSP4200_EVAL
6 bool "PMC-Sierra MSP4200 Eval Board"
7 select IRQ_MSP_SLP
8 select HW_HAS_PCI
9
10config PMC_MSP4200_GW
11 bool "PMC-Sierra MSP4200 VoIP Gateway"
12 select IRQ_MSP_SLP
13 select HW_HAS_PCI
14
15config PMC_MSP7120_EVAL
16 bool "PMC-Sierra MSP7120 Eval Board"
17 select SYS_SUPPORTS_MULTITHREADING
18 select IRQ_MSP_CIC
19 select HW_HAS_PCI
20
21config PMC_MSP7120_GW
22 bool "PMC-Sierra MSP7120 Residential Gateway"
23 select SYS_SUPPORTS_MULTITHREADING
24 select IRQ_MSP_CIC
25 select HW_HAS_PCI
26
27config PMC_MSP7120_FPGA
28 bool "PMC-Sierra MSP7120 FPGA"
29 select SYS_SUPPORTS_MULTITHREADING
30 select IRQ_MSP_CIC
31 select HW_HAS_PCI
32
33endchoice
34
35menu "Options for PMC-Sierra MSP chipsets"
36 depends on PMC_MSP
37
38config PMC_MSP_EMBEDDED_ROOTFS
39 bool "Root filesystem embedded in kernel image"
40 select MTD
41 select MTD_BLOCK
42 select MTD_PMC_MSP_RAMROOT
43 select MTD_RAM
44
45endmenu
46
1config HYPERTRANSPORT 47config HYPERTRANSPORT
2 bool "Hypertransport Support for PMC-Sierra Yosemite" 48 bool "Hypertransport Support for PMC-Sierra Yosemite"
3 depends on PMC_YOSEMITE 49 depends on PMC_YOSEMITE
diff --git a/arch/mips/pmc-sierra/msp71xx/Makefile b/arch/mips/pmc-sierra/msp71xx/Makefile
new file mode 100644
index 000000000000..4bba79c1cc79
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/Makefile
@@ -0,0 +1,11 @@
1#
2# Makefile for the PMC-Sierra MSP SOCs
3#
4obj-y += msp_prom.o msp_setup.o msp_irq.o \
5 msp_time.o msp_serial.o msp_elb.o
6obj-$(CONFIG_PMC_MSP7120_GW) += msp_hwbutton.o
7obj-$(CONFIG_IRQ_MSP_SLP) += msp_irq_slp.o
8obj-$(CONFIG_IRQ_MSP_CIC) += msp_irq_cic.o
9obj-$(CONFIG_PCI) += msp_pci.o
10obj-$(CONFIG_MSPETH) += msp_eth.o
11obj-$(CONFIG_USB_MSP71XX) += msp_usb.o
diff --git a/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h b/arch/mips/pmc-sierra/msp71xx/msp_elb.c
index f0f5581dcb50..3e9641007216 100644
--- a/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h
+++ b/arch/mips/pmc-sierra/msp71xx/msp_elb.c
@@ -1,7 +1,9 @@
1/* 1/*
2 * Ocelot-C Board Register Definitions 2 * Sets up the proper Chip Select configuration registers. It is assumed that
3 * PMON sets up the ADDR and MASK registers properly.
3 * 4 *
4 * (C) 2002 Momentum Computer Inc. 5 * Copyright 2005-2006 PMC-Sierra, Inc.
6 * Author: Marc St-Jean, Marc_St-Jean@pmc-sierra.com
5 * 7 *
6 * This program is free software; you can redistribute it and/or modify it 8 * 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 9 * under the terms of the GNU General Public License as published by the
@@ -22,40 +24,23 @@
22 * You should have received a copy of the GNU General Public License along 24 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc., 25 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA. 26 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 *
26 * Louis Hamilton, Red Hat, Inc.
27 * hamilton@redhat.com [MIPS64 modifications]
28 */ 27 */
29 28
30#ifndef __OCELOT_C_FPGA_H__ 29#include <linux/kernel.h>
31#define __OCELOT_C_FPGA_H__ 30#include <linux/init.h>
32 31#include <msp_regs.h>
33 32
34#ifdef CONFIG_64BIT 33static int __init msp_elb_setup(void)
35#define OCELOT_C_CS0_ADDR (0xfffffffffc000000) 34{
36#else 35#if defined(CONFIG_PMC_MSP7120_GW) \
37#define OCELOT_C_CS0_ADDR (0xfc000000) 36 || defined(CONFIG_PMC_MSP7120_EVAL)
37 /*
38 * Force all CNFG to be identical and equal to CS0,
39 * according to OPS doc
40 */
41 *CS1_CNFG_REG = *CS2_CNFG_REG = *CS3_CNFG_REG = *CS0_CNFG_REG;
38#endif 42#endif
43 return 0;
44}
39 45
40#define OCELOT_C_REG_BOARDREV 0x0 46subsys_initcall(msp_elb_setup);
41#define OCELOT_C_REG_FPGA_REV 0x1
42#define OCELOT_C_REG_FPGA_TYPE 0x2
43#define OCELOT_C_REG_RESET_STATUS 0x3
44#define OCELOT_C_REG_BOARD_STATUS 0x4
45#define OCELOT_C_REG_CPCI_ID 0x5
46#define OCELOT_C_REG_SET 0x6
47#define OCELOT_C_REG_CLR 0x7
48#define OCELOT_C_REG_EEPROM_MODE 0x9
49#define OCELOT_C_REG_INTMASK 0xa
50#define OCELOT_C_REG_INTSTAT 0xb
51#define OCELOT_C_REG_UART_INTMASK 0xc
52#define OCELOT_C_REG_UART_INTSTAT 0xd
53#define OCELOT_C_REG_INTSET 0xe
54#define OCELOT_C_REG_INTCLR 0xf
55
56#define __FPGA_REG_TO_ADDR(reg) \
57 ((void *) OCELOT_C_CS0_ADDR + OCELOT_C_REG_##reg)
58#define OCELOT_FPGA_WRITE(x, reg) writeb(x, __FPGA_REG_TO_ADDR(reg))
59#define OCELOT_FPGA_READ(reg) readb(__FPGA_REG_TO_ADDR(reg))
60
61#endif
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_hwbutton.c b/arch/mips/pmc-sierra/msp71xx/msp_hwbutton.c
new file mode 100644
index 000000000000..6fa85728158b
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_hwbutton.c
@@ -0,0 +1,179 @@
1/*
2 * Sets up interrupt handlers for various hardware switches which are
3 * connected to interrupt lines.
4 *
5 * Copyright 2005-2207 PMC-Sierra, Inc.
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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28#include <linux/kernel.h>
29#include <linux/init.h>
30#include <linux/interrupt.h>
31
32#include <msp_int.h>
33#include <msp_regs.h>
34#include <msp_regops.h>
35#ifdef CONFIG_PMCTWILED
36#include <msp_led_macros.h>
37#endif
38
39/* For hwbutton_interrupt->initial_state */
40#define HWBUTTON_HI 0x1
41#define HWBUTTON_LO 0x2
42
43/*
44 * This struct describes a hardware button
45 */
46struct hwbutton_interrupt {
47 char *name; /* Name of button */
48 int irq; /* Actual LINUX IRQ */
49 int eirq; /* Extended IRQ number (0-7) */
50 int initial_state; /* The "normal" state of the switch */
51 void (*handle_hi)(void *); /* Handler: switch input has gone HI */
52 void (*handle_lo)(void *); /* Handler: switch input has gone LO */
53 void *data; /* Optional data to pass to handler */
54};
55
56#ifdef CONFIG_PMC_MSP7120_GW
57extern void msp_restart(char *);
58
59static void softreset_push(void *data)
60{
61 printk(KERN_WARNING "SOFTRESET switch was pushed\n");
62
63 /*
64 * In the future you could move this to the release handler,
65 * timing the difference between the 'push' and 'release', and only
66 * doing this ungraceful restart if the button has been down for
67 * a certain amount of time; otherwise doing a graceful restart.
68 */
69
70 msp_restart(NULL);
71}
72
73static void softreset_release(void *data)
74{
75 printk(KERN_WARNING "SOFTRESET switch was released\n");
76
77 /* Do nothing */
78}
79
80static void standby_on(void *data)
81{
82 printk(KERN_WARNING "STANDBY switch was set to ON (not implemented)\n");
83
84 /* TODO: Put board in standby mode */
85#ifdef CONFIG_PMCTWILED
86 msp_led_turn_off(MSP_LED_PWRSTANDBY_GREEN);
87 msp_led_turn_on(MSP_LED_PWRSTANDBY_RED);
88#endif
89}
90
91static void standby_off(void *data)
92{
93 printk(KERN_WARNING
94 "STANDBY switch was set to OFF (not implemented)\n");
95
96 /* TODO: Take out of standby mode */
97#ifdef CONFIG_PMCTWILED
98 msp_led_turn_on(MSP_LED_PWRSTANDBY_GREEN);
99 msp_led_turn_off(MSP_LED_PWRSTANDBY_RED);
100#endif
101}
102
103static struct hwbutton_interrupt softreset_sw = {
104 .name = "Softreset button",
105 .irq = MSP_INT_EXT0,
106 .eirq = 0,
107 .initial_state = HWBUTTON_HI,
108 .handle_hi = softreset_release,
109 .handle_lo = softreset_push,
110 .data = NULL,
111};
112
113static struct hwbutton_interrupt standby_sw = {
114 .name = "Standby switch",
115 .irq = MSP_INT_EXT1,
116 .eirq = 1,
117 .initial_state = HWBUTTON_HI,
118 .handle_hi = standby_off,
119 .handle_lo = standby_on,
120 .data = NULL,
121};
122#endif /* CONFIG_PMC_MSP7120_GW */
123
124static irqreturn_t hwbutton_handler(int irq, void *data)
125{
126 struct hwbutton_interrupt *hirq = data;
127 unsigned long cic_ext = *CIC_EXT_CFG_REG;
128
129 if (irq != hirq->irq)
130 return IRQ_NONE;
131
132 if (CIC_EXT_IS_ACTIVE_HI(cic_ext, hirq->eirq)) {
133 /* Interrupt: pin is now HI */
134 CIC_EXT_SET_ACTIVE_LO(cic_ext, hirq->eirq);
135 hirq->handle_hi(hirq->data);
136 } else {
137 /* Interrupt: pin is now LO */
138 CIC_EXT_SET_ACTIVE_HI(cic_ext, hirq->eirq);
139 hirq->handle_lo(hirq->data);
140 }
141
142 /*
143 * Invert the POLARITY of this level interrupt to ack the interrupt
144 * Thus next state change will invoke the opposite message
145 */
146 *CIC_EXT_CFG_REG = cic_ext;
147
148 return IRQ_HANDLED;
149}
150
151static int msp_hwbutton_register(struct hwbutton_interrupt *hirq)
152{
153 unsigned long cic_ext;
154
155 if (hirq->handle_hi == NULL || hirq->handle_lo == NULL)
156 return -EINVAL;
157
158 cic_ext = *CIC_EXT_CFG_REG;
159 CIC_EXT_SET_TRIGGER_LEVEL(cic_ext, hirq->eirq);
160 if (hirq->initial_state == HWBUTTON_HI)
161 CIC_EXT_SET_ACTIVE_LO(cic_ext, hirq->eirq);
162 else
163 CIC_EXT_SET_ACTIVE_HI(cic_ext, hirq->eirq);
164 *CIC_EXT_CFG_REG = cic_ext;
165
166 return request_irq(hirq->irq, hwbutton_handler, SA_INTERRUPT,
167 hirq->name, (void *)hirq);
168}
169
170static int __init msp_hwbutton_setup(void)
171{
172#ifdef CONFIG_PMC_MSP7120_GW
173 msp_hwbutton_register(&softreset_sw);
174 msp_hwbutton_register(&standby_sw);
175#endif
176 return 0;
177}
178
179subsys_initcall(msp_hwbutton_setup);
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_irq.c b/arch/mips/pmc-sierra/msp71xx/msp_irq.c
new file mode 100644
index 000000000000..734d598a2e3a
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_irq.c
@@ -0,0 +1,124 @@
1/*
2 * IRQ vector handles
3 *
4 * Copyright (C) 1995, 1996, 1997, 2003 by Ralf Baechle
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
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/irq.h>
14#include <linux/interrupt.h>
15#include <linux/ptrace.h>
16#include <linux/time.h>
17
18#include <asm/irq_cpu.h>
19
20#include <msp_int.h>
21
22extern void msp_int_handle(void);
23
24/* SLP bases systems */
25extern void msp_slp_irq_init(void);
26extern void msp_slp_irq_dispatch(void);
27
28/* CIC based systems */
29extern void msp_cic_irq_init(void);
30extern void msp_cic_irq_dispatch(void);
31
32/*
33 * The PMC-Sierra MSP interrupts are arranged in a 3 level cascaded
34 * hierarchical system. The first level are the direct MIPS interrupts
35 * and are assigned the interrupt range 0-7. The second level is the SLM
36 * interrupt controller and is assigned the range 8-39. The third level
37 * comprises the Peripherial block, the PCI block, the PCI MSI block and
38 * the SLP. The PCI interrupts and the SLP errors are handled by the
39 * relevant subsystems so the core interrupt code needs only concern
40 * itself with the Peripheral block. These are assigned interrupts in
41 * the range 40-71.
42 */
43
44asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
45{
46 u32 pending;
47
48 pending = read_c0_status() & read_c0_cause();
49
50 /*
51 * jump to the correct interrupt routine
52 * These are arranged in priority order and the timer
53 * comes first!
54 */
55
56#ifdef CONFIG_IRQ_MSP_CIC /* break out the CIC stuff for now */
57 if (pending & C_IRQ4) /* do the peripherals first, that's the timer */
58 msp_cic_irq_dispatch();
59
60 else if (pending & C_IRQ0)
61 do_IRQ(MSP_INT_MAC0);
62
63 else if (pending & C_IRQ1)
64 do_IRQ(MSP_INT_MAC1);
65
66 else if (pending & C_IRQ2)
67 do_IRQ(MSP_INT_USB);
68
69 else if (pending & C_IRQ3)
70 do_IRQ(MSP_INT_SAR);
71
72 else if (pending & C_IRQ5)
73 do_IRQ(MSP_INT_SEC);
74
75#else
76 if (pending & C_IRQ5)
77 do_IRQ(MSP_INT_TIMER);
78
79 else if (pending & C_IRQ0)
80 do_IRQ(MSP_INT_MAC0);
81
82 else if (pending & C_IRQ1)
83 do_IRQ(MSP_INT_MAC1);
84
85 else if (pending & C_IRQ3)
86 do_IRQ(MSP_INT_VE);
87
88 else if (pending & C_IRQ4)
89 msp_slp_irq_dispatch();
90#endif
91
92 else if (pending & C_SW0) /* do software after hardware */
93 do_IRQ(MSP_INT_SW0);
94
95 else if (pending & C_SW1)
96 do_IRQ(MSP_INT_SW1);
97}
98
99static struct irqaction cascade_msp = {
100 .handler = no_action,
101 .name = "MSP cascade"
102};
103
104
105void __init arch_init_irq(void)
106{
107 /* initialize the 1st-level CPU based interrupt controller */
108 mips_cpu_irq_init();
109
110#ifdef CONFIG_IRQ_MSP_CIC
111 msp_cic_irq_init();
112
113 /* setup the cascaded interrupts */
114 setup_irq(MSP_INT_CIC, &cascade_msp);
115 setup_irq(MSP_INT_PER, &cascade_msp);
116#else
117 /* setup the 2nd-level SLP register based interrupt controller */
118 msp_slp_irq_init();
119
120 /* setup the cascaded SLP/PER interrupts */
121 setup_irq(MSP_INT_SLP, &cascade_msp);
122 setup_irq(MSP_INT_PER, &cascade_msp);
123#endif
124}
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c b/arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c
new file mode 100644
index 000000000000..5175357d0a25
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c
@@ -0,0 +1,134 @@
1/*
2 * This file define the irq handler for MSP SLM subsystem interrupts.
3 *
4 * Copyright 2005-2007 PMC-Sierra, Inc, derived from irq_cpu.c
5 * Author: Andrew Hughes, Andrew_Hughes@pmc-sierra.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#include <linux/init.h>
14#include <linux/interrupt.h>
15#include <linux/kernel.h>
16#include <linux/bitops.h>
17
18#include <asm/system.h>
19
20#include <msp_cic_int.h>
21#include <msp_regs.h>
22
23/*
24 * NOTE: We are only enabling support for VPE0 right now.
25 */
26
27static inline void unmask_msp_cic_irq(unsigned int irq)
28{
29
30 /* check for PER interrupt range */
31 if (irq < MSP_PER_INTBASE)
32 *CIC_VPE0_MSK_REG |= (1 << (irq - MSP_CIC_INTBASE));
33 else
34 *PER_INT_MSK_REG |= (1 << (irq - MSP_PER_INTBASE));
35}
36
37static inline void mask_msp_cic_irq(unsigned int irq)
38{
39 /* check for PER interrupt range */
40 if (irq < MSP_PER_INTBASE)
41 *CIC_VPE0_MSK_REG &= ~(1 << (irq - MSP_CIC_INTBASE));
42 else
43 *PER_INT_MSK_REG &= ~(1 << (irq - MSP_PER_INTBASE));
44}
45
46/*
47 * While we ack the interrupt interrupts are disabled and thus we don't need
48 * to deal with concurrency issues. Same for msp_cic_irq_end.
49 */
50static inline void ack_msp_cic_irq(unsigned int irq)
51{
52 mask_msp_cic_irq(irq);
53
54 /*
55 * only really necessary for 18, 16-14 and sometimes 3:0 (since
56 * these can be edge sensitive) but it doesn't hurt for the others.
57 */
58
59 /* check for PER interrupt range */
60 if (irq < MSP_PER_INTBASE)
61 *CIC_STS_REG = (1 << (irq - MSP_CIC_INTBASE));
62 else
63 *PER_INT_STS_REG = (1 << (irq - MSP_PER_INTBASE));
64}
65
66static struct irq_chip msp_cic_irq_controller = {
67 .name = "MSP_CIC",
68 .ack = ack_msp_cic_irq,
69 .mask = ack_msp_cic_irq,
70 .mask_ack = ack_msp_cic_irq,
71 .unmask = unmask_msp_cic_irq,
72};
73
74
75void __init msp_cic_irq_init(void)
76{
77 int i;
78
79 /* Mask/clear interrupts. */
80 *CIC_VPE0_MSK_REG = 0x00000000;
81 *PER_INT_MSK_REG = 0x00000000;
82 *CIC_STS_REG = 0xFFFFFFFF;
83 *PER_INT_STS_REG = 0xFFFFFFFF;
84
85#if defined(CONFIG_PMC_MSP7120_GW) || \
86 defined(CONFIG_PMC_MSP7120_EVAL)
87 /*
88 * The MSP7120 RG and EVBD boards use IRQ[6:4] for PCI.
89 * These inputs map to EXT_INT_POL[6:4] inside the CIC.
90 * They are to be active low, level sensitive.
91 */
92 *CIC_EXT_CFG_REG &= 0xFFFF8F8F;
93#endif
94
95 /* initialize all the IRQ descriptors */
96 for (i = MSP_CIC_INTBASE; i < MSP_PER_INTBASE + 32; i++)
97 set_irq_chip_and_handler(i, &msp_cic_irq_controller,
98 handle_level_irq);
99}
100
101void msp_cic_irq_dispatch(void)
102{
103 u32 pending;
104 int intbase;
105
106 intbase = MSP_CIC_INTBASE;
107 pending = *CIC_STS_REG & *CIC_VPE0_MSK_REG;
108
109 /* check for PER interrupt */
110 if (pending == (1 << (MSP_INT_PER - MSP_CIC_INTBASE))) {
111 intbase = MSP_PER_INTBASE;
112 pending = *PER_INT_STS_REG & *PER_INT_MSK_REG;
113 }
114
115 /* check for spurious interrupt */
116 if (pending == 0x00000000) {
117 printk(KERN_ERR
118 "Spurious %s interrupt? status %08x, mask %08x\n",
119 (intbase == MSP_CIC_INTBASE) ? "CIC" : "PER",
120 (intbase == MSP_CIC_INTBASE) ?
121 *CIC_STS_REG : *PER_INT_STS_REG,
122 (intbase == MSP_CIC_INTBASE) ?
123 *CIC_VPE0_MSK_REG : *PER_INT_MSK_REG);
124 return;
125 }
126
127 /* check for the timer and dispatch it first */
128 if ((intbase == MSP_CIC_INTBASE) &&
129 (pending & (1 << (MSP_INT_VPE0_TIMER - MSP_CIC_INTBASE))))
130 do_IRQ(MSP_INT_VPE0_TIMER);
131 else
132 do_IRQ(ffs(pending) + intbase - 1);
133}
134
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c b/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c
new file mode 100644
index 000000000000..f5f1b8d2bb9a
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c
@@ -0,0 +1,109 @@
1/*
2 * This file define the irq handler for MSP SLM subsystem interrupts.
3 *
4 * Copyright 2005-2006 PMC-Sierra, Inc, derived from irq_cpu.c
5 * Author: Andrew Hughes, Andrew_Hughes@pmc-sierra.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#include <linux/init.h>
14#include <linux/interrupt.h>
15#include <linux/kernel.h>
16#include <linux/bitops.h>
17
18#include <asm/mipsregs.h>
19#include <asm/system.h>
20
21#include <msp_slp_int.h>
22#include <msp_regs.h>
23
24static inline void unmask_msp_slp_irq(unsigned int irq)
25{
26 /* check for PER interrupt range */
27 if (irq < MSP_PER_INTBASE)
28 *SLP_INT_MSK_REG |= (1 << (irq - MSP_SLP_INTBASE));
29 else
30 *PER_INT_MSK_REG |= (1 << (irq - MSP_PER_INTBASE));
31}
32
33static inline void mask_msp_slp_irq(unsigned int irq)
34{
35 /* check for PER interrupt range */
36 if (irq < MSP_PER_INTBASE)
37 *SLP_INT_MSK_REG &= ~(1 << (irq - MSP_SLP_INTBASE));
38 else
39 *PER_INT_MSK_REG &= ~(1 << (irq - MSP_PER_INTBASE));
40}
41
42/*
43 * While we ack the interrupt interrupts are disabled and thus we don't need
44 * to deal with concurrency issues. Same for msp_slp_irq_end.
45 */
46static inline void ack_msp_slp_irq(unsigned int irq)
47{
48 mask_slp_irq(irq);
49
50 /*
51 * only really necessary for 18, 16-14 and sometimes 3:0 (since
52 * these can be edge sensitive) but it doesn't hurt for the others.
53 */
54
55 /* check for PER interrupt range */
56 if (irq < MSP_PER_INTBASE)
57 *SLP_INT_STS_REG = (1 << (irq - MSP_SLP_INTBASE));
58 else
59 *PER_INT_STS_REG = (1 << (irq - MSP_PER_INTBASE));
60}
61
62static struct irq_chip msp_slp_irq_controller = {
63 .name = "MSP_SLP",
64 .ack = ack_msp_slp_irq,
65 .mask = ack_msp_slp_irq,
66 .mask_ack = ack_msp_slp_irq,
67 .unmask = unmask_msp_slp_irq,
68};
69
70void __init msp_slp_irq_init(void)
71{
72 int i;
73
74 /* Mask/clear interrupts. */
75 *SLP_INT_MSK_REG = 0x00000000;
76 *PER_INT_MSK_REG = 0x00000000;
77 *SLP_INT_STS_REG = 0xFFFFFFFF;
78 *PER_INT_STS_REG = 0xFFFFFFFF;
79
80 /* initialize all the IRQ descriptors */
81 for (i = MSP_SLP_INTBASE; i < MSP_PER_INTBASE + 32; i++)
82 set_irq_chip_and_handler(i, &msp_slp_irq_controller
83 handle_level_irq);
84}
85
86void msp_slp_irq_dispatch(void)
87{
88 u32 pending;
89 int intbase;
90
91 intbase = MSP_SLP_INTBASE;
92 pending = *SLP_INT_STS_REG & *SLP_INT_MSK_REG;
93
94 /* check for PER interrupt */
95 if (pending == (1 << (MSP_INT_PER - MSP_SLP_INTBASE))) {
96 intbase = MSP_PER_INTBASE;
97 pending = *PER_INT_STS_REG & *PER_INT_MSK_REG;
98 }
99
100 /* check for spurious interrupt */
101 if (pending == 0x00000000) {
102 printk(KERN_ERR "Spurious %s interrupt?\n",
103 (intbase == MSP_SLP_INTBASE) ? "SLP" : "PER");
104 return;
105 }
106
107 /* dispatch the irq */
108 do_IRQ(ffs(pending) + intbase - 1);
109}
diff --git a/arch/mips/momentum/ocelot_3/ocelot_3_fpga.h b/arch/mips/pmc-sierra/msp71xx/msp_pci.c
index 5710a9029f1c..f764fe7748d6 100644
--- a/arch/mips/momentum/ocelot_3/ocelot_3_fpga.h
+++ b/arch/mips/pmc-sierra/msp71xx/msp_pci.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Ocelot-3 Board Register Definitions 2 * The setup file for PCI related hardware on PMC-Sierra MSP processors.
3 * 3 *
4 * (C) 2002 Momentum Computer Inc. 4 * Copyright 2005-2006 PMC-Sierra, 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
@@ -22,38 +22,29 @@
22 * You should have received a copy of the GNU General Public License along 22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc., 23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA. 24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 *
26 * Louis Hamilton, Red Hat, Inc.
27 * hamilton@redhat.com [MIPS64 modifications]
28 *
29 * Copyright (C) 2004 MontaVista Software Inc.
30 * Author: Manish Lachwani, mlachwani@mvista.com
31 */ 25 */
32 26
33#ifndef __OCELOT_3_FPGA_H__ 27#include <linux/init.h>
34#define __OCELOT_3_FPGA_H__ 28
35 29#include <msp_prom.h>
36#define OCELOT_3_REG_BOARDREV 0x0 30#include <msp_regs.h>
37#define OCELOT_3_REG_FPGA_REV 0x1 31
38#define OCELOT_3_REG_FPGA_TYPE 0x2 32extern void msp_pci_init(void);
39#define OCELOT_3_REG_RESET_STATUS 0x3
40#define OCELOT_3_REG_BOARD_STATUS 0x4
41#define OCELOT_3_REG_CPCI_ID 0x5
42#define OCELOT_3_REG_SET 0x6
43#define OCELOT_3_REG_CLR 0x7
44#define OCELOT_3_REG_EEPROM_MODE 0x9
45#define OCELOT_3_REG_INTMASK 0xa
46#define OCELOT_3_REG_INTSTAT 0xb
47#define OCELOT_3_REG_UART_INTMASK 0xc
48#define OCELOT_3_REG_UART_INTSTAT 0xd
49#define OCELOT_3_REG_INTSET 0xe
50#define OCELOT_3_REG_INTCLR 0xf
51
52extern unsigned long ocelot_fpga_base;
53
54#define __FPGA_REG_TO_ADDR(reg) \
55 ((void *) ocelot_fpga_base + OCELOT_3_REG_##reg)
56#define OCELOT_FPGA_WRITE(x, reg) writeb(x, __FPGA_REG_TO_ADDR(reg))
57#define OCELOT_FPGA_READ(reg) readb(__FPGA_REG_TO_ADDR(reg))
58 33
34static int __init msp_pci_setup(void)
35{
36#if 0 /* Linux 2.6 initialization code to be completed */
37 if (getdeviceid() & DEV_ID_SINGLE_PC) {
38 /* If single card mode */
39 slmRegs *sreg = (slmRegs *) SREG_BASE;
40
41 sreg->single_pc_enable = SINGLE_PCCARD;
42 }
59#endif 43#endif
44
45 msp_pci_init();
46
47 return 0;
48}
49
50subsys_initcall(msp_pci_setup);
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_prom.c b/arch/mips/pmc-sierra/msp71xx/msp_prom.c
new file mode 100644
index 000000000000..e5bd5481d8db
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_prom.c
@@ -0,0 +1,566 @@
1/*
2 * BRIEF MODULE DESCRIPTION
3 * PROM library initialisation code, assuming a version of
4 * pmon is the boot code.
5 *
6 * Copyright 2000,2001 MontaVista Software Inc.
7 * Author: MontaVista Software, Inc.
8 * ppopov@mvista.com or source@mvista.com
9 *
10 * This file was derived from Carsten Langgaard's
11 * arch/mips/mips-boards/xx files.
12 *
13 * Carsten Langgaard, carstenl@mips.com
14 * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
15 *
16 * This program is free software; you can redistribute it and/or modify it
17 * under the terms of the GNU General Public License as published by the
18 * Free Software Foundation; either version 2 of the License, or (at your
19 * option) any later version.
20 *
21 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
22 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
24 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
27 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * You should have received a copy of the GNU General Public License along
33 * with this program; if not, write to the Free Software Foundation, Inc.,
34 * 675 Mass Ave, Cambridge, MA 02139, USA.
35 */
36
37#include <linux/module.h>
38#include <linux/kernel.h>
39#include <linux/init.h>
40#include <linux/string.h>
41#include <linux/interrupt.h>
42#include <linux/mm.h>
43#ifdef CONFIG_CRAMFS
44#include <linux/cramfs_fs.h>
45#endif
46#ifdef CONFIG_SQUASHFS
47#include <linux/squashfs_fs.h>
48#endif
49
50#include <asm/addrspace.h>
51#include <asm/bootinfo.h>
52#include <asm-generic/sections.h>
53#include <asm/page.h>
54
55#include <msp_prom.h>
56#include <msp_regs.h>
57
58/* global PROM environment variables and pointers */
59int prom_argc;
60char **prom_argv, **prom_envp;
61int *prom_vec;
62
63/* debug flag */
64int init_debug = 1;
65
66/* memory blocks */
67struct prom_pmemblock mdesc[PROM_MAX_PMEMBLOCKS];
68
69/* default feature sets */
70static char msp_default_features[] =
71#if defined(CONFIG_PMC_MSP4200_EVAL) \
72 || defined(CONFIG_PMC_MSP4200_GW)
73 "ERER";
74#elif defined(CONFIG_PMC_MSP7120_EVAL) \
75 || defined(CONFIG_PMC_MSP7120_GW)
76 "EMEMSP";
77#elif defined(CONFIG_PMC_MSP7120_FPGA)
78 "EMEM";
79#endif
80
81/* conversion functions */
82static inline unsigned char str2hexnum(unsigned char c)
83{
84 if (c >= '0' && c <= '9')
85 return c - '0';
86 if (c >= 'a' && c <= 'f')
87 return c - 'a' + 10;
88 return 0; /* foo */
89}
90
91static inline int str2eaddr(unsigned char *ea, unsigned char *str)
92{
93 int index = 0;
94 unsigned char num = 0;
95
96 while (*str != '\0') {
97 if ((*str == '.') || (*str == ':')) {
98 ea[index++] = num;
99 num = 0;
100 str++;
101 } else {
102 num = num << 4;
103 num |= str2hexnum(*str++);
104 }
105 }
106
107 if (index == 5) {
108 ea[index++] = num;
109 return 0;
110 } else
111 return -1;
112}
113EXPORT_SYMBOL(str2eaddr);
114
115static inline unsigned long str2hex(unsigned char *str)
116{
117 int value = 0;
118
119 while (*str) {
120 value = value << 4;
121 value |= str2hexnum(*str++);
122 }
123
124 return value;
125}
126
127/* function to query the system information */
128const char *get_system_type(void)
129{
130#if defined(CONFIG_PMC_MSP4200_EVAL)
131 return "PMC-Sierra MSP4200 Eval Board";
132#elif defined(CONFIG_PMC_MSP4200_GW)
133 return "PMC-Sierra MSP4200 VoIP Gateway";
134#elif defined(CONFIG_PMC_MSP7120_EVAL)
135 return "PMC-Sierra MSP7120 Eval Board";
136#elif defined(CONFIG_PMC_MSP7120_GW)
137 return "PMC-Sierra MSP7120 Residential Gateway";
138#elif defined(CONFIG_PMC_MSP7120_FPGA)
139 return "PMC-Sierra MSP7120 FPGA";
140#else
141 #error "What is the type of *your* MSP?"
142#endif
143}
144
145int get_ethernet_addr(char *ethaddr_name, char *ethernet_addr)
146{
147 char *ethaddr_str;
148
149 ethaddr_str = prom_getenv(ethaddr_name);
150 if (!ethaddr_str) {
151 printk(KERN_WARNING "%s not set in boot prom\n", ethaddr_name);
152 return -1;
153 }
154
155 if (str2eaddr(ethernet_addr, ethaddr_str) == -1) {
156 printk(KERN_WARNING "%s badly formatted-<%s>\n",
157 ethaddr_name, ethaddr_str);
158 return -1;
159 }
160
161 if (init_debug > 1) {
162 int i;
163 printk(KERN_DEBUG "get_ethernet_addr: for %s ", ethaddr_name);
164 for (i = 0; i < 5; i++)
165 printk(KERN_DEBUG "%02x:",
166 (unsigned char)*(ethernet_addr+i));
167 printk(KERN_DEBUG "%02x\n", *(ethernet_addr+i));
168 }
169
170 return 0;
171}
172EXPORT_SYMBOL(get_ethernet_addr);
173
174static char *get_features(void)
175{
176 char *feature = prom_getenv(FEATURES);
177
178 if (feature == NULL) {
179 /* default features based on MACHINE_TYPE */
180 feature = msp_default_features;
181 }
182
183 return feature;
184}
185
186static char test_feature(char c)
187{
188 char *feature = get_features();
189
190 while (*feature) {
191 if (*feature++ == c)
192 return *feature;
193 feature++;
194 }
195
196 return FEATURE_NOEXIST;
197}
198
199unsigned long get_deviceid(void)
200{
201 char *deviceid = prom_getenv(DEVICEID);
202
203 if (deviceid == NULL)
204 return *DEV_ID_REG;
205 else
206 return str2hex(deviceid);
207}
208
209char identify_pci(void)
210{
211 return test_feature(PCI_KEY);
212}
213EXPORT_SYMBOL(identify_pci);
214
215char identify_pcimux(void)
216{
217 return test_feature(PCIMUX_KEY);
218}
219
220char identify_sec(void)
221{
222 return test_feature(SEC_KEY);
223}
224EXPORT_SYMBOL(identify_sec);
225
226char identify_spad(void)
227{
228 return test_feature(SPAD_KEY);
229}
230EXPORT_SYMBOL(identify_spad);
231
232char identify_tdm(void)
233{
234 return test_feature(TDM_KEY);
235}
236EXPORT_SYMBOL(identify_tdm);
237
238char identify_zsp(void)
239{
240 return test_feature(ZSP_KEY);
241}
242EXPORT_SYMBOL(identify_zsp);
243
244static char identify_enetfeature(char key, unsigned long interface_num)
245{
246 char *feature = get_features();
247
248 while (*feature) {
249 if (*feature++ == key && interface_num-- == 0)
250 return *feature;
251 feature++;
252 }
253
254 return FEATURE_NOEXIST;
255}
256
257char identify_enet(unsigned long interface_num)
258{
259 return identify_enetfeature(ENET_KEY, interface_num);
260}
261EXPORT_SYMBOL(identify_enet);
262
263char identify_enetTxD(unsigned long interface_num)
264{
265 return identify_enetfeature(ENETTXD_KEY, interface_num);
266}
267EXPORT_SYMBOL(identify_enetTxD);
268
269unsigned long identify_family(void)
270{
271 unsigned long deviceid;
272
273 deviceid = get_deviceid();
274
275 return deviceid & CPU_DEVID_FAMILY;
276}
277EXPORT_SYMBOL(identify_family);
278
279unsigned long identify_revision(void)
280{
281 unsigned long deviceid;
282
283 deviceid = get_deviceid();
284
285 return deviceid & CPU_DEVID_REVISION;
286}
287EXPORT_SYMBOL(identify_revision);
288
289/* PROM environment functions */
290char *prom_getenv(char *env_name)
291{
292 /*
293 * Return a pointer to the given environment variable. prom_envp
294 * points to a null terminated array of pointers to variables.
295 * Environment variables are stored in the form of "memsize=64"
296 */
297
298 char **var = prom_envp;
299 int i = strlen(env_name);
300
301 while (*var) {
302 if (strncmp(env_name, *var, i) == 0) {
303 return (*var + strlen(env_name) + 1);
304 }
305 var++;
306 }
307
308 return NULL;
309}
310
311/* PROM commandline functions */
312char *prom_getcmdline(void)
313{
314 return &(arcs_cmdline[0]);
315}
316EXPORT_SYMBOL(prom_getcmdline);
317
318void __init prom_init_cmdline(void)
319{
320 char *cp;
321 int actr;
322
323 actr = 1; /* Always ignore argv[0] */
324
325 cp = &(arcs_cmdline[0]);
326 while (actr < prom_argc) {
327 strcpy(cp, prom_argv[actr]);
328 cp += strlen(prom_argv[actr]);
329 *cp++ = ' ';
330 actr++;
331 }
332 if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
333 --cp;
334 *cp = '\0';
335}
336
337/* memory allocation functions */
338static int __init prom_memtype_classify(unsigned int type)
339{
340 switch (type) {
341 case yamon_free:
342 return BOOT_MEM_RAM;
343 case yamon_prom:
344 return BOOT_MEM_ROM_DATA;
345 default:
346 return BOOT_MEM_RESERVED;
347 }
348}
349
350void __init prom_meminit(void)
351{
352 struct prom_pmemblock *p;
353
354 p = prom_getmdesc();
355
356 while (p->size) {
357 long type;
358 unsigned long base, size;
359
360 type = prom_memtype_classify(p->type);
361 base = p->base;
362 size = p->size;
363
364 add_memory_region(base, size, type);
365 p++;
366 }
367}
368
369void __init prom_free_prom_memory(void)
370{
371 int argc;
372 char **argv;
373 char **envp;
374 char *ptr;
375 int len = 0;
376 int i;
377 unsigned long addr;
378
379 /*
380 * preserve environment variables and command line from pmon/bbload
381 * first preserve the command line
382 */
383 for (argc = 0; argc < prom_argc; argc++) {
384 len += sizeof(char *); /* length of pointer */
385 len += strlen(prom_argv[argc]) + 1; /* length of string */
386 }
387 len += sizeof(char *); /* plus length of null pointer */
388
389 argv = kmalloc(len, GFP_KERNEL);
390 ptr = (char *) &argv[prom_argc + 1]; /* strings follow array */
391
392 for (argc = 0; argc < prom_argc; argc++) {
393 argv[argc] = ptr;
394 strcpy(ptr, prom_argv[argc]);
395 ptr += strlen(prom_argv[argc]) + 1;
396 }
397 argv[prom_argc] = NULL; /* end array with null pointer */
398 prom_argv = argv;
399
400 /* next preserve the environment variables */
401 len = 0;
402 i = 0;
403 for (envp = prom_envp; *envp != NULL; envp++) {
404 i++; /* count number of environment variables */
405 len += sizeof(char *); /* length of pointer */
406 len += strlen(*envp) + 1; /* length of string */
407 }
408 len += sizeof(char *); /* plus length of null pointer */
409
410 envp = kmalloc(len, GFP_KERNEL);
411 ptr = (char *) &envp[i+1];
412
413 for (argc = 0; argc < i; argc++) {
414 envp[argc] = ptr;
415 strcpy(ptr, prom_envp[argc]);
416 ptr += strlen(prom_envp[argc]) + 1;
417 }
418 envp[i] = NULL; /* end array with null pointer */
419 prom_envp = envp;
420
421 for (i = 0; i < boot_mem_map.nr_map; i++) {
422 if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA)
423 continue;
424
425 addr = boot_mem_map.map[i].addr;
426 free_init_pages("prom memory",
427 addr, addr + boot_mem_map.map[i].size);
428 }
429}
430
431struct prom_pmemblock *__init prom_getmdesc(void)
432{
433 static char memsz_env[] __initdata = "memsize";
434 static char heaptop_env[] __initdata = "heaptop";
435 char *str;
436 unsigned int memsize;
437 unsigned int heaptop;
438#ifdef CONFIG_MTD_PMC_MSP_RAMROOT
439 void *ramroot_start;
440 unsigned long ramroot_size;
441#endif
442 int i;
443
444 str = prom_getenv(memsz_env);
445 if (!str) {
446 ppfinit("memsize not set in boot prom, "
447 "set to default (32Mb)\n");
448 memsize = 0x02000000;
449 } else {
450 memsize = simple_strtol(str, NULL, 0);
451
452 if (memsize == 0) {
453 /* if memsize is a bad size, use reasonable default */
454 memsize = 0x02000000;
455 }
456
457 /* convert to physical address (removing caching bits, etc) */
458 memsize = CPHYSADDR(memsize);
459 }
460
461 str = prom_getenv(heaptop_env);
462 if (!str) {
463 heaptop = CPHYSADDR((u32)&_text);
464 ppfinit("heaptop not set in boot prom, "
465 "set to default 0x%08x\n", heaptop);
466 } else {
467 heaptop = simple_strtol(str, NULL, 16);
468 if (heaptop == 0) {
469 /* heaptop conversion bad, might have 0xValue */
470 heaptop = simple_strtol(str, NULL, 0);
471
472 if (heaptop == 0) {
473 /* heaptop still bad, use reasonable default */
474 heaptop = CPHYSADDR((u32)&_text);
475 }
476 }
477
478 /* convert to physical address (removing caching bits, etc) */
479 heaptop = CPHYSADDR((u32)heaptop);
480 }
481
482 /* the base region */
483 i = 0;
484 mdesc[i].type = BOOT_MEM_RESERVED;
485 mdesc[i].base = 0x00000000;
486 mdesc[i].size = PAGE_ALIGN(0x300 + 0x80);
487 /* jtag interrupt vector + sizeof vector */
488
489 /* PMON data */
490 if (heaptop > mdesc[i].base + mdesc[i].size) {
491 i++; /* 1 */
492 mdesc[i].type = BOOT_MEM_ROM_DATA;
493 mdesc[i].base = mdesc[i-1].base + mdesc[i-1].size;
494 mdesc[i].size = heaptop - mdesc[i].base;
495 }
496
497 /* end of PMON data to start of kernel -- probably zero .. */
498 if (heaptop != CPHYSADDR((u32)_text)) {
499 i++; /* 2 */
500 mdesc[i].type = BOOT_MEM_RAM;
501 mdesc[i].base = heaptop;
502 mdesc[i].size = CPHYSADDR((u32)_text) - mdesc[i].base;
503 }
504
505 /* kernel proper */
506 i++; /* 3 */
507 mdesc[i].type = BOOT_MEM_RESERVED;
508 mdesc[i].base = CPHYSADDR((u32)_text);
509#ifdef CONFIG_MTD_PMC_MSP_RAMROOT
510 if (get_ramroot(&ramroot_start, &ramroot_size)) {
511 /*
512 * Rootfs in RAM -- follows kernel
513 * Combine rootfs image with kernel block so a
514 * page (4k) isn't wasted between memory blocks
515 */
516 mdesc[i].size = CPHYSADDR(PAGE_ALIGN(
517 (u32)ramroot_start + ramroot_size)) - mdesc[i].base;
518 } else
519#endif
520 mdesc[i].size = CPHYSADDR(PAGE_ALIGN(
521 (u32)_end)) - mdesc[i].base;
522
523 /* Remainder of RAM -- under memsize */
524 i++; /* 5 */
525 mdesc[i].type = yamon_free;
526 mdesc[i].base = mdesc[i-1].base + mdesc[i-1].size;
527 mdesc[i].size = memsize - mdesc[i].base;
528
529 return &mdesc[0];
530}
531
532/* rootfs functions */
533#ifdef CONFIG_MTD_PMC_MSP_RAMROOT
534bool get_ramroot(void **start, unsigned long *size)
535{
536 extern char _end[];
537
538 /* Check for start following the end of the kernel */
539 void *check_start = (void *)_end;
540
541 /* Check for supported rootfs types */
542#ifdef CONFIG_CRAMFS
543 if (*(__u32 *)check_start == CRAMFS_MAGIC) {
544 /* Get CRAMFS size */
545 *start = check_start;
546 *size = PAGE_ALIGN(((struct cramfs_super *)
547 check_start)->size);
548
549 return true;
550 }
551#endif
552#ifdef CONFIG_SQUASHFS
553 if (*((unsigned int *)check_start) == SQUASHFS_MAGIC) {
554 /* Get SQUASHFS size */
555 *start = check_start;
556 *size = PAGE_ALIGN(((struct squashfs_super_block *)
557 check_start)->bytes_used);
558
559 return true;
560 }
561#endif
562
563 return false;
564}
565EXPORT_SYMBOL(get_ramroot);
566#endif
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_serial.c b/arch/mips/pmc-sierra/msp71xx/msp_serial.c
index c41b53faa8f6..e25bac537d77 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_serial.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_serial.c
@@ -32,6 +32,7 @@
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/processor.h> 33#include <asm/processor.h>
34#include <asm/serial.h> 34#include <asm/serial.h>
35#include <linux/serial_8250.h>
35 36
36#include <msp_prom.h> 37#include <msp_prom.h>
37#include <msp_int.h> 38#include <msp_int.h>
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_setup.c b/arch/mips/pmc-sierra/msp71xx/msp_setup.c
new file mode 100644
index 000000000000..8f69b789be90
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_setup.c
@@ -0,0 +1,256 @@
1/*
2 * The generic setup file for PMC-Sierra MSP processors
3 *
4 * Copyright 2005-2007 PMC-Sierra, Inc,
5 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
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#include <asm/bootinfo.h>
14#include <asm/cacheflush.h>
15#include <asm/r4kcache.h>
16#include <asm/reboot.h>
17#include <asm/time.h>
18
19#include <msp_prom.h>
20#include <msp_regs.h>
21
22#if defined(CONFIG_PMC_MSP7120_GW)
23#include <msp_regops.h>
24#include <msp_gpio.h>
25#define MSP_BOARD_RESET_GPIO 9
26#endif
27
28extern void msp_timer_init(void);
29extern void msp_serial_setup(void);
30extern void pmctwiled_setup(void);
31
32#if defined(CONFIG_PMC_MSP7120_EVAL) || \
33 defined(CONFIG_PMC_MSP7120_GW) || \
34 defined(CONFIG_PMC_MSP7120_FPGA)
35/*
36 * Performs the reset for MSP7120-based boards
37 */
38void msp7120_reset(void)
39{
40 void *start, *end, *iptr;
41 register int i;
42
43 /* Diasble all interrupts */
44 local_irq_disable();
45#ifdef CONFIG_SYS_SUPPORTS_MULTITHREADING
46 dvpe();
47#endif
48
49 /* Cache the reset code of this function */
50 __asm__ __volatile__ (
51 " .set push \n"
52 " .set mips3 \n"
53 " la %0,startpoint \n"
54 " la %1,endpoint \n"
55 " .set pop \n"
56 : "=r" (start), "=r" (end)
57 :
58 );
59
60 for (iptr = (void *)((unsigned int)start & ~(L1_CACHE_BYTES - 1));
61 iptr < end; iptr += L1_CACHE_BYTES)
62 cache_op(Fill, iptr);
63
64 __asm__ __volatile__ (
65 "startpoint: \n"
66 );
67
68 /* Put the DDRC into self-refresh mode */
69 DDRC_INDIRECT_WRITE(DDRC_CTL(10), 0xb, 1 << 16);
70
71 /*
72 * IMPORTANT!
73 * DO NOT do anything from here on out that might even
74 * think about fetching from RAM - i.e., don't call any
75 * non-inlined functions, and be VERY sure that any inline
76 * functions you do call do NOT access any sort of RAM
77 * anywhere!
78 */
79
80 /* Wait a bit for the DDRC to settle */
81 for (i = 0; i < 100000000; i++);
82
83#if defined(CONFIG_PMC_MSP7120_GW)
84 /*
85 * Set GPIO 9 HI, (tied to board reset logic)
86 * GPIO 9 is the 4th GPIO of register 3
87 *
88 * NOTE: We cannot use the higher-level msp_gpio_mode()/out()
89 * as GPIO char driver may not be enabled and it would look up
90 * data inRAM!
91 */
92 set_value_reg32(GPIO_CFG3_REG,
93 basic_mode_mask(MSP_BOARD_RESET_GPIO),
94 basic_mode(MSP_GPIO_OUTPUT, MSP_BOARD_RESET_GPIO));
95 set_reg32(GPIO_DATA3_REG,
96 basic_data_mask(MSP_BOARD_RESET_GPIO));
97
98 /*
99 * In case GPIO9 doesn't reset the board (jumper configurable!)
100 * fallback to device reset below.
101 */
102#endif
103 /* Set bit 1 of the MSP7120 reset register */
104 *RST_SET_REG = 0x00000001;
105
106 __asm__ __volatile__ (
107 "endpoint: \n"
108 );
109}
110#endif
111
112void msp_restart(char *command)
113{
114 printk(KERN_WARNING "Now rebooting .......\n");
115
116#if defined(CONFIG_PMC_MSP7120_EVAL) || \
117 defined(CONFIG_PMC_MSP7120_GW) || \
118 defined(CONFIG_PMC_MSP7120_FPGA)
119 msp7120_reset();
120#else
121 /* No chip-specific reset code, just jump to the ROM reset vector */
122 set_c0_status(ST0_BEV | ST0_ERL);
123 change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED);
124 flush_cache_all();
125 write_c0_wired(0);
126
127 __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000));
128#endif
129}
130
131void msp_halt(void)
132{
133 printk(KERN_WARNING "\n** You can safely turn off the power\n");
134 while (1)
135 /* If possible call official function to get CPU WARs */
136 if (cpu_wait)
137 (*cpu_wait)();
138 else
139 __asm__(".set\tmips3\n\t" "wait\n\t" ".set\tmips0");
140}
141
142void msp_power_off(void)
143{
144 msp_halt();
145}
146
147void __init plat_mem_setup(void)
148{
149 _machine_restart = msp_restart;
150 _machine_halt = msp_halt;
151 pm_power_off = msp_power_off;
152
153 board_time_init = msp_timer_init;
154}
155
156void __init prom_init(void)
157{
158 unsigned long family;
159 unsigned long revision;
160
161 prom_argc = fw_arg0;
162 prom_argv = (char **)fw_arg1;
163 prom_envp = (char **)fw_arg2;
164
165 /*
166 * Someday we can use this with PMON2000 to get a
167 * platform call prom routines for output etc. without
168 * having to use grody hacks. For now it's unused.
169 *
170 * struct callvectors *cv = (struct callvectors *) fw_arg3;
171 */
172 family = identify_family();
173 revision = identify_revision();
174
175 switch (family) {
176 case FAMILY_FPGA:
177 if (FPGA_IS_MSP4200(revision)) {
178 /* Old-style revision ID */
179 mips_machgroup = MACH_GROUP_MSP;
180 mips_machtype = MACH_MSP4200_FPGA;
181 } else {
182 mips_machgroup = MACH_GROUP_MSP;
183 mips_machtype = MACH_MSP_OTHER;
184 }
185 break;
186
187 case FAMILY_MSP4200:
188 mips_machgroup = MACH_GROUP_MSP;
189#if defined(CONFIG_PMC_MSP4200_EVAL)
190 mips_machtype = MACH_MSP4200_EVAL;
191#elif defined(CONFIG_PMC_MSP4200_GW)
192 mips_machtype = MACH_MSP4200_GW;
193#else
194 mips_machtype = MACH_MSP_OTHER;
195#endif
196 break;
197
198 case FAMILY_MSP4200_FPGA:
199 mips_machgroup = MACH_GROUP_MSP;
200 mips_machtype = MACH_MSP4200_FPGA;
201 break;
202
203 case FAMILY_MSP7100:
204 mips_machgroup = MACH_GROUP_MSP;
205#if defined(CONFIG_PMC_MSP7120_EVAL)
206 mips_machtype = MACH_MSP7120_EVAL;
207#elif defined(CONFIG_PMC_MSP7120_GW)
208 mips_machtype = MACH_MSP7120_GW;
209#else
210 mips_machtype = MACH_MSP_OTHER;
211#endif
212 break;
213
214 case FAMILY_MSP7100_FPGA:
215 mips_machgroup = MACH_GROUP_MSP;
216 mips_machtype = MACH_MSP7120_FPGA;
217 break;
218
219 default:
220 /* we don't recognize the machine */
221 mips_machgroup = MACH_GROUP_UNKNOWN;
222 mips_machtype = MACH_UNKNOWN;
223 break;
224 }
225
226 /* make sure we have the right initialization routine - sanity */
227 if (mips_machgroup != MACH_GROUP_MSP) {
228 ppfinit("Unknown machine group in a "
229 "MSP initialization routine\n");
230 panic("***Bogosity factor five***, exiting\n");
231 }
232
233 prom_init_cmdline();
234
235 prom_meminit();
236
237 /*
238 * Sub-system setup follows.
239 * Setup functions can either be called here or using the
240 * subsys_initcall mechanism (i.e. see msp_pci_setup). The
241 * order in which they are called can be changed by using the
242 * link order in arch/mips/pmc-sierra/msp71xx/Makefile.
243 *
244 * NOTE: Please keep sub-system specific initialization code
245 * in separate specific files.
246 */
247 msp_serial_setup();
248
249#ifdef CONFIG_PMCTWILED
250 /*
251 * Setup LED states before the subsys_initcall loads other
252 * dependant drivers/modules.
253 */
254 pmctwiled_setup();
255#endif
256}
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_time.c b/arch/mips/pmc-sierra/msp71xx/msp_time.c
new file mode 100644
index 000000000000..2a2beac5a4f8
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_time.c
@@ -0,0 +1,94 @@
1/*
2 * Setting up the clock on MSP SOCs. No RTC typically.
3 *
4 * Carsten Langgaard, carstenl@mips.com
5 * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
6 *
7 * ########################################################################
8 *
9 * This program is free software; you can distribute it and/or modify it
10 * under the terms of the GNU General Public License (Version 2) as
11 * published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 * for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
21 *
22 * ########################################################################
23 */
24
25#include <linux/init.h>
26#include <linux/kernel_stat.h>
27#include <linux/sched.h>
28#include <linux/spinlock.h>
29#include <linux/module.h>
30#include <linux/ptrace.h>
31
32#include <asm/mipsregs.h>
33#include <asm/time.h>
34
35#include <msp_prom.h>
36#include <msp_int.h>
37#include <msp_regs.h>
38
39void __init msp_timer_init(void)
40{
41 char *endp, *s;
42 unsigned long cpu_rate = 0;
43
44 if (cpu_rate == 0) {
45 s = prom_getenv("clkfreqhz");
46 cpu_rate = simple_strtoul(s, &endp, 10);
47 if (endp != NULL && *endp != 0) {
48 printk(KERN_ERR
49 "Clock rate in Hz parse error: %s\n", s);
50 cpu_rate = 0;
51 }
52 }
53
54 if (cpu_rate == 0) {
55 s = prom_getenv("clkfreq");
56 cpu_rate = 1000 * simple_strtoul(s, &endp, 10);
57 if (endp != NULL && *endp != 0) {
58 printk(KERN_ERR
59 "Clock rate in MHz parse error: %s\n", s);
60 cpu_rate = 0;
61 }
62 }
63
64 if (cpu_rate == 0) {
65#if defined(CONFIG_PMC_MSP7120_EVAL) \
66 || defined(CONFIG_PMC_MSP7120_GW)
67 cpu_rate = 400000000;
68#elif defined(CONFIG_PMC_MSP7120_FPGA)
69 cpu_rate = 25000000;
70#else
71 cpu_rate = 150000000;
72#endif
73 printk(KERN_ERR
74 "Failed to determine CPU clock rate, "
75 "assuming %ld hz ...\n", cpu_rate);
76 }
77
78 printk(KERN_WARNING "Clock rate set to %ld\n", cpu_rate);
79
80 /* timer frequency is 1/2 clock rate */
81 mips_hpt_frequency = cpu_rate/2;
82}
83
84
85void __init plat_timer_setup(struct irqaction *irq)
86{
87#ifdef CONFIG_IRQ_MSP_CIC
88 /* we are using the vpe0 counter for timer interrupts */
89 setup_irq(MSP_INT_VPE0_TIMER, irq);
90#else
91 /* we are using the mips counter for timer interrupts */
92 setup_irq(MSP_INT_TIMER, irq);
93#endif
94}
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_usb.c b/arch/mips/pmc-sierra/msp71xx/msp_usb.c
new file mode 100644
index 000000000000..21f9c70b6923
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_usb.c
@@ -0,0 +1,150 @@
1/*
2 * The setup file for USB related hardware on PMC-Sierra MSP processors.
3 *
4 * Copyright 2006-2007 PMC-Sierra, 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 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
12 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
14 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
15 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26
27#include <linux/dma-mapping.h>
28#include <linux/init.h>
29#include <linux/ioport.h>
30#include <linux/platform_device.h>
31
32#include <asm/mipsregs.h>
33
34#include <msp_regs.h>
35#include <msp_int.h>
36#include <msp_prom.h>
37
38#if defined(CONFIG_USB_EHCI_HCD)
39static struct resource msp_usbhost_resources [] = {
40 [0] = {
41 .start = MSP_USB_BASE_START,
42 .end = MSP_USB_BASE_END,
43 .flags = IORESOURCE_MEM,
44 },
45 [1] = {
46 .start = MSP_INT_USB,
47 .end = MSP_INT_USB,
48 .flags = IORESOURCE_IRQ,
49 },
50};
51
52static u64 msp_usbhost_dma_mask = DMA_32BIT_MASK;
53
54static struct platform_device msp_usbhost_device = {
55 .name = "pmcmsp-ehci",
56 .id = 0,
57 .dev = {
58 .dma_mask = &msp_usbhost_dma_mask,
59 .coherent_dma_mask = DMA_32BIT_MASK,
60 },
61 .num_resources = ARRAY_SIZE (msp_usbhost_resources),
62 .resource = msp_usbhost_resources,
63};
64#endif /* CONFIG_USB_EHCI_HCD */
65
66#if defined(CONFIG_USB_GADGET)
67static struct resource msp_usbdev_resources [] = {
68 [0] = {
69 .start = MSP_USB_BASE,
70 .end = MSP_USB_BASE_END,
71 .flags = IORESOURCE_MEM,
72 },
73 [1] = {
74 .start = MSP_INT_USB,
75 .end = MSP_INT_USB,
76 .flags = IORESOURCE_IRQ,
77 },
78};
79
80static u64 msp_usbdev_dma_mask = DMA_32BIT_MASK;
81
82static struct platform_device msp_usbdev_device = {
83 .name = "msp71xx_udc",
84 .id = 0,
85 .dev = {
86 .dma_mask = &msp_usbdev_dma_mask,
87 .coherent_dma_mask = DMA_32BIT_MASK,
88 },
89 .num_resources = ARRAY_SIZE (msp_usbdev_resources),
90 .resource = msp_usbdev_resources,
91};
92#endif /* CONFIG_USB_GADGET */
93
94#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_GADGET)
95static struct platform_device *msp_devs[1];
96#endif
97
98
99static int __init msp_usb_setup(void)
100{
101#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_GADGET)
102 char *strp;
103 char envstr[32];
104 unsigned int val = 0;
105 int result = 0;
106
107 /*
108 * construct environment name usbmode
109 * set usbmode <host/device> as pmon environment var
110 */
111 snprintf((char *)&envstr[0], sizeof(envstr), "usbmode");
112
113#if defined(CONFIG_USB_EHCI_HCD)
114 /* default to host mode */
115 val = 1;
116#endif
117
118 /* get environment string */
119 strp = prom_getenv((char *)&envstr[0]);
120 if (strp) {
121 if (!strcmp(strp, "device"))
122 val = 0;
123 }
124
125 if (val) {
126#if defined(CONFIG_USB_EHCI_HCD)
127 /* get host mode device */
128 msp_devs[0] = &msp_usbhost_device;
129 ppfinit("platform add USB HOST done %s.\n",
130 msp_devs[0]->name);
131
132 result = platform_add_devices(msp_devs, ARRAY_SIZE (msp_devs));
133#endif /* CONFIG_USB_EHCI_HCD */
134 }
135#if defined(CONFIG_USB_GADGET)
136 else {
137 /* get device mode structure */
138 msp_devs[0] = &msp_usbdev_device;
139 ppfinit("platform add USB DEVICE done %s.\n",
140 msp_devs[0]->name);
141
142 result = platform_add_devices(msp_devs, ARRAY_SIZE (msp_devs));
143 }
144#endif /* CONFIG_USB_GADGET */
145#endif /* CONFIG_USB_EHCI_HCD || CONFIG_USB_GADGET */
146
147 return result;
148}
149
150subsys_initcall(msp_usb_setup);
diff --git a/arch/mips/pmc-sierra/yosemite/setup.c b/arch/mips/pmc-sierra/yosemite/setup.c
index 6a6e15e40009..f7f93ae24c34 100644
--- a/arch/mips/pmc-sierra/yosemite/setup.c
+++ b/arch/mips/pmc-sierra/yosemite/setup.c
@@ -39,6 +39,7 @@
39#include <linux/tty.h> 39#include <linux/tty.h>
40#include <linux/serial.h> 40#include <linux/serial.h>
41#include <linux/serial_core.h> 41#include <linux/serial_core.h>
42#include <linux/serial_8250.h>
42 43
43#include <asm/time.h> 44#include <asm/time.h>
44#include <asm/bootinfo.h> 45#include <asm/bootinfo.h>
diff --git a/arch/mips/pmc-sierra/yosemite/smp.c b/arch/mips/pmc-sierra/yosemite/smp.c
index 305491e74dbe..d83c4ada14f3 100644
--- a/arch/mips/pmc-sierra/yosemite/smp.c
+++ b/arch/mips/pmc-sierra/yosemite/smp.c
@@ -77,7 +77,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
77 * stack so the first thing we do is throw away that stuff and load useful 77 * stack so the first thing we do is throw away that stuff and load useful
78 * values into the registers ... 78 * values into the registers ...
79 */ 79 */
80void prom_boot_secondary(int cpu, struct task_struct *idle) 80void __init prom_boot_secondary(int cpu, struct task_struct *idle)
81{ 81{
82 unsigned long gp = (unsigned long) task_thread_info(idle); 82 unsigned long gp = (unsigned long) task_thread_info(idle);
83 unsigned long sp = __KSTK_TOS(idle); 83 unsigned long sp = __KSTK_TOS(idle);
diff --git a/arch/mips/qemu/q-irq.c b/arch/mips/qemu/q-irq.c
index f5ea2fe10f14..89891e984b3b 100644
--- a/arch/mips/qemu/q-irq.c
+++ b/arch/mips/qemu/q-irq.c
@@ -7,8 +7,6 @@
7#include <asm/system.h> 7#include <asm/system.h>
8#include <asm/time.h> 8#include <asm/time.h>
9 9
10extern asmlinkage void qemu_handle_int(void);
11
12asmlinkage void plat_irq_dispatch(void) 10asmlinkage void plat_irq_dispatch(void)
13{ 11{
14 unsigned int pending = read_c0_status() & read_c0_cause(); 12 unsigned int pending = read_c0_status() & read_c0_cause();
diff --git a/arch/mips/sgi-ip22/ip22-reset.c b/arch/mips/sgi-ip22/ip22-reset.c
index 66df5ac8f089..63afd7e44428 100644
--- a/arch/mips/sgi-ip22/ip22-reset.c
+++ b/arch/mips/sgi-ip22/ip22-reset.c
@@ -46,7 +46,7 @@ static struct timer_list power_timer, blink_timer, debounce_timer, volume_timer;
46 46
47static int machine_state; 47static int machine_state;
48 48
49static void ATTRIB_NORET sgi_machine_power_off(void) 49static void __noreturn sgi_machine_power_off(void)
50{ 50{
51 unsigned int tmp; 51 unsigned int tmp;
52 52
@@ -68,7 +68,7 @@ static void ATTRIB_NORET sgi_machine_power_off(void)
68 } 68 }
69} 69}
70 70
71static void ATTRIB_NORET sgi_machine_restart(char *command) 71static void __noreturn sgi_machine_restart(char *command)
72{ 72{
73 if (machine_state & MACHINE_SHUTTING_DOWN) 73 if (machine_state & MACHINE_SHUTTING_DOWN)
74 sgi_machine_power_off(); 74 sgi_machine_power_off();
@@ -76,7 +76,7 @@ static void ATTRIB_NORET sgi_machine_restart(char *command)
76 while (1); 76 while (1);
77} 77}
78 78
79static void ATTRIB_NORET sgi_machine_halt(void) 79static void __noreturn sgi_machine_halt(void)
80{ 80{
81 if (machine_state & MACHINE_SHUTTING_DOWN) 81 if (machine_state & MACHINE_SHUTTING_DOWN)
82 sgi_machine_power_off(); 82 sgi_machine_power_off();
diff --git a/arch/mips/sgi-ip27/ip27-berr.c b/arch/mips/sgi-ip27/ip27-berr.c
index ce907eda221b..123141ab21a2 100644
--- a/arch/mips/sgi-ip27/ip27-berr.c
+++ b/arch/mips/sgi-ip27/ip27-berr.c
@@ -21,7 +21,6 @@
21#include <asm/traps.h> 21#include <asm/traps.h>
22#include <asm/uaccess.h> 22#include <asm/uaccess.h>
23 23
24extern void dump_tlb_addr(unsigned long addr);
25extern void dump_tlb_all(void); 24extern void dump_tlb_all(void);
26 25
27static void dump_hub_information(unsigned long errst0, unsigned long errst1) 26static void dump_hub_information(unsigned long errst0, unsigned long errst1)
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
index fe8a1066aec1..e5e023f50a07 100644
--- a/arch/mips/sgi-ip27/ip27-memory.c
+++ b/arch/mips/sgi-ip27/ip27-memory.c
@@ -517,7 +517,7 @@ void __init paging_init(void)
517 pfn_t start_pfn = slot_getbasepfn(node, 0); 517 pfn_t start_pfn = slot_getbasepfn(node, 0);
518 pfn_t end_pfn = node_getmaxclick(node) + 1; 518 pfn_t end_pfn = node_getmaxclick(node) + 1;
519 519
520 zones_size[ZONE_DMA] = end_pfn - start_pfn; 520 zones_size[ZONE_NORMAL] = end_pfn - start_pfn;
521 free_area_init_node(node, NODE_DATA(node), 521 free_area_init_node(node, NODE_DATA(node),
522 zones_size, start_pfn, NULL); 522 zones_size, start_pfn, NULL);
523 523
diff --git a/arch/mips/sgi-ip32/ip32-platform.c b/arch/mips/sgi-ip32/ip32-platform.c
index 120b15932caf..ba3697ee7ff6 100644
--- a/arch/mips/sgi-ip32/ip32-platform.c
+++ b/arch/mips/sgi-ip32/ip32-platform.c
@@ -1,5 +1,53 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
7 */
8#include <linux/module.h>
1#include <linux/init.h> 9#include <linux/init.h>
2#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/serial_8250.h>
12
13#include <asm/ip32/mace.h>
14#include <asm/ip32/ip32_ints.h>
15
16/*
17 * .iobase isn't a constant (in the sense of C) so we fill it in at runtime.
18 */
19#define MACE_PORT(int) \
20{ \
21 .irq = int, \
22 .uartclk = 1843200, \
23 .iotype = UPIO_MEM, \
24 .flags = UPF_SKIP_TEST, \
25 .regshift = 8, \
26}
27
28static struct plat_serial8250_port uart8250_data[] = {
29 MACE_PORT(MACEISA_SERIAL1_IRQ),
30 MACE_PORT(MACEISA_SERIAL2_IRQ),
31 { },
32};
33
34static struct platform_device uart8250_device = {
35 .name = "serial8250",
36 .id = PLAT8250_DEV_PLATFORM,
37 .dev = {
38 .platform_data = uart8250_data,
39 },
40};
41
42static int __init uart8250_init(void)
43{
44 uart8250_data[0].iobase = (unsigned long) &mace->isa.serial1;
45 uart8250_data[1].iobase = (unsigned long) &mace->isa.serial1;
46
47 return platform_device_register(&uart8250_device);
48}
49
50device_initcall(uart8250_init);
3 51
4static __init int meth_devinit(void) 52static __init int meth_devinit(void)
5{ 53{
@@ -18,3 +66,7 @@ static __init int meth_devinit(void)
18} 66}
19 67
20device_initcall(meth_devinit); 68device_initcall(meth_devinit);
69
70MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
71MODULE_LICENSE("GPL");
72MODULE_DESCRIPTION("8250 UART probe driver for SGI IP32 aka O2");
diff --git a/arch/mips/sgi-ip32/ip32-setup.c b/arch/mips/sgi-ip32/ip32-setup.c
index 57708fe28bd7..bbba066cb405 100644
--- a/arch/mips/sgi-ip32/ip32-setup.c
+++ b/arch/mips/sgi-ip32/ip32-setup.c
@@ -62,12 +62,6 @@ static inline void str2eaddr(unsigned char *ea, unsigned char *str)
62} 62}
63#endif 63#endif
64 64
65#ifdef CONFIG_SERIAL_8250
66#include <linux/tty.h>
67#include <linux/serial.h>
68#include <linux/serial_core.h>
69#endif /* CONFIG_SERIAL_8250 */
70
71/* An arbitrary time; this can be decreased if reliability looks good */ 65/* An arbitrary time; this can be decreased if reliability looks good */
72#define WAIT_MS 10 66#define WAIT_MS 10
73 67
@@ -96,36 +90,6 @@ void __init plat_mem_setup(void)
96 90
97 board_time_init = ip32_time_init; 91 board_time_init = ip32_time_init;
98 92
99#ifdef CONFIG_SERIAL_8250
100 {
101 static struct uart_port o2_serial[2];
102
103 memset(o2_serial, 0, sizeof(o2_serial));
104 o2_serial[0].type = PORT_16550A;
105 o2_serial[0].line = 0;
106 o2_serial[0].irq = MACEISA_SERIAL1_IRQ;
107 o2_serial[0].flags = UPF_SKIP_TEST;
108 o2_serial[0].uartclk = 1843200;
109 o2_serial[0].iotype = UPIO_MEM;
110 o2_serial[0].membase = (char *)&mace->isa.serial1;
111 o2_serial[0].fifosize = 14;
112 /* How much to shift register offset by. Each UART register
113 * is replicated over 256 byte space */
114 o2_serial[0].regshift = 8;
115 o2_serial[1].type = PORT_16550A;
116 o2_serial[1].line = 1;
117 o2_serial[1].irq = MACEISA_SERIAL2_IRQ;
118 o2_serial[1].flags = UPF_SKIP_TEST;
119 o2_serial[1].uartclk = 1843200;
120 o2_serial[1].iotype = UPIO_MEM;
121 o2_serial[1].membase = (char *)&mace->isa.serial2;
122 o2_serial[1].fifosize = 14;
123 o2_serial[1].regshift = 8;
124
125 early_serial_setup(&o2_serial[0]);
126 early_serial_setup(&o2_serial[1]);
127 }
128#endif
129#ifdef CONFIG_SGI_O2MACE_ETH 93#ifdef CONFIG_SGI_O2MACE_ETH
130 { 94 {
131 char *mac = ArcGetEnvironmentVariable("eaddr"); 95 char *mac = ArcGetEnvironmentVariable("eaddr");
diff --git a/arch/mips/sibyte/bcm1480/setup.c b/arch/mips/sibyte/bcm1480/setup.c
index bdaac34ae708..89f29233cae1 100644
--- a/arch/mips/sibyte/bcm1480/setup.c
+++ b/arch/mips/sibyte/bcm1480/setup.c
@@ -31,6 +31,7 @@
31unsigned int sb1_pass; 31unsigned int sb1_pass;
32unsigned int soc_pass; 32unsigned int soc_pass;
33unsigned int soc_type; 33unsigned int soc_type;
34EXPORT_SYMBOL(soc_type);
34unsigned int periph_rev; 35unsigned int periph_rev;
35unsigned int zbbus_mhz; 36unsigned int zbbus_mhz;
36 37
diff --git a/arch/mips/sibyte/cfe/setup.c b/arch/mips/sibyte/cfe/setup.c
index ae4a92c3e529..51898dd1304a 100644
--- a/arch/mips/sibyte/cfe/setup.c
+++ b/arch/mips/sibyte/cfe/setup.c
@@ -62,7 +62,7 @@ extern unsigned long initrd_start, initrd_end;
62extern int kgdb_port; 62extern int kgdb_port;
63#endif 63#endif
64 64
65static void ATTRIB_NORET cfe_linux_exit(void *arg) 65static void __noreturn cfe_linux_exit(void *arg)
66{ 66{
67 int warm = *(int *)arg; 67 int warm = *(int *)arg;
68 68
@@ -83,14 +83,14 @@ static void ATTRIB_NORET cfe_linux_exit(void *arg)
83 while (1); 83 while (1);
84} 84}
85 85
86static void ATTRIB_NORET cfe_linux_restart(char *command) 86static void __noreturn cfe_linux_restart(char *command)
87{ 87{
88 static const int zero; 88 static const int zero;
89 89
90 cfe_linux_exit((void *)&zero); 90 cfe_linux_exit((void *)&zero);
91} 91}
92 92
93static void ATTRIB_NORET cfe_linux_halt(void) 93static void __noreturn cfe_linux_halt(void)
94{ 94{
95 static const int one = 1; 95 static const int one = 1;
96 96
diff --git a/arch/mips/sibyte/sb1250/setup.c b/arch/mips/sibyte/sb1250/setup.c
index f4a6169aa0a4..2d5c6d8b41f2 100644
--- a/arch/mips/sibyte/sb1250/setup.c
+++ b/arch/mips/sibyte/sb1250/setup.c
@@ -31,6 +31,7 @@
31unsigned int sb1_pass; 31unsigned int sb1_pass;
32unsigned int soc_pass; 32unsigned int soc_pass;
33unsigned int soc_type; 33unsigned int soc_type;
34EXPORT_SYMBOL(soc_type);
34unsigned int periph_rev; 35unsigned int periph_rev;
35unsigned int zbbus_mhz; 36unsigned int zbbus_mhz;
36EXPORT_SYMBOL(zbbus_mhz); 37EXPORT_SYMBOL(zbbus_mhz);
diff --git a/arch/mips/sibyte/swarm/time.c b/arch/mips/sibyte/swarm/time.c
deleted file mode 100644
index 97c73c793c35..000000000000
--- a/arch/mips/sibyte/swarm/time.c
+++ /dev/null
@@ -1,244 +0,0 @@
1/*
2 * Copyright (C) 2000, 2001 Broadcom Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (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
19/*
20 * Time routines for the swarm board. We pass all the hard stuff
21 * through to the sb1250 handling code. Only thing we really keep
22 * track of here is what time of day we think it is. And we don't
23 * really even do a good job of that...
24 */
25
26
27#include <linux/bcd.h>
28#include <linux/init.h>
29#include <linux/time.h>
30#include <linux/sched.h>
31#include <linux/spinlock.h>
32#include <asm/system.h>
33#include <asm/addrspace.h>
34#include <asm/io.h>
35
36#include <asm/sibyte/sb1250.h>
37#include <asm/sibyte/sb1250_regs.h>
38#include <asm/sibyte/sb1250_smbus.h>
39
40static unsigned long long sec_bias = 0;
41static unsigned int usec_bias = 0;
42
43/* Xicor 1241 definitions */
44
45/*
46 * Register bits
47 */
48
49#define X1241REG_SR_BAT 0x80 /* currently on battery power */
50#define X1241REG_SR_RWEL 0x04 /* r/w latch is enabled, can write RTC */
51#define X1241REG_SR_WEL 0x02 /* r/w latch is unlocked, can enable r/w now */
52#define X1241REG_SR_RTCF 0x01 /* clock failed */
53#define X1241REG_BL_BP2 0x80 /* block protect 2 */
54#define X1241REG_BL_BP1 0x40 /* block protect 1 */
55#define X1241REG_BL_BP0 0x20 /* block protect 0 */
56#define X1241REG_BL_WD1 0x10
57#define X1241REG_BL_WD0 0x08
58#define X1241REG_HR_MIL 0x80 /* military time format */
59
60/*
61 * Register numbers
62 */
63
64#define X1241REG_BL 0x10 /* block protect bits */
65#define X1241REG_INT 0x11 /* */
66#define X1241REG_SC 0x30 /* Seconds */
67#define X1241REG_MN 0x31 /* Minutes */
68#define X1241REG_HR 0x32 /* Hours */
69#define X1241REG_DT 0x33 /* Day of month */
70#define X1241REG_MO 0x34 /* Month */
71#define X1241REG_YR 0x35 /* Year */
72#define X1241REG_DW 0x36 /* Day of Week */
73#define X1241REG_Y2K 0x37 /* Year 2K */
74#define X1241REG_SR 0x3F /* Status register */
75
76#define X1241_CCR_ADDRESS 0x6F
77
78#define SMB_CSR(reg) (IOADDR(A_SMB_REGISTER(1, reg)))
79
80static int xicor_read(uint8_t addr)
81{
82 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY)
83 ;
84
85 __raw_writeq((addr >> 8) & 0x7, SMB_CSR(R_SMB_CMD));
86 __raw_writeq(addr & 0xff, SMB_CSR(R_SMB_DATA));
87 __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_WR2BYTE,
88 SMB_CSR(R_SMB_START));
89
90 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY)
91 ;
92
93 __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_RD1BYTE,
94 SMB_CSR(R_SMB_START));
95
96 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY)
97 ;
98
99 if (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_ERROR) {
100 /* Clear error bit by writing a 1 */
101 __raw_writeq(M_SMB_ERROR, SMB_CSR(R_SMB_STATUS));
102 return -1;
103 }
104
105 return (__raw_readq(SMB_CSR(R_SMB_DATA)) & 0xff);
106}
107
108static int xicor_write(uint8_t addr, int b)
109{
110 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY)
111 ;
112
113 __raw_writeq(addr, SMB_CSR(R_SMB_CMD));
114 __raw_writeq((addr & 0xff) | ((b & 0xff) << 8), SMB_CSR(R_SMB_DATA));
115 __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_WR3BYTE,
116 SMB_CSR(R_SMB_START));
117
118 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY)
119 ;
120
121 if (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_ERROR) {
122 /* Clear error bit by writing a 1 */
123 __raw_writeq(M_SMB_ERROR, SMB_CSR(R_SMB_STATUS));
124 return -1;
125 } else {
126 return 0;
127 }
128}
129
130/*
131 * In order to set the CMOS clock precisely, set_rtc_mmss has to be
132 * called 500 ms after the second nowtime has started, because when
133 * nowtime is written into the registers of the CMOS clock, it will
134 * jump to the next second precisely 500 ms later. Check the Motorola
135 * MC146818A or Dallas DS12887 data sheet for details.
136 *
137 * BUG: This routine does not handle hour overflow properly; it just
138 * sets the minutes. Usually you'll only notice that after reboot!
139 */
140int set_rtc_mmss(unsigned long nowtime)
141{
142 int retval = 0;
143 int real_seconds, real_minutes, cmos_minutes;
144
145 cmos_minutes = xicor_read(X1241REG_MN);
146 cmos_minutes = BCD2BIN(cmos_minutes);
147
148 /*
149 * since we're only adjusting minutes and seconds,
150 * don't interfere with hour overflow. This avoids
151 * messing with unknown time zones but requires your
152 * RTC not to be off by more than 15 minutes
153 */
154 real_seconds = nowtime % 60;
155 real_minutes = nowtime / 60;
156 if (((abs(real_minutes - cmos_minutes) + 15)/30) & 1)
157 real_minutes += 30; /* correct for half hour time zone */
158 real_minutes %= 60;
159
160 /* unlock writes to the CCR */
161 xicor_write(X1241REG_SR, X1241REG_SR_WEL);
162 xicor_write(X1241REG_SR, X1241REG_SR_WEL | X1241REG_SR_RWEL);
163
164 if (abs(real_minutes - cmos_minutes) < 30) {
165 real_seconds = BIN2BCD(real_seconds);
166 real_minutes = BIN2BCD(real_minutes);
167 xicor_write(X1241REG_SC, real_seconds);
168 xicor_write(X1241REG_MN, real_minutes);
169 } else {
170 printk(KERN_WARNING
171 "set_rtc_mmss: can't update from %d to %d\n",
172 cmos_minutes, real_minutes);
173 retval = -1;
174 }
175
176 xicor_write(X1241REG_SR, 0);
177
178 printk("set_rtc_mmss: %02d:%02d\n", real_minutes, real_seconds);
179
180 return retval;
181}
182
183static unsigned long __init get_swarm_time(void)
184{
185 unsigned int year, mon, day, hour, min, sec, y2k;
186
187 sec = xicor_read(X1241REG_SC);
188 min = xicor_read(X1241REG_MN);
189 hour = xicor_read(X1241REG_HR);
190
191 if (hour & X1241REG_HR_MIL) {
192 hour &= 0x3f;
193 } else {
194 if (hour & 0x20)
195 hour = (hour & 0xf) + 0x12;
196 }
197
198 sec = BCD2BIN(sec);
199 min = BCD2BIN(min);
200 hour = BCD2BIN(hour);
201
202 day = xicor_read(X1241REG_DT);
203 mon = xicor_read(X1241REG_MO);
204 year = xicor_read(X1241REG_YR);
205 y2k = xicor_read(X1241REG_Y2K);
206
207 day = BCD2BIN(day);
208 mon = BCD2BIN(mon);
209 year = BCD2BIN(year);
210 y2k = BCD2BIN(y2k);
211
212 year += (y2k * 100);
213
214 return mktime(year, mon, day, hour, min, sec);
215}
216
217/*
218 * Bring up the timer at 100 Hz.
219 */
220void __init swarm_time_init(void)
221{
222 unsigned int flags;
223 int status;
224
225 /* Set up the scd general purpose timer 0 to cpu 0 */
226 sb1250_time_init();
227
228 /* Establish communication with the Xicor 1241 RTC */
229 /* XXXKW how do I share the SMBus with the I2C subsystem? */
230
231 __raw_writeq(K_SMB_FREQ_400KHZ, SMB_CSR(R_SMB_FREQ));
232 __raw_writeq(0, SMB_CSR(R_SMB_CONTROL));
233
234 if ((status = xicor_read(X1241REG_SR_RTCF)) < 0) {
235 printk("x1241: couldn't detect on SWARM SMBus 1\n");
236 } else {
237 if (status & X1241REG_SR_RTCF)
238 printk("x1241: battery failed -- time is probably wrong\n");
239 write_seqlock_irqsave(&xtime_lock, flags);
240 xtime.tv_sec = get_swarm_time();
241 xtime.tv_nsec = 0;
242 write_sequnlock_irqrestore(&xtime_lock, flags);
243 }
244}
diff --git a/arch/mips/sni/Makefile b/arch/mips/sni/Makefile
index e5777b7e2bc9..471418e4f446 100644
--- a/arch/mips/sni/Makefile
+++ b/arch/mips/sni/Makefile
@@ -2,5 +2,5 @@
2# Makefile for the SNI specific part of the kernel 2# Makefile for the SNI specific part of the kernel
3# 3#
4 4
5obj-y += irq.o reset.o setup.o ds1216.o a20r.o rm200.o pcimt.o pcit.o time.o 5obj-y += irq.o reset.o setup.o a20r.o rm200.o pcimt.o pcit.o time.o
6obj-$(CONFIG_CPU_BIG_ENDIAN) += sniprom.o 6obj-$(CONFIG_CPU_BIG_ENDIAN) += sniprom.o
diff --git a/arch/mips/sni/a20r.c b/arch/mips/sni/a20r.c
index 31ab80f1befa..acc9ba76c1a9 100644
--- a/arch/mips/sni/a20r.c
+++ b/arch/mips/sni/a20r.c
@@ -15,7 +15,6 @@
15 15
16#include <asm/sni.h> 16#include <asm/sni.h>
17#include <asm/time.h> 17#include <asm/time.h>
18#include <asm/ds1216.h>
19 18
20#define PORT(_base,_irq) \ 19#define PORT(_base,_irq) \
21 { \ 20 { \
@@ -40,20 +39,34 @@ static struct platform_device a20r_serial8250_device = {
40 }, 39 },
41}; 40};
42 41
42static struct resource a20r_ds1216_rsrc[] = {
43 {
44 .start = 0x1c081ffc,
45 .end = 0x1c081fff,
46 .flags = IORESOURCE_MEM
47 }
48};
49
50static struct platform_device a20r_ds1216_device = {
51 .name = "rtc-ds1216",
52 .num_resources = ARRAY_SIZE(a20r_ds1216_rsrc),
53 .resource = a20r_ds1216_rsrc
54};
55
43static struct resource snirm_82596_rsrc[] = { 56static struct resource snirm_82596_rsrc[] = {
44 { 57 {
45 .start = 0xb8000000, 58 .start = 0x18000000,
46 .end = 0xb8000004, 59 .end = 0x18000004,
47 .flags = IORESOURCE_MEM 60 .flags = IORESOURCE_MEM
48 }, 61 },
49 { 62 {
50 .start = 0xb8010000, 63 .start = 0x18010000,
51 .end = 0xb8010004, 64 .end = 0x18010004,
52 .flags = IORESOURCE_MEM 65 .flags = IORESOURCE_MEM
53 }, 66 },
54 { 67 {
55 .start = 0xbff00000, 68 .start = 0x1ff00000,
56 .end = 0xbff00020, 69 .end = 0x1ff00020,
57 .flags = IORESOURCE_MEM 70 .flags = IORESOURCE_MEM
58 }, 71 },
59 { 72 {
@@ -74,8 +87,8 @@ static struct platform_device snirm_82596_pdev = {
74 87
75static struct resource snirm_53c710_rsrc[] = { 88static struct resource snirm_53c710_rsrc[] = {
76 { 89 {
77 .start = 0xb9000000, 90 .start = 0x19000000,
78 .end = 0xb90fffff, 91 .end = 0x190fffff,
79 .flags = IORESOURCE_MEM 92 .flags = IORESOURCE_MEM
80 }, 93 },
81 { 94 {
@@ -93,8 +106,8 @@ static struct platform_device snirm_53c710_pdev = {
93 106
94static struct resource sc26xx_rsrc[] = { 107static struct resource sc26xx_rsrc[] = {
95 { 108 {
96 .start = 0xbc070000, 109 .start = 0x1c070000,
97 .end = 0xbc0700ff, 110 .end = 0x1c0700ff,
98 .flags = IORESOURCE_MEM 111 .flags = IORESOURCE_MEM
99 }, 112 },
100 { 113 {
@@ -205,8 +218,7 @@ void __init sni_a20r_irq_init(void)
205 218
206void sni_a20r_init(void) 219void sni_a20r_init(void)
207{ 220{
208 ds1216_base = (volatile unsigned char *) SNI_DS1216_A20R_BASE; 221 /* FIXME, remove if not needed */
209 rtc_mips_get_time = ds1216_get_cmos_time;
210} 222}
211 223
212static int __init snirm_a20r_setup_devinit(void) 224static int __init snirm_a20r_setup_devinit(void)
@@ -218,6 +230,7 @@ static int __init snirm_a20r_setup_devinit(void)
218 platform_device_register(&snirm_53c710_pdev); 230 platform_device_register(&snirm_53c710_pdev);
219 platform_device_register(&sc26xx_pdev); 231 platform_device_register(&sc26xx_pdev);
220 platform_device_register(&a20r_serial8250_device); 232 platform_device_register(&a20r_serial8250_device);
233 platform_device_register(&a20r_ds1216_device);
221 break; 234 break;
222 } 235 }
223 236
diff --git a/arch/mips/sni/ds1216.c b/arch/mips/sni/ds1216.c
deleted file mode 100644
index 1d92732c14f1..000000000000
--- a/arch/mips/sni/ds1216.c
+++ /dev/null
@@ -1,81 +0,0 @@
1
2#include <linux/bcd.h>
3#include <linux/time.h>
4
5#include <asm/ds1216.h>
6
7volatile unsigned char *ds1216_base;
8
9/*
10 * Read the 64 bit we'd like to have - It a series
11 * of 64 bits showing up in the LSB of the base register.
12 *
13 */
14static unsigned char *ds1216_read(void)
15{
16 static unsigned char rdbuf[8];
17 unsigned char c;
18 int i, j;
19
20 for (i = 0; i < 8; i++) {
21 c = 0x0;
22 for (j = 0; j < 8; j++) {
23 c |= (*ds1216_base & 0x1) << j;
24 }
25 rdbuf[i] = c;
26 }
27
28 return rdbuf;
29}
30
31static void ds1216_switch_ds_to_clock(void)
32{
33 unsigned char magic[] = {
34 0xc5, 0x3a, 0xa3, 0x5c, 0xc5, 0x3a, 0xa3, 0x5c
35 };
36 int i,j,c;
37
38 /* Reset magic pointer */
39 c = *ds1216_base;
40
41 /* Write 64 bit magic to DS1216 */
42 for (i = 0; i < 8; i++) {
43 c = magic[i];
44 for (j = 0; j < 8; j++) {
45 *ds1216_base = c;
46 c = c >> 1;
47 }
48 }
49}
50
51unsigned long ds1216_get_cmos_time(void)
52{
53 unsigned char *rdbuf;
54 unsigned int year, month, date, hour, min, sec;
55
56 ds1216_switch_ds_to_clock();
57 rdbuf = ds1216_read();
58
59 sec = BCD2BIN(DS1216_SEC(rdbuf));
60 min = BCD2BIN(DS1216_MIN(rdbuf));
61 hour = BCD2BIN(DS1216_HOUR(rdbuf));
62 date = BCD2BIN(DS1216_DATE(rdbuf));
63 month = BCD2BIN(DS1216_MONTH(rdbuf));
64 year = BCD2BIN(DS1216_YEAR(rdbuf));
65
66 if (DS1216_1224(rdbuf) && DS1216_AMPM(rdbuf))
67 hour+=12;
68
69 if (year < 70)
70 year += 2000;
71 else
72 year += 1900;
73
74 return mktime(year, month, date, hour, min, sec);
75}
76
77int ds1216_set_rtc_mmss(unsigned long nowtime)
78{
79 printk("ds1216_set_rtc_mmss called but not implemented\n");
80 return -1;
81}
diff --git a/arch/mips/sni/pcimt.c b/arch/mips/sni/pcimt.c
index 9ee208daa8b1..44b1ae62aa4a 100644
--- a/arch/mips/sni/pcimt.c
+++ b/arch/mips/sni/pcimt.c
@@ -6,7 +6,7 @@
6 * for more details. 6 * for more details.
7 * 7 *
8 * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org) 8 * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org)
9 * Copyright (C) 2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de) 9 * Copyright (C) 2006,2007 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
10 */ 10 */
11 11
12#include <linux/init.h> 12#include <linux/init.h>
@@ -14,7 +14,6 @@
14#include <linux/pci.h> 14#include <linux/pci.h>
15#include <linux/serial_8250.h> 15#include <linux/serial_8250.h>
16 16
17#include <asm/mc146818-time.h>
18#include <asm/sni.h> 17#include <asm/sni.h>
19#include <asm/time.h> 18#include <asm/time.h>
20#include <asm/i8259.h> 19#include <asm/i8259.h>
@@ -90,6 +89,26 @@ static struct platform_device pcimt_serial8250_device = {
90 }, 89 },
91}; 90};
92 91
92static struct resource pcimt_cmos_rsrc[] = {
93 {
94 .start = 0x70,
95 .end = 0x71,
96 .flags = IORESOURCE_IO
97 },
98 {
99 .start = 8,
100 .end = 8,
101 .flags = IORESOURCE_IRQ
102 }
103};
104
105static struct platform_device pcimt_cmos_device = {
106 .name = "rtc_cmos",
107 .num_resources = ARRAY_SIZE(pcimt_cmos_rsrc),
108 .resource = pcimt_cmos_rsrc
109};
110
111
93static struct resource sni_io_resource = { 112static struct resource sni_io_resource = {
94 .start = 0x00000000UL, 113 .start = 0x00000000UL,
95 .end = 0x03bfffffUL, 114 .end = 0x03bfffffUL,
@@ -131,6 +150,19 @@ static struct resource pcimt_io_resources[] = {
131 } 150 }
132}; 151};
133 152
153static struct resource pcimt_mem_resources[] = {
154 {
155 /*
156 * this region should only be 4 bytes long,
157 * but it's 16MB on all RM300C I've checked
158 */
159 .start = 0x1a000000,
160 .end = 0x1affffff,
161 .name = "PCI INT ACK",
162 .flags = IORESOURCE_BUSY
163 }
164};
165
134static struct resource sni_mem_resource = { 166static struct resource sni_mem_resource = {
135 .start = 0x18000000UL, 167 .start = 0x18000000UL,
136 .end = 0x1fbfffffUL, 168 .end = 0x1fbfffffUL,
@@ -145,6 +177,9 @@ static void __init sni_pcimt_resource_init(void)
145 /* request I/O space for devices used on all i[345]86 PCs */ 177 /* request I/O space for devices used on all i[345]86 PCs */
146 for (i = 0; i < ARRAY_SIZE(pcimt_io_resources); i++) 178 for (i = 0; i < ARRAY_SIZE(pcimt_io_resources); i++)
147 request_resource(&sni_io_resource, pcimt_io_resources + i); 179 request_resource(&sni_io_resource, pcimt_io_resources + i);
180 /* request MEM space for devices used on all i[345]86 PCs */
181 for (i = 0; i < ARRAY_SIZE(pcimt_mem_resources); i++)
182 request_resource(&sni_mem_resource, pcimt_mem_resources + i);
148} 183}
149 184
150extern struct pci_ops sni_pcimt_ops; 185extern struct pci_ops sni_pcimt_ops;
@@ -274,12 +309,10 @@ void __init sni_pcimt_irq_init(void)
274 change_c0_status(ST0_IM, IE_IRQ1|IE_IRQ3); 309 change_c0_status(ST0_IM, IE_IRQ1|IE_IRQ3);
275} 310}
276 311
277void sni_pcimt_init(void) 312void __init sni_pcimt_init(void)
278{ 313{
279 sni_pcimt_detect(); 314 sni_pcimt_detect();
280 sni_pcimt_sc_init(); 315 sni_pcimt_sc_init();
281 rtc_mips_get_time = mc146818_get_cmos_time;
282 rtc_mips_set_time = mc146818_set_rtc_mmss;
283 board_time_init = sni_cpu_time_init; 316 board_time_init = sni_cpu_time_init;
284 ioport_resource.end = sni_io_resource.end; 317 ioport_resource.end = sni_io_resource.end;
285#ifdef CONFIG_PCI 318#ifdef CONFIG_PCI
@@ -296,6 +329,7 @@ static int __init snirm_pcimt_setup_devinit(void)
296 case SNI_BRD_PCI_DESKTOP: 329 case SNI_BRD_PCI_DESKTOP:
297 case SNI_BRD_PCI_MTOWER_CPLUS: 330 case SNI_BRD_PCI_MTOWER_CPLUS:
298 platform_device_register(&pcimt_serial8250_device); 331 platform_device_register(&pcimt_serial8250_device);
332 platform_device_register(&pcimt_cmos_device);
299 break; 333 break;
300 } 334 }
301 335
diff --git a/arch/mips/sni/pcit.c b/arch/mips/sni/pcit.c
index 00d151f4d121..2480c478dcbd 100644
--- a/arch/mips/sni/pcit.c
+++ b/arch/mips/sni/pcit.c
@@ -13,7 +13,6 @@
13#include <linux/pci.h> 13#include <linux/pci.h>
14#include <linux/serial_8250.h> 14#include <linux/serial_8250.h>
15 15
16#include <asm/mc146818-time.h>
17#include <asm/sni.h> 16#include <asm/sni.h>
18#include <asm/time.h> 17#include <asm/time.h>
19#include <asm/irq_cpu.h> 18#include <asm/irq_cpu.h>
@@ -58,6 +57,25 @@ static struct platform_device pcit_cplus_serial8250_device = {
58 }, 57 },
59}; 58};
60 59
60static struct resource pcit_cmos_rsrc[] = {
61 {
62 .start = 0x70,
63 .end = 0x71,
64 .flags = IORESOURCE_IO
65 },
66 {
67 .start = 8,
68 .end = 8,
69 .flags = IORESOURCE_IRQ
70 }
71};
72
73static struct platform_device pcit_cmos_device = {
74 .name = "rtc_cmos",
75 .num_resources = ARRAY_SIZE(pcit_cmos_rsrc),
76 .resource = pcit_cmos_rsrc
77};
78
61static struct resource sni_io_resource = { 79static struct resource sni_io_resource = {
62 .start = 0x00000000UL, 80 .start = 0x00000000UL,
63 .end = 0x03bfffffUL, 81 .end = 0x03bfffffUL,
@@ -243,10 +261,8 @@ void __init sni_pcit_cplus_irq_init(void)
243 setup_irq (MIPS_CPU_IRQ_BASE + 3, &sni_isa_irq); 261 setup_irq (MIPS_CPU_IRQ_BASE + 3, &sni_isa_irq);
244} 262}
245 263
246void sni_pcit_init(void) 264void __init sni_pcit_init(void)
247{ 265{
248 rtc_mips_get_time = mc146818_get_cmos_time;
249 rtc_mips_set_time = mc146818_set_rtc_mmss;
250 board_time_init = sni_cpu_time_init; 266 board_time_init = sni_cpu_time_init;
251 ioport_resource.end = sni_io_resource.end; 267 ioport_resource.end = sni_io_resource.end;
252#ifdef CONFIG_PCI 268#ifdef CONFIG_PCI
@@ -261,10 +277,12 @@ static int __init snirm_pcit_setup_devinit(void)
261 switch (sni_brd_type) { 277 switch (sni_brd_type) {
262 case SNI_BRD_PCI_TOWER: 278 case SNI_BRD_PCI_TOWER:
263 platform_device_register(&pcit_serial8250_device); 279 platform_device_register(&pcit_serial8250_device);
280 platform_device_register(&pcit_cmos_device);
264 break; 281 break;
265 282
266 case SNI_BRD_PCI_TOWER_CPLUS: 283 case SNI_BRD_PCI_TOWER_CPLUS:
267 platform_device_register(&pcit_cplus_serial8250_device); 284 platform_device_register(&pcit_cplus_serial8250_device);
285 platform_device_register(&pcit_cmos_device);
268 break; 286 break;
269 } 287 }
270 return 0; 288 return 0;
diff --git a/arch/mips/sni/rm200.c b/arch/mips/sni/rm200.c
index b82ff129f5ea..28a11d8605ce 100644
--- a/arch/mips/sni/rm200.c
+++ b/arch/mips/sni/rm200.c
@@ -15,7 +15,6 @@
15 15
16#include <asm/sni.h> 16#include <asm/sni.h>
17#include <asm/time.h> 17#include <asm/time.h>
18#include <asm/ds1216.h>
19#include <asm/irq_cpu.h> 18#include <asm/irq_cpu.h>
20 19
21#define PORT(_base,_irq) \ 20#define PORT(_base,_irq) \
@@ -41,20 +40,34 @@ static struct platform_device rm200_serial8250_device = {
41 }, 40 },
42}; 41};
43 42
43static struct resource rm200_ds1216_rsrc[] = {
44 {
45 .start = 0x1cd41ffc,
46 .end = 0x1cd41fff,
47 .flags = IORESOURCE_MEM
48 }
49};
50
51static struct platform_device rm200_ds1216_device = {
52 .name = "rtc-ds1216",
53 .num_resources = ARRAY_SIZE(rm200_ds1216_rsrc),
54 .resource = rm200_ds1216_rsrc
55};
56
44static struct resource snirm_82596_rm200_rsrc[] = { 57static struct resource snirm_82596_rm200_rsrc[] = {
45 { 58 {
46 .start = 0xb8000000, 59 .start = 0x18000000,
47 .end = 0xb80fffff, 60 .end = 0x180fffff,
48 .flags = IORESOURCE_MEM 61 .flags = IORESOURCE_MEM
49 }, 62 },
50 { 63 {
51 .start = 0xbb000000, 64 .start = 0x1b000000,
52 .end = 0xbb000004, 65 .end = 0x1b000004,
53 .flags = IORESOURCE_MEM 66 .flags = IORESOURCE_MEM
54 }, 67 },
55 { 68 {
56 .start = 0xbff00000, 69 .start = 0x1ff00000,
57 .end = 0xbff00020, 70 .end = 0x1ff00020,
58 .flags = IORESOURCE_MEM 71 .flags = IORESOURCE_MEM
59 }, 72 },
60 { 73 {
@@ -75,8 +88,8 @@ static struct platform_device snirm_82596_rm200_pdev = {
75 88
76static struct resource snirm_53c710_rm200_rsrc[] = { 89static struct resource snirm_53c710_rm200_rsrc[] = {
77 { 90 {
78 .start = 0xb9000000, 91 .start = 0x19000000,
79 .end = 0xb90fffff, 92 .end = 0x190fffff,
80 .flags = IORESOURCE_MEM 93 .flags = IORESOURCE_MEM
81 }, 94 },
82 { 95 {
@@ -96,6 +109,7 @@ static int __init snirm_setup_devinit(void)
96{ 109{
97 if (sni_brd_type == SNI_BRD_RM200) { 110 if (sni_brd_type == SNI_BRD_RM200) {
98 platform_device_register(&rm200_serial8250_device); 111 platform_device_register(&rm200_serial8250_device);
112 platform_device_register(&rm200_ds1216_device);
99 platform_device_register(&snirm_82596_rm200_pdev); 113 platform_device_register(&snirm_82596_rm200_pdev);
100 platform_device_register(&snirm_53c710_rm200_pdev); 114 platform_device_register(&snirm_53c710_rm200_pdev);
101 } 115 }
@@ -176,11 +190,9 @@ void __init sni_rm200_irq_init(void)
176 setup_irq (SNI_RM200_INT_START + 0, &sni_isa_irq); 190 setup_irq (SNI_RM200_INT_START + 0, &sni_isa_irq);
177} 191}
178 192
179void sni_rm200_init(void) 193void __init sni_rm200_init(void)
180{ 194{
181 set_io_port_base(SNI_PORT_BASE + 0x02000000); 195 set_io_port_base(SNI_PORT_BASE + 0x02000000);
182 ioport_resource.end += 0x02000000; 196 ioport_resource.end += 0x02000000;
183 ds1216_base = (volatile unsigned char *) SNI_DS1216_RM200_BASE;
184 rtc_mips_get_time = ds1216_get_cmos_time;
185 board_time_init = sni_cpu_time_init; 197 board_time_init = sni_cpu_time_init;
186} 198}
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c
index 68d7cf609b4f..4fedfbda0c79 100644
--- a/arch/mips/sni/setup.c
+++ b/arch/mips/sni/setup.c
@@ -6,7 +6,7 @@
6 * for more details. 6 * for more details.
7 * 7 *
8 * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org) 8 * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org)
9 * Copyright (C) 2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de) 9 * Copyright (C) 2006,2007 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
10 */ 10 */
11#include <linux/eisa.h> 11#include <linux/eisa.h>
12#include <linux/init.h> 12#include <linux/init.h>
@@ -92,3 +92,34 @@ void __init plat_mem_setup(void)
92 92
93 sni_display_setup(); 93 sni_display_setup();
94} 94}
95
96#if CONFIG_PCI
97
98#include <linux/pci.h>
99#include <video/vga.h>
100#include <video/cirrus.h>
101
102static void __devinit quirk_cirrus_ram_size(struct pci_dev *dev)
103{
104 u16 cmd;
105
106 /*
107 * firmware doesn't set the ram size correct, so we
108 * need to do it here, otherwise we get screen corruption
109 * on older Cirrus chips
110 */
111 pci_read_config_word (dev, PCI_COMMAND, &cmd);
112 if ((cmd & (PCI_COMMAND_IO|PCI_COMMAND_MEMORY))
113 == (PCI_COMMAND_IO|PCI_COMMAND_MEMORY)) {
114 vga_wseq (NULL, CL_SEQR6, 0x12); /* unlock all extension registers */
115 vga_wseq (NULL, CL_SEQRF, 0x18);
116 }
117}
118
119DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_5434_8,
120 quirk_cirrus_ram_size);
121DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_5436,
122 quirk_cirrus_ram_size);
123DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_5446,
124 quirk_cirrus_ram_size);
125#endif
diff --git a/arch/mips/sni/sniprom.c b/arch/mips/sni/sniprom.c
index 643366eb854a..00a03a6e8f58 100644
--- a/arch/mips/sni/sniprom.c
+++ b/arch/mips/sni/sniprom.c
@@ -146,7 +146,10 @@ static void __init sni_console_setup(void)
146 } 146 }
147 if (baud) 147 if (baud)
148 strcpy(options, baud); 148 strcpy(options, baud);
149 add_preferred_console("ttyS", port, baud ? options : NULL); 149 if (strncmp (cdev, "tty552", 6) == 0)
150 add_preferred_console("ttyS", port, baud ? options : NULL);
151 else
152 add_preferred_console("ttySC", port, baud ? options : NULL);
150 } 153 }
151} 154}
152 155
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
index a0c11efeaeeb..40c7c3eeafaf 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
@@ -138,7 +138,6 @@ extern void toshiba_rbtx4927_irq_setup(void);
138char *prom_getcmdline(void); 138char *prom_getcmdline(void);
139 139
140#ifdef CONFIG_PCI 140#ifdef CONFIG_PCI
141#define CONFIG_TX4927BUG_WORKAROUND
142#undef TX4927_SUPPORT_COMMAND_IO 141#undef TX4927_SUPPORT_COMMAND_IO
143#undef TX4927_SUPPORT_PCI_66 142#undef TX4927_SUPPORT_PCI_66
144int tx4927_cpu_clock = 100000000; /* 100MHz */ 143int tx4927_cpu_clock = 100000000; /* 100MHz */
@@ -669,15 +668,7 @@ void tx4927_pci_setup(void)
669 668
670 /* PCI->GB mappings (MEM 16MB) -not used */ 669 /* PCI->GB mappings (MEM 16MB) -not used */
671 tx4927_pcicptr->p2gm1plbase = 0xffffffff; 670 tx4927_pcicptr->p2gm1plbase = 0xffffffff;
672#ifdef CONFIG_TX4927BUG_WORKAROUND
673 /*
674 * TX4927-PCIC-BUG: P2GM1PUBASE must be 0
675 * if P2GM0PUBASE was 0.
676 */
677 tx4927_pcicptr->p2gm1pubase = 0;
678#else
679 tx4927_pcicptr->p2gm1pubase = 0xffffffff; 671 tx4927_pcicptr->p2gm1pubase = 0xffffffff;
680#endif
681 tx4927_pcicptr->p2gmgbase[1] = 0; 672 tx4927_pcicptr->p2gmgbase[1] = 0;
682 673
683 /* PCI->GB mappings (MEM 1MB) -not used */ 674 /* PCI->GB mappings (MEM 1MB) -not used */
@@ -910,16 +901,6 @@ void __init toshiba_rbtx4927_setup(void)
910 if (tx4927_ccfg_toeon) 901 if (tx4927_ccfg_toeon)
911 tx4927_ccfgptr->ccfg |= TX4927_CCFG_TOE; 902 tx4927_ccfgptr->ccfg |= TX4927_CCFG_TOE;
912 903
913 /* SDRAMC fixup */
914#ifdef CONFIG_TX4927BUG_WORKAROUND
915 /*
916 * TX4927-BUG: INF 01-01-18/ BUG 01-01-22
917 * G-bus timeout error detection is incorrect
918 */
919 if (tx4927_ccfg_toeon)
920 tx4927_sdramcptr->tr |= 0x02000000; /* RCD:3tck */
921#endif
922
923 tx4927_pci_setup(); 904 tx4927_pci_setup();
924 if (tx4927_using_backplane == 1) 905 if (tx4927_using_backplane == 1)
925 printk("backplane board IS installed\n"); 906 printk("backplane board IS installed\n");
diff --git a/arch/mips/tx4938/common/Makefile b/arch/mips/tx4938/common/Makefile
index 2033ae77f632..83cda518f204 100644
--- a/arch/mips/tx4938/common/Makefile
+++ b/arch/mips/tx4938/common/Makefile
@@ -6,6 +6,6 @@
6# unless it's something special (ie not a .c file). 6# unless it's something special (ie not a .c file).
7# 7#
8 8
9obj-y += prom.o setup.o irq.o rtc_rx5c348.o 9obj-y += prom.o setup.o irq.o
10obj-$(CONFIG_KGDB) += dbgio.o 10obj-$(CONFIG_KGDB) += dbgio.o
11 11
diff --git a/arch/mips/tx4938/common/rtc_rx5c348.c b/arch/mips/tx4938/common/rtc_rx5c348.c
deleted file mode 100644
index 07f782fc0725..000000000000
--- a/arch/mips/tx4938/common/rtc_rx5c348.c
+++ /dev/null
@@ -1,192 +0,0 @@
1/*
2 * RTC routines for RICOH Rx5C348 SPI chip.
3 * Copyright (C) 2000-2001 Toshiba Corporation
4 *
5 * 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the
6 * terms of the GNU General Public License version 2. This program is
7 * licensed "as is" without any warranty of any kind, whether express
8 * or implied.
9 *
10 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
11 */
12#include <linux/init.h>
13#include <linux/kernel.h>
14#include <linux/string.h>
15#include <linux/rtc.h>
16#include <linux/time.h>
17#include <linux/bcd.h>
18#include <asm/time.h>
19#include <asm/tx4938/spi.h>
20
21#define EPOCH 2000
22
23/* registers */
24#define Rx5C348_REG_SECOND 0
25#define Rx5C348_REG_MINUTE 1
26#define Rx5C348_REG_HOUR 2
27#define Rx5C348_REG_WEEK 3
28#define Rx5C348_REG_DAY 4
29#define Rx5C348_REG_MONTH 5
30#define Rx5C348_REG_YEAR 6
31#define Rx5C348_REG_ADJUST 7
32#define Rx5C348_REG_ALARM_W_MIN 8
33#define Rx5C348_REG_ALARM_W_HOUR 9
34#define Rx5C348_REG_ALARM_W_WEEK 10
35#define Rx5C348_REG_ALARM_D_MIN 11
36#define Rx5C348_REG_ALARM_D_HOUR 12
37#define Rx5C348_REG_CTL1 14
38#define Rx5C348_REG_CTL2 15
39
40/* register bits */
41#define Rx5C348_BIT_PM 0x20 /* REG_HOUR */
42#define Rx5C348_BIT_Y2K 0x80 /* REG_MONTH */
43#define Rx5C348_BIT_24H 0x20 /* REG_CTL1 */
44#define Rx5C348_BIT_XSTP 0x10 /* REG_CTL2 */
45
46/* commands */
47#define Rx5C348_CMD_W(addr) (((addr) << 4) | 0x08) /* single write */
48#define Rx5C348_CMD_R(addr) (((addr) << 4) | 0x0c) /* single read */
49#define Rx5C348_CMD_MW(addr) (((addr) << 4) | 0x00) /* burst write */
50#define Rx5C348_CMD_MR(addr) (((addr) << 4) | 0x04) /* burst read */
51
52static struct spi_dev_desc srtc_dev_desc = {
53 .baud = 1000000, /* 1.0Mbps @ Vdd 2.0V */
54 .tcss = 31,
55 .tcsh = 1,
56 .tcsr = 62,
57 /* 31us for Tcss (62us for Tcsr) is required for carry operation) */
58 .byteorder = 1, /* MSB-First */
59 .polarity = 0, /* High-Active */
60 .phase = 1, /* Shift-Then-Sample */
61
62};
63static int srtc_chipid;
64static int srtc_24h;
65
66static inline int
67spi_rtc_io(unsigned char *inbuf, unsigned char *outbuf, unsigned int count)
68{
69 unsigned char *inbufs[1], *outbufs[1];
70 unsigned int incounts[2], outcounts[2];
71 inbufs[0] = inbuf;
72 incounts[0] = count;
73 incounts[1] = 0;
74 outbufs[0] = outbuf;
75 outcounts[0] = count;
76 outcounts[1] = 0;
77 return txx9_spi_io(srtc_chipid, &srtc_dev_desc,
78 inbufs, incounts, outbufs, outcounts, 0);
79}
80
81/* RTC-dependent code for time.c */
82
83static int
84rtc_rx5c348_set_time(unsigned long t)
85{
86 unsigned char inbuf[8];
87 struct rtc_time tm;
88 u8 year, month, day, hour, minute, second, century;
89
90 /* convert */
91 to_tm(t, &tm);
92
93 year = tm.tm_year % 100;
94 month = tm.tm_mon+1; /* tm_mon starts from 0 to 11 */
95 day = tm.tm_mday;
96 hour = tm.tm_hour;
97 minute = tm.tm_min;
98 second = tm.tm_sec;
99 century = tm.tm_year / 100;
100
101 inbuf[0] = Rx5C348_CMD_MW(Rx5C348_REG_SECOND);
102 BIN_TO_BCD(second);
103 inbuf[1] = second;
104 BIN_TO_BCD(minute);
105 inbuf[2] = minute;
106
107 if (srtc_24h) {
108 BIN_TO_BCD(hour);
109 inbuf[3] = hour;
110 } else {
111 /* hour 0 is AM12, noon is PM12 */
112 inbuf[3] = 0;
113 if (hour >= 12)
114 inbuf[3] = Rx5C348_BIT_PM;
115 hour = (hour + 11) % 12 + 1;
116 BIN_TO_BCD(hour);
117 inbuf[3] |= hour;
118 }
119 inbuf[4] = 0; /* ignore week */
120 BIN_TO_BCD(day);
121 inbuf[5] = day;
122 BIN_TO_BCD(month);
123 inbuf[6] = month;
124 if (century >= 20)
125 inbuf[6] |= Rx5C348_BIT_Y2K;
126 BIN_TO_BCD(year);
127 inbuf[7] = year;
128 /* write in one transfer to avoid data inconsistency */
129 return spi_rtc_io(inbuf, NULL, 8);
130}
131
132static unsigned long
133rtc_rx5c348_get_time(void)
134{
135 unsigned char inbuf[8], outbuf[8];
136 unsigned int year, month, day, hour, minute, second;
137
138 inbuf[0] = Rx5C348_CMD_MR(Rx5C348_REG_SECOND);
139 memset(inbuf + 1, 0, 7);
140 /* read in one transfer to avoid data inconsistency */
141 if (spi_rtc_io(inbuf, outbuf, 8))
142 return 0;
143 second = outbuf[1];
144 BCD_TO_BIN(second);
145 minute = outbuf[2];
146 BCD_TO_BIN(minute);
147 if (srtc_24h) {
148 hour = outbuf[3];
149 BCD_TO_BIN(hour);
150 } else {
151 hour = outbuf[3] & ~Rx5C348_BIT_PM;
152 BCD_TO_BIN(hour);
153 hour %= 12;
154 if (outbuf[3] & Rx5C348_BIT_PM)
155 hour += 12;
156 }
157 day = outbuf[5];
158 BCD_TO_BIN(day);
159 month = outbuf[6] & ~Rx5C348_BIT_Y2K;
160 BCD_TO_BIN(month);
161 year = outbuf[7];
162 BCD_TO_BIN(year);
163 year += EPOCH;
164
165 return mktime(year, month, day, hour, minute, second);
166}
167
168void __init
169rtc_rx5c348_init(int chipid)
170{
171 unsigned char inbuf[2], outbuf[2];
172 srtc_chipid = chipid;
173 /* turn on RTC if it is not on */
174 inbuf[0] = Rx5C348_CMD_R(Rx5C348_REG_CTL2);
175 inbuf[1] = 0;
176 spi_rtc_io(inbuf, outbuf, 2);
177 if (outbuf[1] & Rx5C348_BIT_XSTP) {
178 inbuf[0] = Rx5C348_CMD_W(Rx5C348_REG_CTL2);
179 inbuf[1] = 0;
180 spi_rtc_io(inbuf, NULL, 2);
181 }
182
183 inbuf[0] = Rx5C348_CMD_R(Rx5C348_REG_CTL1);
184 inbuf[1] = 0;
185 spi_rtc_io(inbuf, outbuf, 2);
186 if (outbuf[1] & Rx5C348_BIT_24H)
187 srtc_24h = 1;
188
189 /* set the function pointers */
190 rtc_mips_get_time = rtc_rx5c348_get_time;
191 rtc_mips_set_time = rtc_rx5c348_set_time;
192}
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/Makefile b/arch/mips/tx4938/toshiba_rbtx4938/Makefile
index 226941279d75..10c94e62bf5b 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/Makefile
+++ b/arch/mips/tx4938/toshiba_rbtx4938/Makefile
@@ -6,4 +6,4 @@
6# unless it's something special (ie not a .c file). 6# unless it's something special (ie not a .c file).
7# 7#
8 8
9obj-y += prom.o setup.o irq.o spi_eeprom.o spi_txx9.o 9obj-y += prom.o setup.o irq.o spi_eeprom.o
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/irq.c b/arch/mips/tx4938/toshiba_rbtx4938/irq.c
index 2e96dbb248b1..91aea7aff515 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/irq.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/irq.c
@@ -165,8 +165,6 @@ toshiba_rbtx4938_irq_ioc_disable(unsigned int irq)
165 TX4938_RD08(TOSHIBA_RBTX4938_IOC_INTR_ENAB); 165 TX4938_RD08(TOSHIBA_RBTX4938_IOC_INTR_ENAB);
166} 166}
167 167
168extern void __init txx9_spi_irqinit(int irc_irq);
169
170void __init arch_init_irq(void) 168void __init arch_init_irq(void)
171{ 169{
172 extern void tx4938_irq_init(void); 170 extern void tx4938_irq_init(void);
@@ -185,9 +183,5 @@ void __init arch_init_irq(void)
185 /* Onboard 10M Ether: High Active */ 183 /* Onboard 10M Ether: High Active */
186 TX4938_WR(TX4938_MKA(TX4938_IRC_IRDM0), 0x00000040); 184 TX4938_WR(TX4938_MKA(TX4938_IRC_IRDM0), 0x00000040);
187 185
188 if (tx4938_ccfgptr->pcfg & TX4938_PCFG_SPI_SEL) {
189 txx9_spi_irqinit(RBTX4938_IRQ_IRC_SPI);
190 }
191
192 wbflush(); 186 wbflush();
193} 187}
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/setup.c b/arch/mips/tx4938/toshiba_rbtx4938/setup.c
index f5d1ce739fcc..6ed39a5aea72 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/setup.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/setup.c
@@ -14,13 +14,13 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/ioport.h> 16#include <linux/ioport.h>
17#include <linux/proc_fs.h>
18#include <linux/delay.h> 17#include <linux/delay.h>
19#include <linux/interrupt.h> 18#include <linux/interrupt.h>
20#include <linux/console.h> 19#include <linux/console.h>
21#include <linux/pci.h> 20#include <linux/pci.h>
22#include <linux/pm.h> 21#include <linux/pm.h>
23#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/clk.h>
24 24
25#include <asm/wbflush.h> 25#include <asm/wbflush.h>
26#include <asm/reboot.h> 26#include <asm/reboot.h>
@@ -35,6 +35,9 @@
35#include <linux/serial.h> 35#include <linux/serial.h>
36#include <linux/serial_core.h> 36#include <linux/serial_core.h>
37#endif 37#endif
38#include <linux/spi/spi.h>
39#include <asm/tx4938/spi.h>
40#include <asm/gpio.h>
38 41
39extern void rbtx4938_time_init(void) __init; 42extern void rbtx4938_time_init(void) __init;
40extern char * __init prom_getcmdline(void); 43extern char * __init prom_getcmdline(void);
@@ -349,7 +352,7 @@ static struct pci_dev *fake_pci_dev(struct pci_controller *hose,
349 static struct pci_dev dev; 352 static struct pci_dev dev;
350 static struct pci_bus bus; 353 static struct pci_bus bus;
351 354
352 dev.sysdata = (void *)hose; 355 dev.sysdata = bus.sysdata = hose;
353 dev.devfn = devfn; 356 dev.devfn = devfn;
354 bus.number = busnr; 357 bus.number = busnr;
355 bus.ops = hose->pci_ops; 358 bus.ops = hose->pci_ops;
@@ -382,8 +385,10 @@ int txboard_pci66_check(struct pci_controller *hose, int top_bus, int current_bu
382 printk("PCI: Checking 66MHz capabilities...\n"); 385 printk("PCI: Checking 66MHz capabilities...\n");
383 386
384 for (pci_devfn=devfn_start; pci_devfn<devfn_stop; pci_devfn++) { 387 for (pci_devfn=devfn_start; pci_devfn<devfn_stop; pci_devfn++) {
385 early_read_config_word(hose, top_bus, current_bus, pci_devfn, 388 if (early_read_config_word(hose, top_bus, current_bus,
386 PCI_VENDOR_ID, &vid); 389 pci_devfn, PCI_VENDOR_ID,
390 &vid) != PCIBIOS_SUCCESSFUL)
391 continue;
387 392
388 if (vid == 0xffff) continue; 393 if (vid == 0xffff) continue;
389 394
@@ -460,7 +465,6 @@ static int __init tx4938_pcibios_init(void)
460 int extarb = !(tx4938_ccfgptr->ccfg & TX4938_CCFG_PCIXARB); 465 int extarb = !(tx4938_ccfgptr->ccfg & TX4938_CCFG_PCIXARB);
461 466
462 PCIBIOS_MIN_IO = 0x00001000UL; 467 PCIBIOS_MIN_IO = 0x00001000UL;
463 PCIBIOS_MIN_MEM = 0x01000000UL;
464 468
465 mem_base[0] = txboard_request_phys_region_shrink(&mem_size[0]); 469 mem_base[0] = txboard_request_phys_region_shrink(&mem_size[0]);
466 io_base[0] = txboard_request_phys_region_shrink(&io_size[0]); 470 io_base[0] = txboard_request_phys_region_shrink(&io_size[0]);
@@ -574,82 +578,43 @@ arch_initcall(tx4938_pcibios_init);
574#define SEEPROM3_CS 1 /* IOC */ 578#define SEEPROM3_CS 1 /* IOC */
575#define SRTC_CS 2 /* IOC */ 579#define SRTC_CS 2 /* IOC */
576 580
577static int rbtx4938_spi_cs_func(int chipid, int on)
578{
579 unsigned char bit;
580 switch (chipid) {
581 case RBTX4938_SEEPROM1_CHIPID:
582 if (on)
583 tx4938_pioptr->dout &= ~(1 << SEEPROM1_CS);
584 else
585 tx4938_pioptr->dout |= (1 << SEEPROM1_CS);
586 return 0;
587 break;
588 case RBTX4938_SEEPROM2_CHIPID:
589 bit = (1 << SEEPROM2_CS);
590 break;
591 case RBTX4938_SEEPROM3_CHIPID:
592 bit = (1 << SEEPROM3_CS);
593 break;
594 case RBTX4938_SRTC_CHIPID:
595 bit = (1 << SRTC_CS);
596 break;
597 default:
598 return -ENODEV;
599 }
600 /* bit1,2,4 are low active, bit3 is high active */
601 *rbtx4938_spics_ptr =
602 (*rbtx4938_spics_ptr & ~bit) |
603 ((on ? (bit ^ 0x0b) : ~(bit ^ 0x0b)) & bit);
604 return 0;
605}
606
607#ifdef CONFIG_PCI 581#ifdef CONFIG_PCI
608extern int spi_eeprom_read(int chipid, int address, unsigned char *buf, int len); 582static int __init rbtx4938_ethaddr_init(void)
609
610int rbtx4938_get_tx4938_ethaddr(struct pci_dev *dev, unsigned char *addr)
611{ 583{
612 struct pci_controller *channel = (struct pci_controller *)dev->bus->sysdata; 584 unsigned char dat[17];
613 static unsigned char dat[17]; 585 unsigned char sum;
614 static int read_dat = 0; 586 int i;
615 int ch = 0;
616 587
617 if (channel != &tx4938_pci_controller[1]) 588 /* 0-3: "MAC\0", 4-9:eth0, 10-15:eth1, 16:sum */
618 return -ENODEV; 589 if (spi_eeprom_read(SEEPROM1_CS, 0, dat, sizeof(dat))) {
619 /* TX4938 PCIC1 */ 590 printk(KERN_ERR "seeprom: read error.\n");
620 switch (PCI_SLOT(dev->devfn)) {
621 case TX4938_PCIC_IDSEL_AD_TO_SLOT(31):
622 ch = 0;
623 break;
624 case TX4938_PCIC_IDSEL_AD_TO_SLOT(30):
625 ch = 1;
626 break;
627 default:
628 return -ENODEV; 591 return -ENODEV;
592 } else {
593 if (strcmp(dat, "MAC") != 0)
594 printk(KERN_WARNING "seeprom: bad signature.\n");
595 for (i = 0, sum = 0; i < sizeof(dat); i++)
596 sum += dat[i];
597 if (sum)
598 printk(KERN_WARNING "seeprom: bad checksum.\n");
629 } 599 }
630 if (!read_dat) { 600 for (i = 0; i < 2; i++) {
631 unsigned char sum; 601 unsigned int slot = TX4938_PCIC_IDSEL_AD_TO_SLOT(31 - i);
632 int i; 602 unsigned int id = (1 << 8) | PCI_DEVFN(slot, 0); /* bus 1 */
633 read_dat = 1; 603 struct platform_device *pdev;
634 /* 0-3: "MAC\0", 4-9:eth0, 10-15:eth1, 16:sum */ 604 if (!(tx4938_ccfgptr->pcfg &
635 if (spi_eeprom_read(RBTX4938_SEEPROM1_CHIPID, 605 (i ? TX4938_PCFG_ETH1_SEL : TX4938_PCFG_ETH0_SEL)))
636 0, dat, sizeof(dat))) { 606 continue;
637 printk(KERN_ERR "seeprom: read error.\n"); 607 pdev = platform_device_alloc("tc35815-mac", id);
638 } else { 608 if (!pdev ||
639 if (strcmp(dat, "MAC") != 0) 609 platform_device_add_data(pdev, &dat[4 + 6 * i], 6) ||
640 printk(KERN_WARNING "seeprom: bad signature.\n"); 610 platform_device_add(pdev))
641 for (i = 0, sum = 0; i < sizeof(dat); i++) 611 platform_device_put(pdev);
642 sum += dat[i];
643 if (sum)
644 printk(KERN_WARNING "seeprom: bad checksum.\n");
645 }
646 } 612 }
647 memcpy(addr, &dat[4 + 6 * ch], 6);
648 return 0; 613 return 0;
649} 614}
615device_initcall(rbtx4938_ethaddr_init);
650#endif /* CONFIG_PCI */ 616#endif /* CONFIG_PCI */
651 617
652extern void __init txx9_spi_init(unsigned long base, int (*cs_func)(int chipid, int on));
653static void __init rbtx4938_spi_setup(void) 618static void __init rbtx4938_spi_setup(void)
654{ 619{
655 /* set SPI_SEL */ 620 /* set SPI_SEL */
@@ -657,7 +622,6 @@ static void __init rbtx4938_spi_setup(void)
657 /* chip selects for SPI devices */ 622 /* chip selects for SPI devices */
658 tx4938_pioptr->dout |= (1 << SEEPROM1_CS); 623 tx4938_pioptr->dout |= (1 << SEEPROM1_CS);
659 tx4938_pioptr->dir |= (1 << SEEPROM1_CS); 624 tx4938_pioptr->dir |= (1 << SEEPROM1_CS);
660 txx9_spi_init(TX4938_SPI_REG, rbtx4938_spi_cs_func);
661} 625}
662 626
663static struct resource rbtx4938_fpga_resource; 627static struct resource rbtx4938_fpga_resource;
@@ -896,10 +860,8 @@ void tx4938_report_pcic_status(void)
896/* We use onchip r4k counter or TMR timer as our system wide timer 860/* We use onchip r4k counter or TMR timer as our system wide timer
897 * interrupt running at 100HZ. */ 861 * interrupt running at 100HZ. */
898 862
899extern void __init rtc_rx5c348_init(int chipid);
900void __init rbtx4938_time_init(void) 863void __init rbtx4938_time_init(void)
901{ 864{
902 rtc_rx5c348_init(RBTX4938_SRTC_CHIPID);
903 mips_hpt_frequency = txx9_cpu_clock / 2; 865 mips_hpt_frequency = txx9_cpu_clock / 2;
904} 866}
905 867
@@ -1016,29 +978,6 @@ void __init toshiba_rbtx4938_setup(void)
1016 *rbtx4938_dipsw_ptr, *rbtx4938_bdipsw_ptr); 978 *rbtx4938_dipsw_ptr, *rbtx4938_bdipsw_ptr);
1017} 979}
1018 980
1019#ifdef CONFIG_PROC_FS
1020extern void spi_eeprom_proc_create(struct proc_dir_entry *dir, int chipid);
1021static int __init tx4938_spi_proc_setup(void)
1022{
1023 struct proc_dir_entry *tx4938_spi_eeprom_dir;
1024
1025 tx4938_spi_eeprom_dir = proc_mkdir("spi_eeprom", 0);
1026
1027 if (!tx4938_spi_eeprom_dir)
1028 return -ENOMEM;
1029
1030 /* don't allow user access to RBTX4938_SEEPROM1_CHIPID
1031 * as it contains eth0 and eth1 MAC addresses
1032 */
1033 spi_eeprom_proc_create(tx4938_spi_eeprom_dir, RBTX4938_SEEPROM2_CHIPID);
1034 spi_eeprom_proc_create(tx4938_spi_eeprom_dir, RBTX4938_SEEPROM3_CHIPID);
1035
1036 return 0;
1037}
1038
1039__initcall(tx4938_spi_proc_setup);
1040#endif
1041
1042static int __init rbtx4938_ne_init(void) 981static int __init rbtx4938_ne_init(void)
1043{ 982{
1044 struct resource res[] = { 983 struct resource res[] = {
@@ -1057,3 +996,176 @@ static int __init rbtx4938_ne_init(void)
1057 return IS_ERR(dev) ? PTR_ERR(dev) : 0; 996 return IS_ERR(dev) ? PTR_ERR(dev) : 0;
1058} 997}
1059device_initcall(rbtx4938_ne_init); 998device_initcall(rbtx4938_ne_init);
999
1000/* GPIO support */
1001
1002static DEFINE_SPINLOCK(rbtx4938_spi_gpio_lock);
1003
1004static void rbtx4938_spi_gpio_set(unsigned gpio, int value)
1005{
1006 u8 val;
1007 unsigned long flags;
1008 gpio -= 16;
1009 spin_lock_irqsave(&rbtx4938_spi_gpio_lock, flags);
1010 val = *rbtx4938_spics_ptr;
1011 if (value)
1012 val |= 1 << gpio;
1013 else
1014 val &= ~(1 << gpio);
1015 *rbtx4938_spics_ptr = val;
1016 mmiowb();
1017 spin_unlock_irqrestore(&rbtx4938_spi_gpio_lock, flags);
1018}
1019
1020static int rbtx4938_spi_gpio_dir_out(unsigned gpio, int value)
1021{
1022 rbtx4938_spi_gpio_set(gpio, value);
1023 return 0;
1024}
1025
1026static DEFINE_SPINLOCK(tx4938_gpio_lock);
1027
1028static int tx4938_gpio_get(unsigned gpio)
1029{
1030 return tx4938_pioptr->din & (1 << gpio);
1031}
1032
1033static void tx4938_gpio_set_raw(unsigned gpio, int value)
1034{
1035 u32 val;
1036 val = tx4938_pioptr->dout;
1037 if (value)
1038 val |= 1 << gpio;
1039 else
1040 val &= ~(1 << gpio);
1041 tx4938_pioptr->dout = val;
1042}
1043
1044static void tx4938_gpio_set(unsigned gpio, int value)
1045{
1046 unsigned long flags;
1047 spin_lock_irqsave(&tx4938_gpio_lock, flags);
1048 tx4938_gpio_set_raw(gpio, value);
1049 mmiowb();
1050 spin_unlock_irqrestore(&tx4938_gpio_lock, flags);
1051}
1052
1053static int tx4938_gpio_dir_in(unsigned gpio)
1054{
1055 spin_lock_irq(&tx4938_gpio_lock);
1056 tx4938_pioptr->dir &= ~(1 << gpio);
1057 mmiowb();
1058 spin_unlock_irq(&tx4938_gpio_lock);
1059 return 0;
1060}
1061
1062static int tx4938_gpio_dir_out(unsigned int gpio, int value)
1063{
1064 spin_lock_irq(&tx4938_gpio_lock);
1065 tx4938_gpio_set_raw(gpio, value);
1066 tx4938_pioptr->dir |= 1 << gpio;
1067 mmiowb();
1068 spin_unlock_irq(&tx4938_gpio_lock);
1069 return 0;
1070}
1071
1072int gpio_direction_input(unsigned gpio)
1073{
1074 if (gpio < 16)
1075 return tx4938_gpio_dir_in(gpio);
1076 return -EINVAL;
1077}
1078
1079int gpio_direction_output(unsigned gpio, int value)
1080{
1081 if (gpio < 16)
1082 return tx4938_gpio_dir_out(gpio, value);
1083 if (gpio < 16 + 3)
1084 return rbtx4938_spi_gpio_dir_out(gpio, value);
1085 return -EINVAL;
1086}
1087
1088int gpio_get_value(unsigned gpio)
1089{
1090 if (gpio < 16)
1091 return tx4938_gpio_get(gpio);
1092 return 0;
1093}
1094
1095void gpio_set_value(unsigned gpio, int value)
1096{
1097 if (gpio < 16)
1098 tx4938_gpio_set(gpio, value);
1099 else
1100 rbtx4938_spi_gpio_set(gpio, value);
1101}
1102
1103/* SPI support */
1104
1105static void __init txx9_spi_init(unsigned long base, int irq)
1106{
1107 struct resource res[] = {
1108 {
1109 .start = base,
1110 .end = base + 0x20 - 1,
1111 .flags = IORESOURCE_MEM,
1112 .parent = &tx4938_reg_resource,
1113 }, {
1114 .start = irq,
1115 .flags = IORESOURCE_IRQ,
1116 },
1117 };
1118 platform_device_register_simple("txx9spi", 0,
1119 res, ARRAY_SIZE(res));
1120}
1121
1122static int __init rbtx4938_spi_init(void)
1123{
1124 struct spi_board_info srtc_info = {
1125 .modalias = "rs5c348",
1126 .max_speed_hz = 1000000, /* 1.0Mbps @ Vdd 2.0V */
1127 .bus_num = 0,
1128 .chip_select = 16 + SRTC_CS,
1129 /* Mode 1 (High-Active, Shift-Then-Sample), High Avtive CS */
1130 .mode = SPI_MODE_1 | SPI_CS_HIGH,
1131 };
1132 spi_register_board_info(&srtc_info, 1);
1133 spi_eeprom_register(SEEPROM1_CS);
1134 spi_eeprom_register(16 + SEEPROM2_CS);
1135 spi_eeprom_register(16 + SEEPROM3_CS);
1136 txx9_spi_init(TX4938_SPI_REG & 0xfffffffffULL, RBTX4938_IRQ_IRC_SPI);
1137 return 0;
1138}
1139arch_initcall(rbtx4938_spi_init);
1140
1141/* Minimum CLK support */
1142
1143struct clk *clk_get(struct device *dev, const char *id)
1144{
1145 if (!strcmp(id, "spi-baseclk"))
1146 return (struct clk *)(txx9_gbus_clock / 2 / 4);
1147 return ERR_PTR(-ENOENT);
1148}
1149EXPORT_SYMBOL(clk_get);
1150
1151int clk_enable(struct clk *clk)
1152{
1153 return 0;
1154}
1155EXPORT_SYMBOL(clk_enable);
1156
1157void clk_disable(struct clk *clk)
1158{
1159}
1160EXPORT_SYMBOL(clk_disable);
1161
1162unsigned long clk_get_rate(struct clk *clk)
1163{
1164 return (unsigned long)clk;
1165}
1166EXPORT_SYMBOL(clk_get_rate);
1167
1168void clk_put(struct clk *clk)
1169{
1170}
1171EXPORT_SYMBOL(clk_put);
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c b/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c
index 89596e62f909..4d6b4ade5e8c 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c
@@ -10,209 +10,90 @@
10 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) 10 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
11 */ 11 */
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/delay.h> 13#include <linux/device.h>
14#include <linux/proc_fs.h> 14#include <linux/spi/spi.h>
15#include <linux/spinlock.h> 15#include <linux/spi/eeprom.h>
16#include <asm/tx4938/spi.h> 16#include <asm/tx4938/spi.h>
17#include <asm/tx4938/tx4938.h>
18 17
19/* ATMEL 250x0 instructions */ 18#define AT250X0_PAGE_SIZE 8
20#define ATMEL_WREN 0x06
21#define ATMEL_WRDI 0x04
22#define ATMEL_RDSR 0x05
23#define ATMEL_WRSR 0x01
24#define ATMEL_READ 0x03
25#define ATMEL_WRITE 0x02
26 19
27#define ATMEL_SR_BSY 0x01 20/* register board information for at25 driver */
28#define ATMEL_SR_WEN 0x02 21int __init spi_eeprom_register(int chipid)
29#define ATMEL_SR_BP0 0x04
30#define ATMEL_SR_BP1 0x08
31
32DEFINE_SPINLOCK(spi_eeprom_lock);
33
34static struct spi_dev_desc seeprom_dev_desc = {
35 .baud = 1500000, /* 1.5Mbps */
36 .tcss = 1,
37 .tcsh = 1,
38 .tcsr = 1,
39 .byteorder = 1, /* MSB-First */
40 .polarity = 0, /* High-Active */
41 .phase = 0, /* Sample-Then-Shift */
42
43};
44static inline int
45spi_eeprom_io(int chipid,
46 unsigned char **inbufs, unsigned int *incounts,
47 unsigned char **outbufs, unsigned int *outcounts)
48{
49 return txx9_spi_io(chipid, &seeprom_dev_desc,
50 inbufs, incounts, outbufs, outcounts, 0);
51}
52
53int spi_eeprom_write_enable(int chipid, int enable)
54{ 22{
55 unsigned char inbuf[1]; 23 static struct spi_eeprom eeprom = {
56 unsigned char *inbufs[1]; 24 .name = "at250x0",
57 unsigned int incounts[2]; 25 .byte_len = 128,
58 unsigned long flags; 26 .page_size = AT250X0_PAGE_SIZE,
59 int stat; 27 .flags = EE_ADDR1,
60 inbuf[0] = enable ? ATMEL_WREN : ATMEL_WRDI; 28 };
61 inbufs[0] = inbuf; 29 struct spi_board_info info = {
62 incounts[0] = sizeof(inbuf); 30 .modalias = "at25",
63 incounts[1] = 0; 31 .max_speed_hz = 1500000, /* 1.5Mbps */
64 spin_lock_irqsave(&spi_eeprom_lock, flags); 32 .bus_num = 0,
65 stat = spi_eeprom_io(chipid, inbufs, incounts, NULL, NULL); 33 .chip_select = chipid,
66 spin_unlock_irqrestore(&spi_eeprom_lock, flags); 34 .platform_data = &eeprom,
67 return stat; 35 /* Mode 0: High-Active, Sample-Then-Shift */
68} 36 };
69 37
70static int spi_eeprom_read_status_nolock(int chipid) 38 return spi_register_board_info(&info, 1);
71{
72 unsigned char inbuf[2], outbuf[2];
73 unsigned char *inbufs[1], *outbufs[1];
74 unsigned int incounts[2], outcounts[2];
75 int stat;
76 inbuf[0] = ATMEL_RDSR;
77 inbuf[1] = 0;
78 inbufs[0] = inbuf;
79 incounts[0] = sizeof(inbuf);
80 incounts[1] = 0;
81 outbufs[0] = outbuf;
82 outcounts[0] = sizeof(outbuf);
83 outcounts[1] = 0;
84 stat = spi_eeprom_io(chipid, inbufs, incounts, outbufs, outcounts);
85 if (stat < 0)
86 return stat;
87 return outbuf[1];
88} 39}
89 40
90int spi_eeprom_read_status(int chipid) 41/* simple temporary spi driver to provide early access to seeprom. */
91{
92 unsigned long flags;
93 int stat;
94 spin_lock_irqsave(&spi_eeprom_lock, flags);
95 stat = spi_eeprom_read_status_nolock(chipid);
96 spin_unlock_irqrestore(&spi_eeprom_lock, flags);
97 return stat;
98}
99 42
100int spi_eeprom_read(int chipid, int address, unsigned char *buf, int len) 43static struct read_param {
101{ 44 int chipid;
102 unsigned char inbuf[2]; 45 int address;
103 unsigned char *inbufs[2], *outbufs[2]; 46 unsigned char *buf;
104 unsigned int incounts[2], outcounts[3]; 47 int len;
105 unsigned long flags; 48} *read_param;
106 int stat;
107 inbuf[0] = ATMEL_READ;
108 inbuf[1] = address;
109 inbufs[0] = inbuf;
110 inbufs[1] = NULL;
111 incounts[0] = sizeof(inbuf);
112 incounts[1] = 0;
113 outbufs[0] = NULL;
114 outbufs[1] = buf;
115 outcounts[0] = 2;
116 outcounts[1] = len;
117 outcounts[2] = 0;
118 spin_lock_irqsave(&spi_eeprom_lock, flags);
119 stat = spi_eeprom_io(chipid, inbufs, incounts, outbufs, outcounts);
120 spin_unlock_irqrestore(&spi_eeprom_lock, flags);
121 return stat;
122}
123 49
124int spi_eeprom_write(int chipid, int address, unsigned char *buf, int len) 50static int __init early_seeprom_probe(struct spi_device *spi)
125{ 51{
126 unsigned char inbuf[2]; 52 int stat = 0;
127 unsigned char *inbufs[2]; 53 u8 cmd[2];
128 unsigned int incounts[3]; 54 int len = read_param->len;
129 unsigned long flags; 55 char *buf = read_param->buf;
130 int i, stat; 56 int address = read_param->address;
131 57
132 if (address / 8 != (address + len - 1) / 8) 58 dev_info(&spi->dev, "spiclk %u KHz.\n",
133 return -EINVAL; 59 (spi->max_speed_hz + 500) / 1000);
134 stat = spi_eeprom_write_enable(chipid, 1); 60 if (read_param->chipid != spi->chip_select)
135 if (stat < 0) 61 return -ENODEV;
136 return stat; 62 while (len > 0) {
137 stat = spi_eeprom_read_status(chipid); 63 /* spi_write_then_read can only work with small chunk */
138 if (stat < 0) 64 int c = len < AT250X0_PAGE_SIZE ? len : AT250X0_PAGE_SIZE;
139 return stat; 65 cmd[0] = 0x03; /* AT25_READ */
140 if (!(stat & ATMEL_SR_WEN)) 66 cmd[1] = address;
141 return -EPERM; 67 stat = spi_write_then_read(spi, cmd, sizeof(cmd), buf, c);
142 68 buf += c;
143 inbuf[0] = ATMEL_WRITE; 69 len -= c;
144 inbuf[1] = address; 70 address += c;
145 inbufs[0] = inbuf;
146 inbufs[1] = buf;
147 incounts[0] = sizeof(inbuf);
148 incounts[1] = len;
149 incounts[2] = 0;
150 spin_lock_irqsave(&spi_eeprom_lock, flags);
151 stat = spi_eeprom_io(chipid, inbufs, incounts, NULL, NULL);
152 if (stat < 0)
153 goto unlock_return;
154
155 /* write start. max 10ms */
156 for (i = 10; i > 0; i--) {
157 int stat = spi_eeprom_read_status_nolock(chipid);
158 if (stat < 0)
159 goto unlock_return;
160 if (!(stat & ATMEL_SR_BSY))
161 break;
162 mdelay(1);
163 } 71 }
164 spin_unlock_irqrestore(&spi_eeprom_lock, flags);
165 if (i == 0)
166 return -EIO;
167 return len;
168 unlock_return:
169 spin_unlock_irqrestore(&spi_eeprom_lock, flags);
170 return stat; 72 return stat;
171} 73}
172 74
173#ifdef CONFIG_PROC_FS 75static struct spi_driver early_seeprom_driver __initdata = {
174#define MAX_SIZE 0x80 /* for ATMEL 25010 */ 76 .driver = {
175static int spi_eeprom_read_proc(char *page, char **start, off_t off, 77 .name = "at25",
176 int count, int *eof, void *data) 78 .owner = THIS_MODULE,
177{ 79 },
178 unsigned int size = MAX_SIZE; 80 .probe = early_seeprom_probe,
179 if (spi_eeprom_read((int)data, 0, (unsigned char *)page, size) < 0) 81};
180 size = 0;
181 return size;
182}
183
184static int spi_eeprom_write_proc(struct file *file, const char *buffer,
185 unsigned long count, void *data)
186{
187 unsigned int size = MAX_SIZE;
188 int i;
189 if (file->f_pos >= size)
190 return -EIO;
191 if (file->f_pos + count > size)
192 count = size - file->f_pos;
193 for (i = 0; i < count; i += 8) {
194 int len = count - i < 8 ? count - i : 8;
195 if (spi_eeprom_write((int)data, file->f_pos,
196 (unsigned char *)buffer, len) < 0) {
197 count = -EIO;
198 break;
199 }
200 buffer += len;
201 file->f_pos += len;
202 }
203 return count;
204}
205 82
206__init void spi_eeprom_proc_create(struct proc_dir_entry *dir, int chipid) 83int __init spi_eeprom_read(int chipid, int address,
84 unsigned char *buf, int len)
207{ 85{
208 struct proc_dir_entry *entry; 86 int ret;
209 char name[128]; 87 struct read_param param = {
210 sprintf(name, "seeprom-%d", chipid); 88 .chipid = chipid,
211 entry = create_proc_entry(name, 0600, dir); 89 .address = address,
212 if (entry) { 90 .buf = buf,
213 entry->read_proc = spi_eeprom_read_proc; 91 .len = len
214 entry->write_proc = spi_eeprom_write_proc; 92 };
215 entry->data = (void *)chipid; 93
216 } 94 read_param = &param;
95 ret = spi_register_driver(&early_seeprom_driver);
96 if (!ret)
97 spi_unregister_driver(&early_seeprom_driver);
98 return ret;
217} 99}
218#endif /* CONFIG_PROC_FS */
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c b/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c
deleted file mode 100644
index 08b20cdfd7b3..000000000000
--- a/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c
+++ /dev/null
@@ -1,164 +0,0 @@
1/*
2 * linux/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c
3 * Copyright (C) 2000-2001 Toshiba Corporation
4 *
5 * 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the
6 * terms of the GNU General Public License version 2. This program is
7 * licensed "as is" without any warranty of any kind, whether express
8 * or implied.
9 *
10 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
11 */
12#include <linux/init.h>
13#include <linux/delay.h>
14#include <linux/errno.h>
15#include <linux/interrupt.h>
16#include <linux/module.h>
17#include <linux/sched.h>
18#include <linux/spinlock.h>
19#include <linux/wait.h>
20#include <asm/tx4938/spi.h>
21#include <asm/tx4938/tx4938.h>
22
23static int (*txx9_spi_cs_func)(int chipid, int on);
24static DEFINE_SPINLOCK(txx9_spi_lock);
25
26extern unsigned int txx9_gbus_clock;
27
28#define SPI_FIFO_SIZE 4
29
30void __init txx9_spi_init(unsigned long base, int (*cs_func)(int chipid, int on))
31{
32 txx9_spi_cs_func = cs_func;
33 /* enter config mode */
34 tx4938_spiptr->mcr = TXx9_SPMCR_CONFIG | TXx9_SPMCR_BCLR;
35}
36
37static DECLARE_WAIT_QUEUE_HEAD(txx9_spi_wait);
38
39static irqreturn_t txx9_spi_interrupt(int irq, void *dev_id)
40{
41 /* disable rx intr */
42 tx4938_spiptr->cr0 &= ~TXx9_SPCR0_RBSIE;
43 wake_up(&txx9_spi_wait);
44
45 return IRQ_HANDLED;
46}
47
48static struct irqaction txx9_spi_action = {
49 .handler = txx9_spi_interrupt,
50 .name = "spi",
51};
52
53void __init txx9_spi_irqinit(int irc_irq)
54{
55 setup_irq(irc_irq, &txx9_spi_action);
56}
57
58int txx9_spi_io(int chipid, struct spi_dev_desc *desc,
59 unsigned char **inbufs, unsigned int *incounts,
60 unsigned char **outbufs, unsigned int *outcounts,
61 int cansleep)
62{
63 unsigned int incount, outcount;
64 unsigned char *inp, *outp;
65 int ret;
66 unsigned long flags;
67
68 spin_lock_irqsave(&txx9_spi_lock, flags);
69 if ((tx4938_spiptr->mcr & TXx9_SPMCR_OPMODE) == TXx9_SPMCR_ACTIVE) {
70 spin_unlock_irqrestore(&txx9_spi_lock, flags);
71 return -EBUSY;
72 }
73 /* enter config mode */
74 tx4938_spiptr->mcr = TXx9_SPMCR_CONFIG | TXx9_SPMCR_BCLR;
75 tx4938_spiptr->cr0 =
76 (desc->byteorder ? TXx9_SPCR0_SBOS : 0) |
77 (desc->polarity ? TXx9_SPCR0_SPOL : 0) |
78 (desc->phase ? TXx9_SPCR0_SPHA : 0) |
79 0x08;
80 tx4938_spiptr->cr1 =
81 (((TXX9_IMCLK + desc->baud) / (2 * desc->baud) - 1) << 8) |
82 0x08 /* 8 bit only */;
83 /* enter active mode */
84 tx4938_spiptr->mcr = TXx9_SPMCR_ACTIVE;
85 spin_unlock_irqrestore(&txx9_spi_lock, flags);
86
87 /* CS ON */
88 if ((ret = txx9_spi_cs_func(chipid, 1)) < 0) {
89 spin_unlock_irqrestore(&txx9_spi_lock, flags);
90 return ret;
91 }
92 udelay(desc->tcss);
93
94 /* do scatter IO */
95 inp = inbufs ? *inbufs : NULL;
96 outp = outbufs ? *outbufs : NULL;
97 incount = 0;
98 outcount = 0;
99 while (1) {
100 unsigned char data;
101 unsigned int count;
102 int i;
103 if (!incount) {
104 incount = incounts ? *incounts++ : 0;
105 inp = (incount && inbufs) ? *inbufs++ : NULL;
106 }
107 if (!outcount) {
108 outcount = outcounts ? *outcounts++ : 0;
109 outp = (outcount && outbufs) ? *outbufs++ : NULL;
110 }
111 if (!inp && !outp)
112 break;
113 count = SPI_FIFO_SIZE;
114 if (incount)
115 count = min(count, incount);
116 if (outcount)
117 count = min(count, outcount);
118
119 /* now tx must be idle... */
120 while (!(tx4938_spiptr->sr & TXx9_SPSR_SIDLE))
121 ;
122
123 tx4938_spiptr->cr0 =
124 (tx4938_spiptr->cr0 & ~TXx9_SPCR0_RXIFL_MASK) |
125 ((count - 1) << 12);
126 if (cansleep) {
127 /* enable rx intr */
128 tx4938_spiptr->cr0 |= TXx9_SPCR0_RBSIE;
129 }
130 /* send */
131 for (i = 0; i < count; i++)
132 tx4938_spiptr->dr = inp ? *inp++ : 0;
133 /* wait all rx data */
134 if (cansleep) {
135 wait_event(txx9_spi_wait,
136 tx4938_spiptr->sr & TXx9_SPSR_SRRDY);
137 } else {
138 while (!(tx4938_spiptr->sr & TXx9_SPSR_RBSI))
139 ;
140 }
141 /* receive */
142 for (i = 0; i < count; i++) {
143 data = tx4938_spiptr->dr;
144 if (outp)
145 *outp++ = data;
146 }
147 if (incount)
148 incount -= count;
149 if (outcount)
150 outcount -= count;
151 }
152
153 /* CS OFF */
154 udelay(desc->tcsh);
155 txx9_spi_cs_func(chipid, 0);
156 udelay(desc->tcsr);
157
158 spin_lock_irqsave(&txx9_spi_lock, flags);
159 /* enter config mode */
160 tx4938_spiptr->mcr = TXx9_SPMCR_CONFIG | TXx9_SPMCR_BCLR;
161 spin_unlock_irqrestore(&txx9_spi_lock, flags);
162
163 return 0;
164}
diff --git a/arch/mips/vr41xx/common/Makefile b/arch/mips/vr41xx/common/Makefile
index f842783acd86..d0d84ec8d63d 100644
--- a/arch/mips/vr41xx/common/Makefile
+++ b/arch/mips/vr41xx/common/Makefile
@@ -2,4 +2,4 @@
2# Makefile for common code of the NEC VR4100 series. 2# Makefile for common code of the NEC VR4100 series.
3# 3#
4 4
5obj-y += bcu.o cmu.o icu.o init.o irq.o pmu.o type.o 5obj-y += bcu.o cmu.o giu.o icu.o init.o irq.o pmu.o rtc.o siu.o type.o
diff --git a/arch/mips/vr41xx/common/giu.c b/arch/mips/vr41xx/common/giu.c
new file mode 100644
index 000000000000..d21f6f2d22a3
--- /dev/null
+++ b/arch/mips/vr41xx/common/giu.c
@@ -0,0 +1,122 @@
1/*
2 * NEC VR4100 series GIU platform device.
3 *
4 * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20#include <linux/errno.h>
21#include <linux/init.h>
22#include <linux/ioport.h>
23#include <linux/platform_device.h>
24
25#include <asm/cpu.h>
26#include <asm/vr41xx/giu.h>
27#include <asm/vr41xx/irq.h>
28
29static struct resource giu_50pins_pullupdown_resource[] __initdata = {
30 {
31 .start = 0x0b000100,
32 .end = 0x0b00011f,
33 .flags = IORESOURCE_MEM,
34 },
35 {
36 .start = 0x0b0002e0,
37 .end = 0x0b0002e3,
38 .flags = IORESOURCE_MEM,
39 },
40 {
41 .start = GIUINT_IRQ,
42 .end = GIUINT_IRQ,
43 .flags = IORESOURCE_IRQ,
44 },
45};
46
47static struct resource giu_36pins_resource[] __initdata = {
48 {
49 .start = 0x0f000140,
50 .end = 0x0f00015f,
51 .flags = IORESOURCE_MEM,
52 },
53 {
54 .start = GIUINT_IRQ,
55 .end = GIUINT_IRQ,
56 .flags = IORESOURCE_IRQ,
57 },
58};
59
60static struct resource giu_48pins_resource[] __initdata = {
61 {
62 .start = 0x0f000140,
63 .end = 0x0f000167,
64 .flags = IORESOURCE_MEM,
65 },
66 {
67 .start = GIUINT_IRQ,
68 .end = GIUINT_IRQ,
69 .flags = IORESOURCE_IRQ,
70 },
71};
72
73static int __init vr41xx_giu_add(void)
74{
75 struct platform_device *pdev;
76 struct resource *res;
77 unsigned int num;
78 int retval;
79
80 pdev = platform_device_alloc("GIU", -1);
81 if (!pdev)
82 return -ENOMEM;
83
84 switch (current_cpu_data.cputype) {
85 case CPU_VR4111:
86 case CPU_VR4121:
87 pdev->id = GPIO_50PINS_PULLUPDOWN;
88 res = giu_50pins_pullupdown_resource;
89 num = ARRAY_SIZE(giu_50pins_pullupdown_resource);
90 break;
91 case CPU_VR4122:
92 case CPU_VR4131:
93 pdev->id = GPIO_36PINS;
94 res = giu_36pins_resource;
95 num = ARRAY_SIZE(giu_36pins_resource);
96 break;
97 case CPU_VR4133:
98 pdev->id = GPIO_48PINS_EDGE_SELECT;
99 res = giu_48pins_resource;
100 num = ARRAY_SIZE(giu_48pins_resource);
101 break;
102 default:
103 retval = -ENODEV;
104 goto err_free_device;
105 }
106
107 retval = platform_device_add_resources(pdev, res, num);
108 if (retval)
109 goto err_free_device;
110
111 retval = platform_device_add(pdev);
112 if (retval)
113 goto err_free_device;
114
115 return 0;
116
117err_free_device:
118 platform_device_put(pdev);
119
120 return retval;
121}
122device_initcall(vr41xx_giu_add);
diff --git a/arch/mips/vr41xx/common/rtc.c b/arch/mips/vr41xx/common/rtc.c
new file mode 100644
index 000000000000..cce605b3d688
--- /dev/null
+++ b/arch/mips/vr41xx/common/rtc.c
@@ -0,0 +1,117 @@
1/*
2 * NEC VR4100 series RTC platform device.
3 *
4 * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20#include <linux/errno.h>
21#include <linux/init.h>
22#include <linux/ioport.h>
23#include <linux/platform_device.h>
24
25#include <asm/cpu.h>
26#include <asm/vr41xx/irq.h>
27
28static struct resource rtc_type1_resource[] __initdata = {
29 {
30 .start = 0x0b0000c0,
31 .end = 0x0b0000df,
32 .flags = IORESOURCE_MEM,
33 },
34 {
35 .start = 0x0b0001c0,
36 .end = 0x0b0001df,
37 .flags = IORESOURCE_MEM,
38 },
39 {
40 .start = ELAPSEDTIME_IRQ,
41 .end = ELAPSEDTIME_IRQ,
42 .flags = IORESOURCE_IRQ,
43 },
44 {
45 .start = RTCLONG1_IRQ,
46 .end = RTCLONG1_IRQ,
47 .flags = IORESOURCE_IRQ,
48 },
49};
50
51static struct resource rtc_type2_resource[] __initdata = {
52 {
53 .start = 0x0f000100,
54 .end = 0x0f00011f,
55 .flags = IORESOURCE_MEM,
56 },
57 {
58 .start = 0x0f000120,
59 .end = 0x0f00013f,
60 .flags = IORESOURCE_MEM,
61 },
62 {
63 .start = ELAPSEDTIME_IRQ,
64 .end = ELAPSEDTIME_IRQ,
65 .flags = IORESOURCE_IRQ,
66 },
67 {
68 .start = RTCLONG1_IRQ,
69 .end = RTCLONG1_IRQ,
70 .flags = IORESOURCE_IRQ,
71 },
72};
73
74static int __init vr41xx_rtc_add(void)
75{
76 struct platform_device *pdev;
77 struct resource *res;
78 unsigned int num;
79 int retval;
80
81 pdev = platform_device_alloc("RTC", -1);
82 if (!pdev)
83 return -ENOMEM;
84
85 switch (current_cpu_data.cputype) {
86 case CPU_VR4111:
87 case CPU_VR4121:
88 res = rtc_type1_resource;
89 num = ARRAY_SIZE(rtc_type1_resource);
90 break;
91 case CPU_VR4122:
92 case CPU_VR4131:
93 case CPU_VR4133:
94 res = rtc_type2_resource;
95 num = ARRAY_SIZE(rtc_type2_resource);
96 break;
97 default:
98 retval = -ENODEV;
99 goto err_free_device;
100 }
101
102 retval = platform_device_add_resources(pdev, res, num);
103 if (retval)
104 goto err_free_device;
105
106 retval = platform_device_add(pdev);
107 if (retval)
108 goto err_free_device;
109
110 return 0;
111
112err_free_device:
113 platform_device_put(pdev);
114
115 return retval;
116}
117device_initcall(vr41xx_rtc_add);
diff --git a/arch/mips/vr41xx/common/siu.c b/arch/mips/vr41xx/common/siu.c
new file mode 100644
index 000000000000..a1e774142163
--- /dev/null
+++ b/arch/mips/vr41xx/common/siu.c
@@ -0,0 +1,120 @@
1/*
2 * NEC VR4100 series SIU platform device.
3 *
4 * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20#include <linux/errno.h>
21#include <linux/init.h>
22#include <linux/ioport.h>
23#include <linux/platform_device.h>
24#include <linux/serial_core.h>
25
26#include <asm/cpu.h>
27#include <asm/vr41xx/siu.h>
28
29static unsigned int siu_type1_ports[SIU_PORTS_MAX] __initdata = {
30 PORT_VR41XX_SIU,
31 PORT_UNKNOWN,
32};
33
34static struct resource siu_type1_resource[] __initdata = {
35 {
36 .start = 0x0c000000,
37 .end = 0x0c00000a,
38 .flags = IORESOURCE_MEM,
39 },
40 {
41 .start = SIU_IRQ,
42 .end = SIU_IRQ,
43 .flags = IORESOURCE_IRQ,
44 },
45};
46
47static unsigned int siu_type2_ports[SIU_PORTS_MAX] __initdata = {
48 PORT_VR41XX_SIU,
49 PORT_VR41XX_DSIU,
50};
51
52static struct resource siu_type2_resource[] __initdata = {
53 {
54 .start = 0x0f000800,
55 .end = 0x0f00080a,
56 .flags = IORESOURCE_MEM,
57 },
58 {
59 .start = 0x0f000820,
60 .end = 0x0f000829,
61 .flags = IORESOURCE_MEM,
62 },
63 {
64 .start = SIU_IRQ,
65 .end = SIU_IRQ,
66 .flags = IORESOURCE_IRQ,
67 },
68 {
69 .start = DSIU_IRQ,
70 .end = DSIU_IRQ,
71 .flags = IORESOURCE_IRQ,
72 },
73};
74
75static int __init vr41xx_siu_add(void)
76{
77 struct platform_device *pdev;
78 struct resource *res;
79 unsigned int num;
80 int retval;
81
82 pdev = platform_device_alloc("SIU", -1);
83 if (!pdev)
84 return -ENOMEM;
85
86 switch (current_cpu_data.cputype) {
87 case CPU_VR4111:
88 case CPU_VR4121:
89 pdev->dev.platform_data = siu_type1_ports;
90 res = siu_type1_resource;
91 num = ARRAY_SIZE(siu_type1_resource);
92 break;
93 case CPU_VR4122:
94 case CPU_VR4131:
95 case CPU_VR4133:
96 pdev->dev.platform_data = siu_type2_ports;
97 res = siu_type2_resource;
98 num = ARRAY_SIZE(siu_type2_resource);
99 break;
100 default:
101 retval = -ENODEV;
102 goto err_free_device;
103 }
104
105 retval = platform_device_add_resources(pdev, res, num);
106 if (retval)
107 goto err_free_device;
108
109 retval = platform_device_add(pdev);
110 if (retval)
111 goto err_free_device;
112
113 return 0;
114
115err_free_device:
116 platform_device_put(pdev);
117
118 return retval;
119}
120device_initcall(vr41xx_siu_add);
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c
index d86e15776779..f2042e6466a4 100644
--- a/arch/parisc/hpux/fs.c
+++ b/arch/parisc/hpux/fs.c
@@ -21,6 +21,7 @@
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */ 22 */
23 23
24#include <linux/kernel.h>
24#include <linux/mm.h> 25#include <linux/mm.h>
25#include <linux/sched.h> 26#include <linux/sched.h>
26#include <linux/file.h> 27#include <linux/file.h>
@@ -69,7 +70,6 @@ struct getdents_callback {
69}; 70};
70 71
71#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) 72#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
72#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1))
73 73
74static int filldir(void * __buf, const char * name, int namlen, loff_t offset, 74static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
75 u64 ino, unsigned d_type) 75 u64 ino, unsigned d_type)
@@ -77,7 +77,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
77 struct hpux_dirent __user * dirent; 77 struct hpux_dirent __user * dirent;
78 struct getdents_callback * buf = (struct getdents_callback *) __buf; 78 struct getdents_callback * buf = (struct getdents_callback *) __buf;
79 ino_t d_ino; 79 ino_t d_ino;
80 int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); 80 int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, sizeof(long));
81 81
82 buf->error = -EINVAL; /* only used if we fail.. */ 82 buf->error = -EINVAL; /* only used if we fail.. */
83 if (reclen > buf->count) 83 if (reclen > buf->count)
@@ -102,7 +102,6 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
102} 102}
103 103
104#undef NAME_OFFSET 104#undef NAME_OFFSET
105#undef ROUND_UP
106 105
107int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count) 106int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count)
108{ 107{
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index 8474f9e5ca10..42598abf4576 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -954,21 +954,6 @@ intr_return:
954 /* NOTE: Need to enable interrupts incase we schedule. */ 954 /* NOTE: Need to enable interrupts incase we schedule. */
955 ssm PSW_SM_I, %r0 955 ssm PSW_SM_I, %r0
956 956
957 /* Check for software interrupts */
958
959 .import irq_stat,data
960
961 load32 irq_stat,%r19
962#ifdef CONFIG_SMP
963 mfctl %cr30,%r1
964 ldw TI_CPU(%r1),%r1 /* get cpu # - int */
965 /* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) amount
966 ** irq_stat[] is defined using ____cacheline_aligned.
967 */
968 SHLREG %r1,L1_CACHE_SHIFT,%r20
969 add %r19,%r20,%r19 /* now have &irq_stat[smp_processor_id()] */
970#endif /* CONFIG_SMP */
971
972intr_check_resched: 957intr_check_resched:
973 958
974 /* check for reschedule */ 959 /* check for reschedule */
@@ -2034,10 +2019,9 @@ ENTRY(syscall_exit)
2034 STREG %r28,TASK_PT_GR28(%r1) 2019 STREG %r28,TASK_PT_GR28(%r1)
2035 2020
2036#ifdef CONFIG_HPUX 2021#ifdef CONFIG_HPUX
2037
2038/* <linux/personality.h> cannot be easily included */ 2022/* <linux/personality.h> cannot be easily included */
2039#define PER_HPUX 0x10 2023#define PER_HPUX 0x10
2040 LDREG TASK_PERSONALITY(%r1),%r19 2024 ldw TASK_PERSONALITY(%r1),%r19
2041 2025
2042 /* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */ 2026 /* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */
2043 ldo -PER_HPUX(%r19), %r19 2027 ldo -PER_HPUX(%r19), %r19
@@ -2055,24 +2039,6 @@ ENTRY(syscall_exit)
2055 */ 2039 */
2056 loadgp 2040 loadgp
2057 2041
2058syscall_check_bh:
2059
2060 /* Check for software interrupts */
2061
2062 .import irq_stat,data
2063
2064 load32 irq_stat,%r19
2065
2066#ifdef CONFIG_SMP
2067 /* sched.h: int processor */
2068 /* %r26 is used as scratch register to index into irq_stat[] */
2069 ldw TI_CPU-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r26 /* cpu # */
2070
2071 /* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) bits */
2072 SHLREG %r26,L1_CACHE_SHIFT,%r20
2073 add %r19,%r20,%r19 /* now have &irq_stat[smp_processor_id()] */
2074#endif /* CONFIG_SMP */
2075
2076syscall_check_resched: 2042syscall_check_resched:
2077 2043
2078 /* check for reschedule */ 2044 /* check for reschedule */
@@ -2114,7 +2080,7 @@ syscall_restore:
2114 /* Are we being ptraced? */ 2080 /* Are we being ptraced? */
2115 LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 2081 LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
2116 2082
2117 LDREG TASK_PTRACE(%r1), %r19 2083 ldw TASK_PTRACE(%r1), %r19
2118 bb,< %r19,31,syscall_restore_rfi 2084 bb,< %r19,31,syscall_restore_rfi
2119 nop 2085 nop
2120 2086
@@ -2244,7 +2210,7 @@ syscall_do_resched:
2244#else 2210#else
2245 nop 2211 nop
2246#endif 2212#endif
2247 b syscall_check_bh /* if resched, we start over again */ 2213 b syscall_check_resched /* if resched, we start over again */
2248 nop 2214 nop
2249ENDPROC(syscall_exit) 2215ENDPROC(syscall_exit)
2250 2216
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c
index 39dc835bf89e..fd6552c4c08c 100644
--- a/arch/parisc/kernel/firmware.c
+++ b/arch/parisc/kernel/firmware.c
@@ -634,7 +634,7 @@ EXPORT_SYMBOL(pdc_lan_station_id);
634 * pdc_stable_read - Read data from Stable Storage. 634 * pdc_stable_read - Read data from Stable Storage.
635 * @staddr: Stable Storage address to access. 635 * @staddr: Stable Storage address to access.
636 * @memaddr: The memory address where Stable Storage data shall be copied. 636 * @memaddr: The memory address where Stable Storage data shall be copied.
637 * @count: number of bytes to transfert. count is multiple of 4. 637 * @count: number of bytes to transfer. count is multiple of 4.
638 * 638 *
639 * This PDC call reads from the Stable Storage address supplied in staddr 639 * This PDC call reads from the Stable Storage address supplied in staddr
640 * and copies count bytes to the memory address memaddr. 640 * and copies count bytes to the memory address memaddr.
@@ -660,7 +660,7 @@ EXPORT_SYMBOL(pdc_stable_read);
660 * pdc_stable_write - Write data to Stable Storage. 660 * pdc_stable_write - Write data to Stable Storage.
661 * @staddr: Stable Storage address to access. 661 * @staddr: Stable Storage address to access.
662 * @memaddr: The memory address where Stable Storage data shall be read from. 662 * @memaddr: The memory address where Stable Storage data shall be read from.
663 * @count: number of bytes to transfert. count is multiple of 4. 663 * @count: number of bytes to transfer. count is multiple of 4.
664 * 664 *
665 * This PDC call reads count bytes from the supplied memaddr address, 665 * This PDC call reads count bytes from the supplied memaddr address,
666 * and copies count bytes to the Stable Storage address staddr. 666 * and copies count bytes to the Stable Storage address staddr.
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c
index 18ba4cb9159b..04848b2b381c 100644
--- a/arch/parisc/kernel/hardware.c
+++ b/arch/parisc/kernel/hardware.c
@@ -38,7 +38,7 @@
38 * so don't reference this table after starting the init process 38 * so don't reference this table after starting the init process
39 */ 39 */
40 40
41static struct hp_hardware hp_hardware_list[] __initdata = { 41static struct hp_hardware hp_hardware_list[] __devinitdata = {
42 {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"}, 42 {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"},
43 {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"}, 43 {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"},
44 {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"}, 44 {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"},
@@ -1219,7 +1219,7 @@ static struct hp_cpu_type_mask {
1219 unsigned short model; 1219 unsigned short model;
1220 unsigned short mask; 1220 unsigned short mask;
1221 enum cpu_type cpu; 1221 enum cpu_type cpu;
1222} hp_cpu_type_mask_list[] __initdata = { 1222} hp_cpu_type_mask_list[] __devinitdata = {
1223 1223
1224 { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */ 1224 { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */
1225 { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */ 1225 { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */
@@ -1296,10 +1296,11 @@ static struct hp_cpu_type_mask {
1296 { 0x05f0, 0x0ff0, pcxw2 }, /* 0x05f0 - 0x05ff */ 1296 { 0x05f0, 0x0ff0, pcxw2 }, /* 0x05f0 - 0x05ff */
1297 { 0x0600, 0x0fe0, pcxl }, /* 0x0600 - 0x061f */ 1297 { 0x0600, 0x0fe0, pcxl }, /* 0x0600 - 0x061f */
1298 { 0x0880, 0x0ff0, mako }, /* 0x0880 - 0x088f */ 1298 { 0x0880, 0x0ff0, mako }, /* 0x0880 - 0x088f */
1299 { 0x0890, 0x0ff0, mako2 }, /* 0x0890 - 0x089f */
1299 { 0x0000, 0x0000, pcx } /* terminate table */ 1300 { 0x0000, 0x0000, pcx } /* terminate table */
1300}; 1301};
1301 1302
1302char *cpu_name_version[][2] = { 1303const char * const cpu_name_version[][2] = {
1303 [pcx] = { "PA7000 (PCX)", "1.0" }, 1304 [pcx] = { "PA7000 (PCX)", "1.0" },
1304 [pcxs] = { "PA7000 (PCX-S)", "1.1a" }, 1305 [pcxs] = { "PA7000 (PCX-S)", "1.1a" },
1305 [pcxt] = { "PA7100 (PCX-T)", "1.1b" }, 1306 [pcxt] = { "PA7100 (PCX-T)", "1.1b" },
@@ -1311,10 +1312,11 @@ char *cpu_name_version[][2] = {
1311 [pcxw] = { "PA8500 (PCX-W)", "2.0" }, 1312 [pcxw] = { "PA8500 (PCX-W)", "2.0" },
1312 [pcxw_] = { "PA8600 (PCX-W+)", "2.0" }, 1313 [pcxw_] = { "PA8600 (PCX-W+)", "2.0" },
1313 [pcxw2] = { "PA8700 (PCX-W2)", "2.0" }, 1314 [pcxw2] = { "PA8700 (PCX-W2)", "2.0" },
1314 [mako] = { "PA8800 (Mako)", "2.0" } 1315 [mako] = { "PA8800 (Mako)", "2.0" },
1316 [mako2] = { "PA8900 (Shortfin)", "2.0" }
1315}; 1317};
1316 1318
1317const char * __init 1319const char * __devinit
1318parisc_hardware_description(struct parisc_device_id *id) 1320parisc_hardware_description(struct parisc_device_id *id)
1319{ 1321{
1320 struct hp_hardware *listptr; 1322 struct hp_hardware *listptr;
@@ -1353,7 +1355,7 @@ parisc_hardware_description(struct parisc_device_id *id)
1353 1355
1354 1356
1355/* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */ 1357/* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */
1356enum cpu_type __init 1358enum cpu_type __cpuinit
1357parisc_get_cpu_type(unsigned long hversion) 1359parisc_get_cpu_type(unsigned long hversion)
1358{ 1360{
1359 struct hp_cpu_type_mask *ptr; 1361 struct hp_cpu_type_mask *ptr;
diff --git a/arch/parisc/kernel/hpmc.S b/arch/parisc/kernel/hpmc.S
index d8baa158d8a0..43b41df0b541 100644
--- a/arch/parisc/kernel/hpmc.S
+++ b/arch/parisc/kernel/hpmc.S
@@ -295,8 +295,5 @@ os_hpmc_6:
295 b . 295 b .
296 nop 296 nop
297ENDPROC(os_hpmc) 297ENDPROC(os_hpmc)
298 298ENTRY(os_hpmc_end) /* this label used to compute os_hpmc checksum */
299 /* this label used to compute os_hpmc checksum */
300ENTRY(os_hpmc_end)
301
302 nop 299 nop
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index c5c9125dacec..76ce5e3b0050 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -46,14 +46,10 @@ extern irqreturn_t ipi_interrupt(int, void *);
46static volatile unsigned long cpu_eiem = 0; 46static volatile unsigned long cpu_eiem = 0;
47 47
48/* 48/*
49** ack bitmap ... habitually set to 1, but reset to zero 49** local ACK bitmap ... habitually set to 1, but reset to zero
50** between ->ack() and ->end() of the interrupt to prevent 50** between ->ack() and ->end() of the interrupt to prevent
51** re-interruption of a processing interrupt. 51** re-interruption of a processing interrupt.
52*/ 52*/
53static volatile unsigned long global_ack_eiem = ~0UL;
54/*
55** Local bitmap, same as above but for per-cpu interrupts
56*/
57static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL; 53static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL;
58 54
59static void cpu_disable_irq(unsigned int irq) 55static void cpu_disable_irq(unsigned int irq)
@@ -94,13 +90,11 @@ void cpu_ack_irq(unsigned int irq)
94 int cpu = smp_processor_id(); 90 int cpu = smp_processor_id();
95 91
96 /* Clear in EIEM so we can no longer process */ 92 /* Clear in EIEM so we can no longer process */
97 if (CHECK_IRQ_PER_CPU(irq_desc[irq].status)) 93 per_cpu(local_ack_eiem, cpu) &= ~mask;
98 per_cpu(local_ack_eiem, cpu) &= ~mask;
99 else
100 global_ack_eiem &= ~mask;
101 94
102 /* disable the interrupt */ 95 /* disable the interrupt */
103 set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); 96 set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu));
97
104 /* and now ack it */ 98 /* and now ack it */
105 mtctl(mask, 23); 99 mtctl(mask, 23);
106} 100}
@@ -111,13 +105,10 @@ void cpu_end_irq(unsigned int irq)
111 int cpu = smp_processor_id(); 105 int cpu = smp_processor_id();
112 106
113 /* set it in the eiems---it's no longer in process */ 107 /* set it in the eiems---it's no longer in process */
114 if (CHECK_IRQ_PER_CPU(irq_desc[irq].status)) 108 per_cpu(local_ack_eiem, cpu) |= mask;
115 per_cpu(local_ack_eiem, cpu) |= mask;
116 else
117 global_ack_eiem |= mask;
118 109
119 /* enable the interrupt */ 110 /* enable the interrupt */
120 set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); 111 set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu));
121} 112}
122 113
123#ifdef CONFIG_SMP 114#ifdef CONFIG_SMP
@@ -354,8 +345,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
354 local_irq_disable(); 345 local_irq_disable();
355 irq_enter(); 346 irq_enter();
356 347
357 eirr_val = mfctl(23) & cpu_eiem & global_ack_eiem & 348 eirr_val = mfctl(23) & cpu_eiem & per_cpu(local_ack_eiem, cpu);
358 per_cpu(local_ack_eiem, cpu);
359 if (!eirr_val) 349 if (!eirr_val)
360 goto set_out; 350 goto set_out;
361 irq = eirr_to_irq(eirr_val); 351 irq = eirr_to_irq(eirr_val);
@@ -381,7 +371,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
381 return; 371 return;
382 372
383 set_out: 373 set_out:
384 set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); 374 set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu));
385 goto out; 375 goto out;
386} 376}
387 377
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c
index 0c3aecb85a5c..23c1388df1f5 100644
--- a/arch/parisc/kernel/pci-dma.c
+++ b/arch/parisc/kernel/pci-dma.c
@@ -21,6 +21,7 @@
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <linux/pci.h> 22#include <linux/pci.h>
23#include <linux/proc_fs.h> 23#include <linux/proc_fs.h>
24#include <linux/seq_file.h>
24#include <linux/slab.h> 25#include <linux/slab.h>
25#include <linux/string.h> 26#include <linux/string.h>
26#include <linux/types.h> 27#include <linux/types.h>
@@ -34,7 +35,6 @@
34#include <asm/tlbflush.h> /* for purge_tlb_*() macros */ 35#include <asm/tlbflush.h> /* for purge_tlb_*() macros */
35 36
36static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL; 37static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL;
37static int pcxl_proc_info(char *buffer, char **start, off_t offset, int length);
38static unsigned long pcxl_used_bytes __read_mostly = 0; 38static unsigned long pcxl_used_bytes __read_mostly = 0;
39static unsigned long pcxl_used_pages __read_mostly = 0; 39static unsigned long pcxl_used_pages __read_mostly = 0;
40 40
@@ -330,6 +330,54 @@ pcxl_free_range(unsigned long vaddr, size_t size)
330 dump_resmap(); 330 dump_resmap();
331} 331}
332 332
333static int proc_pcxl_dma_show(struct seq_file *m, void *v)
334{
335#if 0
336 u_long i = 0;
337 unsigned long *res_ptr = (u_long *)pcxl_res_map;
338#endif
339 unsigned long total_pages = pcxl_res_size << 3; /* 8 bits per byte */
340
341 seq_printf(m, "\nDMA Mapping Area size : %d bytes (%ld pages)\n",
342 PCXL_DMA_MAP_SIZE, total_pages);
343
344 seq_printf(m, "Resource bitmap : %d bytes\n", pcxl_res_size);
345
346 seq_puts(m, " total: free: used: % used:\n");
347 seq_printf(m, "blocks %8d %8ld %8ld %8ld%%\n", pcxl_res_size,
348 pcxl_res_size - pcxl_used_bytes, pcxl_used_bytes,
349 (pcxl_used_bytes * 100) / pcxl_res_size);
350
351 seq_printf(m, "pages %8ld %8ld %8ld %8ld%%\n", total_pages,
352 total_pages - pcxl_used_pages, pcxl_used_pages,
353 (pcxl_used_pages * 100 / total_pages));
354
355#if 0
356 seq_puts(m, "\nResource bitmap:");
357
358 for(; i < (pcxl_res_size / sizeof(u_long)); ++i, ++res_ptr) {
359 if ((i & 7) == 0)
360 seq_puts(m,"\n ");
361 seq_printf(m, "%s %08lx", buf, *res_ptr);
362 }
363#endif
364 seq_putc(m, '\n');
365 return 0;
366}
367
368static int proc_pcxl_dma_open(struct inode *inode, struct file *file)
369{
370 return single_open(file, proc_pcxl_dma_show, NULL);
371}
372
373static const struct file_operations proc_pcxl_dma_ops = {
374 .owner = THIS_MODULE,
375 .open = proc_pcxl_dma_open,
376 .read = seq_read,
377 .llseek = seq_lseek,
378 .release = single_release,
379};
380
333static int __init 381static int __init
334pcxl_dma_init(void) 382pcxl_dma_init(void)
335{ 383{
@@ -348,9 +396,10 @@ pcxl_dma_init(void)
348 "pcxl_dma_init: Unable to create gsc /proc dir entry\n"); 396 "pcxl_dma_init: Unable to create gsc /proc dir entry\n");
349 else { 397 else {
350 struct proc_dir_entry* ent; 398 struct proc_dir_entry* ent;
351 ent = create_proc_info_entry("pcxl_dma", 0, 399 ent = create_proc_entry("pcxl_dma", 0, proc_gsc_root);
352 proc_gsc_root, pcxl_proc_info); 400 if (ent)
353 if (!ent) 401 ent->proc_fops = &proc_pcxl_dma_ops;
402 else
354 printk(KERN_WARNING 403 printk(KERN_WARNING
355 "pci-dma.c: Unable to create pcxl_dma /proc entry.\n"); 404 "pci-dma.c: Unable to create pcxl_dma /proc entry.\n");
356 } 405 }
@@ -551,40 +600,3 @@ struct hppa_dma_ops pcx_dma_ops = {
551 .dma_sync_sg_for_cpu = pa11_dma_sync_sg_for_cpu, 600 .dma_sync_sg_for_cpu = pa11_dma_sync_sg_for_cpu,
552 .dma_sync_sg_for_device = pa11_dma_sync_sg_for_device, 601 .dma_sync_sg_for_device = pa11_dma_sync_sg_for_device,
553}; 602};
554
555
556static int pcxl_proc_info(char *buf, char **start, off_t offset, int len)
557{
558#if 0
559 u_long i = 0;
560 unsigned long *res_ptr = (u_long *)pcxl_res_map;
561#endif
562 unsigned long total_pages = pcxl_res_size << 3; /* 8 bits per byte */
563
564 sprintf(buf, "\nDMA Mapping Area size : %d bytes (%ld pages)\n",
565 PCXL_DMA_MAP_SIZE, total_pages);
566
567 sprintf(buf, "%sResource bitmap : %d bytes\n", buf, pcxl_res_size);
568
569 strcat(buf, " total: free: used: % used:\n");
570 sprintf(buf, "%sblocks %8d %8ld %8ld %8ld%%\n", buf, pcxl_res_size,
571 pcxl_res_size - pcxl_used_bytes, pcxl_used_bytes,
572 (pcxl_used_bytes * 100) / pcxl_res_size);
573
574 sprintf(buf, "%spages %8ld %8ld %8ld %8ld%%\n", buf, total_pages,
575 total_pages - pcxl_used_pages, pcxl_used_pages,
576 (pcxl_used_pages * 100 / total_pages));
577
578#if 0
579 strcat(buf, "\nResource bitmap:");
580
581 for(; i < (pcxl_res_size / sizeof(u_long)); ++i, ++res_ptr) {
582 if ((i & 7) == 0)
583 strcat(buf,"\n ");
584 sprintf(buf, "%s %08lx", buf, *res_ptr);
585 }
586#endif
587 strcat(buf, "\n");
588 return strlen(buf);
589}
590
diff --git a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c
index a46bc62b643e..89d6d5ad44b5 100644
--- a/arch/parisc/kernel/perf.c
+++ b/arch/parisc/kernel/perf.c
@@ -171,7 +171,7 @@ static const uint64_t perf_bitmasks[] = {
171 171
172/* 172/*
173 * Write control bitmasks for Pa-8700 processor given 173 * Write control bitmasks for Pa-8700 processor given
174 * somethings have changed slightly. 174 * some things have changed slightly.
175 */ 175 */
176static const uint64_t perf_bitmasks_piranha[] = { 176static const uint64_t perf_bitmasks_piranha[] = {
177 0x0000000000000000ul, /* first dbl word must be zero */ 177 0x0000000000000000ul, /* first dbl word must be zero */
@@ -511,10 +511,12 @@ static int __init perf_init(void)
511 } else if (boot_cpu_data.cpu_type == pcxw || 511 } else if (boot_cpu_data.cpu_type == pcxw ||
512 boot_cpu_data.cpu_type == pcxw_ || 512 boot_cpu_data.cpu_type == pcxw_ ||
513 boot_cpu_data.cpu_type == pcxw2 || 513 boot_cpu_data.cpu_type == pcxw2 ||
514 boot_cpu_data.cpu_type == mako) { 514 boot_cpu_data.cpu_type == mako ||
515 boot_cpu_data.cpu_type == mako2) {
515 perf_processor_interface = CUDA_INTF; 516 perf_processor_interface = CUDA_INTF;
516 if (boot_cpu_data.cpu_type == pcxw2 || 517 if (boot_cpu_data.cpu_type == pcxw2 ||
517 boot_cpu_data.cpu_type == mako) 518 boot_cpu_data.cpu_type == mako ||
519 boot_cpu_data.cpu_type == mako2)
518 bitmask_array = perf_bitmasks_piranha; 520 bitmask_array = perf_bitmasks_piranha;
519 } else { 521 } else {
520 perf_processor_interface = UNKNOWN_INTF; 522 perf_processor_interface = UNKNOWN_INTF;
@@ -574,27 +576,27 @@ static int perf_stop_counters(uint32_t *raddr)
574 if (!perf_rdr_read_ubuf(16, userbuf)) 576 if (!perf_rdr_read_ubuf(16, userbuf))
575 return -13; 577 return -13;
576 578
577 /* Counter0 is bits 1398 thru 1429 */ 579 /* Counter0 is bits 1398 to 1429 */
578 tmp64 = (userbuf[21] << 22) & 0x00000000ffc00000; 580 tmp64 = (userbuf[21] << 22) & 0x00000000ffc00000;
579 tmp64 |= (userbuf[22] >> 42) & 0x00000000003fffff; 581 tmp64 |= (userbuf[22] >> 42) & 0x00000000003fffff;
580 /* OR sticky0 (bit 1430) to counter0 bit 32 */ 582 /* OR sticky0 (bit 1430) to counter0 bit 32 */
581 tmp64 |= (userbuf[22] >> 10) & 0x0000000080000000; 583 tmp64 |= (userbuf[22] >> 10) & 0x0000000080000000;
582 raddr[0] = (uint32_t)tmp64; 584 raddr[0] = (uint32_t)tmp64;
583 585
584 /* Counter1 is bits 1431 thru 1462 */ 586 /* Counter1 is bits 1431 to 1462 */
585 tmp64 = (userbuf[22] >> 9) & 0x00000000ffffffff; 587 tmp64 = (userbuf[22] >> 9) & 0x00000000ffffffff;
586 /* OR sticky1 (bit 1463) to counter1 bit 32 */ 588 /* OR sticky1 (bit 1463) to counter1 bit 32 */
587 tmp64 |= (userbuf[22] << 23) & 0x0000000080000000; 589 tmp64 |= (userbuf[22] << 23) & 0x0000000080000000;
588 raddr[1] = (uint32_t)tmp64; 590 raddr[1] = (uint32_t)tmp64;
589 591
590 /* Counter2 is bits 1464 thru 1495 */ 592 /* Counter2 is bits 1464 to 1495 */
591 tmp64 = (userbuf[22] << 24) & 0x00000000ff000000; 593 tmp64 = (userbuf[22] << 24) & 0x00000000ff000000;
592 tmp64 |= (userbuf[23] >> 40) & 0x0000000000ffffff; 594 tmp64 |= (userbuf[23] >> 40) & 0x0000000000ffffff;
593 /* OR sticky2 (bit 1496) to counter2 bit 32 */ 595 /* OR sticky2 (bit 1496) to counter2 bit 32 */
594 tmp64 |= (userbuf[23] >> 8) & 0x0000000080000000; 596 tmp64 |= (userbuf[23] >> 8) & 0x0000000080000000;
595 raddr[2] = (uint32_t)tmp64; 597 raddr[2] = (uint32_t)tmp64;
596 598
597 /* Counter3 is bits 1497 thru 1528 */ 599 /* Counter3 is bits 1497 to 1528 */
598 tmp64 = (userbuf[23] >> 7) & 0x00000000ffffffff; 600 tmp64 = (userbuf[23] >> 7) & 0x00000000ffffffff;
599 /* OR sticky3 (bit 1529) to counter3 bit 32 */ 601 /* OR sticky3 (bit 1529) to counter3 bit 32 */
600 tmp64 |= (userbuf[23] << 25) & 0x0000000080000000; 602 tmp64 |= (userbuf[23] << 25) & 0x0000000080000000;
@@ -616,7 +618,7 @@ static int perf_stop_counters(uint32_t *raddr)
616 userbuf[23] = 0; 618 userbuf[23] = 0;
617 619
618 /* 620 /*
619 * Write back the zero'ed bytes + the image given 621 * Write back the zeroed bytes + the image given
620 * the read was destructive. 622 * the read was destructive.
621 */ 623 */
622 perf_rdr_write(16, userbuf); 624 perf_rdr_write(16, userbuf);
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index 0dd3847f494c..355664812b83 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -381,6 +381,10 @@ get_wchan(struct task_struct *p)
381 struct unwind_frame_info info; 381 struct unwind_frame_info info;
382 unsigned long ip; 382 unsigned long ip;
383 int count = 0; 383 int count = 0;
384
385 if (!p || p == current || p->state == TASK_RUNNING)
386 return 0;
387
384 /* 388 /*
385 * These bracket the sleeping functions.. 389 * These bracket the sleeping functions..
386 */ 390 */
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c
index 566226d78bc9..549f5484342c 100644
--- a/arch/parisc/kernel/processor.c
+++ b/arch/parisc/kernel/processor.c
@@ -63,7 +63,7 @@ extern int update_cr16_clocksource(void); /* from time.c */
63** will call register_parisc_driver(&cpu_driver) before calling do_inventory(). 63** will call register_parisc_driver(&cpu_driver) before calling do_inventory().
64** 64**
65** The goal of consolidating CPU initialization into one place is 65** The goal of consolidating CPU initialization into one place is
66** to make sure all CPU's get initialized the same way. 66** to make sure all CPUs get initialized the same way.
67** The code path not shared is how PDC hands control of the CPU to the OS. 67** The code path not shared is how PDC hands control of the CPU to the OS.
68** The initialization of OS data structures is the same (done below). 68** The initialization of OS data structures is the same (done below).
69*/ 69*/
@@ -76,7 +76,7 @@ extern int update_cr16_clocksource(void); /* from time.c */
76 * (return 1). If so, initialize the chip and tell other partners in crime 76 * (return 1). If so, initialize the chip and tell other partners in crime
77 * they have work to do. 77 * they have work to do.
78 */ 78 */
79static int __init processor_probe(struct parisc_device *dev) 79static int __cpuinit processor_probe(struct parisc_device *dev)
80{ 80{
81 unsigned long txn_addr; 81 unsigned long txn_addr;
82 unsigned long cpuid; 82 unsigned long cpuid;
@@ -166,7 +166,7 @@ static int __init processor_probe(struct parisc_device *dev)
166#endif 166#endif
167 167
168 /* 168 /*
169 ** CONFIG_SMP: init_smp_config() will attempt to get CPU's into 169 ** CONFIG_SMP: init_smp_config() will attempt to get CPUs into
170 ** OS control. RENDEZVOUS is the default state - see mem_set above. 170 ** OS control. RENDEZVOUS is the default state - see mem_set above.
171 ** p->state = STATE_RENDEZVOUS; 171 ** p->state = STATE_RENDEZVOUS;
172 */ 172 */
@@ -334,7 +334,7 @@ int __init init_per_cpu(int cpunum)
334} 334}
335 335
336/* 336/*
337 * Display cpu info for all cpu's. 337 * Display CPU info for all CPUs.
338 */ 338 */
339int 339int
340show_cpuinfo (struct seq_file *m, void *v) 340show_cpuinfo (struct seq_file *m, void *v)
@@ -381,19 +381,19 @@ show_cpuinfo (struct seq_file *m, void *v)
381 return 0; 381 return 0;
382} 382}
383 383
384static struct parisc_device_id processor_tbl[] __read_mostly = { 384static const struct parisc_device_id processor_tbl[] = {
385 { HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID }, 385 { HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID },
386 { 0, } 386 { 0, }
387}; 387};
388 388
389static struct parisc_driver cpu_driver __read_mostly = { 389static struct parisc_driver cpu_driver = {
390 .name = "CPU", 390 .name = "CPU",
391 .id_table = processor_tbl, 391 .id_table = processor_tbl,
392 .probe = processor_probe 392 .probe = processor_probe
393}; 393};
394 394
395/** 395/**
396 * processor_init - Processor initalization procedure. 396 * processor_init - Processor initialization procedure.
397 * 397 *
398 * Register this driver. 398 * Register this driver.
399 */ 399 */
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c
index 8a0db376e91e..26ec774c5027 100644
--- a/arch/parisc/kernel/ptrace.c
+++ b/arch/parisc/kernel/ptrace.c
@@ -87,10 +87,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
87 switch (request) { 87 switch (request) {
88 case PTRACE_PEEKTEXT: /* read word at location addr. */ 88 case PTRACE_PEEKTEXT: /* read word at location addr. */
89 case PTRACE_PEEKDATA: { 89 case PTRACE_PEEKDATA: {
90 int copied;
91
92#ifdef CONFIG_64BIT 90#ifdef CONFIG_64BIT
93 if (__is_compat_task(child)) { 91 if (__is_compat_task(child)) {
92 int copied;
94 unsigned int tmp; 93 unsigned int tmp;
95 94
96 addr &= 0xffffffffL; 95 addr &= 0xffffffffL;
@@ -105,15 +104,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
105 } 104 }
106 else 105 else
107#endif 106#endif
108 { 107 ret = generic_ptrace_peekdata(child, addr, data);
109 unsigned long tmp;
110
111 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
112 ret = -EIO;
113 if (copied != sizeof(tmp))
114 goto out_tsk;
115 ret = put_user(tmp,(unsigned long *) data);
116 }
117 goto out_tsk; 108 goto out_tsk;
118 } 109 }
119 110
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index 9818919571fd..c44b8c51f5d1 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -45,7 +45,7 @@
45#include <asm/io.h> 45#include <asm/io.h>
46#include <asm/setup.h> 46#include <asm/setup.h>
47 47
48char __initdata command_line[COMMAND_LINE_SIZE]; 48static char __initdata command_line[COMMAND_LINE_SIZE];
49 49
50/* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */ 50/* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */
51struct proc_dir_entry * proc_runway_root __read_mostly = NULL; 51struct proc_dir_entry * proc_runway_root __read_mostly = NULL;
@@ -162,7 +162,7 @@ void __init setup_arch(char **cmdline_p)
162} 162}
163 163
164/* 164/*
165 * Display cpu info for all cpu's. 165 * Display CPU info for all CPUs.
166 * for parisc this is in processor.c 166 * for parisc this is in processor.c
167 */ 167 */
168extern int show_cpuinfo (struct seq_file *m, void *v); 168extern int show_cpuinfo (struct seq_file *m, void *v);
@@ -225,6 +225,7 @@ static void __init parisc_proc_mkdir(void)
225 } 225 }
226 break; 226 break;
227 case mako: 227 case mako:
228 case mako2:
228 if (NULL == proc_mckinley_root) 229 if (NULL == proc_mckinley_root)
229 { 230 {
230 proc_mckinley_root = proc_mkdir("bus/mckinley", NULL); 231 proc_mckinley_root = proc_mkdir("bus/mckinley", NULL);
diff --git a/arch/parisc/kernel/signal32.h b/arch/parisc/kernel/signal32.h
index e39b38a67a87..c7800846422c 100644
--- a/arch/parisc/kernel/signal32.h
+++ b/arch/parisc/kernel/signal32.h
@@ -113,7 +113,7 @@ int copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from);
113/* In a deft move of uber-hackery, we decide to carry the top half of all 113/* In a deft move of uber-hackery, we decide to carry the top half of all
114 * 64-bit registers in a non-portable, non-ABI, hidden structure. 114 * 64-bit registers in a non-portable, non-ABI, hidden structure.
115 * Userspace can read the hidden structure if it *wants* but is never 115 * Userspace can read the hidden structure if it *wants* but is never
116 * guaranteed to be in the same place. Infact the uc_sigmask from the 116 * guaranteed to be in the same place. In fact the uc_sigmask from the
117 * ucontext_t structure may push the hidden register file downards 117 * ucontext_t structure may push the hidden register file downards
118 */ 118 */
119struct compat_regfile { 119struct compat_regfile {
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index 6ba9257fdb7f..04c7e1d36cea 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -8,7 +8,7 @@
8** Lots of stuff stolen from arch/alpha/kernel/smp.c 8** Lots of stuff stolen from arch/alpha/kernel/smp.c
9** ...and then parisc stole from arch/ia64/kernel/smp.c. Thanks David! :^) 9** ...and then parisc stole from arch/ia64/kernel/smp.c. Thanks David! :^)
10** 10**
11** Thanks to John Curry and Ullas Ponnadi. I learned alot from their work. 11** Thanks to John Curry and Ullas Ponnadi. I learned a lot from their work.
12** -grant (1/12/2001) 12** -grant (1/12/2001)
13** 13**
14** This program is free software; you can redistribute it and/or modify 14** This program is free software; you can redistribute it and/or modify
@@ -419,7 +419,7 @@ smp_cpu_init(int cpunum)
419 BUG(); 419 BUG();
420 enter_lazy_tlb(&init_mm, current); 420 enter_lazy_tlb(&init_mm, current);
421 421
422 init_IRQ(); /* make sure no IRQ's are enabled or pending */ 422 init_IRQ(); /* make sure no IRQs are enabled or pending */
423 start_cpu_itimer(); 423 start_cpu_itimer();
424} 424}
425 425
@@ -461,7 +461,7 @@ void __init smp_callin(void)
461/* 461/*
462 * Bring one cpu online. 462 * Bring one cpu online.
463 */ 463 */
464int __init smp_boot_one_cpu(int cpuid) 464int __cpuinit smp_boot_one_cpu(int cpuid)
465{ 465{
466 struct task_struct *idle; 466 struct task_struct *idle;
467 long timeout; 467 long timeout;
@@ -552,7 +552,7 @@ void __devinit smp_prepare_boot_cpu(void)
552 552
553/* 553/*
554** inventory.c:do_inventory() hasn't yet been run and thus we 554** inventory.c:do_inventory() hasn't yet been run and thus we
555** don't 'discover' the additional CPU's until later. 555** don't 'discover' the additional CPUs until later.
556*/ 556*/
557void __init smp_prepare_cpus(unsigned int max_cpus) 557void __init smp_prepare_cpus(unsigned int max_cpus)
558{ 558{
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index ce3245f87fdd..bb23ff71c28e 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -311,14 +311,13 @@ struct readdir32_callback {
311 int count; 311 int count;
312}; 312};
313 313
314#define ROUND_UP(x,a) ((__typeof__(x))(((unsigned long)(x) + ((a) - 1)) & ~((a) - 1)))
315#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) 314#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
316static int filldir32 (void *__buf, const char *name, int namlen, 315static int filldir32 (void *__buf, const char *name, int namlen,
317 loff_t offset, u64 ino, unsigned int d_type) 316 loff_t offset, u64 ino, unsigned int d_type)
318{ 317{
319 struct linux32_dirent __user * dirent; 318 struct linux32_dirent __user * dirent;
320 struct getdents32_callback * buf = (struct getdents32_callback *) __buf; 319 struct getdents32_callback * buf = (struct getdents32_callback *) __buf;
321 int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1, 4); 320 int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, 4);
322 u32 d_ino; 321 u32 d_ino;
323 322
324 buf->error = -EINVAL; /* only used if we fail.. */ 323 buf->error = -EINVAL; /* only used if we fail.. */
@@ -350,6 +349,10 @@ sys32_getdents (unsigned int fd, void __user * dirent, unsigned int count)
350 struct getdents32_callback buf; 349 struct getdents32_callback buf;
351 int error; 350 int error;
352 351
352 error = -EFAULT;
353 if (!access_ok(VERIFY_WRITE, dirent, count))
354 goto out;
355
353 error = -EBADF; 356 error = -EBADF;
354 file = fget(fd); 357 file = fget(fd);
355 if (!file) 358 if (!file)
@@ -366,8 +369,10 @@ sys32_getdents (unsigned int fd, void __user * dirent, unsigned int count)
366 error = buf.error; 369 error = buf.error;
367 lastdirent = buf.previous; 370 lastdirent = buf.previous;
368 if (lastdirent) { 371 if (lastdirent) {
369 put_user(file->f_pos, &lastdirent->d_off); 372 if (put_user(file->f_pos, &lastdirent->d_off))
370 error = count - buf.count; 373 error = -EFAULT;
374 else
375 error = count - buf.count;
371 } 376 }
372 377
373out_putf: 378out_putf:
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
index 10859f53e94f..56f6231cb863 100644
--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -181,7 +181,7 @@ linux_gateway_entry:
181 /* Are we being ptraced? */ 181 /* Are we being ptraced? */
182 mfctl %cr30, %r1 182 mfctl %cr30, %r1
183 LDREG TI_TASK(%r1),%r1 183 LDREG TI_TASK(%r1),%r1
184 LDREG TASK_PTRACE(%r1), %r1 184 ldw TASK_PTRACE(%r1), %r1
185 bb,<,n %r1,31,.Ltracesys 185 bb,<,n %r1,31,.Ltracesys
186 186
187 /* Note! We cannot use the syscall table that is mapped 187 /* Note! We cannot use the syscall table that is mapped
@@ -198,7 +198,7 @@ linux_gateway_entry:
198 ldil L%sys_call_table, %r1 198 ldil L%sys_call_table, %r1
199 ldo R%sys_call_table(%r1), %r19 199 ldo R%sys_call_table(%r1), %r19
200#endif 200#endif
201 comiclr,>>= __NR_Linux_syscalls, %r20, %r0 201 comiclr,>> __NR_Linux_syscalls, %r20, %r0
202 b,n .Lsyscall_nosys 202 b,n .Lsyscall_nosys
203 203
204 LDREGX %r20(%r19), %r19 204 LDREGX %r20(%r19), %r19
@@ -501,7 +501,7 @@ lws_compare_and_swap:
501 shlw %r20, 4, %r20 501 shlw %r20, 4, %r20
502 add %r20, %r28, %r20 502 add %r20, %r28, %r20
503 503
504# ifdef ENABLE_LWS_DEBUG 504# if ENABLE_LWS_DEBUG
505 /* 505 /*
506 DEBUG, check for deadlock! 506 DEBUG, check for deadlock!
507 If the thread register values are the same 507 If the thread register values are the same
@@ -550,7 +550,7 @@ cas_wouldblock:
550 perspective 550 perspective
551 */ 551 */
552cas_action: 552cas_action:
553#if defined CONFIG_SMP && defined ENABLE_LWS_DEBUG 553#if defined CONFIG_SMP && ENABLE_LWS_DEBUG
554 /* DEBUG */ 554 /* DEBUG */
555 mfctl %cr27, %r1 555 mfctl %cr27, %r1
556 stw %r1, 4(%sr2,%r20) 556 stw %r1, 4(%sr2,%r20)
@@ -562,7 +562,7 @@ cas_action:
562#ifdef CONFIG_SMP 562#ifdef CONFIG_SMP
563 /* Free lock */ 563 /* Free lock */
564 stw %r20, 0(%sr2,%r20) 564 stw %r20, 0(%sr2,%r20)
565# ifdef ENABLE_LWS_DEBUG 565# if ENABLE_LWS_DEBUG
566 /* Clear thread register indicator */ 566 /* Clear thread register indicator */
567 stw %r0, 4(%sr2,%r20) 567 stw %r0, 4(%sr2,%r20)
568# endif 568# endif
@@ -576,7 +576,7 @@ cas_action:
576#ifdef CONFIG_SMP 576#ifdef CONFIG_SMP
577 /* Free lock */ 577 /* Free lock */
578 stw %r20, 0(%sr2,%r20) 578 stw %r20, 0(%sr2,%r20)
579# ifdef ENABLE_LWS_DEBUG 579# if ENABLE_LWS_DEBUG
580 stw %r0, 4(%sr2,%r20) 580 stw %r0, 4(%sr2,%r20)
581# endif 581# endif
582#endif 582#endif
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
index 8bf87e5d9c37..627f3c28ad8c 100644
--- a/arch/parisc/kernel/syscall_table.S
+++ b/arch/parisc/kernel/syscall_table.S
@@ -30,11 +30,6 @@
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 */ 31 */
32 32
33#undef ENTRY_SAME
34#undef ENTRY_DIFF
35#undef ENTRY_UHOH
36#undef ENTRY_COMP
37#undef ENTRY_OURS
38#if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT) 33#if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT)
39/* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and 34/* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and
40 * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific 35 * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific
@@ -405,5 +400,16 @@
405 ENTRY_SAME(epoll_pwait) 400 ENTRY_SAME(epoll_pwait)
406 ENTRY_COMP(statfs64) 401 ENTRY_COMP(statfs64)
407 ENTRY_COMP(fstatfs64) 402 ENTRY_COMP(fstatfs64)
403 ENTRY_COMP(kexec_load) /* 300 */
404 ENTRY_COMP(utimensat)
405 ENTRY_COMP(signalfd)
406 ENTRY_COMP(timerfd)
407 ENTRY_SAME(eventfd)
408
408 /* Nothing yet */ 409 /* Nothing yet */
409 410
411#undef ENTRY_SAME
412#undef ENTRY_DIFF
413#undef ENTRY_UHOH
414#undef ENTRY_COMP
415#undef ENTRY_OURS
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
index 07a991aa9b0c..8b3062a5c812 100644
--- a/arch/parisc/kernel/time.c
+++ b/arch/parisc/kernel/time.c
@@ -191,7 +191,7 @@ int update_cr16_clocksource(void)
191{ 191{
192 int change = 0; 192 int change = 0;
193 193
194 /* since the cr16 cycle counters are not syncronized across CPUs, 194 /* since the cr16 cycle counters are not synchronized across CPUs,
195 we'll check if we should switch to a safe clocksource: */ 195 we'll check if we should switch to a safe clocksource: */
196 if (clocksource_cr16.rating != 0 && num_online_cpus() > 1) { 196 if (clocksource_cr16.rating != 0 && num_online_cpus() > 1) {
197 clocksource_change_rating(&clocksource_cr16, 0); 197 clocksource_change_rating(&clocksource_cr16, 0);
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index 745ff741490a..bbf029a184ac 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -264,6 +264,7 @@ KERN_CRIT " || ||\n");
264 264
265 show_regs(regs); 265 show_regs(regs);
266 dump_stack(); 266 dump_stack();
267 add_taint(TAINT_DIE);
267 268
268 if (in_interrupt()) 269 if (in_interrupt())
269 panic("Fatal exception in interrupt"); 270 panic("Fatal exception in interrupt");
@@ -302,7 +303,7 @@ static void handle_break(struct pt_regs *regs)
302 if (unlikely(iir == PARISC_BUG_BREAK_INSN && !user_mode(regs))) { 303 if (unlikely(iir == PARISC_BUG_BREAK_INSN && !user_mode(regs))) {
303 /* check if a BUG() or WARN() trapped here. */ 304 /* check if a BUG() or WARN() trapped here. */
304 enum bug_trap_type tt; 305 enum bug_trap_type tt;
305 tt = report_bug(regs->iaoq[0] & ~3); 306 tt = report_bug(regs->iaoq[0] & ~3, regs);
306 if (tt == BUG_TRAP_TYPE_WARN) { 307 if (tt == BUG_TRAP_TYPE_WARN) {
307 regs->iaoq[0] += 4; 308 regs->iaoq[0] += 4;
308 regs->iaoq[1] += 4; 309 regs->iaoq[1] += 4;
@@ -615,7 +616,7 @@ void handle_interruption(int code, struct pt_regs *regs)
615 616
616 case 13: 617 case 13:
617 /* Conditional Trap 618 /* Conditional Trap
618 The condition succees in an instruction which traps 619 The condition succeeds in an instruction which traps
619 on condition */ 620 on condition */
620 if(user_mode(regs)){ 621 if(user_mode(regs)){
621 si.si_signo = SIGFPE; 622 si.si_signo = SIGFPE;
@@ -802,13 +803,14 @@ void handle_interruption(int code, struct pt_regs *regs)
802 803
803int __init check_ivt(void *iva) 804int __init check_ivt(void *iva)
804{ 805{
806 extern const u32 os_hpmc[];
807 extern const u32 os_hpmc_end[];
808
805 int i; 809 int i;
806 u32 check = 0; 810 u32 check = 0;
807 u32 *ivap; 811 u32 *ivap;
808 u32 *hpmcp; 812 u32 *hpmcp;
809 u32 length; 813 u32 length;
810 extern void os_hpmc(void);
811 extern void os_hpmc_end(void);
812 814
813 if (strcmp((char *)iva, "cows can fly")) 815 if (strcmp((char *)iva, "cows can fly"))
814 return -1; 816 return -1;
@@ -820,7 +822,7 @@ int __init check_ivt(void *iva)
820 822
821 /* Compute Checksum for HPMC handler */ 823 /* Compute Checksum for HPMC handler */
822 824
823 length = (u32)((unsigned long)os_hpmc_end - (unsigned long)os_hpmc); 825 length = os_hpmc_end - os_hpmc;
824 ivap[7] = length; 826 ivap[7] = length;
825 827
826 hpmcp = (u32 *)os_hpmc; 828 hpmcp = (u32 *)os_hpmc;
diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c
index 89c03707eccc..cf780cb3b916 100644
--- a/arch/parisc/kernel/unwind.c
+++ b/arch/parisc/kernel/unwind.c
@@ -16,6 +16,8 @@
16 16
17#include <asm/uaccess.h> 17#include <asm/uaccess.h>
18#include <asm/assembly.h> 18#include <asm/assembly.h>
19#include <asm/asm-offsets.h>
20#include <asm/ptrace.h>
19 21
20#include <asm/unwind.h> 22#include <asm/unwind.h>
21 23
@@ -26,6 +28,8 @@
26#define dbg(x...) 28#define dbg(x...)
27#endif 29#endif
28 30
31#define KERNEL_START (KERNEL_BINARY_TEXT_START - 0x1000)
32
29extern struct unwind_table_entry __start___unwind[]; 33extern struct unwind_table_entry __start___unwind[];
30extern struct unwind_table_entry __stop___unwind[]; 34extern struct unwind_table_entry __stop___unwind[];
31 35
@@ -197,6 +201,29 @@ static int unwind_init(void)
197 return 0; 201 return 0;
198} 202}
199 203
204#ifdef CONFIG_64BIT
205#define get_func_addr(fptr) fptr[2]
206#else
207#define get_func_addr(fptr) fptr[0]
208#endif
209
210static int unwind_special(struct unwind_frame_info *info, unsigned long pc, int frame_size)
211{
212 void handle_interruption(int, struct pt_regs *);
213 static unsigned long *hi = (unsigned long)&handle_interruption;
214
215 if (pc == get_func_addr(hi)) {
216 struct pt_regs *regs = (struct pt_regs *)(info->sp - frame_size - PT_SZ_ALGN);
217 dbg("Unwinding through handle_interruption()\n");
218 info->prev_sp = regs->gr[30];
219 info->prev_ip = regs->iaoq[0];
220
221 return 1;
222 }
223
224 return 0;
225}
226
200static void unwind_frame_regs(struct unwind_frame_info *info) 227static void unwind_frame_regs(struct unwind_frame_info *info)
201{ 228{
202 const struct unwind_table_entry *e; 229 const struct unwind_table_entry *e;
@@ -215,9 +242,11 @@ static void unwind_frame_regs(struct unwind_frame_info *info)
215#ifdef CONFIG_KALLSYMS 242#ifdef CONFIG_KALLSYMS
216 /* Handle some frequent special cases.... */ 243 /* Handle some frequent special cases.... */
217 { 244 {
218 char symname[KSYM_NAME_LEN+1]; 245 char symname[KSYM_NAME_LEN];
246 char *modname;
219 247
220 kallsyms_lookup(info->ip, NULL, NULL, NULL, symname); 248 kallsyms_lookup(info->ip, NULL, NULL, &modname,
249 symname);
221 250
222 dbg("info->ip = 0x%lx, name = %s\n", info->ip, symname); 251 dbg("info->ip = 0x%lx, name = %s\n", info->ip, symname);
223 252
@@ -308,13 +337,15 @@ static void unwind_frame_regs(struct unwind_frame_info *info)
308 } 337 }
309 } 338 }
310 339
311 info->prev_sp = info->sp - frame_size; 340 if (!unwind_special(info, e->region_start, frame_size)) {
312 if (e->Millicode) 341 info->prev_sp = info->sp - frame_size;
313 info->rp = info->r31; 342 if (e->Millicode)
314 else if (rpoffset) 343 info->rp = info->r31;
315 info->rp = *(unsigned long *)(info->prev_sp - rpoffset); 344 else if (rpoffset)
316 info->prev_ip = info->rp; 345 info->rp = *(unsigned long *)(info->prev_sp - rpoffset);
317 info->rp = 0; 346 info->prev_ip = info->rp;
347 info->rp = 0;
348 }
318 349
319 dbg("analyzing func @ %lx, setting prev_sp=%lx " 350 dbg("analyzing func @ %lx, setting prev_sp=%lx "
320 "prev_ip=%lx npc=%lx\n", info->ip, info->prev_sp, 351 "prev_ip=%lx npc=%lx\n", info->ip, info->prev_sp,
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index 4d96ba4b9849..d4e6a93c8d9a 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -181,10 +181,9 @@ SECTIONS
181 .init.ramfs : { *(.init.ramfs) } 181 .init.ramfs : { *(.init.ramfs) }
182 __initramfs_end = .; 182 __initramfs_end = .;
183#endif 183#endif
184 . = ALIGN(ASM_PAGE_SIZE); 184
185 __per_cpu_start = .; 185 PERCPU(ASM_PAGE_SIZE)
186 .data.percpu : { *(.data.percpu) } 186
187 __per_cpu_end = .;
188 . = ALIGN(ASM_PAGE_SIZE); 187 . = ALIGN(ASM_PAGE_SIZE);
189 __init_end = .; 188 __init_end = .;
190 /* freed after init ends here */ 189 /* freed after init ends here */
diff --git a/arch/parisc/math-emu/dbl_float.h b/arch/parisc/math-emu/dbl_float.h
index 1570e2e0a327..0c2fa9a951b3 100644
--- a/arch/parisc/math-emu/dbl_float.h
+++ b/arch/parisc/math-emu/dbl_float.h
@@ -22,7 +22,7 @@
22 PA header file -- do not include this header file for non-PA builds. 22 PA header file -- do not include this header file for non-PA builds.
23#endif 23#endif
24 24
25/* 32-bit word grabing functions */ 25/* 32-bit word grabbing functions */
26#define Dbl_firstword(value) Dallp1(value) 26#define Dbl_firstword(value) Dallp1(value)
27#define Dbl_secondword(value) Dallp2(value) 27#define Dbl_secondword(value) Dallp2(value)
28#define Dbl_thirdword(value) dummy_location 28#define Dbl_thirdword(value) dummy_location
@@ -37,7 +37,7 @@
37#define Dbl_allp1(object) Dallp1(object) 37#define Dbl_allp1(object) Dallp1(object)
38#define Dbl_allp2(object) Dallp2(object) 38#define Dbl_allp2(object) Dallp2(object)
39 39
40/* dbl_and_signs ands the sign bits of each argument and puts the result 40/* dbl_and_signs ANDs the sign bits of each argument and puts the result
41 * into the first argument. dbl_or_signs ors those same sign bits */ 41 * into the first argument. dbl_or_signs ors those same sign bits */
42#define Dbl_and_signs( src1dst, src2) \ 42#define Dbl_and_signs( src1dst, src2) \
43 Dallp1(src1dst) = (Dallp1(src2)|~((unsigned int)1<<31)) & Dallp1(src1dst) 43 Dallp1(src1dst) = (Dallp1(src2)|~((unsigned int)1<<31)) & Dallp1(src1dst)
diff --git a/arch/parisc/math-emu/dfsqrt.c b/arch/parisc/math-emu/dfsqrt.c
index b6ed1066f1e4..9542c6d281a5 100644
--- a/arch/parisc/math-emu/dfsqrt.c
+++ b/arch/parisc/math-emu/dfsqrt.c
@@ -76,7 +76,7 @@ dbl_fsqrt(
76 } 76 }
77 /* 77 /*
78 * Return quiet NaN or positive infinity. 78 * Return quiet NaN or positive infinity.
79 * Fall thru to negative test if negative infinity. 79 * Fall through to negative test if negative infinity.
80 */ 80 */
81 if (Dbl_iszero_sign(srcp1) || 81 if (Dbl_iszero_sign(srcp1) ||
82 Dbl_isnotzero_mantissa(srcp1,srcp2)) { 82 Dbl_isnotzero_mantissa(srcp1,srcp2)) {
diff --git a/arch/parisc/math-emu/sfsqrt.c b/arch/parisc/math-emu/sfsqrt.c
index cd3f6db1f6fb..4657a12c9107 100644
--- a/arch/parisc/math-emu/sfsqrt.c
+++ b/arch/parisc/math-emu/sfsqrt.c
@@ -76,7 +76,7 @@ sgl_fsqrt(
76 } 76 }
77 /* 77 /*
78 * Return quiet NaN or positive infinity. 78 * Return quiet NaN or positive infinity.
79 * Fall thru to negative test if negative infinity. 79 * Fall through to negative test if negative infinity.
80 */ 80 */
81 if (Sgl_iszero_sign(src) || Sgl_isnotzero_mantissa(src)) { 81 if (Sgl_iszero_sign(src) || Sgl_isnotzero_mantissa(src)) {
82 *dstptr = src; 82 *dstptr = src;
diff --git a/arch/parisc/math-emu/sgl_float.h b/arch/parisc/math-emu/sgl_float.h
index 82519a5c2ba5..4ee4cc95e4bf 100644
--- a/arch/parisc/math-emu/sgl_float.h
+++ b/arch/parisc/math-emu/sgl_float.h
@@ -23,7 +23,7 @@
23 PA header file -- do not include this header file for non-PA builds. 23 PA header file -- do not include this header file for non-PA builds.
24#endif 24#endif
25 25
26/* 32-bit word grabing functions */ 26/* 32-bit word grabbing functions */
27#define Sgl_firstword(value) Sall(value) 27#define Sgl_firstword(value) Sall(value)
28#define Sgl_secondword(value) dummy_location 28#define Sgl_secondword(value) dummy_location
29#define Sgl_thirdword(value) dummy_location 29#define Sgl_thirdword(value) dummy_location
@@ -36,7 +36,7 @@
36#define Sgl_exponentmantissa(object) Sexponentmantissa(object) 36#define Sgl_exponentmantissa(object) Sexponentmantissa(object)
37#define Sgl_all(object) Sall(object) 37#define Sgl_all(object) Sall(object)
38 38
39/* sgl_and_signs ands the sign bits of each argument and puts the result 39/* sgl_and_signs ANDs the sign bits of each argument and puts the result
40 * into the first argument. sgl_or_signs ors those same sign bits */ 40 * into the first argument. sgl_or_signs ors those same sign bits */
41#define Sgl_and_signs( src1dst, src2) \ 41#define Sgl_and_signs( src1dst, src2) \
42 Sall(src1dst) = (Sall(src2)|~((unsigned int)1<<31)) & Sall(src1dst) 42 Sall(src1dst) = (Sall(src2)|~((unsigned int)1<<31)) & Sall(src1dst)
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c
index f6f67554c623..7899ab87785a 100644
--- a/arch/parisc/mm/fault.c
+++ b/arch/parisc/mm/fault.c
@@ -147,6 +147,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long code,
147 struct mm_struct *mm = tsk->mm; 147 struct mm_struct *mm = tsk->mm;
148 const struct exception_table_entry *fix; 148 const struct exception_table_entry *fix;
149 unsigned long acc_type; 149 unsigned long acc_type;
150 int fault;
150 151
151 if (in_atomic() || !mm) 152 if (in_atomic() || !mm)
152 goto no_context; 153 goto no_context;
@@ -173,23 +174,23 @@ good_area:
173 * fault. 174 * fault.
174 */ 175 */
175 176
176 switch (handle_mm_fault(mm, vma, address, (acc_type & VM_WRITE) != 0)) { 177 fault = handle_mm_fault(mm, vma, address, (acc_type & VM_WRITE) != 0);
177 case VM_FAULT_MINOR: 178 if (unlikely(fault & VM_FAULT_ERROR)) {
178 ++current->min_flt;
179 break;
180 case VM_FAULT_MAJOR:
181 ++current->maj_flt;
182 break;
183 case VM_FAULT_SIGBUS:
184 /* 179 /*
185 * We hit a shared mapping outside of the file, or some 180 * We hit a shared mapping outside of the file, or some
186 * other thing happened to us that made us unable to 181 * other thing happened to us that made us unable to
187 * handle the page fault gracefully. 182 * handle the page fault gracefully.
188 */ 183 */
189 goto bad_area; 184 if (fault & VM_FAULT_OOM)
190 default: 185 goto out_of_memory;
191 goto out_of_memory; 186 else if (fault & VM_FAULT_SIGBUS)
187 goto bad_area;
188 BUG();
192 } 189 }
190 if (fault & VM_FAULT_MAJOR)
191 current->maj_flt++;
192 else
193 current->min_flt++;
193 up_read(&mm->mmap_sem); 194 up_read(&mm->mmap_sem);
194 return; 195 return;
195 196
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 75ea9f2a8a41..e724b362c49a 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -890,7 +890,7 @@ void __init paging_init(void)
890#ifdef CONFIG_PA20 890#ifdef CONFIG_PA20
891 891
892/* 892/*
893 * Currently, all PA20 chips have 18 bit protection id's, which is the 893 * Currently, all PA20 chips have 18 bit protection IDs, which is the
894 * limiting factor (space ids are 32 bits). 894 * limiting factor (space ids are 32 bits).
895 */ 895 */
896 896
@@ -899,10 +899,10 @@ void __init paging_init(void)
899#else 899#else
900 900
901/* 901/*
902 * Currently we have a one-to-one relationship between space id's and 902 * Currently we have a one-to-one relationship between space IDs and
903 * protection id's. Older parisc chips (PCXS, PCXT, PCXL, PCXL2) only 903 * protection IDs. Older parisc chips (PCXS, PCXT, PCXL, PCXL2) only
904 * support 15 bit protection id's, so that is the limiting factor. 904 * support 15 bit protection IDs, so that is the limiting factor.
905 * PCXT' has 18 bit protection id's, but only 16 bit spaceids, so it's 905 * PCXT' has 18 bit protection IDs, but only 16 bit spaceids, so it's
906 * probably not worth the effort for a special case here. 906 * probably not worth the effort for a special case here.
907 */ 907 */
908 908
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 5eaeafd30bdf..853c282da22e 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -4,17 +4,7 @@
4 4
5mainmenu "Linux/PowerPC Kernel Configuration" 5mainmenu "Linux/PowerPC Kernel Configuration"
6 6
7config PPC64 7source "arch/powerpc/platforms/Kconfig.cputype"
8 bool "64-bit kernel"
9 default n
10 help
11 This option selects whether a 32-bit or a 64-bit kernel
12 will be built.
13
14config PPC_PM_NEEDS_RTC_LIB
15 bool
16 select RTC_LIB
17 default y if PM
18 8
19config PPC32 9config PPC32
20 bool 10 bool
@@ -66,6 +56,9 @@ config GENERIC_FIND_NEXT_BIT
66 bool 56 bool
67 default y 57 default y
68 58
59config ARCH_NO_VIRT_TO_BUS
60 def_bool PPC64
61
69config PPC 62config PPC
70 bool 63 bool
71 default y 64 default y
@@ -99,6 +92,9 @@ config ARCH_MAY_HAVE_PC_FDC
99config PPC_OF 92config PPC_OF
100 def_bool y 93 def_bool y
101 94
95config OF
96 def_bool y
97
102config PPC_UDBG_16550 98config PPC_UDBG_16550
103 bool 99 bool
104 default n 100 default n
@@ -132,123 +128,6 @@ config PPC64_SWSUSP
132 depends on PPC64 && (BROKEN || (PPC_PMAC64 && EXPERIMENTAL)) 128 depends on PPC64 && (BROKEN || (PPC_PMAC64 && EXPERIMENTAL))
133 default y 129 default y
134 130
135menu "Processor support"
136choice
137 prompt "Processor Type"
138 depends on PPC32
139 default 6xx
140
141config CLASSIC32
142 bool "52xx/6xx/7xx/74xx"
143 select PPC_FPU
144 select 6xx
145 help
146 There are four families of PowerPC chips supported. The more common
147 types (601, 603, 604, 740, 750, 7400), the Motorola embedded
148 versions (821, 823, 850, 855, 860, 52xx, 82xx, 83xx), the AMCC
149 embedded versions (403 and 405) and the high end 64 bit Power
150 processors (POWER 3, POWER4, and IBM PPC970 also known as G5).
151
152 This option is the catch-all for 6xx types, including some of the
153 embedded versions. Unless there is see an option for the specific
154 chip family you are using, you want this option.
155
156 You do not want this if you are building a kernel for a 64 bit
157 IBM RS/6000 or an Apple G5, choose 6xx.
158
159 If unsure, select this option
160
161 Note that the kernel runs in 32-bit mode even on 64-bit chips.
162
163config PPC_82xx
164 bool "Freescale 82xx"
165 select 6xx
166 select PPC_FPU
167
168config PPC_83xx
169 bool "Freescale 83xx"
170 select 6xx
171 select FSL_SOC
172 select 83xx
173 select PPC_FPU
174 select WANT_DEVICE_TREE
175
176config PPC_85xx
177 bool "Freescale 85xx"
178 select E500
179 select FSL_SOC
180 select 85xx
181 select WANT_DEVICE_TREE
182
183config PPC_86xx
184 bool "Freescale 86xx"
185 select 6xx
186 select FSL_SOC
187 select FSL_PCIE
188 select PPC_FPU
189 select ALTIVEC
190 help
191 The Freescale E600 SoCs have 74xx cores.
192
193config PPC_8xx
194 bool "Freescale 8xx"
195 select FSL_SOC
196 select 8xx
197
198config 40x
199 bool "AMCC 40x"
200 select PPC_DCR_NATIVE
201
202config 44x
203 bool "AMCC 44x"
204 select PPC_DCR_NATIVE
205 select WANT_DEVICE_TREE
206
207config E200
208 bool "Freescale e200"
209
210endchoice
211
212config POWER4_ONLY
213 bool "Optimize for POWER4"
214 depends on PPC64
215 default n
216 ---help---
217 Cause the compiler to optimize for POWER4/POWER5/PPC970 processors.
218 The resulting binary will not work on POWER3 or RS64 processors
219 when compiled with binutils 2.15 or later.
220
221config POWER3
222 bool
223 depends on PPC64
224 default y if !POWER4_ONLY
225
226config POWER4
227 depends on PPC64
228 def_bool y
229
230config 6xx
231 bool
232
233# this is temp to handle compat with arch=ppc
234config 8xx
235 bool
236
237# this is temp to handle compat with arch=ppc
238config 83xx
239 bool
240
241# this is temp to handle compat with arch=ppc
242config 85xx
243 bool
244
245config E500
246 bool
247
248config PPC_FPU
249 bool
250 default y if PPC64
251
252config PPC_DCR_NATIVE 131config PPC_DCR_NATIVE
253 bool 132 bool
254 default n 133 default n
@@ -267,134 +146,6 @@ config PPC_OF_PLATFORM_PCI
267 depends on PPC64 # not supported on 32 bits yet 146 depends on PPC64 # not supported on 32 bits yet
268 default n 147 default n
269 148
270config 4xx
271 bool
272 depends on 40x || 44x
273 default y
274
275config BOOKE
276 bool
277 depends on E200 || E500 || 44x
278 default y
279
280config FSL_BOOKE
281 bool
282 depends on E200 || E500
283 default y
284
285config PTE_64BIT
286 bool
287 depends on 44x || E500
288 default y if 44x
289 default y if E500 && PHYS_64BIT
290
291config PHYS_64BIT
292 bool 'Large physical address support' if E500
293 depends on 44x || E500
294 select RESOURCES_64BIT
295 default y if 44x
296 ---help---
297 This option enables kernel support for larger than 32-bit physical
298 addresses. This features is not be available on all e500 cores.
299
300 If in doubt, say N here.
301
302config ALTIVEC
303 bool "AltiVec Support"
304 depends on CLASSIC32 || POWER4
305 ---help---
306 This option enables kernel support for the Altivec extensions to the
307 PowerPC processor. The kernel currently supports saving and restoring
308 altivec registers, and turning on the 'altivec enable' bit so user
309 processes can execute altivec instructions.
310
311 This option is only usefully if you have a processor that supports
312 altivec (G4, otherwise known as 74xx series), but does not have
313 any affect on a non-altivec cpu (it does, however add code to the
314 kernel).
315
316 If in doubt, say Y here.
317
318config SPE
319 bool "SPE Support"
320 depends on E200 || E500
321 default y
322 ---help---
323 This option enables kernel support for the Signal Processing
324 Extensions (SPE) to the PowerPC processor. The kernel currently
325 supports saving and restoring SPE registers, and turning on the
326 'spe enable' bit so user processes can execute SPE instructions.
327
328 This option is only useful if you have a processor that supports
329 SPE (e500, otherwise known as 85xx series), but does not have any
330 effect on a non-spe cpu (it does, however add code to the kernel).
331
332 If in doubt, say Y here.
333
334config PPC_STD_MMU
335 bool
336 depends on 6xx || POWER3 || POWER4 || PPC64
337 default y
338
339config PPC_STD_MMU_32
340 def_bool y
341 depends on PPC_STD_MMU && PPC32
342
343config PPC_MM_SLICES
344 bool
345 default y if HUGETLB_PAGE
346 default n
347
348config VIRT_CPU_ACCOUNTING
349 bool "Deterministic task and CPU time accounting"
350 depends on PPC64
351 default y
352 help
353 Select this option to enable more accurate task and CPU time
354 accounting. This is done by reading a CPU counter on each
355 kernel entry and exit and on transitions within the kernel
356 between system, softirq and hardirq state, so there is a
357 small performance impact. This also enables accounting of
358 stolen time on logically-partitioned systems running on
359 IBM POWER5-based machines.
360
361 If in doubt, say Y here.
362
363config SMP
364 depends on PPC_STD_MMU
365 bool "Symmetric multi-processing support"
366 ---help---
367 This enables support for systems with more than one CPU. If you have
368 a system with only one CPU, say N. If you have a system with more
369 than one CPU, say Y. Note that the kernel does not currently
370 support SMP machines with 603/603e/603ev or PPC750 ("G3") processors
371 since they have inadequate hardware support for multiprocessor
372 operation.
373
374 If you say N here, the kernel will run on single and multiprocessor
375 machines, but will use only one CPU of a multiprocessor machine. If
376 you say Y here, the kernel will run on single-processor machines.
377 On a single-processor machine, the kernel will run faster if you say
378 N here.
379
380 If you don't know what to do here, say N.
381
382config NR_CPUS
383 int "Maximum number of CPUs (2-128)"
384 range 2 128
385 depends on SMP
386 default "32" if PPC64
387 default "4"
388
389config NOT_COHERENT_CACHE
390 bool
391 depends on 4xx || 8xx || E200
392 default y
393
394config CONFIG_CHECK_CACHE_COHERENCY
395 bool
396endmenu
397
398source "init/Kconfig" 149source "init/Kconfig"
399 150
400source "arch/powerpc/platforms/Kconfig" 151source "arch/powerpc/platforms/Kconfig"
@@ -674,10 +425,6 @@ config SBUS
674config FSL_SOC 425config FSL_SOC
675 bool 426 bool
676 427
677config FSL_PCIE
678 bool
679 depends on PPC_86xx
680
681# Yes MCA RS/6000s exist but Linux-PPC does not currently support any 428# Yes MCA RS/6000s exist but Linux-PPC does not currently support any
682config MCA 429config MCA
683 bool 430 bool
@@ -685,10 +432,10 @@ config MCA
685config PCI 432config PCI
686 bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \ 433 bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \
687 || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \ 434 || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \
688 || MPC7448HPC2 || PPC_PS3 || PPC_HOLLY 435 || PPC_PS3
689 default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx \ 436 default y if !40x && !CPM2 && !8xx && !PPC_83xx \
690 && !PPC_85xx && !PPC_86xx 437 && !PPC_85xx && !PPC_86xx
691 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS 438 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx
692 default PCI_QSPAN if !4xx && !CPM2 && 8xx 439 default PCI_QSPAN if !4xx && !CPM2 && 8xx
693 select ARCH_SUPPORTS_MSI 440 select ARCH_SUPPORTS_MSI
694 help 441 help
@@ -698,8 +445,10 @@ config PCI
698 infrastructure code to support PCI bus devices. 445 infrastructure code to support PCI bus devices.
699 446
700config PCI_DOMAINS 447config PCI_DOMAINS
701 bool 448 def_bool PCI
702 default PCI 449
450config PCI_SYSCALL
451 def_bool PCI
703 452
704config PCI_QSPAN 453config PCI_QSPAN
705 bool "QSpan PCI" 454 bool "QSpan PCI"
@@ -894,8 +643,8 @@ menu "Instrumentation Support"
894source "arch/powerpc/oprofile/Kconfig" 643source "arch/powerpc/oprofile/Kconfig"
895 644
896config KPROBES 645config KPROBES
897 bool "Kprobes (EXPERIMENTAL)" 646 bool "Kprobes"
898 depends on !BOOKE && !4xx && KALLSYMS && EXPERIMENTAL && MODULES 647 depends on !BOOKE && !4xx && KALLSYMS && MODULES
899 help 648 help
900 Kprobes allows you to trap at almost any kernel address and 649 Kprobes allows you to trap at almost any kernel address and
901 execute a callback function. register_kprobe() establishes 650 execute a callback function. register_kprobe() establishes
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 6238b5875fd1..6c1e36c33faa 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -142,14 +142,13 @@ drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
142 142
143# Default to zImage, override when needed 143# Default to zImage, override when needed
144defaultimage-y := zImage 144defaultimage-y := zImage
145defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux
146defaultimage-$(CONFIG_DEFAULT_UIMAGE) := uImage 145defaultimage-$(CONFIG_DEFAULT_UIMAGE) := uImage
147KBUILD_IMAGE := $(defaultimage-y) 146KBUILD_IMAGE := $(defaultimage-y)
148all: $(KBUILD_IMAGE) 147all: $(KBUILD_IMAGE)
149 148
150CPPFLAGS_vmlinux.lds := -Upowerpc 149CPPFLAGS_vmlinux.lds := -Upowerpc
151 150
152BOOT_TARGETS = zImage zImage.initrd zImage.dts zImage.dts_initrd uImage 151BOOT_TARGETS = zImage zImage.initrd uImage
153 152
154PHONY += $(BOOT_TARGETS) 153PHONY += $(BOOT_TARGETS)
155 154
@@ -202,6 +201,14 @@ checkbin:
202 false; \ 201 false; \
203 fi ; \ 202 fi ; \
204 fi 203 fi
204 @if test "$(call cc-fullversion)" = "040200" \
205 && test "x${CONFIG_MODULES}${CONFIG_PPC64}" = "xyy" ; then \
206 echo -n '*** GCC-4.2.0 cannot compile the 64-bit powerpc ' ; \
207 echo 'kernel with modules enabled.' ; \
208 echo -n '*** Please use a different GCC version or ' ; \
209 echo 'disable kernel modules' ; \
210 false ; \
211 fi
205 @if ! /bin/echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; then \ 212 @if ! /bin/echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; then \
206 echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build ' ; \ 213 echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build ' ; \
207 echo 'correctly with old versions of binutils.' ; \ 214 echo 'correctly with old versions of binutils.' ; \
diff --git a/arch/powerpc/boot/44x.c b/arch/powerpc/boot/44x.c
index d51377d9024f..9f64e840bef6 100644
--- a/arch/powerpc/boot/44x.c
+++ b/arch/powerpc/boot/44x.c
@@ -38,3 +38,48 @@ void ibm44x_fixup_memsize(void)
38 38
39 dt_fixup_memory(0, memsize); 39 dt_fixup_memory(0, memsize);
40} 40}
41
42#define SPRN_DBCR0 0x134
43#define DBCR0_RST_SYSTEM 0x30000000
44
45void ibm44x_dbcr_reset(void)
46{
47 unsigned long tmp;
48
49 asm volatile (
50 "mfspr %0,%1\n"
51 "oris %0,%0,%2@h\n"
52 "mtspr %1,%0"
53 : "=&r"(tmp) : "i"(SPRN_DBCR0), "i"(DBCR0_RST_SYSTEM)
54 );
55
56}
57
58/* Read 4xx EBC bus bridge registers to get mappings of the peripheral
59 * banks into the OPB address space */
60void ibm4xx_fixup_ebc_ranges(const char *ebc)
61{
62 void *devp;
63 u32 bxcr;
64 u32 ranges[EBC_NUM_BANKS*4];
65 u32 *p = ranges;
66 int i;
67
68 for (i = 0; i < EBC_NUM_BANKS; i++) {
69 mtdcr(DCRN_EBC0_CFGADDR, EBC_BXCR(i));
70 bxcr = mfdcr(DCRN_EBC0_CFGDATA);
71
72 if ((bxcr & EBC_BXCR_BU) != EBC_BXCR_BU_OFF) {
73 *p++ = i;
74 *p++ = 0;
75 *p++ = bxcr & EBC_BXCR_BAS;
76 *p++ = EBC_BXCR_BANK_SIZE(bxcr);
77 }
78 }
79
80 devp = finddevice(ebc);
81 if (! devp)
82 fatal("Couldn't locate EBC node %s\n\r", ebc);
83
84 setprop(devp, "ranges", ranges, (p - ranges) * sizeof(u32));
85}
diff --git a/arch/powerpc/boot/44x.h b/arch/powerpc/boot/44x.h
index 7b129ad043e1..577982c9a3cd 100644
--- a/arch/powerpc/boot/44x.h
+++ b/arch/powerpc/boot/44x.h
@@ -11,6 +11,9 @@
11#define _PPC_BOOT_44X_H_ 11#define _PPC_BOOT_44X_H_
12 12
13void ibm44x_fixup_memsize(void); 13void ibm44x_fixup_memsize(void);
14void ibm4xx_fixup_ebc_ranges(const char *ebc);
15
16void ibm44x_dbcr_reset(void);
14void ebony_init(void *mac0, void *mac1); 17void ebony_init(void *mac0, void *mac1);
15 18
16#endif /* _PPC_BOOT_44X_H_ */ 19#endif /* _PPC_BOOT_44X_H_ */
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 83788986b93b..61a6f34ca5ed 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -11,20 +11,18 @@
11# bootloader and increase compatibility with OpenFirmware. 11# bootloader and increase compatibility with OpenFirmware.
12# 12#
13# To this end we need to define BOOTCC, etc, as the tools 13# To this end we need to define BOOTCC, etc, as the tools
14# needed to build the 32 bit image. These are normally HOSTCC, 14# needed to build the 32 bit image. That's normally the same
15# but may be a third compiler if, for example, you are cross 15# compiler for the rest of the kernel, with the -m32 flag added.
16# compiling from an intel box. Once the 64bit ppc gcc is
17# stable it will probably simply be a compiler switch to
18# compile for 32bit mode.
19# To make it easier to setup a cross compiler, 16# To make it easier to setup a cross compiler,
20# CROSS32_COMPILE is setup as a prefix just like CROSS_COMPILE 17# CROSS32_COMPILE is setup as a prefix just like CROSS_COMPILE
21# in the toplevel makefile. 18# in the toplevel makefile.
22 19
23all: $(obj)/zImage 20all: $(obj)/zImage
24 21
25HOSTCC := gcc 22BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
26BOOTCFLAGS := $(HOSTCFLAGS) -fno-builtin -nostdinc -isystem \ 23 -fno-strict-aliasing -Os -msoft-float -pipe \
27 $(shell $(CROSS32CC) -print-file-name=include) -fPIC 24 -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
25 -isystem $(shell $(CROSS32CC) -print-file-name=include)
28BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc 26BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
29 27
30ifeq ($(call cc-option-yn, -fstack-protector),y) 28ifeq ($(call cc-option-yn, -fstack-protector),y)
@@ -33,8 +31,8 @@ endif
33 31
34BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) 32BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj)
35 33
36$(obj)/44x.o: BOOTCFLAGS += -Wa,-mbooke 34$(obj)/44x.o: BOOTCFLAGS += -mcpu=440
37$(obj)/ebony.o: BOOTCFLAGS += -Wa,-mbooke 35$(obj)/ebony.o: BOOTCFLAGS += -mcpu=440
38 36
39zlib := inffast.c inflate.c inftrees.c 37zlib := inffast.c inflate.c inftrees.c
40zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h 38zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h
@@ -45,10 +43,11 @@ $(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \
45 43
46src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ 44src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
47 ns16550.c serial.c simple_alloc.c div64.S util.S \ 45 ns16550.c serial.c simple_alloc.c div64.S util.S \
48 gunzip_util.c elf_util.c $(zlib) devtree.c \ 46 gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
49 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c 47 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c
50src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \ 48src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \
51 cuboot-ebony.c treeboot-ebony.c prpmc2800.c 49 cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
50 ps3-head.S ps3-hvcall.S ps3.c
52src-boot := $(src-wlib) $(src-plat) empty.c 51src-boot := $(src-wlib) $(src-plat) empty.c
53 52
54src-boot := $(addprefix $(obj)/, $(src-boot)) 53src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -77,11 +76,11 @@ $(addprefix $(obj)/,$(zliblinuxheader)): $(obj)/%: $(srctree)/include/linux/%
77$(obj)/empty.c: 76$(obj)/empty.c:
78 @touch $@ 77 @touch $@
79 78
80$(obj)/zImage.lds $(obj)/zImage.coff.lds: $(obj)/%: $(srctree)/$(src)/%.S 79$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds: $(obj)/%: $(srctree)/$(src)/%.S
81 @cp $< $@ 80 @cp $< $@
82 81
83clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \ 82clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \
84 empty.c zImage.coff.lds zImage.lds 83 empty.c zImage zImage.coff.lds zImage.ps3.lds zImage.lds
85 84
86quiet_cmd_bootcc = BOOTCC $@ 85quiet_cmd_bootcc = BOOTCC $@
87 cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< 86 cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
@@ -104,7 +103,7 @@ hostprogs-y := addnote addRamDisk hack-coff mktree
104 103
105targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) 104targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a)
106extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ 105extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
107 $(obj)/zImage.lds $(obj)/zImage.coff.lds 106 $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds
108 107
109wrapper :=$(srctree)/$(src)/wrapper 108wrapper :=$(srctree)/$(src)/wrapper
110wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \ 109wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
@@ -134,8 +133,9 @@ image-$(CONFIG_PPC_CELLEB) += zImage.pseries
134image-$(CONFIG_PPC_CHRP) += zImage.chrp 133image-$(CONFIG_PPC_CHRP) += zImage.chrp
135image-$(CONFIG_PPC_EFIKA) += zImage.chrp 134image-$(CONFIG_PPC_EFIKA) += zImage.chrp
136image-$(CONFIG_PPC_PMAC) += zImage.pmac 135image-$(CONFIG_PPC_PMAC) += zImage.pmac
137image-$(CONFIG_PPC_HOLLY) += zImage.holly-elf 136image-$(CONFIG_PPC_HOLLY) += zImage.holly
138image-$(CONFIG_PPC_PRPMC2800) += zImage.prpmc2800 137image-$(CONFIG_PPC_PRPMC2800) += zImage.prpmc2800
138image-$(CONFIG_PPC_ISERIES) += zImage.iseries
139image-$(CONFIG_DEFAULT_UIMAGE) += uImage 139image-$(CONFIG_DEFAULT_UIMAGE) += uImage
140 140
141ifneq ($(CONFIG_DEVICE_TREE),"") 141ifneq ($(CONFIG_DEVICE_TREE),"")
@@ -158,52 +158,43 @@ targets += $(image-y) $(initrd-y)
158 158
159$(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz 159$(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
160 160
161dts- := $(patsubst zImage%, zImage.dts%, $(image-n) $(image-)) 161# If CONFIG_WANT_DEVICE_TREE is set and CONFIG_DEVICE_TREE isn't an
162dts-y := $(patsubst zImage%, zImage.dts%, $(image-y)) 162# empty string, define 'dts' to be path to the dts
163dts-y := $(filter-out $(image-y), $(dts-y)) 163# CONFIG_DEVICE_TREE will have "" around it, make sure to strip them
164targets += $(image-y) $(dts-y) 164ifeq ($(CONFIG_WANT_DEVICE_TREE),y)
165 165ifneq ($(CONFIG_DEVICE_TREE),"")
166dts_initrd- := $(patsubst zImage%, zImage.dts_initrd%, $(image-n) $(image-)) 166dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\
167dts_initrd-y := $(patsubst zImage%, zImage.dts_initrd%, $(image-y)) 167 ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE:"%"=%)
168dts_initrd-y := $(filter-out $(image-y), $(dts_initrd-y)) 168endif
169targets += $(image-y) $(dts_initrd-y) 169endif
170
171$(addprefix $(obj)/, $(dts_initrd-y)): $(obj)/ramdisk.image.gz
172 170
173# Don't put the ramdisk on the pattern rule; when its missing make will try 171# Don't put the ramdisk on the pattern rule; when its missing make will try
174# the pattern rule with less dependencies that also matches (even with the 172# the pattern rule with less dependencies that also matches (even with the
175# hard dependency listed). 173# hard dependency listed).
176$(obj)/zImage.dts_initrd.%: vmlinux $(wrapperbits) $(dts) $(obj)/ramdisk.image.gz 174$(obj)/zImage.initrd.%: vmlinux $(wrapperbits) $(dts)
177 $(call if_changed,wrap,$*,$(dts),,$(obj)/ramdisk.image.gz) 175 $(call if_changed,wrap,$*,$(dts),,$(obj)/ramdisk.image.gz)
178 176
179$(obj)/zImage.dts.%: vmlinux $(wrapperbits) $(dts) 177$(obj)/zImage.%: vmlinux $(wrapperbits) $(dts)
180 $(call if_changed,wrap,$*,$(dts)) 178 $(call if_changed,wrap,$*,$(dts))
181 179
182$(obj)/zImage.initrd.%: vmlinux $(wrapperbits) 180# This cannot be in the root of $(src) as the zImage rule always adds a $(obj)
183 $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz) 181# prefix
184 182$(obj)/vmlinux.strip: vmlinux
185$(obj)/zImage.%: vmlinux $(wrapperbits)
186 $(call if_changed,wrap,$*)
187
188$(obj)/zImage.ps3: vmlinux
189 $(STRIP) -s -R .comment $< -o $@ 183 $(STRIP) -s -R .comment $< -o $@
190 184
191$(obj)/zImage.initrd.ps3: vmlinux 185$(obj)/zImage.iseries: vmlinux
192 @echo " WARNING zImage.initrd.ps3 not supported (yet)" 186 $(STRIP) -s -R .comment $< -o $@
193 187
194$(obj)/zImage.holly-elf: vmlinux $(wrapperbits) 188$(obj)/zImage.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts
195 $(call if_changed,wrap,holly,$(obj)/dts/holly.dts,,) 189 $(STRIP) -s -R .comment $< -o vmlinux.strip
190 $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,)
196 191
197$(obj)/zImage.initrd.holly-elf: vmlinux $(wrapperbits) $(obj)/ramdisk.image.gz 192$(obj)/zImage.initrd.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts $(obj)/ramdisk.image.gz
198 $(call if_changed,wrap,holly,$(obj)/dts/holly.dts,,$(obj)/ramdisk.image.gz) 193 $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,$(obj)/ramdisk.image.gz)
199 194
200$(obj)/uImage: vmlinux $(wrapperbits) 195$(obj)/uImage: vmlinux $(wrapperbits)
201 $(call if_changed,wrap,uboot) 196 $(call if_changed,wrap,uboot)
202 197
203# CONFIG_DEVICE_TREE will have "" around it, make sure to strip them
204dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\
205 ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE:"%"=%)
206
207$(obj)/cuImage.%: vmlinux $(dts) $(wrapperbits) 198$(obj)/cuImage.%: vmlinux $(dts) $(wrapperbits)
208 $(call if_changed,wrap,cuboot-$*,$(dts)) 199 $(call if_changed,wrap,cuboot-$*,$(dts))
209 200
@@ -213,22 +204,22 @@ $(obj)/treeImage.initrd.%: vmlinux $(dts) $(wrapperbits)
213$(obj)/treeImage.%: vmlinux $(dts) $(wrapperbits) 204$(obj)/treeImage.%: vmlinux $(dts) $(wrapperbits)
214 $(call if_changed,wrap,treeboot-$*,$(dts)) 205 $(call if_changed,wrap,treeboot-$*,$(dts))
215 206
207# If there isn't a platform selected then just strip the vmlinux.
208ifeq (,$(image-y))
209image-y := vmlinux.strip
210endif
211
216$(obj)/zImage: $(addprefix $(obj)/, $(image-y)) 212$(obj)/zImage: $(addprefix $(obj)/, $(image-y))
217 @rm -f $@; ln $< $@ 213 @rm -f $@; ln $< $@
218$(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y)) 214$(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y))
219 @rm -f $@; ln $< $@ 215 @rm -f $@; ln $< $@
220$(obj)/zImage.dts: $(addprefix $(obj)/, $(dts-y))
221 @rm -f $@; ln $< $@
222$(obj)/zImage.dts_initrd: $(addprefix $(obj)/, $(dts_initrd-y))
223 @rm -f $@; ln $< $@
224
225 216
226install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) 217install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
227 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $< 218 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $<
228 219
229# anything not in $(targets) 220# anything not in $(targets)
230clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* \ 221clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* treeImage.* \
231 treeImage.* zImage.dts zImage.dts_initrd 222 otheros.bld
232 223
233# clean up files cached by wrapper 224# clean up files cached by wrapper
234clean-kernel := vmlinux.strip vmlinux.bin 225clean-kernel := vmlinux.strip vmlinux.bin
diff --git a/arch/powerpc/boot/crt0.S b/arch/powerpc/boot/crt0.S
index 5a4215c4b014..f1c4dfc635be 100644
--- a/arch/powerpc/boot/crt0.S
+++ b/arch/powerpc/boot/crt0.S
@@ -13,6 +13,7 @@
13 13
14 .text 14 .text
15 /* a procedure descriptor used when booting this as a COFF file */ 15 /* a procedure descriptor used when booting this as a COFF file */
16 .globl _zimage_start_opd
16_zimage_start_opd: 17_zimage_start_opd:
17 .long _zimage_start, 0, 0, 0 18 .long _zimage_start, 0, 0, 0
18 19
diff --git a/arch/powerpc/boot/cuboot-83xx.c b/arch/powerpc/boot/cuboot-83xx.c
index 9af554eea54b..296025d8b295 100644
--- a/arch/powerpc/boot/cuboot-83xx.c
+++ b/arch/powerpc/boot/cuboot-83xx.c
@@ -12,12 +12,12 @@
12 12
13#include "ops.h" 13#include "ops.h"
14#include "stdio.h" 14#include "stdio.h"
15#include "cuboot.h"
15 16
16#define TARGET_83xx 17#define TARGET_83xx
17#include "ppcboot.h" 18#include "ppcboot.h"
18 19
19static bd_t bd; 20static bd_t bd;
20extern char _end[];
21extern char _dtb_start[], _dtb_end[]; 21extern char _dtb_start[], _dtb_end[];
22 22
23static void platform_fixups(void) 23static void platform_fixups(void)
@@ -52,16 +52,7 @@ static void platform_fixups(void)
52void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, 52void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
53 unsigned long r6, unsigned long r7) 53 unsigned long r6, unsigned long r7)
54{ 54{
55 unsigned long end_of_ram = bd.bi_memstart + bd.bi_memsize; 55 CUBOOT_INIT();
56 unsigned long avail_ram = end_of_ram - (unsigned long)_end;
57
58 memcpy(&bd, (bd_t *)r3, sizeof(bd));
59 loader_info.initrd_addr = r4;
60 loader_info.initrd_size = r4 ? r5 - r4 : 0;
61 loader_info.cmdline = (char *)r6;
62 loader_info.cmdline_len = r7 - r6;
63
64 simple_alloc_init(_end, avail_ram - 1024*1024, 32, 64);
65 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 56 ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
66 serial_console_init(); 57 serial_console_init();
67 platform_ops.fixups = platform_fixups; 58 platform_ops.fixups = platform_fixups;
diff --git a/arch/powerpc/boot/cuboot-85xx.c b/arch/powerpc/boot/cuboot-85xx.c
index e2560317f278..10f0f697c935 100644
--- a/arch/powerpc/boot/cuboot-85xx.c
+++ b/arch/powerpc/boot/cuboot-85xx.c
@@ -12,12 +12,12 @@
12 12
13#include "ops.h" 13#include "ops.h"
14#include "stdio.h" 14#include "stdio.h"
15#include "cuboot.h"
15 16
16#define TARGET_85xx 17#define TARGET_85xx
17#include "ppcboot.h" 18#include "ppcboot.h"
18 19
19static bd_t bd; 20static bd_t bd;
20extern char _end[];
21extern char _dtb_start[], _dtb_end[]; 21extern char _dtb_start[], _dtb_end[];
22 22
23static void platform_fixups(void) 23static void platform_fixups(void)
@@ -53,16 +53,7 @@ static void platform_fixups(void)
53void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, 53void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
54 unsigned long r6, unsigned long r7) 54 unsigned long r6, unsigned long r7)
55{ 55{
56 unsigned long end_of_ram = bd.bi_memstart + bd.bi_memsize; 56 CUBOOT_INIT();
57 unsigned long avail_ram = end_of_ram - (unsigned long)_end;
58
59 memcpy(&bd, (bd_t *)r3, sizeof(bd));
60 loader_info.initrd_addr = r4;
61 loader_info.initrd_size = r4 ? r5 - r4 : 0;
62 loader_info.cmdline = (char *)r6;
63 loader_info.cmdline_len = r7 - r6;
64
65 simple_alloc_init(_end, avail_ram - 1024*1024, 32, 64);
66 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 57 ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
67 serial_console_init(); 58 serial_console_init();
68 platform_ops.fixups = platform_fixups; 59 platform_ops.fixups = platform_fixups;
diff --git a/arch/powerpc/boot/cuboot-ebony.c b/arch/powerpc/boot/cuboot-ebony.c
index 4464c5f67acb..c5f37ce172ea 100644
--- a/arch/powerpc/boot/cuboot-ebony.c
+++ b/arch/powerpc/boot/cuboot-ebony.c
@@ -15,28 +15,16 @@
15#include "ops.h" 15#include "ops.h"
16#include "stdio.h" 16#include "stdio.h"
17#include "44x.h" 17#include "44x.h"
18#include "cuboot.h"
18 19
19#define TARGET_44x 20#define TARGET_44x
20#include "ppcboot.h" 21#include "ppcboot.h"
21 22
22static bd_t bd; 23static bd_t bd;
23extern char _end[];
24
25BSS_STACK(4096);
26 24
27void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, 25void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
28 unsigned long r6, unsigned long r7) 26 unsigned long r6, unsigned long r7)
29{ 27{
30 unsigned long end_of_ram = bd.bi_memstart + bd.bi_memsize; 28 CUBOOT_INIT();
31 unsigned long avail_ram = end_of_ram - (unsigned long)_end;
32
33 memcpy(&bd, (bd_t *)r3, sizeof(bd));
34 loader_info.initrd_addr = r4;
35 loader_info.initrd_size = r4 ? r5 : 0;
36 loader_info.cmdline = (char *)r6;
37 loader_info.cmdline_len = r7 - r6;
38
39 simple_alloc_init(_end, avail_ram, 32, 64);
40
41 ebony_init(&bd.bi_enetaddr, &bd.bi_enet1addr); 29 ebony_init(&bd.bi_enetaddr, &bd.bi_enet1addr);
42} 30}
diff --git a/arch/powerpc/boot/cuboot.c b/arch/powerpc/boot/cuboot.c
new file mode 100644
index 000000000000..65795468ad6f
--- /dev/null
+++ b/arch/powerpc/boot/cuboot.c
@@ -0,0 +1,35 @@
1/*
2 * Compatibility for old (not device tree aware) U-Boot versions
3 *
4 * Author: Scott Wood <scottwood@freescale.com>
5 * Consolidated using macros by David Gibson <david@gibson.dropbear.id.au>
6 *
7 * Copyright 2007 David Gibson, IBM Corporation.
8 * Copyright (c) 2007 Freescale Semiconductor, Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License version 2 as published
12 * by the Free Software Foundation.
13 */
14
15#include "ops.h"
16#include "stdio.h"
17
18#include "ppcboot.h"
19
20extern char _end[];
21extern char _dtb_start[], _dtb_end[];
22
23void cuboot_init(unsigned long r4, unsigned long r5,
24 unsigned long r6, unsigned long r7,
25 unsigned long end_of_ram)
26{
27 unsigned long avail_ram = end_of_ram - (unsigned long)_end;
28
29 loader_info.initrd_addr = r4;
30 loader_info.initrd_size = r4 ? r5 - r4 : 0;
31 loader_info.cmdline = (char *)r6;
32 loader_info.cmdline_len = r7 - r6;
33
34 simple_alloc_init(_end, avail_ram - 1024*1024, 32, 64);
35}
diff --git a/arch/powerpc/boot/cuboot.h b/arch/powerpc/boot/cuboot.h
new file mode 100644
index 000000000000..cd2aa7f348f3
--- /dev/null
+++ b/arch/powerpc/boot/cuboot.h
@@ -0,0 +1,14 @@
1#ifndef _PPC_BOOT_CUBOOT_H_
2#define _PPC_BOOT_CUBOOT_H_
3
4void cuboot_init(unsigned long r4, unsigned long r5,
5 unsigned long r6, unsigned long r7,
6 unsigned long end_of_ram);
7
8#define CUBOOT_INIT() \
9 do { \
10 memcpy(&bd, (bd_t *)r3, sizeof(bd)); \
11 cuboot_init(r4, r5, r6, r7, bd.bi_memstart + bd.bi_memsize); \
12 } while (0)
13
14#endif /* _PPC_BOOT_CUBOOT_H_ */
diff --git a/arch/powerpc/boot/dcr.h b/arch/powerpc/boot/dcr.h
index 877bc97b1e97..14b44aa96fea 100644
--- a/arch/powerpc/boot/dcr.h
+++ b/arch/powerpc/boot/dcr.h
@@ -26,6 +26,43 @@ static const unsigned long sdram_bxcr[] = { SDRAM0_B0CR, SDRAM0_B1CR, SDRAM0_B2C
26#define SDRAM_CONFIG_BANK_SIZE(reg) \ 26#define SDRAM_CONFIG_BANK_SIZE(reg) \
27 (0x00400000 << ((reg & SDRAM_CONFIG_SIZE_MASK) >> 17)) 27 (0x00400000 << ((reg & SDRAM_CONFIG_SIZE_MASK) >> 17))
28 28
29/* 440GP External Bus Controller (EBC) */
30#define DCRN_EBC0_CFGADDR 0x012
31#define DCRN_EBC0_CFGDATA 0x013
32#define EBC_NUM_BANKS 8
33#define EBC_B0CR 0x00
34#define EBC_B1CR 0x01
35#define EBC_B2CR 0x02
36#define EBC_B3CR 0x03
37#define EBC_B4CR 0x04
38#define EBC_B5CR 0x05
39#define EBC_B6CR 0x06
40#define EBC_B7CR 0x07
41#define EBC_BXCR(n) (n)
42#define EBC_BXCR_BAS 0xfff00000
43#define EBC_BXCR_BS 0x000e0000
44#define EBC_BXCR_BANK_SIZE(reg) \
45 (0x100000 << (((reg) & EBC_BXCR_BS) >> 17))
46#define EBC_BXCR_BU 0x00018000
47#define EBC_BXCR_BU_OFF 0x00000000
48#define EBC_BXCR_BU_RO 0x00008000
49#define EBC_BXCR_BU_WO 0x00010000
50#define EBC_BXCR_BU_RW 0x00018000
51#define EBC_BXCR_BW 0x00006000
52#define EBC_B0AP 0x10
53#define EBC_B1AP 0x11
54#define EBC_B2AP 0x12
55#define EBC_B3AP 0x13
56#define EBC_B4AP 0x14
57#define EBC_B5AP 0x15
58#define EBC_B6AP 0x16
59#define EBC_B7AP 0x17
60#define EBC_BXAP(n) (0x10+(n))
61#define EBC_BEAR 0x20
62#define EBC_BESR 0x21
63#define EBC_CFG 0x23
64#define EBC_CID 0x24
65
29/* 440GP Clock, PM, chip control */ 66/* 440GP Clock, PM, chip control */
30#define DCRN_CPC0_SR 0x0b0 67#define DCRN_CPC0_SR 0x0b0
31#define DCRN_CPC0_ER 0x0b1 68#define DCRN_CPC0_ER 0x0b1
diff --git a/arch/powerpc/boot/dts/ebony.dts b/arch/powerpc/boot/dts/ebony.dts
index 0ec02f4726b5..c5f99613fc7b 100644
--- a/arch/powerpc/boot/dts/ebony.dts
+++ b/arch/powerpc/boot/dts/ebony.dts
@@ -31,8 +31,8 @@
31 reg = <0>; 31 reg = <0>;
32 clock-frequency = <0>; // Filled in by zImage 32 clock-frequency = <0>; // Filled in by zImage
33 timebase-frequency = <0>; // Filled in by zImage 33 timebase-frequency = <0>; // Filled in by zImage
34 i-cache-line-size = <32>; 34 i-cache-line-size = <20>;
35 d-cache-line-size = <32>; 35 d-cache-line-size = <20>;
36 i-cache-size = <8000>; /* 32 kB */ 36 i-cache-size = <8000>; /* 32 kB */
37 d-cache-size = <8000>; /* 32 kB */ 37 d-cache-size = <8000>; /* 32 kB */
38 dcr-controller; 38 dcr-controller;
@@ -135,11 +135,9 @@
135 #address-cells = <2>; 135 #address-cells = <2>;
136 #size-cells = <1>; 136 #size-cells = <1>;
137 clock-frequency = <0>; // Filled in by zImage 137 clock-frequency = <0>; // Filled in by zImage
138 ranges = <0 00000000 fff00000 100000 138 // ranges property is supplied by zImage
139 1 00000000 48000000 100000 139 // based on firmware's configuration of the
140 2 00000000 ff800000 400000 140 // EBC bridge
141 3 00000000 48200000 100000
142 7 00000000 48300000 100000>;
143 interrupts = <5 4>; 141 interrupts = <5 4>;
144 interrupt-parent = <&UIC1>; 142 interrupt-parent = <&UIC1>;
145 143
diff --git a/arch/powerpc/boot/dts/holly.dts b/arch/powerpc/boot/dts/holly.dts
index 254499b107f4..80a4fab8ee37 100644
--- a/arch/powerpc/boot/dts/holly.dts
+++ b/arch/powerpc/boot/dts/holly.dts
@@ -46,7 +46,7 @@
46 46
47 tsi109@c0000000 { 47 tsi109@c0000000 {
48 device_type = "tsi-bridge"; 48 device_type = "tsi-bridge";
49 compatible = "tsi-bridge"; 49 compatible = "tsi109-bridge", "tsi108-bridge";
50 #address-cells = <1>; 50 #address-cells = <1>;
51 #size-cells = <1>; 51 #size-cells = <1>;
52 ranges = <00000000 c0000000 00010000>; 52 ranges = <00000000 c0000000 00010000>;
@@ -54,52 +54,55 @@
54 54
55 i2c@7000 { 55 i2c@7000 {
56 device_type = "i2c"; 56 device_type = "i2c";
57 compatible = "tsi-i2c"; 57 compatible = "tsi109-i2c", "tsi108-i2c";
58 interrupt-parent = < &/tsi109@c0000000/pic@7400 >; 58 interrupt-parent = <&MPIC>;
59 interrupts = <e 2>; 59 interrupts = <e 2>;
60 reg = <7000 400>; 60 reg = <7000 400>;
61 }; 61 };
62 62
63 mdio@6000 { 63 MDIO: mdio@6000 {
64 device_type = "mdio"; 64 device_type = "mdio";
65 compatible = "tsi-ethernet"; 65 compatible = "tsi109-mdio", "tsi108-mdio";
66 reg = <6000 50>;
67 #address-cells = <1>;
68 #size-cells = <0>;
66 69
67 PHY1: ethernet-phy@6000 { 70 PHY1: ethernet-phy@1 {
68 device_type = "ethernet-phy"; 71 compatible = "bcm5461a";
69 compatible = "bcm54xx"; 72 reg = <1>;
70 reg = <6000 50>; 73 txc-rxc-delay-disable;
71 phy-id = <1>;
72 }; 74 };
73 75
74 PHY2: ethernet-phy@6400 { 76 PHY2: ethernet-phy@2 {
75 device_type = "ethernet-phy"; 77 compatible = "bcm5461a";
76 compatible = "bcm54xx"; 78 reg = <2>;
77 reg = <6000 50>; 79 txc-rxc-delay-disable;
78 phy-id = <2>;
79 }; 80 };
80 }; 81 };
81 82
82 ethernet@6200 { 83 ethernet@6200 {
83 device_type = "network"; 84 device_type = "network";
84 compatible = "tsi-ethernet"; 85 compatible = "tsi109-ethernet", "tsi108-ethernet";
85 #address-cells = <1>; 86 #address-cells = <1>;
86 #size-cells = <0>; 87 #size-cells = <0>;
87 reg = <6000 200>; 88 reg = <6000 200>;
88 local-mac-address = [ 00 00 00 00 00 00 ]; 89 local-mac-address = [ 00 00 00 00 00 00 ];
89 interrupt-parent = < &/tsi109@c0000000/pic@7400 >; 90 interrupt-parent = <&MPIC>;
90 interrupts = <10 2>; 91 interrupts = <10 2>;
92 mdio-handle = <&MDIO>;
91 phy-handle = <&PHY1>; 93 phy-handle = <&PHY1>;
92 }; 94 };
93 95
94 ethernet@6600 { 96 ethernet@6600 {
95 device_type = "network"; 97 device_type = "network";
96 compatible = "tsi-ethernet"; 98 compatible = "tsi109-ethernet", "tsi108-ethernet";
97 #address-cells = <1>; 99 #address-cells = <1>;
98 #size-cells = <0>; 100 #size-cells = <0>;
99 reg = <6400 200>; 101 reg = <6400 200>;
100 local-mac-address = [ 00 00 00 00 00 00 ]; 102 local-mac-address = [ 00 00 00 00 00 00 ];
101 interrupt-parent = < &/tsi109@c0000000/pic@7400 >; 103 interrupt-parent = <&MPIC>;
102 interrupts = <11 2>; 104 interrupts = <11 2>;
105 mdio-handle = <&MDIO>;
103 phy-handle = <&PHY2>; 106 phy-handle = <&PHY2>;
104 }; 107 };
105 108
@@ -110,7 +113,7 @@
110 virtual-reg = <c0007808>; 113 virtual-reg = <c0007808>;
111 clock-frequency = <3F9C6000>; 114 clock-frequency = <3F9C6000>;
112 current-speed = <1c200>; 115 current-speed = <1c200>;
113 interrupt-parent = < &/tsi109@c0000000/pic@7400 >; 116 interrupt-parent = <&MPIC>;
114 interrupts = <c 2>; 117 interrupts = <c 2>;
115 }; 118 };
116 119
@@ -121,7 +124,7 @@
121 virtual-reg = <c0007c08>; 124 virtual-reg = <c0007c08>;
122 clock-frequency = <3F9C6000>; 125 clock-frequency = <3F9C6000>;
123 current-speed = <1c200>; 126 current-speed = <1c200>;
124 interrupt-parent = < &/tsi109@c0000000/pic@7400 >; 127 interrupt-parent = <&MPIC>;
125 interrupts = <d 2>; 128 interrupts = <d 2>;
126 }; 129 };
127 130
@@ -136,7 +139,7 @@
136 139
137 pci@1000 { 140 pci@1000 {
138 device_type = "pci"; 141 device_type = "pci";
139 compatible = "tsi109"; 142 compatible = "tsi109-pci", "tsi108-pci";
140 #interrupt-cells = <1>; 143 #interrupt-cells = <1>;
141 #size-cells = <2>; 144 #size-cells = <2>;
142 #address-cells = <3>; 145 #address-cells = <3>;
@@ -150,7 +153,7 @@
150 ranges = <02000000 0 40000000 40000000 0 10000000 153 ranges = <02000000 0 40000000 40000000 0 10000000
151 01000000 0 00000000 7e000000 0 00010000>; 154 01000000 0 00000000 7e000000 0 00010000>;
152 clock-frequency = <7f28154>; 155 clock-frequency = <7f28154>;
153 interrupt-parent = < &/tsi109@c0000000/pic@7400 >; 156 interrupt-parent = <&MPIC>;
154 interrupts = <17 2>; 157 interrupts = <17 2>;
155 interrupt-map-mask = <f800 0 0 7>; 158 interrupt-map-mask = <f800 0 0 7>;
156 /*----------------------------------------------------+ 159 /*----------------------------------------------------+
@@ -186,13 +189,12 @@
186 #address-cells = <0>; 189 #address-cells = <0>;
187 #interrupt-cells = <2>; 190 #interrupt-cells = <2>;
188 interrupts = <17 2>; 191 interrupts = <17 2>;
189 interrupt-parent = < &/tsi109@c0000000/pic@7400 >; 192 interrupt-parent = <&MPIC>;
190 }; 193 };
191 }; 194 };
192 }; 195 };
193 196
194 chosen { 197 chosen {
195 linux,stdout-path = "/tsi109@c0000000/serial@7808"; 198 linux,stdout-path = "/tsi109@c0000000/serial@7808";
196 bootargs = "console=ttyS0,115200";
197 }; 199 };
198}; 200};
diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts
index 765c306ecf80..0e3d314a7158 100644
--- a/arch/powerpc/boot/dts/mpc7448hpc2.dts
+++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts
@@ -45,7 +45,7 @@
45 #address-cells = <1>; 45 #address-cells = <1>;
46 #size-cells = <1>; 46 #size-cells = <1>;
47 #interrupt-cells = <2>; 47 #interrupt-cells = <2>;
48 device_type = "tsi-bridge"; 48 device_type = "tsi108-bridge";
49 ranges = <00000000 c0000000 00010000>; 49 ranges = <00000000 c0000000 00010000>;
50 reg = <c0000000 00010000>; 50 reg = <c0000000 00010000>;
51 bus-frequency = <0>; 51 bus-frequency = <0>;
@@ -55,27 +55,26 @@
55 interrupts = <E 0>; 55 interrupts = <E 0>;
56 reg = <7000 400>; 56 reg = <7000 400>;
57 device_type = "i2c"; 57 device_type = "i2c";
58 compatible = "tsi-i2c"; 58 compatible = "tsi108-i2c";
59 }; 59 };
60 60
61 mdio@6000 { 61 MDIO: mdio@6000 {
62 device_type = "mdio"; 62 device_type = "mdio";
63 compatible = "tsi-ethernet"; 63 compatible = "tsi108-mdio";
64 reg = <6000 50>;
65 #address-cells = <1>;
66 #size-cells = <0>;
64 67
65 phy8: ethernet-phy@6000 { 68 phy8: ethernet-phy@8 {
66 interrupt-parent = <&mpic>; 69 interrupt-parent = <&mpic>;
67 interrupts = <2 1>; 70 interrupts = <2 1>;
68 reg = <6000 50>; 71 reg = <8>;
69 phy-id = <8>;
70 device_type = "ethernet-phy";
71 }; 72 };
72 73
73 phy9: ethernet-phy@6400 { 74 phy9: ethernet-phy@9 {
74 interrupt-parent = <&mpic>; 75 interrupt-parent = <&mpic>;
75 interrupts = <2 1>; 76 interrupts = <2 1>;
76 reg = <6000 50>; 77 reg = <9>;
77 phy-id = <9>;
78 device_type = "ethernet-phy";
79 }; 78 };
80 79
81 }; 80 };
@@ -83,12 +82,12 @@
83 ethernet@6200 { 82 ethernet@6200 {
84 #size-cells = <0>; 83 #size-cells = <0>;
85 device_type = "network"; 84 device_type = "network";
86 model = "TSI-ETH"; 85 compatible = "tsi108-ethernet";
87 compatible = "tsi-ethernet";
88 reg = <6000 200>; 86 reg = <6000 200>;
89 address = [ 00 06 D2 00 00 01 ]; 87 address = [ 00 06 D2 00 00 01 ];
90 interrupts = <10 2>; 88 interrupts = <10 2>;
91 interrupt-parent = <&mpic>; 89 interrupt-parent = <&mpic>;
90 mdio-handle = <&MDIO>;
92 phy-handle = <&phy8>; 91 phy-handle = <&phy8>;
93 }; 92 };
94 93
@@ -96,12 +95,12 @@
96 #address-cells = <1>; 95 #address-cells = <1>;
97 #size-cells = <0>; 96 #size-cells = <0>;
98 device_type = "network"; 97 device_type = "network";
99 model = "TSI-ETH"; 98 compatible = "tsi108-ethernet";
100 compatible = "tsi-ethernet";
101 reg = <6400 200>; 99 reg = <6400 200>;
102 address = [ 00 06 D2 00 00 02 ]; 100 address = [ 00 06 D2 00 00 02 ];
103 interrupts = <11 2>; 101 interrupts = <11 2>;
104 interrupt-parent = <&mpic>; 102 interrupt-parent = <&mpic>;
103 mdio-handle = <&MDIO>;
105 phy-handle = <&phy9>; 104 phy-handle = <&phy9>;
106 }; 105 };
107 106
@@ -135,7 +134,7 @@
135 big-endian; 134 big-endian;
136 }; 135 };
137 pci@1000 { 136 pci@1000 {
138 compatible = "tsi10x"; 137 compatible = "tsi108-pci";
139 device_type = "pci"; 138 device_type = "pci";
140 #interrupt-cells = <1>; 139 #interrupt-cells = <1>;
141 #size-cells = <2>; 140 #size-cells = <2>;
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
index 423eedcf634f..1934b800278e 100644
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -14,12 +14,10 @@
14 compatible = "MPC8260ADS"; 14 compatible = "MPC8260ADS";
15 #address-cells = <1>; 15 #address-cells = <1>;
16 #size-cells = <1>; 16 #size-cells = <1>;
17 linux,phandle = <100>;
18 17
19 cpus { 18 cpus {
20 #address-cells = <1>; 19 #address-cells = <1>;
21 #size-cells = <0>; 20 #size-cells = <0>;
22 linux,phandle = <200>;
23 21
24 PowerPC,8272@0 { 22 PowerPC,8272@0 {
25 device_type = "cpu"; 23 device_type = "cpu";
@@ -32,12 +30,10 @@
32 bus-frequency = <0>; 30 bus-frequency = <0>;
33 clock-frequency = <0>; 31 clock-frequency = <0>;
34 32-bit; 32 32-bit;
35 linux,phandle = <201>;
36 }; 33 };
37 }; 34 };
38 35
39 interrupt-controller@f8200000 { 36 pci_pic: interrupt-controller@f8200000 {
40 linux,phandle = <f8200000>;
41 #address-cells = <0>; 37 #address-cells = <0>;
42 #interrupt-cells = <2>; 38 #interrupt-cells = <2>;
43 interrupt-controller; 39 interrupt-controller;
@@ -47,15 +43,13 @@
47 }; 43 };
48 memory { 44 memory {
49 device_type = "memory"; 45 device_type = "memory";
50 linux,phandle = <300>;
51 reg = <00000000 4000000 f4500000 00000020>; 46 reg = <00000000 4000000 f4500000 00000020>;
52 }; 47 };
53 48
54 chosen { 49 chosen {
55 name = "chosen"; 50 name = "chosen";
56 linux,platform = <0>; 51 linux,platform = <0>;
57 interrupt-controller = <10c00>; 52 interrupt-controller = <&Cpm_pic>;
58 linux,phandle = <400>;
59 }; 53 };
60 54
61 soc8272@f0000000 { 55 soc8272@f0000000 {
@@ -70,20 +64,17 @@
70 device_type = "mdio"; 64 device_type = "mdio";
71 compatible = "fs_enet"; 65 compatible = "fs_enet";
72 reg = <0 0>; 66 reg = <0 0>;
73 linux,phandle = <24520>;
74 #address-cells = <1>; 67 #address-cells = <1>;
75 #size-cells = <0>; 68 #size-cells = <0>;
76 ethernet-phy@0 { 69 phy0:ethernet-phy@0 {
77 linux,phandle = <2452000>; 70 interrupt-parent = <&Cpm_pic>;
78 interrupt-parent = <10c00>;
79 interrupts = <17 4>; 71 interrupts = <17 4>;
80 reg = <0>; 72 reg = <0>;
81 bitbang = [ 12 12 13 02 02 01 ]; 73 bitbang = [ 12 12 13 02 02 01 ];
82 device_type = "ethernet-phy"; 74 device_type = "ethernet-phy";
83 }; 75 };
84 ethernet-phy@1 { 76 phy1:ethernet-phy@1 {
85 linux,phandle = <2452001>; 77 interrupt-parent = <&Cpm_pic>;
86 interrupt-parent = <10c00>;
87 interrupts = <17 4>; 78 interrupts = <17 4>;
88 bitbang = [ 12 12 13 02 02 01 ]; 79 bitbang = [ 12 12 13 02 02 01 ];
89 reg = <3>; 80 reg = <3>;
@@ -101,8 +92,8 @@
101 reg = <11300 20 8400 100 11380 30>; 92 reg = <11300 20 8400 100 11380 30>;
102 mac-address = [ 00 11 2F 99 43 54 ]; 93 mac-address = [ 00 11 2F 99 43 54 ];
103 interrupts = <20 2>; 94 interrupts = <20 2>;
104 interrupt-parent = <10c00>; 95 interrupt-parent = <&Cpm_pic>;
105 phy-handle = <2452000>; 96 phy-handle = <&Phy0>;
106 rx-clock = <13>; 97 rx-clock = <13>;
107 tx-clock = <12>; 98 tx-clock = <12>;
108 }; 99 };
@@ -115,14 +106,13 @@
115 reg = <11320 20 8500 100 113b0 30>; 106 reg = <11320 20 8500 100 113b0 30>;
116 mac-address = [ 00 11 2F 99 44 54 ]; 107 mac-address = [ 00 11 2F 99 44 54 ];
117 interrupts = <21 2>; 108 interrupts = <21 2>;
118 interrupt-parent = <10c00>; 109 interrupt-parent = <&Cpm_pic>;
119 phy-handle = <2452001>; 110 phy-handle = <&Phy1>;
120 rx-clock = <17>; 111 rx-clock = <17>;
121 tx-clock = <18>; 112 tx-clock = <18>;
122 }; 113 };
123 114
124 cpm@f0000000 { 115 cpm@f0000000 {
125 linux,phandle = <f0000000>;
126 #address-cells = <1>; 116 #address-cells = <1>;
127 #size-cells = <1>; 117 #size-cells = <1>;
128 #interrupt-cells = <2>; 118 #interrupt-cells = <2>;
@@ -142,7 +132,7 @@
142 reg = <11a00 20 8000 100>; 132 reg = <11a00 20 8000 100>;
143 current-speed = <1c200>; 133 current-speed = <1c200>;
144 interrupts = <28 2>; 134 interrupts = <28 2>;
145 interrupt-parent = <10c00>; 135 interrupt-parent = <&Cpm_pic>;
146 clock-setup = <0 00ffffff>; 136 clock-setup = <0 00ffffff>;
147 rx-clock = <1>; 137 rx-clock = <1>;
148 tx-clock = <1>; 138 tx-clock = <1>;
@@ -156,15 +146,14 @@
156 reg = <11a60 20 8300 100>; 146 reg = <11a60 20 8300 100>;
157 current-speed = <1c200>; 147 current-speed = <1c200>;
158 interrupts = <2b 2>; 148 interrupts = <2b 2>;
159 interrupt-parent = <10c00>; 149 interrupt-parent = <&Cpm_pic>;
160 clock-setup = <1b ffffff00>; 150 clock-setup = <1b ffffff00>;
161 rx-clock = <4>; 151 rx-clock = <4>;
162 tx-clock = <4>; 152 tx-clock = <4>;
163 }; 153 };
164 154
165 }; 155 };
166 interrupt-controller@10c00 { 156 cpm_pic:interrupt-controller@10c00 {
167 linux,phandle = <10c00>;
168 #address-cells = <0>; 157 #address-cells = <0>;
169 #interrupt-cells = <2>; 158 #interrupt-cells = <2>;
170 interrupt-controller; 159 interrupt-controller;
@@ -174,7 +163,6 @@
174 compatible = "CPM2"; 163 compatible = "CPM2";
175 }; 164 };
176 pci@0500 { 165 pci@0500 {
177 linux,phandle = <0500>;
178 #interrupt-cells = <1>; 166 #interrupt-cells = <1>;
179 #size-cells = <2>; 167 #size-cells = <2>;
180 #address-cells = <3>; 168 #address-cells = <3>;
@@ -202,7 +190,7 @@
202 c000 0 0 2 f8200000 43 8 190 c000 0 0 2 f8200000 43 8
203 c000 0 0 3 f8200000 40 8 191 c000 0 0 3 f8200000 40 8
204 c000 0 0 4 f8200000 41 8>; 192 c000 0 0 4 f8200000 41 8>;
205 interrupt-parent = <10c00>; 193 interrupt-parent = <&Cpm_pic>;
206 interrupts = <14 8>; 194 interrupts = <14 8>;
207 bus-range = <0 0>; 195 bus-range = <0 0>;
208 ranges = <02000000 0 80000000 80000000 0 40000000 196 ranges = <02000000 0 80000000 80000000 0 40000000
@@ -216,7 +204,7 @@
216 compatible = "talitos"; 204 compatible = "talitos";
217 reg = <30000 10000>; 205 reg = <30000 10000>;
218 interrupts = <b 2>; 206 interrupts = <b 2>;
219 interrupt-parent = <10c00>; 207 interrupt-parent = <&Cpm_pic>;
220 num-channels = <4>; 208 num-channels = <4>;
221 channel-fifo-len = <18>; 209 channel-fifo-len = <18>;
222 exec-units-mask = <0000007e>; 210 exec-units-mask = <0000007e>;
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index 112dd5198fe2..4fc0c4d34aa8 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -272,7 +272,13 @@
272 reg = <2200 200>; 272 reg = <2200 200>;
273 interrupts = <22>; 273 interrupts = <22>;
274 interrupt-parent = < &qeic >; 274 interrupt-parent = < &qeic >;
275 mac-address = [ 00 04 9f 00 23 23 ]; 275 /*
276 * mac-address is deprecated and will be removed
277 * in 2.6.25. Only recent versions of
278 * U-Boot support local-mac-address, however.
279 */
280 mac-address = [ 00 00 00 00 00 00 ];
281 local-mac-address = [ 00 00 00 00 00 00 ];
276 rx-clock = <19>; 282 rx-clock = <19>;
277 tx-clock = <1a>; 283 tx-clock = <1a>;
278 phy-handle = < &phy3 >; 284 phy-handle = < &phy3 >;
@@ -287,7 +293,13 @@
287 reg = <3000 200>; 293 reg = <3000 200>;
288 interrupts = <23>; 294 interrupts = <23>;
289 interrupt-parent = < &qeic >; 295 interrupt-parent = < &qeic >;
290 mac-address = [ 00 11 22 33 44 55 ]; 296 /*
297 * mac-address is deprecated and will be removed
298 * in 2.6.25. Only recent versions of
299 * U-Boot support local-mac-address, however.
300 */
301 mac-address = [ 00 00 00 00 00 00 ];
302 local-mac-address = [ 00 00 00 00 00 00 ];
291 rx-clock = <17>; 303 rx-clock = <17>;
292 tx-clock = <18>; 304 tx-clock = <18>;
293 phy-handle = < &phy4 >; 305 phy-handle = < &phy4 >;
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index be4c35784e49..447c03ffabbc 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -231,7 +231,13 @@
231 reg = <3000 200>; 231 reg = <3000 200>;
232 interrupts = <21>; 232 interrupts = <21>;
233 interrupt-parent = <&qeic>; 233 interrupt-parent = <&qeic>;
234 mac-address = [ 00 04 9f ef 03 02 ]; 234 /*
235 * mac-address is deprecated and will be removed
236 * in 2.6.25. Only recent versions of
237 * U-Boot support local-mac-address, however.
238 */
239 mac-address = [ 00 00 00 00 00 00 ];
240 local-mac-address = [ 00 00 00 00 00 00 ];
235 rx-clock = <20>; 241 rx-clock = <20>;
236 tx-clock = <13>; 242 tx-clock = <13>;
237 phy-handle = <&phy00>; 243 phy-handle = <&phy00>;
@@ -246,7 +252,13 @@
246 reg = <2200 200>; 252 reg = <2200 200>;
247 interrupts = <22>; 253 interrupts = <22>;
248 interrupt-parent = <&qeic>; 254 interrupt-parent = <&qeic>;
249 mac-address = [ 00 04 9f ef 03 01 ]; 255 /*
256 * mac-address is deprecated and will be removed
257 * in 2.6.25. Only recent versions of
258 * U-Boot support local-mac-address, however.
259 */
260 mac-address = [ 00 00 00 00 00 00 ];
261 local-mac-address = [ 00 00 00 00 00 00 ];
250 rx-clock = <19>; 262 rx-clock = <19>;
251 tx-clock = <1a>; 263 tx-clock = <1a>;
252 phy-handle = <&phy04>; 264 phy-handle = <&phy04>;
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index db0d00303275..ae9bca575453 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -131,6 +131,11 @@
131 model = "TSEC"; 131 model = "TSEC";
132 compatible = "gianfar"; 132 compatible = "gianfar";
133 reg = <24000 1000>; 133 reg = <24000 1000>;
134 /*
135 * address is deprecated and will be removed
136 * in 2.6.25. Only recent versions of
137 * U-Boot support local-mac-address, however.
138 */
134 address = [ 00 00 00 00 00 00 ]; 139 address = [ 00 00 00 00 00 00 ];
135 local-mac-address = [ 00 00 00 00 00 00 ]; 140 local-mac-address = [ 00 00 00 00 00 00 ];
136 interrupts = <20 8 21 8 22 8>; 141 interrupts = <20 8 21 8 22 8>;
@@ -145,6 +150,11 @@
145 model = "TSEC"; 150 model = "TSEC";
146 compatible = "gianfar"; 151 compatible = "gianfar";
147 reg = <25000 1000>; 152 reg = <25000 1000>;
153 /*
154 * address is deprecated and will be removed
155 * in 2.6.25. Only recent versions of
156 * U-Boot support local-mac-address, however.
157 */
148 address = [ 00 00 00 00 00 00 ]; 158 address = [ 00 00 00 00 00 00 ];
149 local-mac-address = [ 00 00 00 00 00 00 ]; 159 local-mac-address = [ 00 00 00 00 00 00 ];
150 interrupts = <23 8 24 8 25 8>; 160 interrupts = <23 8 24 8 25 8>;
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index df773fafe9d1..310e877826b4 100644
--- a/arch/powerpc/boot/dts/mpc834x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -136,6 +136,11 @@
136 model = "TSEC"; 136 model = "TSEC";
137 compatible = "gianfar"; 137 compatible = "gianfar";
138 reg = <24000 1000>; 138 reg = <24000 1000>;
139 /*
140 * address is deprecated and will be removed
141 * in 2.6.25. Only recent versions of
142 * U-Boot support local-mac-address, however.
143 */
139 address = [ 00 00 00 00 00 00 ]; 144 address = [ 00 00 00 00 00 00 ];
140 local-mac-address = [ 00 00 00 00 00 00 ]; 145 local-mac-address = [ 00 00 00 00 00 00 ];
141 interrupts = <20 8 21 8 22 8>; 146 interrupts = <20 8 21 8 22 8>;
@@ -150,6 +155,11 @@
150 model = "TSEC"; 155 model = "TSEC";
151 compatible = "gianfar"; 156 compatible = "gianfar";
152 reg = <25000 1000>; 157 reg = <25000 1000>;
158 /*
159 * address is deprecated and will be removed
160 * in 2.6.25. Only recent versions of
161 * U-Boot support local-mac-address, however.
162 */
153 address = [ 00 00 00 00 00 00 ]; 163 address = [ 00 00 00 00 00 00 ];
154 local-mac-address = [ 00 00 00 00 00 00 ]; 164 local-mac-address = [ 00 00 00 00 00 00 ];
155 interrupts = <23 8 24 8 25 8>; 165 interrupts = <23 8 24 8 25 8>;
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index 38c8594df3a4..1e914f31dd92 100644
--- a/arch/powerpc/boot/dts/mpc836x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -301,7 +301,13 @@
301 reg = <2000 200>; 301 reg = <2000 200>;
302 interrupts = <20>; 302 interrupts = <20>;
303 interrupt-parent = < &qeic >; 303 interrupt-parent = < &qeic >;
304 mac-address = [ 00 04 9f 00 23 23 ]; 304 /*
305 * mac-address is deprecated and will be removed
306 * in 2.6.25. Only recent versions of
307 * U-Boot support local-mac-address, however.
308 */
309 mac-address = [ 00 00 00 00 00 00 ];
310 local-mac-address = [ 00 00 00 00 00 00 ];
305 rx-clock = <0>; 311 rx-clock = <0>;
306 tx-clock = <19>; 312 tx-clock = <19>;
307 phy-handle = < &phy0 >; 313 phy-handle = < &phy0 >;
@@ -317,7 +323,13 @@
317 reg = <3000 200>; 323 reg = <3000 200>;
318 interrupts = <21>; 324 interrupts = <21>;
319 interrupt-parent = < &qeic >; 325 interrupt-parent = < &qeic >;
320 mac-address = [ 00 11 22 33 44 55 ]; 326 /*
327 * mac-address is deprecated and will be removed
328 * in 2.6.25. Only recent versions of
329 * U-Boot support local-mac-address, however.
330 */
331 mac-address = [ 00 00 00 00 00 00 ];
332 local-mac-address = [ 00 00 00 00 00 00 ];
321 rx-clock = <0>; 333 rx-clock = <0>;
322 tx-clock = <14>; 334 tx-clock = <14>;
323 phy-handle = < &phy1 >; 335 phy-handle = < &phy1 >;
diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/mpc8540ads.dts
index d91e81c009f5..364a969f5c2f 100644
--- a/arch/powerpc/boot/dts/mpc8540ads.dts
+++ b/arch/powerpc/boot/dts/mpc8540ads.dts
@@ -52,7 +52,7 @@
52 compatible = "fsl,8540-memory-controller"; 52 compatible = "fsl,8540-memory-controller";
53 reg = <2000 1000>; 53 reg = <2000 1000>;
54 interrupt-parent = <&mpic>; 54 interrupt-parent = <&mpic>;
55 interrupts = <2 2>; 55 interrupts = <12 2>;
56 }; 56 };
57 57
58 l2-cache-controller@20000 { 58 l2-cache-controller@20000 {
@@ -61,14 +61,14 @@
61 cache-line-size = <20>; // 32 bytes 61 cache-line-size = <20>; // 32 bytes
62 cache-size = <40000>; // L2, 256K 62 cache-size = <40000>; // L2, 256K
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <0 2>; 64 interrupts = <10 2>;
65 }; 65 };
66 66
67 i2c@3000 { 67 i2c@3000 {
68 device_type = "i2c"; 68 device_type = "i2c";
69 compatible = "fsl-i2c"; 69 compatible = "fsl-i2c";
70 reg = <3000 100>; 70 reg = <3000 100>;
71 interrupts = <1b 2>; 71 interrupts = <2b 2>;
72 interrupt-parent = <&mpic>; 72 interrupt-parent = <&mpic>;
73 dfsrr; 73 dfsrr;
74 }; 74 };
@@ -81,19 +81,19 @@
81 reg = <24520 20>; 81 reg = <24520 20>;
82 phy0: ethernet-phy@0 { 82 phy0: ethernet-phy@0 {
83 interrupt-parent = <&mpic>; 83 interrupt-parent = <&mpic>;
84 interrupts = <35 1>; 84 interrupts = <5 1>;
85 reg = <0>; 85 reg = <0>;
86 device_type = "ethernet-phy"; 86 device_type = "ethernet-phy";
87 }; 87 };
88 phy1: ethernet-phy@1 { 88 phy1: ethernet-phy@1 {
89 interrupt-parent = <&mpic>; 89 interrupt-parent = <&mpic>;
90 interrupts = <35 1>; 90 interrupts = <5 1>;
91 reg = <1>; 91 reg = <1>;
92 device_type = "ethernet-phy"; 92 device_type = "ethernet-phy";
93 }; 93 };
94 phy3: ethernet-phy@3 { 94 phy3: ethernet-phy@3 {
95 interrupt-parent = <&mpic>; 95 interrupt-parent = <&mpic>;
96 interrupts = <37 1>; 96 interrupts = <7 1>;
97 reg = <3>; 97 reg = <3>;
98 device_type = "ethernet-phy"; 98 device_type = "ethernet-phy";
99 }; 99 };
@@ -106,9 +106,14 @@
106 model = "TSEC"; 106 model = "TSEC";
107 compatible = "gianfar"; 107 compatible = "gianfar";
108 reg = <24000 1000>; 108 reg = <24000 1000>;
109 address = [ 00 E0 0C 00 73 00 ]; 109 /*
110 local-mac-address = [ 00 E0 0C 00 73 00 ]; 110 * address is deprecated and will be removed
111 interrupts = <d 2 e 2 12 2>; 111 * in 2.6.25. Only recent versions of
112 * U-Boot support local-mac-address, however.
113 */
114 address = [ 00 00 00 00 00 00 ];
115 local-mac-address = [ 00 00 00 00 00 00 ];
116 interrupts = <1d 2 1e 2 22 2>;
112 interrupt-parent = <&mpic>; 117 interrupt-parent = <&mpic>;
113 phy-handle = <&phy0>; 118 phy-handle = <&phy0>;
114 }; 119 };
@@ -120,9 +125,14 @@
120 model = "TSEC"; 125 model = "TSEC";
121 compatible = "gianfar"; 126 compatible = "gianfar";
122 reg = <25000 1000>; 127 reg = <25000 1000>;
123 address = [ 00 E0 0C 00 73 01 ]; 128 /*
124 local-mac-address = [ 00 E0 0C 00 73 01 ]; 129 * address is deprecated and will be removed
125 interrupts = <13 2 14 2 18 2>; 130 * in 2.6.25. Only recent versions of
131 * U-Boot support local-mac-address, however.
132 */
133 address = [ 00 00 00 00 00 00 ];
134 local-mac-address = [ 00 00 00 00 00 00 ];
135 interrupts = <23 2 24 2 28 2>;
126 interrupt-parent = <&mpic>; 136 interrupt-parent = <&mpic>;
127 phy-handle = <&phy1>; 137 phy-handle = <&phy1>;
128 }; 138 };
@@ -134,9 +144,14 @@
134 model = "FEC"; 144 model = "FEC";
135 compatible = "gianfar"; 145 compatible = "gianfar";
136 reg = <26000 1000>; 146 reg = <26000 1000>;
137 address = [ 00 E0 0C 00 73 02 ]; 147 /*
138 local-mac-address = [ 00 E0 0C 00 73 02 ]; 148 * address is deprecated and will be removed
139 interrupts = <19 2>; 149 * in 2.6.25. Only recent versions of
150 * U-Boot support local-mac-address, however.
151 */
152 address = [ 00 00 00 00 00 00 ];
153 local-mac-address = [ 00 00 00 00 00 00 ];
154 interrupts = <29 2>;
140 interrupt-parent = <&mpic>; 155 interrupt-parent = <&mpic>;
141 phy-handle = <&phy3>; 156 phy-handle = <&phy3>;
142 }; 157 };
@@ -146,7 +161,7 @@
146 compatible = "ns16550"; 161 compatible = "ns16550";
147 reg = <4500 100>; // reg base, size 162 reg = <4500 100>; // reg base, size
148 clock-frequency = <0>; // should we fill in in uboot? 163 clock-frequency = <0>; // should we fill in in uboot?
149 interrupts = <1a 2>; 164 interrupts = <2a 2>;
150 interrupt-parent = <&mpic>; 165 interrupt-parent = <&mpic>;
151 }; 166 };
152 167
@@ -155,7 +170,7 @@
155 compatible = "ns16550"; 170 compatible = "ns16550";
156 reg = <4600 100>; // reg base, size 171 reg = <4600 100>; // reg base, size
157 clock-frequency = <0>; // should we fill in in uboot? 172 clock-frequency = <0>; // should we fill in in uboot?
158 interrupts = <1a 2>; 173 interrupts = <2a 2>;
159 interrupt-parent = <&mpic>; 174 interrupt-parent = <&mpic>;
160 }; 175 };
161 pci@8000 { 176 pci@8000 {
@@ -163,78 +178,78 @@
163 interrupt-map = < 178 interrupt-map = <
164 179
165 /* IDSEL 0x02 */ 180 /* IDSEL 0x02 */
166 1000 0 0 1 &mpic 31 1 181 1000 0 0 1 &mpic 1 1
167 1000 0 0 2 &mpic 32 1 182 1000 0 0 2 &mpic 2 1
168 1000 0 0 3 &mpic 33 1 183 1000 0 0 3 &mpic 3 1
169 1000 0 0 4 &mpic 34 1 184 1000 0 0 4 &mpic 4 1
170 185
171 /* IDSEL 0x03 */ 186 /* IDSEL 0x03 */
172 1800 0 0 1 &mpic 34 1 187 1800 0 0 1 &mpic 4 1
173 1800 0 0 2 &mpic 31 1 188 1800 0 0 2 &mpic 1 1
174 1800 0 0 3 &mpic 32 1 189 1800 0 0 3 &mpic 2 1
175 1800 0 0 4 &mpic 33 1 190 1800 0 0 4 &mpic 3 1
176 191
177 /* IDSEL 0x04 */ 192 /* IDSEL 0x04 */
178 2000 0 0 1 &mpic 33 1 193 2000 0 0 1 &mpic 3 1
179 2000 0 0 2 &mpic 34 1 194 2000 0 0 2 &mpic 4 1
180 2000 0 0 3 &mpic 31 1 195 2000 0 0 3 &mpic 1 1
181 2000 0 0 4 &mpic 32 1 196 2000 0 0 4 &mpic 2 1
182 197
183 /* IDSEL 0x05 */ 198 /* IDSEL 0x05 */
184 2800 0 0 1 &mpic 32 1 199 2800 0 0 1 &mpic 2 1
185 2800 0 0 2 &mpic 33 1 200 2800 0 0 2 &mpic 3 1
186 2800 0 0 3 &mpic 34 1 201 2800 0 0 3 &mpic 4 1
187 2800 0 0 4 &mpic 31 1 202 2800 0 0 4 &mpic 1 1
188 203
189 /* IDSEL 0x0c */ 204 /* IDSEL 0x0c */
190 6000 0 0 1 &mpic 31 1 205 6000 0 0 1 &mpic 1 1
191 6000 0 0 2 &mpic 32 1 206 6000 0 0 2 &mpic 2 1
192 6000 0 0 3 &mpic 33 1 207 6000 0 0 3 &mpic 3 1
193 6000 0 0 4 &mpic 34 1 208 6000 0 0 4 &mpic 4 1
194 209
195 /* IDSEL 0x0d */ 210 /* IDSEL 0x0d */
196 6800 0 0 1 &mpic 34 1 211 6800 0 0 1 &mpic 4 1
197 6800 0 0 2 &mpic 31 1 212 6800 0 0 2 &mpic 1 1
198 6800 0 0 3 &mpic 32 1 213 6800 0 0 3 &mpic 2 1
199 6800 0 0 4 &mpic 33 1 214 6800 0 0 4 &mpic 3 1
200 215
201 /* IDSEL 0x0e */ 216 /* IDSEL 0x0e */
202 7000 0 0 1 &mpic 33 1 217 7000 0 0 1 &mpic 3 1
203 7000 0 0 2 &mpic 34 1 218 7000 0 0 2 &mpic 4 1
204 7000 0 0 3 &mpic 31 1 219 7000 0 0 3 &mpic 1 1
205 7000 0 0 4 &mpic 32 1 220 7000 0 0 4 &mpic 2 1
206 221
207 /* IDSEL 0x0f */ 222 /* IDSEL 0x0f */
208 7800 0 0 1 &mpic 32 1 223 7800 0 0 1 &mpic 2 1
209 7800 0 0 2 &mpic 33 1 224 7800 0 0 2 &mpic 3 1
210 7800 0 0 3 &mpic 34 1 225 7800 0 0 3 &mpic 4 1
211 7800 0 0 4 &mpic 31 1 226 7800 0 0 4 &mpic 1 1
212 227
213 /* IDSEL 0x12 */ 228 /* IDSEL 0x12 */
214 9000 0 0 1 &mpic 31 1 229 9000 0 0 1 &mpic 1 1
215 9000 0 0 2 &mpic 32 1 230 9000 0 0 2 &mpic 2 1
216 9000 0 0 3 &mpic 33 1 231 9000 0 0 3 &mpic 3 1
217 9000 0 0 4 &mpic 34 1 232 9000 0 0 4 &mpic 4 1
218 233
219 /* IDSEL 0x13 */ 234 /* IDSEL 0x13 */
220 9800 0 0 1 &mpic 34 1 235 9800 0 0 1 &mpic 4 1
221 9800 0 0 2 &mpic 31 1 236 9800 0 0 2 &mpic 1 1
222 9800 0 0 3 &mpic 32 1 237 9800 0 0 3 &mpic 2 1
223 9800 0 0 4 &mpic 33 1 238 9800 0 0 4 &mpic 3 1
224 239
225 /* IDSEL 0x14 */ 240 /* IDSEL 0x14 */
226 a000 0 0 1 &mpic 33 1 241 a000 0 0 1 &mpic 3 1
227 a000 0 0 2 &mpic 34 1 242 a000 0 0 2 &mpic 4 1
228 a000 0 0 3 &mpic 31 1 243 a000 0 0 3 &mpic 1 1
229 a000 0 0 4 &mpic 32 1 244 a000 0 0 4 &mpic 2 1
230 245
231 /* IDSEL 0x15 */ 246 /* IDSEL 0x15 */
232 a800 0 0 1 &mpic 32 1 247 a800 0 0 1 &mpic 2 1
233 a800 0 0 2 &mpic 33 1 248 a800 0 0 2 &mpic 3 1
234 a800 0 0 3 &mpic 34 1 249 a800 0 0 3 &mpic 4 1
235 a800 0 0 4 &mpic 31 1>; 250 a800 0 0 4 &mpic 1 1>;
236 interrupt-parent = <&mpic>; 251 interrupt-parent = <&mpic>;
237 interrupts = <08 2>; 252 interrupts = <18 2>;
238 bus-range = <0 0>; 253 bus-range = <0 0>;
239 ranges = <02000000 0 80000000 80000000 0 20000000 254 ranges = <02000000 0 80000000 80000000 0 20000000
240 01000000 0 00000000 e2000000 0 00100000>; 255 01000000 0 00000000 e2000000 0 00100000>;
diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts
index 4f2c3af2e052..070206fffe88 100644
--- a/arch/powerpc/boot/dts/mpc8541cds.dts
+++ b/arch/powerpc/boot/dts/mpc8541cds.dts
@@ -52,7 +52,7 @@
52 compatible = "fsl,8541-memory-controller"; 52 compatible = "fsl,8541-memory-controller";
53 reg = <2000 1000>; 53 reg = <2000 1000>;
54 interrupt-parent = <&mpic>; 54 interrupt-parent = <&mpic>;
55 interrupts = <2 2>; 55 interrupts = <12 2>;
56 }; 56 };
57 57
58 l2-cache-controller@20000 { 58 l2-cache-controller@20000 {
@@ -61,14 +61,14 @@
61 cache-line-size = <20>; // 32 bytes 61 cache-line-size = <20>; // 32 bytes
62 cache-size = <40000>; // L2, 256K 62 cache-size = <40000>; // L2, 256K
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <0 2>; 64 interrupts = <10 2>;
65 }; 65 };
66 66
67 i2c@3000 { 67 i2c@3000 {
68 device_type = "i2c"; 68 device_type = "i2c";
69 compatible = "fsl-i2c"; 69 compatible = "fsl-i2c";
70 reg = <3000 100>; 70 reg = <3000 100>;
71 interrupts = <1b 2>; 71 interrupts = <2b 2>;
72 interrupt-parent = <&mpic>; 72 interrupt-parent = <&mpic>;
73 dfsrr; 73 dfsrr;
74 }; 74 };
@@ -81,13 +81,13 @@
81 reg = <24520 20>; 81 reg = <24520 20>;
82 phy0: ethernet-phy@0 { 82 phy0: ethernet-phy@0 {
83 interrupt-parent = <&mpic>; 83 interrupt-parent = <&mpic>;
84 interrupts = <35 0>; 84 interrupts = <5 1>;
85 reg = <0>; 85 reg = <0>;
86 device_type = "ethernet-phy"; 86 device_type = "ethernet-phy";
87 }; 87 };
88 phy1: ethernet-phy@1 { 88 phy1: ethernet-phy@1 {
89 interrupt-parent = <&mpic>; 89 interrupt-parent = <&mpic>;
90 interrupts = <35 0>; 90 interrupts = <5 1>;
91 reg = <1>; 91 reg = <1>;
92 device_type = "ethernet-phy"; 92 device_type = "ethernet-phy";
93 }; 93 };
@@ -100,8 +100,8 @@
100 model = "TSEC"; 100 model = "TSEC";
101 compatible = "gianfar"; 101 compatible = "gianfar";
102 reg = <24000 1000>; 102 reg = <24000 1000>;
103 local-mac-address = [ 00 E0 0C 00 73 00 ]; 103 local-mac-address = [ 00 00 00 00 00 00 ];
104 interrupts = <d 2 e 2 12 2>; 104 interrupts = <1d 2 1e 2 22 2>;
105 interrupt-parent = <&mpic>; 105 interrupt-parent = <&mpic>;
106 phy-handle = <&phy0>; 106 phy-handle = <&phy0>;
107 }; 107 };
@@ -113,8 +113,8 @@
113 model = "TSEC"; 113 model = "TSEC";
114 compatible = "gianfar"; 114 compatible = "gianfar";
115 reg = <25000 1000>; 115 reg = <25000 1000>;
116 local-mac-address = [ 00 E0 0C 00 73 01 ]; 116 local-mac-address = [ 00 00 00 00 00 00 ];
117 interrupts = <13 2 14 2 18 2>; 117 interrupts = <23 2 24 2 28 2>;
118 interrupt-parent = <&mpic>; 118 interrupt-parent = <&mpic>;
119 phy-handle = <&phy1>; 119 phy-handle = <&phy1>;
120 }; 120 };
@@ -124,7 +124,7 @@
124 compatible = "ns16550"; 124 compatible = "ns16550";
125 reg = <4500 100>; // reg base, size 125 reg = <4500 100>; // reg base, size
126 clock-frequency = <0>; // should we fill in in uboot? 126 clock-frequency = <0>; // should we fill in in uboot?
127 interrupts = <1a 2>; 127 interrupts = <2a 2>;
128 interrupt-parent = <&mpic>; 128 interrupt-parent = <&mpic>;
129 }; 129 };
130 130
@@ -133,7 +133,7 @@
133 compatible = "ns16550"; 133 compatible = "ns16550";
134 reg = <4600 100>; // reg base, size 134 reg = <4600 100>; // reg base, size
135 clock-frequency = <0>; // should we fill in in uboot? 135 clock-frequency = <0>; // should we fill in in uboot?
136 interrupts = <1a 2>; 136 interrupts = <2a 2>;
137 interrupt-parent = <&mpic>; 137 interrupt-parent = <&mpic>;
138 }; 138 };
139 139
@@ -142,49 +142,49 @@
142 interrupt-map = < 142 interrupt-map = <
143 143
144 /* IDSEL 0x10 */ 144 /* IDSEL 0x10 */
145 08000 0 0 1 &mpic 30 1 145 08000 0 0 1 &mpic 0 1
146 08000 0 0 2 &mpic 31 1 146 08000 0 0 2 &mpic 1 1
147 08000 0 0 3 &mpic 32 1 147 08000 0 0 3 &mpic 2 1
148 08000 0 0 4 &mpic 33 1 148 08000 0 0 4 &mpic 3 1
149 149
150 /* IDSEL 0x11 */ 150 /* IDSEL 0x11 */
151 08800 0 0 1 &mpic 30 1 151 08800 0 0 1 &mpic 0 1
152 08800 0 0 2 &mpic 31 1 152 08800 0 0 2 &mpic 1 1
153 08800 0 0 3 &mpic 32 1 153 08800 0 0 3 &mpic 2 1
154 08800 0 0 4 &mpic 33 1 154 08800 0 0 4 &mpic 3 1
155 155
156 /* IDSEL 0x12 (Slot 1) */ 156 /* IDSEL 0x12 (Slot 1) */
157 09000 0 0 1 &mpic 30 1 157 09000 0 0 1 &mpic 0 1
158 09000 0 0 2 &mpic 31 1 158 09000 0 0 2 &mpic 1 1
159 09000 0 0 3 &mpic 32 1 159 09000 0 0 3 &mpic 2 1
160 09000 0 0 4 &mpic 33 1 160 09000 0 0 4 &mpic 3 1
161 161
162 /* IDSEL 0x13 (Slot 2) */ 162 /* IDSEL 0x13 (Slot 2) */
163 09800 0 0 1 &mpic 31 1 163 09800 0 0 1 &mpic 1 1
164 09800 0 0 2 &mpic 32 1 164 09800 0 0 2 &mpic 2 1
165 09800 0 0 3 &mpic 33 1 165 09800 0 0 3 &mpic 3 1
166 09800 0 0 4 &mpic 30 1 166 09800 0 0 4 &mpic 0 1
167 167
168 /* IDSEL 0x14 (Slot 3) */ 168 /* IDSEL 0x14 (Slot 3) */
169 0a000 0 0 1 &mpic 32 1 169 0a000 0 0 1 &mpic 2 1
170 0a000 0 0 2 &mpic 33 1 170 0a000 0 0 2 &mpic 3 1
171 0a000 0 0 3 &mpic 30 1 171 0a000 0 0 3 &mpic 0 1
172 0a000 0 0 4 &mpic 31 1 172 0a000 0 0 4 &mpic 1 1
173 173
174 /* IDSEL 0x15 (Slot 4) */ 174 /* IDSEL 0x15 (Slot 4) */
175 0a800 0 0 1 &mpic 33 1 175 0a800 0 0 1 &mpic 3 1
176 0a800 0 0 2 &mpic 30 1 176 0a800 0 0 2 &mpic 0 1
177 0a800 0 0 3 &mpic 31 1 177 0a800 0 0 3 &mpic 1 1
178 0a800 0 0 4 &mpic 32 1 178 0a800 0 0 4 &mpic 2 1
179 179
180 /* Bus 1 (Tundra Bridge) */ 180 /* Bus 1 (Tundra Bridge) */
181 /* IDSEL 0x12 (ISA bridge) */ 181 /* IDSEL 0x12 (ISA bridge) */
182 19000 0 0 1 &mpic 30 1 182 19000 0 0 1 &mpic 0 1
183 19000 0 0 2 &mpic 31 1 183 19000 0 0 2 &mpic 1 1
184 19000 0 0 3 &mpic 32 1 184 19000 0 0 3 &mpic 2 1
185 19000 0 0 4 &mpic 33 1>; 185 19000 0 0 4 &mpic 3 1>;
186 interrupt-parent = <&mpic>; 186 interrupt-parent = <&mpic>;
187 interrupts = <08 2>; 187 interrupts = <18 2>;
188 bus-range = <0 0>; 188 bus-range = <0 0>;
189 ranges = <02000000 0 80000000 80000000 0 20000000 189 ranges = <02000000 0 80000000 80000000 0 20000000
190 01000000 0 00000000 e2000000 0 00100000>; 190 01000000 0 00000000 e2000000 0 00100000>;
@@ -216,12 +216,12 @@
216 interrupt-map = < 216 interrupt-map = <
217 217
218 /* IDSEL 0x15 */ 218 /* IDSEL 0x15 */
219 a800 0 0 1 &mpic 3b 1 219 a800 0 0 1 &mpic b 1
220 a800 0 0 2 &mpic 3b 1 220 a800 0 0 2 &mpic b 1
221 a800 0 0 3 &mpic 3b 1 221 a800 0 0 3 &mpic b 1
222 a800 0 0 4 &mpic 3b 1>; 222 a800 0 0 4 &mpic b 1>;
223 interrupt-parent = <&mpic>; 223 interrupt-parent = <&mpic>;
224 interrupts = <09 2>; 224 interrupts = <19 2>;
225 bus-range = <0 0>; 225 bus-range = <0 0>;
226 ranges = <02000000 0 a0000000 a0000000 0 20000000 226 ranges = <02000000 0 a0000000 a0000000 0 20000000
227 01000000 0 00000000 e3000000 0 00100000>; 227 01000000 0 00000000 e3000000 0 00100000>;
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts
index 3033599e74e8..828592592460 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/mpc8544ds.dts
@@ -52,7 +52,7 @@
52 compatible = "fsl,8544-memory-controller"; 52 compatible = "fsl,8544-memory-controller";
53 reg = <2000 1000>; 53 reg = <2000 1000>;
54 interrupt-parent = <&mpic>; 54 interrupt-parent = <&mpic>;
55 interrupts = <2 2>; 55 interrupts = <12 2>;
56 }; 56 };
57 57
58 l2-cache-controller@20000 { 58 l2-cache-controller@20000 {
@@ -61,14 +61,14 @@
61 cache-line-size = <20>; // 32 bytes 61 cache-line-size = <20>; // 32 bytes
62 cache-size = <40000>; // L2, 256K 62 cache-size = <40000>; // L2, 256K
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <0 2>; 64 interrupts = <10 2>;
65 }; 65 };
66 66
67 i2c@3000 { 67 i2c@3000 {
68 device_type = "i2c"; 68 device_type = "i2c";
69 compatible = "fsl-i2c"; 69 compatible = "fsl-i2c";
70 reg = <3000 100>; 70 reg = <3000 100>;
71 interrupts = <1b 2>; 71 interrupts = <2b 2>;
72 interrupt-parent = <&mpic>; 72 interrupt-parent = <&mpic>;
73 dfsrr; 73 dfsrr;
74 }; 74 };
@@ -81,13 +81,13 @@
81 reg = <24520 20>; 81 reg = <24520 20>;
82 phy0: ethernet-phy@0 { 82 phy0: ethernet-phy@0 {
83 interrupt-parent = <&mpic>; 83 interrupt-parent = <&mpic>;
84 interrupts = <3a 1>; 84 interrupts = <a 1>;
85 reg = <0>; 85 reg = <0>;
86 device_type = "ethernet-phy"; 86 device_type = "ethernet-phy";
87 }; 87 };
88 phy1: ethernet-phy@1 { 88 phy1: ethernet-phy@1 {
89 interrupt-parent = <&mpic>; 89 interrupt-parent = <&mpic>;
90 interrupts = <3a 1>; 90 interrupts = <a 1>;
91 reg = <1>; 91 reg = <1>;
92 device_type = "ethernet-phy"; 92 device_type = "ethernet-phy";
93 }; 93 };
@@ -101,7 +101,7 @@
101 compatible = "gianfar"; 101 compatible = "gianfar";
102 reg = <24000 1000>; 102 reg = <24000 1000>;
103 local-mac-address = [ 00 00 00 00 00 00 ]; 103 local-mac-address = [ 00 00 00 00 00 00 ];
104 interrupts = <d 2 e 2 12 2>; 104 interrupts = <1d 2 1e 2 22 2>;
105 interrupt-parent = <&mpic>; 105 interrupt-parent = <&mpic>;
106 phy-handle = <&phy0>; 106 phy-handle = <&phy0>;
107 }; 107 };
@@ -114,7 +114,7 @@
114 compatible = "gianfar"; 114 compatible = "gianfar";
115 reg = <26000 1000>; 115 reg = <26000 1000>;
116 local-mac-address = [ 00 00 00 00 00 00 ]; 116 local-mac-address = [ 00 00 00 00 00 00 ];
117 interrupts = <f 2 10 2 11 2>; 117 interrupts = <1f 2 20 2 21 2>;
118 interrupt-parent = <&mpic>; 118 interrupt-parent = <&mpic>;
119 phy-handle = <&phy1>; 119 phy-handle = <&phy1>;
120 }; 120 };
@@ -124,7 +124,7 @@
124 compatible = "ns16550"; 124 compatible = "ns16550";
125 reg = <4500 100>; 125 reg = <4500 100>;
126 clock-frequency = <0>; 126 clock-frequency = <0>;
127 interrupts = <1a 2>; 127 interrupts = <2a 2>;
128 interrupt-parent = <&mpic>; 128 interrupt-parent = <&mpic>;
129 }; 129 };
130 130
@@ -133,7 +133,7 @@
133 compatible = "ns16550"; 133 compatible = "ns16550";
134 reg = <4600 100>; 134 reg = <4600 100>;
135 clock-frequency = <0>; 135 clock-frequency = <0>;
136 interrupts = <1a 2>; 136 interrupts = <2a 2>;
137 interrupt-parent = <&mpic>; 137 interrupt-parent = <&mpic>;
138 }; 138 };
139 139
diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts
index ad96381033c0..9d0b84b66cd4 100644
--- a/arch/powerpc/boot/dts/mpc8548cds.dts
+++ b/arch/powerpc/boot/dts/mpc8548cds.dts
@@ -52,7 +52,7 @@
52 compatible = "fsl,8548-memory-controller"; 52 compatible = "fsl,8548-memory-controller";
53 reg = <2000 1000>; 53 reg = <2000 1000>;
54 interrupt-parent = <&mpic>; 54 interrupt-parent = <&mpic>;
55 interrupts = <2 2>; 55 interrupts = <12 2>;
56 }; 56 };
57 57
58 l2-cache-controller@20000 { 58 l2-cache-controller@20000 {
@@ -61,14 +61,14 @@
61 cache-line-size = <20>; // 32 bytes 61 cache-line-size = <20>; // 32 bytes
62 cache-size = <80000>; // L2, 512K 62 cache-size = <80000>; // L2, 512K
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <0 2>; 64 interrupts = <10 2>;
65 }; 65 };
66 66
67 i2c@3000 { 67 i2c@3000 {
68 device_type = "i2c"; 68 device_type = "i2c";
69 compatible = "fsl-i2c"; 69 compatible = "fsl-i2c";
70 reg = <3000 100>; 70 reg = <3000 100>;
71 interrupts = <1b 2>; 71 interrupts = <2b 2>;
72 interrupt-parent = <&mpic>; 72 interrupt-parent = <&mpic>;
73 dfsrr; 73 dfsrr;
74 }; 74 };
@@ -81,25 +81,25 @@
81 reg = <24520 20>; 81 reg = <24520 20>;
82 phy0: ethernet-phy@0 { 82 phy0: ethernet-phy@0 {
83 interrupt-parent = <&mpic>; 83 interrupt-parent = <&mpic>;
84 interrupts = <35 0>; 84 interrupts = <5 1>;
85 reg = <0>; 85 reg = <0>;
86 device_type = "ethernet-phy"; 86 device_type = "ethernet-phy";
87 }; 87 };
88 phy1: ethernet-phy@1 { 88 phy1: ethernet-phy@1 {
89 interrupt-parent = <&mpic>; 89 interrupt-parent = <&mpic>;
90 interrupts = <35 0>; 90 interrupts = <5 1>;
91 reg = <1>; 91 reg = <1>;
92 device_type = "ethernet-phy"; 92 device_type = "ethernet-phy";
93 }; 93 };
94 phy2: ethernet-phy@2 { 94 phy2: ethernet-phy@2 {
95 interrupt-parent = <&mpic>; 95 interrupt-parent = <&mpic>;
96 interrupts = <35 0>; 96 interrupts = <5 1>;
97 reg = <2>; 97 reg = <2>;
98 device_type = "ethernet-phy"; 98 device_type = "ethernet-phy";
99 }; 99 };
100 phy3: ethernet-phy@3 { 100 phy3: ethernet-phy@3 {
101 interrupt-parent = <&mpic>; 101 interrupt-parent = <&mpic>;
102 interrupts = <35 0>; 102 interrupts = <5 1>;
103 reg = <3>; 103 reg = <3>;
104 device_type = "ethernet-phy"; 104 device_type = "ethernet-phy";
105 }; 105 };
@@ -112,8 +112,8 @@
112 model = "eTSEC"; 112 model = "eTSEC";
113 compatible = "gianfar"; 113 compatible = "gianfar";
114 reg = <24000 1000>; 114 reg = <24000 1000>;
115 local-mac-address = [ 00 E0 0C 00 73 00 ]; 115 local-mac-address = [ 00 00 00 00 00 00 ];
116 interrupts = <d 2 e 2 12 2>; 116 interrupts = <1d 2 1e 2 22 2>;
117 interrupt-parent = <&mpic>; 117 interrupt-parent = <&mpic>;
118 phy-handle = <&phy0>; 118 phy-handle = <&phy0>;
119 }; 119 };
@@ -125,8 +125,8 @@
125 model = "eTSEC"; 125 model = "eTSEC";
126 compatible = "gianfar"; 126 compatible = "gianfar";
127 reg = <25000 1000>; 127 reg = <25000 1000>;
128 local-mac-address = [ 00 E0 0C 00 73 01 ]; 128 local-mac-address = [ 00 00 00 00 00 00 ];
129 interrupts = <13 2 14 2 18 2>; 129 interrupts = <23 2 24 2 28 2>;
130 interrupt-parent = <&mpic>; 130 interrupt-parent = <&mpic>;
131 phy-handle = <&phy1>; 131 phy-handle = <&phy1>;
132 }; 132 };
@@ -139,8 +139,8 @@
139 model = "eTSEC"; 139 model = "eTSEC";
140 compatible = "gianfar"; 140 compatible = "gianfar";
141 reg = <26000 1000>; 141 reg = <26000 1000>;
142 local-mac-address = [ 00 E0 0C 00 73 02 ]; 142 local-mac-address = [ 00 00 00 00 00 00 ];
143 interrupts = <f 2 10 2 11 2>; 143 interrupts = <1f 2 20 2 21 2>;
144 interrupt-parent = <&mpic>; 144 interrupt-parent = <&mpic>;
145 phy-handle = <&phy2>; 145 phy-handle = <&phy2>;
146 }; 146 };
@@ -152,8 +152,8 @@
152 model = "eTSEC"; 152 model = "eTSEC";
153 compatible = "gianfar"; 153 compatible = "gianfar";
154 reg = <27000 1000>; 154 reg = <27000 1000>;
155 local-mac-address = [ 00 E0 0C 00 73 03 ]; 155 local-mac-address = [ 00 00 00 00 00 00 ];
156 interrupts = <15 2 16 2 17 2>; 156 interrupts = <25 2 26 2 27 2>;
157 interrupt-parent = <&mpic>; 157 interrupt-parent = <&mpic>;
158 phy-handle = <&phy3>; 158 phy-handle = <&phy3>;
159 }; 159 };
@@ -164,7 +164,7 @@
164 compatible = "ns16550"; 164 compatible = "ns16550";
165 reg = <4500 100>; // reg base, size 165 reg = <4500 100>; // reg base, size
166 clock-frequency = <0>; // should we fill in in uboot? 166 clock-frequency = <0>; // should we fill in in uboot?
167 interrupts = <1a 2>; 167 interrupts = <2a 2>;
168 interrupt-parent = <&mpic>; 168 interrupt-parent = <&mpic>;
169 }; 169 };
170 170
@@ -173,58 +173,64 @@
173 compatible = "ns16550"; 173 compatible = "ns16550";
174 reg = <4600 100>; // reg base, size 174 reg = <4600 100>; // reg base, size
175 clock-frequency = <0>; // should we fill in in uboot? 175 clock-frequency = <0>; // should we fill in in uboot?
176 interrupts = <1a 2>; 176 interrupts = <2a 2>;
177 interrupt-parent = <&mpic>; 177 interrupt-parent = <&mpic>;
178 }; 178 };
179 179
180 global-utilities@e0000 { //global utilities reg
181 compatible = "fsl,mpc8548-guts";
182 reg = <e0000 1000>;
183 fsl,has-rstcr;
184 };
185
180 pci1: pci@8000 { 186 pci1: pci@8000 {
181 interrupt-map-mask = <1f800 0 0 7>; 187 interrupt-map-mask = <1f800 0 0 7>;
182 interrupt-map = < 188 interrupt-map = <
183 189
184 /* IDSEL 0x10 */ 190 /* IDSEL 0x10 */
185 08000 0 0 1 &mpic 30 1 191 08000 0 0 1 &mpic 0 1
186 08000 0 0 2 &mpic 31 1 192 08000 0 0 2 &mpic 1 1
187 08000 0 0 3 &mpic 32 1 193 08000 0 0 3 &mpic 2 1
188 08000 0 0 4 &mpic 33 1 194 08000 0 0 4 &mpic 3 1
189 195
190 /* IDSEL 0x11 */ 196 /* IDSEL 0x11 */
191 08800 0 0 1 &mpic 30 1 197 08800 0 0 1 &mpic 0 1
192 08800 0 0 2 &mpic 31 1 198 08800 0 0 2 &mpic 1 1
193 08800 0 0 3 &mpic 32 1 199 08800 0 0 3 &mpic 2 1
194 08800 0 0 4 &mpic 33 1 200 08800 0 0 4 &mpic 3 1
195 201
196 /* IDSEL 0x12 (Slot 1) */ 202 /* IDSEL 0x12 (Slot 1) */
197 09000 0 0 1 &mpic 30 1 203 09000 0 0 1 &mpic 0 1
198 09000 0 0 2 &mpic 31 1 204 09000 0 0 2 &mpic 1 1
199 09000 0 0 3 &mpic 32 1 205 09000 0 0 3 &mpic 2 1
200 09000 0 0 4 &mpic 33 1 206 09000 0 0 4 &mpic 3 1
201 207
202 /* IDSEL 0x13 (Slot 2) */ 208 /* IDSEL 0x13 (Slot 2) */
203 09800 0 0 1 &mpic 31 1 209 09800 0 0 1 &mpic 1 1
204 09800 0 0 2 &mpic 32 1 210 09800 0 0 2 &mpic 2 1
205 09800 0 0 3 &mpic 33 1 211 09800 0 0 3 &mpic 3 1
206 09800 0 0 4 &mpic 30 1 212 09800 0 0 4 &mpic 0 1
207 213
208 /* IDSEL 0x14 (Slot 3) */ 214 /* IDSEL 0x14 (Slot 3) */
209 0a000 0 0 1 &mpic 32 1 215 0a000 0 0 1 &mpic 2 1
210 0a000 0 0 2 &mpic 33 1 216 0a000 0 0 2 &mpic 3 1
211 0a000 0 0 3 &mpic 30 1 217 0a000 0 0 3 &mpic 0 1
212 0a000 0 0 4 &mpic 31 1 218 0a000 0 0 4 &mpic 1 1
213 219
214 /* IDSEL 0x15 (Slot 4) */ 220 /* IDSEL 0x15 (Slot 4) */
215 0a800 0 0 1 &mpic 33 1 221 0a800 0 0 1 &mpic 3 1
216 0a800 0 0 2 &mpic 30 1 222 0a800 0 0 2 &mpic 0 1
217 0a800 0 0 3 &mpic 31 1 223 0a800 0 0 3 &mpic 1 1
218 0a800 0 0 4 &mpic 32 1 224 0a800 0 0 4 &mpic 2 1
219 225
220 /* Bus 1 (Tundra Bridge) */ 226 /* Bus 1 (Tundra Bridge) */
221 /* IDSEL 0x12 (ISA bridge) */ 227 /* IDSEL 0x12 (ISA bridge) */
222 19000 0 0 1 &mpic 30 1 228 19000 0 0 1 &mpic 0 1
223 19000 0 0 2 &mpic 31 1 229 19000 0 0 2 &mpic 1 1
224 19000 0 0 3 &mpic 32 1 230 19000 0 0 3 &mpic 2 1
225 19000 0 0 4 &mpic 33 1>; 231 19000 0 0 4 &mpic 3 1>;
226 interrupt-parent = <&mpic>; 232 interrupt-parent = <&mpic>;
227 interrupts = <08 2>; 233 interrupts = <18 2>;
228 bus-range = <0 0>; 234 bus-range = <0 0>;
229 ranges = <02000000 0 80000000 80000000 0 20000000 235 ranges = <02000000 0 80000000 80000000 0 20000000
230 01000000 0 00000000 e2000000 0 00100000>; 236 01000000 0 00000000 e2000000 0 00100000>;
@@ -256,12 +262,12 @@
256 interrupt-map = < 262 interrupt-map = <
257 263
258 /* IDSEL 0x15 */ 264 /* IDSEL 0x15 */
259 a800 0 0 1 &mpic 3b 1 265 a800 0 0 1 &mpic b 1
260 a800 0 0 2 &mpic 3b 1 266 a800 0 0 2 &mpic b 1
261 a800 0 0 3 &mpic 3b 1 267 a800 0 0 3 &mpic b 1
262 a800 0 0 4 &mpic 3b 1>; 268 a800 0 0 4 &mpic b 1>;
263 interrupt-parent = <&mpic>; 269 interrupt-parent = <&mpic>;
264 interrupts = <09 2>; 270 interrupts = <19 2>;
265 bus-range = <0 0>; 271 bus-range = <0 0>;
266 ranges = <02000000 0 a0000000 a0000000 0 20000000 272 ranges = <02000000 0 a0000000 a0000000 0 20000000
267 01000000 0 00000000 e3000000 0 00100000>; 273 01000000 0 00000000 e3000000 0 00100000>;
diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts
index 951ed92f1154..17e45d9a382a 100644
--- a/arch/powerpc/boot/dts/mpc8555cds.dts
+++ b/arch/powerpc/boot/dts/mpc8555cds.dts
@@ -52,7 +52,7 @@
52 compatible = "fsl,8555-memory-controller"; 52 compatible = "fsl,8555-memory-controller";
53 reg = <2000 1000>; 53 reg = <2000 1000>;
54 interrupt-parent = <&mpic>; 54 interrupt-parent = <&mpic>;
55 interrupts = <2 2>; 55 interrupts = <12 2>;
56 }; 56 };
57 57
58 l2-cache-controller@20000 { 58 l2-cache-controller@20000 {
@@ -61,14 +61,14 @@
61 cache-line-size = <20>; // 32 bytes 61 cache-line-size = <20>; // 32 bytes
62 cache-size = <40000>; // L2, 256K 62 cache-size = <40000>; // L2, 256K
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <0 2>; 64 interrupts = <10 2>;
65 }; 65 };
66 66
67 i2c@3000 { 67 i2c@3000 {
68 device_type = "i2c"; 68 device_type = "i2c";
69 compatible = "fsl-i2c"; 69 compatible = "fsl-i2c";
70 reg = <3000 100>; 70 reg = <3000 100>;
71 interrupts = <1b 2>; 71 interrupts = <2b 2>;
72 interrupt-parent = <&mpic>; 72 interrupt-parent = <&mpic>;
73 dfsrr; 73 dfsrr;
74 }; 74 };
@@ -81,13 +81,13 @@
81 reg = <24520 20>; 81 reg = <24520 20>;
82 phy0: ethernet-phy@0 { 82 phy0: ethernet-phy@0 {
83 interrupt-parent = <&mpic>; 83 interrupt-parent = <&mpic>;
84 interrupts = <35 0>; 84 interrupts = <5 1>;
85 reg = <0>; 85 reg = <0>;
86 device_type = "ethernet-phy"; 86 device_type = "ethernet-phy";
87 }; 87 };
88 phy1: ethernet-phy@1 { 88 phy1: ethernet-phy@1 {
89 interrupt-parent = <&mpic>; 89 interrupt-parent = <&mpic>;
90 interrupts = <35 0>; 90 interrupts = <5 1>;
91 reg = <1>; 91 reg = <1>;
92 device_type = "ethernet-phy"; 92 device_type = "ethernet-phy";
93 }; 93 };
@@ -100,8 +100,8 @@
100 model = "TSEC"; 100 model = "TSEC";
101 compatible = "gianfar"; 101 compatible = "gianfar";
102 reg = <24000 1000>; 102 reg = <24000 1000>;
103 local-mac-address = [ 00 E0 0C 00 73 00 ]; 103 local-mac-address = [ 00 00 00 00 00 00 ];
104 interrupts = <0d 2 0e 2 12 2>; 104 interrupts = <1d 2 1e 2 22 2>;
105 interrupt-parent = <&mpic>; 105 interrupt-parent = <&mpic>;
106 phy-handle = <&phy0>; 106 phy-handle = <&phy0>;
107 }; 107 };
@@ -113,8 +113,8 @@
113 model = "TSEC"; 113 model = "TSEC";
114 compatible = "gianfar"; 114 compatible = "gianfar";
115 reg = <25000 1000>; 115 reg = <25000 1000>;
116 local-mac-address = [ 00 E0 0C 00 73 01 ]; 116 local-mac-address = [ 00 00 00 00 00 00 ];
117 interrupts = <13 2 14 2 18 2>; 117 interrupts = <23 2 24 2 28 2>;
118 interrupt-parent = <&mpic>; 118 interrupt-parent = <&mpic>;
119 phy-handle = <&phy1>; 119 phy-handle = <&phy1>;
120 }; 120 };
@@ -124,7 +124,7 @@
124 compatible = "ns16550"; 124 compatible = "ns16550";
125 reg = <4500 100>; // reg base, size 125 reg = <4500 100>; // reg base, size
126 clock-frequency = <0>; // should we fill in in uboot? 126 clock-frequency = <0>; // should we fill in in uboot?
127 interrupts = <1a 2>; 127 interrupts = <2a 2>;
128 interrupt-parent = <&mpic>; 128 interrupt-parent = <&mpic>;
129 }; 129 };
130 130
@@ -133,7 +133,7 @@
133 compatible = "ns16550"; 133 compatible = "ns16550";
134 reg = <4600 100>; // reg base, size 134 reg = <4600 100>; // reg base, size
135 clock-frequency = <0>; // should we fill in in uboot? 135 clock-frequency = <0>; // should we fill in in uboot?
136 interrupts = <1a 2>; 136 interrupts = <2a 2>;
137 interrupt-parent = <&mpic>; 137 interrupt-parent = <&mpic>;
138 }; 138 };
139 139
@@ -142,49 +142,49 @@
142 interrupt-map = < 142 interrupt-map = <
143 143
144 /* IDSEL 0x10 */ 144 /* IDSEL 0x10 */
145 08000 0 0 1 &mpic 30 1 145 08000 0 0 1 &mpic 0 1
146 08000 0 0 2 &mpic 31 1 146 08000 0 0 2 &mpic 1 1
147 08000 0 0 3 &mpic 32 1 147 08000 0 0 3 &mpic 2 1
148 08000 0 0 4 &mpic 33 1 148 08000 0 0 4 &mpic 3 1
149 149
150 /* IDSEL 0x11 */ 150 /* IDSEL 0x11 */
151 08800 0 0 1 &mpic 30 1 151 08800 0 0 1 &mpic 0 1
152 08800 0 0 2 &mpic 31 1 152 08800 0 0 2 &mpic 1 1
153 08800 0 0 3 &mpic 32 1 153 08800 0 0 3 &mpic 2 1
154 08800 0 0 4 &mpic 33 1 154 08800 0 0 4 &mpic 3 1
155 155
156 /* IDSEL 0x12 (Slot 1) */ 156 /* IDSEL 0x12 (Slot 1) */
157 09000 0 0 1 &mpic 30 1 157 09000 0 0 1 &mpic 0 1
158 09000 0 0 2 &mpic 31 1 158 09000 0 0 2 &mpic 1 1
159 09000 0 0 3 &mpic 32 1 159 09000 0 0 3 &mpic 2 1
160 09000 0 0 4 &mpic 33 1 160 09000 0 0 4 &mpic 3 1
161 161
162 /* IDSEL 0x13 (Slot 2) */ 162 /* IDSEL 0x13 (Slot 2) */
163 09800 0 0 1 &mpic 31 1 163 09800 0 0 1 &mpic 1 1
164 09800 0 0 2 &mpic 32 1 164 09800 0 0 2 &mpic 2 1
165 09800 0 0 3 &mpic 33 1 165 09800 0 0 3 &mpic 3 1
166 09800 0 0 4 &mpic 30 1 166 09800 0 0 4 &mpic 0 1
167 167
168 /* IDSEL 0x14 (Slot 3) */ 168 /* IDSEL 0x14 (Slot 3) */
169 0a000 0 0 1 &mpic 32 1 169 0a000 0 0 1 &mpic 2 1
170 0a000 0 0 2 &mpic 33 1 170 0a000 0 0 2 &mpic 3 1
171 0a000 0 0 3 &mpic 30 1 171 0a000 0 0 3 &mpic 0 1
172 0a000 0 0 4 &mpic 31 1 172 0a000 0 0 4 &mpic 1 1
173 173
174 /* IDSEL 0x15 (Slot 4) */ 174 /* IDSEL 0x15 (Slot 4) */
175 0a800 0 0 1 &mpic 33 1 175 0a800 0 0 1 &mpic 3 1
176 0a800 0 0 2 &mpic 30 1 176 0a800 0 0 2 &mpic 0 1
177 0a800 0 0 3 &mpic 31 1 177 0a800 0 0 3 &mpic 1 1
178 0a800 0 0 4 &mpic 32 1 178 0a800 0 0 4 &mpic 2 1
179 179
180 /* Bus 1 (Tundra Bridge) */ 180 /* Bus 1 (Tundra Bridge) */
181 /* IDSEL 0x12 (ISA bridge) */ 181 /* IDSEL 0x12 (ISA bridge) */
182 19000 0 0 1 &mpic 30 1 182 19000 0 0 1 &mpic 0 1
183 19000 0 0 2 &mpic 31 1 183 19000 0 0 2 &mpic 1 1
184 19000 0 0 3 &mpic 32 1 184 19000 0 0 3 &mpic 2 1
185 19000 0 0 4 &mpic 33 1>; 185 19000 0 0 4 &mpic 3 1>;
186 interrupt-parent = <&mpic>; 186 interrupt-parent = <&mpic>;
187 interrupts = <08 2>; 187 interrupts = <18 2>;
188 bus-range = <0 0>; 188 bus-range = <0 0>;
189 ranges = <02000000 0 80000000 80000000 0 20000000 189 ranges = <02000000 0 80000000 80000000 0 20000000
190 01000000 0 00000000 e2000000 0 00100000>; 190 01000000 0 00000000 e2000000 0 00100000>;
@@ -216,12 +216,12 @@
216 interrupt-map = < 216 interrupt-map = <
217 217
218 /* IDSEL 0x15 */ 218 /* IDSEL 0x15 */
219 a800 0 0 1 &mpic 3b 1 219 a800 0 0 1 &mpic b 1
220 a800 0 0 2 &mpic 3b 1 220 a800 0 0 2 &mpic b 1
221 a800 0 0 3 &mpic 3b 1 221 a800 0 0 3 &mpic b 1
222 a800 0 0 4 &mpic 3b 1>; 222 a800 0 0 4 &mpic b 1>;
223 interrupt-parent = <&mpic>; 223 interrupt-parent = <&mpic>;
224 interrupts = <09 2>; 224 interrupts = <19 2>;
225 bus-range = <0 0>; 225 bus-range = <0 0>;
226 ranges = <02000000 0 a0000000 a0000000 0 20000000 226 ranges = <02000000 0 a0000000 a0000000 0 20000000
227 01000000 0 00000000 e3000000 0 00100000>; 227 01000000 0 00000000 e3000000 0 00100000>;
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts
index 80682152b0cf..21ccaaa27993 100644
--- a/arch/powerpc/boot/dts/mpc8560ads.dts
+++ b/arch/powerpc/boot/dts/mpc8560ads.dts
@@ -52,7 +52,7 @@
52 compatible = "fsl,8540-memory-controller"; 52 compatible = "fsl,8540-memory-controller";
53 reg = <2000 1000>; 53 reg = <2000 1000>;
54 interrupt-parent = <&mpic>; 54 interrupt-parent = <&mpic>;
55 interrupts = <2 2>; 55 interrupts = <12 2>;
56 }; 56 };
57 57
58 l2-cache-controller@20000 { 58 l2-cache-controller@20000 {
@@ -61,7 +61,7 @@
61 cache-line-size = <20>; // 32 bytes 61 cache-line-size = <20>; // 32 bytes
62 cache-size = <40000>; // L2, 256K 62 cache-size = <40000>; // L2, 256K
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <0 2>; 64 interrupts = <10 2>;
65 }; 65 };
66 66
67 mdio@24520 { 67 mdio@24520 {
@@ -72,25 +72,25 @@
72 #size-cells = <0>; 72 #size-cells = <0>;
73 phy0: ethernet-phy@0 { 73 phy0: ethernet-phy@0 {
74 interrupt-parent = <&mpic>; 74 interrupt-parent = <&mpic>;
75 interrupts = <35 1>; 75 interrupts = <5 1>;
76 reg = <0>; 76 reg = <0>;
77 device_type = "ethernet-phy"; 77 device_type = "ethernet-phy";
78 }; 78 };
79 phy1: ethernet-phy@1 { 79 phy1: ethernet-phy@1 {
80 interrupt-parent = <&mpic>; 80 interrupt-parent = <&mpic>;
81 interrupts = <35 1>; 81 interrupts = <5 1>;
82 reg = <1>; 82 reg = <1>;
83 device_type = "ethernet-phy"; 83 device_type = "ethernet-phy";
84 }; 84 };
85 phy2: ethernet-phy@2 { 85 phy2: ethernet-phy@2 {
86 interrupt-parent = <&mpic>; 86 interrupt-parent = <&mpic>;
87 interrupts = <37 1>; 87 interrupts = <7 1>;
88 reg = <2>; 88 reg = <2>;
89 device_type = "ethernet-phy"; 89 device_type = "ethernet-phy";
90 }; 90 };
91 phy3: ethernet-phy@3 { 91 phy3: ethernet-phy@3 {
92 interrupt-parent = <&mpic>; 92 interrupt-parent = <&mpic>;
93 interrupts = <37 1>; 93 interrupts = <7 1>;
94 reg = <3>; 94 reg = <3>;
95 device_type = "ethernet-phy"; 95 device_type = "ethernet-phy";
96 }; 96 };
@@ -101,8 +101,14 @@
101 model = "TSEC"; 101 model = "TSEC";
102 compatible = "gianfar"; 102 compatible = "gianfar";
103 reg = <24000 1000>; 103 reg = <24000 1000>;
104 address = [ 00 00 0C 00 00 FD ]; 104 /*
105 interrupts = <d 2 e 2 12 2>; 105 * address is deprecated and will be removed
106 * in 2.6.25. Only recent versions of
107 * U-Boot support local-mac-address, however.
108 */
109 address = [ 00 00 00 00 00 00 ];
110 local-mac-address = [ 00 00 00 00 00 00 ];
111 interrupts = <1d 2 1e 2 22 2>;
106 interrupt-parent = <&mpic>; 112 interrupt-parent = <&mpic>;
107 phy-handle = <&phy0>; 113 phy-handle = <&phy0>;
108 }; 114 };
@@ -114,8 +120,14 @@
114 model = "TSEC"; 120 model = "TSEC";
115 compatible = "gianfar"; 121 compatible = "gianfar";
116 reg = <25000 1000>; 122 reg = <25000 1000>;
117 address = [ 00 00 0C 00 01 FD ]; 123 /*
118 interrupts = <13 2 14 2 18 2>; 124 * address is deprecated and will be removed
125 * in 2.6.25. Only recent versions of
126 * U-Boot support local-mac-address, however.
127 */
128 address = [ 00 00 00 00 00 00 ];
129 local-mac-address = [ 00 00 00 00 00 00 ];
130 interrupts = <23 2 24 2 28 2>;
119 interrupt-parent = <&mpic>; 131 interrupt-parent = <&mpic>;
120 phy-handle = <&phy1>; 132 phy-handle = <&phy1>;
121 }; 133 };
@@ -132,79 +144,79 @@
132 interrupt-map = < 144 interrupt-map = <
133 145
134 /* IDSEL 0x2 */ 146 /* IDSEL 0x2 */
135 1000 0 0 1 &mpic 31 1 147 1000 0 0 1 &mpic 1 1
136 1000 0 0 2 &mpic 32 1 148 1000 0 0 2 &mpic 2 1
137 1000 0 0 3 &mpic 33 1 149 1000 0 0 3 &mpic 3 1
138 1000 0 0 4 &mpic 34 1 150 1000 0 0 4 &mpic 4 1
139 151
140 /* IDSEL 0x3 */ 152 /* IDSEL 0x3 */
141 1800 0 0 1 &mpic 34 1 153 1800 0 0 1 &mpic 4 1
142 1800 0 0 2 &mpic 31 1 154 1800 0 0 2 &mpic 1 1
143 1800 0 0 3 &mpic 32 1 155 1800 0 0 3 &mpic 2 1
144 1800 0 0 4 &mpic 33 1 156 1800 0 0 4 &mpic 3 1
145 157
146 /* IDSEL 0x4 */ 158 /* IDSEL 0x4 */
147 2000 0 0 1 &mpic 33 1 159 2000 0 0 1 &mpic 3 1
148 2000 0 0 2 &mpic 34 1 160 2000 0 0 2 &mpic 4 1
149 2000 0 0 3 &mpic 31 1 161 2000 0 0 3 &mpic 1 1
150 2000 0 0 4 &mpic 32 1 162 2000 0 0 4 &mpic 2 1
151 163
152 /* IDSEL 0x5 */ 164 /* IDSEL 0x5 */
153 2800 0 0 1 &mpic 32 1 165 2800 0 0 1 &mpic 2 1
154 2800 0 0 2 &mpic 33 1 166 2800 0 0 2 &mpic 3 1
155 2800 0 0 3 &mpic 34 1 167 2800 0 0 3 &mpic 4 1
156 2800 0 0 4 &mpic 31 1 168 2800 0 0 4 &mpic 1 1
157 169
158 /* IDSEL 12 */ 170 /* IDSEL 12 */
159 6000 0 0 1 &mpic 31 1 171 6000 0 0 1 &mpic 1 1
160 6000 0 0 2 &mpic 32 1 172 6000 0 0 2 &mpic 2 1
161 6000 0 0 3 &mpic 33 1 173 6000 0 0 3 &mpic 3 1
162 6000 0 0 4 &mpic 34 1 174 6000 0 0 4 &mpic 4 1
163 175
164 /* IDSEL 13 */ 176 /* IDSEL 13 */
165 6800 0 0 1 &mpic 34 1 177 6800 0 0 1 &mpic 4 1
166 6800 0 0 2 &mpic 31 1 178 6800 0 0 2 &mpic 1 1
167 6800 0 0 3 &mpic 32 1 179 6800 0 0 3 &mpic 2 1
168 6800 0 0 4 &mpic 33 1 180 6800 0 0 4 &mpic 3 1
169 181
170 /* IDSEL 14*/ 182 /* IDSEL 14*/
171 7000 0 0 1 &mpic 33 1 183 7000 0 0 1 &mpic 3 1
172 7000 0 0 2 &mpic 34 1 184 7000 0 0 2 &mpic 4 1
173 7000 0 0 3 &mpic 31 1 185 7000 0 0 3 &mpic 1 1
174 7000 0 0 4 &mpic 32 1 186 7000 0 0 4 &mpic 2 1
175 187
176 /* IDSEL 15 */ 188 /* IDSEL 15 */
177 7800 0 0 1 &mpic 32 1 189 7800 0 0 1 &mpic 2 1
178 7800 0 0 2 &mpic 33 1 190 7800 0 0 2 &mpic 3 1
179 7800 0 0 3 &mpic 34 1 191 7800 0 0 3 &mpic 4 1
180 7800 0 0 4 &mpic 31 1 192 7800 0 0 4 &mpic 1 1
181 193
182 /* IDSEL 18 */ 194 /* IDSEL 18 */
183 9000 0 0 1 &mpic 31 1 195 9000 0 0 1 &mpic 1 1
184 9000 0 0 2 &mpic 32 1 196 9000 0 0 2 &mpic 2 1
185 9000 0 0 3 &mpic 33 1 197 9000 0 0 3 &mpic 3 1
186 9000 0 0 4 &mpic 34 1 198 9000 0 0 4 &mpic 4 1
187 199
188 /* IDSEL 19 */ 200 /* IDSEL 19 */
189 9800 0 0 1 &mpic 34 1 201 9800 0 0 1 &mpic 4 1
190 9800 0 0 2 &mpic 31 1 202 9800 0 0 2 &mpic 1 1
191 9800 0 0 3 &mpic 32 1 203 9800 0 0 3 &mpic 2 1
192 9800 0 0 4 &mpic 33 1 204 9800 0 0 4 &mpic 3 1
193 205
194 /* IDSEL 20 */ 206 /* IDSEL 20 */
195 a000 0 0 1 &mpic 33 1 207 a000 0 0 1 &mpic 3 1
196 a000 0 0 2 &mpic 34 1 208 a000 0 0 2 &mpic 4 1
197 a000 0 0 3 &mpic 31 1 209 a000 0 0 3 &mpic 1 1
198 a000 0 0 4 &mpic 32 1 210 a000 0 0 4 &mpic 2 1
199 211
200 /* IDSEL 21 */ 212 /* IDSEL 21 */
201 a800 0 0 1 &mpic 32 1 213 a800 0 0 1 &mpic 2 1
202 a800 0 0 2 &mpic 33 1 214 a800 0 0 2 &mpic 3 1
203 a800 0 0 3 &mpic 34 1 215 a800 0 0 3 &mpic 4 1
204 a800 0 0 4 &mpic 31 1>; 216 a800 0 0 4 &mpic 1 1>;
205 217
206 interrupt-parent = <&mpic>; 218 interrupt-parent = <&mpic>;
207 interrupts = <8 0>; 219 interrupts = <18 2>;
208 bus-range = <0 0>; 220 bus-range = <0 0>;
209 ranges = <02000000 0 80000000 80000000 0 20000000 221 ranges = <02000000 0 80000000 80000000 0 20000000
210 01000000 0 00000000 e2000000 0 01000000>; 222 01000000 0 00000000 e2000000 0 01000000>;
@@ -234,7 +246,7 @@
234 interrupt-controller; 246 interrupt-controller;
235 #address-cells = <0>; 247 #address-cells = <0>;
236 #interrupt-cells = <2>; 248 #interrupt-cells = <2>;
237 interrupts = <1e 0>; 249 interrupts = <2e 2>;
238 interrupt-parent = <&mpic>; 250 interrupt-parent = <&mpic>;
239 reg = <90c00 80>; 251 reg = <90c00 80>;
240 built-in; 252 built-in;
@@ -275,7 +287,13 @@
275 model = "FCC"; 287 model = "FCC";
276 device-id = <2>; 288 device-id = <2>;
277 reg = <91320 20 88500 100 913a0 30>; 289 reg = <91320 20 88500 100 913a0 30>;
278 mac-address = [ 00 00 0C 00 02 FD ]; 290 /*
291 * mac-address is deprecated and will be removed
292 * in 2.6.25. Only recent versions of
293 * U-Boot support local-mac-address, however.
294 */
295 mac-address = [ 00 00 00 00 00 00 ];
296 local-mac-address = [ 00 00 00 00 00 00 ];
279 clock-setup = <ff00ffff 250000>; 297 clock-setup = <ff00ffff 250000>;
280 rx-clock = <15>; 298 rx-clock = <15>;
281 tx-clock = <16>; 299 tx-clock = <16>;
@@ -290,7 +308,13 @@
290 model = "FCC"; 308 model = "FCC";
291 device-id = <3>; 309 device-id = <3>;
292 reg = <91340 20 88600 100 913d0 30>; 310 reg = <91340 20 88600 100 913d0 30>;
293 mac-address = [ 00 00 0C 00 03 FD ]; 311 /*
312 * mac-address is deprecated and will be removed
313 * in 2.6.25. Only recent versions of
314 * U-Boot support local-mac-address, however.
315 */
316 mac-address = [ 00 00 00 00 00 00 ];
317 local-mac-address = [ 00 00 00 00 00 00 ];
294 clock-setup = <ffff00ff 3700>; 318 clock-setup = <ffff00ff 3700>;
295 rx-clock = <17>; 319 rx-clock = <17>;
296 tx-clock = <18>; 320 tx-clock = <18>;
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
index a123ec9456bc..6bb18f2807a8 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -61,7 +61,7 @@
61 compatible = "fsl,8568-memory-controller"; 61 compatible = "fsl,8568-memory-controller";
62 reg = <2000 1000>; 62 reg = <2000 1000>;
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <2 2>; 64 interrupts = <12 2>;
65 }; 65 };
66 66
67 l2-cache-controller@20000 { 67 l2-cache-controller@20000 {
@@ -70,14 +70,14 @@
70 cache-line-size = <20>; // 32 bytes 70 cache-line-size = <20>; // 32 bytes
71 cache-size = <80000>; // L2, 512K 71 cache-size = <80000>; // L2, 512K
72 interrupt-parent = <&mpic>; 72 interrupt-parent = <&mpic>;
73 interrupts = <0 2>; 73 interrupts = <10 2>;
74 }; 74 };
75 75
76 i2c@3000 { 76 i2c@3000 {
77 device_type = "i2c"; 77 device_type = "i2c";
78 compatible = "fsl-i2c"; 78 compatible = "fsl-i2c";
79 reg = <3000 100>; 79 reg = <3000 100>;
80 interrupts = <1b 2>; 80 interrupts = <2b 2>;
81 interrupt-parent = <&mpic>; 81 interrupt-parent = <&mpic>;
82 dfsrr; 82 dfsrr;
83 }; 83 };
@@ -86,7 +86,7 @@
86 device_type = "i2c"; 86 device_type = "i2c";
87 compatible = "fsl-i2c"; 87 compatible = "fsl-i2c";
88 reg = <3100 100>; 88 reg = <3100 100>;
89 interrupts = <1b 2>; 89 interrupts = <2b 2>;
90 interrupt-parent = <&mpic>; 90 interrupt-parent = <&mpic>;
91 dfsrr; 91 dfsrr;
92 }; 92 };
@@ -99,25 +99,25 @@
99 reg = <24520 20>; 99 reg = <24520 20>;
100 phy0: ethernet-phy@0 { 100 phy0: ethernet-phy@0 {
101 interrupt-parent = <&mpic>; 101 interrupt-parent = <&mpic>;
102 interrupts = <31 1>; 102 interrupts = <1 1>;
103 reg = <0>; 103 reg = <0>;
104 device_type = "ethernet-phy"; 104 device_type = "ethernet-phy";
105 }; 105 };
106 phy1: ethernet-phy@1 { 106 phy1: ethernet-phy@1 {
107 interrupt-parent = <&mpic>; 107 interrupt-parent = <&mpic>;
108 interrupts = <32 1>; 108 interrupts = <2 1>;
109 reg = <1>; 109 reg = <1>;
110 device_type = "ethernet-phy"; 110 device_type = "ethernet-phy";
111 }; 111 };
112 phy2: ethernet-phy@2 { 112 phy2: ethernet-phy@2 {
113 interrupt-parent = <&mpic>; 113 interrupt-parent = <&mpic>;
114 interrupts = <31 1>; 114 interrupts = <1 1>;
115 reg = <2>; 115 reg = <2>;
116 device_type = "ethernet-phy"; 116 device_type = "ethernet-phy";
117 }; 117 };
118 phy3: ethernet-phy@3 { 118 phy3: ethernet-phy@3 {
119 interrupt-parent = <&mpic>; 119 interrupt-parent = <&mpic>;
120 interrupts = <32 1>; 120 interrupts = <2 1>;
121 reg = <3>; 121 reg = <3>;
122 device_type = "ethernet-phy"; 122 device_type = "ethernet-phy";
123 }; 123 };
@@ -130,8 +130,14 @@
130 model = "eTSEC"; 130 model = "eTSEC";
131 compatible = "gianfar"; 131 compatible = "gianfar";
132 reg = <24000 1000>; 132 reg = <24000 1000>;
133 /*
134 * mac-address is deprecated and will be removed
135 * in 2.6.25. Only recent versions of
136 * U-Boot support local-mac-address, however.
137 */
133 mac-address = [ 00 00 00 00 00 00 ]; 138 mac-address = [ 00 00 00 00 00 00 ];
134 interrupts = <d 2 e 2 12 2>; 139 local-mac-address = [ 00 00 00 00 00 00 ];
140 interrupts = <1d 2 1e 2 22 2>;
135 interrupt-parent = <&mpic>; 141 interrupt-parent = <&mpic>;
136 phy-handle = <&phy2>; 142 phy-handle = <&phy2>;
137 }; 143 };
@@ -143,8 +149,14 @@
143 model = "eTSEC"; 149 model = "eTSEC";
144 compatible = "gianfar"; 150 compatible = "gianfar";
145 reg = <25000 1000>; 151 reg = <25000 1000>;
146 mac-address = [ 00 00 00 00 00 00]; 152 /*
147 interrupts = <13 2 14 2 18 2>; 153 * mac-address is deprecated and will be removed
154 * in 2.6.25. Only recent versions of
155 * U-Boot support local-mac-address, however.
156 */
157 mac-address = [ 00 00 00 00 00 00 ];
158 local-mac-address = [ 00 00 00 00 00 00 ];
159 interrupts = <23 2 24 2 28 2>;
148 interrupt-parent = <&mpic>; 160 interrupt-parent = <&mpic>;
149 phy-handle = <&phy3>; 161 phy-handle = <&phy3>;
150 }; 162 };
@@ -154,7 +166,7 @@
154 compatible = "ns16550"; 166 compatible = "ns16550";
155 reg = <4500 100>; 167 reg = <4500 100>;
156 clock-frequency = <0>; 168 clock-frequency = <0>;
157 interrupts = <1a 2>; 169 interrupts = <2a 2>;
158 interrupt-parent = <&mpic>; 170 interrupt-parent = <&mpic>;
159 }; 171 };
160 172
@@ -163,7 +175,7 @@
163 compatible = "ns16550"; 175 compatible = "ns16550";
164 reg = <4600 100>; 176 reg = <4600 100>;
165 clock-frequency = <0>; 177 clock-frequency = <0>;
166 interrupts = <1a 2>; 178 interrupts = <2a 2>;
167 interrupt-parent = <&mpic>; 179 interrupt-parent = <&mpic>;
168 }; 180 };
169 181
@@ -172,7 +184,7 @@
172 model = "SEC2"; 184 model = "SEC2";
173 compatible = "talitos"; 185 compatible = "talitos";
174 reg = <30000 f000>; 186 reg = <30000 f000>;
175 interrupts = <1d 2>; 187 interrupts = <2d 2>;
176 interrupt-parent = <&mpic>; 188 interrupt-parent = <&mpic>;
177 num-channels = <4>; 189 num-channels = <4>;
178 channel-fifo-len = <18>; 190 channel-fifo-len = <18>;
@@ -300,7 +312,13 @@
300 reg = <2000 200>; 312 reg = <2000 200>;
301 interrupts = <20>; 313 interrupts = <20>;
302 interrupt-parent = <&qeic>; 314 interrupt-parent = <&qeic>;
303 mac-address = [ 00 04 9f 00 23 23 ]; 315 /*
316 * mac-address is deprecated and will be removed
317 * in 2.6.25. Only recent versions of
318 * U-Boot support local-mac-address, however.
319 */
320 mac-address = [ 00 00 00 00 00 00 ];
321 local-mac-address = [ 00 00 00 00 00 00 ];
304 rx-clock = <0>; 322 rx-clock = <0>;
305 tx-clock = <19>; 323 tx-clock = <19>;
306 phy-handle = <&qe_phy0>; 324 phy-handle = <&qe_phy0>;
@@ -316,7 +334,13 @@
316 reg = <3000 200>; 334 reg = <3000 200>;
317 interrupts = <21>; 335 interrupts = <21>;
318 interrupt-parent = <&qeic>; 336 interrupt-parent = <&qeic>;
319 mac-address = [ 00 11 22 33 44 55 ]; 337 /*
338 * mac-address is deprecated and will be removed
339 * in 2.6.25. Only recent versions of
340 * U-Boot support local-mac-address, however.
341 */
342 mac-address = [ 00 00 00 00 00 00 ];
343 local-mac-address = [ 00 00 00 00 00 00 ];
320 rx-clock = <0>; 344 rx-clock = <0>;
321 tx-clock = <14>; 345 tx-clock = <14>;
322 phy-handle = <&qe_phy1>; 346 phy-handle = <&qe_phy1>;
@@ -335,25 +359,25 @@
335 * gianfar's MDIO bus */ 359 * gianfar's MDIO bus */
336 qe_phy0: ethernet-phy@00 { 360 qe_phy0: ethernet-phy@00 {
337 interrupt-parent = <&mpic>; 361 interrupt-parent = <&mpic>;
338 interrupts = <31 1>; 362 interrupts = <1 1>;
339 reg = <0>; 363 reg = <0>;
340 device_type = "ethernet-phy"; 364 device_type = "ethernet-phy";
341 }; 365 };
342 qe_phy1: ethernet-phy@01 { 366 qe_phy1: ethernet-phy@01 {
343 interrupt-parent = <&mpic>; 367 interrupt-parent = <&mpic>;
344 interrupts = <32 1>; 368 interrupts = <2 1>;
345 reg = <1>; 369 reg = <1>;
346 device_type = "ethernet-phy"; 370 device_type = "ethernet-phy";
347 }; 371 };
348 qe_phy2: ethernet-phy@02 { 372 qe_phy2: ethernet-phy@02 {
349 interrupt-parent = <&mpic>; 373 interrupt-parent = <&mpic>;
350 interrupts = <31 1>; 374 interrupts = <1 1>;
351 reg = <2>; 375 reg = <2>;
352 device_type = "ethernet-phy"; 376 device_type = "ethernet-phy";
353 }; 377 };
354 qe_phy3: ethernet-phy@03 { 378 qe_phy3: ethernet-phy@03 {
355 interrupt-parent = <&mpic>; 379 interrupt-parent = <&mpic>;
356 interrupts = <32 1>; 380 interrupts = <2 1>;
357 reg = <3>; 381 reg = <3>;
358 device_type = "ethernet-phy"; 382 device_type = "ethernet-phy";
359 }; 383 };
@@ -367,7 +391,7 @@
367 reg = <80 80>; 391 reg = <80 80>;
368 built-in; 392 built-in;
369 big-endian; 393 big-endian;
370 interrupts = <1e 2 1e 2>; //high:30 low:30 394 interrupts = <2e 2 2e 2>; //high:30 low:30
371 interrupt-parent = <&mpic>; 395 interrupt-parent = <&mpic>;
372 }; 396 };
373 397
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index 260b264c869e..6a78a2b37c08 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -56,8 +56,12 @@
56 #size-cells = <1>; 56 #size-cells = <1>;
57 #interrupt-cells = <2>; 57 #interrupt-cells = <2>;
58 device_type = "soc"; 58 device_type = "soc";
59 ranges = <0 f8000000 00100000>; 59 ranges = <00001000 f8001000 000ff000
60 reg = <f8000000 00100000>; // CCSRBAR 1M 60 80000000 80000000 20000000
61 e2000000 e2000000 00100000
62 a0000000 a0000000 20000000
63 e3000000 e3000000 00100000>;
64 reg = <f8000000 00001000>; // CCSRBAR
61 bus-frequency = <0>; 65 bus-frequency = <0>;
62 66
63 i2c@3000 { 67 i2c@3000 {
@@ -86,25 +90,25 @@
86 reg = <24520 20>; 90 reg = <24520 20>;
87 phy0: ethernet-phy@0 { 91 phy0: ethernet-phy@0 {
88 interrupt-parent = <&mpic>; 92 interrupt-parent = <&mpic>;
89 interrupts = <4a 1>; 93 interrupts = <a 1>;
90 reg = <0>; 94 reg = <0>;
91 device_type = "ethernet-phy"; 95 device_type = "ethernet-phy";
92 }; 96 };
93 phy1: ethernet-phy@1 { 97 phy1: ethernet-phy@1 {
94 interrupt-parent = <&mpic>; 98 interrupt-parent = <&mpic>;
95 interrupts = <4a 1>; 99 interrupts = <a 1>;
96 reg = <1>; 100 reg = <1>;
97 device_type = "ethernet-phy"; 101 device_type = "ethernet-phy";
98 }; 102 };
99 phy2: ethernet-phy@2 { 103 phy2: ethernet-phy@2 {
100 interrupt-parent = <&mpic>; 104 interrupt-parent = <&mpic>;
101 interrupts = <4a 1>; 105 interrupts = <a 1>;
102 reg = <2>; 106 reg = <2>;
103 device_type = "ethernet-phy"; 107 device_type = "ethernet-phy";
104 }; 108 };
105 phy3: ethernet-phy@3 { 109 phy3: ethernet-phy@3 {
106 interrupt-parent = <&mpic>; 110 interrupt-parent = <&mpic>;
107 interrupts = <4a 1>; 111 interrupts = <a 1>;
108 reg = <3>; 112 reg = <3>;
109 device_type = "ethernet-phy"; 113 device_type = "ethernet-phy";
110 }; 114 };
@@ -117,10 +121,17 @@
117 model = "TSEC"; 121 model = "TSEC";
118 compatible = "gianfar"; 122 compatible = "gianfar";
119 reg = <24000 1000>; 123 reg = <24000 1000>;
120 mac-address = [ 00 E0 0C 00 73 00 ]; 124 /*
125 * mac-address is deprecated and will be removed
126 * in 2.6.25. Only recent versions of
127 * U-Boot support local-mac-address, however.
128 */
129 mac-address = [ 00 00 00 00 00 00 ];
130 local-mac-address = [ 00 00 00 00 00 00 ];
121 interrupts = <1d 2 1e 2 22 2>; 131 interrupts = <1d 2 1e 2 22 2>;
122 interrupt-parent = <&mpic>; 132 interrupt-parent = <&mpic>;
123 phy-handle = <&phy0>; 133 phy-handle = <&phy0>;
134 phy-connection-type = "rgmii-id";
124 }; 135 };
125 136
126 ethernet@25000 { 137 ethernet@25000 {
@@ -130,10 +141,17 @@
130 model = "TSEC"; 141 model = "TSEC";
131 compatible = "gianfar"; 142 compatible = "gianfar";
132 reg = <25000 1000>; 143 reg = <25000 1000>;
133 mac-address = [ 00 E0 0C 00 73 01 ]; 144 /*
145 * mac-address is deprecated and will be removed
146 * in 2.6.25. Only recent versions of
147 * U-Boot support local-mac-address, however.
148 */
149 mac-address = [ 00 00 00 00 00 00 ];
150 local-mac-address = [ 00 00 00 00 00 00 ];
134 interrupts = <23 2 24 2 28 2>; 151 interrupts = <23 2 24 2 28 2>;
135 interrupt-parent = <&mpic>; 152 interrupt-parent = <&mpic>;
136 phy-handle = <&phy1>; 153 phy-handle = <&phy1>;
154 phy-connection-type = "rgmii-id";
137 }; 155 };
138 156
139 ethernet@26000 { 157 ethernet@26000 {
@@ -143,10 +161,17 @@
143 model = "TSEC"; 161 model = "TSEC";
144 compatible = "gianfar"; 162 compatible = "gianfar";
145 reg = <26000 1000>; 163 reg = <26000 1000>;
146 mac-address = [ 00 E0 0C 00 02 FD ]; 164 /*
165 * mac-address is deprecated and will be removed
166 * in 2.6.25. Only recent versions of
167 * U-Boot support local-mac-address, however.
168 */
169 mac-address = [ 00 00 00 00 00 00 ];
170 local-mac-address = [ 00 00 00 00 00 00 ];
147 interrupts = <1F 2 20 2 21 2>; 171 interrupts = <1F 2 20 2 21 2>;
148 interrupt-parent = <&mpic>; 172 interrupt-parent = <&mpic>;
149 phy-handle = <&phy2>; 173 phy-handle = <&phy2>;
174 phy-connection-type = "rgmii-id";
150 }; 175 };
151 176
152 ethernet@27000 { 177 ethernet@27000 {
@@ -156,10 +181,17 @@
156 model = "TSEC"; 181 model = "TSEC";
157 compatible = "gianfar"; 182 compatible = "gianfar";
158 reg = <27000 1000>; 183 reg = <27000 1000>;
159 mac-address = [ 00 E0 0C 00 03 FD ]; 184 /*
185 * mac-address is deprecated and will be removed
186 * in 2.6.25. Only recent versions of
187 * U-Boot support local-mac-address, however.
188 */
189 mac-address = [ 00 00 00 00 00 00 ];
190 local-mac-address = [ 00 00 00 00 00 00 ];
160 interrupts = <25 2 26 2 27 2>; 191 interrupts = <25 2 26 2 27 2>;
161 interrupt-parent = <&mpic>; 192 interrupt-parent = <&mpic>;
162 phy-handle = <&phy3>; 193 phy-handle = <&phy3>;
194 phy-connection-type = "rgmii-id";
163 }; 195 };
164 serial@4500 { 196 serial@4500 {
165 device_type = "serial"; 197 device_type = "serial";
@@ -186,7 +218,7 @@
186 #size-cells = <2>; 218 #size-cells = <2>;
187 #address-cells = <3>; 219 #address-cells = <3>;
188 reg = <8000 1000>; 220 reg = <8000 1000>;
189 bus-range = <0 fe>; 221 bus-range = <0 ff>;
190 ranges = <02000000 0 80000000 80000000 0 20000000 222 ranges = <02000000 0 80000000 80000000 0 20000000
191 01000000 0 00000000 e2000000 0 00100000>; 223 01000000 0 00000000 e2000000 0 00100000>;
192 clock-frequency = <1fca055>; 224 clock-frequency = <1fca055>;
@@ -285,17 +317,84 @@
285 f800 0 0 3 &i8259 0 0 317 f800 0 0 3 &i8259 0 0
286 f800 0 0 4 &i8259 0 0 318 f800 0 0 4 &i8259 0 0
287 >; 319 >;
288 i8259: i8259@4d0 { 320 uli1575@0 {
289 clock-frequency = <0>; 321 reg = <0 0 0 0 0>;
290 interrupt-controller; 322 #size-cells = <2>;
291 device_type = "interrupt-controller"; 323 #address-cells = <3>;
292 #address-cells = <0>; 324 ranges = <02000000 0 80000000
293 #interrupt-cells = <2>; 325 02000000 0 80000000
294 built-in; 326 0 20000000
295 compatible = "chrp,iic"; 327 01000000 0 00000000
296 big-endian; 328 01000000 0 00000000
297 interrupts = <49 2>; 329 0 00100000>;
298 interrupt-parent = <&mpic>; 330
331 pci_bridge@0 {
332 reg = <0 0 0 0 0>;
333 #size-cells = <2>;
334 #address-cells = <3>;
335 ranges = <02000000 0 80000000
336 02000000 0 80000000
337 0 20000000
338 01000000 0 00000000
339 01000000 0 00000000
340 0 00100000>;
341
342 isa@1e {
343 device_type = "isa";
344 #interrupt-cells = <2>;
345 #size-cells = <1>;
346 #address-cells = <2>;
347 reg = <f000 0 0 0 0>;
348 ranges = <1 0 01000000 0 0
349 00001000>;
350 interrupt-parent = <&i8259>;
351
352 i8259: interrupt-controller@20 {
353 reg = <1 20 2
354 1 a0 2
355 1 4d0 2>;
356 clock-frequency = <0>;
357 interrupt-controller;
358 device_type = "interrupt-controller";
359 #address-cells = <0>;
360 #interrupt-cells = <2>;
361 built-in;
362 compatible = "chrp,iic";
363 interrupts = <9 2>;
364 interrupt-parent =
365 <&mpic>;
366 };
367
368 i8042@60 {
369 #size-cells = <0>;
370 #address-cells = <1>;
371 reg = <1 60 1 1 64 1>;
372 interrupts = <1 3 c 3>;
373 interrupt-parent =
374 <&i8259>;
375
376 keyboard@0 {
377 reg = <0>;
378 compatible = "pnpPNP,303";
379 };
380
381 mouse@1 {
382 reg = <1>;
383 compatible = "pnpPNP,f03";
384 };
385 };
386
387 rtc@70 {
388 compatible =
389 "pnpPNP,b00";
390 reg = <1 70 2>;
391 };
392
393 gpio@400 {
394 reg = <1 400 80>;
395 };
396 };
397 };
299 }; 398 };
300 399
301 }; 400 };
@@ -316,10 +415,10 @@
316 interrupt-map-mask = <f800 0 0 7>; 415 interrupt-map-mask = <f800 0 0 7>;
317 interrupt-map = < 416 interrupt-map = <
318 /* IDSEL 0x0 */ 417 /* IDSEL 0x0 */
319 0000 0 0 1 &mpic 44 1 418 0000 0 0 1 &mpic 4 1
320 0000 0 0 2 &mpic 45 1 419 0000 0 0 2 &mpic 5 1
321 0000 0 0 3 &mpic 46 1 420 0000 0 0 3 &mpic 6 1
322 0000 0 0 4 &mpic 47 1 421 0000 0 0 4 &mpic 7 1
323 >; 422 >;
324 }; 423 };
325 424
diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts
index c0d06fd12927..e5e7726ddb03 100644
--- a/arch/powerpc/boot/dts/mpc866ads.dts
+++ b/arch/powerpc/boot/dts/mpc866ads.dts
@@ -15,12 +15,10 @@
15 compatible = "mpc8xx"; 15 compatible = "mpc8xx";
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 linux,phandle = <100>;
19 18
20 cpus { 19 cpus {
21 #address-cells = <1>; 20 #address-cells = <1>;
22 #size-cells = <0>; 21 #size-cells = <0>;
23 linux,phandle = <200>;
24 22
25 PowerPC,866@0 { 23 PowerPC,866@0 {
26 device_type = "cpu"; 24 device_type = "cpu";
@@ -34,14 +32,12 @@
34 clock-frequency = <0>; 32 clock-frequency = <0>;
35 32-bit; 33 32-bit;
36 interrupts = <f 2>; // decrementer interrupt 34 interrupts = <f 2>; // decrementer interrupt
37 interrupt-parent = <ff000000>; 35 interrupt-parent = <&Mpc8xx_pic>;
38 linux,phandle = <201>;
39 }; 36 };
40 }; 37 };
41 38
42 memory { 39 memory {
43 device_type = "memory"; 40 device_type = "memory";
44 linux,phandle = <300>;
45 reg = <00000000 800000>; 41 reg = <00000000 800000>;
46 }; 42 };
47 43
@@ -57,11 +53,9 @@
57 device_type = "mdio"; 53 device_type = "mdio";
58 compatible = "fs_enet"; 54 compatible = "fs_enet";
59 reg = <e80 8>; 55 reg = <e80 8>;
60 linux,phandle = <e80>;
61 #address-cells = <1>; 56 #address-cells = <1>;
62 #size-cells = <0>; 57 #size-cells = <0>;
63 ethernet-phy@f { 58 phy: ethernet-phy@f {
64 linux,phandle = <e800f>;
65 reg = <f>; 59 reg = <f>;
66 device_type = "ethernet-phy"; 60 device_type = "ethernet-phy";
67 }; 61 };
@@ -75,12 +69,11 @@
75 reg = <e00 188>; 69 reg = <e00 188>;
76 mac-address = [ 00 00 0C 00 01 FD ]; 70 mac-address = [ 00 00 0C 00 01 FD ];
77 interrupts = <3 1>; 71 interrupts = <3 1>;
78 interrupt-parent = <ff000000>; 72 interrupt-parent = <&Mpc8xx_pic>;
79 phy-handle = <e800f>; 73 phy-handle = <&Phy>;
80 }; 74 };
81 75
82 pic@ff000000 { 76 mpc8xx_pic: pic@ff000000 {
83 linux,phandle = <ff000000>;
84 interrupt-controller; 77 interrupt-controller;
85 #address-cells = <0>; 78 #address-cells = <0>;
86 #interrupt-cells = <2>; 79 #interrupt-cells = <2>;
@@ -91,7 +84,6 @@
91 }; 84 };
92 85
93 cpm@ff000000 { 86 cpm@ff000000 {
94 linux,phandle = <ff000000>;
95 #address-cells = <1>; 87 #address-cells = <1>;
96 #size-cells = <1>; 88 #size-cells = <1>;
97 #interrupt-cells = <2>; 89 #interrupt-cells = <2>;
@@ -102,15 +94,14 @@
102 command-proc = <9c0>; 94 command-proc = <9c0>;
103 brg-frequency = <0>; 95 brg-frequency = <0>;
104 interrupts = <0 2>; // cpm error interrupt 96 interrupts = <0 2>; // cpm error interrupt
105 interrupt-parent = <930>; 97 interrupt-parent = <&Cpm_pic>;
106 98
107 pic@930 { 99 cpm_pic: pic@930 {
108 linux,phandle = <930>;
109 interrupt-controller; 100 interrupt-controller;
110 #address-cells = <0>; 101 #address-cells = <0>;
111 #interrupt-cells = <2>; 102 #interrupt-cells = <2>;
112 interrupts = <5 2 0 2>; 103 interrupts = <5 2 0 2>;
113 interrupt-parent = <ff000000>; 104 interrupt-parent = <&Mpc8xx_pic>;
114 reg = <930 20>; 105 reg = <930 20>;
115 built-in; 106 built-in;
116 device_type = "cpm-pic"; 107 device_type = "cpm-pic";
@@ -128,7 +119,7 @@
128 tx-clock = <1>; 119 tx-clock = <1>;
129 current-speed = <0>; 120 current-speed = <0>;
130 interrupts = <4 3>; 121 interrupts = <4 3>;
131 interrupt-parent = <930>; 122 interrupt-parent = <&Cpm_pic>;
132 }; 123 };
133 124
134 smc@a90 { 125 smc@a90 {
@@ -142,7 +133,7 @@
142 tx-clock = <2>; 133 tx-clock = <2>;
143 current-speed = <0>; 134 current-speed = <0>;
144 interrupts = <3 3>; 135 interrupts = <3 3>;
145 interrupt-parent = <930>; 136 interrupt-parent = <&Cpm_pic>;
146 }; 137 };
147 138
148 scc@a00 { 139 scc@a00 {
@@ -153,7 +144,7 @@
153 reg = <a00 18 3c00 80>; 144 reg = <a00 18 3c00 80>;
154 mac-address = [ 00 00 0C 00 03 FD ]; 145 mac-address = [ 00 00 0C 00 03 FD ];
155 interrupts = <1e 3>; 146 interrupts = <1e 3>;
156 interrupt-parent = <930>; 147 interrupt-parent = <&Cpm_pic>;
157 }; 148 };
158 }; 149 };
159 }; 150 };
diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts
index 110bf6170603..dc7ab9c80611 100644
--- a/arch/powerpc/boot/dts/mpc885ads.dts
+++ b/arch/powerpc/boot/dts/mpc885ads.dts
@@ -15,12 +15,10 @@
15 compatible = "mpc8xx"; 15 compatible = "mpc8xx";
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 linux,phandle = <100>;
19 18
20 cpus { 19 cpus {
21 #address-cells = <1>; 20 #address-cells = <1>;
22 #size-cells = <0>; 21 #size-cells = <0>;
23 linux,phandle = <200>;
24 22
25 PowerPC,885@0 { 23 PowerPC,885@0 {
26 device_type = "cpu"; 24 device_type = "cpu";
@@ -34,14 +32,12 @@
34 clock-frequency = <0>; 32 clock-frequency = <0>;
35 32-bit; 33 32-bit;
36 interrupts = <f 2>; // decrementer interrupt 34 interrupts = <f 2>; // decrementer interrupt
37 interrupt-parent = <ff000000>; 35 interrupt-parent = <&Mpc8xx_pic>;
38 linux,phandle = <201>;
39 }; 36 };
40 }; 37 };
41 38
42 memory { 39 memory {
43 device_type = "memory"; 40 device_type = "memory";
44 linux,phandle = <300>;
45 reg = <00000000 800000>; 41 reg = <00000000 800000>;
46 }; 42 };
47 43
@@ -57,21 +53,17 @@
57 device_type = "mdio"; 53 device_type = "mdio";
58 compatible = "fs_enet"; 54 compatible = "fs_enet";
59 reg = <e80 8>; 55 reg = <e80 8>;
60 linux,phandle = <e80>;
61 #address-cells = <1>; 56 #address-cells = <1>;
62 #size-cells = <0>; 57 #size-cells = <0>;
63 ethernet-phy@0 { 58 Phy0: ethernet-phy@0 {
64 linux,phandle = <e8000>;
65 reg = <0>; 59 reg = <0>;
66 device_type = "ethernet-phy"; 60 device_type = "ethernet-phy";
67 }; 61 };
68 ethernet-phy@1 { 62 Phy1: ethernet-phy@1 {
69 linux,phandle = <e8001>;
70 reg = <1>; 63 reg = <1>;
71 device_type = "ethernet-phy"; 64 device_type = "ethernet-phy";
72 }; 65 };
73 ethernet-phy@2 { 66 Phy2: ethernet-phy@2 {
74 linux,phandle = <e8002>;
75 reg = <2>; 67 reg = <2>;
76 device_type = "ethernet-phy"; 68 device_type = "ethernet-phy";
77 }; 69 };
@@ -85,8 +77,8 @@
85 reg = <e00 188>; 77 reg = <e00 188>;
86 mac-address = [ 00 00 0C 00 01 FD ]; 78 mac-address = [ 00 00 0C 00 01 FD ];
87 interrupts = <3 1>; 79 interrupts = <3 1>;
88 interrupt-parent = <ff000000>; 80 interrupt-parent = <&Mpc8xx_pic>;
89 phy-handle = <e8000>; 81 phy-handle = <&Phy1>;
90 }; 82 };
91 83
92 fec@1e00 { 84 fec@1e00 {
@@ -97,12 +89,11 @@
97 reg = <1e00 188>; 89 reg = <1e00 188>;
98 mac-address = [ 00 00 0C 00 02 FD ]; 90 mac-address = [ 00 00 0C 00 02 FD ];
99 interrupts = <7 1>; 91 interrupts = <7 1>;
100 interrupt-parent = <ff000000>; 92 interrupt-parent = <&Mpc8xx_pic>;
101 phy-handle = <e8001>; 93 phy-handle = <&Phy2>;
102 }; 94 };
103 95
104 pic@ff000000 { 96 Mpc8xx_pic: pic@ff000000 {
105 linux,phandle = <ff000000>;
106 interrupt-controller; 97 interrupt-controller;
107 #address-cells = <0>; 98 #address-cells = <0>;
108 #interrupt-cells = <2>; 99 #interrupt-cells = <2>;
@@ -112,8 +103,18 @@
112 compatible = "CPM"; 103 compatible = "CPM";
113 }; 104 };
114 105
106 pcmcia@0080 {
107 #address-cells = <3>;
108 #interrupt-cells = <1>;
109 #size-cells = <2>;
110 compatible = "fsl,pq-pcmcia";
111 device_type = "pcmcia";
112 reg = <80 80>;
113 interrupt-parent = <&Mpc8xx_pic>;
114 interrupts = <d 1>;
115 };
116
115 cpm@ff000000 { 117 cpm@ff000000 {
116 linux,phandle = <ff000000>;
117 #address-cells = <1>; 118 #address-cells = <1>;
118 #size-cells = <1>; 119 #size-cells = <1>;
119 #interrupt-cells = <2>; 120 #interrupt-cells = <2>;
@@ -124,15 +125,14 @@
124 command-proc = <9c0>; 125 command-proc = <9c0>;
125 brg-frequency = <0>; 126 brg-frequency = <0>;
126 interrupts = <0 2>; // cpm error interrupt 127 interrupts = <0 2>; // cpm error interrupt
127 interrupt-parent = <930>; 128 interrupt-parent = <&Cpm_pic>;
128 129
129 pic@930 { 130 Cpm_pic: pic@930 {
130 linux,phandle = <930>;
131 interrupt-controller; 131 interrupt-controller;
132 #address-cells = <0>; 132 #address-cells = <0>;
133 #interrupt-cells = <2>; 133 #interrupt-cells = <2>;
134 interrupts = <5 2 0 2>; 134 interrupts = <5 2 0 2>;
135 interrupt-parent = <ff000000>; 135 interrupt-parent = <&Mpc8xx_pic>;
136 reg = <930 20>; 136 reg = <930 20>;
137 built-in; 137 built-in;
138 device_type = "cpm-pic"; 138 device_type = "cpm-pic";
@@ -150,7 +150,7 @@
150 tx-clock = <1>; 150 tx-clock = <1>;
151 current-speed = <0>; 151 current-speed = <0>;
152 interrupts = <4 3>; 152 interrupts = <4 3>;
153 interrupt-parent = <930>; 153 interrupt-parent = <&Cpm_pic>;
154 }; 154 };
155 155
156 smc@a90 { 156 smc@a90 {
@@ -164,7 +164,7 @@
164 tx-clock = <2>; 164 tx-clock = <2>;
165 current-speed = <0>; 165 current-speed = <0>;
166 interrupts = <3 3>; 166 interrupts = <3 3>;
167 interrupt-parent = <930>; 167 interrupt-parent = <&Cpm_pic>;
168 }; 168 };
169 169
170 scc@a40 { 170 scc@a40 {
@@ -175,8 +175,8 @@
175 reg = <a40 18 3e00 80>; 175 reg = <a40 18 3e00 80>;
176 mac-address = [ 00 00 0C 00 03 FD ]; 176 mac-address = [ 00 00 0C 00 03 FD ];
177 interrupts = <1c 3>; 177 interrupts = <1c 3>;
178 interrupt-parent = <930>; 178 interrupt-parent = <&Cpm_pic>;
179 phy-handle = <e8002>; 179 phy-handle = <&Phy2>;
180 }; 180 };
181 }; 181 };
182 }; 182 };
diff --git a/arch/powerpc/boot/dts/prpmc2800.dts b/arch/powerpc/boot/dts/prpmc2800.dts
index 568965a022b9..699d0df574d5 100644
--- a/arch/powerpc/boot/dts/prpmc2800.dts
+++ b/arch/powerpc/boot/dts/prpmc2800.dts
@@ -309,7 +309,7 @@
309 }; 309 };
310 310
311 chosen { 311 chosen {
312 bootargs = "ip=on console=ttyMM0"; 312 bootargs = "ip=on";
313 linux,stdout-path = "/mv64x60@f1000000/mpsc@8000"; 313 linux,stdout-path = "/mv64x60@f1000000/mpsc@8000";
314 }; 314 };
315}; 315};
diff --git a/arch/powerpc/boot/dts/ps3.dts b/arch/powerpc/boot/dts/ps3.dts
new file mode 100644
index 000000000000..379ded282d5e
--- /dev/null
+++ b/arch/powerpc/boot/dts/ps3.dts
@@ -0,0 +1,68 @@
1/*
2 * PS3 Game Console device tree.
3 *
4 * Copyright (C) 2007 Sony Computer Entertainment Inc.
5 * Copyright 2007 Sony Corp.
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; version 2 of the License.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21/ {
22 model = "SonyPS3";
23 compatible = "sony,ps3";
24 #size-cells = <2>;
25 #address-cells = <2>;
26
27 chosen {
28 };
29
30 /*
31 * We'll get the size of the bootmem block from lv1 after startup,
32 * so we'll put a null entry here.
33 */
34
35 memory {
36 device_type = "memory";
37 reg = <0 0 0 0>;
38 };
39
40 /*
41 * The boot cpu is always zero for PS3.
42 *
43 * dtc expects a clock-frequency and timebase-frequency entries, so
44 * we'll put a null entries here. These will be initialized after
45 * startup with data from lv1.
46 *
47 * Seems the only way currently to indicate a processor has multiple
48 * threads is with an ibm,ppc-interrupt-server#s entry. We'll put one
49 * here so we can bring up both of ours. See smp_setup_cpu_maps().
50 */
51
52 cpus {
53 #size-cells = <0>;
54 #address-cells = <1>;
55
56 cpu@0 {
57 device_type = "cpu";
58 reg = <0>;
59 ibm,ppc-interrupt-server#s = <0 1>;
60 clock-frequency = <0>;
61 timebase-frequency = <0>;
62 i-cache-size = <8000>;
63 d-cache-size = <8000>;
64 i-cache-line-size = <80>;
65 d-cache-line-size = <80>;
66 };
67 };
68};
diff --git a/arch/powerpc/boot/ebony.c b/arch/powerpc/boot/ebony.c
index b1251ee7a102..75daedafd0a4 100644
--- a/arch/powerpc/boot/ebony.c
+++ b/arch/powerpc/boot/ebony.c
@@ -100,28 +100,13 @@ static void ebony_fixups(void)
100 ibm440gp_fixup_clocks(sysclk, 6 * 1843200); 100 ibm440gp_fixup_clocks(sysclk, 6 * 1843200);
101 ibm44x_fixup_memsize(); 101 ibm44x_fixup_memsize();
102 dt_fixup_mac_addresses(ebony_mac0, ebony_mac1); 102 dt_fixup_mac_addresses(ebony_mac0, ebony_mac1);
103} 103 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
104
105#define SPRN_DBCR0 0x134
106#define DBCR0_RST_SYSTEM 0x30000000
107
108static void ebony_exit(void)
109{
110 unsigned long tmp;
111
112 asm volatile (
113 "mfspr %0,%1\n"
114 "oris %0,%0,%2@h\n"
115 "mtspr %1,%0"
116 : "=&r"(tmp) : "i"(SPRN_DBCR0), "i"(DBCR0_RST_SYSTEM)
117 );
118
119} 104}
120 105
121void ebony_init(void *mac0, void *mac1) 106void ebony_init(void *mac0, void *mac1)
122{ 107{
123 platform_ops.fixups = ebony_fixups; 108 platform_ops.fixups = ebony_fixups;
124 platform_ops.exit = ebony_exit; 109 platform_ops.exit = ibm44x_dbcr_reset;
125 ebony_mac0 = mac0; 110 ebony_mac0 = mac0;
126 ebony_mac1 = mac1; 111 ebony_mac1 = mac1;
127 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 112 ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c
index 56b56a8d4b23..416dc3857bfe 100644
--- a/arch/powerpc/boot/main.c
+++ b/arch/powerpc/boot/main.c
@@ -36,8 +36,6 @@ struct addr_range {
36 unsigned long size; 36 unsigned long size;
37}; 37};
38 38
39typedef void (*kernel_entry_t)(unsigned long, unsigned long, void *);
40
41#undef DEBUG 39#undef DEBUG
42 40
43static struct addr_range prep_kernel(void) 41static struct addr_range prep_kernel(void)
diff --git a/arch/powerpc/boot/of.c b/arch/powerpc/boot/of.c
index d16ee3e3f868..385e08b83b7e 100644
--- a/arch/powerpc/boot/of.c
+++ b/arch/powerpc/boot/of.c
@@ -15,8 +15,7 @@
15#include "page.h" 15#include "page.h"
16#include "ops.h" 16#include "ops.h"
17 17
18typedef void *ihandle; 18#include "of.h"
19typedef void *phandle;
20 19
21extern char _end[]; 20extern char _end[];
22 21
@@ -25,154 +24,10 @@ extern char _end[];
25#define RAM_END (512<<20) /* Fixme: use OF */ 24#define RAM_END (512<<20) /* Fixme: use OF */
26#define ONE_MB 0x100000 25#define ONE_MB 0x100000
27 26
28int (*prom) (void *);
29 27
30 28
31static unsigned long claim_base; 29static unsigned long claim_base;
32 30
33static int call_prom(const char *service, int nargs, int nret, ...)
34{
35 int i;
36 struct prom_args {
37 const char *service;
38 int nargs;
39 int nret;
40 unsigned int args[12];
41 } args;
42 va_list list;
43
44 args.service = service;
45 args.nargs = nargs;
46 args.nret = nret;
47
48 va_start(list, nret);
49 for (i = 0; i < nargs; i++)
50 args.args[i] = va_arg(list, unsigned int);
51 va_end(list);
52
53 for (i = 0; i < nret; i++)
54 args.args[nargs+i] = 0;
55
56 if (prom(&args) < 0)
57 return -1;
58
59 return (nret > 0)? args.args[nargs]: 0;
60}
61
62static int call_prom_ret(const char *service, int nargs, int nret,
63 unsigned int *rets, ...)
64{
65 int i;
66 struct prom_args {
67 const char *service;
68 int nargs;
69 int nret;
70 unsigned int args[12];
71 } args;
72 va_list list;
73
74 args.service = service;
75 args.nargs = nargs;
76 args.nret = nret;
77
78 va_start(list, rets);
79 for (i = 0; i < nargs; i++)
80 args.args[i] = va_arg(list, unsigned int);
81 va_end(list);
82
83 for (i = 0; i < nret; i++)
84 args.args[nargs+i] = 0;
85
86 if (prom(&args) < 0)
87 return -1;
88
89 if (rets != (void *) 0)
90 for (i = 1; i < nret; ++i)
91 rets[i-1] = args.args[nargs+i];
92
93 return (nret > 0)? args.args[nargs]: 0;
94}
95
96/*
97 * Older OF's require that when claiming a specific range of addresses,
98 * we claim the physical space in the /memory node and the virtual
99 * space in the chosen mmu node, and then do a map operation to
100 * map virtual to physical.
101 */
102static int need_map = -1;
103static ihandle chosen_mmu;
104static phandle memory;
105
106/* returns true if s2 is a prefix of s1 */
107static int string_match(const char *s1, const char *s2)
108{
109 for (; *s2; ++s2)
110 if (*s1++ != *s2)
111 return 0;
112 return 1;
113}
114
115static int check_of_version(void)
116{
117 phandle oprom, chosen;
118 char version[64];
119
120 oprom = finddevice("/openprom");
121 if (oprom == (phandle) -1)
122 return 0;
123 if (getprop(oprom, "model", version, sizeof(version)) <= 0)
124 return 0;
125 version[sizeof(version)-1] = 0;
126 printf("OF version = '%s'\r\n", version);
127 if (!string_match(version, "Open Firmware, 1.")
128 && !string_match(version, "FirmWorks,3."))
129 return 0;
130 chosen = finddevice("/chosen");
131 if (chosen == (phandle) -1) {
132 chosen = finddevice("/chosen@0");
133 if (chosen == (phandle) -1) {
134 printf("no chosen\n");
135 return 0;
136 }
137 }
138 if (getprop(chosen, "mmu", &chosen_mmu, sizeof(chosen_mmu)) <= 0) {
139 printf("no mmu\n");
140 return 0;
141 }
142 memory = (ihandle) call_prom("open", 1, 1, "/memory");
143 if (memory == (ihandle) -1) {
144 memory = (ihandle) call_prom("open", 1, 1, "/memory@0");
145 if (memory == (ihandle) -1) {
146 printf("no memory node\n");
147 return 0;
148 }
149 }
150 printf("old OF detected\r\n");
151 return 1;
152}
153
154static void *claim(unsigned long virt, unsigned long size, unsigned long align)
155{
156 int ret;
157 unsigned int result;
158
159 if (need_map < 0)
160 need_map = check_of_version();
161 if (align || !need_map)
162 return (void *) call_prom("claim", 3, 1, virt, size, align);
163
164 ret = call_prom_ret("call-method", 5, 2, &result, "claim", memory,
165 align, size, virt);
166 if (ret != 0 || result == -1)
167 return (void *) -1;
168 ret = call_prom_ret("call-method", 5, 2, &result, "claim", chosen_mmu,
169 align, size, virt);
170 /* 0x12 == coherent + read/write */
171 ret = call_prom("call-method", 6, 1, "map", chosen_mmu,
172 0x12, size, virt, virt);
173 return (void *) virt;
174}
175
176static void *of_try_claim(unsigned long size) 31static void *of_try_claim(unsigned long size)
177{ 32{
178 unsigned long addr = 0; 33 unsigned long addr = 0;
@@ -184,7 +39,7 @@ static void *of_try_claim(unsigned long size)
184#ifdef DEBUG 39#ifdef DEBUG
185 printf(" trying: 0x%08lx\n\r", claim_base); 40 printf(" trying: 0x%08lx\n\r", claim_base);
186#endif 41#endif
187 addr = (unsigned long)claim(claim_base, size, 0); 42 addr = (unsigned long)of_claim(claim_base, size, 0);
188 if ((void *)addr != (void *)-1) 43 if ((void *)addr != (void *)-1)
189 break; 44 break;
190 } 45 }
@@ -208,64 +63,6 @@ static void of_image_hdr(const void *hdr)
208 } 63 }
209} 64}
210 65
211static void *of_vmlinux_alloc(unsigned long size)
212{
213 void *p = malloc(size);
214
215 if (!p)
216 fatal("Can't allocate memory for kernel image!\n\r");
217
218 return p;
219}
220
221static void of_exit(void)
222{
223 call_prom("exit", 0, 0);
224}
225
226/*
227 * OF device tree routines
228 */
229static void *of_finddevice(const char *name)
230{
231 return (phandle) call_prom("finddevice", 1, 1, name);
232}
233
234static int of_getprop(const void *phandle, const char *name, void *buf,
235 const int buflen)
236{
237 return call_prom("getprop", 4, 1, phandle, name, buf, buflen);
238}
239
240static int of_setprop(const void *phandle, const char *name, const void *buf,
241 const int buflen)
242{
243 return call_prom("setprop", 4, 1, phandle, name, buf, buflen);
244}
245
246/*
247 * OF console routines
248 */
249static void *of_stdout_handle;
250
251static int of_console_open(void)
252{
253 void *devp;
254
255 if (((devp = finddevice("/chosen")) != NULL)
256 && (getprop(devp, "stdout", &of_stdout_handle,
257 sizeof(of_stdout_handle))
258 == sizeof(of_stdout_handle)))
259 return 0;
260
261 return -1;
262}
263
264static void of_console_write(char *buf, int len)
265{
266 call_prom("write", 3, 1, of_stdout_handle, buf, len);
267}
268
269void platform_init(unsigned long a1, unsigned long a2, void *promptr) 66void platform_init(unsigned long a1, unsigned long a2, void *promptr)
270{ 67{
271 platform_ops.image_hdr = of_image_hdr; 68 platform_ops.image_hdr = of_image_hdr;
@@ -277,10 +74,9 @@ void platform_init(unsigned long a1, unsigned long a2, void *promptr)
277 dt_ops.getprop = of_getprop; 74 dt_ops.getprop = of_getprop;
278 dt_ops.setprop = of_setprop; 75 dt_ops.setprop = of_setprop;
279 76
280 console_ops.open = of_console_open; 77 of_console_init();
281 console_ops.write = of_console_write;
282 78
283 prom = (int (*)(void *))promptr; 79 of_init(promptr);
284 loader_info.promptr = promptr; 80 loader_info.promptr = promptr;
285 if (a1 && a2 && a2 != 0xdeadbeef) { 81 if (a1 && a2 && a2 != 0xdeadbeef) {
286 loader_info.initrd_addr = a1; 82 loader_info.initrd_addr = a1;
diff --git a/arch/powerpc/boot/of.h b/arch/powerpc/boot/of.h
new file mode 100644
index 000000000000..e4c68f7391c5
--- /dev/null
+++ b/arch/powerpc/boot/of.h
@@ -0,0 +1,21 @@
1#ifndef _PPC_BOOT_OF_H_
2#define _PPC_BOOT_OF_H_
3
4typedef void *phandle;
5typedef void *ihandle;
6
7void of_init(void *promptr);
8int of_call_prom(const char *service, int nargs, int nret, ...);
9void *of_claim(unsigned long virt, unsigned long size, unsigned long align);
10void *of_vmlinux_alloc(unsigned long size);
11void of_exit(void);
12void *of_finddevice(const char *name);
13int of_getprop(const void *phandle, const char *name, void *buf,
14 const int buflen);
15int of_setprop(const void *phandle, const char *name, const void *buf,
16 const int buflen);
17
18/* Console functions */
19void of_console_init(void);
20
21#endif /* _PPC_BOOT_OF_H_ */
diff --git a/arch/powerpc/boot/ofconsole.c b/arch/powerpc/boot/ofconsole.c
new file mode 100644
index 000000000000..ce0e02424453
--- /dev/null
+++ b/arch/powerpc/boot/ofconsole.c
@@ -0,0 +1,45 @@
1/*
2 * OF console routines
3 *
4 * Copyright (C) Paul Mackerras 1997.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11#include <stddef.h>
12#include "types.h"
13#include "elf.h"
14#include "string.h"
15#include "stdio.h"
16#include "page.h"
17#include "ops.h"
18
19#include "of.h"
20
21static void *of_stdout_handle;
22
23static int of_console_open(void)
24{
25 void *devp;
26
27 if (((devp = of_finddevice("/chosen")) != NULL)
28 && (of_getprop(devp, "stdout", &of_stdout_handle,
29 sizeof(of_stdout_handle))
30 == sizeof(of_stdout_handle)))
31 return 0;
32
33 return -1;
34}
35
36static void of_console_write(const char *buf, int len)
37{
38 of_call_prom("write", 3, 1, of_stdout_handle, buf, len);
39}
40
41void of_console_init(void)
42{
43 console_ops.open = of_console_open;
44 console_ops.write = of_console_write;
45}
diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c
new file mode 100644
index 000000000000..95b8fd69a403
--- /dev/null
+++ b/arch/powerpc/boot/oflib.c
@@ -0,0 +1,202 @@
1/*
2 * Copyright (C) Paul Mackerras 1997.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */
9#include <stddef.h>
10#include "types.h"
11#include "elf.h"
12#include "string.h"
13#include "stdio.h"
14#include "page.h"
15#include "ops.h"
16
17#include "of.h"
18
19static int (*prom) (void *);
20
21void of_init(void *promptr)
22{
23 prom = (int (*)(void *))promptr;
24}
25
26int of_call_prom(const char *service, int nargs, int nret, ...)
27{
28 int i;
29 struct prom_args {
30 const char *service;
31 int nargs;
32 int nret;
33 unsigned int args[12];
34 } args;
35 va_list list;
36
37 args.service = service;
38 args.nargs = nargs;
39 args.nret = nret;
40
41 va_start(list, nret);
42 for (i = 0; i < nargs; i++)
43 args.args[i] = va_arg(list, unsigned int);
44 va_end(list);
45
46 for (i = 0; i < nret; i++)
47 args.args[nargs+i] = 0;
48
49 if (prom(&args) < 0)
50 return -1;
51
52 return (nret > 0)? args.args[nargs]: 0;
53}
54
55static int of_call_prom_ret(const char *service, int nargs, int nret,
56 unsigned int *rets, ...)
57{
58 int i;
59 struct prom_args {
60 const char *service;
61 int nargs;
62 int nret;
63 unsigned int args[12];
64 } args;
65 va_list list;
66
67 args.service = service;
68 args.nargs = nargs;
69 args.nret = nret;
70
71 va_start(list, rets);
72 for (i = 0; i < nargs; i++)
73 args.args[i] = va_arg(list, unsigned int);
74 va_end(list);
75
76 for (i = 0; i < nret; i++)
77 args.args[nargs+i] = 0;
78
79 if (prom(&args) < 0)
80 return -1;
81
82 if (rets != (void *) 0)
83 for (i = 1; i < nret; ++i)
84 rets[i-1] = args.args[nargs+i];
85
86 return (nret > 0)? args.args[nargs]: 0;
87}
88
89/* returns true if s2 is a prefix of s1 */
90static int string_match(const char *s1, const char *s2)
91{
92 for (; *s2; ++s2)
93 if (*s1++ != *s2)
94 return 0;
95 return 1;
96}
97
98/*
99 * Older OF's require that when claiming a specific range of addresses,
100 * we claim the physical space in the /memory node and the virtual
101 * space in the chosen mmu node, and then do a map operation to
102 * map virtual to physical.
103 */
104static int need_map = -1;
105static ihandle chosen_mmu;
106static phandle memory;
107
108static int check_of_version(void)
109{
110 phandle oprom, chosen;
111 char version[64];
112
113 oprom = of_finddevice("/openprom");
114 if (oprom == (phandle) -1)
115 return 0;
116 if (of_getprop(oprom, "model", version, sizeof(version)) <= 0)
117 return 0;
118 version[sizeof(version)-1] = 0;
119 printf("OF version = '%s'\r\n", version);
120 if (!string_match(version, "Open Firmware, 1.")
121 && !string_match(version, "FirmWorks,3."))
122 return 0;
123 chosen = of_finddevice("/chosen");
124 if (chosen == (phandle) -1) {
125 chosen = of_finddevice("/chosen@0");
126 if (chosen == (phandle) -1) {
127 printf("no chosen\n");
128 return 0;
129 }
130 }
131 if (of_getprop(chosen, "mmu", &chosen_mmu, sizeof(chosen_mmu)) <= 0) {
132 printf("no mmu\n");
133 return 0;
134 }
135 memory = (ihandle) of_call_prom("open", 1, 1, "/memory");
136 if (memory == (ihandle) -1) {
137 memory = (ihandle) of_call_prom("open", 1, 1, "/memory@0");
138 if (memory == (ihandle) -1) {
139 printf("no memory node\n");
140 return 0;
141 }
142 }
143 printf("old OF detected\r\n");
144 return 1;
145}
146
147void *of_claim(unsigned long virt, unsigned long size, unsigned long align)
148{
149 int ret;
150 unsigned int result;
151
152 if (need_map < 0)
153 need_map = check_of_version();
154 if (align || !need_map)
155 return (void *) of_call_prom("claim", 3, 1, virt, size, align);
156
157 ret = of_call_prom_ret("call-method", 5, 2, &result, "claim", memory,
158 align, size, virt);
159 if (ret != 0 || result == -1)
160 return (void *) -1;
161 ret = of_call_prom_ret("call-method", 5, 2, &result, "claim", chosen_mmu,
162 align, size, virt);
163 /* 0x12 == coherent + read/write */
164 ret = of_call_prom("call-method", 6, 1, "map", chosen_mmu,
165 0x12, size, virt, virt);
166 return (void *) virt;
167}
168
169void *of_vmlinux_alloc(unsigned long size)
170{
171 void *p = malloc(size);
172
173 if (!p)
174 fatal("Can't allocate memory for kernel image!\n\r");
175
176 return p;
177}
178
179void of_exit(void)
180{
181 of_call_prom("exit", 0, 0);
182}
183
184/*
185 * OF device tree routines
186 */
187void *of_finddevice(const char *name)
188{
189 return (phandle) of_call_prom("finddevice", 1, 1, name);
190}
191
192int of_getprop(const void *phandle, const char *name, void *buf,
193 const int buflen)
194{
195 return of_call_prom("getprop", 4, 1, phandle, name, buf, buflen);
196}
197
198int of_setprop(const void *phandle, const char *name, const void *buf,
199 const int buflen)
200{
201 return of_call_prom("setprop", 4, 1, phandle, name, buf, buflen);
202}
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h
index 959124f3f9af..86077066cd7c 100644
--- a/arch/powerpc/boot/ops.h
+++ b/arch/powerpc/boot/ops.h
@@ -19,6 +19,8 @@
19#define MAX_PATH_LEN 256 19#define MAX_PATH_LEN 256
20#define MAX_PROP_LEN 256 /* What should this be? */ 20#define MAX_PROP_LEN 256 /* What should this be? */
21 21
22typedef void (*kernel_entry_t)(unsigned long r3, unsigned long r4, void *r5);
23
22/* Platform specific operations */ 24/* Platform specific operations */
23struct platform_ops { 25struct platform_ops {
24 void (*fixups)(void); 26 void (*fixups)(void);
@@ -51,7 +53,7 @@ extern struct dt_ops dt_ops;
51/* Console operations */ 53/* Console operations */
52struct console_ops { 54struct console_ops {
53 int (*open)(void); 55 int (*open)(void);
54 void (*write)(char *buf, int len); 56 void (*write)(const char *buf, int len);
55 void (*edit_cmdline)(char *buf, int len); 57 void (*edit_cmdline)(char *buf, int len);
56 void (*close)(void); 58 void (*close)(void);
57 void *data; 59 void *data;
diff --git a/arch/powerpc/boot/ps3-head.S b/arch/powerpc/boot/ps3-head.S
new file mode 100644
index 000000000000..a55c2735f759
--- /dev/null
+++ b/arch/powerpc/boot/ps3-head.S
@@ -0,0 +1,82 @@
1/*
2 * PS3 bootwrapper entry.
3 *
4 * Copyright (C) 2007 Sony Computer Entertainment Inc.
5 * Copyright 2007 Sony Corp.
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; version 2 of the License.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#include "ppc_asm.h"
22
23 .machine "ppc64"
24
25 .text
26
27/*
28 * __system_reset_overlay - The PS3 first stage entry.
29 *
30 * The bootwraper build script copies the 0x100 bytes at symbol
31 * __system_reset_overlay to offset 0x100 of the rom image.
32 *
33 * The PS3 has a single processor with two threads.
34 */
35
36 .globl __system_reset_overlay
37__system_reset_overlay:
38
39 /* Switch to 32-bit mode. */
40
41 mfmsr r9
42 clrldi r9,r9,1
43 mtmsrd r9
44 nop
45
46 /* Get thread number in r3 and branch. */
47
48 mfspr r3, 0x88
49 cntlzw. r3, r3
50 li r4, 0
51 li r5, 0
52 beq 1f
53
54 /* Secondary goes to __secondary_hold in kernel. */
55
56 li r4, 0x60
57 mtctr r4
58 bctr
59
60 /* Primary delays then goes to _zimage_start in wrapper. */
611:
62 or 31, 31, 31 /* db16cyc */
63 or 31, 31, 31 /* db16cyc */
64
65 lis r4, _zimage_start@ha
66 addi r4, r4, _zimage_start@l
67 mtctr r4
68 bctr
69
70/*
71 * __system_reset_kernel - Place holder for the kernel reset vector.
72 *
73 * The bootwrapper build script copies 0x100 bytes from offset 0x100
74 * of the rom image to the symbol __system_reset_kernel. At runtime
75 * the bootwrapper program copies the 0x100 bytes at __system_reset_kernel
76 * to ram address 0x100. This symbol must occupy 0x100 bytes.
77 */
78
79 .globl __system_reset_kernel
80__system_reset_kernel:
81
82 . = __system_reset_kernel + 0x100
diff --git a/arch/powerpc/boot/ps3-hvcall.S b/arch/powerpc/boot/ps3-hvcall.S
new file mode 100644
index 000000000000..585965f7e6a8
--- /dev/null
+++ b/arch/powerpc/boot/ps3-hvcall.S
@@ -0,0 +1,186 @@
1/*
2 * PS3 bootwrapper hvcalls.
3 *
4 * Copyright (C) 2007 Sony Computer Entertainment Inc.
5 * Copyright 2007 Sony Corp.
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; version 2 of the License.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#include "ppc_asm.h"
22
23 .machine "ppc64"
24
25/*
26 * The PS3 hypervisor uses a 64 bit "C" language calling convention.
27 * The routines here marshal arguments between the 32 bit wrapper
28 * program and the 64 bit hvcalls.
29 *
30 * wrapper lv1
31 * 32-bit (h,l) 64-bit
32 *
33 * 1: r3,r4 <-> r3
34 * 2: r5,r6 <-> r4
35 * 3: r7,r8 <-> r5
36 * 4: r9,r10 <-> r6
37 * 5: 8(r1),12(r1) <-> r7
38 * 6: 16(r1),20(r1) <-> r8
39 * 7: 24(r1),28(r1) <-> r9
40 * 8: 32(r1),36(r1) <-> r10
41 *
42 */
43
44.macro GLOBAL name
45 .section ".text"
46 .balign 4
47 .globl \name
48\name:
49.endm
50
51.macro NO_SUPPORT name
52 GLOBAL \name
53 b ps3_no_support
54.endm
55
56.macro HVCALL num
57 li r11, \num
58 .long 0x44000022
59 extsw r3, r3
60.endm
61
62.macro SAVE_LR offset=4
63 mflr r0
64 stw r0, \offset(r1)
65.endm
66
67.macro LOAD_LR offset=4
68 lwz r0, \offset(r1)
69 mtlr r0
70.endm
71
72.macro LOAD_64_REG target,high,low
73 sldi r11, \high, 32
74 or \target, r11, \low
75.endm
76
77.macro LOAD_64_STACK target,offset
78 ld \target, \offset(r1)
79.endm
80
81.macro LOAD_R3
82 LOAD_64_REG r3,r3,r4
83.endm
84
85.macro LOAD_R4
86 LOAD_64_REG r4,r5,r6
87.endm
88
89.macro LOAD_R5
90 LOAD_64_REG r5,r7,r8
91.endm
92
93.macro LOAD_R6
94 LOAD_64_REG r6,r9,r10
95.endm
96
97.macro LOAD_R7
98 LOAD_64_STACK r7,8
99.endm
100
101.macro LOAD_R8
102 LOAD_64_STACK r8,16
103.endm
104
105.macro LOAD_R9
106 LOAD_64_STACK r9,24
107.endm
108
109.macro LOAD_R10
110 LOAD_64_STACK r10,32
111.endm
112
113.macro LOAD_REGS_0
114 stwu 1,-16(1)
115 stw 3, 8(1)
116.endm
117
118.macro LOAD_REGS_5
119 LOAD_R3
120 LOAD_R4
121 LOAD_R5
122 LOAD_R6
123 LOAD_R7
124.endm
125
126.macro LOAD_REGS_6
127 LOAD_REGS_5
128 LOAD_R8
129.endm
130
131.macro LOAD_REGS_8
132 LOAD_REGS_6
133 LOAD_R9
134 LOAD_R10
135.endm
136
137.macro STORE_REGS_0_1
138 lwz r11, 8(r1)
139 std r4, 0(r11)
140 mr r4, r3
141 li r3, 0
142 addi r1,r1,16
143.endm
144
145.macro STORE_REGS_5_2
146 lwz r11, 16(r1)
147 std r4, 0(r11)
148 lwz r11, 24(r1)
149 std r5, 0(r11)
150.endm
151
152.macro STORE_REGS_6_1
153 lwz r11, 24(r1)
154 std r4, 0(r11)
155.endm
156
157GLOBAL lv1_get_logical_ppe_id
158 SAVE_LR
159 LOAD_REGS_0
160 HVCALL 69
161 STORE_REGS_0_1
162 LOAD_LR
163 blr
164
165GLOBAL lv1_get_logical_partition_id
166 SAVE_LR
167 LOAD_REGS_0
168 HVCALL 74
169 STORE_REGS_0_1
170 LOAD_LR
171 blr
172
173GLOBAL lv1_get_repository_node_value
174 SAVE_LR
175 LOAD_REGS_5
176 HVCALL 91
177 STORE_REGS_5_2
178 LOAD_LR
179 blr
180
181GLOBAL lv1_panic
182 SAVE_LR
183 LOAD_REGS_8
184 HVCALL 255
185 LOAD_LR
186 blr
diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c
new file mode 100644
index 000000000000..893d59339c26
--- /dev/null
+++ b/arch/powerpc/boot/ps3.c
@@ -0,0 +1,161 @@
1/*
2 * PS3 bootwrapper support.
3 *
4 * Copyright (C) 2007 Sony Computer Entertainment Inc.
5 * Copyright 2007 Sony Corp.
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; version 2 of the License.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#include <stdarg.h>
22#include <stddef.h>
23#include "types.h"
24#include "elf.h"
25#include "string.h"
26#include "stdio.h"
27#include "page.h"
28#include "ops.h"
29
30extern s64 lv1_panic(u64 in_1);
31extern s64 lv1_get_logical_partition_id(u64 *out_1);
32extern s64 lv1_get_logical_ppe_id(u64 *out_1);
33extern s64 lv1_get_repository_node_value(u64 in_1, u64 in_2, u64 in_3,
34 u64 in_4, u64 in_5, u64 *out_1, u64 *out_2);
35
36#ifdef DEBUG
37#define DBG(fmt...) printf(fmt)
38#else
39static inline int __attribute__ ((format (printf, 1, 2))) DBG(
40 const char *fmt, ...) {return 0;}
41#endif
42
43BSS_STACK(4096);
44
45/* A buffer that may be edited by tools operating on a zImage binary so as to
46 * edit the command line passed to vmlinux (by setting /chosen/bootargs).
47 * The buffer is put in it's own section so that tools may locate it easier.
48 */
49static char cmdline[COMMAND_LINE_SIZE]
50 __attribute__((__section__("__builtin_cmdline")));
51
52static void prep_cmdline(void *chosen)
53{
54 if (cmdline[0] == '\0')
55 getprop(chosen, "bootargs", cmdline, COMMAND_LINE_SIZE-1);
56 else
57 setprop_str(chosen, "bootargs", cmdline);
58
59 printf("cmdline: '%s'\n", cmdline);
60}
61
62static void ps3_console_write(const char *buf, int len)
63{
64}
65
66static void ps3_exit(void)
67{
68 printf("ps3_exit\n");
69
70 /* lv1_panic will shutdown the lpar. */
71
72 lv1_panic(0); /* zero = do not reboot */
73 while (1);
74}
75
76static int ps3_repository_read_rm_size(u64 *rm_size)
77{
78 s64 result;
79 u64 lpar_id;
80 u64 ppe_id;
81 u64 v2;
82
83 result = lv1_get_logical_partition_id(&lpar_id);
84
85 if (result)
86 return -1;
87
88 result = lv1_get_logical_ppe_id(&ppe_id);
89
90 if (result)
91 return -1;
92
93 /*
94 * n1: 0000000062690000 : ....bi..
95 * n2: 7075000000000000 : pu......
96 * n3: 0000000000000001 : ........
97 * n4: 726d5f73697a6500 : rm_size.
98 */
99
100 result = lv1_get_repository_node_value(lpar_id, 0x0000000062690000ULL,
101 0x7075000000000000ULL, ppe_id, 0x726d5f73697a6500ULL, rm_size,
102 &v2);
103
104 printf("%s:%d: ppe_id %lu \n", __func__, __LINE__,
105 (unsigned long)ppe_id);
106 printf("%s:%d: lpar_id %lu \n", __func__, __LINE__,
107 (unsigned long)lpar_id);
108 printf("%s:%d: rm_size %llxh \n", __func__, __LINE__, *rm_size);
109
110 return result ? -1 : 0;
111}
112
113void ps3_copy_vectors(void)
114{
115 extern char __system_reset_kernel[];
116
117 memcpy((void *)0x100, __system_reset_kernel, 0x100);
118 flush_cache((void *)0x100, 0x100);
119}
120
121void platform_init(void)
122{
123 extern char _end[];
124 extern char _dtb_start[];
125 extern char _initrd_start[];
126 extern char _initrd_end[];
127 const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */
128 void *chosen;
129 unsigned long ft_addr;
130 u64 rm_size;
131
132 console_ops.write = ps3_console_write;
133 platform_ops.exit = ps3_exit;
134
135 printf("\n-- PS3 bootwrapper --\n");
136
137 simple_alloc_init(_end, heapsize, 32, 64);
138 ft_init(_dtb_start, 0, 4);
139
140 chosen = finddevice("/chosen");
141
142 ps3_repository_read_rm_size(&rm_size);
143 dt_fixup_memory(0, rm_size);
144
145 if (_initrd_end > _initrd_start) {
146 setprop_val(chosen, "linux,initrd-start", (u32)(_initrd_start));
147 setprop_val(chosen, "linux,initrd-end", (u32)(_initrd_end));
148 }
149
150 prep_cmdline(chosen);
151
152 ft_addr = dt_ops.finalize();
153
154 ps3_copy_vectors();
155
156 printf(" flat tree at 0x%lx\n\r", ft_addr);
157
158 ((kernel_entry_t)0)(ft_addr, 0, NULL);
159
160 ps3_exit();
161}
diff --git a/arch/powerpc/boot/serial.c b/arch/powerpc/boot/serial.c
index 7fd32330a9a5..eaa0d3ae3518 100644
--- a/arch/powerpc/boot/serial.c
+++ b/arch/powerpc/boot/serial.c
@@ -27,7 +27,7 @@ static int serial_open(void)
27 return scdp->open(); 27 return scdp->open();
28} 28}
29 29
30static void serial_write(char *buf, int len) 30static void serial_write(const char *buf, int len)
31{ 31{
32 struct serial_console_data *scdp = console_ops.data; 32 struct serial_console_data *scdp = console_ops.data;
33 33
diff --git a/arch/powerpc/boot/stdio.c b/arch/powerpc/boot/stdio.c
index 0a9feeb98342..5b57800bbc67 100644
--- a/arch/powerpc/boot/stdio.c
+++ b/arch/powerpc/boot/stdio.c
@@ -190,7 +190,11 @@ int vsprintf(char *buf, const char *fmt, va_list args)
190 190
191 /* get the conversion qualifier */ 191 /* get the conversion qualifier */
192 qualifier = -1; 192 qualifier = -1;
193 if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt =='Z') { 193 if (*fmt == 'l' && *(fmt + 1) == 'l') {
194 qualifier = 'q';
195 fmt += 2;
196 } else if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L'
197 || *fmt == 'Z') {
194 qualifier = *fmt; 198 qualifier = *fmt;
195 ++fmt; 199 ++fmt;
196 } 200 }
@@ -281,6 +285,10 @@ int vsprintf(char *buf, const char *fmt, va_list args)
281 num = va_arg(args, unsigned long); 285 num = va_arg(args, unsigned long);
282 if (flags & SIGN) 286 if (flags & SIGN)
283 num = (signed long) num; 287 num = (signed long) num;
288 } else if (qualifier == 'q') {
289 num = va_arg(args, unsigned long long);
290 if (flags & SIGN)
291 num = (signed long long) num;
284 } else if (qualifier == 'Z') { 292 } else if (qualifier == 'Z') {
285 num = va_arg(args, size_t); 293 num = va_arg(args, size_t);
286 } else if (qualifier == 'h') { 294 } else if (qualifier == 'h') {
diff --git a/arch/powerpc/boot/types.h b/arch/powerpc/boot/types.h
index 79d26e708677..31393d17a9c1 100644
--- a/arch/powerpc/boot/types.h
+++ b/arch/powerpc/boot/types.h
@@ -7,6 +7,10 @@ typedef unsigned char u8;
7typedef unsigned short u16; 7typedef unsigned short u16;
8typedef unsigned int u32; 8typedef unsigned int u32;
9typedef unsigned long long u64; 9typedef unsigned long long u64;
10typedef signed char s8;
11typedef short s16;
12typedef int s32;
13typedef long long s64;
10 14
11#define min(x,y) ({ \ 15#define min(x,y) ({ \
12 typeof(x) _x = (x); \ 16 typeof(x) _x = (x); \
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 2ed8b8b3f0ec..65f685479175 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -129,7 +129,7 @@ case "$platform" in
129pmac|pseries|chrp) 129pmac|pseries|chrp)
130 platformo=$object/of.o 130 platformo=$object/of.o
131 ;; 131 ;;
132pmaccoff) 132coff)
133 platformo=$object/of.o 133 platformo=$object/of.o
134 lds=$object/zImage.coff.lds 134 lds=$object/zImage.coff.lds
135 ;; 135 ;;
@@ -144,6 +144,15 @@ miboot|uboot)
144cuboot*) 144cuboot*)
145 gzip= 145 gzip=
146 ;; 146 ;;
147ps3)
148 platformo="$object/ps3-head.o $object/ps3-hvcall.o $object/ps3.o"
149 lds=$object/zImage.ps3.lds
150 gzip=
151 ext=bin
152 objflags="-O binary --set-section-flags=.bss=contents,alloc,load,data"
153 ksection=.kernel:vmlinux.bin
154 isection=.kernel:initrd
155 ;;
147esac 156esac
148 157
149vmz="$tmpdir/`basename \"$kernel\"`.$ext" 158vmz="$tmpdir/`basename \"$kernel\"`.$ext"
@@ -220,7 +229,7 @@ case "$platform" in
220pseries|chrp) 229pseries|chrp)
221 $object/addnote "$ofile" 230 $object/addnote "$ofile"
222 ;; 231 ;;
223pmaccoff) 232coff)
224 ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile" 233 ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile"
225 $object/hack-coff "$ofile" 234 $object/hack-coff "$ofile"
226 ;; 235 ;;
@@ -239,4 +248,50 @@ treeboot*)
239 fi 248 fi
240 exit 0 249 exit 0
241 ;; 250 ;;
251ps3)
252 # The ps3's loader supports loading gzipped binary images from flash
253 # rom to addr zero. The loader enters the image at addr 0x100. A
254 # bootwrapper overlay is use to arrange for the kernel to be loaded
255 # to addr zero and to have a suitable bootwrapper entry at 0x100.
256 # To construct the rom image, 0x100 bytes from offset 0x100 in the
257 # kernel is copied to the bootwrapper symbol __system_reset_kernel.
258 # The 0x100 bytes at the bootwrapper symbol __system_reset_overlay is
259 # then copied to offset 0x100. At runtime the bootwrapper program
260 # copies the 0x100 bytes at __system_reset_kernel to addr 0x100.
261
262 system_reset_overlay=0x`${CROSS}nm "$ofile" \
263 | grep ' __system_reset_overlay$' \
264 | cut -d' ' -f1`
265 system_reset_overlay=`printf "%d" $system_reset_overlay`
266 system_reset_kernel=0x`${CROSS}nm "$ofile" \
267 | grep ' __system_reset_kernel$' \
268 | cut -d' ' -f1`
269 system_reset_kernel=`printf "%d" $system_reset_kernel`
270 overlay_dest="256"
271 overlay_size="256"
272
273 rm -f "$object/otheros.bld"
274
275 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin"
276
277 msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
278 skip=$overlay_dest seek=$system_reset_kernel \
279 count=$overlay_size bs=1 2>&1)
280
281 if [ $? -ne "0" ]; then
282 echo $msg
283 exit 1
284 fi
285
286 msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
287 skip=$system_reset_overlay seek=$overlay_dest \
288 count=$overlay_size bs=1 2>&1)
289
290 if [ $? -ne "0" ]; then
291 echo $msg
292 exit 2
293 fi
294
295 gzip --force -9 --stdout "$ofile.bin" > "$object/otheros.bld"
296 ;;
242esac 297esac
diff --git a/arch/powerpc/boot/zImage.ps3.lds.S b/arch/powerpc/boot/zImage.ps3.lds.S
new file mode 100644
index 000000000000..aaa469c1e60d
--- /dev/null
+++ b/arch/powerpc/boot/zImage.ps3.lds.S
@@ -0,0 +1,50 @@
1OUTPUT_ARCH(powerpc:common)
2ENTRY(_zimage_start)
3EXTERN(_zimage_start)
4SECTIONS
5{
6 _vmlinux_start = .;
7 .kernel:vmlinux.bin : { *(.kernel:vmlinux.bin) }
8 _vmlinux_end = .;
9
10 . = ALIGN(4096);
11 _dtb_start = .;
12 .kernel:dtb : { *(.kernel:dtb) }
13 _dtb_end = .;
14
15 . = ALIGN(4096);
16 _initrd_start = .;
17 .kernel:initrd : { *(.kernel:initrd) }
18 _initrd_end = .;
19
20 _start = .;
21 .text :
22 {
23 *(.text)
24 *(.fixup)
25 }
26 _etext = .;
27 . = ALIGN(4096);
28 .data :
29 {
30 *(.rodata*)
31 *(.data*)
32 *(.sdata*)
33 __got2_start = .;
34 *(.got2)
35 __got2_end = .;
36 }
37
38 . = ALIGN(4096);
39 _edata = .;
40
41 . = ALIGN(4096);
42 __bss_start = .;
43 .bss :
44 {
45 *(.sbss)
46 *(.bss)
47 }
48 . = ALIGN(4096);
49 _end = . ;
50}
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig
index 02c428affc8f..d9ac24e8de16 100644
--- a/arch/powerpc/configs/cell_defconfig
+++ b/arch/powerpc/configs/cell_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21-rc6 3# Linux kernel version: 2.6.22-rc6
4# Mon Apr 23 20:46:48 2007 4# Tue Jun 26 12:32:34 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -41,6 +41,7 @@ CONFIG_PPC_DCR=y
41CONFIG_PPC_OF_PLATFORM_PCI=y 41CONFIG_PPC_OF_PLATFORM_PCI=y
42CONFIG_ALTIVEC=y 42CONFIG_ALTIVEC=y
43CONFIG_PPC_STD_MMU=y 43CONFIG_PPC_STD_MMU=y
44CONFIG_PPC_MM_SLICES=y
44CONFIG_VIRT_CPU_ACCOUNTING=y 45CONFIG_VIRT_CPU_ACCOUNTING=y
45CONFIG_SMP=y 46CONFIG_SMP=y
46CONFIG_NR_CPUS=4 47CONFIG_NR_CPUS=4
@@ -69,6 +70,7 @@ CONFIG_SYSVIPC_SYSCTL=y
69# CONFIG_AUDIT is not set 70# CONFIG_AUDIT is not set
70CONFIG_IKCONFIG=y 71CONFIG_IKCONFIG=y
71CONFIG_IKCONFIG_PROC=y 72CONFIG_IKCONFIG_PROC=y
73CONFIG_LOG_BUF_SHIFT=15
72CONFIG_CPUSETS=y 74CONFIG_CPUSETS=y
73CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
@@ -87,14 +89,19 @@ CONFIG_BUG=y
87CONFIG_ELF_CORE=y 89CONFIG_ELF_CORE=y
88CONFIG_BASE_FULL=y 90CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y 91CONFIG_FUTEX=y
92CONFIG_ANON_INODES=y
90CONFIG_EPOLL=y 93CONFIG_EPOLL=y
94CONFIG_SIGNALFD=y
95CONFIG_TIMERFD=y
96CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 97CONFIG_SHMEM=y
92CONFIG_SLAB=y
93CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLAB=y
100# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set
94CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
95# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
96CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
97# CONFIG_SLOB is not set
98 105
99# 106#
100# Loadable module support 107# Loadable module support
@@ -163,9 +170,14 @@ CONFIG_SPU_FS=m
163CONFIG_SPU_BASE=y 170CONFIG_SPU_BASE=y
164CONFIG_CBE_RAS=y 171CONFIG_CBE_RAS=y
165CONFIG_CBE_THERM=m 172CONFIG_CBE_THERM=m
173CONFIG_CBE_CPUFREQ=m
174# CONFIG_PQ2ADS is not set
166CONFIG_PPC_NATIVE=y 175CONFIG_PPC_NATIVE=y
167CONFIG_UDBG_RTAS_CONSOLE=y 176CONFIG_UDBG_RTAS_CONSOLE=y
168CONFIG_PPC_UDBG_BEAT=y 177CONFIG_PPC_UDBG_BEAT=y
178CONFIG_MPIC=y
179# CONFIG_MPIC_WEIRD is not set
180# CONFIG_PPC_I8259 is not set
169# CONFIG_U3_DART is not set 181# CONFIG_U3_DART is not set
170CONFIG_PPC_RTAS=y 182CONFIG_PPC_RTAS=y
171# CONFIG_RTAS_ERROR_LOGGING is not set 183# CONFIG_RTAS_ERROR_LOGGING is not set
@@ -177,9 +189,23 @@ CONFIG_MMIO_NVRAM=y
177# CONFIG_PPC_970_NAP is not set 189# CONFIG_PPC_970_NAP is not set
178CONFIG_PPC_INDIRECT_IO=y 190CONFIG_PPC_INDIRECT_IO=y
179CONFIG_GENERIC_IOMAP=y 191CONFIG_GENERIC_IOMAP=y
180# CONFIG_CPU_FREQ_PMAC64 is not set 192CONFIG_CPU_FREQ=y
181# CONFIG_WANT_EARLY_SERIAL is not set 193CONFIG_CPU_FREQ_TABLE=y
182CONFIG_MPIC=y 194# CONFIG_CPU_FREQ_DEBUG is not set
195CONFIG_CPU_FREQ_STAT=y
196# CONFIG_CPU_FREQ_STAT_DETAILS is not set
197CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
198# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
199CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
200CONFIG_CPU_FREQ_GOV_POWERSAVE=y
201CONFIG_CPU_FREQ_GOV_USERSPACE=y
202CONFIG_CPU_FREQ_GOV_ONDEMAND=y
203CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
204
205#
206# CPU Frequency drivers
207#
208# CONFIG_CPM2 is not set
183 209
184# 210#
185# Kernel options 211# Kernel options
@@ -224,12 +250,14 @@ CONFIG_RESOURCES_64BIT=y
224CONFIG_ZONE_DMA_FLAG=1 250CONFIG_ZONE_DMA_FLAG=1
225CONFIG_ARCH_MEMORY_PROBE=y 251CONFIG_ARCH_MEMORY_PROBE=y
226CONFIG_NODES_SPAN_OTHER_NODES=y 252CONFIG_NODES_SPAN_OTHER_NODES=y
253CONFIG_PPC_HAS_HASH_64K=y
227CONFIG_PPC_64K_PAGES=y 254CONFIG_PPC_64K_PAGES=y
228CONFIG_SCHED_SMT=y 255CONFIG_SCHED_SMT=y
229CONFIG_PROC_DEVICETREE=y 256CONFIG_PROC_DEVICETREE=y
230# CONFIG_CMDLINE_BOOL is not set 257# CONFIG_CMDLINE_BOOL is not set
231# CONFIG_PM is not set 258# CONFIG_PM is not set
232CONFIG_SECCOMP=y 259CONFIG_SECCOMP=y
260# CONFIG_WANT_DEVICE_TREE is not set
233CONFIG_ISA_DMA_API=y 261CONFIG_ISA_DMA_API=y
234 262
235# 263#
@@ -237,22 +265,18 @@ CONFIG_ISA_DMA_API=y
237# 265#
238CONFIG_ZONE_DMA=y 266CONFIG_ZONE_DMA=y
239CONFIG_GENERIC_ISA_DMA=y 267CONFIG_GENERIC_ISA_DMA=y
240# CONFIG_MPIC_WEIRD is not set
241# CONFIG_PPC_I8259 is not set
242# CONFIG_PPC_INDIRECT_PCI is not set 268# CONFIG_PPC_INDIRECT_PCI is not set
243CONFIG_PCI=y 269CONFIG_PCI=y
244CONFIG_PCI_DOMAINS=y 270CONFIG_PCI_DOMAINS=y
245CONFIG_PCIEPORTBUS=y 271CONFIG_PCIEPORTBUS=y
272CONFIG_ARCH_SUPPORTS_MSI=y
273# CONFIG_PCI_MSI is not set
246# CONFIG_PCI_DEBUG is not set 274# CONFIG_PCI_DEBUG is not set
247 275
248# 276#
249# PCCARD (PCMCIA/CardBus) support 277# PCCARD (PCMCIA/CardBus) support
250# 278#
251# CONFIG_PCCARD is not set 279# CONFIG_PCCARD is not set
252
253#
254# PCI Hotplug Support
255#
256# CONFIG_HOTPLUG_PCI is not set 280# CONFIG_HOTPLUG_PCI is not set
257CONFIG_KERNEL_START=0xc000000000000000 281CONFIG_KERNEL_START=0xc000000000000000
258 282
@@ -264,7 +288,6 @@ CONFIG_NET=y
264# 288#
265# Networking options 289# Networking options
266# 290#
267# CONFIG_NETDEBUG is not set
268CONFIG_PACKET=y 291CONFIG_PACKET=y
269# CONFIG_PACKET_MMAP is not set 292# CONFIG_PACKET_MMAP is not set
270CONFIG_UNIX=y 293CONFIG_UNIX=y
@@ -300,14 +323,11 @@ CONFIG_INET_TCP_DIAG=y
300CONFIG_TCP_CONG_CUBIC=y 323CONFIG_TCP_CONG_CUBIC=y
301CONFIG_DEFAULT_TCP_CONG="cubic" 324CONFIG_DEFAULT_TCP_CONG="cubic"
302# CONFIG_TCP_MD5SIG is not set 325# CONFIG_TCP_MD5SIG is not set
303
304#
305# IP: Virtual Server Configuration
306#
307# CONFIG_IP_VS is not set 326# CONFIG_IP_VS is not set
308CONFIG_IPV6=y 327CONFIG_IPV6=y
309# CONFIG_IPV6_PRIVACY is not set 328# CONFIG_IPV6_PRIVACY is not set
310# CONFIG_IPV6_ROUTER_PREF is not set 329# CONFIG_IPV6_ROUTER_PREF is not set
330# CONFIG_IPV6_OPTIMISTIC_DAD is not set
311CONFIG_INET6_AH=m 331CONFIG_INET6_AH=m
312CONFIG_INET6_ESP=m 332CONFIG_INET6_ESP=m
313CONFIG_INET6_IPCOMP=m 333CONFIG_INET6_IPCOMP=m
@@ -332,6 +352,7 @@ CONFIG_NETFILTER_NETLINK=m
332CONFIG_NETFILTER_NETLINK_QUEUE=m 352CONFIG_NETFILTER_NETLINK_QUEUE=m
333CONFIG_NETFILTER_NETLINK_LOG=m 353CONFIG_NETFILTER_NETLINK_LOG=m
334# CONFIG_NF_CONNTRACK_ENABLED is not set 354# CONFIG_NF_CONNTRACK_ENABLED is not set
355# CONFIG_NF_CONNTRACK is not set
335CONFIG_NETFILTER_XTABLES=m 356CONFIG_NETFILTER_XTABLES=m
336CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 357CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
337CONFIG_NETFILTER_XT_TARGET_DSCP=m 358CONFIG_NETFILTER_XT_TARGET_DSCP=m
@@ -389,20 +410,8 @@ CONFIG_IP_NF_ARP_MANGLE=m
389# 410#
390# CONFIG_IP6_NF_QUEUE is not set 411# CONFIG_IP6_NF_QUEUE is not set
391# CONFIG_IP6_NF_IPTABLES is not set 412# CONFIG_IP6_NF_IPTABLES is not set
392
393#
394# DCCP Configuration (EXPERIMENTAL)
395#
396# CONFIG_IP_DCCP is not set 413# CONFIG_IP_DCCP is not set
397
398#
399# SCTP Configuration (EXPERIMENTAL)
400#
401# CONFIG_IP_SCTP is not set 414# CONFIG_IP_SCTP is not set
402
403#
404# TIPC Configuration (EXPERIMENTAL)
405#
406# CONFIG_TIPC is not set 415# CONFIG_TIPC is not set
407# CONFIG_ATM is not set 416# CONFIG_ATM is not set
408# CONFIG_BRIDGE is not set 417# CONFIG_BRIDGE is not set
@@ -429,7 +438,16 @@ CONFIG_NET_CLS_ROUTE=y
429# CONFIG_HAMRADIO is not set 438# CONFIG_HAMRADIO is not set
430# CONFIG_IRDA is not set 439# CONFIG_IRDA is not set
431# CONFIG_BT is not set 440# CONFIG_BT is not set
441# CONFIG_AF_RXRPC is not set
442
443#
444# Wireless
445#
446# CONFIG_CFG80211 is not set
447# CONFIG_WIRELESS_EXT is not set
448# CONFIG_MAC80211 is not set
432# CONFIG_IEEE80211 is not set 449# CONFIG_IEEE80211 is not set
450# CONFIG_RFKILL is not set
433 451
434# 452#
435# Device Drivers 453# Device Drivers
@@ -449,10 +467,6 @@ CONFIG_FW_LOADER=y
449# Connector - unified userspace <-> kernelspace linker 467# Connector - unified userspace <-> kernelspace linker
450# 468#
451# CONFIG_CONNECTOR is not set 469# CONFIG_CONNECTOR is not set
452
453#
454# Memory Technology Devices (MTD)
455#
456# CONFIG_MTD is not set 470# CONFIG_MTD is not set
457 471
458# 472#
@@ -489,12 +503,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
489# 503#
490# Misc devices 504# Misc devices
491# 505#
506# CONFIG_PHANTOM is not set
492# CONFIG_SGI_IOC4 is not set 507# CONFIG_SGI_IOC4 is not set
493# CONFIG_TIFM_CORE is not set 508# CONFIG_TIFM_CORE is not set
494 509# CONFIG_BLINK is not set
495#
496# ATA/ATAPI/MFM/RLL support
497#
498CONFIG_IDE=y 510CONFIG_IDE=y
499CONFIG_BLK_DEV_IDE=y 511CONFIG_BLK_DEV_IDE=y
500 512
@@ -509,6 +521,7 @@ CONFIG_IDEDISK_MULTI_MODE=y
509# CONFIG_BLK_DEV_IDEFLOPPY is not set 521# CONFIG_BLK_DEV_IDEFLOPPY is not set
510# CONFIG_BLK_DEV_IDESCSI is not set 522# CONFIG_BLK_DEV_IDESCSI is not set
511# CONFIG_IDE_TASK_IOCTL is not set 523# CONFIG_IDE_TASK_IOCTL is not set
524CONFIG_IDE_PROC_FS=y
512 525
513# 526#
514# IDE chipset support/bugfixes 527# IDE chipset support/bugfixes
@@ -516,6 +529,7 @@ CONFIG_IDEDISK_MULTI_MODE=y
516CONFIG_IDE_GENERIC=y 529CONFIG_IDE_GENERIC=y
517CONFIG_BLK_DEV_IDEPCI=y 530CONFIG_BLK_DEV_IDEPCI=y
518CONFIG_IDEPCI_SHARE_IRQ=y 531CONFIG_IDEPCI_SHARE_IRQ=y
532CONFIG_IDEPCI_PCIBUS_ORDER=y
519# CONFIG_BLK_DEV_OFFBOARD is not set 533# CONFIG_BLK_DEV_OFFBOARD is not set
520CONFIG_BLK_DEV_GENERIC=y 534CONFIG_BLK_DEV_GENERIC=y
521# CONFIG_BLK_DEV_OPTI621 is not set 535# CONFIG_BLK_DEV_OPTI621 is not set
@@ -580,6 +594,7 @@ CONFIG_CHR_DEV_SG=y
580# CONFIG_SCSI_CONSTANTS is not set 594# CONFIG_SCSI_CONSTANTS is not set
581# CONFIG_SCSI_LOGGING is not set 595# CONFIG_SCSI_LOGGING is not set
582# CONFIG_SCSI_SCAN_ASYNC is not set 596# CONFIG_SCSI_SCAN_ASYNC is not set
597CONFIG_SCSI_WAIT_SCAN=m
583 598
584# 599#
585# SCSI Transports 600# SCSI Transports
@@ -626,10 +641,6 @@ CONFIG_SCSI_SAS_ATTRS=y
626# CONFIG_SCSI_DC390T is not set 641# CONFIG_SCSI_DC390T is not set
627# CONFIG_SCSI_DEBUG is not set 642# CONFIG_SCSI_DEBUG is not set
628# CONFIG_SCSI_SRP is not set 643# CONFIG_SCSI_SRP is not set
629
630#
631# Serial ATA (prod) and Parallel ATA (experimental) drivers
632#
633CONFIG_ATA=y 644CONFIG_ATA=y
634# CONFIG_ATA_NONSTANDARD is not set 645# CONFIG_ATA_NONSTANDARD is not set
635# CONFIG_SATA_AHCI is not set 646# CONFIG_SATA_AHCI is not set
@@ -652,6 +663,7 @@ CONFIG_SATA_PROMISE=y
652# CONFIG_PATA_AMD is not set 663# CONFIG_PATA_AMD is not set
653# CONFIG_PATA_ARTOP is not set 664# CONFIG_PATA_ARTOP is not set
654# CONFIG_PATA_ATIIXP is not set 665# CONFIG_PATA_ATIIXP is not set
666# CONFIG_PATA_CMD640_PCI is not set
655# CONFIG_PATA_CMD64X is not set 667# CONFIG_PATA_CMD64X is not set
656# CONFIG_PATA_CS5520 is not set 668# CONFIG_PATA_CS5520 is not set
657# CONFIG_PATA_CS5530 is not set 669# CONFIG_PATA_CS5530 is not set
@@ -705,6 +717,7 @@ CONFIG_DM_MIRROR=m
705CONFIG_DM_ZERO=m 717CONFIG_DM_ZERO=m
706CONFIG_DM_MULTIPATH=m 718CONFIG_DM_MULTIPATH=m
707# CONFIG_DM_MULTIPATH_EMC is not set 719# CONFIG_DM_MULTIPATH_EMC is not set
720# CONFIG_DM_DELAY is not set
708 721
709# 722#
710# Fusion MPT device support 723# Fusion MPT device support
@@ -719,18 +732,14 @@ CONFIG_FUSION_MAX_SGE=128
719# 732#
720# IEEE 1394 (FireWire) support 733# IEEE 1394 (FireWire) support
721# 734#
735# CONFIG_FIREWIRE is not set
722# CONFIG_IEEE1394 is not set 736# CONFIG_IEEE1394 is not set
723 737
724# 738#
725# I2O device support 739# I2O device support
726# 740#
727# CONFIG_I2O is not set 741# CONFIG_I2O is not set
728 742# CONFIG_MACINTOSH_DRIVERS is not set
729#
730# Macintosh device drivers
731#
732# CONFIG_MAC_EMUMOUSEBTN is not set
733# CONFIG_WINDFARM is not set
734 743
735# 744#
736# Network device support 745# Network device support
@@ -740,15 +749,7 @@ CONFIG_NETDEVICES=y
740CONFIG_BONDING=m 749CONFIG_BONDING=m
741# CONFIG_EQUALIZER is not set 750# CONFIG_EQUALIZER is not set
742CONFIG_TUN=y 751CONFIG_TUN=y
743
744#
745# ARCnet devices
746#
747# CONFIG_ARCNET is not set 752# CONFIG_ARCNET is not set
748
749#
750# PHY device support
751#
752# CONFIG_PHYLIB is not set 753# CONFIG_PHYLIB is not set
753 754
754# 755#
@@ -767,10 +768,7 @@ CONFIG_MII=y
767# CONFIG_NET_TULIP is not set 768# CONFIG_NET_TULIP is not set
768# CONFIG_HP100 is not set 769# CONFIG_HP100 is not set
769# CONFIG_NET_PCI is not set 770# CONFIG_NET_PCI is not set
770 771CONFIG_NETDEV_1000=y
771#
772# Ethernet (1000 Mbit)
773#
774# CONFIG_ACENIC is not set 772# CONFIG_ACENIC is not set
775# CONFIG_DL2K is not set 773# CONFIG_DL2K is not set
776CONFIG_E1000=m 774CONFIG_E1000=m
@@ -784,15 +782,13 @@ CONFIG_E1000_NAPI=y
784CONFIG_SKGE=m 782CONFIG_SKGE=m
785CONFIG_SKY2=m 783CONFIG_SKY2=m
786# CONFIG_SK98LIN is not set 784# CONFIG_SK98LIN is not set
785# CONFIG_VIA_VELOCITY is not set
787CONFIG_TIGON3=y 786CONFIG_TIGON3=y
788# CONFIG_BNX2 is not set 787# CONFIG_BNX2 is not set
789CONFIG_SPIDER_NET=y 788CONFIG_SPIDER_NET=y
790# CONFIG_QLA3XXX is not set 789# CONFIG_QLA3XXX is not set
791# CONFIG_ATL1 is not set 790# CONFIG_ATL1 is not set
792 791CONFIG_NETDEV_10000=y
793#
794# Ethernet (10000 Mbit)
795#
796# CONFIG_CHELSIO_T1 is not set 792# CONFIG_CHELSIO_T1 is not set
797# CONFIG_CHELSIO_T3 is not set 793# CONFIG_CHELSIO_T3 is not set
798# CONFIG_IXGB is not set 794# CONFIG_IXGB is not set
@@ -800,20 +796,24 @@ CONFIG_SPIDER_NET=y
800# CONFIG_MYRI10GE is not set 796# CONFIG_MYRI10GE is not set
801# CONFIG_NETXEN_NIC is not set 797# CONFIG_NETXEN_NIC is not set
802# CONFIG_PASEMI_MAC is not set 798# CONFIG_PASEMI_MAC is not set
803 799# CONFIG_MLX4_CORE is not set
804#
805# Token Ring devices
806#
807# CONFIG_TR is not set 800# CONFIG_TR is not set
808 801
809# 802#
810# Wireless LAN (non-hamradio) 803# Wireless LAN
811# 804#
812# CONFIG_NET_RADIO is not set 805# CONFIG_WLAN_PRE80211 is not set
806# CONFIG_WLAN_80211 is not set
813 807
814# 808#
815# Wan interfaces 809# USB Network Adapters
816# 810#
811# CONFIG_USB_CATC is not set
812# CONFIG_USB_KAWETH is not set
813# CONFIG_USB_PEGASUS is not set
814# CONFIG_USB_RTL8150 is not set
815# CONFIG_USB_USBNET_MII is not set
816# CONFIG_USB_USBNET is not set
817# CONFIG_WAN is not set 817# CONFIG_WAN is not set
818# CONFIG_FDDI is not set 818# CONFIG_FDDI is not set
819# CONFIG_HIPPI is not set 819# CONFIG_HIPPI is not set
@@ -840,6 +840,7 @@ CONFIG_SPIDER_NET=y
840# 840#
841CONFIG_INPUT=y 841CONFIG_INPUT=y
842# CONFIG_INPUT_FF_MEMLESS is not set 842# CONFIG_INPUT_FF_MEMLESS is not set
843# CONFIG_INPUT_POLLDEV is not set
843 844
844# 845#
845# Userland interfaces 846# Userland interfaces
@@ -859,6 +860,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
859# CONFIG_INPUT_KEYBOARD is not set 860# CONFIG_INPUT_KEYBOARD is not set
860# CONFIG_INPUT_MOUSE is not set 861# CONFIG_INPUT_MOUSE is not set
861# CONFIG_INPUT_JOYSTICK is not set 862# CONFIG_INPUT_JOYSTICK is not set
863# CONFIG_INPUT_TABLET is not set
862# CONFIG_INPUT_TOUCHSCREEN is not set 864# CONFIG_INPUT_TOUCHSCREEN is not set
863# CONFIG_INPUT_MISC is not set 865# CONFIG_INPUT_MISC is not set
864 866
@@ -933,10 +935,6 @@ CONFIG_IPMI_DEVICE_INTERFACE=m
933CONFIG_IPMI_SI=m 935CONFIG_IPMI_SI=m
934CONFIG_IPMI_WATCHDOG=m 936CONFIG_IPMI_WATCHDOG=m
935CONFIG_IPMI_POWEROFF=m 937CONFIG_IPMI_POWEROFF=m
936
937#
938# Watchdog Cards
939#
940CONFIG_WATCHDOG=y 938CONFIG_WATCHDOG=y
941# CONFIG_WATCHDOG_NOWAYOUT is not set 939# CONFIG_WATCHDOG_NOWAYOUT is not set
942 940
@@ -959,7 +957,6 @@ CONFIG_WATCHDOG=y
959# CONFIG_HW_RANDOM is not set 957# CONFIG_HW_RANDOM is not set
960CONFIG_GEN_RTC=y 958CONFIG_GEN_RTC=y
961# CONFIG_GEN_RTC_X is not set 959# CONFIG_GEN_RTC_X is not set
962# CONFIG_DTLK is not set
963# CONFIG_R3964 is not set 960# CONFIG_R3964 is not set
964# CONFIG_APPLICOM is not set 961# CONFIG_APPLICOM is not set
965# CONFIG_AGP is not set 962# CONFIG_AGP is not set
@@ -971,11 +968,9 @@ CONFIG_GEN_RTC=y
971# TPM devices 968# TPM devices
972# 969#
973# CONFIG_TCG_TPM is not set 970# CONFIG_TCG_TPM is not set
974 971CONFIG_DEVPORT=y
975#
976# I2C support
977#
978CONFIG_I2C=y 972CONFIG_I2C=y
973CONFIG_I2C_BOARDINFO=y
979# CONFIG_I2C_CHARDEV is not set 974# CONFIG_I2C_CHARDEV is not set
980 975
981# 976#
@@ -999,17 +994,17 @@ CONFIG_I2C_ALGOBIT=y
999# CONFIG_I2C_NFORCE2 is not set 994# CONFIG_I2C_NFORCE2 is not set
1000# CONFIG_I2C_OCORES is not set 995# CONFIG_I2C_OCORES is not set
1001# CONFIG_I2C_PARPORT_LIGHT is not set 996# CONFIG_I2C_PARPORT_LIGHT is not set
1002# CONFIG_I2C_PASEMI is not set
1003# CONFIG_I2C_PROSAVAGE is not set 997# CONFIG_I2C_PROSAVAGE is not set
1004# CONFIG_I2C_SAVAGE4 is not set 998# CONFIG_I2C_SAVAGE4 is not set
999# CONFIG_I2C_SIMTEC is not set
1005# CONFIG_I2C_SIS5595 is not set 1000# CONFIG_I2C_SIS5595 is not set
1006# CONFIG_I2C_SIS630 is not set 1001# CONFIG_I2C_SIS630 is not set
1007# CONFIG_I2C_SIS96X is not set 1002# CONFIG_I2C_SIS96X is not set
1008# CONFIG_I2C_STUB is not set 1003# CONFIG_I2C_STUB is not set
1004# CONFIG_I2C_TINY_USB is not set
1009# CONFIG_I2C_VIA is not set 1005# CONFIG_I2C_VIA is not set
1010# CONFIG_I2C_VIAPRO is not set 1006# CONFIG_I2C_VIAPRO is not set
1011# CONFIG_I2C_VOODOO3 is not set 1007# CONFIG_I2C_VOODOO3 is not set
1012# CONFIG_I2C_PCA_ISA is not set
1013 1008
1014# 1009#
1015# Miscellaneous I2C Chip support 1010# Miscellaneous I2C Chip support
@@ -1036,12 +1031,7 @@ CONFIG_I2C_ALGOBIT=y
1036# Dallas's 1-wire bus 1031# Dallas's 1-wire bus
1037# 1032#
1038# CONFIG_W1 is not set 1033# CONFIG_W1 is not set
1039
1040#
1041# Hardware Monitoring support
1042#
1043# CONFIG_HWMON is not set 1034# CONFIG_HWMON is not set
1044# CONFIG_HWMON_VID is not set
1045 1035
1046# 1036#
1047# Multifunction device drivers 1037# Multifunction device drivers
@@ -1052,17 +1042,19 @@ CONFIG_I2C_ALGOBIT=y
1052# Multimedia devices 1042# Multimedia devices
1053# 1043#
1054# CONFIG_VIDEO_DEV is not set 1044# CONFIG_VIDEO_DEV is not set
1045# CONFIG_DVB_CORE is not set
1046# CONFIG_DAB is not set
1055 1047
1056# 1048#
1057# Digital Video Broadcasting Devices 1049# Graphics support
1058# 1050#
1059# CONFIG_DVB is not set 1051# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1060# CONFIG_USB_DABUSB is not set
1061 1052
1062# 1053#
1063# Graphics support 1054# Display device support
1064# 1055#
1065# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 1056# CONFIG_DISPLAY_SUPPORT is not set
1057# CONFIG_VGASTATE is not set
1066# CONFIG_FB is not set 1058# CONFIG_FB is not set
1067# CONFIG_FB_IBM_GXT4500 is not set 1059# CONFIG_FB_IBM_GXT4500 is not set
1068 1060
@@ -1084,6 +1076,17 @@ CONFIG_HID=m
1084# CONFIG_HID_DEBUG is not set 1076# CONFIG_HID_DEBUG is not set
1085 1077
1086# 1078#
1079# USB Input Devices
1080#
1081# CONFIG_USB_HID is not set
1082
1083#
1084# USB HID Boot Protocol drivers
1085#
1086# CONFIG_USB_KBD is not set
1087# CONFIG_USB_MOUSE is not set
1088
1089#
1087# USB support 1090# USB support
1088# 1091#
1089CONFIG_USB_ARCH_HAS_HCD=y 1092CONFIG_USB_ARCH_HAS_HCD=y
@@ -1096,6 +1099,7 @@ CONFIG_USB=m
1096# Miscellaneous USB options 1099# Miscellaneous USB options
1097# 1100#
1098CONFIG_USB_DEVICEFS=y 1101CONFIG_USB_DEVICEFS=y
1102CONFIG_USB_DEVICE_CLASS=y
1099# CONFIG_USB_DYNAMIC_MINORS is not set 1103# CONFIG_USB_DYNAMIC_MINORS is not set
1100# CONFIG_USB_OTG is not set 1104# CONFIG_USB_OTG is not set
1101 1105
@@ -1147,44 +1151,10 @@ CONFIG_USB_STORAGE=m
1147# CONFIG_USB_LIBUSUAL is not set 1151# CONFIG_USB_LIBUSUAL is not set
1148 1152
1149# 1153#
1150# USB Input Devices
1151#
1152# CONFIG_USB_HID is not set
1153
1154#
1155# USB HID Boot Protocol drivers
1156#
1157# CONFIG_USB_KBD is not set
1158# CONFIG_USB_MOUSE is not set
1159# CONFIG_USB_AIPTEK is not set
1160# CONFIG_USB_WACOM is not set
1161# CONFIG_USB_ACECAD is not set
1162# CONFIG_USB_KBTAB is not set
1163# CONFIG_USB_POWERMATE is not set
1164# CONFIG_USB_TOUCHSCREEN is not set
1165# CONFIG_USB_YEALINK is not set
1166# CONFIG_USB_XPAD is not set
1167# CONFIG_USB_ATI_REMOTE is not set
1168# CONFIG_USB_ATI_REMOTE2 is not set
1169# CONFIG_USB_KEYSPAN_REMOTE is not set
1170# CONFIG_USB_APPLETOUCH is not set
1171# CONFIG_USB_GTCO is not set
1172
1173#
1174# USB Imaging devices 1154# USB Imaging devices
1175# 1155#
1176# CONFIG_USB_MDC800 is not set 1156# CONFIG_USB_MDC800 is not set
1177# CONFIG_USB_MICROTEK is not set 1157# CONFIG_USB_MICROTEK is not set
1178
1179#
1180# USB Network Adapters
1181#
1182# CONFIG_USB_CATC is not set
1183# CONFIG_USB_KAWETH is not set
1184# CONFIG_USB_PEGASUS is not set
1185# CONFIG_USB_RTL8150 is not set
1186# CONFIG_USB_USBNET_MII is not set
1187# CONFIG_USB_USBNET is not set
1188CONFIG_USB_MON=y 1158CONFIG_USB_MON=y
1189 1159
1190# 1160#
@@ -1228,10 +1198,6 @@ CONFIG_USB_MON=y
1228# USB Gadget Support 1198# USB Gadget Support
1229# 1199#
1230# CONFIG_USB_GADGET is not set 1200# CONFIG_USB_GADGET is not set
1231
1232#
1233# MMC/SD Card support
1234#
1235# CONFIG_MMC is not set 1201# CONFIG_MMC is not set
1236 1202
1237# 1203#
@@ -1253,10 +1219,12 @@ CONFIG_USB_MON=y
1253CONFIG_INFINIBAND=m 1219CONFIG_INFINIBAND=m
1254CONFIG_INFINIBAND_USER_MAD=m 1220CONFIG_INFINIBAND_USER_MAD=m
1255CONFIG_INFINIBAND_USER_ACCESS=m 1221CONFIG_INFINIBAND_USER_ACCESS=m
1222CONFIG_INFINIBAND_USER_MEM=y
1256CONFIG_INFINIBAND_ADDR_TRANS=y 1223CONFIG_INFINIBAND_ADDR_TRANS=y
1257CONFIG_INFINIBAND_MTHCA=m 1224CONFIG_INFINIBAND_MTHCA=m
1258CONFIG_INFINIBAND_MTHCA_DEBUG=y 1225CONFIG_INFINIBAND_MTHCA_DEBUG=y
1259# CONFIG_INFINIBAND_AMSO1100 is not set 1226# CONFIG_INFINIBAND_AMSO1100 is not set
1227# CONFIG_MLX4_INFINIBAND is not set
1260CONFIG_INFINIBAND_IPOIB=m 1228CONFIG_INFINIBAND_IPOIB=m
1261# CONFIG_INFINIBAND_IPOIB_CM is not set 1229# CONFIG_INFINIBAND_IPOIB_CM is not set
1262CONFIG_INFINIBAND_IPOIB_DEBUG=y 1230CONFIG_INFINIBAND_IPOIB_DEBUG=y
@@ -1287,14 +1255,6 @@ CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y
1287# 1255#
1288 1256
1289# 1257#
1290# Auxiliary Display support
1291#
1292
1293#
1294# Virtualization
1295#
1296
1297#
1298# File systems 1258# File systems
1299# 1259#
1300CONFIG_EXT2_FS=y 1260CONFIG_EXT2_FS=y
@@ -1389,6 +1349,7 @@ CONFIG_LOCKD_V4=y
1389CONFIG_NFS_ACL_SUPPORT=y 1349CONFIG_NFS_ACL_SUPPORT=y
1390CONFIG_NFS_COMMON=y 1350CONFIG_NFS_COMMON=y
1391CONFIG_SUNRPC=y 1351CONFIG_SUNRPC=y
1352# CONFIG_SUNRPC_BIND34 is not set
1392# CONFIG_RPCSEC_GSS_KRB5 is not set 1353# CONFIG_RPCSEC_GSS_KRB5 is not set
1393# CONFIG_RPCSEC_GSS_SPKM3 is not set 1354# CONFIG_RPCSEC_GSS_SPKM3 is not set
1394# CONFIG_SMB_FS is not set 1355# CONFIG_SMB_FS is not set
@@ -1418,6 +1379,7 @@ CONFIG_MSDOS_PARTITION=y
1418# CONFIG_SUN_PARTITION is not set 1379# CONFIG_SUN_PARTITION is not set
1419# CONFIG_KARMA_PARTITION is not set 1380# CONFIG_KARMA_PARTITION is not set
1420CONFIG_EFI_PARTITION=y 1381CONFIG_EFI_PARTITION=y
1382# CONFIG_SYSV68_PARTITION is not set
1421 1383
1422# 1384#
1423# Native Language Support 1385# Native Language Support
@@ -1468,7 +1430,6 @@ CONFIG_NLS_ISO8859_15=m
1468# 1430#
1469# CONFIG_DLM is not set 1431# CONFIG_DLM is not set
1470# CONFIG_UCC_SLOW is not set 1432# CONFIG_UCC_SLOW is not set
1471# CONFIG_UCC_FAST is not set
1472 1433
1473# 1434#
1474# Library routines 1435# Library routines
@@ -1476,6 +1437,7 @@ CONFIG_NLS_ISO8859_15=m
1476CONFIG_BITREVERSE=y 1437CONFIG_BITREVERSE=y
1477# CONFIG_CRC_CCITT is not set 1438# CONFIG_CRC_CCITT is not set
1478# CONFIG_CRC16 is not set 1439# CONFIG_CRC16 is not set
1440# CONFIG_CRC_ITU_T is not set
1479CONFIG_CRC32=y 1441CONFIG_CRC32=y
1480# CONFIG_LIBCRC32C is not set 1442# CONFIG_LIBCRC32C is not set
1481CONFIG_ZLIB_INFLATE=m 1443CONFIG_ZLIB_INFLATE=m
@@ -1487,12 +1449,14 @@ CONFIG_TEXTSEARCH_FSM=m
1487CONFIG_PLIST=y 1449CONFIG_PLIST=y
1488CONFIG_HAS_IOMEM=y 1450CONFIG_HAS_IOMEM=y
1489CONFIG_HAS_IOPORT=y 1451CONFIG_HAS_IOPORT=y
1452CONFIG_HAS_DMA=y
1490 1453
1491# 1454#
1492# Instrumentation Support 1455# Instrumentation Support
1493# 1456#
1494CONFIG_PROFILING=y 1457CONFIG_PROFILING=y
1495CONFIG_OPROFILE=y 1458CONFIG_OPROFILE=m
1459CONFIG_OPROFILE_CELL=y
1496# CONFIG_KPROBES is not set 1460# CONFIG_KPROBES is not set
1497 1461
1498# 1462#
@@ -1506,7 +1470,6 @@ CONFIG_DEBUG_FS=y
1506# CONFIG_HEADERS_CHECK is not set 1470# CONFIG_HEADERS_CHECK is not set
1507CONFIG_DEBUG_KERNEL=y 1471CONFIG_DEBUG_KERNEL=y
1508# CONFIG_DEBUG_SHIRQ is not set 1472# CONFIG_DEBUG_SHIRQ is not set
1509CONFIG_LOG_BUF_SHIFT=15
1510# CONFIG_DETECT_SOFTLOCKUP is not set 1473# CONFIG_DETECT_SOFTLOCKUP is not set
1511# CONFIG_SCHEDSTATS is not set 1474# CONFIG_SCHEDSTATS is not set
1512# CONFIG_TIMER_STATS is not set 1475# CONFIG_TIMER_STATS is not set
@@ -1565,6 +1528,7 @@ CONFIG_CRYPTO_ECB=m
1565CONFIG_CRYPTO_CBC=m 1528CONFIG_CRYPTO_CBC=m
1566CONFIG_CRYPTO_PCBC=m 1529CONFIG_CRYPTO_PCBC=m
1567# CONFIG_CRYPTO_LRW is not set 1530# CONFIG_CRYPTO_LRW is not set
1531# CONFIG_CRYPTO_CRYPTD is not set
1568CONFIG_CRYPTO_DES=m 1532CONFIG_CRYPTO_DES=m
1569# CONFIG_CRYPTO_FCRYPT is not set 1533# CONFIG_CRYPTO_FCRYPT is not set
1570# CONFIG_CRYPTO_BLOWFISH is not set 1534# CONFIG_CRYPTO_BLOWFISH is not set
diff --git a/arch/powerpc/configs/celleb_defconfig b/arch/powerpc/configs/celleb_defconfig
index 91b657b339b4..0dc9874b46e3 100644
--- a/arch/powerpc/configs/celleb_defconfig
+++ b/arch/powerpc/configs/celleb_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.21 3# Linux kernel version: 2.6.22-rc6
4# Tue May 8 12:32:16 2007 4# Tue Jun 26 12:33:17 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -40,6 +40,7 @@ CONFIG_PPC_FPU=y
40CONFIG_PPC_OF_PLATFORM_PCI=y 40CONFIG_PPC_OF_PLATFORM_PCI=y
41CONFIG_ALTIVEC=y 41CONFIG_ALTIVEC=y
42CONFIG_PPC_STD_MMU=y 42CONFIG_PPC_STD_MMU=y
43CONFIG_PPC_MM_SLICES=y
43CONFIG_VIRT_CPU_ACCOUNTING=y 44CONFIG_VIRT_CPU_ACCOUNTING=y
44CONFIG_SMP=y 45CONFIG_SMP=y
45CONFIG_NR_CPUS=4 46CONFIG_NR_CPUS=4
@@ -68,6 +69,7 @@ CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_AUDIT is not set 69# CONFIG_AUDIT is not set
69CONFIG_IKCONFIG=y 70CONFIG_IKCONFIG=y
70CONFIG_IKCONFIG_PROC=y 71CONFIG_IKCONFIG_PROC=y
72CONFIG_LOG_BUF_SHIFT=15
71# CONFIG_CPUSETS is not set 73# CONFIG_CPUSETS is not set
72CONFIG_SYSFS_DEPRECATED=y 74CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 75# CONFIG_RELAY is not set
@@ -86,14 +88,19 @@ CONFIG_BUG=y
86CONFIG_ELF_CORE=y 88CONFIG_ELF_CORE=y
87CONFIG_BASE_FULL=y 89CONFIG_BASE_FULL=y
88CONFIG_FUTEX=y 90CONFIG_FUTEX=y
91CONFIG_ANON_INODES=y
89CONFIG_EPOLL=y 92CONFIG_EPOLL=y
93CONFIG_SIGNALFD=y
94CONFIG_TIMERFD=y
95CONFIG_EVENTFD=y
90CONFIG_SHMEM=y 96CONFIG_SHMEM=y
91CONFIG_SLAB=y
92CONFIG_VM_EVENT_COUNTERS=y 97CONFIG_VM_EVENT_COUNTERS=y
98CONFIG_SLAB=y
99# CONFIG_SLUB is not set
100# CONFIG_SLOB is not set
93CONFIG_RT_MUTEXES=y 101CONFIG_RT_MUTEXES=y
94# CONFIG_TINY_SHMEM is not set 102# CONFIG_TINY_SHMEM is not set
95CONFIG_BASE_SMALL=0 103CONFIG_BASE_SMALL=0
96# CONFIG_SLOB is not set
97 104
98# 105#
99# Loadable module support 106# Loadable module support
@@ -148,6 +155,7 @@ CONFIG_PPC_CELL=y
148# Cell Broadband Engine options 155# Cell Broadband Engine options
149# 156#
150CONFIG_SPU_FS=y 157CONFIG_SPU_FS=y
158CONFIG_SPU_FS_64K_LS=y
151CONFIG_SPU_BASE=y 159CONFIG_SPU_BASE=y
152# CONFIG_PQ2ADS is not set 160# CONFIG_PQ2ADS is not set
153CONFIG_PPC_UDBG_BEAT=y 161CONFIG_PPC_UDBG_BEAT=y
@@ -206,6 +214,7 @@ CONFIG_RESOURCES_64BIT=y
206CONFIG_ZONE_DMA_FLAG=1 214CONFIG_ZONE_DMA_FLAG=1
207CONFIG_ARCH_MEMORY_PROBE=y 215CONFIG_ARCH_MEMORY_PROBE=y
208CONFIG_NODES_SPAN_OTHER_NODES=y 216CONFIG_NODES_SPAN_OTHER_NODES=y
217CONFIG_PPC_HAS_HASH_64K=y
209# CONFIG_PPC_64K_PAGES is not set 218# CONFIG_PPC_64K_PAGES is not set
210# CONFIG_SCHED_SMT is not set 219# CONFIG_SCHED_SMT is not set
211CONFIG_PROC_DEVICETREE=y 220CONFIG_PROC_DEVICETREE=y
@@ -224,16 +233,14 @@ CONFIG_GENERIC_ISA_DMA=y
224CONFIG_PCI=y 233CONFIG_PCI=y
225CONFIG_PCI_DOMAINS=y 234CONFIG_PCI_DOMAINS=y
226# CONFIG_PCIEPORTBUS is not set 235# CONFIG_PCIEPORTBUS is not set
236CONFIG_ARCH_SUPPORTS_MSI=y
237# CONFIG_PCI_MSI is not set
227# CONFIG_PCI_DEBUG is not set 238# CONFIG_PCI_DEBUG is not set
228 239
229# 240#
230# PCCARD (PCMCIA/CardBus) support 241# PCCARD (PCMCIA/CardBus) support
231# 242#
232# CONFIG_PCCARD is not set 243# CONFIG_PCCARD is not set
233
234#
235# PCI Hotplug Support
236#
237# CONFIG_HOTPLUG_PCI is not set 244# CONFIG_HOTPLUG_PCI is not set
238CONFIG_KERNEL_START=0xc000000000000000 245CONFIG_KERNEL_START=0xc000000000000000
239 246
@@ -277,10 +284,6 @@ CONFIG_INET_TCP_DIAG=y
277CONFIG_TCP_CONG_CUBIC=y 284CONFIG_TCP_CONG_CUBIC=y
278CONFIG_DEFAULT_TCP_CONG="cubic" 285CONFIG_DEFAULT_TCP_CONG="cubic"
279# CONFIG_TCP_MD5SIG is not set 286# CONFIG_TCP_MD5SIG is not set
280
281#
282# IP: Virtual Server Configuration
283#
284# CONFIG_IP_VS is not set 287# CONFIG_IP_VS is not set
285CONFIG_IPV6=y 288CONFIG_IPV6=y
286# CONFIG_IPV6_PRIVACY is not set 289# CONFIG_IPV6_PRIVACY is not set
@@ -323,20 +326,8 @@ CONFIG_IP_NF_QUEUE=m
323# 326#
324# CONFIG_IP6_NF_QUEUE is not set 327# CONFIG_IP6_NF_QUEUE is not set
325# CONFIG_IP6_NF_IPTABLES is not set 328# CONFIG_IP6_NF_IPTABLES is not set
326
327#
328# DCCP Configuration (EXPERIMENTAL)
329#
330# CONFIG_IP_DCCP is not set 329# CONFIG_IP_DCCP is not set
331
332#
333# SCTP Configuration (EXPERIMENTAL)
334#
335# CONFIG_IP_SCTP is not set 330# CONFIG_IP_SCTP is not set
336
337#
338# TIPC Configuration (EXPERIMENTAL)
339#
340# CONFIG_TIPC is not set 331# CONFIG_TIPC is not set
341# CONFIG_ATM is not set 332# CONFIG_ATM is not set
342# CONFIG_BRIDGE is not set 333# CONFIG_BRIDGE is not set
@@ -369,7 +360,9 @@ CONFIG_IP_NF_QUEUE=m
369# 360#
370# CONFIG_CFG80211 is not set 361# CONFIG_CFG80211 is not set
371# CONFIG_WIRELESS_EXT is not set 362# CONFIG_WIRELESS_EXT is not set
363# CONFIG_MAC80211 is not set
372# CONFIG_IEEE80211 is not set 364# CONFIG_IEEE80211 is not set
365# CONFIG_RFKILL is not set
373 366
374# 367#
375# Device Drivers 368# Device Drivers
@@ -425,12 +418,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
425# 418#
426# Misc devices 419# Misc devices
427# 420#
421# CONFIG_PHANTOM is not set
428# CONFIG_SGI_IOC4 is not set 422# CONFIG_SGI_IOC4 is not set
429# CONFIG_TIFM_CORE is not set 423# CONFIG_TIFM_CORE is not set
430 424# CONFIG_BLINK is not set
431#
432# ATA/ATAPI/MFM/RLL support
433#
434CONFIG_IDE=y 425CONFIG_IDE=y
435CONFIG_BLK_DEV_IDE=y 426CONFIG_BLK_DEV_IDE=y
436 427
@@ -445,6 +436,7 @@ CONFIG_BLK_DEV_IDECD=m
445# CONFIG_BLK_DEV_IDEFLOPPY is not set 436# CONFIG_BLK_DEV_IDEFLOPPY is not set
446# CONFIG_BLK_DEV_IDESCSI is not set 437# CONFIG_BLK_DEV_IDESCSI is not set
447# CONFIG_IDE_TASK_IOCTL is not set 438# CONFIG_IDE_TASK_IOCTL is not set
439CONFIG_IDE_PROC_FS=y
448 440
449# 441#
450# IDE chipset support/bugfixes 442# IDE chipset support/bugfixes
@@ -452,6 +444,7 @@ CONFIG_BLK_DEV_IDECD=m
452CONFIG_IDE_GENERIC=y 444CONFIG_IDE_GENERIC=y
453CONFIG_BLK_DEV_IDEPCI=y 445CONFIG_BLK_DEV_IDEPCI=y
454CONFIG_IDEPCI_SHARE_IRQ=y 446CONFIG_IDEPCI_SHARE_IRQ=y
447CONFIG_IDEPCI_PCIBUS_ORDER=y
455# CONFIG_BLK_DEV_OFFBOARD is not set 448# CONFIG_BLK_DEV_OFFBOARD is not set
456CONFIG_BLK_DEV_GENERIC=y 449CONFIG_BLK_DEV_GENERIC=y
457# CONFIG_BLK_DEV_OPTI621 is not set 450# CONFIG_BLK_DEV_OPTI621 is not set
@@ -516,6 +509,7 @@ CONFIG_SCSI_MULTI_LUN=y
516# CONFIG_SCSI_CONSTANTS is not set 509# CONFIG_SCSI_CONSTANTS is not set
517# CONFIG_SCSI_LOGGING is not set 510# CONFIG_SCSI_LOGGING is not set
518# CONFIG_SCSI_SCAN_ASYNC is not set 511# CONFIG_SCSI_SCAN_ASYNC is not set
512CONFIG_SCSI_WAIT_SCAN=m
519 513
520# 514#
521# SCSI Transports 515# SCSI Transports
@@ -560,12 +554,7 @@ CONFIG_SCSI_MULTI_LUN=y
560# CONFIG_SCSI_DC395x is not set 554# CONFIG_SCSI_DC395x is not set
561# CONFIG_SCSI_DC390T is not set 555# CONFIG_SCSI_DC390T is not set
562# CONFIG_SCSI_DEBUG is not set 556# CONFIG_SCSI_DEBUG is not set
563# CONFIG_SCSI_ESP_CORE is not set
564# CONFIG_SCSI_SRP is not set 557# CONFIG_SCSI_SRP is not set
565
566#
567# Serial ATA (prod) and Parallel ATA (experimental) drivers
568#
569# CONFIG_ATA is not set 558# CONFIG_ATA is not set
570 559
571# 560#
@@ -588,6 +577,7 @@ CONFIG_DM_MIRROR=m
588CONFIG_DM_ZERO=m 577CONFIG_DM_ZERO=m
589CONFIG_DM_MULTIPATH=m 578CONFIG_DM_MULTIPATH=m
590# CONFIG_DM_MULTIPATH_EMC is not set 579# CONFIG_DM_MULTIPATH_EMC is not set
580# CONFIG_DM_DELAY is not set
591 581
592# 582#
593# Fusion MPT device support 583# Fusion MPT device support
@@ -600,6 +590,7 @@ CONFIG_DM_MULTIPATH=m
600# 590#
601# IEEE 1394 (FireWire) support 591# IEEE 1394 (FireWire) support
602# 592#
593# CONFIG_FIREWIRE is not set
603# CONFIG_IEEE1394 is not set 594# CONFIG_IEEE1394 is not set
604 595
605# 596#
@@ -616,15 +607,7 @@ CONFIG_NETDEVICES=y
616# CONFIG_BONDING is not set 607# CONFIG_BONDING is not set
617# CONFIG_EQUALIZER is not set 608# CONFIG_EQUALIZER is not set
618# CONFIG_TUN is not set 609# CONFIG_TUN is not set
619
620#
621# ARCnet devices
622#
623# CONFIG_ARCNET is not set 610# CONFIG_ARCNET is not set
624
625#
626# PHY device support
627#
628# CONFIG_PHYLIB is not set 611# CONFIG_PHYLIB is not set
629 612
630# 613#
@@ -643,10 +626,7 @@ CONFIG_MII=y
643# CONFIG_NET_TULIP is not set 626# CONFIG_NET_TULIP is not set
644# CONFIG_HP100 is not set 627# CONFIG_HP100 is not set
645# CONFIG_NET_PCI is not set 628# CONFIG_NET_PCI is not set
646 629CONFIG_NETDEV_1000=y
647#
648# Ethernet (1000 Mbit)
649#
650# CONFIG_ACENIC is not set 630# CONFIG_ACENIC is not set
651# CONFIG_DL2K is not set 631# CONFIG_DL2K is not set
652# CONFIG_E1000 is not set 632# CONFIG_E1000 is not set
@@ -658,15 +638,13 @@ CONFIG_MII=y
658# CONFIG_SKGE is not set 638# CONFIG_SKGE is not set
659# CONFIG_SKY2 is not set 639# CONFIG_SKY2 is not set
660# CONFIG_SK98LIN is not set 640# CONFIG_SK98LIN is not set
641# CONFIG_VIA_VELOCITY is not set
661# CONFIG_TIGON3 is not set 642# CONFIG_TIGON3 is not set
662# CONFIG_BNX2 is not set 643# CONFIG_BNX2 is not set
663CONFIG_SPIDER_NET=y 644CONFIG_SPIDER_NET=y
664# CONFIG_QLA3XXX is not set 645# CONFIG_QLA3XXX is not set
665# CONFIG_ATL1 is not set 646# CONFIG_ATL1 is not set
666 647CONFIG_NETDEV_10000=y
667#
668# Ethernet (10000 Mbit)
669#
670# CONFIG_CHELSIO_T1 is not set 648# CONFIG_CHELSIO_T1 is not set
671# CONFIG_CHELSIO_T3 is not set 649# CONFIG_CHELSIO_T3 is not set
672# CONFIG_IXGB is not set 650# CONFIG_IXGB is not set
@@ -674,10 +652,7 @@ CONFIG_SPIDER_NET=y
674# CONFIG_MYRI10GE is not set 652# CONFIG_MYRI10GE is not set
675# CONFIG_NETXEN_NIC is not set 653# CONFIG_NETXEN_NIC is not set
676# CONFIG_PASEMI_MAC is not set 654# CONFIG_PASEMI_MAC is not set
677 655# CONFIG_MLX4_CORE is not set
678#
679# Token Ring devices
680#
681# CONFIG_TR is not set 656# CONFIG_TR is not set
682 657
683# 658#
@@ -687,8 +662,14 @@ CONFIG_SPIDER_NET=y
687# CONFIG_WLAN_80211 is not set 662# CONFIG_WLAN_80211 is not set
688 663
689# 664#
690# Wan interfaces 665# USB Network Adapters
691# 666#
667# CONFIG_USB_CATC is not set
668# CONFIG_USB_KAWETH is not set
669# CONFIG_USB_PEGASUS is not set
670# CONFIG_USB_RTL8150 is not set
671# CONFIG_USB_USBNET_MII is not set
672# CONFIG_USB_USBNET is not set
692# CONFIG_WAN is not set 673# CONFIG_WAN is not set
693# CONFIG_FDDI is not set 674# CONFIG_FDDI is not set
694# CONFIG_HIPPI is not set 675# CONFIG_HIPPI is not set
@@ -715,6 +696,7 @@ CONFIG_SPIDER_NET=y
715# 696#
716CONFIG_INPUT=y 697CONFIG_INPUT=y
717# CONFIG_INPUT_FF_MEMLESS is not set 698# CONFIG_INPUT_FF_MEMLESS is not set
699# CONFIG_INPUT_POLLDEV is not set
718 700
719# 701#
720# Userland interfaces 702# Userland interfaces
@@ -734,6 +716,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
734# CONFIG_INPUT_KEYBOARD is not set 716# CONFIG_INPUT_KEYBOARD is not set
735# CONFIG_INPUT_MOUSE is not set 717# CONFIG_INPUT_MOUSE is not set
736# CONFIG_INPUT_JOYSTICK is not set 718# CONFIG_INPUT_JOYSTICK is not set
719# CONFIG_INPUT_TABLET is not set
737# CONFIG_INPUT_TOUCHSCREEN is not set 720# CONFIG_INPUT_TOUCHSCREEN is not set
738# CONFIG_INPUT_MISC is not set 721# CONFIG_INPUT_MISC is not set
739 722
@@ -797,10 +780,6 @@ CONFIG_HVC_BEAT=y
797# IPMI 780# IPMI
798# 781#
799# CONFIG_IPMI_HANDLER is not set 782# CONFIG_IPMI_HANDLER is not set
800
801#
802# Watchdog Cards
803#
804CONFIG_WATCHDOG=y 783CONFIG_WATCHDOG=y
805# CONFIG_WATCHDOG_NOWAYOUT is not set 784# CONFIG_WATCHDOG_NOWAYOUT is not set
806 785
@@ -822,7 +801,6 @@ CONFIG_WATCHDOG=y
822# CONFIG_HW_RANDOM is not set 801# CONFIG_HW_RANDOM is not set
823CONFIG_GEN_RTC=y 802CONFIG_GEN_RTC=y
824# CONFIG_GEN_RTC_X is not set 803# CONFIG_GEN_RTC_X is not set
825# CONFIG_DTLK is not set
826# CONFIG_R3964 is not set 804# CONFIG_R3964 is not set
827# CONFIG_APPLICOM is not set 805# CONFIG_APPLICOM is not set
828# CONFIG_AGP is not set 806# CONFIG_AGP is not set
@@ -834,11 +812,9 @@ CONFIG_GEN_RTC=y
834# TPM devices 812# TPM devices
835# 813#
836# CONFIG_TCG_TPM is not set 814# CONFIG_TCG_TPM is not set
837 815CONFIG_DEVPORT=y
838#
839# I2C support
840#
841CONFIG_I2C=y 816CONFIG_I2C=y
817CONFIG_I2C_BOARDINFO=y
842# CONFIG_I2C_CHARDEV is not set 818# CONFIG_I2C_CHARDEV is not set
843 819
844# 820#
@@ -864,14 +840,15 @@ CONFIG_I2C_ALGOBIT=y
864# CONFIG_I2C_PARPORT_LIGHT is not set 840# CONFIG_I2C_PARPORT_LIGHT is not set
865# CONFIG_I2C_PROSAVAGE is not set 841# CONFIG_I2C_PROSAVAGE is not set
866# CONFIG_I2C_SAVAGE4 is not set 842# CONFIG_I2C_SAVAGE4 is not set
843# CONFIG_I2C_SIMTEC is not set
867# CONFIG_I2C_SIS5595 is not set 844# CONFIG_I2C_SIS5595 is not set
868# CONFIG_I2C_SIS630 is not set 845# CONFIG_I2C_SIS630 is not set
869# CONFIG_I2C_SIS96X is not set 846# CONFIG_I2C_SIS96X is not set
870# CONFIG_I2C_STUB is not set 847# CONFIG_I2C_STUB is not set
848# CONFIG_I2C_TINY_USB is not set
871# CONFIG_I2C_VIA is not set 849# CONFIG_I2C_VIA is not set
872# CONFIG_I2C_VIAPRO is not set 850# CONFIG_I2C_VIAPRO is not set
873# CONFIG_I2C_VOODOO3 is not set 851# CONFIG_I2C_VOODOO3 is not set
874# CONFIG_I2C_PCA_ISA is not set
875 852
876# 853#
877# Miscellaneous I2C Chip support 854# Miscellaneous I2C Chip support
@@ -898,12 +875,7 @@ CONFIG_I2C_ALGOBIT=y
898# Dallas's 1-wire bus 875# Dallas's 1-wire bus
899# 876#
900# CONFIG_W1 is not set 877# CONFIG_W1 is not set
901
902#
903# Hardware Monitoring support
904#
905# CONFIG_HWMON is not set 878# CONFIG_HWMON is not set
906# CONFIG_HWMON_VID is not set
907 879
908# 880#
909# Multifunction device drivers 881# Multifunction device drivers
@@ -914,17 +886,19 @@ CONFIG_I2C_ALGOBIT=y
914# Multimedia devices 886# Multimedia devices
915# 887#
916# CONFIG_VIDEO_DEV is not set 888# CONFIG_VIDEO_DEV is not set
889# CONFIG_DVB_CORE is not set
890# CONFIG_DAB is not set
917 891
918# 892#
919# Digital Video Broadcasting Devices 893# Graphics support
920# 894#
921# CONFIG_DVB is not set 895# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
922# CONFIG_USB_DABUSB is not set
923 896
924# 897#
925# Graphics support 898# Display device support
926# 899#
927# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 900# CONFIG_DISPLAY_SUPPORT is not set
901# CONFIG_VGASTATE is not set
928# CONFIG_FB is not set 902# CONFIG_FB is not set
929# CONFIG_FB_IBM_GXT4500 is not set 903# CONFIG_FB_IBM_GXT4500 is not set
930 904
@@ -1015,37 +989,10 @@ CONFIG_USB_STORAGE=m
1015# CONFIG_USB_LIBUSUAL is not set 989# CONFIG_USB_LIBUSUAL is not set
1016 990
1017# 991#
1018# USB Input Devices
1019#
1020# CONFIG_USB_AIPTEK is not set
1021# CONFIG_USB_WACOM is not set
1022# CONFIG_USB_ACECAD is not set
1023# CONFIG_USB_KBTAB is not set
1024# CONFIG_USB_POWERMATE is not set
1025# CONFIG_USB_TOUCHSCREEN is not set
1026# CONFIG_USB_YEALINK is not set
1027# CONFIG_USB_XPAD is not set
1028# CONFIG_USB_ATI_REMOTE is not set
1029# CONFIG_USB_ATI_REMOTE2 is not set
1030# CONFIG_USB_KEYSPAN_REMOTE is not set
1031# CONFIG_USB_APPLETOUCH is not set
1032# CONFIG_USB_GTCO is not set
1033
1034#
1035# USB Imaging devices 992# USB Imaging devices
1036# 993#
1037# CONFIG_USB_MDC800 is not set 994# CONFIG_USB_MDC800 is not set
1038# CONFIG_USB_MICROTEK is not set 995# CONFIG_USB_MICROTEK is not set
1039
1040#
1041# USB Network Adapters
1042#
1043# CONFIG_USB_CATC is not set
1044# CONFIG_USB_KAWETH is not set
1045# CONFIG_USB_PEGASUS is not set
1046# CONFIG_USB_RTL8150 is not set
1047# CONFIG_USB_USBNET_MII is not set
1048# CONFIG_USB_USBNET is not set
1049CONFIG_USB_MON=y 996CONFIG_USB_MON=y
1050 997
1051# 998#
@@ -1089,10 +1036,6 @@ CONFIG_USB_MON=y
1089# USB Gadget Support 1036# USB Gadget Support
1090# 1037#
1091# CONFIG_USB_GADGET is not set 1038# CONFIG_USB_GADGET is not set
1092
1093#
1094# MMC/SD Card support
1095#
1096# CONFIG_MMC is not set 1039# CONFIG_MMC is not set
1097 1040
1098# 1041#
@@ -1136,14 +1079,6 @@ CONFIG_USB_MON=y
1136# 1079#
1137 1080
1138# 1081#
1139# Auxiliary Display support
1140#
1141
1142#
1143# Virtualization
1144#
1145
1146#
1147# File systems 1082# File systems
1148# 1083#
1149CONFIG_EXT2_FS=y 1084CONFIG_EXT2_FS=y
@@ -1246,6 +1181,7 @@ CONFIG_EXPORTFS=m
1246CONFIG_NFS_ACL_SUPPORT=m 1181CONFIG_NFS_ACL_SUPPORT=m
1247CONFIG_NFS_COMMON=y 1182CONFIG_NFS_COMMON=y
1248CONFIG_SUNRPC=m 1183CONFIG_SUNRPC=m
1184# CONFIG_SUNRPC_BIND34 is not set
1249# CONFIG_RPCSEC_GSS_KRB5 is not set 1185# CONFIG_RPCSEC_GSS_KRB5 is not set
1250# CONFIG_RPCSEC_GSS_SPKM3 is not set 1186# CONFIG_RPCSEC_GSS_SPKM3 is not set
1251# CONFIG_SMB_FS is not set 1187# CONFIG_SMB_FS is not set
@@ -1275,6 +1211,7 @@ CONFIG_MSDOS_PARTITION=y
1275# CONFIG_SUN_PARTITION is not set 1211# CONFIG_SUN_PARTITION is not set
1276# CONFIG_KARMA_PARTITION is not set 1212# CONFIG_KARMA_PARTITION is not set
1277CONFIG_EFI_PARTITION=y 1213CONFIG_EFI_PARTITION=y
1214# CONFIG_SYSV68_PARTITION is not set
1278 1215
1279# 1216#
1280# Native Language Support 1217# Native Language Support
@@ -1325,7 +1262,6 @@ CONFIG_NLS_ISO8859_15=m
1325# 1262#
1326# CONFIG_DLM is not set 1263# CONFIG_DLM is not set
1327# CONFIG_UCC_SLOW is not set 1264# CONFIG_UCC_SLOW is not set
1328# CONFIG_UCC_FAST is not set
1329 1265
1330# 1266#
1331# Library routines 1267# Library routines
@@ -1333,6 +1269,7 @@ CONFIG_NLS_ISO8859_15=m
1333CONFIG_BITREVERSE=y 1269CONFIG_BITREVERSE=y
1334# CONFIG_CRC_CCITT is not set 1270# CONFIG_CRC_CCITT is not set
1335# CONFIG_CRC16 is not set 1271# CONFIG_CRC16 is not set
1272# CONFIG_CRC_ITU_T is not set
1336CONFIG_CRC32=y 1273CONFIG_CRC32=y
1337CONFIG_LIBCRC32C=m 1274CONFIG_LIBCRC32C=m
1338CONFIG_ZLIB_INFLATE=m 1275CONFIG_ZLIB_INFLATE=m
@@ -1340,6 +1277,7 @@ CONFIG_ZLIB_DEFLATE=m
1340CONFIG_PLIST=y 1277CONFIG_PLIST=y
1341CONFIG_HAS_IOMEM=y 1278CONFIG_HAS_IOMEM=y
1342CONFIG_HAS_IOPORT=y 1279CONFIG_HAS_IOPORT=y
1280CONFIG_HAS_DMA=y
1343 1281
1344# 1282#
1345# Instrumentation Support 1283# Instrumentation Support
@@ -1358,7 +1296,6 @@ CONFIG_DEBUG_FS=y
1358# CONFIG_HEADERS_CHECK is not set 1296# CONFIG_HEADERS_CHECK is not set
1359CONFIG_DEBUG_KERNEL=y 1297CONFIG_DEBUG_KERNEL=y
1360# CONFIG_DEBUG_SHIRQ is not set 1298# CONFIG_DEBUG_SHIRQ is not set
1361CONFIG_LOG_BUF_SHIFT=15
1362CONFIG_DETECT_SOFTLOCKUP=y 1299CONFIG_DETECT_SOFTLOCKUP=y
1363# CONFIG_SCHEDSTATS is not set 1300# CONFIG_SCHEDSTATS is not set
1364# CONFIG_TIMER_STATS is not set 1301# CONFIG_TIMER_STATS is not set
@@ -1395,6 +1332,7 @@ CONFIG_PPC_EARLY_DEBUG=y
1395# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set 1332# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
1396# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set 1333# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
1397CONFIG_PPC_EARLY_DEBUG_BEAT=y 1334CONFIG_PPC_EARLY_DEBUG_BEAT=y
1335# CONFIG_PPC_EARLY_DEBUG_44x is not set
1398 1336
1399# 1337#
1400# Security options 1338# Security options
@@ -1425,6 +1363,7 @@ CONFIG_CRYPTO_ECB=m
1425CONFIG_CRYPTO_CBC=m 1363CONFIG_CRYPTO_CBC=m
1426CONFIG_CRYPTO_PCBC=m 1364CONFIG_CRYPTO_PCBC=m
1427# CONFIG_CRYPTO_LRW is not set 1365# CONFIG_CRYPTO_LRW is not set
1366# CONFIG_CRYPTO_CRYPTD is not set
1428CONFIG_CRYPTO_DES=m 1367CONFIG_CRYPTO_DES=m
1429# CONFIG_CRYPTO_FCRYPT is not set 1368# CONFIG_CRYPTO_FCRYPT is not set
1430CONFIG_CRYPTO_BLOWFISH=m 1369CONFIG_CRYPTO_BLOWFISH=m
diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig
index 029c9a0e730c..7a747c438536 100644
--- a/arch/powerpc/configs/chrp32_defconfig
+++ b/arch/powerpc/configs/chrp32_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.20-rc5 3# Linux kernel version: 2.6.22-rc6
4# Mon Jan 22 22:12:58 2007 4# Tue Jun 26 12:36:45 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -34,9 +34,9 @@ CONFIG_CLASSIC32=y
34# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set 35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set 36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
37# CONFIG_40x is not set 38# CONFIG_40x is not set
38# CONFIG_44x is not set 39# CONFIG_44x is not set
39# CONFIG_8xx is not set
40# CONFIG_E200 is not set 40# CONFIG_E200 is not set
41CONFIG_6xx=y 41CONFIG_6xx=y
42CONFIG_PPC_FPU=y 42CONFIG_PPC_FPU=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_ALTIVEC is not set 45# CONFIG_ALTIVEC is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48CONFIG_SMP=y 49CONFIG_SMP=y
49CONFIG_NR_CPUS=4 50CONFIG_NR_CPUS=4
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 51CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -64,6 +65,7 @@ CONFIG_LOCALVERSION=""
64CONFIG_SWAP=y 65CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 66CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set 67# CONFIG_IPC_NS is not set
68CONFIG_SYSVIPC_SYSCTL=y
67CONFIG_POSIX_MQUEUE=y 69CONFIG_POSIX_MQUEUE=y
68# CONFIG_BSD_PROCESS_ACCT is not set 70# CONFIG_BSD_PROCESS_ACCT is not set
69# CONFIG_TASKSTATS is not set 71# CONFIG_TASKSTATS is not set
@@ -71,9 +73,11 @@ CONFIG_POSIX_MQUEUE=y
71# CONFIG_AUDIT is not set 73# CONFIG_AUDIT is not set
72CONFIG_IKCONFIG=y 74CONFIG_IKCONFIG=y
73CONFIG_IKCONFIG_PROC=y 75CONFIG_IKCONFIG_PROC=y
76CONFIG_LOG_BUF_SHIFT=15
74# CONFIG_CPUSETS is not set 77# CONFIG_CPUSETS is not set
75CONFIG_SYSFS_DEPRECATED=y 78CONFIG_SYSFS_DEPRECATED=y
76# CONFIG_RELAY is not set 79# CONFIG_RELAY is not set
80CONFIG_BLK_DEV_INITRD=y
77CONFIG_INITRAMFS_SOURCE="" 81CONFIG_INITRAMFS_SOURCE=""
78# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 82# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
79CONFIG_SYSCTL=y 83CONFIG_SYSCTL=y
@@ -88,14 +92,19 @@ CONFIG_BUG=y
88CONFIG_ELF_CORE=y 92CONFIG_ELF_CORE=y
89CONFIG_BASE_FULL=y 93CONFIG_BASE_FULL=y
90CONFIG_FUTEX=y 94CONFIG_FUTEX=y
95CONFIG_ANON_INODES=y
91CONFIG_EPOLL=y 96CONFIG_EPOLL=y
97CONFIG_SIGNALFD=y
98CONFIG_TIMERFD=y
99CONFIG_EVENTFD=y
92CONFIG_SHMEM=y 100CONFIG_SHMEM=y
93CONFIG_SLAB=y
94CONFIG_VM_EVENT_COUNTERS=y 101CONFIG_VM_EVENT_COUNTERS=y
102CONFIG_SLAB=y
103# CONFIG_SLUB is not set
104# CONFIG_SLOB is not set
95CONFIG_RT_MUTEXES=y 105CONFIG_RT_MUTEXES=y
96# CONFIG_TINY_SHMEM is not set 106# CONFIG_TINY_SHMEM is not set
97CONFIG_BASE_SMALL=0 107CONFIG_BASE_SMALL=0
98# CONFIG_SLOB is not set
99 108
100# 109#
101# Loadable module support 110# Loadable module support
@@ -137,13 +146,18 @@ CONFIG_PPC_MULTIPLATFORM=y
137# CONFIG_APUS is not set 146# CONFIG_APUS is not set
138CONFIG_PPC_CHRP=y 147CONFIG_PPC_CHRP=y
139# CONFIG_PPC_MPC52xx is not set 148# CONFIG_PPC_MPC52xx is not set
149# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_EFIKA is not set 150# CONFIG_PPC_EFIKA is not set
141# CONFIG_PPC_LITE5200 is not set 151# CONFIG_PPC_LITE5200 is not set
142# CONFIG_PPC_PMAC is not set 152# CONFIG_PPC_PMAC is not set
143# CONFIG_PPC_CELL is not set 153# CONFIG_PPC_CELL is not set
144# CONFIG_PPC_CELL_NATIVE is not set 154# CONFIG_PPC_CELL_NATIVE is not set
155# CONFIG_PQ2ADS is not set
145CONFIG_PPC_NATIVE=y 156CONFIG_PPC_NATIVE=y
146# CONFIG_UDBG_RTAS_CONSOLE is not set 157# CONFIG_UDBG_RTAS_CONSOLE is not set
158CONFIG_MPIC=y
159# CONFIG_MPIC_WEIRD is not set
160CONFIG_PPC_I8259=y
147CONFIG_PPC_RTAS=y 161CONFIG_PPC_RTAS=y
148# CONFIG_RTAS_ERROR_LOGGING is not set 162# CONFIG_RTAS_ERROR_LOGGING is not set
149CONFIG_RTAS_PROC=y 163CONFIG_RTAS_PROC=y
@@ -154,8 +168,7 @@ CONFIG_PPC_MPC106=y
154# CONFIG_GENERIC_IOMAP is not set 168# CONFIG_GENERIC_IOMAP is not set
155# CONFIG_CPU_FREQ is not set 169# CONFIG_CPU_FREQ is not set
156# CONFIG_TAU is not set 170# CONFIG_TAU is not set
157# CONFIG_WANT_EARLY_SERIAL is not set 171# CONFIG_CPM2 is not set
158CONFIG_MPIC=y
159 172
160# 173#
161# Kernel options 174# Kernel options
@@ -186,33 +199,33 @@ CONFIG_FLAT_NODE_MEM_MAP=y
186# CONFIG_SPARSEMEM_STATIC is not set 199# CONFIG_SPARSEMEM_STATIC is not set
187CONFIG_SPLIT_PTLOCK_CPUS=4 200CONFIG_SPLIT_PTLOCK_CPUS=4
188# CONFIG_RESOURCES_64BIT is not set 201# CONFIG_RESOURCES_64BIT is not set
202CONFIG_ZONE_DMA_FLAG=1
189CONFIG_PROC_DEVICETREE=y 203CONFIG_PROC_DEVICETREE=y
190# CONFIG_CMDLINE_BOOL is not set 204# CONFIG_CMDLINE_BOOL is not set
191# CONFIG_PM is not set 205# CONFIG_PM is not set
192CONFIG_SECCOMP=y 206CONFIG_SECCOMP=y
207# CONFIG_WANT_DEVICE_TREE is not set
193CONFIG_ISA_DMA_API=y 208CONFIG_ISA_DMA_API=y
194 209
195# 210#
196# Bus options 211# Bus options
197# 212#
198CONFIG_ISA=y 213CONFIG_ISA=y
214CONFIG_ZONE_DMA=y
199CONFIG_GENERIC_ISA_DMA=y 215CONFIG_GENERIC_ISA_DMA=y
200# CONFIG_MPIC_WEIRD is not set
201CONFIG_PPC_I8259=y
202CONFIG_PPC_INDIRECT_PCI=y 216CONFIG_PPC_INDIRECT_PCI=y
217# CONFIG_PPC_INDIRECT_PCI_BE is not set
203CONFIG_PCI=y 218CONFIG_PCI=y
204CONFIG_PCI_DOMAINS=y 219CONFIG_PCI_DOMAINS=y
205# CONFIG_PCIEPORTBUS is not set 220# CONFIG_PCIEPORTBUS is not set
221CONFIG_ARCH_SUPPORTS_MSI=y
222# CONFIG_PCI_MSI is not set
206# CONFIG_PCI_DEBUG is not set 223# CONFIG_PCI_DEBUG is not set
207 224
208# 225#
209# PCCARD (PCMCIA/CardBus) support 226# PCCARD (PCMCIA/CardBus) support
210# 227#
211# CONFIG_PCCARD is not set 228# CONFIG_PCCARD is not set
212
213#
214# PCI Hotplug Support
215#
216# CONFIG_HOTPLUG_PCI is not set 229# CONFIG_HOTPLUG_PCI is not set
217 230
218# 231#
@@ -237,7 +250,6 @@ CONFIG_NET=y
237# 250#
238# Networking options 251# Networking options
239# 252#
240# CONFIG_NETDEBUG is not set
241CONFIG_PACKET=y 253CONFIG_PACKET=y
242# CONFIG_PACKET_MMAP is not set 254# CONFIG_PACKET_MMAP is not set
243CONFIG_UNIX=y 255CONFIG_UNIX=y
@@ -266,10 +278,6 @@ CONFIG_INET_TCP_DIAG=y
266CONFIG_TCP_CONG_CUBIC=y 278CONFIG_TCP_CONG_CUBIC=y
267CONFIG_DEFAULT_TCP_CONG="cubic" 279CONFIG_DEFAULT_TCP_CONG="cubic"
268# CONFIG_TCP_MD5SIG is not set 280# CONFIG_TCP_MD5SIG is not set
269
270#
271# IP: Virtual Server Configuration
272#
273# CONFIG_IP_VS is not set 281# CONFIG_IP_VS is not set
274# CONFIG_IPV6 is not set 282# CONFIG_IPV6 is not set
275# CONFIG_INET6_XFRM_TUNNEL is not set 283# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -283,8 +291,6 @@ CONFIG_NETFILTER=y
283# 291#
284# CONFIG_NETFILTER_NETLINK is not set 292# CONFIG_NETFILTER_NETLINK is not set
285CONFIG_NF_CONNTRACK_ENABLED=m 293CONFIG_NF_CONNTRACK_ENABLED=m
286CONFIG_NF_CONNTRACK_SUPPORT=y
287# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
288CONFIG_NF_CONNTRACK=m 294CONFIG_NF_CONNTRACK=m
289# CONFIG_NF_CT_ACCT is not set 295# CONFIG_NF_CT_ACCT is not set
290# CONFIG_NF_CONNTRACK_MARK is not set 296# CONFIG_NF_CONNTRACK_MARK is not set
@@ -296,9 +302,37 @@ CONFIG_NF_CONNTRACK_FTP=m
296CONFIG_NF_CONNTRACK_IRC=m 302CONFIG_NF_CONNTRACK_IRC=m
297# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set 303# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
298# CONFIG_NF_CONNTRACK_PPTP is not set 304# CONFIG_NF_CONNTRACK_PPTP is not set
305# CONFIG_NF_CONNTRACK_SANE is not set
299CONFIG_NF_CONNTRACK_SIP=m 306CONFIG_NF_CONNTRACK_SIP=m
300CONFIG_NF_CONNTRACK_TFTP=m 307CONFIG_NF_CONNTRACK_TFTP=m
301# CONFIG_NETFILTER_XTABLES is not set 308CONFIG_NETFILTER_XTABLES=m
309# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
310# CONFIG_NETFILTER_XT_TARGET_MARK is not set
311# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
312# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
313# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
314# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
315# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set
316# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set
317# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set
318# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
319# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
320# CONFIG_NETFILTER_XT_MATCH_ESP is not set
321# CONFIG_NETFILTER_XT_MATCH_HELPER is not set
322# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
323# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
324# CONFIG_NETFILTER_XT_MATCH_MAC is not set
325# CONFIG_NETFILTER_XT_MATCH_MARK is not set
326# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
327# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
328# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
329# CONFIG_NETFILTER_XT_MATCH_REALM is not set
330# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
331# CONFIG_NETFILTER_XT_MATCH_STATE is not set
332# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
333# CONFIG_NETFILTER_XT_MATCH_STRING is not set
334# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
335# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
302 336
303# 337#
304# IP: Netfilter Configuration 338# IP: Netfilter Configuration
@@ -306,20 +340,38 @@ CONFIG_NF_CONNTRACK_TFTP=m
306CONFIG_NF_CONNTRACK_IPV4=m 340CONFIG_NF_CONNTRACK_IPV4=m
307CONFIG_NF_CONNTRACK_PROC_COMPAT=y 341CONFIG_NF_CONNTRACK_PROC_COMPAT=y
308# CONFIG_IP_NF_QUEUE is not set 342# CONFIG_IP_NF_QUEUE is not set
309 343CONFIG_IP_NF_IPTABLES=m
310# 344# CONFIG_IP_NF_MATCH_IPRANGE is not set
311# DCCP Configuration (EXPERIMENTAL) 345# CONFIG_IP_NF_MATCH_TOS is not set
312# 346# CONFIG_IP_NF_MATCH_RECENT is not set
347# CONFIG_IP_NF_MATCH_ECN is not set
348# CONFIG_IP_NF_MATCH_AH is not set
349# CONFIG_IP_NF_MATCH_TTL is not set
350# CONFIG_IP_NF_MATCH_OWNER is not set
351# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
352CONFIG_IP_NF_FILTER=m
353CONFIG_IP_NF_TARGET_REJECT=m
354CONFIG_IP_NF_TARGET_LOG=m
355# CONFIG_IP_NF_TARGET_ULOG is not set
356CONFIG_NF_NAT=m
357CONFIG_NF_NAT_NEEDED=y
358CONFIG_IP_NF_TARGET_MASQUERADE=m
359CONFIG_IP_NF_TARGET_REDIRECT=m
360# CONFIG_IP_NF_TARGET_NETMAP is not set
361# CONFIG_IP_NF_TARGET_SAME is not set
362# CONFIG_NF_NAT_SNMP_BASIC is not set
363CONFIG_NF_NAT_FTP=m
364CONFIG_NF_NAT_IRC=m
365CONFIG_NF_NAT_TFTP=m
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_NF_RAW is not set
372# CONFIG_IP_NF_ARPTABLES is not set
313# CONFIG_IP_DCCP is not set 373# CONFIG_IP_DCCP is not set
314
315#
316# SCTP Configuration (EXPERIMENTAL)
317#
318# CONFIG_IP_SCTP is not set 374# CONFIG_IP_SCTP is not set
319
320#
321# TIPC Configuration (EXPERIMENTAL)
322#
323# CONFIG_TIPC is not set 375# CONFIG_TIPC is not set
324# CONFIG_ATM is not set 376# CONFIG_ATM is not set
325# CONFIG_BRIDGE is not set 377# CONFIG_BRIDGE is not set
@@ -345,7 +397,16 @@ CONFIG_NF_CONNTRACK_PROC_COMPAT=y
345# CONFIG_HAMRADIO is not set 397# CONFIG_HAMRADIO is not set
346# CONFIG_IRDA is not set 398# CONFIG_IRDA is not set
347# CONFIG_BT is not set 399# CONFIG_BT is not set
400# CONFIG_AF_RXRPC is not set
401
402#
403# Wireless
404#
405# CONFIG_CFG80211 is not set
406# CONFIG_WIRELESS_EXT is not set
407# CONFIG_MAC80211 is not set
348# CONFIG_IEEE80211 is not set 408# CONFIG_IEEE80211 is not set
409# CONFIG_RFKILL is not set
349 410
350# 411#
351# Device Drivers 412# Device Drivers
@@ -358,16 +419,13 @@ CONFIG_NF_CONNTRACK_PROC_COMPAT=y
358CONFIG_PREVENT_FIRMWARE_BUILD=y 419CONFIG_PREVENT_FIRMWARE_BUILD=y
359# CONFIG_FW_LOADER is not set 420# CONFIG_FW_LOADER is not set
360# CONFIG_DEBUG_DRIVER is not set 421# CONFIG_DEBUG_DRIVER is not set
422# CONFIG_DEBUG_DEVRES is not set
361# CONFIG_SYS_HYPERVISOR is not set 423# CONFIG_SYS_HYPERVISOR is not set
362 424
363# 425#
364# Connector - unified userspace <-> kernelspace linker 426# Connector - unified userspace <-> kernelspace linker
365# 427#
366# CONFIG_CONNECTOR is not set 428# CONFIG_CONNECTOR is not set
367
368#
369# Memory Technology Devices (MTD)
370#
371# CONFIG_MTD is not set 429# CONFIG_MTD is not set
372 430
373# 431#
@@ -379,6 +437,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
379# Plug and Play support 437# Plug and Play support
380# 438#
381# CONFIG_PNP is not set 439# CONFIG_PNP is not set
440# CONFIG_PNPACPI is not set
382 441
383# 442#
384# Block devices 443# Block devices
@@ -399,19 +458,16 @@ CONFIG_BLK_DEV_RAM=y
399CONFIG_BLK_DEV_RAM_COUNT=16 458CONFIG_BLK_DEV_RAM_COUNT=16
400CONFIG_BLK_DEV_RAM_SIZE=4096 459CONFIG_BLK_DEV_RAM_SIZE=4096
401CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 460CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
402CONFIG_BLK_DEV_INITRD=y
403# CONFIG_CDROM_PKTCDVD is not set 461# CONFIG_CDROM_PKTCDVD is not set
404# CONFIG_ATA_OVER_ETH is not set 462# CONFIG_ATA_OVER_ETH is not set
405 463
406# 464#
407# Misc devices 465# Misc devices
408# 466#
467# CONFIG_PHANTOM is not set
409# CONFIG_SGI_IOC4 is not set 468# CONFIG_SGI_IOC4 is not set
410# CONFIG_TIFM_CORE is not set 469# CONFIG_TIFM_CORE is not set
411 470# CONFIG_BLINK is not set
412#
413# ATA/ATAPI/MFM/RLL support
414#
415CONFIG_IDE=y 471CONFIG_IDE=y
416CONFIG_BLK_DEV_IDE=y 472CONFIG_BLK_DEV_IDE=y
417 473
@@ -426,6 +482,7 @@ CONFIG_BLK_DEV_IDECD=y
426# CONFIG_BLK_DEV_IDEFLOPPY is not set 482# CONFIG_BLK_DEV_IDEFLOPPY is not set
427# CONFIG_BLK_DEV_IDESCSI is not set 483# CONFIG_BLK_DEV_IDESCSI is not set
428# CONFIG_IDE_TASK_IOCTL is not set 484# CONFIG_IDE_TASK_IOCTL is not set
485CONFIG_IDE_PROC_FS=y
429 486
430# 487#
431# IDE chipset support/bugfixes 488# IDE chipset support/bugfixes
@@ -433,12 +490,12 @@ CONFIG_BLK_DEV_IDECD=y
433CONFIG_IDE_GENERIC=y 490CONFIG_IDE_GENERIC=y
434CONFIG_BLK_DEV_IDEPCI=y 491CONFIG_BLK_DEV_IDEPCI=y
435CONFIG_IDEPCI_SHARE_IRQ=y 492CONFIG_IDEPCI_SHARE_IRQ=y
493CONFIG_IDEPCI_PCIBUS_ORDER=y
436# CONFIG_BLK_DEV_OFFBOARD is not set 494# CONFIG_BLK_DEV_OFFBOARD is not set
437CONFIG_BLK_DEV_GENERIC=y 495CONFIG_BLK_DEV_GENERIC=y
438# CONFIG_BLK_DEV_OPTI621 is not set 496# CONFIG_BLK_DEV_OPTI621 is not set
439CONFIG_BLK_DEV_IDEDMA_PCI=y 497CONFIG_BLK_DEV_IDEDMA_PCI=y
440# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 498# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
441CONFIG_IDEDMA_PCI_AUTO=y
442# CONFIG_IDEDMA_ONLYDISK is not set 499# CONFIG_IDEDMA_ONLYDISK is not set
443# CONFIG_BLK_DEV_AEC62XX is not set 500# CONFIG_BLK_DEV_AEC62XX is not set
444# CONFIG_BLK_DEV_ALI15X3 is not set 501# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -453,6 +510,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
453# CONFIG_BLK_DEV_JMICRON is not set 510# CONFIG_BLK_DEV_JMICRON is not set
454# CONFIG_BLK_DEV_SC1200 is not set 511# CONFIG_BLK_DEV_SC1200 is not set
455# CONFIG_BLK_DEV_PIIX is not set 512# CONFIG_BLK_DEV_PIIX is not set
513# CONFIG_BLK_DEV_IT8213 is not set
456# CONFIG_BLK_DEV_IT821X is not set 514# CONFIG_BLK_DEV_IT821X is not set
457# CONFIG_BLK_DEV_NS87415 is not set 515# CONFIG_BLK_DEV_NS87415 is not set
458# CONFIG_BLK_DEV_PDC202XX_OLD is not set 516# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -463,11 +521,11 @@ CONFIG_BLK_DEV_SL82C105=y
463# CONFIG_BLK_DEV_SLC90E66 is not set 521# CONFIG_BLK_DEV_SLC90E66 is not set
464# CONFIG_BLK_DEV_TRM290 is not set 522# CONFIG_BLK_DEV_TRM290 is not set
465CONFIG_BLK_DEV_VIA82CXXX=y 523CONFIG_BLK_DEV_VIA82CXXX=y
524# CONFIG_BLK_DEV_TC86C001 is not set
466# CONFIG_IDE_ARM is not set 525# CONFIG_IDE_ARM is not set
467# CONFIG_IDE_CHIPSETS is not set 526# CONFIG_IDE_CHIPSETS is not set
468CONFIG_BLK_DEV_IDEDMA=y 527CONFIG_BLK_DEV_IDEDMA=y
469# CONFIG_IDEDMA_IVB is not set 528# CONFIG_IDEDMA_IVB is not set
470CONFIG_IDEDMA_AUTO=y
471# CONFIG_BLK_DEV_HD is not set 529# CONFIG_BLK_DEV_HD is not set
472 530
473# 531#
@@ -497,6 +555,7 @@ CONFIG_CHR_DEV_SG=y
497CONFIG_SCSI_CONSTANTS=y 555CONFIG_SCSI_CONSTANTS=y
498# CONFIG_SCSI_LOGGING is not set 556# CONFIG_SCSI_LOGGING is not set
499# CONFIG_SCSI_SCAN_ASYNC is not set 557# CONFIG_SCSI_SCAN_ASYNC is not set
558CONFIG_SCSI_WAIT_SCAN=m
500 559
501# 560#
502# SCSI Transports 561# SCSI Transports
@@ -562,10 +621,6 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y
562# CONFIG_SCSI_NSP32 is not set 621# CONFIG_SCSI_NSP32 is not set
563# CONFIG_SCSI_DEBUG is not set 622# CONFIG_SCSI_DEBUG is not set
564# CONFIG_SCSI_SRP is not set 623# CONFIG_SCSI_SRP is not set
565
566#
567# Serial ATA (prod) and Parallel ATA (experimental) drivers
568#
569# CONFIG_ATA is not set 624# CONFIG_ATA is not set
570 625
571# 626#
@@ -589,18 +644,14 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y
589# 644#
590# IEEE 1394 (FireWire) support 645# IEEE 1394 (FireWire) support
591# 646#
647# CONFIG_FIREWIRE is not set
592# CONFIG_IEEE1394 is not set 648# CONFIG_IEEE1394 is not set
593 649
594# 650#
595# I2O device support 651# I2O device support
596# 652#
597# CONFIG_I2O is not set 653# CONFIG_I2O is not set
598 654# CONFIG_MACINTOSH_DRIVERS is not set
599#
600# Macintosh device drivers
601#
602# CONFIG_MAC_EMUMOUSEBTN is not set
603# CONFIG_WINDFARM is not set
604 655
605# 656#
606# Network device support 657# Network device support
@@ -610,15 +661,7 @@ CONFIG_NETDEVICES=y
610# CONFIG_BONDING is not set 661# CONFIG_BONDING is not set
611# CONFIG_EQUALIZER is not set 662# CONFIG_EQUALIZER is not set
612# CONFIG_TUN is not set 663# CONFIG_TUN is not set
613
614#
615# ARCnet devices
616#
617# CONFIG_ARCNET is not set 664# CONFIG_ARCNET is not set
618
619#
620# PHY device support
621#
622# CONFIG_PHYLIB is not set 665# CONFIG_PHYLIB is not set
623 666
624# 667#
@@ -677,10 +720,8 @@ CONFIG_8139TOO=y
677CONFIG_VIA_RHINE=y 720CONFIG_VIA_RHINE=y
678# CONFIG_VIA_RHINE_MMIO is not set 721# CONFIG_VIA_RHINE_MMIO is not set
679# CONFIG_VIA_RHINE_NAPI is not set 722# CONFIG_VIA_RHINE_NAPI is not set
680 723# CONFIG_SC92031 is not set
681# 724CONFIG_NETDEV_1000=y
682# Ethernet (1000 Mbit)
683#
684# CONFIG_ACENIC is not set 725# CONFIG_ACENIC is not set
685# CONFIG_DL2K is not set 726# CONFIG_DL2K is not set
686# CONFIG_E1000 is not set 727# CONFIG_E1000 is not set
@@ -696,33 +737,33 @@ CONFIG_VIA_RHINE=y
696# CONFIG_TIGON3 is not set 737# CONFIG_TIGON3 is not set
697# CONFIG_BNX2 is not set 738# CONFIG_BNX2 is not set
698CONFIG_MV643XX_ETH=y 739CONFIG_MV643XX_ETH=y
699# CONFIG_MV643XX_ETH_0 is not set
700# CONFIG_MV643XX_ETH_1 is not set
701# CONFIG_MV643XX_ETH_2 is not set
702# CONFIG_QLA3XXX is not set 740# CONFIG_QLA3XXX is not set
703 741# CONFIG_ATL1 is not set
704# 742CONFIG_NETDEV_10000=y
705# Ethernet (10000 Mbit)
706#
707# CONFIG_CHELSIO_T1 is not set 743# CONFIG_CHELSIO_T1 is not set
744# CONFIG_CHELSIO_T3 is not set
708# CONFIG_IXGB is not set 745# CONFIG_IXGB is not set
709# CONFIG_S2IO is not set 746# CONFIG_S2IO is not set
710# CONFIG_MYRI10GE is not set 747# CONFIG_MYRI10GE is not set
711# CONFIG_NETXEN_NIC is not set 748# CONFIG_NETXEN_NIC is not set
712 749# CONFIG_MLX4_CORE is not set
713#
714# Token Ring devices
715#
716# CONFIG_TR is not set 750# CONFIG_TR is not set
717 751
718# 752#
719# Wireless LAN (non-hamradio) 753# Wireless LAN
720# 754#
721# CONFIG_NET_RADIO is not set 755# CONFIG_WLAN_PRE80211 is not set
756# CONFIG_WLAN_80211 is not set
722 757
723# 758#
724# Wan interfaces 759# USB Network Adapters
725# 760#
761# CONFIG_USB_CATC is not set
762# CONFIG_USB_KAWETH is not set
763# CONFIG_USB_PEGASUS is not set
764# CONFIG_USB_RTL8150 is not set
765# CONFIG_USB_USBNET_MII is not set
766# CONFIG_USB_USBNET is not set
726# CONFIG_WAN is not set 767# CONFIG_WAN is not set
727# CONFIG_FDDI is not set 768# CONFIG_FDDI is not set
728# CONFIG_HIPPI is not set 769# CONFIG_HIPPI is not set
@@ -758,6 +799,7 @@ CONFIG_SLHC=m
758# 799#
759CONFIG_INPUT=y 800CONFIG_INPUT=y
760# CONFIG_INPUT_FF_MEMLESS is not set 801# CONFIG_INPUT_FF_MEMLESS is not set
802# CONFIG_INPUT_POLLDEV is not set
761 803
762# 804#
763# Userland interfaces 805# Userland interfaces
@@ -783,15 +825,28 @@ CONFIG_KEYBOARD_ATKBD=y
783# CONFIG_KEYBOARD_STOWAWAY is not set 825# CONFIG_KEYBOARD_STOWAWAY is not set
784CONFIG_INPUT_MOUSE=y 826CONFIG_INPUT_MOUSE=y
785CONFIG_MOUSE_PS2=y 827CONFIG_MOUSE_PS2=y
828CONFIG_MOUSE_PS2_ALPS=y
829CONFIG_MOUSE_PS2_LOGIPS2PP=y
830CONFIG_MOUSE_PS2_SYNAPTICS=y
831CONFIG_MOUSE_PS2_LIFEBOOK=y
832CONFIG_MOUSE_PS2_TRACKPOINT=y
833# CONFIG_MOUSE_PS2_TOUCHKIT is not set
786# CONFIG_MOUSE_SERIAL is not set 834# CONFIG_MOUSE_SERIAL is not set
835# CONFIG_MOUSE_APPLETOUCH is not set
787# CONFIG_MOUSE_INPORT is not set 836# CONFIG_MOUSE_INPORT is not set
788# CONFIG_MOUSE_LOGIBM is not set 837# CONFIG_MOUSE_LOGIBM is not set
789# CONFIG_MOUSE_PC110PAD is not set 838# CONFIG_MOUSE_PC110PAD is not set
790# CONFIG_MOUSE_VSXXXAA is not set 839# CONFIG_MOUSE_VSXXXAA is not set
791# CONFIG_INPUT_JOYSTICK is not set 840# CONFIG_INPUT_JOYSTICK is not set
841# CONFIG_INPUT_TABLET is not set
792# CONFIG_INPUT_TOUCHSCREEN is not set 842# CONFIG_INPUT_TOUCHSCREEN is not set
793CONFIG_INPUT_MISC=y 843CONFIG_INPUT_MISC=y
794# CONFIG_INPUT_PCSPKR is not set 844# CONFIG_INPUT_PCSPKR is not set
845# CONFIG_INPUT_ATI_REMOTE is not set
846# CONFIG_INPUT_ATI_REMOTE2 is not set
847# CONFIG_INPUT_KEYSPAN_REMOTE is not set
848# CONFIG_INPUT_POWERMATE is not set
849# CONFIG_INPUT_YEALINK is not set
795CONFIG_INPUT_UINPUT=y 850CONFIG_INPUT_UINPUT=y
796 851
797# 852#
@@ -831,6 +886,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
831CONFIG_SERIAL_CORE=y 886CONFIG_SERIAL_CORE=y
832CONFIG_SERIAL_CORE_CONSOLE=y 887CONFIG_SERIAL_CORE_CONSOLE=y
833# CONFIG_SERIAL_JSM is not set 888# CONFIG_SERIAL_JSM is not set
889# CONFIG_SERIAL_OF_PLATFORM is not set
834CONFIG_UNIX98_PTYS=y 890CONFIG_UNIX98_PTYS=y
835CONFIG_LEGACY_PTYS=y 891CONFIG_LEGACY_PTYS=y
836CONFIG_LEGACY_PTY_COUNT=256 892CONFIG_LEGACY_PTY_COUNT=256
@@ -841,10 +897,6 @@ CONFIG_BRIQ_PANEL=m
841# IPMI 897# IPMI
842# 898#
843# CONFIG_IPMI_HANDLER is not set 899# CONFIG_IPMI_HANDLER is not set
844
845#
846# Watchdog Cards
847#
848# CONFIG_WATCHDOG is not set 900# CONFIG_WATCHDOG is not set
849# CONFIG_HW_RANDOM is not set 901# CONFIG_HW_RANDOM is not set
850CONFIG_NVRAM=y 902CONFIG_NVRAM=y
@@ -861,11 +913,9 @@ CONFIG_GEN_RTC=y
861# TPM devices 913# TPM devices
862# 914#
863# CONFIG_TCG_TPM is not set 915# CONFIG_TCG_TPM is not set
864 916CONFIG_DEVPORT=y
865#
866# I2C support
867#
868CONFIG_I2C=y 917CONFIG_I2C=y
918CONFIG_I2C_BOARDINFO=y
869# CONFIG_I2C_CHARDEV is not set 919# CONFIG_I2C_CHARDEV is not set
870 920
871# 921#
@@ -893,10 +943,12 @@ CONFIG_I2C_ALGOBIT=y
893# CONFIG_I2C_PARPORT_LIGHT is not set 943# CONFIG_I2C_PARPORT_LIGHT is not set
894# CONFIG_I2C_PROSAVAGE is not set 944# CONFIG_I2C_PROSAVAGE is not set
895# CONFIG_I2C_SAVAGE4 is not set 945# CONFIG_I2C_SAVAGE4 is not set
946# CONFIG_I2C_SIMTEC is not set
896# CONFIG_I2C_SIS5595 is not set 947# CONFIG_I2C_SIS5595 is not set
897# CONFIG_I2C_SIS630 is not set 948# CONFIG_I2C_SIS630 is not set
898# CONFIG_I2C_SIS96X is not set 949# CONFIG_I2C_SIS96X is not set
899# CONFIG_I2C_STUB is not set 950# CONFIG_I2C_STUB is not set
951# CONFIG_I2C_TINY_USB is not set
900# CONFIG_I2C_VIA is not set 952# CONFIG_I2C_VIA is not set
901# CONFIG_I2C_VIAPRO is not set 953# CONFIG_I2C_VIAPRO is not set
902# CONFIG_I2C_VOODOO3 is not set 954# CONFIG_I2C_VOODOO3 is not set
@@ -928,37 +980,56 @@ CONFIG_I2C_ALGOBIT=y
928# Dallas's 1-wire bus 980# Dallas's 1-wire bus
929# 981#
930# CONFIG_W1 is not set 982# CONFIG_W1 is not set
983# CONFIG_HWMON is not set
931 984
932# 985#
933# Hardware Monitoring support 986# Multifunction device drivers
934# 987#
935# CONFIG_HWMON is not set 988# CONFIG_MFD_SM501 is not set
936# CONFIG_HWMON_VID is not set
937 989
938# 990#
939# Multimedia devices 991# Multimedia devices
940# 992#
941# CONFIG_VIDEO_DEV is not set 993# CONFIG_VIDEO_DEV is not set
994# CONFIG_DVB_CORE is not set
995# CONFIG_DAB is not set
942 996
943# 997#
944# Digital Video Broadcasting Devices 998# Graphics support
945# 999#
946# CONFIG_DVB is not set 1000CONFIG_BACKLIGHT_LCD_SUPPORT=y
947# CONFIG_USB_DABUSB is not set 1001CONFIG_BACKLIGHT_CLASS_DEVICE=y
1002CONFIG_LCD_CLASS_DEVICE=m
948 1003
949# 1004#
950# Graphics support 1005# Display device support
951# 1006#
952CONFIG_FIRMWARE_EDID=y 1007CONFIG_DISPLAY_SUPPORT=m
1008
1009#
1010# Display hardware drivers
1011#
1012# CONFIG_VGASTATE is not set
953CONFIG_FB=y 1013CONFIG_FB=y
1014CONFIG_FIRMWARE_EDID=y
954CONFIG_FB_DDC=y 1015CONFIG_FB_DDC=y
955CONFIG_FB_CFB_FILLRECT=y 1016CONFIG_FB_CFB_FILLRECT=y
956CONFIG_FB_CFB_COPYAREA=y 1017CONFIG_FB_CFB_COPYAREA=y
957CONFIG_FB_CFB_IMAGEBLIT=y 1018CONFIG_FB_CFB_IMAGEBLIT=y
1019# CONFIG_FB_SYS_FILLRECT is not set
1020# CONFIG_FB_SYS_COPYAREA is not set
1021# CONFIG_FB_SYS_IMAGEBLIT is not set
1022# CONFIG_FB_SYS_FOPS is not set
1023CONFIG_FB_DEFERRED_IO=y
1024# CONFIG_FB_SVGALIB is not set
958CONFIG_FB_MACMODES=y 1025CONFIG_FB_MACMODES=y
959# CONFIG_FB_BACKLIGHT is not set 1026CONFIG_FB_BACKLIGHT=y
960CONFIG_FB_MODE_HELPERS=y 1027CONFIG_FB_MODE_HELPERS=y
961CONFIG_FB_TILEBLITTING=y 1028CONFIG_FB_TILEBLITTING=y
1029
1030#
1031# Frame buffer hardware drivers
1032#
962# CONFIG_FB_CIRRUS is not set 1033# CONFIG_FB_CIRRUS is not set
963# CONFIG_FB_PM2 is not set 1034# CONFIG_FB_PM2 is not set
964# CONFIG_FB_CYBER2000 is not set 1035# CONFIG_FB_CYBER2000 is not set
@@ -978,12 +1049,15 @@ CONFIG_FB_MATROX_G=y
978# CONFIG_FB_MATROX_MULTIHEAD is not set 1049# CONFIG_FB_MATROX_MULTIHEAD is not set
979CONFIG_FB_RADEON=y 1050CONFIG_FB_RADEON=y
980CONFIG_FB_RADEON_I2C=y 1051CONFIG_FB_RADEON_I2C=y
1052CONFIG_FB_RADEON_BACKLIGHT=y
981# CONFIG_FB_RADEON_DEBUG is not set 1053# CONFIG_FB_RADEON_DEBUG is not set
982# CONFIG_FB_ATY128 is not set 1054# CONFIG_FB_ATY128 is not set
983CONFIG_FB_ATY=y 1055CONFIG_FB_ATY=y
984CONFIG_FB_ATY_CT=y 1056CONFIG_FB_ATY_CT=y
985# CONFIG_FB_ATY_GENERIC_LCD is not set 1057# CONFIG_FB_ATY_GENERIC_LCD is not set
986CONFIG_FB_ATY_GX=y 1058CONFIG_FB_ATY_GX=y
1059CONFIG_FB_ATY_BACKLIGHT=y
1060# CONFIG_FB_S3 is not set
987# CONFIG_FB_SAVAGE is not set 1061# CONFIG_FB_SAVAGE is not set
988# CONFIG_FB_SIS is not set 1062# CONFIG_FB_SIS is not set
989# CONFIG_FB_NEOMAGIC is not set 1063# CONFIG_FB_NEOMAGIC is not set
@@ -991,7 +1065,10 @@ CONFIG_FB_ATY_GX=y
991CONFIG_FB_3DFX=y 1065CONFIG_FB_3DFX=y
992# CONFIG_FB_3DFX_ACCEL is not set 1066# CONFIG_FB_3DFX_ACCEL is not set
993# CONFIG_FB_VOODOO1 is not set 1067# CONFIG_FB_VOODOO1 is not set
1068# CONFIG_FB_VT8623 is not set
994# CONFIG_FB_TRIDENT is not set 1069# CONFIG_FB_TRIDENT is not set
1070# CONFIG_FB_ARK is not set
1071# CONFIG_FB_PM3 is not set
995# CONFIG_FB_IBM_GXT4500 is not set 1072# CONFIG_FB_IBM_GXT4500 is not set
996# CONFIG_FB_VIRTUAL is not set 1073# CONFIG_FB_VIRTUAL is not set
997 1074
@@ -1007,15 +1084,10 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
1007# CONFIG_FONTS is not set 1084# CONFIG_FONTS is not set
1008CONFIG_FONT_8x8=y 1085CONFIG_FONT_8x8=y
1009CONFIG_FONT_8x16=y 1086CONFIG_FONT_8x16=y
1010
1011#
1012# Logo configuration
1013#
1014CONFIG_LOGO=y 1087CONFIG_LOGO=y
1015CONFIG_LOGO_LINUX_MONO=y 1088CONFIG_LOGO_LINUX_MONO=y
1016CONFIG_LOGO_LINUX_VGA16=y 1089CONFIG_LOGO_LINUX_VGA16=y
1017CONFIG_LOGO_LINUX_CLUT224=y 1090CONFIG_LOGO_LINUX_CLUT224=y
1018# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1019 1091
1020# 1092#
1021# Sound 1093# Sound
@@ -1026,6 +1098,15 @@ CONFIG_LOGO_LINUX_CLUT224=y
1026# HID Devices 1098# HID Devices
1027# 1099#
1028CONFIG_HID=y 1100CONFIG_HID=y
1101# CONFIG_HID_DEBUG is not set
1102
1103#
1104# USB Input Devices
1105#
1106CONFIG_USB_HID=y
1107# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1108# CONFIG_HID_FF is not set
1109# CONFIG_USB_HIDDEV is not set
1029 1110
1030# 1111#
1031# USB support 1112# USB support
@@ -1040,9 +1121,8 @@ CONFIG_USB=y
1040# Miscellaneous USB options 1121# Miscellaneous USB options
1041# 1122#
1042CONFIG_USB_DEVICEFS=y 1123CONFIG_USB_DEVICEFS=y
1043# CONFIG_USB_BANDWIDTH is not set 1124CONFIG_USB_DEVICE_CLASS=y
1044# CONFIG_USB_DYNAMIC_MINORS is not set 1125# CONFIG_USB_DYNAMIC_MINORS is not set
1045# CONFIG_USB_MULTITHREAD_PROBE is not set
1046# CONFIG_USB_OTG is not set 1126# CONFIG_USB_OTG is not set
1047 1127
1048# 1128#
@@ -1052,9 +1132,12 @@ CONFIG_USB_EHCI_HCD=m
1052# CONFIG_USB_EHCI_SPLIT_ISO is not set 1132# CONFIG_USB_EHCI_SPLIT_ISO is not set
1053# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1133# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1054# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1134# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1135# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1055# CONFIG_USB_ISP116X_HCD is not set 1136# CONFIG_USB_ISP116X_HCD is not set
1056CONFIG_USB_OHCI_HCD=y 1137CONFIG_USB_OHCI_HCD=y
1057# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1138# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1139# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1140# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1058CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1141CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1059CONFIG_USB_UHCI_HCD=y 1142CONFIG_USB_UHCI_HCD=y
1060# CONFIG_USB_SL811_HCD is not set 1143# CONFIG_USB_SL811_HCD is not set
@@ -1088,40 +1171,10 @@ CONFIG_USB_STORAGE=m
1088# CONFIG_USB_LIBUSUAL is not set 1171# CONFIG_USB_LIBUSUAL is not set
1089 1172
1090# 1173#
1091# USB Input Devices
1092#
1093CONFIG_USB_HID=y
1094# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1095# CONFIG_HID_FF is not set
1096# CONFIG_USB_HIDDEV is not set
1097# CONFIG_USB_AIPTEK is not set
1098# CONFIG_USB_WACOM is not set
1099# CONFIG_USB_ACECAD is not set
1100# CONFIG_USB_KBTAB is not set
1101# CONFIG_USB_POWERMATE is not set
1102# CONFIG_USB_TOUCHSCREEN is not set
1103# CONFIG_USB_YEALINK is not set
1104# CONFIG_USB_XPAD is not set
1105# CONFIG_USB_ATI_REMOTE is not set
1106# CONFIG_USB_ATI_REMOTE2 is not set
1107# CONFIG_USB_KEYSPAN_REMOTE is not set
1108# CONFIG_USB_APPLETOUCH is not set
1109
1110#
1111# USB Imaging devices 1174# USB Imaging devices
1112# 1175#
1113# CONFIG_USB_MDC800 is not set 1176# CONFIG_USB_MDC800 is not set
1114# CONFIG_USB_MICROTEK is not set 1177# CONFIG_USB_MICROTEK is not set
1115
1116#
1117# USB Network Adapters
1118#
1119# CONFIG_USB_CATC is not set
1120# CONFIG_USB_KAWETH is not set
1121# CONFIG_USB_PEGASUS is not set
1122# CONFIG_USB_RTL8150 is not set
1123# CONFIG_USB_USBNET_MII is not set
1124# CONFIG_USB_USBNET is not set
1125CONFIG_USB_MON=y 1178CONFIG_USB_MON=y
1126 1179
1127# 1180#
@@ -1143,6 +1196,7 @@ CONFIG_USB_MON=y
1143# CONFIG_USB_RIO500 is not set 1196# CONFIG_USB_RIO500 is not set
1144# CONFIG_USB_LEGOTOWER is not set 1197# CONFIG_USB_LEGOTOWER is not set
1145# CONFIG_USB_LCD is not set 1198# CONFIG_USB_LCD is not set
1199# CONFIG_USB_BERRY_CHARGE is not set
1146# CONFIG_USB_LED is not set 1200# CONFIG_USB_LED is not set
1147# CONFIG_USB_CYPRESS_CY7C63 is not set 1201# CONFIG_USB_CYPRESS_CY7C63 is not set
1148# CONFIG_USB_CYTHERM is not set 1202# CONFIG_USB_CYTHERM is not set
@@ -1153,6 +1207,7 @@ CONFIG_USB_MON=y
1153# CONFIG_USB_SISUSBVGA is not set 1207# CONFIG_USB_SISUSBVGA is not set
1154# CONFIG_USB_LD is not set 1208# CONFIG_USB_LD is not set
1155# CONFIG_USB_TRANCEVIBRATOR is not set 1209# CONFIG_USB_TRANCEVIBRATOR is not set
1210# CONFIG_USB_IOWARRIOR is not set
1156# CONFIG_USB_TEST is not set 1211# CONFIG_USB_TEST is not set
1157 1212
1158# 1213#
@@ -1163,10 +1218,6 @@ CONFIG_USB_MON=y
1163# USB Gadget Support 1218# USB Gadget Support
1164# 1219#
1165# CONFIG_USB_GADGET is not set 1220# CONFIG_USB_GADGET is not set
1166
1167#
1168# MMC/SD Card support
1169#
1170# CONFIG_MMC is not set 1221# CONFIG_MMC is not set
1171 1222
1172# 1223#
@@ -1210,10 +1261,6 @@ CONFIG_USB_MON=y
1210# 1261#
1211 1262
1212# 1263#
1213# Virtualization
1214#
1215
1216#
1217# File systems 1264# File systems
1218# 1265#
1219CONFIG_EXT2_FS=y 1266CONFIG_EXT2_FS=y
@@ -1323,6 +1370,7 @@ CONFIG_MSDOS_PARTITION=y
1323# CONFIG_SUN_PARTITION is not set 1370# CONFIG_SUN_PARTITION is not set
1324# CONFIG_KARMA_PARTITION is not set 1371# CONFIG_KARMA_PARTITION is not set
1325# CONFIG_EFI_PARTITION is not set 1372# CONFIG_EFI_PARTITION is not set
1373# CONFIG_SYSV68_PARTITION is not set
1326 1374
1327# 1375#
1328# Native Language Support 1376# Native Language Support
@@ -1372,6 +1420,7 @@ CONFIG_NLS_ISO8859_1=m
1372# Distributed Lock Manager 1420# Distributed Lock Manager
1373# 1421#
1374# CONFIG_DLM is not set 1422# CONFIG_DLM is not set
1423# CONFIG_UCC_SLOW is not set
1375 1424
1376# 1425#
1377# Library routines 1426# Library routines
@@ -1379,17 +1428,21 @@ CONFIG_NLS_ISO8859_1=m
1379CONFIG_BITREVERSE=y 1428CONFIG_BITREVERSE=y
1380CONFIG_CRC_CCITT=m 1429CONFIG_CRC_CCITT=m
1381# CONFIG_CRC16 is not set 1430# CONFIG_CRC16 is not set
1431# CONFIG_CRC_ITU_T is not set
1382CONFIG_CRC32=y 1432CONFIG_CRC32=y
1383# CONFIG_LIBCRC32C is not set 1433# CONFIG_LIBCRC32C is not set
1384CONFIG_ZLIB_INFLATE=m 1434CONFIG_ZLIB_INFLATE=m
1385CONFIG_ZLIB_DEFLATE=m 1435CONFIG_ZLIB_DEFLATE=m
1386CONFIG_PLIST=y 1436CONFIG_PLIST=y
1387CONFIG_IOMAP_COPY=y 1437CONFIG_HAS_IOMEM=y
1438CONFIG_HAS_IOPORT=y
1439CONFIG_HAS_DMA=y
1388 1440
1389# 1441#
1390# Instrumentation Support 1442# Instrumentation Support
1391# 1443#
1392# CONFIG_PROFILING is not set 1444# CONFIG_PROFILING is not set
1445# CONFIG_KPROBES is not set
1393 1446
1394# 1447#
1395# Kernel hacking 1448# Kernel hacking
@@ -1401,15 +1454,15 @@ CONFIG_MAGIC_SYSRQ=y
1401# CONFIG_DEBUG_FS is not set 1454# CONFIG_DEBUG_FS is not set
1402# CONFIG_HEADERS_CHECK is not set 1455# CONFIG_HEADERS_CHECK is not set
1403CONFIG_DEBUG_KERNEL=y 1456CONFIG_DEBUG_KERNEL=y
1404CONFIG_LOG_BUF_SHIFT=15 1457# CONFIG_DEBUG_SHIRQ is not set
1405CONFIG_DETECT_SOFTLOCKUP=y 1458CONFIG_DETECT_SOFTLOCKUP=y
1406# CONFIG_SCHEDSTATS is not set 1459# CONFIG_SCHEDSTATS is not set
1460# CONFIG_TIMER_STATS is not set
1407# CONFIG_DEBUG_SLAB is not set 1461# CONFIG_DEBUG_SLAB is not set
1408# CONFIG_DEBUG_RT_MUTEXES is not set 1462# CONFIG_DEBUG_RT_MUTEXES is not set
1409# CONFIG_RT_MUTEX_TESTER is not set 1463# CONFIG_RT_MUTEX_TESTER is not set
1410# CONFIG_DEBUG_SPINLOCK is not set 1464# CONFIG_DEBUG_SPINLOCK is not set
1411CONFIG_DEBUG_MUTEXES=y 1465CONFIG_DEBUG_MUTEXES=y
1412# CONFIG_DEBUG_RWSEMS is not set
1413CONFIG_DEBUG_SPINLOCK_SLEEP=y 1466CONFIG_DEBUG_SPINLOCK_SLEEP=y
1414# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1467# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1415# CONFIG_DEBUG_KOBJECT is not set 1468# CONFIG_DEBUG_KOBJECT is not set
@@ -1420,6 +1473,10 @@ CONFIG_DEBUG_BUGVERBOSE=y
1420# CONFIG_DEBUG_LIST is not set 1473# CONFIG_DEBUG_LIST is not set
1421CONFIG_FORCED_INLINING=y 1474CONFIG_FORCED_INLINING=y
1422# CONFIG_RCU_TORTURE_TEST is not set 1475# CONFIG_RCU_TORTURE_TEST is not set
1476# CONFIG_FAULT_INJECTION is not set
1477# CONFIG_DEBUG_STACKOVERFLOW is not set
1478# CONFIG_DEBUG_STACK_USAGE is not set
1479# CONFIG_DEBUG_PAGEALLOC is not set
1423CONFIG_DEBUGGER=y 1480CONFIG_DEBUGGER=y
1424CONFIG_XMON=y 1481CONFIG_XMON=y
1425CONFIG_XMON_DEFAULT=y 1482CONFIG_XMON_DEFAULT=y
@@ -1454,8 +1511,11 @@ CONFIG_CRYPTO_SHA1=m
1454# CONFIG_CRYPTO_GF128MUL is not set 1511# CONFIG_CRYPTO_GF128MUL is not set
1455CONFIG_CRYPTO_ECB=m 1512CONFIG_CRYPTO_ECB=m
1456CONFIG_CRYPTO_CBC=m 1513CONFIG_CRYPTO_CBC=m
1514CONFIG_CRYPTO_PCBC=m
1457# CONFIG_CRYPTO_LRW is not set 1515# CONFIG_CRYPTO_LRW is not set
1516# CONFIG_CRYPTO_CRYPTD is not set
1458# CONFIG_CRYPTO_DES is not set 1517# CONFIG_CRYPTO_DES is not set
1518# CONFIG_CRYPTO_FCRYPT is not set
1459# CONFIG_CRYPTO_BLOWFISH is not set 1519# CONFIG_CRYPTO_BLOWFISH is not set
1460# CONFIG_CRYPTO_TWOFISH is not set 1520# CONFIG_CRYPTO_TWOFISH is not set
1461# CONFIG_CRYPTO_SERPENT is not set 1521# CONFIG_CRYPTO_SERPENT is not set
@@ -1469,6 +1529,7 @@ CONFIG_CRYPTO_ARC4=m
1469# CONFIG_CRYPTO_DEFLATE is not set 1529# CONFIG_CRYPTO_DEFLATE is not set
1470# CONFIG_CRYPTO_MICHAEL_MIC is not set 1530# CONFIG_CRYPTO_MICHAEL_MIC is not set
1471# CONFIG_CRYPTO_CRC32C is not set 1531# CONFIG_CRYPTO_CRC32C is not set
1532# CONFIG_CRYPTO_CAMELLIA is not set
1472# CONFIG_CRYPTO_TEST is not set 1533# CONFIG_CRYPTO_TEST is not set
1473 1534
1474# 1535#
diff --git a/arch/powerpc/configs/ebony_defconfig b/arch/powerpc/configs/ebony_defconfig
index c3b96ef3c2d1..5762cddfc148 100644
--- a/arch/powerpc/configs/ebony_defconfig
+++ b/arch/powerpc/configs/ebony_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.21 3# Linux kernel version: 2.6.22-rc6
4# Fri May 4 13:47:08 2007 4# Tue Jun 26 12:38:33 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_4xx=y
45CONFIG_BOOKE=y 45CONFIG_BOOKE=y
46CONFIG_PTE_64BIT=y 46CONFIG_PTE_64BIT=y
47CONFIG_PHYS_64BIT=y 47CONFIG_PHYS_64BIT=y
48# CONFIG_PPC_MM_SLICES is not set
48CONFIG_NOT_COHERENT_CACHE=y 49CONFIG_NOT_COHERENT_CACHE=y
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -70,6 +71,7 @@ CONFIG_POSIX_MQUEUE=y
70# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
75CONFIG_BLK_DEV_INITRD=y 77CONFIG_BLK_DEV_INITRD=y
@@ -87,14 +89,19 @@ CONFIG_BUG=y
87CONFIG_ELF_CORE=y 89CONFIG_ELF_CORE=y
88CONFIG_BASE_FULL=y 90CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y 91CONFIG_FUTEX=y
92CONFIG_ANON_INODES=y
90CONFIG_EPOLL=y 93CONFIG_EPOLL=y
94CONFIG_SIGNALFD=y
95CONFIG_TIMERFD=y
96CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 97CONFIG_SHMEM=y
92CONFIG_SLAB=y
93CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLAB=y
100# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set
94CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
95# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
96CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
97# CONFIG_SLOB is not set
98 105
99# 106#
100# Loadable module support 107# Loadable module support
@@ -193,16 +200,14 @@ CONFIG_PPC_INDIRECT_PCI=y
193CONFIG_PCI=y 200CONFIG_PCI=y
194CONFIG_PCI_DOMAINS=y 201CONFIG_PCI_DOMAINS=y
195# CONFIG_PCIEPORTBUS is not set 202# CONFIG_PCIEPORTBUS is not set
203CONFIG_ARCH_SUPPORTS_MSI=y
204# CONFIG_PCI_MSI is not set
196# CONFIG_PCI_DEBUG is not set 205# CONFIG_PCI_DEBUG is not set
197 206
198# 207#
199# PCCARD (PCMCIA/CardBus) support 208# PCCARD (PCMCIA/CardBus) support
200# 209#
201# CONFIG_PCCARD is not set 210# CONFIG_PCCARD is not set
202
203#
204# PCI Hotplug Support
205#
206# CONFIG_HOTPLUG_PCI is not set 211# CONFIG_HOTPLUG_PCI is not set
207 212
208# 213#
@@ -264,20 +269,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
264# CONFIG_INET6_TUNNEL is not set 269# CONFIG_INET6_TUNNEL is not set
265# CONFIG_NETWORK_SECMARK is not set 270# CONFIG_NETWORK_SECMARK is not set
266# CONFIG_NETFILTER is not set 271# CONFIG_NETFILTER is not set
267
268#
269# DCCP Configuration (EXPERIMENTAL)
270#
271# CONFIG_IP_DCCP is not set 272# CONFIG_IP_DCCP is not set
272
273#
274# SCTP Configuration (EXPERIMENTAL)
275#
276# CONFIG_IP_SCTP is not set 273# CONFIG_IP_SCTP is not set
277
278#
279# TIPC Configuration (EXPERIMENTAL)
280#
281# CONFIG_TIPC is not set 274# CONFIG_TIPC is not set
282# CONFIG_ATM is not set 275# CONFIG_ATM is not set
283# CONFIG_BRIDGE is not set 276# CONFIG_BRIDGE is not set
@@ -310,7 +303,9 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
310# 303#
311# CONFIG_CFG80211 is not set 304# CONFIG_CFG80211 is not set
312# CONFIG_WIRELESS_EXT is not set 305# CONFIG_WIRELESS_EXT is not set
306# CONFIG_MAC80211 is not set
313# CONFIG_IEEE80211 is not set 307# CONFIG_IEEE80211 is not set
308# CONFIG_RFKILL is not set
314 309
315# 310#
316# Device Drivers 311# Device Drivers
@@ -365,12 +360,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
365# 360#
366# Misc devices 361# Misc devices
367# 362#
363# CONFIG_PHANTOM is not set
368# CONFIG_SGI_IOC4 is not set 364# CONFIG_SGI_IOC4 is not set
369# CONFIG_TIFM_CORE is not set 365# CONFIG_TIFM_CORE is not set
370 366# CONFIG_BLINK is not set
371#
372# ATA/ATAPI/MFM/RLL support
373#
374# CONFIG_IDE is not set 367# CONFIG_IDE is not set
375 368
376# 369#
@@ -379,10 +372,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
379# CONFIG_RAID_ATTRS is not set 372# CONFIG_RAID_ATTRS is not set
380# CONFIG_SCSI is not set 373# CONFIG_SCSI is not set
381# CONFIG_SCSI_NETLINK is not set 374# CONFIG_SCSI_NETLINK is not set
382
383#
384# Serial ATA (prod) and Parallel ATA (experimental) drivers
385#
386# CONFIG_ATA is not set 375# CONFIG_ATA is not set
387 376
388# 377#
@@ -398,6 +387,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
398# 387#
399# IEEE 1394 (FireWire) support 388# IEEE 1394 (FireWire) support
400# 389#
390# CONFIG_FIREWIRE is not set
401# CONFIG_IEEE1394 is not set 391# CONFIG_IEEE1394 is not set
402 392
403# 393#
@@ -414,35 +404,21 @@ CONFIG_NETDEVICES=y
414# CONFIG_BONDING is not set 404# CONFIG_BONDING is not set
415# CONFIG_EQUALIZER is not set 405# CONFIG_EQUALIZER is not set
416# CONFIG_TUN is not set 406# CONFIG_TUN is not set
417
418#
419# ARCnet devices
420#
421# CONFIG_ARCNET is not set 407# CONFIG_ARCNET is not set
422 408
423# 409#
424# PHY device support
425#
426
427#
428# Ethernet (10 or 100Mbit) 410# Ethernet (10 or 100Mbit)
429# 411#
430# CONFIG_NET_ETHERNET is not set 412# CONFIG_NET_ETHERNET is not set
431CONFIG_IBM_NEW_EMAC=y 413CONFIG_IBM_EMAC=y
432CONFIG_IBM_NEW_EMAC_RXB=128 414CONFIG_IBM_EMAC_RXB=128
433CONFIG_IBM_NEW_EMAC_TXB=64 415CONFIG_IBM_EMAC_TXB=64
434CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32 416CONFIG_IBM_EMAC_POLL_WEIGHT=32
435CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256 417CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256
436CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0 418CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0
437# CONFIG_IBM_NEW_EMAC_DEBUG is not set 419# CONFIG_IBM_EMAC_DEBUG is not set
438CONFIG_IBM_NEW_EMAC_ZMII=y 420CONFIG_IBM_EMAC_ZMII=y
439# CONFIG_IBM_NEW_EMAC_RGMII is not set 421CONFIG_NETDEV_1000=y
440# CONFIG_IBM_NEW_EMAC_TAH is not set
441# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
442
443#
444# Ethernet (1000 Mbit)
445#
446# CONFIG_ACENIC is not set 422# CONFIG_ACENIC is not set
447# CONFIG_DL2K is not set 423# CONFIG_DL2K is not set
448# CONFIG_E1000 is not set 424# CONFIG_E1000 is not set
@@ -454,24 +430,19 @@ CONFIG_IBM_NEW_EMAC_ZMII=y
454# CONFIG_SKGE is not set 430# CONFIG_SKGE is not set
455# CONFIG_SKY2 is not set 431# CONFIG_SKY2 is not set
456# CONFIG_SK98LIN is not set 432# CONFIG_SK98LIN is not set
433# CONFIG_VIA_VELOCITY is not set
457# CONFIG_TIGON3 is not set 434# CONFIG_TIGON3 is not set
458# CONFIG_BNX2 is not set 435# CONFIG_BNX2 is not set
459# CONFIG_QLA3XXX is not set 436# CONFIG_QLA3XXX is not set
460# CONFIG_ATL1 is not set 437# CONFIG_ATL1 is not set
461 438CONFIG_NETDEV_10000=y
462#
463# Ethernet (10000 Mbit)
464#
465# CONFIG_CHELSIO_T1 is not set 439# CONFIG_CHELSIO_T1 is not set
466# CONFIG_CHELSIO_T3 is not set 440# CONFIG_CHELSIO_T3 is not set
467# CONFIG_IXGB is not set 441# CONFIG_IXGB is not set
468# CONFIG_S2IO is not set 442# CONFIG_S2IO is not set
469# CONFIG_MYRI10GE is not set 443# CONFIG_MYRI10GE is not set
470# CONFIG_NETXEN_NIC is not set 444# CONFIG_NETXEN_NIC is not set
471 445# CONFIG_MLX4_CORE is not set
472#
473# Token Ring devices
474#
475# CONFIG_TR is not set 446# CONFIG_TR is not set
476 447
477# 448#
@@ -479,10 +450,6 @@ CONFIG_IBM_NEW_EMAC_ZMII=y
479# 450#
480# CONFIG_WLAN_PRE80211 is not set 451# CONFIG_WLAN_PRE80211 is not set
481# CONFIG_WLAN_80211 is not set 452# CONFIG_WLAN_80211 is not set
482
483#
484# Wan interfaces
485#
486# CONFIG_WAN is not set 453# CONFIG_WAN is not set
487# CONFIG_FDDI is not set 454# CONFIG_FDDI is not set
488# CONFIG_HIPPI is not set 455# CONFIG_HIPPI is not set
@@ -550,15 +517,10 @@ CONFIG_LEGACY_PTY_COUNT=256
550# IPMI 517# IPMI
551# 518#
552# CONFIG_IPMI_HANDLER is not set 519# CONFIG_IPMI_HANDLER is not set
553
554#
555# Watchdog Cards
556#
557# CONFIG_WATCHDOG is not set 520# CONFIG_WATCHDOG is not set
558# CONFIG_HW_RANDOM is not set 521# CONFIG_HW_RANDOM is not set
559# CONFIG_NVRAM is not set 522# CONFIG_NVRAM is not set
560# CONFIG_GEN_RTC is not set 523# CONFIG_GEN_RTC is not set
561# CONFIG_DTLK is not set
562# CONFIG_R3964 is not set 524# CONFIG_R3964 is not set
563# CONFIG_APPLICOM is not set 525# CONFIG_APPLICOM is not set
564# CONFIG_AGP is not set 526# CONFIG_AGP is not set
@@ -569,10 +531,7 @@ CONFIG_LEGACY_PTY_COUNT=256
569# TPM devices 531# TPM devices
570# 532#
571# CONFIG_TCG_TPM is not set 533# CONFIG_TCG_TPM is not set
572 534CONFIG_DEVPORT=y
573#
574# I2C support
575#
576# CONFIG_I2C is not set 535# CONFIG_I2C is not set
577 536
578# 537#
@@ -585,12 +544,7 @@ CONFIG_LEGACY_PTY_COUNT=256
585# Dallas's 1-wire bus 544# Dallas's 1-wire bus
586# 545#
587# CONFIG_W1 is not set 546# CONFIG_W1 is not set
588
589#
590# Hardware Monitoring support
591#
592# CONFIG_HWMON is not set 547# CONFIG_HWMON is not set
593# CONFIG_HWMON_VID is not set
594 548
595# 549#
596# Multifunction device drivers 550# Multifunction device drivers
@@ -601,16 +555,19 @@ CONFIG_LEGACY_PTY_COUNT=256
601# Multimedia devices 555# Multimedia devices
602# 556#
603# CONFIG_VIDEO_DEV is not set 557# CONFIG_VIDEO_DEV is not set
558# CONFIG_DVB_CORE is not set
559# CONFIG_DAB is not set
604 560
605# 561#
606# Digital Video Broadcasting Devices 562# Graphics support
607# 563#
608# CONFIG_DVB is not set 564# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
609 565
610# 566#
611# Graphics support 567# Display device support
612# 568#
613# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 569# CONFIG_DISPLAY_SUPPORT is not set
570# CONFIG_VGASTATE is not set
614# CONFIG_FB is not set 571# CONFIG_FB is not set
615# CONFIG_FB_IBM_GXT4500 is not set 572# CONFIG_FB_IBM_GXT4500 is not set
616 573
@@ -635,10 +592,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
635# USB Gadget Support 592# USB Gadget Support
636# 593#
637# CONFIG_USB_GADGET is not set 594# CONFIG_USB_GADGET is not set
638
639#
640# MMC/SD Card support
641#
642# CONFIG_MMC is not set 595# CONFIG_MMC is not set
643 596
644# 597#
@@ -682,14 +635,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
682# 635#
683 636
684# 637#
685# Auxiliary Display support
686#
687
688#
689# Virtualization
690#
691
692#
693# File systems 638# File systems
694# 639#
695CONFIG_EXT2_FS=y 640CONFIG_EXT2_FS=y
@@ -770,6 +715,7 @@ CONFIG_LOCKD=y
770CONFIG_LOCKD_V4=y 715CONFIG_LOCKD_V4=y
771CONFIG_NFS_COMMON=y 716CONFIG_NFS_COMMON=y
772CONFIG_SUNRPC=y 717CONFIG_SUNRPC=y
718# CONFIG_SUNRPC_BIND34 is not set
773# CONFIG_RPCSEC_GSS_KRB5 is not set 719# CONFIG_RPCSEC_GSS_KRB5 is not set
774# CONFIG_RPCSEC_GSS_SPKM3 is not set 720# CONFIG_RPCSEC_GSS_SPKM3 is not set
775# CONFIG_SMB_FS is not set 721# CONFIG_SMB_FS is not set
@@ -795,7 +741,6 @@ CONFIG_MSDOS_PARTITION=y
795# 741#
796# CONFIG_DLM is not set 742# CONFIG_DLM is not set
797# CONFIG_UCC_SLOW is not set 743# CONFIG_UCC_SLOW is not set
798# CONFIG_UCC_FAST is not set
799 744
800# 745#
801# Library routines 746# Library routines
@@ -803,12 +748,14 @@ CONFIG_MSDOS_PARTITION=y
803CONFIG_BITREVERSE=y 748CONFIG_BITREVERSE=y
804# CONFIG_CRC_CCITT is not set 749# CONFIG_CRC_CCITT is not set
805# CONFIG_CRC16 is not set 750# CONFIG_CRC16 is not set
751# CONFIG_CRC_ITU_T is not set
806CONFIG_CRC32=y 752CONFIG_CRC32=y
807# CONFIG_LIBCRC32C is not set 753# CONFIG_LIBCRC32C is not set
808CONFIG_ZLIB_INFLATE=y 754CONFIG_ZLIB_INFLATE=y
809CONFIG_PLIST=y 755CONFIG_PLIST=y
810CONFIG_HAS_IOMEM=y 756CONFIG_HAS_IOMEM=y
811CONFIG_HAS_IOPORT=y 757CONFIG_HAS_IOPORT=y
758CONFIG_HAS_DMA=y
812 759
813# 760#
814# Instrumentation Support 761# Instrumentation Support
@@ -826,7 +773,6 @@ CONFIG_MAGIC_SYSRQ=y
826# CONFIG_HEADERS_CHECK is not set 773# CONFIG_HEADERS_CHECK is not set
827CONFIG_DEBUG_KERNEL=y 774CONFIG_DEBUG_KERNEL=y
828# CONFIG_DEBUG_SHIRQ is not set 775# CONFIG_DEBUG_SHIRQ is not set
829CONFIG_LOG_BUF_SHIFT=14
830CONFIG_DETECT_SOFTLOCKUP=y 776CONFIG_DETECT_SOFTLOCKUP=y
831# CONFIG_SCHEDSTATS is not set 777# CONFIG_SCHEDSTATS is not set
832# CONFIG_TIMER_STATS is not set 778# CONFIG_TIMER_STATS is not set
@@ -851,7 +797,6 @@ CONFIG_FORCED_INLINING=y
851# CONFIG_DEBUGGER is not set 797# CONFIG_DEBUGGER is not set
852# CONFIG_BDI_SWITCH is not set 798# CONFIG_BDI_SWITCH is not set
853# CONFIG_BOOTX_TEXT is not set 799# CONFIG_BOOTX_TEXT is not set
854# CONFIG_SERIAL_TEXT_DEBUG is not set
855# CONFIG_PPC_EARLY_DEBUG is not set 800# CONFIG_PPC_EARLY_DEBUG is not set
856 801
857# 802#
@@ -882,6 +827,7 @@ CONFIG_CRYPTO_ECB=y
882CONFIG_CRYPTO_CBC=y 827CONFIG_CRYPTO_CBC=y
883CONFIG_CRYPTO_PCBC=y 828CONFIG_CRYPTO_PCBC=y
884# CONFIG_CRYPTO_LRW is not set 829# CONFIG_CRYPTO_LRW is not set
830# CONFIG_CRYPTO_CRYPTD is not set
885CONFIG_CRYPTO_DES=y 831CONFIG_CRYPTO_DES=y
886# CONFIG_CRYPTO_FCRYPT is not set 832# CONFIG_CRYPTO_FCRYPT is not set
887# CONFIG_CRYPTO_BLOWFISH is not set 833# CONFIG_CRYPTO_BLOWFISH is not set
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index 3ccf19d8da38..a217f4ebcf71 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_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.20-rc5 3# Linux kernel version: 2.6.22-rc6
4# Mon Jan 22 22:15:04 2007 4# Tue Jun 26 12:38:34 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -27,6 +27,7 @@ CONFIG_GENERIC_TBSYNC=y
27CONFIG_AUDIT_ARCH=y 27CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y 28CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set 29# CONFIG_DEFAULT_UIMAGE is not set
30CONFIG_PPC64_SWSUSP=y
30 31
31# 32#
32# Processor support 33# Processor support
@@ -39,6 +40,7 @@ CONFIG_PPC_FPU=y
39# CONFIG_PPC_OF_PLATFORM_PCI is not set 40# CONFIG_PPC_OF_PLATFORM_PCI is not set
40CONFIG_ALTIVEC=y 41CONFIG_ALTIVEC=y
41CONFIG_PPC_STD_MMU=y 42CONFIG_PPC_STD_MMU=y
43CONFIG_PPC_MM_SLICES=y
42CONFIG_VIRT_CPU_ACCOUNTING=y 44CONFIG_VIRT_CPU_ACCOUNTING=y
43CONFIG_SMP=y 45CONFIG_SMP=y
44CONFIG_NR_CPUS=4 46CONFIG_NR_CPUS=4
@@ -59,6 +61,7 @@ CONFIG_LOCALVERSION_AUTO=y
59CONFIG_SWAP=y 61CONFIG_SWAP=y
60CONFIG_SYSVIPC=y 62CONFIG_SYSVIPC=y
61# CONFIG_IPC_NS is not set 63# CONFIG_IPC_NS is not set
64CONFIG_SYSVIPC_SYSCTL=y
62CONFIG_POSIX_MQUEUE=y 65CONFIG_POSIX_MQUEUE=y
63# CONFIG_BSD_PROCESS_ACCT is not set 66# CONFIG_BSD_PROCESS_ACCT is not set
64# CONFIG_TASKSTATS is not set 67# CONFIG_TASKSTATS is not set
@@ -66,9 +69,11 @@ CONFIG_POSIX_MQUEUE=y
66# CONFIG_AUDIT is not set 69# CONFIG_AUDIT is not set
67CONFIG_IKCONFIG=y 70CONFIG_IKCONFIG=y
68CONFIG_IKCONFIG_PROC=y 71CONFIG_IKCONFIG_PROC=y
72CONFIG_LOG_BUF_SHIFT=17
69# CONFIG_CPUSETS is not set 73# CONFIG_CPUSETS is not set
70CONFIG_SYSFS_DEPRECATED=y 74CONFIG_SYSFS_DEPRECATED=y
71# CONFIG_RELAY is not set 75# CONFIG_RELAY is not set
76CONFIG_BLK_DEV_INITRD=y
72CONFIG_INITRAMFS_SOURCE="" 77CONFIG_INITRAMFS_SOURCE=""
73CONFIG_CC_OPTIMIZE_FOR_SIZE=y 78CONFIG_CC_OPTIMIZE_FOR_SIZE=y
74CONFIG_SYSCTL=y 79CONFIG_SYSCTL=y
@@ -83,14 +88,19 @@ CONFIG_BUG=y
83CONFIG_ELF_CORE=y 88CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y 89CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y 90CONFIG_FUTEX=y
91CONFIG_ANON_INODES=y
86CONFIG_EPOLL=y 92CONFIG_EPOLL=y
93CONFIG_SIGNALFD=y
94CONFIG_TIMERFD=y
95CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 96CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y 97CONFIG_VM_EVENT_COUNTERS=y
98CONFIG_SLAB=y
99# CONFIG_SLUB is not set
100# CONFIG_SLOB is not set
90CONFIG_RT_MUTEXES=y 101CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set 102# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0 103CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94 104
95# 105#
96# Loadable module support 106# Loadable module support
@@ -131,15 +141,21 @@ CONFIG_PPC_MULTIPLATFORM=y
131# CONFIG_PPC_PSERIES is not set 141# CONFIG_PPC_PSERIES is not set
132# CONFIG_PPC_ISERIES is not set 142# CONFIG_PPC_ISERIES is not set
133# CONFIG_PPC_MPC52xx is not set 143# CONFIG_PPC_MPC52xx is not set
144# CONFIG_PPC_MPC5200 is not set
134CONFIG_PPC_PMAC=y 145CONFIG_PPC_PMAC=y
135CONFIG_PPC_PMAC64=y 146CONFIG_PPC_PMAC64=y
136# CONFIG_PPC_MAPLE is not set 147# CONFIG_PPC_MAPLE is not set
137# CONFIG_PPC_PASEMI is not set 148# CONFIG_PPC_PASEMI is not set
149# CONFIG_PPC_CELLEB is not set
150# CONFIG_PPC_PS3 is not set
138# CONFIG_PPC_CELL is not set 151# CONFIG_PPC_CELL is not set
139# CONFIG_PPC_CELL_NATIVE is not set 152# CONFIG_PPC_CELL_NATIVE is not set
140# CONFIG_PPC_IBM_CELL_BLADE is not set 153# CONFIG_PPC_IBM_CELL_BLADE is not set
141# CONFIG_PPC_PS3 is not set 154# CONFIG_PQ2ADS is not set
142CONFIG_PPC_NATIVE=y 155CONFIG_PPC_NATIVE=y
156CONFIG_MPIC=y
157# CONFIG_MPIC_WEIRD is not set
158# CONFIG_PPC_I8259 is not set
143CONFIG_U3_DART=y 159CONFIG_U3_DART=y
144# CONFIG_PPC_RTAS is not set 160# CONFIG_PPC_RTAS is not set
145# CONFIG_MMIO_NVRAM is not set 161# CONFIG_MMIO_NVRAM is not set
@@ -160,9 +176,12 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
160CONFIG_CPU_FREQ_GOV_USERSPACE=y 176CONFIG_CPU_FREQ_GOV_USERSPACE=y
161# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set 177# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
162# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set 178# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
179
180#
181# CPU Frequency drivers
182#
163CONFIG_CPU_FREQ_PMAC64=y 183CONFIG_CPU_FREQ_PMAC64=y
164# CONFIG_WANT_EARLY_SERIAL is not set 184# CONFIG_CPM2 is not set
165CONFIG_MPIC=y
166 185
167# 186#
168# Kernel options 187# Kernel options
@@ -199,34 +218,34 @@ CONFIG_FLAT_NODE_MEM_MAP=y
199# CONFIG_SPARSEMEM_STATIC is not set 218# CONFIG_SPARSEMEM_STATIC is not set
200CONFIG_SPLIT_PTLOCK_CPUS=4 219CONFIG_SPLIT_PTLOCK_CPUS=4
201CONFIG_RESOURCES_64BIT=y 220CONFIG_RESOURCES_64BIT=y
221CONFIG_ZONE_DMA_FLAG=1
222# CONFIG_PPC_HAS_HASH_64K is not set
202# CONFIG_PPC_64K_PAGES is not set 223# CONFIG_PPC_64K_PAGES is not set
203# CONFIG_SCHED_SMT is not set 224# CONFIG_SCHED_SMT is not set
204CONFIG_PROC_DEVICETREE=y 225CONFIG_PROC_DEVICETREE=y
205# CONFIG_CMDLINE_BOOL is not set 226# CONFIG_CMDLINE_BOOL is not set
206# CONFIG_PM is not set 227# CONFIG_PM is not set
207CONFIG_SECCOMP=y 228CONFIG_SECCOMP=y
229# CONFIG_WANT_DEVICE_TREE is not set
208CONFIG_ISA_DMA_API=y 230CONFIG_ISA_DMA_API=y
209 231
210# 232#
211# Bus options 233# Bus options
212# 234#
235CONFIG_ZONE_DMA=y
213CONFIG_GENERIC_ISA_DMA=y 236CONFIG_GENERIC_ISA_DMA=y
214# CONFIG_MPIC_WEIRD is not set
215# CONFIG_PPC_I8259 is not set
216# CONFIG_PPC_INDIRECT_PCI is not set 237# CONFIG_PPC_INDIRECT_PCI is not set
217CONFIG_PCI=y 238CONFIG_PCI=y
218CONFIG_PCI_DOMAINS=y 239CONFIG_PCI_DOMAINS=y
219# CONFIG_PCIEPORTBUS is not set 240# CONFIG_PCIEPORTBUS is not set
241CONFIG_ARCH_SUPPORTS_MSI=y
242CONFIG_PCI_MSI=y
220# CONFIG_PCI_DEBUG is not set 243# CONFIG_PCI_DEBUG is not set
221 244
222# 245#
223# PCCARD (PCMCIA/CardBus) support 246# PCCARD (PCMCIA/CardBus) support
224# 247#
225# CONFIG_PCCARD is not set 248# CONFIG_PCCARD is not set
226
227#
228# PCI Hotplug Support
229#
230# CONFIG_HOTPLUG_PCI is not set 249# CONFIG_HOTPLUG_PCI is not set
231CONFIG_KERNEL_START=0xc000000000000000 250CONFIG_KERNEL_START=0xc000000000000000
232 251
@@ -238,14 +257,15 @@ CONFIG_NET=y
238# 257#
239# Networking options 258# Networking options
240# 259#
241# CONFIG_NETDEBUG is not set
242CONFIG_PACKET=y 260CONFIG_PACKET=y
243# CONFIG_PACKET_MMAP is not set 261# CONFIG_PACKET_MMAP is not set
244CONFIG_UNIX=y 262CONFIG_UNIX=y
245CONFIG_XFRM=y 263CONFIG_XFRM=y
246CONFIG_XFRM_USER=m 264CONFIG_XFRM_USER=m
247# CONFIG_XFRM_SUB_POLICY is not set 265# CONFIG_XFRM_SUB_POLICY is not set
266# CONFIG_XFRM_MIGRATE is not set
248CONFIG_NET_KEY=m 267CONFIG_NET_KEY=m
268# CONFIG_NET_KEY_MIGRATE is not set
249CONFIG_INET=y 269CONFIG_INET=y
250CONFIG_IP_MULTICAST=y 270CONFIG_IP_MULTICAST=y
251# CONFIG_IP_ADVANCED_ROUTER is not set 271# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -270,10 +290,6 @@ CONFIG_INET_TCP_DIAG=y
270CONFIG_TCP_CONG_CUBIC=y 290CONFIG_TCP_CONG_CUBIC=y
271CONFIG_DEFAULT_TCP_CONG="cubic" 291CONFIG_DEFAULT_TCP_CONG="cubic"
272# CONFIG_TCP_MD5SIG is not set 292# CONFIG_TCP_MD5SIG is not set
273
274#
275# IP: Virtual Server Configuration
276#
277# CONFIG_IP_VS is not set 293# CONFIG_IP_VS is not set
278# CONFIG_IPV6 is not set 294# CONFIG_IPV6 is not set
279# CONFIG_INET6_XFRM_TUNNEL is not set 295# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -287,8 +303,6 @@ CONFIG_NETFILTER=y
287# 303#
288# CONFIG_NETFILTER_NETLINK is not set 304# CONFIG_NETFILTER_NETLINK is not set
289CONFIG_NF_CONNTRACK_ENABLED=m 305CONFIG_NF_CONNTRACK_ENABLED=m
290CONFIG_NF_CONNTRACK_SUPPORT=y
291# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
292CONFIG_NF_CONNTRACK=m 306CONFIG_NF_CONNTRACK=m
293# CONFIG_NF_CT_ACCT is not set 307# CONFIG_NF_CT_ACCT is not set
294CONFIG_NF_CONNTRACK_MARK=y 308CONFIG_NF_CONNTRACK_MARK=y
@@ -300,6 +314,7 @@ CONFIG_NF_CONNTRACK_FTP=m
300CONFIG_NF_CONNTRACK_IRC=m 314CONFIG_NF_CONNTRACK_IRC=m
301# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set 315# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
302# CONFIG_NF_CONNTRACK_PPTP is not set 316# CONFIG_NF_CONNTRACK_PPTP is not set
317# CONFIG_NF_CONNTRACK_SANE is not set
303# CONFIG_NF_CONNTRACK_SIP is not set 318# CONFIG_NF_CONNTRACK_SIP is not set
304CONFIG_NF_CONNTRACK_TFTP=m 319CONFIG_NF_CONNTRACK_TFTP=m
305# CONFIG_NETFILTER_XTABLES is not set 320# CONFIG_NETFILTER_XTABLES is not set
@@ -310,20 +325,10 @@ CONFIG_NF_CONNTRACK_TFTP=m
310CONFIG_NF_CONNTRACK_IPV4=m 325CONFIG_NF_CONNTRACK_IPV4=m
311CONFIG_NF_CONNTRACK_PROC_COMPAT=y 326CONFIG_NF_CONNTRACK_PROC_COMPAT=y
312CONFIG_IP_NF_QUEUE=m 327CONFIG_IP_NF_QUEUE=m
313 328# CONFIG_IP_NF_IPTABLES is not set
314# 329# CONFIG_IP_NF_ARPTABLES is not set
315# DCCP Configuration (EXPERIMENTAL)
316#
317# CONFIG_IP_DCCP is not set 330# CONFIG_IP_DCCP is not set
318
319#
320# SCTP Configuration (EXPERIMENTAL)
321#
322# CONFIG_IP_SCTP is not set 331# CONFIG_IP_SCTP is not set
323
324#
325# TIPC Configuration (EXPERIMENTAL)
326#
327# CONFIG_TIPC is not set 332# CONFIG_TIPC is not set
328# CONFIG_ATM is not set 333# CONFIG_ATM is not set
329# CONFIG_BRIDGE is not set 334# CONFIG_BRIDGE is not set
@@ -350,7 +355,16 @@ CONFIG_LLC=y
350# CONFIG_HAMRADIO is not set 355# CONFIG_HAMRADIO is not set
351# CONFIG_IRDA is not set 356# CONFIG_IRDA is not set
352# CONFIG_BT is not set 357# CONFIG_BT is not set
358# CONFIG_AF_RXRPC is not set
359
360#
361# Wireless
362#
363# CONFIG_CFG80211 is not set
364# CONFIG_WIRELESS_EXT is not set
365# CONFIG_MAC80211 is not set
353# CONFIG_IEEE80211 is not set 366# CONFIG_IEEE80211 is not set
367# CONFIG_RFKILL is not set
354 368
355# 369#
356# Device Drivers 370# Device Drivers
@@ -363,16 +377,13 @@ CONFIG_STANDALONE=y
363CONFIG_PREVENT_FIRMWARE_BUILD=y 377CONFIG_PREVENT_FIRMWARE_BUILD=y
364CONFIG_FW_LOADER=y 378CONFIG_FW_LOADER=y
365# CONFIG_DEBUG_DRIVER is not set 379# CONFIG_DEBUG_DRIVER is not set
380# CONFIG_DEBUG_DEVRES is not set
366# CONFIG_SYS_HYPERVISOR is not set 381# CONFIG_SYS_HYPERVISOR is not set
367 382
368# 383#
369# Connector - unified userspace <-> kernelspace linker 384# Connector - unified userspace <-> kernelspace linker
370# 385#
371# CONFIG_CONNECTOR is not set 386# CONFIG_CONNECTOR is not set
372
373#
374# Memory Technology Devices (MTD)
375#
376# CONFIG_MTD is not set 387# CONFIG_MTD is not set
377 388
378# 389#
@@ -383,6 +394,7 @@ CONFIG_FW_LOADER=y
383# 394#
384# Plug and Play support 395# Plug and Play support
385# 396#
397# CONFIG_PNPACPI is not set
386 398
387# 399#
388# Block devices 400# Block devices
@@ -402,7 +414,6 @@ CONFIG_BLK_DEV_RAM=y
402CONFIG_BLK_DEV_RAM_COUNT=16 414CONFIG_BLK_DEV_RAM_COUNT=16
403CONFIG_BLK_DEV_RAM_SIZE=65536 415CONFIG_BLK_DEV_RAM_SIZE=65536
404CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 416CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
405CONFIG_BLK_DEV_INITRD=y
406CONFIG_CDROM_PKTCDVD=m 417CONFIG_CDROM_PKTCDVD=m
407CONFIG_CDROM_PKTCDVD_BUFFERS=8 418CONFIG_CDROM_PKTCDVD_BUFFERS=8
408# CONFIG_CDROM_PKTCDVD_WCACHE is not set 419# CONFIG_CDROM_PKTCDVD_WCACHE is not set
@@ -411,12 +422,10 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
411# 422#
412# Misc devices 423# Misc devices
413# 424#
425# CONFIG_PHANTOM is not set
414# CONFIG_SGI_IOC4 is not set 426# CONFIG_SGI_IOC4 is not set
415# CONFIG_TIFM_CORE is not set 427# CONFIG_TIFM_CORE is not set
416 428# CONFIG_BLINK is not set
417#
418# ATA/ATAPI/MFM/RLL support
419#
420CONFIG_IDE=y 429CONFIG_IDE=y
421CONFIG_BLK_DEV_IDE=y 430CONFIG_BLK_DEV_IDE=y
422 431
@@ -431,6 +440,7 @@ CONFIG_BLK_DEV_IDECD=y
431# CONFIG_BLK_DEV_IDEFLOPPY is not set 440# CONFIG_BLK_DEV_IDEFLOPPY is not set
432# CONFIG_BLK_DEV_IDESCSI is not set 441# CONFIG_BLK_DEV_IDESCSI is not set
433# CONFIG_IDE_TASK_IOCTL is not set 442# CONFIG_IDE_TASK_IOCTL is not set
443CONFIG_IDE_PROC_FS=y
434 444
435# 445#
436# IDE chipset support/bugfixes 446# IDE chipset support/bugfixes
@@ -438,12 +448,12 @@ CONFIG_BLK_DEV_IDECD=y
438CONFIG_IDE_GENERIC=y 448CONFIG_IDE_GENERIC=y
439CONFIG_BLK_DEV_IDEPCI=y 449CONFIG_BLK_DEV_IDEPCI=y
440# CONFIG_IDEPCI_SHARE_IRQ is not set 450# CONFIG_IDEPCI_SHARE_IRQ is not set
451CONFIG_IDEPCI_PCIBUS_ORDER=y
441# CONFIG_BLK_DEV_OFFBOARD is not set 452# CONFIG_BLK_DEV_OFFBOARD is not set
442# CONFIG_BLK_DEV_GENERIC is not set 453# CONFIG_BLK_DEV_GENERIC is not set
443# CONFIG_BLK_DEV_OPTI621 is not set 454# CONFIG_BLK_DEV_OPTI621 is not set
444CONFIG_BLK_DEV_IDEDMA_PCI=y 455CONFIG_BLK_DEV_IDEDMA_PCI=y
445# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 456# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
446CONFIG_IDEDMA_PCI_AUTO=y
447# CONFIG_IDEDMA_ONLYDISK is not set 457# CONFIG_IDEDMA_ONLYDISK is not set
448# CONFIG_BLK_DEV_AEC62XX is not set 458# CONFIG_BLK_DEV_AEC62XX is not set
449# CONFIG_BLK_DEV_ALI15X3 is not set 459# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -458,6 +468,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
458# CONFIG_BLK_DEV_JMICRON is not set 468# CONFIG_BLK_DEV_JMICRON is not set
459# CONFIG_BLK_DEV_SC1200 is not set 469# CONFIG_BLK_DEV_SC1200 is not set
460# CONFIG_BLK_DEV_PIIX is not set 470# CONFIG_BLK_DEV_PIIX is not set
471# CONFIG_BLK_DEV_IT8213 is not set
461# CONFIG_BLK_DEV_IT821X is not set 472# CONFIG_BLK_DEV_IT821X is not set
462# CONFIG_BLK_DEV_NS87415 is not set 473# CONFIG_BLK_DEV_NS87415 is not set
463# CONFIG_BLK_DEV_PDC202XX_OLD is not set 474# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -468,13 +479,13 @@ CONFIG_IDEDMA_PCI_AUTO=y
468# CONFIG_BLK_DEV_SLC90E66 is not set 479# CONFIG_BLK_DEV_SLC90E66 is not set
469# CONFIG_BLK_DEV_TRM290 is not set 480# CONFIG_BLK_DEV_TRM290 is not set
470# CONFIG_BLK_DEV_VIA82CXXX is not set 481# CONFIG_BLK_DEV_VIA82CXXX is not set
482# CONFIG_BLK_DEV_TC86C001 is not set
471CONFIG_BLK_DEV_IDE_PMAC=y 483CONFIG_BLK_DEV_IDE_PMAC=y
472CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y 484CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
473CONFIG_BLK_DEV_IDEDMA_PMAC=y 485CONFIG_BLK_DEV_IDEDMA_PMAC=y
474# CONFIG_IDE_ARM is not set 486# CONFIG_IDE_ARM is not set
475CONFIG_BLK_DEV_IDEDMA=y 487CONFIG_BLK_DEV_IDEDMA=y
476# CONFIG_IDEDMA_IVB is not set 488# CONFIG_IDEDMA_IVB is not set
477CONFIG_IDEDMA_AUTO=y
478# CONFIG_BLK_DEV_HD is not set 489# CONFIG_BLK_DEV_HD is not set
479 490
480# 491#
@@ -504,6 +515,7 @@ CONFIG_SCSI_MULTI_LUN=y
504CONFIG_SCSI_CONSTANTS=y 515CONFIG_SCSI_CONSTANTS=y
505# CONFIG_SCSI_LOGGING is not set 516# CONFIG_SCSI_LOGGING is not set
506# CONFIG_SCSI_SCAN_ASYNC is not set 517# CONFIG_SCSI_SCAN_ASYNC is not set
518CONFIG_SCSI_WAIT_SCAN=m
507 519
508# 520#
509# SCSI Transports 521# SCSI Transports
@@ -550,11 +562,8 @@ CONFIG_SCSI_SPI_ATTRS=y
550# CONFIG_SCSI_DC390T is not set 562# CONFIG_SCSI_DC390T is not set
551# CONFIG_SCSI_DEBUG is not set 563# CONFIG_SCSI_DEBUG is not set
552# CONFIG_SCSI_SRP is not set 564# CONFIG_SCSI_SRP is not set
553
554#
555# Serial ATA (prod) and Parallel ATA (experimental) drivers
556#
557CONFIG_ATA=y 565CONFIG_ATA=y
566# CONFIG_ATA_NONSTANDARD is not set
558# CONFIG_SATA_AHCI is not set 567# CONFIG_SATA_AHCI is not set
559CONFIG_SATA_SVW=y 568CONFIG_SATA_SVW=y
560# CONFIG_ATA_PIIX is not set 569# CONFIG_ATA_PIIX is not set
@@ -570,10 +579,12 @@ CONFIG_SATA_SVW=y
570# CONFIG_SATA_ULI is not set 579# CONFIG_SATA_ULI is not set
571# CONFIG_SATA_VIA is not set 580# CONFIG_SATA_VIA is not set
572# CONFIG_SATA_VITESSE is not set 581# CONFIG_SATA_VITESSE is not set
582# CONFIG_SATA_INIC162X is not set
573# CONFIG_PATA_ALI is not set 583# CONFIG_PATA_ALI is not set
574# CONFIG_PATA_AMD is not set 584# CONFIG_PATA_AMD is not set
575# CONFIG_PATA_ARTOP is not set 585# CONFIG_PATA_ARTOP is not set
576# CONFIG_PATA_ATIIXP is not set 586# CONFIG_PATA_ATIIXP is not set
587# CONFIG_PATA_CMD640_PCI is not set
577# CONFIG_PATA_CMD64X is not set 588# CONFIG_PATA_CMD64X is not set
578# CONFIG_PATA_CS5520 is not set 589# CONFIG_PATA_CS5520 is not set
579# CONFIG_PATA_CS5530 is not set 590# CONFIG_PATA_CS5530 is not set
@@ -585,6 +596,7 @@ CONFIG_SATA_SVW=y
585# CONFIG_PATA_HPT3X2N is not set 596# CONFIG_PATA_HPT3X2N is not set
586# CONFIG_PATA_HPT3X3 is not set 597# CONFIG_PATA_HPT3X3 is not set
587# CONFIG_PATA_IT821X is not set 598# CONFIG_PATA_IT821X is not set
599# CONFIG_PATA_IT8213 is not set
588# CONFIG_PATA_JMICRON is not set 600# CONFIG_PATA_JMICRON is not set
589# CONFIG_PATA_TRIFLEX is not set 601# CONFIG_PATA_TRIFLEX is not set
590# CONFIG_PATA_MARVELL is not set 602# CONFIG_PATA_MARVELL is not set
@@ -624,6 +636,7 @@ CONFIG_DM_SNAPSHOT=m
624CONFIG_DM_MIRROR=m 636CONFIG_DM_MIRROR=m
625CONFIG_DM_ZERO=m 637CONFIG_DM_ZERO=m
626# CONFIG_DM_MULTIPATH is not set 638# CONFIG_DM_MULTIPATH is not set
639# CONFIG_DM_DELAY is not set
627 640
628# 641#
629# Fusion MPT device support 642# Fusion MPT device support
@@ -636,28 +649,26 @@ CONFIG_DM_ZERO=m
636# 649#
637# IEEE 1394 (FireWire) support 650# IEEE 1394 (FireWire) support
638# 651#
652# CONFIG_FIREWIRE is not set
639CONFIG_IEEE1394=y 653CONFIG_IEEE1394=y
640 654
641# 655#
642# Subsystem Options 656# Subsystem Options
643# 657#
644# CONFIG_IEEE1394_VERBOSEDEBUG is not set 658# CONFIG_IEEE1394_VERBOSEDEBUG is not set
645CONFIG_IEEE1394_OUI_DB=y
646CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
647CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
648# CONFIG_IEEE1394_EXPORT_FULL_API is not set
649 659
650# 660#
651# Device Drivers 661# Controllers
652# 662#
653# CONFIG_IEEE1394_PCILYNX is not set 663# CONFIG_IEEE1394_PCILYNX is not set
654CONFIG_IEEE1394_OHCI1394=y 664CONFIG_IEEE1394_OHCI1394=y
655 665
656# 666#
657# Protocol Drivers 667# Protocols
658# 668#
659CONFIG_IEEE1394_VIDEO1394=m 669CONFIG_IEEE1394_VIDEO1394=m
660CONFIG_IEEE1394_SBP2=m 670CONFIG_IEEE1394_SBP2=m
671CONFIG_IEEE1394_ETH1394_ROM_ENTRY=y
661CONFIG_IEEE1394_ETH1394=m 672CONFIG_IEEE1394_ETH1394=m
662CONFIG_IEEE1394_DV1394=m 673CONFIG_IEEE1394_DV1394=m
663CONFIG_IEEE1394_RAWIO=y 674CONFIG_IEEE1394_RAWIO=y
@@ -666,10 +677,7 @@ CONFIG_IEEE1394_RAWIO=y
666# I2O device support 677# I2O device support
667# 678#
668# CONFIG_I2O is not set 679# CONFIG_I2O is not set
669 680CONFIG_MACINTOSH_DRIVERS=y
670#
671# Macintosh device drivers
672#
673CONFIG_ADB_PMU=y 681CONFIG_ADB_PMU=y
674# CONFIG_ADB_PMU_LED is not set 682# CONFIG_ADB_PMU_LED is not set
675CONFIG_PMAC_SMU=y 683CONFIG_PMAC_SMU=y
@@ -689,15 +697,7 @@ CONFIG_DUMMY=m
689CONFIG_BONDING=m 697CONFIG_BONDING=m
690# CONFIG_EQUALIZER is not set 698# CONFIG_EQUALIZER is not set
691CONFIG_TUN=m 699CONFIG_TUN=m
692
693#
694# ARCnet devices
695#
696# CONFIG_ARCNET is not set 700# CONFIG_ARCNET is not set
697
698#
699# PHY device support
700#
701# CONFIG_PHYLIB is not set 701# CONFIG_PHYLIB is not set
702 702
703# 703#
@@ -716,10 +716,7 @@ CONFIG_SUNGEM=y
716# CONFIG_NET_TULIP is not set 716# CONFIG_NET_TULIP is not set
717# CONFIG_HP100 is not set 717# CONFIG_HP100 is not set
718# CONFIG_NET_PCI is not set 718# CONFIG_NET_PCI is not set
719 719CONFIG_NETDEV_1000=y
720#
721# Ethernet (1000 Mbit)
722#
723CONFIG_ACENIC=y 720CONFIG_ACENIC=y
724CONFIG_ACENIC_OMIT_TIGON_I=y 721CONFIG_ACENIC_OMIT_TIGON_I=y
725# CONFIG_DL2K is not set 722# CONFIG_DL2K is not set
@@ -734,35 +731,50 @@ CONFIG_E1000=y
734# CONFIG_SKGE is not set 731# CONFIG_SKGE is not set
735# CONFIG_SKY2 is not set 732# CONFIG_SKY2 is not set
736# CONFIG_SK98LIN is not set 733# CONFIG_SK98LIN is not set
734# CONFIG_VIA_VELOCITY is not set
737CONFIG_TIGON3=y 735CONFIG_TIGON3=y
738# CONFIG_BNX2 is not set 736# CONFIG_BNX2 is not set
739# CONFIG_QLA3XXX is not set 737# CONFIG_QLA3XXX is not set
740 738# CONFIG_ATL1 is not set
741# 739CONFIG_NETDEV_10000=y
742# Ethernet (10000 Mbit)
743#
744# CONFIG_CHELSIO_T1 is not set 740# CONFIG_CHELSIO_T1 is not set
741# CONFIG_CHELSIO_T3 is not set
745# CONFIG_IXGB is not set 742# CONFIG_IXGB is not set
746# CONFIG_S2IO is not set 743# CONFIG_S2IO is not set
747# CONFIG_MYRI10GE is not set 744# CONFIG_MYRI10GE is not set
748# CONFIG_NETXEN_NIC is not set 745# CONFIG_NETXEN_NIC is not set
749 746# CONFIG_PASEMI_MAC is not set
750# 747# CONFIG_MLX4_CORE is not set
751# Token Ring devices
752#
753CONFIG_TR=y 748CONFIG_TR=y
754CONFIG_IBMOL=y 749CONFIG_IBMOL=y
755# CONFIG_3C359 is not set 750# CONFIG_3C359 is not set
756# CONFIG_TMS380TR is not set 751# CONFIG_TMS380TR is not set
757 752
758# 753#
759# Wireless LAN (non-hamradio) 754# Wireless LAN
760# 755#
761# CONFIG_NET_RADIO is not set 756# CONFIG_WLAN_PRE80211 is not set
757# CONFIG_WLAN_80211 is not set
762 758
763# 759#
764# Wan interfaces 760# USB Network Adapters
765# 761#
762CONFIG_USB_CATC=m
763CONFIG_USB_KAWETH=m
764CONFIG_USB_PEGASUS=m
765CONFIG_USB_RTL8150=m
766# CONFIG_USB_USBNET_MII is not set
767CONFIG_USB_USBNET=m
768# CONFIG_USB_NET_AX8817X is not set
769CONFIG_USB_NET_CDCETHER=m
770# CONFIG_USB_NET_DM9601 is not set
771# CONFIG_USB_NET_GL620A is not set
772# CONFIG_USB_NET_NET1080 is not set
773# CONFIG_USB_NET_PLUSB is not set
774# CONFIG_USB_NET_MCS7830 is not set
775# CONFIG_USB_NET_RNDIS_HOST is not set
776# CONFIG_USB_NET_CDC_SUBSET is not set
777# CONFIG_USB_NET_ZAURUS is not set
766# CONFIG_WAN is not set 778# CONFIG_WAN is not set
767# CONFIG_FDDI is not set 779# CONFIG_FDDI is not set
768# CONFIG_HIPPI is not set 780# CONFIG_HIPPI is not set
@@ -798,6 +810,7 @@ CONFIG_SLHC=m
798# 810#
799CONFIG_INPUT=y 811CONFIG_INPUT=y
800CONFIG_INPUT_FF_MEMLESS=y 812CONFIG_INPUT_FF_MEMLESS=y
813# CONFIG_INPUT_POLLDEV is not set
801 814
802# 815#
803# Userland interfaces 816# Userland interfaces
@@ -824,8 +837,10 @@ CONFIG_INPUT_KEYBOARD=y
824CONFIG_INPUT_MOUSE=y 837CONFIG_INPUT_MOUSE=y
825# CONFIG_MOUSE_PS2 is not set 838# CONFIG_MOUSE_PS2 is not set
826# CONFIG_MOUSE_SERIAL is not set 839# CONFIG_MOUSE_SERIAL is not set
840# CONFIG_MOUSE_APPLETOUCH is not set
827# CONFIG_MOUSE_VSXXXAA is not set 841# CONFIG_MOUSE_VSXXXAA is not set
828# CONFIG_INPUT_JOYSTICK is not set 842# CONFIG_INPUT_JOYSTICK is not set
843# CONFIG_INPUT_TABLET is not set
829# CONFIG_INPUT_TOUCHSCREEN is not set 844# CONFIG_INPUT_TOUCHSCREEN is not set
830# CONFIG_INPUT_MISC is not set 845# CONFIG_INPUT_MISC is not set
831 846
@@ -866,15 +881,10 @@ CONFIG_LEGACY_PTY_COUNT=256
866# IPMI 881# IPMI
867# 882#
868# CONFIG_IPMI_HANDLER is not set 883# CONFIG_IPMI_HANDLER is not set
869
870#
871# Watchdog Cards
872#
873# CONFIG_WATCHDOG is not set 884# CONFIG_WATCHDOG is not set
874# CONFIG_HW_RANDOM is not set 885# CONFIG_HW_RANDOM is not set
875CONFIG_GEN_RTC=y 886CONFIG_GEN_RTC=y
876# CONFIG_GEN_RTC_X is not set 887# CONFIG_GEN_RTC_X is not set
877# CONFIG_DTLK is not set
878# CONFIG_R3964 is not set 888# CONFIG_R3964 is not set
879# CONFIG_APPLICOM is not set 889# CONFIG_APPLICOM is not set
880CONFIG_AGP=m 890CONFIG_AGP=m
@@ -888,11 +898,9 @@ CONFIG_MAX_RAW_DEVS=256
888# TPM devices 898# TPM devices
889# 899#
890# CONFIG_TCG_TPM is not set 900# CONFIG_TCG_TPM is not set
891 901CONFIG_DEVPORT=y
892#
893# I2C support
894#
895CONFIG_I2C=y 902CONFIG_I2C=y
903CONFIG_I2C_BOARDINFO=y
896CONFIG_I2C_CHARDEV=y 904CONFIG_I2C_CHARDEV=y
897 905
898# 906#
@@ -919,14 +927,15 @@ CONFIG_I2C_POWERMAC=y
919# CONFIG_I2C_PARPORT_LIGHT is not set 927# CONFIG_I2C_PARPORT_LIGHT is not set
920# CONFIG_I2C_PROSAVAGE is not set 928# CONFIG_I2C_PROSAVAGE is not set
921# CONFIG_I2C_SAVAGE4 is not set 929# CONFIG_I2C_SAVAGE4 is not set
930# CONFIG_I2C_SIMTEC is not set
922# CONFIG_I2C_SIS5595 is not set 931# CONFIG_I2C_SIS5595 is not set
923# CONFIG_I2C_SIS630 is not set 932# CONFIG_I2C_SIS630 is not set
924# CONFIG_I2C_SIS96X is not set 933# CONFIG_I2C_SIS96X is not set
925# CONFIG_I2C_STUB is not set 934# CONFIG_I2C_STUB is not set
935# CONFIG_I2C_TINY_USB is not set
926# CONFIG_I2C_VIA is not set 936# CONFIG_I2C_VIA is not set
927# CONFIG_I2C_VIAPRO is not set 937# CONFIG_I2C_VIAPRO is not set
928# CONFIG_I2C_VOODOO3 is not set 938# CONFIG_I2C_VOODOO3 is not set
929# CONFIG_I2C_PCA_ISA is not set
930 939
931# 940#
932# Miscellaneous I2C Chip support 941# Miscellaneous I2C Chip support
@@ -953,37 +962,53 @@ CONFIG_I2C_POWERMAC=y
953# Dallas's 1-wire bus 962# Dallas's 1-wire bus
954# 963#
955# CONFIG_W1 is not set 964# CONFIG_W1 is not set
965# CONFIG_HWMON is not set
956 966
957# 967#
958# Hardware Monitoring support 968# Multifunction device drivers
959# 969#
960# CONFIG_HWMON is not set 970# CONFIG_MFD_SM501 is not set
961# CONFIG_HWMON_VID is not set
962 971
963# 972#
964# Multimedia devices 973# Multimedia devices
965# 974#
966# CONFIG_VIDEO_DEV is not set 975# CONFIG_VIDEO_DEV is not set
976# CONFIG_DVB_CORE is not set
977CONFIG_DAB=y
978# CONFIG_USB_DABUSB is not set
967 979
968# 980#
969# Digital Video Broadcasting Devices 981# Graphics support
970# 982#
971# CONFIG_DVB is not set 983CONFIG_BACKLIGHT_LCD_SUPPORT=y
972# CONFIG_USB_DABUSB is not set 984CONFIG_BACKLIGHT_CLASS_DEVICE=y
985CONFIG_LCD_CLASS_DEVICE=m
973 986
974# 987#
975# Graphics support 988# Display device support
976# 989#
977CONFIG_FIRMWARE_EDID=y 990# CONFIG_DISPLAY_SUPPORT is not set
991CONFIG_VGASTATE=y
978CONFIG_FB=y 992CONFIG_FB=y
993CONFIG_FIRMWARE_EDID=y
979CONFIG_FB_DDC=y 994CONFIG_FB_DDC=y
980CONFIG_FB_CFB_FILLRECT=y 995CONFIG_FB_CFB_FILLRECT=y
981CONFIG_FB_CFB_COPYAREA=y 996CONFIG_FB_CFB_COPYAREA=y
982CONFIG_FB_CFB_IMAGEBLIT=y 997CONFIG_FB_CFB_IMAGEBLIT=y
998# CONFIG_FB_SYS_FILLRECT is not set
999# CONFIG_FB_SYS_COPYAREA is not set
1000# CONFIG_FB_SYS_IMAGEBLIT is not set
1001# CONFIG_FB_SYS_FOPS is not set
1002CONFIG_FB_DEFERRED_IO=y
1003# CONFIG_FB_SVGALIB is not set
983CONFIG_FB_MACMODES=y 1004CONFIG_FB_MACMODES=y
984# CONFIG_FB_BACKLIGHT is not set 1005CONFIG_FB_BACKLIGHT=y
985CONFIG_FB_MODE_HELPERS=y 1006CONFIG_FB_MODE_HELPERS=y
986CONFIG_FB_TILEBLITTING=y 1007CONFIG_FB_TILEBLITTING=y
1008
1009#
1010# Frame buffer hardware drivers
1011#
987# CONFIG_FB_CIRRUS is not set 1012# CONFIG_FB_CIRRUS is not set
988# CONFIG_FB_PM2 is not set 1013# CONFIG_FB_PM2 is not set
989# CONFIG_FB_CYBER2000 is not set 1014# CONFIG_FB_CYBER2000 is not set
@@ -994,20 +1019,27 @@ CONFIG_FB_OF=y
994# CONFIG_FB_S1D13XXX is not set 1019# CONFIG_FB_S1D13XXX is not set
995CONFIG_FB_NVIDIA=y 1020CONFIG_FB_NVIDIA=y
996CONFIG_FB_NVIDIA_I2C=y 1021CONFIG_FB_NVIDIA_I2C=y
1022# CONFIG_FB_NVIDIA_DEBUG is not set
1023CONFIG_FB_NVIDIA_BACKLIGHT=y
997# CONFIG_FB_RIVA is not set 1024# CONFIG_FB_RIVA is not set
998# CONFIG_FB_MATROX is not set 1025# CONFIG_FB_MATROX is not set
999CONFIG_FB_RADEON=y 1026CONFIG_FB_RADEON=y
1000CONFIG_FB_RADEON_I2C=y 1027CONFIG_FB_RADEON_I2C=y
1028CONFIG_FB_RADEON_BACKLIGHT=y
1001# CONFIG_FB_RADEON_DEBUG is not set 1029# CONFIG_FB_RADEON_DEBUG is not set
1002# CONFIG_FB_ATY128 is not set 1030# CONFIG_FB_ATY128 is not set
1003# CONFIG_FB_ATY is not set 1031# CONFIG_FB_ATY is not set
1032# CONFIG_FB_S3 is not set
1004# CONFIG_FB_SAVAGE is not set 1033# CONFIG_FB_SAVAGE is not set
1005# CONFIG_FB_SIS is not set 1034# CONFIG_FB_SIS is not set
1006# CONFIG_FB_NEOMAGIC is not set 1035# CONFIG_FB_NEOMAGIC is not set
1007# CONFIG_FB_KYRO is not set 1036# CONFIG_FB_KYRO is not set
1008# CONFIG_FB_3DFX is not set 1037# CONFIG_FB_3DFX is not set
1009# CONFIG_FB_VOODOO1 is not set 1038# CONFIG_FB_VOODOO1 is not set
1039# CONFIG_FB_VT8623 is not set
1010# CONFIG_FB_TRIDENT is not set 1040# CONFIG_FB_TRIDENT is not set
1041# CONFIG_FB_ARK is not set
1042# CONFIG_FB_PM3 is not set
1011# CONFIG_FB_IBM_GXT4500 is not set 1043# CONFIG_FB_IBM_GXT4500 is not set
1012# CONFIG_FB_VIRTUAL is not set 1044# CONFIG_FB_VIRTUAL is not set
1013 1045
@@ -1021,19 +1053,10 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
1021# CONFIG_FONTS is not set 1053# CONFIG_FONTS is not set
1022CONFIG_FONT_8x8=y 1054CONFIG_FONT_8x8=y
1023CONFIG_FONT_8x16=y 1055CONFIG_FONT_8x16=y
1024
1025#
1026# Logo configuration
1027#
1028CONFIG_LOGO=y 1056CONFIG_LOGO=y
1029CONFIG_LOGO_LINUX_MONO=y 1057CONFIG_LOGO_LINUX_MONO=y
1030CONFIG_LOGO_LINUX_VGA16=y 1058CONFIG_LOGO_LINUX_VGA16=y
1031CONFIG_LOGO_LINUX_CLUT224=y 1059CONFIG_LOGO_LINUX_CLUT224=y
1032CONFIG_BACKLIGHT_LCD_SUPPORT=y
1033CONFIG_BACKLIGHT_CLASS_DEVICE=m
1034CONFIG_BACKLIGHT_DEVICE=y
1035CONFIG_LCD_CLASS_DEVICE=m
1036CONFIG_LCD_DEVICE=y
1037 1060
1038# 1061#
1039# Sound 1062# Sound
@@ -1152,6 +1175,12 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m
1152# 1175#
1153CONFIG_SND_USB_AUDIO=m 1176CONFIG_SND_USB_AUDIO=m
1154# CONFIG_SND_USB_USX2Y is not set 1177# CONFIG_SND_USB_USX2Y is not set
1178# CONFIG_SND_USB_CAIAQ is not set
1179
1180#
1181# System on Chip audio support
1182#
1183# CONFIG_SND_SOC is not set
1155 1184
1156# 1185#
1157# Open Sound System 1186# Open Sound System
@@ -1162,6 +1191,20 @@ CONFIG_SND_USB_AUDIO=m
1162# HID Devices 1191# HID Devices
1163# 1192#
1164CONFIG_HID=y 1193CONFIG_HID=y
1194# CONFIG_HID_DEBUG is not set
1195
1196#
1197# USB Input Devices
1198#
1199CONFIG_USB_HID=y
1200# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1201CONFIG_HID_FF=y
1202CONFIG_HID_PID=y
1203CONFIG_LOGITECH_FF=y
1204# CONFIG_PANTHERLORD_FF is not set
1205CONFIG_THRUSTMASTER_FF=y
1206# CONFIG_ZEROPLUS_FF is not set
1207CONFIG_USB_HIDDEV=y
1165 1208
1166# 1209#
1167# USB support 1210# USB support
@@ -1176,9 +1219,8 @@ CONFIG_USB=y
1176# Miscellaneous USB options 1219# Miscellaneous USB options
1177# 1220#
1178CONFIG_USB_DEVICEFS=y 1221CONFIG_USB_DEVICEFS=y
1179# CONFIG_USB_BANDWIDTH is not set 1222CONFIG_USB_DEVICE_CLASS=y
1180# CONFIG_USB_DYNAMIC_MINORS is not set 1223# CONFIG_USB_DYNAMIC_MINORS is not set
1181# CONFIG_USB_MULTITHREAD_PROBE is not set
1182# CONFIG_USB_OTG is not set 1224# CONFIG_USB_OTG is not set
1183 1225
1184# 1226#
@@ -1188,9 +1230,15 @@ CONFIG_USB_EHCI_HCD=y
1188# CONFIG_USB_EHCI_SPLIT_ISO is not set 1230# CONFIG_USB_EHCI_SPLIT_ISO is not set
1189# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1231# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1190# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1232# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1233# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1191# CONFIG_USB_ISP116X_HCD is not set 1234# CONFIG_USB_ISP116X_HCD is not set
1192CONFIG_USB_OHCI_HCD=y 1235CONFIG_USB_OHCI_HCD=y
1193# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1236CONFIG_USB_OHCI_HCD_PPC_OF=y
1237CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1238# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1239CONFIG_USB_OHCI_HCD_PCI=y
1240CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1241CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
1194CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1242CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1195# CONFIG_USB_UHCI_HCD is not set 1243# CONFIG_USB_UHCI_HCD is not set
1196# CONFIG_USB_SL811_HCD is not set 1244# CONFIG_USB_SL811_HCD is not set
@@ -1224,53 +1272,10 @@ CONFIG_USB_STORAGE_JUMPSHOT=y
1224# CONFIG_USB_LIBUSUAL is not set 1272# CONFIG_USB_LIBUSUAL is not set
1225 1273
1226# 1274#
1227# USB Input Devices
1228#
1229CONFIG_USB_HID=y
1230# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1231CONFIG_HID_FF=y
1232CONFIG_HID_PID=y
1233CONFIG_LOGITECH_FF=y
1234CONFIG_THRUSTMASTER_FF=y
1235# CONFIG_ZEROPLUS_FF is not set
1236CONFIG_USB_HIDDEV=y
1237# CONFIG_USB_AIPTEK is not set
1238# CONFIG_USB_WACOM is not set
1239# CONFIG_USB_ACECAD is not set
1240# CONFIG_USB_KBTAB is not set
1241# CONFIG_USB_POWERMATE is not set
1242# CONFIG_USB_TOUCHSCREEN is not set
1243# CONFIG_USB_YEALINK is not set
1244# CONFIG_USB_XPAD is not set
1245# CONFIG_USB_ATI_REMOTE is not set
1246# CONFIG_USB_ATI_REMOTE2 is not set
1247# CONFIG_USB_KEYSPAN_REMOTE is not set
1248# CONFIG_USB_APPLETOUCH is not set
1249
1250#
1251# USB Imaging devices 1275# USB Imaging devices
1252# 1276#
1253# CONFIG_USB_MDC800 is not set 1277# CONFIG_USB_MDC800 is not set
1254# CONFIG_USB_MICROTEK is not set 1278# CONFIG_USB_MICROTEK is not set
1255
1256#
1257# USB Network Adapters
1258#
1259CONFIG_USB_CATC=m
1260CONFIG_USB_KAWETH=m
1261CONFIG_USB_PEGASUS=m
1262CONFIG_USB_RTL8150=m
1263# CONFIG_USB_USBNET_MII is not set
1264CONFIG_USB_USBNET=m
1265# CONFIG_USB_NET_AX8817X is not set
1266CONFIG_USB_NET_CDCETHER=m
1267# CONFIG_USB_NET_GL620A is not set
1268# CONFIG_USB_NET_NET1080 is not set
1269# CONFIG_USB_NET_PLUSB is not set
1270# CONFIG_USB_NET_MCS7830 is not set
1271# CONFIG_USB_NET_RNDIS_HOST is not set
1272# CONFIG_USB_NET_CDC_SUBSET is not set
1273# CONFIG_USB_NET_ZAURUS is not set
1274CONFIG_USB_MON=y 1279CONFIG_USB_MON=y
1275 1280
1276# 1281#
@@ -1343,6 +1348,7 @@ CONFIG_USB_EZUSB=y
1343# CONFIG_USB_RIO500 is not set 1348# CONFIG_USB_RIO500 is not set
1344# CONFIG_USB_LEGOTOWER is not set 1349# CONFIG_USB_LEGOTOWER is not set
1345# CONFIG_USB_LCD is not set 1350# CONFIG_USB_LCD is not set
1351# CONFIG_USB_BERRY_CHARGE is not set
1346# CONFIG_USB_LED is not set 1352# CONFIG_USB_LED is not set
1347# CONFIG_USB_CYPRESS_CY7C63 is not set 1353# CONFIG_USB_CYPRESS_CY7C63 is not set
1348# CONFIG_USB_CYTHERM is not set 1354# CONFIG_USB_CYTHERM is not set
@@ -1353,6 +1359,7 @@ CONFIG_USB_APPLEDISPLAY=m
1353# CONFIG_USB_SISUSBVGA is not set 1359# CONFIG_USB_SISUSBVGA is not set
1354# CONFIG_USB_LD is not set 1360# CONFIG_USB_LD is not set
1355# CONFIG_USB_TRANCEVIBRATOR is not set 1361# CONFIG_USB_TRANCEVIBRATOR is not set
1362# CONFIG_USB_IOWARRIOR is not set
1356# CONFIG_USB_TEST is not set 1363# CONFIG_USB_TEST is not set
1357 1364
1358# 1365#
@@ -1363,10 +1370,6 @@ CONFIG_USB_APPLEDISPLAY=m
1363# USB Gadget Support 1370# USB Gadget Support
1364# 1371#
1365# CONFIG_USB_GADGET is not set 1372# CONFIG_USB_GADGET is not set
1366
1367#
1368# MMC/SD Card support
1369#
1370# CONFIG_MMC is not set 1373# CONFIG_MMC is not set
1371 1374
1372# 1375#
@@ -1410,10 +1413,6 @@ CONFIG_USB_APPLEDISPLAY=m
1410# 1413#
1411 1414
1412# 1415#
1413# Virtualization
1414#
1415
1416#
1417# File systems 1416# File systems
1418# 1417#
1419CONFIG_EXT2_FS=y 1418CONFIG_EXT2_FS=y
@@ -1461,7 +1460,6 @@ CONFIG_AUTOFS_FS=m
1461CONFIG_ISO9660_FS=y 1460CONFIG_ISO9660_FS=y
1462CONFIG_JOLIET=y 1461CONFIG_JOLIET=y
1463CONFIG_ZISOFS=y 1462CONFIG_ZISOFS=y
1464CONFIG_ZISOFS_FS=y
1465CONFIG_UDF_FS=m 1463CONFIG_UDF_FS=m
1466CONFIG_UDF_NLS=y 1464CONFIG_UDF_NLS=y
1467 1465
@@ -1527,6 +1525,7 @@ CONFIG_NFS_ACL_SUPPORT=y
1527CONFIG_NFS_COMMON=y 1525CONFIG_NFS_COMMON=y
1528CONFIG_SUNRPC=y 1526CONFIG_SUNRPC=y
1529CONFIG_SUNRPC_GSS=y 1527CONFIG_SUNRPC_GSS=y
1528# CONFIG_SUNRPC_BIND34 is not set
1530CONFIG_RPCSEC_GSS_KRB5=y 1529CONFIG_RPCSEC_GSS_KRB5=y
1531# CONFIG_RPCSEC_GSS_SPKM3 is not set 1530# CONFIG_RPCSEC_GSS_SPKM3 is not set
1532# CONFIG_SMB_FS is not set 1531# CONFIG_SMB_FS is not set
@@ -1561,6 +1560,7 @@ CONFIG_MSDOS_PARTITION=y
1561# CONFIG_SUN_PARTITION is not set 1560# CONFIG_SUN_PARTITION is not set
1562# CONFIG_KARMA_PARTITION is not set 1561# CONFIG_KARMA_PARTITION is not set
1563# CONFIG_EFI_PARTITION is not set 1562# CONFIG_EFI_PARTITION is not set
1563# CONFIG_SYSV68_PARTITION is not set
1564 1564
1565# 1565#
1566# Native Language Support 1566# Native Language Support
@@ -1610,6 +1610,7 @@ CONFIG_NLS_UTF8=y
1610# Distributed Lock Manager 1610# Distributed Lock Manager
1611# 1611#
1612# CONFIG_DLM is not set 1612# CONFIG_DLM is not set
1613# CONFIG_UCC_SLOW is not set
1613 1614
1614# 1615#
1615# Library routines 1616# Library routines
@@ -1617,12 +1618,15 @@ CONFIG_NLS_UTF8=y
1617CONFIG_BITREVERSE=y 1618CONFIG_BITREVERSE=y
1618CONFIG_CRC_CCITT=m 1619CONFIG_CRC_CCITT=m
1619# CONFIG_CRC16 is not set 1620# CONFIG_CRC16 is not set
1621# CONFIG_CRC_ITU_T is not set
1620CONFIG_CRC32=y 1622CONFIG_CRC32=y
1621CONFIG_LIBCRC32C=m 1623CONFIG_LIBCRC32C=m
1622CONFIG_ZLIB_INFLATE=y 1624CONFIG_ZLIB_INFLATE=y
1623CONFIG_ZLIB_DEFLATE=m 1625CONFIG_ZLIB_DEFLATE=m
1624CONFIG_PLIST=y 1626CONFIG_PLIST=y
1625CONFIG_IOMAP_COPY=y 1627CONFIG_HAS_IOMEM=y
1628CONFIG_HAS_IOPORT=y
1629CONFIG_HAS_DMA=y
1626 1630
1627# 1631#
1628# Instrumentation Support 1632# Instrumentation Support
@@ -1641,15 +1645,15 @@ CONFIG_MAGIC_SYSRQ=y
1641CONFIG_DEBUG_FS=y 1645CONFIG_DEBUG_FS=y
1642# CONFIG_HEADERS_CHECK is not set 1646# CONFIG_HEADERS_CHECK is not set
1643CONFIG_DEBUG_KERNEL=y 1647CONFIG_DEBUG_KERNEL=y
1644CONFIG_LOG_BUF_SHIFT=17 1648# CONFIG_DEBUG_SHIRQ is not set
1645CONFIG_DETECT_SOFTLOCKUP=y 1649CONFIG_DETECT_SOFTLOCKUP=y
1646# CONFIG_SCHEDSTATS is not set 1650# CONFIG_SCHEDSTATS is not set
1651# CONFIG_TIMER_STATS is not set
1647# CONFIG_DEBUG_SLAB is not set 1652# CONFIG_DEBUG_SLAB is not set
1648# CONFIG_DEBUG_RT_MUTEXES is not set 1653# CONFIG_DEBUG_RT_MUTEXES is not set
1649# CONFIG_RT_MUTEX_TESTER is not set 1654# CONFIG_RT_MUTEX_TESTER is not set
1650# CONFIG_DEBUG_SPINLOCK is not set 1655# CONFIG_DEBUG_SPINLOCK is not set
1651CONFIG_DEBUG_MUTEXES=y 1656CONFIG_DEBUG_MUTEXES=y
1652# CONFIG_DEBUG_RWSEMS is not set
1653# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1657# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1654# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1658# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1655# CONFIG_DEBUG_KOBJECT is not set 1659# CONFIG_DEBUG_KOBJECT is not set
@@ -1659,8 +1663,10 @@ CONFIG_DEBUG_BUGVERBOSE=y
1659# CONFIG_DEBUG_LIST is not set 1663# CONFIG_DEBUG_LIST is not set
1660CONFIG_FORCED_INLINING=y 1664CONFIG_FORCED_INLINING=y
1661# CONFIG_RCU_TORTURE_TEST is not set 1665# CONFIG_RCU_TORTURE_TEST is not set
1666# CONFIG_FAULT_INJECTION is not set
1662# CONFIG_DEBUG_STACKOVERFLOW is not set 1667# CONFIG_DEBUG_STACKOVERFLOW is not set
1663# CONFIG_DEBUG_STACK_USAGE is not set 1668# CONFIG_DEBUG_STACK_USAGE is not set
1669# CONFIG_DEBUG_PAGEALLOC is not set
1664# CONFIG_DEBUGGER is not set 1670# CONFIG_DEBUGGER is not set
1665CONFIG_IRQSTACKS=y 1671CONFIG_IRQSTACKS=y
1666CONFIG_BOOTX_TEXT=y 1672CONFIG_BOOTX_TEXT=y
@@ -1693,8 +1699,11 @@ CONFIG_CRYPTO_WP512=m
1693# CONFIG_CRYPTO_GF128MUL is not set 1699# CONFIG_CRYPTO_GF128MUL is not set
1694CONFIG_CRYPTO_ECB=m 1700CONFIG_CRYPTO_ECB=m
1695CONFIG_CRYPTO_CBC=y 1701CONFIG_CRYPTO_CBC=y
1702CONFIG_CRYPTO_PCBC=m
1696# CONFIG_CRYPTO_LRW is not set 1703# CONFIG_CRYPTO_LRW is not set
1704# CONFIG_CRYPTO_CRYPTD is not set
1697CONFIG_CRYPTO_DES=y 1705CONFIG_CRYPTO_DES=y
1706# CONFIG_CRYPTO_FCRYPT is not set
1698CONFIG_CRYPTO_BLOWFISH=m 1707CONFIG_CRYPTO_BLOWFISH=m
1699CONFIG_CRYPTO_TWOFISH=m 1708CONFIG_CRYPTO_TWOFISH=m
1700CONFIG_CRYPTO_TWOFISH_COMMON=m 1709CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1709,6 +1718,7 @@ CONFIG_CRYPTO_ANUBIS=m
1709CONFIG_CRYPTO_DEFLATE=m 1718CONFIG_CRYPTO_DEFLATE=m
1710CONFIG_CRYPTO_MICHAEL_MIC=m 1719CONFIG_CRYPTO_MICHAEL_MIC=m
1711CONFIG_CRYPTO_CRC32C=m 1720CONFIG_CRYPTO_CRC32C=m
1721# CONFIG_CRYPTO_CAMELLIA is not set
1712CONFIG_CRYPTO_TEST=m 1722CONFIG_CRYPTO_TEST=m
1713 1723
1714# 1724#
diff --git a/arch/powerpc/configs/holly_defconfig b/arch/powerpc/configs/holly_defconfig
index be633b9b57c3..04b94f884aae 100644
--- a/arch/powerpc/configs/holly_defconfig
+++ b/arch/powerpc/configs/holly_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.21 3# Linux kernel version: 2.6.22-rc6
4# Sat May 5 11:02:35 2007 4# Tue Jun 26 13:22:36 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_ALTIVEC is not set 45# CONFIG_ALTIVEC is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -70,6 +71,7 @@ CONFIG_SYSVIPC_SYSCTL=y
70# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
75CONFIG_BLK_DEV_INITRD=y 77CONFIG_BLK_DEV_INITRD=y
@@ -87,14 +89,19 @@ CONFIG_BUG=y
87CONFIG_ELF_CORE=y 89CONFIG_ELF_CORE=y
88CONFIG_BASE_FULL=y 90CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y 91CONFIG_FUTEX=y
92CONFIG_ANON_INODES=y
90CONFIG_EPOLL=y 93CONFIG_EPOLL=y
94CONFIG_SIGNALFD=y
95CONFIG_TIMERFD=y
96CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 97CONFIG_SHMEM=y
92CONFIG_SLAB=y
93CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLAB=y
100# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set
94CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
95# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
96CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
97# CONFIG_SLOB is not set
98 105
99# 106#
100# Loadable module support 107# Loadable module support
@@ -140,6 +147,7 @@ CONFIG_EMBEDDED6xx=y
140# CONFIG_LINKSTATION is not set 147# CONFIG_LINKSTATION is not set
141# CONFIG_MPC7448HPC2 is not set 148# CONFIG_MPC7448HPC2 is not set
142CONFIG_PPC_HOLLY=y 149CONFIG_PPC_HOLLY=y
150# CONFIG_PPC_PRPMC2800 is not set
143CONFIG_TSI108_BRIDGE=y 151CONFIG_TSI108_BRIDGE=y
144CONFIG_MPIC=y 152CONFIG_MPIC=y
145CONFIG_MPIC_WEIRD=y 153CONFIG_MPIC_WEIRD=y
@@ -182,10 +190,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
182# CONFIG_RESOURCES_64BIT is not set 190# CONFIG_RESOURCES_64BIT is not set
183CONFIG_ZONE_DMA_FLAG=1 191CONFIG_ZONE_DMA_FLAG=1
184CONFIG_PROC_DEVICETREE=y 192CONFIG_PROC_DEVICETREE=y
185# CONFIG_CMDLINE_BOOL is not set 193CONFIG_CMDLINE_BOOL=y
194CONFIG_CMDLINE="console=ttyS0,115200"
186# CONFIG_PM is not set 195# CONFIG_PM is not set
187# CONFIG_SECCOMP is not set 196# CONFIG_SECCOMP is not set
188# CONFIG_WANT_DEVICE_TREE is not set 197CONFIG_WANT_DEVICE_TREE=y
198CONFIG_DEVICE_TREE="holly.dts"
189CONFIG_ISA_DMA_API=y 199CONFIG_ISA_DMA_API=y
190 200
191# 201#
@@ -197,16 +207,14 @@ CONFIG_GENERIC_ISA_DMA=y
197CONFIG_PCI=y 207CONFIG_PCI=y
198CONFIG_PCI_DOMAINS=y 208CONFIG_PCI_DOMAINS=y
199# CONFIG_PCIEPORTBUS is not set 209# CONFIG_PCIEPORTBUS is not set
210CONFIG_ARCH_SUPPORTS_MSI=y
211# CONFIG_PCI_MSI is not set
200# CONFIG_PCI_DEBUG is not set 212# CONFIG_PCI_DEBUG is not set
201 213
202# 214#
203# PCCARD (PCMCIA/CardBus) support 215# PCCARD (PCMCIA/CardBus) support
204# 216#
205# CONFIG_PCCARD is not set 217# CONFIG_PCCARD is not set
206
207#
208# PCI Hotplug Support
209#
210# CONFIG_HOTPLUG_PCI is not set 218# CONFIG_HOTPLUG_PCI is not set
211 219
212# 220#
@@ -271,20 +279,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
271# CONFIG_INET6_TUNNEL is not set 279# CONFIG_INET6_TUNNEL is not set
272# CONFIG_NETWORK_SECMARK is not set 280# CONFIG_NETWORK_SECMARK is not set
273# CONFIG_NETFILTER is not set 281# CONFIG_NETFILTER is not set
274
275#
276# DCCP Configuration (EXPERIMENTAL)
277#
278# CONFIG_IP_DCCP is not set 282# CONFIG_IP_DCCP is not set
279
280#
281# SCTP Configuration (EXPERIMENTAL)
282#
283# CONFIG_IP_SCTP is not set 283# CONFIG_IP_SCTP is not set
284
285#
286# TIPC Configuration (EXPERIMENTAL)
287#
288# CONFIG_TIPC is not set 284# CONFIG_TIPC is not set
289# CONFIG_ATM is not set 285# CONFIG_ATM is not set
290# CONFIG_BRIDGE is not set 286# CONFIG_BRIDGE is not set
@@ -317,7 +313,9 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
317# 313#
318# CONFIG_CFG80211 is not set 314# CONFIG_CFG80211 is not set
319# CONFIG_WIRELESS_EXT is not set 315# CONFIG_WIRELESS_EXT is not set
316# CONFIG_MAC80211 is not set
320# CONFIG_IEEE80211 is not set 317# CONFIG_IEEE80211 is not set
318# CONFIG_RFKILL is not set
321 319
322# 320#
323# Device Drivers 321# Device Drivers
@@ -372,12 +370,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
372# 370#
373# Misc devices 371# Misc devices
374# 372#
373# CONFIG_PHANTOM is not set
375# CONFIG_SGI_IOC4 is not set 374# CONFIG_SGI_IOC4 is not set
376# CONFIG_TIFM_CORE is not set 375# CONFIG_TIFM_CORE is not set
377 376# CONFIG_BLINK is not set
378#
379# ATA/ATAPI/MFM/RLL support
380#
381# CONFIG_IDE is not set 377# CONFIG_IDE is not set
382 378
383# 379#
@@ -406,6 +402,7 @@ CONFIG_BLK_DEV_SD=y
406# CONFIG_SCSI_CONSTANTS is not set 402# CONFIG_SCSI_CONSTANTS is not set
407# CONFIG_SCSI_LOGGING is not set 403# CONFIG_SCSI_LOGGING is not set
408# CONFIG_SCSI_SCAN_ASYNC is not set 404# CONFIG_SCSI_SCAN_ASYNC is not set
405CONFIG_SCSI_WAIT_SCAN=m
409 406
410# 407#
411# SCSI Transports 408# SCSI Transports
@@ -453,12 +450,7 @@ CONFIG_BLK_DEV_SD=y
453# CONFIG_SCSI_DC390T is not set 450# CONFIG_SCSI_DC390T is not set
454# CONFIG_SCSI_NSP32 is not set 451# CONFIG_SCSI_NSP32 is not set
455# CONFIG_SCSI_DEBUG is not set 452# CONFIG_SCSI_DEBUG is not set
456# CONFIG_SCSI_ESP_CORE is not set
457# CONFIG_SCSI_SRP is not set 453# CONFIG_SCSI_SRP is not set
458
459#
460# Serial ATA (prod) and Parallel ATA (experimental) drivers
461#
462CONFIG_ATA=y 454CONFIG_ATA=y
463# CONFIG_ATA_NONSTANDARD is not set 455# CONFIG_ATA_NONSTANDARD is not set
464# CONFIG_SATA_AHCI is not set 456# CONFIG_SATA_AHCI is not set
@@ -531,6 +523,7 @@ CONFIG_ATA=y
531# 523#
532# IEEE 1394 (FireWire) support 524# IEEE 1394 (FireWire) support
533# 525#
526# CONFIG_FIREWIRE is not set
534# CONFIG_IEEE1394 is not set 527# CONFIG_IEEE1394 is not set
535 528
536# 529#
@@ -547,15 +540,7 @@ CONFIG_NETDEVICES=y
547# CONFIG_BONDING is not set 540# CONFIG_BONDING is not set
548# CONFIG_EQUALIZER is not set 541# CONFIG_EQUALIZER is not set
549# CONFIG_TUN is not set 542# CONFIG_TUN is not set
550
551#
552# ARCnet devices
553#
554# CONFIG_ARCNET is not set 543# CONFIG_ARCNET is not set
555
556#
557# PHY device support
558#
559CONFIG_PHYLIB=y 544CONFIG_PHYLIB=y
560 545
561# 546#
@@ -589,10 +574,7 @@ CONFIG_VORTEX=y
589# CONFIG_NET_TULIP is not set 574# CONFIG_NET_TULIP is not set
590# CONFIG_HP100 is not set 575# CONFIG_HP100 is not set
591# CONFIG_NET_PCI is not set 576# CONFIG_NET_PCI is not set
592 577CONFIG_NETDEV_1000=y
593#
594# Ethernet (1000 Mbit)
595#
596# CONFIG_ACENIC is not set 578# CONFIG_ACENIC is not set
597# CONFIG_DL2K is not set 579# CONFIG_DL2K is not set
598# CONFIG_E1000 is not set 580# CONFIG_E1000 is not set
@@ -604,25 +586,20 @@ CONFIG_VORTEX=y
604# CONFIG_SKGE is not set 586# CONFIG_SKGE is not set
605# CONFIG_SKY2 is not set 587# CONFIG_SKY2 is not set
606# CONFIG_SK98LIN is not set 588# CONFIG_SK98LIN is not set
589# CONFIG_VIA_VELOCITY is not set
607# CONFIG_TIGON3 is not set 590# CONFIG_TIGON3 is not set
608# CONFIG_BNX2 is not set 591# CONFIG_BNX2 is not set
609CONFIG_TSI108_ETH=y 592CONFIG_TSI108_ETH=y
610# CONFIG_QLA3XXX is not set 593# CONFIG_QLA3XXX is not set
611# CONFIG_ATL1 is not set 594# CONFIG_ATL1 is not set
612 595CONFIG_NETDEV_10000=y
613#
614# Ethernet (10000 Mbit)
615#
616# CONFIG_CHELSIO_T1 is not set 596# CONFIG_CHELSIO_T1 is not set
617# CONFIG_CHELSIO_T3 is not set 597# CONFIG_CHELSIO_T3 is not set
618# CONFIG_IXGB is not set 598# CONFIG_IXGB is not set
619# CONFIG_S2IO is not set 599# CONFIG_S2IO is not set
620# CONFIG_MYRI10GE is not set 600# CONFIG_MYRI10GE is not set
621# CONFIG_NETXEN_NIC is not set 601# CONFIG_NETXEN_NIC is not set
622 602# CONFIG_MLX4_CORE is not set
623#
624# Token Ring devices
625#
626# CONFIG_TR is not set 603# CONFIG_TR is not set
627 604
628# 605#
@@ -630,10 +607,6 @@ CONFIG_TSI108_ETH=y
630# 607#
631# CONFIG_WLAN_PRE80211 is not set 608# CONFIG_WLAN_PRE80211 is not set
632# CONFIG_WLAN_80211 is not set 609# CONFIG_WLAN_80211 is not set
633
634#
635# Wan interfaces
636#
637# CONFIG_WAN is not set 610# CONFIG_WAN is not set
638# CONFIG_FDDI is not set 611# CONFIG_FDDI is not set
639# CONFIG_HIPPI is not set 612# CONFIG_HIPPI is not set
@@ -660,6 +633,7 @@ CONFIG_TSI108_ETH=y
660# 633#
661CONFIG_INPUT=y 634CONFIG_INPUT=y
662# CONFIG_INPUT_FF_MEMLESS is not set 635# CONFIG_INPUT_FF_MEMLESS is not set
636# CONFIG_INPUT_POLLDEV is not set
663 637
664# 638#
665# Userland interfaces 639# Userland interfaces
@@ -676,6 +650,7 @@ CONFIG_INPUT=y
676# CONFIG_INPUT_KEYBOARD is not set 650# CONFIG_INPUT_KEYBOARD is not set
677# CONFIG_INPUT_MOUSE is not set 651# CONFIG_INPUT_MOUSE is not set
678# CONFIG_INPUT_JOYSTICK is not set 652# CONFIG_INPUT_JOYSTICK is not set
653# CONFIG_INPUT_TABLET is not set
679# CONFIG_INPUT_TOUCHSCREEN is not set 654# CONFIG_INPUT_TOUCHSCREEN is not set
680# CONFIG_INPUT_MISC is not set 655# CONFIG_INPUT_MISC is not set
681 656
@@ -721,16 +696,11 @@ CONFIG_LEGACY_PTY_COUNT=256
721# IPMI 696# IPMI
722# 697#
723# CONFIG_IPMI_HANDLER is not set 698# CONFIG_IPMI_HANDLER is not set
724
725#
726# Watchdog Cards
727#
728# CONFIG_WATCHDOG is not set 699# CONFIG_WATCHDOG is not set
729# CONFIG_HW_RANDOM is not set 700# CONFIG_HW_RANDOM is not set
730# CONFIG_NVRAM is not set 701# CONFIG_NVRAM is not set
731CONFIG_GEN_RTC=y 702CONFIG_GEN_RTC=y
732# CONFIG_GEN_RTC_X is not set 703# CONFIG_GEN_RTC_X is not set
733# CONFIG_DTLK is not set
734# CONFIG_R3964 is not set 704# CONFIG_R3964 is not set
735# CONFIG_APPLICOM is not set 705# CONFIG_APPLICOM is not set
736# CONFIG_AGP is not set 706# CONFIG_AGP is not set
@@ -741,10 +711,7 @@ CONFIG_GEN_RTC=y
741# TPM devices 711# TPM devices
742# 712#
743# CONFIG_TCG_TPM is not set 713# CONFIG_TCG_TPM is not set
744 714CONFIG_DEVPORT=y
745#
746# I2C support
747#
748# CONFIG_I2C is not set 715# CONFIG_I2C is not set
749 716
750# 717#
@@ -757,16 +724,15 @@ CONFIG_GEN_RTC=y
757# Dallas's 1-wire bus 724# Dallas's 1-wire bus
758# 725#
759# CONFIG_W1 is not set 726# CONFIG_W1 is not set
760
761#
762# Hardware Monitoring support
763#
764CONFIG_HWMON=y 727CONFIG_HWMON=y
765# CONFIG_HWMON_VID is not set 728# CONFIG_HWMON_VID is not set
766# CONFIG_SENSORS_ABITUGURU is not set 729# CONFIG_SENSORS_ABITUGURU is not set
767# CONFIG_SENSORS_F71805F is not set 730# CONFIG_SENSORS_F71805F is not set
768# CONFIG_SENSORS_PC87427 is not set 731# CONFIG_SENSORS_PC87427 is not set
732# CONFIG_SENSORS_SMSC47M1 is not set
733# CONFIG_SENSORS_SMSC47B397 is not set
769# CONFIG_SENSORS_VT1211 is not set 734# CONFIG_SENSORS_VT1211 is not set
735# CONFIG_SENSORS_W83627HF is not set
770# CONFIG_HWMON_DEBUG_CHIP is not set 736# CONFIG_HWMON_DEBUG_CHIP is not set
771 737
772# 738#
@@ -778,16 +744,19 @@ CONFIG_HWMON=y
778# Multimedia devices 744# Multimedia devices
779# 745#
780# CONFIG_VIDEO_DEV is not set 746# CONFIG_VIDEO_DEV is not set
747# CONFIG_DVB_CORE is not set
748# CONFIG_DAB is not set
781 749
782# 750#
783# Digital Video Broadcasting Devices 751# Graphics support
784# 752#
785# CONFIG_DVB is not set 753# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
786 754
787# 755#
788# Graphics support 756# Display device support
789# 757#
790# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 758# CONFIG_DISPLAY_SUPPORT is not set
759# CONFIG_VGASTATE is not set
791# CONFIG_FB is not set 760# CONFIG_FB is not set
792# CONFIG_FB_IBM_GXT4500 is not set 761# CONFIG_FB_IBM_GXT4500 is not set
793 762
@@ -818,10 +787,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
818# USB Gadget Support 787# USB Gadget Support
819# 788#
820# CONFIG_USB_GADGET is not set 789# CONFIG_USB_GADGET is not set
821
822#
823# MMC/SD Card support
824#
825# CONFIG_MMC is not set 790# CONFIG_MMC is not set
826 791
827# 792#
@@ -865,14 +830,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
865# 830#
866 831
867# 832#
868# Auxiliary Display support
869#
870
871#
872# Virtualization
873#
874
875#
876# File systems 833# File systems
877# 834#
878CONFIG_EXT2_FS=y 835CONFIG_EXT2_FS=y
@@ -957,6 +914,7 @@ CONFIG_ROOT_NFS=y
957CONFIG_LOCKD=y 914CONFIG_LOCKD=y
958CONFIG_NFS_COMMON=y 915CONFIG_NFS_COMMON=y
959CONFIG_SUNRPC=y 916CONFIG_SUNRPC=y
917# CONFIG_SUNRPC_BIND34 is not set
960# CONFIG_RPCSEC_GSS_KRB5 is not set 918# CONFIG_RPCSEC_GSS_KRB5 is not set
961# CONFIG_RPCSEC_GSS_SPKM3 is not set 919# CONFIG_RPCSEC_GSS_SPKM3 is not set
962# CONFIG_SMB_FS is not set 920# CONFIG_SMB_FS is not set
@@ -986,6 +944,7 @@ CONFIG_MSDOS_PARTITION=y
986# CONFIG_SUN_PARTITION is not set 944# CONFIG_SUN_PARTITION is not set
987# CONFIG_KARMA_PARTITION is not set 945# CONFIG_KARMA_PARTITION is not set
988# CONFIG_EFI_PARTITION is not set 946# CONFIG_EFI_PARTITION is not set
947# CONFIG_SYSV68_PARTITION is not set
989 948
990# 949#
991# Native Language Support 950# Native Language Support
@@ -997,7 +956,6 @@ CONFIG_MSDOS_PARTITION=y
997# 956#
998# CONFIG_DLM is not set 957# CONFIG_DLM is not set
999# CONFIG_UCC_SLOW is not set 958# CONFIG_UCC_SLOW is not set
1000# CONFIG_UCC_FAST is not set
1001 959
1002# 960#
1003# Library routines 961# Library routines
@@ -1005,11 +963,13 @@ CONFIG_MSDOS_PARTITION=y
1005CONFIG_BITREVERSE=y 963CONFIG_BITREVERSE=y
1006# CONFIG_CRC_CCITT is not set 964# CONFIG_CRC_CCITT is not set
1007# CONFIG_CRC16 is not set 965# CONFIG_CRC16 is not set
966# CONFIG_CRC_ITU_T is not set
1008CONFIG_CRC32=y 967CONFIG_CRC32=y
1009# CONFIG_LIBCRC32C is not set 968# CONFIG_LIBCRC32C is not set
1010CONFIG_PLIST=y 969CONFIG_PLIST=y
1011CONFIG_HAS_IOMEM=y 970CONFIG_HAS_IOMEM=y
1012CONFIG_HAS_IOPORT=y 971CONFIG_HAS_IOPORT=y
972CONFIG_HAS_DMA=y
1013 973
1014# 974#
1015# Instrumentation Support 975# Instrumentation Support
@@ -1028,7 +988,6 @@ CONFIG_MAGIC_SYSRQ=y
1028# CONFIG_HEADERS_CHECK is not set 988# CONFIG_HEADERS_CHECK is not set
1029CONFIG_DEBUG_KERNEL=y 989CONFIG_DEBUG_KERNEL=y
1030# CONFIG_DEBUG_SHIRQ is not set 990# CONFIG_DEBUG_SHIRQ is not set
1031CONFIG_LOG_BUF_SHIFT=14
1032CONFIG_DETECT_SOFTLOCKUP=y 991CONFIG_DETECT_SOFTLOCKUP=y
1033# CONFIG_SCHEDSTATS is not set 992# CONFIG_SCHEDSTATS is not set
1034# CONFIG_TIMER_STATS is not set 993# CONFIG_TIMER_STATS is not set
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig
index af25118c8f24..8e3367452427 100644
--- a/arch/powerpc/configs/iseries_defconfig
+++ b/arch/powerpc/configs/iseries_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc1 3# Linux kernel version: 2.6.22-rc6
4# Mon May 14 14:27:46 2007 4# Tue Jun 26 13:22:39 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -281,10 +281,6 @@ CONFIG_INET_TCP_DIAG=y
281CONFIG_TCP_CONG_CUBIC=y 281CONFIG_TCP_CONG_CUBIC=y
282CONFIG_DEFAULT_TCP_CONG="cubic" 282CONFIG_DEFAULT_TCP_CONG="cubic"
283# CONFIG_TCP_MD5SIG is not set 283# CONFIG_TCP_MD5SIG is not set
284
285#
286# IP: Virtual Server Configuration
287#
288# CONFIG_IP_VS is not set 284# CONFIG_IP_VS is not set
289# CONFIG_IPV6 is not set 285# CONFIG_IPV6 is not set
290# CONFIG_INET6_XFRM_TUNNEL is not set 286# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -387,25 +383,13 @@ CONFIG_IP_NF_RAW=m
387CONFIG_IP_NF_ARPTABLES=m 383CONFIG_IP_NF_ARPTABLES=m
388CONFIG_IP_NF_ARPFILTER=m 384CONFIG_IP_NF_ARPFILTER=m
389CONFIG_IP_NF_ARP_MANGLE=m 385CONFIG_IP_NF_ARP_MANGLE=m
390
391#
392# DCCP Configuration (EXPERIMENTAL)
393#
394# CONFIG_IP_DCCP is not set 386# CONFIG_IP_DCCP is not set
395
396#
397# SCTP Configuration (EXPERIMENTAL)
398#
399CONFIG_IP_SCTP=m 387CONFIG_IP_SCTP=m
400# CONFIG_SCTP_DBG_MSG is not set 388# CONFIG_SCTP_DBG_MSG is not set
401# CONFIG_SCTP_DBG_OBJCNT is not set 389# CONFIG_SCTP_DBG_OBJCNT is not set
402# CONFIG_SCTP_HMAC_NONE is not set 390# CONFIG_SCTP_HMAC_NONE is not set
403# CONFIG_SCTP_HMAC_SHA1 is not set 391# CONFIG_SCTP_HMAC_SHA1 is not set
404CONFIG_SCTP_HMAC_MD5=y 392CONFIG_SCTP_HMAC_MD5=y
405
406#
407# TIPC Configuration (EXPERIMENTAL)
408#
409# CONFIG_TIPC is not set 393# CONFIG_TIPC is not set
410# CONFIG_ATM is not set 394# CONFIG_ATM is not set
411# CONFIG_BRIDGE is not set 395# CONFIG_BRIDGE is not set
@@ -501,10 +485,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
501# CONFIG_SGI_IOC4 is not set 485# CONFIG_SGI_IOC4 is not set
502# CONFIG_TIFM_CORE is not set 486# CONFIG_TIFM_CORE is not set
503# CONFIG_BLINK is not set 487# CONFIG_BLINK is not set
504
505#
506# ATA/ATAPI/MFM/RLL support
507#
508# CONFIG_IDE is not set 488# CONFIG_IDE is not set
509 489
510# 490#
@@ -581,7 +561,6 @@ CONFIG_SCSI_IBMVSCSI=m
581# CONFIG_SCSI_DC395x is not set 561# CONFIG_SCSI_DC395x is not set
582# CONFIG_SCSI_DC390T is not set 562# CONFIG_SCSI_DC390T is not set
583# CONFIG_SCSI_DEBUG is not set 563# CONFIG_SCSI_DEBUG is not set
584# CONFIG_SCSI_ESP_CORE is not set
585# CONFIG_SCSI_SRP is not set 564# CONFIG_SCSI_SRP is not set
586# CONFIG_ATA is not set 565# CONFIG_ATA is not set
587 566
@@ -634,10 +613,6 @@ CONFIG_DUMMY=m
634CONFIG_BONDING=m 613CONFIG_BONDING=m
635# CONFIG_EQUALIZER is not set 614# CONFIG_EQUALIZER is not set
636CONFIG_TUN=m 615CONFIG_TUN=m
637
638#
639# ARCnet devices
640#
641# CONFIG_ARCNET is not set 616# CONFIG_ARCNET is not set
642# CONFIG_PHYLIB is not set 617# CONFIG_PHYLIB is not set
643 618
@@ -705,11 +680,6 @@ CONFIG_NETDEV_10000=y
705# CONFIG_NETXEN_NIC is not set 680# CONFIG_NETXEN_NIC is not set
706# CONFIG_PASEMI_MAC is not set 681# CONFIG_PASEMI_MAC is not set
707# CONFIG_MLX4_CORE is not set 682# CONFIG_MLX4_CORE is not set
708CONFIG_MLX4_DEBUG=y
709
710#
711# Token Ring devices
712#
713CONFIG_TR=y 683CONFIG_TR=y
714CONFIG_IBMOL=y 684CONFIG_IBMOL=y
715# CONFIG_3C359 is not set 685# CONFIG_3C359 is not set
@@ -757,6 +727,7 @@ CONFIG_NET_POLL_CONTROLLER=y
757# 727#
758CONFIG_INPUT=y 728CONFIG_INPUT=y
759# CONFIG_INPUT_FF_MEMLESS is not set 729# CONFIG_INPUT_FF_MEMLESS is not set
730# CONFIG_INPUT_POLLDEV is not set
760 731
761# 732#
762# Userland interfaces 733# Userland interfaces
@@ -1139,7 +1110,6 @@ CONFIG_NLS_ISO8859_1=y
1139CONFIG_DLM=m 1110CONFIG_DLM=m
1140# CONFIG_DLM_DEBUG is not set 1111# CONFIG_DLM_DEBUG is not set
1141# CONFIG_UCC_SLOW is not set 1112# CONFIG_UCC_SLOW is not set
1142# CONFIG_UCC_FAST is not set
1143 1113
1144# 1114#
1145# Library routines 1115# Library routines
diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/configs/linkstation_defconfig
index dde66a597a8d..78fd07c5f47f 100644
--- a/arch/powerpc/configs/linkstation_defconfig
+++ b/arch/powerpc/configs/linkstation_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.20-rc6 3# Linux kernel version: 2.6.22-rc6
4# Sun Jan 28 23:13:56 2007 4# Tue Jun 26 13:25:19 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -24,7 +24,7 @@ CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 24# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 26CONFIG_GENERIC_BUG=y
27# CONFIG_DEFAULT_UIMAGE is not set 27CONFIG_DEFAULT_UIMAGE=y
28 28
29# 29#
30# Processor support 30# Processor support
@@ -34,9 +34,9 @@ CONFIG_CLASSIC32=y
34# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set 35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set 36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
37# CONFIG_40x is not set 38# CONFIG_40x is not set
38# CONFIG_44x is not set 39# CONFIG_44x is not set
39# CONFIG_8xx is not set
40# CONFIG_E200 is not set 40# CONFIG_E200 is not set
41CONFIG_6xx=y 41CONFIG_6xx=y
42CONFIG_PPC_FPU=y 42CONFIG_PPC_FPU=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_ALTIVEC is not set 45# CONFIG_ALTIVEC is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -63,6 +64,7 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66CONFIG_POSIX_MQUEUE=y 68CONFIG_POSIX_MQUEUE=y
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
@@ -70,8 +72,10 @@ CONFIG_POSIX_MQUEUE=y
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71CONFIG_IKCONFIG=y 73CONFIG_IKCONFIG=y
72CONFIG_IKCONFIG_PROC=y 74CONFIG_IKCONFIG_PROC=y
75CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 76CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 77# CONFIG_RELAY is not set
78CONFIG_BLK_DEV_INITRD=y
75CONFIG_INITRAMFS_SOURCE="" 79CONFIG_INITRAMFS_SOURCE=""
76# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 80# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
77CONFIG_SYSCTL=y 81CONFIG_SYSCTL=y
@@ -86,14 +90,19 @@ CONFIG_BUG=y
86CONFIG_ELF_CORE=y 90CONFIG_ELF_CORE=y
87CONFIG_BASE_FULL=y 91CONFIG_BASE_FULL=y
88CONFIG_FUTEX=y 92CONFIG_FUTEX=y
93CONFIG_ANON_INODES=y
89CONFIG_EPOLL=y 94CONFIG_EPOLL=y
95CONFIG_SIGNALFD=y
96CONFIG_TIMERFD=y
97CONFIG_EVENTFD=y
90CONFIG_SHMEM=y 98CONFIG_SHMEM=y
91CONFIG_SLAB=y
92CONFIG_VM_EVENT_COUNTERS=y 99CONFIG_VM_EVENT_COUNTERS=y
100CONFIG_SLAB=y
101# CONFIG_SLUB is not set
102# CONFIG_SLOB is not set
93CONFIG_RT_MUTEXES=y 103CONFIG_RT_MUTEXES=y
94# CONFIG_TINY_SHMEM is not set 104# CONFIG_TINY_SHMEM is not set
95CONFIG_BASE_SMALL=0 105CONFIG_BASE_SMALL=0
96# CONFIG_SLOB is not set
97 106
98# 107#
99# Loadable module support 108# Loadable module support
@@ -133,8 +142,20 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
133CONFIG_EMBEDDED6xx=y 142CONFIG_EMBEDDED6xx=y
134# CONFIG_APUS is not set 143# CONFIG_APUS is not set
135# CONFIG_PPC_MPC52xx is not set 144# CONFIG_PPC_MPC52xx is not set
145# CONFIG_PPC_MPC5200 is not set
136# CONFIG_PPC_CELL is not set 146# CONFIG_PPC_CELL is not set
137# CONFIG_PPC_CELL_NATIVE is not set 147# CONFIG_PPC_CELL_NATIVE is not set
148# CONFIG_PQ2ADS is not set
149CONFIG_LINKSTATION=y
150# CONFIG_MPC7448HPC2 is not set
151# CONFIG_PPC_HOLLY is not set
152# CONFIG_PPC_PRPMC2800 is not set
153CONFIG_MPC10X_BRIDGE=y
154CONFIG_MPC10X_OPENPIC=y
155# CONFIG_MPC10X_STORE_GATHERING is not set
156CONFIG_MPIC=y
157# CONFIG_MPIC_WEIRD is not set
158# CONFIG_PPC_I8259 is not set
138# CONFIG_PPC_RTAS is not set 159# CONFIG_PPC_RTAS is not set
139# CONFIG_MMIO_NVRAM is not set 160# CONFIG_MMIO_NVRAM is not set
140# CONFIG_PPC_MPC106 is not set 161# CONFIG_PPC_MPC106 is not set
@@ -143,39 +164,7 @@ CONFIG_EMBEDDED6xx=y
143# CONFIG_GENERIC_IOMAP is not set 164# CONFIG_GENERIC_IOMAP is not set
144# CONFIG_CPU_FREQ is not set 165# CONFIG_CPU_FREQ is not set
145# CONFIG_TAU is not set 166# CONFIG_TAU is not set
146# CONFIG_KATANA is not set 167# CONFIG_CPM2 is not set
147# CONFIG_WILLOW is not set
148# CONFIG_CPCI690 is not set
149# CONFIG_POWERPMC250 is not set
150# CONFIG_CHESTNUT is not set
151# CONFIG_SPRUCE is not set
152# CONFIG_HDPU is not set
153# CONFIG_EV64260 is not set
154# CONFIG_LOPEC is not set
155# CONFIG_MVME5100 is not set
156# CONFIG_PPLUS is not set
157# CONFIG_PRPMC750 is not set
158# CONFIG_PRPMC800 is not set
159# CONFIG_SANDPOINT is not set
160CONFIG_LINKSTATION=y
161# CONFIG_MPC7448HPC2 is not set
162# CONFIG_RADSTONE_PPC7D is not set
163# CONFIG_PAL4 is not set
164# CONFIG_GEMINI is not set
165# CONFIG_EST8260 is not set
166# CONFIG_SBC82xx is not set
167# CONFIG_SBS8260 is not set
168# CONFIG_RPX8260 is not set
169# CONFIG_TQM8260 is not set
170# CONFIG_ADS8272 is not set
171# CONFIG_PQ2FADS is not set
172# CONFIG_EV64360 is not set
173CONFIG_PPC_GEN550=y
174CONFIG_MPC10X_BRIDGE=y
175CONFIG_MPC10X_OPENPIC=y
176# CONFIG_MPC10X_STORE_GATHERING is not set
177# CONFIG_WANT_EARLY_SERIAL is not set
178CONFIG_MPIC=y
179 168
180# 169#
181# Kernel options 170# Kernel options
@@ -203,33 +192,33 @@ CONFIG_FLAT_NODE_MEM_MAP=y
203# CONFIG_SPARSEMEM_STATIC is not set 192# CONFIG_SPARSEMEM_STATIC is not set
204CONFIG_SPLIT_PTLOCK_CPUS=4 193CONFIG_SPLIT_PTLOCK_CPUS=4
205# CONFIG_RESOURCES_64BIT is not set 194# CONFIG_RESOURCES_64BIT is not set
195CONFIG_ZONE_DMA_FLAG=1
206CONFIG_PROC_DEVICETREE=y 196CONFIG_PROC_DEVICETREE=y
207# CONFIG_CMDLINE_BOOL is not set 197# CONFIG_CMDLINE_BOOL is not set
208# CONFIG_PM is not set 198# CONFIG_PM is not set
209CONFIG_SECCOMP=y 199CONFIG_SECCOMP=y
200# CONFIG_WANT_DEVICE_TREE is not set
210CONFIG_ISA_DMA_API=y 201CONFIG_ISA_DMA_API=y
211 202
212# 203#
213# Bus options 204# Bus options
214# 205#
206CONFIG_ZONE_DMA=y
215CONFIG_GENERIC_ISA_DMA=y 207CONFIG_GENERIC_ISA_DMA=y
216# CONFIG_MPIC_WEIRD is not set
217# CONFIG_PPC_I8259 is not set
218CONFIG_PPC_INDIRECT_PCI=y 208CONFIG_PPC_INDIRECT_PCI=y
209# CONFIG_PPC_INDIRECT_PCI_BE is not set
219CONFIG_FSL_SOC=y 210CONFIG_FSL_SOC=y
220CONFIG_PCI=y 211CONFIG_PCI=y
221CONFIG_PCI_DOMAINS=y 212CONFIG_PCI_DOMAINS=y
222# CONFIG_PCIEPORTBUS is not set 213# CONFIG_PCIEPORTBUS is not set
214CONFIG_ARCH_SUPPORTS_MSI=y
215# CONFIG_PCI_MSI is not set
223# CONFIG_PCI_DEBUG is not set 216# CONFIG_PCI_DEBUG is not set
224 217
225# 218#
226# PCCARD (PCMCIA/CardBus) support 219# PCCARD (PCMCIA/CardBus) support
227# 220#
228# CONFIG_PCCARD is not set 221# CONFIG_PCCARD is not set
229
230#
231# PCI Hotplug Support
232#
233# CONFIG_HOTPLUG_PCI is not set 222# CONFIG_HOTPLUG_PCI is not set
234 223
235# 224#
@@ -254,13 +243,13 @@ CONFIG_NET=y
254# 243#
255# Networking options 244# Networking options
256# 245#
257# CONFIG_NETDEBUG is not set
258CONFIG_PACKET=y 246CONFIG_PACKET=y
259CONFIG_PACKET_MMAP=y 247CONFIG_PACKET_MMAP=y
260CONFIG_UNIX=y 248CONFIG_UNIX=y
261CONFIG_XFRM=y 249CONFIG_XFRM=y
262# CONFIG_XFRM_USER is not set 250# CONFIG_XFRM_USER is not set
263# CONFIG_XFRM_SUB_POLICY is not set 251# CONFIG_XFRM_SUB_POLICY is not set
252# CONFIG_XFRM_MIGRATE is not set
264# CONFIG_NET_KEY is not set 253# CONFIG_NET_KEY is not set
265CONFIG_INET=y 254CONFIG_INET=y
266CONFIG_IP_MULTICAST=y 255CONFIG_IP_MULTICAST=y
@@ -289,10 +278,6 @@ CONFIG_INET_TCP_DIAG=y
289CONFIG_TCP_CONG_CUBIC=y 278CONFIG_TCP_CONG_CUBIC=y
290CONFIG_DEFAULT_TCP_CONG="cubic" 279CONFIG_DEFAULT_TCP_CONG="cubic"
291# CONFIG_TCP_MD5SIG is not set 280# CONFIG_TCP_MD5SIG is not set
292
293#
294# IP: Virtual Server Configuration
295#
296# CONFIG_IP_VS is not set 281# CONFIG_IP_VS is not set
297# CONFIG_IPV6 is not set 282# CONFIG_IPV6 is not set
298# CONFIG_INET6_XFRM_TUNNEL is not set 283# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -306,8 +291,6 @@ CONFIG_NETFILTER=y
306# 291#
307# CONFIG_NETFILTER_NETLINK is not set 292# CONFIG_NETFILTER_NETLINK is not set
308CONFIG_NF_CONNTRACK_ENABLED=m 293CONFIG_NF_CONNTRACK_ENABLED=m
309CONFIG_NF_CONNTRACK_SUPPORT=y
310# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
311CONFIG_NF_CONNTRACK=m 294CONFIG_NF_CONNTRACK=m
312# CONFIG_NF_CT_ACCT is not set 295# CONFIG_NF_CT_ACCT is not set
313# CONFIG_NF_CONNTRACK_MARK is not set 296# CONFIG_NF_CONNTRACK_MARK is not set
@@ -320,16 +303,21 @@ CONFIG_NF_CONNTRACK_H323=m
320CONFIG_NF_CONNTRACK_IRC=m 303CONFIG_NF_CONNTRACK_IRC=m
321CONFIG_NF_CONNTRACK_NETBIOS_NS=m 304CONFIG_NF_CONNTRACK_NETBIOS_NS=m
322CONFIG_NF_CONNTRACK_PPTP=m 305CONFIG_NF_CONNTRACK_PPTP=m
306# CONFIG_NF_CONNTRACK_SANE is not set
323CONFIG_NF_CONNTRACK_SIP=m 307CONFIG_NF_CONNTRACK_SIP=m
324CONFIG_NF_CONNTRACK_TFTP=m 308CONFIG_NF_CONNTRACK_TFTP=m
325CONFIG_NETFILTER_XTABLES=m 309CONFIG_NETFILTER_XTABLES=m
326# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set 310# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
311# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set
327# CONFIG_NETFILTER_XT_TARGET_DSCP is not set 312# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
328# CONFIG_NETFILTER_XT_TARGET_MARK is not set 313# CONFIG_NETFILTER_XT_TARGET_MARK is not set
329# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set 314# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
330# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set 315# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
331# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set 316# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
317# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
332# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set 318# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
319# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set
320# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set
333# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set 321# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set
334# CONFIG_NETFILTER_XT_MATCH_DCCP is not set 322# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
335# CONFIG_NETFILTER_XT_MATCH_DSCP is not set 323# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
@@ -370,7 +358,6 @@ CONFIG_IP_NF_FILTER=m
370CONFIG_IP_NF_TARGET_REJECT=m 358CONFIG_IP_NF_TARGET_REJECT=m
371# CONFIG_IP_NF_TARGET_LOG is not set 359# CONFIG_IP_NF_TARGET_LOG is not set
372# CONFIG_IP_NF_TARGET_ULOG is not set 360# CONFIG_IP_NF_TARGET_ULOG is not set
373# CONFIG_IP_NF_TARGET_TCPMSS is not set
374CONFIG_NF_NAT=m 361CONFIG_NF_NAT=m
375CONFIG_NF_NAT_NEEDED=y 362CONFIG_NF_NAT_NEEDED=y
376CONFIG_IP_NF_TARGET_MASQUERADE=m 363CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -390,24 +377,13 @@ CONFIG_IP_NF_MANGLE=m
390CONFIG_IP_NF_TARGET_TOS=m 377CONFIG_IP_NF_TARGET_TOS=m
391CONFIG_IP_NF_TARGET_ECN=m 378CONFIG_IP_NF_TARGET_ECN=m
392CONFIG_IP_NF_TARGET_TTL=m 379CONFIG_IP_NF_TARGET_TTL=m
380# CONFIG_IP_NF_TARGET_CLUSTERIP is not set
393CONFIG_IP_NF_RAW=m 381CONFIG_IP_NF_RAW=m
394CONFIG_IP_NF_ARPTABLES=m 382CONFIG_IP_NF_ARPTABLES=m
395CONFIG_IP_NF_ARPFILTER=m 383CONFIG_IP_NF_ARPFILTER=m
396CONFIG_IP_NF_ARP_MANGLE=m 384CONFIG_IP_NF_ARP_MANGLE=m
397
398#
399# DCCP Configuration (EXPERIMENTAL)
400#
401# CONFIG_IP_DCCP is not set 385# CONFIG_IP_DCCP is not set
402
403#
404# SCTP Configuration (EXPERIMENTAL)
405#
406# CONFIG_IP_SCTP is not set 386# CONFIG_IP_SCTP is not set
407
408#
409# TIPC Configuration (EXPERIMENTAL)
410#
411# CONFIG_TIPC is not set 387# CONFIG_TIPC is not set
412# CONFIG_ATM is not set 388# CONFIG_ATM is not set
413# CONFIG_BRIDGE is not set 389# CONFIG_BRIDGE is not set
@@ -433,6 +409,14 @@ CONFIG_IP_NF_ARP_MANGLE=m
433# CONFIG_HAMRADIO is not set 409# CONFIG_HAMRADIO is not set
434# CONFIG_IRDA is not set 410# CONFIG_IRDA is not set
435# CONFIG_BT is not set 411# CONFIG_BT is not set
412# CONFIG_AF_RXRPC is not set
413
414#
415# Wireless
416#
417# CONFIG_CFG80211 is not set
418CONFIG_WIRELESS_EXT=y
419# CONFIG_MAC80211 is not set
436CONFIG_IEEE80211=m 420CONFIG_IEEE80211=m
437CONFIG_IEEE80211_DEBUG=y 421CONFIG_IEEE80211_DEBUG=y
438CONFIG_IEEE80211_CRYPT_WEP=m 422CONFIG_IEEE80211_CRYPT_WEP=m
@@ -440,7 +424,7 @@ CONFIG_IEEE80211_CRYPT_CCMP=m
440CONFIG_IEEE80211_CRYPT_TKIP=m 424CONFIG_IEEE80211_CRYPT_TKIP=m
441CONFIG_IEEE80211_SOFTMAC=m 425CONFIG_IEEE80211_SOFTMAC=m
442CONFIG_IEEE80211_SOFTMAC_DEBUG=y 426CONFIG_IEEE80211_SOFTMAC_DEBUG=y
443CONFIG_WIRELESS_EXT=y 427# CONFIG_RFKILL is not set
444 428
445# 429#
446# Device Drivers 430# Device Drivers
@@ -453,16 +437,13 @@ CONFIG_STANDALONE=y
453CONFIG_PREVENT_FIRMWARE_BUILD=y 437CONFIG_PREVENT_FIRMWARE_BUILD=y
454CONFIG_FW_LOADER=m 438CONFIG_FW_LOADER=m
455# CONFIG_DEBUG_DRIVER is not set 439# CONFIG_DEBUG_DRIVER is not set
440# CONFIG_DEBUG_DEVRES is not set
456# CONFIG_SYS_HYPERVISOR is not set 441# CONFIG_SYS_HYPERVISOR is not set
457 442
458# 443#
459# Connector - unified userspace <-> kernelspace linker 444# Connector - unified userspace <-> kernelspace linker
460# 445#
461# CONFIG_CONNECTOR is not set 446# CONFIG_CONNECTOR is not set
462
463#
464# Memory Technology Devices (MTD)
465#
466CONFIG_MTD=y 447CONFIG_MTD=y
467# CONFIG_MTD_DEBUG is not set 448# CONFIG_MTD_DEBUG is not set
468CONFIG_MTD_CONCAT=y 449CONFIG_MTD_CONCAT=y
@@ -511,7 +492,6 @@ CONFIG_MTD_CFI_UTIL=y
511# CONFIG_MTD_RAM is not set 492# CONFIG_MTD_RAM is not set
512# CONFIG_MTD_ROM is not set 493# CONFIG_MTD_ROM is not set
513# CONFIG_MTD_ABSENT is not set 494# CONFIG_MTD_ABSENT is not set
514# CONFIG_MTD_OBSOLETE_CHIPS is not set
515 495
516# 496#
517# Mapping drivers for chip access 497# Mapping drivers for chip access
@@ -539,17 +519,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
539# CONFIG_MTD_DOC2000 is not set 519# CONFIG_MTD_DOC2000 is not set
540# CONFIG_MTD_DOC2001 is not set 520# CONFIG_MTD_DOC2001 is not set
541# CONFIG_MTD_DOC2001PLUS is not set 521# CONFIG_MTD_DOC2001PLUS is not set
542
543#
544# NAND Flash Device Drivers
545#
546# CONFIG_MTD_NAND is not set 522# CONFIG_MTD_NAND is not set
547# CONFIG_MTD_NAND_CAFE is not set 523# CONFIG_MTD_ONENAND is not set
548 524
549# 525#
550# OneNAND Flash Device Drivers 526# UBI - Unsorted block images
551# 527#
552# CONFIG_MTD_ONENAND is not set 528# CONFIG_MTD_UBI is not set
553 529
554# 530#
555# Parallel port support 531# Parallel port support
@@ -559,6 +535,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
559# 535#
560# Plug and Play support 536# Plug and Play support
561# 537#
538# CONFIG_PNPACPI is not set
562 539
563# 540#
564# Block devices 541# Block devices
@@ -578,19 +555,16 @@ CONFIG_BLK_DEV_RAM=y
578CONFIG_BLK_DEV_RAM_COUNT=2 555CONFIG_BLK_DEV_RAM_COUNT=2
579CONFIG_BLK_DEV_RAM_SIZE=8192 556CONFIG_BLK_DEV_RAM_SIZE=8192
580CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 557CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
581CONFIG_BLK_DEV_INITRD=y
582# CONFIG_CDROM_PKTCDVD is not set 558# CONFIG_CDROM_PKTCDVD is not set
583# CONFIG_ATA_OVER_ETH is not set 559# CONFIG_ATA_OVER_ETH is not set
584 560
585# 561#
586# Misc devices 562# Misc devices
587# 563#
564# CONFIG_PHANTOM is not set
588# CONFIG_SGI_IOC4 is not set 565# CONFIG_SGI_IOC4 is not set
589# CONFIG_TIFM_CORE is not set 566# CONFIG_TIFM_CORE is not set
590 567# CONFIG_BLINK is not set
591#
592# ATA/ATAPI/MFM/RLL support
593#
594# CONFIG_IDE is not set 568# CONFIG_IDE is not set
595 569
596# 570#
@@ -619,6 +593,7 @@ CONFIG_SCSI_MULTI_LUN=y
619# CONFIG_SCSI_CONSTANTS is not set 593# CONFIG_SCSI_CONSTANTS is not set
620# CONFIG_SCSI_LOGGING is not set 594# CONFIG_SCSI_LOGGING is not set
621# CONFIG_SCSI_SCAN_ASYNC is not set 595# CONFIG_SCSI_SCAN_ASYNC is not set
596CONFIG_SCSI_WAIT_SCAN=m
622 597
623# 598#
624# SCSI Transports 599# SCSI Transports
@@ -667,11 +642,8 @@ CONFIG_SCSI_MULTI_LUN=y
667# CONFIG_SCSI_NSP32 is not set 642# CONFIG_SCSI_NSP32 is not set
668# CONFIG_SCSI_DEBUG is not set 643# CONFIG_SCSI_DEBUG is not set
669# CONFIG_SCSI_SRP is not set 644# CONFIG_SCSI_SRP is not set
670
671#
672# Serial ATA (prod) and Parallel ATA (experimental) drivers
673#
674CONFIG_ATA=y 645CONFIG_ATA=y
646# CONFIG_ATA_NONSTANDARD is not set
675# CONFIG_SATA_AHCI is not set 647# CONFIG_SATA_AHCI is not set
676# CONFIG_SATA_SVW is not set 648# CONFIG_SATA_SVW is not set
677# CONFIG_ATA_PIIX is not set 649# CONFIG_ATA_PIIX is not set
@@ -687,10 +659,12 @@ CONFIG_ATA=y
687# CONFIG_SATA_ULI is not set 659# CONFIG_SATA_ULI is not set
688# CONFIG_SATA_VIA is not set 660# CONFIG_SATA_VIA is not set
689# CONFIG_SATA_VITESSE is not set 661# CONFIG_SATA_VITESSE is not set
662# CONFIG_SATA_INIC162X is not set
690# CONFIG_PATA_ALI is not set 663# CONFIG_PATA_ALI is not set
691# CONFIG_PATA_AMD is not set 664# CONFIG_PATA_AMD is not set
692# CONFIG_PATA_ARTOP is not set 665# CONFIG_PATA_ARTOP is not set
693# CONFIG_PATA_ATIIXP is not set 666# CONFIG_PATA_ATIIXP is not set
667# CONFIG_PATA_CMD640_PCI is not set
694# CONFIG_PATA_CMD64X is not set 668# CONFIG_PATA_CMD64X is not set
695# CONFIG_PATA_CS5520 is not set 669# CONFIG_PATA_CS5520 is not set
696# CONFIG_PATA_CS5530 is not set 670# CONFIG_PATA_CS5530 is not set
@@ -702,6 +676,7 @@ CONFIG_ATA=y
702# CONFIG_PATA_HPT3X2N is not set 676# CONFIG_PATA_HPT3X2N is not set
703# CONFIG_PATA_HPT3X3 is not set 677# CONFIG_PATA_HPT3X3 is not set
704CONFIG_PATA_IT821X=y 678CONFIG_PATA_IT821X=y
679# CONFIG_PATA_IT8213 is not set
705# CONFIG_PATA_JMICRON is not set 680# CONFIG_PATA_JMICRON is not set
706# CONFIG_PATA_TRIFLEX is not set 681# CONFIG_PATA_TRIFLEX is not set
707# CONFIG_PATA_MARVELL is not set 682# CONFIG_PATA_MARVELL is not set
@@ -738,18 +713,14 @@ CONFIG_PATA_SIL680=y
738# 713#
739# IEEE 1394 (FireWire) support 714# IEEE 1394 (FireWire) support
740# 715#
716# CONFIG_FIREWIRE is not set
741# CONFIG_IEEE1394 is not set 717# CONFIG_IEEE1394 is not set
742 718
743# 719#
744# I2O device support 720# I2O device support
745# 721#
746# CONFIG_I2O is not set 722# CONFIG_I2O is not set
747 723# CONFIG_MACINTOSH_DRIVERS is not set
748#
749# Macintosh device drivers
750#
751# CONFIG_MAC_EMUMOUSEBTN is not set
752# CONFIG_WINDFARM is not set
753 724
754# 725#
755# Network device support 726# Network device support
@@ -759,15 +730,7 @@ CONFIG_NETDEVICES=y
759# CONFIG_BONDING is not set 730# CONFIG_BONDING is not set
760# CONFIG_EQUALIZER is not set 731# CONFIG_EQUALIZER is not set
761CONFIG_TUN=m 732CONFIG_TUN=m
762
763#
764# ARCnet devices
765#
766# CONFIG_ARCNET is not set 733# CONFIG_ARCNET is not set
767
768#
769# PHY device support
770#
771# CONFIG_PHYLIB is not set 734# CONFIG_PHYLIB is not set
772 735
773# 736#
@@ -795,10 +758,7 @@ CONFIG_TULIP_MMIO=y
795# CONFIG_ULI526X is not set 758# CONFIG_ULI526X is not set
796# CONFIG_HP100 is not set 759# CONFIG_HP100 is not set
797# CONFIG_NET_PCI is not set 760# CONFIG_NET_PCI is not set
798 761CONFIG_NETDEV_1000=y
799#
800# Ethernet (1000 Mbit)
801#
802# CONFIG_ACENIC is not set 762# CONFIG_ACENIC is not set
803# CONFIG_DL2K is not set 763# CONFIG_DL2K is not set
804# CONFIG_E1000 is not set 764# CONFIG_E1000 is not set
@@ -811,58 +771,36 @@ CONFIG_R8169=y
811# CONFIG_SKGE is not set 771# CONFIG_SKGE is not set
812# CONFIG_SKY2 is not set 772# CONFIG_SKY2 is not set
813# CONFIG_SK98LIN is not set 773# CONFIG_SK98LIN is not set
774# CONFIG_VIA_VELOCITY is not set
814# CONFIG_TIGON3 is not set 775# CONFIG_TIGON3 is not set
815# CONFIG_BNX2 is not set 776# CONFIG_BNX2 is not set
816# CONFIG_QLA3XXX is not set 777# CONFIG_QLA3XXX is not set
817 778# CONFIG_ATL1 is not set
818# 779CONFIG_NETDEV_10000=y
819# Ethernet (10000 Mbit)
820#
821# CONFIG_CHELSIO_T1 is not set 780# CONFIG_CHELSIO_T1 is not set
781# CONFIG_CHELSIO_T3 is not set
822# CONFIG_IXGB is not set 782# CONFIG_IXGB is not set
823# CONFIG_S2IO is not set 783# CONFIG_S2IO is not set
824# CONFIG_MYRI10GE is not set 784# CONFIG_MYRI10GE is not set
825# CONFIG_NETXEN_NIC is not set 785# CONFIG_NETXEN_NIC is not set
826 786# CONFIG_MLX4_CORE is not set
827#
828# Token Ring devices
829#
830# CONFIG_TR is not set 787# CONFIG_TR is not set
831 788
832# 789#
833# Wireless LAN (non-hamradio) 790# Wireless LAN
834#
835CONFIG_NET_RADIO=y
836# CONFIG_NET_WIRELESS_RTNETLINK is not set
837
838#
839# Obsolete Wireless cards support (pre-802.11)
840#
841# CONFIG_STRIP is not set
842
843#
844# Wireless 802.11b ISA/PCI cards support
845#
846# CONFIG_IPW2100 is not set
847# CONFIG_IPW2200 is not set
848# CONFIG_AIRO is not set
849# CONFIG_HERMES is not set
850# CONFIG_ATMEL is not set
851
852#
853# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
854# 791#
855# CONFIG_PRISM54 is not set 792# CONFIG_WLAN_PRE80211 is not set
856# CONFIG_USB_ZD1201 is not set 793# CONFIG_WLAN_80211 is not set
857# CONFIG_HOSTAP is not set
858# CONFIG_BCM43XX is not set
859CONFIG_ZD1211RW=m
860# CONFIG_ZD1211RW_DEBUG is not set
861CONFIG_NET_WIRELESS=y
862 794
863# 795#
864# Wan interfaces 796# USB Network Adapters
865# 797#
798# CONFIG_USB_CATC is not set
799# CONFIG_USB_KAWETH is not set
800# CONFIG_USB_PEGASUS is not set
801# CONFIG_USB_RTL8150 is not set
802# CONFIG_USB_USBNET_MII is not set
803# CONFIG_USB_USBNET is not set
866# CONFIG_WAN is not set 804# CONFIG_WAN is not set
867# CONFIG_FDDI is not set 805# CONFIG_FDDI is not set
868# CONFIG_HIPPI is not set 806# CONFIG_HIPPI is not set
@@ -872,7 +810,6 @@ CONFIG_NET_WIRELESS=y
872# CONFIG_SHAPER is not set 810# CONFIG_SHAPER is not set
873CONFIG_NETCONSOLE=y 811CONFIG_NETCONSOLE=y
874CONFIG_NETPOLL=y 812CONFIG_NETPOLL=y
875# CONFIG_NETPOLL_RX is not set
876# CONFIG_NETPOLL_TRAP is not set 813# CONFIG_NETPOLL_TRAP is not set
877CONFIG_NET_POLL_CONTROLLER=y 814CONFIG_NET_POLL_CONTROLLER=y
878 815
@@ -891,6 +828,7 @@ CONFIG_NET_POLL_CONTROLLER=y
891# 828#
892CONFIG_INPUT=y 829CONFIG_INPUT=y
893# CONFIG_INPUT_FF_MEMLESS is not set 830# CONFIG_INPUT_FF_MEMLESS is not set
831# CONFIG_INPUT_POLLDEV is not set
894 832
895# 833#
896# Userland interfaces 834# Userland interfaces
@@ -910,8 +848,14 @@ CONFIG_INPUT_EVDEV=m
910# CONFIG_INPUT_KEYBOARD is not set 848# CONFIG_INPUT_KEYBOARD is not set
911# CONFIG_INPUT_MOUSE is not set 849# CONFIG_INPUT_MOUSE is not set
912# CONFIG_INPUT_JOYSTICK is not set 850# CONFIG_INPUT_JOYSTICK is not set
851# CONFIG_INPUT_TABLET is not set
913# CONFIG_INPUT_TOUCHSCREEN is not set 852# CONFIG_INPUT_TOUCHSCREEN is not set
914CONFIG_INPUT_MISC=y 853CONFIG_INPUT_MISC=y
854# CONFIG_INPUT_ATI_REMOTE is not set
855# CONFIG_INPUT_ATI_REMOTE2 is not set
856# CONFIG_INPUT_KEYSPAN_REMOTE is not set
857# CONFIG_INPUT_POWERMATE is not set
858# CONFIG_INPUT_YEALINK is not set
915CONFIG_INPUT_UINPUT=m 859CONFIG_INPUT_UINPUT=m
916 860
917# 861#
@@ -950,6 +894,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
950CONFIG_SERIAL_CORE=y 894CONFIG_SERIAL_CORE=y
951CONFIG_SERIAL_CORE_CONSOLE=y 895CONFIG_SERIAL_CORE_CONSOLE=y
952# CONFIG_SERIAL_JSM is not set 896# CONFIG_SERIAL_JSM is not set
897CONFIG_SERIAL_OF_PLATFORM=y
953CONFIG_UNIX98_PTYS=y 898CONFIG_UNIX98_PTYS=y
954CONFIG_LEGACY_PTYS=y 899CONFIG_LEGACY_PTYS=y
955CONFIG_LEGACY_PTY_COUNT=256 900CONFIG_LEGACY_PTY_COUNT=256
@@ -958,15 +903,10 @@ CONFIG_LEGACY_PTY_COUNT=256
958# IPMI 903# IPMI
959# 904#
960# CONFIG_IPMI_HANDLER is not set 905# CONFIG_IPMI_HANDLER is not set
961
962#
963# Watchdog Cards
964#
965# CONFIG_WATCHDOG is not set 906# CONFIG_WATCHDOG is not set
966CONFIG_HW_RANDOM=y 907CONFIG_HW_RANDOM=y
967# CONFIG_NVRAM is not set 908# CONFIG_NVRAM is not set
968# CONFIG_GEN_RTC is not set 909# CONFIG_GEN_RTC is not set
969# CONFIG_DTLK is not set
970# CONFIG_R3964 is not set 910# CONFIG_R3964 is not set
971# CONFIG_APPLICOM is not set 911# CONFIG_APPLICOM is not set
972# CONFIG_AGP is not set 912# CONFIG_AGP is not set
@@ -977,11 +917,9 @@ CONFIG_HW_RANDOM=y
977# TPM devices 917# TPM devices
978# 918#
979# CONFIG_TCG_TPM is not set 919# CONFIG_TCG_TPM is not set
980 920CONFIG_DEVPORT=y
981#
982# I2C support
983#
984CONFIG_I2C=y 921CONFIG_I2C=y
922CONFIG_I2C_BOARDINFO=y
985CONFIG_I2C_CHARDEV=y 923CONFIG_I2C_CHARDEV=y
986 924
987# 925#
@@ -1008,14 +946,15 @@ CONFIG_I2C_MPC=y
1008# CONFIG_I2C_PARPORT_LIGHT is not set 946# CONFIG_I2C_PARPORT_LIGHT is not set
1009# CONFIG_I2C_PROSAVAGE is not set 947# CONFIG_I2C_PROSAVAGE is not set
1010# CONFIG_I2C_SAVAGE4 is not set 948# CONFIG_I2C_SAVAGE4 is not set
949# CONFIG_I2C_SIMTEC is not set
1011# CONFIG_I2C_SIS5595 is not set 950# CONFIG_I2C_SIS5595 is not set
1012# CONFIG_I2C_SIS630 is not set 951# CONFIG_I2C_SIS630 is not set
1013# CONFIG_I2C_SIS96X is not set 952# CONFIG_I2C_SIS96X is not set
1014# CONFIG_I2C_STUB is not set 953# CONFIG_I2C_STUB is not set
954# CONFIG_I2C_TINY_USB is not set
1015# CONFIG_I2C_VIA is not set 955# CONFIG_I2C_VIA is not set
1016# CONFIG_I2C_VIAPRO is not set 956# CONFIG_I2C_VIAPRO is not set
1017# CONFIG_I2C_VOODOO3 is not set 957# CONFIG_I2C_VOODOO3 is not set
1018# CONFIG_I2C_PCA_ISA is not set
1019 958
1020# 959#
1021# Miscellaneous I2C Chip support 960# Miscellaneous I2C Chip support
@@ -1043,16 +982,14 @@ CONFIG_SENSORS_EEPROM=m
1043# Dallas's 1-wire bus 982# Dallas's 1-wire bus
1044# 983#
1045# CONFIG_W1 is not set 984# CONFIG_W1 is not set
1046
1047#
1048# Hardware Monitoring support
1049#
1050CONFIG_HWMON=y 985CONFIG_HWMON=y
1051# CONFIG_HWMON_VID is not set 986# CONFIG_HWMON_VID is not set
1052# CONFIG_SENSORS_ABITUGURU is not set 987# CONFIG_SENSORS_ABITUGURU is not set
988# CONFIG_SENSORS_AD7418 is not set
1053# CONFIG_SENSORS_ADM1021 is not set 989# CONFIG_SENSORS_ADM1021 is not set
1054# CONFIG_SENSORS_ADM1025 is not set 990# CONFIG_SENSORS_ADM1025 is not set
1055# CONFIG_SENSORS_ADM1026 is not set 991# CONFIG_SENSORS_ADM1026 is not set
992# CONFIG_SENSORS_ADM1029 is not set
1056# CONFIG_SENSORS_ADM1031 is not set 993# CONFIG_SENSORS_ADM1031 is not set
1057# CONFIG_SENSORS_ADM9240 is not set 994# CONFIG_SENSORS_ADM9240 is not set
1058# CONFIG_SENSORS_ASB100 is not set 995# CONFIG_SENSORS_ASB100 is not set
@@ -1075,6 +1012,7 @@ CONFIG_HWMON=y
1075# CONFIG_SENSORS_LM90 is not set 1012# CONFIG_SENSORS_LM90 is not set
1076# CONFIG_SENSORS_LM92 is not set 1013# CONFIG_SENSORS_LM92 is not set
1077# CONFIG_SENSORS_MAX1619 is not set 1014# CONFIG_SENSORS_MAX1619 is not set
1015# CONFIG_SENSORS_MAX6650 is not set
1078# CONFIG_SENSORS_PC87360 is not set 1016# CONFIG_SENSORS_PC87360 is not set
1079# CONFIG_SENSORS_PC87427 is not set 1017# CONFIG_SENSORS_PC87427 is not set
1080# CONFIG_SENSORS_SIS5595 is not set 1018# CONFIG_SENSORS_SIS5595 is not set
@@ -1094,20 +1032,27 @@ CONFIG_HWMON=y
1094# CONFIG_HWMON_DEBUG_CHIP is not set 1032# CONFIG_HWMON_DEBUG_CHIP is not set
1095 1033
1096# 1034#
1035# Multifunction device drivers
1036#
1037# CONFIG_MFD_SM501 is not set
1038
1039#
1097# Multimedia devices 1040# Multimedia devices
1098# 1041#
1099# CONFIG_VIDEO_DEV is not set 1042# CONFIG_VIDEO_DEV is not set
1043# CONFIG_DVB_CORE is not set
1044# CONFIG_DAB is not set
1100 1045
1101# 1046#
1102# Digital Video Broadcasting Devices 1047# Graphics support
1103# 1048#
1104# CONFIG_DVB is not set 1049# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1105# CONFIG_USB_DABUSB is not set
1106 1050
1107# 1051#
1108# Graphics support 1052# Display device support
1109# 1053#
1110CONFIG_FIRMWARE_EDID=y 1054# CONFIG_DISPLAY_SUPPORT is not set
1055# CONFIG_VGASTATE is not set
1111# CONFIG_FB is not set 1056# CONFIG_FB is not set
1112# CONFIG_FB_IBM_GXT4500 is not set 1057# CONFIG_FB_IBM_GXT4500 is not set
1113 1058
@@ -1116,7 +1061,6 @@ CONFIG_FIRMWARE_EDID=y
1116# 1061#
1117# CONFIG_VGA_CONSOLE is not set 1062# CONFIG_VGA_CONSOLE is not set
1118CONFIG_DUMMY_CONSOLE=y 1063CONFIG_DUMMY_CONSOLE=y
1119# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1120 1064
1121# 1065#
1122# Sound 1066# Sound
@@ -1127,6 +1071,18 @@ CONFIG_DUMMY_CONSOLE=y
1127# HID Devices 1071# HID Devices
1128# 1072#
1129CONFIG_HID=m 1073CONFIG_HID=m
1074# CONFIG_HID_DEBUG is not set
1075
1076#
1077# USB Input Devices
1078#
1079# CONFIG_USB_HID is not set
1080
1081#
1082# USB HID Boot Protocol drivers
1083#
1084# CONFIG_USB_KBD is not set
1085# CONFIG_USB_MOUSE is not set
1130 1086
1131# 1087#
1132# USB support 1088# USB support
@@ -1141,7 +1097,7 @@ CONFIG_USB=y
1141# Miscellaneous USB options 1097# Miscellaneous USB options
1142# 1098#
1143CONFIG_USB_DEVICEFS=y 1099CONFIG_USB_DEVICEFS=y
1144# CONFIG_USB_BANDWIDTH is not set 1100CONFIG_USB_DEVICE_CLASS=y
1145# CONFIG_USB_DYNAMIC_MINORS is not set 1101# CONFIG_USB_DYNAMIC_MINORS is not set
1146# CONFIG_USB_OTG is not set 1102# CONFIG_USB_OTG is not set
1147 1103
@@ -1152,9 +1108,15 @@ CONFIG_USB_EHCI_HCD=y
1152# CONFIG_USB_EHCI_SPLIT_ISO is not set 1108# CONFIG_USB_EHCI_SPLIT_ISO is not set
1153# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1109# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1154# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1110# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1111# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1155# CONFIG_USB_ISP116X_HCD is not set 1112# CONFIG_USB_ISP116X_HCD is not set
1156CONFIG_USB_OHCI_HCD=y 1113CONFIG_USB_OHCI_HCD=y
1157# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1114CONFIG_USB_OHCI_HCD_PPC_OF=y
1115CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1116# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1117CONFIG_USB_OHCI_HCD_PCI=y
1118CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1119CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
1158CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1120CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1159# CONFIG_USB_UHCI_HCD is not set 1121# CONFIG_USB_UHCI_HCD is not set
1160# CONFIG_USB_SL811_HCD is not set 1122# CONFIG_USB_SL811_HCD is not set
@@ -1187,43 +1149,10 @@ CONFIG_USB_STORAGE=m
1187# CONFIG_USB_LIBUSUAL is not set 1149# CONFIG_USB_LIBUSUAL is not set
1188 1150
1189# 1151#
1190# USB Input Devices
1191#
1192# CONFIG_USB_HID is not set
1193
1194#
1195# USB HID Boot Protocol drivers
1196#
1197# CONFIG_USB_KBD is not set
1198# CONFIG_USB_MOUSE is not set
1199# CONFIG_USB_AIPTEK is not set
1200# CONFIG_USB_WACOM is not set
1201# CONFIG_USB_ACECAD is not set
1202# CONFIG_USB_KBTAB is not set
1203# CONFIG_USB_POWERMATE is not set
1204# CONFIG_USB_TOUCHSCREEN is not set
1205# CONFIG_USB_YEALINK is not set
1206# CONFIG_USB_XPAD is not set
1207# CONFIG_USB_ATI_REMOTE is not set
1208# CONFIG_USB_ATI_REMOTE2 is not set
1209# CONFIG_USB_KEYSPAN_REMOTE is not set
1210# CONFIG_USB_APPLETOUCH is not set
1211
1212#
1213# USB Imaging devices 1152# USB Imaging devices
1214# 1153#
1215# CONFIG_USB_MDC800 is not set 1154# CONFIG_USB_MDC800 is not set
1216# CONFIG_USB_MICROTEK is not set 1155# CONFIG_USB_MICROTEK is not set
1217
1218#
1219# USB Network Adapters
1220#
1221# CONFIG_USB_CATC is not set
1222# CONFIG_USB_KAWETH is not set
1223# CONFIG_USB_PEGASUS is not set
1224# CONFIG_USB_RTL8150 is not set
1225# CONFIG_USB_USBNET_MII is not set
1226# CONFIG_USB_USBNET is not set
1227CONFIG_USB_MON=y 1156CONFIG_USB_MON=y
1228 1157
1229# 1158#
@@ -1283,6 +1212,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=y
1283# CONFIG_USB_RIO500 is not set 1212# CONFIG_USB_RIO500 is not set
1284# CONFIG_USB_LEGOTOWER is not set 1213# CONFIG_USB_LEGOTOWER is not set
1285# CONFIG_USB_LCD is not set 1214# CONFIG_USB_LCD is not set
1215# CONFIG_USB_BERRY_CHARGE is not set
1286# CONFIG_USB_LED is not set 1216# CONFIG_USB_LED is not set
1287# CONFIG_USB_CYPRESS_CY7C63 is not set 1217# CONFIG_USB_CYPRESS_CY7C63 is not set
1288# CONFIG_USB_CYTHERM is not set 1218# CONFIG_USB_CYTHERM is not set
@@ -1293,6 +1223,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=y
1293# CONFIG_USB_SISUSBVGA is not set 1223# CONFIG_USB_SISUSBVGA is not set
1294# CONFIG_USB_LD is not set 1224# CONFIG_USB_LD is not set
1295# CONFIG_USB_TRANCEVIBRATOR is not set 1225# CONFIG_USB_TRANCEVIBRATOR is not set
1226# CONFIG_USB_IOWARRIOR is not set
1296# CONFIG_USB_TEST is not set 1227# CONFIG_USB_TEST is not set
1297 1228
1298# 1229#
@@ -1303,10 +1234,6 @@ CONFIG_USB_SERIAL_FTDI_SIO=y
1303# USB Gadget Support 1234# USB Gadget Support
1304# 1235#
1305# CONFIG_USB_GADGET is not set 1236# CONFIG_USB_GADGET is not set
1306
1307#
1308# MMC/SD Card support
1309#
1310# CONFIG_MMC is not set 1237# CONFIG_MMC is not set
1311 1238
1312# 1239#
@@ -1347,24 +1274,37 @@ CONFIG_RTC_INTF_SYSFS=y
1347CONFIG_RTC_INTF_PROC=y 1274CONFIG_RTC_INTF_PROC=y
1348CONFIG_RTC_INTF_DEV=y 1275CONFIG_RTC_INTF_DEV=y
1349# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 1276# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1277# CONFIG_RTC_DRV_TEST is not set
1350 1278
1351# 1279#
1352# RTC drivers 1280# I2C RTC drivers
1353# 1281#
1354# CONFIG_RTC_DRV_X1205 is not set
1355# CONFIG_RTC_DRV_DS1307 is not set 1282# CONFIG_RTC_DRV_DS1307 is not set
1356# CONFIG_RTC_DRV_DS1553 is not set
1357# CONFIG_RTC_DRV_ISL1208 is not set
1358# CONFIG_RTC_DRV_DS1672 is not set 1283# CONFIG_RTC_DRV_DS1672 is not set
1359# CONFIG_RTC_DRV_DS1742 is not set 1284# CONFIG_RTC_DRV_MAX6900 is not set
1285CONFIG_RTC_DRV_RS5C372=y
1286# CONFIG_RTC_DRV_ISL1208 is not set
1287# CONFIG_RTC_DRV_X1205 is not set
1360# CONFIG_RTC_DRV_PCF8563 is not set 1288# CONFIG_RTC_DRV_PCF8563 is not set
1361# CONFIG_RTC_DRV_PCF8583 is not set 1289# CONFIG_RTC_DRV_PCF8583 is not set
1362CONFIG_RTC_DRV_RS5C372=y 1290
1291#
1292# SPI RTC drivers
1293#
1294
1295#
1296# Platform RTC drivers
1297#
1298# CONFIG_RTC_DRV_DS1553 is not set
1299# CONFIG_RTC_DRV_DS1742 is not set
1363# CONFIG_RTC_DRV_M48T86 is not set 1300# CONFIG_RTC_DRV_M48T86 is not set
1364# CONFIG_RTC_DRV_TEST is not set
1365# CONFIG_RTC_DRV_V3020 is not set 1301# CONFIG_RTC_DRV_V3020 is not set
1366 1302
1367# 1303#
1304# on-CPU RTC drivers
1305#
1306
1307#
1368# DMA Engine support 1308# DMA Engine support
1369# 1309#
1370# CONFIG_DMA_ENGINE is not set 1310# CONFIG_DMA_ENGINE is not set
@@ -1378,10 +1318,6 @@ CONFIG_RTC_DRV_RS5C372=y
1378# 1318#
1379 1319
1380# 1320#
1381# Virtualization
1382#
1383
1384#
1385# File systems 1321# File systems
1386# 1322#
1387CONFIG_EXT2_FS=y 1323CONFIG_EXT2_FS=y
@@ -1421,7 +1357,6 @@ CONFIG_DNOTIFY=y
1421CONFIG_ISO9660_FS=m 1357CONFIG_ISO9660_FS=m
1422CONFIG_JOLIET=y 1358CONFIG_JOLIET=y
1423CONFIG_ZISOFS=y 1359CONFIG_ZISOFS=y
1424CONFIG_ZISOFS_FS=m
1425CONFIG_UDF_FS=m 1360CONFIG_UDF_FS=m
1426CONFIG_UDF_NLS=y 1361CONFIG_UDF_NLS=y
1427 1362
@@ -1489,6 +1424,7 @@ CONFIG_NFS_ACL_SUPPORT=y
1489CONFIG_NFS_COMMON=y 1424CONFIG_NFS_COMMON=y
1490CONFIG_SUNRPC=y 1425CONFIG_SUNRPC=y
1491CONFIG_SUNRPC_GSS=y 1426CONFIG_SUNRPC_GSS=y
1427# CONFIG_SUNRPC_BIND34 is not set
1492CONFIG_RPCSEC_GSS_KRB5=y 1428CONFIG_RPCSEC_GSS_KRB5=y
1493# CONFIG_RPCSEC_GSS_SPKM3 is not set 1429# CONFIG_RPCSEC_GSS_SPKM3 is not set
1494# CONFIG_SMB_FS is not set 1430# CONFIG_SMB_FS is not set
@@ -1557,6 +1493,7 @@ CONFIG_NLS_UTF8=m
1557# Distributed Lock Manager 1493# Distributed Lock Manager
1558# 1494#
1559# CONFIG_DLM is not set 1495# CONFIG_DLM is not set
1496# CONFIG_UCC_SLOW is not set
1560 1497
1561# 1498#
1562# Library routines 1499# Library routines
@@ -1564,6 +1501,7 @@ CONFIG_NLS_UTF8=m
1564CONFIG_BITREVERSE=y 1501CONFIG_BITREVERSE=y
1565CONFIG_CRC_CCITT=m 1502CONFIG_CRC_CCITT=m
1566# CONFIG_CRC16 is not set 1503# CONFIG_CRC16 is not set
1504# CONFIG_CRC_ITU_T is not set
1567CONFIG_CRC32=y 1505CONFIG_CRC32=y
1568CONFIG_LIBCRC32C=m 1506CONFIG_LIBCRC32C=m
1569CONFIG_ZLIB_INFLATE=m 1507CONFIG_ZLIB_INFLATE=m
@@ -1571,13 +1509,16 @@ CONFIG_ZLIB_DEFLATE=m
1571CONFIG_TEXTSEARCH=y 1509CONFIG_TEXTSEARCH=y
1572CONFIG_TEXTSEARCH_KMP=m 1510CONFIG_TEXTSEARCH_KMP=m
1573CONFIG_PLIST=y 1511CONFIG_PLIST=y
1574CONFIG_IOMAP_COPY=y 1512CONFIG_HAS_IOMEM=y
1513CONFIG_HAS_IOPORT=y
1514CONFIG_HAS_DMA=y
1575 1515
1576# 1516#
1577# Instrumentation Support 1517# Instrumentation Support
1578# 1518#
1579CONFIG_PROFILING=y 1519CONFIG_PROFILING=y
1580CONFIG_OPROFILE=m 1520CONFIG_OPROFILE=m
1521# CONFIG_KPROBES is not set
1581 1522
1582# 1523#
1583# Kernel hacking 1524# Kernel hacking
@@ -1589,15 +1530,15 @@ CONFIG_MAGIC_SYSRQ=y
1589# CONFIG_DEBUG_FS is not set 1530# CONFIG_DEBUG_FS is not set
1590# CONFIG_HEADERS_CHECK is not set 1531# CONFIG_HEADERS_CHECK is not set
1591CONFIG_DEBUG_KERNEL=y 1532CONFIG_DEBUG_KERNEL=y
1592CONFIG_LOG_BUF_SHIFT=14 1533# CONFIG_DEBUG_SHIRQ is not set
1593CONFIG_DETECT_SOFTLOCKUP=y 1534CONFIG_DETECT_SOFTLOCKUP=y
1594# CONFIG_SCHEDSTATS is not set 1535# CONFIG_SCHEDSTATS is not set
1536# CONFIG_TIMER_STATS is not set
1595# CONFIG_DEBUG_SLAB is not set 1537# CONFIG_DEBUG_SLAB is not set
1596# CONFIG_DEBUG_RT_MUTEXES is not set 1538# CONFIG_DEBUG_RT_MUTEXES is not set
1597# CONFIG_RT_MUTEX_TESTER is not set 1539# CONFIG_RT_MUTEX_TESTER is not set
1598# CONFIG_DEBUG_SPINLOCK is not set 1540# CONFIG_DEBUG_SPINLOCK is not set
1599# CONFIG_DEBUG_MUTEXES is not set 1541# CONFIG_DEBUG_MUTEXES is not set
1600# CONFIG_DEBUG_RWSEMS is not set
1601# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1542# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1602# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1543# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1603# CONFIG_DEBUG_KOBJECT is not set 1544# CONFIG_DEBUG_KOBJECT is not set
@@ -1607,10 +1548,13 @@ CONFIG_DEBUG_BUGVERBOSE=y
1607# CONFIG_DEBUG_LIST is not set 1548# CONFIG_DEBUG_LIST is not set
1608CONFIG_FORCED_INLINING=y 1549CONFIG_FORCED_INLINING=y
1609# CONFIG_RCU_TORTURE_TEST is not set 1550# CONFIG_RCU_TORTURE_TEST is not set
1551# CONFIG_FAULT_INJECTION is not set
1552# CONFIG_DEBUG_STACKOVERFLOW is not set
1553# CONFIG_DEBUG_STACK_USAGE is not set
1554# CONFIG_DEBUG_PAGEALLOC is not set
1610# CONFIG_DEBUGGER is not set 1555# CONFIG_DEBUGGER is not set
1611# CONFIG_BDI_SWITCH is not set 1556# CONFIG_BDI_SWITCH is not set
1612# CONFIG_BOOTX_TEXT is not set 1557# CONFIG_BOOTX_TEXT is not set
1613# CONFIG_SERIAL_TEXT_DEBUG is not set
1614# CONFIG_PPC_EARLY_DEBUG is not set 1558# CONFIG_PPC_EARLY_DEBUG is not set
1615 1559
1616# 1560#
@@ -1639,8 +1583,11 @@ CONFIG_CRYPTO_SHA1=m
1639# CONFIG_CRYPTO_GF128MUL is not set 1583# CONFIG_CRYPTO_GF128MUL is not set
1640CONFIG_CRYPTO_ECB=m 1584CONFIG_CRYPTO_ECB=m
1641CONFIG_CRYPTO_CBC=y 1585CONFIG_CRYPTO_CBC=y
1586CONFIG_CRYPTO_PCBC=m
1642# CONFIG_CRYPTO_LRW is not set 1587# CONFIG_CRYPTO_LRW is not set
1588# CONFIG_CRYPTO_CRYPTD is not set
1643CONFIG_CRYPTO_DES=y 1589CONFIG_CRYPTO_DES=y
1590# CONFIG_CRYPTO_FCRYPT is not set
1644CONFIG_CRYPTO_BLOWFISH=m 1591CONFIG_CRYPTO_BLOWFISH=m
1645CONFIG_CRYPTO_TWOFISH=m 1592CONFIG_CRYPTO_TWOFISH=m
1646CONFIG_CRYPTO_TWOFISH_COMMON=m 1593CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1655,6 +1602,7 @@ CONFIG_CRYPTO_ARC4=m
1655CONFIG_CRYPTO_DEFLATE=m 1602CONFIG_CRYPTO_DEFLATE=m
1656CONFIG_CRYPTO_MICHAEL_MIC=m 1603CONFIG_CRYPTO_MICHAEL_MIC=m
1657CONFIG_CRYPTO_CRC32C=m 1604CONFIG_CRYPTO_CRC32C=m
1605# CONFIG_CRYPTO_CAMELLIA is not set
1658# CONFIG_CRYPTO_TEST is not set 1606# CONFIG_CRYPTO_TEST is not set
1659 1607
1660# 1608#
diff --git a/arch/powerpc/configs/lite5200_defconfig b/arch/powerpc/configs/lite5200_defconfig
index 8cbd87ded6b4..d12a981398b8 100644
--- a/arch/powerpc/configs/lite5200_defconfig
+++ b/arch/powerpc/configs/lite5200_defconfig
@@ -1,9 +1,10 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc5 3# Linux kernel version: 2.6.22-rc6
4# Mon Jan 22 22:18:18 2007 4# Tue Jun 26 13:26:09 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC_PM_NEEDS_RTC_LIB=y
7CONFIG_PPC32=y 8CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 9CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 10CONFIG_MMU=y
@@ -34,9 +35,9 @@ CONFIG_CLASSIC32=y
34# CONFIG_PPC_83xx is not set 35# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set 36# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set 37# CONFIG_PPC_86xx is not set
38# CONFIG_PPC_8xx is not set
37# CONFIG_40x is not set 39# CONFIG_40x is not set
38# CONFIG_44x is not set 40# CONFIG_44x is not set
39# CONFIG_8xx is not set
40# CONFIG_E200 is not set 41# CONFIG_E200 is not set
41CONFIG_6xx=y 42CONFIG_6xx=y
42CONFIG_PPC_FPU=y 43CONFIG_PPC_FPU=y
@@ -45,6 +46,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_ALTIVEC is not set 46# CONFIG_ALTIVEC is not set
46CONFIG_PPC_STD_MMU=y 47CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 48CONFIG_PPC_STD_MMU_32=y
49# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 50# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 51CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 52
@@ -63,14 +65,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 65CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 66CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 67# CONFIG_IPC_NS is not set
68CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 69# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 70# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 71# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 72# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 73# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 74# CONFIG_IKCONFIG is not set
75CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 76CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 77# CONFIG_RELAY is not set
78CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 79CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 80# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 81CONFIG_SYSCTL=y
@@ -83,14 +88,19 @@ CONFIG_BUG=y
83CONFIG_ELF_CORE=y 88CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y 89CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y 90CONFIG_FUTEX=y
91CONFIG_ANON_INODES=y
86# CONFIG_EPOLL is not set 92# CONFIG_EPOLL is not set
93CONFIG_SIGNALFD=y
94CONFIG_TIMERFD=y
95CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 96CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y 97CONFIG_VM_EVENT_COUNTERS=y
98CONFIG_SLAB=y
99# CONFIG_SLUB is not set
100# CONFIG_SLOB is not set
90CONFIG_RT_MUTEXES=y 101CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set 102# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0 103CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94 104
95# 105#
96# Loadable module support 106# Loadable module support
@@ -131,11 +141,17 @@ CONFIG_PPC_MULTIPLATFORM=y
131# CONFIG_APUS is not set 141# CONFIG_APUS is not set
132# CONFIG_PPC_CHRP is not set 142# CONFIG_PPC_CHRP is not set
133CONFIG_PPC_MPC52xx=y 143CONFIG_PPC_MPC52xx=y
144CONFIG_PPC_MPC5200=y
145CONFIG_PPC_MPC5200_BUGFIX=y
134# CONFIG_PPC_EFIKA is not set 146# CONFIG_PPC_EFIKA is not set
135CONFIG_PPC_LITE5200=y 147CONFIG_PPC_LITE5200=y
136# CONFIG_PPC_PMAC is not set 148# CONFIG_PPC_PMAC is not set
137# CONFIG_PPC_CELL is not set 149# CONFIG_PPC_CELL is not set
138# CONFIG_PPC_CELL_NATIVE is not set 150# CONFIG_PPC_CELL_NATIVE is not set
151# CONFIG_PQ2ADS is not set
152# CONFIG_MPIC is not set
153# CONFIG_MPIC_WEIRD is not set
154# CONFIG_PPC_I8259 is not set
139# CONFIG_PPC_RTAS is not set 155# CONFIG_PPC_RTAS is not set
140# CONFIG_MMIO_NVRAM is not set 156# CONFIG_MMIO_NVRAM is not set
141# CONFIG_PPC_MPC106 is not set 157# CONFIG_PPC_MPC106 is not set
@@ -144,8 +160,7 @@ CONFIG_PPC_LITE5200=y
144# CONFIG_GENERIC_IOMAP is not set 160# CONFIG_GENERIC_IOMAP is not set
145# CONFIG_CPU_FREQ is not set 161# CONFIG_CPU_FREQ is not set
146# CONFIG_TAU is not set 162# CONFIG_TAU is not set
147# CONFIG_WANT_EARLY_SERIAL is not set 163# CONFIG_CPM2 is not set
148# CONFIG_MPIC is not set
149 164
150# 165#
151# Kernel options 166# Kernel options
@@ -174,6 +189,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
174# CONFIG_SPARSEMEM_STATIC is not set 189# CONFIG_SPARSEMEM_STATIC is not set
175CONFIG_SPLIT_PTLOCK_CPUS=4 190CONFIG_SPLIT_PTLOCK_CPUS=4
176# CONFIG_RESOURCES_64BIT is not set 191# CONFIG_RESOURCES_64BIT is not set
192CONFIG_ZONE_DMA_FLAG=1
177CONFIG_PROC_DEVICETREE=y 193CONFIG_PROC_DEVICETREE=y
178# CONFIG_CMDLINE_BOOL is not set 194# CONFIG_CMDLINE_BOOL is not set
179CONFIG_PM=y 195CONFIG_PM=y
@@ -182,28 +198,27 @@ CONFIG_PM=y
182# CONFIG_PM_SYSFS_DEPRECATED is not set 198# CONFIG_PM_SYSFS_DEPRECATED is not set
183# CONFIG_SOFTWARE_SUSPEND is not set 199# CONFIG_SOFTWARE_SUSPEND is not set
184CONFIG_SECCOMP=y 200CONFIG_SECCOMP=y
201# CONFIG_WANT_DEVICE_TREE is not set
185CONFIG_ISA_DMA_API=y 202CONFIG_ISA_DMA_API=y
186 203
187# 204#
188# Bus options 205# Bus options
189# 206#
207CONFIG_ZONE_DMA=y
190CONFIG_GENERIC_ISA_DMA=y 208CONFIG_GENERIC_ISA_DMA=y
191# CONFIG_MPIC_WEIRD is not set
192# CONFIG_PPC_I8259 is not set
193# CONFIG_PPC_INDIRECT_PCI is not set 209# CONFIG_PPC_INDIRECT_PCI is not set
210CONFIG_FSL_SOC=y
194CONFIG_PCI=y 211CONFIG_PCI=y
195CONFIG_PCI_DOMAINS=y 212CONFIG_PCI_DOMAINS=y
196# CONFIG_PCIEPORTBUS is not set 213# CONFIG_PCIEPORTBUS is not set
214CONFIG_ARCH_SUPPORTS_MSI=y
215# CONFIG_PCI_MSI is not set
197# CONFIG_PCI_DEBUG is not set 216# CONFIG_PCI_DEBUG is not set
198 217
199# 218#
200# PCCARD (PCMCIA/CardBus) support 219# PCCARD (PCMCIA/CardBus) support
201# 220#
202# CONFIG_PCCARD is not set 221# CONFIG_PCCARD is not set
203
204#
205# PCI Hotplug Support
206#
207# CONFIG_HOTPLUG_PCI is not set 222# CONFIG_HOTPLUG_PCI is not set
208 223
209# 224#
@@ -228,13 +243,13 @@ CONFIG_NET=y
228# 243#
229# Networking options 244# Networking options
230# 245#
231# CONFIG_NETDEBUG is not set
232CONFIG_PACKET=y 246CONFIG_PACKET=y
233# CONFIG_PACKET_MMAP is not set 247# CONFIG_PACKET_MMAP is not set
234CONFIG_UNIX=y 248CONFIG_UNIX=y
235CONFIG_XFRM=y 249CONFIG_XFRM=y
236CONFIG_XFRM_USER=m 250CONFIG_XFRM_USER=m
237# CONFIG_XFRM_SUB_POLICY is not set 251# CONFIG_XFRM_SUB_POLICY is not set
252# CONFIG_XFRM_MIGRATE is not set
238# CONFIG_NET_KEY is not set 253# CONFIG_NET_KEY is not set
239CONFIG_INET=y 254CONFIG_INET=y
240CONFIG_IP_MULTICAST=y 255CONFIG_IP_MULTICAST=y
@@ -268,20 +283,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
268# CONFIG_INET6_TUNNEL is not set 283# CONFIG_INET6_TUNNEL is not set
269# CONFIG_NETWORK_SECMARK is not set 284# CONFIG_NETWORK_SECMARK is not set
270# CONFIG_NETFILTER is not set 285# CONFIG_NETFILTER is not set
271
272#
273# DCCP Configuration (EXPERIMENTAL)
274#
275# CONFIG_IP_DCCP is not set 286# CONFIG_IP_DCCP is not set
276
277#
278# SCTP Configuration (EXPERIMENTAL)
279#
280# CONFIG_IP_SCTP is not set 287# CONFIG_IP_SCTP is not set
281
282#
283# TIPC Configuration (EXPERIMENTAL)
284#
285# CONFIG_TIPC is not set 288# CONFIG_TIPC is not set
286# CONFIG_ATM is not set 289# CONFIG_ATM is not set
287# CONFIG_BRIDGE is not set 290# CONFIG_BRIDGE is not set
@@ -307,7 +310,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
307# CONFIG_HAMRADIO is not set 310# CONFIG_HAMRADIO is not set
308# CONFIG_IRDA is not set 311# CONFIG_IRDA is not set
309# CONFIG_BT is not set 312# CONFIG_BT is not set
313# CONFIG_AF_RXRPC is not set
314
315#
316# Wireless
317#
318# CONFIG_CFG80211 is not set
319# CONFIG_WIRELESS_EXT is not set
320# CONFIG_MAC80211 is not set
310# CONFIG_IEEE80211 is not set 321# CONFIG_IEEE80211 is not set
322# CONFIG_RFKILL is not set
311 323
312# 324#
313# Device Drivers 325# Device Drivers
@@ -320,16 +332,13 @@ CONFIG_STANDALONE=y
320CONFIG_PREVENT_FIRMWARE_BUILD=y 332CONFIG_PREVENT_FIRMWARE_BUILD=y
321# CONFIG_FW_LOADER is not set 333# CONFIG_FW_LOADER is not set
322# CONFIG_DEBUG_DRIVER is not set 334# CONFIG_DEBUG_DRIVER is not set
335# CONFIG_DEBUG_DEVRES is not set
323# CONFIG_SYS_HYPERVISOR is not set 336# CONFIG_SYS_HYPERVISOR is not set
324 337
325# 338#
326# Connector - unified userspace <-> kernelspace linker 339# Connector - unified userspace <-> kernelspace linker
327# 340#
328# CONFIG_CONNECTOR is not set 341# CONFIG_CONNECTOR is not set
329
330#
331# Memory Technology Devices (MTD)
332#
333# CONFIG_MTD is not set 342# CONFIG_MTD is not set
334 343
335# 344#
@@ -340,6 +349,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
340# 349#
341# Plug and Play support 350# Plug and Play support
342# 351#
352# CONFIG_PNPACPI is not set
343 353
344# 354#
345# Block devices 355# Block devices
@@ -358,19 +368,16 @@ CONFIG_BLK_DEV_RAM=y
358CONFIG_BLK_DEV_RAM_COUNT=16 368CONFIG_BLK_DEV_RAM_COUNT=16
359CONFIG_BLK_DEV_RAM_SIZE=32768 369CONFIG_BLK_DEV_RAM_SIZE=32768
360CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 370CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
361CONFIG_BLK_DEV_INITRD=y
362# CONFIG_CDROM_PKTCDVD is not set 371# CONFIG_CDROM_PKTCDVD is not set
363# CONFIG_ATA_OVER_ETH is not set 372# CONFIG_ATA_OVER_ETH is not set
364 373
365# 374#
366# Misc devices 375# Misc devices
367# 376#
377# CONFIG_PHANTOM is not set
368# CONFIG_SGI_IOC4 is not set 378# CONFIG_SGI_IOC4 is not set
369# CONFIG_TIFM_CORE is not set 379# CONFIG_TIFM_CORE is not set
370 380# CONFIG_BLINK is not set
371#
372# ATA/ATAPI/MFM/RLL support
373#
374# CONFIG_IDE is not set 381# CONFIG_IDE is not set
375 382
376# 383#
@@ -399,6 +406,7 @@ CONFIG_SCSI=y
399# CONFIG_SCSI_CONSTANTS is not set 406# CONFIG_SCSI_CONSTANTS is not set
400# CONFIG_SCSI_LOGGING is not set 407# CONFIG_SCSI_LOGGING is not set
401# CONFIG_SCSI_SCAN_ASYNC is not set 408# CONFIG_SCSI_SCAN_ASYNC is not set
409CONFIG_SCSI_WAIT_SCAN=m
402 410
403# 411#
404# SCSI Transports 412# SCSI Transports
@@ -447,11 +455,8 @@ CONFIG_SCSI=y
447# CONFIG_SCSI_NSP32 is not set 455# CONFIG_SCSI_NSP32 is not set
448# CONFIG_SCSI_DEBUG is not set 456# CONFIG_SCSI_DEBUG is not set
449# CONFIG_SCSI_SRP is not set 457# CONFIG_SCSI_SRP is not set
450
451#
452# Serial ATA (prod) and Parallel ATA (experimental) drivers
453#
454CONFIG_ATA=y 458CONFIG_ATA=y
459# CONFIG_ATA_NONSTANDARD is not set
455# CONFIG_SATA_AHCI is not set 460# CONFIG_SATA_AHCI is not set
456# CONFIG_SATA_SVW is not set 461# CONFIG_SATA_SVW is not set
457# CONFIG_ATA_PIIX is not set 462# CONFIG_ATA_PIIX is not set
@@ -467,10 +472,12 @@ CONFIG_ATA=y
467# CONFIG_SATA_ULI is not set 472# CONFIG_SATA_ULI is not set
468# CONFIG_SATA_VIA is not set 473# CONFIG_SATA_VIA is not set
469# CONFIG_SATA_VITESSE is not set 474# CONFIG_SATA_VITESSE is not set
475# CONFIG_SATA_INIC162X is not set
470# CONFIG_PATA_ALI is not set 476# CONFIG_PATA_ALI is not set
471# CONFIG_PATA_AMD is not set 477# CONFIG_PATA_AMD is not set
472# CONFIG_PATA_ARTOP is not set 478# CONFIG_PATA_ARTOP is not set
473# CONFIG_PATA_ATIIXP is not set 479# CONFIG_PATA_ATIIXP is not set
480# CONFIG_PATA_CMD640_PCI is not set
474# CONFIG_PATA_CMD64X is not set 481# CONFIG_PATA_CMD64X is not set
475# CONFIG_PATA_CS5520 is not set 482# CONFIG_PATA_CS5520 is not set
476# CONFIG_PATA_CS5530 is not set 483# CONFIG_PATA_CS5530 is not set
@@ -482,9 +489,11 @@ CONFIG_ATA=y
482# CONFIG_PATA_HPT3X2N is not set 489# CONFIG_PATA_HPT3X2N is not set
483# CONFIG_PATA_HPT3X3 is not set 490# CONFIG_PATA_HPT3X3 is not set
484# CONFIG_PATA_IT821X is not set 491# CONFIG_PATA_IT821X is not set
492# CONFIG_PATA_IT8213 is not set
485# CONFIG_PATA_JMICRON is not set 493# CONFIG_PATA_JMICRON is not set
486# CONFIG_PATA_TRIFLEX is not set 494# CONFIG_PATA_TRIFLEX is not set
487# CONFIG_PATA_MARVELL is not set 495# CONFIG_PATA_MARVELL is not set
496CONFIG_PATA_MPC52xx=y
488# CONFIG_PATA_MPIIX is not set 497# CONFIG_PATA_MPIIX is not set
489# CONFIG_PATA_OLDPIIX is not set 498# CONFIG_PATA_OLDPIIX is not set
490# CONFIG_PATA_NETCELL is not set 499# CONFIG_PATA_NETCELL is not set
@@ -519,18 +528,14 @@ CONFIG_ATA=y
519# 528#
520# IEEE 1394 (FireWire) support 529# IEEE 1394 (FireWire) support
521# 530#
531# CONFIG_FIREWIRE is not set
522# CONFIG_IEEE1394 is not set 532# CONFIG_IEEE1394 is not set
523 533
524# 534#
525# I2O device support 535# I2O device support
526# 536#
527# CONFIG_I2O is not set 537# CONFIG_I2O is not set
528 538# CONFIG_MACINTOSH_DRIVERS is not set
529#
530# Macintosh device drivers
531#
532# CONFIG_MAC_EMUMOUSEBTN is not set
533# CONFIG_WINDFARM is not set
534 539
535# 540#
536# Network device support 541# Network device support
@@ -540,24 +545,13 @@ CONFIG_NETDEVICES=y
540# CONFIG_BONDING is not set 545# CONFIG_BONDING is not set
541# CONFIG_EQUALIZER is not set 546# CONFIG_EQUALIZER is not set
542# CONFIG_TUN is not set 547# CONFIG_TUN is not set
543
544#
545# ARCnet devices
546#
547# CONFIG_ARCNET is not set 548# CONFIG_ARCNET is not set
548 549
549# 550#
550# PHY device support
551#
552
553#
554# Ethernet (10 or 100Mbit) 551# Ethernet (10 or 100Mbit)
555# 552#
556# CONFIG_NET_ETHERNET is not set 553# CONFIG_NET_ETHERNET is not set
557 554CONFIG_NETDEV_1000=y
558#
559# Ethernet (1000 Mbit)
560#
561# CONFIG_ACENIC is not set 555# CONFIG_ACENIC is not set
562# CONFIG_DL2K is not set 556# CONFIG_DL2K is not set
563# CONFIG_E1000 is not set 557# CONFIG_E1000 is not set
@@ -569,33 +563,27 @@ CONFIG_NETDEVICES=y
569# CONFIG_SKGE is not set 563# CONFIG_SKGE is not set
570# CONFIG_SKY2 is not set 564# CONFIG_SKY2 is not set
571# CONFIG_SK98LIN is not set 565# CONFIG_SK98LIN is not set
566# CONFIG_VIA_VELOCITY is not set
572# CONFIG_TIGON3 is not set 567# CONFIG_TIGON3 is not set
573# CONFIG_BNX2 is not set 568# CONFIG_BNX2 is not set
574# CONFIG_MV643XX_ETH is not set 569# CONFIG_MV643XX_ETH is not set
575# CONFIG_QLA3XXX is not set 570# CONFIG_QLA3XXX is not set
576 571# CONFIG_ATL1 is not set
577# 572CONFIG_NETDEV_10000=y
578# Ethernet (10000 Mbit)
579#
580# CONFIG_CHELSIO_T1 is not set 573# CONFIG_CHELSIO_T1 is not set
574# CONFIG_CHELSIO_T3 is not set
581# CONFIG_IXGB is not set 575# CONFIG_IXGB is not set
582# CONFIG_S2IO is not set 576# CONFIG_S2IO is not set
583# CONFIG_MYRI10GE is not set 577# CONFIG_MYRI10GE is not set
584# CONFIG_NETXEN_NIC is not set 578# CONFIG_NETXEN_NIC is not set
585 579# CONFIG_MLX4_CORE is not set
586#
587# Token Ring devices
588#
589# CONFIG_TR is not set 580# CONFIG_TR is not set
590 581
591# 582#
592# Wireless LAN (non-hamradio) 583# Wireless LAN
593#
594# CONFIG_NET_RADIO is not set
595
596#
597# Wan interfaces
598# 584#
585# CONFIG_WLAN_PRE80211 is not set
586# CONFIG_WLAN_80211 is not set
599# CONFIG_WAN is not set 587# CONFIG_WAN is not set
600# CONFIG_FDDI is not set 588# CONFIG_FDDI is not set
601# CONFIG_HIPPI is not set 589# CONFIG_HIPPI is not set
@@ -657,15 +645,10 @@ CONFIG_LEGACY_PTY_COUNT=256
657# IPMI 645# IPMI
658# 646#
659# CONFIG_IPMI_HANDLER is not set 647# CONFIG_IPMI_HANDLER is not set
660
661#
662# Watchdog Cards
663#
664# CONFIG_WATCHDOG is not set 648# CONFIG_WATCHDOG is not set
665# CONFIG_HW_RANDOM is not set 649# CONFIG_HW_RANDOM is not set
666# CONFIG_NVRAM is not set 650# CONFIG_NVRAM is not set
667# CONFIG_GEN_RTC is not set 651# CONFIG_GEN_RTC is not set
668# CONFIG_DTLK is not set
669# CONFIG_R3964 is not set 652# CONFIG_R3964 is not set
670# CONFIG_APPLICOM is not set 653# CONFIG_APPLICOM is not set
671# CONFIG_AGP is not set 654# CONFIG_AGP is not set
@@ -676,10 +659,7 @@ CONFIG_LEGACY_PTY_COUNT=256
676# TPM devices 659# TPM devices
677# 660#
678# CONFIG_TCG_TPM is not set 661# CONFIG_TCG_TPM is not set
679 662CONFIG_DEVPORT=y
680#
681# I2C support
682#
683# CONFIG_I2C is not set 663# CONFIG_I2C is not set
684 664
685# 665#
@@ -692,30 +672,32 @@ CONFIG_LEGACY_PTY_COUNT=256
692# Dallas's 1-wire bus 672# Dallas's 1-wire bus
693# 673#
694# CONFIG_W1 is not set 674# CONFIG_W1 is not set
675# CONFIG_HWMON is not set
695 676
696# 677#
697# Hardware Monitoring support 678# Multifunction device drivers
698# 679#
699# CONFIG_HWMON is not set 680# CONFIG_MFD_SM501 is not set
700# CONFIG_HWMON_VID is not set
701 681
702# 682#
703# Multimedia devices 683# Multimedia devices
704# 684#
705# CONFIG_VIDEO_DEV is not set 685# CONFIG_VIDEO_DEV is not set
686# CONFIG_DVB_CORE is not set
687# CONFIG_DAB is not set
706 688
707# 689#
708# Digital Video Broadcasting Devices 690# Graphics support
709# 691#
710# CONFIG_DVB is not set 692# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
711 693
712# 694#
713# Graphics support 695# Display device support
714# 696#
715# CONFIG_FIRMWARE_EDID is not set 697# CONFIG_DISPLAY_SUPPORT is not set
698# CONFIG_VGASTATE is not set
716# CONFIG_FB is not set 699# CONFIG_FB is not set
717# CONFIG_FB_IBM_GXT4500 is not set 700# CONFIG_FB_IBM_GXT4500 is not set
718# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
719 701
720# 702#
721# Sound 703# Sound
@@ -738,10 +720,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
738# USB Gadget Support 720# USB Gadget Support
739# 721#
740# CONFIG_USB_GADGET is not set 722# CONFIG_USB_GADGET is not set
741
742#
743# MMC/SD Card support
744#
745# CONFIG_MMC is not set 723# CONFIG_MMC is not set
746 724
747# 725#
@@ -769,6 +747,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
769# 747#
770# Real Time Clock 748# Real Time Clock
771# 749#
750CONFIG_RTC_LIB=y
772# CONFIG_RTC_CLASS is not set 751# CONFIG_RTC_CLASS is not set
773 752
774# 753#
@@ -785,10 +764,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
785# 764#
786 765
787# 766#
788# Virtualization
789#
790
791#
792# File systems 767# File systems
793# 768#
794CONFIG_EXT2_FS=y 769CONFIG_EXT2_FS=y
@@ -888,16 +863,20 @@ CONFIG_MSDOS_PARTITION=y
888# Distributed Lock Manager 863# Distributed Lock Manager
889# 864#
890# CONFIG_DLM is not set 865# CONFIG_DLM is not set
866# CONFIG_UCC_SLOW is not set
891 867
892# 868#
893# Library routines 869# Library routines
894# 870#
895# CONFIG_CRC_CCITT is not set 871# CONFIG_CRC_CCITT is not set
896# CONFIG_CRC16 is not set 872# CONFIG_CRC16 is not set
873# CONFIG_CRC_ITU_T is not set
897# CONFIG_CRC32 is not set 874# CONFIG_CRC32 is not set
898# CONFIG_LIBCRC32C is not set 875# CONFIG_LIBCRC32C is not set
899CONFIG_PLIST=y 876CONFIG_PLIST=y
900CONFIG_IOMAP_COPY=y 877CONFIG_HAS_IOMEM=y
878CONFIG_HAS_IOPORT=y
879CONFIG_HAS_DMA=y
901 880
902# 881#
903# Instrumentation Support 882# Instrumentation Support
@@ -914,15 +893,15 @@ CONFIG_ENABLE_MUST_CHECK=y
914# CONFIG_DEBUG_FS is not set 893# CONFIG_DEBUG_FS is not set
915# CONFIG_HEADERS_CHECK is not set 894# CONFIG_HEADERS_CHECK is not set
916CONFIG_DEBUG_KERNEL=y 895CONFIG_DEBUG_KERNEL=y
917CONFIG_LOG_BUF_SHIFT=14 896# CONFIG_DEBUG_SHIRQ is not set
918CONFIG_DETECT_SOFTLOCKUP=y 897CONFIG_DETECT_SOFTLOCKUP=y
919# CONFIG_SCHEDSTATS is not set 898# CONFIG_SCHEDSTATS is not set
899# CONFIG_TIMER_STATS is not set
920# CONFIG_DEBUG_SLAB is not set 900# CONFIG_DEBUG_SLAB is not set
921# CONFIG_DEBUG_RT_MUTEXES is not set 901# CONFIG_DEBUG_RT_MUTEXES is not set
922# CONFIG_RT_MUTEX_TESTER is not set 902# CONFIG_RT_MUTEX_TESTER is not set
923# CONFIG_DEBUG_SPINLOCK is not set 903# CONFIG_DEBUG_SPINLOCK is not set
924# CONFIG_DEBUG_MUTEXES is not set 904# CONFIG_DEBUG_MUTEXES is not set
925# CONFIG_DEBUG_RWSEMS is not set
926# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 905# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
927# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 906# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
928# CONFIG_DEBUG_KOBJECT is not set 907# CONFIG_DEBUG_KOBJECT is not set
@@ -932,10 +911,13 @@ CONFIG_DEBUG_INFO=y
932# CONFIG_DEBUG_LIST is not set 911# CONFIG_DEBUG_LIST is not set
933CONFIG_FORCED_INLINING=y 912CONFIG_FORCED_INLINING=y
934# CONFIG_RCU_TORTURE_TEST is not set 913# CONFIG_RCU_TORTURE_TEST is not set
914# CONFIG_FAULT_INJECTION is not set
915# CONFIG_DEBUG_STACKOVERFLOW is not set
916# CONFIG_DEBUG_STACK_USAGE is not set
917# CONFIG_DEBUG_PAGEALLOC is not set
935# CONFIG_DEBUGGER is not set 918# CONFIG_DEBUGGER is not set
936# CONFIG_BDI_SWITCH is not set 919# CONFIG_BDI_SWITCH is not set
937# CONFIG_BOOTX_TEXT is not set 920# CONFIG_BOOTX_TEXT is not set
938# CONFIG_SERIAL_TEXT_DEBUG is not set
939# CONFIG_PPC_EARLY_DEBUG is not set 921# CONFIG_PPC_EARLY_DEBUG is not set
940 922
941# 923#
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig
index 15366f0e489f..eb3d9ad655ea 100644
--- a/arch/powerpc/configs/maple_defconfig
+++ b/arch/powerpc/configs/maple_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc5 3# Linux kernel version: 2.6.22-rc6
4# Mon Jan 22 22:19:02 2007 4# Tue Jun 26 13:27:35 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -39,6 +39,7 @@ CONFIG_PPC_FPU=y
39# CONFIG_PPC_OF_PLATFORM_PCI is not set 39# CONFIG_PPC_OF_PLATFORM_PCI is not set
40# CONFIG_ALTIVEC is not set 40# CONFIG_ALTIVEC is not set
41CONFIG_PPC_STD_MMU=y 41CONFIG_PPC_STD_MMU=y
42CONFIG_PPC_MM_SLICES=y
42CONFIG_VIRT_CPU_ACCOUNTING=y 43CONFIG_VIRT_CPU_ACCOUNTING=y
43CONFIG_SMP=y 44CONFIG_SMP=y
44CONFIG_NR_CPUS=4 45CONFIG_NR_CPUS=4
@@ -59,6 +60,7 @@ CONFIG_LOCALVERSION_AUTO=y
59CONFIG_SWAP=y 60CONFIG_SWAP=y
60CONFIG_SYSVIPC=y 61CONFIG_SYSVIPC=y
61# CONFIG_IPC_NS is not set 62# CONFIG_IPC_NS is not set
63CONFIG_SYSVIPC_SYSCTL=y
62CONFIG_POSIX_MQUEUE=y 64CONFIG_POSIX_MQUEUE=y
63# CONFIG_BSD_PROCESS_ACCT is not set 65# CONFIG_BSD_PROCESS_ACCT is not set
64# CONFIG_TASKSTATS is not set 66# CONFIG_TASKSTATS is not set
@@ -66,10 +68,11 @@ CONFIG_POSIX_MQUEUE=y
66# CONFIG_AUDIT is not set 68# CONFIG_AUDIT is not set
67CONFIG_IKCONFIG=y 69CONFIG_IKCONFIG=y
68CONFIG_IKCONFIG_PROC=y 70CONFIG_IKCONFIG_PROC=y
71CONFIG_LOG_BUF_SHIFT=17
69# CONFIG_CPUSETS is not set 72# CONFIG_CPUSETS is not set
70CONFIG_SYSFS_DEPRECATED=y 73CONFIG_SYSFS_DEPRECATED=y
71# CONFIG_RELAY is not set 74# CONFIG_RELAY is not set
72CONFIG_INITRAMFS_SOURCE="" 75# CONFIG_BLK_DEV_INITRD is not set
73CONFIG_CC_OPTIMIZE_FOR_SIZE=y 76CONFIG_CC_OPTIMIZE_FOR_SIZE=y
74CONFIG_SYSCTL=y 77CONFIG_SYSCTL=y
75# CONFIG_EMBEDDED is not set 78# CONFIG_EMBEDDED is not set
@@ -83,14 +86,19 @@ CONFIG_BUG=y
83CONFIG_ELF_CORE=y 86CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y 87CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y 88CONFIG_FUTEX=y
89CONFIG_ANON_INODES=y
86CONFIG_EPOLL=y 90CONFIG_EPOLL=y
91CONFIG_SIGNALFD=y
92CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 94CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y 95CONFIG_VM_EVENT_COUNTERS=y
96CONFIG_SLAB=y
97# CONFIG_SLUB is not set
98# CONFIG_SLOB is not set
90CONFIG_RT_MUTEXES=y 99CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set 100# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0 101CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94 102
95# 103#
96# Loadable module support 104# Loadable module support
@@ -131,29 +139,34 @@ CONFIG_PPC_MULTIPLATFORM=y
131# CONFIG_PPC_PSERIES is not set 139# CONFIG_PPC_PSERIES is not set
132# CONFIG_PPC_ISERIES is not set 140# CONFIG_PPC_ISERIES is not set
133# CONFIG_PPC_MPC52xx is not set 141# CONFIG_PPC_MPC52xx is not set
142# CONFIG_PPC_MPC5200 is not set
134# CONFIG_PPC_PMAC is not set 143# CONFIG_PPC_PMAC is not set
135CONFIG_PPC_MAPLE=y 144CONFIG_PPC_MAPLE=y
136# CONFIG_PPC_PASEMI is not set 145# CONFIG_PPC_PASEMI is not set
146# CONFIG_PPC_CELLEB is not set
147# CONFIG_PPC_PS3 is not set
137# CONFIG_PPC_CELL is not set 148# CONFIG_PPC_CELL is not set
138# CONFIG_PPC_CELL_NATIVE is not set 149# CONFIG_PPC_CELL_NATIVE is not set
139# CONFIG_PPC_IBM_CELL_BLADE is not set 150# CONFIG_PPC_IBM_CELL_BLADE is not set
140# CONFIG_PPC_PS3 is not set 151# CONFIG_PQ2ADS is not set
141CONFIG_PPC_NATIVE=y 152CONFIG_PPC_NATIVE=y
142CONFIG_UDBG_RTAS_CONSOLE=y 153CONFIG_UDBG_RTAS_CONSOLE=y
154CONFIG_MPIC=y
155# CONFIG_MPIC_WEIRD is not set
156# CONFIG_PPC_I8259 is not set
143CONFIG_U3_DART=y 157CONFIG_U3_DART=y
144CONFIG_PPC_RTAS=y 158CONFIG_PPC_RTAS=y
145# CONFIG_RTAS_ERROR_LOGGING is not set 159# CONFIG_RTAS_ERROR_LOGGING is not set
146CONFIG_RTAS_PROC=y 160CONFIG_RTAS_PROC=y
147# CONFIG_RTAS_FLASH is not set 161# CONFIG_RTAS_FLASH is not set
148# CONFIG_MMIO_NVRAM is not set 162CONFIG_MMIO_NVRAM=y
149CONFIG_MPIC_U3_HT_IRQS=y 163CONFIG_MPIC_U3_HT_IRQS=y
150# CONFIG_PPC_MPC106 is not set 164# CONFIG_PPC_MPC106 is not set
151CONFIG_PPC_970_NAP=y 165CONFIG_PPC_970_NAP=y
152# CONFIG_PPC_INDIRECT_IO is not set 166# CONFIG_PPC_INDIRECT_IO is not set
153# CONFIG_GENERIC_IOMAP is not set 167# CONFIG_GENERIC_IOMAP is not set
154# CONFIG_CPU_FREQ is not set 168# CONFIG_CPU_FREQ is not set
155# CONFIG_WANT_EARLY_SERIAL is not set 169# CONFIG_CPM2 is not set
156CONFIG_MPIC=y
157 170
158# 171#
159# Kernel options 172# Kernel options
@@ -189,34 +202,34 @@ CONFIG_FLAT_NODE_MEM_MAP=y
189# CONFIG_SPARSEMEM_STATIC is not set 202# CONFIG_SPARSEMEM_STATIC is not set
190CONFIG_SPLIT_PTLOCK_CPUS=4 203CONFIG_SPLIT_PTLOCK_CPUS=4
191CONFIG_RESOURCES_64BIT=y 204CONFIG_RESOURCES_64BIT=y
205CONFIG_ZONE_DMA_FLAG=1
206# CONFIG_PPC_HAS_HASH_64K is not set
192# CONFIG_PPC_64K_PAGES is not set 207# CONFIG_PPC_64K_PAGES is not set
193# CONFIG_SCHED_SMT is not set 208# CONFIG_SCHED_SMT is not set
194CONFIG_PROC_DEVICETREE=y 209CONFIG_PROC_DEVICETREE=y
195# CONFIG_CMDLINE_BOOL is not set 210# CONFIG_CMDLINE_BOOL is not set
196# CONFIG_PM is not set 211# CONFIG_PM is not set
197CONFIG_SECCOMP=y 212CONFIG_SECCOMP=y
213# CONFIG_WANT_DEVICE_TREE is not set
198CONFIG_ISA_DMA_API=y 214CONFIG_ISA_DMA_API=y
199 215
200# 216#
201# Bus options 217# Bus options
202# 218#
219CONFIG_ZONE_DMA=y
203CONFIG_GENERIC_ISA_DMA=y 220CONFIG_GENERIC_ISA_DMA=y
204# CONFIG_MPIC_WEIRD is not set
205# CONFIG_PPC_I8259 is not set
206# CONFIG_PPC_INDIRECT_PCI is not set 221# CONFIG_PPC_INDIRECT_PCI is not set
207CONFIG_PCI=y 222CONFIG_PCI=y
208CONFIG_PCI_DOMAINS=y 223CONFIG_PCI_DOMAINS=y
209# CONFIG_PCIEPORTBUS is not set 224# CONFIG_PCIEPORTBUS is not set
225CONFIG_ARCH_SUPPORTS_MSI=y
226CONFIG_PCI_MSI=y
210# CONFIG_PCI_DEBUG is not set 227# CONFIG_PCI_DEBUG is not set
211 228
212# 229#
213# PCCARD (PCMCIA/CardBus) support 230# PCCARD (PCMCIA/CardBus) support
214# 231#
215# CONFIG_PCCARD is not set 232# CONFIG_PCCARD is not set
216
217#
218# PCI Hotplug Support
219#
220# CONFIG_HOTPLUG_PCI is not set 233# CONFIG_HOTPLUG_PCI is not set
221CONFIG_KERNEL_START=0xc000000000000000 234CONFIG_KERNEL_START=0xc000000000000000
222 235
@@ -228,13 +241,13 @@ CONFIG_NET=y
228# 241#
229# Networking options 242# Networking options
230# 243#
231# CONFIG_NETDEBUG is not set
232CONFIG_PACKET=y 244CONFIG_PACKET=y
233CONFIG_PACKET_MMAP=y 245CONFIG_PACKET_MMAP=y
234CONFIG_UNIX=y 246CONFIG_UNIX=y
235CONFIG_XFRM=y 247CONFIG_XFRM=y
236CONFIG_XFRM_USER=m 248CONFIG_XFRM_USER=m
237# CONFIG_XFRM_SUB_POLICY is not set 249# CONFIG_XFRM_SUB_POLICY is not set
250# CONFIG_XFRM_MIGRATE is not set
238# CONFIG_NET_KEY is not set 251# CONFIG_NET_KEY is not set
239CONFIG_INET=y 252CONFIG_INET=y
240CONFIG_IP_MULTICAST=y 253CONFIG_IP_MULTICAST=y
@@ -268,20 +281,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
268# CONFIG_INET6_TUNNEL is not set 281# CONFIG_INET6_TUNNEL is not set
269# CONFIG_NETWORK_SECMARK is not set 282# CONFIG_NETWORK_SECMARK is not set
270# CONFIG_NETFILTER is not set 283# CONFIG_NETFILTER is not set
271
272#
273# DCCP Configuration (EXPERIMENTAL)
274#
275# CONFIG_IP_DCCP is not set 284# CONFIG_IP_DCCP is not set
276
277#
278# SCTP Configuration (EXPERIMENTAL)
279#
280# CONFIG_IP_SCTP is not set 285# CONFIG_IP_SCTP is not set
281
282#
283# TIPC Configuration (EXPERIMENTAL)
284#
285# CONFIG_TIPC is not set 286# CONFIG_TIPC is not set
286# CONFIG_ATM is not set 287# CONFIG_ATM is not set
287# CONFIG_BRIDGE is not set 288# CONFIG_BRIDGE is not set
@@ -307,7 +308,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
307# CONFIG_HAMRADIO is not set 308# CONFIG_HAMRADIO is not set
308# CONFIG_IRDA is not set 309# CONFIG_IRDA is not set
309# CONFIG_BT is not set 310# CONFIG_BT is not set
311# CONFIG_AF_RXRPC is not set
312
313#
314# Wireless
315#
316# CONFIG_CFG80211 is not set
317# CONFIG_WIRELESS_EXT is not set
318# CONFIG_MAC80211 is not set
310# CONFIG_IEEE80211 is not set 319# CONFIG_IEEE80211 is not set
320# CONFIG_RFKILL is not set
311 321
312# 322#
313# Device Drivers 323# Device Drivers
@@ -320,16 +330,13 @@ CONFIG_STANDALONE=y
320CONFIG_PREVENT_FIRMWARE_BUILD=y 330CONFIG_PREVENT_FIRMWARE_BUILD=y
321# CONFIG_FW_LOADER is not set 331# CONFIG_FW_LOADER is not set
322# CONFIG_DEBUG_DRIVER is not set 332# CONFIG_DEBUG_DRIVER is not set
333# CONFIG_DEBUG_DEVRES is not set
323# CONFIG_SYS_HYPERVISOR is not set 334# CONFIG_SYS_HYPERVISOR is not set
324 335
325# 336#
326# Connector - unified userspace <-> kernelspace linker 337# Connector - unified userspace <-> kernelspace linker
327# 338#
328# CONFIG_CONNECTOR is not set 339# CONFIG_CONNECTOR is not set
329
330#
331# Memory Technology Devices (MTD)
332#
333# CONFIG_MTD is not set 340# CONFIG_MTD is not set
334 341
335# 342#
@@ -340,6 +347,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
340# 347#
341# Plug and Play support 348# Plug and Play support
342# 349#
350# CONFIG_PNPACPI is not set
343 351
344# 352#
345# Block devices 353# Block devices
@@ -358,19 +366,16 @@ CONFIG_BLK_DEV_RAM=y
358CONFIG_BLK_DEV_RAM_COUNT=16 366CONFIG_BLK_DEV_RAM_COUNT=16
359CONFIG_BLK_DEV_RAM_SIZE=8192 367CONFIG_BLK_DEV_RAM_SIZE=8192
360CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 368CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
361# CONFIG_BLK_DEV_INITRD is not set
362# CONFIG_CDROM_PKTCDVD is not set 369# CONFIG_CDROM_PKTCDVD is not set
363# CONFIG_ATA_OVER_ETH is not set 370# CONFIG_ATA_OVER_ETH is not set
364 371
365# 372#
366# Misc devices 373# Misc devices
367# 374#
375# CONFIG_PHANTOM is not set
368# CONFIG_SGI_IOC4 is not set 376# CONFIG_SGI_IOC4 is not set
369# CONFIG_TIFM_CORE is not set 377# CONFIG_TIFM_CORE is not set
370 378# CONFIG_BLINK is not set
371#
372# ATA/ATAPI/MFM/RLL support
373#
374CONFIG_IDE=y 379CONFIG_IDE=y
375CONFIG_BLK_DEV_IDE=y 380CONFIG_BLK_DEV_IDE=y
376 381
@@ -384,6 +389,7 @@ CONFIG_BLK_DEV_IDECD=y
384# CONFIG_BLK_DEV_IDETAPE is not set 389# CONFIG_BLK_DEV_IDETAPE is not set
385# CONFIG_BLK_DEV_IDEFLOPPY is not set 390# CONFIG_BLK_DEV_IDEFLOPPY is not set
386CONFIG_IDE_TASK_IOCTL=y 391CONFIG_IDE_TASK_IOCTL=y
392CONFIG_IDE_PROC_FS=y
387 393
388# 394#
389# IDE chipset support/bugfixes 395# IDE chipset support/bugfixes
@@ -391,12 +397,12 @@ CONFIG_IDE_TASK_IOCTL=y
391CONFIG_IDE_GENERIC=y 397CONFIG_IDE_GENERIC=y
392CONFIG_BLK_DEV_IDEPCI=y 398CONFIG_BLK_DEV_IDEPCI=y
393CONFIG_IDEPCI_SHARE_IRQ=y 399CONFIG_IDEPCI_SHARE_IRQ=y
400CONFIG_IDEPCI_PCIBUS_ORDER=y
394# CONFIG_BLK_DEV_OFFBOARD is not set 401# CONFIG_BLK_DEV_OFFBOARD is not set
395CONFIG_BLK_DEV_GENERIC=y 402CONFIG_BLK_DEV_GENERIC=y
396# CONFIG_BLK_DEV_OPTI621 is not set 403# CONFIG_BLK_DEV_OPTI621 is not set
397CONFIG_BLK_DEV_IDEDMA_PCI=y 404CONFIG_BLK_DEV_IDEDMA_PCI=y
398# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 405# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
399CONFIG_IDEDMA_PCI_AUTO=y
400# CONFIG_IDEDMA_ONLYDISK is not set 406# CONFIG_IDEDMA_ONLYDISK is not set
401# CONFIG_BLK_DEV_AEC62XX is not set 407# CONFIG_BLK_DEV_AEC62XX is not set
402# CONFIG_BLK_DEV_ALI15X3 is not set 408# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -411,6 +417,7 @@ CONFIG_BLK_DEV_AMD74XX=y
411# CONFIG_BLK_DEV_JMICRON is not set 417# CONFIG_BLK_DEV_JMICRON is not set
412# CONFIG_BLK_DEV_SC1200 is not set 418# CONFIG_BLK_DEV_SC1200 is not set
413# CONFIG_BLK_DEV_PIIX is not set 419# CONFIG_BLK_DEV_PIIX is not set
420# CONFIG_BLK_DEV_IT8213 is not set
414# CONFIG_BLK_DEV_IT821X is not set 421# CONFIG_BLK_DEV_IT821X is not set
415# CONFIG_BLK_DEV_NS87415 is not set 422# CONFIG_BLK_DEV_NS87415 is not set
416# CONFIG_BLK_DEV_PDC202XX_OLD is not set 423# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -421,10 +428,10 @@ CONFIG_BLK_DEV_AMD74XX=y
421# CONFIG_BLK_DEV_SLC90E66 is not set 428# CONFIG_BLK_DEV_SLC90E66 is not set
422# CONFIG_BLK_DEV_TRM290 is not set 429# CONFIG_BLK_DEV_TRM290 is not set
423# CONFIG_BLK_DEV_VIA82CXXX is not set 430# CONFIG_BLK_DEV_VIA82CXXX is not set
431# CONFIG_BLK_DEV_TC86C001 is not set
424# CONFIG_IDE_ARM is not set 432# CONFIG_IDE_ARM is not set
425CONFIG_BLK_DEV_IDEDMA=y 433CONFIG_BLK_DEV_IDEDMA=y
426# CONFIG_IDEDMA_IVB is not set 434# CONFIG_IDEDMA_IVB is not set
427CONFIG_IDEDMA_AUTO=y
428# CONFIG_BLK_DEV_HD is not set 435# CONFIG_BLK_DEV_HD is not set
429 436
430# 437#
@@ -433,10 +440,6 @@ CONFIG_IDEDMA_AUTO=y
433# CONFIG_RAID_ATTRS is not set 440# CONFIG_RAID_ATTRS is not set
434# CONFIG_SCSI is not set 441# CONFIG_SCSI is not set
435# CONFIG_SCSI_NETLINK is not set 442# CONFIG_SCSI_NETLINK is not set
436
437#
438# Serial ATA (prod) and Parallel ATA (experimental) drivers
439#
440# CONFIG_ATA is not set 443# CONFIG_ATA is not set
441 444
442# 445#
@@ -452,18 +455,14 @@ CONFIG_IDEDMA_AUTO=y
452# 455#
453# IEEE 1394 (FireWire) support 456# IEEE 1394 (FireWire) support
454# 457#
458# CONFIG_FIREWIRE is not set
455# CONFIG_IEEE1394 is not set 459# CONFIG_IEEE1394 is not set
456 460
457# 461#
458# I2O device support 462# I2O device support
459# 463#
460# CONFIG_I2O is not set 464# CONFIG_I2O is not set
461 465# CONFIG_MACINTOSH_DRIVERS is not set
462#
463# Macintosh device drivers
464#
465# CONFIG_MAC_EMUMOUSEBTN is not set
466# CONFIG_WINDFARM is not set
467 466
468# 467#
469# Network device support 468# Network device support
@@ -473,15 +472,7 @@ CONFIG_NETDEVICES=y
473# CONFIG_BONDING is not set 472# CONFIG_BONDING is not set
474# CONFIG_EQUALIZER is not set 473# CONFIG_EQUALIZER is not set
475# CONFIG_TUN is not set 474# CONFIG_TUN is not set
476
477#
478# ARCnet devices
479#
480# CONFIG_ARCNET is not set 475# CONFIG_ARCNET is not set
481
482#
483# PHY device support
484#
485# CONFIG_PHYLIB is not set 476# CONFIG_PHYLIB is not set
486 477
487# 478#
@@ -518,10 +509,8 @@ CONFIG_AMD8111_ETH=y
518# CONFIG_EPIC100 is not set 509# CONFIG_EPIC100 is not set
519# CONFIG_SUNDANCE is not set 510# CONFIG_SUNDANCE is not set
520# CONFIG_VIA_RHINE is not set 511# CONFIG_VIA_RHINE is not set
521 512# CONFIG_SC92031 is not set
522# 513CONFIG_NETDEV_1000=y
523# Ethernet (1000 Mbit)
524#
525# CONFIG_ACENIC is not set 514# CONFIG_ACENIC is not set
526# CONFIG_DL2K is not set 515# CONFIG_DL2K is not set
527CONFIG_E1000=y 516CONFIG_E1000=y
@@ -539,29 +528,33 @@ CONFIG_E1000=y
539CONFIG_TIGON3=y 528CONFIG_TIGON3=y
540# CONFIG_BNX2 is not set 529# CONFIG_BNX2 is not set
541# CONFIG_QLA3XXX is not set 530# CONFIG_QLA3XXX is not set
542 531# CONFIG_ATL1 is not set
543# 532CONFIG_NETDEV_10000=y
544# Ethernet (10000 Mbit)
545#
546# CONFIG_CHELSIO_T1 is not set 533# CONFIG_CHELSIO_T1 is not set
534# CONFIG_CHELSIO_T3 is not set
547# CONFIG_IXGB is not set 535# CONFIG_IXGB is not set
548# CONFIG_S2IO is not set 536# CONFIG_S2IO is not set
549# CONFIG_MYRI10GE is not set 537# CONFIG_MYRI10GE is not set
550# CONFIG_NETXEN_NIC is not set 538# CONFIG_NETXEN_NIC is not set
551 539# CONFIG_PASEMI_MAC is not set
552# 540# CONFIG_MLX4_CORE is not set
553# Token Ring devices
554#
555# CONFIG_TR is not set 541# CONFIG_TR is not set
556 542
557# 543#
558# Wireless LAN (non-hamradio) 544# Wireless LAN
559# 545#
560# CONFIG_NET_RADIO is not set 546# CONFIG_WLAN_PRE80211 is not set
547# CONFIG_WLAN_80211 is not set
561 548
562# 549#
563# Wan interfaces 550# USB Network Adapters
564# 551#
552# CONFIG_USB_CATC is not set
553# CONFIG_USB_KAWETH is not set
554CONFIG_USB_PEGASUS=y
555# CONFIG_USB_RTL8150 is not set
556# CONFIG_USB_USBNET_MII is not set
557# CONFIG_USB_USBNET is not set
565# CONFIG_WAN is not set 558# CONFIG_WAN is not set
566# CONFIG_FDDI is not set 559# CONFIG_FDDI is not set
567# CONFIG_HIPPI is not set 560# CONFIG_HIPPI is not set
@@ -587,6 +580,7 @@ CONFIG_TIGON3=y
587# 580#
588CONFIG_INPUT=y 581CONFIG_INPUT=y
589# CONFIG_INPUT_FF_MEMLESS is not set 582# CONFIG_INPUT_FF_MEMLESS is not set
583# CONFIG_INPUT_POLLDEV is not set
590 584
591# 585#
592# Userland interfaces 586# Userland interfaces
@@ -606,6 +600,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1200
606# CONFIG_INPUT_KEYBOARD is not set 600# CONFIG_INPUT_KEYBOARD is not set
607# CONFIG_INPUT_MOUSE is not set 601# CONFIG_INPUT_MOUSE is not set
608# CONFIG_INPUT_JOYSTICK is not set 602# CONFIG_INPUT_JOYSTICK is not set
603# CONFIG_INPUT_TABLET is not set
609# CONFIG_INPUT_TOUCHSCREEN is not set 604# CONFIG_INPUT_TOUCHSCREEN is not set
610# CONFIG_INPUT_MISC is not set 605# CONFIG_INPUT_MISC is not set
611 606
@@ -640,6 +635,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
640CONFIG_SERIAL_CORE=y 635CONFIG_SERIAL_CORE=y
641CONFIG_SERIAL_CORE_CONSOLE=y 636CONFIG_SERIAL_CORE_CONSOLE=y
642# CONFIG_SERIAL_JSM is not set 637# CONFIG_SERIAL_JSM is not set
638# CONFIG_SERIAL_OF_PLATFORM is not set
643CONFIG_UNIX98_PTYS=y 639CONFIG_UNIX98_PTYS=y
644CONFIG_LEGACY_PTYS=y 640CONFIG_LEGACY_PTYS=y
645CONFIG_LEGACY_PTY_COUNT=256 641CONFIG_LEGACY_PTY_COUNT=256
@@ -650,15 +646,10 @@ CONFIG_HVC_RTAS=y
650# IPMI 646# IPMI
651# 647#
652# CONFIG_IPMI_HANDLER is not set 648# CONFIG_IPMI_HANDLER is not set
653
654#
655# Watchdog Cards
656#
657# CONFIG_WATCHDOG is not set 649# CONFIG_WATCHDOG is not set
658# CONFIG_HW_RANDOM is not set 650# CONFIG_HW_RANDOM is not set
659CONFIG_GEN_RTC=y 651CONFIG_GEN_RTC=y
660# CONFIG_GEN_RTC_X is not set 652# CONFIG_GEN_RTC_X is not set
661# CONFIG_DTLK is not set
662# CONFIG_R3964 is not set 653# CONFIG_R3964 is not set
663# CONFIG_APPLICOM is not set 654# CONFIG_APPLICOM is not set
664# CONFIG_AGP is not set 655# CONFIG_AGP is not set
@@ -670,11 +661,9 @@ CONFIG_GEN_RTC=y
670# TPM devices 661# TPM devices
671# 662#
672# CONFIG_TCG_TPM is not set 663# CONFIG_TCG_TPM is not set
673 664CONFIG_DEVPORT=y
674#
675# I2C support
676#
677CONFIG_I2C=y 665CONFIG_I2C=y
666CONFIG_I2C_BOARDINFO=y
678CONFIG_I2C_CHARDEV=y 667CONFIG_I2C_CHARDEV=y
679 668
680# 669#
@@ -700,14 +689,15 @@ CONFIG_I2C_AMD8111=y
700# CONFIG_I2C_PARPORT_LIGHT is not set 689# CONFIG_I2C_PARPORT_LIGHT is not set
701# CONFIG_I2C_PROSAVAGE is not set 690# CONFIG_I2C_PROSAVAGE is not set
702# CONFIG_I2C_SAVAGE4 is not set 691# CONFIG_I2C_SAVAGE4 is not set
692# CONFIG_I2C_SIMTEC is not set
703# CONFIG_I2C_SIS5595 is not set 693# CONFIG_I2C_SIS5595 is not set
704# CONFIG_I2C_SIS630 is not set 694# CONFIG_I2C_SIS630 is not set
705# CONFIG_I2C_SIS96X is not set 695# CONFIG_I2C_SIS96X is not set
706# CONFIG_I2C_STUB is not set 696# CONFIG_I2C_STUB is not set
697# CONFIG_I2C_TINY_USB is not set
707# CONFIG_I2C_VIA is not set 698# CONFIG_I2C_VIA is not set
708# CONFIG_I2C_VIAPRO is not set 699# CONFIG_I2C_VIAPRO is not set
709# CONFIG_I2C_VOODOO3 is not set 700# CONFIG_I2C_VOODOO3 is not set
710# CONFIG_I2C_PCA_ISA is not set
711 701
712# 702#
713# Miscellaneous I2C Chip support 703# Miscellaneous I2C Chip support
@@ -734,28 +724,30 @@ CONFIG_I2C_AMD8111=y
734# Dallas's 1-wire bus 724# Dallas's 1-wire bus
735# 725#
736# CONFIG_W1 is not set 726# CONFIG_W1 is not set
727# CONFIG_HWMON is not set
737 728
738# 729#
739# Hardware Monitoring support 730# Multifunction device drivers
740# 731#
741# CONFIG_HWMON is not set 732# CONFIG_MFD_SM501 is not set
742# CONFIG_HWMON_VID is not set
743 733
744# 734#
745# Multimedia devices 735# Multimedia devices
746# 736#
747# CONFIG_VIDEO_DEV is not set 737# CONFIG_VIDEO_DEV is not set
738# CONFIG_DVB_CORE is not set
739# CONFIG_DAB is not set
748 740
749# 741#
750# Digital Video Broadcasting Devices 742# Graphics support
751# 743#
752# CONFIG_DVB is not set 744# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
753# CONFIG_USB_DABUSB is not set
754 745
755# 746#
756# Graphics support 747# Display device support
757# 748#
758CONFIG_FIRMWARE_EDID=y 749# CONFIG_DISPLAY_SUPPORT is not set
750# CONFIG_VGASTATE is not set
759# CONFIG_FB is not set 751# CONFIG_FB is not set
760# CONFIG_FB_IBM_GXT4500 is not set 752# CONFIG_FB_IBM_GXT4500 is not set
761 753
@@ -764,7 +756,6 @@ CONFIG_FIRMWARE_EDID=y
764# 756#
765# CONFIG_VGA_CONSOLE is not set 757# CONFIG_VGA_CONSOLE is not set
766CONFIG_DUMMY_CONSOLE=y 758CONFIG_DUMMY_CONSOLE=y
767# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
768 759
769# 760#
770# Sound 761# Sound
@@ -775,6 +766,15 @@ CONFIG_DUMMY_CONSOLE=y
775# HID Devices 766# HID Devices
776# 767#
777CONFIG_HID=y 768CONFIG_HID=y
769# CONFIG_HID_DEBUG is not set
770
771#
772# USB Input Devices
773#
774CONFIG_USB_HID=y
775# CONFIG_USB_HIDINPUT_POWERBOOK is not set
776# CONFIG_HID_FF is not set
777# CONFIG_USB_HIDDEV is not set
778 778
779# 779#
780# USB support 780# USB support
@@ -789,9 +789,8 @@ CONFIG_USB=y
789# Miscellaneous USB options 789# Miscellaneous USB options
790# 790#
791CONFIG_USB_DEVICEFS=y 791CONFIG_USB_DEVICEFS=y
792# CONFIG_USB_BANDWIDTH is not set 792CONFIG_USB_DEVICE_CLASS=y
793# CONFIG_USB_DYNAMIC_MINORS is not set 793# CONFIG_USB_DYNAMIC_MINORS is not set
794# CONFIG_USB_MULTITHREAD_PROBE is not set
795# CONFIG_USB_OTG is not set 794# CONFIG_USB_OTG is not set
796 795
797# 796#
@@ -801,9 +800,12 @@ CONFIG_USB_EHCI_HCD=y
801CONFIG_USB_EHCI_SPLIT_ISO=y 800CONFIG_USB_EHCI_SPLIT_ISO=y
802CONFIG_USB_EHCI_ROOT_HUB_TT=y 801CONFIG_USB_EHCI_ROOT_HUB_TT=y
803# CONFIG_USB_EHCI_TT_NEWSCHED is not set 802# CONFIG_USB_EHCI_TT_NEWSCHED is not set
803# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
804# CONFIG_USB_ISP116X_HCD is not set 804# CONFIG_USB_ISP116X_HCD is not set
805CONFIG_USB_OHCI_HCD=y 805CONFIG_USB_OHCI_HCD=y
806# CONFIG_USB_OHCI_BIG_ENDIAN is not set 806# CONFIG_USB_OHCI_HCD_PPC_OF is not set
807# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
808# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
807CONFIG_USB_OHCI_LITTLE_ENDIAN=y 809CONFIG_USB_OHCI_LITTLE_ENDIAN=y
808CONFIG_USB_UHCI_HCD=y 810CONFIG_USB_UHCI_HCD=y
809# CONFIG_USB_SL811_HCD is not set 811# CONFIG_USB_SL811_HCD is not set
@@ -824,39 +826,9 @@ CONFIG_USB_UHCI_HCD=y
824# CONFIG_USB_LIBUSUAL is not set 826# CONFIG_USB_LIBUSUAL is not set
825 827
826# 828#
827# USB Input Devices
828#
829CONFIG_USB_HID=y
830# CONFIG_USB_HIDINPUT_POWERBOOK is not set
831# CONFIG_HID_FF is not set
832# CONFIG_USB_HIDDEV is not set
833# CONFIG_USB_AIPTEK is not set
834# CONFIG_USB_WACOM is not set
835# CONFIG_USB_ACECAD is not set
836# CONFIG_USB_KBTAB is not set
837# CONFIG_USB_POWERMATE is not set
838# CONFIG_USB_TOUCHSCREEN is not set
839# CONFIG_USB_YEALINK is not set
840# CONFIG_USB_XPAD is not set
841# CONFIG_USB_ATI_REMOTE is not set
842# CONFIG_USB_ATI_REMOTE2 is not set
843# CONFIG_USB_KEYSPAN_REMOTE is not set
844# CONFIG_USB_APPLETOUCH is not set
845
846#
847# USB Imaging devices 829# USB Imaging devices
848# 830#
849# CONFIG_USB_MDC800 is not set 831# CONFIG_USB_MDC800 is not set
850
851#
852# USB Network Adapters
853#
854# CONFIG_USB_CATC is not set
855# CONFIG_USB_KAWETH is not set
856CONFIG_USB_PEGASUS=y
857# CONFIG_USB_RTL8150 is not set
858# CONFIG_USB_USBNET_MII is not set
859# CONFIG_USB_USBNET is not set
860CONFIG_USB_MON=y 832CONFIG_USB_MON=y
861 833
862# 834#
@@ -929,6 +901,7 @@ CONFIG_USB_EZUSB=y
929# CONFIG_USB_RIO500 is not set 901# CONFIG_USB_RIO500 is not set
930# CONFIG_USB_LEGOTOWER is not set 902# CONFIG_USB_LEGOTOWER is not set
931# CONFIG_USB_LCD is not set 903# CONFIG_USB_LCD is not set
904# CONFIG_USB_BERRY_CHARGE is not set
932# CONFIG_USB_LED is not set 905# CONFIG_USB_LED is not set
933# CONFIG_USB_CYPRESS_CY7C63 is not set 906# CONFIG_USB_CYPRESS_CY7C63 is not set
934# CONFIG_USB_CYTHERM is not set 907# CONFIG_USB_CYTHERM is not set
@@ -939,6 +912,7 @@ CONFIG_USB_EZUSB=y
939# CONFIG_USB_SISUSBVGA is not set 912# CONFIG_USB_SISUSBVGA is not set
940# CONFIG_USB_LD is not set 913# CONFIG_USB_LD is not set
941# CONFIG_USB_TRANCEVIBRATOR is not set 914# CONFIG_USB_TRANCEVIBRATOR is not set
915# CONFIG_USB_IOWARRIOR is not set
942# CONFIG_USB_TEST is not set 916# CONFIG_USB_TEST is not set
943 917
944# 918#
@@ -949,10 +923,6 @@ CONFIG_USB_EZUSB=y
949# USB Gadget Support 923# USB Gadget Support
950# 924#
951# CONFIG_USB_GADGET is not set 925# CONFIG_USB_GADGET is not set
952
953#
954# MMC/SD Card support
955#
956# CONFIG_MMC is not set 926# CONFIG_MMC is not set
957 927
958# 928#
@@ -996,10 +966,6 @@ CONFIG_USB_EZUSB=y
996# 966#
997 967
998# 968#
999# Virtualization
1000#
1001
1002#
1003# File systems 969# File systems
1004# 970#
1005CONFIG_EXT2_FS=y 971CONFIG_EXT2_FS=y
@@ -1090,6 +1056,7 @@ CONFIG_NFS_ACL_SUPPORT=y
1090CONFIG_NFS_COMMON=y 1056CONFIG_NFS_COMMON=y
1091CONFIG_SUNRPC=y 1057CONFIG_SUNRPC=y
1092CONFIG_SUNRPC_GSS=y 1058CONFIG_SUNRPC_GSS=y
1059# CONFIG_SUNRPC_BIND34 is not set
1093CONFIG_RPCSEC_GSS_KRB5=y 1060CONFIG_RPCSEC_GSS_KRB5=y
1094# CONFIG_RPCSEC_GSS_SPKM3 is not set 1061# CONFIG_RPCSEC_GSS_SPKM3 is not set
1095# CONFIG_SMB_FS is not set 1062# CONFIG_SMB_FS is not set
@@ -1119,6 +1086,7 @@ CONFIG_MSDOS_PARTITION=y
1119# CONFIG_SUN_PARTITION is not set 1086# CONFIG_SUN_PARTITION is not set
1120# CONFIG_KARMA_PARTITION is not set 1087# CONFIG_KARMA_PARTITION is not set
1121# CONFIG_EFI_PARTITION is not set 1088# CONFIG_EFI_PARTITION is not set
1089# CONFIG_SYSV68_PARTITION is not set
1122 1090
1123# 1091#
1124# Native Language Support 1092# Native Language Support
@@ -1168,6 +1136,7 @@ CONFIG_NLS_UTF8=y
1168# Distributed Lock Manager 1136# Distributed Lock Manager
1169# 1137#
1170# CONFIG_DLM is not set 1138# CONFIG_DLM is not set
1139# CONFIG_UCC_SLOW is not set
1171 1140
1172# 1141#
1173# Library routines 1142# Library routines
@@ -1175,11 +1144,14 @@ CONFIG_NLS_UTF8=y
1175CONFIG_BITREVERSE=y 1144CONFIG_BITREVERSE=y
1176CONFIG_CRC_CCITT=y 1145CONFIG_CRC_CCITT=y
1177# CONFIG_CRC16 is not set 1146# CONFIG_CRC16 is not set
1147# CONFIG_CRC_ITU_T is not set
1178CONFIG_CRC32=y 1148CONFIG_CRC32=y
1179# CONFIG_LIBCRC32C is not set 1149# CONFIG_LIBCRC32C is not set
1180CONFIG_ZLIB_INFLATE=y 1150CONFIG_ZLIB_INFLATE=y
1181CONFIG_PLIST=y 1151CONFIG_PLIST=y
1182CONFIG_IOMAP_COPY=y 1152CONFIG_HAS_IOMEM=y
1153CONFIG_HAS_IOPORT=y
1154CONFIG_HAS_DMA=y
1183 1155
1184# 1156#
1185# Instrumentation Support 1157# Instrumentation Support
@@ -1197,16 +1169,16 @@ CONFIG_MAGIC_SYSRQ=y
1197CONFIG_DEBUG_FS=y 1169CONFIG_DEBUG_FS=y
1198# CONFIG_HEADERS_CHECK is not set 1170# CONFIG_HEADERS_CHECK is not set
1199CONFIG_DEBUG_KERNEL=y 1171CONFIG_DEBUG_KERNEL=y
1200CONFIG_LOG_BUF_SHIFT=17 1172# CONFIG_DEBUG_SHIRQ is not set
1201CONFIG_DETECT_SOFTLOCKUP=y 1173CONFIG_DETECT_SOFTLOCKUP=y
1202# CONFIG_SCHEDSTATS is not set 1174# CONFIG_SCHEDSTATS is not set
1175# CONFIG_TIMER_STATS is not set
1203CONFIG_DEBUG_SLAB=y 1176CONFIG_DEBUG_SLAB=y
1204# CONFIG_DEBUG_SLAB_LEAK is not set 1177# CONFIG_DEBUG_SLAB_LEAK is not set
1205# CONFIG_DEBUG_RT_MUTEXES is not set 1178# CONFIG_DEBUG_RT_MUTEXES is not set
1206# CONFIG_RT_MUTEX_TESTER is not set 1179# CONFIG_RT_MUTEX_TESTER is not set
1207# CONFIG_DEBUG_SPINLOCK is not set 1180# CONFIG_DEBUG_SPINLOCK is not set
1208# CONFIG_DEBUG_MUTEXES is not set 1181# CONFIG_DEBUG_MUTEXES is not set
1209# CONFIG_DEBUG_RWSEMS is not set
1210CONFIG_DEBUG_SPINLOCK_SLEEP=y 1182CONFIG_DEBUG_SPINLOCK_SLEEP=y
1211# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1183# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1212# CONFIG_DEBUG_KOBJECT is not set 1184# CONFIG_DEBUG_KOBJECT is not set
@@ -1216,8 +1188,10 @@ CONFIG_DEBUG_BUGVERBOSE=y
1216# CONFIG_DEBUG_LIST is not set 1188# CONFIG_DEBUG_LIST is not set
1217# CONFIG_FORCED_INLINING is not set 1189# CONFIG_FORCED_INLINING is not set
1218# CONFIG_RCU_TORTURE_TEST is not set 1190# CONFIG_RCU_TORTURE_TEST is not set
1191# CONFIG_FAULT_INJECTION is not set
1219CONFIG_DEBUG_STACKOVERFLOW=y 1192CONFIG_DEBUG_STACKOVERFLOW=y
1220CONFIG_DEBUG_STACK_USAGE=y 1193CONFIG_DEBUG_STACK_USAGE=y
1194# CONFIG_DEBUG_PAGEALLOC is not set
1221CONFIG_DEBUGGER=y 1195CONFIG_DEBUGGER=y
1222CONFIG_XMON=y 1196CONFIG_XMON=y
1223CONFIG_XMON_DEFAULT=y 1197CONFIG_XMON_DEFAULT=y
@@ -1252,8 +1226,11 @@ CONFIG_CRYPTO_MD5=y
1252# CONFIG_CRYPTO_GF128MUL is not set 1226# CONFIG_CRYPTO_GF128MUL is not set
1253CONFIG_CRYPTO_ECB=m 1227CONFIG_CRYPTO_ECB=m
1254CONFIG_CRYPTO_CBC=y 1228CONFIG_CRYPTO_CBC=y
1229CONFIG_CRYPTO_PCBC=m
1255# CONFIG_CRYPTO_LRW is not set 1230# CONFIG_CRYPTO_LRW is not set
1231# CONFIG_CRYPTO_CRYPTD is not set
1256CONFIG_CRYPTO_DES=y 1232CONFIG_CRYPTO_DES=y
1233# CONFIG_CRYPTO_FCRYPT is not set
1257# CONFIG_CRYPTO_BLOWFISH is not set 1234# CONFIG_CRYPTO_BLOWFISH is not set
1258# CONFIG_CRYPTO_TWOFISH is not set 1235# CONFIG_CRYPTO_TWOFISH is not set
1259# CONFIG_CRYPTO_SERPENT is not set 1236# CONFIG_CRYPTO_SERPENT is not set
@@ -1267,6 +1244,7 @@ CONFIG_CRYPTO_DES=y
1267# CONFIG_CRYPTO_DEFLATE is not set 1244# CONFIG_CRYPTO_DEFLATE is not set
1268# CONFIG_CRYPTO_MICHAEL_MIC is not set 1245# CONFIG_CRYPTO_MICHAEL_MIC is not set
1269# CONFIG_CRYPTO_CRC32C is not set 1246# CONFIG_CRYPTO_CRC32C is not set
1247# CONFIG_CRYPTO_CAMELLIA is not set
1270# CONFIG_CRYPTO_TEST is not set 1248# CONFIG_CRYPTO_TEST is not set
1271 1249
1272# 1250#
diff --git a/arch/powerpc/configs/mpc7448_hpc2_defconfig b/arch/powerpc/configs/mpc7448_hpc2_defconfig
index fdf09eabe6e7..174a290ee7a9 100644
--- a/arch/powerpc/configs/mpc7448_hpc2_defconfig
+++ b/arch/powerpc/configs/mpc7448_hpc2_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.20-rc5 3# Linux kernel version: 2.6.22-rc7
4# Mon Jan 22 22:20:53 2007 4# Sun Jul 1 23:56:54 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -34,9 +34,9 @@ CONFIG_CLASSIC32=y
34# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set 35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set 36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
37# CONFIG_40x is not set 38# CONFIG_40x is not set
38# CONFIG_44x is not set 39# CONFIG_44x is not set
39# CONFIG_8xx is not set
40# CONFIG_E200 is not set 40# CONFIG_E200 is not set
41CONFIG_6xx=y 41CONFIG_6xx=y
42CONFIG_PPC_FPU=y 42CONFIG_PPC_FPU=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_ALTIVEC is not set 45# CONFIG_ALTIVEC is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -84,14 +88,19 @@ CONFIG_BUG=y
84CONFIG_ELF_CORE=y 88CONFIG_ELF_CORE=y
85CONFIG_BASE_FULL=y 89CONFIG_BASE_FULL=y
86CONFIG_FUTEX=y 90CONFIG_FUTEX=y
91CONFIG_ANON_INODES=y
87CONFIG_EPOLL=y 92CONFIG_EPOLL=y
93CONFIG_SIGNALFD=y
94CONFIG_TIMERFD=y
95CONFIG_EVENTFD=y
88CONFIG_SHMEM=y 96CONFIG_SHMEM=y
89CONFIG_SLAB=y
90CONFIG_VM_EVENT_COUNTERS=y 97CONFIG_VM_EVENT_COUNTERS=y
98CONFIG_SLAB=y
99# CONFIG_SLUB is not set
100# CONFIG_SLOB is not set
91CONFIG_RT_MUTEXES=y 101CONFIG_RT_MUTEXES=y
92# CONFIG_TINY_SHMEM is not set 102# CONFIG_TINY_SHMEM is not set
93CONFIG_BASE_SMALL=0 103CONFIG_BASE_SMALL=0
94# CONFIG_SLOB is not set
95 104
96# 105#
97# Loadable module support 106# Loadable module support
@@ -126,8 +135,18 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
126CONFIG_EMBEDDED6xx=y 135CONFIG_EMBEDDED6xx=y
127# CONFIG_APUS is not set 136# CONFIG_APUS is not set
128# CONFIG_PPC_MPC52xx is not set 137# CONFIG_PPC_MPC52xx is not set
138# CONFIG_PPC_MPC5200 is not set
129# CONFIG_PPC_CELL is not set 139# CONFIG_PPC_CELL is not set
130# CONFIG_PPC_CELL_NATIVE is not set 140# CONFIG_PPC_CELL_NATIVE is not set
141# CONFIG_PQ2ADS is not set
142# CONFIG_LINKSTATION is not set
143CONFIG_MPC7448HPC2=y
144# CONFIG_PPC_HOLLY is not set
145# CONFIG_PPC_PRPMC2800 is not set
146CONFIG_TSI108_BRIDGE=y
147CONFIG_MPIC=y
148CONFIG_MPIC_WEIRD=y
149# CONFIG_PPC_I8259 is not set
131# CONFIG_PPC_RTAS is not set 150# CONFIG_PPC_RTAS is not set
132# CONFIG_MMIO_NVRAM is not set 151# CONFIG_MMIO_NVRAM is not set
133# CONFIG_PPC_MPC106 is not set 152# CONFIG_PPC_MPC106 is not set
@@ -136,36 +155,7 @@ CONFIG_EMBEDDED6xx=y
136# CONFIG_GENERIC_IOMAP is not set 155# CONFIG_GENERIC_IOMAP is not set
137# CONFIG_CPU_FREQ is not set 156# CONFIG_CPU_FREQ is not set
138# CONFIG_TAU is not set 157# CONFIG_TAU is not set
139# CONFIG_KATANA is not set 158# CONFIG_CPM2 is not set
140# CONFIG_WILLOW is not set
141# CONFIG_CPCI690 is not set
142# CONFIG_POWERPMC250 is not set
143# CONFIG_CHESTNUT is not set
144# CONFIG_SPRUCE is not set
145# CONFIG_HDPU is not set
146# CONFIG_EV64260 is not set
147# CONFIG_LOPEC is not set
148# CONFIG_MVME5100 is not set
149# CONFIG_PPLUS is not set
150# CONFIG_PRPMC750 is not set
151# CONFIG_PRPMC800 is not set
152# CONFIG_SANDPOINT is not set
153# CONFIG_LINKSTATION is not set
154CONFIG_MPC7448HPC2=y
155# CONFIG_RADSTONE_PPC7D is not set
156# CONFIG_PAL4 is not set
157# CONFIG_GEMINI is not set
158# CONFIG_EST8260 is not set
159# CONFIG_SBC82xx is not set
160# CONFIG_SBS8260 is not set
161# CONFIG_RPX8260 is not set
162# CONFIG_TQM8260 is not set
163# CONFIG_ADS8272 is not set
164# CONFIG_PQ2FADS is not set
165# CONFIG_EV64360 is not set
166CONFIG_TSI108_BRIDGE=y
167# CONFIG_WANT_EARLY_SERIAL is not set
168CONFIG_MPIC=y
169 159
170# 160#
171# Kernel options 161# Kernel options
@@ -193,31 +183,30 @@ CONFIG_FLAT_NODE_MEM_MAP=y
193# CONFIG_SPARSEMEM_STATIC is not set 183# CONFIG_SPARSEMEM_STATIC is not set
194CONFIG_SPLIT_PTLOCK_CPUS=4 184CONFIG_SPLIT_PTLOCK_CPUS=4
195# CONFIG_RESOURCES_64BIT is not set 185# CONFIG_RESOURCES_64BIT is not set
186CONFIG_ZONE_DMA_FLAG=1
196CONFIG_PROC_DEVICETREE=y 187CONFIG_PROC_DEVICETREE=y
197# CONFIG_CMDLINE_BOOL is not set 188# CONFIG_CMDLINE_BOOL is not set
198# CONFIG_PM is not set 189# CONFIG_PM is not set
199# CONFIG_SECCOMP is not set 190# CONFIG_SECCOMP is not set
191# CONFIG_WANT_DEVICE_TREE is not set
200CONFIG_ISA_DMA_API=y 192CONFIG_ISA_DMA_API=y
201 193
202# 194#
203# Bus options 195# Bus options
204# 196#
197CONFIG_ZONE_DMA=y
205CONFIG_GENERIC_ISA_DMA=y 198CONFIG_GENERIC_ISA_DMA=y
206CONFIG_MPIC_WEIRD=y
207# CONFIG_PPC_I8259 is not set
208# CONFIG_PPC_INDIRECT_PCI is not set 199# CONFIG_PPC_INDIRECT_PCI is not set
209CONFIG_PCI=y 200CONFIG_PCI=y
210CONFIG_PCI_DOMAINS=y 201CONFIG_PCI_DOMAINS=y
211# CONFIG_PCIEPORTBUS is not set 202# CONFIG_PCIEPORTBUS is not set
203CONFIG_ARCH_SUPPORTS_MSI=y
204# CONFIG_PCI_MSI is not set
212 205
213# 206#
214# PCCARD (PCMCIA/CardBus) support 207# PCCARD (PCMCIA/CardBus) support
215# 208#
216# CONFIG_PCCARD is not set 209# CONFIG_PCCARD is not set
217
218#
219# PCI Hotplug Support
220#
221# CONFIG_HOTPLUG_PCI is not set 210# CONFIG_HOTPLUG_PCI is not set
222 211
223# 212#
@@ -242,13 +231,13 @@ CONFIG_NET=y
242# 231#
243# Networking options 232# Networking options
244# 233#
245# CONFIG_NETDEBUG is not set
246CONFIG_PACKET=y 234CONFIG_PACKET=y
247# CONFIG_PACKET_MMAP is not set 235# CONFIG_PACKET_MMAP is not set
248CONFIG_UNIX=y 236CONFIG_UNIX=y
249CONFIG_XFRM=y 237CONFIG_XFRM=y
250CONFIG_XFRM_USER=y 238CONFIG_XFRM_USER=y
251# CONFIG_XFRM_SUB_POLICY is not set 239# CONFIG_XFRM_SUB_POLICY is not set
240# CONFIG_XFRM_MIGRATE is not set
252# CONFIG_NET_KEY is not set 241# CONFIG_NET_KEY is not set
253CONFIG_INET=y 242CONFIG_INET=y
254CONFIG_IP_MULTICAST=y 243CONFIG_IP_MULTICAST=y
@@ -282,20 +271,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
282# CONFIG_INET6_TUNNEL is not set 271# CONFIG_INET6_TUNNEL is not set
283# CONFIG_NETWORK_SECMARK is not set 272# CONFIG_NETWORK_SECMARK is not set
284# CONFIG_NETFILTER is not set 273# CONFIG_NETFILTER is not set
285
286#
287# DCCP Configuration (EXPERIMENTAL)
288#
289# CONFIG_IP_DCCP is not set 274# CONFIG_IP_DCCP is not set
290
291#
292# SCTP Configuration (EXPERIMENTAL)
293#
294# CONFIG_IP_SCTP is not set 275# CONFIG_IP_SCTP is not set
295
296#
297# TIPC Configuration (EXPERIMENTAL)
298#
299# CONFIG_TIPC is not set 276# CONFIG_TIPC is not set
300# CONFIG_ATM is not set 277# CONFIG_ATM is not set
301# CONFIG_BRIDGE is not set 278# CONFIG_BRIDGE is not set
@@ -321,7 +298,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
321# CONFIG_HAMRADIO is not set 298# CONFIG_HAMRADIO is not set
322# CONFIG_IRDA is not set 299# CONFIG_IRDA is not set
323# CONFIG_BT is not set 300# CONFIG_BT is not set
301# CONFIG_AF_RXRPC is not set
302
303#
304# Wireless
305#
306# CONFIG_CFG80211 is not set
307# CONFIG_WIRELESS_EXT is not set
308# CONFIG_MAC80211 is not set
324# CONFIG_IEEE80211 is not set 309# CONFIG_IEEE80211 is not set
310# CONFIG_RFKILL is not set
325 311
326# 312#
327# Device Drivers 313# Device Drivers
@@ -339,10 +325,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
339# Connector - unified userspace <-> kernelspace linker 325# Connector - unified userspace <-> kernelspace linker
340# 326#
341# CONFIG_CONNECTOR is not set 327# CONFIG_CONNECTOR is not set
342
343#
344# Memory Technology Devices (MTD)
345#
346# CONFIG_MTD is not set 328# CONFIG_MTD is not set
347 329
348# 330#
@@ -353,6 +335,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
353# 335#
354# Plug and Play support 336# Plug and Play support
355# 337#
338# CONFIG_PNPACPI is not set
356 339
357# 340#
358# Block devices 341# Block devices
@@ -371,19 +354,16 @@ CONFIG_BLK_DEV_RAM=y
371CONFIG_BLK_DEV_RAM_COUNT=16 354CONFIG_BLK_DEV_RAM_COUNT=16
372CONFIG_BLK_DEV_RAM_SIZE=131072 355CONFIG_BLK_DEV_RAM_SIZE=131072
373CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 356CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
374CONFIG_BLK_DEV_INITRD=y
375# CONFIG_CDROM_PKTCDVD is not set 357# CONFIG_CDROM_PKTCDVD is not set
376# CONFIG_ATA_OVER_ETH is not set 358# CONFIG_ATA_OVER_ETH is not set
377 359
378# 360#
379# Misc devices 361# Misc devices
380# 362#
363# CONFIG_PHANTOM is not set
381# CONFIG_SGI_IOC4 is not set 364# CONFIG_SGI_IOC4 is not set
382# CONFIG_TIFM_CORE is not set 365# CONFIG_TIFM_CORE is not set
383 366# CONFIG_BLINK is not set
384#
385# ATA/ATAPI/MFM/RLL support
386#
387# CONFIG_IDE is not set 367# CONFIG_IDE is not set
388 368
389# 369#
@@ -460,11 +440,8 @@ CONFIG_BLK_DEV_SD=y
460# CONFIG_SCSI_NSP32 is not set 440# CONFIG_SCSI_NSP32 is not set
461# CONFIG_SCSI_DEBUG is not set 441# CONFIG_SCSI_DEBUG is not set
462# CONFIG_SCSI_SRP is not set 442# CONFIG_SCSI_SRP is not set
463
464#
465# Serial ATA (prod) and Parallel ATA (experimental) drivers
466#
467CONFIG_ATA=y 443CONFIG_ATA=y
444# CONFIG_ATA_NONSTANDARD is not set
468# CONFIG_SATA_AHCI is not set 445# CONFIG_SATA_AHCI is not set
469# CONFIG_SATA_SVW is not set 446# CONFIG_SATA_SVW is not set
470# CONFIG_ATA_PIIX is not set 447# CONFIG_ATA_PIIX is not set
@@ -480,10 +457,12 @@ CONFIG_SATA_MV=y
480# CONFIG_SATA_ULI is not set 457# CONFIG_SATA_ULI is not set
481# CONFIG_SATA_VIA is not set 458# CONFIG_SATA_VIA is not set
482# CONFIG_SATA_VITESSE is not set 459# CONFIG_SATA_VITESSE is not set
460# CONFIG_SATA_INIC162X is not set
483# CONFIG_PATA_ALI is not set 461# CONFIG_PATA_ALI is not set
484# CONFIG_PATA_AMD is not set 462# CONFIG_PATA_AMD is not set
485# CONFIG_PATA_ARTOP is not set 463# CONFIG_PATA_ARTOP is not set
486# CONFIG_PATA_ATIIXP is not set 464# CONFIG_PATA_ATIIXP is not set
465# CONFIG_PATA_CMD640_PCI is not set
487# CONFIG_PATA_CMD64X is not set 466# CONFIG_PATA_CMD64X is not set
488# CONFIG_PATA_CS5520 is not set 467# CONFIG_PATA_CS5520 is not set
489# CONFIG_PATA_CS5530 is not set 468# CONFIG_PATA_CS5530 is not set
@@ -495,6 +474,7 @@ CONFIG_SATA_MV=y
495# CONFIG_PATA_HPT3X2N is not set 474# CONFIG_PATA_HPT3X2N is not set
496# CONFIG_PATA_HPT3X3 is not set 475# CONFIG_PATA_HPT3X3 is not set
497# CONFIG_PATA_IT821X is not set 476# CONFIG_PATA_IT821X is not set
477# CONFIG_PATA_IT8213 is not set
498# CONFIG_PATA_JMICRON is not set 478# CONFIG_PATA_JMICRON is not set
499# CONFIG_PATA_TRIFLEX is not set 479# CONFIG_PATA_TRIFLEX is not set
500# CONFIG_PATA_MARVELL is not set 480# CONFIG_PATA_MARVELL is not set
@@ -532,18 +512,14 @@ CONFIG_SATA_MV=y
532# 512#
533# IEEE 1394 (FireWire) support 513# IEEE 1394 (FireWire) support
534# 514#
515# CONFIG_FIREWIRE is not set
535# CONFIG_IEEE1394 is not set 516# CONFIG_IEEE1394 is not set
536 517
537# 518#
538# I2O device support 519# I2O device support
539# 520#
540# CONFIG_I2O is not set 521# CONFIG_I2O is not set
541 522# CONFIG_MACINTOSH_DRIVERS is not set
542#
543# Macintosh device drivers
544#
545# CONFIG_MAC_EMUMOUSEBTN is not set
546# CONFIG_WINDFARM is not set
547 523
548# 524#
549# Network device support 525# Network device support
@@ -553,15 +529,7 @@ CONFIG_NETDEVICES=y
553# CONFIG_BONDING is not set 529# CONFIG_BONDING is not set
554# CONFIG_EQUALIZER is not set 530# CONFIG_EQUALIZER is not set
555# CONFIG_TUN is not set 531# CONFIG_TUN is not set
556
557#
558# ARCnet devices
559#
560# CONFIG_ARCNET is not set 532# CONFIG_ARCNET is not set
561
562#
563# PHY device support
564#
565CONFIG_PHYLIB=y 533CONFIG_PHYLIB=y
566 534
567# 535#
@@ -615,10 +583,8 @@ CONFIG_8139TOO=y
615# CONFIG_SUNDANCE is not set 583# CONFIG_SUNDANCE is not set
616# CONFIG_TLAN is not set 584# CONFIG_TLAN is not set
617# CONFIG_VIA_RHINE is not set 585# CONFIG_VIA_RHINE is not set
618 586# CONFIG_SC92031 is not set
619# 587CONFIG_NETDEV_1000=y
620# Ethernet (1000 Mbit)
621#
622# CONFIG_ACENIC is not set 588# CONFIG_ACENIC is not set
623# CONFIG_DL2K is not set 589# CONFIG_DL2K is not set
624# CONFIG_E1000 is not set 590# CONFIG_E1000 is not set
@@ -635,29 +601,22 @@ CONFIG_8139TOO=y
635# CONFIG_BNX2 is not set 601# CONFIG_BNX2 is not set
636CONFIG_TSI108_ETH=y 602CONFIG_TSI108_ETH=y
637# CONFIG_QLA3XXX is not set 603# CONFIG_QLA3XXX is not set
638 604# CONFIG_ATL1 is not set
639# 605CONFIG_NETDEV_10000=y
640# Ethernet (10000 Mbit)
641#
642# CONFIG_CHELSIO_T1 is not set 606# CONFIG_CHELSIO_T1 is not set
607# CONFIG_CHELSIO_T3 is not set
643# CONFIG_IXGB is not set 608# CONFIG_IXGB is not set
644# CONFIG_S2IO is not set 609# CONFIG_S2IO is not set
645# CONFIG_MYRI10GE is not set 610# CONFIG_MYRI10GE is not set
646# CONFIG_NETXEN_NIC is not set 611# CONFIG_NETXEN_NIC is not set
647 612# CONFIG_MLX4_CORE is not set
648#
649# Token Ring devices
650#
651# CONFIG_TR is not set 613# CONFIG_TR is not set
652 614
653# 615#
654# Wireless LAN (non-hamradio) 616# Wireless LAN
655#
656# CONFIG_NET_RADIO is not set
657
658#
659# Wan interfaces
660# 617#
618# CONFIG_WLAN_PRE80211 is not set
619# CONFIG_WLAN_80211 is not set
661# CONFIG_WAN is not set 620# CONFIG_WAN is not set
662# CONFIG_FDDI is not set 621# CONFIG_FDDI is not set
663# CONFIG_HIPPI is not set 622# CONFIG_HIPPI is not set
@@ -684,6 +643,7 @@ CONFIG_TSI108_ETH=y
684# 643#
685CONFIG_INPUT=y 644CONFIG_INPUT=y
686# CONFIG_INPUT_FF_MEMLESS is not set 645# CONFIG_INPUT_FF_MEMLESS is not set
646# CONFIG_INPUT_POLLDEV is not set
687 647
688# 648#
689# Userland interfaces 649# Userland interfaces
@@ -700,6 +660,7 @@ CONFIG_INPUT=y
700# CONFIG_INPUT_KEYBOARD is not set 660# CONFIG_INPUT_KEYBOARD is not set
701# CONFIG_INPUT_MOUSE is not set 661# CONFIG_INPUT_MOUSE is not set
702# CONFIG_INPUT_JOYSTICK is not set 662# CONFIG_INPUT_JOYSTICK is not set
663# CONFIG_INPUT_TABLET is not set
703# CONFIG_INPUT_TOUCHSCREEN is not set 664# CONFIG_INPUT_TOUCHSCREEN is not set
704# CONFIG_INPUT_MISC is not set 665# CONFIG_INPUT_MISC is not set
705 666
@@ -732,6 +693,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
732CONFIG_SERIAL_CORE=y 693CONFIG_SERIAL_CORE=y
733CONFIG_SERIAL_CORE_CONSOLE=y 694CONFIG_SERIAL_CORE_CONSOLE=y
734# CONFIG_SERIAL_JSM is not set 695# CONFIG_SERIAL_JSM is not set
696# CONFIG_SERIAL_OF_PLATFORM is not set
735CONFIG_UNIX98_PTYS=y 697CONFIG_UNIX98_PTYS=y
736CONFIG_LEGACY_PTYS=y 698CONFIG_LEGACY_PTYS=y
737CONFIG_LEGACY_PTY_COUNT=256 699CONFIG_LEGACY_PTY_COUNT=256
@@ -740,16 +702,11 @@ CONFIG_LEGACY_PTY_COUNT=256
740# IPMI 702# IPMI
741# 703#
742# CONFIG_IPMI_HANDLER is not set 704# CONFIG_IPMI_HANDLER is not set
743
744#
745# Watchdog Cards
746#
747# CONFIG_WATCHDOG is not set 705# CONFIG_WATCHDOG is not set
748# CONFIG_HW_RANDOM is not set 706# CONFIG_HW_RANDOM is not set
749# CONFIG_NVRAM is not set 707# CONFIG_NVRAM is not set
750CONFIG_GEN_RTC=y 708CONFIG_GEN_RTC=y
751# CONFIG_GEN_RTC_X is not set 709# CONFIG_GEN_RTC_X is not set
752# CONFIG_DTLK is not set
753# CONFIG_R3964 is not set 710# CONFIG_R3964 is not set
754# CONFIG_APPLICOM is not set 711# CONFIG_APPLICOM is not set
755# CONFIG_AGP is not set 712# CONFIG_AGP is not set
@@ -760,10 +717,7 @@ CONFIG_GEN_RTC=y
760# TPM devices 717# TPM devices
761# 718#
762# CONFIG_TCG_TPM is not set 719# CONFIG_TCG_TPM is not set
763 720CONFIG_DEVPORT=y
764#
765# I2C support
766#
767# CONFIG_I2C is not set 721# CONFIG_I2C is not set
768 722
769# 723#
@@ -776,35 +730,41 @@ CONFIG_GEN_RTC=y
776# Dallas's 1-wire bus 730# Dallas's 1-wire bus
777# 731#
778# CONFIG_W1 is not set 732# CONFIG_W1 is not set
779
780#
781# Hardware Monitoring support
782#
783CONFIG_HWMON=y 733CONFIG_HWMON=y
784# CONFIG_HWMON_VID is not set 734# CONFIG_HWMON_VID is not set
785# CONFIG_SENSORS_ABITUGURU is not set 735# CONFIG_SENSORS_ABITUGURU is not set
786# CONFIG_SENSORS_F71805F is not set 736# CONFIG_SENSORS_F71805F is not set
787# CONFIG_SENSORS_PC87427 is not set 737# CONFIG_SENSORS_PC87427 is not set
738# CONFIG_SENSORS_SMSC47M1 is not set
739# CONFIG_SENSORS_SMSC47B397 is not set
788# CONFIG_SENSORS_VT1211 is not set 740# CONFIG_SENSORS_VT1211 is not set
741# CONFIG_SENSORS_W83627HF is not set
789# CONFIG_HWMON_DEBUG_CHIP is not set 742# CONFIG_HWMON_DEBUG_CHIP is not set
790 743
791# 744#
745# Multifunction device drivers
746#
747# CONFIG_MFD_SM501 is not set
748
749#
792# Multimedia devices 750# Multimedia devices
793# 751#
794# CONFIG_VIDEO_DEV is not set 752# CONFIG_VIDEO_DEV is not set
753# CONFIG_DVB_CORE is not set
754CONFIG_DAB=y
795 755
796# 756#
797# Digital Video Broadcasting Devices 757# Graphics support
798# 758#
799# CONFIG_DVB is not set 759# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
800 760
801# 761#
802# Graphics support 762# Display device support
803# 763#
804CONFIG_FIRMWARE_EDID=y 764# CONFIG_DISPLAY_SUPPORT is not set
765# CONFIG_VGASTATE is not set
805# CONFIG_FB is not set 766# CONFIG_FB is not set
806# CONFIG_FB_IBM_GXT4500 is not set 767# CONFIG_FB_IBM_GXT4500 is not set
807# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
808 768
809# 769#
810# Sound 770# Sound
@@ -815,6 +775,7 @@ CONFIG_FIRMWARE_EDID=y
815# HID Devices 775# HID Devices
816# 776#
817CONFIG_HID=y 777CONFIG_HID=y
778# CONFIG_HID_DEBUG is not set
818 779
819# 780#
820# USB support 781# USB support
@@ -832,10 +793,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
832# USB Gadget Support 793# USB Gadget Support
833# 794#
834# CONFIG_USB_GADGET is not set 795# CONFIG_USB_GADGET is not set
835
836#
837# MMC/SD Card support
838#
839# CONFIG_MMC is not set 796# CONFIG_MMC is not set
840 797
841# 798#
@@ -879,10 +836,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
879# 836#
880 837
881# 838#
882# Virtualization
883#
884
885#
886# File systems 839# File systems
887# 840#
888CONFIG_EXT2_FS=y 841CONFIG_EXT2_FS=y
@@ -967,6 +920,7 @@ CONFIG_ROOT_NFS=y
967CONFIG_LOCKD=y 920CONFIG_LOCKD=y
968CONFIG_NFS_COMMON=y 921CONFIG_NFS_COMMON=y
969CONFIG_SUNRPC=y 922CONFIG_SUNRPC=y
923# CONFIG_SUNRPC_BIND34 is not set
970# CONFIG_RPCSEC_GSS_KRB5 is not set 924# CONFIG_RPCSEC_GSS_KRB5 is not set
971# CONFIG_RPCSEC_GSS_SPKM3 is not set 925# CONFIG_RPCSEC_GSS_SPKM3 is not set
972# CONFIG_SMB_FS is not set 926# CONFIG_SMB_FS is not set
@@ -996,6 +950,7 @@ CONFIG_MSDOS_PARTITION=y
996# CONFIG_SUN_PARTITION is not set 950# CONFIG_SUN_PARTITION is not set
997# CONFIG_KARMA_PARTITION is not set 951# CONFIG_KARMA_PARTITION is not set
998# CONFIG_EFI_PARTITION is not set 952# CONFIG_EFI_PARTITION is not set
953# CONFIG_SYSV68_PARTITION is not set
999 954
1000# 955#
1001# Native Language Support 956# Native Language Support
@@ -1006,6 +961,7 @@ CONFIG_MSDOS_PARTITION=y
1006# Distributed Lock Manager 961# Distributed Lock Manager
1007# 962#
1008# CONFIG_DLM is not set 963# CONFIG_DLM is not set
964# CONFIG_UCC_SLOW is not set
1009 965
1010# 966#
1011# Library routines 967# Library routines
@@ -1013,10 +969,13 @@ CONFIG_MSDOS_PARTITION=y
1013CONFIG_BITREVERSE=y 969CONFIG_BITREVERSE=y
1014# CONFIG_CRC_CCITT is not set 970# CONFIG_CRC_CCITT is not set
1015# CONFIG_CRC16 is not set 971# CONFIG_CRC16 is not set
972# CONFIG_CRC_ITU_T is not set
1016CONFIG_CRC32=y 973CONFIG_CRC32=y
1017# CONFIG_LIBCRC32C is not set 974# CONFIG_LIBCRC32C is not set
1018CONFIG_PLIST=y 975CONFIG_PLIST=y
1019CONFIG_IOMAP_COPY=y 976CONFIG_HAS_IOMEM=y
977CONFIG_HAS_IOPORT=y
978CONFIG_HAS_DMA=y
1020 979
1021# 980#
1022# Instrumentation Support 981# Instrumentation Support
@@ -1033,7 +992,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1033# CONFIG_DEBUG_FS is not set 992# CONFIG_DEBUG_FS is not set
1034# CONFIG_HEADERS_CHECK is not set 993# CONFIG_HEADERS_CHECK is not set
1035# CONFIG_DEBUG_KERNEL is not set 994# CONFIG_DEBUG_KERNEL is not set
1036CONFIG_LOG_BUF_SHIFT=14
1037# CONFIG_DEBUG_BUGVERBOSE is not set 995# CONFIG_DEBUG_BUGVERBOSE is not set
1038# CONFIG_BOOTX_TEXT is not set 996# CONFIG_BOOTX_TEXT is not set
1039# CONFIG_PPC_EARLY_DEBUG is not set 997# CONFIG_PPC_EARLY_DEBUG is not set
diff --git a/arch/powerpc/configs/mpc8272_ads_defconfig b/arch/powerpc/configs/mpc8272_ads_defconfig
index 2af45025082f..4a429294e4da 100644
--- a/arch/powerpc/configs/mpc8272_ads_defconfig
+++ b/arch/powerpc/configs/mpc8272_ads_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.17-rc5 3# Linux kernel version: 2.6.22-rc7
4# Fri Jul 14 20:36:35 2006 4# Sun Jul 1 23:56:55 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y 11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y 12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
13CONFIG_GENERIC_HWEIGHT=y 14CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_CALIBRATE_DELAY=y 15CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y 16CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -21,25 +22,31 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
21CONFIG_PPC_OF=y 22CONFIG_PPC_OF=y
22# CONFIG_PPC_UDBG_16550 is not set 23# CONFIG_PPC_UDBG_16550 is not set
23# CONFIG_GENERIC_TBSYNC is not set 24# CONFIG_GENERIC_TBSYNC is not set
24# CONFIG_DEFAULT_UIMAGE is not set 25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y
25 28
26# 29#
27# Processor support 30# Processor support
28# 31#
29# CONFIG_CLASSIC32 is not set 32# CONFIG_CLASSIC32 is not set
30# CONFIG_PPC_52xx is not set
31CONFIG_PPC_82xx=y 33CONFIG_PPC_82xx=y
32# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
33# CONFIG_PPC_85xx is not set 35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
34# CONFIG_40x is not set 38# CONFIG_40x is not set
35# CONFIG_44x is not set 39# CONFIG_44x is not set
36# CONFIG_8xx is not set
37# CONFIG_E200 is not set 40# CONFIG_E200 is not set
38CONFIG_6xx=y 41CONFIG_6xx=y
39CONFIG_PPC_FPU=y 42CONFIG_PPC_FPU=y
43# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set
40CONFIG_PPC_STD_MMU=y 45CONFIG_PPC_STD_MMU=y
41CONFIG_PPC_STD_MMU_32=y 46CONFIG_PPC_STD_MMU_32=y
47# CONFIG_PPC_MM_SLICES is not set
42# CONFIG_SMP is not set 48# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
43 50
44# 51#
45# Code maturity level options 52# Code maturity level options
@@ -55,14 +62,21 @@ CONFIG_LOCALVERSION="powerpc8272"
55CONFIG_LOCALVERSION_AUTO=y 62CONFIG_LOCALVERSION_AUTO=y
56CONFIG_SWAP=y 63CONFIG_SWAP=y
57CONFIG_SYSVIPC=y 64CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set
66CONFIG_SYSVIPC_SYSCTL=y
58# CONFIG_BSD_PROCESS_ACCT is not set 67# CONFIG_BSD_PROCESS_ACCT is not set
59CONFIG_SYSCTL=y 68# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set
60# CONFIG_AUDIT is not set 70# CONFIG_AUDIT is not set
61CONFIG_IKCONFIG=y 71CONFIG_IKCONFIG=y
62CONFIG_IKCONFIG_PROC=y 72CONFIG_IKCONFIG_PROC=y
73CONFIG_LOG_BUF_SHIFT=14
74CONFIG_SYSFS_DEPRECATED=y
63# CONFIG_RELAY is not set 75# CONFIG_RELAY is not set
64CONFIG_INITRAMFS_SOURCE="" 76# CONFIG_BLK_DEV_INITRD is not set
77CONFIG_SYSCTL=y
65CONFIG_EMBEDDED=y 78CONFIG_EMBEDDED=y
79CONFIG_SYSCTL_SYSCALL=y
66CONFIG_KALLSYMS=y 80CONFIG_KALLSYMS=y
67CONFIG_KALLSYMS_ALL=y 81CONFIG_KALLSYMS_ALL=y
68CONFIG_KALLSYMS_EXTRA_PASS=y 82CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -72,12 +86,19 @@ CONFIG_BUG=y
72CONFIG_ELF_CORE=y 86CONFIG_ELF_CORE=y
73CONFIG_BASE_FULL=y 87CONFIG_BASE_FULL=y
74CONFIG_FUTEX=y 88CONFIG_FUTEX=y
89CONFIG_ANON_INODES=y
75CONFIG_EPOLL=y 90CONFIG_EPOLL=y
91CONFIG_SIGNALFD=y
92CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y
76CONFIG_SHMEM=y 94CONFIG_SHMEM=y
95CONFIG_VM_EVENT_COUNTERS=y
77CONFIG_SLAB=y 96CONFIG_SLAB=y
97# CONFIG_SLUB is not set
98# CONFIG_SLOB is not set
99CONFIG_RT_MUTEXES=y
78# CONFIG_TINY_SHMEM is not set 100# CONFIG_TINY_SHMEM is not set
79CONFIG_BASE_SMALL=0 101CONFIG_BASE_SMALL=0
80# CONFIG_SLOB is not set
81 102
82# 103#
83# Loadable module support 104# Loadable module support
@@ -87,6 +108,7 @@ CONFIG_BASE_SMALL=0
87# 108#
88# Block layer 109# Block layer
89# 110#
111CONFIG_BLOCK=y
90# CONFIG_LBD is not set 112# CONFIG_LBD is not set
91# CONFIG_BLK_DEV_IO_TRACE is not set 113# CONFIG_BLK_DEV_IO_TRACE is not set
92# CONFIG_LSF is not set 114# CONFIG_LSF is not set
@@ -103,17 +125,29 @@ CONFIG_DEFAULT_AS=y
103# CONFIG_DEFAULT_CFQ is not set 125# CONFIG_DEFAULT_CFQ is not set
104# CONFIG_DEFAULT_NOOP is not set 126# CONFIG_DEFAULT_NOOP is not set
105CONFIG_DEFAULT_IOSCHED="anticipatory" 127CONFIG_DEFAULT_IOSCHED="anticipatory"
106CONFIG_PQ2ADS=y
107CONFIG_8260=y
108CONFIG_8272=y
109CONFIG_CPM2=y
110# CONFIG_WANT_EARLY_SERIAL is not set
111CONFIG_EMBEDDEDBOOT=y
112 128
113# 129#
114# Platform support 130# Platform support
115# 131#
116CONFIG_ADS8272=y 132# CONFIG_PPC_MPC52xx is not set
133# CONFIG_PPC_MPC5200 is not set
134# CONFIG_PPC_CELL is not set
135# CONFIG_PPC_CELL_NATIVE is not set
136CONFIG_MPC82xx_ADS=y
137CONFIG_PQ2ADS=y
138CONFIG_8260=y
139CONFIG_8272=y
140# CONFIG_MPIC is not set
141# CONFIG_MPIC_WEIRD is not set
142# CONFIG_PPC_I8259 is not set
143# CONFIG_PPC_RTAS is not set
144# CONFIG_MMIO_NVRAM is not set
145# CONFIG_PPC_MPC106 is not set
146# CONFIG_PPC_970_NAP is not set
147# CONFIG_PPC_INDIRECT_IO is not set
148# CONFIG_GENERIC_IOMAP is not set
149# CONFIG_CPU_FREQ is not set
150CONFIG_CPM2=y
117 151
118# 152#
119# Kernel options 153# Kernel options
@@ -121,6 +155,7 @@ CONFIG_ADS8272=y
121# CONFIG_HIGHMEM is not set 155# CONFIG_HIGHMEM is not set
122# CONFIG_HZ_100 is not set 156# CONFIG_HZ_100 is not set
123CONFIG_HZ_250=y 157CONFIG_HZ_250=y
158# CONFIG_HZ_300 is not set
124# CONFIG_HZ_1000 is not set 159# CONFIG_HZ_1000 is not set
125CONFIG_HZ=250 160CONFIG_HZ=250
126CONFIG_PREEMPT_NONE=y 161CONFIG_PREEMPT_NONE=y
@@ -128,26 +163,30 @@ CONFIG_PREEMPT_NONE=y
128# CONFIG_PREEMPT is not set 163# CONFIG_PREEMPT is not set
129CONFIG_BINFMT_ELF=y 164CONFIG_BINFMT_ELF=y
130CONFIG_BINFMT_MISC=y 165CONFIG_BINFMT_MISC=y
131# CONFIG_PC_KEYBOARD is not set 166CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
132CONFIG_ARCH_FLATMEM_ENABLE=y 167CONFIG_ARCH_FLATMEM_ENABLE=y
168CONFIG_ARCH_POPULATES_NODE_MAP=y
133CONFIG_FLATMEM=y 169CONFIG_FLATMEM=y
134CONFIG_FLAT_NODE_MEM_MAP=y 170CONFIG_FLAT_NODE_MEM_MAP=y
135# CONFIG_SPARSEMEM_STATIC is not set 171# CONFIG_SPARSEMEM_STATIC is not set
136CONFIG_SPLIT_PTLOCK_CPUS=4 172CONFIG_SPLIT_PTLOCK_CPUS=4
173# CONFIG_RESOURCES_64BIT is not set
174CONFIG_ZONE_DMA_FLAG=1
137CONFIG_PROC_DEVICETREE=y 175CONFIG_PROC_DEVICETREE=y
138# CONFIG_CMDLINE_BOOL is not set 176# CONFIG_CMDLINE_BOOL is not set
139# CONFIG_PM is not set 177# CONFIG_PM is not set
140# CONFIG_SOFTWARE_SUSPEND is not set
141CONFIG_SECCOMP=y 178CONFIG_SECCOMP=y
179# CONFIG_WANT_DEVICE_TREE is not set
142CONFIG_ISA_DMA_API=y 180CONFIG_ISA_DMA_API=y
143 181
144# 182#
145# Bus options 183# Bus options
146# 184#
147# CONFIG_PPC_I8259 is not set 185CONFIG_ZONE_DMA=y
148CONFIG_FSL_SOC=y 186CONFIG_FSL_SOC=y
149# CONFIG_PCI is not set 187# CONFIG_PCI is not set
150# CONFIG_PCI_DOMAINS is not set 188# CONFIG_PCI_DOMAINS is not set
189# CONFIG_ARCH_SUPPORTS_MSI is not set
151 190
152# 191#
153# PCCARD (PCMCIA/CardBus) support 192# PCCARD (PCMCIA/CardBus) support
@@ -155,10 +194,6 @@ CONFIG_FSL_SOC=y
155# CONFIG_PCCARD is not set 194# CONFIG_PCCARD is not set
156 195
157# 196#
158# PCI Hotplug Support
159#
160
161#
162# Advanced setup 197# Advanced setup
163# 198#
164# CONFIG_ADVANCED_OPTIONS is not set 199# CONFIG_ADVANCED_OPTIONS is not set
@@ -180,10 +215,11 @@ CONFIG_NET=y
180# 215#
181# Networking options 216# Networking options
182# 217#
183# CONFIG_NETDEBUG is not set
184CONFIG_PACKET=y 218CONFIG_PACKET=y
185# CONFIG_PACKET_MMAP is not set 219# CONFIG_PACKET_MMAP is not set
186CONFIG_UNIX=y 220CONFIG_UNIX=y
221CONFIG_XFRM=y
222# CONFIG_XFRM_USER is not set
187# CONFIG_NET_KEY is not set 223# CONFIG_NET_KEY is not set
188CONFIG_INET=y 224CONFIG_INET=y
189CONFIG_IP_MULTICAST=y 225CONFIG_IP_MULTICAST=y
@@ -201,15 +237,15 @@ CONFIG_SYN_COOKIES=y
201# CONFIG_INET_ESP is not set 237# CONFIG_INET_ESP is not set
202# CONFIG_INET_IPCOMP is not set 238# CONFIG_INET_IPCOMP is not set
203# CONFIG_INET_XFRM_TUNNEL is not set 239# CONFIG_INET_XFRM_TUNNEL is not set
204# CONFIG_INET_TUNNEL is not set 240CONFIG_INET_TUNNEL=y
241CONFIG_INET_XFRM_MODE_TRANSPORT=y
242CONFIG_INET_XFRM_MODE_TUNNEL=y
243CONFIG_INET_XFRM_MODE_BEET=y
205CONFIG_INET_DIAG=y 244CONFIG_INET_DIAG=y
206CONFIG_INET_TCP_DIAG=y 245CONFIG_INET_TCP_DIAG=y
207# CONFIG_TCP_CONG_ADVANCED is not set 246# CONFIG_TCP_CONG_ADVANCED is not set
208CONFIG_TCP_CONG_BIC=y 247CONFIG_TCP_CONG_CUBIC=y
209 248CONFIG_DEFAULT_TCP_CONG="cubic"
210#
211# IP: Virtual Server Configuration
212#
213# CONFIG_IP_VS is not set 249# CONFIG_IP_VS is not set
214CONFIG_IPV6=y 250CONFIG_IPV6=y
215# CONFIG_IPV6_PRIVACY is not set 251# CONFIG_IPV6_PRIVACY is not set
@@ -219,7 +255,12 @@ CONFIG_IPV6=y
219# CONFIG_INET6_IPCOMP is not set 255# CONFIG_INET6_IPCOMP is not set
220# CONFIG_INET6_XFRM_TUNNEL is not set 256# CONFIG_INET6_XFRM_TUNNEL is not set
221# CONFIG_INET6_TUNNEL is not set 257# CONFIG_INET6_TUNNEL is not set
258CONFIG_INET6_XFRM_MODE_TRANSPORT=y
259CONFIG_INET6_XFRM_MODE_TUNNEL=y
260CONFIG_INET6_XFRM_MODE_BEET=y
261CONFIG_IPV6_SIT=y
222# CONFIG_IPV6_TUNNEL is not set 262# CONFIG_IPV6_TUNNEL is not set
263# CONFIG_NETWORK_SECMARK is not set
223CONFIG_NETFILTER=y 264CONFIG_NETFILTER=y
224# CONFIG_NETFILTER_DEBUG is not set 265# CONFIG_NETFILTER_DEBUG is not set
225 266
@@ -227,13 +268,16 @@ CONFIG_NETFILTER=y
227# Core Netfilter Configuration 268# Core Netfilter Configuration
228# 269#
229# CONFIG_NETFILTER_NETLINK is not set 270# CONFIG_NETFILTER_NETLINK is not set
271# CONFIG_NF_CONNTRACK_ENABLED is not set
272# CONFIG_NF_CONNTRACK is not set
230# CONFIG_NETFILTER_XTABLES is not set 273# CONFIG_NETFILTER_XTABLES is not set
231 274
232# 275#
233# IP: Netfilter Configuration 276# IP: Netfilter Configuration
234# 277#
235# CONFIG_IP_NF_CONNTRACK is not set
236# CONFIG_IP_NF_QUEUE is not set 278# CONFIG_IP_NF_QUEUE is not set
279# CONFIG_IP_NF_IPTABLES is not set
280# CONFIG_IP_NF_ARPTABLES is not set
237# CONFIG_BRIDGE is not set 281# CONFIG_BRIDGE is not set
238# CONFIG_VLAN_8021Q is not set 282# CONFIG_VLAN_8021Q is not set
239# CONFIG_DECNET is not set 283# CONFIG_DECNET is not set
@@ -253,7 +297,14 @@ CONFIG_NETFILTER=y
253# CONFIG_HAMRADIO is not set 297# CONFIG_HAMRADIO is not set
254# CONFIG_IRDA is not set 298# CONFIG_IRDA is not set
255# CONFIG_BT is not set 299# CONFIG_BT is not set
300
301#
302# Wireless
303#
304# CONFIG_CFG80211 is not set
305# CONFIG_WIRELESS_EXT is not set
256# CONFIG_IEEE80211 is not set 306# CONFIG_IEEE80211 is not set
307# CONFIG_RFKILL is not set
257 308
258# 309#
259# Device Drivers 310# Device Drivers
@@ -266,15 +317,13 @@ CONFIG_STANDALONE=y
266CONFIG_PREVENT_FIRMWARE_BUILD=y 317CONFIG_PREVENT_FIRMWARE_BUILD=y
267# CONFIG_FW_LOADER is not set 318# CONFIG_FW_LOADER is not set
268# CONFIG_DEBUG_DRIVER is not set 319# CONFIG_DEBUG_DRIVER is not set
320# CONFIG_DEBUG_DEVRES is not set
321# CONFIG_SYS_HYPERVISOR is not set
269 322
270# 323#
271# Connector - unified userspace <-> kernelspace linker 324# Connector - unified userspace <-> kernelspace linker
272# 325#
273# CONFIG_CONNECTOR is not set 326# CONFIG_CONNECTOR is not set
274
275#
276# Memory Technology Devices (MTD)
277#
278# CONFIG_MTD is not set 327# CONFIG_MTD is not set
279 328
280# 329#
@@ -285,6 +334,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
285# 334#
286# Plug and Play support 335# Plug and Play support
287# 336#
337# CONFIG_PNPACPI is not set
288 338
289# 339#
290# Block devices 340# Block devices
@@ -295,14 +345,15 @@ CONFIG_BLK_DEV_LOOP=y
295# CONFIG_BLK_DEV_CRYPTOLOOP is not set 345# CONFIG_BLK_DEV_CRYPTOLOOP is not set
296# CONFIG_BLK_DEV_NBD is not set 346# CONFIG_BLK_DEV_NBD is not set
297# CONFIG_BLK_DEV_RAM is not set 347# CONFIG_BLK_DEV_RAM is not set
298# CONFIG_BLK_DEV_INITRD is not set
299# CONFIG_CDROM_PKTCDVD is not set 348# CONFIG_CDROM_PKTCDVD is not set
300# CONFIG_ATA_OVER_ETH is not set 349# CONFIG_ATA_OVER_ETH is not set
301 350
302# 351#
303# ATA/ATAPI/MFM/RLL support 352# Misc devices
304# 353#
354# CONFIG_BLINK is not set
305CONFIG_IDE=y 355CONFIG_IDE=y
356CONFIG_IDE_MAX_HWIFS=4
306CONFIG_BLK_DEV_IDE=y 357CONFIG_BLK_DEV_IDE=y
307 358
308# 359#
@@ -314,14 +365,15 @@ CONFIG_BLK_DEV_IDEDISK=y
314# CONFIG_BLK_DEV_IDECD is not set 365# CONFIG_BLK_DEV_IDECD is not set
315# CONFIG_BLK_DEV_IDEFLOPPY is not set 366# CONFIG_BLK_DEV_IDEFLOPPY is not set
316# CONFIG_IDE_TASK_IOCTL is not set 367# CONFIG_IDE_TASK_IOCTL is not set
368CONFIG_IDE_PROC_FS=y
317 369
318# 370#
319# IDE chipset support/bugfixes 371# IDE chipset support/bugfixes
320# 372#
321# CONFIG_IDE_GENERIC is not set 373# CONFIG_IDE_GENERIC is not set
374# CONFIG_IDEPCI_PCIBUS_ORDER is not set
322# CONFIG_IDE_ARM is not set 375# CONFIG_IDE_ARM is not set
323# CONFIG_BLK_DEV_IDEDMA is not set 376# CONFIG_BLK_DEV_IDEDMA is not set
324# CONFIG_IDEDMA_AUTO is not set
325# CONFIG_BLK_DEV_HD is not set 377# CONFIG_BLK_DEV_HD is not set
326 378
327# 379#
@@ -329,29 +381,14 @@ CONFIG_BLK_DEV_IDEDISK=y
329# 381#
330# CONFIG_RAID_ATTRS is not set 382# CONFIG_RAID_ATTRS is not set
331# CONFIG_SCSI is not set 383# CONFIG_SCSI is not set
384# CONFIG_SCSI_NETLINK is not set
385# CONFIG_ATA is not set
332 386
333# 387#
334# Multi-device support (RAID and LVM) 388# Multi-device support (RAID and LVM)
335# 389#
336# CONFIG_MD is not set 390# CONFIG_MD is not set
337 391# CONFIG_MACINTOSH_DRIVERS is not set
338#
339# Fusion MPT device support
340#
341# CONFIG_FUSION is not set
342
343#
344# IEEE 1394 (FireWire) support
345#
346
347#
348# I2O device support
349#
350
351#
352# Macintosh device drivers
353#
354# CONFIG_WINDFARM is not set
355 392
356# 393#
357# Network device support 394# Network device support
@@ -361,10 +398,6 @@ CONFIG_NETDEVICES=y
361# CONFIG_BONDING is not set 398# CONFIG_BONDING is not set
362# CONFIG_EQUALIZER is not set 399# CONFIG_EQUALIZER is not set
363CONFIG_TUN=y 400CONFIG_TUN=y
364
365#
366# PHY device support
367#
368CONFIG_PHYLIB=y 401CONFIG_PHYLIB=y
369 402
370# 403#
@@ -375,6 +408,9 @@ CONFIG_DAVICOM_PHY=y
375# CONFIG_QSEMI_PHY is not set 408# CONFIG_QSEMI_PHY is not set
376# CONFIG_LXT_PHY is not set 409# CONFIG_LXT_PHY is not set
377# CONFIG_CICADA_PHY is not set 410# CONFIG_CICADA_PHY is not set
411# CONFIG_VITESSE_PHY is not set
412# CONFIG_SMSC_PHY is not set
413# CONFIG_BROADCOM_PHY is not set
378# CONFIG_FIXED_PHY is not set 414# CONFIG_FIXED_PHY is not set
379 415
380# 416#
@@ -385,27 +421,14 @@ CONFIG_MII=y
385CONFIG_FS_ENET=y 421CONFIG_FS_ENET=y
386# CONFIG_FS_ENET_HAS_SCC is not set 422# CONFIG_FS_ENET_HAS_SCC is not set
387CONFIG_FS_ENET_HAS_FCC=y 423CONFIG_FS_ENET_HAS_FCC=y
424CONFIG_NETDEV_1000=y
425CONFIG_NETDEV_10000=y
388 426
389# 427#
390# Ethernet (1000 Mbit) 428# Wireless LAN
391#
392
393#
394# Ethernet (10000 Mbit)
395#
396
397#
398# Token Ring devices
399#
400
401#
402# Wireless LAN (non-hamradio)
403#
404# CONFIG_NET_RADIO is not set
405
406#
407# Wan interfaces
408# 429#
430# CONFIG_WLAN_PRE80211 is not set
431# CONFIG_WLAN_80211 is not set
409# CONFIG_WAN is not set 432# CONFIG_WAN is not set
410CONFIG_PPP=y 433CONFIG_PPP=y
411# CONFIG_PPP_FILTER is not set 434# CONFIG_PPP_FILTER is not set
@@ -414,6 +437,7 @@ CONFIG_PPP_SYNC_TTY=y
414CONFIG_PPP_DEFLATE=y 437CONFIG_PPP_DEFLATE=y
415# CONFIG_PPP_BSDCOMP is not set 438# CONFIG_PPP_BSDCOMP is not set
416# CONFIG_SLIP is not set 439# CONFIG_SLIP is not set
440CONFIG_SLHC=y
417# CONFIG_NETPOLL is not set 441# CONFIG_NETPOLL is not set
418# CONFIG_NET_POLL_CONTROLLER is not set 442# CONFIG_NET_POLL_CONTROLLER is not set
419 443
@@ -431,6 +455,8 @@ CONFIG_PPP_DEFLATE=y
431# Input device support 455# Input device support
432# 456#
433CONFIG_INPUT=y 457CONFIG_INPUT=y
458# CONFIG_INPUT_FF_MEMLESS is not set
459# CONFIG_INPUT_POLLDEV is not set
434 460
435# 461#
436# Userland interfaces 462# Userland interfaces
@@ -453,11 +479,19 @@ CONFIG_KEYBOARD_ATKBD=y
453# CONFIG_KEYBOARD_LKKBD is not set 479# CONFIG_KEYBOARD_LKKBD is not set
454# CONFIG_KEYBOARD_XTKBD is not set 480# CONFIG_KEYBOARD_XTKBD is not set
455# CONFIG_KEYBOARD_NEWTON is not set 481# CONFIG_KEYBOARD_NEWTON is not set
482# CONFIG_KEYBOARD_STOWAWAY is not set
456CONFIG_INPUT_MOUSE=y 483CONFIG_INPUT_MOUSE=y
457CONFIG_MOUSE_PS2=y 484CONFIG_MOUSE_PS2=y
485CONFIG_MOUSE_PS2_ALPS=y
486CONFIG_MOUSE_PS2_LOGIPS2PP=y
487CONFIG_MOUSE_PS2_SYNAPTICS=y
488CONFIG_MOUSE_PS2_LIFEBOOK=y
489CONFIG_MOUSE_PS2_TRACKPOINT=y
490# CONFIG_MOUSE_PS2_TOUCHKIT is not set
458# CONFIG_MOUSE_SERIAL is not set 491# CONFIG_MOUSE_SERIAL is not set
459# CONFIG_MOUSE_VSXXXAA is not set 492# CONFIG_MOUSE_VSXXXAA is not set
460# CONFIG_INPUT_JOYSTICK is not set 493# CONFIG_INPUT_JOYSTICK is not set
494# CONFIG_INPUT_TABLET is not set
461# CONFIG_INPUT_TOUCHSCREEN is not set 495# CONFIG_INPUT_TOUCHSCREEN is not set
462# CONFIG_INPUT_MISC is not set 496# CONFIG_INPUT_MISC is not set
463 497
@@ -485,6 +519,7 @@ CONFIG_SERIO_LIBPS2=y
485# 519#
486# Non-8250 serial port support 520# Non-8250 serial port support
487# 521#
522# CONFIG_SERIAL_UARTLITE is not set
488CONFIG_SERIAL_CORE=y 523CONFIG_SERIAL_CORE=y
489CONFIG_SERIAL_CORE_CONSOLE=y 524CONFIG_SERIAL_CORE_CONSOLE=y
490CONFIG_SERIAL_CPM=y 525CONFIG_SERIAL_CPM=y
@@ -503,29 +538,16 @@ CONFIG_LEGACY_PTY_COUNT=256
503# IPMI 538# IPMI
504# 539#
505# CONFIG_IPMI_HANDLER is not set 540# CONFIG_IPMI_HANDLER is not set
506
507#
508# Watchdog Cards
509#
510# CONFIG_WATCHDOG is not set 541# CONFIG_WATCHDOG is not set
542CONFIG_HW_RANDOM=y
511# CONFIG_NVRAM is not set 543# CONFIG_NVRAM is not set
512# CONFIG_GEN_RTC is not set 544# CONFIG_GEN_RTC is not set
513# CONFIG_DTLK is not set
514# CONFIG_R3964 is not set 545# CONFIG_R3964 is not set
515
516#
517# Ftape, the floppy tape device driver
518#
519# CONFIG_AGP is not set
520# CONFIG_RAW_DRIVER is not set 546# CONFIG_RAW_DRIVER is not set
521 547
522# 548#
523# TPM devices 549# TPM devices
524# 550#
525
526#
527# I2C support
528#
529# CONFIG_I2C is not set 551# CONFIG_I2C is not set
530 552
531# 553#
@@ -538,32 +560,32 @@ CONFIG_LEGACY_PTY_COUNT=256
538# Dallas's 1-wire bus 560# Dallas's 1-wire bus
539# 561#
540# CONFIG_W1 is not set 562# CONFIG_W1 is not set
541
542#
543# Hardware Monitoring support
544#
545# CONFIG_HWMON is not set 563# CONFIG_HWMON is not set
546# CONFIG_HWMON_VID is not set
547 564
548# 565#
549# Misc devices 566# Multifunction device drivers
550# 567#
568# CONFIG_MFD_SM501 is not set
551 569
552# 570#
553# Multimedia devices 571# Multimedia devices
554# 572#
555# CONFIG_VIDEO_DEV is not set 573# CONFIG_VIDEO_DEV is not set
556CONFIG_VIDEO_V4L2=y 574# CONFIG_DVB_CORE is not set
575CONFIG_DAB=y
557 576
558# 577#
559# Digital Video Broadcasting Devices 578# Graphics support
560# 579#
561# CONFIG_DVB is not set 580# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
562 581
563# 582#
564# Graphics support 583# Display device support
565# 584#
585# CONFIG_DISPLAY_SUPPORT is not set
586# CONFIG_VGASTATE is not set
566# CONFIG_FB is not set 587# CONFIG_FB is not set
588# CONFIG_FB_IBM_GXT4500 is not set
567 589
568# 590#
569# Sound 591# Sound
@@ -571,6 +593,12 @@ CONFIG_VIDEO_V4L2=y
571# CONFIG_SOUND is not set 593# CONFIG_SOUND is not set
572 594
573# 595#
596# HID Devices
597#
598CONFIG_HID=y
599# CONFIG_HID_DEBUG is not set
600
601#
574# USB support 602# USB support
575# 603#
576# CONFIG_USB_ARCH_HAS_HCD is not set 604# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -586,6 +614,7 @@ CONFIG_VIDEO_V4L2=y
586# 614#
587CONFIG_USB_GADGET=y 615CONFIG_USB_GADGET=y
588# CONFIG_USB_GADGET_DEBUG_FILES is not set 616# CONFIG_USB_GADGET_DEBUG_FILES is not set
617# CONFIG_USB_GADGET_FSL_USB2 is not set
589# CONFIG_USB_GADGET_NET2280 is not set 618# CONFIG_USB_GADGET_NET2280 is not set
590# CONFIG_USB_GADGET_PXA2XX is not set 619# CONFIG_USB_GADGET_PXA2XX is not set
591# CONFIG_USB_GADGET_GOKU is not set 620# CONFIG_USB_GADGET_GOKU is not set
@@ -594,10 +623,6 @@ CONFIG_USB_GADGET=y
594# CONFIG_USB_GADGET_AT91 is not set 623# CONFIG_USB_GADGET_AT91 is not set
595# CONFIG_USB_GADGET_DUMMY_HCD is not set 624# CONFIG_USB_GADGET_DUMMY_HCD is not set
596# CONFIG_USB_GADGET_DUALSPEED is not set 625# CONFIG_USB_GADGET_DUALSPEED is not set
597
598#
599# MMC/SD Card support
600#
601# CONFIG_MMC is not set 626# CONFIG_MMC is not set
602 627
603# 628#
@@ -626,6 +651,19 @@ CONFIG_USB_GADGET=y
626# 651#
627 652
628# 653#
654# DMA Engine support
655#
656# CONFIG_DMA_ENGINE is not set
657
658#
659# DMA Clients
660#
661
662#
663# DMA Devices
664#
665
666#
629# File systems 667# File systems
630# 668#
631CONFIG_EXT2_FS=y 669CONFIG_EXT2_FS=y
@@ -645,9 +683,12 @@ CONFIG_XFS_FS=y
645# CONFIG_XFS_QUOTA is not set 683# CONFIG_XFS_QUOTA is not set
646# CONFIG_XFS_SECURITY is not set 684# CONFIG_XFS_SECURITY is not set
647# CONFIG_XFS_POSIX_ACL is not set 685# CONFIG_XFS_POSIX_ACL is not set
686# CONFIG_XFS_RT is not set
687# CONFIG_OCFS2_FS is not set
648# CONFIG_MINIX_FS is not set 688# CONFIG_MINIX_FS is not set
649# CONFIG_ROMFS_FS is not set 689# CONFIG_ROMFS_FS is not set
650CONFIG_INOTIFY=y 690CONFIG_INOTIFY=y
691CONFIG_INOTIFY_USER=y
651# CONFIG_QUOTA is not set 692# CONFIG_QUOTA is not set
652CONFIG_DNOTIFY=y 693CONFIG_DNOTIFY=y
653# CONFIG_AUTOFS_FS is not set 694# CONFIG_AUTOFS_FS is not set
@@ -672,8 +713,10 @@ CONFIG_AUTOFS4_FS=y
672# 713#
673CONFIG_PROC_FS=y 714CONFIG_PROC_FS=y
674CONFIG_PROC_KCORE=y 715CONFIG_PROC_KCORE=y
716CONFIG_PROC_SYSCTL=y
675CONFIG_SYSFS=y 717CONFIG_SYSFS=y
676CONFIG_TMPFS=y 718CONFIG_TMPFS=y
719# CONFIG_TMPFS_POSIX_ACL is not set
677# CONFIG_HUGETLB_PAGE is not set 720# CONFIG_HUGETLB_PAGE is not set
678CONFIG_RAMFS=y 721CONFIG_RAMFS=y
679 722
@@ -694,6 +737,7 @@ CONFIG_CRAMFS=y
694CONFIG_NFS_FS=y 737CONFIG_NFS_FS=y
695CONFIG_NFS_V3=y 738CONFIG_NFS_V3=y
696CONFIG_NFS_V3_ACL=y 739CONFIG_NFS_V3_ACL=y
740# CONFIG_NFS_DIRECTIO is not set
697# CONFIG_NFSD is not set 741# CONFIG_NFSD is not set
698CONFIG_ROOT_NFS=y 742CONFIG_ROOT_NFS=y
699CONFIG_LOCKD=y 743CONFIG_LOCKD=y
@@ -727,6 +771,7 @@ CONFIG_MSDOS_PARTITION=y
727# CONFIG_SUN_PARTITION is not set 771# CONFIG_SUN_PARTITION is not set
728# CONFIG_KARMA_PARTITION is not set 772# CONFIG_KARMA_PARTITION is not set
729# CONFIG_EFI_PARTITION is not set 773# CONFIG_EFI_PARTITION is not set
774# CONFIG_SYSV68_PARTITION is not set
730 775
731# 776#
732# Native Language Support 777# Native Language Support
@@ -771,37 +816,55 @@ CONFIG_NLS_ISO8859_1=y
771# CONFIG_NLS_KOI8_R is not set 816# CONFIG_NLS_KOI8_R is not set
772# CONFIG_NLS_KOI8_U is not set 817# CONFIG_NLS_KOI8_U is not set
773CONFIG_NLS_UTF8=y 818CONFIG_NLS_UTF8=y
819# CONFIG_UCC_SLOW is not set
774 820
775# 821#
776# Library routines 822# Library routines
777# 823#
824CONFIG_BITREVERSE=y
778CONFIG_CRC_CCITT=y 825CONFIG_CRC_CCITT=y
779# CONFIG_CRC16 is not set 826# CONFIG_CRC16 is not set
827# CONFIG_CRC_ITU_T is not set
780CONFIG_CRC32=y 828CONFIG_CRC32=y
781# CONFIG_LIBCRC32C is not set 829# CONFIG_LIBCRC32C is not set
782CONFIG_ZLIB_INFLATE=y 830CONFIG_ZLIB_INFLATE=y
783CONFIG_ZLIB_DEFLATE=y 831CONFIG_ZLIB_DEFLATE=y
832CONFIG_PLIST=y
833CONFIG_HAS_IOMEM=y
834CONFIG_HAS_IOPORT=y
835CONFIG_HAS_DMA=y
784 836
785# 837#
786# Kernel hacking 838# Kernel hacking
787# 839#
788# CONFIG_PRINTK_TIME is not set 840# CONFIG_PRINTK_TIME is not set
841CONFIG_ENABLE_MUST_CHECK=y
789# CONFIG_MAGIC_SYSRQ is not set 842# CONFIG_MAGIC_SYSRQ is not set
843# CONFIG_UNUSED_SYMBOLS is not set
844# CONFIG_DEBUG_FS is not set
845# CONFIG_HEADERS_CHECK is not set
790CONFIG_DEBUG_KERNEL=y 846CONFIG_DEBUG_KERNEL=y
791CONFIG_LOG_BUF_SHIFT=14 847# CONFIG_DEBUG_SHIRQ is not set
792CONFIG_DETECT_SOFTLOCKUP=y 848CONFIG_DETECT_SOFTLOCKUP=y
793# CONFIG_SCHEDSTATS is not set 849# CONFIG_SCHEDSTATS is not set
850# CONFIG_TIMER_STATS is not set
794# CONFIG_DEBUG_SLAB is not set 851# CONFIG_DEBUG_SLAB is not set
795# CONFIG_DEBUG_MUTEXES is not set 852# CONFIG_DEBUG_RT_MUTEXES is not set
853# CONFIG_RT_MUTEX_TESTER is not set
796# CONFIG_DEBUG_SPINLOCK is not set 854# CONFIG_DEBUG_SPINLOCK is not set
855# CONFIG_DEBUG_MUTEXES is not set
797# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 856# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
857# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
798# CONFIG_DEBUG_KOBJECT is not set 858# CONFIG_DEBUG_KOBJECT is not set
859# CONFIG_DEBUG_BUGVERBOSE is not set
799CONFIG_DEBUG_INFO=y 860CONFIG_DEBUG_INFO=y
800# CONFIG_DEBUG_FS is not set
801# CONFIG_DEBUG_VM is not set 861# CONFIG_DEBUG_VM is not set
802# CONFIG_UNWIND_INFO is not set 862# CONFIG_DEBUG_LIST is not set
803CONFIG_FORCED_INLINING=y 863CONFIG_FORCED_INLINING=y
804# CONFIG_RCU_TORTURE_TEST is not set 864# CONFIG_FAULT_INJECTION is not set
865# CONFIG_DEBUG_STACKOVERFLOW is not set
866# CONFIG_DEBUG_STACK_USAGE is not set
867# CONFIG_DEBUG_PAGEALLOC is not set
805# CONFIG_DEBUGGER is not set 868# CONFIG_DEBUGGER is not set
806# CONFIG_KGDB_CONSOLE is not set 869# CONFIG_KGDB_CONSOLE is not set
807CONFIG_BDI_SWITCH=y 870CONFIG_BDI_SWITCH=y
@@ -818,6 +881,9 @@ CONFIG_BDI_SWITCH=y
818# Cryptographic options 881# Cryptographic options
819# 882#
820CONFIG_CRYPTO=y 883CONFIG_CRYPTO=y
884CONFIG_CRYPTO_ALGAPI=y
885CONFIG_CRYPTO_BLKCIPHER=y
886CONFIG_CRYPTO_MANAGER=y
821# CONFIG_CRYPTO_HMAC is not set 887# CONFIG_CRYPTO_HMAC is not set
822# CONFIG_CRYPTO_NULL is not set 888# CONFIG_CRYPTO_NULL is not set
823# CONFIG_CRYPTO_MD4 is not set 889# CONFIG_CRYPTO_MD4 is not set
@@ -827,7 +893,12 @@ CONFIG_CRYPTO_MD5=y
827# CONFIG_CRYPTO_SHA512 is not set 893# CONFIG_CRYPTO_SHA512 is not set
828# CONFIG_CRYPTO_WP512 is not set 894# CONFIG_CRYPTO_WP512 is not set
829# CONFIG_CRYPTO_TGR192 is not set 895# CONFIG_CRYPTO_TGR192 is not set
896CONFIG_CRYPTO_ECB=y
897CONFIG_CRYPTO_CBC=y
898CONFIG_CRYPTO_PCBC=y
899# CONFIG_CRYPTO_CRYPTD is not set
830CONFIG_CRYPTO_DES=y 900CONFIG_CRYPTO_DES=y
901# CONFIG_CRYPTO_FCRYPT is not set
831# CONFIG_CRYPTO_BLOWFISH is not set 902# CONFIG_CRYPTO_BLOWFISH is not set
832# CONFIG_CRYPTO_TWOFISH is not set 903# CONFIG_CRYPTO_TWOFISH is not set
833# CONFIG_CRYPTO_SERPENT is not set 904# CONFIG_CRYPTO_SERPENT is not set
@@ -841,7 +912,7 @@ CONFIG_CRYPTO_DES=y
841# CONFIG_CRYPTO_DEFLATE is not set 912# CONFIG_CRYPTO_DEFLATE is not set
842# CONFIG_CRYPTO_MICHAEL_MIC is not set 913# CONFIG_CRYPTO_MICHAEL_MIC is not set
843# CONFIG_CRYPTO_CRC32C is not set 914# CONFIG_CRYPTO_CRC32C is not set
844# CONFIG_CRYPTO_TEST is not set 915# CONFIG_CRYPTO_CAMELLIA is not set
845 916
846# 917#
847# Hardware crypto devices 918# Hardware crypto devices
diff --git a/arch/powerpc/configs/mpc8313_rdb_defconfig b/arch/powerpc/configs/mpc8313_rdb_defconfig
index f87523716c44..b7d3dffc981a 100644
--- a/arch/powerpc/configs/mpc8313_rdb_defconfig
+++ b/arch/powerpc/configs/mpc8313_rdb_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.20 3# Linux kernel version: 2.6.22-rc7
4# Wed Feb 7 22:08:04 2007 4# Sun Jul 1 23:56:55 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_PPC_DCR_MMIO is not set 45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -83,14 +87,19 @@ CONFIG_BUG=y
83CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
86# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 95CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
90CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94 103
95# 104#
96# Loadable module support 105# Loadable module support
@@ -122,19 +131,33 @@ CONFIG_DEFAULT_AS=y
122# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
123# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
124CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
125CONFIG_PPC_GEN550=y
126# CONFIG_WANT_EARLY_SERIAL is not set
127 134
128# 135#
129# Platform support 136# Platform support
130# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
131CONFIG_MPC8313_RDB=y 143CONFIG_MPC8313_RDB=y
132# CONFIG_MPC832x_MDS is not set 144# CONFIG_MPC832x_MDS is not set
133# CONFIG_MPC834x_SYS is not set 145# CONFIG_MPC832x_RDB is not set
146# CONFIG_MPC834x_MDS is not set
134# CONFIG_MPC834x_ITX is not set 147# CONFIG_MPC834x_ITX is not set
135# CONFIG_MPC8360E_PB is not set 148# CONFIG_MPC836x_MDS is not set
136CONFIG_PPC_MPC831x=y 149CONFIG_PPC_MPC831x=y
137# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160# CONFIG_CPM2 is not set
138 161
139# 162#
140# Kernel options 163# Kernel options
@@ -162,33 +185,34 @@ CONFIG_FLAT_NODE_MEM_MAP=y
162# CONFIG_SPARSEMEM_STATIC is not set 185# CONFIG_SPARSEMEM_STATIC is not set
163CONFIG_SPLIT_PTLOCK_CPUS=4 186CONFIG_SPLIT_PTLOCK_CPUS=4
164# CONFIG_RESOURCES_64BIT is not set 187# CONFIG_RESOURCES_64BIT is not set
188CONFIG_ZONE_DMA_FLAG=1
165CONFIG_PROC_DEVICETREE=y 189CONFIG_PROC_DEVICETREE=y
166# CONFIG_CMDLINE_BOOL is not set 190# CONFIG_CMDLINE_BOOL is not set
167# CONFIG_PM is not set 191# CONFIG_PM is not set
168CONFIG_SECCOMP=y 192CONFIG_SECCOMP=y
193CONFIG_WANT_DEVICE_TREE=y
194CONFIG_DEVICE_TREE=""
169CONFIG_ISA_DMA_API=y 195CONFIG_ISA_DMA_API=y
170 196
171# 197#
172# Bus options 198# Bus options
173# 199#
200CONFIG_ZONE_DMA=y
174CONFIG_GENERIC_ISA_DMA=y 201CONFIG_GENERIC_ISA_DMA=y
175# CONFIG_MPIC_WEIRD is not set
176# CONFIG_PPC_I8259 is not set
177CONFIG_PPC_INDIRECT_PCI=y 202CONFIG_PPC_INDIRECT_PCI=y
203# CONFIG_PPC_INDIRECT_PCI_BE is not set
178CONFIG_FSL_SOC=y 204CONFIG_FSL_SOC=y
179CONFIG_PCI=y 205CONFIG_PCI=y
180CONFIG_PCI_DOMAINS=y 206CONFIG_PCI_DOMAINS=y
181# CONFIG_PCIEPORTBUS is not set 207# CONFIG_PCIEPORTBUS is not set
208CONFIG_ARCH_SUPPORTS_MSI=y
209# CONFIG_PCI_MSI is not set
182# CONFIG_PCI_DEBUG is not set 210# CONFIG_PCI_DEBUG is not set
183 211
184# 212#
185# PCCARD (PCMCIA/CardBus) support 213# PCCARD (PCMCIA/CardBus) support
186# 214#
187# CONFIG_PCCARD is not set 215# CONFIG_PCCARD is not set
188
189#
190# PCI Hotplug Support
191#
192# CONFIG_HOTPLUG_PCI is not set 216# CONFIG_HOTPLUG_PCI is not set
193 217
194# 218#
@@ -213,13 +237,13 @@ CONFIG_NET=y
213# 237#
214# Networking options 238# Networking options
215# 239#
216# CONFIG_NETDEBUG is not set
217CONFIG_PACKET=y 240CONFIG_PACKET=y
218# CONFIG_PACKET_MMAP is not set 241# CONFIG_PACKET_MMAP is not set
219CONFIG_UNIX=y 242CONFIG_UNIX=y
220CONFIG_XFRM=y 243CONFIG_XFRM=y
221# CONFIG_XFRM_USER is not set 244# CONFIG_XFRM_USER is not set
222# CONFIG_XFRM_SUB_POLICY is not set 245# CONFIG_XFRM_SUB_POLICY is not set
246# CONFIG_XFRM_MIGRATE is not set
223# CONFIG_NET_KEY is not set 247# CONFIG_NET_KEY is not set
224CONFIG_INET=y 248CONFIG_INET=y
225CONFIG_IP_MULTICAST=y 249CONFIG_IP_MULTICAST=y
@@ -253,20 +277,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
253# CONFIG_INET6_TUNNEL is not set 277# CONFIG_INET6_TUNNEL is not set
254# CONFIG_NETWORK_SECMARK is not set 278# CONFIG_NETWORK_SECMARK is not set
255# CONFIG_NETFILTER is not set 279# CONFIG_NETFILTER is not set
256
257#
258# DCCP Configuration (EXPERIMENTAL)
259#
260# CONFIG_IP_DCCP is not set 280# CONFIG_IP_DCCP is not set
261
262#
263# SCTP Configuration (EXPERIMENTAL)
264#
265# CONFIG_IP_SCTP is not set 281# CONFIG_IP_SCTP is not set
266
267#
268# TIPC Configuration (EXPERIMENTAL)
269#
270# CONFIG_TIPC is not set 282# CONFIG_TIPC is not set
271# CONFIG_ATM is not set 283# CONFIG_ATM is not set
272# CONFIG_BRIDGE is not set 284# CONFIG_BRIDGE is not set
@@ -292,7 +304,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
292# CONFIG_HAMRADIO is not set 304# CONFIG_HAMRADIO is not set
293# CONFIG_IRDA is not set 305# CONFIG_IRDA is not set
294# CONFIG_BT is not set 306# CONFIG_BT is not set
307# CONFIG_AF_RXRPC is not set
308
309#
310# Wireless
311#
312# CONFIG_CFG80211 is not set
313# CONFIG_WIRELESS_EXT is not set
314# CONFIG_MAC80211 is not set
295# CONFIG_IEEE80211 is not set 315# CONFIG_IEEE80211 is not set
316# CONFIG_RFKILL is not set
296 317
297# 318#
298# Device Drivers 319# Device Drivers
@@ -305,16 +326,13 @@ CONFIG_STANDALONE=y
305CONFIG_PREVENT_FIRMWARE_BUILD=y 326CONFIG_PREVENT_FIRMWARE_BUILD=y
306# CONFIG_FW_LOADER is not set 327# CONFIG_FW_LOADER is not set
307# CONFIG_DEBUG_DRIVER is not set 328# CONFIG_DEBUG_DRIVER is not set
329# CONFIG_DEBUG_DEVRES is not set
308# CONFIG_SYS_HYPERVISOR is not set 330# CONFIG_SYS_HYPERVISOR is not set
309 331
310# 332#
311# Connector - unified userspace <-> kernelspace linker 333# Connector - unified userspace <-> kernelspace linker
312# 334#
313# CONFIG_CONNECTOR is not set 335# CONFIG_CONNECTOR is not set
314
315#
316# Memory Technology Devices (MTD)
317#
318CONFIG_MTD=y 336CONFIG_MTD=y
319# CONFIG_MTD_DEBUG is not set 337# CONFIG_MTD_DEBUG is not set
320# CONFIG_MTD_CONCAT is not set 338# CONFIG_MTD_CONCAT is not set
@@ -357,7 +375,6 @@ CONFIG_MTD_CFI_UTIL=y
357# CONFIG_MTD_RAM is not set 375# CONFIG_MTD_RAM is not set
358# CONFIG_MTD_ROM is not set 376# CONFIG_MTD_ROM is not set
359# CONFIG_MTD_ABSENT is not set 377# CONFIG_MTD_ABSENT is not set
360# CONFIG_MTD_OBSOLETE_CHIPS is not set
361 378
362# 379#
363# Mapping drivers for chip access 380# Mapping drivers for chip access
@@ -387,17 +404,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
387# CONFIG_MTD_DOC2000 is not set 404# CONFIG_MTD_DOC2000 is not set
388# CONFIG_MTD_DOC2001 is not set 405# CONFIG_MTD_DOC2001 is not set
389# CONFIG_MTD_DOC2001PLUS is not set 406# CONFIG_MTD_DOC2001PLUS is not set
390
391#
392# NAND Flash Device Drivers
393#
394# CONFIG_MTD_NAND is not set 407# CONFIG_MTD_NAND is not set
395# CONFIG_MTD_NAND_CAFE is not set 408# CONFIG_MTD_ONENAND is not set
396 409
397# 410#
398# OneNAND Flash Device Drivers 411# UBI - Unsorted block images
399# 412#
400# CONFIG_MTD_ONENAND is not set 413# CONFIG_MTD_UBI is not set
401 414
402# 415#
403# Parallel port support 416# Parallel port support
@@ -407,6 +420,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
407# 420#
408# Plug and Play support 421# Plug and Play support
409# 422#
423# CONFIG_PNPACPI is not set
410 424
411# 425#
412# Block devices 426# Block devices
@@ -426,19 +440,16 @@ CONFIG_BLK_DEV_RAM=y
426CONFIG_BLK_DEV_RAM_COUNT=16 440CONFIG_BLK_DEV_RAM_COUNT=16
427CONFIG_BLK_DEV_RAM_SIZE=32768 441CONFIG_BLK_DEV_RAM_SIZE=32768
428CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 442CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
429CONFIG_BLK_DEV_INITRD=y
430# CONFIG_CDROM_PKTCDVD is not set 443# CONFIG_CDROM_PKTCDVD is not set
431# CONFIG_ATA_OVER_ETH is not set 444# CONFIG_ATA_OVER_ETH is not set
432 445
433# 446#
434# Misc devices 447# Misc devices
435# 448#
449# CONFIG_PHANTOM is not set
436# CONFIG_SGI_IOC4 is not set 450# CONFIG_SGI_IOC4 is not set
437# CONFIG_TIFM_CORE is not set 451# CONFIG_TIFM_CORE is not set
438 452# CONFIG_BLINK is not set
439#
440# ATA/ATAPI/MFM/RLL support
441#
442# CONFIG_IDE is not set 453# CONFIG_IDE is not set
443 454
444# 455#
@@ -467,6 +478,7 @@ CONFIG_CHR_DEV_SG=y
467# CONFIG_SCSI_CONSTANTS is not set 478# CONFIG_SCSI_CONSTANTS is not set
468# CONFIG_SCSI_LOGGING is not set 479# CONFIG_SCSI_LOGGING is not set
469# CONFIG_SCSI_SCAN_ASYNC is not set 480# CONFIG_SCSI_SCAN_ASYNC is not set
481CONFIG_SCSI_WAIT_SCAN=m
470 482
471# 483#
472# SCSI Transports 484# SCSI Transports
@@ -514,10 +526,6 @@ CONFIG_SCSI_SPI_ATTRS=y
514# CONFIG_SCSI_NSP32 is not set 526# CONFIG_SCSI_NSP32 is not set
515# CONFIG_SCSI_DEBUG is not set 527# CONFIG_SCSI_DEBUG is not set
516# CONFIG_SCSI_SRP is not set 528# CONFIG_SCSI_SRP is not set
517
518#
519# Serial ATA (prod) and Parallel ATA (experimental) drivers
520#
521# CONFIG_ATA is not set 529# CONFIG_ATA is not set
522 530
523# 531#
@@ -545,18 +553,14 @@ CONFIG_MD_RAID1=y
545# 553#
546# IEEE 1394 (FireWire) support 554# IEEE 1394 (FireWire) support
547# 555#
556# CONFIG_FIREWIRE is not set
548# CONFIG_IEEE1394 is not set 557# CONFIG_IEEE1394 is not set
549 558
550# 559#
551# I2O device support 560# I2O device support
552# 561#
553# CONFIG_I2O is not set 562# CONFIG_I2O is not set
554 563# CONFIG_MACINTOSH_DRIVERS is not set
555#
556# Macintosh device drivers
557#
558# CONFIG_MAC_EMUMOUSEBTN is not set
559# CONFIG_WINDFARM is not set
560 564
561# 565#
562# Network device support 566# Network device support
@@ -566,15 +570,7 @@ CONFIG_NETDEVICES=y
566# CONFIG_BONDING is not set 570# CONFIG_BONDING is not set
567# CONFIG_EQUALIZER is not set 571# CONFIG_EQUALIZER is not set
568# CONFIG_TUN is not set 572# CONFIG_TUN is not set
569
570#
571# ARCnet devices
572#
573# CONFIG_ARCNET is not set 573# CONFIG_ARCNET is not set
574
575#
576# PHY device support
577#
578CONFIG_PHYLIB=y 574CONFIG_PHYLIB=y
579 575
580# 576#
@@ -624,10 +620,8 @@ CONFIG_E100=y
624# CONFIG_SUNDANCE is not set 620# CONFIG_SUNDANCE is not set
625# CONFIG_TLAN is not set 621# CONFIG_TLAN is not set
626# CONFIG_VIA_RHINE is not set 622# CONFIG_VIA_RHINE is not set
627 623# CONFIG_SC92031 is not set
628# 624CONFIG_NETDEV_1000=y
629# Ethernet (1000 Mbit)
630#
631# CONFIG_ACENIC is not set 625# CONFIG_ACENIC is not set
632# CONFIG_DL2K is not set 626# CONFIG_DL2K is not set
633# CONFIG_E1000 is not set 627# CONFIG_E1000 is not set
@@ -645,29 +639,32 @@ CONFIG_E100=y
645CONFIG_GIANFAR=y 639CONFIG_GIANFAR=y
646CONFIG_GFAR_NAPI=y 640CONFIG_GFAR_NAPI=y
647# CONFIG_QLA3XXX is not set 641# CONFIG_QLA3XXX is not set
648 642# CONFIG_ATL1 is not set
649# 643CONFIG_NETDEV_10000=y
650# Ethernet (10000 Mbit)
651#
652# CONFIG_CHELSIO_T1 is not set 644# CONFIG_CHELSIO_T1 is not set
645# CONFIG_CHELSIO_T3 is not set
653# CONFIG_IXGB is not set 646# CONFIG_IXGB is not set
654# CONFIG_S2IO is not set 647# CONFIG_S2IO is not set
655# CONFIG_MYRI10GE is not set 648# CONFIG_MYRI10GE is not set
656# CONFIG_NETXEN_NIC is not set 649# CONFIG_NETXEN_NIC is not set
657 650# CONFIG_MLX4_CORE is not set
658#
659# Token Ring devices
660#
661# CONFIG_TR is not set 651# CONFIG_TR is not set
662 652
663# 653#
664# Wireless LAN (non-hamradio) 654# Wireless LAN
665# 655#
666# CONFIG_NET_RADIO is not set 656# CONFIG_WLAN_PRE80211 is not set
657# CONFIG_WLAN_80211 is not set
667 658
668# 659#
669# Wan interfaces 660# USB Network Adapters
670# 661#
662# CONFIG_USB_CATC is not set
663# CONFIG_USB_KAWETH is not set
664# CONFIG_USB_PEGASUS is not set
665# CONFIG_USB_RTL8150 is not set
666# CONFIG_USB_USBNET_MII is not set
667# CONFIG_USB_USBNET is not set
671# CONFIG_WAN is not set 668# CONFIG_WAN is not set
672# CONFIG_FDDI is not set 669# CONFIG_FDDI is not set
673# CONFIG_HIPPI is not set 670# CONFIG_HIPPI is not set
@@ -694,6 +691,7 @@ CONFIG_GFAR_NAPI=y
694# 691#
695CONFIG_INPUT=y 692CONFIG_INPUT=y
696# CONFIG_INPUT_FF_MEMLESS is not set 693# CONFIG_INPUT_FF_MEMLESS is not set
694# CONFIG_INPUT_POLLDEV is not set
697 695
698# 696#
699# Userland interfaces 697# Userland interfaces
@@ -710,6 +708,7 @@ CONFIG_INPUT=y
710# CONFIG_INPUT_KEYBOARD is not set 708# CONFIG_INPUT_KEYBOARD is not set
711# CONFIG_INPUT_MOUSE is not set 709# CONFIG_INPUT_MOUSE is not set
712# CONFIG_INPUT_JOYSTICK is not set 710# CONFIG_INPUT_JOYSTICK is not set
711# CONFIG_INPUT_TABLET is not set
713# CONFIG_INPUT_TOUCHSCREEN is not set 712# CONFIG_INPUT_TOUCHSCREEN is not set
714# CONFIG_INPUT_MISC is not set 713# CONFIG_INPUT_MISC is not set
715 714
@@ -742,6 +741,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
742CONFIG_SERIAL_CORE=y 741CONFIG_SERIAL_CORE=y
743CONFIG_SERIAL_CORE_CONSOLE=y 742CONFIG_SERIAL_CORE_CONSOLE=y
744# CONFIG_SERIAL_JSM is not set 743# CONFIG_SERIAL_JSM is not set
744# CONFIG_SERIAL_OF_PLATFORM is not set
745CONFIG_UNIX98_PTYS=y 745CONFIG_UNIX98_PTYS=y
746CONFIG_LEGACY_PTYS=y 746CONFIG_LEGACY_PTYS=y
747CONFIG_LEGACY_PTY_COUNT=256 747CONFIG_LEGACY_PTY_COUNT=256
@@ -750,10 +750,6 @@ CONFIG_LEGACY_PTY_COUNT=256
750# IPMI 750# IPMI
751# 751#
752# CONFIG_IPMI_HANDLER is not set 752# CONFIG_IPMI_HANDLER is not set
753
754#
755# Watchdog Cards
756#
757CONFIG_WATCHDOG=y 753CONFIG_WATCHDOG=y
758# CONFIG_WATCHDOG_NOWAYOUT is not set 754# CONFIG_WATCHDOG_NOWAYOUT is not set
759 755
@@ -776,7 +772,6 @@ CONFIG_83xx_WDT=y
776CONFIG_HW_RANDOM=y 772CONFIG_HW_RANDOM=y
777# CONFIG_NVRAM is not set 773# CONFIG_NVRAM is not set
778# CONFIG_GEN_RTC is not set 774# CONFIG_GEN_RTC is not set
779# CONFIG_DTLK is not set
780# CONFIG_R3964 is not set 775# CONFIG_R3964 is not set
781# CONFIG_APPLICOM is not set 776# CONFIG_APPLICOM is not set
782# CONFIG_AGP is not set 777# CONFIG_AGP is not set
@@ -787,11 +782,9 @@ CONFIG_HW_RANDOM=y
787# TPM devices 782# TPM devices
788# 783#
789# CONFIG_TCG_TPM is not set 784# CONFIG_TCG_TPM is not set
790 785CONFIG_DEVPORT=y
791#
792# I2C support
793#
794CONFIG_I2C=y 786CONFIG_I2C=y
787CONFIG_I2C_BOARDINFO=y
795CONFIG_I2C_CHARDEV=y 788CONFIG_I2C_CHARDEV=y
796 789
797# 790#
@@ -818,14 +811,15 @@ CONFIG_I2C_MPC=y
818# CONFIG_I2C_PARPORT_LIGHT is not set 811# CONFIG_I2C_PARPORT_LIGHT is not set
819# CONFIG_I2C_PROSAVAGE is not set 812# CONFIG_I2C_PROSAVAGE is not set
820# CONFIG_I2C_SAVAGE4 is not set 813# CONFIG_I2C_SAVAGE4 is not set
814# CONFIG_I2C_SIMTEC is not set
821# CONFIG_I2C_SIS5595 is not set 815# CONFIG_I2C_SIS5595 is not set
822# CONFIG_I2C_SIS630 is not set 816# CONFIG_I2C_SIS630 is not set
823# CONFIG_I2C_SIS96X is not set 817# CONFIG_I2C_SIS96X is not set
824# CONFIG_I2C_STUB is not set 818# CONFIG_I2C_STUB is not set
819# CONFIG_I2C_TINY_USB is not set
825# CONFIG_I2C_VIA is not set 820# CONFIG_I2C_VIA is not set
826# CONFIG_I2C_VIAPRO is not set 821# CONFIG_I2C_VIAPRO is not set
827# CONFIG_I2C_VOODOO3 is not set 822# CONFIG_I2C_VOODOO3 is not set
828# CONFIG_I2C_PCA_ISA is not set
829 823
830# 824#
831# Miscellaneous I2C Chip support 825# Miscellaneous I2C Chip support
@@ -859,21 +853,21 @@ CONFIG_SPI_MPC83xx=y
859# 853#
860# SPI Protocol Masters 854# SPI Protocol Masters
861# 855#
856# CONFIG_SPI_AT25 is not set
857# CONFIG_SPI_SPIDEV is not set
862 858
863# 859#
864# Dallas's 1-wire bus 860# Dallas's 1-wire bus
865# 861#
866# CONFIG_W1 is not set 862# CONFIG_W1 is not set
867
868#
869# Hardware Monitoring support
870#
871CONFIG_HWMON=y 863CONFIG_HWMON=y
872# CONFIG_HWMON_VID is not set 864# CONFIG_HWMON_VID is not set
873# CONFIG_SENSORS_ABITUGURU is not set 865# CONFIG_SENSORS_ABITUGURU is not set
866# CONFIG_SENSORS_AD7418 is not set
874# CONFIG_SENSORS_ADM1021 is not set 867# CONFIG_SENSORS_ADM1021 is not set
875# CONFIG_SENSORS_ADM1025 is not set 868# CONFIG_SENSORS_ADM1025 is not set
876# CONFIG_SENSORS_ADM1026 is not set 869# CONFIG_SENSORS_ADM1026 is not set
870# CONFIG_SENSORS_ADM1029 is not set
877# CONFIG_SENSORS_ADM1031 is not set 871# CONFIG_SENSORS_ADM1031 is not set
878# CONFIG_SENSORS_ADM9240 is not set 872# CONFIG_SENSORS_ADM9240 is not set
879# CONFIG_SENSORS_ASB100 is not set 873# CONFIG_SENSORS_ASB100 is not set
@@ -897,6 +891,7 @@ CONFIG_HWMON=y
897# CONFIG_SENSORS_LM90 is not set 891# CONFIG_SENSORS_LM90 is not set
898# CONFIG_SENSORS_LM92 is not set 892# CONFIG_SENSORS_LM92 is not set
899# CONFIG_SENSORS_MAX1619 is not set 893# CONFIG_SENSORS_MAX1619 is not set
894# CONFIG_SENSORS_MAX6650 is not set
900# CONFIG_SENSORS_PC87360 is not set 895# CONFIG_SENSORS_PC87360 is not set
901# CONFIG_SENSORS_PC87427 is not set 896# CONFIG_SENSORS_PC87427 is not set
902# CONFIG_SENSORS_SIS5595 is not set 897# CONFIG_SENSORS_SIS5595 is not set
@@ -916,23 +911,30 @@ CONFIG_HWMON=y
916# CONFIG_HWMON_DEBUG_CHIP is not set 911# CONFIG_HWMON_DEBUG_CHIP is not set
917 912
918# 913#
919# Multimedia devices 914# Multifunction device drivers
920# 915#
921# CONFIG_VIDEO_DEV is not set 916# CONFIG_MFD_SM501 is not set
922 917
923# 918#
924# Digital Video Broadcasting Devices 919# Multimedia devices
925# 920#
926# CONFIG_DVB is not set 921# CONFIG_VIDEO_DEV is not set
922# CONFIG_DVB_CORE is not set
923CONFIG_DAB=y
927# CONFIG_USB_DABUSB is not set 924# CONFIG_USB_DABUSB is not set
928 925
929# 926#
930# Graphics support 927# Graphics support
931# 928#
932CONFIG_FIRMWARE_EDID=y 929# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
930
931#
932# Display device support
933#
934# CONFIG_DISPLAY_SUPPORT is not set
935# CONFIG_VGASTATE is not set
933# CONFIG_FB is not set 936# CONFIG_FB is not set
934# CONFIG_FB_IBM_GXT4500 is not set 937# CONFIG_FB_IBM_GXT4500 is not set
935# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
936 938
937# 939#
938# Sound 940# Sound
@@ -943,6 +945,18 @@ CONFIG_FIRMWARE_EDID=y
943# HID Devices 945# HID Devices
944# 946#
945CONFIG_HID=y 947CONFIG_HID=y
948# CONFIG_HID_DEBUG is not set
949
950#
951# USB Input Devices
952#
953# CONFIG_USB_HID is not set
954
955#
956# USB HID Boot Protocol drivers
957#
958# CONFIG_USB_KBD is not set
959# CONFIG_USB_MOUSE is not set
946 960
947# 961#
948# USB support 962# USB support
@@ -957,7 +971,7 @@ CONFIG_USB=y
957# Miscellaneous USB options 971# Miscellaneous USB options
958# 972#
959CONFIG_USB_DEVICEFS=y 973CONFIG_USB_DEVICEFS=y
960# CONFIG_USB_BANDWIDTH is not set 974CONFIG_USB_DEVICE_CLASS=y
961# CONFIG_USB_DYNAMIC_MINORS is not set 975# CONFIG_USB_DYNAMIC_MINORS is not set
962# CONFIG_USB_OTG is not set 976# CONFIG_USB_OTG is not set
963 977
@@ -968,9 +982,15 @@ CONFIG_USB_EHCI_HCD=y
968# CONFIG_USB_EHCI_SPLIT_ISO is not set 982# CONFIG_USB_EHCI_SPLIT_ISO is not set
969# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 983# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
970# CONFIG_USB_EHCI_TT_NEWSCHED is not set 984# CONFIG_USB_EHCI_TT_NEWSCHED is not set
985# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
971# CONFIG_USB_ISP116X_HCD is not set 986# CONFIG_USB_ISP116X_HCD is not set
972CONFIG_USB_OHCI_HCD=y 987CONFIG_USB_OHCI_HCD=y
973# CONFIG_USB_OHCI_BIG_ENDIAN is not set 988CONFIG_USB_OHCI_HCD_PPC_OF=y
989CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
990# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
991CONFIG_USB_OHCI_HCD_PCI=y
992CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
993CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
974CONFIG_USB_OHCI_LITTLE_ENDIAN=y 994CONFIG_USB_OHCI_LITTLE_ENDIAN=y
975CONFIG_USB_UHCI_HCD=y 995CONFIG_USB_UHCI_HCD=y
976# CONFIG_USB_SL811_HCD is not set 996# CONFIG_USB_SL811_HCD is not set
@@ -1002,43 +1022,10 @@ CONFIG_USB_STORAGE=y
1002# CONFIG_USB_LIBUSUAL is not set 1022# CONFIG_USB_LIBUSUAL is not set
1003 1023
1004# 1024#
1005# USB Input Devices
1006#
1007# CONFIG_USB_HID is not set
1008
1009#
1010# USB HID Boot Protocol drivers
1011#
1012# CONFIG_USB_KBD is not set
1013# CONFIG_USB_MOUSE is not set
1014# CONFIG_USB_AIPTEK is not set
1015# CONFIG_USB_WACOM is not set
1016# CONFIG_USB_ACECAD is not set
1017# CONFIG_USB_KBTAB is not set
1018# CONFIG_USB_POWERMATE is not set
1019# CONFIG_USB_TOUCHSCREEN is not set
1020# CONFIG_USB_YEALINK is not set
1021# CONFIG_USB_XPAD is not set
1022# CONFIG_USB_ATI_REMOTE is not set
1023# CONFIG_USB_ATI_REMOTE2 is not set
1024# CONFIG_USB_KEYSPAN_REMOTE is not set
1025# CONFIG_USB_APPLETOUCH is not set
1026
1027#
1028# USB Imaging devices 1025# USB Imaging devices
1029# 1026#
1030# CONFIG_USB_MDC800 is not set 1027# CONFIG_USB_MDC800 is not set
1031# CONFIG_USB_MICROTEK is not set 1028# CONFIG_USB_MICROTEK is not set
1032
1033#
1034# USB Network Adapters
1035#
1036# CONFIG_USB_CATC is not set
1037# CONFIG_USB_KAWETH is not set
1038# CONFIG_USB_PEGASUS is not set
1039# CONFIG_USB_RTL8150 is not set
1040# CONFIG_USB_USBNET_MII is not set
1041# CONFIG_USB_USBNET is not set
1042CONFIG_USB_MON=y 1029CONFIG_USB_MON=y
1043 1030
1044# 1031#
@@ -1060,6 +1047,7 @@ CONFIG_USB_MON=y
1060# CONFIG_USB_RIO500 is not set 1047# CONFIG_USB_RIO500 is not set
1061# CONFIG_USB_LEGOTOWER is not set 1048# CONFIG_USB_LEGOTOWER is not set
1062# CONFIG_USB_LCD is not set 1049# CONFIG_USB_LCD is not set
1050# CONFIG_USB_BERRY_CHARGE is not set
1063# CONFIG_USB_LED is not set 1051# CONFIG_USB_LED is not set
1064# CONFIG_USB_CYPRESS_CY7C63 is not set 1052# CONFIG_USB_CYPRESS_CY7C63 is not set
1065# CONFIG_USB_CYTHERM is not set 1053# CONFIG_USB_CYTHERM is not set
@@ -1070,6 +1058,7 @@ CONFIG_USB_MON=y
1070# CONFIG_USB_SISUSBVGA is not set 1058# CONFIG_USB_SISUSBVGA is not set
1071# CONFIG_USB_LD is not set 1059# CONFIG_USB_LD is not set
1072# CONFIG_USB_TRANCEVIBRATOR is not set 1060# CONFIG_USB_TRANCEVIBRATOR is not set
1061# CONFIG_USB_IOWARRIOR is not set
1073# CONFIG_USB_TEST is not set 1062# CONFIG_USB_TEST is not set
1074 1063
1075# 1064#
@@ -1082,6 +1071,7 @@ CONFIG_USB_MON=y
1082CONFIG_USB_GADGET=y 1071CONFIG_USB_GADGET=y
1083# CONFIG_USB_GADGET_DEBUG_FILES is not set 1072# CONFIG_USB_GADGET_DEBUG_FILES is not set
1084CONFIG_USB_GADGET_SELECTED=y 1073CONFIG_USB_GADGET_SELECTED=y
1074# CONFIG_USB_GADGET_FSL_USB2 is not set
1085CONFIG_USB_GADGET_NET2280=y 1075CONFIG_USB_GADGET_NET2280=y
1086CONFIG_USB_NET2280=y 1076CONFIG_USB_NET2280=y
1087# CONFIG_USB_GADGET_PXA2XX is not set 1077# CONFIG_USB_GADGET_PXA2XX is not set
@@ -1098,10 +1088,6 @@ CONFIG_USB_ETH_RNDIS=y
1098# CONFIG_USB_FILE_STORAGE is not set 1088# CONFIG_USB_FILE_STORAGE is not set
1099# CONFIG_USB_G_SERIAL is not set 1089# CONFIG_USB_G_SERIAL is not set
1100# CONFIG_USB_MIDI_GADGET is not set 1090# CONFIG_USB_MIDI_GADGET is not set
1101
1102#
1103# MMC/SD Card support
1104#
1105# CONFIG_MMC is not set 1091# CONFIG_MMC is not set
1106 1092
1107# 1093#
@@ -1142,26 +1128,39 @@ CONFIG_RTC_INTF_SYSFS=y
1142CONFIG_RTC_INTF_PROC=y 1128CONFIG_RTC_INTF_PROC=y
1143CONFIG_RTC_INTF_DEV=y 1129CONFIG_RTC_INTF_DEV=y
1144CONFIG_RTC_INTF_DEV_UIE_EMUL=y 1130CONFIG_RTC_INTF_DEV_UIE_EMUL=y
1131# CONFIG_RTC_DRV_TEST is not set
1145 1132
1146# 1133#
1147# RTC drivers 1134# I2C RTC drivers
1148# 1135#
1149# CONFIG_RTC_DRV_X1205 is not set
1150CONFIG_RTC_DRV_DS1307=y 1136CONFIG_RTC_DRV_DS1307=y
1151# CONFIG_RTC_DRV_DS1553 is not set
1152# CONFIG_RTC_DRV_ISL1208 is not set
1153# CONFIG_RTC_DRV_DS1672 is not set 1137# CONFIG_RTC_DRV_DS1672 is not set
1154# CONFIG_RTC_DRV_DS1742 is not set 1138# CONFIG_RTC_DRV_MAX6900 is not set
1139# CONFIG_RTC_DRV_RS5C372 is not set
1140# CONFIG_RTC_DRV_ISL1208 is not set
1141# CONFIG_RTC_DRV_X1205 is not set
1155# CONFIG_RTC_DRV_PCF8563 is not set 1142# CONFIG_RTC_DRV_PCF8563 is not set
1156# CONFIG_RTC_DRV_PCF8583 is not set 1143# CONFIG_RTC_DRV_PCF8583 is not set
1144
1145#
1146# SPI RTC drivers
1147#
1157# CONFIG_RTC_DRV_RS5C348 is not set 1148# CONFIG_RTC_DRV_RS5C348 is not set
1158# CONFIG_RTC_DRV_RS5C372 is not set
1159# CONFIG_RTC_DRV_M48T86 is not set
1160# CONFIG_RTC_DRV_TEST is not set
1161# CONFIG_RTC_DRV_MAX6902 is not set 1149# CONFIG_RTC_DRV_MAX6902 is not set
1150
1151#
1152# Platform RTC drivers
1153#
1154# CONFIG_RTC_DRV_DS1553 is not set
1155# CONFIG_RTC_DRV_DS1742 is not set
1156# CONFIG_RTC_DRV_M48T86 is not set
1162# CONFIG_RTC_DRV_V3020 is not set 1157# CONFIG_RTC_DRV_V3020 is not set
1163 1158
1164# 1159#
1160# on-CPU RTC drivers
1161#
1162
1163#
1165# DMA Engine support 1164# DMA Engine support
1166# 1165#
1167CONFIG_DMA_ENGINE=y 1166CONFIG_DMA_ENGINE=y
@@ -1177,10 +1176,6 @@ CONFIG_NET_DMA=y
1177CONFIG_INTEL_IOATDMA=y 1176CONFIG_INTEL_IOATDMA=y
1178 1177
1179# 1178#
1180# Virtualization
1181#
1182
1183#
1184# File systems 1179# File systems
1185# 1180#
1186CONFIG_EXT2_FS=y 1181CONFIG_EXT2_FS=y
@@ -1269,6 +1264,7 @@ CONFIG_LOCKD_V4=y
1269CONFIG_NFS_COMMON=y 1264CONFIG_NFS_COMMON=y
1270CONFIG_SUNRPC=y 1265CONFIG_SUNRPC=y
1271CONFIG_SUNRPC_GSS=y 1266CONFIG_SUNRPC_GSS=y
1267# CONFIG_SUNRPC_BIND34 is not set
1272CONFIG_RPCSEC_GSS_KRB5=y 1268CONFIG_RPCSEC_GSS_KRB5=y
1273# CONFIG_RPCSEC_GSS_SPKM3 is not set 1269# CONFIG_RPCSEC_GSS_SPKM3 is not set
1274# CONFIG_SMB_FS is not set 1270# CONFIG_SMB_FS is not set
@@ -1298,6 +1294,7 @@ CONFIG_MSDOS_PARTITION=y
1298# CONFIG_SUN_PARTITION is not set 1294# CONFIG_SUN_PARTITION is not set
1299# CONFIG_KARMA_PARTITION is not set 1295# CONFIG_KARMA_PARTITION is not set
1300# CONFIG_EFI_PARTITION is not set 1296# CONFIG_EFI_PARTITION is not set
1297# CONFIG_SYSV68_PARTITION is not set
1301 1298
1302# 1299#
1303# Native Language Support 1300# Native Language Support
@@ -1308,6 +1305,7 @@ CONFIG_MSDOS_PARTITION=y
1308# Distributed Lock Manager 1305# Distributed Lock Manager
1309# 1306#
1310# CONFIG_DLM is not set 1307# CONFIG_DLM is not set
1308# CONFIG_UCC_SLOW is not set
1311 1309
1312# 1310#
1313# Library routines 1311# Library routines
@@ -1315,10 +1313,13 @@ CONFIG_MSDOS_PARTITION=y
1315CONFIG_BITREVERSE=y 1313CONFIG_BITREVERSE=y
1316# CONFIG_CRC_CCITT is not set 1314# CONFIG_CRC_CCITT is not set
1317# CONFIG_CRC16 is not set 1315# CONFIG_CRC16 is not set
1316# CONFIG_CRC_ITU_T is not set
1318CONFIG_CRC32=y 1317CONFIG_CRC32=y
1319# CONFIG_LIBCRC32C is not set 1318# CONFIG_LIBCRC32C is not set
1320CONFIG_PLIST=y 1319CONFIG_PLIST=y
1321CONFIG_IOMAP_COPY=y 1320CONFIG_HAS_IOMEM=y
1321CONFIG_HAS_IOPORT=y
1322CONFIG_HAS_DMA=y
1322 1323
1323# 1324#
1324# Instrumentation Support 1325# Instrumentation Support
@@ -1335,15 +1336,15 @@ CONFIG_ENABLE_MUST_CHECK=y
1335# CONFIG_DEBUG_FS is not set 1336# CONFIG_DEBUG_FS is not set
1336# CONFIG_HEADERS_CHECK is not set 1337# CONFIG_HEADERS_CHECK is not set
1337CONFIG_DEBUG_KERNEL=y 1338CONFIG_DEBUG_KERNEL=y
1338CONFIG_LOG_BUF_SHIFT=14 1339# CONFIG_DEBUG_SHIRQ is not set
1339CONFIG_DETECT_SOFTLOCKUP=y 1340CONFIG_DETECT_SOFTLOCKUP=y
1340# CONFIG_SCHEDSTATS is not set 1341# CONFIG_SCHEDSTATS is not set
1342# CONFIG_TIMER_STATS is not set
1341# CONFIG_DEBUG_SLAB is not set 1343# CONFIG_DEBUG_SLAB is not set
1342# CONFIG_DEBUG_RT_MUTEXES is not set 1344# CONFIG_DEBUG_RT_MUTEXES is not set
1343# CONFIG_RT_MUTEX_TESTER is not set 1345# CONFIG_RT_MUTEX_TESTER is not set
1344# CONFIG_DEBUG_SPINLOCK is not set 1346# CONFIG_DEBUG_SPINLOCK is not set
1345# CONFIG_DEBUG_MUTEXES is not set 1347# CONFIG_DEBUG_MUTEXES is not set
1346# CONFIG_DEBUG_RWSEMS is not set
1347# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1348# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1348# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1349# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1349# CONFIG_DEBUG_KOBJECT is not set 1350# CONFIG_DEBUG_KOBJECT is not set
@@ -1353,12 +1354,13 @@ CONFIG_DETECT_SOFTLOCKUP=y
1353# CONFIG_DEBUG_LIST is not set 1354# CONFIG_DEBUG_LIST is not set
1354CONFIG_FORCED_INLINING=y 1355CONFIG_FORCED_INLINING=y
1355# CONFIG_RCU_TORTURE_TEST is not set 1356# CONFIG_RCU_TORTURE_TEST is not set
1357# CONFIG_FAULT_INJECTION is not set
1356# CONFIG_DEBUG_STACKOVERFLOW is not set 1358# CONFIG_DEBUG_STACKOVERFLOW is not set
1357# CONFIG_DEBUG_STACK_USAGE is not set 1359# CONFIG_DEBUG_STACK_USAGE is not set
1360# CONFIG_DEBUG_PAGEALLOC is not set
1358# CONFIG_DEBUGGER is not set 1361# CONFIG_DEBUGGER is not set
1359# CONFIG_BDI_SWITCH is not set 1362# CONFIG_BDI_SWITCH is not set
1360# CONFIG_BOOTX_TEXT is not set 1363# CONFIG_BOOTX_TEXT is not set
1361# CONFIG_SERIAL_TEXT_DEBUG is not set
1362# CONFIG_PPC_EARLY_DEBUG is not set 1364# CONFIG_PPC_EARLY_DEBUG is not set
1363 1365
1364# 1366#
@@ -1387,8 +1389,11 @@ CONFIG_CRYPTO_MD5=y
1387# CONFIG_CRYPTO_GF128MUL is not set 1389# CONFIG_CRYPTO_GF128MUL is not set
1388# CONFIG_CRYPTO_ECB is not set 1390# CONFIG_CRYPTO_ECB is not set
1389CONFIG_CRYPTO_CBC=y 1391CONFIG_CRYPTO_CBC=y
1392CONFIG_CRYPTO_PCBC=m
1390# CONFIG_CRYPTO_LRW is not set 1393# CONFIG_CRYPTO_LRW is not set
1394# CONFIG_CRYPTO_CRYPTD is not set
1391CONFIG_CRYPTO_DES=y 1395CONFIG_CRYPTO_DES=y
1396# CONFIG_CRYPTO_FCRYPT is not set
1392# CONFIG_CRYPTO_BLOWFISH is not set 1397# CONFIG_CRYPTO_BLOWFISH is not set
1393# CONFIG_CRYPTO_TWOFISH is not set 1398# CONFIG_CRYPTO_TWOFISH is not set
1394# CONFIG_CRYPTO_SERPENT is not set 1399# CONFIG_CRYPTO_SERPENT is not set
@@ -1402,6 +1407,7 @@ CONFIG_CRYPTO_DES=y
1402# CONFIG_CRYPTO_DEFLATE is not set 1407# CONFIG_CRYPTO_DEFLATE is not set
1403# CONFIG_CRYPTO_MICHAEL_MIC is not set 1408# CONFIG_CRYPTO_MICHAEL_MIC is not set
1404# CONFIG_CRYPTO_CRC32C is not set 1409# CONFIG_CRYPTO_CRC32C is not set
1410# CONFIG_CRYPTO_CAMELLIA is not set
1405# CONFIG_CRYPTO_TEST is not set 1411# CONFIG_CRYPTO_TEST is not set
1406 1412
1407# 1413#
diff --git a/arch/powerpc/configs/mpc832x_mds_defconfig b/arch/powerpc/configs/mpc832x_mds_defconfig
index 83192c0dc5bb..75ce78139a11 100644
--- a/arch/powerpc/configs/mpc832x_mds_defconfig
+++ b/arch/powerpc/configs/mpc832x_mds_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.21-rc5 3# Linux kernel version: 2.6.22-rc7
4# Mon Apr 9 16:09:16 2007 4# Sun Jul 1 23:56:55 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_PPC_DCR_MMIO is not set 45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -70,6 +71,7 @@ CONFIG_SYSVIPC_SYSCTL=y
70# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
75CONFIG_BLK_DEV_INITRD=y 77CONFIG_BLK_DEV_INITRD=y
@@ -85,14 +87,19 @@ CONFIG_BUG=y
85CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
86CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
87CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
88# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 95CONFIG_SHMEM=y
90CONFIG_SLAB=y
91CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
92CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
93# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
94CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
95# CONFIG_SLOB is not set
96 103
97# 104#
98# Loadable module support 105# Loadable module support
@@ -124,12 +131,15 @@ CONFIG_DEFAULT_AS=y
124# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
125# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
126CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
127CONFIG_QUICC_ENGINE=y
128# CONFIG_WANT_EARLY_SERIAL is not set
129 134
130# 135#
131# Platform support 136# Platform support
132# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
133# CONFIG_MPC8313_RDB is not set 143# CONFIG_MPC8313_RDB is not set
134CONFIG_MPC832x_MDS=y 144CONFIG_MPC832x_MDS=y
135# CONFIG_MPC832x_RDB is not set 145# CONFIG_MPC832x_RDB is not set
@@ -138,6 +148,17 @@ CONFIG_MPC832x_MDS=y
138# CONFIG_MPC836x_MDS is not set 148# CONFIG_MPC836x_MDS is not set
139CONFIG_PPC_MPC832x=y 149CONFIG_PPC_MPC832x=y
140# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160CONFIG_QUICC_ENGINE=y
161# CONFIG_CPM2 is not set
141 162
142# 163#
143# Kernel options 164# Kernel options
@@ -171,6 +192,8 @@ CONFIG_PROC_DEVICETREE=y
171# CONFIG_CMDLINE_BOOL is not set 192# CONFIG_CMDLINE_BOOL is not set
172# CONFIG_PM is not set 193# CONFIG_PM is not set
173CONFIG_SECCOMP=y 194CONFIG_SECCOMP=y
195CONFIG_WANT_DEVICE_TREE=y
196CONFIG_DEVICE_TREE=""
174CONFIG_ISA_DMA_API=y 197CONFIG_ISA_DMA_API=y
175 198
176# 199#
@@ -178,22 +201,19 @@ CONFIG_ISA_DMA_API=y
178# 201#
179CONFIG_ZONE_DMA=y 202CONFIG_ZONE_DMA=y
180CONFIG_GENERIC_ISA_DMA=y 203CONFIG_GENERIC_ISA_DMA=y
181# CONFIG_MPIC_WEIRD is not set
182# CONFIG_PPC_I8259 is not set
183CONFIG_PPC_INDIRECT_PCI=y 204CONFIG_PPC_INDIRECT_PCI=y
205# CONFIG_PPC_INDIRECT_PCI_BE is not set
184CONFIG_FSL_SOC=y 206CONFIG_FSL_SOC=y
185CONFIG_PCI=y 207CONFIG_PCI=y
186CONFIG_PCI_DOMAINS=y 208CONFIG_PCI_DOMAINS=y
187# CONFIG_PCIEPORTBUS is not set 209# CONFIG_PCIEPORTBUS is not set
210CONFIG_ARCH_SUPPORTS_MSI=y
211# CONFIG_PCI_MSI is not set
188 212
189# 213#
190# PCCARD (PCMCIA/CardBus) support 214# PCCARD (PCMCIA/CardBus) support
191# 215#
192# CONFIG_PCCARD is not set 216# CONFIG_PCCARD is not set
193
194#
195# PCI Hotplug Support
196#
197# CONFIG_HOTPLUG_PCI is not set 217# CONFIG_HOTPLUG_PCI is not set
198 218
199# 219#
@@ -218,7 +238,6 @@ CONFIG_NET=y
218# 238#
219# Networking options 239# Networking options
220# 240#
221# CONFIG_NETDEBUG is not set
222CONFIG_PACKET=y 241CONFIG_PACKET=y
223# CONFIG_PACKET_MMAP is not set 242# CONFIG_PACKET_MMAP is not set
224CONFIG_UNIX=y 243CONFIG_UNIX=y
@@ -259,20 +278,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
259# CONFIG_INET6_TUNNEL is not set 278# CONFIG_INET6_TUNNEL is not set
260# CONFIG_NETWORK_SECMARK is not set 279# CONFIG_NETWORK_SECMARK is not set
261# CONFIG_NETFILTER is not set 280# CONFIG_NETFILTER is not set
262
263#
264# DCCP Configuration (EXPERIMENTAL)
265#
266# CONFIG_IP_DCCP is not set 281# CONFIG_IP_DCCP is not set
267
268#
269# SCTP Configuration (EXPERIMENTAL)
270#
271# CONFIG_IP_SCTP is not set 282# CONFIG_IP_SCTP is not set
272
273#
274# TIPC Configuration (EXPERIMENTAL)
275#
276# CONFIG_TIPC is not set 283# CONFIG_TIPC is not set
277# CONFIG_ATM is not set 284# CONFIG_ATM is not set
278# CONFIG_BRIDGE is not set 285# CONFIG_BRIDGE is not set
@@ -298,7 +305,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
298# CONFIG_HAMRADIO is not set 305# CONFIG_HAMRADIO is not set
299# CONFIG_IRDA is not set 306# CONFIG_IRDA is not set
300# CONFIG_BT is not set 307# CONFIG_BT is not set
308# CONFIG_AF_RXRPC is not set
309
310#
311# Wireless
312#
313# CONFIG_CFG80211 is not set
314# CONFIG_WIRELESS_EXT is not set
315# CONFIG_MAC80211 is not set
301# CONFIG_IEEE80211 is not set 316# CONFIG_IEEE80211 is not set
317# CONFIG_RFKILL is not set
302 318
303# 319#
304# Device Drivers 320# Device Drivers
@@ -316,10 +332,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
316# Connector - unified userspace <-> kernelspace linker 332# Connector - unified userspace <-> kernelspace linker
317# 333#
318# CONFIG_CONNECTOR is not set 334# CONFIG_CONNECTOR is not set
319
320#
321# Memory Technology Devices (MTD)
322#
323# CONFIG_MTD is not set 335# CONFIG_MTD is not set
324 336
325# 337#
@@ -355,12 +367,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
355# 367#
356# Misc devices 368# Misc devices
357# 369#
370# CONFIG_PHANTOM is not set
358# CONFIG_SGI_IOC4 is not set 371# CONFIG_SGI_IOC4 is not set
359# CONFIG_TIFM_CORE is not set 372# CONFIG_TIFM_CORE is not set
360 373# CONFIG_BLINK is not set
361#
362# ATA/ATAPI/MFM/RLL support
363#
364# CONFIG_IDE is not set 374# CONFIG_IDE is not set
365 375
366# 376#
@@ -389,6 +399,7 @@ CONFIG_SCSI_PROC_FS=y
389# CONFIG_SCSI_CONSTANTS is not set 399# CONFIG_SCSI_CONSTANTS is not set
390# CONFIG_SCSI_LOGGING is not set 400# CONFIG_SCSI_LOGGING is not set
391# CONFIG_SCSI_SCAN_ASYNC is not set 401# CONFIG_SCSI_SCAN_ASYNC is not set
402CONFIG_SCSI_WAIT_SCAN=m
392 403
393# 404#
394# SCSI Transports 405# SCSI Transports
@@ -436,10 +447,6 @@ CONFIG_SCSI_PROC_FS=y
436# CONFIG_SCSI_NSP32 is not set 447# CONFIG_SCSI_NSP32 is not set
437# CONFIG_SCSI_DEBUG is not set 448# CONFIG_SCSI_DEBUG is not set
438# CONFIG_SCSI_SRP is not set 449# CONFIG_SCSI_SRP is not set
439
440#
441# Serial ATA (prod) and Parallel ATA (experimental) drivers
442#
443# CONFIG_ATA is not set 450# CONFIG_ATA is not set
444 451
445# 452#
@@ -458,18 +465,14 @@ CONFIG_SCSI_PROC_FS=y
458# 465#
459# IEEE 1394 (FireWire) support 466# IEEE 1394 (FireWire) support
460# 467#
468# CONFIG_FIREWIRE is not set
461# CONFIG_IEEE1394 is not set 469# CONFIG_IEEE1394 is not set
462 470
463# 471#
464# I2O device support 472# I2O device support
465# 473#
466# CONFIG_I2O is not set 474# CONFIG_I2O is not set
467 475# CONFIG_MACINTOSH_DRIVERS is not set
468#
469# Macintosh device drivers
470#
471# CONFIG_MAC_EMUMOUSEBTN is not set
472# CONFIG_WINDFARM is not set
473 476
474# 477#
475# Network device support 478# Network device support
@@ -479,15 +482,7 @@ CONFIG_NETDEVICES=y
479# CONFIG_BONDING is not set 482# CONFIG_BONDING is not set
480# CONFIG_EQUALIZER is not set 483# CONFIG_EQUALIZER is not set
481# CONFIG_TUN is not set 484# CONFIG_TUN is not set
482
483#
484# ARCnet devices
485#
486# CONFIG_ARCNET is not set 485# CONFIG_ARCNET is not set
487
488#
489# PHY device support
490#
491CONFIG_PHYLIB=y 486CONFIG_PHYLIB=y
492 487
493# 488#
@@ -501,7 +496,6 @@ CONFIG_DAVICOM_PHY=y
501# CONFIG_VITESSE_PHY is not set 496# CONFIG_VITESSE_PHY is not set
502# CONFIG_SMSC_PHY is not set 497# CONFIG_SMSC_PHY is not set
503# CONFIG_BROADCOM_PHY is not set 498# CONFIG_BROADCOM_PHY is not set
504# CONFIG_ICPLUS_PHY is not set
505# CONFIG_FIXED_PHY is not set 499# CONFIG_FIXED_PHY is not set
506 500
507# 501#
@@ -520,10 +514,7 @@ CONFIG_MII=y
520# CONFIG_NET_TULIP is not set 514# CONFIG_NET_TULIP is not set
521# CONFIG_HP100 is not set 515# CONFIG_HP100 is not set
522# CONFIG_NET_PCI is not set 516# CONFIG_NET_PCI is not set
523 517CONFIG_NETDEV_1000=y
524#
525# Ethernet (1000 Mbit)
526#
527# CONFIG_ACENIC is not set 518# CONFIG_ACENIC is not set
528# CONFIG_DL2K is not set 519# CONFIG_DL2K is not set
529# CONFIG_E1000 is not set 520# CONFIG_E1000 is not set
@@ -535,6 +526,7 @@ CONFIG_MII=y
535# CONFIG_SKGE is not set 526# CONFIG_SKGE is not set
536# CONFIG_SKY2 is not set 527# CONFIG_SKY2 is not set
537# CONFIG_SK98LIN is not set 528# CONFIG_SK98LIN is not set
529# CONFIG_VIA_VELOCITY is not set
538# CONFIG_TIGON3 is not set 530# CONFIG_TIGON3 is not set
539# CONFIG_BNX2 is not set 531# CONFIG_BNX2 is not set
540# CONFIG_GIANFAR is not set 532# CONFIG_GIANFAR is not set
@@ -542,33 +534,24 @@ CONFIG_UCC_GETH=y
542# CONFIG_UGETH_NAPI is not set 534# CONFIG_UGETH_NAPI is not set
543# CONFIG_UGETH_MAGIC_PACKET is not set 535# CONFIG_UGETH_MAGIC_PACKET is not set
544# CONFIG_UGETH_FILTERING is not set 536# CONFIG_UGETH_FILTERING is not set
545# CONFIG_UGETH_TX_ON_DEMOND is not set 537# CONFIG_UGETH_TX_ON_DEMAND is not set
546# CONFIG_QLA3XXX is not set 538# CONFIG_QLA3XXX is not set
547# CONFIG_ATL1 is not set 539# CONFIG_ATL1 is not set
548 540CONFIG_NETDEV_10000=y
549#
550# Ethernet (10000 Mbit)
551#
552# CONFIG_CHELSIO_T1 is not set 541# CONFIG_CHELSIO_T1 is not set
553# CONFIG_CHELSIO_T3 is not set 542# CONFIG_CHELSIO_T3 is not set
554# CONFIG_IXGB is not set 543# CONFIG_IXGB is not set
555# CONFIG_S2IO is not set 544# CONFIG_S2IO is not set
556# CONFIG_MYRI10GE is not set 545# CONFIG_MYRI10GE is not set
557# CONFIG_NETXEN_NIC is not set 546# CONFIG_NETXEN_NIC is not set
558 547# CONFIG_MLX4_CORE is not set
559#
560# Token Ring devices
561#
562# CONFIG_TR is not set 548# CONFIG_TR is not set
563 549
564# 550#
565# Wireless LAN (non-hamradio) 551# Wireless LAN
566#
567# CONFIG_NET_RADIO is not set
568
569#
570# Wan interfaces
571# 552#
553# CONFIG_WLAN_PRE80211 is not set
554# CONFIG_WLAN_80211 is not set
572# CONFIG_WAN is not set 555# CONFIG_WAN is not set
573# CONFIG_FDDI is not set 556# CONFIG_FDDI is not set
574# CONFIG_HIPPI is not set 557# CONFIG_HIPPI is not set
@@ -595,6 +578,7 @@ CONFIG_UCC_GETH=y
595# 578#
596CONFIG_INPUT=y 579CONFIG_INPUT=y
597# CONFIG_INPUT_FF_MEMLESS is not set 580# CONFIG_INPUT_FF_MEMLESS is not set
581# CONFIG_INPUT_POLLDEV is not set
598 582
599# 583#
600# Userland interfaces 584# Userland interfaces
@@ -611,6 +595,7 @@ CONFIG_INPUT=y
611# CONFIG_INPUT_KEYBOARD is not set 595# CONFIG_INPUT_KEYBOARD is not set
612# CONFIG_INPUT_MOUSE is not set 596# CONFIG_INPUT_MOUSE is not set
613# CONFIG_INPUT_JOYSTICK is not set 597# CONFIG_INPUT_JOYSTICK is not set
598# CONFIG_INPUT_TABLET is not set
614# CONFIG_INPUT_TOUCHSCREEN is not set 599# CONFIG_INPUT_TOUCHSCREEN is not set
615# CONFIG_INPUT_MISC is not set 600# CONFIG_INPUT_MISC is not set
616 601
@@ -652,10 +637,6 @@ CONFIG_LEGACY_PTY_COUNT=256
652# IPMI 637# IPMI
653# 638#
654# CONFIG_IPMI_HANDLER is not set 639# CONFIG_IPMI_HANDLER is not set
655
656#
657# Watchdog Cards
658#
659CONFIG_WATCHDOG=y 640CONFIG_WATCHDOG=y
660# CONFIG_WATCHDOG_NOWAYOUT is not set 641# CONFIG_WATCHDOG_NOWAYOUT is not set
661 642
@@ -674,7 +655,6 @@ CONFIG_HW_RANDOM=y
674# CONFIG_NVRAM is not set 655# CONFIG_NVRAM is not set
675CONFIG_GEN_RTC=y 656CONFIG_GEN_RTC=y
676# CONFIG_GEN_RTC_X is not set 657# CONFIG_GEN_RTC_X is not set
677# CONFIG_DTLK is not set
678# CONFIG_R3964 is not set 658# CONFIG_R3964 is not set
679# CONFIG_APPLICOM is not set 659# CONFIG_APPLICOM is not set
680# CONFIG_AGP is not set 660# CONFIG_AGP is not set
@@ -685,11 +665,9 @@ CONFIG_GEN_RTC=y
685# TPM devices 665# TPM devices
686# 666#
687# CONFIG_TCG_TPM is not set 667# CONFIG_TCG_TPM is not set
688 668CONFIG_DEVPORT=y
689#
690# I2C support
691#
692CONFIG_I2C=y 669CONFIG_I2C=y
670CONFIG_I2C_BOARDINFO=y
693CONFIG_I2C_CHARDEV=y 671CONFIG_I2C_CHARDEV=y
694 672
695# 673#
@@ -714,9 +692,9 @@ CONFIG_I2C_MPC=y
714# CONFIG_I2C_NFORCE2 is not set 692# CONFIG_I2C_NFORCE2 is not set
715# CONFIG_I2C_OCORES is not set 693# CONFIG_I2C_OCORES is not set
716# CONFIG_I2C_PARPORT_LIGHT is not set 694# CONFIG_I2C_PARPORT_LIGHT is not set
717# CONFIG_I2C_PASEMI is not set
718# CONFIG_I2C_PROSAVAGE is not set 695# CONFIG_I2C_PROSAVAGE is not set
719# CONFIG_I2C_SAVAGE4 is not set 696# CONFIG_I2C_SAVAGE4 is not set
697# CONFIG_I2C_SIMTEC is not set
720# CONFIG_I2C_SIS5595 is not set 698# CONFIG_I2C_SIS5595 is not set
721# CONFIG_I2C_SIS630 is not set 699# CONFIG_I2C_SIS630 is not set
722# CONFIG_I2C_SIS96X is not set 700# CONFIG_I2C_SIS96X is not set
@@ -724,7 +702,6 @@ CONFIG_I2C_MPC=y
724# CONFIG_I2C_VIA is not set 702# CONFIG_I2C_VIA is not set
725# CONFIG_I2C_VIAPRO is not set 703# CONFIG_I2C_VIAPRO is not set
726# CONFIG_I2C_VOODOO3 is not set 704# CONFIG_I2C_VOODOO3 is not set
727# CONFIG_I2C_PCA_ISA is not set
728 705
729# 706#
730# Miscellaneous I2C Chip support 707# Miscellaneous I2C Chip support
@@ -752,13 +729,10 @@ CONFIG_I2C_MPC=y
752# Dallas's 1-wire bus 729# Dallas's 1-wire bus
753# 730#
754# CONFIG_W1 is not set 731# CONFIG_W1 is not set
755
756#
757# Hardware Monitoring support
758#
759CONFIG_HWMON=y 732CONFIG_HWMON=y
760# CONFIG_HWMON_VID is not set 733# CONFIG_HWMON_VID is not set
761# CONFIG_SENSORS_ABITUGURU is not set 734# CONFIG_SENSORS_ABITUGURU is not set
735# CONFIG_SENSORS_AD7418 is not set
762# CONFIG_SENSORS_ADM1021 is not set 736# CONFIG_SENSORS_ADM1021 is not set
763# CONFIG_SENSORS_ADM1025 is not set 737# CONFIG_SENSORS_ADM1025 is not set
764# CONFIG_SENSORS_ADM1026 is not set 738# CONFIG_SENSORS_ADM1026 is not set
@@ -785,6 +759,7 @@ CONFIG_HWMON=y
785# CONFIG_SENSORS_LM90 is not set 759# CONFIG_SENSORS_LM90 is not set
786# CONFIG_SENSORS_LM92 is not set 760# CONFIG_SENSORS_LM92 is not set
787# CONFIG_SENSORS_MAX1619 is not set 761# CONFIG_SENSORS_MAX1619 is not set
762# CONFIG_SENSORS_MAX6650 is not set
788# CONFIG_SENSORS_PC87360 is not set 763# CONFIG_SENSORS_PC87360 is not set
789# CONFIG_SENSORS_PC87427 is not set 764# CONFIG_SENSORS_PC87427 is not set
790# CONFIG_SENSORS_SIS5595 is not set 765# CONFIG_SENSORS_SIS5595 is not set
@@ -812,16 +787,19 @@ CONFIG_HWMON=y
812# Multimedia devices 787# Multimedia devices
813# 788#
814# CONFIG_VIDEO_DEV is not set 789# CONFIG_VIDEO_DEV is not set
790# CONFIG_DVB_CORE is not set
791CONFIG_DAB=y
815 792
816# 793#
817# Digital Video Broadcasting Devices 794# Graphics support
818# 795#
819# CONFIG_DVB is not set 796# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
820 797
821# 798#
822# Graphics support 799# Display device support
823# 800#
824# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 801# CONFIG_DISPLAY_SUPPORT is not set
802# CONFIG_VGASTATE is not set
825# CONFIG_FB is not set 803# CONFIG_FB is not set
826# CONFIG_FB_IBM_GXT4500 is not set 804# CONFIG_FB_IBM_GXT4500 is not set
827 805
@@ -852,10 +830,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
852# USB Gadget Support 830# USB Gadget Support
853# 831#
854# CONFIG_USB_GADGET is not set 832# CONFIG_USB_GADGET is not set
855
856#
857# MMC/SD Card support
858#
859# CONFIG_MMC is not set 833# CONFIG_MMC is not set
860 834
861# 835#
@@ -899,14 +873,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
899# 873#
900 874
901# 875#
902# Auxiliary Display support
903#
904
905#
906# Virtualization
907#
908
909#
910# File systems 876# File systems
911# 877#
912CONFIG_EXT2_FS=y 878CONFIG_EXT2_FS=y
@@ -994,6 +960,7 @@ CONFIG_LOCKD_V4=y
994CONFIG_NFS_COMMON=y 960CONFIG_NFS_COMMON=y
995CONFIG_SUNRPC=y 961CONFIG_SUNRPC=y
996CONFIG_SUNRPC_GSS=y 962CONFIG_SUNRPC_GSS=y
963# CONFIG_SUNRPC_BIND34 is not set
997CONFIG_RPCSEC_GSS_KRB5=y 964CONFIG_RPCSEC_GSS_KRB5=y
998# CONFIG_RPCSEC_GSS_SPKM3 is not set 965# CONFIG_RPCSEC_GSS_SPKM3 is not set
999# CONFIG_SMB_FS is not set 966# CONFIG_SMB_FS is not set
@@ -1019,6 +986,7 @@ CONFIG_PARTITION_ADVANCED=y
1019# CONFIG_SUN_PARTITION is not set 986# CONFIG_SUN_PARTITION is not set
1020# CONFIG_KARMA_PARTITION is not set 987# CONFIG_KARMA_PARTITION is not set
1021# CONFIG_EFI_PARTITION is not set 988# CONFIG_EFI_PARTITION is not set
989# CONFIG_SYSV68_PARTITION is not set
1022 990
1023# 991#
1024# Native Language Support 992# Native Language Support
@@ -1039,11 +1007,13 @@ CONFIG_UCC=y
1039CONFIG_BITREVERSE=y 1007CONFIG_BITREVERSE=y
1040# CONFIG_CRC_CCITT is not set 1008# CONFIG_CRC_CCITT is not set
1041# CONFIG_CRC16 is not set 1009# CONFIG_CRC16 is not set
1010# CONFIG_CRC_ITU_T is not set
1042CONFIG_CRC32=y 1011CONFIG_CRC32=y
1043# CONFIG_LIBCRC32C is not set 1012# CONFIG_LIBCRC32C is not set
1044CONFIG_PLIST=y 1013CONFIG_PLIST=y
1045CONFIG_HAS_IOMEM=y 1014CONFIG_HAS_IOMEM=y
1046CONFIG_HAS_IOPORT=y 1015CONFIG_HAS_IOPORT=y
1016CONFIG_HAS_DMA=y
1047 1017
1048# 1018#
1049# Instrumentation Support 1019# Instrumentation Support
@@ -1060,7 +1030,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1060# CONFIG_DEBUG_FS is not set 1030# CONFIG_DEBUG_FS is not set
1061# CONFIG_HEADERS_CHECK is not set 1031# CONFIG_HEADERS_CHECK is not set
1062# CONFIG_DEBUG_KERNEL is not set 1032# CONFIG_DEBUG_KERNEL is not set
1063CONFIG_LOG_BUF_SHIFT=14
1064# CONFIG_DEBUG_BUGVERBOSE is not set 1033# CONFIG_DEBUG_BUGVERBOSE is not set
1065# CONFIG_BOOTX_TEXT is not set 1034# CONFIG_BOOTX_TEXT is not set
1066# CONFIG_PPC_EARLY_DEBUG is not set 1035# CONFIG_PPC_EARLY_DEBUG is not set
@@ -1093,6 +1062,7 @@ CONFIG_CRYPTO_ECB=m
1093CONFIG_CRYPTO_CBC=y 1062CONFIG_CRYPTO_CBC=y
1094CONFIG_CRYPTO_PCBC=m 1063CONFIG_CRYPTO_PCBC=m
1095# CONFIG_CRYPTO_LRW is not set 1064# CONFIG_CRYPTO_LRW is not set
1065# CONFIG_CRYPTO_CRYPTD is not set
1096CONFIG_CRYPTO_DES=y 1066CONFIG_CRYPTO_DES=y
1097# CONFIG_CRYPTO_FCRYPT is not set 1067# CONFIG_CRYPTO_FCRYPT is not set
1098# CONFIG_CRYPTO_BLOWFISH is not set 1068# CONFIG_CRYPTO_BLOWFISH is not set
diff --git a/arch/powerpc/configs/mpc832x_rdb_defconfig b/arch/powerpc/configs/mpc832x_rdb_defconfig
index 4a4da875fa4e..6a83b66dd99e 100644
--- a/arch/powerpc/configs/mpc832x_rdb_defconfig
+++ b/arch/powerpc/configs/mpc832x_rdb_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.21-rc5 3# Linux kernel version: 2.6.22-rc7
4# Mon Apr 9 16:12:43 2007 4# Sun Jul 1 23:56:56 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_PPC_DCR_MMIO is not set 45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -70,6 +71,7 @@ CONFIG_SYSVIPC_SYSCTL=y
70# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
75CONFIG_BLK_DEV_INITRD=y 77CONFIG_BLK_DEV_INITRD=y
@@ -85,14 +87,19 @@ CONFIG_BUG=y
85CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
86CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
87CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
88# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 95CONFIG_SHMEM=y
90CONFIG_SLAB=y
91CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
92CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
93# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
94CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
95# CONFIG_SLOB is not set
96 103
97# 104#
98# Loadable module support 105# Loadable module support
@@ -124,12 +131,15 @@ CONFIG_DEFAULT_AS=y
124# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
125# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
126CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
127CONFIG_QUICC_ENGINE=y
128# CONFIG_WANT_EARLY_SERIAL is not set
129 134
130# 135#
131# Platform support 136# Platform support
132# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
133# CONFIG_MPC8313_RDB is not set 143# CONFIG_MPC8313_RDB is not set
134# CONFIG_MPC832x_MDS is not set 144# CONFIG_MPC832x_MDS is not set
135CONFIG_MPC832x_RDB=y 145CONFIG_MPC832x_RDB=y
@@ -138,6 +148,17 @@ CONFIG_MPC832x_RDB=y
138# CONFIG_MPC836x_MDS is not set 148# CONFIG_MPC836x_MDS is not set
139CONFIG_PPC_MPC832x=y 149CONFIG_PPC_MPC832x=y
140# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160CONFIG_QUICC_ENGINE=y
161# CONFIG_CPM2 is not set
141 162
142# 163#
143# Kernel options 164# Kernel options
@@ -171,6 +192,8 @@ CONFIG_PROC_DEVICETREE=y
171# CONFIG_CMDLINE_BOOL is not set 192# CONFIG_CMDLINE_BOOL is not set
172# CONFIG_PM is not set 193# CONFIG_PM is not set
173CONFIG_SECCOMP=y 194CONFIG_SECCOMP=y
195CONFIG_WANT_DEVICE_TREE=y
196CONFIG_DEVICE_TREE=""
174CONFIG_ISA_DMA_API=y 197CONFIG_ISA_DMA_API=y
175 198
176# 199#
@@ -178,22 +201,19 @@ CONFIG_ISA_DMA_API=y
178# 201#
179CONFIG_ZONE_DMA=y 202CONFIG_ZONE_DMA=y
180CONFIG_GENERIC_ISA_DMA=y 203CONFIG_GENERIC_ISA_DMA=y
181# CONFIG_MPIC_WEIRD is not set
182# CONFIG_PPC_I8259 is not set
183CONFIG_PPC_INDIRECT_PCI=y 204CONFIG_PPC_INDIRECT_PCI=y
205# CONFIG_PPC_INDIRECT_PCI_BE is not set
184CONFIG_FSL_SOC=y 206CONFIG_FSL_SOC=y
185CONFIG_PCI=y 207CONFIG_PCI=y
186CONFIG_PCI_DOMAINS=y 208CONFIG_PCI_DOMAINS=y
187# CONFIG_PCIEPORTBUS is not set 209# CONFIG_PCIEPORTBUS is not set
210CONFIG_ARCH_SUPPORTS_MSI=y
211# CONFIG_PCI_MSI is not set
188 212
189# 213#
190# PCCARD (PCMCIA/CardBus) support 214# PCCARD (PCMCIA/CardBus) support
191# 215#
192# CONFIG_PCCARD is not set 216# CONFIG_PCCARD is not set
193
194#
195# PCI Hotplug Support
196#
197# CONFIG_HOTPLUG_PCI is not set 217# CONFIG_HOTPLUG_PCI is not set
198 218
199# 219#
@@ -218,7 +238,6 @@ CONFIG_NET=y
218# 238#
219# Networking options 239# Networking options
220# 240#
221# CONFIG_NETDEBUG is not set
222CONFIG_PACKET=y 241CONFIG_PACKET=y
223# CONFIG_PACKET_MMAP is not set 242# CONFIG_PACKET_MMAP is not set
224CONFIG_UNIX=y 243CONFIG_UNIX=y
@@ -259,20 +278,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
259# CONFIG_INET6_TUNNEL is not set 278# CONFIG_INET6_TUNNEL is not set
260# CONFIG_NETWORK_SECMARK is not set 279# CONFIG_NETWORK_SECMARK is not set
261# CONFIG_NETFILTER is not set 280# CONFIG_NETFILTER is not set
262
263#
264# DCCP Configuration (EXPERIMENTAL)
265#
266# CONFIG_IP_DCCP is not set 281# CONFIG_IP_DCCP is not set
267
268#
269# SCTP Configuration (EXPERIMENTAL)
270#
271# CONFIG_IP_SCTP is not set 282# CONFIG_IP_SCTP is not set
272
273#
274# TIPC Configuration (EXPERIMENTAL)
275#
276# CONFIG_TIPC is not set 283# CONFIG_TIPC is not set
277# CONFIG_ATM is not set 284# CONFIG_ATM is not set
278# CONFIG_BRIDGE is not set 285# CONFIG_BRIDGE is not set
@@ -298,7 +305,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
298# CONFIG_HAMRADIO is not set 305# CONFIG_HAMRADIO is not set
299# CONFIG_IRDA is not set 306# CONFIG_IRDA is not set
300# CONFIG_BT is not set 307# CONFIG_BT is not set
308# CONFIG_AF_RXRPC is not set
309
310#
311# Wireless
312#
313# CONFIG_CFG80211 is not set
314# CONFIG_WIRELESS_EXT is not set
315# CONFIG_MAC80211 is not set
301# CONFIG_IEEE80211 is not set 316# CONFIG_IEEE80211 is not set
317# CONFIG_RFKILL is not set
302 318
303# 319#
304# Device Drivers 320# Device Drivers
@@ -316,10 +332,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
316# Connector - unified userspace <-> kernelspace linker 332# Connector - unified userspace <-> kernelspace linker
317# 333#
318# CONFIG_CONNECTOR is not set 334# CONFIG_CONNECTOR is not set
319
320#
321# Memory Technology Devices (MTD)
322#
323# CONFIG_MTD is not set 335# CONFIG_MTD is not set
324 336
325# 337#
@@ -356,12 +368,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
356# 368#
357# Misc devices 369# Misc devices
358# 370#
371# CONFIG_PHANTOM is not set
359# CONFIG_SGI_IOC4 is not set 372# CONFIG_SGI_IOC4 is not set
360# CONFIG_TIFM_CORE is not set 373# CONFIG_TIFM_CORE is not set
361 374# CONFIG_BLINK is not set
362#
363# ATA/ATAPI/MFM/RLL support
364#
365# CONFIG_IDE is not set 375# CONFIG_IDE is not set
366 376
367# 377#
@@ -390,6 +400,7 @@ CONFIG_BLK_DEV_SD=y
390# CONFIG_SCSI_CONSTANTS is not set 400# CONFIG_SCSI_CONSTANTS is not set
391# CONFIG_SCSI_LOGGING is not set 401# CONFIG_SCSI_LOGGING is not set
392# CONFIG_SCSI_SCAN_ASYNC is not set 402# CONFIG_SCSI_SCAN_ASYNC is not set
403CONFIG_SCSI_WAIT_SCAN=m
393 404
394# 405#
395# SCSI Transports 406# SCSI Transports
@@ -437,10 +448,6 @@ CONFIG_BLK_DEV_SD=y
437# CONFIG_SCSI_NSP32 is not set 448# CONFIG_SCSI_NSP32 is not set
438# CONFIG_SCSI_DEBUG is not set 449# CONFIG_SCSI_DEBUG is not set
439# CONFIG_SCSI_SRP is not set 450# CONFIG_SCSI_SRP is not set
440
441#
442# Serial ATA (prod) and Parallel ATA (experimental) drivers
443#
444# CONFIG_ATA is not set 451# CONFIG_ATA is not set
445 452
446# 453#
@@ -459,18 +466,14 @@ CONFIG_BLK_DEV_SD=y
459# 466#
460# IEEE 1394 (FireWire) support 467# IEEE 1394 (FireWire) support
461# 468#
469# CONFIG_FIREWIRE is not set
462# CONFIG_IEEE1394 is not set 470# CONFIG_IEEE1394 is not set
463 471
464# 472#
465# I2O device support 473# I2O device support
466# 474#
467# CONFIG_I2O is not set 475# CONFIG_I2O is not set
468 476# CONFIG_MACINTOSH_DRIVERS is not set
469#
470# Macintosh device drivers
471#
472# CONFIG_MAC_EMUMOUSEBTN is not set
473# CONFIG_WINDFARM is not set
474 477
475# 478#
476# Network device support 479# Network device support
@@ -480,15 +483,7 @@ CONFIG_NETDEVICES=y
480# CONFIG_BONDING is not set 483# CONFIG_BONDING is not set
481# CONFIG_EQUALIZER is not set 484# CONFIG_EQUALIZER is not set
482# CONFIG_TUN is not set 485# CONFIG_TUN is not set
483
484#
485# ARCnet devices
486#
487# CONFIG_ARCNET is not set 486# CONFIG_ARCNET is not set
488
489#
490# PHY device support
491#
492CONFIG_PHYLIB=y 487CONFIG_PHYLIB=y
493 488
494# 489#
@@ -502,7 +497,6 @@ CONFIG_PHYLIB=y
502# CONFIG_VITESSE_PHY is not set 497# CONFIG_VITESSE_PHY is not set
503# CONFIG_SMSC_PHY is not set 498# CONFIG_SMSC_PHY is not set
504# CONFIG_BROADCOM_PHY is not set 499# CONFIG_BROADCOM_PHY is not set
505CONFIG_ICPLUS_PHY=y
506# CONFIG_FIXED_PHY is not set 500# CONFIG_FIXED_PHY is not set
507 501
508# 502#
@@ -521,10 +515,7 @@ CONFIG_MII=y
521# CONFIG_NET_TULIP is not set 515# CONFIG_NET_TULIP is not set
522# CONFIG_HP100 is not set 516# CONFIG_HP100 is not set
523# CONFIG_NET_PCI is not set 517# CONFIG_NET_PCI is not set
524 518CONFIG_NETDEV_1000=y
525#
526# Ethernet (1000 Mbit)
527#
528# CONFIG_ACENIC is not set 519# CONFIG_ACENIC is not set
529# CONFIG_DL2K is not set 520# CONFIG_DL2K is not set
530CONFIG_E1000=y 521CONFIG_E1000=y
@@ -538,6 +529,7 @@ CONFIG_E1000=y
538# CONFIG_SKGE is not set 529# CONFIG_SKGE is not set
539# CONFIG_SKY2 is not set 530# CONFIG_SKY2 is not set
540# CONFIG_SK98LIN is not set 531# CONFIG_SK98LIN is not set
532# CONFIG_VIA_VELOCITY is not set
541# CONFIG_TIGON3 is not set 533# CONFIG_TIGON3 is not set
542# CONFIG_BNX2 is not set 534# CONFIG_BNX2 is not set
543# CONFIG_GIANFAR is not set 535# CONFIG_GIANFAR is not set
@@ -545,33 +537,34 @@ CONFIG_UCC_GETH=y
545CONFIG_UGETH_NAPI=y 537CONFIG_UGETH_NAPI=y
546# CONFIG_UGETH_MAGIC_PACKET is not set 538# CONFIG_UGETH_MAGIC_PACKET is not set
547# CONFIG_UGETH_FILTERING is not set 539# CONFIG_UGETH_FILTERING is not set
548# CONFIG_UGETH_TX_ON_DEMOND is not set 540# CONFIG_UGETH_TX_ON_DEMAND is not set
549# CONFIG_QLA3XXX is not set 541# CONFIG_QLA3XXX is not set
550# CONFIG_ATL1 is not set 542# CONFIG_ATL1 is not set
551 543CONFIG_NETDEV_10000=y
552#
553# Ethernet (10000 Mbit)
554#
555# CONFIG_CHELSIO_T1 is not set 544# CONFIG_CHELSIO_T1 is not set
556# CONFIG_CHELSIO_T3 is not set 545# CONFIG_CHELSIO_T3 is not set
557# CONFIG_IXGB is not set 546# CONFIG_IXGB is not set
558# CONFIG_S2IO is not set 547# CONFIG_S2IO is not set
559# CONFIG_MYRI10GE is not set 548# CONFIG_MYRI10GE is not set
560# CONFIG_NETXEN_NIC is not set 549# CONFIG_NETXEN_NIC is not set
561 550# CONFIG_MLX4_CORE is not set
562#
563# Token Ring devices
564#
565# CONFIG_TR is not set 551# CONFIG_TR is not set
566 552
567# 553#
568# Wireless LAN (non-hamradio) 554# Wireless LAN
569# 555#
570# CONFIG_NET_RADIO is not set 556# CONFIG_WLAN_PRE80211 is not set
557# CONFIG_WLAN_80211 is not set
571 558
572# 559#
573# Wan interfaces 560# USB Network Adapters
574# 561#
562# CONFIG_USB_CATC is not set
563# CONFIG_USB_KAWETH is not set
564# CONFIG_USB_PEGASUS is not set
565# CONFIG_USB_RTL8150 is not set
566# CONFIG_USB_USBNET_MII is not set
567# CONFIG_USB_USBNET is not set
575# CONFIG_WAN is not set 568# CONFIG_WAN is not set
576# CONFIG_FDDI is not set 569# CONFIG_FDDI is not set
577# CONFIG_HIPPI is not set 570# CONFIG_HIPPI is not set
@@ -598,6 +591,7 @@ CONFIG_UGETH_NAPI=y
598# 591#
599CONFIG_INPUT=y 592CONFIG_INPUT=y
600# CONFIG_INPUT_FF_MEMLESS is not set 593# CONFIG_INPUT_FF_MEMLESS is not set
594# CONFIG_INPUT_POLLDEV is not set
601 595
602# 596#
603# Userland interfaces 597# Userland interfaces
@@ -614,6 +608,7 @@ CONFIG_INPUT=y
614# CONFIG_INPUT_KEYBOARD is not set 608# CONFIG_INPUT_KEYBOARD is not set
615# CONFIG_INPUT_MOUSE is not set 609# CONFIG_INPUT_MOUSE is not set
616# CONFIG_INPUT_JOYSTICK is not set 610# CONFIG_INPUT_JOYSTICK is not set
611# CONFIG_INPUT_TABLET is not set
617# CONFIG_INPUT_TOUCHSCREEN is not set 612# CONFIG_INPUT_TOUCHSCREEN is not set
618# CONFIG_INPUT_MISC is not set 613# CONFIG_INPUT_MISC is not set
619 614
@@ -655,10 +650,6 @@ CONFIG_LEGACY_PTY_COUNT=256
655# IPMI 650# IPMI
656# 651#
657# CONFIG_IPMI_HANDLER is not set 652# CONFIG_IPMI_HANDLER is not set
658
659#
660# Watchdog Cards
661#
662CONFIG_WATCHDOG=y 653CONFIG_WATCHDOG=y
663# CONFIG_WATCHDOG_NOWAYOUT is not set 654# CONFIG_WATCHDOG_NOWAYOUT is not set
664 655
@@ -682,7 +673,6 @@ CONFIG_HW_RANDOM=y
682# CONFIG_NVRAM is not set 673# CONFIG_NVRAM is not set
683CONFIG_GEN_RTC=y 674CONFIG_GEN_RTC=y
684# CONFIG_GEN_RTC_X is not set 675# CONFIG_GEN_RTC_X is not set
685# CONFIG_DTLK is not set
686# CONFIG_R3964 is not set 676# CONFIG_R3964 is not set
687# CONFIG_APPLICOM is not set 677# CONFIG_APPLICOM is not set
688# CONFIG_AGP is not set 678# CONFIG_AGP is not set
@@ -693,11 +683,9 @@ CONFIG_GEN_RTC=y
693# TPM devices 683# TPM devices
694# 684#
695# CONFIG_TCG_TPM is not set 685# CONFIG_TCG_TPM is not set
696 686CONFIG_DEVPORT=y
697#
698# I2C support
699#
700CONFIG_I2C=y 687CONFIG_I2C=y
688CONFIG_I2C_BOARDINFO=y
701CONFIG_I2C_CHARDEV=y 689CONFIG_I2C_CHARDEV=y
702 690
703# 691#
@@ -722,17 +710,17 @@ CONFIG_I2C_MPC=y
722# CONFIG_I2C_NFORCE2 is not set 710# CONFIG_I2C_NFORCE2 is not set
723# CONFIG_I2C_OCORES is not set 711# CONFIG_I2C_OCORES is not set
724# CONFIG_I2C_PARPORT_LIGHT is not set 712# CONFIG_I2C_PARPORT_LIGHT is not set
725# CONFIG_I2C_PASEMI is not set
726# CONFIG_I2C_PROSAVAGE is not set 713# CONFIG_I2C_PROSAVAGE is not set
727# CONFIG_I2C_SAVAGE4 is not set 714# CONFIG_I2C_SAVAGE4 is not set
715# CONFIG_I2C_SIMTEC is not set
728# CONFIG_I2C_SIS5595 is not set 716# CONFIG_I2C_SIS5595 is not set
729# CONFIG_I2C_SIS630 is not set 717# CONFIG_I2C_SIS630 is not set
730# CONFIG_I2C_SIS96X is not set 718# CONFIG_I2C_SIS96X is not set
731# CONFIG_I2C_STUB is not set 719# CONFIG_I2C_STUB is not set
720# CONFIG_I2C_TINY_USB is not set
732# CONFIG_I2C_VIA is not set 721# CONFIG_I2C_VIA is not set
733# CONFIG_I2C_VIAPRO is not set 722# CONFIG_I2C_VIAPRO is not set
734# CONFIG_I2C_VOODOO3 is not set 723# CONFIG_I2C_VOODOO3 is not set
735# CONFIG_I2C_PCA_ISA is not set
736 724
737# 725#
738# Miscellaneous I2C Chip support 726# Miscellaneous I2C Chip support
@@ -760,13 +748,10 @@ CONFIG_I2C_MPC=y
760# Dallas's 1-wire bus 748# Dallas's 1-wire bus
761# 749#
762# CONFIG_W1 is not set 750# CONFIG_W1 is not set
763
764#
765# Hardware Monitoring support
766#
767CONFIG_HWMON=y 751CONFIG_HWMON=y
768# CONFIG_HWMON_VID is not set 752# CONFIG_HWMON_VID is not set
769# CONFIG_SENSORS_ABITUGURU is not set 753# CONFIG_SENSORS_ABITUGURU is not set
754# CONFIG_SENSORS_AD7418 is not set
770# CONFIG_SENSORS_ADM1021 is not set 755# CONFIG_SENSORS_ADM1021 is not set
771# CONFIG_SENSORS_ADM1025 is not set 756# CONFIG_SENSORS_ADM1025 is not set
772# CONFIG_SENSORS_ADM1026 is not set 757# CONFIG_SENSORS_ADM1026 is not set
@@ -793,6 +778,7 @@ CONFIG_HWMON=y
793# CONFIG_SENSORS_LM90 is not set 778# CONFIG_SENSORS_LM90 is not set
794# CONFIG_SENSORS_LM92 is not set 779# CONFIG_SENSORS_LM92 is not set
795# CONFIG_SENSORS_MAX1619 is not set 780# CONFIG_SENSORS_MAX1619 is not set
781# CONFIG_SENSORS_MAX6650 is not set
796# CONFIG_SENSORS_PC87360 is not set 782# CONFIG_SENSORS_PC87360 is not set
797# CONFIG_SENSORS_PC87427 is not set 783# CONFIG_SENSORS_PC87427 is not set
798# CONFIG_SENSORS_SIS5595 is not set 784# CONFIG_SENSORS_SIS5595 is not set
@@ -820,17 +806,20 @@ CONFIG_HWMON=y
820# Multimedia devices 806# Multimedia devices
821# 807#
822# CONFIG_VIDEO_DEV is not set 808# CONFIG_VIDEO_DEV is not set
823 809# CONFIG_DVB_CORE is not set
824# 810CONFIG_DAB=y
825# Digital Video Broadcasting Devices
826#
827# CONFIG_DVB is not set
828# CONFIG_USB_DABUSB is not set 811# CONFIG_USB_DABUSB is not set
829 812
830# 813#
831# Graphics support 814# Graphics support
832# 815#
833# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 816# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
817
818#
819# Display device support
820#
821# CONFIG_DISPLAY_SUPPORT is not set
822# CONFIG_VGASTATE is not set
834# CONFIG_FB is not set 823# CONFIG_FB is not set
835# CONFIG_FB_IBM_GXT4500 is not set 824# CONFIG_FB_IBM_GXT4500 is not set
836 825
@@ -846,6 +835,17 @@ CONFIG_HID=y
846# CONFIG_HID_DEBUG is not set 835# CONFIG_HID_DEBUG is not set
847 836
848# 837#
838# USB Input Devices
839#
840# CONFIG_USB_HID is not set
841
842#
843# USB HID Boot Protocol drivers
844#
845# CONFIG_USB_KBD is not set
846# CONFIG_USB_MOUSE is not set
847
848#
849# USB support 849# USB support
850# 850#
851CONFIG_USB_ARCH_HAS_HCD=y 851CONFIG_USB_ARCH_HAS_HCD=y
@@ -858,6 +858,7 @@ CONFIG_USB=y
858# Miscellaneous USB options 858# Miscellaneous USB options
859# 859#
860CONFIG_USB_DEVICEFS=y 860CONFIG_USB_DEVICEFS=y
861CONFIG_USB_DEVICE_CLASS=y
861# CONFIG_USB_DYNAMIC_MINORS is not set 862# CONFIG_USB_DYNAMIC_MINORS is not set
862# CONFIG_USB_OTG is not set 863# CONFIG_USB_OTG is not set
863 864
@@ -908,44 +909,10 @@ CONFIG_USB_STORAGE=y
908# CONFIG_USB_LIBUSUAL is not set 909# CONFIG_USB_LIBUSUAL is not set
909 910
910# 911#
911# USB Input Devices
912#
913# CONFIG_USB_HID is not set
914
915#
916# USB HID Boot Protocol drivers
917#
918# CONFIG_USB_KBD is not set
919# CONFIG_USB_MOUSE is not set
920# CONFIG_USB_AIPTEK is not set
921# CONFIG_USB_WACOM is not set
922# CONFIG_USB_ACECAD is not set
923# CONFIG_USB_KBTAB is not set
924# CONFIG_USB_POWERMATE is not set
925# CONFIG_USB_TOUCHSCREEN is not set
926# CONFIG_USB_YEALINK is not set
927# CONFIG_USB_XPAD is not set
928# CONFIG_USB_ATI_REMOTE is not set
929# CONFIG_USB_ATI_REMOTE2 is not set
930# CONFIG_USB_KEYSPAN_REMOTE is not set
931# CONFIG_USB_APPLETOUCH is not set
932# CONFIG_USB_GTCO is not set
933
934#
935# USB Imaging devices 912# USB Imaging devices
936# 913#
937# CONFIG_USB_MDC800 is not set 914# CONFIG_USB_MDC800 is not set
938# CONFIG_USB_MICROTEK is not set 915# CONFIG_USB_MICROTEK is not set
939
940#
941# USB Network Adapters
942#
943# CONFIG_USB_CATC is not set
944# CONFIG_USB_KAWETH is not set
945# CONFIG_USB_PEGASUS is not set
946# CONFIG_USB_RTL8150 is not set
947# CONFIG_USB_USBNET_MII is not set
948# CONFIG_USB_USBNET is not set
949CONFIG_USB_MON=y 916CONFIG_USB_MON=y
950 917
951# 918#
@@ -989,10 +956,6 @@ CONFIG_USB_MON=y
989# USB Gadget Support 956# USB Gadget Support
990# 957#
991# CONFIG_USB_GADGET is not set 958# CONFIG_USB_GADGET is not set
992
993#
994# MMC/SD Card support
995#
996# CONFIG_MMC is not set 959# CONFIG_MMC is not set
997 960
998# 961#
@@ -1036,14 +999,6 @@ CONFIG_USB_MON=y
1036# 999#
1037 1000
1038# 1001#
1039# Auxiliary Display support
1040#
1041
1042#
1043# Virtualization
1044#
1045
1046#
1047# File systems 1002# File systems
1048# 1003#
1049CONFIG_EXT2_FS=y 1004CONFIG_EXT2_FS=y
@@ -1134,6 +1089,7 @@ CONFIG_LOCKD_V4=y
1134CONFIG_NFS_COMMON=y 1089CONFIG_NFS_COMMON=y
1135CONFIG_SUNRPC=y 1090CONFIG_SUNRPC=y
1136CONFIG_SUNRPC_GSS=y 1091CONFIG_SUNRPC_GSS=y
1092# CONFIG_SUNRPC_BIND34 is not set
1137CONFIG_RPCSEC_GSS_KRB5=y 1093CONFIG_RPCSEC_GSS_KRB5=y
1138# CONFIG_RPCSEC_GSS_SPKM3 is not set 1094# CONFIG_RPCSEC_GSS_SPKM3 is not set
1139# CONFIG_SMB_FS is not set 1095# CONFIG_SMB_FS is not set
@@ -1164,6 +1120,7 @@ CONFIG_LDM_PARTITION=y
1164# CONFIG_SUN_PARTITION is not set 1120# CONFIG_SUN_PARTITION is not set
1165# CONFIG_KARMA_PARTITION is not set 1121# CONFIG_KARMA_PARTITION is not set
1166# CONFIG_EFI_PARTITION is not set 1122# CONFIG_EFI_PARTITION is not set
1123# CONFIG_SYSV68_PARTITION is not set
1167 1124
1168# 1125#
1169# Native Language Support 1126# Native Language Support
@@ -1223,11 +1180,13 @@ CONFIG_UCC=y
1223CONFIG_BITREVERSE=y 1180CONFIG_BITREVERSE=y
1224# CONFIG_CRC_CCITT is not set 1181# CONFIG_CRC_CCITT is not set
1225# CONFIG_CRC16 is not set 1182# CONFIG_CRC16 is not set
1183# CONFIG_CRC_ITU_T is not set
1226CONFIG_CRC32=y 1184CONFIG_CRC32=y
1227# CONFIG_LIBCRC32C is not set 1185# CONFIG_LIBCRC32C is not set
1228CONFIG_PLIST=y 1186CONFIG_PLIST=y
1229CONFIG_HAS_IOMEM=y 1187CONFIG_HAS_IOMEM=y
1230CONFIG_HAS_IOPORT=y 1188CONFIG_HAS_IOPORT=y
1189CONFIG_HAS_DMA=y
1231 1190
1232# 1191#
1233# Instrumentation Support 1192# Instrumentation Support
@@ -1244,7 +1203,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1244# CONFIG_DEBUG_FS is not set 1203# CONFIG_DEBUG_FS is not set
1245# CONFIG_HEADERS_CHECK is not set 1204# CONFIG_HEADERS_CHECK is not set
1246# CONFIG_DEBUG_KERNEL is not set 1205# CONFIG_DEBUG_KERNEL is not set
1247CONFIG_LOG_BUF_SHIFT=14
1248# CONFIG_DEBUG_BUGVERBOSE is not set 1206# CONFIG_DEBUG_BUGVERBOSE is not set
1249# CONFIG_BOOTX_TEXT is not set 1207# CONFIG_BOOTX_TEXT is not set
1250# CONFIG_PPC_EARLY_DEBUG is not set 1208# CONFIG_PPC_EARLY_DEBUG is not set
@@ -1277,6 +1235,7 @@ CONFIG_CRYPTO_ECB=m
1277CONFIG_CRYPTO_CBC=y 1235CONFIG_CRYPTO_CBC=y
1278CONFIG_CRYPTO_PCBC=m 1236CONFIG_CRYPTO_PCBC=m
1279# CONFIG_CRYPTO_LRW is not set 1237# CONFIG_CRYPTO_LRW is not set
1238# CONFIG_CRYPTO_CRYPTD is not set
1280CONFIG_CRYPTO_DES=y 1239CONFIG_CRYPTO_DES=y
1281# CONFIG_CRYPTO_FCRYPT is not set 1240# CONFIG_CRYPTO_FCRYPT is not set
1282# CONFIG_CRYPTO_BLOWFISH is not set 1241# CONFIG_CRYPTO_BLOWFISH is not set
diff --git a/arch/powerpc/configs/mpc834x_itx_defconfig b/arch/powerpc/configs/mpc834x_itx_defconfig
index 23d8964846e0..85470b8cae09 100644
--- a/arch/powerpc/configs/mpc834x_itx_defconfig
+++ b/arch/powerpc/configs/mpc834x_itx_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.20 3# Linux kernel version: 2.6.22-rc7
4# Wed Feb 7 13:12:18 2007 4# Sun Jul 1 23:56:56 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_PPC_DCR_MMIO is not set 45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -83,14 +87,19 @@ CONFIG_BUG=y
83CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
86# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 95CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
90CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94 103
95# 104#
96# Loadable module support 105# Loadable module support
@@ -122,18 +131,33 @@ CONFIG_DEFAULT_AS=y
122# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
123# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
124CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
125CONFIG_PPC_GEN550=y
126# CONFIG_WANT_EARLY_SERIAL is not set
127 134
128# 135#
129# Platform support 136# Platform support
130# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
143# CONFIG_MPC8313_RDB is not set
131# CONFIG_MPC832x_MDS is not set 144# CONFIG_MPC832x_MDS is not set
132# CONFIG_MPC834x_SYS is not set 145# CONFIG_MPC832x_RDB is not set
146# CONFIG_MPC834x_MDS is not set
133CONFIG_MPC834x_ITX=y 147CONFIG_MPC834x_ITX=y
134# CONFIG_MPC8360E_PB is not set 148# CONFIG_MPC836x_MDS is not set
135CONFIG_MPC834x=y 149CONFIG_MPC834x=y
136# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160# CONFIG_CPM2 is not set
137 161
138# 162#
139# Kernel options 163# Kernel options
@@ -161,32 +185,33 @@ CONFIG_FLAT_NODE_MEM_MAP=y
161# CONFIG_SPARSEMEM_STATIC is not set 185# CONFIG_SPARSEMEM_STATIC is not set
162CONFIG_SPLIT_PTLOCK_CPUS=4 186CONFIG_SPLIT_PTLOCK_CPUS=4
163# CONFIG_RESOURCES_64BIT is not set 187# CONFIG_RESOURCES_64BIT is not set
188CONFIG_ZONE_DMA_FLAG=1
164CONFIG_PROC_DEVICETREE=y 189CONFIG_PROC_DEVICETREE=y
165# CONFIG_CMDLINE_BOOL is not set 190# CONFIG_CMDLINE_BOOL is not set
166# CONFIG_PM is not set 191# CONFIG_PM is not set
167CONFIG_SECCOMP=y 192CONFIG_SECCOMP=y
193CONFIG_WANT_DEVICE_TREE=y
194CONFIG_DEVICE_TREE=""
168CONFIG_ISA_DMA_API=y 195CONFIG_ISA_DMA_API=y
169 196
170# 197#
171# Bus options 198# Bus options
172# 199#
200CONFIG_ZONE_DMA=y
173CONFIG_GENERIC_ISA_DMA=y 201CONFIG_GENERIC_ISA_DMA=y
174# CONFIG_MPIC_WEIRD is not set
175# CONFIG_PPC_I8259 is not set
176CONFIG_PPC_INDIRECT_PCI=y 202CONFIG_PPC_INDIRECT_PCI=y
203# CONFIG_PPC_INDIRECT_PCI_BE is not set
177CONFIG_FSL_SOC=y 204CONFIG_FSL_SOC=y
178CONFIG_PCI=y 205CONFIG_PCI=y
179CONFIG_PCI_DOMAINS=y 206CONFIG_PCI_DOMAINS=y
180# CONFIG_PCIEPORTBUS is not set 207# CONFIG_PCIEPORTBUS is not set
208CONFIG_ARCH_SUPPORTS_MSI=y
209# CONFIG_PCI_MSI is not set
181 210
182# 211#
183# PCCARD (PCMCIA/CardBus) support 212# PCCARD (PCMCIA/CardBus) support
184# 213#
185# CONFIG_PCCARD is not set 214# CONFIG_PCCARD is not set
186
187#
188# PCI Hotplug Support
189#
190# CONFIG_HOTPLUG_PCI is not set 215# CONFIG_HOTPLUG_PCI is not set
191 216
192# 217#
@@ -211,13 +236,13 @@ CONFIG_NET=y
211# 236#
212# Networking options 237# Networking options
213# 238#
214# CONFIG_NETDEBUG is not set
215CONFIG_PACKET=y 239CONFIG_PACKET=y
216# CONFIG_PACKET_MMAP is not set 240# CONFIG_PACKET_MMAP is not set
217CONFIG_UNIX=y 241CONFIG_UNIX=y
218CONFIG_XFRM=y 242CONFIG_XFRM=y
219# CONFIG_XFRM_USER is not set 243# CONFIG_XFRM_USER is not set
220# CONFIG_XFRM_SUB_POLICY is not set 244# CONFIG_XFRM_SUB_POLICY is not set
245# CONFIG_XFRM_MIGRATE is not set
221# CONFIG_NET_KEY is not set 246# CONFIG_NET_KEY is not set
222CONFIG_INET=y 247CONFIG_INET=y
223CONFIG_IP_MULTICAST=y 248CONFIG_IP_MULTICAST=y
@@ -251,20 +276,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
251# CONFIG_INET6_TUNNEL is not set 276# CONFIG_INET6_TUNNEL is not set
252# CONFIG_NETWORK_SECMARK is not set 277# CONFIG_NETWORK_SECMARK is not set
253# CONFIG_NETFILTER is not set 278# CONFIG_NETFILTER is not set
254
255#
256# DCCP Configuration (EXPERIMENTAL)
257#
258# CONFIG_IP_DCCP is not set 279# CONFIG_IP_DCCP is not set
259
260#
261# SCTP Configuration (EXPERIMENTAL)
262#
263# CONFIG_IP_SCTP is not set 280# CONFIG_IP_SCTP is not set
264
265#
266# TIPC Configuration (EXPERIMENTAL)
267#
268# CONFIG_TIPC is not set 281# CONFIG_TIPC is not set
269# CONFIG_ATM is not set 282# CONFIG_ATM is not set
270# CONFIG_BRIDGE is not set 283# CONFIG_BRIDGE is not set
@@ -290,7 +303,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
290# CONFIG_HAMRADIO is not set 303# CONFIG_HAMRADIO is not set
291# CONFIG_IRDA is not set 304# CONFIG_IRDA is not set
292# CONFIG_BT is not set 305# CONFIG_BT is not set
306# CONFIG_AF_RXRPC is not set
307
308#
309# Wireless
310#
311# CONFIG_CFG80211 is not set
312# CONFIG_WIRELESS_EXT is not set
313# CONFIG_MAC80211 is not set
293# CONFIG_IEEE80211 is not set 314# CONFIG_IEEE80211 is not set
315# CONFIG_RFKILL is not set
294 316
295# 317#
296# Device Drivers 318# Device Drivers
@@ -308,10 +330,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
308# Connector - unified userspace <-> kernelspace linker 330# Connector - unified userspace <-> kernelspace linker
309# 331#
310# CONFIG_CONNECTOR is not set 332# CONFIG_CONNECTOR is not set
311
312#
313# Memory Technology Devices (MTD)
314#
315CONFIG_MTD=y 333CONFIG_MTD=y
316# CONFIG_MTD_DEBUG is not set 334# CONFIG_MTD_DEBUG is not set
317# CONFIG_MTD_CONCAT is not set 335# CONFIG_MTD_CONCAT is not set
@@ -354,7 +372,6 @@ CONFIG_MTD_CFI_UTIL=y
354# CONFIG_MTD_RAM is not set 372# CONFIG_MTD_RAM is not set
355# CONFIG_MTD_ROM is not set 373# CONFIG_MTD_ROM is not set
356# CONFIG_MTD_ABSENT is not set 374# CONFIG_MTD_ABSENT is not set
357# CONFIG_MTD_OBSOLETE_CHIPS is not set
358 375
359# 376#
360# Mapping drivers for chip access 377# Mapping drivers for chip access
@@ -384,17 +401,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
384# CONFIG_MTD_DOC2000 is not set 401# CONFIG_MTD_DOC2000 is not set
385# CONFIG_MTD_DOC2001 is not set 402# CONFIG_MTD_DOC2001 is not set
386# CONFIG_MTD_DOC2001PLUS is not set 403# CONFIG_MTD_DOC2001PLUS is not set
387
388#
389# NAND Flash Device Drivers
390#
391# CONFIG_MTD_NAND is not set 404# CONFIG_MTD_NAND is not set
392# CONFIG_MTD_NAND_CAFE is not set 405# CONFIG_MTD_ONENAND is not set
393 406
394# 407#
395# OneNAND Flash Device Drivers 408# UBI - Unsorted block images
396# 409#
397# CONFIG_MTD_ONENAND is not set 410# CONFIG_MTD_UBI is not set
398 411
399# 412#
400# Parallel port support 413# Parallel port support
@@ -404,6 +417,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
404# 417#
405# Plug and Play support 418# Plug and Play support
406# 419#
420# CONFIG_PNPACPI is not set
407 421
408# 422#
409# Block devices 423# Block devices
@@ -423,19 +437,16 @@ CONFIG_BLK_DEV_RAM=y
423CONFIG_BLK_DEV_RAM_COUNT=16 437CONFIG_BLK_DEV_RAM_COUNT=16
424CONFIG_BLK_DEV_RAM_SIZE=32768 438CONFIG_BLK_DEV_RAM_SIZE=32768
425CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 439CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
426CONFIG_BLK_DEV_INITRD=y
427# CONFIG_CDROM_PKTCDVD is not set 440# CONFIG_CDROM_PKTCDVD is not set
428# CONFIG_ATA_OVER_ETH is not set 441# CONFIG_ATA_OVER_ETH is not set
429 442
430# 443#
431# Misc devices 444# Misc devices
432# 445#
446# CONFIG_PHANTOM is not set
433# CONFIG_SGI_IOC4 is not set 447# CONFIG_SGI_IOC4 is not set
434# CONFIG_TIFM_CORE is not set 448# CONFIG_TIFM_CORE is not set
435 449# CONFIG_BLINK is not set
436#
437# ATA/ATAPI/MFM/RLL support
438#
439CONFIG_IDE=y 450CONFIG_IDE=y
440CONFIG_IDE_MAX_HWIFS=4 451CONFIG_IDE_MAX_HWIFS=4
441# CONFIG_BLK_DEV_IDE is not set 452# CONFIG_BLK_DEV_IDE is not set
@@ -468,6 +479,7 @@ CONFIG_CHR_DEV_SG=y
468# CONFIG_SCSI_CONSTANTS is not set 479# CONFIG_SCSI_CONSTANTS is not set
469# CONFIG_SCSI_LOGGING is not set 480# CONFIG_SCSI_LOGGING is not set
470# CONFIG_SCSI_SCAN_ASYNC is not set 481# CONFIG_SCSI_SCAN_ASYNC is not set
482CONFIG_SCSI_WAIT_SCAN=m
471 483
472# 484#
473# SCSI Transports 485# SCSI Transports
@@ -516,10 +528,6 @@ CONFIG_SCSI_SPI_ATTRS=y
516# CONFIG_SCSI_NSP32 is not set 528# CONFIG_SCSI_NSP32 is not set
517# CONFIG_SCSI_DEBUG is not set 529# CONFIG_SCSI_DEBUG is not set
518# CONFIG_SCSI_SRP is not set 530# CONFIG_SCSI_SRP is not set
519
520#
521# Serial ATA (prod) and Parallel ATA (experimental) drivers
522#
523CONFIG_ATA=y 531CONFIG_ATA=y
524# CONFIG_ATA_NONSTANDARD is not set 532# CONFIG_ATA_NONSTANDARD is not set
525# CONFIG_SATA_AHCI is not set 533# CONFIG_SATA_AHCI is not set
@@ -537,10 +545,12 @@ CONFIG_SATA_SIL=y
537# CONFIG_SATA_ULI is not set 545# CONFIG_SATA_ULI is not set
538# CONFIG_SATA_VIA is not set 546# CONFIG_SATA_VIA is not set
539# CONFIG_SATA_VITESSE is not set 547# CONFIG_SATA_VITESSE is not set
548# CONFIG_SATA_INIC162X is not set
540# CONFIG_PATA_ALI is not set 549# CONFIG_PATA_ALI is not set
541# CONFIG_PATA_AMD is not set 550# CONFIG_PATA_AMD is not set
542# CONFIG_PATA_ARTOP is not set 551# CONFIG_PATA_ARTOP is not set
543# CONFIG_PATA_ATIIXP is not set 552# CONFIG_PATA_ATIIXP is not set
553# CONFIG_PATA_CMD640_PCI is not set
544# CONFIG_PATA_CMD64X is not set 554# CONFIG_PATA_CMD64X is not set
545# CONFIG_PATA_CS5520 is not set 555# CONFIG_PATA_CS5520 is not set
546# CONFIG_PATA_CS5530 is not set 556# CONFIG_PATA_CS5530 is not set
@@ -552,6 +562,7 @@ CONFIG_SATA_SIL=y
552# CONFIG_PATA_HPT3X2N is not set 562# CONFIG_PATA_HPT3X2N is not set
553# CONFIG_PATA_HPT3X3 is not set 563# CONFIG_PATA_HPT3X3 is not set
554# CONFIG_PATA_IT821X is not set 564# CONFIG_PATA_IT821X is not set
565# CONFIG_PATA_IT8213 is not set
555# CONFIG_PATA_JMICRON is not set 566# CONFIG_PATA_JMICRON is not set
556# CONFIG_PATA_TRIFLEX is not set 567# CONFIG_PATA_TRIFLEX is not set
557# CONFIG_PATA_MARVELL is not set 568# CONFIG_PATA_MARVELL is not set
@@ -598,18 +609,14 @@ CONFIG_MD_RAID1=y
598# 609#
599# IEEE 1394 (FireWire) support 610# IEEE 1394 (FireWire) support
600# 611#
612# CONFIG_FIREWIRE is not set
601# CONFIG_IEEE1394 is not set 613# CONFIG_IEEE1394 is not set
602 614
603# 615#
604# I2O device support 616# I2O device support
605# 617#
606# CONFIG_I2O is not set 618# CONFIG_I2O is not set
607 619# CONFIG_MACINTOSH_DRIVERS is not set
608#
609# Macintosh device drivers
610#
611# CONFIG_MAC_EMUMOUSEBTN is not set
612# CONFIG_WINDFARM is not set
613 620
614# 621#
615# Network device support 622# Network device support
@@ -619,15 +626,7 @@ CONFIG_NETDEVICES=y
619# CONFIG_BONDING is not set 626# CONFIG_BONDING is not set
620# CONFIG_EQUALIZER is not set 627# CONFIG_EQUALIZER is not set
621# CONFIG_TUN is not set 628# CONFIG_TUN is not set
622
623#
624# ARCnet devices
625#
626# CONFIG_ARCNET is not set 629# CONFIG_ARCNET is not set
627
628#
629# PHY device support
630#
631CONFIG_PHYLIB=y 630CONFIG_PHYLIB=y
632 631
633# 632#
@@ -647,10 +646,7 @@ CONFIG_CICADA_PHY=y
647# Ethernet (10 or 100Mbit) 646# Ethernet (10 or 100Mbit)
648# 647#
649# CONFIG_NET_ETHERNET is not set 648# CONFIG_NET_ETHERNET is not set
650 649CONFIG_NETDEV_1000=y
651#
652# Ethernet (1000 Mbit)
653#
654# CONFIG_ACENIC is not set 650# CONFIG_ACENIC is not set
655# CONFIG_DL2K is not set 651# CONFIG_DL2K is not set
656# CONFIG_E1000 is not set 652# CONFIG_E1000 is not set
@@ -662,34 +658,38 @@ CONFIG_CICADA_PHY=y
662# CONFIG_SKGE is not set 658# CONFIG_SKGE is not set
663# CONFIG_SKY2 is not set 659# CONFIG_SKY2 is not set
664# CONFIG_SK98LIN is not set 660# CONFIG_SK98LIN is not set
661# CONFIG_VIA_VELOCITY is not set
665# CONFIG_TIGON3 is not set 662# CONFIG_TIGON3 is not set
666# CONFIG_BNX2 is not set 663# CONFIG_BNX2 is not set
667CONFIG_GIANFAR=y 664CONFIG_GIANFAR=y
668CONFIG_GFAR_NAPI=y 665CONFIG_GFAR_NAPI=y
669# CONFIG_QLA3XXX is not set 666# CONFIG_QLA3XXX is not set
670 667# CONFIG_ATL1 is not set
671# 668CONFIG_NETDEV_10000=y
672# Ethernet (10000 Mbit)
673#
674# CONFIG_CHELSIO_T1 is not set 669# CONFIG_CHELSIO_T1 is not set
670# CONFIG_CHELSIO_T3 is not set
675# CONFIG_IXGB is not set 671# CONFIG_IXGB is not set
676# CONFIG_S2IO is not set 672# CONFIG_S2IO is not set
677# CONFIG_MYRI10GE is not set 673# CONFIG_MYRI10GE is not set
678# CONFIG_NETXEN_NIC is not set 674# CONFIG_NETXEN_NIC is not set
679 675# CONFIG_MLX4_CORE is not set
680#
681# Token Ring devices
682#
683# CONFIG_TR is not set 676# CONFIG_TR is not set
684 677
685# 678#
686# Wireless LAN (non-hamradio) 679# Wireless LAN
687# 680#
688# CONFIG_NET_RADIO is not set 681# CONFIG_WLAN_PRE80211 is not set
682# CONFIG_WLAN_80211 is not set
689 683
690# 684#
691# Wan interfaces 685# USB Network Adapters
692# 686#
687# CONFIG_USB_CATC is not set
688# CONFIG_USB_KAWETH is not set
689# CONFIG_USB_PEGASUS is not set
690# CONFIG_USB_RTL8150 is not set
691# CONFIG_USB_USBNET_MII is not set
692# CONFIG_USB_USBNET is not set
693# CONFIG_WAN is not set 693# CONFIG_WAN is not set
694# CONFIG_FDDI is not set 694# CONFIG_FDDI is not set
695# CONFIG_HIPPI is not set 695# CONFIG_HIPPI is not set
@@ -745,6 +745,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
745CONFIG_SERIAL_CORE=y 745CONFIG_SERIAL_CORE=y
746CONFIG_SERIAL_CORE_CONSOLE=y 746CONFIG_SERIAL_CORE_CONSOLE=y
747# CONFIG_SERIAL_JSM is not set 747# CONFIG_SERIAL_JSM is not set
748# CONFIG_SERIAL_OF_PLATFORM is not set
748CONFIG_UNIX98_PTYS=y 749CONFIG_UNIX98_PTYS=y
749CONFIG_LEGACY_PTYS=y 750CONFIG_LEGACY_PTYS=y
750CONFIG_LEGACY_PTY_COUNT=256 751CONFIG_LEGACY_PTY_COUNT=256
@@ -753,10 +754,6 @@ CONFIG_LEGACY_PTY_COUNT=256
753# IPMI 754# IPMI
754# 755#
755# CONFIG_IPMI_HANDLER is not set 756# CONFIG_IPMI_HANDLER is not set
756
757#
758# Watchdog Cards
759#
760CONFIG_WATCHDOG=y 757CONFIG_WATCHDOG=y
761# CONFIG_WATCHDOG_NOWAYOUT is not set 758# CONFIG_WATCHDOG_NOWAYOUT is not set
762 759
@@ -779,7 +776,6 @@ CONFIG_83xx_WDT=y
779CONFIG_HW_RANDOM=y 776CONFIG_HW_RANDOM=y
780# CONFIG_NVRAM is not set 777# CONFIG_NVRAM is not set
781# CONFIG_GEN_RTC is not set 778# CONFIG_GEN_RTC is not set
782# CONFIG_DTLK is not set
783# CONFIG_R3964 is not set 779# CONFIG_R3964 is not set
784# CONFIG_APPLICOM is not set 780# CONFIG_APPLICOM is not set
785# CONFIG_AGP is not set 781# CONFIG_AGP is not set
@@ -790,11 +786,9 @@ CONFIG_HW_RANDOM=y
790# TPM devices 786# TPM devices
791# 787#
792# CONFIG_TCG_TPM is not set 788# CONFIG_TCG_TPM is not set
793 789CONFIG_DEVPORT=y
794#
795# I2C support
796#
797CONFIG_I2C=y 790CONFIG_I2C=y
791CONFIG_I2C_BOARDINFO=y
798CONFIG_I2C_CHARDEV=y 792CONFIG_I2C_CHARDEV=y
799 793
800# 794#
@@ -821,14 +815,15 @@ CONFIG_I2C_MPC=y
821# CONFIG_I2C_PARPORT_LIGHT is not set 815# CONFIG_I2C_PARPORT_LIGHT is not set
822# CONFIG_I2C_PROSAVAGE is not set 816# CONFIG_I2C_PROSAVAGE is not set
823# CONFIG_I2C_SAVAGE4 is not set 817# CONFIG_I2C_SAVAGE4 is not set
818# CONFIG_I2C_SIMTEC is not set
824# CONFIG_I2C_SIS5595 is not set 819# CONFIG_I2C_SIS5595 is not set
825# CONFIG_I2C_SIS630 is not set 820# CONFIG_I2C_SIS630 is not set
826# CONFIG_I2C_SIS96X is not set 821# CONFIG_I2C_SIS96X is not set
827# CONFIG_I2C_STUB is not set 822# CONFIG_I2C_STUB is not set
823# CONFIG_I2C_TINY_USB is not set
828# CONFIG_I2C_VIA is not set 824# CONFIG_I2C_VIA is not set
829# CONFIG_I2C_VIAPRO is not set 825# CONFIG_I2C_VIAPRO is not set
830# CONFIG_I2C_VOODOO3 is not set 826# CONFIG_I2C_VOODOO3 is not set
831# CONFIG_I2C_PCA_ISA is not set
832 827
833# 828#
834# Miscellaneous I2C Chip support 829# Miscellaneous I2C Chip support
@@ -861,36 +856,40 @@ CONFIG_SPI_MPC83xx=y
861# 856#
862# SPI Protocol Masters 857# SPI Protocol Masters
863# 858#
859# CONFIG_SPI_AT25 is not set
860# CONFIG_SPI_SPIDEV is not set
864 861
865# 862#
866# Dallas's 1-wire bus 863# Dallas's 1-wire bus
867# 864#
868# CONFIG_W1 is not set 865# CONFIG_W1 is not set
866# CONFIG_HWMON is not set
869 867
870# 868#
871# Hardware Monitoring support 869# Multifunction device drivers
872# 870#
873# CONFIG_HWMON is not set 871# CONFIG_MFD_SM501 is not set
874# CONFIG_HWMON_VID is not set
875 872
876# 873#
877# Multimedia devices 874# Multimedia devices
878# 875#
879# CONFIG_VIDEO_DEV is not set 876# CONFIG_VIDEO_DEV is not set
877# CONFIG_DVB_CORE is not set
878CONFIG_DAB=y
879# CONFIG_USB_DABUSB is not set
880 880
881# 881#
882# Digital Video Broadcasting Devices 882# Graphics support
883# 883#
884# CONFIG_DVB is not set 884# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
885# CONFIG_USB_DABUSB is not set
886 885
887# 886#
888# Graphics support 887# Display device support
889# 888#
890# CONFIG_FIRMWARE_EDID is not set 889# CONFIG_DISPLAY_SUPPORT is not set
890# CONFIG_VGASTATE is not set
891# CONFIG_FB is not set 891# CONFIG_FB is not set
892# CONFIG_FB_IBM_GXT4500 is not set 892# CONFIG_FB_IBM_GXT4500 is not set
893# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
894 893
895# 894#
896# Sound 895# Sound
@@ -910,7 +909,7 @@ CONFIG_USB=y
910# Miscellaneous USB options 909# Miscellaneous USB options
911# 910#
912CONFIG_USB_DEVICEFS=y 911CONFIG_USB_DEVICEFS=y
913# CONFIG_USB_BANDWIDTH is not set 912CONFIG_USB_DEVICE_CLASS=y
914# CONFIG_USB_DYNAMIC_MINORS is not set 913# CONFIG_USB_DYNAMIC_MINORS is not set
915# CONFIG_USB_OTG is not set 914# CONFIG_USB_OTG is not set
916 915
@@ -921,6 +920,7 @@ CONFIG_USB_EHCI_HCD=y
921# CONFIG_USB_EHCI_SPLIT_ISO is not set 920# CONFIG_USB_EHCI_SPLIT_ISO is not set
922# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 921# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
923# CONFIG_USB_EHCI_TT_NEWSCHED is not set 922# CONFIG_USB_EHCI_TT_NEWSCHED is not set
923# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
924# CONFIG_USB_ISP116X_HCD is not set 924# CONFIG_USB_ISP116X_HCD is not set
925# CONFIG_USB_OHCI_HCD is not set 925# CONFIG_USB_OHCI_HCD is not set
926# CONFIG_USB_UHCI_HCD is not set 926# CONFIG_USB_UHCI_HCD is not set
@@ -953,28 +953,10 @@ CONFIG_USB_STORAGE=y
953# CONFIG_USB_LIBUSUAL is not set 953# CONFIG_USB_LIBUSUAL is not set
954 954
955# 955#
956# USB Input Devices
957#
958
959#
960# USB HID Boot Protocol drivers
961#
962
963#
964# USB Imaging devices 956# USB Imaging devices
965# 957#
966# CONFIG_USB_MDC800 is not set 958# CONFIG_USB_MDC800 is not set
967# CONFIG_USB_MICROTEK is not set 959# CONFIG_USB_MICROTEK is not set
968
969#
970# USB Network Adapters
971#
972# CONFIG_USB_CATC is not set
973# CONFIG_USB_KAWETH is not set
974# CONFIG_USB_PEGASUS is not set
975# CONFIG_USB_RTL8150 is not set
976# CONFIG_USB_USBNET_MII is not set
977# CONFIG_USB_USBNET is not set
978CONFIG_USB_MON=y 960CONFIG_USB_MON=y
979 961
980# 962#
@@ -996,6 +978,7 @@ CONFIG_USB_MON=y
996# CONFIG_USB_RIO500 is not set 978# CONFIG_USB_RIO500 is not set
997# CONFIG_USB_LEGOTOWER is not set 979# CONFIG_USB_LEGOTOWER is not set
998# CONFIG_USB_LCD is not set 980# CONFIG_USB_LCD is not set
981# CONFIG_USB_BERRY_CHARGE is not set
999# CONFIG_USB_LED is not set 982# CONFIG_USB_LED is not set
1000# CONFIG_USB_CYPRESS_CY7C63 is not set 983# CONFIG_USB_CYPRESS_CY7C63 is not set
1001# CONFIG_USB_CYTHERM is not set 984# CONFIG_USB_CYTHERM is not set
@@ -1006,6 +989,7 @@ CONFIG_USB_MON=y
1006# CONFIG_USB_SISUSBVGA is not set 989# CONFIG_USB_SISUSBVGA is not set
1007# CONFIG_USB_LD is not set 990# CONFIG_USB_LD is not set
1008# CONFIG_USB_TRANCEVIBRATOR is not set 991# CONFIG_USB_TRANCEVIBRATOR is not set
992# CONFIG_USB_IOWARRIOR is not set
1009# CONFIG_USB_TEST is not set 993# CONFIG_USB_TEST is not set
1010 994
1011# 995#
@@ -1016,10 +1000,6 @@ CONFIG_USB_MON=y
1016# USB Gadget Support 1000# USB Gadget Support
1017# 1001#
1018# CONFIG_USB_GADGET is not set 1002# CONFIG_USB_GADGET is not set
1019
1020#
1021# MMC/SD Card support
1022#
1023# CONFIG_MMC is not set 1003# CONFIG_MMC is not set
1024 1004
1025# 1005#
@@ -1060,26 +1040,39 @@ CONFIG_RTC_INTF_SYSFS=y
1060CONFIG_RTC_INTF_PROC=y 1040CONFIG_RTC_INTF_PROC=y
1061CONFIG_RTC_INTF_DEV=y 1041CONFIG_RTC_INTF_DEV=y
1062CONFIG_RTC_INTF_DEV_UIE_EMUL=y 1042CONFIG_RTC_INTF_DEV_UIE_EMUL=y
1043# CONFIG_RTC_DRV_TEST is not set
1063 1044
1064# 1045#
1065# RTC drivers 1046# I2C RTC drivers
1066# 1047#
1067# CONFIG_RTC_DRV_X1205 is not set
1068CONFIG_RTC_DRV_DS1307=y 1048CONFIG_RTC_DRV_DS1307=y
1069# CONFIG_RTC_DRV_DS1553 is not set
1070# CONFIG_RTC_DRV_ISL1208 is not set
1071# CONFIG_RTC_DRV_DS1672 is not set 1049# CONFIG_RTC_DRV_DS1672 is not set
1072# CONFIG_RTC_DRV_DS1742 is not set 1050# CONFIG_RTC_DRV_MAX6900 is not set
1051# CONFIG_RTC_DRV_RS5C372 is not set
1052# CONFIG_RTC_DRV_ISL1208 is not set
1053# CONFIG_RTC_DRV_X1205 is not set
1073# CONFIG_RTC_DRV_PCF8563 is not set 1054# CONFIG_RTC_DRV_PCF8563 is not set
1074# CONFIG_RTC_DRV_PCF8583 is not set 1055# CONFIG_RTC_DRV_PCF8583 is not set
1056
1057#
1058# SPI RTC drivers
1059#
1075# CONFIG_RTC_DRV_RS5C348 is not set 1060# CONFIG_RTC_DRV_RS5C348 is not set
1076# CONFIG_RTC_DRV_RS5C372 is not set
1077# CONFIG_RTC_DRV_M48T86 is not set
1078# CONFIG_RTC_DRV_TEST is not set
1079# CONFIG_RTC_DRV_MAX6902 is not set 1061# CONFIG_RTC_DRV_MAX6902 is not set
1062
1063#
1064# Platform RTC drivers
1065#
1066# CONFIG_RTC_DRV_DS1553 is not set
1067# CONFIG_RTC_DRV_DS1742 is not set
1068# CONFIG_RTC_DRV_M48T86 is not set
1080# CONFIG_RTC_DRV_V3020 is not set 1069# CONFIG_RTC_DRV_V3020 is not set
1081 1070
1082# 1071#
1072# on-CPU RTC drivers
1073#
1074
1075#
1083# DMA Engine support 1076# DMA Engine support
1084# 1077#
1085CONFIG_DMA_ENGINE=y 1078CONFIG_DMA_ENGINE=y
@@ -1095,10 +1088,6 @@ CONFIG_NET_DMA=y
1095CONFIG_INTEL_IOATDMA=y 1088CONFIG_INTEL_IOATDMA=y
1096 1089
1097# 1090#
1098# Virtualization
1099#
1100
1101#
1102# File systems 1091# File systems
1103# 1092#
1104CONFIG_EXT2_FS=y 1093CONFIG_EXT2_FS=y
@@ -1190,6 +1179,7 @@ CONFIG_LOCKD_V4=y
1190CONFIG_NFS_COMMON=y 1179CONFIG_NFS_COMMON=y
1191CONFIG_SUNRPC=y 1180CONFIG_SUNRPC=y
1192CONFIG_SUNRPC_GSS=y 1181CONFIG_SUNRPC_GSS=y
1182# CONFIG_SUNRPC_BIND34 is not set
1193CONFIG_RPCSEC_GSS_KRB5=y 1183CONFIG_RPCSEC_GSS_KRB5=y
1194# CONFIG_RPCSEC_GSS_SPKM3 is not set 1184# CONFIG_RPCSEC_GSS_SPKM3 is not set
1195# CONFIG_SMB_FS is not set 1185# CONFIG_SMB_FS is not set
@@ -1219,6 +1209,7 @@ CONFIG_MSDOS_PARTITION=y
1219# CONFIG_SUN_PARTITION is not set 1209# CONFIG_SUN_PARTITION is not set
1220# CONFIG_KARMA_PARTITION is not set 1210# CONFIG_KARMA_PARTITION is not set
1221# CONFIG_EFI_PARTITION is not set 1211# CONFIG_EFI_PARTITION is not set
1212# CONFIG_SYSV68_PARTITION is not set
1222 1213
1223# 1214#
1224# Native Language Support 1215# Native Language Support
@@ -1268,6 +1259,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1268# Distributed Lock Manager 1259# Distributed Lock Manager
1269# 1260#
1270# CONFIG_DLM is not set 1261# CONFIG_DLM is not set
1262# CONFIG_UCC_SLOW is not set
1271 1263
1272# 1264#
1273# Library routines 1265# Library routines
@@ -1275,10 +1267,13 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1275CONFIG_BITREVERSE=y 1267CONFIG_BITREVERSE=y
1276# CONFIG_CRC_CCITT is not set 1268# CONFIG_CRC_CCITT is not set
1277# CONFIG_CRC16 is not set 1269# CONFIG_CRC16 is not set
1270# CONFIG_CRC_ITU_T is not set
1278CONFIG_CRC32=y 1271CONFIG_CRC32=y
1279# CONFIG_LIBCRC32C is not set 1272# CONFIG_LIBCRC32C is not set
1280CONFIG_PLIST=y 1273CONFIG_PLIST=y
1281CONFIG_IOMAP_COPY=y 1274CONFIG_HAS_IOMEM=y
1275CONFIG_HAS_IOPORT=y
1276CONFIG_HAS_DMA=y
1282 1277
1283# 1278#
1284# Instrumentation Support 1279# Instrumentation Support
@@ -1295,10 +1290,8 @@ CONFIG_ENABLE_MUST_CHECK=y
1295# CONFIG_DEBUG_FS is not set 1290# CONFIG_DEBUG_FS is not set
1296# CONFIG_HEADERS_CHECK is not set 1291# CONFIG_HEADERS_CHECK is not set
1297# CONFIG_DEBUG_KERNEL is not set 1292# CONFIG_DEBUG_KERNEL is not set
1298CONFIG_LOG_BUF_SHIFT=14
1299# CONFIG_DEBUG_BUGVERBOSE is not set 1293# CONFIG_DEBUG_BUGVERBOSE is not set
1300# CONFIG_BOOTX_TEXT is not set 1294# CONFIG_BOOTX_TEXT is not set
1301# CONFIG_SERIAL_TEXT_DEBUG is not set
1302# CONFIG_PPC_EARLY_DEBUG is not set 1295# CONFIG_PPC_EARLY_DEBUG is not set
1303 1296
1304# 1297#
@@ -1327,8 +1320,11 @@ CONFIG_CRYPTO_MD5=y
1327# CONFIG_CRYPTO_GF128MUL is not set 1320# CONFIG_CRYPTO_GF128MUL is not set
1328# CONFIG_CRYPTO_ECB is not set 1321# CONFIG_CRYPTO_ECB is not set
1329CONFIG_CRYPTO_CBC=y 1322CONFIG_CRYPTO_CBC=y
1323CONFIG_CRYPTO_PCBC=m
1330# CONFIG_CRYPTO_LRW is not set 1324# CONFIG_CRYPTO_LRW is not set
1325# CONFIG_CRYPTO_CRYPTD is not set
1331CONFIG_CRYPTO_DES=y 1326CONFIG_CRYPTO_DES=y
1327# CONFIG_CRYPTO_FCRYPT is not set
1332# CONFIG_CRYPTO_BLOWFISH is not set 1328# CONFIG_CRYPTO_BLOWFISH is not set
1333# CONFIG_CRYPTO_TWOFISH is not set 1329# CONFIG_CRYPTO_TWOFISH is not set
1334# CONFIG_CRYPTO_SERPENT is not set 1330# CONFIG_CRYPTO_SERPENT is not set
@@ -1342,6 +1338,7 @@ CONFIG_CRYPTO_DES=y
1342# CONFIG_CRYPTO_DEFLATE is not set 1338# CONFIG_CRYPTO_DEFLATE is not set
1343# CONFIG_CRYPTO_MICHAEL_MIC is not set 1339# CONFIG_CRYPTO_MICHAEL_MIC is not set
1344# CONFIG_CRYPTO_CRC32C is not set 1340# CONFIG_CRYPTO_CRC32C is not set
1341# CONFIG_CRYPTO_CAMELLIA is not set
1345# CONFIG_CRYPTO_TEST is not set 1342# CONFIG_CRYPTO_TEST is not set
1346 1343
1347# 1344#
diff --git a/arch/powerpc/configs/mpc834x_itxgp_defconfig b/arch/powerpc/configs/mpc834x_itxgp_defconfig
index 4aa666c9cb94..704ee8b285bf 100644
--- a/arch/powerpc/configs/mpc834x_itxgp_defconfig
+++ b/arch/powerpc/configs/mpc834x_itxgp_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.20 3# Linux kernel version: 2.6.22-rc7
4# Fri Feb 9 13:28:19 2007 4# Sun Jul 1 23:56:56 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_PPC_DCR_MMIO is not set 45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -83,14 +87,19 @@ CONFIG_BUG=y
83CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
86# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 95CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
90CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94 103
95# 104#
96# Loadable module support 105# Loadable module support
@@ -122,18 +131,33 @@ CONFIG_DEFAULT_AS=y
122# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
123# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
124CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
125CONFIG_PPC_GEN550=y
126# CONFIG_WANT_EARLY_SERIAL is not set
127 134
128# 135#
129# Platform support 136# Platform support
130# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
143# CONFIG_MPC8313_RDB is not set
131# CONFIG_MPC832x_MDS is not set 144# CONFIG_MPC832x_MDS is not set
132# CONFIG_MPC834x_SYS is not set 145# CONFIG_MPC832x_RDB is not set
146# CONFIG_MPC834x_MDS is not set
133CONFIG_MPC834x_ITX=y 147CONFIG_MPC834x_ITX=y
134# CONFIG_MPC8360E_PB is not set 148# CONFIG_MPC836x_MDS is not set
135CONFIG_MPC834x=y 149CONFIG_MPC834x=y
136# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160# CONFIG_CPM2 is not set
137 161
138# 162#
139# Kernel options 163# Kernel options
@@ -161,32 +185,33 @@ CONFIG_FLAT_NODE_MEM_MAP=y
161# CONFIG_SPARSEMEM_STATIC is not set 185# CONFIG_SPARSEMEM_STATIC is not set
162CONFIG_SPLIT_PTLOCK_CPUS=4 186CONFIG_SPLIT_PTLOCK_CPUS=4
163# CONFIG_RESOURCES_64BIT is not set 187# CONFIG_RESOURCES_64BIT is not set
188CONFIG_ZONE_DMA_FLAG=1
164CONFIG_PROC_DEVICETREE=y 189CONFIG_PROC_DEVICETREE=y
165# CONFIG_CMDLINE_BOOL is not set 190# CONFIG_CMDLINE_BOOL is not set
166# CONFIG_PM is not set 191# CONFIG_PM is not set
167CONFIG_SECCOMP=y 192CONFIG_SECCOMP=y
193CONFIG_WANT_DEVICE_TREE=y
194CONFIG_DEVICE_TREE=""
168CONFIG_ISA_DMA_API=y 195CONFIG_ISA_DMA_API=y
169 196
170# 197#
171# Bus options 198# Bus options
172# 199#
200CONFIG_ZONE_DMA=y
173CONFIG_GENERIC_ISA_DMA=y 201CONFIG_GENERIC_ISA_DMA=y
174# CONFIG_MPIC_WEIRD is not set
175# CONFIG_PPC_I8259 is not set
176CONFIG_PPC_INDIRECT_PCI=y 202CONFIG_PPC_INDIRECT_PCI=y
203# CONFIG_PPC_INDIRECT_PCI_BE is not set
177CONFIG_FSL_SOC=y 204CONFIG_FSL_SOC=y
178CONFIG_PCI=y 205CONFIG_PCI=y
179CONFIG_PCI_DOMAINS=y 206CONFIG_PCI_DOMAINS=y
180# CONFIG_PCIEPORTBUS is not set 207# CONFIG_PCIEPORTBUS is not set
208CONFIG_ARCH_SUPPORTS_MSI=y
209# CONFIG_PCI_MSI is not set
181 210
182# 211#
183# PCCARD (PCMCIA/CardBus) support 212# PCCARD (PCMCIA/CardBus) support
184# 213#
185# CONFIG_PCCARD is not set 214# CONFIG_PCCARD is not set
186
187#
188# PCI Hotplug Support
189#
190# CONFIG_HOTPLUG_PCI is not set 215# CONFIG_HOTPLUG_PCI is not set
191 216
192# 217#
@@ -211,13 +236,13 @@ CONFIG_NET=y
211# 236#
212# Networking options 237# Networking options
213# 238#
214# CONFIG_NETDEBUG is not set
215CONFIG_PACKET=y 239CONFIG_PACKET=y
216# CONFIG_PACKET_MMAP is not set 240# CONFIG_PACKET_MMAP is not set
217CONFIG_UNIX=y 241CONFIG_UNIX=y
218CONFIG_XFRM=y 242CONFIG_XFRM=y
219# CONFIG_XFRM_USER is not set 243# CONFIG_XFRM_USER is not set
220# CONFIG_XFRM_SUB_POLICY is not set 244# CONFIG_XFRM_SUB_POLICY is not set
245# CONFIG_XFRM_MIGRATE is not set
221# CONFIG_NET_KEY is not set 246# CONFIG_NET_KEY is not set
222CONFIG_INET=y 247CONFIG_INET=y
223CONFIG_IP_MULTICAST=y 248CONFIG_IP_MULTICAST=y
@@ -251,20 +276,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
251# CONFIG_INET6_TUNNEL is not set 276# CONFIG_INET6_TUNNEL is not set
252# CONFIG_NETWORK_SECMARK is not set 277# CONFIG_NETWORK_SECMARK is not set
253# CONFIG_NETFILTER is not set 278# CONFIG_NETFILTER is not set
254
255#
256# DCCP Configuration (EXPERIMENTAL)
257#
258# CONFIG_IP_DCCP is not set 279# CONFIG_IP_DCCP is not set
259
260#
261# SCTP Configuration (EXPERIMENTAL)
262#
263# CONFIG_IP_SCTP is not set 280# CONFIG_IP_SCTP is not set
264
265#
266# TIPC Configuration (EXPERIMENTAL)
267#
268# CONFIG_TIPC is not set 281# CONFIG_TIPC is not set
269# CONFIG_ATM is not set 282# CONFIG_ATM is not set
270# CONFIG_BRIDGE is not set 283# CONFIG_BRIDGE is not set
@@ -290,7 +303,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
290# CONFIG_HAMRADIO is not set 303# CONFIG_HAMRADIO is not set
291# CONFIG_IRDA is not set 304# CONFIG_IRDA is not set
292# CONFIG_BT is not set 305# CONFIG_BT is not set
306# CONFIG_AF_RXRPC is not set
307
308#
309# Wireless
310#
311# CONFIG_CFG80211 is not set
312# CONFIG_WIRELESS_EXT is not set
313# CONFIG_MAC80211 is not set
293# CONFIG_IEEE80211 is not set 314# CONFIG_IEEE80211 is not set
315# CONFIG_RFKILL is not set
294 316
295# 317#
296# Device Drivers 318# Device Drivers
@@ -308,10 +330,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
308# Connector - unified userspace <-> kernelspace linker 330# Connector - unified userspace <-> kernelspace linker
309# 331#
310# CONFIG_CONNECTOR is not set 332# CONFIG_CONNECTOR is not set
311
312#
313# Memory Technology Devices (MTD)
314#
315CONFIG_MTD=y 333CONFIG_MTD=y
316# CONFIG_MTD_DEBUG is not set 334# CONFIG_MTD_DEBUG is not set
317# CONFIG_MTD_CONCAT is not set 335# CONFIG_MTD_CONCAT is not set
@@ -354,7 +372,6 @@ CONFIG_MTD_CFI_UTIL=y
354# CONFIG_MTD_RAM is not set 372# CONFIG_MTD_RAM is not set
355# CONFIG_MTD_ROM is not set 373# CONFIG_MTD_ROM is not set
356# CONFIG_MTD_ABSENT is not set 374# CONFIG_MTD_ABSENT is not set
357# CONFIG_MTD_OBSOLETE_CHIPS is not set
358 375
359# 376#
360# Mapping drivers for chip access 377# Mapping drivers for chip access
@@ -384,17 +401,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
384# CONFIG_MTD_DOC2000 is not set 401# CONFIG_MTD_DOC2000 is not set
385# CONFIG_MTD_DOC2001 is not set 402# CONFIG_MTD_DOC2001 is not set
386# CONFIG_MTD_DOC2001PLUS is not set 403# CONFIG_MTD_DOC2001PLUS is not set
387
388#
389# NAND Flash Device Drivers
390#
391# CONFIG_MTD_NAND is not set 404# CONFIG_MTD_NAND is not set
392# CONFIG_MTD_NAND_CAFE is not set 405# CONFIG_MTD_ONENAND is not set
393 406
394# 407#
395# OneNAND Flash Device Drivers 408# UBI - Unsorted block images
396# 409#
397# CONFIG_MTD_ONENAND is not set 410# CONFIG_MTD_UBI is not set
398 411
399# 412#
400# Parallel port support 413# Parallel port support
@@ -404,6 +417,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
404# 417#
405# Plug and Play support 418# Plug and Play support
406# 419#
420# CONFIG_PNPACPI is not set
407 421
408# 422#
409# Block devices 423# Block devices
@@ -422,19 +436,16 @@ CONFIG_BLK_DEV_RAM=y
422CONFIG_BLK_DEV_RAM_COUNT=16 436CONFIG_BLK_DEV_RAM_COUNT=16
423CONFIG_BLK_DEV_RAM_SIZE=32768 437CONFIG_BLK_DEV_RAM_SIZE=32768
424CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 438CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
425CONFIG_BLK_DEV_INITRD=y
426# CONFIG_CDROM_PKTCDVD is not set 439# CONFIG_CDROM_PKTCDVD is not set
427# CONFIG_ATA_OVER_ETH is not set 440# CONFIG_ATA_OVER_ETH is not set
428 441
429# 442#
430# Misc devices 443# Misc devices
431# 444#
445# CONFIG_PHANTOM is not set
432# CONFIG_SGI_IOC4 is not set 446# CONFIG_SGI_IOC4 is not set
433# CONFIG_TIFM_CORE is not set 447# CONFIG_TIFM_CORE is not set
434 448# CONFIG_BLINK is not set
435#
436# ATA/ATAPI/MFM/RLL support
437#
438# CONFIG_IDE is not set 449# CONFIG_IDE is not set
439 450
440# 451#
@@ -463,6 +474,7 @@ CONFIG_CHR_DEV_SG=y
463# CONFIG_SCSI_CONSTANTS is not set 474# CONFIG_SCSI_CONSTANTS is not set
464# CONFIG_SCSI_LOGGING is not set 475# CONFIG_SCSI_LOGGING is not set
465# CONFIG_SCSI_SCAN_ASYNC is not set 476# CONFIG_SCSI_SCAN_ASYNC is not set
477CONFIG_SCSI_WAIT_SCAN=m
466 478
467# 479#
468# SCSI Transports 480# SCSI Transports
@@ -510,10 +522,6 @@ CONFIG_SCSI_SPI_ATTRS=y
510# CONFIG_SCSI_NSP32 is not set 522# CONFIG_SCSI_NSP32 is not set
511# CONFIG_SCSI_DEBUG is not set 523# CONFIG_SCSI_DEBUG is not set
512# CONFIG_SCSI_SRP is not set 524# CONFIG_SCSI_SRP is not set
513
514#
515# Serial ATA (prod) and Parallel ATA (experimental) drivers
516#
517# CONFIG_ATA is not set 525# CONFIG_ATA is not set
518 526
519# 527#
@@ -532,18 +540,14 @@ CONFIG_SCSI_SPI_ATTRS=y
532# 540#
533# IEEE 1394 (FireWire) support 541# IEEE 1394 (FireWire) support
534# 542#
543# CONFIG_FIREWIRE is not set
535# CONFIG_IEEE1394 is not set 544# CONFIG_IEEE1394 is not set
536 545
537# 546#
538# I2O device support 547# I2O device support
539# 548#
540# CONFIG_I2O is not set 549# CONFIG_I2O is not set
541 550# CONFIG_MACINTOSH_DRIVERS is not set
542#
543# Macintosh device drivers
544#
545# CONFIG_MAC_EMUMOUSEBTN is not set
546# CONFIG_WINDFARM is not set
547 551
548# 552#
549# Network device support 553# Network device support
@@ -553,15 +557,7 @@ CONFIG_NETDEVICES=y
553# CONFIG_BONDING is not set 557# CONFIG_BONDING is not set
554# CONFIG_EQUALIZER is not set 558# CONFIG_EQUALIZER is not set
555# CONFIG_TUN is not set 559# CONFIG_TUN is not set
556
557#
558# ARCnet devices
559#
560# CONFIG_ARCNET is not set 560# CONFIG_ARCNET is not set
561
562#
563# PHY device support
564#
565CONFIG_PHYLIB=y 561CONFIG_PHYLIB=y
566 562
567# 563#
@@ -581,10 +577,7 @@ CONFIG_CICADA_PHY=y
581# Ethernet (10 or 100Mbit) 577# Ethernet (10 or 100Mbit)
582# 578#
583# CONFIG_NET_ETHERNET is not set 579# CONFIG_NET_ETHERNET is not set
584 580CONFIG_NETDEV_1000=y
585#
586# Ethernet (1000 Mbit)
587#
588# CONFIG_ACENIC is not set 581# CONFIG_ACENIC is not set
589# CONFIG_DL2K is not set 582# CONFIG_DL2K is not set
590# CONFIG_E1000 is not set 583# CONFIG_E1000 is not set
@@ -596,34 +589,28 @@ CONFIG_CICADA_PHY=y
596# CONFIG_SKGE is not set 589# CONFIG_SKGE is not set
597# CONFIG_SKY2 is not set 590# CONFIG_SKY2 is not set
598# CONFIG_SK98LIN is not set 591# CONFIG_SK98LIN is not set
592# CONFIG_VIA_VELOCITY is not set
599# CONFIG_TIGON3 is not set 593# CONFIG_TIGON3 is not set
600# CONFIG_BNX2 is not set 594# CONFIG_BNX2 is not set
601CONFIG_GIANFAR=y 595CONFIG_GIANFAR=y
602CONFIG_GFAR_NAPI=y 596CONFIG_GFAR_NAPI=y
603# CONFIG_QLA3XXX is not set 597# CONFIG_QLA3XXX is not set
604 598# CONFIG_ATL1 is not set
605# 599CONFIG_NETDEV_10000=y
606# Ethernet (10000 Mbit)
607#
608# CONFIG_CHELSIO_T1 is not set 600# CONFIG_CHELSIO_T1 is not set
601# CONFIG_CHELSIO_T3 is not set
609# CONFIG_IXGB is not set 602# CONFIG_IXGB is not set
610# CONFIG_S2IO is not set 603# CONFIG_S2IO is not set
611# CONFIG_MYRI10GE is not set 604# CONFIG_MYRI10GE is not set
612# CONFIG_NETXEN_NIC is not set 605# CONFIG_NETXEN_NIC is not set
613 606# CONFIG_MLX4_CORE is not set
614#
615# Token Ring devices
616#
617# CONFIG_TR is not set 607# CONFIG_TR is not set
618 608
619# 609#
620# Wireless LAN (non-hamradio) 610# Wireless LAN
621#
622# CONFIG_NET_RADIO is not set
623
624#
625# Wan interfaces
626# 611#
612# CONFIG_WLAN_PRE80211 is not set
613# CONFIG_WLAN_80211 is not set
627# CONFIG_WAN is not set 614# CONFIG_WAN is not set
628# CONFIG_FDDI is not set 615# CONFIG_FDDI is not set
629# CONFIG_HIPPI is not set 616# CONFIG_HIPPI is not set
@@ -679,6 +666,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
679CONFIG_SERIAL_CORE=y 666CONFIG_SERIAL_CORE=y
680CONFIG_SERIAL_CORE_CONSOLE=y 667CONFIG_SERIAL_CORE_CONSOLE=y
681# CONFIG_SERIAL_JSM is not set 668# CONFIG_SERIAL_JSM is not set
669# CONFIG_SERIAL_OF_PLATFORM is not set
682CONFIG_UNIX98_PTYS=y 670CONFIG_UNIX98_PTYS=y
683CONFIG_LEGACY_PTYS=y 671CONFIG_LEGACY_PTYS=y
684CONFIG_LEGACY_PTY_COUNT=256 672CONFIG_LEGACY_PTY_COUNT=256
@@ -687,10 +675,6 @@ CONFIG_LEGACY_PTY_COUNT=256
687# IPMI 675# IPMI
688# 676#
689# CONFIG_IPMI_HANDLER is not set 677# CONFIG_IPMI_HANDLER is not set
690
691#
692# Watchdog Cards
693#
694CONFIG_WATCHDOG=y 678CONFIG_WATCHDOG=y
695# CONFIG_WATCHDOG_NOWAYOUT is not set 679# CONFIG_WATCHDOG_NOWAYOUT is not set
696 680
@@ -708,7 +692,6 @@ CONFIG_83xx_WDT=y
708CONFIG_HW_RANDOM=y 692CONFIG_HW_RANDOM=y
709# CONFIG_NVRAM is not set 693# CONFIG_NVRAM is not set
710# CONFIG_GEN_RTC is not set 694# CONFIG_GEN_RTC is not set
711# CONFIG_DTLK is not set
712# CONFIG_R3964 is not set 695# CONFIG_R3964 is not set
713# CONFIG_APPLICOM is not set 696# CONFIG_APPLICOM is not set
714# CONFIG_AGP is not set 697# CONFIG_AGP is not set
@@ -719,11 +702,9 @@ CONFIG_HW_RANDOM=y
719# TPM devices 702# TPM devices
720# 703#
721# CONFIG_TCG_TPM is not set 704# CONFIG_TCG_TPM is not set
722 705CONFIG_DEVPORT=y
723#
724# I2C support
725#
726CONFIG_I2C=y 706CONFIG_I2C=y
707CONFIG_I2C_BOARDINFO=y
727CONFIG_I2C_CHARDEV=y 708CONFIG_I2C_CHARDEV=y
728 709
729# 710#
@@ -750,6 +731,7 @@ CONFIG_I2C_MPC=y
750# CONFIG_I2C_PARPORT_LIGHT is not set 731# CONFIG_I2C_PARPORT_LIGHT is not set
751# CONFIG_I2C_PROSAVAGE is not set 732# CONFIG_I2C_PROSAVAGE is not set
752# CONFIG_I2C_SAVAGE4 is not set 733# CONFIG_I2C_SAVAGE4 is not set
734# CONFIG_I2C_SIMTEC is not set
753# CONFIG_I2C_SIS5595 is not set 735# CONFIG_I2C_SIS5595 is not set
754# CONFIG_I2C_SIS630 is not set 736# CONFIG_I2C_SIS630 is not set
755# CONFIG_I2C_SIS96X is not set 737# CONFIG_I2C_SIS96X is not set
@@ -757,7 +739,6 @@ CONFIG_I2C_MPC=y
757# CONFIG_I2C_VIA is not set 739# CONFIG_I2C_VIA is not set
758# CONFIG_I2C_VIAPRO is not set 740# CONFIG_I2C_VIAPRO is not set
759# CONFIG_I2C_VOODOO3 is not set 741# CONFIG_I2C_VOODOO3 is not set
760# CONFIG_I2C_PCA_ISA is not set
761 742
762# 743#
763# Miscellaneous I2C Chip support 744# Miscellaneous I2C Chip support
@@ -790,35 +771,39 @@ CONFIG_SPI_MPC83xx=y
790# 771#
791# SPI Protocol Masters 772# SPI Protocol Masters
792# 773#
774# CONFIG_SPI_AT25 is not set
775# CONFIG_SPI_SPIDEV is not set
793 776
794# 777#
795# Dallas's 1-wire bus 778# Dallas's 1-wire bus
796# 779#
797# CONFIG_W1 is not set 780# CONFIG_W1 is not set
781# CONFIG_HWMON is not set
798 782
799# 783#
800# Hardware Monitoring support 784# Multifunction device drivers
801# 785#
802# CONFIG_HWMON is not set 786# CONFIG_MFD_SM501 is not set
803# CONFIG_HWMON_VID is not set
804 787
805# 788#
806# Multimedia devices 789# Multimedia devices
807# 790#
808# CONFIG_VIDEO_DEV is not set 791# CONFIG_VIDEO_DEV is not set
792# CONFIG_DVB_CORE is not set
793CONFIG_DAB=y
809 794
810# 795#
811# Digital Video Broadcasting Devices 796# Graphics support
812# 797#
813# CONFIG_DVB is not set 798# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
814 799
815# 800#
816# Graphics support 801# Display device support
817# 802#
818# CONFIG_FIRMWARE_EDID is not set 803# CONFIG_DISPLAY_SUPPORT is not set
804# CONFIG_VGASTATE is not set
819# CONFIG_FB is not set 805# CONFIG_FB is not set
820# CONFIG_FB_IBM_GXT4500 is not set 806# CONFIG_FB_IBM_GXT4500 is not set
821# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
822 807
823# 808#
824# Sound 809# Sound
@@ -841,10 +826,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
841# USB Gadget Support 826# USB Gadget Support
842# 827#
843# CONFIG_USB_GADGET is not set 828# CONFIG_USB_GADGET is not set
844
845#
846# MMC/SD Card support
847#
848# CONFIG_MMC is not set 829# CONFIG_MMC is not set
849 830
850# 831#
@@ -885,26 +866,39 @@ CONFIG_RTC_INTF_SYSFS=y
885CONFIG_RTC_INTF_PROC=y 866CONFIG_RTC_INTF_PROC=y
886CONFIG_RTC_INTF_DEV=y 867CONFIG_RTC_INTF_DEV=y
887CONFIG_RTC_INTF_DEV_UIE_EMUL=y 868CONFIG_RTC_INTF_DEV_UIE_EMUL=y
869# CONFIG_RTC_DRV_TEST is not set
888 870
889# 871#
890# RTC drivers 872# I2C RTC drivers
891# 873#
892# CONFIG_RTC_DRV_X1205 is not set
893CONFIG_RTC_DRV_DS1307=y 874CONFIG_RTC_DRV_DS1307=y
894# CONFIG_RTC_DRV_DS1553 is not set
895# CONFIG_RTC_DRV_ISL1208 is not set
896# CONFIG_RTC_DRV_DS1672 is not set 875# CONFIG_RTC_DRV_DS1672 is not set
897# CONFIG_RTC_DRV_DS1742 is not set 876# CONFIG_RTC_DRV_MAX6900 is not set
877# CONFIG_RTC_DRV_RS5C372 is not set
878# CONFIG_RTC_DRV_ISL1208 is not set
879# CONFIG_RTC_DRV_X1205 is not set
898# CONFIG_RTC_DRV_PCF8563 is not set 880# CONFIG_RTC_DRV_PCF8563 is not set
899# CONFIG_RTC_DRV_PCF8583 is not set 881# CONFIG_RTC_DRV_PCF8583 is not set
882
883#
884# SPI RTC drivers
885#
900# CONFIG_RTC_DRV_RS5C348 is not set 886# CONFIG_RTC_DRV_RS5C348 is not set
901# CONFIG_RTC_DRV_RS5C372 is not set
902# CONFIG_RTC_DRV_M48T86 is not set
903# CONFIG_RTC_DRV_TEST is not set
904# CONFIG_RTC_DRV_MAX6902 is not set 887# CONFIG_RTC_DRV_MAX6902 is not set
888
889#
890# Platform RTC drivers
891#
892# CONFIG_RTC_DRV_DS1553 is not set
893# CONFIG_RTC_DRV_DS1742 is not set
894# CONFIG_RTC_DRV_M48T86 is not set
905# CONFIG_RTC_DRV_V3020 is not set 895# CONFIG_RTC_DRV_V3020 is not set
906 896
907# 897#
898# on-CPU RTC drivers
899#
900
901#
908# DMA Engine support 902# DMA Engine support
909# 903#
910CONFIG_DMA_ENGINE=y 904CONFIG_DMA_ENGINE=y
@@ -920,10 +914,6 @@ CONFIG_NET_DMA=y
920CONFIG_INTEL_IOATDMA=y 914CONFIG_INTEL_IOATDMA=y
921 915
922# 916#
923# Virtualization
924#
925
926#
927# File systems 917# File systems
928# 918#
929CONFIG_EXT2_FS=y 919CONFIG_EXT2_FS=y
@@ -1015,6 +1005,7 @@ CONFIG_LOCKD_V4=y
1015CONFIG_NFS_COMMON=y 1005CONFIG_NFS_COMMON=y
1016CONFIG_SUNRPC=y 1006CONFIG_SUNRPC=y
1017CONFIG_SUNRPC_GSS=y 1007CONFIG_SUNRPC_GSS=y
1008# CONFIG_SUNRPC_BIND34 is not set
1018CONFIG_RPCSEC_GSS_KRB5=y 1009CONFIG_RPCSEC_GSS_KRB5=y
1019# CONFIG_RPCSEC_GSS_SPKM3 is not set 1010# CONFIG_RPCSEC_GSS_SPKM3 is not set
1020# CONFIG_SMB_FS is not set 1011# CONFIG_SMB_FS is not set
@@ -1044,6 +1035,7 @@ CONFIG_MSDOS_PARTITION=y
1044# CONFIG_SUN_PARTITION is not set 1035# CONFIG_SUN_PARTITION is not set
1045# CONFIG_KARMA_PARTITION is not set 1036# CONFIG_KARMA_PARTITION is not set
1046# CONFIG_EFI_PARTITION is not set 1037# CONFIG_EFI_PARTITION is not set
1038# CONFIG_SYSV68_PARTITION is not set
1047 1039
1048# 1040#
1049# Native Language Support 1041# Native Language Support
@@ -1093,6 +1085,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1093# Distributed Lock Manager 1085# Distributed Lock Manager
1094# 1086#
1095# CONFIG_DLM is not set 1087# CONFIG_DLM is not set
1088# CONFIG_UCC_SLOW is not set
1096 1089
1097# 1090#
1098# Library routines 1091# Library routines
@@ -1100,10 +1093,13 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1100CONFIG_BITREVERSE=y 1093CONFIG_BITREVERSE=y
1101# CONFIG_CRC_CCITT is not set 1094# CONFIG_CRC_CCITT is not set
1102# CONFIG_CRC16 is not set 1095# CONFIG_CRC16 is not set
1096# CONFIG_CRC_ITU_T is not set
1103CONFIG_CRC32=y 1097CONFIG_CRC32=y
1104# CONFIG_LIBCRC32C is not set 1098# CONFIG_LIBCRC32C is not set
1105CONFIG_PLIST=y 1099CONFIG_PLIST=y
1106CONFIG_IOMAP_COPY=y 1100CONFIG_HAS_IOMEM=y
1101CONFIG_HAS_IOPORT=y
1102CONFIG_HAS_DMA=y
1107 1103
1108# 1104#
1109# Instrumentation Support 1105# Instrumentation Support
@@ -1120,10 +1116,8 @@ CONFIG_ENABLE_MUST_CHECK=y
1120# CONFIG_DEBUG_FS is not set 1116# CONFIG_DEBUG_FS is not set
1121# CONFIG_HEADERS_CHECK is not set 1117# CONFIG_HEADERS_CHECK is not set
1122# CONFIG_DEBUG_KERNEL is not set 1118# CONFIG_DEBUG_KERNEL is not set
1123CONFIG_LOG_BUF_SHIFT=14
1124# CONFIG_DEBUG_BUGVERBOSE is not set 1119# CONFIG_DEBUG_BUGVERBOSE is not set
1125# CONFIG_BOOTX_TEXT is not set 1120# CONFIG_BOOTX_TEXT is not set
1126# CONFIG_SERIAL_TEXT_DEBUG is not set
1127# CONFIG_PPC_EARLY_DEBUG is not set 1121# CONFIG_PPC_EARLY_DEBUG is not set
1128 1122
1129# 1123#
@@ -1152,8 +1146,11 @@ CONFIG_CRYPTO_MD5=y
1152# CONFIG_CRYPTO_GF128MUL is not set 1146# CONFIG_CRYPTO_GF128MUL is not set
1153# CONFIG_CRYPTO_ECB is not set 1147# CONFIG_CRYPTO_ECB is not set
1154CONFIG_CRYPTO_CBC=y 1148CONFIG_CRYPTO_CBC=y
1149CONFIG_CRYPTO_PCBC=m
1155# CONFIG_CRYPTO_LRW is not set 1150# CONFIG_CRYPTO_LRW is not set
1151# CONFIG_CRYPTO_CRYPTD is not set
1156CONFIG_CRYPTO_DES=y 1152CONFIG_CRYPTO_DES=y
1153# CONFIG_CRYPTO_FCRYPT is not set
1157# CONFIG_CRYPTO_BLOWFISH is not set 1154# CONFIG_CRYPTO_BLOWFISH is not set
1158# CONFIG_CRYPTO_TWOFISH is not set 1155# CONFIG_CRYPTO_TWOFISH is not set
1159# CONFIG_CRYPTO_SERPENT is not set 1156# CONFIG_CRYPTO_SERPENT is not set
@@ -1167,6 +1164,7 @@ CONFIG_CRYPTO_DES=y
1167# CONFIG_CRYPTO_DEFLATE is not set 1164# CONFIG_CRYPTO_DEFLATE is not set
1168# CONFIG_CRYPTO_MICHAEL_MIC is not set 1165# CONFIG_CRYPTO_MICHAEL_MIC is not set
1169# CONFIG_CRYPTO_CRC32C is not set 1166# CONFIG_CRYPTO_CRC32C is not set
1167# CONFIG_CRYPTO_CAMELLIA is not set
1170# CONFIG_CRYPTO_TEST is not set 1168# CONFIG_CRYPTO_TEST is not set
1171 1169
1172# 1170#
diff --git a/arch/powerpc/configs/mpc834x_mds_defconfig b/arch/powerpc/configs/mpc834x_mds_defconfig
index 2e3f8efb6ab1..c28b3ee3cb12 100644
--- a/arch/powerpc/configs/mpc834x_mds_defconfig
+++ b/arch/powerpc/configs/mpc834x_mds_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.20 3# Linux kernel version: 2.6.22-rc7
4# Thu Feb 8 01:00:48 2007 4# Sun Jul 1 23:56:57 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_PPC_DCR_MMIO is not set 45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -83,14 +87,19 @@ CONFIG_BUG=y
83CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
86# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 95CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
90CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94 103
95# 104#
96# Loadable module support 105# Loadable module support
@@ -122,19 +131,33 @@ CONFIG_DEFAULT_AS=y
122# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
123# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
124CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
125CONFIG_PPC_GEN550=y
126# CONFIG_WANT_EARLY_SERIAL is not set
127 134
128# 135#
129# Platform support 136# Platform support
130# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
131# CONFIG_MPC8313_RDB is not set 143# CONFIG_MPC8313_RDB is not set
132# CONFIG_MPC832x_MDS is not set 144# CONFIG_MPC832x_MDS is not set
145# CONFIG_MPC832x_RDB is not set
133CONFIG_MPC834x_MDS=y 146CONFIG_MPC834x_MDS=y
134# CONFIG_MPC834x_ITX is not set 147# CONFIG_MPC834x_ITX is not set
135# CONFIG_MPC8360E_PB is not set 148# CONFIG_MPC836x_MDS is not set
136CONFIG_MPC834x=y 149CONFIG_MPC834x=y
137# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160# CONFIG_CPM2 is not set
138 161
139# 162#
140# Kernel options 163# Kernel options
@@ -162,32 +185,33 @@ CONFIG_FLAT_NODE_MEM_MAP=y
162# CONFIG_SPARSEMEM_STATIC is not set 185# CONFIG_SPARSEMEM_STATIC is not set
163CONFIG_SPLIT_PTLOCK_CPUS=4 186CONFIG_SPLIT_PTLOCK_CPUS=4
164# CONFIG_RESOURCES_64BIT is not set 187# CONFIG_RESOURCES_64BIT is not set
188CONFIG_ZONE_DMA_FLAG=1
165CONFIG_PROC_DEVICETREE=y 189CONFIG_PROC_DEVICETREE=y
166# CONFIG_CMDLINE_BOOL is not set 190# CONFIG_CMDLINE_BOOL is not set
167# CONFIG_PM is not set 191# CONFIG_PM is not set
168CONFIG_SECCOMP=y 192CONFIG_SECCOMP=y
193CONFIG_WANT_DEVICE_TREE=y
194CONFIG_DEVICE_TREE=""
169CONFIG_ISA_DMA_API=y 195CONFIG_ISA_DMA_API=y
170 196
171# 197#
172# Bus options 198# Bus options
173# 199#
200CONFIG_ZONE_DMA=y
174CONFIG_GENERIC_ISA_DMA=y 201CONFIG_GENERIC_ISA_DMA=y
175# CONFIG_MPIC_WEIRD is not set
176# CONFIG_PPC_I8259 is not set
177CONFIG_PPC_INDIRECT_PCI=y 202CONFIG_PPC_INDIRECT_PCI=y
203# CONFIG_PPC_INDIRECT_PCI_BE is not set
178CONFIG_FSL_SOC=y 204CONFIG_FSL_SOC=y
179CONFIG_PCI=y 205CONFIG_PCI=y
180CONFIG_PCI_DOMAINS=y 206CONFIG_PCI_DOMAINS=y
181# CONFIG_PCIEPORTBUS is not set 207# CONFIG_PCIEPORTBUS is not set
208CONFIG_ARCH_SUPPORTS_MSI=y
209# CONFIG_PCI_MSI is not set
182 210
183# 211#
184# PCCARD (PCMCIA/CardBus) support 212# PCCARD (PCMCIA/CardBus) support
185# 213#
186# CONFIG_PCCARD is not set 214# CONFIG_PCCARD is not set
187
188#
189# PCI Hotplug Support
190#
191# CONFIG_HOTPLUG_PCI is not set 215# CONFIG_HOTPLUG_PCI is not set
192 216
193# 217#
@@ -212,13 +236,13 @@ CONFIG_NET=y
212# 236#
213# Networking options 237# Networking options
214# 238#
215# CONFIG_NETDEBUG is not set
216CONFIG_PACKET=y 239CONFIG_PACKET=y
217# CONFIG_PACKET_MMAP is not set 240# CONFIG_PACKET_MMAP is not set
218CONFIG_UNIX=y 241CONFIG_UNIX=y
219CONFIG_XFRM=y 242CONFIG_XFRM=y
220CONFIG_XFRM_USER=m 243CONFIG_XFRM_USER=m
221# CONFIG_XFRM_SUB_POLICY is not set 244# CONFIG_XFRM_SUB_POLICY is not set
245# CONFIG_XFRM_MIGRATE is not set
222# CONFIG_NET_KEY is not set 246# CONFIG_NET_KEY is not set
223CONFIG_INET=y 247CONFIG_INET=y
224CONFIG_IP_MULTICAST=y 248CONFIG_IP_MULTICAST=y
@@ -252,20 +276,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
252# CONFIG_INET6_TUNNEL is not set 276# CONFIG_INET6_TUNNEL is not set
253# CONFIG_NETWORK_SECMARK is not set 277# CONFIG_NETWORK_SECMARK is not set
254# CONFIG_NETFILTER is not set 278# CONFIG_NETFILTER is not set
255
256#
257# DCCP Configuration (EXPERIMENTAL)
258#
259# CONFIG_IP_DCCP is not set 279# CONFIG_IP_DCCP is not set
260
261#
262# SCTP Configuration (EXPERIMENTAL)
263#
264# CONFIG_IP_SCTP is not set 280# CONFIG_IP_SCTP is not set
265
266#
267# TIPC Configuration (EXPERIMENTAL)
268#
269# CONFIG_TIPC is not set 281# CONFIG_TIPC is not set
270# CONFIG_ATM is not set 282# CONFIG_ATM is not set
271# CONFIG_BRIDGE is not set 283# CONFIG_BRIDGE is not set
@@ -291,7 +303,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
291# CONFIG_HAMRADIO is not set 303# CONFIG_HAMRADIO is not set
292# CONFIG_IRDA is not set 304# CONFIG_IRDA is not set
293# CONFIG_BT is not set 305# CONFIG_BT is not set
306# CONFIG_AF_RXRPC is not set
307
308#
309# Wireless
310#
311# CONFIG_CFG80211 is not set
312# CONFIG_WIRELESS_EXT is not set
313# CONFIG_MAC80211 is not set
294# CONFIG_IEEE80211 is not set 314# CONFIG_IEEE80211 is not set
315# CONFIG_RFKILL is not set
295 316
296# 317#
297# Device Drivers 318# Device Drivers
@@ -309,10 +330,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
309# Connector - unified userspace <-> kernelspace linker 330# Connector - unified userspace <-> kernelspace linker
310# 331#
311# CONFIG_CONNECTOR is not set 332# CONFIG_CONNECTOR is not set
312
313#
314# Memory Technology Devices (MTD)
315#
316# CONFIG_MTD is not set 333# CONFIG_MTD is not set
317 334
318# 335#
@@ -323,6 +340,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
323# 340#
324# Plug and Play support 341# Plug and Play support
325# 342#
343# CONFIG_PNPACPI is not set
326 344
327# 345#
328# Block devices 346# Block devices
@@ -341,19 +359,16 @@ CONFIG_BLK_DEV_RAM=y
341CONFIG_BLK_DEV_RAM_COUNT=16 359CONFIG_BLK_DEV_RAM_COUNT=16
342CONFIG_BLK_DEV_RAM_SIZE=32768 360CONFIG_BLK_DEV_RAM_SIZE=32768
343CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 361CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
344CONFIG_BLK_DEV_INITRD=y
345# CONFIG_CDROM_PKTCDVD is not set 362# CONFIG_CDROM_PKTCDVD is not set
346# CONFIG_ATA_OVER_ETH is not set 363# CONFIG_ATA_OVER_ETH is not set
347 364
348# 365#
349# Misc devices 366# Misc devices
350# 367#
368# CONFIG_PHANTOM is not set
351# CONFIG_SGI_IOC4 is not set 369# CONFIG_SGI_IOC4 is not set
352# CONFIG_TIFM_CORE is not set 370# CONFIG_TIFM_CORE is not set
353 371# CONFIG_BLINK is not set
354#
355# ATA/ATAPI/MFM/RLL support
356#
357# CONFIG_IDE is not set 372# CONFIG_IDE is not set
358 373
359# 374#
@@ -362,10 +377,6 @@ CONFIG_BLK_DEV_INITRD=y
362# CONFIG_RAID_ATTRS is not set 377# CONFIG_RAID_ATTRS is not set
363# CONFIG_SCSI is not set 378# CONFIG_SCSI is not set
364# CONFIG_SCSI_NETLINK is not set 379# CONFIG_SCSI_NETLINK is not set
365
366#
367# Serial ATA (prod) and Parallel ATA (experimental) drivers
368#
369# CONFIG_ATA is not set 380# CONFIG_ATA is not set
370 381
371# 382#
@@ -381,18 +392,14 @@ CONFIG_BLK_DEV_INITRD=y
381# 392#
382# IEEE 1394 (FireWire) support 393# IEEE 1394 (FireWire) support
383# 394#
395# CONFIG_FIREWIRE is not set
384# CONFIG_IEEE1394 is not set 396# CONFIG_IEEE1394 is not set
385 397
386# 398#
387# I2O device support 399# I2O device support
388# 400#
389# CONFIG_I2O is not set 401# CONFIG_I2O is not set
390 402# CONFIG_MACINTOSH_DRIVERS is not set
391#
392# Macintosh device drivers
393#
394# CONFIG_MAC_EMUMOUSEBTN is not set
395# CONFIG_WINDFARM is not set
396 403
397# 404#
398# Network device support 405# Network device support
@@ -402,15 +409,7 @@ CONFIG_NETDEVICES=y
402# CONFIG_BONDING is not set 409# CONFIG_BONDING is not set
403# CONFIG_EQUALIZER is not set 410# CONFIG_EQUALIZER is not set
404# CONFIG_TUN is not set 411# CONFIG_TUN is not set
405
406#
407# ARCnet devices
408#
409# CONFIG_ARCNET is not set 412# CONFIG_ARCNET is not set
410
411#
412# PHY device support
413#
414CONFIG_PHYLIB=y 413CONFIG_PHYLIB=y
415 414
416# 415#
@@ -460,10 +459,8 @@ CONFIG_E100=y
460# CONFIG_SUNDANCE is not set 459# CONFIG_SUNDANCE is not set
461# CONFIG_TLAN is not set 460# CONFIG_TLAN is not set
462# CONFIG_VIA_RHINE is not set 461# CONFIG_VIA_RHINE is not set
463 462# CONFIG_SC92031 is not set
464# 463CONFIG_NETDEV_1000=y
465# Ethernet (1000 Mbit)
466#
467# CONFIG_ACENIC is not set 464# CONFIG_ACENIC is not set
468# CONFIG_DL2K is not set 465# CONFIG_DL2K is not set
469# CONFIG_E1000 is not set 466# CONFIG_E1000 is not set
@@ -481,29 +478,22 @@ CONFIG_E100=y
481CONFIG_GIANFAR=y 478CONFIG_GIANFAR=y
482# CONFIG_GFAR_NAPI is not set 479# CONFIG_GFAR_NAPI is not set
483# CONFIG_QLA3XXX is not set 480# CONFIG_QLA3XXX is not set
484 481# CONFIG_ATL1 is not set
485# 482CONFIG_NETDEV_10000=y
486# Ethernet (10000 Mbit)
487#
488# CONFIG_CHELSIO_T1 is not set 483# CONFIG_CHELSIO_T1 is not set
484# CONFIG_CHELSIO_T3 is not set
489# CONFIG_IXGB is not set 485# CONFIG_IXGB is not set
490# CONFIG_S2IO is not set 486# CONFIG_S2IO is not set
491# CONFIG_MYRI10GE is not set 487# CONFIG_MYRI10GE is not set
492# CONFIG_NETXEN_NIC is not set 488# CONFIG_NETXEN_NIC is not set
493 489# CONFIG_MLX4_CORE is not set
494#
495# Token Ring devices
496#
497# CONFIG_TR is not set 490# CONFIG_TR is not set
498 491
499# 492#
500# Wireless LAN (non-hamradio) 493# Wireless LAN
501#
502# CONFIG_NET_RADIO is not set
503
504#
505# Wan interfaces
506# 494#
495# CONFIG_WLAN_PRE80211 is not set
496# CONFIG_WLAN_80211 is not set
507# CONFIG_WAN is not set 497# CONFIG_WAN is not set
508# CONFIG_FDDI is not set 498# CONFIG_FDDI is not set
509# CONFIG_HIPPI is not set 499# CONFIG_HIPPI is not set
@@ -529,6 +519,7 @@ CONFIG_GIANFAR=y
529# 519#
530CONFIG_INPUT=y 520CONFIG_INPUT=y
531# CONFIG_INPUT_FF_MEMLESS is not set 521# CONFIG_INPUT_FF_MEMLESS is not set
522# CONFIG_INPUT_POLLDEV is not set
532 523
533# 524#
534# Userland interfaces 525# Userland interfaces
@@ -545,6 +536,7 @@ CONFIG_INPUT=y
545# CONFIG_INPUT_KEYBOARD is not set 536# CONFIG_INPUT_KEYBOARD is not set
546# CONFIG_INPUT_MOUSE is not set 537# CONFIG_INPUT_MOUSE is not set
547# CONFIG_INPUT_JOYSTICK is not set 538# CONFIG_INPUT_JOYSTICK is not set
539# CONFIG_INPUT_TABLET is not set
548# CONFIG_INPUT_TOUCHSCREEN is not set 540# CONFIG_INPUT_TOUCHSCREEN is not set
549# CONFIG_INPUT_MISC is not set 541# CONFIG_INPUT_MISC is not set
550 542
@@ -577,6 +569,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
577CONFIG_SERIAL_CORE=y 569CONFIG_SERIAL_CORE=y
578CONFIG_SERIAL_CORE_CONSOLE=y 570CONFIG_SERIAL_CORE_CONSOLE=y
579# CONFIG_SERIAL_JSM is not set 571# CONFIG_SERIAL_JSM is not set
572# CONFIG_SERIAL_OF_PLATFORM is not set
580CONFIG_UNIX98_PTYS=y 573CONFIG_UNIX98_PTYS=y
581CONFIG_LEGACY_PTYS=y 574CONFIG_LEGACY_PTYS=y
582CONFIG_LEGACY_PTY_COUNT=256 575CONFIG_LEGACY_PTY_COUNT=256
@@ -585,10 +578,6 @@ CONFIG_LEGACY_PTY_COUNT=256
585# IPMI 578# IPMI
586# 579#
587# CONFIG_IPMI_HANDLER is not set 580# CONFIG_IPMI_HANDLER is not set
588
589#
590# Watchdog Cards
591#
592CONFIG_WATCHDOG=y 581CONFIG_WATCHDOG=y
593# CONFIG_WATCHDOG_NOWAYOUT is not set 582# CONFIG_WATCHDOG_NOWAYOUT is not set
594 583
@@ -607,7 +596,6 @@ CONFIG_83xx_WDT=y
607# CONFIG_NVRAM is not set 596# CONFIG_NVRAM is not set
608CONFIG_GEN_RTC=y 597CONFIG_GEN_RTC=y
609# CONFIG_GEN_RTC_X is not set 598# CONFIG_GEN_RTC_X is not set
610# CONFIG_DTLK is not set
611# CONFIG_R3964 is not set 599# CONFIG_R3964 is not set
612# CONFIG_APPLICOM is not set 600# CONFIG_APPLICOM is not set
613# CONFIG_AGP is not set 601# CONFIG_AGP is not set
@@ -618,11 +606,9 @@ CONFIG_GEN_RTC=y
618# TPM devices 606# TPM devices
619# 607#
620# CONFIG_TCG_TPM is not set 608# CONFIG_TCG_TPM is not set
621 609CONFIG_DEVPORT=y
622#
623# I2C support
624#
625CONFIG_I2C=y 610CONFIG_I2C=y
611CONFIG_I2C_BOARDINFO=y
626CONFIG_I2C_CHARDEV=y 612CONFIG_I2C_CHARDEV=y
627 613
628# 614#
@@ -649,6 +635,7 @@ CONFIG_I2C_MPC=y
649# CONFIG_I2C_PARPORT_LIGHT is not set 635# CONFIG_I2C_PARPORT_LIGHT is not set
650# CONFIG_I2C_PROSAVAGE is not set 636# CONFIG_I2C_PROSAVAGE is not set
651# CONFIG_I2C_SAVAGE4 is not set 637# CONFIG_I2C_SAVAGE4 is not set
638# CONFIG_I2C_SIMTEC is not set
652# CONFIG_I2C_SIS5595 is not set 639# CONFIG_I2C_SIS5595 is not set
653# CONFIG_I2C_SIS630 is not set 640# CONFIG_I2C_SIS630 is not set
654# CONFIG_I2C_SIS96X is not set 641# CONFIG_I2C_SIS96X is not set
@@ -656,7 +643,6 @@ CONFIG_I2C_MPC=y
656# CONFIG_I2C_VIA is not set 643# CONFIG_I2C_VIA is not set
657# CONFIG_I2C_VIAPRO is not set 644# CONFIG_I2C_VIAPRO is not set
658# CONFIG_I2C_VOODOO3 is not set 645# CONFIG_I2C_VOODOO3 is not set
659# CONFIG_I2C_PCA_ISA is not set
660 646
661# 647#
662# Miscellaneous I2C Chip support 648# Miscellaneous I2C Chip support
@@ -684,16 +670,14 @@ CONFIG_I2C_MPC=y
684# Dallas's 1-wire bus 670# Dallas's 1-wire bus
685# 671#
686# CONFIG_W1 is not set 672# CONFIG_W1 is not set
687
688#
689# Hardware Monitoring support
690#
691CONFIG_HWMON=y 673CONFIG_HWMON=y
692# CONFIG_HWMON_VID is not set 674# CONFIG_HWMON_VID is not set
693# CONFIG_SENSORS_ABITUGURU is not set 675# CONFIG_SENSORS_ABITUGURU is not set
676# CONFIG_SENSORS_AD7418 is not set
694# CONFIG_SENSORS_ADM1021 is not set 677# CONFIG_SENSORS_ADM1021 is not set
695# CONFIG_SENSORS_ADM1025 is not set 678# CONFIG_SENSORS_ADM1025 is not set
696# CONFIG_SENSORS_ADM1026 is not set 679# CONFIG_SENSORS_ADM1026 is not set
680# CONFIG_SENSORS_ADM1029 is not set
697# CONFIG_SENSORS_ADM1031 is not set 681# CONFIG_SENSORS_ADM1031 is not set
698# CONFIG_SENSORS_ADM9240 is not set 682# CONFIG_SENSORS_ADM9240 is not set
699# CONFIG_SENSORS_ASB100 is not set 683# CONFIG_SENSORS_ASB100 is not set
@@ -716,6 +700,7 @@ CONFIG_HWMON=y
716# CONFIG_SENSORS_LM90 is not set 700# CONFIG_SENSORS_LM90 is not set
717# CONFIG_SENSORS_LM92 is not set 701# CONFIG_SENSORS_LM92 is not set
718# CONFIG_SENSORS_MAX1619 is not set 702# CONFIG_SENSORS_MAX1619 is not set
703# CONFIG_SENSORS_MAX6650 is not set
719# CONFIG_SENSORS_PC87360 is not set 704# CONFIG_SENSORS_PC87360 is not set
720# CONFIG_SENSORS_PC87427 is not set 705# CONFIG_SENSORS_PC87427 is not set
721# CONFIG_SENSORS_SIS5595 is not set 706# CONFIG_SENSORS_SIS5595 is not set
@@ -735,22 +720,29 @@ CONFIG_HWMON=y
735# CONFIG_HWMON_DEBUG_CHIP is not set 720# CONFIG_HWMON_DEBUG_CHIP is not set
736 721
737# 722#
723# Multifunction device drivers
724#
725# CONFIG_MFD_SM501 is not set
726
727#
738# Multimedia devices 728# Multimedia devices
739# 729#
740# CONFIG_VIDEO_DEV is not set 730# CONFIG_VIDEO_DEV is not set
731# CONFIG_DVB_CORE is not set
732CONFIG_DAB=y
741 733
742# 734#
743# Digital Video Broadcasting Devices 735# Graphics support
744# 736#
745# CONFIG_DVB is not set 737# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
746 738
747# 739#
748# Graphics support 740# Display device support
749# 741#
750CONFIG_FIRMWARE_EDID=y 742# CONFIG_DISPLAY_SUPPORT is not set
743# CONFIG_VGASTATE is not set
751# CONFIG_FB is not set 744# CONFIG_FB is not set
752# CONFIG_FB_IBM_GXT4500 is not set 745# CONFIG_FB_IBM_GXT4500 is not set
753# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
754 746
755# 747#
756# Sound 748# Sound
@@ -761,6 +753,7 @@ CONFIG_FIRMWARE_EDID=y
761# HID Devices 753# HID Devices
762# 754#
763CONFIG_HID=y 755CONFIG_HID=y
756# CONFIG_HID_DEBUG is not set
764 757
765# 758#
766# USB support 759# USB support
@@ -778,10 +771,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
778# USB Gadget Support 771# USB Gadget Support
779# 772#
780# CONFIG_USB_GADGET is not set 773# CONFIG_USB_GADGET is not set
781
782#
783# MMC/SD Card support
784#
785# CONFIG_MMC is not set 774# CONFIG_MMC is not set
786 775
787# 776#
@@ -825,10 +814,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
825# 814#
826 815
827# 816#
828# Virtualization
829#
830
831#
832# File systems 817# File systems
833# 818#
834CONFIG_EXT2_FS=y 819CONFIG_EXT2_FS=y
@@ -916,6 +901,7 @@ CONFIG_LOCKD_V4=y
916CONFIG_NFS_COMMON=y 901CONFIG_NFS_COMMON=y
917CONFIG_SUNRPC=y 902CONFIG_SUNRPC=y
918CONFIG_SUNRPC_GSS=y 903CONFIG_SUNRPC_GSS=y
904# CONFIG_SUNRPC_BIND34 is not set
919CONFIG_RPCSEC_GSS_KRB5=y 905CONFIG_RPCSEC_GSS_KRB5=y
920# CONFIG_RPCSEC_GSS_SPKM3 is not set 906# CONFIG_RPCSEC_GSS_SPKM3 is not set
921# CONFIG_SMB_FS is not set 907# CONFIG_SMB_FS is not set
@@ -941,6 +927,7 @@ CONFIG_PARTITION_ADVANCED=y
941# CONFIG_SUN_PARTITION is not set 927# CONFIG_SUN_PARTITION is not set
942# CONFIG_KARMA_PARTITION is not set 928# CONFIG_KARMA_PARTITION is not set
943# CONFIG_EFI_PARTITION is not set 929# CONFIG_EFI_PARTITION is not set
930# CONFIG_SYSV68_PARTITION is not set
944 931
945# 932#
946# Native Language Support 933# Native Language Support
@@ -951,6 +938,7 @@ CONFIG_PARTITION_ADVANCED=y
951# Distributed Lock Manager 938# Distributed Lock Manager
952# 939#
953# CONFIG_DLM is not set 940# CONFIG_DLM is not set
941# CONFIG_UCC_SLOW is not set
954 942
955# 943#
956# Library routines 944# Library routines
@@ -958,10 +946,13 @@ CONFIG_PARTITION_ADVANCED=y
958CONFIG_BITREVERSE=y 946CONFIG_BITREVERSE=y
959# CONFIG_CRC_CCITT is not set 947# CONFIG_CRC_CCITT is not set
960# CONFIG_CRC16 is not set 948# CONFIG_CRC16 is not set
949# CONFIG_CRC_ITU_T is not set
961CONFIG_CRC32=y 950CONFIG_CRC32=y
962# CONFIG_LIBCRC32C is not set 951# CONFIG_LIBCRC32C is not set
963CONFIG_PLIST=y 952CONFIG_PLIST=y
964CONFIG_IOMAP_COPY=y 953CONFIG_HAS_IOMEM=y
954CONFIG_HAS_IOPORT=y
955CONFIG_HAS_DMA=y
965 956
966# 957#
967# Instrumentation Support 958# Instrumentation Support
@@ -978,10 +969,8 @@ CONFIG_ENABLE_MUST_CHECK=y
978# CONFIG_DEBUG_FS is not set 969# CONFIG_DEBUG_FS is not set
979# CONFIG_HEADERS_CHECK is not set 970# CONFIG_HEADERS_CHECK is not set
980# CONFIG_DEBUG_KERNEL is not set 971# CONFIG_DEBUG_KERNEL is not set
981CONFIG_LOG_BUF_SHIFT=14
982# CONFIG_DEBUG_BUGVERBOSE is not set 972# CONFIG_DEBUG_BUGVERBOSE is not set
983# CONFIG_BOOTX_TEXT is not set 973# CONFIG_BOOTX_TEXT is not set
984# CONFIG_SERIAL_TEXT_DEBUG is not set
985# CONFIG_PPC_EARLY_DEBUG is not set 974# CONFIG_PPC_EARLY_DEBUG is not set
986 975
987# 976#
@@ -1010,8 +999,11 @@ CONFIG_CRYPTO_MD5=y
1010# CONFIG_CRYPTO_GF128MUL is not set 999# CONFIG_CRYPTO_GF128MUL is not set
1011CONFIG_CRYPTO_ECB=m 1000CONFIG_CRYPTO_ECB=m
1012CONFIG_CRYPTO_CBC=y 1001CONFIG_CRYPTO_CBC=y
1002CONFIG_CRYPTO_PCBC=m
1013# CONFIG_CRYPTO_LRW is not set 1003# CONFIG_CRYPTO_LRW is not set
1004# CONFIG_CRYPTO_CRYPTD is not set
1014CONFIG_CRYPTO_DES=y 1005CONFIG_CRYPTO_DES=y
1006# CONFIG_CRYPTO_FCRYPT is not set
1015# CONFIG_CRYPTO_BLOWFISH is not set 1007# CONFIG_CRYPTO_BLOWFISH is not set
1016# CONFIG_CRYPTO_TWOFISH is not set 1008# CONFIG_CRYPTO_TWOFISH is not set
1017# CONFIG_CRYPTO_SERPENT is not set 1009# CONFIG_CRYPTO_SERPENT is not set
@@ -1025,6 +1017,7 @@ CONFIG_CRYPTO_DES=y
1025# CONFIG_CRYPTO_DEFLATE is not set 1017# CONFIG_CRYPTO_DEFLATE is not set
1026# CONFIG_CRYPTO_MICHAEL_MIC is not set 1018# CONFIG_CRYPTO_MICHAEL_MIC is not set
1027# CONFIG_CRYPTO_CRC32C is not set 1019# CONFIG_CRYPTO_CRC32C is not set
1020# CONFIG_CRYPTO_CAMELLIA is not set
1028# CONFIG_CRYPTO_TEST is not set 1021# CONFIG_CRYPTO_TEST is not set
1029 1022
1030# 1023#
diff --git a/arch/powerpc/configs/mpc836x_mds_defconfig b/arch/powerpc/configs/mpc836x_mds_defconfig
index 921a151dc778..bcbbc167f90d 100644
--- a/arch/powerpc/configs/mpc836x_mds_defconfig
+++ b/arch/powerpc/configs/mpc836x_mds_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.21-rc5 3# Linux kernel version: 2.6.22-rc7
4# Mon Apr 9 16:14:05 2007 4# Sun Jul 1 23:56:57 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_PPC_DCR_MMIO is not set 45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -70,6 +71,7 @@ CONFIG_SYSVIPC_SYSCTL=y
70# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
75CONFIG_BLK_DEV_INITRD=y 77CONFIG_BLK_DEV_INITRD=y
@@ -85,14 +87,19 @@ CONFIG_BUG=y
85CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
86CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
87CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
88# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 95CONFIG_SHMEM=y
90CONFIG_SLAB=y
91CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
92CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
93# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
94CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
95# CONFIG_SLOB is not set
96 103
97# 104#
98# Loadable module support 105# Loadable module support
@@ -124,12 +131,15 @@ CONFIG_DEFAULT_AS=y
124# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
125# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
126CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
127CONFIG_QUICC_ENGINE=y
128# CONFIG_WANT_EARLY_SERIAL is not set
129 134
130# 135#
131# Platform support 136# Platform support
132# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
133# CONFIG_MPC8313_RDB is not set 143# CONFIG_MPC8313_RDB is not set
134# CONFIG_MPC832x_MDS is not set 144# CONFIG_MPC832x_MDS is not set
135# CONFIG_MPC832x_RDB is not set 145# CONFIG_MPC832x_RDB is not set
@@ -138,6 +148,17 @@ CONFIG_QUICC_ENGINE=y
138CONFIG_MPC836x_MDS=y 148CONFIG_MPC836x_MDS=y
139CONFIG_PPC_MPC836x=y 149CONFIG_PPC_MPC836x=y
140# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160CONFIG_QUICC_ENGINE=y
161# CONFIG_CPM2 is not set
141 162
142# 163#
143# Kernel options 164# Kernel options
@@ -170,6 +191,8 @@ CONFIG_PROC_DEVICETREE=y
170# CONFIG_CMDLINE_BOOL is not set 191# CONFIG_CMDLINE_BOOL is not set
171# CONFIG_PM is not set 192# CONFIG_PM is not set
172CONFIG_SECCOMP=y 193CONFIG_SECCOMP=y
194CONFIG_WANT_DEVICE_TREE=y
195CONFIG_DEVICE_TREE=""
173CONFIG_ISA_DMA_API=y 196CONFIG_ISA_DMA_API=y
174 197
175# 198#
@@ -177,22 +200,19 @@ CONFIG_ISA_DMA_API=y
177# 200#
178CONFIG_ZONE_DMA=y 201CONFIG_ZONE_DMA=y
179CONFIG_GENERIC_ISA_DMA=y 202CONFIG_GENERIC_ISA_DMA=y
180# CONFIG_MPIC_WEIRD is not set
181# CONFIG_PPC_I8259 is not set
182CONFIG_PPC_INDIRECT_PCI=y 203CONFIG_PPC_INDIRECT_PCI=y
204# CONFIG_PPC_INDIRECT_PCI_BE is not set
183CONFIG_FSL_SOC=y 205CONFIG_FSL_SOC=y
184CONFIG_PCI=y 206CONFIG_PCI=y
185CONFIG_PCI_DOMAINS=y 207CONFIG_PCI_DOMAINS=y
186# CONFIG_PCIEPORTBUS is not set 208# CONFIG_PCIEPORTBUS is not set
209CONFIG_ARCH_SUPPORTS_MSI=y
210# CONFIG_PCI_MSI is not set
187 211
188# 212#
189# PCCARD (PCMCIA/CardBus) support 213# PCCARD (PCMCIA/CardBus) support
190# 214#
191# CONFIG_PCCARD is not set 215# CONFIG_PCCARD is not set
192
193#
194# PCI Hotplug Support
195#
196# CONFIG_HOTPLUG_PCI is not set 216# CONFIG_HOTPLUG_PCI is not set
197 217
198# 218#
@@ -217,7 +237,6 @@ CONFIG_NET=y
217# 237#
218# Networking options 238# Networking options
219# 239#
220# CONFIG_NETDEBUG is not set
221CONFIG_PACKET=y 240CONFIG_PACKET=y
222# CONFIG_PACKET_MMAP is not set 241# CONFIG_PACKET_MMAP is not set
223CONFIG_UNIX=y 242CONFIG_UNIX=y
@@ -258,20 +277,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
258# CONFIG_INET6_TUNNEL is not set 277# CONFIG_INET6_TUNNEL is not set
259# CONFIG_NETWORK_SECMARK is not set 278# CONFIG_NETWORK_SECMARK is not set
260# CONFIG_NETFILTER is not set 279# CONFIG_NETFILTER is not set
261
262#
263# DCCP Configuration (EXPERIMENTAL)
264#
265# CONFIG_IP_DCCP is not set 280# CONFIG_IP_DCCP is not set
266
267#
268# SCTP Configuration (EXPERIMENTAL)
269#
270# CONFIG_IP_SCTP is not set 281# CONFIG_IP_SCTP is not set
271
272#
273# TIPC Configuration (EXPERIMENTAL)
274#
275# CONFIG_TIPC is not set 282# CONFIG_TIPC is not set
276# CONFIG_ATM is not set 283# CONFIG_ATM is not set
277# CONFIG_BRIDGE is not set 284# CONFIG_BRIDGE is not set
@@ -297,7 +304,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
297# CONFIG_HAMRADIO is not set 304# CONFIG_HAMRADIO is not set
298# CONFIG_IRDA is not set 305# CONFIG_IRDA is not set
299# CONFIG_BT is not set 306# CONFIG_BT is not set
307# CONFIG_AF_RXRPC is not set
308
309#
310# Wireless
311#
312# CONFIG_CFG80211 is not set
313# CONFIG_WIRELESS_EXT is not set
314# CONFIG_MAC80211 is not set
300# CONFIG_IEEE80211 is not set 315# CONFIG_IEEE80211 is not set
316# CONFIG_RFKILL is not set
301 317
302# 318#
303# Device Drivers 319# Device Drivers
@@ -315,10 +331,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
315# Connector - unified userspace <-> kernelspace linker 331# Connector - unified userspace <-> kernelspace linker
316# 332#
317# CONFIG_CONNECTOR is not set 333# CONFIG_CONNECTOR is not set
318
319#
320# Memory Technology Devices (MTD)
321#
322# CONFIG_MTD is not set 334# CONFIG_MTD is not set
323 335
324# 336#
@@ -354,12 +366,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
354# 366#
355# Misc devices 367# Misc devices
356# 368#
369# CONFIG_PHANTOM is not set
357# CONFIG_SGI_IOC4 is not set 370# CONFIG_SGI_IOC4 is not set
358# CONFIG_TIFM_CORE is not set 371# CONFIG_TIFM_CORE is not set
359 372# CONFIG_BLINK is not set
360#
361# ATA/ATAPI/MFM/RLL support
362#
363# CONFIG_IDE is not set 373# CONFIG_IDE is not set
364 374
365# 375#
@@ -388,6 +398,7 @@ CONFIG_SCSI_PROC_FS=y
388# CONFIG_SCSI_CONSTANTS is not set 398# CONFIG_SCSI_CONSTANTS is not set
389# CONFIG_SCSI_LOGGING is not set 399# CONFIG_SCSI_LOGGING is not set
390# CONFIG_SCSI_SCAN_ASYNC is not set 400# CONFIG_SCSI_SCAN_ASYNC is not set
401CONFIG_SCSI_WAIT_SCAN=m
391 402
392# 403#
393# SCSI Transports 404# SCSI Transports
@@ -435,10 +446,6 @@ CONFIG_SCSI_PROC_FS=y
435# CONFIG_SCSI_NSP32 is not set 446# CONFIG_SCSI_NSP32 is not set
436# CONFIG_SCSI_DEBUG is not set 447# CONFIG_SCSI_DEBUG is not set
437# CONFIG_SCSI_SRP is not set 448# CONFIG_SCSI_SRP is not set
438
439#
440# Serial ATA (prod) and Parallel ATA (experimental) drivers
441#
442# CONFIG_ATA is not set 449# CONFIG_ATA is not set
443 450
444# 451#
@@ -457,18 +464,14 @@ CONFIG_SCSI_PROC_FS=y
457# 464#
458# IEEE 1394 (FireWire) support 465# IEEE 1394 (FireWire) support
459# 466#
467# CONFIG_FIREWIRE is not set
460# CONFIG_IEEE1394 is not set 468# CONFIG_IEEE1394 is not set
461 469
462# 470#
463# I2O device support 471# I2O device support
464# 472#
465# CONFIG_I2O is not set 473# CONFIG_I2O is not set
466 474# CONFIG_MACINTOSH_DRIVERS is not set
467#
468# Macintosh device drivers
469#
470# CONFIG_MAC_EMUMOUSEBTN is not set
471# CONFIG_WINDFARM is not set
472 475
473# 476#
474# Network device support 477# Network device support
@@ -478,15 +481,7 @@ CONFIG_NETDEVICES=y
478# CONFIG_BONDING is not set 481# CONFIG_BONDING is not set
479# CONFIG_EQUALIZER is not set 482# CONFIG_EQUALIZER is not set
480# CONFIG_TUN is not set 483# CONFIG_TUN is not set
481
482#
483# ARCnet devices
484#
485# CONFIG_ARCNET is not set 484# CONFIG_ARCNET is not set
486
487#
488# PHY device support
489#
490CONFIG_PHYLIB=y 485CONFIG_PHYLIB=y
491 486
492# 487#
@@ -500,7 +495,6 @@ CONFIG_MARVELL_PHY=y
500# CONFIG_VITESSE_PHY is not set 495# CONFIG_VITESSE_PHY is not set
501# CONFIG_SMSC_PHY is not set 496# CONFIG_SMSC_PHY is not set
502# CONFIG_BROADCOM_PHY is not set 497# CONFIG_BROADCOM_PHY is not set
503# CONFIG_ICPLUS_PHY is not set
504# CONFIG_FIXED_PHY is not set 498# CONFIG_FIXED_PHY is not set
505 499
506# 500#
@@ -519,10 +513,7 @@ CONFIG_MII=y
519# CONFIG_NET_TULIP is not set 513# CONFIG_NET_TULIP is not set
520# CONFIG_HP100 is not set 514# CONFIG_HP100 is not set
521# CONFIG_NET_PCI is not set 515# CONFIG_NET_PCI is not set
522 516CONFIG_NETDEV_1000=y
523#
524# Ethernet (1000 Mbit)
525#
526# CONFIG_ACENIC is not set 517# CONFIG_ACENIC is not set
527# CONFIG_DL2K is not set 518# CONFIG_DL2K is not set
528# CONFIG_E1000 is not set 519# CONFIG_E1000 is not set
@@ -534,6 +525,7 @@ CONFIG_MII=y
534# CONFIG_SKGE is not set 525# CONFIG_SKGE is not set
535# CONFIG_SKY2 is not set 526# CONFIG_SKY2 is not set
536# CONFIG_SK98LIN is not set 527# CONFIG_SK98LIN is not set
528# CONFIG_VIA_VELOCITY is not set
537# CONFIG_TIGON3 is not set 529# CONFIG_TIGON3 is not set
538# CONFIG_BNX2 is not set 530# CONFIG_BNX2 is not set
539# CONFIG_GIANFAR is not set 531# CONFIG_GIANFAR is not set
@@ -541,33 +533,24 @@ CONFIG_UCC_GETH=y
541# CONFIG_UGETH_NAPI is not set 533# CONFIG_UGETH_NAPI is not set
542# CONFIG_UGETH_MAGIC_PACKET is not set 534# CONFIG_UGETH_MAGIC_PACKET is not set
543# CONFIG_UGETH_FILTERING is not set 535# CONFIG_UGETH_FILTERING is not set
544# CONFIG_UGETH_TX_ON_DEMOND is not set 536# CONFIG_UGETH_TX_ON_DEMAND is not set
545# CONFIG_QLA3XXX is not set 537# CONFIG_QLA3XXX is not set
546# CONFIG_ATL1 is not set 538# CONFIG_ATL1 is not set
547 539CONFIG_NETDEV_10000=y
548#
549# Ethernet (10000 Mbit)
550#
551# CONFIG_CHELSIO_T1 is not set 540# CONFIG_CHELSIO_T1 is not set
552# CONFIG_CHELSIO_T3 is not set 541# CONFIG_CHELSIO_T3 is not set
553# CONFIG_IXGB is not set 542# CONFIG_IXGB is not set
554# CONFIG_S2IO is not set 543# CONFIG_S2IO is not set
555# CONFIG_MYRI10GE is not set 544# CONFIG_MYRI10GE is not set
556# CONFIG_NETXEN_NIC is not set 545# CONFIG_NETXEN_NIC is not set
557 546# CONFIG_MLX4_CORE is not set
558#
559# Token Ring devices
560#
561# CONFIG_TR is not set 547# CONFIG_TR is not set
562 548
563# 549#
564# Wireless LAN (non-hamradio) 550# Wireless LAN
565#
566# CONFIG_NET_RADIO is not set
567
568#
569# Wan interfaces
570# 551#
552# CONFIG_WLAN_PRE80211 is not set
553# CONFIG_WLAN_80211 is not set
571# CONFIG_WAN is not set 554# CONFIG_WAN is not set
572# CONFIG_FDDI is not set 555# CONFIG_FDDI is not set
573# CONFIG_HIPPI is not set 556# CONFIG_HIPPI is not set
@@ -594,6 +577,7 @@ CONFIG_UCC_GETH=y
594# 577#
595CONFIG_INPUT=y 578CONFIG_INPUT=y
596# CONFIG_INPUT_FF_MEMLESS is not set 579# CONFIG_INPUT_FF_MEMLESS is not set
580# CONFIG_INPUT_POLLDEV is not set
597 581
598# 582#
599# Userland interfaces 583# Userland interfaces
@@ -610,6 +594,7 @@ CONFIG_INPUT=y
610# CONFIG_INPUT_KEYBOARD is not set 594# CONFIG_INPUT_KEYBOARD is not set
611# CONFIG_INPUT_MOUSE is not set 595# CONFIG_INPUT_MOUSE is not set
612# CONFIG_INPUT_JOYSTICK is not set 596# CONFIG_INPUT_JOYSTICK is not set
597# CONFIG_INPUT_TABLET is not set
613# CONFIG_INPUT_TOUCHSCREEN is not set 598# CONFIG_INPUT_TOUCHSCREEN is not set
614# CONFIG_INPUT_MISC is not set 599# CONFIG_INPUT_MISC is not set
615 600
@@ -651,10 +636,6 @@ CONFIG_LEGACY_PTY_COUNT=256
651# IPMI 636# IPMI
652# 637#
653# CONFIG_IPMI_HANDLER is not set 638# CONFIG_IPMI_HANDLER is not set
654
655#
656# Watchdog Cards
657#
658CONFIG_WATCHDOG=y 639CONFIG_WATCHDOG=y
659# CONFIG_WATCHDOG_NOWAYOUT is not set 640# CONFIG_WATCHDOG_NOWAYOUT is not set
660 641
@@ -673,7 +654,6 @@ CONFIG_HW_RANDOM=y
673# CONFIG_NVRAM is not set 654# CONFIG_NVRAM is not set
674CONFIG_GEN_RTC=y 655CONFIG_GEN_RTC=y
675# CONFIG_GEN_RTC_X is not set 656# CONFIG_GEN_RTC_X is not set
676# CONFIG_DTLK is not set
677# CONFIG_R3964 is not set 657# CONFIG_R3964 is not set
678# CONFIG_APPLICOM is not set 658# CONFIG_APPLICOM is not set
679# CONFIG_AGP is not set 659# CONFIG_AGP is not set
@@ -684,11 +664,9 @@ CONFIG_GEN_RTC=y
684# TPM devices 664# TPM devices
685# 665#
686# CONFIG_TCG_TPM is not set 666# CONFIG_TCG_TPM is not set
687 667CONFIG_DEVPORT=y
688#
689# I2C support
690#
691CONFIG_I2C=y 668CONFIG_I2C=y
669CONFIG_I2C_BOARDINFO=y
692CONFIG_I2C_CHARDEV=y 670CONFIG_I2C_CHARDEV=y
693 671
694# 672#
@@ -713,9 +691,9 @@ CONFIG_I2C_MPC=y
713# CONFIG_I2C_NFORCE2 is not set 691# CONFIG_I2C_NFORCE2 is not set
714# CONFIG_I2C_OCORES is not set 692# CONFIG_I2C_OCORES is not set
715# CONFIG_I2C_PARPORT_LIGHT is not set 693# CONFIG_I2C_PARPORT_LIGHT is not set
716# CONFIG_I2C_PASEMI is not set
717# CONFIG_I2C_PROSAVAGE is not set 694# CONFIG_I2C_PROSAVAGE is not set
718# CONFIG_I2C_SAVAGE4 is not set 695# CONFIG_I2C_SAVAGE4 is not set
696# CONFIG_I2C_SIMTEC is not set
719# CONFIG_I2C_SIS5595 is not set 697# CONFIG_I2C_SIS5595 is not set
720# CONFIG_I2C_SIS630 is not set 698# CONFIG_I2C_SIS630 is not set
721# CONFIG_I2C_SIS96X is not set 699# CONFIG_I2C_SIS96X is not set
@@ -723,7 +701,6 @@ CONFIG_I2C_MPC=y
723# CONFIG_I2C_VIA is not set 701# CONFIG_I2C_VIA is not set
724# CONFIG_I2C_VIAPRO is not set 702# CONFIG_I2C_VIAPRO is not set
725# CONFIG_I2C_VOODOO3 is not set 703# CONFIG_I2C_VOODOO3 is not set
726# CONFIG_I2C_PCA_ISA is not set
727 704
728# 705#
729# Miscellaneous I2C Chip support 706# Miscellaneous I2C Chip support
@@ -751,13 +728,10 @@ CONFIG_I2C_MPC=y
751# Dallas's 1-wire bus 728# Dallas's 1-wire bus
752# 729#
753# CONFIG_W1 is not set 730# CONFIG_W1 is not set
754
755#
756# Hardware Monitoring support
757#
758CONFIG_HWMON=y 731CONFIG_HWMON=y
759# CONFIG_HWMON_VID is not set 732# CONFIG_HWMON_VID is not set
760# CONFIG_SENSORS_ABITUGURU is not set 733# CONFIG_SENSORS_ABITUGURU is not set
734# CONFIG_SENSORS_AD7418 is not set
761# CONFIG_SENSORS_ADM1021 is not set 735# CONFIG_SENSORS_ADM1021 is not set
762# CONFIG_SENSORS_ADM1025 is not set 736# CONFIG_SENSORS_ADM1025 is not set
763# CONFIG_SENSORS_ADM1026 is not set 737# CONFIG_SENSORS_ADM1026 is not set
@@ -784,6 +758,7 @@ CONFIG_HWMON=y
784# CONFIG_SENSORS_LM90 is not set 758# CONFIG_SENSORS_LM90 is not set
785# CONFIG_SENSORS_LM92 is not set 759# CONFIG_SENSORS_LM92 is not set
786# CONFIG_SENSORS_MAX1619 is not set 760# CONFIG_SENSORS_MAX1619 is not set
761# CONFIG_SENSORS_MAX6650 is not set
787# CONFIG_SENSORS_PC87360 is not set 762# CONFIG_SENSORS_PC87360 is not set
788# CONFIG_SENSORS_PC87427 is not set 763# CONFIG_SENSORS_PC87427 is not set
789# CONFIG_SENSORS_SIS5595 is not set 764# CONFIG_SENSORS_SIS5595 is not set
@@ -811,16 +786,19 @@ CONFIG_HWMON=y
811# Multimedia devices 786# Multimedia devices
812# 787#
813# CONFIG_VIDEO_DEV is not set 788# CONFIG_VIDEO_DEV is not set
789# CONFIG_DVB_CORE is not set
790CONFIG_DAB=y
814 791
815# 792#
816# Digital Video Broadcasting Devices 793# Graphics support
817# 794#
818# CONFIG_DVB is not set 795# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
819 796
820# 797#
821# Graphics support 798# Display device support
822# 799#
823# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 800# CONFIG_DISPLAY_SUPPORT is not set
801# CONFIG_VGASTATE is not set
824# CONFIG_FB is not set 802# CONFIG_FB is not set
825# CONFIG_FB_IBM_GXT4500 is not set 803# CONFIG_FB_IBM_GXT4500 is not set
826 804
@@ -851,10 +829,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
851# USB Gadget Support 829# USB Gadget Support
852# 830#
853# CONFIG_USB_GADGET is not set 831# CONFIG_USB_GADGET is not set
854
855#
856# MMC/SD Card support
857#
858# CONFIG_MMC is not set 832# CONFIG_MMC is not set
859 833
860# 834#
@@ -898,14 +872,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
898# 872#
899 873
900# 874#
901# Auxiliary Display support
902#
903
904#
905# Virtualization
906#
907
908#
909# File systems 875# File systems
910# 876#
911CONFIG_EXT2_FS=y 877CONFIG_EXT2_FS=y
@@ -993,6 +959,7 @@ CONFIG_LOCKD_V4=y
993CONFIG_NFS_COMMON=y 959CONFIG_NFS_COMMON=y
994CONFIG_SUNRPC=y 960CONFIG_SUNRPC=y
995CONFIG_SUNRPC_GSS=y 961CONFIG_SUNRPC_GSS=y
962# CONFIG_SUNRPC_BIND34 is not set
996CONFIG_RPCSEC_GSS_KRB5=y 963CONFIG_RPCSEC_GSS_KRB5=y
997# CONFIG_RPCSEC_GSS_SPKM3 is not set 964# CONFIG_RPCSEC_GSS_SPKM3 is not set
998# CONFIG_SMB_FS is not set 965# CONFIG_SMB_FS is not set
@@ -1018,6 +985,7 @@ CONFIG_PARTITION_ADVANCED=y
1018# CONFIG_SUN_PARTITION is not set 985# CONFIG_SUN_PARTITION is not set
1019# CONFIG_KARMA_PARTITION is not set 986# CONFIG_KARMA_PARTITION is not set
1020# CONFIG_EFI_PARTITION is not set 987# CONFIG_EFI_PARTITION is not set
988# CONFIG_SYSV68_PARTITION is not set
1021 989
1022# 990#
1023# Native Language Support 991# Native Language Support
@@ -1038,11 +1006,13 @@ CONFIG_UCC=y
1038CONFIG_BITREVERSE=y 1006CONFIG_BITREVERSE=y
1039# CONFIG_CRC_CCITT is not set 1007# CONFIG_CRC_CCITT is not set
1040# CONFIG_CRC16 is not set 1008# CONFIG_CRC16 is not set
1009# CONFIG_CRC_ITU_T is not set
1041CONFIG_CRC32=y 1010CONFIG_CRC32=y
1042# CONFIG_LIBCRC32C is not set 1011# CONFIG_LIBCRC32C is not set
1043CONFIG_PLIST=y 1012CONFIG_PLIST=y
1044CONFIG_HAS_IOMEM=y 1013CONFIG_HAS_IOMEM=y
1045CONFIG_HAS_IOPORT=y 1014CONFIG_HAS_IOPORT=y
1015CONFIG_HAS_DMA=y
1046 1016
1047# 1017#
1048# Instrumentation Support 1018# Instrumentation Support
@@ -1059,7 +1029,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1059# CONFIG_DEBUG_FS is not set 1029# CONFIG_DEBUG_FS is not set
1060# CONFIG_HEADERS_CHECK is not set 1030# CONFIG_HEADERS_CHECK is not set
1061# CONFIG_DEBUG_KERNEL is not set 1031# CONFIG_DEBUG_KERNEL is not set
1062CONFIG_LOG_BUF_SHIFT=14
1063# CONFIG_DEBUG_BUGVERBOSE is not set 1032# CONFIG_DEBUG_BUGVERBOSE is not set
1064# CONFIG_BOOTX_TEXT is not set 1033# CONFIG_BOOTX_TEXT is not set
1065# CONFIG_PPC_EARLY_DEBUG is not set 1034# CONFIG_PPC_EARLY_DEBUG is not set
@@ -1092,6 +1061,7 @@ CONFIG_CRYPTO_ECB=m
1092CONFIG_CRYPTO_CBC=y 1061CONFIG_CRYPTO_CBC=y
1093CONFIG_CRYPTO_PCBC=m 1062CONFIG_CRYPTO_PCBC=m
1094# CONFIG_CRYPTO_LRW is not set 1063# CONFIG_CRYPTO_LRW is not set
1064# CONFIG_CRYPTO_CRYPTD is not set
1095CONFIG_CRYPTO_DES=y 1065CONFIG_CRYPTO_DES=y
1096# CONFIG_CRYPTO_FCRYPT is not set 1066# CONFIG_CRYPTO_FCRYPT is not set
1097# CONFIG_CRYPTO_BLOWFISH is not set 1067# CONFIG_CRYPTO_BLOWFISH is not set
diff --git a/arch/powerpc/configs/mpc8540_ads_defconfig b/arch/powerpc/configs/mpc8540_ads_defconfig
index 17120c472304..faedcf8d64a7 100644
--- a/arch/powerpc/configs/mpc8540_ads_defconfig
+++ b/arch/powerpc/configs/mpc8540_ads_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.20-rc5 3# Linux kernel version: 2.6.22-rc7
4# Mon Jan 22 22:25:24 2007 4# Sun Jul 1 23:56:58 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -34,9 +34,9 @@ CONFIG_DEFAULT_UIMAGE=y
34# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
35CONFIG_PPC_85xx=y 35CONFIG_PPC_85xx=y
36# CONFIG_PPC_86xx is not set 36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
37# CONFIG_40x is not set 38# CONFIG_40x is not set
38# CONFIG_44x is not set 39# CONFIG_44x is not set
39# CONFIG_8xx is not set
40# CONFIG_E200 is not set 40# CONFIG_E200 is not set
41CONFIG_85xx=y 41CONFIG_85xx=y
42CONFIG_E500=y 42CONFIG_E500=y
@@ -46,6 +46,7 @@ CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y 46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set 47# CONFIG_PHYS_64BIT is not set
48CONFIG_SPE=y 48CONFIG_SPE=y
49# CONFIG_PPC_MM_SLICES is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
51# 52#
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -85,14 +89,19 @@ CONFIG_BUG=y
85CONFIG_ELF_CORE=y 89CONFIG_ELF_CORE=y
86CONFIG_BASE_FULL=y 90CONFIG_BASE_FULL=y
87CONFIG_FUTEX=y 91CONFIG_FUTEX=y
92CONFIG_ANON_INODES=y
88CONFIG_EPOLL=y 93CONFIG_EPOLL=y
94CONFIG_SIGNALFD=y
95CONFIG_TIMERFD=y
96CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 97CONFIG_SHMEM=y
90CONFIG_SLAB=y
91CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLAB=y
100# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set
92CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
93# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
94CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
95# CONFIG_SLOB is not set
96 105
97# 106#
98# Loadable module support 107# Loadable module support
@@ -119,17 +128,33 @@ 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"
122# CONFIG_WANT_EARLY_SERIAL is not set
123 131
124# 132#
125# Platform support 133# Platform support
126# 134#
135# CONFIG_PPC_MPC52xx is not set
136# CONFIG_PPC_MPC5200 is not set
137# CONFIG_PPC_CELL is not set
138# CONFIG_PPC_CELL_NATIVE is not set
139# CONFIG_PQ2ADS is not set
127CONFIG_MPC8540_ADS=y 140CONFIG_MPC8540_ADS=y
128# CONFIG_MPC8560_ADS is not set 141# CONFIG_MPC8560_ADS is not set
129# CONFIG_MPC85xx_CDS is not set 142# CONFIG_MPC85xx_CDS is not set
143# CONFIG_MPC85xx_MDS is not set
144# CONFIG_MPC8544_DS is not set
130CONFIG_MPC8540=y 145CONFIG_MPC8540=y
131CONFIG_PPC_INDIRECT_PCI_BE=y 146CONFIG_MPC85xx=y
132CONFIG_MPIC=y 147CONFIG_MPIC=y
148# CONFIG_MPIC_WEIRD is not set
149# CONFIG_PPC_I8259 is not set
150# CONFIG_PPC_RTAS is not set
151# CONFIG_MMIO_NVRAM is not set
152# CONFIG_PPC_MPC106 is not set
153# CONFIG_PPC_970_NAP is not set
154# CONFIG_PPC_INDIRECT_IO is not set
155# CONFIG_GENERIC_IOMAP is not set
156# CONFIG_CPU_FREQ is not set
157# CONFIG_CPM2 is not set
133 158
134# 159#
135# Kernel options 160# Kernel options
@@ -158,21 +183,25 @@ CONFIG_FLAT_NODE_MEM_MAP=y
158# CONFIG_SPARSEMEM_STATIC is not set 183# CONFIG_SPARSEMEM_STATIC is not set
159CONFIG_SPLIT_PTLOCK_CPUS=4 184CONFIG_SPLIT_PTLOCK_CPUS=4
160# CONFIG_RESOURCES_64BIT is not set 185# CONFIG_RESOURCES_64BIT is not set
186CONFIG_ZONE_DMA_FLAG=1
161CONFIG_PROC_DEVICETREE=y 187CONFIG_PROC_DEVICETREE=y
162# CONFIG_CMDLINE_BOOL is not set 188# CONFIG_CMDLINE_BOOL is not set
163# CONFIG_PM is not set 189# CONFIG_PM is not set
164# CONFIG_SECCOMP is not set 190# CONFIG_SECCOMP is not set
191CONFIG_WANT_DEVICE_TREE=y
192CONFIG_DEVICE_TREE=""
165CONFIG_ISA_DMA_API=y 193CONFIG_ISA_DMA_API=y
166 194
167# 195#
168# Bus options 196# Bus options
169# 197#
170# CONFIG_MPIC_WEIRD is not set 198CONFIG_ZONE_DMA=y
171# CONFIG_PPC_I8259 is not set
172CONFIG_PPC_INDIRECT_PCI=y 199CONFIG_PPC_INDIRECT_PCI=y
200CONFIG_PPC_INDIRECT_PCI_BE=y
173CONFIG_FSL_SOC=y 201CONFIG_FSL_SOC=y
174# CONFIG_PCI is not set 202# CONFIG_PCI is not set
175# CONFIG_PCI_DOMAINS is not set 203# CONFIG_PCI_DOMAINS is not set
204# CONFIG_ARCH_SUPPORTS_MSI is not set
176 205
177# 206#
178# PCCARD (PCMCIA/CardBus) support 207# PCCARD (PCMCIA/CardBus) support
@@ -180,10 +209,6 @@ CONFIG_FSL_SOC=y
180# CONFIG_PCCARD is not set 209# CONFIG_PCCARD is not set
181 210
182# 211#
183# PCI Hotplug Support
184#
185
186#
187# Advanced setup 212# Advanced setup
188# 213#
189# CONFIG_ADVANCED_OPTIONS is not set 214# CONFIG_ADVANCED_OPTIONS is not set
@@ -205,13 +230,13 @@ CONFIG_NET=y
205# 230#
206# Networking options 231# Networking options
207# 232#
208# CONFIG_NETDEBUG is not set
209CONFIG_PACKET=y 233CONFIG_PACKET=y
210# CONFIG_PACKET_MMAP is not set 234# CONFIG_PACKET_MMAP is not set
211CONFIG_UNIX=y 235CONFIG_UNIX=y
212CONFIG_XFRM=y 236CONFIG_XFRM=y
213CONFIG_XFRM_USER=y 237CONFIG_XFRM_USER=y
214# CONFIG_XFRM_SUB_POLICY is not set 238# CONFIG_XFRM_SUB_POLICY is not set
239# CONFIG_XFRM_MIGRATE is not set
215# CONFIG_NET_KEY is not set 240# CONFIG_NET_KEY is not set
216CONFIG_INET=y 241CONFIG_INET=y
217CONFIG_IP_MULTICAST=y 242CONFIG_IP_MULTICAST=y
@@ -245,20 +270,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
245# CONFIG_INET6_TUNNEL is not set 270# CONFIG_INET6_TUNNEL is not set
246# CONFIG_NETWORK_SECMARK is not set 271# CONFIG_NETWORK_SECMARK is not set
247# CONFIG_NETFILTER is not set 272# CONFIG_NETFILTER is not set
248
249#
250# DCCP Configuration (EXPERIMENTAL)
251#
252# CONFIG_IP_DCCP is not set 273# CONFIG_IP_DCCP is not set
253
254#
255# SCTP Configuration (EXPERIMENTAL)
256#
257# CONFIG_IP_SCTP is not set 274# CONFIG_IP_SCTP is not set
258
259#
260# TIPC Configuration (EXPERIMENTAL)
261#
262# CONFIG_TIPC is not set 275# CONFIG_TIPC is not set
263# CONFIG_ATM is not set 276# CONFIG_ATM is not set
264# CONFIG_BRIDGE is not set 277# CONFIG_BRIDGE is not set
@@ -284,7 +297,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
284# CONFIG_HAMRADIO is not set 297# CONFIG_HAMRADIO is not set
285# CONFIG_IRDA is not set 298# CONFIG_IRDA is not set
286# CONFIG_BT is not set 299# CONFIG_BT is not set
300# CONFIG_AF_RXRPC is not set
301
302#
303# Wireless
304#
305# CONFIG_CFG80211 is not set
306# CONFIG_WIRELESS_EXT is not set
307# CONFIG_MAC80211 is not set
287# CONFIG_IEEE80211 is not set 308# CONFIG_IEEE80211 is not set
309# CONFIG_RFKILL is not set
288 310
289# 311#
290# Device Drivers 312# Device Drivers
@@ -297,16 +319,13 @@ CONFIG_STANDALONE=y
297CONFIG_PREVENT_FIRMWARE_BUILD=y 319CONFIG_PREVENT_FIRMWARE_BUILD=y
298# CONFIG_FW_LOADER is not set 320# CONFIG_FW_LOADER is not set
299# CONFIG_DEBUG_DRIVER is not set 321# CONFIG_DEBUG_DRIVER is not set
322# CONFIG_DEBUG_DEVRES is not set
300# CONFIG_SYS_HYPERVISOR is not set 323# CONFIG_SYS_HYPERVISOR is not set
301 324
302# 325#
303# Connector - unified userspace <-> kernelspace linker 326# Connector - unified userspace <-> kernelspace linker
304# 327#
305# CONFIG_CONNECTOR is not set 328# CONFIG_CONNECTOR is not set
306
307#
308# Memory Technology Devices (MTD)
309#
310# CONFIG_MTD is not set 329# CONFIG_MTD is not set
311 330
312# 331#
@@ -317,6 +336,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
317# 336#
318# Plug and Play support 337# Plug and Play support
319# 338#
339# CONFIG_PNPACPI is not set
320 340
321# 341#
322# Block devices 342# Block devices
@@ -330,18 +350,13 @@ CONFIG_BLK_DEV_RAM=y
330CONFIG_BLK_DEV_RAM_COUNT=16 350CONFIG_BLK_DEV_RAM_COUNT=16
331CONFIG_BLK_DEV_RAM_SIZE=32768 351CONFIG_BLK_DEV_RAM_SIZE=32768
332CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 352CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
333CONFIG_BLK_DEV_INITRD=y
334# CONFIG_CDROM_PKTCDVD is not set 353# CONFIG_CDROM_PKTCDVD is not set
335# CONFIG_ATA_OVER_ETH is not set 354# CONFIG_ATA_OVER_ETH is not set
336 355
337# 356#
338# Misc devices 357# Misc devices
339# 358#
340# CONFIG_TIFM_CORE is not set 359# CONFIG_BLINK is not set
341
342#
343# ATA/ATAPI/MFM/RLL support
344#
345# CONFIG_IDE is not set 360# CONFIG_IDE is not set
346 361
347# 362#
@@ -350,35 +365,13 @@ CONFIG_BLK_DEV_INITRD=y
350# CONFIG_RAID_ATTRS is not set 365# CONFIG_RAID_ATTRS is not set
351# CONFIG_SCSI is not set 366# CONFIG_SCSI is not set
352# CONFIG_SCSI_NETLINK is not set 367# CONFIG_SCSI_NETLINK is not set
353
354#
355# Serial ATA (prod) and Parallel ATA (experimental) drivers
356#
357# CONFIG_ATA is not set 368# CONFIG_ATA is not set
358 369
359# 370#
360# Multi-device support (RAID and LVM) 371# Multi-device support (RAID and LVM)
361# 372#
362# CONFIG_MD is not set 373# CONFIG_MD is not set
363 374# CONFIG_MACINTOSH_DRIVERS is not set
364#
365# Fusion MPT device support
366#
367# CONFIG_FUSION is not set
368
369#
370# IEEE 1394 (FireWire) support
371#
372
373#
374# I2O device support
375#
376
377#
378# Macintosh device drivers
379#
380# CONFIG_MAC_EMUMOUSEBTN is not set
381# CONFIG_WINDFARM is not set
382 375
383# 376#
384# Network device support 377# Network device support
@@ -388,10 +381,6 @@ CONFIG_NETDEVICES=y
388# CONFIG_BONDING is not set 381# CONFIG_BONDING is not set
389# CONFIG_EQUALIZER is not set 382# CONFIG_EQUALIZER is not set
390# CONFIG_TUN is not set 383# CONFIG_TUN is not set
391
392#
393# PHY device support
394#
395CONFIG_PHYLIB=y 384CONFIG_PHYLIB=y
396 385
397# 386#
@@ -412,29 +401,16 @@ CONFIG_PHYLIB=y
412# 401#
413CONFIG_NET_ETHERNET=y 402CONFIG_NET_ETHERNET=y
414CONFIG_MII=y 403CONFIG_MII=y
415 404CONFIG_NETDEV_1000=y
416#
417# Ethernet (1000 Mbit)
418#
419CONFIG_GIANFAR=y 405CONFIG_GIANFAR=y
420CONFIG_GFAR_NAPI=y 406CONFIG_GFAR_NAPI=y
407CONFIG_NETDEV_10000=y
421 408
422# 409#
423# Ethernet (10000 Mbit) 410# Wireless LAN
424#
425
426#
427# Token Ring devices
428#
429
430#
431# Wireless LAN (non-hamradio)
432#
433# CONFIG_NET_RADIO is not set
434
435#
436# Wan interfaces
437# 411#
412# CONFIG_WLAN_PRE80211 is not set
413# CONFIG_WLAN_80211 is not set
438# CONFIG_WAN is not set 414# CONFIG_WAN is not set
439# CONFIG_PPP is not set 415# CONFIG_PPP is not set
440# CONFIG_SLIP is not set 416# CONFIG_SLIP is not set
@@ -458,6 +434,7 @@ CONFIG_GFAR_NAPI=y
458# 434#
459CONFIG_INPUT=y 435CONFIG_INPUT=y
460# CONFIG_INPUT_FF_MEMLESS is not set 436# CONFIG_INPUT_FF_MEMLESS is not set
437# CONFIG_INPUT_POLLDEV is not set
461 438
462# 439#
463# Userland interfaces 440# Userland interfaces
@@ -474,6 +451,7 @@ CONFIG_INPUT=y
474# CONFIG_INPUT_KEYBOARD is not set 451# CONFIG_INPUT_KEYBOARD is not set
475# CONFIG_INPUT_MOUSE is not set 452# CONFIG_INPUT_MOUSE is not set
476# CONFIG_INPUT_JOYSTICK is not set 453# CONFIG_INPUT_JOYSTICK is not set
454# CONFIG_INPUT_TABLET is not set
477# CONFIG_INPUT_TOUCHSCREEN is not set 455# CONFIG_INPUT_TOUCHSCREEN is not set
478# CONFIG_INPUT_MISC is not set 456# CONFIG_INPUT_MISC is not set
479 457
@@ -497,6 +475,7 @@ CONFIG_SERIAL_8250_CONSOLE=y
497CONFIG_SERIAL_8250_NR_UARTS=4 475CONFIG_SERIAL_8250_NR_UARTS=4
498CONFIG_SERIAL_8250_RUNTIME_UARTS=4 476CONFIG_SERIAL_8250_RUNTIME_UARTS=4
499# CONFIG_SERIAL_8250_EXTENDED is not set 477# CONFIG_SERIAL_8250_EXTENDED is not set
478CONFIG_SERIAL_8250_SHARE_IRQ=y
500 479
501# 480#
502# Non-8250 serial port support 481# Non-8250 serial port support
@@ -504,6 +483,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
504# CONFIG_SERIAL_UARTLITE is not set 483# CONFIG_SERIAL_UARTLITE is not set
505CONFIG_SERIAL_CORE=y 484CONFIG_SERIAL_CORE=y
506CONFIG_SERIAL_CORE_CONSOLE=y 485CONFIG_SERIAL_CORE_CONSOLE=y
486# CONFIG_SERIAL_OF_PLATFORM is not set
507CONFIG_UNIX98_PTYS=y 487CONFIG_UNIX98_PTYS=y
508CONFIG_LEGACY_PTYS=y 488CONFIG_LEGACY_PTYS=y
509CONFIG_LEGACY_PTY_COUNT=256 489CONFIG_LEGACY_PTY_COUNT=256
@@ -512,16 +492,11 @@ CONFIG_LEGACY_PTY_COUNT=256
512# IPMI 492# IPMI
513# 493#
514# CONFIG_IPMI_HANDLER is not set 494# CONFIG_IPMI_HANDLER is not set
515
516#
517# Watchdog Cards
518#
519# CONFIG_WATCHDOG is not set 495# CONFIG_WATCHDOG is not set
520# CONFIG_HW_RANDOM is not set 496# CONFIG_HW_RANDOM is not set
521# CONFIG_NVRAM is not set 497# CONFIG_NVRAM is not set
522CONFIG_GEN_RTC=y 498CONFIG_GEN_RTC=y
523# CONFIG_GEN_RTC_X is not set 499# CONFIG_GEN_RTC_X is not set
524# CONFIG_DTLK is not set
525# CONFIG_R3964 is not set 500# CONFIG_R3964 is not set
526# CONFIG_RAW_DRIVER is not set 501# CONFIG_RAW_DRIVER is not set
527 502
@@ -529,10 +504,6 @@ CONFIG_GEN_RTC=y
529# TPM devices 504# TPM devices
530# 505#
531# CONFIG_TCG_TPM is not set 506# CONFIG_TCG_TPM is not set
532
533#
534# I2C support
535#
536# CONFIG_I2C is not set 507# CONFIG_I2C is not set
537 508
538# 509#
@@ -545,35 +516,41 @@ CONFIG_GEN_RTC=y
545# Dallas's 1-wire bus 516# Dallas's 1-wire bus
546# 517#
547# CONFIG_W1 is not set 518# CONFIG_W1 is not set
548
549#
550# Hardware Monitoring support
551#
552CONFIG_HWMON=y 519CONFIG_HWMON=y
553# CONFIG_HWMON_VID is not set 520# CONFIG_HWMON_VID is not set
554# CONFIG_SENSORS_ABITUGURU is not set 521# CONFIG_SENSORS_ABITUGURU is not set
555# CONFIG_SENSORS_F71805F is not set 522# CONFIG_SENSORS_F71805F is not set
556# CONFIG_SENSORS_PC87427 is not set 523# CONFIG_SENSORS_PC87427 is not set
524# CONFIG_SENSORS_SMSC47M1 is not set
525# CONFIG_SENSORS_SMSC47B397 is not set
557# CONFIG_SENSORS_VT1211 is not set 526# CONFIG_SENSORS_VT1211 is not set
527# CONFIG_SENSORS_W83627HF is not set
558# CONFIG_HWMON_DEBUG_CHIP is not set 528# CONFIG_HWMON_DEBUG_CHIP is not set
559 529
560# 530#
531# Multifunction device drivers
532#
533# CONFIG_MFD_SM501 is not set
534
535#
561# Multimedia devices 536# Multimedia devices
562# 537#
563# CONFIG_VIDEO_DEV is not set 538# CONFIG_VIDEO_DEV is not set
539# CONFIG_DVB_CORE is not set
540CONFIG_DAB=y
564 541
565# 542#
566# Digital Video Broadcasting Devices 543# Graphics support
567# 544#
568# CONFIG_DVB is not set 545# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
569 546
570# 547#
571# Graphics support 548# Display device support
572# 549#
573CONFIG_FIRMWARE_EDID=y 550# CONFIG_DISPLAY_SUPPORT is not set
551# CONFIG_VGASTATE is not set
574# CONFIG_FB is not set 552# CONFIG_FB is not set
575# CONFIG_FB_IBM_GXT4500 is not set 553# CONFIG_FB_IBM_GXT4500 is not set
576# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
577 554
578# 555#
579# Sound 556# Sound
@@ -584,6 +561,7 @@ CONFIG_FIRMWARE_EDID=y
584# HID Devices 561# HID Devices
585# 562#
586CONFIG_HID=y 563CONFIG_HID=y
564# CONFIG_HID_DEBUG is not set
587 565
588# 566#
589# USB support 567# USB support
@@ -600,10 +578,6 @@ CONFIG_HID=y
600# USB Gadget Support 578# USB Gadget Support
601# 579#
602# CONFIG_USB_GADGET is not set 580# CONFIG_USB_GADGET is not set
603
604#
605# MMC/SD Card support
606#
607# CONFIG_MMC is not set 581# CONFIG_MMC is not set
608 582
609# 583#
@@ -646,10 +620,6 @@ CONFIG_HID=y
646# 620#
647 621
648# 622#
649# Virtualization
650#
651
652#
653# File systems 623# File systems
654# 624#
655CONFIG_EXT2_FS=y 625CONFIG_EXT2_FS=y
@@ -734,6 +704,7 @@ CONFIG_ROOT_NFS=y
734CONFIG_LOCKD=y 704CONFIG_LOCKD=y
735CONFIG_NFS_COMMON=y 705CONFIG_NFS_COMMON=y
736CONFIG_SUNRPC=y 706CONFIG_SUNRPC=y
707# CONFIG_SUNRPC_BIND34 is not set
737# CONFIG_RPCSEC_GSS_KRB5 is not set 708# CONFIG_RPCSEC_GSS_KRB5 is not set
738# CONFIG_RPCSEC_GSS_SPKM3 is not set 709# CONFIG_RPCSEC_GSS_SPKM3 is not set
739# CONFIG_SMB_FS is not set 710# CONFIG_SMB_FS is not set
@@ -759,6 +730,7 @@ CONFIG_PARTITION_ADVANCED=y
759# CONFIG_SUN_PARTITION is not set 730# CONFIG_SUN_PARTITION is not set
760# CONFIG_KARMA_PARTITION is not set 731# CONFIG_KARMA_PARTITION is not set
761# CONFIG_EFI_PARTITION is not set 732# CONFIG_EFI_PARTITION is not set
733# CONFIG_SYSV68_PARTITION is not set
762 734
763# 735#
764# Native Language Support 736# Native Language Support
@@ -769,6 +741,7 @@ CONFIG_PARTITION_ADVANCED=y
769# Distributed Lock Manager 741# Distributed Lock Manager
770# 742#
771# CONFIG_DLM is not set 743# CONFIG_DLM is not set
744# CONFIG_UCC_SLOW is not set
772 745
773# 746#
774# Library routines 747# Library routines
@@ -776,10 +749,13 @@ CONFIG_PARTITION_ADVANCED=y
776CONFIG_BITREVERSE=y 749CONFIG_BITREVERSE=y
777# CONFIG_CRC_CCITT is not set 750# CONFIG_CRC_CCITT is not set
778# CONFIG_CRC16 is not set 751# CONFIG_CRC16 is not set
752# CONFIG_CRC_ITU_T is not set
779CONFIG_CRC32=y 753CONFIG_CRC32=y
780# CONFIG_LIBCRC32C is not set 754# CONFIG_LIBCRC32C is not set
781CONFIG_PLIST=y 755CONFIG_PLIST=y
782CONFIG_IOMAP_COPY=y 756CONFIG_HAS_IOMEM=y
757CONFIG_HAS_IOPORT=y
758CONFIG_HAS_DMA=y
783 759
784# 760#
785# Instrumentation Support 761# Instrumentation Support
@@ -796,15 +772,15 @@ CONFIG_ENABLE_MUST_CHECK=y
796# CONFIG_DEBUG_FS is not set 772# CONFIG_DEBUG_FS is not set
797# CONFIG_HEADERS_CHECK is not set 773# CONFIG_HEADERS_CHECK is not set
798CONFIG_DEBUG_KERNEL=y 774CONFIG_DEBUG_KERNEL=y
799CONFIG_LOG_BUF_SHIFT=14 775# CONFIG_DEBUG_SHIRQ is not set
800CONFIG_DETECT_SOFTLOCKUP=y 776CONFIG_DETECT_SOFTLOCKUP=y
801# CONFIG_SCHEDSTATS is not set 777# CONFIG_SCHEDSTATS is not set
778# CONFIG_TIMER_STATS is not set
802# CONFIG_DEBUG_SLAB is not set 779# CONFIG_DEBUG_SLAB is not set
803# CONFIG_DEBUG_RT_MUTEXES is not set 780# CONFIG_DEBUG_RT_MUTEXES is not set
804# CONFIG_RT_MUTEX_TESTER is not set 781# CONFIG_RT_MUTEX_TESTER is not set
805# CONFIG_DEBUG_SPINLOCK is not set 782# CONFIG_DEBUG_SPINLOCK is not set
806CONFIG_DEBUG_MUTEXES=y 783CONFIG_DEBUG_MUTEXES=y
807# CONFIG_DEBUG_RWSEMS is not set
808# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 784# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
809# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 785# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
810# CONFIG_DEBUG_KOBJECT is not set 786# CONFIG_DEBUG_KOBJECT is not set
@@ -813,7 +789,10 @@ CONFIG_DEBUG_MUTEXES=y
813# CONFIG_DEBUG_VM is not set 789# CONFIG_DEBUG_VM is not set
814# CONFIG_DEBUG_LIST is not set 790# CONFIG_DEBUG_LIST is not set
815CONFIG_FORCED_INLINING=y 791CONFIG_FORCED_INLINING=y
816# CONFIG_RCU_TORTURE_TEST is not set 792# CONFIG_FAULT_INJECTION is not set
793# CONFIG_DEBUG_STACKOVERFLOW is not set
794# CONFIG_DEBUG_STACK_USAGE is not set
795# CONFIG_DEBUG_PAGEALLOC is not set
817# CONFIG_DEBUGGER is not set 796# CONFIG_DEBUGGER is not set
818# CONFIG_BDI_SWITCH is not set 797# CONFIG_BDI_SWITCH is not set
819# CONFIG_BOOTX_TEXT is not set 798# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/mpc8544_ds_defconfig b/arch/powerpc/configs/mpc8544_ds_defconfig
index b563513cc96c..c40a25a79cbb 100644
--- a/arch/powerpc/configs/mpc8544_ds_defconfig
+++ b/arch/powerpc/configs/mpc8544_ds_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.21-rc3 3# Linux kernel version: 2.6.22-rc7
4# Mon Mar 19 17:18:49 2007 4# Sun Jul 1 23:56:58 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -46,6 +46,7 @@ CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y 46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set 47# CONFIG_PHYS_64BIT is not set
48# CONFIG_SPE is not set 48# CONFIG_SPE is not set
49# CONFIG_PPC_MM_SLICES is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
51# 52#
@@ -73,6 +74,7 @@ CONFIG_AUDIT=y
73# CONFIG_AUDITSYSCALL is not set 74# CONFIG_AUDITSYSCALL is not set
74CONFIG_IKCONFIG=y 75CONFIG_IKCONFIG=y
75CONFIG_IKCONFIG_PROC=y 76CONFIG_IKCONFIG_PROC=y
77CONFIG_LOG_BUF_SHIFT=14
76CONFIG_SYSFS_DEPRECATED=y 78CONFIG_SYSFS_DEPRECATED=y
77# CONFIG_RELAY is not set 79# CONFIG_RELAY is not set
78CONFIG_BLK_DEV_INITRD=y 80CONFIG_BLK_DEV_INITRD=y
@@ -90,14 +92,19 @@ CONFIG_BUG=y
90CONFIG_ELF_CORE=y 92CONFIG_ELF_CORE=y
91CONFIG_BASE_FULL=y 93CONFIG_BASE_FULL=y
92CONFIG_FUTEX=y 94CONFIG_FUTEX=y
95CONFIG_ANON_INODES=y
93CONFIG_EPOLL=y 96CONFIG_EPOLL=y
97CONFIG_SIGNALFD=y
98CONFIG_TIMERFD=y
99CONFIG_EVENTFD=y
94CONFIG_SHMEM=y 100CONFIG_SHMEM=y
95CONFIG_SLAB=y
96CONFIG_VM_EVENT_COUNTERS=y 101CONFIG_VM_EVENT_COUNTERS=y
102CONFIG_SLAB=y
103# CONFIG_SLUB is not set
104# CONFIG_SLOB is not set
97CONFIG_RT_MUTEXES=y 105CONFIG_RT_MUTEXES=y
98# CONFIG_TINY_SHMEM is not set 106# CONFIG_TINY_SHMEM is not set
99CONFIG_BASE_SMALL=0 107CONFIG_BASE_SMALL=0
100# CONFIG_SLOB is not set
101 108
102# 109#
103# Loadable module support 110# Loadable module support
@@ -129,19 +136,32 @@ CONFIG_IOSCHED_CFQ=y
129CONFIG_DEFAULT_CFQ=y 136CONFIG_DEFAULT_CFQ=y
130# CONFIG_DEFAULT_NOOP is not set 137# CONFIG_DEFAULT_NOOP is not set
131CONFIG_DEFAULT_IOSCHED="cfq" 138CONFIG_DEFAULT_IOSCHED="cfq"
132# CONFIG_WANT_EARLY_SERIAL is not set
133 139
134# 140#
135# Platform support 141# Platform support
136# 142#
143# CONFIG_PPC_MPC52xx is not set
144# CONFIG_PPC_MPC5200 is not set
145# CONFIG_PPC_CELL is not set
146# CONFIG_PPC_CELL_NATIVE is not set
147# CONFIG_PQ2ADS is not set
137# CONFIG_MPC8540_ADS is not set 148# CONFIG_MPC8540_ADS is not set
138# CONFIG_MPC8560_ADS is not set 149# CONFIG_MPC8560_ADS is not set
139# CONFIG_MPC85xx_CDS is not set 150# CONFIG_MPC85xx_CDS is not set
140# CONFIG_MPC85xx_MDS is not set 151# CONFIG_MPC85xx_MDS is not set
141CONFIG_MPC8544_DS=y 152CONFIG_MPC8544_DS=y
142CONFIG_MPC85xx=y 153CONFIG_MPC85xx=y
143CONFIG_PPC_INDIRECT_PCI_BE=y
144CONFIG_MPIC=y 154CONFIG_MPIC=y
155# CONFIG_MPIC_WEIRD is not set
156# CONFIG_PPC_I8259 is not set
157# CONFIG_PPC_RTAS is not set
158# CONFIG_MMIO_NVRAM is not set
159# CONFIG_PPC_MPC106 is not set
160# CONFIG_PPC_970_NAP is not set
161# CONFIG_PPC_INDIRECT_IO is not set
162# CONFIG_GENERIC_IOMAP is not set
163# CONFIG_CPU_FREQ is not set
164# CONFIG_CPM2 is not set
145 165
146# 166#
147# Kernel options 167# Kernel options
@@ -176,28 +196,26 @@ CONFIG_CMDLINE_BOOL=y
176CONFIG_CMDLINE="root=/dev/sda3 rw console=ttyS0,115200" 196CONFIG_CMDLINE="root=/dev/sda3 rw console=ttyS0,115200"
177# CONFIG_PM is not set 197# CONFIG_PM is not set
178CONFIG_SECCOMP=y 198CONFIG_SECCOMP=y
199CONFIG_WANT_DEVICE_TREE=y
200CONFIG_DEVICE_TREE=""
179CONFIG_ISA_DMA_API=y 201CONFIG_ISA_DMA_API=y
180 202
181# 203#
182# Bus options 204# Bus options
183# 205#
184CONFIG_ZONE_DMA=y 206CONFIG_ZONE_DMA=y
185# CONFIG_MPIC_WEIRD is not set
186# CONFIG_PPC_I8259 is not set
187CONFIG_PPC_INDIRECT_PCI=y 207CONFIG_PPC_INDIRECT_PCI=y
208CONFIG_PPC_INDIRECT_PCI_BE=y
188CONFIG_FSL_SOC=y 209CONFIG_FSL_SOC=y
189# CONFIG_PCI is not set 210# CONFIG_PCI is not set
190# CONFIG_PCI_DOMAINS is not set 211# CONFIG_PCI_DOMAINS is not set
212# CONFIG_ARCH_SUPPORTS_MSI is not set
191 213
192# 214#
193# PCCARD (PCMCIA/CardBus) support 215# PCCARD (PCMCIA/CardBus) support
194# 216#
195 217
196# 218#
197# PCI Hotplug Support
198#
199
200#
201# Advanced setup 219# Advanced setup
202# 220#
203# CONFIG_ADVANCED_OPTIONS is not set 221# CONFIG_ADVANCED_OPTIONS is not set
@@ -219,7 +237,6 @@ CONFIG_NET=y
219# 237#
220# Networking options 238# Networking options
221# 239#
222# CONFIG_NETDEBUG is not set
223CONFIG_PACKET=y 240CONFIG_PACKET=y
224# CONFIG_PACKET_MMAP is not set 241# CONFIG_PACKET_MMAP is not set
225CONFIG_UNIX=y 242CONFIG_UNIX=y
@@ -270,25 +287,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
270# CONFIG_INET6_TUNNEL is not set 287# CONFIG_INET6_TUNNEL is not set
271# CONFIG_NETWORK_SECMARK is not set 288# CONFIG_NETWORK_SECMARK is not set
272# CONFIG_NETFILTER is not set 289# CONFIG_NETFILTER is not set
273
274#
275# DCCP Configuration (EXPERIMENTAL)
276#
277# CONFIG_IP_DCCP is not set 290# CONFIG_IP_DCCP is not set
278
279#
280# SCTP Configuration (EXPERIMENTAL)
281#
282CONFIG_IP_SCTP=m 291CONFIG_IP_SCTP=m
283# CONFIG_SCTP_DBG_MSG is not set 292# CONFIG_SCTP_DBG_MSG is not set
284# CONFIG_SCTP_DBG_OBJCNT is not set 293# CONFIG_SCTP_DBG_OBJCNT is not set
285# CONFIG_SCTP_HMAC_NONE is not set 294# CONFIG_SCTP_HMAC_NONE is not set
286# CONFIG_SCTP_HMAC_SHA1 is not set 295# CONFIG_SCTP_HMAC_SHA1 is not set
287CONFIG_SCTP_HMAC_MD5=y 296CONFIG_SCTP_HMAC_MD5=y
288
289#
290# TIPC Configuration (EXPERIMENTAL)
291#
292# CONFIG_TIPC is not set 297# CONFIG_TIPC is not set
293# CONFIG_ATM is not set 298# CONFIG_ATM is not set
294# CONFIG_BRIDGE is not set 299# CONFIG_BRIDGE is not set
@@ -314,10 +319,19 @@ CONFIG_SCTP_HMAC_MD5=y
314# CONFIG_HAMRADIO is not set 319# CONFIG_HAMRADIO is not set
315# CONFIG_IRDA is not set 320# CONFIG_IRDA is not set
316# CONFIG_BT is not set 321# CONFIG_BT is not set
317# CONFIG_IEEE80211 is not set 322# CONFIG_AF_RXRPC is not set
318CONFIG_FIB_RULES=y 323CONFIG_FIB_RULES=y
319 324
320# 325#
326# Wireless
327#
328# CONFIG_CFG80211 is not set
329# CONFIG_WIRELESS_EXT is not set
330# CONFIG_MAC80211 is not set
331# CONFIG_IEEE80211 is not set
332# CONFIG_RFKILL is not set
333
334#
321# Device Drivers 335# Device Drivers
322# 336#
323 337
@@ -334,10 +348,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
334# Connector - unified userspace <-> kernelspace linker 348# Connector - unified userspace <-> kernelspace linker
335# 349#
336# CONFIG_CONNECTOR is not set 350# CONFIG_CONNECTOR is not set
337
338#
339# Memory Technology Devices (MTD)
340#
341# CONFIG_MTD is not set 351# CONFIG_MTD is not set
342 352
343# 353#
@@ -368,10 +378,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
368# 378#
369# Misc devices 379# Misc devices
370# 380#
371 381# CONFIG_BLINK is not set
372#
373# ATA/ATAPI/MFM/RLL support
374#
375# CONFIG_IDE is not set 382# CONFIG_IDE is not set
376 383
377# 384#
@@ -400,6 +407,7 @@ CONFIG_SCSI_MULTI_LUN=y
400# CONFIG_SCSI_CONSTANTS is not set 407# CONFIG_SCSI_CONSTANTS is not set
401CONFIG_SCSI_LOGGING=y 408CONFIG_SCSI_LOGGING=y
402# CONFIG_SCSI_SCAN_ASYNC is not set 409# CONFIG_SCSI_SCAN_ASYNC is not set
410CONFIG_SCSI_WAIT_SCAN=m
403 411
404# 412#
405# SCSI Transports 413# SCSI Transports
@@ -415,10 +423,6 @@ CONFIG_SCSI_LOGGING=y
415# 423#
416# CONFIG_ISCSI_TCP is not set 424# CONFIG_ISCSI_TCP is not set
417# CONFIG_SCSI_DEBUG is not set 425# CONFIG_SCSI_DEBUG is not set
418
419#
420# Serial ATA (prod) and Parallel ATA (experimental) drivers
421#
422CONFIG_ATA=y 426CONFIG_ATA=y
423# CONFIG_ATA_NONSTANDARD is not set 427# CONFIG_ATA_NONSTANDARD is not set
424# CONFIG_PATA_PLATFORM is not set 428# CONFIG_PATA_PLATFORM is not set
@@ -427,25 +431,7 @@ CONFIG_ATA=y
427# Multi-device support (RAID and LVM) 431# Multi-device support (RAID and LVM)
428# 432#
429# CONFIG_MD is not set 433# CONFIG_MD is not set
430 434# CONFIG_MACINTOSH_DRIVERS is not set
431#
432# Fusion MPT device support
433#
434# CONFIG_FUSION is not set
435
436#
437# IEEE 1394 (FireWire) support
438#
439
440#
441# I2O device support
442#
443
444#
445# Macintosh device drivers
446#
447# CONFIG_MAC_EMUMOUSEBTN is not set
448# CONFIG_WINDFARM is not set
449 435
450# 436#
451# Network device support 437# Network device support
@@ -455,10 +441,6 @@ CONFIG_NETDEVICES=y
455# CONFIG_BONDING is not set 441# CONFIG_BONDING is not set
456# CONFIG_EQUALIZER is not set 442# CONFIG_EQUALIZER is not set
457# CONFIG_TUN is not set 443# CONFIG_TUN is not set
458
459#
460# PHY device support
461#
462CONFIG_PHYLIB=y 444CONFIG_PHYLIB=y
463 445
464# 446#
@@ -479,29 +461,16 @@ CONFIG_VITESSE_PHY=y
479# 461#
480CONFIG_NET_ETHERNET=y 462CONFIG_NET_ETHERNET=y
481CONFIG_MII=y 463CONFIG_MII=y
482 464CONFIG_NETDEV_1000=y
483#
484# Ethernet (1000 Mbit)
485#
486CONFIG_GIANFAR=y 465CONFIG_GIANFAR=y
487CONFIG_GFAR_NAPI=y 466CONFIG_GFAR_NAPI=y
467CONFIG_NETDEV_10000=y
488 468
489# 469#
490# Ethernet (10000 Mbit) 470# Wireless LAN
491#
492
493#
494# Token Ring devices
495#
496
497#
498# Wireless LAN (non-hamradio)
499#
500# CONFIG_NET_RADIO is not set
501
502#
503# Wan interfaces
504# 471#
472# CONFIG_WLAN_PRE80211 is not set
473# CONFIG_WLAN_80211 is not set
505# CONFIG_WAN is not set 474# CONFIG_WAN is not set
506# CONFIG_PPP is not set 475# CONFIG_PPP is not set
507# CONFIG_SLIP is not set 476# CONFIG_SLIP is not set
@@ -525,6 +494,7 @@ CONFIG_GFAR_NAPI=y
525# 494#
526CONFIG_INPUT=y 495CONFIG_INPUT=y
527# CONFIG_INPUT_FF_MEMLESS is not set 496# CONFIG_INPUT_FF_MEMLESS is not set
497# CONFIG_INPUT_POLLDEV is not set
528 498
529# 499#
530# Userland interfaces 500# Userland interfaces
@@ -541,6 +511,7 @@ CONFIG_INPUT=y
541# CONFIG_INPUT_KEYBOARD is not set 511# CONFIG_INPUT_KEYBOARD is not set
542# CONFIG_INPUT_MOUSE is not set 512# CONFIG_INPUT_MOUSE is not set
543# CONFIG_INPUT_JOYSTICK is not set 513# CONFIG_INPUT_JOYSTICK is not set
514# CONFIG_INPUT_TABLET is not set
544# CONFIG_INPUT_TOUCHSCREEN is not set 515# CONFIG_INPUT_TOUCHSCREEN is not set
545# CONFIG_INPUT_MISC is not set 516# CONFIG_INPUT_MISC is not set
546 517
@@ -571,6 +542,7 @@ CONFIG_SERIAL_8250_CONSOLE=y
571CONFIG_SERIAL_8250_NR_UARTS=4 542CONFIG_SERIAL_8250_NR_UARTS=4
572CONFIG_SERIAL_8250_RUNTIME_UARTS=4 543CONFIG_SERIAL_8250_RUNTIME_UARTS=4
573# CONFIG_SERIAL_8250_EXTENDED is not set 544# CONFIG_SERIAL_8250_EXTENDED is not set
545CONFIG_SERIAL_8250_SHARE_IRQ=y
574 546
575# 547#
576# Non-8250 serial port support 548# Non-8250 serial port support
@@ -587,16 +559,11 @@ CONFIG_LEGACY_PTY_COUNT=256
587# IPMI 559# IPMI
588# 560#
589# CONFIG_IPMI_HANDLER is not set 561# CONFIG_IPMI_HANDLER is not set
590
591#
592# Watchdog Cards
593#
594# CONFIG_WATCHDOG is not set 562# CONFIG_WATCHDOG is not set
595# CONFIG_HW_RANDOM is not set 563# CONFIG_HW_RANDOM is not set
596CONFIG_NVRAM=y 564CONFIG_NVRAM=y
597CONFIG_GEN_RTC=y 565CONFIG_GEN_RTC=y
598CONFIG_GEN_RTC_X=y 566CONFIG_GEN_RTC_X=y
599# CONFIG_DTLK is not set
600# CONFIG_R3964 is not set 567# CONFIG_R3964 is not set
601# CONFIG_RAW_DRIVER is not set 568# CONFIG_RAW_DRIVER is not set
602 569
@@ -604,10 +571,6 @@ CONFIG_GEN_RTC_X=y
604# TPM devices 571# TPM devices
605# 572#
606# CONFIG_TCG_TPM is not set 573# CONFIG_TCG_TPM is not set
607
608#
609# I2C support
610#
611# CONFIG_I2C is not set 574# CONFIG_I2C is not set
612 575
613# 576#
@@ -620,12 +583,7 @@ CONFIG_GEN_RTC_X=y
620# Dallas's 1-wire bus 583# Dallas's 1-wire bus
621# 584#
622# CONFIG_W1 is not set 585# CONFIG_W1 is not set
623
624#
625# Hardware Monitoring support
626#
627# CONFIG_HWMON is not set 586# CONFIG_HWMON is not set
628# CONFIG_HWMON_VID is not set
629 587
630# 588#
631# Multifunction device drivers 589# Multifunction device drivers
@@ -636,13 +594,9 @@ CONFIG_GEN_RTC_X=y
636# Multimedia devices 594# Multimedia devices
637# 595#
638# CONFIG_VIDEO_DEV is not set 596# CONFIG_VIDEO_DEV is not set
639
640#
641# Digital Video Broadcasting Devices
642#
643CONFIG_DVB=y
644CONFIG_DVB_CORE=m 597CONFIG_DVB_CORE=m
645# CONFIG_DVB_CORE_ATTACH is not set 598# CONFIG_DVB_CORE_ATTACH is not set
599CONFIG_DVB_CAPTURE_DRIVERS=y
646 600
647# 601#
648# Supported DVB Frontends 602# Supported DVB Frontends
@@ -676,11 +630,18 @@ CONFIG_DVB_CORE=m
676# 630#
677# Miscellaneous devices 631# Miscellaneous devices
678# 632#
633CONFIG_DAB=y
679 634
680# 635#
681# Graphics support 636# Graphics support
682# 637#
683# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 638# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
639
640#
641# Display device support
642#
643# CONFIG_DISPLAY_SUPPORT is not set
644# CONFIG_VGASTATE is not set
684# CONFIG_FB is not set 645# CONFIG_FB is not set
685# CONFIG_FB_IBM_GXT4500 is not set 646# CONFIG_FB_IBM_GXT4500 is not set
686 647
@@ -716,10 +677,6 @@ CONFIG_HID=y
716# USB Gadget Support 677# USB Gadget Support
717# 678#
718# CONFIG_USB_GADGET is not set 679# CONFIG_USB_GADGET is not set
719
720#
721# MMC/SD Card support
722#
723# CONFIG_MMC is not set 680# CONFIG_MMC is not set
724 681
725# 682#
@@ -759,17 +716,29 @@ CONFIG_RTC_INTF_SYSFS=y
759CONFIG_RTC_INTF_PROC=y 716CONFIG_RTC_INTF_PROC=y
760CONFIG_RTC_INTF_DEV=y 717CONFIG_RTC_INTF_DEV=y
761# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 718# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
719# CONFIG_RTC_DRV_TEST is not set
720
721#
722# I2C RTC drivers
723#
762 724
763# 725#
764# RTC drivers 726# SPI RTC drivers
727#
728
729#
730# Platform RTC drivers
765# 731#
766# CONFIG_RTC_DRV_DS1553 is not set 732# CONFIG_RTC_DRV_DS1553 is not set
767# CONFIG_RTC_DRV_DS1742 is not set 733# CONFIG_RTC_DRV_DS1742 is not set
768# CONFIG_RTC_DRV_M48T86 is not set 734# CONFIG_RTC_DRV_M48T86 is not set
769# CONFIG_RTC_DRV_TEST is not set
770# CONFIG_RTC_DRV_V3020 is not set 735# CONFIG_RTC_DRV_V3020 is not set
771 736
772# 737#
738# on-CPU RTC drivers
739#
740
741#
773# DMA Engine support 742# DMA Engine support
774# 743#
775# CONFIG_DMA_ENGINE is not set 744# CONFIG_DMA_ENGINE is not set
@@ -783,14 +752,6 @@ CONFIG_RTC_INTF_DEV=y
783# 752#
784 753
785# 754#
786# Auxiliary Display support
787#
788
789#
790# Virtualization
791#
792
793#
794# File systems 755# File systems
795# 756#
796CONFIG_EXT2_FS=y 757CONFIG_EXT2_FS=y
@@ -890,6 +851,7 @@ CONFIG_LOCKD_V4=y
890CONFIG_NFS_COMMON=y 851CONFIG_NFS_COMMON=y
891CONFIG_SUNRPC=y 852CONFIG_SUNRPC=y
892CONFIG_SUNRPC_GSS=y 853CONFIG_SUNRPC_GSS=y
854# CONFIG_SUNRPC_BIND34 is not set
893CONFIG_RPCSEC_GSS_KRB5=y 855CONFIG_RPCSEC_GSS_KRB5=y
894# CONFIG_RPCSEC_GSS_SPKM3 is not set 856# CONFIG_RPCSEC_GSS_SPKM3 is not set
895# CONFIG_SMB_FS is not set 857# CONFIG_SMB_FS is not set
@@ -919,6 +881,7 @@ CONFIG_MSDOS_PARTITION=y
919# CONFIG_SUN_PARTITION is not set 881# CONFIG_SUN_PARTITION is not set
920# CONFIG_KARMA_PARTITION is not set 882# CONFIG_KARMA_PARTITION is not set
921# CONFIG_EFI_PARTITION is not set 883# CONFIG_EFI_PARTITION is not set
884# CONFIG_SYSV68_PARTITION is not set
922 885
923# 886#
924# Native Language Support 887# Native Language Support
@@ -968,6 +931,7 @@ CONFIG_NLS_UTF8=m
968# Distributed Lock Manager 931# Distributed Lock Manager
969# 932#
970# CONFIG_DLM is not set 933# CONFIG_DLM is not set
934# CONFIG_UCC_SLOW is not set
971 935
972# 936#
973# Library routines 937# Library routines
@@ -975,12 +939,14 @@ CONFIG_NLS_UTF8=m
975CONFIG_BITREVERSE=y 939CONFIG_BITREVERSE=y
976# CONFIG_CRC_CCITT is not set 940# CONFIG_CRC_CCITT is not set
977# CONFIG_CRC16 is not set 941# CONFIG_CRC16 is not set
942# CONFIG_CRC_ITU_T is not set
978CONFIG_CRC32=y 943CONFIG_CRC32=y
979CONFIG_LIBCRC32C=m 944CONFIG_LIBCRC32C=m
980CONFIG_ZLIB_INFLATE=y 945CONFIG_ZLIB_INFLATE=y
981CONFIG_PLIST=y 946CONFIG_PLIST=y
982CONFIG_HAS_IOMEM=y 947CONFIG_HAS_IOMEM=y
983CONFIG_HAS_IOPORT=y 948CONFIG_HAS_IOPORT=y
949CONFIG_HAS_DMA=y
984 950
985# 951#
986# Instrumentation Support 952# Instrumentation Support
@@ -998,7 +964,6 @@ CONFIG_ENABLE_MUST_CHECK=y
998# CONFIG_HEADERS_CHECK is not set 964# CONFIG_HEADERS_CHECK is not set
999CONFIG_DEBUG_KERNEL=y 965CONFIG_DEBUG_KERNEL=y
1000# CONFIG_DEBUG_SHIRQ is not set 966# CONFIG_DEBUG_SHIRQ is not set
1001CONFIG_LOG_BUF_SHIFT=14
1002CONFIG_DETECT_SOFTLOCKUP=y 967CONFIG_DETECT_SOFTLOCKUP=y
1003# CONFIG_SCHEDSTATS is not set 968# CONFIG_SCHEDSTATS is not set
1004# CONFIG_TIMER_STATS is not set 969# CONFIG_TIMER_STATS is not set
@@ -1020,6 +985,7 @@ CONFIG_FORCED_INLINING=y
1020# CONFIG_FAULT_INJECTION is not set 985# CONFIG_FAULT_INJECTION is not set
1021# CONFIG_DEBUG_STACKOVERFLOW is not set 986# CONFIG_DEBUG_STACKOVERFLOW is not set
1022# CONFIG_DEBUG_STACK_USAGE is not set 987# CONFIG_DEBUG_STACK_USAGE is not set
988# CONFIG_DEBUG_PAGEALLOC is not set
1023# CONFIG_DEBUGGER is not set 989# CONFIG_DEBUGGER is not set
1024# CONFIG_BDI_SWITCH is not set 990# CONFIG_BDI_SWITCH is not set
1025# CONFIG_BOOTX_TEXT is not set 991# CONFIG_BOOTX_TEXT is not set
@@ -1054,6 +1020,7 @@ CONFIG_CRYPTO_MD5=y
1054CONFIG_CRYPTO_CBC=y 1020CONFIG_CRYPTO_CBC=y
1055CONFIG_CRYPTO_PCBC=m 1021CONFIG_CRYPTO_PCBC=m
1056# CONFIG_CRYPTO_LRW is not set 1022# CONFIG_CRYPTO_LRW is not set
1023# CONFIG_CRYPTO_CRYPTD is not set
1057CONFIG_CRYPTO_DES=y 1024CONFIG_CRYPTO_DES=y
1058# CONFIG_CRYPTO_FCRYPT is not set 1025# CONFIG_CRYPTO_FCRYPT is not set
1059# CONFIG_CRYPTO_BLOWFISH is not set 1026# CONFIG_CRYPTO_BLOWFISH is not set
diff --git a/arch/powerpc/configs/mpc8560_ads_defconfig b/arch/powerpc/configs/mpc8560_ads_defconfig
index ecaa267a853c..a30bc6f6211c 100644
--- a/arch/powerpc/configs/mpc8560_ads_defconfig
+++ b/arch/powerpc/configs/mpc8560_ads_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.20-rc5 3# Linux kernel version: 2.6.22-rc7
4# Mon Jan 22 22:25:53 2007 4# Sun Jul 1 23:56:58 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -20,7 +20,7 @@ CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 21CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 22CONFIG_PPC_OF=y
23# CONFIG_PPC_UDBG_16550 is not set 23CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 24# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 26CONFIG_GENERIC_BUG=y
@@ -34,9 +34,9 @@ CONFIG_DEFAULT_UIMAGE=y
34# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
35CONFIG_PPC_85xx=y 35CONFIG_PPC_85xx=y
36# CONFIG_PPC_86xx is not set 36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
37# CONFIG_40x is not set 38# CONFIG_40x is not set
38# CONFIG_44x is not set 39# CONFIG_44x is not set
39# CONFIG_8xx is not set
40# CONFIG_E200 is not set 40# CONFIG_E200 is not set
41CONFIG_85xx=y 41CONFIG_85xx=y
42CONFIG_E500=y 42CONFIG_E500=y
@@ -46,6 +46,7 @@ CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y 46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set 47# CONFIG_PHYS_64BIT is not set
48CONFIG_SPE=y 48CONFIG_SPE=y
49# CONFIG_PPC_MM_SLICES is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
51# 52#
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -85,14 +89,19 @@ CONFIG_BUG=y
85CONFIG_ELF_CORE=y 89CONFIG_ELF_CORE=y
86CONFIG_BASE_FULL=y 90CONFIG_BASE_FULL=y
87CONFIG_FUTEX=y 91CONFIG_FUTEX=y
92CONFIG_ANON_INODES=y
88CONFIG_EPOLL=y 93CONFIG_EPOLL=y
94CONFIG_SIGNALFD=y
95CONFIG_TIMERFD=y
96CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 97CONFIG_SHMEM=y
90CONFIG_SLAB=y
91CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLAB=y
100# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set
92CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
93# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
94CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
95# CONFIG_SLOB is not set
96 105
97# 106#
98# Loadable module support 107# Loadable module support
@@ -119,18 +128,33 @@ 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_CPM2=y
123# CONFIG_WANT_EARLY_SERIAL is not set
124 131
125# 132#
126# Platform support 133# Platform support
127# 134#
135# CONFIG_PPC_MPC52xx is not set
136# CONFIG_PPC_MPC5200 is not set
137# CONFIG_PPC_CELL is not set
138# CONFIG_PPC_CELL_NATIVE is not set
139# CONFIG_PQ2ADS is not set
128# CONFIG_MPC8540_ADS is not set 140# CONFIG_MPC8540_ADS is not set
129CONFIG_MPC8560_ADS=y 141CONFIG_MPC8560_ADS=y
130# CONFIG_MPC85xx_CDS is not set 142# CONFIG_MPC85xx_CDS is not set
143# CONFIG_MPC85xx_MDS is not set
144# CONFIG_MPC8544_DS is not set
131CONFIG_MPC8560=y 145CONFIG_MPC8560=y
132CONFIG_PPC_INDIRECT_PCI_BE=y 146CONFIG_MPC85xx=y
133CONFIG_MPIC=y 147CONFIG_MPIC=y
148# CONFIG_MPIC_WEIRD is not set
149# CONFIG_PPC_I8259 is not set
150# CONFIG_PPC_RTAS is not set
151# CONFIG_MMIO_NVRAM is not set
152# CONFIG_PPC_MPC106 is not set
153# CONFIG_PPC_970_NAP is not set
154# CONFIG_PPC_INDIRECT_IO is not set
155# CONFIG_GENERIC_IOMAP is not set
156# CONFIG_CPU_FREQ is not set
157CONFIG_CPM2=y
134 158
135# 159#
136# Kernel options 160# Kernel options
@@ -148,7 +172,6 @@ CONFIG_BINFMT_ELF=y
148CONFIG_BINFMT_MISC=y 172CONFIG_BINFMT_MISC=y
149# CONFIG_MATH_EMULATION is not set 173# CONFIG_MATH_EMULATION is not set
150CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 174CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
151# CONFIG_PC_KEYBOARD is not set
152CONFIG_ARCH_FLATMEM_ENABLE=y 175CONFIG_ARCH_FLATMEM_ENABLE=y
153CONFIG_ARCH_POPULATES_NODE_MAP=y 176CONFIG_ARCH_POPULATES_NODE_MAP=y
154CONFIG_SELECT_MEMORY_MODEL=y 177CONFIG_SELECT_MEMORY_MODEL=y
@@ -160,32 +183,33 @@ CONFIG_FLAT_NODE_MEM_MAP=y
160# CONFIG_SPARSEMEM_STATIC is not set 183# CONFIG_SPARSEMEM_STATIC is not set
161CONFIG_SPLIT_PTLOCK_CPUS=4 184CONFIG_SPLIT_PTLOCK_CPUS=4
162# CONFIG_RESOURCES_64BIT is not set 185# CONFIG_RESOURCES_64BIT is not set
186CONFIG_ZONE_DMA_FLAG=1
163# CONFIG_PROC_DEVICETREE is not set 187# CONFIG_PROC_DEVICETREE is not set
164# CONFIG_CMDLINE_BOOL is not set 188# CONFIG_CMDLINE_BOOL is not set
165# CONFIG_PM is not set 189# CONFIG_PM is not set
166# CONFIG_SECCOMP is not set 190# CONFIG_SECCOMP is not set
191CONFIG_WANT_DEVICE_TREE=y
192CONFIG_DEVICE_TREE=""
167CONFIG_ISA_DMA_API=y 193CONFIG_ISA_DMA_API=y
168 194
169# 195#
170# Bus options 196# Bus options
171# 197#
172# CONFIG_MPIC_WEIRD is not set 198CONFIG_ZONE_DMA=y
173# CONFIG_PPC_I8259 is not set
174CONFIG_PPC_INDIRECT_PCI=y 199CONFIG_PPC_INDIRECT_PCI=y
200CONFIG_PPC_INDIRECT_PCI_BE=y
175CONFIG_FSL_SOC=y 201CONFIG_FSL_SOC=y
176CONFIG_PCI=y 202CONFIG_PCI=y
177CONFIG_PCI_DOMAINS=y 203CONFIG_PCI_DOMAINS=y
178# CONFIG_PCIEPORTBUS is not set 204# CONFIG_PCIEPORTBUS is not set
205CONFIG_ARCH_SUPPORTS_MSI=y
206# CONFIG_PCI_MSI is not set
179CONFIG_PCI_DEBUG=y 207CONFIG_PCI_DEBUG=y
180 208
181# 209#
182# PCCARD (PCMCIA/CardBus) support 210# PCCARD (PCMCIA/CardBus) support
183# 211#
184# CONFIG_PCCARD is not set 212# CONFIG_PCCARD is not set
185
186#
187# PCI Hotplug Support
188#
189# CONFIG_HOTPLUG_PCI is not set 213# CONFIG_HOTPLUG_PCI is not set
190 214
191# 215#
@@ -210,13 +234,13 @@ CONFIG_NET=y
210# 234#
211# Networking options 235# Networking options
212# 236#
213# CONFIG_NETDEBUG is not set
214CONFIG_PACKET=y 237CONFIG_PACKET=y
215# CONFIG_PACKET_MMAP is not set 238# CONFIG_PACKET_MMAP is not set
216CONFIG_UNIX=y 239CONFIG_UNIX=y
217CONFIG_XFRM=y 240CONFIG_XFRM=y
218# CONFIG_XFRM_USER is not set 241# CONFIG_XFRM_USER is not set
219# CONFIG_XFRM_SUB_POLICY is not set 242# CONFIG_XFRM_SUB_POLICY is not set
243# CONFIG_XFRM_MIGRATE is not set
220# CONFIG_NET_KEY is not set 244# CONFIG_NET_KEY is not set
221CONFIG_INET=y 245CONFIG_INET=y
222CONFIG_IP_MULTICAST=y 246CONFIG_IP_MULTICAST=y
@@ -250,20 +274,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
250# CONFIG_INET6_TUNNEL is not set 274# CONFIG_INET6_TUNNEL is not set
251# CONFIG_NETWORK_SECMARK is not set 275# CONFIG_NETWORK_SECMARK is not set
252# CONFIG_NETFILTER is not set 276# CONFIG_NETFILTER is not set
253
254#
255# DCCP Configuration (EXPERIMENTAL)
256#
257# CONFIG_IP_DCCP is not set 277# CONFIG_IP_DCCP is not set
258
259#
260# SCTP Configuration (EXPERIMENTAL)
261#
262# CONFIG_IP_SCTP is not set 278# CONFIG_IP_SCTP is not set
263
264#
265# TIPC Configuration (EXPERIMENTAL)
266#
267# CONFIG_TIPC is not set 279# CONFIG_TIPC is not set
268# CONFIG_ATM is not set 280# CONFIG_ATM is not set
269# CONFIG_BRIDGE is not set 281# CONFIG_BRIDGE is not set
@@ -289,7 +301,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
289# CONFIG_HAMRADIO is not set 301# CONFIG_HAMRADIO is not set
290# CONFIG_IRDA is not set 302# CONFIG_IRDA is not set
291# CONFIG_BT is not set 303# CONFIG_BT is not set
304# CONFIG_AF_RXRPC is not set
305
306#
307# Wireless
308#
309# CONFIG_CFG80211 is not set
310# CONFIG_WIRELESS_EXT is not set
311# CONFIG_MAC80211 is not set
292# CONFIG_IEEE80211 is not set 312# CONFIG_IEEE80211 is not set
313# CONFIG_RFKILL is not set
293 314
294# 315#
295# Device Drivers 316# Device Drivers
@@ -302,16 +323,13 @@ CONFIG_STANDALONE=y
302CONFIG_PREVENT_FIRMWARE_BUILD=y 323CONFIG_PREVENT_FIRMWARE_BUILD=y
303# CONFIG_FW_LOADER is not set 324# CONFIG_FW_LOADER is not set
304# CONFIG_DEBUG_DRIVER is not set 325# CONFIG_DEBUG_DRIVER is not set
326# CONFIG_DEBUG_DEVRES is not set
305# CONFIG_SYS_HYPERVISOR is not set 327# CONFIG_SYS_HYPERVISOR is not set
306 328
307# 329#
308# Connector - unified userspace <-> kernelspace linker 330# Connector - unified userspace <-> kernelspace linker
309# 331#
310# CONFIG_CONNECTOR is not set 332# CONFIG_CONNECTOR is not set
311
312#
313# Memory Technology Devices (MTD)
314#
315# CONFIG_MTD is not set 333# CONFIG_MTD is not set
316 334
317# 335#
@@ -322,6 +340,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
322# 340#
323# Plug and Play support 341# Plug and Play support
324# 342#
343# CONFIG_PNPACPI is not set
325 344
326# 345#
327# Block devices 346# Block devices
@@ -340,19 +359,16 @@ CONFIG_BLK_DEV_RAM=y
340CONFIG_BLK_DEV_RAM_COUNT=16 359CONFIG_BLK_DEV_RAM_COUNT=16
341CONFIG_BLK_DEV_RAM_SIZE=32768 360CONFIG_BLK_DEV_RAM_SIZE=32768
342CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 361CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
343CONFIG_BLK_DEV_INITRD=y
344# CONFIG_CDROM_PKTCDVD is not set 362# CONFIG_CDROM_PKTCDVD is not set
345# CONFIG_ATA_OVER_ETH is not set 363# CONFIG_ATA_OVER_ETH is not set
346 364
347# 365#
348# Misc devices 366# Misc devices
349# 367#
368# CONFIG_PHANTOM is not set
350# CONFIG_SGI_IOC4 is not set 369# CONFIG_SGI_IOC4 is not set
351# CONFIG_TIFM_CORE is not set 370# CONFIG_TIFM_CORE is not set
352 371# CONFIG_BLINK is not set
353#
354# ATA/ATAPI/MFM/RLL support
355#
356# CONFIG_IDE is not set 372# CONFIG_IDE is not set
357 373
358# 374#
@@ -361,10 +377,6 @@ CONFIG_BLK_DEV_INITRD=y
361# CONFIG_RAID_ATTRS is not set 377# CONFIG_RAID_ATTRS is not set
362# CONFIG_SCSI is not set 378# CONFIG_SCSI is not set
363# CONFIG_SCSI_NETLINK is not set 379# CONFIG_SCSI_NETLINK is not set
364
365#
366# Serial ATA (prod) and Parallel ATA (experimental) drivers
367#
368# CONFIG_ATA is not set 380# CONFIG_ATA is not set
369 381
370# 382#
@@ -380,18 +392,14 @@ CONFIG_BLK_DEV_INITRD=y
380# 392#
381# IEEE 1394 (FireWire) support 393# IEEE 1394 (FireWire) support
382# 394#
395# CONFIG_FIREWIRE is not set
383# CONFIG_IEEE1394 is not set 396# CONFIG_IEEE1394 is not set
384 397
385# 398#
386# I2O device support 399# I2O device support
387# 400#
388# CONFIG_I2O is not set 401# CONFIG_I2O is not set
389 402# CONFIG_MACINTOSH_DRIVERS is not set
390#
391# Macintosh device drivers
392#
393# CONFIG_MAC_EMUMOUSEBTN is not set
394# CONFIG_WINDFARM is not set
395 403
396# 404#
397# Network device support 405# Network device support
@@ -401,15 +409,7 @@ CONFIG_NETDEVICES=y
401# CONFIG_BONDING is not set 409# CONFIG_BONDING is not set
402# CONFIG_EQUALIZER is not set 410# CONFIG_EQUALIZER is not set
403# CONFIG_TUN is not set 411# CONFIG_TUN is not set
404
405#
406# ARCnet devices
407#
408# CONFIG_ARCNET is not set 412# CONFIG_ARCNET is not set
409
410#
411# PHY device support
412#
413CONFIG_PHYLIB=y 413CONFIG_PHYLIB=y
414 414
415# 415#
@@ -444,10 +444,7 @@ CONFIG_MII=y
444CONFIG_FS_ENET=y 444CONFIG_FS_ENET=y
445# CONFIG_FS_ENET_HAS_SCC is not set 445# CONFIG_FS_ENET_HAS_SCC is not set
446CONFIG_FS_ENET_HAS_FCC=y 446CONFIG_FS_ENET_HAS_FCC=y
447 447CONFIG_NETDEV_1000=y
448#
449# Ethernet (1000 Mbit)
450#
451# CONFIG_ACENIC is not set 448# CONFIG_ACENIC is not set
452# CONFIG_DL2K is not set 449# CONFIG_DL2K is not set
453CONFIG_E1000=y 450CONFIG_E1000=y
@@ -461,34 +458,28 @@ CONFIG_E1000_NAPI=y
461# CONFIG_SKGE is not set 458# CONFIG_SKGE is not set
462# CONFIG_SKY2 is not set 459# CONFIG_SKY2 is not set
463# CONFIG_SK98LIN is not set 460# CONFIG_SK98LIN is not set
461# CONFIG_VIA_VELOCITY is not set
464# CONFIG_TIGON3 is not set 462# CONFIG_TIGON3 is not set
465# CONFIG_BNX2 is not set 463# CONFIG_BNX2 is not set
466CONFIG_GIANFAR=y 464CONFIG_GIANFAR=y
467CONFIG_GFAR_NAPI=y 465CONFIG_GFAR_NAPI=y
468# CONFIG_QLA3XXX is not set 466# CONFIG_QLA3XXX is not set
469 467# CONFIG_ATL1 is not set
470# 468CONFIG_NETDEV_10000=y
471# Ethernet (10000 Mbit)
472#
473# CONFIG_CHELSIO_T1 is not set 469# CONFIG_CHELSIO_T1 is not set
470# CONFIG_CHELSIO_T3 is not set
474# CONFIG_IXGB is not set 471# CONFIG_IXGB is not set
475# CONFIG_S2IO is not set 472# CONFIG_S2IO is not set
476# CONFIG_MYRI10GE is not set 473# CONFIG_MYRI10GE is not set
477# CONFIG_NETXEN_NIC is not set 474# CONFIG_NETXEN_NIC is not set
478 475# CONFIG_MLX4_CORE is not set
479#
480# Token Ring devices
481#
482# CONFIG_TR is not set 476# CONFIG_TR is not set
483 477
484# 478#
485# Wireless LAN (non-hamradio) 479# Wireless LAN
486#
487# CONFIG_NET_RADIO is not set
488
489#
490# Wan interfaces
491# 480#
481# CONFIG_WLAN_PRE80211 is not set
482# CONFIG_WLAN_80211 is not set
492# CONFIG_WAN is not set 483# CONFIG_WAN is not set
493# CONFIG_FDDI is not set 484# CONFIG_FDDI is not set
494# CONFIG_HIPPI is not set 485# CONFIG_HIPPI is not set
@@ -514,6 +505,7 @@ CONFIG_GFAR_NAPI=y
514# 505#
515CONFIG_INPUT=y 506CONFIG_INPUT=y
516# CONFIG_INPUT_FF_MEMLESS is not set 507# CONFIG_INPUT_FF_MEMLESS is not set
508# CONFIG_INPUT_POLLDEV is not set
517 509
518# 510#
519# Userland interfaces 511# Userland interfaces
@@ -530,6 +522,7 @@ CONFIG_INPUT=y
530# CONFIG_INPUT_KEYBOARD is not set 522# CONFIG_INPUT_KEYBOARD is not set
531# CONFIG_INPUT_MOUSE is not set 523# CONFIG_INPUT_MOUSE is not set
532# CONFIG_INPUT_JOYSTICK is not set 524# CONFIG_INPUT_JOYSTICK is not set
525# CONFIG_INPUT_TABLET is not set
533# CONFIG_INPUT_TOUCHSCREEN is not set 526# CONFIG_INPUT_TOUCHSCREEN is not set
534# CONFIG_INPUT_MISC is not set 527# CONFIG_INPUT_MISC is not set
535 528
@@ -573,16 +566,11 @@ CONFIG_LEGACY_PTY_COUNT=256
573# IPMI 566# IPMI
574# 567#
575# CONFIG_IPMI_HANDLER is not set 568# CONFIG_IPMI_HANDLER is not set
576
577#
578# Watchdog Cards
579#
580# CONFIG_WATCHDOG is not set 569# CONFIG_WATCHDOG is not set
581CONFIG_HW_RANDOM=y 570CONFIG_HW_RANDOM=y
582# CONFIG_NVRAM is not set 571# CONFIG_NVRAM is not set
583CONFIG_GEN_RTC=y 572CONFIG_GEN_RTC=y
584# CONFIG_GEN_RTC_X is not set 573# CONFIG_GEN_RTC_X is not set
585# CONFIG_DTLK is not set
586# CONFIG_R3964 is not set 574# CONFIG_R3964 is not set
587# CONFIG_APPLICOM is not set 575# CONFIG_APPLICOM is not set
588# CONFIG_AGP is not set 576# CONFIG_AGP is not set
@@ -593,10 +581,7 @@ CONFIG_GEN_RTC=y
593# TPM devices 581# TPM devices
594# 582#
595# CONFIG_TCG_TPM is not set 583# CONFIG_TCG_TPM is not set
596 584CONFIG_DEVPORT=y
597#
598# I2C support
599#
600# CONFIG_I2C is not set 585# CONFIG_I2C is not set
601 586
602# 587#
@@ -609,35 +594,41 @@ CONFIG_GEN_RTC=y
609# Dallas's 1-wire bus 594# Dallas's 1-wire bus
610# 595#
611# CONFIG_W1 is not set 596# CONFIG_W1 is not set
612
613#
614# Hardware Monitoring support
615#
616CONFIG_HWMON=y 597CONFIG_HWMON=y
617# CONFIG_HWMON_VID is not set 598# CONFIG_HWMON_VID is not set
618# CONFIG_SENSORS_ABITUGURU is not set 599# CONFIG_SENSORS_ABITUGURU is not set
619# CONFIG_SENSORS_F71805F is not set 600# CONFIG_SENSORS_F71805F is not set
620# CONFIG_SENSORS_PC87427 is not set 601# CONFIG_SENSORS_PC87427 is not set
602# CONFIG_SENSORS_SMSC47M1 is not set
603# CONFIG_SENSORS_SMSC47B397 is not set
621# CONFIG_SENSORS_VT1211 is not set 604# CONFIG_SENSORS_VT1211 is not set
605# CONFIG_SENSORS_W83627HF is not set
622# CONFIG_HWMON_DEBUG_CHIP is not set 606# CONFIG_HWMON_DEBUG_CHIP is not set
623 607
624# 608#
609# Multifunction device drivers
610#
611# CONFIG_MFD_SM501 is not set
612
613#
625# Multimedia devices 614# Multimedia devices
626# 615#
627# CONFIG_VIDEO_DEV is not set 616# CONFIG_VIDEO_DEV is not set
617# CONFIG_DVB_CORE is not set
618CONFIG_DAB=y
628 619
629# 620#
630# Digital Video Broadcasting Devices 621# Graphics support
631# 622#
632# CONFIG_DVB is not set 623# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
633 624
634# 625#
635# Graphics support 626# Display device support
636# 627#
637CONFIG_FIRMWARE_EDID=y 628# CONFIG_DISPLAY_SUPPORT is not set
629# CONFIG_VGASTATE is not set
638# CONFIG_FB is not set 630# CONFIG_FB is not set
639# CONFIG_FB_IBM_GXT4500 is not set 631# CONFIG_FB_IBM_GXT4500 is not set
640# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
641 632
642# 633#
643# Sound 634# Sound
@@ -648,6 +639,7 @@ CONFIG_FIRMWARE_EDID=y
648# HID Devices 639# HID Devices
649# 640#
650CONFIG_HID=y 641CONFIG_HID=y
642# CONFIG_HID_DEBUG is not set
651 643
652# 644#
653# USB support 645# USB support
@@ -665,10 +657,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
665# USB Gadget Support 657# USB Gadget Support
666# 658#
667# CONFIG_USB_GADGET is not set 659# CONFIG_USB_GADGET is not set
668
669#
670# MMC/SD Card support
671#
672# CONFIG_MMC is not set 660# CONFIG_MMC is not set
673 661
674# 662#
@@ -712,10 +700,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
712# 700#
713 701
714# 702#
715# Virtualization
716#
717
718#
719# File systems 703# File systems
720# 704#
721CONFIG_EXT2_FS=y 705CONFIG_EXT2_FS=y
@@ -800,6 +784,7 @@ CONFIG_ROOT_NFS=y
800CONFIG_LOCKD=y 784CONFIG_LOCKD=y
801CONFIG_NFS_COMMON=y 785CONFIG_NFS_COMMON=y
802CONFIG_SUNRPC=y 786CONFIG_SUNRPC=y
787# CONFIG_SUNRPC_BIND34 is not set
803# CONFIG_RPCSEC_GSS_KRB5 is not set 788# CONFIG_RPCSEC_GSS_KRB5 is not set
804# CONFIG_RPCSEC_GSS_SPKM3 is not set 789# CONFIG_RPCSEC_GSS_SPKM3 is not set
805# CONFIG_SMB_FS is not set 790# CONFIG_SMB_FS is not set
@@ -825,6 +810,7 @@ CONFIG_PARTITION_ADVANCED=y
825# CONFIG_SUN_PARTITION is not set 810# CONFIG_SUN_PARTITION is not set
826# CONFIG_KARMA_PARTITION is not set 811# CONFIG_KARMA_PARTITION is not set
827# CONFIG_EFI_PARTITION is not set 812# CONFIG_EFI_PARTITION is not set
813# CONFIG_SYSV68_PARTITION is not set
828 814
829# 815#
830# Native Language Support 816# Native Language Support
@@ -835,6 +821,7 @@ CONFIG_PARTITION_ADVANCED=y
835# Distributed Lock Manager 821# Distributed Lock Manager
836# 822#
837# CONFIG_DLM is not set 823# CONFIG_DLM is not set
824# CONFIG_UCC_SLOW is not set
838 825
839# 826#
840# Library routines 827# Library routines
@@ -842,10 +829,13 @@ CONFIG_PARTITION_ADVANCED=y
842CONFIG_BITREVERSE=y 829CONFIG_BITREVERSE=y
843# CONFIG_CRC_CCITT is not set 830# CONFIG_CRC_CCITT is not set
844# CONFIG_CRC16 is not set 831# CONFIG_CRC16 is not set
832# CONFIG_CRC_ITU_T is not set
845CONFIG_CRC32=y 833CONFIG_CRC32=y
846# CONFIG_LIBCRC32C is not set 834# CONFIG_LIBCRC32C is not set
847CONFIG_PLIST=y 835CONFIG_PLIST=y
848CONFIG_IOMAP_COPY=y 836CONFIG_HAS_IOMEM=y
837CONFIG_HAS_IOPORT=y
838CONFIG_HAS_DMA=y
849 839
850# 840#
851# Instrumentation Support 841# Instrumentation Support
@@ -862,15 +852,15 @@ CONFIG_ENABLE_MUST_CHECK=y
862# CONFIG_DEBUG_FS is not set 852# CONFIG_DEBUG_FS is not set
863# CONFIG_HEADERS_CHECK is not set 853# CONFIG_HEADERS_CHECK is not set
864CONFIG_DEBUG_KERNEL=y 854CONFIG_DEBUG_KERNEL=y
865CONFIG_LOG_BUF_SHIFT=14 855# CONFIG_DEBUG_SHIRQ is not set
866CONFIG_DETECT_SOFTLOCKUP=y 856CONFIG_DETECT_SOFTLOCKUP=y
867# CONFIG_SCHEDSTATS is not set 857# CONFIG_SCHEDSTATS is not set
858# CONFIG_TIMER_STATS is not set
868# CONFIG_DEBUG_SLAB is not set 859# CONFIG_DEBUG_SLAB is not set
869# CONFIG_DEBUG_RT_MUTEXES is not set 860# CONFIG_DEBUG_RT_MUTEXES is not set
870# CONFIG_RT_MUTEX_TESTER is not set 861# CONFIG_RT_MUTEX_TESTER is not set
871# CONFIG_DEBUG_SPINLOCK is not set 862# CONFIG_DEBUG_SPINLOCK is not set
872CONFIG_DEBUG_MUTEXES=y 863CONFIG_DEBUG_MUTEXES=y
873# CONFIG_DEBUG_RWSEMS is not set
874# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 864# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
875# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 865# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
876# CONFIG_DEBUG_KOBJECT is not set 866# CONFIG_DEBUG_KOBJECT is not set
@@ -879,7 +869,10 @@ CONFIG_DEBUG_MUTEXES=y
879# CONFIG_DEBUG_VM is not set 869# CONFIG_DEBUG_VM is not set
880# CONFIG_DEBUG_LIST is not set 870# CONFIG_DEBUG_LIST is not set
881CONFIG_FORCED_INLINING=y 871CONFIG_FORCED_INLINING=y
882# CONFIG_RCU_TORTURE_TEST is not set 872# CONFIG_FAULT_INJECTION is not set
873# CONFIG_DEBUG_STACKOVERFLOW is not set
874# CONFIG_DEBUG_STACK_USAGE is not set
875# CONFIG_DEBUG_PAGEALLOC is not set
883# CONFIG_DEBUGGER is not set 876# CONFIG_DEBUGGER is not set
884# CONFIG_KGDB_CONSOLE is not set 877# CONFIG_KGDB_CONSOLE is not set
885# CONFIG_BDI_SWITCH is not set 878# CONFIG_BDI_SWITCH is not set
diff --git a/arch/powerpc/configs/mpc8568mds_defconfig b/arch/powerpc/configs/mpc8568mds_defconfig
index 7b3800674cbf..6451d4dd28a0 100644
--- a/arch/powerpc/configs/mpc8568mds_defconfig
+++ b/arch/powerpc/configs/mpc8568mds_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.20 3# Linux kernel version: 2.6.22-rc7
4# Sat Feb 17 16:26:53 2007 4# Sun Jul 1 23:56:59 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -46,6 +46,7 @@ CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y 46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set 47# CONFIG_PHYS_64BIT is not set
48CONFIG_SPE=y 48CONFIG_SPE=y
49# CONFIG_PPC_MM_SLICES is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
51# 52#
@@ -70,8 +71,10 @@ CONFIG_SYSVIPC_SYSCTL=y
70# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
75CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
76# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
77CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -84,14 +87,19 @@ CONFIG_BUG=y
84CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
85CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
86CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
87# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
88CONFIG_SHMEM=y 95CONFIG_SHMEM=y
89CONFIG_SLAB=y
90CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
91CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
92# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
93CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
94# CONFIG_SLOB is not set
95 103
96# 104#
97# Loadable module support 105# Loadable module support
@@ -123,18 +131,32 @@ CONFIG_DEFAULT_AS=y
123# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
124# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
125CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
126# CONFIG_WANT_EARLY_SERIAL is not set
127 134
128# 135#
129# Platform support 136# Platform support
130# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
131# CONFIG_MPC8540_ADS is not set 143# CONFIG_MPC8540_ADS is not set
132# CONFIG_MPC8560_ADS is not set 144# CONFIG_MPC8560_ADS is not set
133# CONFIG_MPC85xx_CDS is not set 145# CONFIG_MPC85xx_CDS is not set
134CONFIG_MPC85xx_MDS=y 146CONFIG_MPC85xx_MDS=y
147# CONFIG_MPC8544_DS is not set
135CONFIG_MPC85xx=y 148CONFIG_MPC85xx=y
136CONFIG_PPC_INDIRECT_PCI_BE=y
137CONFIG_MPIC=y 149CONFIG_MPIC=y
150# CONFIG_MPIC_WEIRD is not set
151# CONFIG_PPC_I8259 is not set
152# CONFIG_PPC_RTAS is not set
153# CONFIG_MMIO_NVRAM is not set
154# CONFIG_PPC_MPC106 is not set
155# CONFIG_PPC_970_NAP is not set
156# CONFIG_PPC_INDIRECT_IO is not set
157# CONFIG_GENERIC_IOMAP is not set
158# CONFIG_CPU_FREQ is not set
159# CONFIG_CPM2 is not set
138 160
139# 161#
140# Kernel options 162# Kernel options
@@ -168,18 +190,20 @@ CONFIG_PROC_DEVICETREE=y
168# CONFIG_CMDLINE_BOOL is not set 190# CONFIG_CMDLINE_BOOL is not set
169# CONFIG_PM is not set 191# CONFIG_PM is not set
170CONFIG_SECCOMP=y 192CONFIG_SECCOMP=y
193CONFIG_WANT_DEVICE_TREE=y
194CONFIG_DEVICE_TREE=""
171CONFIG_ISA_DMA_API=y 195CONFIG_ISA_DMA_API=y
172 196
173# 197#
174# Bus options 198# Bus options
175# 199#
176CONFIG_ZONE_DMA=y 200CONFIG_ZONE_DMA=y
177# CONFIG_MPIC_WEIRD is not set
178# CONFIG_PPC_I8259 is not set
179CONFIG_PPC_INDIRECT_PCI=y 201CONFIG_PPC_INDIRECT_PCI=y
202CONFIG_PPC_INDIRECT_PCI_BE=y
180CONFIG_FSL_SOC=y 203CONFIG_FSL_SOC=y
181# CONFIG_PCI is not set 204# CONFIG_PCI is not set
182# CONFIG_PCI_DOMAINS is not set 205# CONFIG_PCI_DOMAINS is not set
206# CONFIG_ARCH_SUPPORTS_MSI is not set
183 207
184# 208#
185# PCCARD (PCMCIA/CardBus) support 209# PCCARD (PCMCIA/CardBus) support
@@ -187,10 +211,6 @@ CONFIG_FSL_SOC=y
187# CONFIG_PCCARD is not set 211# CONFIG_PCCARD is not set
188 212
189# 213#
190# PCI Hotplug Support
191#
192
193#
194# Advanced setup 214# Advanced setup
195# 215#
196# CONFIG_ADVANCED_OPTIONS is not set 216# CONFIG_ADVANCED_OPTIONS is not set
@@ -212,7 +232,6 @@ CONFIG_NET=y
212# 232#
213# Networking options 233# Networking options
214# 234#
215# CONFIG_NETDEBUG is not set
216CONFIG_PACKET=y 235CONFIG_PACKET=y
217# CONFIG_PACKET_MMAP is not set 236# CONFIG_PACKET_MMAP is not set
218CONFIG_UNIX=y 237CONFIG_UNIX=y
@@ -253,20 +272,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
253# CONFIG_INET6_TUNNEL is not set 272# CONFIG_INET6_TUNNEL is not set
254# CONFIG_NETWORK_SECMARK is not set 273# CONFIG_NETWORK_SECMARK is not set
255# CONFIG_NETFILTER is not set 274# CONFIG_NETFILTER is not set
256
257#
258# DCCP Configuration (EXPERIMENTAL)
259#
260# CONFIG_IP_DCCP is not set 275# CONFIG_IP_DCCP is not set
261
262#
263# SCTP Configuration (EXPERIMENTAL)
264#
265# CONFIG_IP_SCTP is not set 276# CONFIG_IP_SCTP is not set
266
267#
268# TIPC Configuration (EXPERIMENTAL)
269#
270# CONFIG_TIPC is not set 277# CONFIG_TIPC is not set
271# CONFIG_ATM is not set 278# CONFIG_ATM is not set
272# CONFIG_BRIDGE is not set 279# CONFIG_BRIDGE is not set
@@ -292,7 +299,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
292# CONFIG_HAMRADIO is not set 299# CONFIG_HAMRADIO is not set
293# CONFIG_IRDA is not set 300# CONFIG_IRDA is not set
294# CONFIG_BT is not set 301# CONFIG_BT is not set
302# CONFIG_AF_RXRPC is not set
303
304#
305# Wireless
306#
307# CONFIG_CFG80211 is not set
308# CONFIG_WIRELESS_EXT is not set
309# CONFIG_MAC80211 is not set
295# CONFIG_IEEE80211 is not set 310# CONFIG_IEEE80211 is not set
311# CONFIG_RFKILL is not set
296 312
297# 313#
298# Device Drivers 314# Device Drivers
@@ -312,10 +328,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
312# Connector - unified userspace <-> kernelspace linker 328# Connector - unified userspace <-> kernelspace linker
313# 329#
314# CONFIG_CONNECTOR is not set 330# CONFIG_CONNECTOR is not set
315
316#
317# Memory Technology Devices (MTD)
318#
319# CONFIG_MTD is not set 331# CONFIG_MTD is not set
320 332
321# 333#
@@ -326,6 +338,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
326# 338#
327# Plug and Play support 339# Plug and Play support
328# 340#
341# CONFIG_PNPACPI is not set
329 342
330# 343#
331# Block devices 344# Block devices
@@ -339,17 +352,13 @@ CONFIG_BLK_DEV_RAM=y
339CONFIG_BLK_DEV_RAM_COUNT=16 352CONFIG_BLK_DEV_RAM_COUNT=16
340CONFIG_BLK_DEV_RAM_SIZE=32768 353CONFIG_BLK_DEV_RAM_SIZE=32768
341CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 354CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
342CONFIG_BLK_DEV_INITRD=y
343# CONFIG_CDROM_PKTCDVD is not set 355# CONFIG_CDROM_PKTCDVD is not set
344# CONFIG_ATA_OVER_ETH is not set 356# CONFIG_ATA_OVER_ETH is not set
345 357
346# 358#
347# Misc devices 359# Misc devices
348# 360#
349 361# CONFIG_BLINK is not set
350#
351# ATA/ATAPI/MFM/RLL support
352#
353# CONFIG_IDE is not set 362# CONFIG_IDE is not set
354 363
355# 364#
@@ -378,6 +387,7 @@ CONFIG_SCSI_PROC_FS=y
378# CONFIG_SCSI_CONSTANTS is not set 387# CONFIG_SCSI_CONSTANTS is not set
379# CONFIG_SCSI_LOGGING is not set 388# CONFIG_SCSI_LOGGING is not set
380# CONFIG_SCSI_SCAN_ASYNC is not set 389# CONFIG_SCSI_SCAN_ASYNC is not set
390CONFIG_SCSI_WAIT_SCAN=m
381 391
382# 392#
383# SCSI Transports 393# SCSI Transports
@@ -393,35 +403,13 @@ CONFIG_SCSI_PROC_FS=y
393# 403#
394# CONFIG_ISCSI_TCP is not set 404# CONFIG_ISCSI_TCP is not set
395# CONFIG_SCSI_DEBUG is not set 405# CONFIG_SCSI_DEBUG is not set
396
397#
398# Serial ATA (prod) and Parallel ATA (experimental) drivers
399#
400# CONFIG_ATA is not set 406# CONFIG_ATA is not set
401 407
402# 408#
403# Multi-device support (RAID and LVM) 409# Multi-device support (RAID and LVM)
404# 410#
405# CONFIG_MD is not set 411# CONFIG_MD is not set
406 412# CONFIG_MACINTOSH_DRIVERS is not set
407#
408# Fusion MPT device support
409#
410# CONFIG_FUSION is not set
411
412#
413# IEEE 1394 (FireWire) support
414#
415
416#
417# I2O device support
418#
419
420#
421# Macintosh device drivers
422#
423# CONFIG_MAC_EMUMOUSEBTN is not set
424# CONFIG_WINDFARM is not set
425 413
426# 414#
427# Network device support 415# Network device support
@@ -431,10 +419,6 @@ CONFIG_NETDEVICES=y
431# CONFIG_BONDING is not set 419# CONFIG_BONDING is not set
432# CONFIG_EQUALIZER is not set 420# CONFIG_EQUALIZER is not set
433# CONFIG_TUN is not set 421# CONFIG_TUN is not set
434
435#
436# PHY device support
437#
438CONFIG_PHYLIB=y 422CONFIG_PHYLIB=y
439 423
440# 424#
@@ -455,29 +439,16 @@ CONFIG_MARVELL_PHY=y
455# 439#
456CONFIG_NET_ETHERNET=y 440CONFIG_NET_ETHERNET=y
457CONFIG_MII=y 441CONFIG_MII=y
458 442CONFIG_NETDEV_1000=y
459#
460# Ethernet (1000 Mbit)
461#
462CONFIG_GIANFAR=y 443CONFIG_GIANFAR=y
463CONFIG_GFAR_NAPI=y 444CONFIG_GFAR_NAPI=y
445CONFIG_NETDEV_10000=y
464 446
465# 447#
466# Ethernet (10000 Mbit) 448# Wireless LAN
467#
468
469#
470# Token Ring devices
471#
472
473#
474# Wireless LAN (non-hamradio)
475#
476# CONFIG_NET_RADIO is not set
477
478#
479# Wan interfaces
480# 449#
450# CONFIG_WLAN_PRE80211 is not set
451# CONFIG_WLAN_80211 is not set
481# CONFIG_WAN is not set 452# CONFIG_WAN is not set
482# CONFIG_PPP is not set 453# CONFIG_PPP is not set
483# CONFIG_SLIP is not set 454# CONFIG_SLIP is not set
@@ -501,6 +472,7 @@ CONFIG_GFAR_NAPI=y
501# 472#
502CONFIG_INPUT=y 473CONFIG_INPUT=y
503# CONFIG_INPUT_FF_MEMLESS is not set 474# CONFIG_INPUT_FF_MEMLESS is not set
475# CONFIG_INPUT_POLLDEV is not set
504 476
505# 477#
506# Userland interfaces 478# Userland interfaces
@@ -517,6 +489,7 @@ CONFIG_INPUT=y
517# CONFIG_INPUT_KEYBOARD is not set 489# CONFIG_INPUT_KEYBOARD is not set
518# CONFIG_INPUT_MOUSE is not set 490# CONFIG_INPUT_MOUSE is not set
519# CONFIG_INPUT_JOYSTICK is not set 491# CONFIG_INPUT_JOYSTICK is not set
492# CONFIG_INPUT_TABLET is not set
520# CONFIG_INPUT_TOUCHSCREEN is not set 493# CONFIG_INPUT_TOUCHSCREEN is not set
521# CONFIG_INPUT_MISC is not set 494# CONFIG_INPUT_MISC is not set
522 495
@@ -540,6 +513,7 @@ CONFIG_SERIAL_8250_CONSOLE=y
540CONFIG_SERIAL_8250_NR_UARTS=4 513CONFIG_SERIAL_8250_NR_UARTS=4
541CONFIG_SERIAL_8250_RUNTIME_UARTS=4 514CONFIG_SERIAL_8250_RUNTIME_UARTS=4
542# CONFIG_SERIAL_8250_EXTENDED is not set 515# CONFIG_SERIAL_8250_EXTENDED is not set
516CONFIG_SERIAL_8250_SHARE_IRQ=y
543 517
544# 518#
545# Non-8250 serial port support 519# Non-8250 serial port support
@@ -556,10 +530,6 @@ CONFIG_LEGACY_PTY_COUNT=256
556# IPMI 530# IPMI
557# 531#
558# CONFIG_IPMI_HANDLER is not set 532# CONFIG_IPMI_HANDLER is not set
559
560#
561# Watchdog Cards
562#
563CONFIG_WATCHDOG=y 533CONFIG_WATCHDOG=y
564# CONFIG_WATCHDOG_NOWAYOUT is not set 534# CONFIG_WATCHDOG_NOWAYOUT is not set
565 535
@@ -572,7 +542,6 @@ CONFIG_HW_RANDOM=y
572# CONFIG_NVRAM is not set 542# CONFIG_NVRAM is not set
573CONFIG_GEN_RTC=y 543CONFIG_GEN_RTC=y
574# CONFIG_GEN_RTC_X is not set 544# CONFIG_GEN_RTC_X is not set
575# CONFIG_DTLK is not set
576# CONFIG_R3964 is not set 545# CONFIG_R3964 is not set
577# CONFIG_RAW_DRIVER is not set 546# CONFIG_RAW_DRIVER is not set
578 547
@@ -580,11 +549,8 @@ CONFIG_GEN_RTC=y
580# TPM devices 549# TPM devices
581# 550#
582# CONFIG_TCG_TPM is not set 551# CONFIG_TCG_TPM is not set
583
584#
585# I2C support
586#
587CONFIG_I2C=y 552CONFIG_I2C=y
553CONFIG_I2C_BOARDINFO=y
588CONFIG_I2C_CHARDEV=y 554CONFIG_I2C_CHARDEV=y
589 555
590# 556#
@@ -600,8 +566,8 @@ CONFIG_I2C_CHARDEV=y
600CONFIG_I2C_MPC=y 566CONFIG_I2C_MPC=y
601# CONFIG_I2C_OCORES is not set 567# CONFIG_I2C_OCORES is not set
602# CONFIG_I2C_PARPORT_LIGHT is not set 568# CONFIG_I2C_PARPORT_LIGHT is not set
569# CONFIG_I2C_SIMTEC is not set
603# CONFIG_I2C_STUB is not set 570# CONFIG_I2C_STUB is not set
604# CONFIG_I2C_PCA_ISA is not set
605 571
606# 572#
607# Miscellaneous I2C Chip support 573# Miscellaneous I2C Chip support
@@ -629,16 +595,14 @@ CONFIG_I2C_MPC=y
629# Dallas's 1-wire bus 595# Dallas's 1-wire bus
630# 596#
631# CONFIG_W1 is not set 597# CONFIG_W1 is not set
632
633#
634# Hardware Monitoring support
635#
636CONFIG_HWMON=y 598CONFIG_HWMON=y
637# CONFIG_HWMON_VID is not set 599# CONFIG_HWMON_VID is not set
638# CONFIG_SENSORS_ABITUGURU is not set 600# CONFIG_SENSORS_ABITUGURU is not set
601# CONFIG_SENSORS_AD7418 is not set
639# CONFIG_SENSORS_ADM1021 is not set 602# CONFIG_SENSORS_ADM1021 is not set
640# CONFIG_SENSORS_ADM1025 is not set 603# CONFIG_SENSORS_ADM1025 is not set
641# CONFIG_SENSORS_ADM1026 is not set 604# CONFIG_SENSORS_ADM1026 is not set
605# CONFIG_SENSORS_ADM1029 is not set
642# CONFIG_SENSORS_ADM1031 is not set 606# CONFIG_SENSORS_ADM1031 is not set
643# CONFIG_SENSORS_ADM9240 is not set 607# CONFIG_SENSORS_ADM9240 is not set
644# CONFIG_SENSORS_ASB100 is not set 608# CONFIG_SENSORS_ASB100 is not set
@@ -661,6 +625,7 @@ CONFIG_HWMON=y
661# CONFIG_SENSORS_LM90 is not set 625# CONFIG_SENSORS_LM90 is not set
662# CONFIG_SENSORS_LM92 is not set 626# CONFIG_SENSORS_LM92 is not set
663# CONFIG_SENSORS_MAX1619 is not set 627# CONFIG_SENSORS_MAX1619 is not set
628# CONFIG_SENSORS_MAX6650 is not set
664# CONFIG_SENSORS_PC87360 is not set 629# CONFIG_SENSORS_PC87360 is not set
665# CONFIG_SENSORS_PC87427 is not set 630# CONFIG_SENSORS_PC87427 is not set
666# CONFIG_SENSORS_SMSC47M1 is not set 631# CONFIG_SENSORS_SMSC47M1 is not set
@@ -677,22 +642,29 @@ CONFIG_HWMON=y
677# CONFIG_HWMON_DEBUG_CHIP is not set 642# CONFIG_HWMON_DEBUG_CHIP is not set
678 643
679# 644#
645# Multifunction device drivers
646#
647# CONFIG_MFD_SM501 is not set
648
649#
680# Multimedia devices 650# Multimedia devices
681# 651#
682# CONFIG_VIDEO_DEV is not set 652# CONFIG_VIDEO_DEV is not set
653# CONFIG_DVB_CORE is not set
654CONFIG_DAB=y
683 655
684# 656#
685# Digital Video Broadcasting Devices 657# Graphics support
686# 658#
687# CONFIG_DVB is not set 659# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
688 660
689# 661#
690# Graphics support 662# Display device support
691# 663#
692CONFIG_FIRMWARE_EDID=y 664# CONFIG_DISPLAY_SUPPORT is not set
665# CONFIG_VGASTATE is not set
693# CONFIG_FB is not set 666# CONFIG_FB is not set
694# CONFIG_FB_IBM_GXT4500 is not set 667# CONFIG_FB_IBM_GXT4500 is not set
695# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
696 668
697# 669#
698# Sound 670# Sound
@@ -720,10 +692,6 @@ CONFIG_HID=y
720# USB Gadget Support 692# USB Gadget Support
721# 693#
722# CONFIG_USB_GADGET is not set 694# CONFIG_USB_GADGET is not set
723
724#
725# MMC/SD Card support
726#
727# CONFIG_MMC is not set 695# CONFIG_MMC is not set
728 696
729# 697#
@@ -766,14 +734,6 @@ CONFIG_HID=y
766# 734#
767 735
768# 736#
769# Auxiliary Display support
770#
771
772#
773# Virtualization
774#
775
776#
777# File systems 737# File systems
778# 738#
779CONFIG_EXT2_FS=y 739CONFIG_EXT2_FS=y
@@ -861,6 +821,7 @@ CONFIG_LOCKD_V4=y
861CONFIG_NFS_COMMON=y 821CONFIG_NFS_COMMON=y
862CONFIG_SUNRPC=y 822CONFIG_SUNRPC=y
863CONFIG_SUNRPC_GSS=y 823CONFIG_SUNRPC_GSS=y
824# CONFIG_SUNRPC_BIND34 is not set
864CONFIG_RPCSEC_GSS_KRB5=y 825CONFIG_RPCSEC_GSS_KRB5=y
865# CONFIG_RPCSEC_GSS_SPKM3 is not set 826# CONFIG_RPCSEC_GSS_SPKM3 is not set
866# CONFIG_SMB_FS is not set 827# CONFIG_SMB_FS is not set
@@ -886,6 +847,7 @@ CONFIG_PARTITION_ADVANCED=y
886# CONFIG_SUN_PARTITION is not set 847# CONFIG_SUN_PARTITION is not set
887# CONFIG_KARMA_PARTITION is not set 848# CONFIG_KARMA_PARTITION is not set
888# CONFIG_EFI_PARTITION is not set 849# CONFIG_EFI_PARTITION is not set
850# CONFIG_SYSV68_PARTITION is not set
889 851
890# 852#
891# Native Language Support 853# Native Language Support
@@ -896,6 +858,7 @@ CONFIG_PARTITION_ADVANCED=y
896# Distributed Lock Manager 858# Distributed Lock Manager
897# 859#
898# CONFIG_DLM is not set 860# CONFIG_DLM is not set
861# CONFIG_UCC_SLOW is not set
899 862
900# 863#
901# Library routines 864# Library routines
@@ -903,11 +866,13 @@ CONFIG_PARTITION_ADVANCED=y
903CONFIG_BITREVERSE=y 866CONFIG_BITREVERSE=y
904# CONFIG_CRC_CCITT is not set 867# CONFIG_CRC_CCITT is not set
905# CONFIG_CRC16 is not set 868# CONFIG_CRC16 is not set
869# CONFIG_CRC_ITU_T is not set
906CONFIG_CRC32=y 870CONFIG_CRC32=y
907# CONFIG_LIBCRC32C is not set 871# CONFIG_LIBCRC32C is not set
908CONFIG_PLIST=y 872CONFIG_PLIST=y
909CONFIG_HAS_IOMEM=y 873CONFIG_HAS_IOMEM=y
910CONFIG_HAS_IOPORT=y 874CONFIG_HAS_IOPORT=y
875CONFIG_HAS_DMA=y
911 876
912# 877#
913# Instrumentation Support 878# Instrumentation Support
@@ -926,9 +891,9 @@ CONFIG_ENABLE_MUST_CHECK=y
926# CONFIG_HEADERS_CHECK is not set 891# CONFIG_HEADERS_CHECK is not set
927CONFIG_DEBUG_KERNEL=y 892CONFIG_DEBUG_KERNEL=y
928# CONFIG_DEBUG_SHIRQ is not set 893# CONFIG_DEBUG_SHIRQ is not set
929CONFIG_LOG_BUF_SHIFT=14
930CONFIG_DETECT_SOFTLOCKUP=y 894CONFIG_DETECT_SOFTLOCKUP=y
931# CONFIG_SCHEDSTATS is not set 895# CONFIG_SCHEDSTATS is not set
896# CONFIG_TIMER_STATS is not set
932# CONFIG_DEBUG_SLAB is not set 897# CONFIG_DEBUG_SLAB is not set
933# CONFIG_DEBUG_RT_MUTEXES is not set 898# CONFIG_DEBUG_RT_MUTEXES is not set
934# CONFIG_RT_MUTEX_TESTER is not set 899# CONFIG_RT_MUTEX_TESTER is not set
@@ -943,8 +908,10 @@ CONFIG_DETECT_SOFTLOCKUP=y
943# CONFIG_DEBUG_LIST is not set 908# CONFIG_DEBUG_LIST is not set
944CONFIG_FORCED_INLINING=y 909CONFIG_FORCED_INLINING=y
945# CONFIG_RCU_TORTURE_TEST is not set 910# CONFIG_RCU_TORTURE_TEST is not set
911# CONFIG_FAULT_INJECTION is not set
946# CONFIG_DEBUG_STACKOVERFLOW is not set 912# CONFIG_DEBUG_STACKOVERFLOW is not set
947# CONFIG_DEBUG_STACK_USAGE is not set 913# CONFIG_DEBUG_STACK_USAGE is not set
914# CONFIG_DEBUG_PAGEALLOC is not set
948CONFIG_DEBUGGER=y 915CONFIG_DEBUGGER=y
949# CONFIG_XMON is not set 916# CONFIG_XMON is not set
950# CONFIG_BDI_SWITCH is not set 917# CONFIG_BDI_SWITCH is not set
@@ -958,6 +925,7 @@ CONFIG_PPC_EARLY_DEBUG=y
958# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set 925# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
959# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set 926# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
960# CONFIG_PPC_EARLY_DEBUG_BEAT is not set 927# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
928# CONFIG_PPC_EARLY_DEBUG_44x is not set
961 929
962# 930#
963# Security options 931# Security options
@@ -987,6 +955,7 @@ CONFIG_CRYPTO_ECB=m
987CONFIG_CRYPTO_CBC=y 955CONFIG_CRYPTO_CBC=y
988CONFIG_CRYPTO_PCBC=m 956CONFIG_CRYPTO_PCBC=m
989# CONFIG_CRYPTO_LRW is not set 957# CONFIG_CRYPTO_LRW is not set
958# CONFIG_CRYPTO_CRYPTD is not set
990CONFIG_CRYPTO_DES=y 959CONFIG_CRYPTO_DES=y
991# CONFIG_CRYPTO_FCRYPT is not set 960# CONFIG_CRYPTO_FCRYPT is not set
992# CONFIG_CRYPTO_BLOWFISH is not set 961# CONFIG_CRYPTO_BLOWFISH is not set
diff --git a/arch/powerpc/configs/mpc85xx_cds_defconfig b/arch/powerpc/configs/mpc85xx_cds_defconfig
index 1f61bce33e32..d9afe7009d99 100644
--- a/arch/powerpc/configs/mpc85xx_cds_defconfig
+++ b/arch/powerpc/configs/mpc85xx_cds_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.20-rc5 3# Linux kernel version: 2.6.22-rc7
4# Mon Jan 22 22:26:46 2007 4# Sun Jul 1 23:56:59 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -34,9 +34,9 @@ CONFIG_DEFAULT_UIMAGE=y
34# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
35CONFIG_PPC_85xx=y 35CONFIG_PPC_85xx=y
36# CONFIG_PPC_86xx is not set 36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
37# CONFIG_40x is not set 38# CONFIG_40x is not set
38# CONFIG_44x is not set 39# CONFIG_44x is not set
39# CONFIG_8xx is not set
40# CONFIG_E200 is not set 40# CONFIG_E200 is not set
41CONFIG_85xx=y 41CONFIG_85xx=y
42CONFIG_E500=y 42CONFIG_E500=y
@@ -46,6 +46,7 @@ CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y 46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set 47# CONFIG_PHYS_64BIT is not set
48CONFIG_SPE=y 48CONFIG_SPE=y
49# CONFIG_PPC_MM_SLICES is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
51# 52#
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -85,14 +89,19 @@ CONFIG_BUG=y
85CONFIG_ELF_CORE=y 89CONFIG_ELF_CORE=y
86CONFIG_BASE_FULL=y 90CONFIG_BASE_FULL=y
87CONFIG_FUTEX=y 91CONFIG_FUTEX=y
92CONFIG_ANON_INODES=y
88CONFIG_EPOLL=y 93CONFIG_EPOLL=y
94CONFIG_SIGNALFD=y
95CONFIG_TIMERFD=y
96CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 97CONFIG_SHMEM=y
90CONFIG_SLAB=y
91CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLAB=y
100# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set
92CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
93# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
94CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
95# CONFIG_SLOB is not set
96 105
97# 106#
98# Loadable module support 107# Loadable module support
@@ -119,17 +128,33 @@ 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"
122# CONFIG_WANT_EARLY_SERIAL is not set
123 131
124# 132#
125# Platform support 133# Platform support
126# 134#
135# CONFIG_PPC_MPC52xx is not set
136# CONFIG_PPC_MPC5200 is not set
137# CONFIG_PPC_CELL is not set
138# CONFIG_PPC_CELL_NATIVE is not set
139# CONFIG_PQ2ADS is not set
127# CONFIG_MPC8540_ADS is not set 140# CONFIG_MPC8540_ADS is not set
128# CONFIG_MPC8560_ADS is not set 141# CONFIG_MPC8560_ADS is not set
129CONFIG_MPC85xx_CDS=y 142CONFIG_MPC85xx_CDS=y
143# CONFIG_MPC85xx_MDS is not set
144# CONFIG_MPC8544_DS is not set
130CONFIG_MPC8540=y 145CONFIG_MPC8540=y
131CONFIG_PPC_INDIRECT_PCI_BE=y 146CONFIG_MPC85xx=y
132CONFIG_MPIC=y 147CONFIG_MPIC=y
148# CONFIG_MPIC_WEIRD is not set
149# CONFIG_PPC_I8259 is not set
150# CONFIG_PPC_RTAS is not set
151# CONFIG_MMIO_NVRAM is not set
152# CONFIG_PPC_MPC106 is not set
153# CONFIG_PPC_970_NAP is not set
154# CONFIG_PPC_INDIRECT_IO is not set
155# CONFIG_GENERIC_IOMAP is not set
156# CONFIG_CPU_FREQ is not set
157# CONFIG_CPM2 is not set
133 158
134# 159#
135# Kernel options 160# Kernel options
@@ -158,32 +183,33 @@ CONFIG_FLAT_NODE_MEM_MAP=y
158# CONFIG_SPARSEMEM_STATIC is not set 183# CONFIG_SPARSEMEM_STATIC is not set
159CONFIG_SPLIT_PTLOCK_CPUS=4 184CONFIG_SPLIT_PTLOCK_CPUS=4
160# CONFIG_RESOURCES_64BIT is not set 185# CONFIG_RESOURCES_64BIT is not set
186CONFIG_ZONE_DMA_FLAG=1
161CONFIG_PROC_DEVICETREE=y 187CONFIG_PROC_DEVICETREE=y
162# CONFIG_CMDLINE_BOOL is not set 188# CONFIG_CMDLINE_BOOL is not set
163# CONFIG_PM is not set 189# CONFIG_PM is not set
164# CONFIG_SECCOMP is not set 190# CONFIG_SECCOMP is not set
191CONFIG_WANT_DEVICE_TREE=y
192CONFIG_DEVICE_TREE=""
165CONFIG_ISA_DMA_API=y 193CONFIG_ISA_DMA_API=y
166 194
167# 195#
168# Bus options 196# Bus options
169# 197#
170# CONFIG_MPIC_WEIRD is not set 198CONFIG_ZONE_DMA=y
171# CONFIG_PPC_I8259 is not set
172CONFIG_PPC_INDIRECT_PCI=y 199CONFIG_PPC_INDIRECT_PCI=y
200CONFIG_PPC_INDIRECT_PCI_BE=y
173CONFIG_FSL_SOC=y 201CONFIG_FSL_SOC=y
174CONFIG_PCI=y 202CONFIG_PCI=y
175CONFIG_PCI_DOMAINS=y 203CONFIG_PCI_DOMAINS=y
176# CONFIG_PCIEPORTBUS is not set 204# CONFIG_PCIEPORTBUS is not set
205CONFIG_ARCH_SUPPORTS_MSI=y
206# CONFIG_PCI_MSI is not set
177# CONFIG_PCI_DEBUG is not set 207# CONFIG_PCI_DEBUG is not set
178 208
179# 209#
180# PCCARD (PCMCIA/CardBus) support 210# PCCARD (PCMCIA/CardBus) support
181# 211#
182# CONFIG_PCCARD is not set 212# CONFIG_PCCARD is not set
183
184#
185# PCI Hotplug Support
186#
187# CONFIG_HOTPLUG_PCI is not set 213# CONFIG_HOTPLUG_PCI is not set
188 214
189# 215#
@@ -208,13 +234,13 @@ CONFIG_NET=y
208# 234#
209# Networking options 235# Networking options
210# 236#
211# CONFIG_NETDEBUG is not set
212CONFIG_PACKET=y 237CONFIG_PACKET=y
213# CONFIG_PACKET_MMAP is not set 238# CONFIG_PACKET_MMAP is not set
214CONFIG_UNIX=y 239CONFIG_UNIX=y
215CONFIG_XFRM=y 240CONFIG_XFRM=y
216CONFIG_XFRM_USER=y 241CONFIG_XFRM_USER=y
217# CONFIG_XFRM_SUB_POLICY is not set 242# CONFIG_XFRM_SUB_POLICY is not set
243# CONFIG_XFRM_MIGRATE is not set
218# CONFIG_NET_KEY is not set 244# CONFIG_NET_KEY is not set
219CONFIG_INET=y 245CONFIG_INET=y
220CONFIG_IP_MULTICAST=y 246CONFIG_IP_MULTICAST=y
@@ -248,20 +274,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
248# CONFIG_INET6_TUNNEL is not set 274# CONFIG_INET6_TUNNEL is not set
249# CONFIG_NETWORK_SECMARK is not set 275# CONFIG_NETWORK_SECMARK is not set
250# CONFIG_NETFILTER is not set 276# CONFIG_NETFILTER is not set
251
252#
253# DCCP Configuration (EXPERIMENTAL)
254#
255# CONFIG_IP_DCCP is not set 277# CONFIG_IP_DCCP is not set
256
257#
258# SCTP Configuration (EXPERIMENTAL)
259#
260# CONFIG_IP_SCTP is not set 278# CONFIG_IP_SCTP is not set
261
262#
263# TIPC Configuration (EXPERIMENTAL)
264#
265# CONFIG_TIPC is not set 279# CONFIG_TIPC is not set
266# CONFIG_ATM is not set 280# CONFIG_ATM is not set
267# CONFIG_BRIDGE is not set 281# CONFIG_BRIDGE is not set
@@ -287,7 +301,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
287# CONFIG_HAMRADIO is not set 301# CONFIG_HAMRADIO is not set
288# CONFIG_IRDA is not set 302# CONFIG_IRDA is not set
289# CONFIG_BT is not set 303# CONFIG_BT is not set
304# CONFIG_AF_RXRPC is not set
305
306#
307# Wireless
308#
309# CONFIG_CFG80211 is not set
310# CONFIG_WIRELESS_EXT is not set
311# CONFIG_MAC80211 is not set
290# CONFIG_IEEE80211 is not set 312# CONFIG_IEEE80211 is not set
313# CONFIG_RFKILL is not set
291 314
292# 315#
293# Device Drivers 316# Device Drivers
@@ -300,16 +323,13 @@ CONFIG_STANDALONE=y
300CONFIG_PREVENT_FIRMWARE_BUILD=y 323CONFIG_PREVENT_FIRMWARE_BUILD=y
301# CONFIG_FW_LOADER is not set 324# CONFIG_FW_LOADER is not set
302# CONFIG_DEBUG_DRIVER is not set 325# CONFIG_DEBUG_DRIVER is not set
326# CONFIG_DEBUG_DEVRES is not set
303# CONFIG_SYS_HYPERVISOR is not set 327# CONFIG_SYS_HYPERVISOR is not set
304 328
305# 329#
306# Connector - unified userspace <-> kernelspace linker 330# Connector - unified userspace <-> kernelspace linker
307# 331#
308# CONFIG_CONNECTOR is not set 332# CONFIG_CONNECTOR is not set
309
310#
311# Memory Technology Devices (MTD)
312#
313# CONFIG_MTD is not set 333# CONFIG_MTD is not set
314 334
315# 335#
@@ -320,6 +340,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
320# 340#
321# Plug and Play support 341# Plug and Play support
322# 342#
343# CONFIG_PNPACPI is not set
323 344
324# 345#
325# Block devices 346# Block devices
@@ -338,19 +359,16 @@ CONFIG_BLK_DEV_RAM=y
338CONFIG_BLK_DEV_RAM_COUNT=16 359CONFIG_BLK_DEV_RAM_COUNT=16
339CONFIG_BLK_DEV_RAM_SIZE=32768 360CONFIG_BLK_DEV_RAM_SIZE=32768
340CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 361CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
341CONFIG_BLK_DEV_INITRD=y
342# CONFIG_CDROM_PKTCDVD is not set 362# CONFIG_CDROM_PKTCDVD is not set
343# CONFIG_ATA_OVER_ETH is not set 363# CONFIG_ATA_OVER_ETH is not set
344 364
345# 365#
346# Misc devices 366# Misc devices
347# 367#
368# CONFIG_PHANTOM is not set
348# CONFIG_SGI_IOC4 is not set 369# CONFIG_SGI_IOC4 is not set
349# CONFIG_TIFM_CORE is not set 370# CONFIG_TIFM_CORE is not set
350 371# CONFIG_BLINK is not set
351#
352# ATA/ATAPI/MFM/RLL support
353#
354CONFIG_IDE=y 372CONFIG_IDE=y
355CONFIG_IDE_MAX_HWIFS=4 373CONFIG_IDE_MAX_HWIFS=4
356CONFIG_BLK_DEV_IDE=y 374CONFIG_BLK_DEV_IDE=y
@@ -365,6 +383,7 @@ CONFIG_BLK_DEV_IDE=y
365# CONFIG_BLK_DEV_IDETAPE is not set 383# CONFIG_BLK_DEV_IDETAPE is not set
366# CONFIG_BLK_DEV_IDEFLOPPY is not set 384# CONFIG_BLK_DEV_IDEFLOPPY is not set
367# CONFIG_IDE_TASK_IOCTL is not set 385# CONFIG_IDE_TASK_IOCTL is not set
386CONFIG_IDE_PROC_FS=y
368 387
369# 388#
370# IDE chipset support/bugfixes 389# IDE chipset support/bugfixes
@@ -372,12 +391,13 @@ CONFIG_BLK_DEV_IDE=y
372CONFIG_IDE_GENERIC=y 391CONFIG_IDE_GENERIC=y
373CONFIG_BLK_DEV_IDEPCI=y 392CONFIG_BLK_DEV_IDEPCI=y
374CONFIG_IDEPCI_SHARE_IRQ=y 393CONFIG_IDEPCI_SHARE_IRQ=y
394CONFIG_IDEPCI_PCIBUS_ORDER=y
375# CONFIG_BLK_DEV_OFFBOARD is not set 395# CONFIG_BLK_DEV_OFFBOARD is not set
376CONFIG_BLK_DEV_GENERIC=y 396CONFIG_BLK_DEV_GENERIC=y
377# CONFIG_BLK_DEV_OPTI621 is not set 397# CONFIG_BLK_DEV_OPTI621 is not set
378CONFIG_BLK_DEV_IDEDMA_PCI=y 398CONFIG_BLK_DEV_IDEDMA_PCI=y
379# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 399# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
380# CONFIG_IDEDMA_PCI_AUTO is not set 400# CONFIG_IDEDMA_ONLYDISK is not set
381# CONFIG_BLK_DEV_AEC62XX is not set 401# CONFIG_BLK_DEV_AEC62XX is not set
382# CONFIG_BLK_DEV_ALI15X3 is not set 402# CONFIG_BLK_DEV_ALI15X3 is not set
383# CONFIG_BLK_DEV_AMD74XX is not set 403# CONFIG_BLK_DEV_AMD74XX is not set
@@ -391,6 +411,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
391# CONFIG_BLK_DEV_JMICRON is not set 411# CONFIG_BLK_DEV_JMICRON is not set
392# CONFIG_BLK_DEV_SC1200 is not set 412# CONFIG_BLK_DEV_SC1200 is not set
393# CONFIG_BLK_DEV_PIIX is not set 413# CONFIG_BLK_DEV_PIIX is not set
414# CONFIG_BLK_DEV_IT8213 is not set
394# CONFIG_BLK_DEV_IT821X is not set 415# CONFIG_BLK_DEV_IT821X is not set
395# CONFIG_BLK_DEV_NS87415 is not set 416# CONFIG_BLK_DEV_NS87415 is not set
396# CONFIG_BLK_DEV_PDC202XX_OLD is not set 417# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -401,10 +422,10 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
401# CONFIG_BLK_DEV_SLC90E66 is not set 422# CONFIG_BLK_DEV_SLC90E66 is not set
402# CONFIG_BLK_DEV_TRM290 is not set 423# CONFIG_BLK_DEV_TRM290 is not set
403CONFIG_BLK_DEV_VIA82CXXX=y 424CONFIG_BLK_DEV_VIA82CXXX=y
425# CONFIG_BLK_DEV_TC86C001 is not set
404# CONFIG_IDE_ARM is not set 426# CONFIG_IDE_ARM is not set
405CONFIG_BLK_DEV_IDEDMA=y 427CONFIG_BLK_DEV_IDEDMA=y
406# CONFIG_IDEDMA_IVB is not set 428# CONFIG_IDEDMA_IVB is not set
407# CONFIG_IDEDMA_AUTO is not set
408# CONFIG_BLK_DEV_HD is not set 429# CONFIG_BLK_DEV_HD is not set
409 430
410# 431#
@@ -413,10 +434,6 @@ CONFIG_BLK_DEV_IDEDMA=y
413# CONFIG_RAID_ATTRS is not set 434# CONFIG_RAID_ATTRS is not set
414# CONFIG_SCSI is not set 435# CONFIG_SCSI is not set
415# CONFIG_SCSI_NETLINK is not set 436# CONFIG_SCSI_NETLINK is not set
416
417#
418# Serial ATA (prod) and Parallel ATA (experimental) drivers
419#
420# CONFIG_ATA is not set 437# CONFIG_ATA is not set
421 438
422# 439#
@@ -432,18 +449,14 @@ CONFIG_BLK_DEV_IDEDMA=y
432# 449#
433# IEEE 1394 (FireWire) support 450# IEEE 1394 (FireWire) support
434# 451#
452# CONFIG_FIREWIRE is not set
435# CONFIG_IEEE1394 is not set 453# CONFIG_IEEE1394 is not set
436 454
437# 455#
438# I2O device support 456# I2O device support
439# 457#
440# CONFIG_I2O is not set 458# CONFIG_I2O is not set
441 459# CONFIG_MACINTOSH_DRIVERS is not set
442#
443# Macintosh device drivers
444#
445# CONFIG_MAC_EMUMOUSEBTN is not set
446# CONFIG_WINDFARM is not set
447 460
448# 461#
449# Network device support 462# Network device support
@@ -453,15 +466,7 @@ CONFIG_NETDEVICES=y
453# CONFIG_BONDING is not set 466# CONFIG_BONDING is not set
454# CONFIG_EQUALIZER is not set 467# CONFIG_EQUALIZER is not set
455# CONFIG_TUN is not set 468# CONFIG_TUN is not set
456
457#
458# ARCnet devices
459#
460# CONFIG_ARCNET is not set 469# CONFIG_ARCNET is not set
461
462#
463# PHY device support
464#
465CONFIG_PHYLIB=y 470CONFIG_PHYLIB=y
466 471
467# 472#
@@ -493,10 +498,7 @@ CONFIG_MII=y
493# CONFIG_NET_TULIP is not set 498# CONFIG_NET_TULIP is not set
494# CONFIG_HP100 is not set 499# CONFIG_HP100 is not set
495# CONFIG_NET_PCI is not set 500# CONFIG_NET_PCI is not set
496 501CONFIG_NETDEV_1000=y
497#
498# Ethernet (1000 Mbit)
499#
500# CONFIG_ACENIC is not set 502# CONFIG_ACENIC is not set
501# CONFIG_DL2K is not set 503# CONFIG_DL2K is not set
502CONFIG_E1000=y 504CONFIG_E1000=y
@@ -510,34 +512,28 @@ CONFIG_E1000_NAPI=y
510# CONFIG_SKGE is not set 512# CONFIG_SKGE is not set
511# CONFIG_SKY2 is not set 513# CONFIG_SKY2 is not set
512# CONFIG_SK98LIN is not set 514# CONFIG_SK98LIN is not set
515# CONFIG_VIA_VELOCITY is not set
513# CONFIG_TIGON3 is not set 516# CONFIG_TIGON3 is not set
514# CONFIG_BNX2 is not set 517# CONFIG_BNX2 is not set
515CONFIG_GIANFAR=y 518CONFIG_GIANFAR=y
516CONFIG_GFAR_NAPI=y 519CONFIG_GFAR_NAPI=y
517# CONFIG_QLA3XXX is not set 520# CONFIG_QLA3XXX is not set
518 521# CONFIG_ATL1 is not set
519# 522CONFIG_NETDEV_10000=y
520# Ethernet (10000 Mbit)
521#
522# CONFIG_CHELSIO_T1 is not set 523# CONFIG_CHELSIO_T1 is not set
524# CONFIG_CHELSIO_T3 is not set
523# CONFIG_IXGB is not set 525# CONFIG_IXGB is not set
524# CONFIG_S2IO is not set 526# CONFIG_S2IO is not set
525# CONFIG_MYRI10GE is not set 527# CONFIG_MYRI10GE is not set
526# CONFIG_NETXEN_NIC is not set 528# CONFIG_NETXEN_NIC is not set
527 529# CONFIG_MLX4_CORE is not set
528#
529# Token Ring devices
530#
531# CONFIG_TR is not set 530# CONFIG_TR is not set
532 531
533# 532#
534# Wireless LAN (non-hamradio) 533# Wireless LAN
535#
536# CONFIG_NET_RADIO is not set
537
538#
539# Wan interfaces
540# 534#
535# CONFIG_WLAN_PRE80211 is not set
536# CONFIG_WLAN_80211 is not set
541# CONFIG_WAN is not set 537# CONFIG_WAN is not set
542# CONFIG_FDDI is not set 538# CONFIG_FDDI is not set
543# CONFIG_HIPPI is not set 539# CONFIG_HIPPI is not set
@@ -563,6 +559,7 @@ CONFIG_GFAR_NAPI=y
563# 559#
564CONFIG_INPUT=y 560CONFIG_INPUT=y
565# CONFIG_INPUT_FF_MEMLESS is not set 561# CONFIG_INPUT_FF_MEMLESS is not set
562# CONFIG_INPUT_POLLDEV is not set
566 563
567# 564#
568# Userland interfaces 565# Userland interfaces
@@ -579,6 +576,7 @@ CONFIG_INPUT=y
579# CONFIG_INPUT_KEYBOARD is not set 576# CONFIG_INPUT_KEYBOARD is not set
580# CONFIG_INPUT_MOUSE is not set 577# CONFIG_INPUT_MOUSE is not set
581# CONFIG_INPUT_JOYSTICK is not set 578# CONFIG_INPUT_JOYSTICK is not set
579# CONFIG_INPUT_TABLET is not set
582# CONFIG_INPUT_TOUCHSCREEN is not set 580# CONFIG_INPUT_TOUCHSCREEN is not set
583# CONFIG_INPUT_MISC is not set 581# CONFIG_INPUT_MISC is not set
584 582
@@ -603,6 +601,7 @@ CONFIG_SERIAL_8250_PCI=y
603CONFIG_SERIAL_8250_NR_UARTS=4 601CONFIG_SERIAL_8250_NR_UARTS=4
604CONFIG_SERIAL_8250_RUNTIME_UARTS=4 602CONFIG_SERIAL_8250_RUNTIME_UARTS=4
605# CONFIG_SERIAL_8250_EXTENDED is not set 603# CONFIG_SERIAL_8250_EXTENDED is not set
604CONFIG_SERIAL_8250_SHARE_IRQ=y
606 605
607# 606#
608# Non-8250 serial port support 607# Non-8250 serial port support
@@ -611,6 +610,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
611CONFIG_SERIAL_CORE=y 610CONFIG_SERIAL_CORE=y
612CONFIG_SERIAL_CORE_CONSOLE=y 611CONFIG_SERIAL_CORE_CONSOLE=y
613# CONFIG_SERIAL_JSM is not set 612# CONFIG_SERIAL_JSM is not set
613# CONFIG_SERIAL_OF_PLATFORM is not set
614CONFIG_UNIX98_PTYS=y 614CONFIG_UNIX98_PTYS=y
615CONFIG_LEGACY_PTYS=y 615CONFIG_LEGACY_PTYS=y
616CONFIG_LEGACY_PTY_COUNT=256 616CONFIG_LEGACY_PTY_COUNT=256
@@ -619,16 +619,11 @@ CONFIG_LEGACY_PTY_COUNT=256
619# IPMI 619# IPMI
620# 620#
621# CONFIG_IPMI_HANDLER is not set 621# CONFIG_IPMI_HANDLER is not set
622
623#
624# Watchdog Cards
625#
626# CONFIG_WATCHDOG is not set 622# CONFIG_WATCHDOG is not set
627# CONFIG_HW_RANDOM is not set 623# CONFIG_HW_RANDOM is not set
628# CONFIG_NVRAM is not set 624# CONFIG_NVRAM is not set
629CONFIG_GEN_RTC=y 625CONFIG_GEN_RTC=y
630# CONFIG_GEN_RTC_X is not set 626# CONFIG_GEN_RTC_X is not set
631# CONFIG_DTLK is not set
632# CONFIG_R3964 is not set 627# CONFIG_R3964 is not set
633# CONFIG_APPLICOM is not set 628# CONFIG_APPLICOM is not set
634# CONFIG_AGP is not set 629# CONFIG_AGP is not set
@@ -639,10 +634,7 @@ CONFIG_GEN_RTC=y
639# TPM devices 634# TPM devices
640# 635#
641# CONFIG_TCG_TPM is not set 636# CONFIG_TCG_TPM is not set
642 637CONFIG_DEVPORT=y
643#
644# I2C support
645#
646# CONFIG_I2C is not set 638# CONFIG_I2C is not set
647 639
648# 640#
@@ -655,35 +647,41 @@ CONFIG_GEN_RTC=y
655# Dallas's 1-wire bus 647# Dallas's 1-wire bus
656# 648#
657# CONFIG_W1 is not set 649# CONFIG_W1 is not set
658
659#
660# Hardware Monitoring support
661#
662CONFIG_HWMON=y 650CONFIG_HWMON=y
663# CONFIG_HWMON_VID is not set 651# CONFIG_HWMON_VID is not set
664# CONFIG_SENSORS_ABITUGURU is not set 652# CONFIG_SENSORS_ABITUGURU is not set
665# CONFIG_SENSORS_F71805F is not set 653# CONFIG_SENSORS_F71805F is not set
666# CONFIG_SENSORS_PC87427 is not set 654# CONFIG_SENSORS_PC87427 is not set
655# CONFIG_SENSORS_SMSC47M1 is not set
656# CONFIG_SENSORS_SMSC47B397 is not set
667# CONFIG_SENSORS_VT1211 is not set 657# CONFIG_SENSORS_VT1211 is not set
658# CONFIG_SENSORS_W83627HF is not set
668# CONFIG_HWMON_DEBUG_CHIP is not set 659# CONFIG_HWMON_DEBUG_CHIP is not set
669 660
670# 661#
662# Multifunction device drivers
663#
664# CONFIG_MFD_SM501 is not set
665
666#
671# Multimedia devices 667# Multimedia devices
672# 668#
673# CONFIG_VIDEO_DEV is not set 669# CONFIG_VIDEO_DEV is not set
670# CONFIG_DVB_CORE is not set
671CONFIG_DAB=y
674 672
675# 673#
676# Digital Video Broadcasting Devices 674# Graphics support
677# 675#
678# CONFIG_DVB is not set 676# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
679 677
680# 678#
681# Graphics support 679# Display device support
682# 680#
683CONFIG_FIRMWARE_EDID=y 681# CONFIG_DISPLAY_SUPPORT is not set
682# CONFIG_VGASTATE is not set
684# CONFIG_FB is not set 683# CONFIG_FB is not set
685# CONFIG_FB_IBM_GXT4500 is not set 684# CONFIG_FB_IBM_GXT4500 is not set
686# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
687 685
688# 686#
689# Sound 687# Sound
@@ -694,6 +692,7 @@ CONFIG_FIRMWARE_EDID=y
694# HID Devices 692# HID Devices
695# 693#
696CONFIG_HID=y 694CONFIG_HID=y
695# CONFIG_HID_DEBUG is not set
697 696
698# 697#
699# USB support 698# USB support
@@ -711,10 +710,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
711# USB Gadget Support 710# USB Gadget Support
712# 711#
713# CONFIG_USB_GADGET is not set 712# CONFIG_USB_GADGET is not set
714
715#
716# MMC/SD Card support
717#
718# CONFIG_MMC is not set 713# CONFIG_MMC is not set
719 714
720# 715#
@@ -758,10 +753,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
758# 753#
759 754
760# 755#
761# Virtualization
762#
763
764#
765# File systems 756# File systems
766# 757#
767CONFIG_EXT2_FS=y 758CONFIG_EXT2_FS=y
@@ -846,6 +837,7 @@ CONFIG_ROOT_NFS=y
846CONFIG_LOCKD=y 837CONFIG_LOCKD=y
847CONFIG_NFS_COMMON=y 838CONFIG_NFS_COMMON=y
848CONFIG_SUNRPC=y 839CONFIG_SUNRPC=y
840# CONFIG_SUNRPC_BIND34 is not set
849# CONFIG_RPCSEC_GSS_KRB5 is not set 841# CONFIG_RPCSEC_GSS_KRB5 is not set
850# CONFIG_RPCSEC_GSS_SPKM3 is not set 842# CONFIG_RPCSEC_GSS_SPKM3 is not set
851# CONFIG_SMB_FS is not set 843# CONFIG_SMB_FS is not set
@@ -871,6 +863,7 @@ CONFIG_PARTITION_ADVANCED=y
871# CONFIG_SUN_PARTITION is not set 863# CONFIG_SUN_PARTITION is not set
872# CONFIG_KARMA_PARTITION is not set 864# CONFIG_KARMA_PARTITION is not set
873# CONFIG_EFI_PARTITION is not set 865# CONFIG_EFI_PARTITION is not set
866# CONFIG_SYSV68_PARTITION is not set
874 867
875# 868#
876# Native Language Support 869# Native Language Support
@@ -881,6 +874,7 @@ CONFIG_PARTITION_ADVANCED=y
881# Distributed Lock Manager 874# Distributed Lock Manager
882# 875#
883# CONFIG_DLM is not set 876# CONFIG_DLM is not set
877# CONFIG_UCC_SLOW is not set
884 878
885# 879#
886# Library routines 880# Library routines
@@ -888,10 +882,13 @@ CONFIG_PARTITION_ADVANCED=y
888CONFIG_BITREVERSE=y 882CONFIG_BITREVERSE=y
889# CONFIG_CRC_CCITT is not set 883# CONFIG_CRC_CCITT is not set
890# CONFIG_CRC16 is not set 884# CONFIG_CRC16 is not set
885# CONFIG_CRC_ITU_T is not set
891CONFIG_CRC32=y 886CONFIG_CRC32=y
892# CONFIG_LIBCRC32C is not set 887# CONFIG_LIBCRC32C is not set
893CONFIG_PLIST=y 888CONFIG_PLIST=y
894CONFIG_IOMAP_COPY=y 889CONFIG_HAS_IOMEM=y
890CONFIG_HAS_IOPORT=y
891CONFIG_HAS_DMA=y
895 892
896# 893#
897# Instrumentation Support 894# Instrumentation Support
@@ -908,15 +905,15 @@ CONFIG_ENABLE_MUST_CHECK=y
908# CONFIG_DEBUG_FS is not set 905# CONFIG_DEBUG_FS is not set
909# CONFIG_HEADERS_CHECK is not set 906# CONFIG_HEADERS_CHECK is not set
910CONFIG_DEBUG_KERNEL=y 907CONFIG_DEBUG_KERNEL=y
911CONFIG_LOG_BUF_SHIFT=14 908# CONFIG_DEBUG_SHIRQ is not set
912CONFIG_DETECT_SOFTLOCKUP=y 909CONFIG_DETECT_SOFTLOCKUP=y
913# CONFIG_SCHEDSTATS is not set 910# CONFIG_SCHEDSTATS is not set
911# CONFIG_TIMER_STATS is not set
914# CONFIG_DEBUG_SLAB is not set 912# CONFIG_DEBUG_SLAB is not set
915# CONFIG_DEBUG_RT_MUTEXES is not set 913# CONFIG_DEBUG_RT_MUTEXES is not set
916# CONFIG_RT_MUTEX_TESTER is not set 914# CONFIG_RT_MUTEX_TESTER is not set
917# CONFIG_DEBUG_SPINLOCK is not set 915# CONFIG_DEBUG_SPINLOCK is not set
918CONFIG_DEBUG_MUTEXES=y 916CONFIG_DEBUG_MUTEXES=y
919# CONFIG_DEBUG_RWSEMS is not set
920# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 917# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
921# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 918# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
922# CONFIG_DEBUG_KOBJECT is not set 919# CONFIG_DEBUG_KOBJECT is not set
@@ -925,7 +922,10 @@ CONFIG_DEBUG_MUTEXES=y
925# CONFIG_DEBUG_VM is not set 922# CONFIG_DEBUG_VM is not set
926# CONFIG_DEBUG_LIST is not set 923# CONFIG_DEBUG_LIST is not set
927CONFIG_FORCED_INLINING=y 924CONFIG_FORCED_INLINING=y
928# CONFIG_RCU_TORTURE_TEST is not set 925# CONFIG_FAULT_INJECTION is not set
926# CONFIG_DEBUG_STACKOVERFLOW is not set
927# CONFIG_DEBUG_STACK_USAGE is not set
928# CONFIG_DEBUG_PAGEALLOC is not set
929# CONFIG_DEBUGGER is not set 929# CONFIG_DEBUGGER is not set
930# CONFIG_BDI_SWITCH is not set 930# CONFIG_BDI_SWITCH is not set
931# CONFIG_BOOTX_TEXT is not set 931# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/mpc8641_hpcn_defconfig b/arch/powerpc/configs/mpc8641_hpcn_defconfig
index 53fcd6932f5b..1ac94a605b05 100644
--- a/arch/powerpc/configs/mpc8641_hpcn_defconfig
+++ b/arch/powerpc/configs/mpc8641_hpcn_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.20-rc5 3# Linux kernel version: 2.6.22-rc7
4# Mon Jan 22 22:27:14 2007 4# Sun Jul 1 23:57:00 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -24,7 +24,7 @@ CONFIG_PPC_UDBG_16550=y
24CONFIG_GENERIC_TBSYNC=y 24CONFIG_GENERIC_TBSYNC=y
25CONFIG_AUDIT_ARCH=y 25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 26CONFIG_GENERIC_BUG=y
27# CONFIG_DEFAULT_UIMAGE is not set 27CONFIG_DEFAULT_UIMAGE=y
28 28
29# 29#
30# Processor support 30# Processor support
@@ -34,9 +34,9 @@ CONFIG_GENERIC_BUG=y
34# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set 35# CONFIG_PPC_85xx is not set
36CONFIG_PPC_86xx=y 36CONFIG_PPC_86xx=y
37# CONFIG_PPC_8xx is not set
37# CONFIG_40x is not set 38# CONFIG_40x is not set
38# CONFIG_44x is not set 39# CONFIG_44x is not set
39# CONFIG_8xx is not set
40# CONFIG_E200 is not set 40# CONFIG_E200 is not set
41CONFIG_6xx=y 41CONFIG_6xx=y
42CONFIG_PPC_FPU=y 42CONFIG_PPC_FPU=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45CONFIG_ALTIVEC=y 45CONFIG_ALTIVEC=y
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48CONFIG_SMP=y 49CONFIG_SMP=y
49CONFIG_NR_CPUS=2 50CONFIG_NR_CPUS=2
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 51CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -70,9 +71,11 @@ CONFIG_LOCALVERSION=""
70# CONFIG_AUDIT is not set 71# CONFIG_AUDIT is not set
71CONFIG_IKCONFIG=y 72CONFIG_IKCONFIG=y
72CONFIG_IKCONFIG_PROC=y 73CONFIG_IKCONFIG_PROC=y
74CONFIG_LOG_BUF_SHIFT=14
73# CONFIG_CPUSETS is not set 75# CONFIG_CPUSETS is not set
74CONFIG_SYSFS_DEPRECATED=y 76CONFIG_SYSFS_DEPRECATED=y
75# CONFIG_RELAY is not set 77# CONFIG_RELAY is not set
78CONFIG_BLK_DEV_INITRD=y
76CONFIG_INITRAMFS_SOURCE="" 79CONFIG_INITRAMFS_SOURCE=""
77# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 80# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
78CONFIG_SYSCTL=y 81CONFIG_SYSCTL=y
@@ -87,14 +90,19 @@ CONFIG_BUG=y
87# CONFIG_ELF_CORE is not set 90# CONFIG_ELF_CORE is not set
88CONFIG_BASE_FULL=y 91CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y 92CONFIG_FUTEX=y
93CONFIG_ANON_INODES=y
90CONFIG_EPOLL=y 94CONFIG_EPOLL=y
95CONFIG_SIGNALFD=y
96CONFIG_TIMERFD=y
97CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 98CONFIG_SHMEM=y
92CONFIG_SLAB=y
93CONFIG_VM_EVENT_COUNTERS=y 99CONFIG_VM_EVENT_COUNTERS=y
100CONFIG_SLAB=y
101# CONFIG_SLUB is not set
102# CONFIG_SLOB is not set
94CONFIG_RT_MUTEXES=y 103CONFIG_RT_MUTEXES=y
95# CONFIG_TINY_SHMEM is not set 104# CONFIG_TINY_SHMEM is not set
96CONFIG_BASE_SMALL=0 105CONFIG_BASE_SMALL=0
97# CONFIG_SLOB is not set
98 106
99# 107#
100# Loadable module support 108# Loadable module support
@@ -121,15 +129,28 @@ CONFIG_DEFAULT_DEADLINE=y
121# CONFIG_DEFAULT_CFQ is not set 129# CONFIG_DEFAULT_CFQ is not set
122# CONFIG_DEFAULT_NOOP is not set 130# CONFIG_DEFAULT_NOOP is not set
123CONFIG_DEFAULT_IOSCHED="deadline" 131CONFIG_DEFAULT_IOSCHED="deadline"
124# CONFIG_WANT_EARLY_SERIAL is not set
125CONFIG_PPC_INDIRECT_PCI_BE=y
126CONFIG_MPIC=y
127 132
128# 133#
129# Platform Support 134# Platform support
130# 135#
136# CONFIG_PPC_MPC52xx is not set
137# CONFIG_PPC_MPC5200 is not set
138# CONFIG_PPC_CELL is not set
139# CONFIG_PPC_CELL_NATIVE is not set
140# CONFIG_PQ2ADS is not set
131CONFIG_MPC8641_HPCN=y 141CONFIG_MPC8641_HPCN=y
132CONFIG_MPC8641=y 142CONFIG_MPC8641=y
143CONFIG_MPIC=y
144# CONFIG_MPIC_WEIRD is not set
145CONFIG_PPC_I8259=y
146# CONFIG_PPC_RTAS is not set
147# CONFIG_MMIO_NVRAM is not set
148# CONFIG_PPC_MPC106 is not set
149# CONFIG_PPC_970_NAP is not set
150# CONFIG_PPC_INDIRECT_IO is not set
151# CONFIG_GENERIC_IOMAP is not set
152# CONFIG_CPU_FREQ is not set
153# CONFIG_CPM2 is not set
133 154
134# 155#
135# Kernel options 156# Kernel options
@@ -159,33 +180,34 @@ CONFIG_FLAT_NODE_MEM_MAP=y
159# CONFIG_SPARSEMEM_STATIC is not set 180# CONFIG_SPARSEMEM_STATIC is not set
160CONFIG_SPLIT_PTLOCK_CPUS=4 181CONFIG_SPLIT_PTLOCK_CPUS=4
161# CONFIG_RESOURCES_64BIT is not set 182# CONFIG_RESOURCES_64BIT is not set
183CONFIG_ZONE_DMA_FLAG=1
162CONFIG_PROC_DEVICETREE=y 184CONFIG_PROC_DEVICETREE=y
163# CONFIG_CMDLINE_BOOL is not set 185# CONFIG_CMDLINE_BOOL is not set
164# CONFIG_PM is not set 186# CONFIG_PM is not set
165# CONFIG_SECCOMP is not set 187# CONFIG_SECCOMP is not set
188# CONFIG_WANT_DEVICE_TREE is not set
166CONFIG_ISA_DMA_API=y 189CONFIG_ISA_DMA_API=y
167 190
168# 191#
169# Bus options 192# Bus options
170# 193#
194CONFIG_ZONE_DMA=y
171CONFIG_GENERIC_ISA_DMA=y 195CONFIG_GENERIC_ISA_DMA=y
172# CONFIG_MPIC_WEIRD is not set
173CONFIG_PPC_I8259=y
174CONFIG_PPC_INDIRECT_PCI=y 196CONFIG_PPC_INDIRECT_PCI=y
197CONFIG_PPC_INDIRECT_PCI_BE=y
175CONFIG_FSL_SOC=y 198CONFIG_FSL_SOC=y
199CONFIG_FSL_PCIE=y
176CONFIG_PCI=y 200CONFIG_PCI=y
177CONFIG_PCI_DOMAINS=y 201CONFIG_PCI_DOMAINS=y
178# CONFIG_PCIEPORTBUS is not set 202# CONFIG_PCIEPORTBUS is not set
203CONFIG_ARCH_SUPPORTS_MSI=y
204# CONFIG_PCI_MSI is not set
179# CONFIG_PCI_DEBUG is not set 205# CONFIG_PCI_DEBUG is not set
180 206
181# 207#
182# PCCARD (PCMCIA/CardBus) support 208# PCCARD (PCMCIA/CardBus) support
183# 209#
184# CONFIG_PCCARD is not set 210# CONFIG_PCCARD is not set
185
186#
187# PCI Hotplug Support
188#
189# CONFIG_HOTPLUG_PCI is not set 211# CONFIG_HOTPLUG_PCI is not set
190 212
191# 213#
@@ -210,13 +232,13 @@ CONFIG_NET=y
210# 232#
211# Networking options 233# Networking options
212# 234#
213# CONFIG_NETDEBUG is not set
214CONFIG_PACKET=y 235CONFIG_PACKET=y
215# CONFIG_PACKET_MMAP is not set 236# CONFIG_PACKET_MMAP is not set
216CONFIG_UNIX=y 237CONFIG_UNIX=y
217CONFIG_XFRM=y 238CONFIG_XFRM=y
218CONFIG_XFRM_USER=y 239CONFIG_XFRM_USER=y
219# CONFIG_XFRM_SUB_POLICY is not set 240# CONFIG_XFRM_SUB_POLICY is not set
241# CONFIG_XFRM_MIGRATE is not set
220# CONFIG_NET_KEY is not set 242# CONFIG_NET_KEY is not set
221CONFIG_INET=y 243CONFIG_INET=y
222# CONFIG_IP_MULTICAST is not set 244# CONFIG_IP_MULTICAST is not set
@@ -234,7 +256,7 @@ CONFIG_IP_PNP_RARP=y
234# CONFIG_INET_ESP is not set 256# CONFIG_INET_ESP is not set
235# CONFIG_INET_IPCOMP is not set 257# CONFIG_INET_IPCOMP is not set
236# CONFIG_INET_XFRM_TUNNEL is not set 258# CONFIG_INET_XFRM_TUNNEL is not set
237# CONFIG_INET_TUNNEL is not set 259CONFIG_INET_TUNNEL=y
238CONFIG_INET_XFRM_MODE_TRANSPORT=y 260CONFIG_INET_XFRM_MODE_TRANSPORT=y
239CONFIG_INET_XFRM_MODE_TUNNEL=y 261CONFIG_INET_XFRM_MODE_TUNNEL=y
240CONFIG_INET_XFRM_MODE_BEET=y 262CONFIG_INET_XFRM_MODE_BEET=y
@@ -247,6 +269,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
247CONFIG_IPV6=y 269CONFIG_IPV6=y
248# CONFIG_IPV6_PRIVACY is not set 270# CONFIG_IPV6_PRIVACY is not set
249# CONFIG_IPV6_ROUTER_PREF is not set 271# CONFIG_IPV6_ROUTER_PREF is not set
272# CONFIG_IPV6_OPTIMISTIC_DAD is not set
250# CONFIG_INET6_AH is not set 273# CONFIG_INET6_AH is not set
251# CONFIG_INET6_ESP is not set 274# CONFIG_INET6_ESP is not set
252# CONFIG_INET6_IPCOMP is not set 275# CONFIG_INET6_IPCOMP is not set
@@ -262,20 +285,8 @@ CONFIG_IPV6_SIT=y
262# CONFIG_IPV6_MULTIPLE_TABLES is not set 285# CONFIG_IPV6_MULTIPLE_TABLES is not set
263# CONFIG_NETWORK_SECMARK is not set 286# CONFIG_NETWORK_SECMARK is not set
264# CONFIG_NETFILTER is not set 287# CONFIG_NETFILTER is not set
265
266#
267# DCCP Configuration (EXPERIMENTAL)
268#
269# CONFIG_IP_DCCP is not set 288# CONFIG_IP_DCCP is not set
270
271#
272# SCTP Configuration (EXPERIMENTAL)
273#
274# CONFIG_IP_SCTP is not set 289# CONFIG_IP_SCTP is not set
275
276#
277# TIPC Configuration (EXPERIMENTAL)
278#
279# CONFIG_TIPC is not set 290# CONFIG_TIPC is not set
280# CONFIG_ATM is not set 291# CONFIG_ATM is not set
281# CONFIG_BRIDGE is not set 292# CONFIG_BRIDGE is not set
@@ -301,7 +312,16 @@ CONFIG_IPV6_SIT=y
301# CONFIG_HAMRADIO is not set 312# CONFIG_HAMRADIO is not set
302# CONFIG_IRDA is not set 313# CONFIG_IRDA is not set
303# CONFIG_BT is not set 314# CONFIG_BT is not set
315# CONFIG_AF_RXRPC is not set
316
317#
318# Wireless
319#
320# CONFIG_CFG80211 is not set
321# CONFIG_WIRELESS_EXT is not set
322# CONFIG_MAC80211 is not set
304# CONFIG_IEEE80211 is not set 323# CONFIG_IEEE80211 is not set
324# CONFIG_RFKILL is not set
305 325
306# 326#
307# Device Drivers 327# Device Drivers
@@ -314,16 +334,13 @@ CONFIG_STANDALONE=y
314CONFIG_PREVENT_FIRMWARE_BUILD=y 334CONFIG_PREVENT_FIRMWARE_BUILD=y
315CONFIG_FW_LOADER=y 335CONFIG_FW_LOADER=y
316# CONFIG_DEBUG_DRIVER is not set 336# CONFIG_DEBUG_DRIVER is not set
337# CONFIG_DEBUG_DEVRES is not set
317# CONFIG_SYS_HYPERVISOR is not set 338# CONFIG_SYS_HYPERVISOR is not set
318 339
319# 340#
320# Connector - unified userspace <-> kernelspace linker 341# Connector - unified userspace <-> kernelspace linker
321# 342#
322# CONFIG_CONNECTOR is not set 343# CONFIG_CONNECTOR is not set
323
324#
325# Memory Technology Devices (MTD)
326#
327# CONFIG_MTD is not set 344# CONFIG_MTD is not set
328 345
329# 346#
@@ -334,6 +351,7 @@ CONFIG_FW_LOADER=y
334# 351#
335# Plug and Play support 352# Plug and Play support
336# 353#
354# CONFIG_PNPACPI is not set
337 355
338# 356#
339# Block devices 357# Block devices
@@ -352,19 +370,16 @@ CONFIG_BLK_DEV_RAM=y
352CONFIG_BLK_DEV_RAM_COUNT=16 370CONFIG_BLK_DEV_RAM_COUNT=16
353CONFIG_BLK_DEV_RAM_SIZE=131072 371CONFIG_BLK_DEV_RAM_SIZE=131072
354CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 372CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
355CONFIG_BLK_DEV_INITRD=y
356# CONFIG_CDROM_PKTCDVD is not set 373# CONFIG_CDROM_PKTCDVD is not set
357# CONFIG_ATA_OVER_ETH is not set 374# CONFIG_ATA_OVER_ETH is not set
358 375
359# 376#
360# Misc devices 377# Misc devices
361# 378#
379# CONFIG_PHANTOM is not set
362# CONFIG_SGI_IOC4 is not set 380# CONFIG_SGI_IOC4 is not set
363# CONFIG_TIFM_CORE is not set 381# CONFIG_TIFM_CORE is not set
364 382# CONFIG_BLINK is not set
365#
366# ATA/ATAPI/MFM/RLL support
367#
368# CONFIG_IDE is not set 383# CONFIG_IDE is not set
369 384
370# 385#
@@ -373,10 +388,6 @@ CONFIG_BLK_DEV_INITRD=y
373# CONFIG_RAID_ATTRS is not set 388# CONFIG_RAID_ATTRS is not set
374# CONFIG_SCSI is not set 389# CONFIG_SCSI is not set
375# CONFIG_SCSI_NETLINK is not set 390# CONFIG_SCSI_NETLINK is not set
376
377#
378# Serial ATA (prod) and Parallel ATA (experimental) drivers
379#
380# CONFIG_ATA is not set 391# CONFIG_ATA is not set
381 392
382# 393#
@@ -392,18 +403,14 @@ CONFIG_BLK_DEV_INITRD=y
392# 403#
393# IEEE 1394 (FireWire) support 404# IEEE 1394 (FireWire) support
394# 405#
406# CONFIG_FIREWIRE is not set
395# CONFIG_IEEE1394 is not set 407# CONFIG_IEEE1394 is not set
396 408
397# 409#
398# I2O device support 410# I2O device support
399# 411#
400# CONFIG_I2O is not set 412# CONFIG_I2O is not set
401 413# CONFIG_MACINTOSH_DRIVERS is not set
402#
403# Macintosh device drivers
404#
405# CONFIG_MAC_EMUMOUSEBTN is not set
406# CONFIG_WINDFARM is not set
407 414
408# 415#
409# Network device support 416# Network device support
@@ -413,15 +420,7 @@ CONFIG_DUMMY=y
413# CONFIG_BONDING is not set 420# CONFIG_BONDING is not set
414# CONFIG_EQUALIZER is not set 421# CONFIG_EQUALIZER is not set
415# CONFIG_TUN is not set 422# CONFIG_TUN is not set
416
417#
418# ARCnet devices
419#
420# CONFIG_ARCNET is not set 423# CONFIG_ARCNET is not set
421
422#
423# PHY device support
424#
425CONFIG_PHYLIB=y 424CONFIG_PHYLIB=y
426 425
427# 426#
@@ -453,10 +452,7 @@ CONFIG_MII=y
453# CONFIG_NET_TULIP is not set 452# CONFIG_NET_TULIP is not set
454# CONFIG_HP100 is not set 453# CONFIG_HP100 is not set
455# CONFIG_NET_PCI is not set 454# CONFIG_NET_PCI is not set
456 455CONFIG_NETDEV_1000=y
457#
458# Ethernet (1000 Mbit)
459#
460# CONFIG_ACENIC is not set 456# CONFIG_ACENIC is not set
461# CONFIG_DL2K is not set 457# CONFIG_DL2K is not set
462# CONFIG_E1000 is not set 458# CONFIG_E1000 is not set
@@ -468,34 +464,28 @@ CONFIG_MII=y
468# CONFIG_SKGE is not set 464# CONFIG_SKGE is not set
469# CONFIG_SKY2 is not set 465# CONFIG_SKY2 is not set
470# CONFIG_SK98LIN is not set 466# CONFIG_SK98LIN is not set
467# CONFIG_VIA_VELOCITY is not set
471# CONFIG_TIGON3 is not set 468# CONFIG_TIGON3 is not set
472# CONFIG_BNX2 is not set 469# CONFIG_BNX2 is not set
473CONFIG_GIANFAR=y 470CONFIG_GIANFAR=y
474# CONFIG_GFAR_NAPI is not set 471# CONFIG_GFAR_NAPI is not set
475# CONFIG_QLA3XXX is not set 472# CONFIG_QLA3XXX is not set
476 473# CONFIG_ATL1 is not set
477# 474CONFIG_NETDEV_10000=y
478# Ethernet (10000 Mbit)
479#
480# CONFIG_CHELSIO_T1 is not set 475# CONFIG_CHELSIO_T1 is not set
476# CONFIG_CHELSIO_T3 is not set
481# CONFIG_IXGB is not set 477# CONFIG_IXGB is not set
482# CONFIG_S2IO is not set 478# CONFIG_S2IO is not set
483# CONFIG_MYRI10GE is not set 479# CONFIG_MYRI10GE is not set
484# CONFIG_NETXEN_NIC is not set 480# CONFIG_NETXEN_NIC is not set
485 481# CONFIG_MLX4_CORE is not set
486#
487# Token Ring devices
488#
489# CONFIG_TR is not set 482# CONFIG_TR is not set
490 483
491# 484#
492# Wireless LAN (non-hamradio) 485# Wireless LAN
493#
494# CONFIG_NET_RADIO is not set
495
496#
497# Wan interfaces
498# 486#
487# CONFIG_WLAN_PRE80211 is not set
488# CONFIG_WLAN_80211 is not set
499# CONFIG_WAN is not set 489# CONFIG_WAN is not set
500# CONFIG_FDDI is not set 490# CONFIG_FDDI is not set
501# CONFIG_HIPPI is not set 491# CONFIG_HIPPI is not set
@@ -521,6 +511,7 @@ CONFIG_GIANFAR=y
521# 511#
522CONFIG_INPUT=y 512CONFIG_INPUT=y
523# CONFIG_INPUT_FF_MEMLESS is not set 513# CONFIG_INPUT_FF_MEMLESS is not set
514# CONFIG_INPUT_POLLDEV is not set
524 515
525# 516#
526# Userland interfaces 517# Userland interfaces
@@ -537,6 +528,7 @@ CONFIG_INPUT=y
537# CONFIG_INPUT_KEYBOARD is not set 528# CONFIG_INPUT_KEYBOARD is not set
538# CONFIG_INPUT_MOUSE is not set 529# CONFIG_INPUT_MOUSE is not set
539# CONFIG_INPUT_JOYSTICK is not set 530# CONFIG_INPUT_JOYSTICK is not set
531# CONFIG_INPUT_TABLET is not set
540# CONFIG_INPUT_TOUCHSCREEN is not set 532# CONFIG_INPUT_TOUCHSCREEN is not set
541# CONFIG_INPUT_MISC is not set 533# CONFIG_INPUT_MISC is not set
542 534
@@ -581,6 +573,7 @@ CONFIG_SERIAL_8250_RSA=y
581CONFIG_SERIAL_CORE=y 573CONFIG_SERIAL_CORE=y
582CONFIG_SERIAL_CORE_CONSOLE=y 574CONFIG_SERIAL_CORE_CONSOLE=y
583# CONFIG_SERIAL_JSM is not set 575# CONFIG_SERIAL_JSM is not set
576# CONFIG_SERIAL_OF_PLATFORM is not set
584CONFIG_UNIX98_PTYS=y 577CONFIG_UNIX98_PTYS=y
585# CONFIG_LEGACY_PTYS is not set 578# CONFIG_LEGACY_PTYS is not set
586 579
@@ -588,15 +581,10 @@ CONFIG_UNIX98_PTYS=y
588# IPMI 581# IPMI
589# 582#
590# CONFIG_IPMI_HANDLER is not set 583# CONFIG_IPMI_HANDLER is not set
591
592#
593# Watchdog Cards
594#
595# CONFIG_WATCHDOG is not set 584# CONFIG_WATCHDOG is not set
596# CONFIG_HW_RANDOM is not set 585# CONFIG_HW_RANDOM is not set
597# CONFIG_NVRAM is not set 586# CONFIG_NVRAM is not set
598# CONFIG_GEN_RTC is not set 587# CONFIG_GEN_RTC is not set
599# CONFIG_DTLK is not set
600# CONFIG_R3964 is not set 588# CONFIG_R3964 is not set
601# CONFIG_APPLICOM is not set 589# CONFIG_APPLICOM is not set
602# CONFIG_AGP is not set 590# CONFIG_AGP is not set
@@ -607,11 +595,9 @@ CONFIG_UNIX98_PTYS=y
607# TPM devices 595# TPM devices
608# 596#
609# CONFIG_TCG_TPM is not set 597# CONFIG_TCG_TPM is not set
610 598CONFIG_DEVPORT=y
611#
612# I2C support
613#
614CONFIG_I2C=y 599CONFIG_I2C=y
600CONFIG_I2C_BOARDINFO=y
615# CONFIG_I2C_CHARDEV is not set 601# CONFIG_I2C_CHARDEV is not set
616 602
617# 603#
@@ -638,13 +624,13 @@ CONFIG_I2C_MPC=y
638# CONFIG_I2C_PARPORT_LIGHT is not set 624# CONFIG_I2C_PARPORT_LIGHT is not set
639# CONFIG_I2C_PROSAVAGE is not set 625# CONFIG_I2C_PROSAVAGE is not set
640# CONFIG_I2C_SAVAGE4 is not set 626# CONFIG_I2C_SAVAGE4 is not set
627# CONFIG_I2C_SIMTEC is not set
641# CONFIG_I2C_SIS5595 is not set 628# CONFIG_I2C_SIS5595 is not set
642# CONFIG_I2C_SIS630 is not set 629# CONFIG_I2C_SIS630 is not set
643# CONFIG_I2C_SIS96X is not set 630# CONFIG_I2C_SIS96X is not set
644# CONFIG_I2C_VIA is not set 631# CONFIG_I2C_VIA is not set
645# CONFIG_I2C_VIAPRO is not set 632# CONFIG_I2C_VIAPRO is not set
646# CONFIG_I2C_VOODOO3 is not set 633# CONFIG_I2C_VOODOO3 is not set
647# CONFIG_I2C_PCA_ISA is not set
648 634
649# 635#
650# Miscellaneous I2C Chip support 636# Miscellaneous I2C Chip support
@@ -672,27 +658,30 @@ CONFIG_SENSORS_EEPROM=y
672# Dallas's 1-wire bus 658# Dallas's 1-wire bus
673# 659#
674# CONFIG_W1 is not set 660# CONFIG_W1 is not set
661# CONFIG_HWMON is not set
675 662
676# 663#
677# Hardware Monitoring support 664# Multifunction device drivers
678# 665#
679# CONFIG_HWMON is not set 666# CONFIG_MFD_SM501 is not set
680# CONFIG_HWMON_VID is not set
681 667
682# 668#
683# Multimedia devices 669# Multimedia devices
684# 670#
685# CONFIG_VIDEO_DEV is not set 671# CONFIG_VIDEO_DEV is not set
672# CONFIG_DVB_CORE is not set
673CONFIG_DAB=y
686 674
687# 675#
688# Digital Video Broadcasting Devices 676# Graphics support
689# 677#
690# CONFIG_DVB is not set 678# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
691 679
692# 680#
693# Graphics support 681# Display device support
694# 682#
695CONFIG_FIRMWARE_EDID=y 683# CONFIG_DISPLAY_SUPPORT is not set
684# CONFIG_VGASTATE is not set
696# CONFIG_FB is not set 685# CONFIG_FB is not set
697# CONFIG_FB_IBM_GXT4500 is not set 686# CONFIG_FB_IBM_GXT4500 is not set
698 687
@@ -702,7 +691,6 @@ CONFIG_FIRMWARE_EDID=y
702CONFIG_VGA_CONSOLE=y 691CONFIG_VGA_CONSOLE=y
703# CONFIG_VGACON_SOFT_SCROLLBACK is not set 692# CONFIG_VGACON_SOFT_SCROLLBACK is not set
704CONFIG_DUMMY_CONSOLE=y 693CONFIG_DUMMY_CONSOLE=y
705# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
706 694
707# 695#
708# Sound 696# Sound
@@ -713,6 +701,7 @@ CONFIG_DUMMY_CONSOLE=y
713# HID Devices 701# HID Devices
714# 702#
715CONFIG_HID=y 703CONFIG_HID=y
704# CONFIG_HID_DEBUG is not set
716 705
717# 706#
718# USB support 707# USB support
@@ -730,10 +719,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
730# USB Gadget Support 719# USB Gadget Support
731# 720#
732# CONFIG_USB_GADGET is not set 721# CONFIG_USB_GADGET is not set
733
734#
735# MMC/SD Card support
736#
737# CONFIG_MMC is not set 722# CONFIG_MMC is not set
738 723
739# 724#
@@ -777,10 +762,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
777# 762#
778 763
779# 764#
780# Virtualization
781#
782
783#
784# File systems 765# File systems
785# 766#
786CONFIG_EXT2_FS=y 767CONFIG_EXT2_FS=y
@@ -869,6 +850,7 @@ CONFIG_LOCKD_V4=y
869CONFIG_EXPORTFS=y 850CONFIG_EXPORTFS=y
870CONFIG_NFS_COMMON=y 851CONFIG_NFS_COMMON=y
871CONFIG_SUNRPC=y 852CONFIG_SUNRPC=y
853# CONFIG_SUNRPC_BIND34 is not set
872# CONFIG_RPCSEC_GSS_KRB5 is not set 854# CONFIG_RPCSEC_GSS_KRB5 is not set
873# CONFIG_RPCSEC_GSS_SPKM3 is not set 855# CONFIG_RPCSEC_GSS_SPKM3 is not set
874# CONFIG_SMB_FS is not set 856# CONFIG_SMB_FS is not set
@@ -899,6 +881,7 @@ CONFIG_LDM_PARTITION=y
899# CONFIG_SUN_PARTITION is not set 881# CONFIG_SUN_PARTITION is not set
900# CONFIG_KARMA_PARTITION is not set 882# CONFIG_KARMA_PARTITION is not set
901# CONFIG_EFI_PARTITION is not set 883# CONFIG_EFI_PARTITION is not set
884# CONFIG_SYSV68_PARTITION is not set
902 885
903# 886#
904# Native Language Support 887# Native Language Support
@@ -948,6 +931,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
948# Distributed Lock Manager 931# Distributed Lock Manager
949# 932#
950# CONFIG_DLM is not set 933# CONFIG_DLM is not set
934# CONFIG_UCC_SLOW is not set
951 935
952# 936#
953# Library routines 937# Library routines
@@ -955,10 +939,13 @@ CONFIG_NLS_DEFAULT="iso8859-1"
955CONFIG_BITREVERSE=y 939CONFIG_BITREVERSE=y
956# CONFIG_CRC_CCITT is not set 940# CONFIG_CRC_CCITT is not set
957# CONFIG_CRC16 is not set 941# CONFIG_CRC16 is not set
942# CONFIG_CRC_ITU_T is not set
958CONFIG_CRC32=y 943CONFIG_CRC32=y
959# CONFIG_LIBCRC32C is not set 944# CONFIG_LIBCRC32C is not set
960CONFIG_PLIST=y 945CONFIG_PLIST=y
961CONFIG_IOMAP_COPY=y 946CONFIG_HAS_IOMEM=y
947CONFIG_HAS_IOPORT=y
948CONFIG_HAS_DMA=y
962 949
963# 950#
964# Instrumentation Support 951# Instrumentation Support
@@ -975,15 +962,15 @@ CONFIG_ENABLE_MUST_CHECK=y
975# CONFIG_DEBUG_FS is not set 962# CONFIG_DEBUG_FS is not set
976# CONFIG_HEADERS_CHECK is not set 963# CONFIG_HEADERS_CHECK is not set
977CONFIG_DEBUG_KERNEL=y 964CONFIG_DEBUG_KERNEL=y
978CONFIG_LOG_BUF_SHIFT=14 965# CONFIG_DEBUG_SHIRQ is not set
979CONFIG_DETECT_SOFTLOCKUP=y 966CONFIG_DETECT_SOFTLOCKUP=y
980# CONFIG_SCHEDSTATS is not set 967# CONFIG_SCHEDSTATS is not set
968# CONFIG_TIMER_STATS is not set
981# CONFIG_DEBUG_SLAB is not set 969# CONFIG_DEBUG_SLAB is not set
982# CONFIG_DEBUG_RT_MUTEXES is not set 970# CONFIG_DEBUG_RT_MUTEXES is not set
983# CONFIG_RT_MUTEX_TESTER is not set 971# CONFIG_RT_MUTEX_TESTER is not set
984# CONFIG_DEBUG_SPINLOCK is not set 972# CONFIG_DEBUG_SPINLOCK is not set
985# CONFIG_DEBUG_MUTEXES is not set 973# CONFIG_DEBUG_MUTEXES is not set
986# CONFIG_DEBUG_RWSEMS is not set
987# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 974# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
988# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 975# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
989# CONFIG_DEBUG_KOBJECT is not set 976# CONFIG_DEBUG_KOBJECT is not set
@@ -993,7 +980,10 @@ CONFIG_DETECT_SOFTLOCKUP=y
993# CONFIG_DEBUG_VM is not set 980# CONFIG_DEBUG_VM is not set
994# CONFIG_DEBUG_LIST is not set 981# CONFIG_DEBUG_LIST is not set
995CONFIG_FORCED_INLINING=y 982CONFIG_FORCED_INLINING=y
996# CONFIG_RCU_TORTURE_TEST is not set 983# CONFIG_FAULT_INJECTION is not set
984# CONFIG_DEBUG_STACKOVERFLOW is not set
985# CONFIG_DEBUG_STACK_USAGE is not set
986# CONFIG_DEBUG_PAGEALLOC is not set
997# CONFIG_DEBUGGER is not set 987# CONFIG_DEBUGGER is not set
998# CONFIG_BDI_SWITCH is not set 988# CONFIG_BDI_SWITCH is not set
999# CONFIG_BOOTX_TEXT is not set 989# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/mpc866_ads_defconfig b/arch/powerpc/configs/mpc866_ads_defconfig
index 539d9e3d3668..e6b18ea8f643 100644
--- a/arch/powerpc/configs/mpc866_ads_defconfig
+++ b/arch/powerpc/configs/mpc866_ads_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.19-rc6 3# Linux kernel version: 2.6.22-rc7
4# Fri Nov 24 21:13:55 2006 4# Sun Jul 1 23:57:00 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y 11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y 12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
13CONFIG_GENERIC_HWEIGHT=y 14CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_CALIBRATE_DELAY=y 15CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y 16CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -28,7 +29,6 @@ CONFIG_AUDIT_ARCH=y
28# Processor support 29# Processor support
29# 30#
30# CONFIG_CLASSIC32 is not set 31# CONFIG_CLASSIC32 is not set
31# CONFIG_PPC_52xx is not set
32# CONFIG_PPC_82xx is not set 32# CONFIG_PPC_82xx is not set
33# CONFIG_PPC_83xx is not set 33# CONFIG_PPC_83xx is not set
34# CONFIG_PPC_85xx is not set 34# CONFIG_PPC_85xx is not set
@@ -40,6 +40,7 @@ CONFIG_PPC_8xx=y
40CONFIG_8xx=y 40CONFIG_8xx=y
41# CONFIG_PPC_DCR_NATIVE is not set 41# CONFIG_PPC_DCR_NATIVE is not set
42# CONFIG_PPC_DCR_MMIO is not set 42# CONFIG_PPC_DCR_MMIO is not set
43# CONFIG_PPC_MM_SLICES is not set
43CONFIG_NOT_COHERENT_CACHE=y 44CONFIG_NOT_COHERENT_CACHE=y
44CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 45CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
45 46
@@ -58,14 +59,17 @@ CONFIG_LOCALVERSION_AUTO=y
58# CONFIG_SWAP is not set 59# CONFIG_SWAP is not set
59CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
60# CONFIG_IPC_NS is not set 61# CONFIG_IPC_NS is not set
62CONFIG_SYSVIPC_SYSCTL=y
61# CONFIG_POSIX_MQUEUE is not set 63# CONFIG_POSIX_MQUEUE is not set
62# CONFIG_BSD_PROCESS_ACCT is not set 64# CONFIG_BSD_PROCESS_ACCT is not set
63# CONFIG_TASKSTATS is not set 65# CONFIG_TASKSTATS is not set
64# CONFIG_UTS_NS is not set 66# CONFIG_UTS_NS is not set
65# CONFIG_AUDIT is not set 67# CONFIG_AUDIT is not set
66# CONFIG_IKCONFIG is not set 68# CONFIG_IKCONFIG is not set
69CONFIG_LOG_BUF_SHIFT=14
70CONFIG_SYSFS_DEPRECATED=y
67# CONFIG_RELAY is not set 71# CONFIG_RELAY is not set
68CONFIG_INITRAMFS_SOURCE="" 72# CONFIG_BLK_DEV_INITRD is not set
69# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 73# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
70CONFIG_SYSCTL=y 74CONFIG_SYSCTL=y
71CONFIG_EMBEDDED=y 75CONFIG_EMBEDDED=y
@@ -78,14 +82,19 @@ CONFIG_PRINTK=y
78CONFIG_ELF_CORE=y 82CONFIG_ELF_CORE=y
79# CONFIG_BASE_FULL is not set 83# CONFIG_BASE_FULL is not set
80CONFIG_FUTEX=y 84CONFIG_FUTEX=y
85CONFIG_ANON_INODES=y
81# CONFIG_EPOLL is not set 86# CONFIG_EPOLL is not set
87CONFIG_SIGNALFD=y
88CONFIG_TIMERFD=y
89CONFIG_EVENTFD=y
82CONFIG_SHMEM=y 90CONFIG_SHMEM=y
83CONFIG_SLAB=y
84# CONFIG_VM_EVENT_COUNTERS is not set 91# CONFIG_VM_EVENT_COUNTERS is not set
92CONFIG_SLAB=y
93# CONFIG_SLUB is not set
94# CONFIG_SLOB is not set
85CONFIG_RT_MUTEXES=y 95CONFIG_RT_MUTEXES=y
86# CONFIG_TINY_SHMEM is not set 96# CONFIG_TINY_SHMEM is not set
87CONFIG_BASE_SMALL=1 97CONFIG_BASE_SMALL=1
88# CONFIG_SLOB is not set
89 98
90# 99#
91# Loadable module support 100# Loadable module support
@@ -112,13 +121,14 @@ CONFIG_DEFAULT_AS=y
112# CONFIG_DEFAULT_CFQ is not set 121# CONFIG_DEFAULT_CFQ is not set
113# CONFIG_DEFAULT_NOOP is not set 122# CONFIG_DEFAULT_NOOP is not set
114CONFIG_DEFAULT_IOSCHED="anticipatory" 123CONFIG_DEFAULT_IOSCHED="anticipatory"
115# CONFIG_WANT_EARLY_SERIAL is not set
116CONFIG_EMBEDDEDBOOT=y
117# CONFIG_MPIC is not set
118 124
119# 125#
120# Platform support 126# Platform support
121# 127#
128# CONFIG_PPC_MPC52xx is not set
129# CONFIG_PPC_MPC5200 is not set
130# CONFIG_PPC_CELL is not set
131# CONFIG_PPC_CELL_NATIVE is not set
122CONFIG_CPM1=y 132CONFIG_CPM1=y
123# CONFIG_MPC8XXFADS is not set 133# CONFIG_MPC8XXFADS is not set
124CONFIG_MPC86XADS=y 134CONFIG_MPC86XADS=y
@@ -137,6 +147,18 @@ CONFIG_NO_UCODE_PATCH=y
137# CONFIG_USB_SOF_UCODE_PATCH is not set 147# CONFIG_USB_SOF_UCODE_PATCH is not set
138# CONFIG_I2C_SPI_UCODE_PATCH is not set 148# CONFIG_I2C_SPI_UCODE_PATCH is not set
139# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set 149# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
150# CONFIG_PQ2ADS is not set
151# CONFIG_MPIC is not set
152# CONFIG_MPIC_WEIRD is not set
153# CONFIG_PPC_I8259 is not set
154# CONFIG_PPC_RTAS is not set
155# CONFIG_MMIO_NVRAM is not set
156# CONFIG_PPC_MPC106 is not set
157# CONFIG_PPC_970_NAP is not set
158# CONFIG_PPC_INDIRECT_IO is not set
159# CONFIG_GENERIC_IOMAP is not set
160# CONFIG_CPU_FREQ is not set
161# CONFIG_CPM2 is not set
140 162
141# 163#
142# Kernel options 164# Kernel options
@@ -144,6 +166,7 @@ CONFIG_NO_UCODE_PATCH=y
144# CONFIG_HIGHMEM is not set 166# CONFIG_HIGHMEM is not set
145# CONFIG_HZ_100 is not set 167# CONFIG_HZ_100 is not set
146# CONFIG_HZ_250 is not set 168# CONFIG_HZ_250 is not set
169# CONFIG_HZ_300 is not set
147CONFIG_HZ_1000=y 170CONFIG_HZ_1000=y
148CONFIG_HZ=1000 171CONFIG_HZ=1000
149CONFIG_PREEMPT_NONE=y 172CONFIG_PREEMPT_NONE=y
@@ -164,31 +187,29 @@ CONFIG_FLAT_NODE_MEM_MAP=y
164# CONFIG_SPARSEMEM_STATIC is not set 187# CONFIG_SPARSEMEM_STATIC is not set
165CONFIG_SPLIT_PTLOCK_CPUS=4 188CONFIG_SPLIT_PTLOCK_CPUS=4
166# CONFIG_RESOURCES_64BIT is not set 189# CONFIG_RESOURCES_64BIT is not set
190CONFIG_ZONE_DMA_FLAG=1
167# CONFIG_PROC_DEVICETREE is not set 191# CONFIG_PROC_DEVICETREE is not set
168# CONFIG_CMDLINE_BOOL is not set 192# CONFIG_CMDLINE_BOOL is not set
169# CONFIG_PM is not set 193# CONFIG_PM is not set
170# CONFIG_SECCOMP is not set 194# CONFIG_SECCOMP is not set
195# CONFIG_WANT_DEVICE_TREE is not set
171CONFIG_ISA_DMA_API=y 196CONFIG_ISA_DMA_API=y
172 197
173# 198#
174# Bus options 199# Bus options
175# 200#
176# CONFIG_MPIC_WEIRD is not set 201CONFIG_ZONE_DMA=y
177# CONFIG_PPC_I8259 is not set
178CONFIG_FSL_SOC=y 202CONFIG_FSL_SOC=y
179# CONFIG_PCI is not set 203# CONFIG_PCI is not set
180# CONFIG_PCI_DOMAINS is not set 204# CONFIG_PCI_DOMAINS is not set
181# CONFIG_PCI_QSPAN is not set 205# CONFIG_PCI_QSPAN is not set
206# CONFIG_ARCH_SUPPORTS_MSI is not set
182 207
183# 208#
184# PCCARD (PCMCIA/CardBus) support 209# PCCARD (PCMCIA/CardBus) support
185# 210#
186 211
187# 212#
188# PCI Hotplug Support
189#
190
191#
192# Advanced setup 213# Advanced setup
193# 214#
194# CONFIG_ADVANCED_OPTIONS is not set 215# CONFIG_ADVANCED_OPTIONS is not set
@@ -212,13 +233,13 @@ CONFIG_NET=y
212# 233#
213# Networking options 234# Networking options
214# 235#
215# CONFIG_NETDEBUG is not set
216CONFIG_PACKET=y 236CONFIG_PACKET=y
217# CONFIG_PACKET_MMAP is not set 237# CONFIG_PACKET_MMAP is not set
218CONFIG_UNIX=y 238CONFIG_UNIX=y
219CONFIG_XFRM=y 239CONFIG_XFRM=y
220# CONFIG_XFRM_USER is not set 240# CONFIG_XFRM_USER is not set
221# CONFIG_XFRM_SUB_POLICY is not set 241# CONFIG_XFRM_SUB_POLICY is not set
242# CONFIG_XFRM_MIGRATE is not set
222# CONFIG_NET_KEY is not set 243# CONFIG_NET_KEY is not set
223CONFIG_INET=y 244CONFIG_INET=y
224CONFIG_IP_MULTICAST=y 245CONFIG_IP_MULTICAST=y
@@ -246,25 +267,14 @@ CONFIG_INET_TCP_DIAG=y
246# CONFIG_TCP_CONG_ADVANCED is not set 267# CONFIG_TCP_CONG_ADVANCED is not set
247CONFIG_TCP_CONG_CUBIC=y 268CONFIG_TCP_CONG_CUBIC=y
248CONFIG_DEFAULT_TCP_CONG="cubic" 269CONFIG_DEFAULT_TCP_CONG="cubic"
270# CONFIG_TCP_MD5SIG is not set
249# CONFIG_IPV6 is not set 271# CONFIG_IPV6 is not set
250# CONFIG_INET6_XFRM_TUNNEL is not set 272# CONFIG_INET6_XFRM_TUNNEL is not set
251# CONFIG_INET6_TUNNEL is not set 273# CONFIG_INET6_TUNNEL is not set
252# CONFIG_NETWORK_SECMARK is not set 274# CONFIG_NETWORK_SECMARK is not set
253# CONFIG_NETFILTER is not set 275# CONFIG_NETFILTER is not set
254
255#
256# DCCP Configuration (EXPERIMENTAL)
257#
258# CONFIG_IP_DCCP is not set 276# CONFIG_IP_DCCP is not set
259
260#
261# SCTP Configuration (EXPERIMENTAL)
262#
263# CONFIG_IP_SCTP is not set 277# CONFIG_IP_SCTP is not set
264
265#
266# TIPC Configuration (EXPERIMENTAL)
267#
268# CONFIG_TIPC is not set 278# CONFIG_TIPC is not set
269# CONFIG_ATM is not set 279# CONFIG_ATM is not set
270# CONFIG_BRIDGE is not set 280# CONFIG_BRIDGE is not set
@@ -290,7 +300,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
290# CONFIG_HAMRADIO is not set 300# CONFIG_HAMRADIO is not set
291# CONFIG_IRDA is not set 301# CONFIG_IRDA is not set
292# CONFIG_BT is not set 302# CONFIG_BT is not set
303# CONFIG_AF_RXRPC is not set
304
305#
306# Wireless
307#
308# CONFIG_CFG80211 is not set
309# CONFIG_WIRELESS_EXT is not set
310# CONFIG_MAC80211 is not set
293# CONFIG_IEEE80211 is not set 311# CONFIG_IEEE80211 is not set
312# CONFIG_RFKILL is not set
294 313
295# 314#
296# Device Drivers 315# Device Drivers
@@ -307,10 +326,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
307# Connector - unified userspace <-> kernelspace linker 326# Connector - unified userspace <-> kernelspace linker
308# 327#
309# CONFIG_CONNECTOR is not set 328# CONFIG_CONNECTOR is not set
310
311#
312# Memory Technology Devices (MTD)
313#
314# CONFIG_MTD is not set 329# CONFIG_MTD is not set
315 330
316# 331#
@@ -321,6 +336,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
321# 336#
322# Plug and Play support 337# Plug and Play support
323# 338#
339# CONFIG_PNPACPI is not set
324 340
325# 341#
326# Block devices 342# Block devices
@@ -331,18 +347,13 @@ CONFIG_BLK_DEV_LOOP=y
331# CONFIG_BLK_DEV_CRYPTOLOOP is not set 347# CONFIG_BLK_DEV_CRYPTOLOOP is not set
332# CONFIG_BLK_DEV_NBD is not set 348# CONFIG_BLK_DEV_NBD is not set
333# CONFIG_BLK_DEV_RAM is not set 349# CONFIG_BLK_DEV_RAM is not set
334# CONFIG_BLK_DEV_INITRD is not set
335# CONFIG_CDROM_PKTCDVD is not set 350# CONFIG_CDROM_PKTCDVD is not set
336# CONFIG_ATA_OVER_ETH is not set 351# CONFIG_ATA_OVER_ETH is not set
337 352
338# 353#
339# Misc devices 354# Misc devices
340# 355#
341# CONFIG_TIFM_CORE is not set 356# CONFIG_BLINK is not set
342
343#
344# ATA/ATAPI/MFM/RLL support
345#
346# CONFIG_IDE is not set 357# CONFIG_IDE is not set
347 358
348# 359#
@@ -351,34 +362,13 @@ CONFIG_BLK_DEV_LOOP=y
351# CONFIG_RAID_ATTRS is not set 362# CONFIG_RAID_ATTRS is not set
352# CONFIG_SCSI is not set 363# CONFIG_SCSI is not set
353# CONFIG_SCSI_NETLINK is not set 364# CONFIG_SCSI_NETLINK is not set
354
355#
356# Serial ATA (prod) and Parallel ATA (experimental) drivers
357#
358# CONFIG_ATA is not set 365# CONFIG_ATA is not set
359 366
360# 367#
361# Multi-device support (RAID and LVM) 368# Multi-device support (RAID and LVM)
362# 369#
363# CONFIG_MD is not set 370# CONFIG_MD is not set
364 371# CONFIG_MACINTOSH_DRIVERS is not set
365#
366# Fusion MPT device support
367#
368# CONFIG_FUSION is not set
369
370#
371# IEEE 1394 (FireWire) support
372#
373
374#
375# I2O device support
376#
377
378#
379# Macintosh device drivers
380#
381# CONFIG_WINDFARM is not set
382 372
383# 373#
384# Network device support 374# Network device support
@@ -388,10 +378,6 @@ CONFIG_NETDEVICES=y
388# CONFIG_BONDING is not set 378# CONFIG_BONDING is not set
389# CONFIG_EQUALIZER is not set 379# CONFIG_EQUALIZER is not set
390# CONFIG_TUN is not set 380# CONFIG_TUN is not set
391
392#
393# PHY device support
394#
395CONFIG_PHYLIB=y 381CONFIG_PHYLIB=y
396 382
397# 383#
@@ -404,6 +390,7 @@ CONFIG_PHYLIB=y
404# CONFIG_CICADA_PHY is not set 390# CONFIG_CICADA_PHY is not set
405# CONFIG_VITESSE_PHY is not set 391# CONFIG_VITESSE_PHY is not set
406# CONFIG_SMSC_PHY is not set 392# CONFIG_SMSC_PHY is not set
393# CONFIG_BROADCOM_PHY is not set
407CONFIG_FIXED_PHY=y 394CONFIG_FIXED_PHY=y
408CONFIG_FIXED_MII_10_FDX=y 395CONFIG_FIXED_MII_10_FDX=y
409CONFIG_FIXED_MII_100_FDX=y 396CONFIG_FIXED_MII_100_FDX=y
@@ -417,27 +404,14 @@ CONFIG_MII=y
417CONFIG_FS_ENET=y 404CONFIG_FS_ENET=y
418CONFIG_FS_ENET_HAS_SCC=y 405CONFIG_FS_ENET_HAS_SCC=y
419CONFIG_FS_ENET_HAS_FEC=y 406CONFIG_FS_ENET_HAS_FEC=y
407CONFIG_NETDEV_1000=y
408CONFIG_NETDEV_10000=y
420 409
421# 410#
422# Ethernet (1000 Mbit) 411# Wireless LAN
423#
424
425#
426# Ethernet (10000 Mbit)
427#
428
429#
430# Token Ring devices
431#
432
433#
434# Wireless LAN (non-hamradio)
435#
436# CONFIG_NET_RADIO is not set
437
438#
439# Wan interfaces
440# 412#
413# CONFIG_WLAN_PRE80211 is not set
414# CONFIG_WLAN_80211 is not set
441# CONFIG_WAN is not set 415# CONFIG_WAN is not set
442# CONFIG_PPP is not set 416# CONFIG_PPP is not set
443# CONFIG_SLIP is not set 417# CONFIG_SLIP is not set
@@ -461,6 +435,7 @@ CONFIG_FS_ENET_HAS_FEC=y
461# 435#
462CONFIG_INPUT=y 436CONFIG_INPUT=y
463# CONFIG_INPUT_FF_MEMLESS is not set 437# CONFIG_INPUT_FF_MEMLESS is not set
438# CONFIG_INPUT_POLLDEV is not set
464 439
465# 440#
466# Userland interfaces 441# Userland interfaces
@@ -486,9 +461,16 @@ CONFIG_KEYBOARD_ATKBD=y
486# CONFIG_KEYBOARD_STOWAWAY is not set 461# CONFIG_KEYBOARD_STOWAWAY is not set
487CONFIG_INPUT_MOUSE=y 462CONFIG_INPUT_MOUSE=y
488CONFIG_MOUSE_PS2=y 463CONFIG_MOUSE_PS2=y
464CONFIG_MOUSE_PS2_ALPS=y
465CONFIG_MOUSE_PS2_LOGIPS2PP=y
466CONFIG_MOUSE_PS2_SYNAPTICS=y
467CONFIG_MOUSE_PS2_LIFEBOOK=y
468CONFIG_MOUSE_PS2_TRACKPOINT=y
469# CONFIG_MOUSE_PS2_TOUCHKIT is not set
489# CONFIG_MOUSE_SERIAL is not set 470# CONFIG_MOUSE_SERIAL is not set
490# CONFIG_MOUSE_VSXXXAA is not set 471# CONFIG_MOUSE_VSXXXAA is not set
491# CONFIG_INPUT_JOYSTICK is not set 472# CONFIG_INPUT_JOYSTICK is not set
473# CONFIG_INPUT_TABLET is not set
492# CONFIG_INPUT_TOUCHSCREEN is not set 474# CONFIG_INPUT_TOUCHSCREEN is not set
493# CONFIG_INPUT_MISC is not set 475# CONFIG_INPUT_MISC is not set
494 476
@@ -516,6 +498,7 @@ CONFIG_SERIO_LIBPS2=y
516# 498#
517# Non-8250 serial port support 499# Non-8250 serial port support
518# 500#
501# CONFIG_SERIAL_UARTLITE is not set
519CONFIG_SERIAL_CORE=y 502CONFIG_SERIAL_CORE=y
520CONFIG_SERIAL_CORE_CONSOLE=y 503CONFIG_SERIAL_CORE_CONSOLE=y
521CONFIG_SERIAL_CPM=y 504CONFIG_SERIAL_CPM=y
@@ -533,31 +516,18 @@ CONFIG_UNIX98_PTYS=y
533# IPMI 516# IPMI
534# 517#
535# CONFIG_IPMI_HANDLER is not set 518# CONFIG_IPMI_HANDLER is not set
536
537#
538# Watchdog Cards
539#
540# CONFIG_WATCHDOG is not set 519# CONFIG_WATCHDOG is not set
541CONFIG_HW_RANDOM=y 520CONFIG_HW_RANDOM=y
542# CONFIG_NVRAM is not set 521# CONFIG_NVRAM is not set
543CONFIG_GEN_RTC=y 522CONFIG_GEN_RTC=y
544# CONFIG_GEN_RTC_X is not set 523# CONFIG_GEN_RTC_X is not set
545# CONFIG_DTLK is not set
546# CONFIG_R3964 is not set 524# CONFIG_R3964 is not set
547
548#
549# Ftape, the floppy tape device driver
550#
551# CONFIG_RAW_DRIVER is not set 525# CONFIG_RAW_DRIVER is not set
552 526
553# 527#
554# TPM devices 528# TPM devices
555# 529#
556# CONFIG_TCG_TPM is not set 530# CONFIG_TCG_TPM is not set
557
558#
559# I2C support
560#
561# CONFIG_I2C is not set 531# CONFIG_I2C is not set
562 532
563# 533#
@@ -570,33 +540,41 @@ CONFIG_GEN_RTC=y
570# Dallas's 1-wire bus 540# Dallas's 1-wire bus
571# 541#
572# CONFIG_W1 is not set 542# CONFIG_W1 is not set
573
574#
575# Hardware Monitoring support
576#
577CONFIG_HWMON=y 543CONFIG_HWMON=y
578# CONFIG_HWMON_VID is not set 544# CONFIG_HWMON_VID is not set
579# CONFIG_SENSORS_ABITUGURU is not set 545# CONFIG_SENSORS_ABITUGURU is not set
580# CONFIG_SENSORS_F71805F is not set 546# CONFIG_SENSORS_F71805F is not set
547# CONFIG_SENSORS_PC87427 is not set
548# CONFIG_SENSORS_SMSC47M1 is not set
549# CONFIG_SENSORS_SMSC47B397 is not set
581# CONFIG_SENSORS_VT1211 is not set 550# CONFIG_SENSORS_VT1211 is not set
551# CONFIG_SENSORS_W83627HF is not set
582# CONFIG_HWMON_DEBUG_CHIP is not set 552# CONFIG_HWMON_DEBUG_CHIP is not set
583 553
584# 554#
555# Multifunction device drivers
556#
557# CONFIG_MFD_SM501 is not set
558
559#
585# Multimedia devices 560# Multimedia devices
586# 561#
587# CONFIG_VIDEO_DEV is not set 562# CONFIG_VIDEO_DEV is not set
563# CONFIG_DVB_CORE is not set
564CONFIG_DAB=y
588 565
589# 566#
590# Digital Video Broadcasting Devices 567# Graphics support
591# 568#
592# CONFIG_DVB is not set 569# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
593 570
594# 571#
595# Graphics support 572# Display device support
596# 573#
597CONFIG_FIRMWARE_EDID=y 574# CONFIG_DISPLAY_SUPPORT is not set
575# CONFIG_VGASTATE is not set
598# CONFIG_FB is not set 576# CONFIG_FB is not set
599# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 577# CONFIG_FB_IBM_GXT4500 is not set
600 578
601# 579#
602# Sound 580# Sound
@@ -604,6 +582,12 @@ CONFIG_FIRMWARE_EDID=y
604# CONFIG_SOUND is not set 582# CONFIG_SOUND is not set
605 583
606# 584#
585# HID Devices
586#
587CONFIG_HID=y
588# CONFIG_HID_DEBUG is not set
589
590#
607# USB support 591# USB support
608# 592#
609# CONFIG_USB_ARCH_HAS_HCD is not set 593# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -618,10 +602,6 @@ CONFIG_FIRMWARE_EDID=y
618# USB Gadget Support 602# USB Gadget Support
619# 603#
620# CONFIG_USB_GADGET is not set 604# CONFIG_USB_GADGET is not set
621
622#
623# MMC/SD Card support
624#
625# CONFIG_MMC is not set 605# CONFIG_MMC is not set
626 606
627# 607#
@@ -752,6 +732,7 @@ CONFIG_LOCKD=y
752CONFIG_LOCKD_V4=y 732CONFIG_LOCKD_V4=y
753CONFIG_NFS_COMMON=y 733CONFIG_NFS_COMMON=y
754CONFIG_SUNRPC=y 734CONFIG_SUNRPC=y
735# CONFIG_SUNRPC_BIND34 is not set
755# CONFIG_RPCSEC_GSS_KRB5 is not set 736# CONFIG_RPCSEC_GSS_KRB5 is not set
756# CONFIG_RPCSEC_GSS_SPKM3 is not set 737# CONFIG_RPCSEC_GSS_SPKM3 is not set
757# CONFIG_SMB_FS is not set 738# CONFIG_SMB_FS is not set
@@ -781,6 +762,7 @@ CONFIG_MSDOS_PARTITION=y
781# CONFIG_SUN_PARTITION is not set 762# CONFIG_SUN_PARTITION is not set
782# CONFIG_KARMA_PARTITION is not set 763# CONFIG_KARMA_PARTITION is not set
783# CONFIG_EFI_PARTITION is not set 764# CONFIG_EFI_PARTITION is not set
765# CONFIG_SYSV68_PARTITION is not set
784 766
785# 767#
786# Native Language Support 768# Native Language Support
@@ -788,14 +770,25 @@ CONFIG_MSDOS_PARTITION=y
788# CONFIG_NLS is not set 770# CONFIG_NLS is not set
789 771
790# 772#
773# Distributed Lock Manager
774#
775# CONFIG_DLM is not set
776# CONFIG_UCC_SLOW is not set
777
778#
791# Library routines 779# Library routines
792# 780#
781CONFIG_BITREVERSE=y
793CONFIG_CRC_CCITT=y 782CONFIG_CRC_CCITT=y
794# CONFIG_CRC16 is not set 783# CONFIG_CRC16 is not set
784# CONFIG_CRC_ITU_T is not set
795CONFIG_CRC32=y 785CONFIG_CRC32=y
796# CONFIG_LIBCRC32C is not set 786# CONFIG_LIBCRC32C is not set
797CONFIG_ZLIB_INFLATE=y 787CONFIG_ZLIB_INFLATE=y
798CONFIG_PLIST=y 788CONFIG_PLIST=y
789CONFIG_HAS_IOMEM=y
790CONFIG_HAS_IOPORT=y
791CONFIG_HAS_DMA=y
799 792
800# 793#
801# Instrumentation Support 794# Instrumentation Support
@@ -809,11 +802,9 @@ CONFIG_PLIST=y
809CONFIG_ENABLE_MUST_CHECK=y 802CONFIG_ENABLE_MUST_CHECK=y
810# CONFIG_MAGIC_SYSRQ is not set 803# CONFIG_MAGIC_SYSRQ is not set
811# CONFIG_UNUSED_SYMBOLS is not set 804# CONFIG_UNUSED_SYMBOLS is not set
812# CONFIG_DEBUG_KERNEL is not set
813CONFIG_LOG_BUF_SHIFT=14
814# CONFIG_DEBUG_FS is not set 805# CONFIG_DEBUG_FS is not set
815# CONFIG_UNWIND_INFO is not set
816# CONFIG_HEADERS_CHECK is not set 806# CONFIG_HEADERS_CHECK is not set
807# CONFIG_DEBUG_KERNEL is not set
817# CONFIG_BOOTX_TEXT is not set 808# CONFIG_BOOTX_TEXT is not set
818# CONFIG_PPC_EARLY_DEBUG is not set 809# CONFIG_PPC_EARLY_DEBUG is not set
819 810
diff --git a/arch/powerpc/configs/mpc885_ads_defconfig b/arch/powerpc/configs/mpc885_ads_defconfig
index e2c17d8da4fc..fc4f9b766aa7 100644
--- a/arch/powerpc/configs/mpc885_ads_defconfig
+++ b/arch/powerpc/configs/mpc885_ads_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.19-rc4 3# Linux kernel version: 2.6.22-rc7
4# Fri Nov 10 21:30:40 2006 4# Sun Jul 1 23:57:01 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y 11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y 12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
13CONFIG_GENERIC_HWEIGHT=y 14CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_CALIBRATE_DELAY=y 15CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y 16CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -28,7 +29,6 @@ CONFIG_AUDIT_ARCH=y
28# Processor support 29# Processor support
29# 30#
30# CONFIG_CLASSIC32 is not set 31# CONFIG_CLASSIC32 is not set
31# CONFIG_PPC_52xx is not set
32# CONFIG_PPC_82xx is not set 32# CONFIG_PPC_82xx is not set
33# CONFIG_PPC_83xx is not set 33# CONFIG_PPC_83xx is not set
34# CONFIG_PPC_85xx is not set 34# CONFIG_PPC_85xx is not set
@@ -38,6 +38,9 @@ CONFIG_PPC_8xx=y
38# CONFIG_44x is not set 38# CONFIG_44x is not set
39# CONFIG_E200 is not set 39# CONFIG_E200 is not set
40CONFIG_8xx=y 40CONFIG_8xx=y
41# CONFIG_PPC_DCR_NATIVE is not set
42# CONFIG_PPC_DCR_MMIO is not set
43# CONFIG_PPC_MM_SLICES is not set
41CONFIG_NOT_COHERENT_CACHE=y 44CONFIG_NOT_COHERENT_CACHE=y
42CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 45CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
43 46
@@ -56,14 +59,17 @@ CONFIG_LOCALVERSION_AUTO=y
56# CONFIG_SWAP is not set 59# CONFIG_SWAP is not set
57CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
58# CONFIG_IPC_NS is not set 61# CONFIG_IPC_NS is not set
62CONFIG_SYSVIPC_SYSCTL=y
59# CONFIG_POSIX_MQUEUE is not set 63# CONFIG_POSIX_MQUEUE is not set
60# CONFIG_BSD_PROCESS_ACCT is not set 64# CONFIG_BSD_PROCESS_ACCT is not set
61# CONFIG_TASKSTATS is not set 65# CONFIG_TASKSTATS is not set
62# CONFIG_UTS_NS is not set 66# CONFIG_UTS_NS is not set
63# CONFIG_AUDIT is not set 67# CONFIG_AUDIT is not set
64# CONFIG_IKCONFIG is not set 68# CONFIG_IKCONFIG is not set
69CONFIG_LOG_BUF_SHIFT=14
70CONFIG_SYSFS_DEPRECATED=y
65# CONFIG_RELAY is not set 71# CONFIG_RELAY is not set
66CONFIG_INITRAMFS_SOURCE="" 72# CONFIG_BLK_DEV_INITRD is not set
67# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 73# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
68CONFIG_SYSCTL=y 74CONFIG_SYSCTL=y
69CONFIG_EMBEDDED=y 75CONFIG_EMBEDDED=y
@@ -76,14 +82,19 @@ CONFIG_PRINTK=y
76CONFIG_ELF_CORE=y 82CONFIG_ELF_CORE=y
77# CONFIG_BASE_FULL is not set 83# CONFIG_BASE_FULL is not set
78CONFIG_FUTEX=y 84CONFIG_FUTEX=y
85CONFIG_ANON_INODES=y
79# CONFIG_EPOLL is not set 86# CONFIG_EPOLL is not set
87CONFIG_SIGNALFD=y
88CONFIG_TIMERFD=y
89CONFIG_EVENTFD=y
80CONFIG_SHMEM=y 90CONFIG_SHMEM=y
81CONFIG_SLAB=y
82# CONFIG_VM_EVENT_COUNTERS is not set 91# CONFIG_VM_EVENT_COUNTERS is not set
92CONFIG_SLAB=y
93# CONFIG_SLUB is not set
94# CONFIG_SLOB is not set
83CONFIG_RT_MUTEXES=y 95CONFIG_RT_MUTEXES=y
84# CONFIG_TINY_SHMEM is not set 96# CONFIG_TINY_SHMEM is not set
85CONFIG_BASE_SMALL=1 97CONFIG_BASE_SMALL=1
86# CONFIG_SLOB is not set
87 98
88# 99#
89# Loadable module support 100# Loadable module support
@@ -110,19 +121,27 @@ CONFIG_DEFAULT_AS=y
110# CONFIG_DEFAULT_CFQ is not set 121# CONFIG_DEFAULT_CFQ is not set
111# CONFIG_DEFAULT_NOOP is not set 122# CONFIG_DEFAULT_NOOP is not set
112CONFIG_DEFAULT_IOSCHED="anticipatory" 123CONFIG_DEFAULT_IOSCHED="anticipatory"
113# CONFIG_WANT_EARLY_SERIAL is not set
114CONFIG_EMBEDDEDBOOT=y
115# CONFIG_MPIC is not set
116 124
117# 125#
118# Platform support 126# Platform support
119# 127#
128# CONFIG_PPC_MPC52xx is not set
129# CONFIG_PPC_MPC5200 is not set
130# CONFIG_PPC_CELL is not set
131# CONFIG_PPC_CELL_NATIVE is not set
120CONFIG_CPM1=y 132CONFIG_CPM1=y
121# CONFIG_MPC8XXFADS is not set 133# CONFIG_MPC8XXFADS is not set
122# CONFIG_MPC86XADS is not set 134# CONFIG_MPC86XADS is not set
123CONFIG_MPC885ADS=y 135CONFIG_MPC885ADS=y
124 136
125# 137#
138# Freescale Ethernet driver platform-specific options
139#
140CONFIG_MPC8xx_SECOND_ETH=y
141CONFIG_MPC8xx_SECOND_ETH_FEC2=y
142# CONFIG_MPC8xx_SECOND_ETH_SCC3 is not set
143
144#
126# MPC8xx CPM Options 145# MPC8xx CPM Options
127# 146#
128 147
@@ -135,6 +154,18 @@ CONFIG_NO_UCODE_PATCH=y
135# CONFIG_USB_SOF_UCODE_PATCH is not set 154# CONFIG_USB_SOF_UCODE_PATCH is not set
136# CONFIG_I2C_SPI_UCODE_PATCH is not set 155# CONFIG_I2C_SPI_UCODE_PATCH is not set
137# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set 156# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
157# CONFIG_PQ2ADS is not set
158# CONFIG_MPIC is not set
159# CONFIG_MPIC_WEIRD is not set
160# CONFIG_PPC_I8259 is not set
161# CONFIG_PPC_RTAS is not set
162# CONFIG_MMIO_NVRAM is not set
163# CONFIG_PPC_MPC106 is not set
164# CONFIG_PPC_970_NAP is not set
165# CONFIG_PPC_INDIRECT_IO is not set
166# CONFIG_GENERIC_IOMAP is not set
167# CONFIG_CPU_FREQ is not set
168# CONFIG_CPM2 is not set
138 169
139# 170#
140# Kernel options 171# Kernel options
@@ -142,6 +173,7 @@ CONFIG_NO_UCODE_PATCH=y
142# CONFIG_HIGHMEM is not set 173# CONFIG_HIGHMEM is not set
143# CONFIG_HZ_100 is not set 174# CONFIG_HZ_100 is not set
144# CONFIG_HZ_250 is not set 175# CONFIG_HZ_250 is not set
176# CONFIG_HZ_300 is not set
145CONFIG_HZ_1000=y 177CONFIG_HZ_1000=y
146CONFIG_HZ=1000 178CONFIG_HZ=1000
147CONFIG_PREEMPT_NONE=y 179CONFIG_PREEMPT_NONE=y
@@ -162,31 +194,29 @@ CONFIG_FLAT_NODE_MEM_MAP=y
162# CONFIG_SPARSEMEM_STATIC is not set 194# CONFIG_SPARSEMEM_STATIC is not set
163CONFIG_SPLIT_PTLOCK_CPUS=4 195CONFIG_SPLIT_PTLOCK_CPUS=4
164# CONFIG_RESOURCES_64BIT is not set 196# CONFIG_RESOURCES_64BIT is not set
197CONFIG_ZONE_DMA_FLAG=1
165# CONFIG_PROC_DEVICETREE is not set 198# CONFIG_PROC_DEVICETREE is not set
166# CONFIG_CMDLINE_BOOL is not set 199# CONFIG_CMDLINE_BOOL is not set
167# CONFIG_PM is not set 200# CONFIG_PM is not set
168# CONFIG_SECCOMP is not set 201# CONFIG_SECCOMP is not set
202# CONFIG_WANT_DEVICE_TREE is not set
169CONFIG_ISA_DMA_API=y 203CONFIG_ISA_DMA_API=y
170 204
171# 205#
172# Bus options 206# Bus options
173# 207#
174# CONFIG_MPIC_WEIRD is not set 208CONFIG_ZONE_DMA=y
175# CONFIG_PPC_I8259 is not set
176CONFIG_FSL_SOC=y 209CONFIG_FSL_SOC=y
177# CONFIG_PCI is not set 210# CONFIG_PCI is not set
178# CONFIG_PCI_DOMAINS is not set 211# CONFIG_PCI_DOMAINS is not set
179# CONFIG_PCI_QSPAN is not set 212# CONFIG_PCI_QSPAN is not set
213# CONFIG_ARCH_SUPPORTS_MSI is not set
180 214
181# 215#
182# PCCARD (PCMCIA/CardBus) support 216# PCCARD (PCMCIA/CardBus) support
183# 217#
184 218
185# 219#
186# PCI Hotplug Support
187#
188
189#
190# Advanced setup 220# Advanced setup
191# 221#
192# CONFIG_ADVANCED_OPTIONS is not set 222# CONFIG_ADVANCED_OPTIONS is not set
@@ -210,13 +240,13 @@ CONFIG_NET=y
210# 240#
211# Networking options 241# Networking options
212# 242#
213# CONFIG_NETDEBUG is not set
214CONFIG_PACKET=y 243CONFIG_PACKET=y
215# CONFIG_PACKET_MMAP is not set 244# CONFIG_PACKET_MMAP is not set
216CONFIG_UNIX=y 245CONFIG_UNIX=y
217CONFIG_XFRM=y 246CONFIG_XFRM=y
218# CONFIG_XFRM_USER is not set 247# CONFIG_XFRM_USER is not set
219# CONFIG_XFRM_SUB_POLICY is not set 248# CONFIG_XFRM_SUB_POLICY is not set
249# CONFIG_XFRM_MIGRATE is not set
220# CONFIG_NET_KEY is not set 250# CONFIG_NET_KEY is not set
221CONFIG_INET=y 251CONFIG_INET=y
222CONFIG_IP_MULTICAST=y 252CONFIG_IP_MULTICAST=y
@@ -244,25 +274,14 @@ CONFIG_INET_TCP_DIAG=y
244# CONFIG_TCP_CONG_ADVANCED is not set 274# CONFIG_TCP_CONG_ADVANCED is not set
245CONFIG_TCP_CONG_CUBIC=y 275CONFIG_TCP_CONG_CUBIC=y
246CONFIG_DEFAULT_TCP_CONG="cubic" 276CONFIG_DEFAULT_TCP_CONG="cubic"
277# CONFIG_TCP_MD5SIG is not set
247# CONFIG_IPV6 is not set 278# CONFIG_IPV6 is not set
248# CONFIG_INET6_XFRM_TUNNEL is not set 279# CONFIG_INET6_XFRM_TUNNEL is not set
249# CONFIG_INET6_TUNNEL is not set 280# CONFIG_INET6_TUNNEL is not set
250# CONFIG_NETWORK_SECMARK is not set 281# CONFIG_NETWORK_SECMARK is not set
251# CONFIG_NETFILTER is not set 282# CONFIG_NETFILTER is not set
252
253#
254# DCCP Configuration (EXPERIMENTAL)
255#
256# CONFIG_IP_DCCP is not set 283# CONFIG_IP_DCCP is not set
257
258#
259# SCTP Configuration (EXPERIMENTAL)
260#
261# CONFIG_IP_SCTP is not set 284# CONFIG_IP_SCTP is not set
262
263#
264# TIPC Configuration (EXPERIMENTAL)
265#
266# CONFIG_TIPC is not set 285# CONFIG_TIPC is not set
267# CONFIG_ATM is not set 286# CONFIG_ATM is not set
268# CONFIG_BRIDGE is not set 287# CONFIG_BRIDGE is not set
@@ -288,7 +307,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
288# CONFIG_HAMRADIO is not set 307# CONFIG_HAMRADIO is not set
289# CONFIG_IRDA is not set 308# CONFIG_IRDA is not set
290# CONFIG_BT is not set 309# CONFIG_BT is not set
310# CONFIG_AF_RXRPC is not set
311
312#
313# Wireless
314#
315# CONFIG_CFG80211 is not set
316# CONFIG_WIRELESS_EXT is not set
317# CONFIG_MAC80211 is not set
291# CONFIG_IEEE80211 is not set 318# CONFIG_IEEE80211 is not set
319# CONFIG_RFKILL is not set
292 320
293# 321#
294# Device Drivers 322# Device Drivers
@@ -305,10 +333,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
305# Connector - unified userspace <-> kernelspace linker 333# Connector - unified userspace <-> kernelspace linker
306# 334#
307# CONFIG_CONNECTOR is not set 335# CONFIG_CONNECTOR is not set
308
309#
310# Memory Technology Devices (MTD)
311#
312# CONFIG_MTD is not set 336# CONFIG_MTD is not set
313 337
314# 338#
@@ -319,6 +343,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
319# 343#
320# Plug and Play support 344# Plug and Play support
321# 345#
346# CONFIG_PNPACPI is not set
322 347
323# 348#
324# Block devices 349# Block devices
@@ -329,18 +354,13 @@ CONFIG_BLK_DEV_LOOP=y
329# CONFIG_BLK_DEV_CRYPTOLOOP is not set 354# CONFIG_BLK_DEV_CRYPTOLOOP is not set
330# CONFIG_BLK_DEV_NBD is not set 355# CONFIG_BLK_DEV_NBD is not set
331# CONFIG_BLK_DEV_RAM is not set 356# CONFIG_BLK_DEV_RAM is not set
332# CONFIG_BLK_DEV_INITRD is not set
333# CONFIG_CDROM_PKTCDVD is not set 357# CONFIG_CDROM_PKTCDVD is not set
334# CONFIG_ATA_OVER_ETH is not set 358# CONFIG_ATA_OVER_ETH is not set
335 359
336# 360#
337# Misc devices 361# Misc devices
338# 362#
339# CONFIG_TIFM_CORE is not set 363# CONFIG_BLINK is not set
340
341#
342# ATA/ATAPI/MFM/RLL support
343#
344# CONFIG_IDE is not set 364# CONFIG_IDE is not set
345 365
346# 366#
@@ -349,34 +369,13 @@ CONFIG_BLK_DEV_LOOP=y
349# CONFIG_RAID_ATTRS is not set 369# CONFIG_RAID_ATTRS is not set
350# CONFIG_SCSI is not set 370# CONFIG_SCSI is not set
351# CONFIG_SCSI_NETLINK is not set 371# CONFIG_SCSI_NETLINK is not set
352
353#
354# Serial ATA (prod) and Parallel ATA (experimental) drivers
355#
356# CONFIG_ATA is not set 372# CONFIG_ATA is not set
357 373
358# 374#
359# Multi-device support (RAID and LVM) 375# Multi-device support (RAID and LVM)
360# 376#
361# CONFIG_MD is not set 377# CONFIG_MD is not set
362 378# CONFIG_MACINTOSH_DRIVERS is not set
363#
364# Fusion MPT device support
365#
366# CONFIG_FUSION is not set
367
368#
369# IEEE 1394 (FireWire) support
370#
371
372#
373# I2O device support
374#
375
376#
377# Macintosh device drivers
378#
379# CONFIG_WINDFARM is not set
380 379
381# 380#
382# Network device support 381# Network device support
@@ -386,10 +385,6 @@ CONFIG_NETDEVICES=y
386# CONFIG_BONDING is not set 385# CONFIG_BONDING is not set
387# CONFIG_EQUALIZER is not set 386# CONFIG_EQUALIZER is not set
388# CONFIG_TUN is not set 387# CONFIG_TUN is not set
389
390#
391# PHY device support
392#
393CONFIG_PHYLIB=y 388CONFIG_PHYLIB=y
394 389
395# 390#
@@ -402,6 +397,7 @@ CONFIG_DAVICOM_PHY=y
402# CONFIG_CICADA_PHY is not set 397# CONFIG_CICADA_PHY is not set
403# CONFIG_VITESSE_PHY is not set 398# CONFIG_VITESSE_PHY is not set
404# CONFIG_SMSC_PHY is not set 399# CONFIG_SMSC_PHY is not set
400# CONFIG_BROADCOM_PHY is not set
405CONFIG_FIXED_PHY=y 401CONFIG_FIXED_PHY=y
406CONFIG_FIXED_MII_10_FDX=y 402CONFIG_FIXED_MII_10_FDX=y
407# CONFIG_FIXED_MII_100_FDX is not set 403# CONFIG_FIXED_MII_100_FDX is not set
@@ -415,27 +411,14 @@ CONFIG_MII=y
415CONFIG_FS_ENET=y 411CONFIG_FS_ENET=y
416CONFIG_FS_ENET_HAS_SCC=y 412CONFIG_FS_ENET_HAS_SCC=y
417CONFIG_FS_ENET_HAS_FEC=y 413CONFIG_FS_ENET_HAS_FEC=y
414CONFIG_NETDEV_1000=y
415CONFIG_NETDEV_10000=y
418 416
419# 417#
420# Ethernet (1000 Mbit) 418# Wireless LAN
421#
422
423#
424# Ethernet (10000 Mbit)
425#
426
427#
428# Token Ring devices
429#
430
431#
432# Wireless LAN (non-hamradio)
433#
434# CONFIG_NET_RADIO is not set
435
436#
437# Wan interfaces
438# 419#
420# CONFIG_WLAN_PRE80211 is not set
421# CONFIG_WLAN_80211 is not set
439# CONFIG_WAN is not set 422# CONFIG_WAN is not set
440# CONFIG_PPP is not set 423# CONFIG_PPP is not set
441# CONFIG_SLIP is not set 424# CONFIG_SLIP is not set
@@ -459,6 +442,7 @@ CONFIG_FS_ENET_HAS_FEC=y
459# 442#
460CONFIG_INPUT=y 443CONFIG_INPUT=y
461# CONFIG_INPUT_FF_MEMLESS is not set 444# CONFIG_INPUT_FF_MEMLESS is not set
445# CONFIG_INPUT_POLLDEV is not set
462 446
463# 447#
464# Userland interfaces 448# Userland interfaces
@@ -484,9 +468,16 @@ CONFIG_KEYBOARD_ATKBD=y
484# CONFIG_KEYBOARD_STOWAWAY is not set 468# CONFIG_KEYBOARD_STOWAWAY is not set
485CONFIG_INPUT_MOUSE=y 469CONFIG_INPUT_MOUSE=y
486CONFIG_MOUSE_PS2=y 470CONFIG_MOUSE_PS2=y
471CONFIG_MOUSE_PS2_ALPS=y
472CONFIG_MOUSE_PS2_LOGIPS2PP=y
473CONFIG_MOUSE_PS2_SYNAPTICS=y
474CONFIG_MOUSE_PS2_LIFEBOOK=y
475CONFIG_MOUSE_PS2_TRACKPOINT=y
476# CONFIG_MOUSE_PS2_TOUCHKIT is not set
487# CONFIG_MOUSE_SERIAL is not set 477# CONFIG_MOUSE_SERIAL is not set
488# CONFIG_MOUSE_VSXXXAA is not set 478# CONFIG_MOUSE_VSXXXAA is not set
489# CONFIG_INPUT_JOYSTICK is not set 479# CONFIG_INPUT_JOYSTICK is not set
480# CONFIG_INPUT_TABLET is not set
490# CONFIG_INPUT_TOUCHSCREEN is not set 481# CONFIG_INPUT_TOUCHSCREEN is not set
491# CONFIG_INPUT_MISC is not set 482# CONFIG_INPUT_MISC is not set
492 483
@@ -514,6 +505,7 @@ CONFIG_SERIO_LIBPS2=y
514# 505#
515# Non-8250 serial port support 506# Non-8250 serial port support
516# 507#
508# CONFIG_SERIAL_UARTLITE is not set
517CONFIG_SERIAL_CORE=y 509CONFIG_SERIAL_CORE=y
518CONFIG_SERIAL_CORE_CONSOLE=y 510CONFIG_SERIAL_CORE_CONSOLE=y
519CONFIG_SERIAL_CPM=y 511CONFIG_SERIAL_CPM=y
@@ -531,31 +523,18 @@ CONFIG_UNIX98_PTYS=y
531# IPMI 523# IPMI
532# 524#
533# CONFIG_IPMI_HANDLER is not set 525# CONFIG_IPMI_HANDLER is not set
534
535#
536# Watchdog Cards
537#
538# CONFIG_WATCHDOG is not set 526# CONFIG_WATCHDOG is not set
539CONFIG_HW_RANDOM=y 527CONFIG_HW_RANDOM=y
540# CONFIG_NVRAM is not set 528# CONFIG_NVRAM is not set
541CONFIG_GEN_RTC=y 529CONFIG_GEN_RTC=y
542# CONFIG_GEN_RTC_X is not set 530# CONFIG_GEN_RTC_X is not set
543# CONFIG_DTLK is not set
544# CONFIG_R3964 is not set 531# CONFIG_R3964 is not set
545
546#
547# Ftape, the floppy tape device driver
548#
549# CONFIG_RAW_DRIVER is not set 532# CONFIG_RAW_DRIVER is not set
550 533
551# 534#
552# TPM devices 535# TPM devices
553# 536#
554# CONFIG_TCG_TPM is not set 537# CONFIG_TCG_TPM is not set
555
556#
557# I2C support
558#
559# CONFIG_I2C is not set 538# CONFIG_I2C is not set
560 539
561# 540#
@@ -568,33 +547,41 @@ CONFIG_GEN_RTC=y
568# Dallas's 1-wire bus 547# Dallas's 1-wire bus
569# 548#
570# CONFIG_W1 is not set 549# CONFIG_W1 is not set
571
572#
573# Hardware Monitoring support
574#
575CONFIG_HWMON=y 550CONFIG_HWMON=y
576# CONFIG_HWMON_VID is not set 551# CONFIG_HWMON_VID is not set
577# CONFIG_SENSORS_ABITUGURU is not set 552# CONFIG_SENSORS_ABITUGURU is not set
578# CONFIG_SENSORS_F71805F is not set 553# CONFIG_SENSORS_F71805F is not set
554# CONFIG_SENSORS_PC87427 is not set
555# CONFIG_SENSORS_SMSC47M1 is not set
556# CONFIG_SENSORS_SMSC47B397 is not set
579# CONFIG_SENSORS_VT1211 is not set 557# CONFIG_SENSORS_VT1211 is not set
558# CONFIG_SENSORS_W83627HF is not set
580# CONFIG_HWMON_DEBUG_CHIP is not set 559# CONFIG_HWMON_DEBUG_CHIP is not set
581 560
582# 561#
562# Multifunction device drivers
563#
564# CONFIG_MFD_SM501 is not set
565
566#
583# Multimedia devices 567# Multimedia devices
584# 568#
585# CONFIG_VIDEO_DEV is not set 569# CONFIG_VIDEO_DEV is not set
570# CONFIG_DVB_CORE is not set
571CONFIG_DAB=y
586 572
587# 573#
588# Digital Video Broadcasting Devices 574# Graphics support
589# 575#
590# CONFIG_DVB is not set 576# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
591 577
592# 578#
593# Graphics support 579# Display device support
594# 580#
595CONFIG_FIRMWARE_EDID=y 581# CONFIG_DISPLAY_SUPPORT is not set
582# CONFIG_VGASTATE is not set
596# CONFIG_FB is not set 583# CONFIG_FB is not set
597# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 584# CONFIG_FB_IBM_GXT4500 is not set
598 585
599# 586#
600# Sound 587# Sound
@@ -602,6 +589,12 @@ CONFIG_FIRMWARE_EDID=y
602# CONFIG_SOUND is not set 589# CONFIG_SOUND is not set
603 590
604# 591#
592# HID Devices
593#
594CONFIG_HID=y
595# CONFIG_HID_DEBUG is not set
596
597#
605# USB support 598# USB support
606# 599#
607# CONFIG_USB_ARCH_HAS_HCD is not set 600# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -616,10 +609,6 @@ CONFIG_FIRMWARE_EDID=y
616# USB Gadget Support 609# USB Gadget Support
617# 610#
618# CONFIG_USB_GADGET is not set 611# CONFIG_USB_GADGET is not set
619
620#
621# MMC/SD Card support
622#
623# CONFIG_MMC is not set 612# CONFIG_MMC is not set
624 613
625# 614#
@@ -750,6 +739,7 @@ CONFIG_LOCKD=y
750CONFIG_LOCKD_V4=y 739CONFIG_LOCKD_V4=y
751CONFIG_NFS_COMMON=y 740CONFIG_NFS_COMMON=y
752CONFIG_SUNRPC=y 741CONFIG_SUNRPC=y
742# CONFIG_SUNRPC_BIND34 is not set
753# CONFIG_RPCSEC_GSS_KRB5 is not set 743# CONFIG_RPCSEC_GSS_KRB5 is not set
754# CONFIG_RPCSEC_GSS_SPKM3 is not set 744# CONFIG_RPCSEC_GSS_SPKM3 is not set
755# CONFIG_SMB_FS is not set 745# CONFIG_SMB_FS is not set
@@ -779,6 +769,7 @@ CONFIG_MSDOS_PARTITION=y
779# CONFIG_SUN_PARTITION is not set 769# CONFIG_SUN_PARTITION is not set
780# CONFIG_KARMA_PARTITION is not set 770# CONFIG_KARMA_PARTITION is not set
781# CONFIG_EFI_PARTITION is not set 771# CONFIG_EFI_PARTITION is not set
772# CONFIG_SYSV68_PARTITION is not set
782 773
783# 774#
784# Native Language Support 775# Native Language Support
@@ -786,14 +777,25 @@ CONFIG_MSDOS_PARTITION=y
786# CONFIG_NLS is not set 777# CONFIG_NLS is not set
787 778
788# 779#
780# Distributed Lock Manager
781#
782# CONFIG_DLM is not set
783# CONFIG_UCC_SLOW is not set
784
785#
789# Library routines 786# Library routines
790# 787#
788CONFIG_BITREVERSE=y
791CONFIG_CRC_CCITT=y 789CONFIG_CRC_CCITT=y
792# CONFIG_CRC16 is not set 790# CONFIG_CRC16 is not set
791# CONFIG_CRC_ITU_T is not set
793CONFIG_CRC32=y 792CONFIG_CRC32=y
794# CONFIG_LIBCRC32C is not set 793# CONFIG_LIBCRC32C is not set
795CONFIG_ZLIB_INFLATE=y 794CONFIG_ZLIB_INFLATE=y
796CONFIG_PLIST=y 795CONFIG_PLIST=y
796CONFIG_HAS_IOMEM=y
797CONFIG_HAS_IOPORT=y
798CONFIG_HAS_DMA=y
797 799
798# 800#
799# Instrumentation Support 801# Instrumentation Support
@@ -807,11 +809,9 @@ CONFIG_PLIST=y
807CONFIG_ENABLE_MUST_CHECK=y 809CONFIG_ENABLE_MUST_CHECK=y
808# CONFIG_MAGIC_SYSRQ is not set 810# CONFIG_MAGIC_SYSRQ is not set
809# CONFIG_UNUSED_SYMBOLS is not set 811# CONFIG_UNUSED_SYMBOLS is not set
810# CONFIG_DEBUG_KERNEL is not set
811CONFIG_LOG_BUF_SHIFT=14
812# CONFIG_DEBUG_FS is not set 812# CONFIG_DEBUG_FS is not set
813# CONFIG_UNWIND_INFO is not set
814# CONFIG_HEADERS_CHECK is not set 813# CONFIG_HEADERS_CHECK is not set
814# CONFIG_DEBUG_KERNEL is not set
815# CONFIG_BOOTX_TEXT is not set 815# CONFIG_BOOTX_TEXT is not set
816# CONFIG_PPC_EARLY_DEBUG is not set 816# CONFIG_PPC_EARLY_DEBUG is not set
817 817
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig
index 0507c8f7bfbc..905998b925ea 100644
--- a/arch/powerpc/configs/pasemi_defconfig
+++ b/arch/powerpc/configs/pasemi_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.21 3# Linux kernel version: 2.6.22-rc6
4# Mon May 14 12:55:04 2007 4# Tue Jun 26 13:51:39 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -295,20 +295,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
295# CONFIG_INET6_TUNNEL is not set 295# CONFIG_INET6_TUNNEL is not set
296# CONFIG_NETWORK_SECMARK is not set 296# CONFIG_NETWORK_SECMARK is not set
297# CONFIG_NETFILTER is not set 297# CONFIG_NETFILTER is not set
298
299#
300# DCCP Configuration (EXPERIMENTAL)
301#
302# CONFIG_IP_DCCP is not set 298# CONFIG_IP_DCCP is not set
303
304#
305# SCTP Configuration (EXPERIMENTAL)
306#
307# CONFIG_IP_SCTP is not set 299# CONFIG_IP_SCTP is not set
308
309#
310# TIPC Configuration (EXPERIMENTAL)
311#
312# CONFIG_TIPC is not set 300# CONFIG_TIPC is not set
313# CONFIG_ATM is not set 301# CONFIG_ATM is not set
314# CONFIG_BRIDGE is not set 302# CONFIG_BRIDGE is not set
@@ -466,10 +454,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
466# CONFIG_SGI_IOC4 is not set 454# CONFIG_SGI_IOC4 is not set
467# CONFIG_TIFM_CORE is not set 455# CONFIG_TIFM_CORE is not set
468# CONFIG_BLINK is not set 456# CONFIG_BLINK is not set
469
470#
471# ATA/ATAPI/MFM/RLL support
472#
473CONFIG_IDE=y 457CONFIG_IDE=y
474CONFIG_BLK_DEV_IDE=y 458CONFIG_BLK_DEV_IDE=y
475 459
@@ -571,7 +555,6 @@ CONFIG_SCSI_3W_9XXX=y
571# CONFIG_SCSI_DC395x is not set 555# CONFIG_SCSI_DC395x is not set
572# CONFIG_SCSI_DC390T is not set 556# CONFIG_SCSI_DC390T is not set
573# CONFIG_SCSI_DEBUG is not set 557# CONFIG_SCSI_DEBUG is not set
574# CONFIG_SCSI_ESP_CORE is not set
575# CONFIG_SCSI_SRP is not set 558# CONFIG_SCSI_SRP is not set
576 559
577# 560#
@@ -580,10 +563,6 @@ CONFIG_SCSI_3W_9XXX=y
580# CONFIG_PCMCIA_FDOMAIN is not set 563# CONFIG_PCMCIA_FDOMAIN is not set
581# CONFIG_PCMCIA_QLOGIC is not set 564# CONFIG_PCMCIA_QLOGIC is not set
582# CONFIG_PCMCIA_SYM53C500 is not set 565# CONFIG_PCMCIA_SYM53C500 is not set
583
584#
585# Serial ATA (prod) and Parallel ATA (experimental) drivers
586#
587CONFIG_ATA=y 566CONFIG_ATA=y
588# CONFIG_ATA_NONSTANDARD is not set 567# CONFIG_ATA_NONSTANDARD is not set
589# CONFIG_SATA_AHCI is not set 568# CONFIG_SATA_AHCI is not set
@@ -694,15 +673,7 @@ CONFIG_DUMMY=y
694# CONFIG_BONDING is not set 673# CONFIG_BONDING is not set
695# CONFIG_EQUALIZER is not set 674# CONFIG_EQUALIZER is not set
696# CONFIG_TUN is not set 675# CONFIG_TUN is not set
697
698#
699# ARCnet devices
700#
701# CONFIG_ARCNET is not set 676# CONFIG_ARCNET is not set
702
703#
704# PHY device support
705#
706CONFIG_PHYLIB=y 677CONFIG_PHYLIB=y
707 678
708# 679#
@@ -752,10 +723,7 @@ CONFIG_NET_PCI=y
752# CONFIG_SUNDANCE is not set 723# CONFIG_SUNDANCE is not set
753# CONFIG_VIA_RHINE is not set 724# CONFIG_VIA_RHINE is not set
754# CONFIG_SC92031 is not set 725# CONFIG_SC92031 is not set
755 726CONFIG_NETDEV_1000=y
756#
757# Ethernet (1000 Mbit)
758#
759# CONFIG_ACENIC is not set 727# CONFIG_ACENIC is not set
760# CONFIG_DL2K is not set 728# CONFIG_DL2K is not set
761CONFIG_E1000=y 729CONFIG_E1000=y
@@ -774,10 +742,7 @@ CONFIG_TIGON3=y
774# CONFIG_BNX2 is not set 742# CONFIG_BNX2 is not set
775# CONFIG_QLA3XXX is not set 743# CONFIG_QLA3XXX is not set
776# CONFIG_ATL1 is not set 744# CONFIG_ATL1 is not set
777 745CONFIG_NETDEV_10000=y
778#
779# Ethernet (10000 Mbit)
780#
781# CONFIG_CHELSIO_T1 is not set 746# CONFIG_CHELSIO_T1 is not set
782# CONFIG_CHELSIO_T3 is not set 747# CONFIG_CHELSIO_T3 is not set
783# CONFIG_IXGB is not set 748# CONFIG_IXGB is not set
@@ -786,11 +751,6 @@ CONFIG_TIGON3=y
786# CONFIG_NETXEN_NIC is not set 751# CONFIG_NETXEN_NIC is not set
787CONFIG_PASEMI_MAC=y 752CONFIG_PASEMI_MAC=y
788# CONFIG_MLX4_CORE is not set 753# CONFIG_MLX4_CORE is not set
789CONFIG_MLX4_DEBUG=y
790
791#
792# Token Ring devices
793#
794# CONFIG_TR is not set 754# CONFIG_TR is not set
795 755
796# 756#
@@ -808,15 +768,7 @@ CONFIG_MLX4_DEBUG=y
808# CONFIG_USB_RTL8150 is not set 768# CONFIG_USB_RTL8150 is not set
809# CONFIG_USB_USBNET_MII is not set 769# CONFIG_USB_USBNET_MII is not set
810# CONFIG_USB_USBNET is not set 770# CONFIG_USB_USBNET is not set
811
812#
813# PCMCIA network device support
814#
815# CONFIG_NET_PCMCIA is not set 771# CONFIG_NET_PCMCIA is not set
816
817#
818# Wan interfaces
819#
820# CONFIG_WAN is not set 772# CONFIG_WAN is not set
821# CONFIG_FDDI is not set 773# CONFIG_FDDI is not set
822# CONFIG_HIPPI is not set 774# CONFIG_HIPPI is not set
@@ -843,6 +795,7 @@ CONFIG_MLX4_DEBUG=y
843# 795#
844CONFIG_INPUT=y 796CONFIG_INPUT=y
845# CONFIG_INPUT_FF_MEMLESS is not set 797# CONFIG_INPUT_FF_MEMLESS is not set
798# CONFIG_INPUT_POLLDEV is not set
846 799
847# 800#
848# Userland interfaces 801# Userland interfaces
@@ -1661,7 +1614,6 @@ CONFIG_NLS_ISO8859_1=y
1661# 1614#
1662# CONFIG_DLM is not set 1615# CONFIG_DLM is not set
1663# CONFIG_UCC_SLOW is not set 1616# CONFIG_UCC_SLOW is not set
1664# CONFIG_UCC_FAST is not set
1665 1617
1666# 1618#
1667# Library routines 1619# Library routines
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
index f611df480fd9..0d8ba623e29a 100644
--- a/arch/powerpc/configs/pmac32_defconfig
+++ b/arch/powerpc/configs/pmac32_defconfig
@@ -1,9 +1,10 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc5 3# Linux kernel version: 2.6.22-rc6
4# Mon Jan 22 22:28:56 2007 4# Tue Jun 26 14:11:36 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC_PM_NEEDS_RTC_LIB=y
7CONFIG_PPC32=y 8CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 9CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 10CONFIG_MMU=y
@@ -24,6 +25,7 @@ CONFIG_PPC_OF=y
24# CONFIG_GENERIC_TBSYNC is not set 25# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 26CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 27CONFIG_GENERIC_BUG=y
28CONFIG_SYS_SUPPORTS_APM_EMULATION=y
27# CONFIG_DEFAULT_UIMAGE is not set 29# CONFIG_DEFAULT_UIMAGE is not set
28 30
29# 31#
@@ -34,9 +36,9 @@ CONFIG_CLASSIC32=y
34# CONFIG_PPC_83xx is not set 36# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set 37# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set 38# CONFIG_PPC_86xx is not set
39# CONFIG_PPC_8xx is not set
37# CONFIG_40x is not set 40# CONFIG_40x is not set
38# CONFIG_44x is not set 41# CONFIG_44x is not set
39# CONFIG_8xx is not set
40# CONFIG_E200 is not set 42# CONFIG_E200 is not set
41CONFIG_6xx=y 43CONFIG_6xx=y
42CONFIG_PPC_FPU=y 44CONFIG_PPC_FPU=y
@@ -45,6 +47,7 @@ CONFIG_PPC_FPU=y
45CONFIG_ALTIVEC=y 47CONFIG_ALTIVEC=y
46CONFIG_PPC_STD_MMU=y 48CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 49CONFIG_PPC_STD_MMU_32=y
50# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 51# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 52CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 53
@@ -63,6 +66,7 @@ CONFIG_LOCALVERSION=""
63CONFIG_SWAP=y 66CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 67CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 68# CONFIG_IPC_NS is not set
69CONFIG_SYSVIPC_SYSCTL=y
66CONFIG_POSIX_MQUEUE=y 70CONFIG_POSIX_MQUEUE=y
67# CONFIG_BSD_PROCESS_ACCT is not set 71# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 72# CONFIG_TASKSTATS is not set
@@ -70,8 +74,10 @@ CONFIG_POSIX_MQUEUE=y
70# CONFIG_AUDIT is not set 74# CONFIG_AUDIT is not set
71CONFIG_IKCONFIG=y 75CONFIG_IKCONFIG=y
72CONFIG_IKCONFIG_PROC=y 76CONFIG_IKCONFIG_PROC=y
77CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 78CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 79# CONFIG_RELAY is not set
80CONFIG_BLK_DEV_INITRD=y
75CONFIG_INITRAMFS_SOURCE="" 81CONFIG_INITRAMFS_SOURCE=""
76# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 82# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
77CONFIG_SYSCTL=y 83CONFIG_SYSCTL=y
@@ -86,14 +92,19 @@ CONFIG_BUG=y
86CONFIG_ELF_CORE=y 92CONFIG_ELF_CORE=y
87CONFIG_BASE_FULL=y 93CONFIG_BASE_FULL=y
88CONFIG_FUTEX=y 94CONFIG_FUTEX=y
95CONFIG_ANON_INODES=y
89CONFIG_EPOLL=y 96CONFIG_EPOLL=y
97CONFIG_SIGNALFD=y
98CONFIG_TIMERFD=y
99CONFIG_EVENTFD=y
90CONFIG_SHMEM=y 100CONFIG_SHMEM=y
91CONFIG_SLAB=y
92CONFIG_VM_EVENT_COUNTERS=y 101CONFIG_VM_EVENT_COUNTERS=y
102CONFIG_SLAB=y
103# CONFIG_SLUB is not set
104# CONFIG_SLOB is not set
93CONFIG_RT_MUTEXES=y 105CONFIG_RT_MUTEXES=y
94# CONFIG_TINY_SHMEM is not set 106# CONFIG_TINY_SHMEM is not set
95CONFIG_BASE_SMALL=0 107CONFIG_BASE_SMALL=0
96# CONFIG_SLOB is not set
97 108
98# 109#
99# Loadable module support 110# Loadable module support
@@ -134,12 +145,17 @@ CONFIG_PPC_MULTIPLATFORM=y
134# CONFIG_APUS is not set 145# CONFIG_APUS is not set
135# CONFIG_PPC_CHRP is not set 146# CONFIG_PPC_CHRP is not set
136# CONFIG_PPC_MPC52xx is not set 147# CONFIG_PPC_MPC52xx is not set
148# CONFIG_PPC_MPC5200 is not set
137# CONFIG_PPC_EFIKA is not set 149# CONFIG_PPC_EFIKA is not set
138# CONFIG_PPC_LITE5200 is not set 150# CONFIG_PPC_LITE5200 is not set
139CONFIG_PPC_PMAC=y 151CONFIG_PPC_PMAC=y
140# CONFIG_PPC_CELL is not set 152# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set 153# CONFIG_PPC_CELL_NATIVE is not set
154# CONFIG_PQ2ADS is not set
142CONFIG_PPC_NATIVE=y 155CONFIG_PPC_NATIVE=y
156CONFIG_MPIC=y
157# CONFIG_MPIC_WEIRD is not set
158# CONFIG_PPC_I8259 is not set
143# CONFIG_PPC_RTAS is not set 159# CONFIG_PPC_RTAS is not set
144# CONFIG_MMIO_NVRAM is not set 160# CONFIG_MMIO_NVRAM is not set
145CONFIG_PPC_MPC106=y 161CONFIG_PPC_MPC106=y
@@ -158,11 +174,14 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
158CONFIG_CPU_FREQ_GOV_USERSPACE=y 174CONFIG_CPU_FREQ_GOV_USERSPACE=y
159# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set 175# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
160# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set 176# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
177
178#
179# CPU Frequency drivers
180#
161CONFIG_CPU_FREQ_PMAC=y 181CONFIG_CPU_FREQ_PMAC=y
162CONFIG_PPC601_SYNC_FIX=y 182CONFIG_PPC601_SYNC_FIX=y
163# CONFIG_TAU is not set 183# CONFIG_TAU is not set
164# CONFIG_WANT_EARLY_SERIAL is not set 184# CONFIG_CPM2 is not set
165CONFIG_MPIC=y
166 185
167# 186#
168# Kernel options 187# Kernel options
@@ -191,6 +210,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
191# CONFIG_SPARSEMEM_STATIC is not set 210# CONFIG_SPARSEMEM_STATIC is not set
192CONFIG_SPLIT_PTLOCK_CPUS=4 211CONFIG_SPLIT_PTLOCK_CPUS=4
193# CONFIG_RESOURCES_64BIT is not set 212# CONFIG_RESOURCES_64BIT is not set
213CONFIG_ZONE_DMA_FLAG=1
194CONFIG_PROC_DEVICETREE=y 214CONFIG_PROC_DEVICETREE=y
195# CONFIG_CMDLINE_BOOL is not set 215# CONFIG_CMDLINE_BOOL is not set
196CONFIG_PM=y 216CONFIG_PM=y
@@ -200,19 +220,23 @@ CONFIG_PM_DEBUG=y
200CONFIG_PM_SYSFS_DEPRECATED=y 220CONFIG_PM_SYSFS_DEPRECATED=y
201CONFIG_SOFTWARE_SUSPEND=y 221CONFIG_SOFTWARE_SUSPEND=y
202CONFIG_PM_STD_PARTITION="" 222CONFIG_PM_STD_PARTITION=""
223CONFIG_APM_EMULATION=y
203CONFIG_SECCOMP=y 224CONFIG_SECCOMP=y
225# CONFIG_WANT_DEVICE_TREE is not set
204CONFIG_ISA_DMA_API=y 226CONFIG_ISA_DMA_API=y
205 227
206# 228#
207# Bus options 229# Bus options
208# 230#
231CONFIG_ZONE_DMA=y
209CONFIG_GENERIC_ISA_DMA=y 232CONFIG_GENERIC_ISA_DMA=y
210# CONFIG_MPIC_WEIRD is not set
211# CONFIG_PPC_I8259 is not set
212CONFIG_PPC_INDIRECT_PCI=y 233CONFIG_PPC_INDIRECT_PCI=y
234# CONFIG_PPC_INDIRECT_PCI_BE is not set
213CONFIG_PCI=y 235CONFIG_PCI=y
214CONFIG_PCI_DOMAINS=y 236CONFIG_PCI_DOMAINS=y
215# CONFIG_PCIEPORTBUS is not set 237# CONFIG_PCIEPORTBUS is not set
238CONFIG_ARCH_SUPPORTS_MSI=y
239# CONFIG_PCI_MSI is not set
216# CONFIG_PCI_DEBUG is not set 240# CONFIG_PCI_DEBUG is not set
217 241
218# 242#
@@ -237,10 +261,6 @@ CONFIG_YENTA_TOSHIBA=y
237# CONFIG_PD6729 is not set 261# CONFIG_PD6729 is not set
238# CONFIG_I82092 is not set 262# CONFIG_I82092 is not set
239CONFIG_PCCARD_NONSTATIC=m 263CONFIG_PCCARD_NONSTATIC=m
240
241#
242# PCI Hotplug Support
243#
244# CONFIG_HOTPLUG_PCI is not set 264# CONFIG_HOTPLUG_PCI is not set
245 265
246# 266#
@@ -265,14 +285,15 @@ CONFIG_NET=y
265# 285#
266# Networking options 286# Networking options
267# 287#
268# CONFIG_NETDEBUG is not set
269CONFIG_PACKET=y 288CONFIG_PACKET=y
270# CONFIG_PACKET_MMAP is not set 289# CONFIG_PACKET_MMAP is not set
271CONFIG_UNIX=y 290CONFIG_UNIX=y
272CONFIG_XFRM=y 291CONFIG_XFRM=y
273CONFIG_XFRM_USER=y 292CONFIG_XFRM_USER=y
274# CONFIG_XFRM_SUB_POLICY is not set 293# CONFIG_XFRM_SUB_POLICY is not set
294# CONFIG_XFRM_MIGRATE is not set
275CONFIG_NET_KEY=y 295CONFIG_NET_KEY=y
296# CONFIG_NET_KEY_MIGRATE is not set
276CONFIG_INET=y 297CONFIG_INET=y
277CONFIG_IP_MULTICAST=y 298CONFIG_IP_MULTICAST=y
278# CONFIG_IP_ADVANCED_ROUTER is not set 299# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -297,10 +318,6 @@ CONFIG_INET_TCP_DIAG=y
297CONFIG_TCP_CONG_CUBIC=y 318CONFIG_TCP_CONG_CUBIC=y
298CONFIG_DEFAULT_TCP_CONG="cubic" 319CONFIG_DEFAULT_TCP_CONG="cubic"
299# CONFIG_TCP_MD5SIG is not set 320# CONFIG_TCP_MD5SIG is not set
300
301#
302# IP: Virtual Server Configuration
303#
304# CONFIG_IP_VS is not set 321# CONFIG_IP_VS is not set
305# CONFIG_IPV6 is not set 322# CONFIG_IPV6 is not set
306# CONFIG_INET6_XFRM_TUNNEL is not set 323# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -314,8 +331,6 @@ CONFIG_NETFILTER=y
314# 331#
315# CONFIG_NETFILTER_NETLINK is not set 332# CONFIG_NETFILTER_NETLINK is not set
316CONFIG_NF_CONNTRACK_ENABLED=m 333CONFIG_NF_CONNTRACK_ENABLED=m
317CONFIG_NF_CONNTRACK_SUPPORT=y
318# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
319CONFIG_NF_CONNTRACK=m 334CONFIG_NF_CONNTRACK=m
320# CONFIG_NF_CT_ACCT is not set 335# CONFIG_NF_CT_ACCT is not set
321# CONFIG_NF_CONNTRACK_MARK is not set 336# CONFIG_NF_CONNTRACK_MARK is not set
@@ -327,16 +342,21 @@ CONFIG_NF_CONNTRACK_FTP=m
327CONFIG_NF_CONNTRACK_IRC=m 342CONFIG_NF_CONNTRACK_IRC=m
328# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set 343# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
329# CONFIG_NF_CONNTRACK_PPTP is not set 344# CONFIG_NF_CONNTRACK_PPTP is not set
345# CONFIG_NF_CONNTRACK_SANE is not set
330# CONFIG_NF_CONNTRACK_SIP is not set 346# CONFIG_NF_CONNTRACK_SIP is not set
331CONFIG_NF_CONNTRACK_TFTP=m 347CONFIG_NF_CONNTRACK_TFTP=m
332CONFIG_NETFILTER_XTABLES=m 348CONFIG_NETFILTER_XTABLES=m
333CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 349CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
350# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set
334# CONFIG_NETFILTER_XT_TARGET_DSCP is not set 351# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
335CONFIG_NETFILTER_XT_TARGET_MARK=m 352CONFIG_NETFILTER_XT_TARGET_MARK=m
336CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 353CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
337CONFIG_NETFILTER_XT_TARGET_NFLOG=m 354CONFIG_NETFILTER_XT_TARGET_NFLOG=m
338CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 355CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
356CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
339CONFIG_NETFILTER_XT_MATCH_COMMENT=m 357CONFIG_NETFILTER_XT_MATCH_COMMENT=m
358# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set
359# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set
340CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 360CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
341CONFIG_NETFILTER_XT_MATCH_DCCP=m 361CONFIG_NETFILTER_XT_MATCH_DCCP=m
342CONFIG_NETFILTER_XT_MATCH_DSCP=m 362CONFIG_NETFILTER_XT_MATCH_DSCP=m
@@ -377,7 +397,6 @@ CONFIG_IP_NF_FILTER=m
377CONFIG_IP_NF_TARGET_REJECT=m 397CONFIG_IP_NF_TARGET_REJECT=m
378CONFIG_IP_NF_TARGET_LOG=m 398CONFIG_IP_NF_TARGET_LOG=m
379CONFIG_IP_NF_TARGET_ULOG=m 399CONFIG_IP_NF_TARGET_ULOG=m
380CONFIG_IP_NF_TARGET_TCPMSS=m
381CONFIG_NF_NAT=m 400CONFIG_NF_NAT=m
382CONFIG_NF_NAT_NEEDED=y 401CONFIG_NF_NAT_NEEDED=y
383CONFIG_IP_NF_TARGET_MASQUERADE=m 402CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -396,14 +415,11 @@ CONFIG_IP_NF_MANGLE=m
396CONFIG_IP_NF_TARGET_TOS=m 415CONFIG_IP_NF_TARGET_TOS=m
397CONFIG_IP_NF_TARGET_ECN=m 416CONFIG_IP_NF_TARGET_ECN=m
398CONFIG_IP_NF_TARGET_TTL=m 417CONFIG_IP_NF_TARGET_TTL=m
418# CONFIG_IP_NF_TARGET_CLUSTERIP is not set
399CONFIG_IP_NF_RAW=m 419CONFIG_IP_NF_RAW=m
400CONFIG_IP_NF_ARPTABLES=m 420CONFIG_IP_NF_ARPTABLES=m
401CONFIG_IP_NF_ARPFILTER=m 421CONFIG_IP_NF_ARPFILTER=m
402CONFIG_IP_NF_ARP_MANGLE=m 422CONFIG_IP_NF_ARP_MANGLE=m
403
404#
405# DCCP Configuration (EXPERIMENTAL)
406#
407CONFIG_IP_DCCP=m 423CONFIG_IP_DCCP=m
408CONFIG_INET_DCCP_DIAG=m 424CONFIG_INET_DCCP_DIAG=m
409CONFIG_IP_DCCP_ACKVEC=y 425CONFIG_IP_DCCP_ACKVEC=y
@@ -422,15 +438,7 @@ CONFIG_IP_DCCP_CCID3_RTO=100
422# DCCP Kernel Hacking 438# DCCP Kernel Hacking
423# 439#
424# CONFIG_IP_DCCP_DEBUG is not set 440# CONFIG_IP_DCCP_DEBUG is not set
425
426#
427# SCTP Configuration (EXPERIMENTAL)
428#
429# CONFIG_IP_SCTP is not set 441# CONFIG_IP_SCTP is not set
430
431#
432# TIPC Configuration (EXPERIMENTAL)
433#
434# CONFIG_TIPC is not set 442# CONFIG_TIPC is not set
435# CONFIG_ATM is not set 443# CONFIG_ATM is not set
436# CONFIG_BRIDGE is not set 444# CONFIG_BRIDGE is not set
@@ -448,6 +456,7 @@ CONFIG_IP_DCCP_CCID3_RTO=100
448# QoS and/or fair queueing 456# QoS and/or fair queueing
449# 457#
450# CONFIG_NET_SCHED is not set 458# CONFIG_NET_SCHED is not set
459CONFIG_NET_SCH_FIFO=y
451CONFIG_NET_CLS_ROUTE=y 460CONFIG_NET_CLS_ROUTE=y
452 461
453# 462#
@@ -485,6 +494,7 @@ CONFIG_IRTTY_SIR=m
485# Dongle support 494# Dongle support
486# 495#
487# CONFIG_DONGLE is not set 496# CONFIG_DONGLE is not set
497# CONFIG_KINGSUN_DONGLE is not set
488 498
489# 499#
490# Old SIR device drivers 500# Old SIR device drivers
@@ -532,13 +542,23 @@ CONFIG_BT_HCIBFUSB=m
532# CONFIG_BT_HCIBLUECARD is not set 542# CONFIG_BT_HCIBLUECARD is not set
533# CONFIG_BT_HCIBTUART is not set 543# CONFIG_BT_HCIBTUART is not set
534# CONFIG_BT_HCIVHCI is not set 544# CONFIG_BT_HCIVHCI is not set
545# CONFIG_AF_RXRPC is not set
546
547#
548# Wireless
549#
550CONFIG_CFG80211=m
551CONFIG_WIRELESS_EXT=y
552CONFIG_MAC80211=m
553CONFIG_MAC80211_LEDS=y
554# CONFIG_MAC80211_DEBUG is not set
535CONFIG_IEEE80211=m 555CONFIG_IEEE80211=m
536# CONFIG_IEEE80211_DEBUG is not set 556# CONFIG_IEEE80211_DEBUG is not set
537CONFIG_IEEE80211_CRYPT_WEP=m 557CONFIG_IEEE80211_CRYPT_WEP=m
538CONFIG_IEEE80211_CRYPT_CCMP=m 558CONFIG_IEEE80211_CRYPT_CCMP=m
539CONFIG_IEEE80211_CRYPT_TKIP=m 559CONFIG_IEEE80211_CRYPT_TKIP=m
540# CONFIG_IEEE80211_SOFTMAC is not set 560# CONFIG_IEEE80211_SOFTMAC is not set
541CONFIG_WIRELESS_EXT=y 561# CONFIG_RFKILL is not set
542 562
543# 563#
544# Device Drivers 564# Device Drivers
@@ -551,6 +571,7 @@ CONFIG_WIRELESS_EXT=y
551CONFIG_PREVENT_FIRMWARE_BUILD=y 571CONFIG_PREVENT_FIRMWARE_BUILD=y
552CONFIG_FW_LOADER=y 572CONFIG_FW_LOADER=y
553# CONFIG_DEBUG_DRIVER is not set 573# CONFIG_DEBUG_DRIVER is not set
574# CONFIG_DEBUG_DEVRES is not set
554# CONFIG_SYS_HYPERVISOR is not set 575# CONFIG_SYS_HYPERVISOR is not set
555 576
556# 577#
@@ -558,10 +579,6 @@ CONFIG_FW_LOADER=y
558# 579#
559CONFIG_CONNECTOR=y 580CONFIG_CONNECTOR=y
560CONFIG_PROC_EVENTS=y 581CONFIG_PROC_EVENTS=y
561
562#
563# Memory Technology Devices (MTD)
564#
565# CONFIG_MTD is not set 582# CONFIG_MTD is not set
566 583
567# 584#
@@ -572,6 +589,7 @@ CONFIG_PROC_EVENTS=y
572# 589#
573# Plug and Play support 590# Plug and Play support
574# 591#
592# CONFIG_PNPACPI is not set
575 593
576# 594#
577# Block devices 595# Block devices
@@ -592,19 +610,16 @@ CONFIG_BLK_DEV_RAM=y
592CONFIG_BLK_DEV_RAM_COUNT=16 610CONFIG_BLK_DEV_RAM_COUNT=16
593CONFIG_BLK_DEV_RAM_SIZE=4096 611CONFIG_BLK_DEV_RAM_SIZE=4096
594CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 612CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
595CONFIG_BLK_DEV_INITRD=y
596# CONFIG_CDROM_PKTCDVD is not set 613# CONFIG_CDROM_PKTCDVD is not set
597# CONFIG_ATA_OVER_ETH is not set 614# CONFIG_ATA_OVER_ETH is not set
598 615
599# 616#
600# Misc devices 617# Misc devices
601# 618#
619# CONFIG_PHANTOM is not set
602# CONFIG_SGI_IOC4 is not set 620# CONFIG_SGI_IOC4 is not set
603# CONFIG_TIFM_CORE is not set 621# CONFIG_TIFM_CORE is not set
604 622# CONFIG_BLINK is not set
605#
606# ATA/ATAPI/MFM/RLL support
607#
608CONFIG_IDE=y 623CONFIG_IDE=y
609CONFIG_BLK_DEV_IDE=y 624CONFIG_BLK_DEV_IDE=y
610 625
@@ -615,11 +630,13 @@ CONFIG_BLK_DEV_IDE=y
615CONFIG_BLK_DEV_IDEDISK=y 630CONFIG_BLK_DEV_IDEDISK=y
616# CONFIG_IDEDISK_MULTI_MODE is not set 631# CONFIG_IDEDISK_MULTI_MODE is not set
617CONFIG_BLK_DEV_IDECS=m 632CONFIG_BLK_DEV_IDECS=m
633# CONFIG_BLK_DEV_DELKIN is not set
618CONFIG_BLK_DEV_IDECD=y 634CONFIG_BLK_DEV_IDECD=y
619# CONFIG_BLK_DEV_IDETAPE is not set 635# CONFIG_BLK_DEV_IDETAPE is not set
620CONFIG_BLK_DEV_IDEFLOPPY=y 636CONFIG_BLK_DEV_IDEFLOPPY=y
621CONFIG_BLK_DEV_IDESCSI=y 637CONFIG_BLK_DEV_IDESCSI=y
622# CONFIG_IDE_TASK_IOCTL is not set 638# CONFIG_IDE_TASK_IOCTL is not set
639CONFIG_IDE_PROC_FS=y
623 640
624# 641#
625# IDE chipset support/bugfixes 642# IDE chipset support/bugfixes
@@ -627,12 +644,12 @@ CONFIG_BLK_DEV_IDESCSI=y
627# CONFIG_IDE_GENERIC is not set 644# CONFIG_IDE_GENERIC is not set
628CONFIG_BLK_DEV_IDEPCI=y 645CONFIG_BLK_DEV_IDEPCI=y
629CONFIG_IDEPCI_SHARE_IRQ=y 646CONFIG_IDEPCI_SHARE_IRQ=y
647CONFIG_IDEPCI_PCIBUS_ORDER=y
630# CONFIG_BLK_DEV_OFFBOARD is not set 648# CONFIG_BLK_DEV_OFFBOARD is not set
631CONFIG_BLK_DEV_GENERIC=y 649CONFIG_BLK_DEV_GENERIC=y
632# CONFIG_BLK_DEV_OPTI621 is not set 650# CONFIG_BLK_DEV_OPTI621 is not set
633CONFIG_BLK_DEV_IDEDMA_PCI=y 651CONFIG_BLK_DEV_IDEDMA_PCI=y
634# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 652# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
635CONFIG_IDEDMA_PCI_AUTO=y
636# CONFIG_IDEDMA_ONLYDISK is not set 653# CONFIG_IDEDMA_ONLYDISK is not set
637# CONFIG_BLK_DEV_AEC62XX is not set 654# CONFIG_BLK_DEV_AEC62XX is not set
638# CONFIG_BLK_DEV_ALI15X3 is not set 655# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -647,6 +664,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
647# CONFIG_BLK_DEV_JMICRON is not set 664# CONFIG_BLK_DEV_JMICRON is not set
648# CONFIG_BLK_DEV_SC1200 is not set 665# CONFIG_BLK_DEV_SC1200 is not set
649# CONFIG_BLK_DEV_PIIX is not set 666# CONFIG_BLK_DEV_PIIX is not set
667# CONFIG_BLK_DEV_IT8213 is not set
650# CONFIG_BLK_DEV_IT821X is not set 668# CONFIG_BLK_DEV_IT821X is not set
651# CONFIG_BLK_DEV_NS87415 is not set 669# CONFIG_BLK_DEV_NS87415 is not set
652# CONFIG_BLK_DEV_PDC202XX_OLD is not set 670# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -657,13 +675,13 @@ CONFIG_BLK_DEV_SL82C105=y
657# CONFIG_BLK_DEV_SLC90E66 is not set 675# CONFIG_BLK_DEV_SLC90E66 is not set
658# CONFIG_BLK_DEV_TRM290 is not set 676# CONFIG_BLK_DEV_TRM290 is not set
659# CONFIG_BLK_DEV_VIA82CXXX is not set 677# CONFIG_BLK_DEV_VIA82CXXX is not set
678# CONFIG_BLK_DEV_TC86C001 is not set
660CONFIG_BLK_DEV_IDE_PMAC=y 679CONFIG_BLK_DEV_IDE_PMAC=y
661CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y 680CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
662CONFIG_BLK_DEV_IDEDMA_PMAC=y 681CONFIG_BLK_DEV_IDEDMA_PMAC=y
663# CONFIG_IDE_ARM is not set 682# CONFIG_IDE_ARM is not set
664CONFIG_BLK_DEV_IDEDMA=y 683CONFIG_BLK_DEV_IDEDMA=y
665# CONFIG_IDEDMA_IVB is not set 684# CONFIG_IDEDMA_IVB is not set
666CONFIG_IDEDMA_AUTO=y
667# CONFIG_BLK_DEV_HD is not set 685# CONFIG_BLK_DEV_HD is not set
668 686
669# 687#
@@ -693,6 +711,7 @@ CONFIG_CHR_DEV_SG=y
693CONFIG_SCSI_CONSTANTS=y 711CONFIG_SCSI_CONSTANTS=y
694# CONFIG_SCSI_LOGGING is not set 712# CONFIG_SCSI_LOGGING is not set
695# CONFIG_SCSI_SCAN_ASYNC is not set 713# CONFIG_SCSI_SCAN_ASYNC is not set
714CONFIG_SCSI_WAIT_SCAN=m
696 715
697# 716#
698# SCSI Transports 717# SCSI Transports
@@ -762,10 +781,6 @@ CONFIG_SCSI_MAC53C94=y
762# CONFIG_PCMCIA_NINJA_SCSI is not set 781# CONFIG_PCMCIA_NINJA_SCSI is not set
763# CONFIG_PCMCIA_QLOGIC is not set 782# CONFIG_PCMCIA_QLOGIC is not set
764# CONFIG_PCMCIA_SYM53C500 is not set 783# CONFIG_PCMCIA_SYM53C500 is not set
765
766#
767# Serial ATA (prod) and Parallel ATA (experimental) drivers
768#
769# CONFIG_ATA is not set 784# CONFIG_ATA is not set
770 785
771# 786#
@@ -787,6 +802,7 @@ CONFIG_DM_SNAPSHOT=m
787CONFIG_DM_MIRROR=m 802CONFIG_DM_MIRROR=m
788CONFIG_DM_ZERO=m 803CONFIG_DM_ZERO=m
789# CONFIG_DM_MULTIPATH is not set 804# CONFIG_DM_MULTIPATH is not set
805# CONFIG_DM_DELAY is not set
790 806
791# 807#
792# Fusion MPT device support 808# Fusion MPT device support
@@ -799,28 +815,26 @@ CONFIG_DM_ZERO=m
799# 815#
800# IEEE 1394 (FireWire) support 816# IEEE 1394 (FireWire) support
801# 817#
818# CONFIG_FIREWIRE is not set
802CONFIG_IEEE1394=m 819CONFIG_IEEE1394=m
803 820
804# 821#
805# Subsystem Options 822# Subsystem Options
806# 823#
807# CONFIG_IEEE1394_VERBOSEDEBUG is not set 824# CONFIG_IEEE1394_VERBOSEDEBUG is not set
808# CONFIG_IEEE1394_OUI_DB is not set
809CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
810CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
811# CONFIG_IEEE1394_EXPORT_FULL_API is not set
812 825
813# 826#
814# Device Drivers 827# Controllers
815# 828#
816# CONFIG_IEEE1394_PCILYNX is not set 829# CONFIG_IEEE1394_PCILYNX is not set
817CONFIG_IEEE1394_OHCI1394=m 830CONFIG_IEEE1394_OHCI1394=m
818 831
819# 832#
820# Protocol Drivers 833# Protocols
821# 834#
822CONFIG_IEEE1394_VIDEO1394=m 835CONFIG_IEEE1394_VIDEO1394=m
823CONFIG_IEEE1394_SBP2=m 836CONFIG_IEEE1394_SBP2=m
837# CONFIG_IEEE1394_ETH1394_ROM_ENTRY is not set
824# CONFIG_IEEE1394_ETH1394 is not set 838# CONFIG_IEEE1394_ETH1394 is not set
825CONFIG_IEEE1394_DV1394=m 839CONFIG_IEEE1394_DV1394=m
826CONFIG_IEEE1394_RAWIO=m 840CONFIG_IEEE1394_RAWIO=m
@@ -829,10 +843,7 @@ CONFIG_IEEE1394_RAWIO=m
829# I2O device support 843# I2O device support
830# 844#
831# CONFIG_I2O is not set 845# CONFIG_I2O is not set
832 846CONFIG_MACINTOSH_DRIVERS=y
833#
834# Macintosh device drivers
835#
836CONFIG_ADB=y 847CONFIG_ADB=y
837CONFIG_ADB_CUDA=y 848CONFIG_ADB_CUDA=y
838CONFIG_ADB_PMU=y 849CONFIG_ADB_PMU=y
@@ -858,15 +869,7 @@ CONFIG_DUMMY=m
858# CONFIG_BONDING is not set 869# CONFIG_BONDING is not set
859# CONFIG_EQUALIZER is not set 870# CONFIG_EQUALIZER is not set
860CONFIG_TUN=m 871CONFIG_TUN=m
861
862#
863# ARCnet devices
864#
865# CONFIG_ARCNET is not set 872# CONFIG_ARCNET is not set
866
867#
868# PHY device support
869#
870# CONFIG_PHYLIB is not set 873# CONFIG_PHYLIB is not set
871 874
872# 875#
@@ -907,10 +910,8 @@ CONFIG_PCNET32=y
907# CONFIG_SUNDANCE is not set 910# CONFIG_SUNDANCE is not set
908# CONFIG_TLAN is not set 911# CONFIG_TLAN is not set
909# CONFIG_VIA_RHINE is not set 912# CONFIG_VIA_RHINE is not set
910 913# CONFIG_SC92031 is not set
911# 914CONFIG_NETDEV_1000=y
912# Ethernet (1000 Mbit)
913#
914# CONFIG_ACENIC is not set 915# CONFIG_ACENIC is not set
915# CONFIG_DL2K is not set 916# CONFIG_DL2K is not set
916# CONFIG_E1000 is not set 917# CONFIG_E1000 is not set
@@ -927,77 +928,62 @@ CONFIG_PCNET32=y
927# CONFIG_BNX2 is not set 928# CONFIG_BNX2 is not set
928# CONFIG_MV643XX_ETH is not set 929# CONFIG_MV643XX_ETH is not set
929# CONFIG_QLA3XXX is not set 930# CONFIG_QLA3XXX is not set
930 931# CONFIG_ATL1 is not set
931# 932CONFIG_NETDEV_10000=y
932# Ethernet (10000 Mbit)
933#
934# CONFIG_CHELSIO_T1 is not set 933# CONFIG_CHELSIO_T1 is not set
934# CONFIG_CHELSIO_T3 is not set
935# CONFIG_IXGB is not set 935# CONFIG_IXGB is not set
936# CONFIG_S2IO is not set 936# CONFIG_S2IO is not set
937# CONFIG_MYRI10GE is not set 937# CONFIG_MYRI10GE is not set
938# CONFIG_NETXEN_NIC is not set 938# CONFIG_NETXEN_NIC is not set
939 939# CONFIG_MLX4_CORE is not set
940#
941# Token Ring devices
942#
943# CONFIG_TR is not set 940# CONFIG_TR is not set
944 941
945# 942#
946# Wireless LAN (non-hamradio) 943# Wireless LAN
947#
948CONFIG_NET_RADIO=y
949# CONFIG_NET_WIRELESS_RTNETLINK is not set
950
951#
952# Obsolete Wireless cards support (pre-802.11)
953#
954# CONFIG_STRIP is not set
955# CONFIG_PCMCIA_WAVELAN is not set
956# CONFIG_PCMCIA_NETWAVE is not set
957
958#
959# Wireless 802.11 Frequency Hopping cards support
960# 944#
945# CONFIG_WLAN_PRE80211 is not set
946CONFIG_WLAN_80211=y
961# CONFIG_PCMCIA_RAYCS is not set 947# CONFIG_PCMCIA_RAYCS is not set
962
963#
964# Wireless 802.11b ISA/PCI cards support
965#
966# CONFIG_IPW2100 is not set 948# CONFIG_IPW2100 is not set
967# CONFIG_IPW2200 is not set 949# CONFIG_IPW2200 is not set
950# CONFIG_LIBERTAS is not set
968# CONFIG_AIRO is not set 951# CONFIG_AIRO is not set
969CONFIG_HERMES=m 952CONFIG_HERMES=m
970CONFIG_APPLE_AIRPORT=m 953CONFIG_APPLE_AIRPORT=m
971# CONFIG_PLX_HERMES is not set 954# CONFIG_PLX_HERMES is not set
972# CONFIG_TMD_HERMES is not set 955# CONFIG_TMD_HERMES is not set
973# CONFIG_NORTEL_HERMES is not set 956# CONFIG_NORTEL_HERMES is not set
974# CONFIG_PCI_HERMES is not set 957CONFIG_PCI_HERMES=m
975# CONFIG_ATMEL is not set 958# CONFIG_ATMEL is not set
976 959CONFIG_PCMCIA_HERMES=m
977#
978# Wireless 802.11b Pcmcia/Cardbus cards support
979#
980# CONFIG_PCMCIA_HERMES is not set
981# CONFIG_PCMCIA_SPECTRUM is not set 960# CONFIG_PCMCIA_SPECTRUM is not set
982# CONFIG_AIRO_CS is not set 961# CONFIG_AIRO_CS is not set
983# CONFIG_PCMCIA_WL3501 is not set 962# CONFIG_PCMCIA_WL3501 is not set
984
985#
986# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
987#
988CONFIG_PRISM54=m 963CONFIG_PRISM54=m
989# CONFIG_USB_ZD1201 is not set 964# CONFIG_USB_ZD1201 is not set
990# CONFIG_HOSTAP is not set 965# CONFIG_HOSTAP is not set
991CONFIG_NET_WIRELESS=y
992 966
993# 967#
994# PCMCIA network device support 968# USB Network Adapters
995# 969#
970# CONFIG_USB_CATC is not set
971# CONFIG_USB_KAWETH is not set
972# CONFIG_USB_PEGASUS is not set
973# CONFIG_USB_RTL8150 is not set
974CONFIG_USB_USBNET_MII=m
975CONFIG_USB_USBNET=m
976CONFIG_USB_NET_AX8817X=m
977CONFIG_USB_NET_CDCETHER=m
978# CONFIG_USB_NET_DM9601 is not set
979# CONFIG_USB_NET_GL620A is not set
980CONFIG_USB_NET_NET1080=m
981# CONFIG_USB_NET_PLUSB is not set
982# CONFIG_USB_NET_MCS7830 is not set
983# CONFIG_USB_NET_RNDIS_HOST is not set
984# CONFIG_USB_NET_CDC_SUBSET is not set
985CONFIG_USB_NET_ZAURUS=m
996# CONFIG_NET_PCMCIA is not set 986# CONFIG_NET_PCMCIA is not set
997
998#
999# Wan interfaces
1000#
1001# CONFIG_WAN is not set 987# CONFIG_WAN is not set
1002# CONFIG_FDDI is not set 988# CONFIG_FDDI is not set
1003# CONFIG_HIPPI is not set 989# CONFIG_HIPPI is not set
@@ -1033,6 +1019,7 @@ CONFIG_SLHC=y
1033# 1019#
1034CONFIG_INPUT=y 1020CONFIG_INPUT=y
1035# CONFIG_INPUT_FF_MEMLESS is not set 1021# CONFIG_INPUT_FF_MEMLESS is not set
1022# CONFIG_INPUT_POLLDEV is not set
1036 1023
1037# 1024#
1038# Userland interfaces 1025# Userland interfaces
@@ -1059,8 +1046,10 @@ CONFIG_INPUT_KEYBOARD=y
1059CONFIG_INPUT_MOUSE=y 1046CONFIG_INPUT_MOUSE=y
1060# CONFIG_MOUSE_PS2 is not set 1047# CONFIG_MOUSE_PS2 is not set
1061# CONFIG_MOUSE_SERIAL is not set 1048# CONFIG_MOUSE_SERIAL is not set
1049# CONFIG_MOUSE_APPLETOUCH is not set
1062# CONFIG_MOUSE_VSXXXAA is not set 1050# CONFIG_MOUSE_VSXXXAA is not set
1063# CONFIG_INPUT_JOYSTICK is not set 1051# CONFIG_INPUT_JOYSTICK is not set
1052# CONFIG_INPUT_TABLET is not set
1064# CONFIG_INPUT_TOUCHSCREEN is not set 1053# CONFIG_INPUT_TOUCHSCREEN is not set
1065# CONFIG_INPUT_MISC is not set 1054# CONFIG_INPUT_MISC is not set
1066 1055
@@ -1100,6 +1089,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
1100CONFIG_SERIAL_CORE=m 1089CONFIG_SERIAL_CORE=m
1101CONFIG_SERIAL_PMACZILOG=m 1090CONFIG_SERIAL_PMACZILOG=m
1102# CONFIG_SERIAL_JSM is not set 1091# CONFIG_SERIAL_JSM is not set
1092# CONFIG_SERIAL_OF_PLATFORM is not set
1103CONFIG_UNIX98_PTYS=y 1093CONFIG_UNIX98_PTYS=y
1104CONFIG_LEGACY_PTYS=y 1094CONFIG_LEGACY_PTYS=y
1105CONFIG_LEGACY_PTY_COUNT=256 1095CONFIG_LEGACY_PTY_COUNT=256
@@ -1108,16 +1098,11 @@ CONFIG_LEGACY_PTY_COUNT=256
1108# IPMI 1098# IPMI
1109# 1099#
1110# CONFIG_IPMI_HANDLER is not set 1100# CONFIG_IPMI_HANDLER is not set
1111
1112#
1113# Watchdog Cards
1114#
1115# CONFIG_WATCHDOG is not set 1101# CONFIG_WATCHDOG is not set
1116# CONFIG_HW_RANDOM is not set 1102# CONFIG_HW_RANDOM is not set
1117CONFIG_NVRAM=y 1103CONFIG_NVRAM=y
1118CONFIG_GEN_RTC=y 1104CONFIG_GEN_RTC=y
1119# CONFIG_GEN_RTC_X is not set 1105# CONFIG_GEN_RTC_X is not set
1120# CONFIG_DTLK is not set
1121# CONFIG_R3964 is not set 1106# CONFIG_R3964 is not set
1122# CONFIG_APPLICOM is not set 1107# CONFIG_APPLICOM is not set
1123CONFIG_AGP=m 1108CONFIG_AGP=m
@@ -1143,11 +1128,9 @@ CONFIG_DRM_RADEON=m
1143# TPM devices 1128# TPM devices
1144# 1129#
1145# CONFIG_TCG_TPM is not set 1130# CONFIG_TCG_TPM is not set
1146 1131CONFIG_DEVPORT=y
1147#
1148# I2C support
1149#
1150CONFIG_I2C=y 1132CONFIG_I2C=y
1133CONFIG_I2C_BOARDINFO=y
1151CONFIG_I2C_CHARDEV=m 1134CONFIG_I2C_CHARDEV=m
1152 1135
1153# 1136#
@@ -1175,14 +1158,15 @@ CONFIG_I2C_POWERMAC=y
1175# CONFIG_I2C_PARPORT_LIGHT is not set 1158# CONFIG_I2C_PARPORT_LIGHT is not set
1176# CONFIG_I2C_PROSAVAGE is not set 1159# CONFIG_I2C_PROSAVAGE is not set
1177# CONFIG_I2C_SAVAGE4 is not set 1160# CONFIG_I2C_SAVAGE4 is not set
1161# CONFIG_I2C_SIMTEC is not set
1178# CONFIG_I2C_SIS5595 is not set 1162# CONFIG_I2C_SIS5595 is not set
1179# CONFIG_I2C_SIS630 is not set 1163# CONFIG_I2C_SIS630 is not set
1180# CONFIG_I2C_SIS96X is not set 1164# CONFIG_I2C_SIS96X is not set
1181# CONFIG_I2C_STUB is not set 1165# CONFIG_I2C_STUB is not set
1166# CONFIG_I2C_TINY_USB is not set
1182# CONFIG_I2C_VIA is not set 1167# CONFIG_I2C_VIA is not set
1183# CONFIG_I2C_VIAPRO is not set 1168# CONFIG_I2C_VIAPRO is not set
1184# CONFIG_I2C_VOODOO3 is not set 1169# CONFIG_I2C_VOODOO3 is not set
1185# CONFIG_I2C_PCA_ISA is not set
1186 1170
1187# 1171#
1188# Miscellaneous I2C Chip support 1172# Miscellaneous I2C Chip support
@@ -1210,37 +1194,56 @@ CONFIG_I2C_POWERMAC=y
1210# Dallas's 1-wire bus 1194# Dallas's 1-wire bus
1211# 1195#
1212# CONFIG_W1 is not set 1196# CONFIG_W1 is not set
1197# CONFIG_HWMON is not set
1213 1198
1214# 1199#
1215# Hardware Monitoring support 1200# Multifunction device drivers
1216# 1201#
1217# CONFIG_HWMON is not set 1202# CONFIG_MFD_SM501 is not set
1218# CONFIG_HWMON_VID is not set
1219 1203
1220# 1204#
1221# Multimedia devices 1205# Multimedia devices
1222# 1206#
1223# CONFIG_VIDEO_DEV is not set 1207# CONFIG_VIDEO_DEV is not set
1208# CONFIG_DVB_CORE is not set
1209# CONFIG_DAB is not set
1224 1210
1225# 1211#
1226# Digital Video Broadcasting Devices 1212# Graphics support
1227# 1213#
1228# CONFIG_DVB is not set 1214CONFIG_BACKLIGHT_LCD_SUPPORT=y
1229# CONFIG_USB_DABUSB is not set 1215CONFIG_BACKLIGHT_CLASS_DEVICE=y
1216CONFIG_LCD_CLASS_DEVICE=m
1230 1217
1231# 1218#
1232# Graphics support 1219# Display device support
1233# 1220#
1234# CONFIG_FIRMWARE_EDID is not set 1221CONFIG_DISPLAY_SUPPORT=y
1222
1223#
1224# Display hardware drivers
1225#
1226CONFIG_VGASTATE=y
1235CONFIG_FB=y 1227CONFIG_FB=y
1228# CONFIG_FIRMWARE_EDID is not set
1236CONFIG_FB_DDC=y 1229CONFIG_FB_DDC=y
1237CONFIG_FB_CFB_FILLRECT=y 1230CONFIG_FB_CFB_FILLRECT=y
1238CONFIG_FB_CFB_COPYAREA=y 1231CONFIG_FB_CFB_COPYAREA=y
1239CONFIG_FB_CFB_IMAGEBLIT=y 1232CONFIG_FB_CFB_IMAGEBLIT=y
1233# CONFIG_FB_SYS_FILLRECT is not set
1234# CONFIG_FB_SYS_COPYAREA is not set
1235# CONFIG_FB_SYS_IMAGEBLIT is not set
1236# CONFIG_FB_SYS_FOPS is not set
1237CONFIG_FB_DEFERRED_IO=y
1238# CONFIG_FB_SVGALIB is not set
1240CONFIG_FB_MACMODES=y 1239CONFIG_FB_MACMODES=y
1241CONFIG_FB_BACKLIGHT=y 1240CONFIG_FB_BACKLIGHT=y
1242CONFIG_FB_MODE_HELPERS=y 1241CONFIG_FB_MODE_HELPERS=y
1243CONFIG_FB_TILEBLITTING=y 1242CONFIG_FB_TILEBLITTING=y
1243
1244#
1245# Frame buffer hardware drivers
1246#
1244# CONFIG_FB_CIRRUS is not set 1247# CONFIG_FB_CIRRUS is not set
1245# CONFIG_FB_PM2 is not set 1248# CONFIG_FB_PM2 is not set
1246# CONFIG_FB_CYBER2000 is not set 1249# CONFIG_FB_CYBER2000 is not set
@@ -1255,6 +1258,7 @@ CONFIG_FB_IMSTT=y
1255# CONFIG_FB_S1D13XXX is not set 1258# CONFIG_FB_S1D13XXX is not set
1256CONFIG_FB_NVIDIA=y 1259CONFIG_FB_NVIDIA=y
1257CONFIG_FB_NVIDIA_I2C=y 1260CONFIG_FB_NVIDIA_I2C=y
1261# CONFIG_FB_NVIDIA_DEBUG is not set
1258CONFIG_FB_NVIDIA_BACKLIGHT=y 1262CONFIG_FB_NVIDIA_BACKLIGHT=y
1259# CONFIG_FB_RIVA is not set 1263# CONFIG_FB_RIVA is not set
1260CONFIG_FB_MATROX=y 1264CONFIG_FB_MATROX=y
@@ -1274,6 +1278,7 @@ CONFIG_FB_ATY_CT=y
1274# CONFIG_FB_ATY_GENERIC_LCD is not set 1278# CONFIG_FB_ATY_GENERIC_LCD is not set
1275CONFIG_FB_ATY_GX=y 1279CONFIG_FB_ATY_GX=y
1276CONFIG_FB_ATY_BACKLIGHT=y 1280CONFIG_FB_ATY_BACKLIGHT=y
1281# CONFIG_FB_S3 is not set
1277# CONFIG_FB_SAVAGE is not set 1282# CONFIG_FB_SAVAGE is not set
1278# CONFIG_FB_SIS is not set 1283# CONFIG_FB_SIS is not set
1279# CONFIG_FB_NEOMAGIC is not set 1284# CONFIG_FB_NEOMAGIC is not set
@@ -1281,7 +1286,10 @@ CONFIG_FB_ATY_BACKLIGHT=y
1281CONFIG_FB_3DFX=y 1286CONFIG_FB_3DFX=y
1282# CONFIG_FB_3DFX_ACCEL is not set 1287# CONFIG_FB_3DFX_ACCEL is not set
1283# CONFIG_FB_VOODOO1 is not set 1288# CONFIG_FB_VOODOO1 is not set
1289# CONFIG_FB_VT8623 is not set
1284# CONFIG_FB_TRIDENT is not set 1290# CONFIG_FB_TRIDENT is not set
1291# CONFIG_FB_ARK is not set
1292# CONFIG_FB_PM3 is not set
1285# CONFIG_FB_IBM_GXT4500 is not set 1293# CONFIG_FB_IBM_GXT4500 is not set
1286# CONFIG_FB_VIRTUAL is not set 1294# CONFIG_FB_VIRTUAL is not set
1287 1295
@@ -1295,26 +1303,15 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
1295# CONFIG_FONTS is not set 1303# CONFIG_FONTS is not set
1296CONFIG_FONT_8x8=y 1304CONFIG_FONT_8x8=y
1297CONFIG_FONT_8x16=y 1305CONFIG_FONT_8x16=y
1298
1299#
1300# Logo configuration
1301#
1302CONFIG_LOGO=y 1306CONFIG_LOGO=y
1303CONFIG_LOGO_LINUX_MONO=y 1307CONFIG_LOGO_LINUX_MONO=y
1304CONFIG_LOGO_LINUX_VGA16=y 1308CONFIG_LOGO_LINUX_VGA16=y
1305CONFIG_LOGO_LINUX_CLUT224=y 1309CONFIG_LOGO_LINUX_CLUT224=y
1306CONFIG_BACKLIGHT_LCD_SUPPORT=y
1307CONFIG_BACKLIGHT_CLASS_DEVICE=y
1308CONFIG_BACKLIGHT_DEVICE=y
1309CONFIG_LCD_CLASS_DEVICE=m
1310CONFIG_LCD_DEVICE=y
1311 1310
1312# 1311#
1313# Sound 1312# Sound
1314# 1313#
1315CONFIG_SOUND=m 1314CONFIG_SOUND=m
1316CONFIG_DMASOUND_PMAC=m
1317CONFIG_DMASOUND=m
1318 1315
1319# 1316#
1320# Advanced Linux Sound Architecture 1317# Advanced Linux Sound Architecture
@@ -1428,6 +1425,7 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m
1428# 1425#
1429CONFIG_SND_USB_AUDIO=m 1426CONFIG_SND_USB_AUDIO=m
1430# CONFIG_SND_USB_USX2Y is not set 1427# CONFIG_SND_USB_USX2Y is not set
1428# CONFIG_SND_USB_CAIAQ is not set
1431 1429
1432# 1430#
1433# PCMCIA devices 1431# PCMCIA devices
@@ -1436,6 +1434,11 @@ CONFIG_SND_USB_AUDIO=m
1436# CONFIG_SND_PDAUDIOCF is not set 1434# CONFIG_SND_PDAUDIOCF is not set
1437 1435
1438# 1436#
1437# System on Chip audio support
1438#
1439# CONFIG_SND_SOC is not set
1440
1441#
1439# Open Sound System 1442# Open Sound System
1440# 1443#
1441# CONFIG_SOUND_PRIME is not set 1444# CONFIG_SOUND_PRIME is not set
@@ -1444,6 +1447,15 @@ CONFIG_SND_USB_AUDIO=m
1444# HID Devices 1447# HID Devices
1445# 1448#
1446CONFIG_HID=y 1449CONFIG_HID=y
1450# CONFIG_HID_DEBUG is not set
1451
1452#
1453# USB Input Devices
1454#
1455CONFIG_USB_HID=y
1456CONFIG_USB_HIDINPUT_POWERBOOK=y
1457# CONFIG_HID_FF is not set
1458# CONFIG_USB_HIDDEV is not set
1447 1459
1448# 1460#
1449# USB support 1461# USB support
@@ -1458,10 +1470,9 @@ CONFIG_USB=y
1458# Miscellaneous USB options 1470# Miscellaneous USB options
1459# 1471#
1460CONFIG_USB_DEVICEFS=y 1472CONFIG_USB_DEVICEFS=y
1461# CONFIG_USB_BANDWIDTH is not set 1473CONFIG_USB_DEVICE_CLASS=y
1462CONFIG_USB_DYNAMIC_MINORS=y 1474CONFIG_USB_DYNAMIC_MINORS=y
1463# CONFIG_USB_SUSPEND is not set 1475# CONFIG_USB_SUSPEND is not set
1464# CONFIG_USB_MULTITHREAD_PROBE is not set
1465# CONFIG_USB_OTG is not set 1476# CONFIG_USB_OTG is not set
1466 1477
1467# 1478#
@@ -1471,9 +1482,12 @@ CONFIG_USB_EHCI_HCD=m
1471CONFIG_USB_EHCI_SPLIT_ISO=y 1482CONFIG_USB_EHCI_SPLIT_ISO=y
1472CONFIG_USB_EHCI_ROOT_HUB_TT=y 1483CONFIG_USB_EHCI_ROOT_HUB_TT=y
1473# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1484# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1485# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1474# CONFIG_USB_ISP116X_HCD is not set 1486# CONFIG_USB_ISP116X_HCD is not set
1475CONFIG_USB_OHCI_HCD=y 1487CONFIG_USB_OHCI_HCD=y
1476# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1488# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1489# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1490# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1477CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1491CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1478# CONFIG_USB_UHCI_HCD is not set 1492# CONFIG_USB_UHCI_HCD is not set
1479# CONFIG_USB_SL811_HCD is not set 1493# CONFIG_USB_SL811_HCD is not set
@@ -1506,49 +1520,10 @@ CONFIG_USB_STORAGE=m
1506# CONFIG_USB_LIBUSUAL is not set 1520# CONFIG_USB_LIBUSUAL is not set
1507 1521
1508# 1522#
1509# USB Input Devices
1510#
1511CONFIG_USB_HID=y
1512CONFIG_USB_HIDINPUT_POWERBOOK=y
1513# CONFIG_HID_FF is not set
1514# CONFIG_USB_HIDDEV is not set
1515# CONFIG_USB_AIPTEK is not set
1516# CONFIG_USB_WACOM is not set
1517# CONFIG_USB_ACECAD is not set
1518# CONFIG_USB_KBTAB is not set
1519# CONFIG_USB_POWERMATE is not set
1520# CONFIG_USB_TOUCHSCREEN is not set
1521# CONFIG_USB_YEALINK is not set
1522# CONFIG_USB_XPAD is not set
1523# CONFIG_USB_ATI_REMOTE is not set
1524# CONFIG_USB_ATI_REMOTE2 is not set
1525# CONFIG_USB_KEYSPAN_REMOTE is not set
1526CONFIG_USB_APPLETOUCH=y
1527
1528#
1529# USB Imaging devices 1523# USB Imaging devices
1530# 1524#
1531# CONFIG_USB_MDC800 is not set 1525# CONFIG_USB_MDC800 is not set
1532# CONFIG_USB_MICROTEK is not set 1526# CONFIG_USB_MICROTEK is not set
1533
1534#
1535# USB Network Adapters
1536#
1537# CONFIG_USB_CATC is not set
1538# CONFIG_USB_KAWETH is not set
1539# CONFIG_USB_PEGASUS is not set
1540# CONFIG_USB_RTL8150 is not set
1541CONFIG_USB_USBNET_MII=m
1542CONFIG_USB_USBNET=m
1543CONFIG_USB_NET_AX8817X=m
1544CONFIG_USB_NET_CDCETHER=m
1545# CONFIG_USB_NET_GL620A is not set
1546CONFIG_USB_NET_NET1080=m
1547# CONFIG_USB_NET_PLUSB is not set
1548# CONFIG_USB_NET_MCS7830 is not set
1549# CONFIG_USB_NET_RNDIS_HOST is not set
1550# CONFIG_USB_NET_CDC_SUBSET is not set
1551CONFIG_USB_NET_ZAURUS=m
1552CONFIG_USB_MON=y 1527CONFIG_USB_MON=y
1553 1528
1554# 1529#
@@ -1620,6 +1595,7 @@ CONFIG_USB_EZUSB=y
1620# CONFIG_USB_RIO500 is not set 1595# CONFIG_USB_RIO500 is not set
1621# CONFIG_USB_LEGOTOWER is not set 1596# CONFIG_USB_LEGOTOWER is not set
1622# CONFIG_USB_LCD is not set 1597# CONFIG_USB_LCD is not set
1598# CONFIG_USB_BERRY_CHARGE is not set
1623# CONFIG_USB_LED is not set 1599# CONFIG_USB_LED is not set
1624# CONFIG_USB_CYPRESS_CY7C63 is not set 1600# CONFIG_USB_CYPRESS_CY7C63 is not set
1625# CONFIG_USB_CYTHERM is not set 1601# CONFIG_USB_CYTHERM is not set
@@ -1630,6 +1606,7 @@ CONFIG_USB_APPLEDISPLAY=m
1630# CONFIG_USB_SISUSBVGA is not set 1606# CONFIG_USB_SISUSBVGA is not set
1631# CONFIG_USB_LD is not set 1607# CONFIG_USB_LD is not set
1632# CONFIG_USB_TRANCEVIBRATOR is not set 1608# CONFIG_USB_TRANCEVIBRATOR is not set
1609# CONFIG_USB_IOWARRIOR is not set
1633# CONFIG_USB_TEST is not set 1610# CONFIG_USB_TEST is not set
1634 1611
1635# 1612#
@@ -1640,10 +1617,6 @@ CONFIG_USB_APPLEDISPLAY=m
1640# USB Gadget Support 1617# USB Gadget Support
1641# 1618#
1642# CONFIG_USB_GADGET is not set 1619# CONFIG_USB_GADGET is not set
1643
1644#
1645# MMC/SD Card support
1646#
1647# CONFIG_MMC is not set 1620# CONFIG_MMC is not set
1648 1621
1649# 1622#
@@ -1676,6 +1649,7 @@ CONFIG_LEDS_TRIGGER_IDE_DISK=y
1676# 1649#
1677# Real Time Clock 1650# Real Time Clock
1678# 1651#
1652CONFIG_RTC_LIB=y
1679# CONFIG_RTC_CLASS is not set 1653# CONFIG_RTC_CLASS is not set
1680 1654
1681# 1655#
@@ -1692,10 +1666,6 @@ CONFIG_LEDS_TRIGGER_IDE_DISK=y
1692# 1666#
1693 1667
1694# 1668#
1695# Virtualization
1696#
1697
1698#
1699# File systems 1669# File systems
1700# 1670#
1701CONFIG_EXT2_FS=y 1671CONFIG_EXT2_FS=y
@@ -1731,7 +1701,6 @@ CONFIG_FUSE_FS=m
1731CONFIG_ISO9660_FS=y 1701CONFIG_ISO9660_FS=y
1732CONFIG_JOLIET=y 1702CONFIG_JOLIET=y
1733CONFIG_ZISOFS=y 1703CONFIG_ZISOFS=y
1734CONFIG_ZISOFS_FS=y
1735CONFIG_UDF_FS=m 1704CONFIG_UDF_FS=m
1736CONFIG_UDF_NLS=y 1705CONFIG_UDF_NLS=y
1737 1706
@@ -1796,6 +1765,7 @@ CONFIG_NFS_ACL_SUPPORT=y
1796CONFIG_NFS_COMMON=y 1765CONFIG_NFS_COMMON=y
1797CONFIG_SUNRPC=y 1766CONFIG_SUNRPC=y
1798CONFIG_SUNRPC_GSS=y 1767CONFIG_SUNRPC_GSS=y
1768# CONFIG_SUNRPC_BIND34 is not set
1799CONFIG_RPCSEC_GSS_KRB5=y 1769CONFIG_RPCSEC_GSS_KRB5=y
1800# CONFIG_RPCSEC_GSS_SPKM3 is not set 1770# CONFIG_RPCSEC_GSS_SPKM3 is not set
1801CONFIG_SMB_FS=m 1771CONFIG_SMB_FS=m
@@ -1826,6 +1796,7 @@ CONFIG_MSDOS_PARTITION=y
1826# CONFIG_SUN_PARTITION is not set 1796# CONFIG_SUN_PARTITION is not set
1827# CONFIG_KARMA_PARTITION is not set 1797# CONFIG_KARMA_PARTITION is not set
1828# CONFIG_EFI_PARTITION is not set 1798# CONFIG_EFI_PARTITION is not set
1799# CONFIG_SYSV68_PARTITION is not set
1829 1800
1830# 1801#
1831# Native Language Support 1802# Native Language Support
@@ -1875,6 +1846,7 @@ CONFIG_NLS_UTF8=m
1875# Distributed Lock Manager 1846# Distributed Lock Manager
1876# 1847#
1877# CONFIG_DLM is not set 1848# CONFIG_DLM is not set
1849# CONFIG_UCC_SLOW is not set
1878 1850
1879# 1851#
1880# Library routines 1852# Library routines
@@ -1882,6 +1854,7 @@ CONFIG_NLS_UTF8=m
1882CONFIG_BITREVERSE=y 1854CONFIG_BITREVERSE=y
1883CONFIG_CRC_CCITT=y 1855CONFIG_CRC_CCITT=y
1884CONFIG_CRC16=y 1856CONFIG_CRC16=y
1857# CONFIG_CRC_ITU_T is not set
1885CONFIG_CRC32=y 1858CONFIG_CRC32=y
1886CONFIG_LIBCRC32C=m 1859CONFIG_LIBCRC32C=m
1887CONFIG_ZLIB_INFLATE=y 1860CONFIG_ZLIB_INFLATE=y
@@ -1891,13 +1864,16 @@ CONFIG_TEXTSEARCH_KMP=m
1891CONFIG_TEXTSEARCH_BM=m 1864CONFIG_TEXTSEARCH_BM=m
1892CONFIG_TEXTSEARCH_FSM=m 1865CONFIG_TEXTSEARCH_FSM=m
1893CONFIG_PLIST=y 1866CONFIG_PLIST=y
1894CONFIG_IOMAP_COPY=y 1867CONFIG_HAS_IOMEM=y
1868CONFIG_HAS_IOPORT=y
1869CONFIG_HAS_DMA=y
1895 1870
1896# 1871#
1897# Instrumentation Support 1872# Instrumentation Support
1898# 1873#
1899CONFIG_PROFILING=y 1874CONFIG_PROFILING=y
1900CONFIG_OPROFILE=y 1875CONFIG_OPROFILE=y
1876# CONFIG_KPROBES is not set
1901 1877
1902# 1878#
1903# Kernel hacking 1879# Kernel hacking
@@ -1909,15 +1885,15 @@ CONFIG_MAGIC_SYSRQ=y
1909# CONFIG_DEBUG_FS is not set 1885# CONFIG_DEBUG_FS is not set
1910# CONFIG_HEADERS_CHECK is not set 1886# CONFIG_HEADERS_CHECK is not set
1911CONFIG_DEBUG_KERNEL=y 1887CONFIG_DEBUG_KERNEL=y
1912CONFIG_LOG_BUF_SHIFT=14 1888# CONFIG_DEBUG_SHIRQ is not set
1913CONFIG_DETECT_SOFTLOCKUP=y 1889CONFIG_DETECT_SOFTLOCKUP=y
1914# CONFIG_SCHEDSTATS is not set 1890# CONFIG_SCHEDSTATS is not set
1891# CONFIG_TIMER_STATS is not set
1915# CONFIG_DEBUG_SLAB is not set 1892# CONFIG_DEBUG_SLAB is not set
1916# CONFIG_DEBUG_RT_MUTEXES is not set 1893# CONFIG_DEBUG_RT_MUTEXES is not set
1917# CONFIG_RT_MUTEX_TESTER is not set 1894# CONFIG_RT_MUTEX_TESTER is not set
1918# CONFIG_DEBUG_SPINLOCK is not set 1895# CONFIG_DEBUG_SPINLOCK is not set
1919# CONFIG_DEBUG_MUTEXES is not set 1896# CONFIG_DEBUG_MUTEXES is not set
1920# CONFIG_DEBUG_RWSEMS is not set
1921# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1897# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1922# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1898# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1923# CONFIG_DEBUG_KOBJECT is not set 1899# CONFIG_DEBUG_KOBJECT is not set
@@ -1927,6 +1903,9 @@ CONFIG_DEBUG_BUGVERBOSE=y
1927# CONFIG_DEBUG_LIST is not set 1903# CONFIG_DEBUG_LIST is not set
1928# CONFIG_FORCED_INLINING is not set 1904# CONFIG_FORCED_INLINING is not set
1929# CONFIG_RCU_TORTURE_TEST is not set 1905# CONFIG_RCU_TORTURE_TEST is not set
1906# CONFIG_FAULT_INJECTION is not set
1907# CONFIG_DEBUG_STACKOVERFLOW is not set
1908# CONFIG_DEBUG_STACK_USAGE is not set
1930CONFIG_DEBUGGER=y 1909CONFIG_DEBUGGER=y
1931CONFIG_XMON=y 1910CONFIG_XMON=y
1932CONFIG_XMON_DEFAULT=y 1911CONFIG_XMON_DEFAULT=y
@@ -1962,8 +1941,11 @@ CONFIG_CRYPTO_TGR192=m
1962# CONFIG_CRYPTO_GF128MUL is not set 1941# CONFIG_CRYPTO_GF128MUL is not set
1963CONFIG_CRYPTO_ECB=m 1942CONFIG_CRYPTO_ECB=m
1964CONFIG_CRYPTO_CBC=y 1943CONFIG_CRYPTO_CBC=y
1944CONFIG_CRYPTO_PCBC=m
1965# CONFIG_CRYPTO_LRW is not set 1945# CONFIG_CRYPTO_LRW is not set
1946# CONFIG_CRYPTO_CRYPTD is not set
1966CONFIG_CRYPTO_DES=y 1947CONFIG_CRYPTO_DES=y
1948# CONFIG_CRYPTO_FCRYPT is not set
1967CONFIG_CRYPTO_BLOWFISH=m 1949CONFIG_CRYPTO_BLOWFISH=m
1968CONFIG_CRYPTO_TWOFISH=m 1950CONFIG_CRYPTO_TWOFISH=m
1969CONFIG_CRYPTO_TWOFISH_COMMON=m 1951CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1978,6 +1960,7 @@ CONFIG_CRYPTO_ANUBIS=m
1978CONFIG_CRYPTO_DEFLATE=m 1960CONFIG_CRYPTO_DEFLATE=m
1979CONFIG_CRYPTO_MICHAEL_MIC=m 1961CONFIG_CRYPTO_MICHAEL_MIC=m
1980CONFIG_CRYPTO_CRC32C=m 1962CONFIG_CRYPTO_CRC32C=m
1963# CONFIG_CRYPTO_CAMELLIA is not set
1981# CONFIG_CRYPTO_TEST is not set 1964# CONFIG_CRYPTO_TEST is not set
1982 1965
1983# 1966#
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 126b9f87df25..6e503d98daba 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_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.20-rc5 3# Linux kernel version: 2.6.22-rc6
4# Mon Jan 22 22:28:58 2007 4# Tue Jun 26 14:15:02 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -27,6 +27,7 @@ CONFIG_GENERIC_TBSYNC=y
27CONFIG_AUDIT_ARCH=y 27CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y 28CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set 29# CONFIG_DEFAULT_UIMAGE is not set
30CONFIG_PPC64_SWSUSP=y
30 31
31# 32#
32# Processor support 33# Processor support
@@ -41,6 +42,7 @@ CONFIG_PPC_DCR=y
41CONFIG_PPC_OF_PLATFORM_PCI=y 42CONFIG_PPC_OF_PLATFORM_PCI=y
42CONFIG_ALTIVEC=y 43CONFIG_ALTIVEC=y
43CONFIG_PPC_STD_MMU=y 44CONFIG_PPC_STD_MMU=y
45CONFIG_PPC_MM_SLICES=y
44CONFIG_VIRT_CPU_ACCOUNTING=y 46CONFIG_VIRT_CPU_ACCOUNTING=y
45CONFIG_SMP=y 47CONFIG_SMP=y
46CONFIG_NR_CPUS=32 48CONFIG_NR_CPUS=32
@@ -61,20 +63,23 @@ CONFIG_LOCALVERSION_AUTO=y
61CONFIG_SWAP=y 63CONFIG_SWAP=y
62CONFIG_SYSVIPC=y 64CONFIG_SYSVIPC=y
63# CONFIG_IPC_NS is not set 65# CONFIG_IPC_NS is not set
66CONFIG_SYSVIPC_SYSCTL=y
64CONFIG_POSIX_MQUEUE=y 67CONFIG_POSIX_MQUEUE=y
65# CONFIG_BSD_PROCESS_ACCT is not set 68# CONFIG_BSD_PROCESS_ACCT is not set
66CONFIG_TASKSTATS=y 69CONFIG_TASKSTATS=y
67CONFIG_TASK_DELAY_ACCT=y 70CONFIG_TASK_DELAY_ACCT=y
71# CONFIG_TASK_XACCT is not set
68# CONFIG_UTS_NS is not set 72# CONFIG_UTS_NS is not set
69# CONFIG_AUDIT is not set 73# CONFIG_AUDIT is not set
70CONFIG_IKCONFIG=y 74CONFIG_IKCONFIG=y
71CONFIG_IKCONFIG_PROC=y 75CONFIG_IKCONFIG_PROC=y
76CONFIG_LOG_BUF_SHIFT=17
72CONFIG_CPUSETS=y 77CONFIG_CPUSETS=y
73CONFIG_SYSFS_DEPRECATED=y 78CONFIG_SYSFS_DEPRECATED=y
74CONFIG_RELAY=y 79CONFIG_RELAY=y
80CONFIG_BLK_DEV_INITRD=y
75CONFIG_INITRAMFS_SOURCE="" 81CONFIG_INITRAMFS_SOURCE=""
76CONFIG_CC_OPTIMIZE_FOR_SIZE=y 82CONFIG_CC_OPTIMIZE_FOR_SIZE=y
77# CONFIG_TASK_XACCT is not set
78CONFIG_SYSCTL=y 83CONFIG_SYSCTL=y
79# CONFIG_EMBEDDED is not set 84# CONFIG_EMBEDDED is not set
80CONFIG_SYSCTL_SYSCALL=y 85CONFIG_SYSCTL_SYSCALL=y
@@ -87,14 +92,19 @@ CONFIG_BUG=y
87CONFIG_ELF_CORE=y 92CONFIG_ELF_CORE=y
88CONFIG_BASE_FULL=y 93CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y 94CONFIG_FUTEX=y
95CONFIG_ANON_INODES=y
90CONFIG_EPOLL=y 96CONFIG_EPOLL=y
97CONFIG_SIGNALFD=y
98CONFIG_TIMERFD=y
99CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 100CONFIG_SHMEM=y
92CONFIG_SLAB=y
93CONFIG_VM_EVENT_COUNTERS=y 101CONFIG_VM_EVENT_COUNTERS=y
102CONFIG_SLAB=y
103# CONFIG_SLUB is not set
104# CONFIG_SLOB is not set
94CONFIG_RT_MUTEXES=y 105CONFIG_RT_MUTEXES=y
95# CONFIG_TINY_SHMEM is not set 106# CONFIG_TINY_SHMEM is not set
96CONFIG_BASE_SMALL=0 107CONFIG_BASE_SMALL=0
97# CONFIG_SLOB is not set
98 108
99# 109#
100# Loadable module support 110# Loadable module support
@@ -133,24 +143,54 @@ CONFIG_PPC_MULTIPLATFORM=y
133# CONFIG_EMBEDDED6xx is not set 143# CONFIG_EMBEDDED6xx is not set
134# CONFIG_APUS is not set 144# CONFIG_APUS is not set
135CONFIG_PPC_PSERIES=y 145CONFIG_PPC_PSERIES=y
146CONFIG_PPC_SPLPAR=y
147CONFIG_EEH=y
148CONFIG_SCANLOG=m
149CONFIG_LPARCFG=y
136CONFIG_PPC_ISERIES=y 150CONFIG_PPC_ISERIES=y
151
152#
153# iSeries device drivers
154#
155CONFIG_VIODASD=y
156CONFIG_VIOCD=m
157CONFIG_VIOTAPE=m
158CONFIG_VIOPATH=y
137# CONFIG_PPC_MPC52xx is not set 159# CONFIG_PPC_MPC52xx is not set
160# CONFIG_PPC_MPC5200 is not set
138CONFIG_PPC_PMAC=y 161CONFIG_PPC_PMAC=y
139CONFIG_PPC_PMAC64=y 162CONFIG_PPC_PMAC64=y
140CONFIG_PPC_MAPLE=y 163CONFIG_PPC_MAPLE=y
141# CONFIG_PPC_PASEMI is not set 164# CONFIG_PPC_PASEMI is not set
165CONFIG_PPC_CELLEB=y
166# CONFIG_PPC_PS3 is not set
142CONFIG_PPC_CELL=y 167CONFIG_PPC_CELL=y
143CONFIG_PPC_CELL_NATIVE=y 168CONFIG_PPC_CELL_NATIVE=y
144CONFIG_PPC_IBM_CELL_BLADE=y 169CONFIG_PPC_IBM_CELL_BLADE=y
145# CONFIG_PPC_PS3 is not set 170
171#
172# Cell Broadband Engine options
173#
174CONFIG_SPU_FS=m
175CONFIG_SPU_FS_64K_LS=y
176CONFIG_SPU_BASE=y
177CONFIG_CBE_RAS=y
178CONFIG_CBE_THERM=m
179CONFIG_CBE_CPUFREQ=m
180# CONFIG_PQ2ADS is not set
146CONFIG_PPC_NATIVE=y 181CONFIG_PPC_NATIVE=y
147CONFIG_UDBG_RTAS_CONSOLE=y 182CONFIG_UDBG_RTAS_CONSOLE=y
183CONFIG_PPC_UDBG_BEAT=y
148CONFIG_XICS=y 184CONFIG_XICS=y
185CONFIG_MPIC=y
186# CONFIG_MPIC_WEIRD is not set
187CONFIG_PPC_I8259=y
149CONFIG_U3_DART=y 188CONFIG_U3_DART=y
150CONFIG_PPC_RTAS=y 189CONFIG_PPC_RTAS=y
151CONFIG_RTAS_ERROR_LOGGING=y 190CONFIG_RTAS_ERROR_LOGGING=y
152CONFIG_RTAS_PROC=y 191CONFIG_RTAS_PROC=y
153CONFIG_RTAS_FLASH=m 192CONFIG_RTAS_FLASH=m
193CONFIG_PPC_PMI=m
154CONFIG_MMIO_NVRAM=y 194CONFIG_MMIO_NVRAM=y
155CONFIG_MPIC_U3_HT_IRQS=y 195CONFIG_MPIC_U3_HT_IRQS=y
156CONFIG_IBMVIO=y 196CONFIG_IBMVIO=y
@@ -171,18 +211,12 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
171CONFIG_CPU_FREQ_GOV_USERSPACE=y 211CONFIG_CPU_FREQ_GOV_USERSPACE=y
172# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set 212# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
173# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set 213# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
174CONFIG_CPU_FREQ_PMAC64=y
175# CONFIG_WANT_EARLY_SERIAL is not set
176CONFIG_MPIC=y
177 214
178# 215#
179# Cell Broadband Engine options 216# CPU Frequency drivers
180# 217#
181CONFIG_SPU_FS=m 218CONFIG_CPU_FREQ_PMAC64=y
182CONFIG_SPU_BASE=y 219# CONFIG_CPM2 is not set
183CONFIG_CBE_RAS=y
184CONFIG_CBE_THERM=m
185CONFIG_CBE_CPUFREQ=m
186 220
187# 221#
188# Kernel options 222# Kernel options
@@ -205,10 +239,6 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
205CONFIG_KEXEC=y 239CONFIG_KEXEC=y
206# CONFIG_CRASH_DUMP is not set 240# CONFIG_CRASH_DUMP is not set
207CONFIG_IRQ_ALL_CPUS=y 241CONFIG_IRQ_ALL_CPUS=y
208CONFIG_PPC_SPLPAR=y
209CONFIG_EEH=y
210CONFIG_SCANLOG=m
211CONFIG_LPARCFG=y
212# CONFIG_NUMA is not set 242# CONFIG_NUMA is not set
213CONFIG_ARCH_SELECT_MEMORY_MODEL=y 243CONFIG_ARCH_SELECT_MEMORY_MODEL=y
214CONFIG_ARCH_FLATMEM_ENABLE=y 244CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -227,35 +257,35 @@ CONFIG_MEMORY_HOTPLUG=y
227CONFIG_MEMORY_HOTPLUG_SPARSE=y 257CONFIG_MEMORY_HOTPLUG_SPARSE=y
228CONFIG_SPLIT_PTLOCK_CPUS=4 258CONFIG_SPLIT_PTLOCK_CPUS=4
229CONFIG_RESOURCES_64BIT=y 259CONFIG_RESOURCES_64BIT=y
260CONFIG_ZONE_DMA_FLAG=1
230CONFIG_ARCH_MEMORY_PROBE=y 261CONFIG_ARCH_MEMORY_PROBE=y
262CONFIG_PPC_HAS_HASH_64K=y
231# CONFIG_PPC_64K_PAGES is not set 263# CONFIG_PPC_64K_PAGES is not set
232# CONFIG_SCHED_SMT is not set 264# CONFIG_SCHED_SMT is not set
233CONFIG_PROC_DEVICETREE=y 265CONFIG_PROC_DEVICETREE=y
234# CONFIG_CMDLINE_BOOL is not set 266# CONFIG_CMDLINE_BOOL is not set
235# CONFIG_PM is not set 267# CONFIG_PM is not set
236CONFIG_SECCOMP=y 268CONFIG_SECCOMP=y
269# CONFIG_WANT_DEVICE_TREE is not set
237CONFIG_ISA_DMA_API=y 270CONFIG_ISA_DMA_API=y
238 271
239# 272#
240# Bus options 273# Bus options
241# 274#
275CONFIG_ZONE_DMA=y
242CONFIG_GENERIC_ISA_DMA=y 276CONFIG_GENERIC_ISA_DMA=y
243# CONFIG_MPIC_WEIRD is not set
244CONFIG_PPC_I8259=y
245# CONFIG_PPC_INDIRECT_PCI is not set 277# CONFIG_PPC_INDIRECT_PCI is not set
246CONFIG_PCI=y 278CONFIG_PCI=y
247CONFIG_PCI_DOMAINS=y 279CONFIG_PCI_DOMAINS=y
248# CONFIG_PCIEPORTBUS is not set 280# CONFIG_PCIEPORTBUS is not set
281CONFIG_ARCH_SUPPORTS_MSI=y
282CONFIG_PCI_MSI=y
249# CONFIG_PCI_DEBUG is not set 283# CONFIG_PCI_DEBUG is not set
250 284
251# 285#
252# PCCARD (PCMCIA/CardBus) support 286# PCCARD (PCMCIA/CardBus) support
253# 287#
254# CONFIG_PCCARD is not set 288# CONFIG_PCCARD is not set
255
256#
257# PCI Hotplug Support
258#
259CONFIG_HOTPLUG_PCI=m 289CONFIG_HOTPLUG_PCI=m
260# CONFIG_HOTPLUG_PCI_FAKE is not set 290# CONFIG_HOTPLUG_PCI_FAKE is not set
261# CONFIG_HOTPLUG_PCI_CPCI is not set 291# CONFIG_HOTPLUG_PCI_CPCI is not set
@@ -272,14 +302,15 @@ CONFIG_NET=y
272# 302#
273# Networking options 303# Networking options
274# 304#
275# CONFIG_NETDEBUG is not set
276CONFIG_PACKET=y 305CONFIG_PACKET=y
277# CONFIG_PACKET_MMAP is not set 306# CONFIG_PACKET_MMAP is not set
278CONFIG_UNIX=y 307CONFIG_UNIX=y
279CONFIG_XFRM=y 308CONFIG_XFRM=y
280CONFIG_XFRM_USER=m 309CONFIG_XFRM_USER=m
281# CONFIG_XFRM_SUB_POLICY is not set 310# CONFIG_XFRM_SUB_POLICY is not set
311# CONFIG_XFRM_MIGRATE is not set
282CONFIG_NET_KEY=m 312CONFIG_NET_KEY=m
313# CONFIG_NET_KEY_MIGRATE is not set
283CONFIG_INET=y 314CONFIG_INET=y
284CONFIG_IP_MULTICAST=y 315CONFIG_IP_MULTICAST=y
285# CONFIG_IP_ADVANCED_ROUTER is not set 316# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -304,10 +335,6 @@ CONFIG_INET_TCP_DIAG=y
304CONFIG_TCP_CONG_CUBIC=y 335CONFIG_TCP_CONG_CUBIC=y
305CONFIG_DEFAULT_TCP_CONG="cubic" 336CONFIG_DEFAULT_TCP_CONG="cubic"
306# CONFIG_TCP_MD5SIG is not set 337# CONFIG_TCP_MD5SIG is not set
307
308#
309# IP: Virtual Server Configuration
310#
311# CONFIG_IP_VS is not set 338# CONFIG_IP_VS is not set
312# CONFIG_IPV6 is not set 339# CONFIG_IPV6 is not set
313# CONFIG_INET6_XFRM_TUNNEL is not set 340# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -323,8 +350,6 @@ CONFIG_NETFILTER_NETLINK=y
323CONFIG_NETFILTER_NETLINK_QUEUE=m 350CONFIG_NETFILTER_NETLINK_QUEUE=m
324CONFIG_NETFILTER_NETLINK_LOG=m 351CONFIG_NETFILTER_NETLINK_LOG=m
325CONFIG_NF_CONNTRACK_ENABLED=m 352CONFIG_NF_CONNTRACK_ENABLED=m
326CONFIG_NF_CONNTRACK_SUPPORT=y
327# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
328CONFIG_NF_CONNTRACK=m 353CONFIG_NF_CONNTRACK=m
329CONFIG_NF_CT_ACCT=y 354CONFIG_NF_CT_ACCT=y
330CONFIG_NF_CONNTRACK_MARK=y 355CONFIG_NF_CONNTRACK_MARK=y
@@ -337,10 +362,42 @@ CONFIG_NF_CONNTRACK_H323=m
337CONFIG_NF_CONNTRACK_IRC=m 362CONFIG_NF_CONNTRACK_IRC=m
338CONFIG_NF_CONNTRACK_NETBIOS_NS=m 363CONFIG_NF_CONNTRACK_NETBIOS_NS=m
339CONFIG_NF_CONNTRACK_PPTP=m 364CONFIG_NF_CONNTRACK_PPTP=m
365# CONFIG_NF_CONNTRACK_SANE is not set
340CONFIG_NF_CONNTRACK_SIP=m 366CONFIG_NF_CONNTRACK_SIP=m
341CONFIG_NF_CONNTRACK_TFTP=m 367CONFIG_NF_CONNTRACK_TFTP=m
342CONFIG_NF_CT_NETLINK=m 368CONFIG_NF_CT_NETLINK=m
343# CONFIG_NETFILTER_XTABLES is not set 369CONFIG_NETFILTER_XTABLES=m
370CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
371CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
372CONFIG_NETFILTER_XT_TARGET_DSCP=m
373CONFIG_NETFILTER_XT_TARGET_MARK=m
374CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
375CONFIG_NETFILTER_XT_TARGET_NFLOG=m
376CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
377CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
378CONFIG_NETFILTER_XT_MATCH_COMMENT=m
379CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
380CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
381CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
382CONFIG_NETFILTER_XT_MATCH_DCCP=m
383CONFIG_NETFILTER_XT_MATCH_DSCP=m
384CONFIG_NETFILTER_XT_MATCH_ESP=m
385CONFIG_NETFILTER_XT_MATCH_HELPER=m
386CONFIG_NETFILTER_XT_MATCH_LENGTH=m
387CONFIG_NETFILTER_XT_MATCH_LIMIT=m
388CONFIG_NETFILTER_XT_MATCH_MAC=m
389CONFIG_NETFILTER_XT_MATCH_MARK=m
390CONFIG_NETFILTER_XT_MATCH_POLICY=m
391CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
392CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
393CONFIG_NETFILTER_XT_MATCH_QUOTA=m
394CONFIG_NETFILTER_XT_MATCH_REALM=m
395CONFIG_NETFILTER_XT_MATCH_SCTP=m
396CONFIG_NETFILTER_XT_MATCH_STATE=m
397CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
398CONFIG_NETFILTER_XT_MATCH_STRING=m
399CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
400CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
344 401
345# 402#
346# IP: Netfilter Configuration 403# IP: Netfilter Configuration
@@ -348,20 +405,45 @@ CONFIG_NF_CT_NETLINK=m
348CONFIG_NF_CONNTRACK_IPV4=m 405CONFIG_NF_CONNTRACK_IPV4=m
349CONFIG_NF_CONNTRACK_PROC_COMPAT=y 406CONFIG_NF_CONNTRACK_PROC_COMPAT=y
350CONFIG_IP_NF_QUEUE=m 407CONFIG_IP_NF_QUEUE=m
351 408CONFIG_IP_NF_IPTABLES=m
352# 409CONFIG_IP_NF_MATCH_IPRANGE=m
353# DCCP Configuration (EXPERIMENTAL) 410CONFIG_IP_NF_MATCH_TOS=m
354# 411CONFIG_IP_NF_MATCH_RECENT=m
412CONFIG_IP_NF_MATCH_ECN=m
413CONFIG_IP_NF_MATCH_AH=m
414CONFIG_IP_NF_MATCH_TTL=m
415CONFIG_IP_NF_MATCH_OWNER=m
416CONFIG_IP_NF_MATCH_ADDRTYPE=m
417CONFIG_IP_NF_FILTER=m
418CONFIG_IP_NF_TARGET_REJECT=m
419CONFIG_IP_NF_TARGET_LOG=m
420CONFIG_IP_NF_TARGET_ULOG=m
421CONFIG_NF_NAT=m
422CONFIG_NF_NAT_NEEDED=y
423CONFIG_IP_NF_TARGET_MASQUERADE=m
424CONFIG_IP_NF_TARGET_REDIRECT=m
425CONFIG_IP_NF_TARGET_NETMAP=m
426CONFIG_IP_NF_TARGET_SAME=m
427CONFIG_NF_NAT_SNMP_BASIC=m
428CONFIG_NF_NAT_PROTO_GRE=m
429CONFIG_NF_NAT_FTP=m
430CONFIG_NF_NAT_IRC=m
431CONFIG_NF_NAT_TFTP=m
432CONFIG_NF_NAT_AMANDA=m
433CONFIG_NF_NAT_PPTP=m
434CONFIG_NF_NAT_H323=m
435CONFIG_NF_NAT_SIP=m
436CONFIG_IP_NF_MANGLE=m
437CONFIG_IP_NF_TARGET_TOS=m
438CONFIG_IP_NF_TARGET_ECN=m
439CONFIG_IP_NF_TARGET_TTL=m
440CONFIG_IP_NF_TARGET_CLUSTERIP=m
441CONFIG_IP_NF_RAW=m
442CONFIG_IP_NF_ARPTABLES=m
443CONFIG_IP_NF_ARPFILTER=m
444CONFIG_IP_NF_ARP_MANGLE=m
355# CONFIG_IP_DCCP is not set 445# CONFIG_IP_DCCP is not set
356
357#
358# SCTP Configuration (EXPERIMENTAL)
359#
360# CONFIG_IP_SCTP is not set 446# CONFIG_IP_SCTP is not set
361
362#
363# TIPC Configuration (EXPERIMENTAL)
364#
365# CONFIG_TIPC is not set 447# CONFIG_TIPC is not set
366# CONFIG_ATM is not set 448# CONFIG_ATM is not set
367# CONFIG_BRIDGE is not set 449# CONFIG_BRIDGE is not set
@@ -380,6 +462,7 @@ CONFIG_LLC=y
380# QoS and/or fair queueing 462# QoS and/or fair queueing
381# 463#
382# CONFIG_NET_SCHED is not set 464# CONFIG_NET_SCHED is not set
465CONFIG_NET_CLS_ROUTE=y
383 466
384# 467#
385# Network testing 468# Network testing
@@ -388,7 +471,16 @@ CONFIG_LLC=y
388# CONFIG_HAMRADIO is not set 471# CONFIG_HAMRADIO is not set
389# CONFIG_IRDA is not set 472# CONFIG_IRDA is not set
390# CONFIG_BT is not set 473# CONFIG_BT is not set
474# CONFIG_AF_RXRPC is not set
475
476#
477# Wireless
478#
479# CONFIG_CFG80211 is not set
480# CONFIG_WIRELESS_EXT is not set
481# CONFIG_MAC80211 is not set
391# CONFIG_IEEE80211 is not set 482# CONFIG_IEEE80211 is not set
483# CONFIG_RFKILL is not set
392 484
393# 485#
394# Device Drivers 486# Device Drivers
@@ -401,16 +493,13 @@ CONFIG_STANDALONE=y
401CONFIG_PREVENT_FIRMWARE_BUILD=y 493CONFIG_PREVENT_FIRMWARE_BUILD=y
402CONFIG_FW_LOADER=y 494CONFIG_FW_LOADER=y
403# CONFIG_DEBUG_DRIVER is not set 495# CONFIG_DEBUG_DRIVER is not set
496# CONFIG_DEBUG_DEVRES is not set
404# CONFIG_SYS_HYPERVISOR is not set 497# CONFIG_SYS_HYPERVISOR is not set
405 498
406# 499#
407# Connector - unified userspace <-> kernelspace linker 500# Connector - unified userspace <-> kernelspace linker
408# 501#
409# CONFIG_CONNECTOR is not set 502# CONFIG_CONNECTOR is not set
410
411#
412# Memory Technology Devices (MTD)
413#
414# CONFIG_MTD is not set 503# CONFIG_MTD is not set
415 504
416# 505#
@@ -421,6 +510,7 @@ CONFIG_FW_LOADER=y
421# 510#
422# Plug and Play support 511# Plug and Play support
423# 512#
513# CONFIG_PNPACPI is not set
424 514
425# 515#
426# Block devices 516# Block devices
@@ -440,19 +530,16 @@ CONFIG_BLK_DEV_RAM=y
440CONFIG_BLK_DEV_RAM_COUNT=16 530CONFIG_BLK_DEV_RAM_COUNT=16
441CONFIG_BLK_DEV_RAM_SIZE=65536 531CONFIG_BLK_DEV_RAM_SIZE=65536
442CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 532CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
443CONFIG_BLK_DEV_INITRD=y
444# CONFIG_CDROM_PKTCDVD is not set 533# CONFIG_CDROM_PKTCDVD is not set
445# CONFIG_ATA_OVER_ETH is not set 534# CONFIG_ATA_OVER_ETH is not set
446 535
447# 536#
448# Misc devices 537# Misc devices
449# 538#
539# CONFIG_PHANTOM is not set
450# CONFIG_SGI_IOC4 is not set 540# CONFIG_SGI_IOC4 is not set
451# CONFIG_TIFM_CORE is not set 541# CONFIG_TIFM_CORE is not set
452 542# CONFIG_BLINK is not set
453#
454# ATA/ATAPI/MFM/RLL support
455#
456CONFIG_IDE=y 543CONFIG_IDE=y
457CONFIG_BLK_DEV_IDE=y 544CONFIG_BLK_DEV_IDE=y
458 545
@@ -467,6 +554,7 @@ CONFIG_BLK_DEV_IDECD=y
467# CONFIG_BLK_DEV_IDEFLOPPY is not set 554# CONFIG_BLK_DEV_IDEFLOPPY is not set
468# CONFIG_BLK_DEV_IDESCSI is not set 555# CONFIG_BLK_DEV_IDESCSI is not set
469# CONFIG_IDE_TASK_IOCTL is not set 556# CONFIG_IDE_TASK_IOCTL is not set
557CONFIG_IDE_PROC_FS=y
470 558
471# 559#
472# IDE chipset support/bugfixes 560# IDE chipset support/bugfixes
@@ -474,12 +562,12 @@ CONFIG_BLK_DEV_IDECD=y
474CONFIG_IDE_GENERIC=y 562CONFIG_IDE_GENERIC=y
475CONFIG_BLK_DEV_IDEPCI=y 563CONFIG_BLK_DEV_IDEPCI=y
476CONFIG_IDEPCI_SHARE_IRQ=y 564CONFIG_IDEPCI_SHARE_IRQ=y
565CONFIG_IDEPCI_PCIBUS_ORDER=y
477# CONFIG_BLK_DEV_OFFBOARD is not set 566# CONFIG_BLK_DEV_OFFBOARD is not set
478CONFIG_BLK_DEV_GENERIC=y 567CONFIG_BLK_DEV_GENERIC=y
479# CONFIG_BLK_DEV_OPTI621 is not set 568# CONFIG_BLK_DEV_OPTI621 is not set
480CONFIG_BLK_DEV_IDEDMA_PCI=y 569CONFIG_BLK_DEV_IDEDMA_PCI=y
481# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 570# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
482CONFIG_IDEDMA_PCI_AUTO=y
483# CONFIG_IDEDMA_ONLYDISK is not set 571# CONFIG_IDEDMA_ONLYDISK is not set
484# CONFIG_BLK_DEV_AEC62XX is not set 572# CONFIG_BLK_DEV_AEC62XX is not set
485# CONFIG_BLK_DEV_ALI15X3 is not set 573# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -494,6 +582,7 @@ CONFIG_BLK_DEV_AMD74XX=y
494# CONFIG_BLK_DEV_JMICRON is not set 582# CONFIG_BLK_DEV_JMICRON is not set
495# CONFIG_BLK_DEV_SC1200 is not set 583# CONFIG_BLK_DEV_SC1200 is not set
496# CONFIG_BLK_DEV_PIIX is not set 584# CONFIG_BLK_DEV_PIIX is not set
585# CONFIG_BLK_DEV_IT8213 is not set
497# CONFIG_BLK_DEV_IT821X is not set 586# CONFIG_BLK_DEV_IT821X is not set
498# CONFIG_BLK_DEV_NS87415 is not set 587# CONFIG_BLK_DEV_NS87415 is not set
499# CONFIG_BLK_DEV_PDC202XX_OLD is not set 588# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -504,13 +593,14 @@ CONFIG_BLK_DEV_AMD74XX=y
504# CONFIG_BLK_DEV_SLC90E66 is not set 593# CONFIG_BLK_DEV_SLC90E66 is not set
505# CONFIG_BLK_DEV_TRM290 is not set 594# CONFIG_BLK_DEV_TRM290 is not set
506# CONFIG_BLK_DEV_VIA82CXXX is not set 595# CONFIG_BLK_DEV_VIA82CXXX is not set
596# CONFIG_BLK_DEV_TC86C001 is not set
597CONFIG_BLK_DEV_CELLEB=y
507CONFIG_BLK_DEV_IDE_PMAC=y 598CONFIG_BLK_DEV_IDE_PMAC=y
508CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y 599CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
509CONFIG_BLK_DEV_IDEDMA_PMAC=y 600CONFIG_BLK_DEV_IDEDMA_PMAC=y
510# CONFIG_IDE_ARM is not set 601# CONFIG_IDE_ARM is not set
511CONFIG_BLK_DEV_IDEDMA=y 602CONFIG_BLK_DEV_IDEDMA=y
512# CONFIG_IDEDMA_IVB is not set 603# CONFIG_IDEDMA_IVB is not set
513CONFIG_IDEDMA_AUTO=y
514# CONFIG_BLK_DEV_HD is not set 604# CONFIG_BLK_DEV_HD is not set
515 605
516# 606#
@@ -540,6 +630,7 @@ CONFIG_SCSI_MULTI_LUN=y
540CONFIG_SCSI_CONSTANTS=y 630CONFIG_SCSI_CONSTANTS=y
541# CONFIG_SCSI_LOGGING is not set 631# CONFIG_SCSI_LOGGING is not set
542# CONFIG_SCSI_SCAN_ASYNC is not set 632# CONFIG_SCSI_SCAN_ASYNC is not set
633CONFIG_SCSI_WAIT_SCAN=m
543 634
544# 635#
545# SCSI Transports 636# SCSI Transports
@@ -593,11 +684,8 @@ CONFIG_SCSI_LPFC=m
593# CONFIG_SCSI_DC390T is not set 684# CONFIG_SCSI_DC390T is not set
594CONFIG_SCSI_DEBUG=m 685CONFIG_SCSI_DEBUG=m
595# CONFIG_SCSI_SRP is not set 686# CONFIG_SCSI_SRP is not set
596
597#
598# Serial ATA (prod) and Parallel ATA (experimental) drivers
599#
600CONFIG_ATA=y 687CONFIG_ATA=y
688CONFIG_ATA_NONSTANDARD=y
601# CONFIG_SATA_AHCI is not set 689# CONFIG_SATA_AHCI is not set
602CONFIG_SATA_SVW=y 690CONFIG_SATA_SVW=y
603# CONFIG_ATA_PIIX is not set 691# CONFIG_ATA_PIIX is not set
@@ -613,10 +701,12 @@ CONFIG_SATA_SVW=y
613# CONFIG_SATA_ULI is not set 701# CONFIG_SATA_ULI is not set
614# CONFIG_SATA_VIA is not set 702# CONFIG_SATA_VIA is not set
615# CONFIG_SATA_VITESSE is not set 703# CONFIG_SATA_VITESSE is not set
704# CONFIG_SATA_INIC162X is not set
616# CONFIG_PATA_ALI is not set 705# CONFIG_PATA_ALI is not set
617# CONFIG_PATA_AMD is not set 706# CONFIG_PATA_AMD is not set
618# CONFIG_PATA_ARTOP is not set 707# CONFIG_PATA_ARTOP is not set
619# CONFIG_PATA_ATIIXP is not set 708# CONFIG_PATA_ATIIXP is not set
709# CONFIG_PATA_CMD640_PCI is not set
620# CONFIG_PATA_CMD64X is not set 710# CONFIG_PATA_CMD64X is not set
621# CONFIG_PATA_CS5520 is not set 711# CONFIG_PATA_CS5520 is not set
622# CONFIG_PATA_CS5530 is not set 712# CONFIG_PATA_CS5530 is not set
@@ -628,6 +718,7 @@ CONFIG_SATA_SVW=y
628# CONFIG_PATA_HPT3X2N is not set 718# CONFIG_PATA_HPT3X2N is not set
629# CONFIG_PATA_HPT3X3 is not set 719# CONFIG_PATA_HPT3X3 is not set
630# CONFIG_PATA_IT821X is not set 720# CONFIG_PATA_IT821X is not set
721# CONFIG_PATA_IT8213 is not set
631# CONFIG_PATA_JMICRON is not set 722# CONFIG_PATA_JMICRON is not set
632# CONFIG_PATA_TRIFLEX is not set 723# CONFIG_PATA_TRIFLEX is not set
633# CONFIG_PATA_MARVELL is not set 724# CONFIG_PATA_MARVELL is not set
@@ -647,6 +738,7 @@ CONFIG_SATA_SVW=y
647# CONFIG_PATA_SIS is not set 738# CONFIG_PATA_SIS is not set
648# CONFIG_PATA_VIA is not set 739# CONFIG_PATA_VIA is not set
649CONFIG_PATA_WINBOND=y 740CONFIG_PATA_WINBOND=y
741CONFIG_PATA_SCC=y
650 742
651# 743#
652# Multi-device support (RAID and LVM) 744# Multi-device support (RAID and LVM)
@@ -669,6 +761,7 @@ CONFIG_DM_MIRROR=m
669CONFIG_DM_ZERO=m 761CONFIG_DM_ZERO=m
670CONFIG_DM_MULTIPATH=m 762CONFIG_DM_MULTIPATH=m
671CONFIG_DM_MULTIPATH_EMC=m 763CONFIG_DM_MULTIPATH_EMC=m
764# CONFIG_DM_DELAY is not set
672 765
673# 766#
674# Fusion MPT device support 767# Fusion MPT device support
@@ -681,28 +774,26 @@ CONFIG_DM_MULTIPATH_EMC=m
681# 774#
682# IEEE 1394 (FireWire) support 775# IEEE 1394 (FireWire) support
683# 776#
777# CONFIG_FIREWIRE is not set
684CONFIG_IEEE1394=y 778CONFIG_IEEE1394=y
685 779
686# 780#
687# Subsystem Options 781# Subsystem Options
688# 782#
689# CONFIG_IEEE1394_VERBOSEDEBUG is not set 783# CONFIG_IEEE1394_VERBOSEDEBUG is not set
690# CONFIG_IEEE1394_OUI_DB is not set
691CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
692CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
693# CONFIG_IEEE1394_EXPORT_FULL_API is not set
694 784
695# 785#
696# Device Drivers 786# Controllers
697# 787#
698# CONFIG_IEEE1394_PCILYNX is not set 788# CONFIG_IEEE1394_PCILYNX is not set
699CONFIG_IEEE1394_OHCI1394=y 789CONFIG_IEEE1394_OHCI1394=y
700 790
701# 791#
702# Protocol Drivers 792# Protocols
703# 793#
704CONFIG_IEEE1394_VIDEO1394=m 794CONFIG_IEEE1394_VIDEO1394=m
705CONFIG_IEEE1394_SBP2=m 795CONFIG_IEEE1394_SBP2=m
796CONFIG_IEEE1394_ETH1394_ROM_ENTRY=y
706CONFIG_IEEE1394_ETH1394=m 797CONFIG_IEEE1394_ETH1394=m
707CONFIG_IEEE1394_DV1394=m 798CONFIG_IEEE1394_DV1394=m
708CONFIG_IEEE1394_RAWIO=y 799CONFIG_IEEE1394_RAWIO=y
@@ -711,10 +802,7 @@ CONFIG_IEEE1394_RAWIO=y
711# I2O device support 802# I2O device support
712# 803#
713# CONFIG_I2O is not set 804# CONFIG_I2O is not set
714 805CONFIG_MACINTOSH_DRIVERS=y
715#
716# Macintosh device drivers
717#
718CONFIG_ADB_PMU=y 806CONFIG_ADB_PMU=y
719# CONFIG_ADB_PMU_LED is not set 807# CONFIG_ADB_PMU_LED is not set
720CONFIG_PMAC_SMU=y 808CONFIG_PMAC_SMU=y
@@ -734,16 +822,23 @@ CONFIG_DUMMY=m
734CONFIG_BONDING=m 822CONFIG_BONDING=m
735# CONFIG_EQUALIZER is not set 823# CONFIG_EQUALIZER is not set
736CONFIG_TUN=m 824CONFIG_TUN=m
737
738#
739# ARCnet devices
740#
741# CONFIG_ARCNET is not set 825# CONFIG_ARCNET is not set
826CONFIG_PHYLIB=m
742 827
743# 828#
744# PHY device support 829# MII PHY device drivers
745# 830#
746# CONFIG_PHYLIB is not set 831CONFIG_MARVELL_PHY=m
832# CONFIG_DAVICOM_PHY is not set
833# CONFIG_QSEMI_PHY is not set
834# CONFIG_LXT_PHY is not set
835# CONFIG_CICADA_PHY is not set
836# CONFIG_VITESSE_PHY is not set
837# CONFIG_SMSC_PHY is not set
838CONFIG_BROADCOM_PHY=m
839CONFIG_FIXED_PHY=m
840CONFIG_FIXED_MII_10_FDX=y
841CONFIG_FIXED_MII_100_FDX=y
747 842
748# 843#
749# Ethernet (10 or 100Mbit) 844# Ethernet (10 or 100Mbit)
@@ -782,10 +877,8 @@ CONFIG_E100=y
782# CONFIG_EPIC100 is not set 877# CONFIG_EPIC100 is not set
783# CONFIG_SUNDANCE is not set 878# CONFIG_SUNDANCE is not set
784# CONFIG_VIA_RHINE is not set 879# CONFIG_VIA_RHINE is not set
785 880# CONFIG_SC92031 is not set
786# 881CONFIG_NETDEV_1000=y
787# Ethernet (1000 Mbit)
788#
789CONFIG_ACENIC=y 882CONFIG_ACENIC=y
790CONFIG_ACENIC_OMIT_TIGON_I=y 883CONFIG_ACENIC_OMIT_TIGON_I=y
791# CONFIG_DL2K is not set 884# CONFIG_DL2K is not set
@@ -805,33 +898,37 @@ CONFIG_TIGON3=y
805# CONFIG_BNX2 is not set 898# CONFIG_BNX2 is not set
806CONFIG_SPIDER_NET=m 899CONFIG_SPIDER_NET=m
807# CONFIG_QLA3XXX is not set 900# CONFIG_QLA3XXX is not set
808 901# CONFIG_ATL1 is not set
809# 902CONFIG_NETDEV_10000=y
810# Ethernet (10000 Mbit)
811#
812# CONFIG_CHELSIO_T1 is not set 903# CONFIG_CHELSIO_T1 is not set
904# CONFIG_CHELSIO_T3 is not set
813CONFIG_IXGB=m 905CONFIG_IXGB=m
814# CONFIG_IXGB_NAPI is not set 906# CONFIG_IXGB_NAPI is not set
815# CONFIG_S2IO is not set 907# CONFIG_S2IO is not set
816# CONFIG_MYRI10GE is not set 908# CONFIG_MYRI10GE is not set
817# CONFIG_NETXEN_NIC is not set 909# CONFIG_NETXEN_NIC is not set
818 910CONFIG_PASEMI_MAC=m
819# 911# CONFIG_MLX4_CORE is not set
820# Token Ring devices
821#
822CONFIG_TR=y 912CONFIG_TR=y
823CONFIG_IBMOL=y 913CONFIG_IBMOL=y
824# CONFIG_3C359 is not set 914# CONFIG_3C359 is not set
825# CONFIG_TMS380TR is not set 915# CONFIG_TMS380TR is not set
826 916
827# 917#
828# Wireless LAN (non-hamradio) 918# Wireless LAN
829# 919#
830# CONFIG_NET_RADIO is not set 920# CONFIG_WLAN_PRE80211 is not set
921# CONFIG_WLAN_80211 is not set
831 922
832# 923#
833# Wan interfaces 924# USB Network Adapters
834# 925#
926# CONFIG_USB_CATC is not set
927# CONFIG_USB_KAWETH is not set
928# CONFIG_USB_PEGASUS is not set
929# CONFIG_USB_RTL8150 is not set
930# CONFIG_USB_USBNET_MII is not set
931# CONFIG_USB_USBNET is not set
835# CONFIG_WAN is not set 932# CONFIG_WAN is not set
836CONFIG_ISERIES_VETH=m 933CONFIG_ISERIES_VETH=m
837# CONFIG_FDDI is not set 934# CONFIG_FDDI is not set
@@ -851,7 +948,6 @@ CONFIG_SLHC=m
851# CONFIG_SHAPER is not set 948# CONFIG_SHAPER is not set
852CONFIG_NETCONSOLE=y 949CONFIG_NETCONSOLE=y
853CONFIG_NETPOLL=y 950CONFIG_NETPOLL=y
854CONFIG_NETPOLL_RX=y
855CONFIG_NETPOLL_TRAP=y 951CONFIG_NETPOLL_TRAP=y
856CONFIG_NET_POLL_CONTROLLER=y 952CONFIG_NET_POLL_CONTROLLER=y
857 953
@@ -870,6 +966,7 @@ CONFIG_NET_POLL_CONTROLLER=y
870# 966#
871CONFIG_INPUT=y 967CONFIG_INPUT=y
872# CONFIG_INPUT_FF_MEMLESS is not set 968# CONFIG_INPUT_FF_MEMLESS is not set
969# CONFIG_INPUT_POLLDEV is not set
873 970
874# 971#
875# Userland interfaces 972# Userland interfaces
@@ -895,12 +992,25 @@ CONFIG_KEYBOARD_ATKBD=y
895# CONFIG_KEYBOARD_STOWAWAY is not set 992# CONFIG_KEYBOARD_STOWAWAY is not set
896CONFIG_INPUT_MOUSE=y 993CONFIG_INPUT_MOUSE=y
897CONFIG_MOUSE_PS2=y 994CONFIG_MOUSE_PS2=y
995CONFIG_MOUSE_PS2_ALPS=y
996CONFIG_MOUSE_PS2_LOGIPS2PP=y
997CONFIG_MOUSE_PS2_SYNAPTICS=y
998CONFIG_MOUSE_PS2_LIFEBOOK=y
999CONFIG_MOUSE_PS2_TRACKPOINT=y
1000# CONFIG_MOUSE_PS2_TOUCHKIT is not set
898# CONFIG_MOUSE_SERIAL is not set 1001# CONFIG_MOUSE_SERIAL is not set
1002# CONFIG_MOUSE_APPLETOUCH is not set
899# CONFIG_MOUSE_VSXXXAA is not set 1003# CONFIG_MOUSE_VSXXXAA is not set
900# CONFIG_INPUT_JOYSTICK is not set 1004# CONFIG_INPUT_JOYSTICK is not set
1005# CONFIG_INPUT_TABLET is not set
901# CONFIG_INPUT_TOUCHSCREEN is not set 1006# CONFIG_INPUT_TOUCHSCREEN is not set
902CONFIG_INPUT_MISC=y 1007CONFIG_INPUT_MISC=y
903CONFIG_INPUT_PCSPKR=m 1008CONFIG_INPUT_PCSPKR=m
1009# CONFIG_INPUT_ATI_REMOTE is not set
1010# CONFIG_INPUT_ATI_REMOTE2 is not set
1011# CONFIG_INPUT_KEYSPAN_REMOTE is not set
1012# CONFIG_INPUT_POWERMATE is not set
1013# CONFIG_INPUT_YEALINK is not set
904# CONFIG_INPUT_UINPUT is not set 1014# CONFIG_INPUT_UINPUT is not set
905 1015
906# 1016#
@@ -940,7 +1050,12 @@ CONFIG_SERIAL_CORE=y
940CONFIG_SERIAL_CORE_CONSOLE=y 1050CONFIG_SERIAL_CORE_CONSOLE=y
941# CONFIG_SERIAL_PMACZILOG is not set 1051# CONFIG_SERIAL_PMACZILOG is not set
942CONFIG_SERIAL_ICOM=m 1052CONFIG_SERIAL_ICOM=m
1053CONFIG_SERIAL_TXX9=y
1054CONFIG_HAS_TXX9_SERIAL=y
1055CONFIG_SERIAL_TXX9_NR_UARTS=6
1056CONFIG_SERIAL_TXX9_CONSOLE=y
943# CONFIG_SERIAL_JSM is not set 1057# CONFIG_SERIAL_JSM is not set
1058# CONFIG_SERIAL_OF_PLATFORM is not set
944CONFIG_UNIX98_PTYS=y 1059CONFIG_UNIX98_PTYS=y
945CONFIG_LEGACY_PTYS=y 1060CONFIG_LEGACY_PTYS=y
946CONFIG_LEGACY_PTY_COUNT=256 1061CONFIG_LEGACY_PTY_COUNT=256
@@ -948,21 +1063,17 @@ CONFIG_HVC_DRIVER=y
948CONFIG_HVC_CONSOLE=y 1063CONFIG_HVC_CONSOLE=y
949CONFIG_HVC_ISERIES=y 1064CONFIG_HVC_ISERIES=y
950CONFIG_HVC_RTAS=y 1065CONFIG_HVC_RTAS=y
1066CONFIG_HVC_BEAT=y
951CONFIG_HVCS=m 1067CONFIG_HVCS=m
952 1068
953# 1069#
954# IPMI 1070# IPMI
955# 1071#
956# CONFIG_IPMI_HANDLER is not set 1072# CONFIG_IPMI_HANDLER is not set
957
958#
959# Watchdog Cards
960#
961# CONFIG_WATCHDOG is not set 1073# CONFIG_WATCHDOG is not set
962# CONFIG_HW_RANDOM is not set 1074# CONFIG_HW_RANDOM is not set
963CONFIG_GEN_RTC=y 1075CONFIG_GEN_RTC=y
964# CONFIG_GEN_RTC_X is not set 1076# CONFIG_GEN_RTC_X is not set
965# CONFIG_DTLK is not set
966# CONFIG_R3964 is not set 1077# CONFIG_R3964 is not set
967# CONFIG_APPLICOM is not set 1078# CONFIG_APPLICOM is not set
968# CONFIG_AGP is not set 1079# CONFIG_AGP is not set
@@ -975,11 +1086,9 @@ CONFIG_MAX_RAW_DEVS=256
975# TPM devices 1086# TPM devices
976# 1087#
977# CONFIG_TCG_TPM is not set 1088# CONFIG_TCG_TPM is not set
978 1089CONFIG_DEVPORT=y
979#
980# I2C support
981#
982CONFIG_I2C=y 1090CONFIG_I2C=y
1091CONFIG_I2C_BOARDINFO=y
983CONFIG_I2C_CHARDEV=y 1092CONFIG_I2C_CHARDEV=y
984 1093
985# 1094#
@@ -1006,14 +1115,15 @@ CONFIG_I2C_POWERMAC=y
1006# CONFIG_I2C_PARPORT_LIGHT is not set 1115# CONFIG_I2C_PARPORT_LIGHT is not set
1007# CONFIG_I2C_PROSAVAGE is not set 1116# CONFIG_I2C_PROSAVAGE is not set
1008# CONFIG_I2C_SAVAGE4 is not set 1117# CONFIG_I2C_SAVAGE4 is not set
1118# CONFIG_I2C_SIMTEC is not set
1009# CONFIG_I2C_SIS5595 is not set 1119# CONFIG_I2C_SIS5595 is not set
1010# CONFIG_I2C_SIS630 is not set 1120# CONFIG_I2C_SIS630 is not set
1011# CONFIG_I2C_SIS96X is not set 1121# CONFIG_I2C_SIS96X is not set
1012# CONFIG_I2C_STUB is not set 1122# CONFIG_I2C_STUB is not set
1123# CONFIG_I2C_TINY_USB is not set
1013# CONFIG_I2C_VIA is not set 1124# CONFIG_I2C_VIA is not set
1014# CONFIG_I2C_VIAPRO is not set 1125# CONFIG_I2C_VIAPRO is not set
1015# CONFIG_I2C_VOODOO3 is not set 1126# CONFIG_I2C_VOODOO3 is not set
1016# CONFIG_I2C_PCA_ISA is not set
1017 1127
1018# 1128#
1019# Miscellaneous I2C Chip support 1129# Miscellaneous I2C Chip support
@@ -1040,37 +1150,56 @@ CONFIG_I2C_POWERMAC=y
1040# Dallas's 1-wire bus 1150# Dallas's 1-wire bus
1041# 1151#
1042# CONFIG_W1 is not set 1152# CONFIG_W1 is not set
1153# CONFIG_HWMON is not set
1043 1154
1044# 1155#
1045# Hardware Monitoring support 1156# Multifunction device drivers
1046# 1157#
1047# CONFIG_HWMON is not set 1158# CONFIG_MFD_SM501 is not set
1048# CONFIG_HWMON_VID is not set
1049 1159
1050# 1160#
1051# Multimedia devices 1161# Multimedia devices
1052# 1162#
1053# CONFIG_VIDEO_DEV is not set 1163# CONFIG_VIDEO_DEV is not set
1164# CONFIG_DVB_CORE is not set
1165# CONFIG_DAB is not set
1054 1166
1055# 1167#
1056# Digital Video Broadcasting Devices 1168# Graphics support
1057# 1169#
1058# CONFIG_DVB is not set 1170CONFIG_BACKLIGHT_LCD_SUPPORT=y
1059# CONFIG_USB_DABUSB is not set 1171CONFIG_BACKLIGHT_CLASS_DEVICE=y
1172CONFIG_LCD_CLASS_DEVICE=y
1060 1173
1061# 1174#
1062# Graphics support 1175# Display device support
1063# 1176#
1064CONFIG_FIRMWARE_EDID=y 1177CONFIG_DISPLAY_SUPPORT=y
1178
1179#
1180# Display hardware drivers
1181#
1182# CONFIG_VGASTATE is not set
1065CONFIG_FB=y 1183CONFIG_FB=y
1184CONFIG_FIRMWARE_EDID=y
1066CONFIG_FB_DDC=y 1185CONFIG_FB_DDC=y
1067CONFIG_FB_CFB_FILLRECT=y 1186CONFIG_FB_CFB_FILLRECT=y
1068CONFIG_FB_CFB_COPYAREA=y 1187CONFIG_FB_CFB_COPYAREA=y
1069CONFIG_FB_CFB_IMAGEBLIT=y 1188CONFIG_FB_CFB_IMAGEBLIT=y
1189# CONFIG_FB_SYS_FILLRECT is not set
1190# CONFIG_FB_SYS_COPYAREA is not set
1191# CONFIG_FB_SYS_IMAGEBLIT is not set
1192# CONFIG_FB_SYS_FOPS is not set
1193CONFIG_FB_DEFERRED_IO=y
1194# CONFIG_FB_SVGALIB is not set
1070CONFIG_FB_MACMODES=y 1195CONFIG_FB_MACMODES=y
1071# CONFIG_FB_BACKLIGHT is not set 1196CONFIG_FB_BACKLIGHT=y
1072CONFIG_FB_MODE_HELPERS=y 1197CONFIG_FB_MODE_HELPERS=y
1073CONFIG_FB_TILEBLITTING=y 1198CONFIG_FB_TILEBLITTING=y
1199
1200#
1201# Frame buffer hardware drivers
1202#
1074# CONFIG_FB_CIRRUS is not set 1203# CONFIG_FB_CIRRUS is not set
1075# CONFIG_FB_PM2 is not set 1204# CONFIG_FB_PM2 is not set
1076# CONFIG_FB_CYBER2000 is not set 1205# CONFIG_FB_CYBER2000 is not set
@@ -1090,16 +1219,21 @@ CONFIG_FB_MATROX_MAVEN=m
1090CONFIG_FB_MATROX_MULTIHEAD=y 1219CONFIG_FB_MATROX_MULTIHEAD=y
1091CONFIG_FB_RADEON=y 1220CONFIG_FB_RADEON=y
1092CONFIG_FB_RADEON_I2C=y 1221CONFIG_FB_RADEON_I2C=y
1222CONFIG_FB_RADEON_BACKLIGHT=y
1093# CONFIG_FB_RADEON_DEBUG is not set 1223# CONFIG_FB_RADEON_DEBUG is not set
1094# CONFIG_FB_ATY128 is not set 1224# CONFIG_FB_ATY128 is not set
1095# CONFIG_FB_ATY is not set 1225# CONFIG_FB_ATY is not set
1226# CONFIG_FB_S3 is not set
1096# CONFIG_FB_SAVAGE is not set 1227# CONFIG_FB_SAVAGE is not set
1097# CONFIG_FB_SIS is not set 1228# CONFIG_FB_SIS is not set
1098# CONFIG_FB_NEOMAGIC is not set 1229# CONFIG_FB_NEOMAGIC is not set
1099# CONFIG_FB_KYRO is not set 1230# CONFIG_FB_KYRO is not set
1100# CONFIG_FB_3DFX is not set 1231# CONFIG_FB_3DFX is not set
1101# CONFIG_FB_VOODOO1 is not set 1232# CONFIG_FB_VOODOO1 is not set
1233# CONFIG_FB_VT8623 is not set
1102# CONFIG_FB_TRIDENT is not set 1234# CONFIG_FB_TRIDENT is not set
1235# CONFIG_FB_ARK is not set
1236# CONFIG_FB_PM3 is not set
1103CONFIG_FB_IBM_GXT4500=y 1237CONFIG_FB_IBM_GXT4500=y
1104# CONFIG_FB_VIRTUAL is not set 1238# CONFIG_FB_VIRTUAL is not set
1105 1239
@@ -1113,19 +1247,10 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
1113# CONFIG_FONTS is not set 1247# CONFIG_FONTS is not set
1114CONFIG_FONT_8x8=y 1248CONFIG_FONT_8x8=y
1115CONFIG_FONT_8x16=y 1249CONFIG_FONT_8x16=y
1116
1117#
1118# Logo configuration
1119#
1120CONFIG_LOGO=y 1250CONFIG_LOGO=y
1121CONFIG_LOGO_LINUX_MONO=y 1251CONFIG_LOGO_LINUX_MONO=y
1122CONFIG_LOGO_LINUX_VGA16=y 1252CONFIG_LOGO_LINUX_VGA16=y
1123CONFIG_LOGO_LINUX_CLUT224=y 1253CONFIG_LOGO_LINUX_CLUT224=y
1124CONFIG_BACKLIGHT_LCD_SUPPORT=y
1125CONFIG_BACKLIGHT_CLASS_DEVICE=y
1126CONFIG_BACKLIGHT_DEVICE=y
1127CONFIG_LCD_CLASS_DEVICE=y
1128CONFIG_LCD_DEVICE=y
1129 1254
1130# 1255#
1131# Sound 1256# Sound
@@ -1242,6 +1367,12 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m
1242# 1367#
1243# CONFIG_SND_USB_AUDIO is not set 1368# CONFIG_SND_USB_AUDIO is not set
1244# CONFIG_SND_USB_USX2Y is not set 1369# CONFIG_SND_USB_USX2Y is not set
1370# CONFIG_SND_USB_CAIAQ is not set
1371
1372#
1373# System on Chip audio support
1374#
1375# CONFIG_SND_SOC is not set
1245 1376
1246# 1377#
1247# Open Sound System 1378# Open Sound System
@@ -1252,6 +1383,15 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m
1252# HID Devices 1383# HID Devices
1253# 1384#
1254CONFIG_HID=y 1385CONFIG_HID=y
1386# CONFIG_HID_DEBUG is not set
1387
1388#
1389# USB Input Devices
1390#
1391CONFIG_USB_HID=y
1392# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1393# CONFIG_HID_FF is not set
1394CONFIG_USB_HIDDEV=y
1255 1395
1256# 1396#
1257# USB support 1397# USB support
@@ -1266,9 +1406,8 @@ CONFIG_USB=y
1266# Miscellaneous USB options 1406# Miscellaneous USB options
1267# 1407#
1268CONFIG_USB_DEVICEFS=y 1408CONFIG_USB_DEVICEFS=y
1269# CONFIG_USB_BANDWIDTH is not set 1409CONFIG_USB_DEVICE_CLASS=y
1270# CONFIG_USB_DYNAMIC_MINORS is not set 1410# CONFIG_USB_DYNAMIC_MINORS is not set
1271# CONFIG_USB_MULTITHREAD_PROBE is not set
1272# CONFIG_USB_OTG is not set 1411# CONFIG_USB_OTG is not set
1273 1412
1274# 1413#
@@ -1278,9 +1417,12 @@ CONFIG_USB_EHCI_HCD=y
1278# CONFIG_USB_EHCI_SPLIT_ISO is not set 1417# CONFIG_USB_EHCI_SPLIT_ISO is not set
1279# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1418# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1280CONFIG_USB_EHCI_TT_NEWSCHED=y 1419CONFIG_USB_EHCI_TT_NEWSCHED=y
1420CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
1281# CONFIG_USB_ISP116X_HCD is not set 1421# CONFIG_USB_ISP116X_HCD is not set
1282CONFIG_USB_OHCI_HCD=y 1422CONFIG_USB_OHCI_HCD=y
1283# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1423# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1424# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1425CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
1284CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1426CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1285# CONFIG_USB_UHCI_HCD is not set 1427# CONFIG_USB_UHCI_HCD is not set
1286# CONFIG_USB_SL811_HCD is not set 1428# CONFIG_USB_SL811_HCD is not set
@@ -1314,40 +1456,10 @@ CONFIG_USB_STORAGE=m
1314# CONFIG_USB_LIBUSUAL is not set 1456# CONFIG_USB_LIBUSUAL is not set
1315 1457
1316# 1458#
1317# USB Input Devices
1318#
1319CONFIG_USB_HID=y
1320# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1321# CONFIG_HID_FF is not set
1322CONFIG_USB_HIDDEV=y
1323# CONFIG_USB_AIPTEK is not set
1324# CONFIG_USB_WACOM is not set
1325# CONFIG_USB_ACECAD is not set
1326# CONFIG_USB_KBTAB is not set
1327# CONFIG_USB_POWERMATE is not set
1328# CONFIG_USB_TOUCHSCREEN is not set
1329# CONFIG_USB_YEALINK is not set
1330# CONFIG_USB_XPAD is not set
1331# CONFIG_USB_ATI_REMOTE is not set
1332# CONFIG_USB_ATI_REMOTE2 is not set
1333# CONFIG_USB_KEYSPAN_REMOTE is not set
1334# CONFIG_USB_APPLETOUCH is not set
1335
1336#
1337# USB Imaging devices 1459# USB Imaging devices
1338# 1460#
1339# CONFIG_USB_MDC800 is not set 1461# CONFIG_USB_MDC800 is not set
1340# CONFIG_USB_MICROTEK is not set 1462# CONFIG_USB_MICROTEK is not set
1341
1342#
1343# USB Network Adapters
1344#
1345# CONFIG_USB_CATC is not set
1346# CONFIG_USB_KAWETH is not set
1347# CONFIG_USB_PEGASUS is not set
1348# CONFIG_USB_RTL8150 is not set
1349# CONFIG_USB_USBNET_MII is not set
1350# CONFIG_USB_USBNET is not set
1351# CONFIG_USB_MON is not set 1463# CONFIG_USB_MON is not set
1352 1464
1353# 1465#
@@ -1369,6 +1481,7 @@ CONFIG_USB_HIDDEV=y
1369# CONFIG_USB_RIO500 is not set 1481# CONFIG_USB_RIO500 is not set
1370# CONFIG_USB_LEGOTOWER is not set 1482# CONFIG_USB_LEGOTOWER is not set
1371# CONFIG_USB_LCD is not set 1483# CONFIG_USB_LCD is not set
1484# CONFIG_USB_BERRY_CHARGE is not set
1372# CONFIG_USB_LED is not set 1485# CONFIG_USB_LED is not set
1373# CONFIG_USB_CYPRESS_CY7C63 is not set 1486# CONFIG_USB_CYPRESS_CY7C63 is not set
1374# CONFIG_USB_CYTHERM is not set 1487# CONFIG_USB_CYTHERM is not set
@@ -1379,6 +1492,7 @@ CONFIG_USB_APPLEDISPLAY=m
1379# CONFIG_USB_SISUSBVGA is not set 1492# CONFIG_USB_SISUSBVGA is not set
1380# CONFIG_USB_LD is not set 1493# CONFIG_USB_LD is not set
1381# CONFIG_USB_TRANCEVIBRATOR is not set 1494# CONFIG_USB_TRANCEVIBRATOR is not set
1495# CONFIG_USB_IOWARRIOR is not set
1382# CONFIG_USB_TEST is not set 1496# CONFIG_USB_TEST is not set
1383 1497
1384# 1498#
@@ -1389,10 +1503,6 @@ CONFIG_USB_APPLEDISPLAY=m
1389# USB Gadget Support 1503# USB Gadget Support
1390# 1504#
1391# CONFIG_USB_GADGET is not set 1505# CONFIG_USB_GADGET is not set
1392
1393#
1394# MMC/SD Card support
1395#
1396# CONFIG_MMC is not set 1506# CONFIG_MMC is not set
1397 1507
1398# 1508#
@@ -1417,8 +1527,11 @@ CONFIG_INFINIBAND=m
1417CONFIG_INFINIBAND_ADDR_TRANS=y 1527CONFIG_INFINIBAND_ADDR_TRANS=y
1418CONFIG_INFINIBAND_MTHCA=m 1528CONFIG_INFINIBAND_MTHCA=m
1419CONFIG_INFINIBAND_MTHCA_DEBUG=y 1529CONFIG_INFINIBAND_MTHCA_DEBUG=y
1530# CONFIG_INFINIBAND_IPATH is not set
1420# CONFIG_INFINIBAND_AMSO1100 is not set 1531# CONFIG_INFINIBAND_AMSO1100 is not set
1532# CONFIG_MLX4_INFINIBAND is not set
1421CONFIG_INFINIBAND_IPOIB=m 1533CONFIG_INFINIBAND_IPOIB=m
1534# CONFIG_INFINIBAND_IPOIB_CM is not set
1422CONFIG_INFINIBAND_IPOIB_DEBUG=y 1535CONFIG_INFINIBAND_IPOIB_DEBUG=y
1423# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set 1536# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
1424# CONFIG_INFINIBAND_SRP is not set 1537# CONFIG_INFINIBAND_SRP is not set
@@ -1447,10 +1560,6 @@ CONFIG_INFINIBAND_ISER=m
1447# 1560#
1448 1561
1449# 1562#
1450# Virtualization
1451#
1452
1453#
1454# File systems 1563# File systems
1455# 1564#
1456CONFIG_EXT2_FS=y 1565CONFIG_EXT2_FS=y
@@ -1567,6 +1676,7 @@ CONFIG_NFS_ACL_SUPPORT=y
1567CONFIG_NFS_COMMON=y 1676CONFIG_NFS_COMMON=y
1568CONFIG_SUNRPC=y 1677CONFIG_SUNRPC=y
1569CONFIG_SUNRPC_GSS=y 1678CONFIG_SUNRPC_GSS=y
1679# CONFIG_SUNRPC_BIND34 is not set
1570CONFIG_RPCSEC_GSS_KRB5=y 1680CONFIG_RPCSEC_GSS_KRB5=y
1571CONFIG_RPCSEC_GSS_SPKM3=m 1681CONFIG_RPCSEC_GSS_SPKM3=m
1572# CONFIG_SMB_FS is not set 1682# CONFIG_SMB_FS is not set
@@ -1602,6 +1712,7 @@ CONFIG_MSDOS_PARTITION=y
1602# CONFIG_SUN_PARTITION is not set 1712# CONFIG_SUN_PARTITION is not set
1603# CONFIG_KARMA_PARTITION is not set 1713# CONFIG_KARMA_PARTITION is not set
1604# CONFIG_EFI_PARTITION is not set 1714# CONFIG_EFI_PARTITION is not set
1715# CONFIG_SYSV68_PARTITION is not set
1605 1716
1606# 1717#
1607# Native Language Support 1718# Native Language Support
@@ -1651,15 +1762,7 @@ CONFIG_NLS_UTF8=m
1651# Distributed Lock Manager 1762# Distributed Lock Manager
1652# 1763#
1653# CONFIG_DLM is not set 1764# CONFIG_DLM is not set
1654 1765# CONFIG_UCC_SLOW is not set
1655#
1656# iSeries device drivers
1657#
1658# CONFIG_VIOCONS is not set
1659CONFIG_VIODASD=y
1660CONFIG_VIOCD=m
1661CONFIG_VIOTAPE=m
1662CONFIG_VIOPATH=y
1663 1766
1664# 1767#
1665# Library routines 1768# Library routines
@@ -1667,14 +1770,19 @@ CONFIG_VIOPATH=y
1667CONFIG_BITREVERSE=y 1770CONFIG_BITREVERSE=y
1668CONFIG_CRC_CCITT=m 1771CONFIG_CRC_CCITT=m
1669# CONFIG_CRC16 is not set 1772# CONFIG_CRC16 is not set
1773# CONFIG_CRC_ITU_T is not set
1670CONFIG_CRC32=y 1774CONFIG_CRC32=y
1671CONFIG_LIBCRC32C=m 1775CONFIG_LIBCRC32C=m
1672CONFIG_ZLIB_INFLATE=y 1776CONFIG_ZLIB_INFLATE=y
1673CONFIG_ZLIB_DEFLATE=m 1777CONFIG_ZLIB_DEFLATE=m
1674CONFIG_TEXTSEARCH=y 1778CONFIG_TEXTSEARCH=y
1675CONFIG_TEXTSEARCH_KMP=m 1779CONFIG_TEXTSEARCH_KMP=m
1780CONFIG_TEXTSEARCH_BM=m
1781CONFIG_TEXTSEARCH_FSM=m
1676CONFIG_PLIST=y 1782CONFIG_PLIST=y
1677CONFIG_IOMAP_COPY=y 1783CONFIG_HAS_IOMEM=y
1784CONFIG_HAS_IOPORT=y
1785CONFIG_HAS_DMA=y
1678 1786
1679# 1787#
1680# Instrumentation Support 1788# Instrumentation Support
@@ -1693,15 +1801,15 @@ CONFIG_MAGIC_SYSRQ=y
1693CONFIG_DEBUG_FS=y 1801CONFIG_DEBUG_FS=y
1694# CONFIG_HEADERS_CHECK is not set 1802# CONFIG_HEADERS_CHECK is not set
1695CONFIG_DEBUG_KERNEL=y 1803CONFIG_DEBUG_KERNEL=y
1696CONFIG_LOG_BUF_SHIFT=17 1804# CONFIG_DEBUG_SHIRQ is not set
1697CONFIG_DETECT_SOFTLOCKUP=y 1805CONFIG_DETECT_SOFTLOCKUP=y
1698# CONFIG_SCHEDSTATS is not set 1806# CONFIG_SCHEDSTATS is not set
1807# CONFIG_TIMER_STATS is not set
1699# CONFIG_DEBUG_SLAB is not set 1808# CONFIG_DEBUG_SLAB is not set
1700# CONFIG_DEBUG_RT_MUTEXES is not set 1809# CONFIG_DEBUG_RT_MUTEXES is not set
1701# CONFIG_RT_MUTEX_TESTER is not set 1810# CONFIG_RT_MUTEX_TESTER is not set
1702# CONFIG_DEBUG_SPINLOCK is not set 1811# CONFIG_DEBUG_SPINLOCK is not set
1703CONFIG_DEBUG_MUTEXES=y 1812CONFIG_DEBUG_MUTEXES=y
1704# CONFIG_DEBUG_RWSEMS is not set
1705# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1813# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1706# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1814# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1707# CONFIG_DEBUG_KOBJECT is not set 1815# CONFIG_DEBUG_KOBJECT is not set
@@ -1711,8 +1819,10 @@ CONFIG_DEBUG_BUGVERBOSE=y
1711# CONFIG_DEBUG_LIST is not set 1819# CONFIG_DEBUG_LIST is not set
1712CONFIG_FORCED_INLINING=y 1820CONFIG_FORCED_INLINING=y
1713# CONFIG_RCU_TORTURE_TEST is not set 1821# CONFIG_RCU_TORTURE_TEST is not set
1822# CONFIG_FAULT_INJECTION is not set
1714CONFIG_DEBUG_STACKOVERFLOW=y 1823CONFIG_DEBUG_STACKOVERFLOW=y
1715CONFIG_DEBUG_STACK_USAGE=y 1824CONFIG_DEBUG_STACK_USAGE=y
1825# CONFIG_DEBUG_PAGEALLOC is not set
1716# CONFIG_HCALL_STATS is not set 1826# CONFIG_HCALL_STATS is not set
1717CONFIG_DEBUGGER=y 1827CONFIG_DEBUGGER=y
1718CONFIG_XMON=y 1828CONFIG_XMON=y
@@ -1749,8 +1859,11 @@ CONFIG_CRYPTO_TGR192=m
1749# CONFIG_CRYPTO_GF128MUL is not set 1859# CONFIG_CRYPTO_GF128MUL is not set
1750CONFIG_CRYPTO_ECB=m 1860CONFIG_CRYPTO_ECB=m
1751CONFIG_CRYPTO_CBC=y 1861CONFIG_CRYPTO_CBC=y
1862CONFIG_CRYPTO_PCBC=m
1752# CONFIG_CRYPTO_LRW is not set 1863# CONFIG_CRYPTO_LRW is not set
1864# CONFIG_CRYPTO_CRYPTD is not set
1753CONFIG_CRYPTO_DES=y 1865CONFIG_CRYPTO_DES=y
1866# CONFIG_CRYPTO_FCRYPT is not set
1754CONFIG_CRYPTO_BLOWFISH=m 1867CONFIG_CRYPTO_BLOWFISH=m
1755CONFIG_CRYPTO_TWOFISH=m 1868CONFIG_CRYPTO_TWOFISH=m
1756CONFIG_CRYPTO_TWOFISH_COMMON=m 1869CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1765,6 +1878,7 @@ CONFIG_CRYPTO_ANUBIS=m
1765CONFIG_CRYPTO_DEFLATE=m 1878CONFIG_CRYPTO_DEFLATE=m
1766CONFIG_CRYPTO_MICHAEL_MIC=m 1879CONFIG_CRYPTO_MICHAEL_MIC=m
1767CONFIG_CRYPTO_CRC32C=m 1880CONFIG_CRYPTO_CRC32C=m
1881# CONFIG_CRYPTO_CAMELLIA is not set
1768CONFIG_CRYPTO_TEST=m 1882CONFIG_CRYPTO_TEST=m
1769 1883
1770# 1884#
diff --git a/arch/powerpc/configs/prpmc2800_defconfig b/arch/powerpc/configs/prpmc2800_defconfig
index c70a73082007..fb504a714625 100644
--- a/arch/powerpc/configs/prpmc2800_defconfig
+++ b/arch/powerpc/configs/prpmc2800_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.21 3# Linux kernel version: 2.6.22-rc6
4# Wed May 9 09:42:46 2007 4# Tue Jun 26 14:15:11 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -90,7 +90,11 @@ CONFIG_BUG=y
90CONFIG_ELF_CORE=y 90CONFIG_ELF_CORE=y
91CONFIG_BASE_FULL=y 91CONFIG_BASE_FULL=y
92CONFIG_FUTEX=y 92CONFIG_FUTEX=y
93CONFIG_ANON_INODES=y
93CONFIG_EPOLL=y 94CONFIG_EPOLL=y
95CONFIG_SIGNALFD=y
96CONFIG_TIMERFD=y
97CONFIG_EVENTFD=y
94CONFIG_SHMEM=y 98CONFIG_SHMEM=y
95CONFIG_VM_EVENT_COUNTERS=y 99CONFIG_VM_EVENT_COUNTERS=y
96CONFIG_SLAB=y 100CONFIG_SLAB=y
@@ -274,20 +278,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
274# CONFIG_INET6_TUNNEL is not set 278# CONFIG_INET6_TUNNEL is not set
275# CONFIG_NETWORK_SECMARK is not set 279# CONFIG_NETWORK_SECMARK is not set
276# CONFIG_NETFILTER is not set 280# CONFIG_NETFILTER is not set
277
278#
279# DCCP Configuration (EXPERIMENTAL)
280#
281# CONFIG_IP_DCCP is not set 281# CONFIG_IP_DCCP is not set
282
283#
284# SCTP Configuration (EXPERIMENTAL)
285#
286# CONFIG_IP_SCTP is not set 282# CONFIG_IP_SCTP is not set
287
288#
289# TIPC Configuration (EXPERIMENTAL)
290#
291# CONFIG_TIPC is not set 283# CONFIG_TIPC is not set
292# CONFIG_ATM is not set 284# CONFIG_ATM is not set
293# CONFIG_BRIDGE is not set 285# CONFIG_BRIDGE is not set
@@ -383,7 +375,6 @@ CONFIG_MTD_CFI_UTIL=y
383# CONFIG_MTD_RAM is not set 375# CONFIG_MTD_RAM is not set
384# CONFIG_MTD_ROM is not set 376# CONFIG_MTD_ROM is not set
385# CONFIG_MTD_ABSENT is not set 377# CONFIG_MTD_ABSENT is not set
386# CONFIG_MTD_OBSOLETE_CHIPS is not set
387 378
388# 379#
389# Mapping drivers for chip access 380# Mapping drivers for chip access
@@ -454,10 +445,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
454# CONFIG_SGI_IOC4 is not set 445# CONFIG_SGI_IOC4 is not set
455# CONFIG_TIFM_CORE is not set 446# CONFIG_TIFM_CORE is not set
456# CONFIG_BLINK is not set 447# CONFIG_BLINK is not set
457
458#
459# ATA/ATAPI/MFM/RLL support
460#
461CONFIG_IDE=y 448CONFIG_IDE=y
462CONFIG_BLK_DEV_IDE=y 449CONFIG_BLK_DEV_IDE=y
463 450
@@ -472,6 +459,7 @@ CONFIG_BLK_DEV_IDEDISK=y
472# CONFIG_BLK_DEV_IDEFLOPPY is not set 459# CONFIG_BLK_DEV_IDEFLOPPY is not set
473# CONFIG_BLK_DEV_IDESCSI is not set 460# CONFIG_BLK_DEV_IDESCSI is not set
474# CONFIG_IDE_TASK_IOCTL is not set 461# CONFIG_IDE_TASK_IOCTL is not set
462CONFIG_IDE_PROC_FS=y
475 463
476# 464#
477# IDE chipset support/bugfixes 465# IDE chipset support/bugfixes
@@ -479,6 +467,7 @@ CONFIG_BLK_DEV_IDEDISK=y
479CONFIG_IDE_GENERIC=y 467CONFIG_IDE_GENERIC=y
480CONFIG_BLK_DEV_IDEPCI=y 468CONFIG_BLK_DEV_IDEPCI=y
481# CONFIG_IDEPCI_SHARE_IRQ is not set 469# CONFIG_IDEPCI_SHARE_IRQ is not set
470CONFIG_IDEPCI_PCIBUS_ORDER=y
482# CONFIG_BLK_DEV_OFFBOARD is not set 471# CONFIG_BLK_DEV_OFFBOARD is not set
483CONFIG_BLK_DEV_GENERIC=y 472CONFIG_BLK_DEV_GENERIC=y
484# CONFIG_BLK_DEV_OPTI621 is not set 473# CONFIG_BLK_DEV_OPTI621 is not set
@@ -588,12 +577,7 @@ CONFIG_BLK_DEV_SD=y
588# CONFIG_SCSI_DC390T is not set 577# CONFIG_SCSI_DC390T is not set
589# CONFIG_SCSI_NSP32 is not set 578# CONFIG_SCSI_NSP32 is not set
590# CONFIG_SCSI_DEBUG is not set 579# CONFIG_SCSI_DEBUG is not set
591# CONFIG_SCSI_ESP_CORE is not set
592# CONFIG_SCSI_SRP is not set 580# CONFIG_SCSI_SRP is not set
593
594#
595# Serial ATA (prod) and Parallel ATA (experimental) drivers
596#
597CONFIG_ATA=y 581CONFIG_ATA=y
598# CONFIG_ATA_NONSTANDARD is not set 582# CONFIG_ATA_NONSTANDARD is not set
599# CONFIG_SATA_AHCI is not set 583# CONFIG_SATA_AHCI is not set
@@ -665,6 +649,7 @@ CONFIG_SATA_MV=y
665# 649#
666# IEEE 1394 (FireWire) support 650# IEEE 1394 (FireWire) support
667# 651#
652# CONFIG_FIREWIRE is not set
668# CONFIG_IEEE1394 is not set 653# CONFIG_IEEE1394 is not set
669 654
670# 655#
@@ -683,15 +668,7 @@ CONFIG_NETDEVICES=y
683# CONFIG_BONDING is not set 668# CONFIG_BONDING is not set
684# CONFIG_EQUALIZER is not set 669# CONFIG_EQUALIZER is not set
685# CONFIG_TUN is not set 670# CONFIG_TUN is not set
686
687#
688# ARCnet devices
689#
690# CONFIG_ARCNET is not set 671# CONFIG_ARCNET is not set
691
692#
693# PHY device support
694#
695CONFIG_PHYLIB=y 672CONFIG_PHYLIB=y
696 673
697# 674#
@@ -746,10 +723,7 @@ CONFIG_8139TOO=y
746# CONFIG_TLAN is not set 723# CONFIG_TLAN is not set
747# CONFIG_VIA_RHINE is not set 724# CONFIG_VIA_RHINE is not set
748# CONFIG_SC92031 is not set 725# CONFIG_SC92031 is not set
749 726CONFIG_NETDEV_1000=y
750#
751# Ethernet (1000 Mbit)
752#
753# CONFIG_ACENIC is not set 727# CONFIG_ACENIC is not set
754# CONFIG_DL2K is not set 728# CONFIG_DL2K is not set
755CONFIG_E1000=y 729CONFIG_E1000=y
@@ -769,20 +743,14 @@ CONFIG_E1000=y
769CONFIG_MV643XX_ETH=y 743CONFIG_MV643XX_ETH=y
770# CONFIG_QLA3XXX is not set 744# CONFIG_QLA3XXX is not set
771# CONFIG_ATL1 is not set 745# CONFIG_ATL1 is not set
772 746CONFIG_NETDEV_10000=y
773#
774# Ethernet (10000 Mbit)
775#
776# CONFIG_CHELSIO_T1 is not set 747# CONFIG_CHELSIO_T1 is not set
777# CONFIG_CHELSIO_T3 is not set 748# CONFIG_CHELSIO_T3 is not set
778# CONFIG_IXGB is not set 749# CONFIG_IXGB is not set
779# CONFIG_S2IO is not set 750# CONFIG_S2IO is not set
780# CONFIG_MYRI10GE is not set 751# CONFIG_MYRI10GE is not set
781# CONFIG_NETXEN_NIC is not set 752# CONFIG_NETXEN_NIC is not set
782 753# CONFIG_MLX4_CORE is not set
783#
784# Token Ring devices
785#
786# CONFIG_TR is not set 754# CONFIG_TR is not set
787 755
788# 756#
@@ -792,8 +760,14 @@ CONFIG_MV643XX_ETH=y
792# CONFIG_WLAN_80211 is not set 760# CONFIG_WLAN_80211 is not set
793 761
794# 762#
795# Wan interfaces 763# USB Network Adapters
796# 764#
765# CONFIG_USB_CATC is not set
766# CONFIG_USB_KAWETH is not set
767# CONFIG_USB_PEGASUS is not set
768# CONFIG_USB_RTL8150 is not set
769# CONFIG_USB_USBNET_MII is not set
770# CONFIG_USB_USBNET is not set
797# CONFIG_WAN is not set 771# CONFIG_WAN is not set
798# CONFIG_FDDI is not set 772# CONFIG_FDDI is not set
799# CONFIG_HIPPI is not set 773# CONFIG_HIPPI is not set
@@ -820,6 +794,7 @@ CONFIG_MV643XX_ETH=y
820# 794#
821CONFIG_INPUT=y 795CONFIG_INPUT=y
822# CONFIG_INPUT_FF_MEMLESS is not set 796# CONFIG_INPUT_FF_MEMLESS is not set
797# CONFIG_INPUT_POLLDEV is not set
823 798
824# 799#
825# Userland interfaces 800# Userland interfaces
@@ -880,16 +855,11 @@ CONFIG_LEGACY_PTY_COUNT=256
880# IPMI 855# IPMI
881# 856#
882# CONFIG_IPMI_HANDLER is not set 857# CONFIG_IPMI_HANDLER is not set
883
884#
885# Watchdog Cards
886#
887# CONFIG_WATCHDOG is not set 858# CONFIG_WATCHDOG is not set
888# CONFIG_HW_RANDOM is not set 859# CONFIG_HW_RANDOM is not set
889# CONFIG_NVRAM is not set 860# CONFIG_NVRAM is not set
890CONFIG_GEN_RTC=y 861CONFIG_GEN_RTC=y
891# CONFIG_GEN_RTC_X is not set 862# CONFIG_GEN_RTC_X is not set
892# CONFIG_DTLK is not set
893# CONFIG_R3964 is not set 863# CONFIG_R3964 is not set
894# CONFIG_APPLICOM is not set 864# CONFIG_APPLICOM is not set
895# CONFIG_AGP is not set 865# CONFIG_AGP is not set
@@ -1023,12 +993,8 @@ CONFIG_HWMON=y
1023# Multimedia devices 993# Multimedia devices
1024# 994#
1025# CONFIG_VIDEO_DEV is not set 995# CONFIG_VIDEO_DEV is not set
1026 996# CONFIG_DVB_CORE is not set
1027# 997# CONFIG_DAB is not set
1028# Digital Video Broadcasting Devices
1029#
1030# CONFIG_DVB is not set
1031# CONFIG_USB_DABUSB is not set
1032 998
1033# 999#
1034# Graphics support 1000# Graphics support
@@ -1124,16 +1090,6 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1124# 1090#
1125# CONFIG_USB_MDC800 is not set 1091# CONFIG_USB_MDC800 is not set
1126# CONFIG_USB_MICROTEK is not set 1092# CONFIG_USB_MICROTEK is not set
1127
1128#
1129# USB Network Adapters
1130#
1131# CONFIG_USB_CATC is not set
1132# CONFIG_USB_KAWETH is not set
1133# CONFIG_USB_PEGASUS is not set
1134# CONFIG_USB_RTL8150 is not set
1135# CONFIG_USB_USBNET_MII is not set
1136# CONFIG_USB_USBNET is not set
1137CONFIG_USB_MON=y 1093CONFIG_USB_MON=y
1138 1094
1139# 1095#
@@ -1261,14 +1217,6 @@ CONFIG_RTC_DRV_MAX6900=y
1261# 1217#
1262 1218
1263# 1219#
1264# Auxiliary Display support
1265#
1266
1267#
1268# Virtualization
1269#
1270
1271#
1272# File systems 1220# File systems
1273# 1221#
1274CONFIG_EXT2_FS=y 1222CONFIG_EXT2_FS=y
@@ -1396,7 +1344,6 @@ CONFIG_MSDOS_PARTITION=y
1396# 1344#
1397# CONFIG_DLM is not set 1345# CONFIG_DLM is not set
1398# CONFIG_UCC_SLOW is not set 1346# CONFIG_UCC_SLOW is not set
1399# CONFIG_UCC_FAST is not set
1400 1347
1401# 1348#
1402# Library routines 1349# Library routines
@@ -1404,6 +1351,7 @@ CONFIG_MSDOS_PARTITION=y
1404CONFIG_BITREVERSE=y 1351CONFIG_BITREVERSE=y
1405# CONFIG_CRC_CCITT is not set 1352# CONFIG_CRC_CCITT is not set
1406# CONFIG_CRC16 is not set 1353# CONFIG_CRC16 is not set
1354# CONFIG_CRC_ITU_T is not set
1407CONFIG_CRC32=y 1355CONFIG_CRC32=y
1408# CONFIG_LIBCRC32C is not set 1356# CONFIG_LIBCRC32C is not set
1409CONFIG_PLIST=y 1357CONFIG_PLIST=y
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index 477934558f06..d0b43df44426 100644
--- a/arch/powerpc/configs/ps3_defconfig
+++ b/arch/powerpc/configs/ps3_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.21 3# Linux kernel version: 2.6.22-rc6
4# Fri May 11 10:16:27 2007 4# Tue Jun 26 14:15:19 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -87,7 +87,11 @@ CONFIG_BUG=y
87CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
88CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
90CONFIG_EPOLL=y 91CONFIG_EPOLL=y
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 95CONFIG_SHMEM=y
92CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
93CONFIG_SLAB=y 97CONFIG_SLAB=y
@@ -152,7 +156,11 @@ CONFIG_PS3_HTAB_SIZE=20
152CONFIG_PS3_USE_LPAR_ADDR=y 156CONFIG_PS3_USE_LPAR_ADDR=y
153CONFIG_PS3_VUART=y 157CONFIG_PS3_VUART=y
154CONFIG_PS3_PS3AV=y 158CONFIG_PS3_PS3AV=y
155CONFIG_PS3_SYS_MANAGER=y 159CONFIG_PS3_SYS_MANAGER=m
160CONFIG_PS3_STORAGE=y
161CONFIG_PS3_DISK=y
162CONFIG_PS3_ROM=y
163CONFIG_PS3_FLASH=y
156CONFIG_PPC_CELL=y 164CONFIG_PPC_CELL=y
157# CONFIG_PPC_CELL_NATIVE is not set 165# CONFIG_PPC_CELL_NATIVE is not set
158# CONFIG_PPC_IBM_CELL_BLADE is not set 166# CONFIG_PPC_IBM_CELL_BLADE is not set
@@ -301,20 +309,8 @@ CONFIG_IPV6_SIT=y
301# CONFIG_IPV6_MULTIPLE_TABLES is not set 309# CONFIG_IPV6_MULTIPLE_TABLES is not set
302# CONFIG_NETWORK_SECMARK is not set 310# CONFIG_NETWORK_SECMARK is not set
303# CONFIG_NETFILTER is not set 311# CONFIG_NETFILTER is not set
304
305#
306# DCCP Configuration (EXPERIMENTAL)
307#
308# CONFIG_IP_DCCP is not set 312# CONFIG_IP_DCCP is not set
309
310#
311# SCTP Configuration (EXPERIMENTAL)
312#
313# CONFIG_IP_SCTP is not set 313# CONFIG_IP_SCTP is not set
314
315#
316# TIPC Configuration (EXPERIMENTAL)
317#
318# CONFIG_TIPC is not set 314# CONFIG_TIPC is not set
319# CONFIG_ATM is not set 315# CONFIG_ATM is not set
320# CONFIG_BRIDGE is not set 316# CONFIG_BRIDGE is not set
@@ -343,7 +339,7 @@ CONFIG_BT=m
343CONFIG_BT_L2CAP=m 339CONFIG_BT_L2CAP=m
344CONFIG_BT_SCO=m 340CONFIG_BT_SCO=m
345CONFIG_BT_RFCOMM=m 341CONFIG_BT_RFCOMM=m
346# CONFIG_BT_RFCOMM_TTY is not set 342CONFIG_BT_RFCOMM_TTY=y
347# CONFIG_BT_BNEP is not set 343# CONFIG_BT_BNEP is not set
348CONFIG_BT_HIDP=m 344CONFIG_BT_HIDP=m
349 345
@@ -352,7 +348,9 @@ CONFIG_BT_HIDP=m
352# 348#
353CONFIG_BT_HCIUSB=m 349CONFIG_BT_HCIUSB=m
354CONFIG_BT_HCIUSB_SCO=y 350CONFIG_BT_HCIUSB_SCO=y
355# CONFIG_BT_HCIUART is not set 351CONFIG_BT_HCIUART=m
352CONFIG_BT_HCIUART_H4=y
353CONFIG_BT_HCIUART_BCSP=y
356# CONFIG_BT_HCIBCM203X is not set 354# CONFIG_BT_HCIBCM203X is not set
357# CONFIG_BT_HCIBPA10X is not set 355# CONFIG_BT_HCIBPA10X is not set
358# CONFIG_BT_HCIBFUSB is not set 356# CONFIG_BT_HCIBFUSB is not set
@@ -418,10 +416,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
418# Misc devices 416# Misc devices
419# 417#
420# CONFIG_BLINK is not set 418# CONFIG_BLINK is not set
421
422#
423# ATA/ATAPI/MFM/RLL support
424#
425# CONFIG_IDE is not set 419# CONFIG_IDE is not set
426 420
427# 421#
@@ -447,7 +441,7 @@ CONFIG_CHR_DEV_SG=m
447# 441#
448# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 442# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
449# 443#
450# CONFIG_SCSI_MULTI_LUN is not set 444CONFIG_SCSI_MULTI_LUN=y
451# CONFIG_SCSI_CONSTANTS is not set 445# CONFIG_SCSI_CONSTANTS is not set
452# CONFIG_SCSI_LOGGING is not set 446# CONFIG_SCSI_LOGGING is not set
453# CONFIG_SCSI_SCAN_ASYNC is not set 447# CONFIG_SCSI_SCAN_ASYNC is not set
@@ -467,11 +461,6 @@ CONFIG_SCSI_WAIT_SCAN=m
467# 461#
468# CONFIG_ISCSI_TCP is not set 462# CONFIG_ISCSI_TCP is not set
469# CONFIG_SCSI_DEBUG is not set 463# CONFIG_SCSI_DEBUG is not set
470# CONFIG_SCSI_ESP_CORE is not set
471
472#
473# Serial ATA (prod) and Parallel ATA (experimental) drivers
474#
475# CONFIG_ATA is not set 464# CONFIG_ATA is not set
476 465
477# 466#
@@ -490,27 +479,13 @@ CONFIG_NETDEVICES=y
490# CONFIG_TUN is not set 479# CONFIG_TUN is not set
491 480
492# 481#
493# PHY device support
494#
495
496#
497# Ethernet (10 or 100Mbit) 482# Ethernet (10 or 100Mbit)
498# 483#
499# CONFIG_NET_ETHERNET is not set 484# CONFIG_NET_ETHERNET is not set
500CONFIG_MII=m 485CONFIG_MII=m
501 486CONFIG_NETDEV_1000=y
502# 487CONFIG_NETDEV_10000=y
503# Ethernet (1000 Mbit) 488CONFIG_GELIC_NET=y
504#
505
506#
507# Ethernet (10000 Mbit)
508#
509CONFIG_MLX4_DEBUG=y
510
511#
512# Token Ring devices
513#
514 489
515# 490#
516# Wireless LAN 491# Wireless LAN
@@ -536,10 +511,6 @@ CONFIG_USB_NET_MCS7830=m
536# CONFIG_USB_NET_RNDIS_HOST is not set 511# CONFIG_USB_NET_RNDIS_HOST is not set
537# CONFIG_USB_NET_CDC_SUBSET is not set 512# CONFIG_USB_NET_CDC_SUBSET is not set
538# CONFIG_USB_NET_ZAURUS is not set 513# CONFIG_USB_NET_ZAURUS is not set
539
540#
541# Wan interfaces
542#
543# CONFIG_WAN is not set 514# CONFIG_WAN is not set
544# CONFIG_PPP is not set 515# CONFIG_PPP is not set
545# CONFIG_SLIP is not set 516# CONFIG_SLIP is not set
@@ -563,6 +534,7 @@ CONFIG_USB_NET_MCS7830=m
563# 534#
564CONFIG_INPUT=y 535CONFIG_INPUT=y
565# CONFIG_INPUT_FF_MEMLESS is not set 536# CONFIG_INPUT_FF_MEMLESS is not set
537# CONFIG_INPUT_POLLDEV is not set
566 538
567# 539#
568# Userland interfaces 540# Userland interfaces
@@ -581,7 +553,27 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
581# 553#
582# CONFIG_INPUT_KEYBOARD is not set 554# CONFIG_INPUT_KEYBOARD is not set
583# CONFIG_INPUT_MOUSE is not set 555# CONFIG_INPUT_MOUSE is not set
584# CONFIG_INPUT_JOYSTICK is not set 556CONFIG_INPUT_JOYSTICK=y
557# CONFIG_JOYSTICK_ANALOG is not set
558# CONFIG_JOYSTICK_A3D is not set
559# CONFIG_JOYSTICK_ADI is not set
560# CONFIG_JOYSTICK_COBRA is not set
561# CONFIG_JOYSTICK_GF2K is not set
562# CONFIG_JOYSTICK_GRIP is not set
563# CONFIG_JOYSTICK_GRIP_MP is not set
564# CONFIG_JOYSTICK_GUILLEMOT is not set
565# CONFIG_JOYSTICK_INTERACT is not set
566# CONFIG_JOYSTICK_SIDEWINDER is not set
567# CONFIG_JOYSTICK_TMDC is not set
568# CONFIG_JOYSTICK_IFORCE is not set
569# CONFIG_JOYSTICK_WARRIOR is not set
570# CONFIG_JOYSTICK_MAGELLAN is not set
571# CONFIG_JOYSTICK_SPACEORB is not set
572# CONFIG_JOYSTICK_SPACEBALL is not set
573# CONFIG_JOYSTICK_STINGER is not set
574# CONFIG_JOYSTICK_TWIDJOY is not set
575# CONFIG_JOYSTICK_JOYDUMP is not set
576# CONFIG_JOYSTICK_XPAD is not set
585# CONFIG_INPUT_TABLET is not set 577# CONFIG_INPUT_TABLET is not set
586# CONFIG_INPUT_TOUCHSCREEN is not set 578# CONFIG_INPUT_TOUCHSCREEN is not set
587# CONFIG_INPUT_MISC is not set 579# CONFIG_INPUT_MISC is not set
@@ -598,7 +590,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
598CONFIG_VT=y 590CONFIG_VT=y
599CONFIG_VT_CONSOLE=y 591CONFIG_VT_CONSOLE=y
600CONFIG_HW_CONSOLE=y 592CONFIG_HW_CONSOLE=y
601# CONFIG_VT_HW_CONSOLE_BINDING is not set 593CONFIG_VT_HW_CONSOLE_BINDING=y
602# CONFIG_SERIAL_NONSTANDARD is not set 594# CONFIG_SERIAL_NONSTANDARD is not set
603 595
604# 596#
@@ -652,12 +644,8 @@ CONFIG_GEN_RTC=y
652# Multimedia devices 644# Multimedia devices
653# 645#
654# CONFIG_VIDEO_DEV is not set 646# CONFIG_VIDEO_DEV is not set
655 647# CONFIG_DVB_CORE is not set
656# 648# CONFIG_DAB is not set
657# Digital Video Broadcasting Devices
658#
659# CONFIG_DVB is not set
660# CONFIG_USB_DABUSB is not set
661 649
662# 650#
663# Graphics support 651# Graphics support
@@ -672,13 +660,13 @@ CONFIG_GEN_RTC=y
672CONFIG_FB=y 660CONFIG_FB=y
673# CONFIG_FIRMWARE_EDID is not set 661# CONFIG_FIRMWARE_EDID is not set
674# CONFIG_FB_DDC is not set 662# CONFIG_FB_DDC is not set
675CONFIG_FB_CFB_FILLRECT=y 663# CONFIG_FB_CFB_FILLRECT is not set
676CONFIG_FB_CFB_COPYAREA=y 664# CONFIG_FB_CFB_COPYAREA is not set
677CONFIG_FB_CFB_IMAGEBLIT=y 665# CONFIG_FB_CFB_IMAGEBLIT is not set
678# CONFIG_FB_SYS_FILLRECT is not set 666CONFIG_FB_SYS_FILLRECT=y
679# CONFIG_FB_SYS_COPYAREA is not set 667CONFIG_FB_SYS_COPYAREA=y
680# CONFIG_FB_SYS_IMAGEBLIT is not set 668CONFIG_FB_SYS_IMAGEBLIT=y
681# CONFIG_FB_SYS_FOPS is not set 669CONFIG_FB_SYS_FOPS=y
682CONFIG_FB_DEFERRED_IO=y 670CONFIG_FB_DEFERRED_IO=y
683# CONFIG_FB_SVGALIB is not set 671# CONFIG_FB_SVGALIB is not set
684# CONFIG_FB_MACMODES is not set 672# CONFIG_FB_MACMODES is not set
@@ -751,9 +739,10 @@ CONFIG_SND_VERBOSE_PROCFS=y
751# 739#
752# CONFIG_SND_USB_AUDIO is not set 740# CONFIG_SND_USB_AUDIO is not set
753# CONFIG_SND_USB_USX2Y is not set 741# CONFIG_SND_USB_USX2Y is not set
742# CONFIG_SND_USB_CAIAQ is not set
754 743
755# 744#
756# SoC audio support 745# System on Chip audio support
757# 746#
758# CONFIG_SND_SOC is not set 747# CONFIG_SND_SOC is not set
759 748
@@ -1098,7 +1087,6 @@ CONFIG_NLS_ISO8859_1=y
1098# 1087#
1099# CONFIG_DLM is not set 1088# CONFIG_DLM is not set
1100# CONFIG_UCC_SLOW is not set 1089# CONFIG_UCC_SLOW is not set
1101# CONFIG_UCC_FAST is not set
1102 1090
1103# 1091#
1104# Library routines 1092# Library routines
@@ -1125,7 +1113,7 @@ CONFIG_HAS_DMA=y
1125# 1113#
1126# CONFIG_PRINTK_TIME is not set 1114# CONFIG_PRINTK_TIME is not set
1127CONFIG_ENABLE_MUST_CHECK=y 1115CONFIG_ENABLE_MUST_CHECK=y
1128# CONFIG_MAGIC_SYSRQ is not set 1116CONFIG_MAGIC_SYSRQ=y
1129# CONFIG_UNUSED_SYMBOLS is not set 1117# CONFIG_UNUSED_SYMBOLS is not set
1130# CONFIG_DEBUG_FS is not set 1118# CONFIG_DEBUG_FS is not set
1131# CONFIG_HEADERS_CHECK is not set 1119# CONFIG_HEADERS_CHECK is not set
@@ -1155,16 +1143,7 @@ CONFIG_DEBUG_STACKOVERFLOW=y
1155# CONFIG_DEBUGGER is not set 1143# CONFIG_DEBUGGER is not set
1156CONFIG_IRQSTACKS=y 1144CONFIG_IRQSTACKS=y
1157# CONFIG_BOOTX_TEXT is not set 1145# CONFIG_BOOTX_TEXT is not set
1158CONFIG_PPC_EARLY_DEBUG=y 1146# CONFIG_PPC_EARLY_DEBUG is not set
1159# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
1160# CONFIG_PPC_EARLY_DEBUG_G5 is not set
1161# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
1162# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
1163# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
1164# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
1165# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
1166# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
1167# CONFIG_PPC_EARLY_DEBUG_44x is not set
1168 1147
1169# 1148#
1170# Security options 1149# Security options
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index 6e96e50c362d..0caf0dd5ea87 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_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.20-rc5 3# Linux kernel version: 2.6.22-rc6
4# Mon Jan 22 22:31:27 2007 4# Tue Jun 26 14:17:45 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -40,6 +40,7 @@ CONFIG_PPC_FPU=y
40# CONFIG_PPC_OF_PLATFORM_PCI is not set 40# CONFIG_PPC_OF_PLATFORM_PCI is not set
41CONFIG_ALTIVEC=y 41CONFIG_ALTIVEC=y
42CONFIG_PPC_STD_MMU=y 42CONFIG_PPC_STD_MMU=y
43CONFIG_PPC_MM_SLICES=y
43CONFIG_VIRT_CPU_ACCOUNTING=y 44CONFIG_VIRT_CPU_ACCOUNTING=y
44CONFIG_SMP=y 45CONFIG_SMP=y
45CONFIG_NR_CPUS=128 46CONFIG_NR_CPUS=128
@@ -60,16 +61,23 @@ CONFIG_LOCALVERSION_AUTO=y
60CONFIG_SWAP=y 61CONFIG_SWAP=y
61CONFIG_SYSVIPC=y 62CONFIG_SYSVIPC=y
62# CONFIG_IPC_NS is not set 63# CONFIG_IPC_NS is not set
64CONFIG_SYSVIPC_SYSCTL=y
63CONFIG_POSIX_MQUEUE=y 65CONFIG_POSIX_MQUEUE=y
64# CONFIG_BSD_PROCESS_ACCT is not set 66# CONFIG_BSD_PROCESS_ACCT is not set
67CONFIG_TASKSTATS=y
68CONFIG_TASK_DELAY_ACCT=y
69CONFIG_TASK_XACCT=y
70CONFIG_TASK_IO_ACCOUNTING=y
65# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
66CONFIG_AUDIT=y 72CONFIG_AUDIT=y
67CONFIG_AUDITSYSCALL=y 73CONFIG_AUDITSYSCALL=y
68CONFIG_IKCONFIG=y 74CONFIG_IKCONFIG=y
69CONFIG_IKCONFIG_PROC=y 75CONFIG_IKCONFIG_PROC=y
76CONFIG_LOG_BUF_SHIFT=17
70CONFIG_CPUSETS=y 77CONFIG_CPUSETS=y
71CONFIG_SYSFS_DEPRECATED=y 78CONFIG_SYSFS_DEPRECATED=y
72# CONFIG_RELAY is not set 79# CONFIG_RELAY is not set
80CONFIG_BLK_DEV_INITRD=y
73CONFIG_INITRAMFS_SOURCE="" 81CONFIG_INITRAMFS_SOURCE=""
74CONFIG_CC_OPTIMIZE_FOR_SIZE=y 82CONFIG_CC_OPTIMIZE_FOR_SIZE=y
75CONFIG_SYSCTL=y 83CONFIG_SYSCTL=y
@@ -84,14 +92,19 @@ CONFIG_BUG=y
84CONFIG_ELF_CORE=y 92CONFIG_ELF_CORE=y
85CONFIG_BASE_FULL=y 93CONFIG_BASE_FULL=y
86CONFIG_FUTEX=y 94CONFIG_FUTEX=y
95CONFIG_ANON_INODES=y
87CONFIG_EPOLL=y 96CONFIG_EPOLL=y
97CONFIG_SIGNALFD=y
98CONFIG_TIMERFD=y
99CONFIG_EVENTFD=y
88CONFIG_SHMEM=y 100CONFIG_SHMEM=y
89CONFIG_SLAB=y
90CONFIG_VM_EVENT_COUNTERS=y 101CONFIG_VM_EVENT_COUNTERS=y
102CONFIG_SLAB=y
103# CONFIG_SLUB is not set
104# CONFIG_SLOB is not set
91CONFIG_RT_MUTEXES=y 105CONFIG_RT_MUTEXES=y
92# CONFIG_TINY_SHMEM is not set 106# CONFIG_TINY_SHMEM is not set
93CONFIG_BASE_SMALL=0 107CONFIG_BASE_SMALL=0
94# CONFIG_SLOB is not set
95 108
96# 109#
97# Loadable module support 110# Loadable module support
@@ -130,18 +143,28 @@ CONFIG_PPC_MULTIPLATFORM=y
130# CONFIG_EMBEDDED6xx is not set 143# CONFIG_EMBEDDED6xx is not set
131# CONFIG_APUS is not set 144# CONFIG_APUS is not set
132CONFIG_PPC_PSERIES=y 145CONFIG_PPC_PSERIES=y
146CONFIG_PPC_SPLPAR=y
147CONFIG_EEH=y
148CONFIG_SCANLOG=m
149CONFIG_LPARCFG=y
133# CONFIG_PPC_ISERIES is not set 150# CONFIG_PPC_ISERIES is not set
134# CONFIG_PPC_MPC52xx is not set 151# CONFIG_PPC_MPC52xx is not set
152# CONFIG_PPC_MPC5200 is not set
135# CONFIG_PPC_PMAC is not set 153# CONFIG_PPC_PMAC is not set
136# CONFIG_PPC_MAPLE is not set 154# CONFIG_PPC_MAPLE is not set
137# CONFIG_PPC_PASEMI is not set 155# CONFIG_PPC_PASEMI is not set
156# CONFIG_PPC_CELLEB is not set
157# CONFIG_PPC_PS3 is not set
138# CONFIG_PPC_CELL is not set 158# CONFIG_PPC_CELL is not set
139# CONFIG_PPC_CELL_NATIVE is not set 159# CONFIG_PPC_CELL_NATIVE is not set
140# CONFIG_PPC_IBM_CELL_BLADE is not set 160# CONFIG_PPC_IBM_CELL_BLADE is not set
141# CONFIG_PPC_PS3 is not set 161# CONFIG_PQ2ADS is not set
142CONFIG_PPC_NATIVE=y 162CONFIG_PPC_NATIVE=y
143# CONFIG_UDBG_RTAS_CONSOLE is not set 163# CONFIG_UDBG_RTAS_CONSOLE is not set
144CONFIG_XICS=y 164CONFIG_XICS=y
165CONFIG_MPIC=y
166# CONFIG_MPIC_WEIRD is not set
167CONFIG_PPC_I8259=y
145# CONFIG_U3_DART is not set 168# CONFIG_U3_DART is not set
146CONFIG_PPC_RTAS=y 169CONFIG_PPC_RTAS=y
147CONFIG_RTAS_ERROR_LOGGING=y 170CONFIG_RTAS_ERROR_LOGGING=y
@@ -155,8 +178,7 @@ CONFIG_IBMEBUS=y
155# CONFIG_PPC_INDIRECT_IO is not set 178# CONFIG_PPC_INDIRECT_IO is not set
156# CONFIG_GENERIC_IOMAP is not set 179# CONFIG_GENERIC_IOMAP is not set
157# CONFIG_CPU_FREQ is not set 180# CONFIG_CPU_FREQ is not set
158# CONFIG_WANT_EARLY_SERIAL is not set 181# CONFIG_CPM2 is not set
159CONFIG_MPIC=y
160 182
161# 183#
162# Kernel options 184# Kernel options
@@ -179,10 +201,6 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
179CONFIG_KEXEC=y 201CONFIG_KEXEC=y
180# CONFIG_CRASH_DUMP is not set 202# CONFIG_CRASH_DUMP is not set
181CONFIG_IRQ_ALL_CPUS=y 203CONFIG_IRQ_ALL_CPUS=y
182CONFIG_PPC_SPLPAR=y
183CONFIG_EEH=y
184CONFIG_SCANLOG=m
185CONFIG_LPARCFG=y
186CONFIG_NUMA=y 204CONFIG_NUMA=y
187CONFIG_NODES_SHIFT=4 205CONFIG_NODES_SHIFT=4
188CONFIG_ARCH_SELECT_MEMORY_MODEL=y 206CONFIG_ARCH_SELECT_MEMORY_MODEL=y
@@ -202,35 +220,35 @@ CONFIG_SPARSEMEM_EXTREME=y
202CONFIG_SPLIT_PTLOCK_CPUS=4 220CONFIG_SPLIT_PTLOCK_CPUS=4
203CONFIG_MIGRATION=y 221CONFIG_MIGRATION=y
204CONFIG_RESOURCES_64BIT=y 222CONFIG_RESOURCES_64BIT=y
223CONFIG_ZONE_DMA_FLAG=1
205CONFIG_NODES_SPAN_OTHER_NODES=y 224CONFIG_NODES_SPAN_OTHER_NODES=y
225# CONFIG_PPC_HAS_HASH_64K is not set
206# CONFIG_PPC_64K_PAGES is not set 226# CONFIG_PPC_64K_PAGES is not set
207CONFIG_SCHED_SMT=y 227CONFIG_SCHED_SMT=y
208CONFIG_PROC_DEVICETREE=y 228CONFIG_PROC_DEVICETREE=y
209# CONFIG_CMDLINE_BOOL is not set 229# CONFIG_CMDLINE_BOOL is not set
210# CONFIG_PM is not set 230# CONFIG_PM is not set
211CONFIG_SECCOMP=y 231CONFIG_SECCOMP=y
232# CONFIG_WANT_DEVICE_TREE is not set
212CONFIG_ISA_DMA_API=y 233CONFIG_ISA_DMA_API=y
213 234
214# 235#
215# Bus options 236# Bus options
216# 237#
238CONFIG_ZONE_DMA=y
217CONFIG_GENERIC_ISA_DMA=y 239CONFIG_GENERIC_ISA_DMA=y
218# CONFIG_MPIC_WEIRD is not set
219CONFIG_PPC_I8259=y
220# CONFIG_PPC_INDIRECT_PCI is not set 240# CONFIG_PPC_INDIRECT_PCI is not set
221CONFIG_PCI=y 241CONFIG_PCI=y
222CONFIG_PCI_DOMAINS=y 242CONFIG_PCI_DOMAINS=y
223# CONFIG_PCIEPORTBUS is not set 243# CONFIG_PCIEPORTBUS is not set
244CONFIG_ARCH_SUPPORTS_MSI=y
245CONFIG_PCI_MSI=y
224# CONFIG_PCI_DEBUG is not set 246# CONFIG_PCI_DEBUG is not set
225 247
226# 248#
227# PCCARD (PCMCIA/CardBus) support 249# PCCARD (PCMCIA/CardBus) support
228# 250#
229# CONFIG_PCCARD is not set 251# CONFIG_PCCARD is not set
230
231#
232# PCI Hotplug Support
233#
234CONFIG_HOTPLUG_PCI=m 252CONFIG_HOTPLUG_PCI=m
235# CONFIG_HOTPLUG_PCI_FAKE is not set 253# CONFIG_HOTPLUG_PCI_FAKE is not set
236# CONFIG_HOTPLUG_PCI_CPCI is not set 254# CONFIG_HOTPLUG_PCI_CPCI is not set
@@ -247,14 +265,15 @@ CONFIG_NET=y
247# 265#
248# Networking options 266# Networking options
249# 267#
250# CONFIG_NETDEBUG is not set
251CONFIG_PACKET=y 268CONFIG_PACKET=y
252# CONFIG_PACKET_MMAP is not set 269# CONFIG_PACKET_MMAP is not set
253CONFIG_UNIX=y 270CONFIG_UNIX=y
254CONFIG_XFRM=y 271CONFIG_XFRM=y
255CONFIG_XFRM_USER=m 272CONFIG_XFRM_USER=m
256# CONFIG_XFRM_SUB_POLICY is not set 273# CONFIG_XFRM_SUB_POLICY is not set
274# CONFIG_XFRM_MIGRATE is not set
257CONFIG_NET_KEY=m 275CONFIG_NET_KEY=m
276# CONFIG_NET_KEY_MIGRATE is not set
258CONFIG_INET=y 277CONFIG_INET=y
259CONFIG_IP_MULTICAST=y 278CONFIG_IP_MULTICAST=y
260# CONFIG_IP_ADVANCED_ROUTER is not set 279# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -279,10 +298,6 @@ CONFIG_INET_TCP_DIAG=y
279CONFIG_TCP_CONG_CUBIC=y 298CONFIG_TCP_CONG_CUBIC=y
280CONFIG_DEFAULT_TCP_CONG="cubic" 299CONFIG_DEFAULT_TCP_CONG="cubic"
281# CONFIG_TCP_MD5SIG is not set 300# CONFIG_TCP_MD5SIG is not set
282
283#
284# IP: Virtual Server Configuration
285#
286# CONFIG_IP_VS is not set 301# CONFIG_IP_VS is not set
287# CONFIG_IPV6 is not set 302# CONFIG_IPV6 is not set
288# CONFIG_INET6_XFRM_TUNNEL is not set 303# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -298,10 +313,8 @@ CONFIG_NETFILTER_NETLINK=y
298CONFIG_NETFILTER_NETLINK_QUEUE=m 313CONFIG_NETFILTER_NETLINK_QUEUE=m
299CONFIG_NETFILTER_NETLINK_LOG=m 314CONFIG_NETFILTER_NETLINK_LOG=m
300CONFIG_NF_CONNTRACK_ENABLED=m 315CONFIG_NF_CONNTRACK_ENABLED=m
301CONFIG_NF_CONNTRACK_SUPPORT=y
302# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
303CONFIG_NF_CONNTRACK=m 316CONFIG_NF_CONNTRACK=m
304# CONFIG_NF_CT_ACCT is not set 317CONFIG_NF_CT_ACCT=y
305CONFIG_NF_CONNTRACK_MARK=y 318CONFIG_NF_CONNTRACK_MARK=y
306CONFIG_NF_CONNTRACK_EVENTS=y 319CONFIG_NF_CONNTRACK_EVENTS=y
307# CONFIG_NF_CT_PROTO_SCTP is not set 320# CONFIG_NF_CT_PROTO_SCTP is not set
@@ -311,10 +324,39 @@ CONFIG_NF_CONNTRACK_FTP=m
311CONFIG_NF_CONNTRACK_IRC=m 324CONFIG_NF_CONNTRACK_IRC=m
312# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set 325# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
313# CONFIG_NF_CONNTRACK_PPTP is not set 326# CONFIG_NF_CONNTRACK_PPTP is not set
327# CONFIG_NF_CONNTRACK_SANE is not set
314# CONFIG_NF_CONNTRACK_SIP is not set 328# CONFIG_NF_CONNTRACK_SIP is not set
315CONFIG_NF_CONNTRACK_TFTP=m 329CONFIG_NF_CONNTRACK_TFTP=m
316CONFIG_NF_CT_NETLINK=m 330CONFIG_NF_CT_NETLINK=m
317# CONFIG_NETFILTER_XTABLES is not set 331CONFIG_NETFILTER_XTABLES=m
332CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
333CONFIG_NETFILTER_XT_TARGET_MARK=m
334CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
335CONFIG_NETFILTER_XT_TARGET_NFLOG=m
336CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
337CONFIG_NETFILTER_XT_MATCH_COMMENT=m
338CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
339CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
340CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
341CONFIG_NETFILTER_XT_MATCH_DCCP=m
342CONFIG_NETFILTER_XT_MATCH_DSCP=m
343CONFIG_NETFILTER_XT_MATCH_ESP=m
344CONFIG_NETFILTER_XT_MATCH_HELPER=m
345CONFIG_NETFILTER_XT_MATCH_LENGTH=m
346CONFIG_NETFILTER_XT_MATCH_LIMIT=m
347CONFIG_NETFILTER_XT_MATCH_MAC=m
348CONFIG_NETFILTER_XT_MATCH_MARK=m
349CONFIG_NETFILTER_XT_MATCH_POLICY=m
350CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
351CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
352CONFIG_NETFILTER_XT_MATCH_QUOTA=m
353CONFIG_NETFILTER_XT_MATCH_REALM=m
354CONFIG_NETFILTER_XT_MATCH_SCTP=m
355CONFIG_NETFILTER_XT_MATCH_STATE=m
356CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
357CONFIG_NETFILTER_XT_MATCH_STRING=m
358CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
359CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
318 360
319# 361#
320# IP: Netfilter Configuration 362# IP: Netfilter Configuration
@@ -322,20 +364,38 @@ CONFIG_NF_CT_NETLINK=m
322CONFIG_NF_CONNTRACK_IPV4=m 364CONFIG_NF_CONNTRACK_IPV4=m
323CONFIG_NF_CONNTRACK_PROC_COMPAT=y 365CONFIG_NF_CONNTRACK_PROC_COMPAT=y
324CONFIG_IP_NF_QUEUE=m 366CONFIG_IP_NF_QUEUE=m
325 367CONFIG_IP_NF_IPTABLES=m
326# 368CONFIG_IP_NF_MATCH_IPRANGE=m
327# DCCP Configuration (EXPERIMENTAL) 369CONFIG_IP_NF_MATCH_TOS=m
328# 370CONFIG_IP_NF_MATCH_RECENT=m
371CONFIG_IP_NF_MATCH_ECN=m
372CONFIG_IP_NF_MATCH_AH=m
373CONFIG_IP_NF_MATCH_TTL=m
374CONFIG_IP_NF_MATCH_OWNER=m
375CONFIG_IP_NF_MATCH_ADDRTYPE=m
376CONFIG_IP_NF_FILTER=m
377CONFIG_IP_NF_TARGET_REJECT=m
378CONFIG_IP_NF_TARGET_LOG=m
379CONFIG_IP_NF_TARGET_ULOG=m
380CONFIG_NF_NAT=m
381CONFIG_NF_NAT_NEEDED=y
382CONFIG_IP_NF_TARGET_MASQUERADE=m
383CONFIG_IP_NF_TARGET_REDIRECT=m
384CONFIG_IP_NF_TARGET_NETMAP=m
385CONFIG_IP_NF_TARGET_SAME=m
386CONFIG_NF_NAT_SNMP_BASIC=m
387CONFIG_NF_NAT_FTP=m
388CONFIG_NF_NAT_IRC=m
389CONFIG_NF_NAT_TFTP=m
390# CONFIG_NF_NAT_AMANDA is not set
391# CONFIG_NF_NAT_PPTP is not set
392# CONFIG_NF_NAT_H323 is not set
393# CONFIG_NF_NAT_SIP is not set
394# CONFIG_IP_NF_MANGLE is not set
395# CONFIG_IP_NF_RAW is not set
396# CONFIG_IP_NF_ARPTABLES is not set
329# CONFIG_IP_DCCP is not set 397# CONFIG_IP_DCCP is not set
330
331#
332# SCTP Configuration (EXPERIMENTAL)
333#
334# CONFIG_IP_SCTP is not set 398# CONFIG_IP_SCTP is not set
335
336#
337# TIPC Configuration (EXPERIMENTAL)
338#
339# CONFIG_TIPC is not set 399# CONFIG_TIPC is not set
340# CONFIG_ATM is not set 400# CONFIG_ATM is not set
341# CONFIG_BRIDGE is not set 401# CONFIG_BRIDGE is not set
@@ -354,6 +414,7 @@ CONFIG_LLC=y
354# QoS and/or fair queueing 414# QoS and/or fair queueing
355# 415#
356# CONFIG_NET_SCHED is not set 416# CONFIG_NET_SCHED is not set
417CONFIG_NET_CLS_ROUTE=y
357 418
358# 419#
359# Network testing 420# Network testing
@@ -363,7 +424,16 @@ CONFIG_LLC=y
363# CONFIG_HAMRADIO is not set 424# CONFIG_HAMRADIO is not set
364# CONFIG_IRDA is not set 425# CONFIG_IRDA is not set
365# CONFIG_BT is not set 426# CONFIG_BT is not set
427# CONFIG_AF_RXRPC is not set
428
429#
430# Wireless
431#
432# CONFIG_CFG80211 is not set
433# CONFIG_WIRELESS_EXT is not set
434# CONFIG_MAC80211 is not set
366# CONFIG_IEEE80211 is not set 435# CONFIG_IEEE80211 is not set
436# CONFIG_RFKILL is not set
367 437
368# 438#
369# Device Drivers 439# Device Drivers
@@ -376,16 +446,13 @@ CONFIG_STANDALONE=y
376CONFIG_PREVENT_FIRMWARE_BUILD=y 446CONFIG_PREVENT_FIRMWARE_BUILD=y
377CONFIG_FW_LOADER=y 447CONFIG_FW_LOADER=y
378# CONFIG_DEBUG_DRIVER is not set 448# CONFIG_DEBUG_DRIVER is not set
449# CONFIG_DEBUG_DEVRES is not set
379# CONFIG_SYS_HYPERVISOR is not set 450# CONFIG_SYS_HYPERVISOR is not set
380 451
381# 452#
382# Connector - unified userspace <-> kernelspace linker 453# Connector - unified userspace <-> kernelspace linker
383# 454#
384# CONFIG_CONNECTOR is not set 455# CONFIG_CONNECTOR is not set
385
386#
387# Memory Technology Devices (MTD)
388#
389# CONFIG_MTD is not set 456# CONFIG_MTD is not set
390 457
391# 458#
@@ -403,6 +470,7 @@ CONFIG_PARPORT_PC=m
403# 470#
404# Plug and Play support 471# Plug and Play support
405# 472#
473# CONFIG_PNPACPI is not set
406 474
407# 475#
408# Block devices 476# Block devices
@@ -423,19 +491,16 @@ CONFIG_BLK_DEV_RAM=y
423CONFIG_BLK_DEV_RAM_COUNT=16 491CONFIG_BLK_DEV_RAM_COUNT=16
424CONFIG_BLK_DEV_RAM_SIZE=65536 492CONFIG_BLK_DEV_RAM_SIZE=65536
425CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 493CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
426CONFIG_BLK_DEV_INITRD=y
427# CONFIG_CDROM_PKTCDVD is not set 494# CONFIG_CDROM_PKTCDVD is not set
428# CONFIG_ATA_OVER_ETH is not set 495# CONFIG_ATA_OVER_ETH is not set
429 496
430# 497#
431# Misc devices 498# Misc devices
432# 499#
500# CONFIG_PHANTOM is not set
433# CONFIG_SGI_IOC4 is not set 501# CONFIG_SGI_IOC4 is not set
434# CONFIG_TIFM_CORE is not set 502# CONFIG_TIFM_CORE is not set
435 503# CONFIG_BLINK is not set
436#
437# ATA/ATAPI/MFM/RLL support
438#
439CONFIG_IDE=y 504CONFIG_IDE=y
440CONFIG_BLK_DEV_IDE=y 505CONFIG_BLK_DEV_IDE=y
441 506
@@ -450,6 +515,7 @@ CONFIG_BLK_DEV_IDECD=y
450# CONFIG_BLK_DEV_IDEFLOPPY is not set 515# CONFIG_BLK_DEV_IDEFLOPPY is not set
451# CONFIG_BLK_DEV_IDESCSI is not set 516# CONFIG_BLK_DEV_IDESCSI is not set
452# CONFIG_IDE_TASK_IOCTL is not set 517# CONFIG_IDE_TASK_IOCTL is not set
518CONFIG_IDE_PROC_FS=y
453 519
454# 520#
455# IDE chipset support/bugfixes 521# IDE chipset support/bugfixes
@@ -457,12 +523,12 @@ CONFIG_BLK_DEV_IDECD=y
457CONFIG_IDE_GENERIC=y 523CONFIG_IDE_GENERIC=y
458CONFIG_BLK_DEV_IDEPCI=y 524CONFIG_BLK_DEV_IDEPCI=y
459CONFIG_IDEPCI_SHARE_IRQ=y 525CONFIG_IDEPCI_SHARE_IRQ=y
526CONFIG_IDEPCI_PCIBUS_ORDER=y
460# CONFIG_BLK_DEV_OFFBOARD is not set 527# CONFIG_BLK_DEV_OFFBOARD is not set
461CONFIG_BLK_DEV_GENERIC=y 528CONFIG_BLK_DEV_GENERIC=y
462# CONFIG_BLK_DEV_OPTI621 is not set 529# CONFIG_BLK_DEV_OPTI621 is not set
463CONFIG_BLK_DEV_IDEDMA_PCI=y 530CONFIG_BLK_DEV_IDEDMA_PCI=y
464# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 531# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
465CONFIG_IDEDMA_PCI_AUTO=y
466# CONFIG_IDEDMA_ONLYDISK is not set 532# CONFIG_IDEDMA_ONLYDISK is not set
467# CONFIG_BLK_DEV_AEC62XX is not set 533# CONFIG_BLK_DEV_AEC62XX is not set
468# CONFIG_BLK_DEV_ALI15X3 is not set 534# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -477,6 +543,7 @@ CONFIG_BLK_DEV_AMD74XX=y
477# CONFIG_BLK_DEV_JMICRON is not set 543# CONFIG_BLK_DEV_JMICRON is not set
478# CONFIG_BLK_DEV_SC1200 is not set 544# CONFIG_BLK_DEV_SC1200 is not set
479# CONFIG_BLK_DEV_PIIX is not set 545# CONFIG_BLK_DEV_PIIX is not set
546# CONFIG_BLK_DEV_IT8213 is not set
480# CONFIG_BLK_DEV_IT821X is not set 547# CONFIG_BLK_DEV_IT821X is not set
481# CONFIG_BLK_DEV_NS87415 is not set 548# CONFIG_BLK_DEV_NS87415 is not set
482# CONFIG_BLK_DEV_PDC202XX_OLD is not set 549# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -487,10 +554,10 @@ CONFIG_BLK_DEV_AMD74XX=y
487# CONFIG_BLK_DEV_SLC90E66 is not set 554# CONFIG_BLK_DEV_SLC90E66 is not set
488# CONFIG_BLK_DEV_TRM290 is not set 555# CONFIG_BLK_DEV_TRM290 is not set
489# CONFIG_BLK_DEV_VIA82CXXX is not set 556# CONFIG_BLK_DEV_VIA82CXXX is not set
557# CONFIG_BLK_DEV_TC86C001 is not set
490# CONFIG_IDE_ARM is not set 558# CONFIG_IDE_ARM is not set
491CONFIG_BLK_DEV_IDEDMA=y 559CONFIG_BLK_DEV_IDEDMA=y
492# CONFIG_IDEDMA_IVB is not set 560# CONFIG_IDEDMA_IVB is not set
493CONFIG_IDEDMA_AUTO=y
494# CONFIG_BLK_DEV_HD is not set 561# CONFIG_BLK_DEV_HD is not set
495 562
496# 563#
@@ -520,6 +587,7 @@ CONFIG_SCSI_MULTI_LUN=y
520CONFIG_SCSI_CONSTANTS=y 587CONFIG_SCSI_CONSTANTS=y
521# CONFIG_SCSI_LOGGING is not set 588# CONFIG_SCSI_LOGGING is not set
522# CONFIG_SCSI_SCAN_ASYNC is not set 589# CONFIG_SCSI_SCAN_ASYNC is not set
590CONFIG_SCSI_WAIT_SCAN=m
523 591
524# 592#
525# SCSI Transports 593# SCSI Transports
@@ -575,11 +643,8 @@ CONFIG_SCSI_LPFC=m
575# CONFIG_SCSI_DC390T is not set 643# CONFIG_SCSI_DC390T is not set
576# CONFIG_SCSI_DEBUG is not set 644# CONFIG_SCSI_DEBUG is not set
577# CONFIG_SCSI_SRP is not set 645# CONFIG_SCSI_SRP is not set
578
579#
580# Serial ATA (prod) and Parallel ATA (experimental) drivers
581#
582CONFIG_ATA=y 646CONFIG_ATA=y
647# CONFIG_ATA_NONSTANDARD is not set
583# CONFIG_SATA_AHCI is not set 648# CONFIG_SATA_AHCI is not set
584# CONFIG_SATA_SVW is not set 649# CONFIG_SATA_SVW is not set
585# CONFIG_ATA_PIIX is not set 650# CONFIG_ATA_PIIX is not set
@@ -595,10 +660,12 @@ CONFIG_ATA=y
595# CONFIG_SATA_ULI is not set 660# CONFIG_SATA_ULI is not set
596# CONFIG_SATA_VIA is not set 661# CONFIG_SATA_VIA is not set
597# CONFIG_SATA_VITESSE is not set 662# CONFIG_SATA_VITESSE is not set
663# CONFIG_SATA_INIC162X is not set
598# CONFIG_PATA_ALI is not set 664# CONFIG_PATA_ALI is not set
599# CONFIG_PATA_AMD is not set 665# CONFIG_PATA_AMD is not set
600# CONFIG_PATA_ARTOP is not set 666# CONFIG_PATA_ARTOP is not set
601# CONFIG_PATA_ATIIXP is not set 667# CONFIG_PATA_ATIIXP is not set
668# CONFIG_PATA_CMD640_PCI is not set
602# CONFIG_PATA_CMD64X is not set 669# CONFIG_PATA_CMD64X is not set
603# CONFIG_PATA_CS5520 is not set 670# CONFIG_PATA_CS5520 is not set
604# CONFIG_PATA_CS5530 is not set 671# CONFIG_PATA_CS5530 is not set
@@ -610,6 +677,7 @@ CONFIG_ATA=y
610# CONFIG_PATA_HPT3X2N is not set 677# CONFIG_PATA_HPT3X2N is not set
611# CONFIG_PATA_HPT3X3 is not set 678# CONFIG_PATA_HPT3X3 is not set
612# CONFIG_PATA_IT821X is not set 679# CONFIG_PATA_IT821X is not set
680# CONFIG_PATA_IT8213 is not set
613# CONFIG_PATA_JMICRON is not set 681# CONFIG_PATA_JMICRON is not set
614# CONFIG_PATA_TRIFLEX is not set 682# CONFIG_PATA_TRIFLEX is not set
615# CONFIG_PATA_MARVELL is not set 683# CONFIG_PATA_MARVELL is not set
@@ -650,6 +718,7 @@ CONFIG_DM_MIRROR=m
650CONFIG_DM_ZERO=m 718CONFIG_DM_ZERO=m
651CONFIG_DM_MULTIPATH=m 719CONFIG_DM_MULTIPATH=m
652CONFIG_DM_MULTIPATH_EMC=m 720CONFIG_DM_MULTIPATH_EMC=m
721# CONFIG_DM_DELAY is not set
653 722
654# 723#
655# Fusion MPT device support 724# Fusion MPT device support
@@ -662,18 +731,14 @@ CONFIG_DM_MULTIPATH_EMC=m
662# 731#
663# IEEE 1394 (FireWire) support 732# IEEE 1394 (FireWire) support
664# 733#
734# CONFIG_FIREWIRE is not set
665# CONFIG_IEEE1394 is not set 735# CONFIG_IEEE1394 is not set
666 736
667# 737#
668# I2O device support 738# I2O device support
669# 739#
670# CONFIG_I2O is not set 740# CONFIG_I2O is not set
671 741# CONFIG_MACINTOSH_DRIVERS is not set
672#
673# Macintosh device drivers
674#
675# CONFIG_MAC_EMUMOUSEBTN is not set
676# CONFIG_WINDFARM is not set
677 742
678# 743#
679# Network device support 744# Network device support
@@ -683,15 +748,7 @@ CONFIG_DUMMY=m
683CONFIG_BONDING=m 748CONFIG_BONDING=m
684# CONFIG_EQUALIZER is not set 749# CONFIG_EQUALIZER is not set
685CONFIG_TUN=m 750CONFIG_TUN=m
686
687#
688# ARCnet devices
689#
690# CONFIG_ARCNET is not set 751# CONFIG_ARCNET is not set
691
692#
693# PHY device support
694#
695# CONFIG_PHYLIB is not set 752# CONFIG_PHYLIB is not set
696 753
697# 754#
@@ -731,11 +788,9 @@ CONFIG_E100=y
731# CONFIG_EPIC100 is not set 788# CONFIG_EPIC100 is not set
732# CONFIG_SUNDANCE is not set 789# CONFIG_SUNDANCE is not set
733# CONFIG_VIA_RHINE is not set 790# CONFIG_VIA_RHINE is not set
791# CONFIG_SC92031 is not set
734# CONFIG_NET_POCKET is not set 792# CONFIG_NET_POCKET is not set
735 793CONFIG_NETDEV_1000=y
736#
737# Ethernet (1000 Mbit)
738#
739CONFIG_ACENIC=y 794CONFIG_ACENIC=y
740CONFIG_ACENIC_OMIT_TIGON_I=y 795CONFIG_ACENIC_OMIT_TIGON_I=y
741# CONFIG_DL2K is not set 796# CONFIG_DL2K is not set
@@ -754,11 +809,10 @@ CONFIG_E1000=y
754CONFIG_TIGON3=y 809CONFIG_TIGON3=y
755# CONFIG_BNX2 is not set 810# CONFIG_BNX2 is not set
756# CONFIG_QLA3XXX is not set 811# CONFIG_QLA3XXX is not set
757 812# CONFIG_ATL1 is not set
758# 813CONFIG_NETDEV_10000=y
759# Ethernet (10000 Mbit)
760#
761# CONFIG_CHELSIO_T1 is not set 814# CONFIG_CHELSIO_T1 is not set
815# CONFIG_CHELSIO_T3 is not set
762CONFIG_EHEA=m 816CONFIG_EHEA=m
763CONFIG_IXGB=m 817CONFIG_IXGB=m
764# CONFIG_IXGB_NAPI is not set 818# CONFIG_IXGB_NAPI is not set
@@ -766,23 +820,28 @@ CONFIG_S2IO=m
766# CONFIG_S2IO_NAPI is not set 820# CONFIG_S2IO_NAPI is not set
767# CONFIG_MYRI10GE is not set 821# CONFIG_MYRI10GE is not set
768# CONFIG_NETXEN_NIC is not set 822# CONFIG_NETXEN_NIC is not set
769 823# CONFIG_PASEMI_MAC is not set
770# 824# CONFIG_MLX4_CORE is not set
771# Token Ring devices
772#
773CONFIG_TR=y 825CONFIG_TR=y
774CONFIG_IBMOL=y 826CONFIG_IBMOL=y
775# CONFIG_3C359 is not set 827# CONFIG_3C359 is not set
776# CONFIG_TMS380TR is not set 828# CONFIG_TMS380TR is not set
777 829
778# 830#
779# Wireless LAN (non-hamradio) 831# Wireless LAN
780# 832#
781# CONFIG_NET_RADIO is not set 833# CONFIG_WLAN_PRE80211 is not set
834# CONFIG_WLAN_80211 is not set
782 835
783# 836#
784# Wan interfaces 837# USB Network Adapters
785# 838#
839# CONFIG_USB_CATC is not set
840# CONFIG_USB_KAWETH is not set
841# CONFIG_USB_PEGASUS is not set
842# CONFIG_USB_RTL8150 is not set
843# CONFIG_USB_USBNET_MII is not set
844# CONFIG_USB_USBNET is not set
786# CONFIG_WAN is not set 845# CONFIG_WAN is not set
787# CONFIG_FDDI is not set 846# CONFIG_FDDI is not set
788# CONFIG_HIPPI is not set 847# CONFIG_HIPPI is not set
@@ -802,7 +861,6 @@ CONFIG_SLHC=m
802# CONFIG_SHAPER is not set 861# CONFIG_SHAPER is not set
803CONFIG_NETCONSOLE=y 862CONFIG_NETCONSOLE=y
804CONFIG_NETPOLL=y 863CONFIG_NETPOLL=y
805CONFIG_NETPOLL_RX=y
806CONFIG_NETPOLL_TRAP=y 864CONFIG_NETPOLL_TRAP=y
807CONFIG_NET_POLL_CONTROLLER=y 865CONFIG_NET_POLL_CONTROLLER=y
808 866
@@ -821,6 +879,7 @@ CONFIG_NET_POLL_CONTROLLER=y
821# 879#
822CONFIG_INPUT=y 880CONFIG_INPUT=y
823# CONFIG_INPUT_FF_MEMLESS is not set 881# CONFIG_INPUT_FF_MEMLESS is not set
882# CONFIG_INPUT_POLLDEV is not set
824 883
825# 884#
826# Userland interfaces 885# Userland interfaces
@@ -846,12 +905,25 @@ CONFIG_KEYBOARD_ATKBD=y
846# CONFIG_KEYBOARD_STOWAWAY is not set 905# CONFIG_KEYBOARD_STOWAWAY is not set
847CONFIG_INPUT_MOUSE=y 906CONFIG_INPUT_MOUSE=y
848CONFIG_MOUSE_PS2=y 907CONFIG_MOUSE_PS2=y
908CONFIG_MOUSE_PS2_ALPS=y
909CONFIG_MOUSE_PS2_LOGIPS2PP=y
910CONFIG_MOUSE_PS2_SYNAPTICS=y
911CONFIG_MOUSE_PS2_LIFEBOOK=y
912CONFIG_MOUSE_PS2_TRACKPOINT=y
913# CONFIG_MOUSE_PS2_TOUCHKIT is not set
849# CONFIG_MOUSE_SERIAL is not set 914# CONFIG_MOUSE_SERIAL is not set
915# CONFIG_MOUSE_APPLETOUCH is not set
850# CONFIG_MOUSE_VSXXXAA is not set 916# CONFIG_MOUSE_VSXXXAA is not set
851# CONFIG_INPUT_JOYSTICK is not set 917# CONFIG_INPUT_JOYSTICK is not set
918# CONFIG_INPUT_TABLET is not set
852# CONFIG_INPUT_TOUCHSCREEN is not set 919# CONFIG_INPUT_TOUCHSCREEN is not set
853CONFIG_INPUT_MISC=y 920CONFIG_INPUT_MISC=y
854CONFIG_INPUT_PCSPKR=m 921CONFIG_INPUT_PCSPKR=m
922# CONFIG_INPUT_ATI_REMOTE is not set
923# CONFIG_INPUT_ATI_REMOTE2 is not set
924# CONFIG_INPUT_KEYSPAN_REMOTE is not set
925# CONFIG_INPUT_POWERMATE is not set
926# CONFIG_INPUT_YEALINK is not set
855# CONFIG_INPUT_UINPUT is not set 927# CONFIG_INPUT_UINPUT is not set
856 928
857# 929#
@@ -892,6 +964,7 @@ CONFIG_SERIAL_CORE=y
892CONFIG_SERIAL_CORE_CONSOLE=y 964CONFIG_SERIAL_CORE_CONSOLE=y
893CONFIG_SERIAL_ICOM=m 965CONFIG_SERIAL_ICOM=m
894CONFIG_SERIAL_JSM=m 966CONFIG_SERIAL_JSM=m
967# CONFIG_SERIAL_OF_PLATFORM is not set
895CONFIG_UNIX98_PTYS=y 968CONFIG_UNIX98_PTYS=y
896CONFIG_LEGACY_PTYS=y 969CONFIG_LEGACY_PTYS=y
897CONFIG_LEGACY_PTY_COUNT=256 970CONFIG_LEGACY_PTY_COUNT=256
@@ -907,15 +980,10 @@ CONFIG_HVCS=m
907# IPMI 980# IPMI
908# 981#
909# CONFIG_IPMI_HANDLER is not set 982# CONFIG_IPMI_HANDLER is not set
910
911#
912# Watchdog Cards
913#
914# CONFIG_WATCHDOG is not set 983# CONFIG_WATCHDOG is not set
915# CONFIG_HW_RANDOM is not set 984# CONFIG_HW_RANDOM is not set
916CONFIG_GEN_RTC=y 985CONFIG_GEN_RTC=y
917# CONFIG_GEN_RTC_X is not set 986# CONFIG_GEN_RTC_X is not set
918# CONFIG_DTLK is not set
919# CONFIG_R3964 is not set 987# CONFIG_R3964 is not set
920# CONFIG_APPLICOM is not set 988# CONFIG_APPLICOM is not set
921# CONFIG_AGP is not set 989# CONFIG_AGP is not set
@@ -928,11 +996,9 @@ CONFIG_MAX_RAW_DEVS=1024
928# TPM devices 996# TPM devices
929# 997#
930# CONFIG_TCG_TPM is not set 998# CONFIG_TCG_TPM is not set
931 999CONFIG_DEVPORT=y
932#
933# I2C support
934#
935CONFIG_I2C=y 1000CONFIG_I2C=y
1001CONFIG_I2C_BOARDINFO=y
936# CONFIG_I2C_CHARDEV is not set 1002# CONFIG_I2C_CHARDEV is not set
937 1003
938# 1004#
@@ -959,14 +1025,15 @@ CONFIG_I2C_ALGOBIT=y
959# CONFIG_I2C_PARPORT_LIGHT is not set 1025# CONFIG_I2C_PARPORT_LIGHT is not set
960# CONFIG_I2C_PROSAVAGE is not set 1026# CONFIG_I2C_PROSAVAGE is not set
961# CONFIG_I2C_SAVAGE4 is not set 1027# CONFIG_I2C_SAVAGE4 is not set
1028# CONFIG_I2C_SIMTEC is not set
962# CONFIG_I2C_SIS5595 is not set 1029# CONFIG_I2C_SIS5595 is not set
963# CONFIG_I2C_SIS630 is not set 1030# CONFIG_I2C_SIS630 is not set
964# CONFIG_I2C_SIS96X is not set 1031# CONFIG_I2C_SIS96X is not set
965# CONFIG_I2C_STUB is not set 1032# CONFIG_I2C_STUB is not set
1033# CONFIG_I2C_TINY_USB is not set
966# CONFIG_I2C_VIA is not set 1034# CONFIG_I2C_VIA is not set
967# CONFIG_I2C_VIAPRO is not set 1035# CONFIG_I2C_VIAPRO is not set
968# CONFIG_I2C_VOODOO3 is not set 1036# CONFIG_I2C_VOODOO3 is not set
969# CONFIG_I2C_PCA_ISA is not set
970 1037
971# 1038#
972# Miscellaneous I2C Chip support 1039# Miscellaneous I2C Chip support
@@ -993,37 +1060,56 @@ CONFIG_I2C_ALGOBIT=y
993# Dallas's 1-wire bus 1060# Dallas's 1-wire bus
994# 1061#
995# CONFIG_W1 is not set 1062# CONFIG_W1 is not set
1063# CONFIG_HWMON is not set
996 1064
997# 1065#
998# Hardware Monitoring support 1066# Multifunction device drivers
999# 1067#
1000# CONFIG_HWMON is not set 1068# CONFIG_MFD_SM501 is not set
1001# CONFIG_HWMON_VID is not set
1002 1069
1003# 1070#
1004# Multimedia devices 1071# Multimedia devices
1005# 1072#
1006# CONFIG_VIDEO_DEV is not set 1073# CONFIG_VIDEO_DEV is not set
1074# CONFIG_DVB_CORE is not set
1075# CONFIG_DAB is not set
1007 1076
1008# 1077#
1009# Digital Video Broadcasting Devices 1078# Graphics support
1010# 1079#
1011# CONFIG_DVB is not set 1080CONFIG_BACKLIGHT_LCD_SUPPORT=y
1012# CONFIG_USB_DABUSB is not set 1081CONFIG_BACKLIGHT_CLASS_DEVICE=y
1082CONFIG_LCD_CLASS_DEVICE=m
1013 1083
1014# 1084#
1015# Graphics support 1085# Display device support
1016# 1086#
1017CONFIG_FIRMWARE_EDID=y 1087CONFIG_DISPLAY_SUPPORT=y
1088
1089#
1090# Display hardware drivers
1091#
1092# CONFIG_VGASTATE is not set
1018CONFIG_FB=y 1093CONFIG_FB=y
1094CONFIG_FIRMWARE_EDID=y
1019CONFIG_FB_DDC=y 1095CONFIG_FB_DDC=y
1020CONFIG_FB_CFB_FILLRECT=y 1096CONFIG_FB_CFB_FILLRECT=y
1021CONFIG_FB_CFB_COPYAREA=y 1097CONFIG_FB_CFB_COPYAREA=y
1022CONFIG_FB_CFB_IMAGEBLIT=y 1098CONFIG_FB_CFB_IMAGEBLIT=y
1099# CONFIG_FB_SYS_FILLRECT is not set
1100# CONFIG_FB_SYS_COPYAREA is not set
1101# CONFIG_FB_SYS_IMAGEBLIT is not set
1102# CONFIG_FB_SYS_FOPS is not set
1103CONFIG_FB_DEFERRED_IO=y
1104# CONFIG_FB_SVGALIB is not set
1023CONFIG_FB_MACMODES=y 1105CONFIG_FB_MACMODES=y
1024# CONFIG_FB_BACKLIGHT is not set 1106CONFIG_FB_BACKLIGHT=y
1025CONFIG_FB_MODE_HELPERS=y 1107CONFIG_FB_MODE_HELPERS=y
1026CONFIG_FB_TILEBLITTING=y 1108CONFIG_FB_TILEBLITTING=y
1109
1110#
1111# Frame buffer hardware drivers
1112#
1027# CONFIG_FB_CIRRUS is not set 1113# CONFIG_FB_CIRRUS is not set
1028# CONFIG_FB_PM2 is not set 1114# CONFIG_FB_PM2 is not set
1029# CONFIG_FB_CYBER2000 is not set 1115# CONFIG_FB_CYBER2000 is not set
@@ -1042,16 +1128,21 @@ CONFIG_FB_MATROX_G=y
1042CONFIG_FB_MATROX_MULTIHEAD=y 1128CONFIG_FB_MATROX_MULTIHEAD=y
1043CONFIG_FB_RADEON=y 1129CONFIG_FB_RADEON=y
1044CONFIG_FB_RADEON_I2C=y 1130CONFIG_FB_RADEON_I2C=y
1131CONFIG_FB_RADEON_BACKLIGHT=y
1045# CONFIG_FB_RADEON_DEBUG is not set 1132# CONFIG_FB_RADEON_DEBUG is not set
1046# CONFIG_FB_ATY128 is not set 1133# CONFIG_FB_ATY128 is not set
1047# CONFIG_FB_ATY is not set 1134# CONFIG_FB_ATY is not set
1135# CONFIG_FB_S3 is not set
1048# CONFIG_FB_SAVAGE is not set 1136# CONFIG_FB_SAVAGE is not set
1049# CONFIG_FB_SIS is not set 1137# CONFIG_FB_SIS is not set
1050# CONFIG_FB_NEOMAGIC is not set 1138# CONFIG_FB_NEOMAGIC is not set
1051# CONFIG_FB_KYRO is not set 1139# CONFIG_FB_KYRO is not set
1052# CONFIG_FB_3DFX is not set 1140# CONFIG_FB_3DFX is not set
1053# CONFIG_FB_VOODOO1 is not set 1141# CONFIG_FB_VOODOO1 is not set
1142# CONFIG_FB_VT8623 is not set
1054# CONFIG_FB_TRIDENT is not set 1143# CONFIG_FB_TRIDENT is not set
1144# CONFIG_FB_ARK is not set
1145# CONFIG_FB_PM3 is not set
1055CONFIG_FB_IBM_GXT4500=y 1146CONFIG_FB_IBM_GXT4500=y
1056# CONFIG_FB_VIRTUAL is not set 1147# CONFIG_FB_VIRTUAL is not set
1057 1148
@@ -1065,19 +1156,10 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
1065# CONFIG_FONTS is not set 1156# CONFIG_FONTS is not set
1066CONFIG_FONT_8x8=y 1157CONFIG_FONT_8x8=y
1067CONFIG_FONT_8x16=y 1158CONFIG_FONT_8x16=y
1068
1069#
1070# Logo configuration
1071#
1072CONFIG_LOGO=y 1159CONFIG_LOGO=y
1073CONFIG_LOGO_LINUX_MONO=y 1160CONFIG_LOGO_LINUX_MONO=y
1074CONFIG_LOGO_LINUX_VGA16=y 1161CONFIG_LOGO_LINUX_VGA16=y
1075CONFIG_LOGO_LINUX_CLUT224=y 1162CONFIG_LOGO_LINUX_CLUT224=y
1076CONFIG_BACKLIGHT_LCD_SUPPORT=y
1077CONFIG_BACKLIGHT_CLASS_DEVICE=m
1078CONFIG_BACKLIGHT_DEVICE=y
1079CONFIG_LCD_CLASS_DEVICE=m
1080CONFIG_LCD_DEVICE=y
1081 1163
1082# 1164#
1083# Sound 1165# Sound
@@ -1088,6 +1170,15 @@ CONFIG_LCD_DEVICE=y
1088# HID Devices 1170# HID Devices
1089# 1171#
1090CONFIG_HID=y 1172CONFIG_HID=y
1173# CONFIG_HID_DEBUG is not set
1174
1175#
1176# USB Input Devices
1177#
1178CONFIG_USB_HID=y
1179# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1180# CONFIG_HID_FF is not set
1181CONFIG_USB_HIDDEV=y
1091 1182
1092# 1183#
1093# USB support 1184# USB support
@@ -1102,9 +1193,8 @@ CONFIG_USB=y
1102# Miscellaneous USB options 1193# Miscellaneous USB options
1103# 1194#
1104CONFIG_USB_DEVICEFS=y 1195CONFIG_USB_DEVICEFS=y
1105# CONFIG_USB_BANDWIDTH is not set 1196CONFIG_USB_DEVICE_CLASS=y
1106# CONFIG_USB_DYNAMIC_MINORS is not set 1197# CONFIG_USB_DYNAMIC_MINORS is not set
1107# CONFIG_USB_MULTITHREAD_PROBE is not set
1108# CONFIG_USB_OTG is not set 1198# CONFIG_USB_OTG is not set
1109 1199
1110# 1200#
@@ -1114,9 +1204,12 @@ CONFIG_USB_EHCI_HCD=y
1114# CONFIG_USB_EHCI_SPLIT_ISO is not set 1204# CONFIG_USB_EHCI_SPLIT_ISO is not set
1115# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1205# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1116# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1206# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1207# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1117# CONFIG_USB_ISP116X_HCD is not set 1208# CONFIG_USB_ISP116X_HCD is not set
1118CONFIG_USB_OHCI_HCD=y 1209CONFIG_USB_OHCI_HCD=y
1119# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1210# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1211# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1212# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1120CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1213CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1121# CONFIG_USB_UHCI_HCD is not set 1214# CONFIG_USB_UHCI_HCD is not set
1122# CONFIG_USB_SL811_HCD is not set 1215# CONFIG_USB_SL811_HCD is not set
@@ -1149,40 +1242,10 @@ CONFIG_USB_STORAGE=y
1149# CONFIG_USB_LIBUSUAL is not set 1242# CONFIG_USB_LIBUSUAL is not set
1150 1243
1151# 1244#
1152# USB Input Devices
1153#
1154CONFIG_USB_HID=y
1155# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1156# CONFIG_HID_FF is not set
1157CONFIG_USB_HIDDEV=y
1158# CONFIG_USB_AIPTEK is not set
1159# CONFIG_USB_WACOM is not set
1160# CONFIG_USB_ACECAD is not set
1161# CONFIG_USB_KBTAB is not set
1162# CONFIG_USB_POWERMATE is not set
1163# CONFIG_USB_TOUCHSCREEN is not set
1164# CONFIG_USB_YEALINK is not set
1165# CONFIG_USB_XPAD is not set
1166# CONFIG_USB_ATI_REMOTE is not set
1167# CONFIG_USB_ATI_REMOTE2 is not set
1168# CONFIG_USB_KEYSPAN_REMOTE is not set
1169# CONFIG_USB_APPLETOUCH is not set
1170
1171#
1172# USB Imaging devices 1245# USB Imaging devices
1173# 1246#
1174# CONFIG_USB_MDC800 is not set 1247# CONFIG_USB_MDC800 is not set
1175# CONFIG_USB_MICROTEK is not set 1248# CONFIG_USB_MICROTEK is not set
1176
1177#
1178# USB Network Adapters
1179#
1180# CONFIG_USB_CATC is not set
1181# CONFIG_USB_KAWETH is not set
1182# CONFIG_USB_PEGASUS is not set
1183# CONFIG_USB_RTL8150 is not set
1184# CONFIG_USB_USBNET_MII is not set
1185# CONFIG_USB_USBNET is not set
1186CONFIG_USB_MON=y 1249CONFIG_USB_MON=y
1187 1250
1188# 1251#
@@ -1205,6 +1268,7 @@ CONFIG_USB_MON=y
1205# CONFIG_USB_RIO500 is not set 1268# CONFIG_USB_RIO500 is not set
1206# CONFIG_USB_LEGOTOWER is not set 1269# CONFIG_USB_LEGOTOWER is not set
1207# CONFIG_USB_LCD is not set 1270# CONFIG_USB_LCD is not set
1271# CONFIG_USB_BERRY_CHARGE is not set
1208# CONFIG_USB_LED is not set 1272# CONFIG_USB_LED is not set
1209# CONFIG_USB_CYPRESS_CY7C63 is not set 1273# CONFIG_USB_CYPRESS_CY7C63 is not set
1210# CONFIG_USB_CYTHERM is not set 1274# CONFIG_USB_CYTHERM is not set
@@ -1215,6 +1279,7 @@ CONFIG_USB_MON=y
1215# CONFIG_USB_SISUSBVGA is not set 1279# CONFIG_USB_SISUSBVGA is not set
1216# CONFIG_USB_LD is not set 1280# CONFIG_USB_LD is not set
1217# CONFIG_USB_TRANCEVIBRATOR is not set 1281# CONFIG_USB_TRANCEVIBRATOR is not set
1282# CONFIG_USB_IOWARRIOR is not set
1218# CONFIG_USB_TEST is not set 1283# CONFIG_USB_TEST is not set
1219 1284
1220# 1285#
@@ -1225,10 +1290,6 @@ CONFIG_USB_MON=y
1225# USB Gadget Support 1290# USB Gadget Support
1226# 1291#
1227# CONFIG_USB_GADGET is not set 1292# CONFIG_USB_GADGET is not set
1228
1229#
1230# MMC/SD Card support
1231#
1232# CONFIG_MMC is not set 1293# CONFIG_MMC is not set
1233 1294
1234# 1295#
@@ -1250,13 +1311,16 @@ CONFIG_USB_MON=y
1250CONFIG_INFINIBAND=m 1311CONFIG_INFINIBAND=m
1251CONFIG_INFINIBAND_USER_MAD=m 1312CONFIG_INFINIBAND_USER_MAD=m
1252CONFIG_INFINIBAND_USER_ACCESS=m 1313CONFIG_INFINIBAND_USER_ACCESS=m
1314CONFIG_INFINIBAND_USER_MEM=y
1253CONFIG_INFINIBAND_ADDR_TRANS=y 1315CONFIG_INFINIBAND_ADDR_TRANS=y
1254CONFIG_INFINIBAND_MTHCA=m 1316CONFIG_INFINIBAND_MTHCA=m
1255CONFIG_INFINIBAND_MTHCA_DEBUG=y 1317CONFIG_INFINIBAND_MTHCA_DEBUG=y
1318# CONFIG_INFINIBAND_IPATH is not set
1256CONFIG_INFINIBAND_EHCA=m 1319CONFIG_INFINIBAND_EHCA=m
1257CONFIG_INFINIBAND_EHCA_SCALING=y
1258# CONFIG_INFINIBAND_AMSO1100 is not set 1320# CONFIG_INFINIBAND_AMSO1100 is not set
1321# CONFIG_MLX4_INFINIBAND is not set
1259CONFIG_INFINIBAND_IPOIB=m 1322CONFIG_INFINIBAND_IPOIB=m
1323# CONFIG_INFINIBAND_IPOIB_CM is not set
1260CONFIG_INFINIBAND_IPOIB_DEBUG=y 1324CONFIG_INFINIBAND_IPOIB_DEBUG=y
1261# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set 1325# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
1262CONFIG_INFINIBAND_SRP=m 1326CONFIG_INFINIBAND_SRP=m
@@ -1285,8 +1349,9 @@ CONFIG_INFINIBAND_SRP=m
1285# 1349#
1286 1350
1287# 1351#
1288# Virtualization 1352# Auxiliary Display support
1289# 1353#
1354# CONFIG_KS0108 is not set
1290 1355
1291# 1356#
1292# File systems 1357# File systems
@@ -1341,7 +1406,6 @@ CONFIG_FUSE_FS=m
1341CONFIG_ISO9660_FS=y 1406CONFIG_ISO9660_FS=y
1342CONFIG_JOLIET=y 1407CONFIG_JOLIET=y
1343CONFIG_ZISOFS=y 1408CONFIG_ZISOFS=y
1344CONFIG_ZISOFS_FS=y
1345CONFIG_UDF_FS=m 1409CONFIG_UDF_FS=m
1346CONFIG_UDF_NLS=y 1410CONFIG_UDF_NLS=y
1347 1411
@@ -1407,6 +1471,7 @@ CONFIG_NFS_ACL_SUPPORT=y
1407CONFIG_NFS_COMMON=y 1471CONFIG_NFS_COMMON=y
1408CONFIG_SUNRPC=y 1472CONFIG_SUNRPC=y
1409CONFIG_SUNRPC_GSS=y 1473CONFIG_SUNRPC_GSS=y
1474# CONFIG_SUNRPC_BIND34 is not set
1410CONFIG_RPCSEC_GSS_KRB5=y 1475CONFIG_RPCSEC_GSS_KRB5=y
1411CONFIG_RPCSEC_GSS_SPKM3=m 1476CONFIG_RPCSEC_GSS_SPKM3=m
1412# CONFIG_SMB_FS is not set 1477# CONFIG_SMB_FS is not set
@@ -1476,6 +1541,7 @@ CONFIG_NLS_ISO8859_1=y
1476# Distributed Lock Manager 1541# Distributed Lock Manager
1477# 1542#
1478# CONFIG_DLM is not set 1543# CONFIG_DLM is not set
1544# CONFIG_UCC_SLOW is not set
1479 1545
1480# 1546#
1481# Library routines 1547# Library routines
@@ -1483,12 +1549,19 @@ CONFIG_NLS_ISO8859_1=y
1483CONFIG_BITREVERSE=y 1549CONFIG_BITREVERSE=y
1484CONFIG_CRC_CCITT=m 1550CONFIG_CRC_CCITT=m
1485# CONFIG_CRC16 is not set 1551# CONFIG_CRC16 is not set
1552# CONFIG_CRC_ITU_T is not set
1486CONFIG_CRC32=y 1553CONFIG_CRC32=y
1487CONFIG_LIBCRC32C=m 1554CONFIG_LIBCRC32C=m
1488CONFIG_ZLIB_INFLATE=y 1555CONFIG_ZLIB_INFLATE=y
1489CONFIG_ZLIB_DEFLATE=m 1556CONFIG_ZLIB_DEFLATE=m
1557CONFIG_TEXTSEARCH=y
1558CONFIG_TEXTSEARCH_KMP=m
1559CONFIG_TEXTSEARCH_BM=m
1560CONFIG_TEXTSEARCH_FSM=m
1490CONFIG_PLIST=y 1561CONFIG_PLIST=y
1491CONFIG_IOMAP_COPY=y 1562CONFIG_HAS_IOMEM=y
1563CONFIG_HAS_IOPORT=y
1564CONFIG_HAS_DMA=y
1492 1565
1493# 1566#
1494# Instrumentation Support 1567# Instrumentation Support
@@ -1507,15 +1580,15 @@ CONFIG_MAGIC_SYSRQ=y
1507CONFIG_DEBUG_FS=y 1580CONFIG_DEBUG_FS=y
1508# CONFIG_HEADERS_CHECK is not set 1581# CONFIG_HEADERS_CHECK is not set
1509CONFIG_DEBUG_KERNEL=y 1582CONFIG_DEBUG_KERNEL=y
1510CONFIG_LOG_BUF_SHIFT=17 1583# CONFIG_DEBUG_SHIRQ is not set
1511CONFIG_DETECT_SOFTLOCKUP=y 1584CONFIG_DETECT_SOFTLOCKUP=y
1512# CONFIG_SCHEDSTATS is not set 1585# CONFIG_SCHEDSTATS is not set
1586# CONFIG_TIMER_STATS is not set
1513# CONFIG_DEBUG_SLAB is not set 1587# CONFIG_DEBUG_SLAB is not set
1514# CONFIG_DEBUG_RT_MUTEXES is not set 1588# CONFIG_DEBUG_RT_MUTEXES is not set
1515# CONFIG_RT_MUTEX_TESTER is not set 1589# CONFIG_RT_MUTEX_TESTER is not set
1516# CONFIG_DEBUG_SPINLOCK is not set 1590# CONFIG_DEBUG_SPINLOCK is not set
1517# CONFIG_DEBUG_MUTEXES is not set 1591# CONFIG_DEBUG_MUTEXES is not set
1518# CONFIG_DEBUG_RWSEMS is not set
1519# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1592# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1520# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1593# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1521# CONFIG_DEBUG_KOBJECT is not set 1594# CONFIG_DEBUG_KOBJECT is not set
@@ -1526,8 +1599,10 @@ CONFIG_DEBUG_BUGVERBOSE=y
1526CONFIG_FORCED_INLINING=y 1599CONFIG_FORCED_INLINING=y
1527# CONFIG_RCU_TORTURE_TEST is not set 1600# CONFIG_RCU_TORTURE_TEST is not set
1528# CONFIG_LKDTM is not set 1601# CONFIG_LKDTM is not set
1602# CONFIG_FAULT_INJECTION is not set
1529CONFIG_DEBUG_STACKOVERFLOW=y 1603CONFIG_DEBUG_STACKOVERFLOW=y
1530# CONFIG_DEBUG_STACK_USAGE is not set 1604# CONFIG_DEBUG_STACK_USAGE is not set
1605# CONFIG_DEBUG_PAGEALLOC is not set
1531CONFIG_HCALL_STATS=y 1606CONFIG_HCALL_STATS=y
1532CONFIG_DEBUGGER=y 1607CONFIG_DEBUGGER=y
1533CONFIG_XMON=y 1608CONFIG_XMON=y
@@ -1564,8 +1639,11 @@ CONFIG_CRYPTO_TGR192=m
1564# CONFIG_CRYPTO_GF128MUL is not set 1639# CONFIG_CRYPTO_GF128MUL is not set
1565CONFIG_CRYPTO_ECB=m 1640CONFIG_CRYPTO_ECB=m
1566CONFIG_CRYPTO_CBC=y 1641CONFIG_CRYPTO_CBC=y
1642CONFIG_CRYPTO_PCBC=m
1567# CONFIG_CRYPTO_LRW is not set 1643# CONFIG_CRYPTO_LRW is not set
1644# CONFIG_CRYPTO_CRYPTD is not set
1568CONFIG_CRYPTO_DES=y 1645CONFIG_CRYPTO_DES=y
1646# CONFIG_CRYPTO_FCRYPT is not set
1569CONFIG_CRYPTO_BLOWFISH=m 1647CONFIG_CRYPTO_BLOWFISH=m
1570CONFIG_CRYPTO_TWOFISH=m 1648CONFIG_CRYPTO_TWOFISH=m
1571CONFIG_CRYPTO_TWOFISH_COMMON=m 1649CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1580,6 +1658,7 @@ CONFIG_CRYPTO_ANUBIS=m
1580CONFIG_CRYPTO_DEFLATE=m 1658CONFIG_CRYPTO_DEFLATE=m
1581CONFIG_CRYPTO_MICHAEL_MIC=m 1659CONFIG_CRYPTO_MICHAEL_MIC=m
1582CONFIG_CRYPTO_CRC32C=m 1660CONFIG_CRYPTO_CRC32C=m
1661# CONFIG_CRYPTO_CAMELLIA is not set
1583CONFIG_CRYPTO_TEST=m 1662CONFIG_CRYPTO_TEST=m
1584 1663
1585# 1664#
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 3e779f07f21b..42c42ecad00c 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -12,7 +12,8 @@ endif
12 12
13obj-y := semaphore.o cputable.o ptrace.o syscalls.o \ 13obj-y := semaphore.o cputable.o ptrace.o syscalls.o \
14 irq.o align.o signal_32.o pmc.o vdso.o \ 14 irq.o align.o signal_32.o pmc.o vdso.o \
15 init_task.o process.o systbl.o idle.o 15 init_task.o process.o systbl.o idle.o \
16 signal.o
16obj-y += vdso32/ 17obj-y += vdso32/
17obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ 18obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \
18 signal_64.o ptrace32.o \ 19 signal_64.o ptrace32.o \
@@ -65,9 +66,9 @@ obj-$(CONFIG_PPC_UDBG_16550) += legacy_serial.o udbg_16550.o
65module-$(CONFIG_PPC64) += module_64.o 66module-$(CONFIG_PPC64) += module_64.o
66obj-$(CONFIG_MODULES) += $(module-y) 67obj-$(CONFIG_MODULES) += $(module-y)
67 68
68pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o 69pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o isa-bridge.o
69pci32-$(CONFIG_PPC32) := pci_32.o 70pci32-$(CONFIG_PPC32) := pci_32.o
70obj-$(CONFIG_PCI) += $(pci64-y) $(pci32-y) 71obj-$(CONFIG_PCI) += $(pci64-y) $(pci32-y) pci-common.o
71obj-$(CONFIG_PCI_MSI) += msi.o 72obj-$(CONFIG_PCI_MSI) += msi.o
72kexec-$(CONFIG_PPC64) := machine_kexec_64.o 73kexec-$(CONFIG_PPC64) := machine_kexec_64.o
73kexec-$(CONFIG_PPC32) := machine_kexec_32.o 74kexec-$(CONFIG_PPC32) := machine_kexec_32.o
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index b2b5d664d328..b1f8000952f3 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -294,6 +294,21 @@ static struct cpu_spec cpu_specs[] = {
294 .oprofile_mmcra_sipr = MMCRA_SIPR, 294 .oprofile_mmcra_sipr = MMCRA_SIPR,
295 .platform = "power5", 295 .platform = "power5",
296 }, 296 },
297 { /* Power5++ */
298 .pvr_mask = 0xffffff00,
299 .pvr_value = 0x003b0300,
300 .cpu_name = "POWER5+ (gs)",
301 .cpu_features = CPU_FTRS_POWER5,
302 .cpu_user_features = COMMON_USER_POWER5_PLUS,
303 .icache_bsize = 128,
304 .dcache_bsize = 128,
305 .num_pmcs = 6,
306 .oprofile_cpu_type = "ppc64/power5++",
307 .oprofile_type = PPC_OPROFILE_POWER4,
308 .oprofile_mmcra_sihv = MMCRA_SIHV,
309 .oprofile_mmcra_sipr = MMCRA_SIPR,
310 .platform = "power5+",
311 },
297 { /* Power5 GS */ 312 { /* Power5 GS */
298 .pvr_mask = 0xffff0000, 313 .pvr_mask = 0xffff0000,
299 .pvr_value = 0x003b0000, 314 .pvr_value = 0x003b0000,
@@ -1178,8 +1193,8 @@ static struct cpu_spec cpu_specs[] = {
1178 .platform = "ppc440", 1193 .platform = "ppc440",
1179 }, 1194 },
1180 { /* 440SP Rev. A */ 1195 { /* 440SP Rev. A */
1181 .pvr_mask = 0xff000fff, 1196 .pvr_mask = 0xfff00fff,
1182 .pvr_value = 0x53000891, 1197 .pvr_value = 0x53200891,
1183 .cpu_name = "440SP Rev. A", 1198 .cpu_name = "440SP Rev. A",
1184 .cpu_features = CPU_FTRS_44X, 1199 .cpu_features = CPU_FTRS_44X,
1185 .cpu_user_features = COMMON_USER_BOOKE, 1200 .cpu_user_features = COMMON_USER_BOOKE,
@@ -1188,9 +1203,19 @@ static struct cpu_spec cpu_specs[] = {
1188 .platform = "ppc440", 1203 .platform = "ppc440",
1189 }, 1204 },
1190 { /* 440SPe Rev. A */ 1205 { /* 440SPe Rev. A */
1191 .pvr_mask = 0xff000fff, 1206 .pvr_mask = 0xfff00fff,
1192 .pvr_value = 0x53000890, 1207 .pvr_value = 0x53400890,
1193 .cpu_name = "440SPe Rev. A", 1208 .cpu_name = "440SPe Rev. A",
1209 .cpu_features = CPU_FTRS_44X,
1210 .cpu_user_features = COMMON_USER_BOOKE,
1211 .icache_bsize = 32,
1212 .dcache_bsize = 32,
1213 .platform = "ppc440",
1214 },
1215 { /* 440SPe Rev. B */
1216 .pvr_mask = 0xfff00fff,
1217 .pvr_value = 0x53400891,
1218 .cpu_name = "440SPe Rev. B",
1194 .cpu_features = CPU_FTRS_44X, 1219 .cpu_features = CPU_FTRS_44X,
1195 .cpu_user_features = COMMON_USER_BOOKE, 1220 .cpu_user_features = COMMON_USER_BOOKE,
1196 .icache_bsize = 32, 1221 .icache_bsize = 32,
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index d3f2080d2eee..37658ea417fa 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -219,6 +219,72 @@ void crash_kexec_secondary(struct pt_regs *regs)
219 cpus_in_sr = CPU_MASK_NONE; 219 cpus_in_sr = CPU_MASK_NONE;
220} 220}
221#endif 221#endif
222#ifdef CONFIG_SPU_BASE
223
224#include <asm/spu.h>
225#include <asm/spu_priv1.h>
226
227struct crash_spu_info {
228 struct spu *spu;
229 u32 saved_spu_runcntl_RW;
230 u32 saved_spu_status_R;
231 u32 saved_spu_npc_RW;
232 u64 saved_mfc_sr1_RW;
233 u64 saved_mfc_dar;
234 u64 saved_mfc_dsisr;
235};
236
237#define CRASH_NUM_SPUS 16 /* Enough for current hardware */
238static struct crash_spu_info crash_spu_info[CRASH_NUM_SPUS];
239
240static void crash_kexec_stop_spus(void)
241{
242 struct spu *spu;
243 int i;
244 u64 tmp;
245
246 for (i = 0; i < CRASH_NUM_SPUS; i++) {
247 if (!crash_spu_info[i].spu)
248 continue;
249
250 spu = crash_spu_info[i].spu;
251
252 crash_spu_info[i].saved_spu_runcntl_RW =
253 in_be32(&spu->problem->spu_runcntl_RW);
254 crash_spu_info[i].saved_spu_status_R =
255 in_be32(&spu->problem->spu_status_R);
256 crash_spu_info[i].saved_spu_npc_RW =
257 in_be32(&spu->problem->spu_npc_RW);
258
259 crash_spu_info[i].saved_mfc_dar = spu_mfc_dar_get(spu);
260 crash_spu_info[i].saved_mfc_dsisr = spu_mfc_dsisr_get(spu);
261 tmp = spu_mfc_sr1_get(spu);
262 crash_spu_info[i].saved_mfc_sr1_RW = tmp;
263
264 tmp &= ~MFC_STATE1_MASTER_RUN_CONTROL_MASK;
265 spu_mfc_sr1_set(spu, tmp);
266
267 __delay(200);
268 }
269}
270
271void crash_register_spus(struct list_head *list)
272{
273 struct spu *spu;
274
275 list_for_each_entry(spu, list, full_list) {
276 if (WARN_ON(spu->number >= CRASH_NUM_SPUS))
277 continue;
278
279 crash_spu_info[spu->number].spu = spu;
280 }
281}
282
283#else
284static inline void crash_kexec_stop_spus(void)
285{
286}
287#endif /* CONFIG_SPU_BASE */
222 288
223void default_machine_crash_shutdown(struct pt_regs *regs) 289void default_machine_crash_shutdown(struct pt_regs *regs)
224{ 290{
@@ -254,6 +320,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
254 crash_save_cpu(regs, crashing_cpu); 320 crash_save_cpu(regs, crashing_cpu);
255 crash_kexec_prepare_cpus(crashing_cpu); 321 crash_kexec_prepare_cpus(crashing_cpu);
256 cpu_set(crashing_cpu, cpus_in_crash); 322 cpu_set(crashing_cpu, cpus_in_crash);
323 crash_kexec_stop_spus();
257 if (ppc_md.kexec_cpu_down) 324 if (ppc_md.kexec_cpu_down)
258 ppc_md.kexec_cpu_down(1, 0); 325 ppc_md.kexec_cpu_down(1, 0);
259} 326}
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index c897203198b1..7d73a13450b0 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -9,7 +9,6 @@
9 * rewritten by Paul Mackerras. 9 * rewritten by Paul Mackerras.
10 * Copyright (C) 1996 Paul Mackerras. 10 * Copyright (C) 1996 Paul Mackerras.
11 * MPC8xx modifications Copyright (C) 1997 Dan Malek (dmalek@jlc.net). 11 * MPC8xx modifications Copyright (C) 1997 Dan Malek (dmalek@jlc.net).
12 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
13 * 12 *
14 * This file contains the low-level support and setup for the 13 * This file contains the low-level support and setup for the
15 * PowerPC platform, including trap and interrupt dispatch. 14 * PowerPC platform, including trap and interrupt dispatch.
@@ -32,10 +31,6 @@
32#include <asm/ppc_asm.h> 31#include <asm/ppc_asm.h>
33#include <asm/asm-offsets.h> 32#include <asm/asm-offsets.h>
34 33
35#ifdef CONFIG_APUS
36#include <asm/amigappc.h>
37#endif
38
39/* 601 only have IBAT; cr0.eq is set on 601 when using this macro */ 34/* 601 only have IBAT; cr0.eq is set on 601 when using this macro */
40#define LOAD_BAT(n, reg, RA, RB) \ 35#define LOAD_BAT(n, reg, RA, RB) \
41 /* see the comment for clear_bats() -- Cort */ \ 36 /* see the comment for clear_bats() -- Cort */ \
@@ -92,11 +87,6 @@ _start:
92 * r4: virtual address of boot_infos_t 87 * r4: virtual address of boot_infos_t
93 * r5: 0 88 * r5: 0
94 * 89 *
95 * APUS
96 * r3: 'APUS'
97 * r4: physical address of memory base
98 * Linux/m68k style BootInfo structure at &_end.
99 *
100 * PREP 90 * PREP
101 * This is jumped to on prep systems right after the kernel is relocated 91 * This is jumped to on prep systems right after the kernel is relocated
102 * to its proper place in memory by the boot loader. The expected layout 92 * to its proper place in memory by the boot loader. The expected layout
@@ -150,14 +140,6 @@ __start:
150 */ 140 */
151 bl early_init 141 bl early_init
152 142
153#ifdef CONFIG_APUS
154/* On APUS the __va/__pa constants need to be set to the correct
155 * values before continuing.
156 */
157 mr r4,r30
158 bl fix_mem_constants
159#endif /* CONFIG_APUS */
160
161/* Switch MMU off, clear BATs and flush TLB. At this point, r3 contains 143/* Switch MMU off, clear BATs and flush TLB. At this point, r3 contains
162 * the physical address we are running at, returned by early_init() 144 * the physical address we are running at, returned by early_init()
163 */ 145 */
@@ -167,7 +149,7 @@ __after_mmu_off:
167 bl flush_tlbs 149 bl flush_tlbs
168 150
169 bl initial_bats 151 bl initial_bats
170#if !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) 152#if defined(CONFIG_BOOTX_TEXT)
171 bl setup_disp_bat 153 bl setup_disp_bat
172#endif 154#endif
173 155
@@ -183,7 +165,6 @@ __after_mmu_off:
183#endif /* CONFIG_6xx */ 165#endif /* CONFIG_6xx */
184 166
185 167
186#ifndef CONFIG_APUS
187/* 168/*
188 * We need to run with _start at physical address 0. 169 * We need to run with _start at physical address 0.
189 * On CHRP, we are loaded at 0x10000 since OF on CHRP uses 170 * On CHRP, we are loaded at 0x10000 since OF on CHRP uses
@@ -196,7 +177,6 @@ __after_mmu_off:
196 addis r4,r3,KERNELBASE@h /* current address of _start */ 177 addis r4,r3,KERNELBASE@h /* current address of _start */
197 cmpwi 0,r4,0 /* are we already running at 0? */ 178 cmpwi 0,r4,0 /* are we already running at 0? */
198 bne relocate_kernel 179 bne relocate_kernel
199#endif /* CONFIG_APUS */
200/* 180/*
201 * we now have the 1st 16M of ram mapped with the bats. 181 * we now have the 1st 16M of ram mapped with the bats.
202 * prep needs the mmu to be turned on here, but pmac already has it on. 182 * prep needs the mmu to be turned on here, but pmac already has it on.
@@ -881,85 +861,6 @@ _GLOBAL(copy_and_flush)
881 addi r6,r6,4 861 addi r6,r6,4
882 blr 862 blr
883 863
884#ifdef CONFIG_APUS
885/*
886 * On APUS the physical base address of the kernel is not known at compile
887 * time, which means the __pa/__va constants used are incorrect. In the
888 * __init section is recorded the virtual addresses of instructions using
889 * these constants, so all that has to be done is fix these before
890 * continuing the kernel boot.
891 *
892 * r4 = The physical address of the kernel base.
893 */
894fix_mem_constants:
895 mr r10,r4
896 addis r10,r10,-KERNELBASE@h /* virt_to_phys constant */
897 neg r11,r10 /* phys_to_virt constant */
898
899 lis r12,__vtop_table_begin@h
900 ori r12,r12,__vtop_table_begin@l
901 add r12,r12,r10 /* table begin phys address */
902 lis r13,__vtop_table_end@h
903 ori r13,r13,__vtop_table_end@l
904 add r13,r13,r10 /* table end phys address */
905 subi r12,r12,4
906 subi r13,r13,4
9071: lwzu r14,4(r12) /* virt address of instruction */
908 add r14,r14,r10 /* phys address of instruction */
909 lwz r15,0(r14) /* instruction, now insert top */
910 rlwimi r15,r10,16,16,31 /* half of vp const in low half */
911 stw r15,0(r14) /* of instruction and restore. */
912 dcbst r0,r14 /* write it to memory */
913 sync
914 icbi r0,r14 /* flush the icache line */
915 cmpw r12,r13
916 bne 1b
917 sync /* additional sync needed on g4 */
918 isync
919
920/*
921 * Map the memory where the exception handlers will
922 * be copied to when hash constants have been patched.
923 */
924#ifdef CONFIG_APUS_FAST_EXCEPT
925 lis r8,0xfff0
926#else
927 lis r8,0
928#endif
929 ori r8,r8,0x2 /* 128KB, supervisor */
930 mtspr SPRN_DBAT3U,r8
931 mtspr SPRN_DBAT3L,r8
932
933 lis r12,__ptov_table_begin@h
934 ori r12,r12,__ptov_table_begin@l
935 add r12,r12,r10 /* table begin phys address */
936 lis r13,__ptov_table_end@h
937 ori r13,r13,__ptov_table_end@l
938 add r13,r13,r10 /* table end phys address */
939 subi r12,r12,4
940 subi r13,r13,4
9411: lwzu r14,4(r12) /* virt address of instruction */
942 add r14,r14,r10 /* phys address of instruction */
943 lwz r15,0(r14) /* instruction, now insert top */
944 rlwimi r15,r11,16,16,31 /* half of pv const in low half*/
945 stw r15,0(r14) /* of instruction and restore. */
946 dcbst r0,r14 /* write it to memory */
947 sync
948 icbi r0,r14 /* flush the icache line */
949 cmpw r12,r13
950 bne 1b
951
952 sync /* additional sync needed on g4 */
953 isync /* No speculative loading until now */
954 blr
955
956/***********************************************************************
957 * Please note that on APUS the exception handlers are located at the
958 * physical address 0xfff0000. For this reason, the exception handlers
959 * cannot use relative branches to access the code below.
960 ***********************************************************************/
961#endif /* CONFIG_APUS */
962
963#ifdef CONFIG_SMP 864#ifdef CONFIG_SMP
964#ifdef CONFIG_GEMINI 865#ifdef CONFIG_GEMINI
965 .globl __secondary_start_gemini 866 .globl __secondary_start_gemini
@@ -1135,19 +1036,6 @@ start_here:
1135 bl __save_cpu_setup 1036 bl __save_cpu_setup
1136 bl MMU_init 1037 bl MMU_init
1137 1038
1138#ifdef CONFIG_APUS
1139 /* Copy exception code to exception vector base on APUS. */
1140 lis r4,KERNELBASE@h
1141#ifdef CONFIG_APUS_FAST_EXCEPT
1142 lis r3,0xfff0 /* Copy to 0xfff00000 */
1143#else
1144 lis r3,0 /* Copy to 0x00000000 */
1145#endif
1146 li r5,0x4000 /* # bytes of memory to copy */
1147 li r6,0
1148 bl copy_and_flush /* copy the first 0x4000 bytes */
1149#endif /* CONFIG_APUS */
1150
1151/* 1039/*
1152 * Go back to running unmapped so we can load up new values 1040 * Go back to running unmapped so we can load up new values
1153 * for SDR1 (hash table pointer) and the segment registers 1041 * for SDR1 (hash table pointer) and the segment registers
@@ -1324,11 +1212,7 @@ initial_bats:
1324#else 1212#else
1325 ori r8,r8,2 /* R/W access */ 1213 ori r8,r8,2 /* R/W access */
1326#endif /* CONFIG_SMP */ 1214#endif /* CONFIG_SMP */
1327#ifdef CONFIG_APUS
1328 ori r11,r11,BL_8M<<2|0x2 /* set up 8MB BAT registers for 604 */
1329#else
1330 ori r11,r11,BL_256M<<2|0x2 /* set up BAT registers for 604 */ 1215 ori r11,r11,BL_256M<<2|0x2 /* set up BAT registers for 604 */
1331#endif /* CONFIG_APUS */
1332 1216
1333 mtspr SPRN_DBAT0L,r8 /* N.B. 6xx (not 601) have valid */ 1217 mtspr SPRN_DBAT0L,r8 /* N.B. 6xx (not 601) have valid */
1334 mtspr SPRN_DBAT0U,r11 /* bit in upper BAT register */ 1218 mtspr SPRN_DBAT0U,r11 /* bit in upper BAT register */
@@ -1338,7 +1222,7 @@ initial_bats:
1338 blr 1222 blr
1339 1223
1340 1224
1341#if !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) 1225#ifdef CONFIG_BOOTX_TEXT
1342setup_disp_bat: 1226setup_disp_bat:
1343 /* 1227 /*
1344 * setup the display bat prepared for us in prom.c 1228 * setup the display bat prepared for us in prom.c
@@ -1362,7 +1246,7 @@ setup_disp_bat:
13621: mtspr SPRN_IBAT3L,r8 12461: mtspr SPRN_IBAT3L,r8
1363 mtspr SPRN_IBAT3U,r11 1247 mtspr SPRN_IBAT3U,r11
1364 blr 1248 blr
1365#endif /* !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) */ 1249#endif /* CONFIG_BOOTX_TEXT */
1366 1250
1367#ifdef CONFIG_8260 1251#ifdef CONFIG_8260
1368/* Jump into the system reset for the rom. 1252/* Jump into the system reset for the rom.
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 1111fcec7673..8cdd48ea4391 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -103,8 +103,8 @@ __secondary_hold_acknowledge:
103 103
104 . = 0x60 104 . = 0x60
105/* 105/*
106 * The following code is used on pSeries to hold secondary processors 106 * The following code is used to hold secondary processors
107 * in a spin loop after they have been freed from OpenFirmware, but 107 * in a spin loop after they have entered the kernel, but
108 * before the bulk of the kernel has been relocated. This code 108 * before the bulk of the kernel has been relocated. This code
109 * is relocated to physical address 0x60 before prom_init is run. 109 * is relocated to physical address 0x60 before prom_init is run.
110 * All of it must fit below the first exception vector at 0x100. 110 * All of it must fit below the first exception vector at 0x100.
diff --git a/arch/powerpc/kernel/io.c b/arch/powerpc/kernel/io.c
index 34ae11494ddc..e31aca9208eb 100644
--- a/arch/powerpc/kernel/io.c
+++ b/arch/powerpc/kernel/io.c
@@ -35,7 +35,7 @@ void _insb(const volatile u8 __iomem *port, void *buf, long count)
35 asm volatile("sync"); 35 asm volatile("sync");
36 do { 36 do {
37 tmp = *port; 37 tmp = *port;
38 asm volatile("eieio"); 38 eieio();
39 *tbuf++ = tmp; 39 *tbuf++ = tmp;
40 } while (--count != 0); 40 } while (--count != 0);
41 asm volatile("twi 0,%0,0; isync" : : "r" (tmp)); 41 asm volatile("twi 0,%0,0; isync" : : "r" (tmp));
@@ -66,7 +66,7 @@ void _insw_ns(const volatile u16 __iomem *port, void *buf, long count)
66 asm volatile("sync"); 66 asm volatile("sync");
67 do { 67 do {
68 tmp = *port; 68 tmp = *port;
69 asm volatile("eieio"); 69 eieio();
70 *tbuf++ = tmp; 70 *tbuf++ = tmp;
71 } while (--count != 0); 71 } while (--count != 0);
72 asm volatile("twi 0,%0,0; isync" : : "r" (tmp)); 72 asm volatile("twi 0,%0,0; isync" : : "r" (tmp));
@@ -97,7 +97,7 @@ void _insl_ns(const volatile u32 __iomem *port, void *buf, long count)
97 asm volatile("sync"); 97 asm volatile("sync");
98 do { 98 do {
99 tmp = *port; 99 tmp = *port;
100 asm volatile("eieio"); 100 eieio();
101 *tbuf++ = tmp; 101 *tbuf++ = tmp;
102 } while (--count != 0); 102 } while (--count != 0);
103 asm volatile("twi 0,%0,0; isync" : : "r" (tmp)); 103 asm volatile("twi 0,%0,0; isync" : : "r" (tmp));
@@ -155,21 +155,21 @@ void _memcpy_fromio(void *dest, const volatile void __iomem *src,
155 __asm__ __volatile__ ("sync" : : : "memory"); 155 __asm__ __volatile__ ("sync" : : : "memory");
156 while(n && (!IO_CHECK_ALIGN(vsrc, 4) || !IO_CHECK_ALIGN(dest, 4))) { 156 while(n && (!IO_CHECK_ALIGN(vsrc, 4) || !IO_CHECK_ALIGN(dest, 4))) {
157 *((u8 *)dest) = *((volatile u8 *)vsrc); 157 *((u8 *)dest) = *((volatile u8 *)vsrc);
158 __asm__ __volatile__ ("eieio" : : : "memory"); 158 eieio();
159 vsrc++; 159 vsrc++;
160 dest++; 160 dest++;
161 n--; 161 n--;
162 } 162 }
163 while(n > 4) { 163 while(n > 4) {
164 *((u32 *)dest) = *((volatile u32 *)vsrc); 164 *((u32 *)dest) = *((volatile u32 *)vsrc);
165 __asm__ __volatile__ ("eieio" : : : "memory"); 165 eieio();
166 vsrc += 4; 166 vsrc += 4;
167 dest += 4; 167 dest += 4;
168 n -= 4; 168 n -= 4;
169 } 169 }
170 while(n) { 170 while(n) {
171 *((u8 *)dest) = *((volatile u8 *)vsrc); 171 *((u8 *)dest) = *((volatile u8 *)vsrc);
172 __asm__ __volatile__ ("eieio" : : : "memory"); 172 eieio();
173 vsrc++; 173 vsrc++;
174 dest++; 174 dest++;
175 n--; 175 n--;
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 068377a2a8dc..2fc87862146c 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -7,7 +7,6 @@
7 * Copyright (C) 1996-2001 Cort Dougan 7 * Copyright (C) 1996-2001 Cort Dougan
8 * Adapted for Power Macintosh by Paul Mackerras 8 * Adapted for Power Macintosh by Paul Mackerras
9 * Copyright (C) 1996 Paul Mackerras (paulus@cs.anu.edu.au) 9 * Copyright (C) 1996 Paul Mackerras (paulus@cs.anu.edu.au)
10 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
11 * 10 *
12 * This program is free software; you can redistribute it and/or 11 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License 12 * modify it under the terms of the GNU General Public License
@@ -337,7 +336,8 @@ void do_IRQ(struct pt_regs *regs)
337 336
338void __init init_IRQ(void) 337void __init init_IRQ(void)
339{ 338{
340 ppc_md.init_IRQ(); 339 if (ppc_md.init_IRQ)
340 ppc_md.init_IRQ();
341#ifdef CONFIG_PPC64 341#ifdef CONFIG_PPC64
342 irq_ctx_init(); 342 irq_ctx_init();
343#endif 343#endif
@@ -412,6 +412,12 @@ struct irq_map_entry irq_map[NR_IRQS];
412static unsigned int irq_virq_count = NR_IRQS; 412static unsigned int irq_virq_count = NR_IRQS;
413static struct irq_host *irq_default_host; 413static struct irq_host *irq_default_host;
414 414
415irq_hw_number_t virq_to_hw(unsigned int virq)
416{
417 return irq_map[virq].hwirq;
418}
419EXPORT_SYMBOL_GPL(virq_to_hw);
420
415struct irq_host *irq_alloc_host(unsigned int revmap_type, 421struct irq_host *irq_alloc_host(unsigned int revmap_type,
416 unsigned int revmap_arg, 422 unsigned int revmap_arg,
417 struct irq_host_ops *ops, 423 struct irq_host_ops *ops,
@@ -489,7 +495,7 @@ struct irq_host *irq_alloc_host(unsigned int revmap_type,
489 case IRQ_HOST_MAP_LINEAR: 495 case IRQ_HOST_MAP_LINEAR:
490 rmap = (unsigned int *)(host + 1); 496 rmap = (unsigned int *)(host + 1);
491 for (i = 0; i < revmap_arg; i++) 497 for (i = 0; i < revmap_arg; i++)
492 rmap[i] = IRQ_NONE; 498 rmap[i] = NO_IRQ;
493 host->revmap_data.linear.size = revmap_arg; 499 host->revmap_data.linear.size = revmap_arg;
494 smp_wmb(); 500 smp_wmb();
495 host->revmap_data.linear.revmap = rmap; 501 host->revmap_data.linear.revmap = rmap;
@@ -591,6 +597,49 @@ static void irq_radix_rdunlock(unsigned long flags)
591 local_irq_restore(flags); 597 local_irq_restore(flags);
592} 598}
593 599
600static int irq_setup_virq(struct irq_host *host, unsigned int virq,
601 irq_hw_number_t hwirq)
602{
603 /* Clear IRQ_NOREQUEST flag */
604 get_irq_desc(virq)->status &= ~IRQ_NOREQUEST;
605
606 /* map it */
607 smp_wmb();
608 irq_map[virq].hwirq = hwirq;
609 smp_mb();
610
611 if (host->ops->map(host, virq, hwirq)) {
612 pr_debug("irq: -> mapping failed, freeing\n");
613 irq_free_virt(virq, 1);
614 return -1;
615 }
616
617 return 0;
618}
619
620unsigned int irq_create_direct_mapping(struct irq_host *host)
621{
622 unsigned int virq;
623
624 if (host == NULL)
625 host = irq_default_host;
626
627 BUG_ON(host == NULL);
628 WARN_ON(host->revmap_type != IRQ_HOST_MAP_NOMAP);
629
630 virq = irq_alloc_virt(host, 1, 0);
631 if (virq == NO_IRQ) {
632 pr_debug("irq: create_direct virq allocation failed\n");
633 return NO_IRQ;
634 }
635
636 pr_debug("irq: create_direct obtained virq %d\n", virq);
637
638 if (irq_setup_virq(host, virq, virq))
639 return NO_IRQ;
640
641 return virq;
642}
594 643
595unsigned int irq_create_mapping(struct irq_host *host, 644unsigned int irq_create_mapping(struct irq_host *host,
596 irq_hw_number_t hwirq) 645 irq_hw_number_t hwirq)
@@ -614,7 +663,7 @@ unsigned int irq_create_mapping(struct irq_host *host,
614 * host->ops->map() to update the flags 663 * host->ops->map() to update the flags
615 */ 664 */
616 virq = irq_find_mapping(host, hwirq); 665 virq = irq_find_mapping(host, hwirq);
617 if (virq != IRQ_NONE) { 666 if (virq != NO_IRQ) {
618 if (host->ops->remap) 667 if (host->ops->remap)
619 host->ops->remap(host, virq, hwirq); 668 host->ops->remap(host, virq, hwirq);
620 pr_debug("irq: -> existing mapping on virq %d\n", virq); 669 pr_debug("irq: -> existing mapping on virq %d\n", virq);
@@ -639,18 +688,9 @@ unsigned int irq_create_mapping(struct irq_host *host,
639 } 688 }
640 pr_debug("irq: -> obtained virq %d\n", virq); 689 pr_debug("irq: -> obtained virq %d\n", virq);
641 690
642 /* Clear IRQ_NOREQUEST flag */ 691 if (irq_setup_virq(host, virq, hwirq))
643 get_irq_desc(virq)->status &= ~IRQ_NOREQUEST;
644
645 /* map it */
646 smp_wmb();
647 irq_map[virq].hwirq = hwirq;
648 smp_mb();
649 if (host->ops->map(host, virq, hwirq)) {
650 pr_debug("irq: -> mapping failed, freeing\n");
651 irq_free_virt(virq, 1);
652 return NO_IRQ; 692 return NO_IRQ;
653 } 693
654 return virq; 694 return virq;
655} 695}
656EXPORT_SYMBOL_GPL(irq_create_mapping); 696EXPORT_SYMBOL_GPL(irq_create_mapping);
@@ -741,7 +781,7 @@ void irq_dispose_mapping(unsigned int virq)
741 switch(host->revmap_type) { 781 switch(host->revmap_type) {
742 case IRQ_HOST_MAP_LINEAR: 782 case IRQ_HOST_MAP_LINEAR:
743 if (hwirq < host->revmap_data.linear.size) 783 if (hwirq < host->revmap_data.linear.size)
744 host->revmap_data.linear.revmap[hwirq] = IRQ_NONE; 784 host->revmap_data.linear.revmap[hwirq] = NO_IRQ;
745 break; 785 break;
746 case IRQ_HOST_MAP_TREE: 786 case IRQ_HOST_MAP_TREE:
747 /* Check if radix tree allocated yet */ 787 /* Check if radix tree allocated yet */
diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c
new file mode 100644
index 000000000000..f0f49d1be3d5
--- /dev/null
+++ b/arch/powerpc/kernel/isa-bridge.c
@@ -0,0 +1,271 @@
1/*
2 * Routines for tracking a legacy ISA bridge
3 *
4 * Copyrigh 2007 Benjamin Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
5 *
6 * Some bits and pieces moved over from pci_64.c
7 *
8 * Copyrigh 2003 Anton Blanchard <anton@au.ibm.com>, IBM Corp.
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version
13 * 2 of the License, or (at your option) any later version.
14 */
15
16#define DEBUG
17
18#include <linux/kernel.h>
19#include <linux/pci.h>
20#include <linux/string.h>
21#include <linux/init.h>
22#include <linux/mm.h>
23#include <linux/notifier.h>
24
25#include <asm/processor.h>
26#include <asm/io.h>
27#include <asm/prom.h>
28#include <asm/pci-bridge.h>
29#include <asm/machdep.h>
30#include <asm/ppc-pci.h>
31#include <asm/firmware.h>
32
33unsigned long isa_io_base; /* NULL if no ISA bus */
34EXPORT_SYMBOL(isa_io_base);
35
36/* Cached ISA bridge dev. */
37static struct device_node *isa_bridge_devnode;
38struct pci_dev *isa_bridge_pcidev;
39EXPORT_SYMBOL_GPL(isa_bridge_pcidev);
40
41#define ISA_SPACE_MASK 0x1
42#define ISA_SPACE_IO 0x1
43
44static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
45 unsigned long phb_io_base_phys)
46{
47 /* We should get some saner parsing here and remove these structs */
48 struct pci_address {
49 u32 a_hi;
50 u32 a_mid;
51 u32 a_lo;
52 };
53
54 struct isa_address {
55 u32 a_hi;
56 u32 a_lo;
57 };
58
59 struct isa_range {
60 struct isa_address isa_addr;
61 struct pci_address pci_addr;
62 unsigned int size;
63 };
64
65 const struct isa_range *range;
66 unsigned long pci_addr;
67 unsigned int isa_addr;
68 unsigned int size;
69 int rlen = 0;
70
71 range = of_get_property(isa_node, "ranges", &rlen);
72 if (range == NULL || (rlen < sizeof(struct isa_range)))
73 goto inval_range;
74
75 /* From "ISA Binding to 1275"
76 * The ranges property is laid out as an array of elements,
77 * each of which comprises:
78 * cells 0 - 1: an ISA address
79 * cells 2 - 4: a PCI address
80 * (size depending on dev->n_addr_cells)
81 * cell 5: the size of the range
82 */
83 if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) {
84 range++;
85 rlen -= sizeof(struct isa_range);
86 if (rlen < sizeof(struct isa_range))
87 goto inval_range;
88 }
89 if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO)
90 goto inval_range;
91
92 isa_addr = range->isa_addr.a_lo;
93 pci_addr = (unsigned long) range->pci_addr.a_mid << 32 |
94 range->pci_addr.a_lo;
95
96 /* Assume these are both zero. Note: We could fix that and
97 * do a proper parsing instead ... oh well, that will do for
98 * now as nobody uses fancy mappings for ISA bridges
99 */
100 if ((pci_addr != 0) || (isa_addr != 0)) {
101 printk(KERN_ERR "unexpected isa to pci mapping: %s\n",
102 __FUNCTION__);
103 return;
104 }
105
106 /* Align size and make sure it's cropped to 64K */
107 size = PAGE_ALIGN(range->size);
108 if (size > 0x10000)
109 size = 0x10000;
110
111 printk(KERN_ERR "no ISA IO ranges or unexpected isa range,"
112 "mapping 64k\n");
113
114 __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE,
115 size, _PAGE_NO_CACHE|_PAGE_GUARDED);
116 return;
117
118inval_range:
119 printk(KERN_ERR "no ISA IO ranges or unexpected isa range,"
120 "mapping 64k\n");
121 __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE,
122 0x10000, _PAGE_NO_CACHE|_PAGE_GUARDED);
123}
124
125
126/**
127 * isa_bridge_find_early - Find and map the ISA IO space early before
128 * main PCI discovery. This is optionally called by
129 * the arch code when adding PCI PHBs to get early
130 * access to ISA IO ports
131 */
132void __init isa_bridge_find_early(struct pci_controller *hose)
133{
134 struct device_node *np, *parent = NULL, *tmp;
135
136 /* If we already have an ISA bridge, bail off */
137 if (isa_bridge_devnode != NULL)
138 return;
139
140 /* For each "isa" node in the system. Note : we do a search by
141 * type and not by name. It might be better to do by name but that's
142 * what the code used to do and I don't want to break too much at
143 * once. We can look into changing that separately
144 */
145 for_each_node_by_type(np, "isa") {
146 /* Look for our hose being a parent */
147 for (parent = of_get_parent(np); parent;) {
148 if (parent == hose->arch_data) {
149 of_node_put(parent);
150 break;
151 }
152 tmp = parent;
153 parent = of_get_parent(parent);
154 of_node_put(tmp);
155 }
156 if (parent != NULL)
157 break;
158 }
159 if (np == NULL)
160 return;
161 isa_bridge_devnode = np;
162
163 /* Now parse the "ranges" property and setup the ISA mapping */
164 pci_process_ISA_OF_ranges(np, hose->io_base_phys);
165
166 /* Set the global ISA io base to indicate we have an ISA bridge */
167 isa_io_base = ISA_IO_BASE;
168
169 pr_debug("ISA bridge (early) is %s\n", np->full_name);
170}
171
172/**
173 * isa_bridge_find_late - Find and map the ISA IO space upon discovery of
174 * a new ISA bridge
175 */
176static void __devinit isa_bridge_find_late(struct pci_dev *pdev,
177 struct device_node *devnode)
178{
179 struct pci_controller *hose = pci_bus_to_host(pdev->bus);
180
181 /* Store ISA device node and PCI device */
182 isa_bridge_devnode = of_node_get(devnode);
183 isa_bridge_pcidev = pdev;
184
185 /* Now parse the "ranges" property and setup the ISA mapping */
186 pci_process_ISA_OF_ranges(devnode, hose->io_base_phys);
187
188 /* Set the global ISA io base to indicate we have an ISA bridge */
189 isa_io_base = ISA_IO_BASE;
190
191 pr_debug("ISA bridge (late) is %s on %s\n",
192 devnode->full_name, pci_name(pdev));
193}
194
195/**
196 * isa_bridge_remove - Remove/unmap an ISA bridge
197 */
198static void isa_bridge_remove(void)
199{
200 pr_debug("ISA bridge removed !\n");
201
202 /* Clear the global ISA io base to indicate that we have no more
203 * ISA bridge. Note that drivers don't quite handle that, though
204 * we should probably do something about it. But do we ever really
205 * have ISA bridges being removed on machines using legacy devices ?
206 */
207 isa_io_base = ISA_IO_BASE;
208
209 /* Clear references to the bridge */
210 of_node_put(isa_bridge_devnode);
211 isa_bridge_devnode = NULL;
212 isa_bridge_pcidev = NULL;
213
214 /* Unmap the ISA area */
215 __iounmap_at((void *)ISA_IO_BASE, 0x10000);
216}
217
218/**
219 * isa_bridge_notify - Get notified of PCI devices addition/removal
220 */
221static int __devinit isa_bridge_notify(struct notifier_block *nb,
222 unsigned long action, void *data)
223{
224 struct device *dev = data;
225 struct pci_dev *pdev = to_pci_dev(dev);
226 struct device_node *devnode = pci_device_to_OF_node(pdev);
227
228 switch(action) {
229 case BUS_NOTIFY_ADD_DEVICE:
230 /* Check if we have an early ISA device, without PCI dev */
231 if (isa_bridge_devnode && isa_bridge_devnode == devnode &&
232 !isa_bridge_pcidev) {
233 pr_debug("ISA bridge PCI attached: %s\n",
234 pci_name(pdev));
235 isa_bridge_pcidev = pdev;
236 }
237
238 /* Check if we have no ISA device, and this happens to be one,
239 * register it as such if it has an OF device
240 */
241 if (!isa_bridge_devnode && devnode && devnode->type &&
242 !strcmp(devnode->type, "isa"))
243 isa_bridge_find_late(pdev, devnode);
244
245 return 0;
246 case BUS_NOTIFY_DEL_DEVICE:
247 /* Check if this our existing ISA device */
248 if (pdev == isa_bridge_pcidev ||
249 (devnode && devnode == isa_bridge_devnode))
250 isa_bridge_remove();
251 return 0;
252 }
253 return 0;
254}
255
256static struct notifier_block isa_bridge_notifier = {
257 .notifier_call = isa_bridge_notify
258};
259
260/**
261 * isa_bridge_init - register to be notified of ISA bridge addition/removal
262 *
263 */
264static int __init isa_bridge_init(void)
265{
266 if (firmware_has_feature(FW_FEATURE_ISERIES))
267 return 0;
268 bus_register_notifier(&pci_bus_type, &isa_bridge_notifier);
269 return 0;
270}
271arch_initcall(isa_bridge_init);
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index 0c96611f02f4..440f5a87271f 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -492,6 +492,13 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
492 return ret; 492 return ret;
493} 493}
494 494
495#ifdef CONFIG_PPC64
496unsigned long arch_deref_entry_point(void *entry)
497{
498 return (unsigned long)(((func_descr_t *)entry)->entry);
499}
500#endif
501
495int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) 502int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
496{ 503{
497 struct jprobe *jp = container_of(p, struct jprobe, kp); 504 struct jprobe *jp = container_of(p, struct jprobe, kp);
@@ -500,11 +507,9 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
500 memcpy(&kcb->jprobe_saved_regs, regs, sizeof(struct pt_regs)); 507 memcpy(&kcb->jprobe_saved_regs, regs, sizeof(struct pt_regs));
501 508
502 /* setup return addr to the jprobe handler routine */ 509 /* setup return addr to the jprobe handler routine */
510 regs->nip = arch_deref_entry_point(jp->entry);
503#ifdef CONFIG_PPC64 511#ifdef CONFIG_PPC64
504 regs->nip = (unsigned long)(((func_descr_t *)jp->entry)->entry);
505 regs->gpr[2] = (unsigned long)(((func_descr_t *)jp->entry)->toc); 512 regs->gpr[2] = (unsigned long)(((func_descr_t *)jp->entry)->toc);
506#else
507 regs->nip = (unsigned long)jp->entry;
508#endif 513#endif
509 514
510 return 1; 515 return 1;
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index c492cee90e0f..6444eaa30a2f 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -248,7 +248,7 @@ static void parse_system_parameter_string(struct seq_file *m)
248 } else { 248 } else {
249 int splpar_strlen; 249 int splpar_strlen;
250 int idx, w_idx; 250 int idx, w_idx;
251 char *workbuffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL); 251 char *workbuffer = kzalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
252 if (!workbuffer) { 252 if (!workbuffer) {
253 printk(KERN_ERR "%s %s kmalloc failure at line %d \n", 253 printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
254 __FILE__, __FUNCTION__, __LINE__); 254 __FILE__, __FUNCTION__, __LINE__);
@@ -261,7 +261,6 @@ static void parse_system_parameter_string(struct seq_file *m)
261 splpar_strlen = local_buffer[0] * 256 + local_buffer[1]; 261 splpar_strlen = local_buffer[0] * 256 + local_buffer[1];
262 local_buffer += 2; /* step over strlen value */ 262 local_buffer += 2; /* step over strlen value */
263 263
264 memset(workbuffer, 0, SPLPAR_MAXLENGTH);
265 w_idx = 0; 264 w_idx = 0;
266 idx = 0; 265 idx = 0;
267 while ((*local_buffer) && (idx < splpar_strlen)) { 266 while ((*local_buffer) && (idx < splpar_strlen)) {
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index 98decf8ebff4..e708ab7ca9e8 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -392,7 +392,7 @@ BEGIN_FTR_SECTION
392 mtspr SPRN_L1CSR0,r3 392 mtspr SPRN_L1CSR0,r3
393 isync 393 isync
394 blr 394 blr
395END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 395END_FTR_SECTION_IFSET(CPU_FTR_UNIFIED_ID_CACHE)
396 mfspr r3,SPRN_L1CSR1 396 mfspr r3,SPRN_L1CSR1
397 ori r3,r3,L1CSR1_ICFI|L1CSR1_ICLFR 397 ori r3,r3,L1CSR1_ICFI|L1CSR1_ICLFR
398 mtspr SPRN_L1CSR1,r3 398 mtspr SPRN_L1CSR1,r3
@@ -419,7 +419,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)
419_GLOBAL(__flush_icache_range) 419_GLOBAL(__flush_icache_range)
420BEGIN_FTR_SECTION 420BEGIN_FTR_SECTION
421 blr /* for 601, do nothing */ 421 blr /* for 601, do nothing */
422END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 422END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
423 li r5,L1_CACHE_BYTES-1 423 li r5,L1_CACHE_BYTES-1
424 andc r3,r3,r5 424 andc r3,r3,r5
425 subf r4,r3,r4 425 subf r4,r3,r4
@@ -514,8 +514,8 @@ _GLOBAL(invalidate_dcache_range)
514 */ 514 */
515_GLOBAL(__flush_dcache_icache) 515_GLOBAL(__flush_dcache_icache)
516BEGIN_FTR_SECTION 516BEGIN_FTR_SECTION
517 blr /* for 601, do nothing */ 517 blr
518END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 518END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
519 rlwinm r3,r3,0,0,19 /* Get page base address */ 519 rlwinm r3,r3,0,0,19 /* Get page base address */
520 li r4,4096/L1_CACHE_BYTES /* Number of lines in a page */ 520 li r4,4096/L1_CACHE_BYTES /* Number of lines in a page */
521 mtctr r4 521 mtctr r4
@@ -543,7 +543,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)
543_GLOBAL(__flush_dcache_icache_phys) 543_GLOBAL(__flush_dcache_icache_phys)
544BEGIN_FTR_SECTION 544BEGIN_FTR_SECTION
545 blr /* for 601, do nothing */ 545 blr /* for 601, do nothing */
546END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 546END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
547 mfmsr r10 547 mfmsr r10
548 rlwinm r0,r10,0,28,26 /* clear DR */ 548 rlwinm r0,r10,0,28,26 /* clear DR */
549 mtmsr r0 549 mtmsr r0
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index 519861da0423..bbb3ba54c51c 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -646,6 +646,19 @@ _GLOBAL(kexec_sequence)
646 /* turn off mmu */ 646 /* turn off mmu */
647 bl real_mode 647 bl real_mode
648 648
649 /* copy 0x100 bytes starting at start to 0 */
650 li r3,0
651 mr r4,r30 /* start, aka phys mem offset */
652 li r5,0x100
653 li r6,0
654 bl .copy_and_flush /* (dest, src, copy limit, start offset) */
6551: /* assume normal blr return */
656
657 /* release other cpus to the new kernel secondary start at 0x60 */
658 mflr r5
659 li r6,1
660 stw r6,kexec_flag-1b(5)
661
649 /* clear out hardware hash page table and tlb */ 662 /* clear out hardware hash page table and tlb */
650 ld r5,0(r27) /* deref function descriptor */ 663 ld r5,0(r27) /* deref function descriptor */
651 mtctr r5 664 mtctr r5
@@ -676,19 +689,6 @@ _GLOBAL(kexec_sequence)
676 * are the boot cpu ????? 689 * are the boot cpu ?????
677 * other device tree differences (prop sizes, va vs pa, etc)... 690 * other device tree differences (prop sizes, va vs pa, etc)...
678 */ 691 */
679
680 /* copy 0x100 bytes starting at start to 0 */
681 li r3,0
682 mr r4,r30
683 li r5,0x100
684 li r6,0
685 bl .copy_and_flush /* (dest, src, copy limit, start offset) */
6861: /* assume normal blr return */
687
688 /* release other cpus to the new kernel secondary start at 0x60 */
689 mflr r5
690 li r6,1
691 stw r6,kexec_flag-1b(5)
692 mr r3,r25 # my phys cpu 692 mr r3,r25 # my phys cpu
693 mr r4,r30 # start, aka phys mem offset 693 mr r4,r30 # start, aka phys mem offset
694 mtlr 4 694 mtlr 4
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index a464d67248df..89b911e83c04 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -1,5 +1,6 @@
1#include <linux/string.h> 1#include <linux/string.h>
2#include <linux/kernel.h> 2#include <linux/kernel.h>
3#include <linux/of.h>
3#include <linux/init.h> 4#include <linux/init.h>
4#include <linux/module.h> 5#include <linux/module.h>
5#include <linux/mod_devicetable.h> 6#include <linux/mod_devicetable.h>
@@ -8,118 +9,6 @@
8#include <asm/errno.h> 9#include <asm/errno.h>
9#include <asm/of_device.h> 10#include <asm/of_device.h>
10 11
11/**
12 * of_match_node - Tell if an device_node has a matching of_match structure
13 * @ids: array of of device match structures to search in
14 * @node: the of device structure to match against
15 *
16 * Low level utility function used by device matching.
17 */
18const struct of_device_id *of_match_node(const struct of_device_id *matches,
19 const struct device_node *node)
20{
21 while (matches->name[0] || matches->type[0] || matches->compatible[0]) {
22 int match = 1;
23 if (matches->name[0])
24 match &= node->name
25 && !strcmp(matches->name, node->name);
26 if (matches->type[0])
27 match &= node->type
28 && !strcmp(matches->type, node->type);
29 if (matches->compatible[0])
30 match &= of_device_is_compatible(node,
31 matches->compatible);
32 if (match)
33 return matches;
34 matches++;
35 }
36 return NULL;
37}
38
39/**
40 * of_match_device - Tell if an of_device structure has a matching
41 * of_match structure
42 * @ids: array of of device match structures to search in
43 * @dev: the of device structure to match against
44 *
45 * Used by a driver to check whether an of_device present in the
46 * system is in its list of supported devices.
47 */
48const struct of_device_id *of_match_device(const struct of_device_id *matches,
49 const struct of_device *dev)
50{
51 if (!dev->node)
52 return NULL;
53 return of_match_node(matches, dev->node);
54}
55
56struct of_device *of_dev_get(struct of_device *dev)
57{
58 struct device *tmp;
59
60 if (!dev)
61 return NULL;
62 tmp = get_device(&dev->dev);
63 if (tmp)
64 return to_of_device(tmp);
65 else
66 return NULL;
67}
68
69void of_dev_put(struct of_device *dev)
70{
71 if (dev)
72 put_device(&dev->dev);
73}
74
75static ssize_t dev_show_devspec(struct device *dev,
76 struct device_attribute *attr, char *buf)
77{
78 struct of_device *ofdev;
79
80 ofdev = to_of_device(dev);
81 return sprintf(buf, "%s", ofdev->node->full_name);
82}
83
84static DEVICE_ATTR(devspec, S_IRUGO, dev_show_devspec, NULL);
85
86/**
87 * of_release_dev - free an of device structure when all users of it are finished.
88 * @dev: device that's been disconnected
89 *
90 * Will be called only by the device core when all users of this of device are
91 * done.
92 */
93void of_release_dev(struct device *dev)
94{
95 struct of_device *ofdev;
96
97 ofdev = to_of_device(dev);
98 of_node_put(ofdev->node);
99 kfree(ofdev);
100}
101
102int of_device_register(struct of_device *ofdev)
103{
104 int rc;
105
106 BUG_ON(ofdev->node == NULL);
107
108 rc = device_register(&ofdev->dev);
109 if (rc)
110 return rc;
111
112 return device_create_file(&ofdev->dev, &dev_attr_devspec);
113}
114
115void of_device_unregister(struct of_device *ofdev)
116{
117 device_remove_file(&ofdev->dev, &dev_attr_devspec);
118
119 device_unregister(&ofdev->dev);
120}
121
122
123ssize_t of_device_get_modalias(struct of_device *ofdev, 12ssize_t of_device_get_modalias(struct of_device *ofdev,
124 char *str, ssize_t len) 13 char *str, ssize_t len)
125{ 14{
@@ -229,14 +118,5 @@ int of_device_uevent(struct device *dev,
229 118
230 return 0; 119 return 0;
231} 120}
232
233
234EXPORT_SYMBOL(of_match_node);
235EXPORT_SYMBOL(of_match_device);
236EXPORT_SYMBOL(of_device_register);
237EXPORT_SYMBOL(of_device_unregister);
238EXPORT_SYMBOL(of_dev_get);
239EXPORT_SYMBOL(of_dev_put);
240EXPORT_SYMBOL(of_release_dev);
241EXPORT_SYMBOL(of_device_uevent); 121EXPORT_SYMBOL(of_device_uevent);
242EXPORT_SYMBOL(of_device_get_modalias); 122EXPORT_SYMBOL(of_device_get_modalias);
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index d501c23e5159..f70e787d556f 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -55,94 +55,14 @@ static struct of_device_id of_default_bus_ids[] = {
55 55
56static atomic_t bus_no_reg_magic; 56static atomic_t bus_no_reg_magic;
57 57
58/*
59 *
60 * OF platform device type definition & base infrastructure
61 *
62 */
63
64static int of_platform_bus_match(struct device *dev, struct device_driver *drv)
65{
66 struct of_device * of_dev = to_of_device(dev);
67 struct of_platform_driver * of_drv = to_of_platform_driver(drv);
68 const struct of_device_id * matches = of_drv->match_table;
69
70 if (!matches)
71 return 0;
72
73 return of_match_device(matches, of_dev) != NULL;
74}
75
76static int of_platform_device_probe(struct device *dev)
77{
78 int error = -ENODEV;
79 struct of_platform_driver *drv;
80 struct of_device *of_dev;
81 const struct of_device_id *match;
82
83 drv = to_of_platform_driver(dev->driver);
84 of_dev = to_of_device(dev);
85
86 if (!drv->probe)
87 return error;
88
89 of_dev_get(of_dev);
90
91 match = of_match_device(drv->match_table, of_dev);
92 if (match)
93 error = drv->probe(of_dev, match);
94 if (error)
95 of_dev_put(of_dev);
96
97 return error;
98}
99
100static int of_platform_device_remove(struct device *dev)
101{
102 struct of_device * of_dev = to_of_device(dev);
103 struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
104
105 if (dev->driver && drv->remove)
106 drv->remove(of_dev);
107 return 0;
108}
109
110static int of_platform_device_suspend(struct device *dev, pm_message_t state)
111{
112 struct of_device * of_dev = to_of_device(dev);
113 struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
114 int error = 0;
115
116 if (dev->driver && drv->suspend)
117 error = drv->suspend(of_dev, state);
118 return error;
119}
120
121static int of_platform_device_resume(struct device * dev)
122{
123 struct of_device * of_dev = to_of_device(dev);
124 struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
125 int error = 0;
126
127 if (dev->driver && drv->resume)
128 error = drv->resume(of_dev);
129 return error;
130}
131
132struct bus_type of_platform_bus_type = { 58struct bus_type of_platform_bus_type = {
133 .name = "of_platform",
134 .match = of_platform_bus_match,
135 .uevent = of_device_uevent, 59 .uevent = of_device_uevent,
136 .probe = of_platform_device_probe,
137 .remove = of_platform_device_remove,
138 .suspend = of_platform_device_suspend,
139 .resume = of_platform_device_resume,
140}; 60};
141EXPORT_SYMBOL(of_platform_bus_type); 61EXPORT_SYMBOL(of_platform_bus_type);
142 62
143static int __init of_bus_driver_init(void) 63static int __init of_bus_driver_init(void)
144{ 64{
145 return bus_register(&of_platform_bus_type); 65 return of_bus_type_init(&of_platform_bus_type, "of_platform");
146} 66}
147 67
148postcore_initcall(of_bus_driver_init); 68postcore_initcall(of_bus_driver_init);
@@ -222,10 +142,9 @@ struct of_device* of_platform_device_create(struct device_node *np,
222{ 142{
223 struct of_device *dev; 143 struct of_device *dev;
224 144
225 dev = kmalloc(sizeof(*dev), GFP_KERNEL); 145 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
226 if (!dev) 146 if (!dev)
227 return NULL; 147 return NULL;
228 memset(dev, 0, sizeof(*dev));
229 148
230 dev->node = of_node_get(np); 149 dev->node = of_node_get(np);
231 dev->dma_mask = 0xffffffffUL; 150 dev->dma_mask = 0xffffffffUL;
@@ -427,14 +346,6 @@ static int __devinit of_pci_phb_probe(struct of_device *dev,
427 /* Process "ranges" property */ 346 /* Process "ranges" property */
428 pci_process_bridge_OF_ranges(phb, dev->node, 0); 347 pci_process_bridge_OF_ranges(phb, dev->node, 0);
429 348
430 /* Setup IO space. We use the non-dynamic version of that code here,
431 * which doesn't quite support unplugging. Next kernel release will
432 * have a better fix for this.
433 * Note also that we don't do ISA, this will also be fixed with a
434 * more massive rework.
435 */
436 pci_setup_phb_io(phb, 0);
437
438 /* Init pci_dn data structures */ 349 /* Init pci_dn data structures */
439 pci_devs_phb_init_dynamic(phb); 350 pci_devs_phb_init_dynamic(phb);
440 351
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
new file mode 100644
index 000000000000..94b4a028232a
--- /dev/null
+++ b/arch/powerpc/kernel/pci-common.c
@@ -0,0 +1,457 @@
1/*
2 * Contains common pci routines for ALL ppc platform
3 * (based on pci_32.c and pci_64.c)
4 *
5 * Port for PPC64 David Engebretsen, IBM Corp.
6 * Contains common pci routines for ppc64 platform, pSeries and iSeries brands.
7 *
8 * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM
9 * Rework, based on alpha PCI code.
10 *
11 * Common pmac/prep/chrp pci routines. -- Cort
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version
16 * 2 of the License, or (at your option) any later version.
17 */
18
19#undef DEBUG
20
21#include <linux/kernel.h>
22#include <linux/pci.h>
23#include <linux/string.h>
24#include <linux/init.h>
25#include <linux/bootmem.h>
26#include <linux/mm.h>
27#include <linux/list.h>
28#include <linux/syscalls.h>
29#include <linux/irq.h>
30#include <linux/vmalloc.h>
31
32#include <asm/processor.h>
33#include <asm/io.h>
34#include <asm/prom.h>
35#include <asm/pci-bridge.h>
36#include <asm/byteorder.h>
37#include <asm/machdep.h>
38#include <asm/ppc-pci.h>
39#include <asm/firmware.h>
40
41#ifdef DEBUG
42#include <asm/udbg.h>
43#define DBG(fmt...) printk(fmt)
44#else
45#define DBG(fmt...)
46#endif
47
48static DEFINE_SPINLOCK(hose_spinlock);
49
50/* XXX kill that some day ... */
51int global_phb_number; /* Global phb counter */
52
53extern struct list_head hose_list;
54
55/*
56 * pci_controller(phb) initialized common variables.
57 */
58static void __devinit pci_setup_pci_controller(struct pci_controller *hose)
59{
60 memset(hose, 0, sizeof(struct pci_controller));
61
62 spin_lock(&hose_spinlock);
63 hose->global_number = global_phb_number++;
64 list_add_tail(&hose->list_node, &hose_list);
65 spin_unlock(&hose_spinlock);
66}
67
68struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
69{
70 struct pci_controller *phb;
71
72 if (mem_init_done)
73 phb = kmalloc(sizeof(struct pci_controller), GFP_KERNEL);
74 else
75 phb = alloc_bootmem(sizeof (struct pci_controller));
76 if (phb == NULL)
77 return NULL;
78 pci_setup_pci_controller(phb);
79 phb->arch_data = dev;
80 phb->is_dynamic = mem_init_done;
81#ifdef CONFIG_PPC64
82 if (dev) {
83 int nid = of_node_to_nid(dev);
84
85 if (nid < 0 || !node_online(nid))
86 nid = -1;
87
88 PHB_SET_NODE(phb, nid);
89 }
90#endif
91 return phb;
92}
93
94void pcibios_free_controller(struct pci_controller *phb)
95{
96 spin_lock(&hose_spinlock);
97 list_del(&phb->list_node);
98 spin_unlock(&hose_spinlock);
99
100 if (phb->is_dynamic)
101 kfree(phb);
102}
103
104/*
105 * Return the domain number for this bus.
106 */
107int pci_domain_nr(struct pci_bus *bus)
108{
109 if (firmware_has_feature(FW_FEATURE_ISERIES))
110 return 0;
111 else {
112 struct pci_controller *hose = pci_bus_to_host(bus);
113
114 return hose->global_number;
115 }
116}
117
118EXPORT_SYMBOL(pci_domain_nr);
119
120#ifdef CONFIG_PPC_OF
121
122/* This routine is meant to be used early during boot, when the
123 * PCI bus numbers have not yet been assigned, and you need to
124 * issue PCI config cycles to an OF device.
125 * It could also be used to "fix" RTAS config cycles if you want
126 * to set pci_assign_all_buses to 1 and still use RTAS for PCI
127 * config cycles.
128 */
129struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node)
130{
131 if (!have_of)
132 return NULL;
133 while(node) {
134 struct pci_controller *hose, *tmp;
135 list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
136 if (hose->arch_data == node)
137 return hose;
138 node = node->parent;
139 }
140 return NULL;
141}
142
143static ssize_t pci_show_devspec(struct device *dev,
144 struct device_attribute *attr, char *buf)
145{
146 struct pci_dev *pdev;
147 struct device_node *np;
148
149 pdev = to_pci_dev (dev);
150 np = pci_device_to_OF_node(pdev);
151 if (np == NULL || np->full_name == NULL)
152 return 0;
153 return sprintf(buf, "%s", np->full_name);
154}
155static DEVICE_ATTR(devspec, S_IRUGO, pci_show_devspec, NULL);
156#endif /* CONFIG_PPC_OF */
157
158/* Add sysfs properties */
159int pcibios_add_platform_entries(struct pci_dev *pdev)
160{
161#ifdef CONFIG_PPC_OF
162 return device_create_file(&pdev->dev, &dev_attr_devspec);
163#else
164 return 0;
165#endif /* CONFIG_PPC_OF */
166
167}
168
169char __init *pcibios_setup(char *str)
170{
171 return str;
172}
173
174/*
175 * Reads the interrupt pin to determine if interrupt is use by card.
176 * If the interrupt is used, then gets the interrupt line from the
177 * openfirmware and sets it in the pci_dev and pci_config line.
178 */
179int pci_read_irq_line(struct pci_dev *pci_dev)
180{
181 struct of_irq oirq;
182 unsigned int virq;
183
184 DBG("Try to map irq for %s...\n", pci_name(pci_dev));
185
186#ifdef DEBUG
187 memset(&oirq, 0xff, sizeof(oirq));
188#endif
189 /* Try to get a mapping from the device-tree */
190 if (of_irq_map_pci(pci_dev, &oirq)) {
191 u8 line, pin;
192
193 /* If that fails, lets fallback to what is in the config
194 * space and map that through the default controller. We
195 * also set the type to level low since that's what PCI
196 * interrupts are. If your platform does differently, then
197 * either provide a proper interrupt tree or don't use this
198 * function.
199 */
200 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &pin))
201 return -1;
202 if (pin == 0)
203 return -1;
204 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) ||
205 line == 0xff) {
206 return -1;
207 }
208 DBG(" -> no map ! Using irq line %d from PCI config\n", line);
209
210 virq = irq_create_mapping(NULL, line);
211 if (virq != NO_IRQ)
212 set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
213 } else {
214 DBG(" -> got one, spec %d cells (0x%08x 0x%08x...) on %s\n",
215 oirq.size, oirq.specifier[0], oirq.specifier[1],
216 oirq.controller->full_name);
217
218 virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
219 oirq.size);
220 }
221 if(virq == NO_IRQ) {
222 DBG(" -> failed to map !\n");
223 return -1;
224 }
225
226 DBG(" -> mapped to linux irq %d\n", virq);
227
228 pci_dev->irq = virq;
229
230 return 0;
231}
232EXPORT_SYMBOL(pci_read_irq_line);
233
234/*
235 * Platform support for /proc/bus/pci/X/Y mmap()s,
236 * modelled on the sparc64 implementation by Dave Miller.
237 * -- paulus.
238 */
239
240/*
241 * Adjust vm_pgoff of VMA such that it is the physical page offset
242 * corresponding to the 32-bit pci bus offset for DEV requested by the user.
243 *
244 * Basically, the user finds the base address for his device which he wishes
245 * to mmap. They read the 32-bit value from the config space base register,
246 * add whatever PAGE_SIZE multiple offset they wish, and feed this into the
247 * offset parameter of mmap on /proc/bus/pci/XXX for that device.
248 *
249 * Returns negative error code on failure, zero on success.
250 */
251static struct resource *__pci_mmap_make_offset(struct pci_dev *dev,
252 resource_size_t *offset,
253 enum pci_mmap_state mmap_state)
254{
255 struct pci_controller *hose = pci_bus_to_host(dev->bus);
256 unsigned long io_offset = 0;
257 int i, res_bit;
258
259 if (hose == 0)
260 return NULL; /* should never happen */
261
262 /* If memory, add on the PCI bridge address offset */
263 if (mmap_state == pci_mmap_mem) {
264#if 0 /* See comment in pci_resource_to_user() for why this is disabled */
265 *offset += hose->pci_mem_offset;
266#endif
267 res_bit = IORESOURCE_MEM;
268 } else {
269 io_offset = (unsigned long)hose->io_base_virt - _IO_BASE;
270 *offset += io_offset;
271 res_bit = IORESOURCE_IO;
272 }
273
274 /*
275 * Check that the offset requested corresponds to one of the
276 * resources of the device.
277 */
278 for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
279 struct resource *rp = &dev->resource[i];
280 int flags = rp->flags;
281
282 /* treat ROM as memory (should be already) */
283 if (i == PCI_ROM_RESOURCE)
284 flags |= IORESOURCE_MEM;
285
286 /* Active and same type? */
287 if ((flags & res_bit) == 0)
288 continue;
289
290 /* In the range of this resource? */
291 if (*offset < (rp->start & PAGE_MASK) || *offset > rp->end)
292 continue;
293
294 /* found it! construct the final physical address */
295 if (mmap_state == pci_mmap_io)
296 *offset += hose->io_base_phys - io_offset;
297 return rp;
298 }
299
300 return NULL;
301}
302
303/*
304 * Set vm_page_prot of VMA, as appropriate for this architecture, for a pci
305 * device mapping.
306 */
307static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp,
308 pgprot_t protection,
309 enum pci_mmap_state mmap_state,
310 int write_combine)
311{
312 unsigned long prot = pgprot_val(protection);
313
314 /* Write combine is always 0 on non-memory space mappings. On
315 * memory space, if the user didn't pass 1, we check for a
316 * "prefetchable" resource. This is a bit hackish, but we use
317 * this to workaround the inability of /sysfs to provide a write
318 * combine bit
319 */
320 if (mmap_state != pci_mmap_mem)
321 write_combine = 0;
322 else if (write_combine == 0) {
323 if (rp->flags & IORESOURCE_PREFETCH)
324 write_combine = 1;
325 }
326
327 /* XXX would be nice to have a way to ask for write-through */
328 prot |= _PAGE_NO_CACHE;
329 if (write_combine)
330 prot &= ~_PAGE_GUARDED;
331 else
332 prot |= _PAGE_GUARDED;
333
334 return __pgprot(prot);
335}
336
337/*
338 * This one is used by /dev/mem and fbdev who have no clue about the
339 * PCI device, it tries to find the PCI device first and calls the
340 * above routine
341 */
342pgprot_t pci_phys_mem_access_prot(struct file *file,
343 unsigned long pfn,
344 unsigned long size,
345 pgprot_t protection)
346{
347 struct pci_dev *pdev = NULL;
348 struct resource *found = NULL;
349 unsigned long prot = pgprot_val(protection);
350 unsigned long offset = pfn << PAGE_SHIFT;
351 int i;
352
353 if (page_is_ram(pfn))
354 return __pgprot(prot);
355
356 prot |= _PAGE_NO_CACHE | _PAGE_GUARDED;
357
358 for_each_pci_dev(pdev) {
359 for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
360 struct resource *rp = &pdev->resource[i];
361 int flags = rp->flags;
362
363 /* Active and same type? */
364 if ((flags & IORESOURCE_MEM) == 0)
365 continue;
366 /* In the range of this resource? */
367 if (offset < (rp->start & PAGE_MASK) ||
368 offset > rp->end)
369 continue;
370 found = rp;
371 break;
372 }
373 if (found)
374 break;
375 }
376 if (found) {
377 if (found->flags & IORESOURCE_PREFETCH)
378 prot &= ~_PAGE_GUARDED;
379 pci_dev_put(pdev);
380 }
381
382 DBG("non-PCI map for %lx, prot: %lx\n", offset, prot);
383
384 return __pgprot(prot);
385}
386
387
388/*
389 * Perform the actual remap of the pages for a PCI device mapping, as
390 * appropriate for this architecture. The region in the process to map
391 * is described by vm_start and vm_end members of VMA, the base physical
392 * address is found in vm_pgoff.
393 * The pci device structure is provided so that architectures may make mapping
394 * decisions on a per-device or per-bus basis.
395 *
396 * Returns a negative error code on failure, zero on success.
397 */
398int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
399 enum pci_mmap_state mmap_state, int write_combine)
400{
401 resource_size_t offset = vma->vm_pgoff << PAGE_SHIFT;
402 struct resource *rp;
403 int ret;
404
405 rp = __pci_mmap_make_offset(dev, &offset, mmap_state);
406 if (rp == NULL)
407 return -EINVAL;
408
409 vma->vm_pgoff = offset >> PAGE_SHIFT;
410 vma->vm_page_prot = __pci_mmap_set_pgprot(dev, rp,
411 vma->vm_page_prot,
412 mmap_state, write_combine);
413
414 ret = remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
415 vma->vm_end - vma->vm_start, vma->vm_page_prot);
416
417 return ret;
418}
419
420void pci_resource_to_user(const struct pci_dev *dev, int bar,
421 const struct resource *rsrc,
422 resource_size_t *start, resource_size_t *end)
423{
424 struct pci_controller *hose = pci_bus_to_host(dev->bus);
425 resource_size_t offset = 0;
426
427 if (hose == NULL)
428 return;
429
430 if (rsrc->flags & IORESOURCE_IO)
431 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
432
433 /* We pass a fully fixed up address to userland for MMIO instead of
434 * a BAR value because X is lame and expects to be able to use that
435 * to pass to /dev/mem !
436 *
437 * That means that we'll have potentially 64 bits values where some
438 * userland apps only expect 32 (like X itself since it thinks only
439 * Sparc has 64 bits MMIO) but if we don't do that, we break it on
440 * 32 bits CHRPs :-(
441 *
442 * Hopefully, the sysfs insterface is immune to that gunk. Once X
443 * has been fixed (and the fix spread enough), we can re-enable the
444 * 2 lines below and pass down a BAR value to userland. In that case
445 * we'll also have to re-enable the matching code in
446 * __pci_mmap_make_offset().
447 *
448 * BenH.
449 */
450#if 0
451 else if (rsrc->flags & IORESOURCE_MEM)
452 offset = hose->pci_mem_offset;
453#endif
454
455 *start = rsrc->start - offset;
456 *end = rsrc->end - offset;
457}
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index e66064b5093a..0adf077f3f3a 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -55,8 +55,7 @@ static u8* pci_to_OF_bus_map;
55 */ 55 */
56int pci_assign_all_buses; 56int pci_assign_all_buses;
57 57
58struct pci_controller* hose_head; 58LIST_HEAD(hose_list);
59struct pci_controller** hose_tail = &hose_head;
60 59
61static int pci_bus_count; 60static int pci_bus_count;
62 61
@@ -573,58 +572,6 @@ pcibios_assign_resources(void)
573 } 572 }
574} 573}
575 574
576
577int
578pcibios_enable_resources(struct pci_dev *dev, int mask)
579{
580 u16 cmd, old_cmd;
581 int idx;
582 struct resource *r;
583
584 pci_read_config_word(dev, PCI_COMMAND, &cmd);
585 old_cmd = cmd;
586 for (idx=0; idx<6; idx++) {
587 /* Only set up the requested stuff */
588 if (!(mask & (1<<idx)))
589 continue;
590
591 r = &dev->resource[idx];
592 if (r->flags & IORESOURCE_UNSET) {
593 printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));
594 return -EINVAL;
595 }
596 if (r->flags & IORESOURCE_IO)
597 cmd |= PCI_COMMAND_IO;
598 if (r->flags & IORESOURCE_MEM)
599 cmd |= PCI_COMMAND_MEMORY;
600 }
601 if (dev->resource[PCI_ROM_RESOURCE].start)
602 cmd |= PCI_COMMAND_MEMORY;
603 if (cmd != old_cmd) {
604 printk("PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd);
605 pci_write_config_word(dev, PCI_COMMAND, cmd);
606 }
607 return 0;
608}
609
610static int next_controller_index;
611
612struct pci_controller * __init
613pcibios_alloc_controller(void)
614{
615 struct pci_controller *hose;
616
617 hose = (struct pci_controller *)alloc_bootmem(sizeof(*hose));
618 memset(hose, 0, sizeof(struct pci_controller));
619
620 *hose_tail = hose;
621 hose_tail = &hose->next;
622
623 hose->index = next_controller_index++;
624
625 return hose;
626}
627
628#ifdef CONFIG_PPC_OF 575#ifdef CONFIG_PPC_OF
629/* 576/*
630 * Functions below are used on OpenFirmware machines. 577 * Functions below are used on OpenFirmware machines.
@@ -670,7 +617,7 @@ void
670pcibios_make_OF_bus_map(void) 617pcibios_make_OF_bus_map(void)
671{ 618{
672 int i; 619 int i;
673 struct pci_controller* hose; 620 struct pci_controller *hose, *tmp;
674 struct property *map_prop; 621 struct property *map_prop;
675 struct device_node *dn; 622 struct device_node *dn;
676 623
@@ -687,7 +634,7 @@ pcibios_make_OF_bus_map(void)
687 pci_to_OF_bus_map[i] = 0xff; 634 pci_to_OF_bus_map[i] = 0xff;
688 635
689 /* For each hose, we begin searching bridges */ 636 /* For each hose, we begin searching bridges */
690 for(hose=hose_head; hose; hose=hose->next) { 637 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
691 struct device_node* node; 638 struct device_node* node;
692 node = (struct device_node *)hose->arch_data; 639 node = (struct device_node *)hose->arch_data;
693 if (!node) 640 if (!node)
@@ -765,7 +712,7 @@ static struct device_node *scan_OF_for_pci_bus(struct pci_bus *bus)
765 712
766 /* Are we a root bus ? */ 713 /* Are we a root bus ? */
767 if (bus->self == NULL || bus->parent == NULL) { 714 if (bus->self == NULL || bus->parent == NULL) {
768 struct pci_controller *hose = pci_bus_to_hose(bus->number); 715 struct pci_controller *hose = pci_bus_to_host(bus);
769 if (hose == NULL) 716 if (hose == NULL)
770 return NULL; 717 return NULL;
771 return of_node_get(hose->arch_data); 718 return of_node_get(hose->arch_data);
@@ -818,27 +765,6 @@ pci_device_to_OF_node(struct pci_dev *dev)
818} 765}
819EXPORT_SYMBOL(pci_device_to_OF_node); 766EXPORT_SYMBOL(pci_device_to_OF_node);
820 767
821/* This routine is meant to be used early during boot, when the
822 * PCI bus numbers have not yet been assigned, and you need to
823 * issue PCI config cycles to an OF device.
824 * It could also be used to "fix" RTAS config cycles if you want
825 * to set pci_assign_all_buses to 1 and still use RTAS for PCI
826 * config cycles.
827 */
828struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node)
829{
830 if (!have_of)
831 return NULL;
832 while(node) {
833 struct pci_controller* hose;
834 for (hose=hose_head;hose;hose=hose->next)
835 if (hose->arch_data == node)
836 return hose;
837 node=node->parent;
838 }
839 return NULL;
840}
841
842static int 768static int
843find_OF_pci_device_filter(struct device_node* node, void* data) 769find_OF_pci_device_filter(struct device_node* node, void* data)
844{ 770{
@@ -1027,34 +953,12 @@ pci_create_OF_bus_map(void)
1027 } 953 }
1028} 954}
1029 955
1030static ssize_t pci_show_devspec(struct device *dev, struct device_attribute *attr, char *buf)
1031{
1032 struct pci_dev *pdev;
1033 struct device_node *np;
1034
1035 pdev = to_pci_dev (dev);
1036 np = pci_device_to_OF_node(pdev);
1037 if (np == NULL || np->full_name == NULL)
1038 return 0;
1039 return sprintf(buf, "%s", np->full_name);
1040}
1041static DEVICE_ATTR(devspec, S_IRUGO, pci_show_devspec, NULL);
1042
1043#else /* CONFIG_PPC_OF */ 956#else /* CONFIG_PPC_OF */
1044void pcibios_make_OF_bus_map(void) 957void pcibios_make_OF_bus_map(void)
1045{ 958{
1046} 959}
1047#endif /* CONFIG_PPC_OF */ 960#endif /* CONFIG_PPC_OF */
1048 961
1049/* Add sysfs properties */
1050void pcibios_add_platform_entries(struct pci_dev *pdev)
1051{
1052#ifdef CONFIG_PPC_OF
1053 device_create_file(&pdev->dev, &dev_attr_devspec);
1054#endif /* CONFIG_PPC_OF */
1055}
1056
1057
1058#ifdef CONFIG_PPC_PMAC 962#ifdef CONFIG_PPC_PMAC
1059/* 963/*
1060 * This set of routines checks for PCI<->PCI bridges that have closed 964 * This set of routines checks for PCI<->PCI bridges that have closed
@@ -1269,14 +1173,14 @@ pcibios_fixup_p2p_bridges(void)
1269static int __init 1173static int __init
1270pcibios_init(void) 1174pcibios_init(void)
1271{ 1175{
1272 struct pci_controller *hose; 1176 struct pci_controller *hose, *tmp;
1273 struct pci_bus *bus; 1177 struct pci_bus *bus;
1274 int next_busno; 1178 int next_busno = 0;
1275 1179
1276 printk(KERN_INFO "PCI: Probing PCI hardware\n"); 1180 printk(KERN_INFO "PCI: Probing PCI hardware\n");
1277 1181
1278 /* Scan all of the recorded PCI controllers. */ 1182 /* Scan all of the recorded PCI controllers. */
1279 for (next_busno = 0, hose = hose_head; hose; hose = hose->next) { 1183 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
1280 if (pci_assign_all_buses) 1184 if (pci_assign_all_buses)
1281 hose->first_busno = next_busno; 1185 hose->first_busno = next_busno;
1282 hose->last_busno = 0xff; 1186 hose->last_busno = 0xff;
@@ -1319,12 +1223,6 @@ pcibios_init(void)
1319 1223
1320subsys_initcall(pcibios_init); 1224subsys_initcall(pcibios_init);
1321 1225
1322unsigned long resource_fixup(struct pci_dev * dev, struct resource * res,
1323 unsigned long start, unsigned long size)
1324{
1325 return start;
1326}
1327
1328void __init pcibios_fixup_bus(struct pci_bus *bus) 1226void __init pcibios_fixup_bus(struct pci_bus *bus)
1329{ 1227{
1330 struct pci_controller *hose = (struct pci_controller *) bus->sysdata; 1228 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
@@ -1342,7 +1240,7 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
1342 if (!res->flags) { 1240 if (!res->flags) {
1343 if (io_offset) 1241 if (io_offset)
1344 printk(KERN_ERR "I/O resource not set for host" 1242 printk(KERN_ERR "I/O resource not set for host"
1345 " bridge %d\n", hose->index); 1243 " bridge %d\n", hose->global_number);
1346 res->start = 0; 1244 res->start = 0;
1347 res->end = IO_SPACE_LIMIT; 1245 res->end = IO_SPACE_LIMIT;
1348 res->flags = IORESOURCE_IO; 1246 res->flags = IORESOURCE_IO;
@@ -1356,7 +1254,7 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
1356 if (i > 0) 1254 if (i > 0)
1357 continue; 1255 continue;
1358 printk(KERN_ERR "Memory resource not set for " 1256 printk(KERN_ERR "Memory resource not set for "
1359 "host bridge %d\n", hose->index); 1257 "host bridge %d\n", hose->global_number);
1360 res->start = hose->pci_mem_offset; 1258 res->start = hose->pci_mem_offset;
1361 res->end = ~0U; 1259 res->end = ~0U;
1362 res->flags = IORESOURCE_MEM; 1260 res->flags = IORESOURCE_MEM;
@@ -1370,7 +1268,7 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
1370 for (i = 0; i < 4; ++i) { 1268 for (i = 0; i < 4; ++i) {
1371 if ((res = bus->resource[i]) == NULL) 1269 if ((res = bus->resource[i]) == NULL)
1372 continue; 1270 continue;
1373 if (!res->flags) 1271 if (!res->flags || bus->self->transparent)
1374 continue; 1272 continue;
1375 if (io_offset && (res->flags & IORESOURCE_IO)) { 1273 if (io_offset && (res->flags & IORESOURCE_IO)) {
1376 res->start += io_offset; 1274 res->start += io_offset;
@@ -1395,11 +1293,6 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
1395 } 1293 }
1396} 1294}
1397 1295
1398char __init *pcibios_setup(char *str)
1399{
1400 return str;
1401}
1402
1403/* the next one is stolen from the alpha port... */ 1296/* the next one is stolen from the alpha port... */
1404void __init 1297void __init
1405pcibios_update_irq(struct pci_dev *dev, int irq) 1298pcibios_update_irq(struct pci_dev *dev, int irq)
@@ -1408,64 +1301,6 @@ pcibios_update_irq(struct pci_dev *dev, int irq)
1408 /* XXX FIXME - update OF device tree node interrupt property */ 1301 /* XXX FIXME - update OF device tree node interrupt property */
1409} 1302}
1410 1303
1411#ifdef CONFIG_PPC_MERGE
1412/* XXX This is a copy of the ppc64 version. This is temporary until we start
1413 * merging the 2 PCI layers
1414 */
1415/*
1416 * Reads the interrupt pin to determine if interrupt is use by card.
1417 * If the interrupt is used, then gets the interrupt line from the
1418 * openfirmware and sets it in the pci_dev and pci_config line.
1419 */
1420int pci_read_irq_line(struct pci_dev *pci_dev)
1421{
1422 struct of_irq oirq;
1423 unsigned int virq;
1424
1425 DBG("Try to map irq for %s...\n", pci_name(pci_dev));
1426
1427 /* Try to get a mapping from the device-tree */
1428 if (of_irq_map_pci(pci_dev, &oirq)) {
1429 u8 line, pin;
1430
1431 /* If that fails, lets fallback to what is in the config
1432 * space and map that through the default controller. We
1433 * also set the type to level low since that's what PCI
1434 * interrupts are. If your platform does differently, then
1435 * either provide a proper interrupt tree or don't use this
1436 * function.
1437 */
1438 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &pin))
1439 return -1;
1440 if (pin == 0)
1441 return -1;
1442 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) ||
1443 line == 0xff) {
1444 return -1;
1445 }
1446 DBG(" -> no map ! Using irq line %d from PCI config\n", line);
1447
1448 virq = irq_create_mapping(NULL, line);
1449 if (virq != NO_IRQ)
1450 set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
1451 } else {
1452 DBG(" -> got one, spec %d cells (0x%08x...) on %s\n",
1453 oirq.size, oirq.specifier[0], oirq.controller->full_name);
1454
1455 virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
1456 oirq.size);
1457 }
1458 if(virq == NO_IRQ) {
1459 DBG(" -> failed to map !\n");
1460 return -1;
1461 }
1462 pci_dev->irq = virq;
1463
1464 return 0;
1465}
1466EXPORT_SYMBOL(pci_read_irq_line);
1467#endif /* CONFIG_PPC_MERGE */
1468
1469int pcibios_enable_device(struct pci_dev *dev, int mask) 1304int pcibios_enable_device(struct pci_dev *dev, int mask)
1470{ 1305{
1471 u16 cmd, old_cmd; 1306 u16 cmd, old_cmd;
@@ -1497,281 +1332,17 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
1497 return 0; 1332 return 0;
1498} 1333}
1499 1334
1500struct pci_controller* 1335static struct pci_controller*
1501pci_bus_to_hose(int bus) 1336pci_bus_to_hose(int bus)
1502{ 1337{
1503 struct pci_controller* hose = hose_head; 1338 struct pci_controller *hose, *tmp;
1504 1339
1505 for (; hose; hose = hose->next) 1340 list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
1506 if (bus >= hose->first_busno && bus <= hose->last_busno) 1341 if (bus >= hose->first_busno && bus <= hose->last_busno)
1507 return hose; 1342 return hose;
1508 return NULL; 1343 return NULL;
1509} 1344}
1510 1345
1511void __iomem *
1512pci_bus_io_base(unsigned int bus)
1513{
1514 struct pci_controller *hose;
1515
1516 hose = pci_bus_to_hose(bus);
1517 if (!hose)
1518 return NULL;
1519 return hose->io_base_virt;
1520}
1521
1522unsigned long
1523pci_bus_io_base_phys(unsigned int bus)
1524{
1525 struct pci_controller *hose;
1526
1527 hose = pci_bus_to_hose(bus);
1528 if (!hose)
1529 return 0;
1530 return hose->io_base_phys;
1531}
1532
1533unsigned long
1534pci_bus_mem_base_phys(unsigned int bus)
1535{
1536 struct pci_controller *hose;
1537
1538 hose = pci_bus_to_hose(bus);
1539 if (!hose)
1540 return 0;
1541 return hose->pci_mem_offset;
1542}
1543
1544unsigned long
1545pci_resource_to_bus(struct pci_dev *pdev, struct resource *res)
1546{
1547 /* Hack alert again ! See comments in chrp_pci.c
1548 */
1549 struct pci_controller* hose =
1550 (struct pci_controller *)pdev->sysdata;
1551 if (hose && res->flags & IORESOURCE_MEM)
1552 return res->start - hose->pci_mem_offset;
1553 /* We may want to do something with IOs here... */
1554 return res->start;
1555}
1556
1557
1558static struct resource *__pci_mmap_make_offset(struct pci_dev *dev,
1559 resource_size_t *offset,
1560 enum pci_mmap_state mmap_state)
1561{
1562 struct pci_controller *hose = pci_bus_to_hose(dev->bus->number);
1563 unsigned long io_offset = 0;
1564 int i, res_bit;
1565
1566 if (hose == 0)
1567 return NULL; /* should never happen */
1568
1569 /* If memory, add on the PCI bridge address offset */
1570 if (mmap_state == pci_mmap_mem) {
1571#if 0 /* See comment in pci_resource_to_user() for why this is disabled */
1572 *offset += hose->pci_mem_offset;
1573#endif
1574 res_bit = IORESOURCE_MEM;
1575 } else {
1576 io_offset = hose->io_base_virt - (void __iomem *)_IO_BASE;
1577 *offset += io_offset;
1578 res_bit = IORESOURCE_IO;
1579 }
1580
1581 /*
1582 * Check that the offset requested corresponds to one of the
1583 * resources of the device.
1584 */
1585 for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
1586 struct resource *rp = &dev->resource[i];
1587 int flags = rp->flags;
1588
1589 /* treat ROM as memory (should be already) */
1590 if (i == PCI_ROM_RESOURCE)
1591 flags |= IORESOURCE_MEM;
1592
1593 /* Active and same type? */
1594 if ((flags & res_bit) == 0)
1595 continue;
1596
1597 /* In the range of this resource? */
1598 if (*offset < (rp->start & PAGE_MASK) || *offset > rp->end)
1599 continue;
1600
1601 /* found it! construct the final physical address */
1602 if (mmap_state == pci_mmap_io)
1603 *offset += hose->io_base_phys - io_offset;
1604 return rp;
1605 }
1606
1607 return NULL;
1608}
1609
1610/*
1611 * Set vm_page_prot of VMA, as appropriate for this architecture, for a pci
1612 * device mapping.
1613 */
1614static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp,
1615 pgprot_t protection,
1616 enum pci_mmap_state mmap_state,
1617 int write_combine)
1618{
1619 unsigned long prot = pgprot_val(protection);
1620
1621 /* Write combine is always 0 on non-memory space mappings. On
1622 * memory space, if the user didn't pass 1, we check for a
1623 * "prefetchable" resource. This is a bit hackish, but we use
1624 * this to workaround the inability of /sysfs to provide a write
1625 * combine bit
1626 */
1627 if (mmap_state != pci_mmap_mem)
1628 write_combine = 0;
1629 else if (write_combine == 0) {
1630 if (rp->flags & IORESOURCE_PREFETCH)
1631 write_combine = 1;
1632 }
1633
1634 /* XXX would be nice to have a way to ask for write-through */
1635 prot |= _PAGE_NO_CACHE;
1636 if (write_combine)
1637 prot &= ~_PAGE_GUARDED;
1638 else
1639 prot |= _PAGE_GUARDED;
1640
1641 return __pgprot(prot);
1642}
1643
1644/*
1645 * This one is used by /dev/mem and fbdev who have no clue about the
1646 * PCI device, it tries to find the PCI device first and calls the
1647 * above routine
1648 */
1649pgprot_t pci_phys_mem_access_prot(struct file *file,
1650 unsigned long pfn,
1651 unsigned long size,
1652 pgprot_t protection)
1653{
1654 struct pci_dev *pdev = NULL;
1655 struct resource *found = NULL;
1656 unsigned long prot = pgprot_val(protection);
1657 unsigned long offset = pfn << PAGE_SHIFT;
1658 int i;
1659
1660 if (page_is_ram(pfn))
1661 return __pgprot(prot);
1662
1663 prot |= _PAGE_NO_CACHE | _PAGE_GUARDED;
1664
1665 for_each_pci_dev(pdev) {
1666 for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
1667 struct resource *rp = &pdev->resource[i];
1668 int flags = rp->flags;
1669
1670 /* Active and same type? */
1671 if ((flags & IORESOURCE_MEM) == 0)
1672 continue;
1673 /* In the range of this resource? */
1674 if (offset < (rp->start & PAGE_MASK) ||
1675 offset > rp->end)
1676 continue;
1677 found = rp;
1678 break;
1679 }
1680 if (found)
1681 break;
1682 }
1683 if (found) {
1684 if (found->flags & IORESOURCE_PREFETCH)
1685 prot &= ~_PAGE_GUARDED;
1686 pci_dev_put(pdev);
1687 }
1688
1689 DBG("non-PCI map for %lx, prot: %lx\n", offset, prot);
1690
1691 return __pgprot(prot);
1692}
1693
1694
1695/*
1696 * Perform the actual remap of the pages for a PCI device mapping, as
1697 * appropriate for this architecture. The region in the process to map
1698 * is described by vm_start and vm_end members of VMA, the base physical
1699 * address is found in vm_pgoff.
1700 * The pci device structure is provided so that architectures may make mapping
1701 * decisions on a per-device or per-bus basis.
1702 *
1703 * Returns a negative error code on failure, zero on success.
1704 */
1705int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
1706 enum pci_mmap_state mmap_state,
1707 int write_combine)
1708{
1709 resource_size_t offset = vma->vm_pgoff << PAGE_SHIFT;
1710 struct resource *rp;
1711 int ret;
1712
1713 rp = __pci_mmap_make_offset(dev, &offset, mmap_state);
1714 if (rp == NULL)
1715 return -EINVAL;
1716
1717 vma->vm_pgoff = offset >> PAGE_SHIFT;
1718 vma->vm_page_prot = __pci_mmap_set_pgprot(dev, rp,
1719 vma->vm_page_prot,
1720 mmap_state, write_combine);
1721
1722 ret = remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
1723 vma->vm_end - vma->vm_start, vma->vm_page_prot);
1724
1725 return ret;
1726}
1727
1728/* Obsolete functions. Should be removed once the symbios driver
1729 * is fixed
1730 */
1731unsigned long
1732phys_to_bus(unsigned long pa)
1733{
1734 struct pci_controller *hose;
1735 int i;
1736
1737 for (hose = hose_head; hose; hose = hose->next) {
1738 for (i = 0; i < 3; ++i) {
1739 if (pa >= hose->mem_resources[i].start
1740 && pa <= hose->mem_resources[i].end) {
1741 /*
1742 * XXX the hose->pci_mem_offset really
1743 * only applies to mem_resources[0].
1744 * We need a way to store an offset for
1745 * the others. -- paulus
1746 */
1747 if (i == 0)
1748 pa -= hose->pci_mem_offset;
1749 return pa;
1750 }
1751 }
1752 }
1753 /* hmmm, didn't find it */
1754 return 0;
1755}
1756
1757unsigned long
1758pci_phys_to_bus(unsigned long pa, int busnr)
1759{
1760 struct pci_controller* hose = pci_bus_to_hose(busnr);
1761 if (!hose)
1762 return pa;
1763 return pa - hose->pci_mem_offset;
1764}
1765
1766unsigned long
1767pci_bus_to_phys(unsigned int ba, int busnr)
1768{
1769 struct pci_controller* hose = pci_bus_to_hose(busnr);
1770 if (!hose)
1771 return ba;
1772 return ba + hose->pci_mem_offset;
1773}
1774
1775/* Provide information on locations of various I/O regions in physical 1346/* Provide information on locations of various I/O regions in physical
1776 * memory. Do this on a per-card basis so that we choose the right 1347 * memory. Do this on a per-card basis so that we choose the right
1777 * root bridge. 1348 * root bridge.
@@ -1814,62 +1385,11 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn)
1814 return result; 1385 return result;
1815} 1386}
1816 1387
1817void pci_resource_to_user(const struct pci_dev *dev, int bar,
1818 const struct resource *rsrc,
1819 resource_size_t *start, resource_size_t *end)
1820{
1821 struct pci_controller *hose = pci_bus_to_hose(dev->bus->number);
1822 resource_size_t offset = 0;
1823
1824 if (hose == NULL)
1825 return;
1826
1827 if (rsrc->flags & IORESOURCE_IO)
1828 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
1829
1830 /* We pass a fully fixed up address to userland for MMIO instead of
1831 * a BAR value because X is lame and expects to be able to use that
1832 * to pass to /dev/mem !
1833 *
1834 * That means that we'll have potentially 64 bits values where some
1835 * userland apps only expect 32 (like X itself since it thinks only
1836 * Sparc has 64 bits MMIO) but if we don't do that, we break it on
1837 * 32 bits CHRPs :-(
1838 *
1839 * Hopefully, the sysfs insterface is immune to that gunk. Once X
1840 * has been fixed (and the fix spread enough), we can re-enable the
1841 * 2 lines below and pass down a BAR value to userland. In that case
1842 * we'll also have to re-enable the matching code in
1843 * __pci_mmap_make_offset().
1844 *
1845 * BenH.
1846 */
1847#if 0
1848 else if (rsrc->flags & IORESOURCE_MEM)
1849 offset = hose->pci_mem_offset;
1850#endif
1851
1852 *start = rsrc->start - offset;
1853 *end = rsrc->end - offset;
1854}
1855
1856void __init pci_init_resource(struct resource *res, resource_size_t start,
1857 resource_size_t end, int flags, char *name)
1858{
1859 res->start = start;
1860 res->end = end;
1861 res->flags = flags;
1862 res->name = name;
1863 res->parent = NULL;
1864 res->sibling = NULL;
1865 res->child = NULL;
1866}
1867
1868unsigned long pci_address_to_pio(phys_addr_t address) 1388unsigned long pci_address_to_pio(phys_addr_t address)
1869{ 1389{
1870 struct pci_controller* hose = hose_head; 1390 struct pci_controller *hose, *tmp;
1871 1391
1872 for (; hose; hose = hose->next) { 1392 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
1873 unsigned int size = hose->io_resource.end - 1393 unsigned int size = hose->io_resource.end -
1874 hose->io_resource.start + 1; 1394 hose->io_resource.start + 1;
1875 if (address >= hose->io_base_phys && 1395 if (address >= hose->io_base_phys &&
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 249cca27a9b8..a97e23ac1976 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -22,6 +22,7 @@
22#include <linux/list.h> 22#include <linux/list.h>
23#include <linux/syscalls.h> 23#include <linux/syscalls.h>
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/vmalloc.h>
25 26
26#include <asm/processor.h> 27#include <asm/processor.h>
27#include <asm/io.h> 28#include <asm/io.h>
@@ -41,35 +42,23 @@
41 42
42unsigned long pci_probe_only = 1; 43unsigned long pci_probe_only = 1;
43int pci_assign_all_buses = 0; 44int pci_assign_all_buses = 0;
44static int pci_initial_scan_done;
45 45
46static void fixup_resource(struct resource *res, struct pci_dev *dev); 46static void fixup_resource(struct resource *res, struct pci_dev *dev);
47static void do_bus_setup(struct pci_bus *bus); 47static void do_bus_setup(struct pci_bus *bus);
48static void phbs_remap_io(void);
49 48
50/* pci_io_base -- the base address from which io bars are offsets. 49/* pci_io_base -- the base address from which io bars are offsets.
51 * This is the lowest I/O base address (so bar values are always positive), 50 * This is the lowest I/O base address (so bar values are always positive),
52 * and it *must* be the start of ISA space if an ISA bus exists because 51 * and it *must* be the start of ISA space if an ISA bus exists because
53 * ISA drivers use hard coded offsets. If no ISA bus exists a dummy 52 * ISA drivers use hard coded offsets. If no ISA bus exists nothing
54 * page is mapped and isa_io_limit prevents access to it. 53 * is mapped on the first 64K of IO space
55 */ 54 */
56unsigned long isa_io_base; /* NULL if no ISA bus */ 55unsigned long pci_io_base = ISA_IO_BASE;
57EXPORT_SYMBOL(isa_io_base);
58unsigned long pci_io_base;
59EXPORT_SYMBOL(pci_io_base); 56EXPORT_SYMBOL(pci_io_base);
60 57
61void iSeries_pcibios_init(void);
62
63LIST_HEAD(hose_list); 58LIST_HEAD(hose_list);
64 59
65static struct dma_mapping_ops *pci_dma_ops; 60static struct dma_mapping_ops *pci_dma_ops;
66 61
67int global_phb_number; /* Global phb counter */
68
69/* Cached ISA bridge dev. */
70struct pci_dev *ppc64_isabridge_dev = NULL;
71EXPORT_SYMBOL_GPL(ppc64_isabridge_dev);
72
73void set_pci_dma_ops(struct dma_mapping_ops *dma_ops) 62void set_pci_dma_ops(struct dma_mapping_ops *dma_ops)
74{ 63{
75 pci_dma_ops = dma_ops; 64 pci_dma_ops = dma_ops;
@@ -100,7 +89,7 @@ void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region
100 return; 89 return;
101 90
102 if (res->flags & IORESOURCE_IO) 91 if (res->flags & IORESOURCE_IO)
103 offset = (unsigned long)hose->io_base_virt - pci_io_base; 92 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
104 93
105 if (res->flags & IORESOURCE_MEM) 94 if (res->flags & IORESOURCE_MEM)
106 offset = hose->pci_mem_offset; 95 offset = hose->pci_mem_offset;
@@ -119,7 +108,7 @@ void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
119 return; 108 return;
120 109
121 if (res->flags & IORESOURCE_IO) 110 if (res->flags & IORESOURCE_IO)
122 offset = (unsigned long)hose->io_base_virt - pci_io_base; 111 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
123 112
124 if (res->flags & IORESOURCE_MEM) 113 if (res->flags & IORESOURCE_MEM)
125 offset = hose->pci_mem_offset; 114 offset = hose->pci_mem_offset;
@@ -156,7 +145,7 @@ void pcibios_align_resource(void *data, struct resource *res,
156 145
157 if (res->flags & IORESOURCE_IO) { 146 if (res->flags & IORESOURCE_IO) {
158 unsigned long offset = (unsigned long)hose->io_base_virt - 147 unsigned long offset = (unsigned long)hose->io_base_virt -
159 pci_io_base; 148 _IO_BASE;
160 /* Make sure we start at our min on all hoses */ 149 /* Make sure we start at our min on all hoses */
161 if (start - offset < PCIBIOS_MIN_IO) 150 if (start - offset < PCIBIOS_MIN_IO)
162 start = PCIBIOS_MIN_IO + offset; 151 start = PCIBIOS_MIN_IO + offset;
@@ -180,55 +169,6 @@ void pcibios_align_resource(void *data, struct resource *res,
180 res->start = start; 169 res->start = start;
181} 170}
182 171
183static DEFINE_SPINLOCK(hose_spinlock);
184
185/*
186 * pci_controller(phb) initialized common variables.
187 */
188static void __devinit pci_setup_pci_controller(struct pci_controller *hose)
189{
190 memset(hose, 0, sizeof(struct pci_controller));
191
192 spin_lock(&hose_spinlock);
193 hose->global_number = global_phb_number++;
194 list_add_tail(&hose->list_node, &hose_list);
195 spin_unlock(&hose_spinlock);
196}
197
198struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
199{
200 struct pci_controller *phb;
201
202 if (mem_init_done)
203 phb = kmalloc(sizeof(struct pci_controller), GFP_KERNEL);
204 else
205 phb = alloc_bootmem(sizeof (struct pci_controller));
206 if (phb == NULL)
207 return NULL;
208 pci_setup_pci_controller(phb);
209 phb->arch_data = dev;
210 phb->is_dynamic = mem_init_done;
211 if (dev) {
212 int nid = of_node_to_nid(dev);
213
214 if (nid < 0 || !node_online(nid))
215 nid = -1;
216
217 PHB_SET_NODE(phb, nid);
218 }
219 return phb;
220}
221
222void pcibios_free_controller(struct pci_controller *phb)
223{
224 spin_lock(&hose_spinlock);
225 list_del(&phb->list_node);
226 spin_unlock(&hose_spinlock);
227
228 if (phb->is_dynamic)
229 kfree(phb);
230}
231
232void __devinit pcibios_claim_one_bus(struct pci_bus *b) 172void __devinit pcibios_claim_one_bus(struct pci_bus *b)
233{ 173{
234 struct pci_dev *dev; 174 struct pci_dev *dev;
@@ -291,7 +231,6 @@ static unsigned int pci_parse_of_flags(u32 addr0)
291 return flags; 231 return flags;
292} 232}
293 233
294#define GET_64BIT(prop, i) ((((u64) (prop)[(i)]) << 32) | (prop)[(i)+1])
295 234
296static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev) 235static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev)
297{ 236{
@@ -310,8 +249,8 @@ static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev)
310 flags = pci_parse_of_flags(addrs[0]); 249 flags = pci_parse_of_flags(addrs[0]);
311 if (!flags) 250 if (!flags)
312 continue; 251 continue;
313 base = GET_64BIT(addrs, 1); 252 base = of_read_number(&addrs[1], 2);
314 size = GET_64BIT(addrs, 3); 253 size = of_read_number(&addrs[3], 2);
315 if (!size) 254 if (!size)
316 continue; 255 continue;
317 i = addrs[0] & 0xff; 256 i = addrs[0] & 0xff;
@@ -367,8 +306,10 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
367 sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), 306 sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus),
368 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); 307 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
369 dev->class = get_int_prop(node, "class-code", 0); 308 dev->class = get_int_prop(node, "class-code", 0);
309 dev->revision = get_int_prop(node, "revision-id", 0);
370 310
371 DBG(" class: 0x%x\n", dev->class); 311 DBG(" class: 0x%x\n", dev->class);
312 DBG(" revision: 0x%x\n", dev->revision);
372 313
373 dev->current_state = 4; /* unknown power state */ 314 dev->current_state = 4; /* unknown power state */
374 dev->error_state = pci_channel_io_normal; 315 dev->error_state = pci_channel_io_normal;
@@ -477,7 +418,7 @@ void __devinit of_scan_pci_bridge(struct device_node *node,
477 i = 1; 418 i = 1;
478 for (; len >= 32; len -= 32, ranges += 8) { 419 for (; len >= 32; len -= 32, ranges += 8) {
479 flags = pci_parse_of_flags(ranges[0]); 420 flags = pci_parse_of_flags(ranges[0]);
480 size = GET_64BIT(ranges, 6); 421 size = of_read_number(&ranges[6], 2);
481 if (flags == 0 || size == 0) 422 if (flags == 0 || size == 0)
482 continue; 423 continue;
483 if (flags & IORESOURCE_IO) { 424 if (flags & IORESOURCE_IO) {
@@ -496,7 +437,7 @@ void __devinit of_scan_pci_bridge(struct device_node *node,
496 res = bus->resource[i]; 437 res = bus->resource[i];
497 ++i; 438 ++i;
498 } 439 }
499 res->start = GET_64BIT(ranges, 1); 440 res->start = of_read_number(&ranges[1], 2);
500 res->end = res->start + size - 1; 441 res->end = res->start + size - 1;
501 res->flags = flags; 442 res->flags = flags;
502 fixup_resource(res, dev); 443 fixup_resource(res, dev);
@@ -535,10 +476,16 @@ void __devinit scan_phb(struct pci_controller *hose)
535 bus->secondary = hose->first_busno; 476 bus->secondary = hose->first_busno;
536 hose->bus = bus; 477 hose->bus = bus;
537 478
479 if (!firmware_has_feature(FW_FEATURE_ISERIES))
480 pcibios_map_io_space(bus);
481
538 bus->resource[0] = res = &hose->io_resource; 482 bus->resource[0] = res = &hose->io_resource;
539 if (res->flags && request_resource(&ioport_resource, res)) 483 if (res->flags && request_resource(&ioport_resource, res)) {
540 printk(KERN_ERR "Failed to request PCI IO region " 484 printk(KERN_ERR "Failed to request PCI IO region "
541 "on PCI domain %04x\n", hose->global_number); 485 "on PCI domain %04x\n", hose->global_number);
486 DBG("res->start = 0x%016lx, res->end = 0x%016lx\n",
487 res->start, res->end);
488 }
542 489
543 for (i = 0; i < 3; ++i) { 490 for (i = 0; i < 3; ++i) {
544 res = &hose->mem_resources[i]; 491 res = &hose->mem_resources[i];
@@ -596,17 +543,6 @@ static int __init pcibios_init(void)
596 if (ppc_md.pcibios_fixup) 543 if (ppc_md.pcibios_fixup)
597 ppc_md.pcibios_fixup(); 544 ppc_md.pcibios_fixup();
598 545
599 /* Cache the location of the ISA bridge (if we have one) */
600 ppc64_isabridge_dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL);
601 if (ppc64_isabridge_dev != NULL)
602 printk(KERN_DEBUG "ISA bridge at %s\n", pci_name(ppc64_isabridge_dev));
603
604 if (!firmware_has_feature(FW_FEATURE_ISERIES))
605 /* map in PCI I/O space */
606 phbs_remap_io();
607
608 pci_initial_scan_done = 1;
609
610 printk(KERN_DEBUG "PCI: Probing PCI hardware done\n"); 546 printk(KERN_DEBUG "PCI: Probing PCI hardware done\n");
611 547
612 return 0; 548 return 0;
@@ -614,11 +550,6 @@ static int __init pcibios_init(void)
614 550
615subsys_initcall(pcibios_init); 551subsys_initcall(pcibios_init);
616 552
617char __init *pcibios_setup(char *str)
618{
619 return str;
620}
621
622int pcibios_enable_device(struct pci_dev *dev, int mask) 553int pcibios_enable_device(struct pci_dev *dev, int mask)
623{ 554{
624 u16 cmd, oldcmd; 555 u16 cmd, oldcmd;
@@ -649,22 +580,6 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
649 return 0; 580 return 0;
650} 581}
651 582
652/*
653 * Return the domain number for this bus.
654 */
655int pci_domain_nr(struct pci_bus *bus)
656{
657 if (firmware_has_feature(FW_FEATURE_ISERIES))
658 return 0;
659 else {
660 struct pci_controller *hose = pci_bus_to_host(bus);
661
662 return hose->global_number;
663 }
664}
665
666EXPORT_SYMBOL(pci_domain_nr);
667
668/* Decide whether to display the domain number in /proc */ 583/* Decide whether to display the domain number in /proc */
669int pci_proc_domain(struct pci_bus *bus) 584int pci_proc_domain(struct pci_bus *bus)
670{ 585{
@@ -676,281 +591,6 @@ int pci_proc_domain(struct pci_bus *bus)
676 } 591 }
677} 592}
678 593
679/*
680 * Platform support for /proc/bus/pci/X/Y mmap()s,
681 * modelled on the sparc64 implementation by Dave Miller.
682 * -- paulus.
683 */
684
685/*
686 * Adjust vm_pgoff of VMA such that it is the physical page offset
687 * corresponding to the 32-bit pci bus offset for DEV requested by the user.
688 *
689 * Basically, the user finds the base address for his device which he wishes
690 * to mmap. They read the 32-bit value from the config space base register,
691 * add whatever PAGE_SIZE multiple offset they wish, and feed this into the
692 * offset parameter of mmap on /proc/bus/pci/XXX for that device.
693 *
694 * Returns negative error code on failure, zero on success.
695 */
696static struct resource *__pci_mmap_make_offset(struct pci_dev *dev,
697 resource_size_t *offset,
698 enum pci_mmap_state mmap_state)
699{
700 struct pci_controller *hose = pci_bus_to_host(dev->bus);
701 unsigned long io_offset = 0;
702 int i, res_bit;
703
704 if (hose == 0)
705 return NULL; /* should never happen */
706
707 /* If memory, add on the PCI bridge address offset */
708 if (mmap_state == pci_mmap_mem) {
709#if 0 /* See comment in pci_resource_to_user() for why this is disabled */
710 *offset += hose->pci_mem_offset;
711#endif
712 res_bit = IORESOURCE_MEM;
713 } else {
714 io_offset = (unsigned long)hose->io_base_virt - pci_io_base;
715 *offset += io_offset;
716 res_bit = IORESOURCE_IO;
717 }
718
719 /*
720 * Check that the offset requested corresponds to one of the
721 * resources of the device.
722 */
723 for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
724 struct resource *rp = &dev->resource[i];
725 int flags = rp->flags;
726
727 /* treat ROM as memory (should be already) */
728 if (i == PCI_ROM_RESOURCE)
729 flags |= IORESOURCE_MEM;
730
731 /* Active and same type? */
732 if ((flags & res_bit) == 0)
733 continue;
734
735 /* In the range of this resource? */
736 if (*offset < (rp->start & PAGE_MASK) || *offset > rp->end)
737 continue;
738
739 /* found it! construct the final physical address */
740 if (mmap_state == pci_mmap_io)
741 *offset += hose->io_base_phys - io_offset;
742 return rp;
743 }
744
745 return NULL;
746}
747
748/*
749 * Set vm_page_prot of VMA, as appropriate for this architecture, for a pci
750 * device mapping.
751 */
752static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp,
753 pgprot_t protection,
754 enum pci_mmap_state mmap_state,
755 int write_combine)
756{
757 unsigned long prot = pgprot_val(protection);
758
759 /* Write combine is always 0 on non-memory space mappings. On
760 * memory space, if the user didn't pass 1, we check for a
761 * "prefetchable" resource. This is a bit hackish, but we use
762 * this to workaround the inability of /sysfs to provide a write
763 * combine bit
764 */
765 if (mmap_state != pci_mmap_mem)
766 write_combine = 0;
767 else if (write_combine == 0) {
768 if (rp->flags & IORESOURCE_PREFETCH)
769 write_combine = 1;
770 }
771
772 /* XXX would be nice to have a way to ask for write-through */
773 prot |= _PAGE_NO_CACHE;
774 if (write_combine)
775 prot &= ~_PAGE_GUARDED;
776 else
777 prot |= _PAGE_GUARDED;
778
779 return __pgprot(prot);
780}
781
782/*
783 * This one is used by /dev/mem and fbdev who have no clue about the
784 * PCI device, it tries to find the PCI device first and calls the
785 * above routine
786 */
787pgprot_t pci_phys_mem_access_prot(struct file *file,
788 unsigned long pfn,
789 unsigned long size,
790 pgprot_t protection)
791{
792 struct pci_dev *pdev = NULL;
793 struct resource *found = NULL;
794 unsigned long prot = pgprot_val(protection);
795 unsigned long offset = pfn << PAGE_SHIFT;
796 int i;
797
798 if (page_is_ram(pfn))
799 return __pgprot(prot);
800
801 prot |= _PAGE_NO_CACHE | _PAGE_GUARDED;
802
803 for_each_pci_dev(pdev) {
804 for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
805 struct resource *rp = &pdev->resource[i];
806 int flags = rp->flags;
807
808 /* Active and same type? */
809 if ((flags & IORESOURCE_MEM) == 0)
810 continue;
811 /* In the range of this resource? */
812 if (offset < (rp->start & PAGE_MASK) ||
813 offset > rp->end)
814 continue;
815 found = rp;
816 break;
817 }
818 if (found)
819 break;
820 }
821 if (found) {
822 if (found->flags & IORESOURCE_PREFETCH)
823 prot &= ~_PAGE_GUARDED;
824 pci_dev_put(pdev);
825 }
826
827 DBG("non-PCI map for %lx, prot: %lx\n", offset, prot);
828
829 return __pgprot(prot);
830}
831
832
833/*
834 * Perform the actual remap of the pages for a PCI device mapping, as
835 * appropriate for this architecture. The region in the process to map
836 * is described by vm_start and vm_end members of VMA, the base physical
837 * address is found in vm_pgoff.
838 * The pci device structure is provided so that architectures may make mapping
839 * decisions on a per-device or per-bus basis.
840 *
841 * Returns a negative error code on failure, zero on success.
842 */
843int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
844 enum pci_mmap_state mmap_state, int write_combine)
845{
846 resource_size_t offset = vma->vm_pgoff << PAGE_SHIFT;
847 struct resource *rp;
848 int ret;
849
850 rp = __pci_mmap_make_offset(dev, &offset, mmap_state);
851 if (rp == NULL)
852 return -EINVAL;
853
854 vma->vm_pgoff = offset >> PAGE_SHIFT;
855 vma->vm_page_prot = __pci_mmap_set_pgprot(dev, rp,
856 vma->vm_page_prot,
857 mmap_state, write_combine);
858
859 ret = remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
860 vma->vm_end - vma->vm_start, vma->vm_page_prot);
861
862 return ret;
863}
864
865static ssize_t pci_show_devspec(struct device *dev,
866 struct device_attribute *attr, char *buf)
867{
868 struct pci_dev *pdev;
869 struct device_node *np;
870
871 pdev = to_pci_dev (dev);
872 np = pci_device_to_OF_node(pdev);
873 if (np == NULL || np->full_name == NULL)
874 return 0;
875 return sprintf(buf, "%s", np->full_name);
876}
877static DEVICE_ATTR(devspec, S_IRUGO, pci_show_devspec, NULL);
878
879void pcibios_add_platform_entries(struct pci_dev *pdev)
880{
881 device_create_file(&pdev->dev, &dev_attr_devspec);
882}
883
884#define ISA_SPACE_MASK 0x1
885#define ISA_SPACE_IO 0x1
886
887static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
888 unsigned long phb_io_base_phys,
889 void __iomem * phb_io_base_virt)
890{
891 /* Remove these asap */
892
893 struct pci_address {
894 u32 a_hi;
895 u32 a_mid;
896 u32 a_lo;
897 };
898
899 struct isa_address {
900 u32 a_hi;
901 u32 a_lo;
902 };
903
904 struct isa_range {
905 struct isa_address isa_addr;
906 struct pci_address pci_addr;
907 unsigned int size;
908 };
909
910 const struct isa_range *range;
911 unsigned long pci_addr;
912 unsigned int isa_addr;
913 unsigned int size;
914 int rlen = 0;
915
916 range = of_get_property(isa_node, "ranges", &rlen);
917 if (range == NULL || (rlen < sizeof(struct isa_range))) {
918 printk(KERN_ERR "no ISA ranges or unexpected isa range size,"
919 "mapping 64k\n");
920 __ioremap_explicit(phb_io_base_phys,
921 (unsigned long)phb_io_base_virt,
922 0x10000, _PAGE_NO_CACHE | _PAGE_GUARDED);
923 return;
924 }
925
926 /* From "ISA Binding to 1275"
927 * The ranges property is laid out as an array of elements,
928 * each of which comprises:
929 * cells 0 - 1: an ISA address
930 * cells 2 - 4: a PCI address
931 * (size depending on dev->n_addr_cells)
932 * cell 5: the size of the range
933 */
934 if ((range->isa_addr.a_hi && ISA_SPACE_MASK) == ISA_SPACE_IO) {
935 isa_addr = range->isa_addr.a_lo;
936 pci_addr = (unsigned long) range->pci_addr.a_mid << 32 |
937 range->pci_addr.a_lo;
938
939 /* Assume these are both zero */
940 if ((pci_addr != 0) || (isa_addr != 0)) {
941 printk(KERN_ERR "unexpected isa to pci mapping: %s\n",
942 __FUNCTION__);
943 return;
944 }
945
946 size = PAGE_ALIGN(range->size);
947
948 __ioremap_explicit(phb_io_base_phys,
949 (unsigned long) phb_io_base_virt,
950 size, _PAGE_NO_CACHE | _PAGE_GUARDED);
951 }
952}
953
954void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, 594void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
955 struct device_node *dev, int prim) 595 struct device_node *dev, int prim)
956{ 596{
@@ -1045,155 +685,122 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
1045 } 685 }
1046} 686}
1047 687
1048void __devinit pci_setup_phb_io(struct pci_controller *hose, int primary) 688#ifdef CONFIG_HOTPLUG
689
690int pcibios_unmap_io_space(struct pci_bus *bus)
1049{ 691{
1050 unsigned long size = hose->pci_io_size; 692 struct pci_controller *hose;
1051 unsigned long io_virt_offset;
1052 struct resource *res;
1053 struct device_node *isa_dn;
1054 693
1055 if (size == 0) 694 WARN_ON(bus == NULL);
1056 return;
1057 695
1058 hose->io_base_virt = reserve_phb_iospace(size); 696 /* If this is not a PHB, we only flush the hash table over
1059 DBG("phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n", 697 * the area mapped by this bridge. We don't play with the PTE
1060 hose->global_number, hose->io_base_phys, 698 * mappings since we might have to deal with sub-page alignemnts
1061 (unsigned long) hose->io_base_virt); 699 * so flushing the hash table is the only sane way to make sure
1062 700 * that no hash entries are covering that removed bridge area
1063 if (primary) { 701 * while still allowing other busses overlapping those pages
1064 pci_io_base = (unsigned long)hose->io_base_virt; 702 */
1065 isa_dn = of_find_node_by_type(NULL, "isa"); 703 if (bus->self) {
1066 if (isa_dn) { 704 struct resource *res = bus->resource[0];
1067 isa_io_base = pci_io_base;
1068 pci_process_ISA_OF_ranges(isa_dn, hose->io_base_phys,
1069 hose->io_base_virt);
1070 of_node_put(isa_dn);
1071 }
1072 }
1073 705
1074 io_virt_offset = (unsigned long)hose->io_base_virt - pci_io_base; 706 DBG("IO unmapping for PCI-PCI bridge %s\n",
1075 res = &hose->io_resource; 707 pci_name(bus->self));
1076 res->start += io_virt_offset;
1077 res->end += io_virt_offset;
1078 708
1079 /* If this is called after the initial PCI scan, then we need to 709 __flush_hash_table_range(&init_mm, res->start + _IO_BASE,
1080 * proceed to IO mappings now 710 res->end - res->start + 1);
1081 */ 711 return 0;
1082 if (pci_initial_scan_done) 712 }
1083 __ioremap_explicit(hose->io_base_phys,
1084 (unsigned long)hose->io_base_virt,
1085 hose->pci_io_size,
1086 _PAGE_NO_CACHE | _PAGE_GUARDED);
1087}
1088 713
1089void __devinit pci_setup_phb_io_dynamic(struct pci_controller *hose, 714 /* Get the host bridge */
1090 int primary) 715 hose = pci_bus_to_host(bus);
1091{
1092 unsigned long size = hose->pci_io_size;
1093 unsigned long io_virt_offset;
1094 struct resource *res;
1095 716
1096 if (size == 0) 717 /* Check if we have IOs allocated */
1097 return; 718 if (hose->io_base_alloc == 0)
719 return 0;
1098 720
1099 hose->io_base_virt = __ioremap(hose->io_base_phys, size, 721 DBG("IO unmapping for PHB %s\n",
1100 _PAGE_NO_CACHE | _PAGE_GUARDED); 722 ((struct device_node *)hose->arch_data)->full_name);
1101 DBG("phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n", 723 DBG(" alloc=0x%p\n", hose->io_base_alloc);
1102 hose->global_number, hose->io_base_phys,
1103 (unsigned long) hose->io_base_virt);
1104 724
1105 if (primary) 725 /* This is a PHB, we fully unmap the IO area */
1106 pci_io_base = (unsigned long)hose->io_base_virt; 726 vunmap(hose->io_base_alloc);
1107 727
1108 io_virt_offset = (unsigned long)hose->io_base_virt - pci_io_base; 728 return 0;
1109 res = &hose->io_resource;
1110 res->start += io_virt_offset;
1111 res->end += io_virt_offset;
1112} 729}
730EXPORT_SYMBOL_GPL(pcibios_unmap_io_space);
1113 731
732#endif /* CONFIG_HOTPLUG */
1114 733
1115static int get_bus_io_range(struct pci_bus *bus, unsigned long *start_phys, 734int __devinit pcibios_map_io_space(struct pci_bus *bus)
1116 unsigned long *start_virt, unsigned long *size)
1117{ 735{
1118 struct pci_controller *hose = pci_bus_to_host(bus); 736 struct vm_struct *area;
1119 struct resource *res; 737 unsigned long phys_page;
1120 738 unsigned long size_page;
1121 if (bus->self) 739 unsigned long io_virt_offset;
1122 res = bus->resource[0]; 740 struct pci_controller *hose;
1123 else
1124 /* Root Bus */
1125 res = &hose->io_resource;
1126
1127 if (res->end == 0 && res->start == 0)
1128 return 1;
1129 741
1130 *start_virt = pci_io_base + res->start; 742 WARN_ON(bus == NULL);
1131 *start_phys = *start_virt + hose->io_base_phys
1132 - (unsigned long) hose->io_base_virt;
1133 743
1134 if (res->end > res->start) 744 /* If this not a PHB, nothing to do, page tables still exist and
1135 *size = res->end - res->start + 1; 745 * thus HPTEs will be faulted in when needed
1136 else { 746 */
1137 printk("%s(): unexpected region 0x%lx->0x%lx\n", 747 if (bus->self) {
1138 __FUNCTION__, res->start, res->end); 748 DBG("IO mapping for PCI-PCI bridge %s\n",
1139 return 1; 749 pci_name(bus->self));
750 DBG(" virt=0x%016lx...0x%016lx\n",
751 bus->resource[0]->start + _IO_BASE,
752 bus->resource[0]->end + _IO_BASE);
753 return 0;
1140 } 754 }
1141 755
1142 return 0; 756 /* Get the host bridge */
1143} 757 hose = pci_bus_to_host(bus);
1144 758 phys_page = _ALIGN_DOWN(hose->io_base_phys, PAGE_SIZE);
1145int unmap_bus_range(struct pci_bus *bus) 759 size_page = _ALIGN_UP(hose->pci_io_size, PAGE_SIZE);
1146{
1147 unsigned long start_phys;
1148 unsigned long start_virt;
1149 unsigned long size;
1150 760
1151 if (!bus) { 761 /* Make sure IO area address is clear */
1152 printk(KERN_ERR "%s() expected bus\n", __FUNCTION__); 762 hose->io_base_alloc = NULL;
1153 return 1;
1154 }
1155
1156 if (get_bus_io_range(bus, &start_phys, &start_virt, &size))
1157 return 1;
1158 if (__iounmap_explicit((void __iomem *) start_virt, size))
1159 return 1;
1160
1161 return 0;
1162}
1163EXPORT_SYMBOL(unmap_bus_range);
1164 763
1165int remap_bus_range(struct pci_bus *bus) 764 /* If there's no IO to map on that bus, get away too */
1166{ 765 if (hose->pci_io_size == 0 || hose->io_base_phys == 0)
1167 unsigned long start_phys; 766 return 0;
1168 unsigned long start_virt;
1169 unsigned long size;
1170 767
1171 if (!bus) { 768 /* Let's allocate some IO space for that guy. We don't pass
1172 printk(KERN_ERR "%s() expected bus\n", __FUNCTION__); 769 * VM_IOREMAP because we don't care about alignment tricks that
1173 return 1; 770 * the core does in that case. Maybe we should due to stupid card
1174 } 771 * with incomplete address decoding but I'd rather not deal with
1175 772 * those outside of the reserved 64K legacy region.
1176 773 */
1177 if (get_bus_io_range(bus, &start_phys, &start_virt, &size)) 774 area = __get_vm_area(size_page, 0, PHB_IO_BASE, PHB_IO_END);
1178 return 1; 775 if (area == NULL)
1179 if (start_phys == 0) 776 return -ENOMEM;
1180 return 1; 777 hose->io_base_alloc = area->addr;
1181 printk(KERN_DEBUG "mapping IO %lx -> %lx, size: %lx\n", start_phys, start_virt, size); 778 hose->io_base_virt = (void __iomem *)(area->addr +
1182 if (__ioremap_explicit(start_phys, start_virt, size, 779 hose->io_base_phys - phys_page);
1183 _PAGE_NO_CACHE | _PAGE_GUARDED)) 780
1184 return 1; 781 DBG("IO mapping for PHB %s\n",
782 ((struct device_node *)hose->arch_data)->full_name);
783 DBG(" phys=0x%016lx, virt=0x%p (alloc=0x%p)\n",
784 hose->io_base_phys, hose->io_base_virt, hose->io_base_alloc);
785 DBG(" size=0x%016lx (alloc=0x%016lx)\n",
786 hose->pci_io_size, size_page);
787
788 /* Establish the mapping */
789 if (__ioremap_at(phys_page, area->addr, size_page,
790 _PAGE_NO_CACHE | _PAGE_GUARDED) == NULL)
791 return -ENOMEM;
792
793 /* Fixup hose IO resource */
794 io_virt_offset = (unsigned long)hose->io_base_virt - _IO_BASE;
795 hose->io_resource.start += io_virt_offset;
796 hose->io_resource.end += io_virt_offset;
797
798 DBG(" hose->io_resource=0x%016lx...0x%016lx\n",
799 hose->io_resource.start, hose->io_resource.end);
1185 800
1186 return 0; 801 return 0;
1187} 802}
1188EXPORT_SYMBOL(remap_bus_range); 803EXPORT_SYMBOL_GPL(pcibios_map_io_space);
1189
1190static void phbs_remap_io(void)
1191{
1192 struct pci_controller *hose, *tmp;
1193
1194 list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
1195 remap_bus_range(hose->bus);
1196}
1197 804
1198static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev) 805static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
1199{ 806{
@@ -1201,8 +808,7 @@ static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
1201 unsigned long offset; 808 unsigned long offset;
1202 809
1203 if (res->flags & IORESOURCE_IO) { 810 if (res->flags & IORESOURCE_IO) {
1204 offset = (unsigned long)hose->io_base_virt - pci_io_base; 811 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
1205
1206 res->start += offset; 812 res->start += offset;
1207 res->end += offset; 813 res->end += offset;
1208 } else if (res->flags & IORESOURCE_MEM) { 814 } else if (res->flags & IORESOURCE_MEM) {
@@ -1217,9 +823,20 @@ void __devinit pcibios_fixup_device_resources(struct pci_dev *dev,
1217 /* Update device resources. */ 823 /* Update device resources. */
1218 int i; 824 int i;
1219 825
1220 for (i = 0; i < PCI_NUM_RESOURCES; i++) 826 DBG("%s: Fixup resources:\n", pci_name(dev));
1221 if (dev->resource[i].flags) 827 for (i = 0; i < PCI_NUM_RESOURCES; i++) {
1222 fixup_resource(&dev->resource[i], dev); 828 struct resource *res = &dev->resource[i];
829 if (!res->flags)
830 continue;
831
832 DBG(" 0x%02x < %08lx:0x%016lx...0x%016lx\n",
833 i, res->flags, res->start, res->end);
834
835 fixup_resource(res, dev);
836
837 DBG(" > %08lx:0x%016lx...0x%016lx\n",
838 res->flags, res->start, res->end);
839 }
1223} 840}
1224EXPORT_SYMBOL(pcibios_fixup_device_resources); 841EXPORT_SYMBOL(pcibios_fixup_device_resources);
1225 842
@@ -1289,119 +906,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
1289} 906}
1290EXPORT_SYMBOL(pcibios_fixup_bus); 907EXPORT_SYMBOL(pcibios_fixup_bus);
1291 908
1292/*
1293 * Reads the interrupt pin to determine if interrupt is use by card.
1294 * If the interrupt is used, then gets the interrupt line from the
1295 * openfirmware and sets it in the pci_dev and pci_config line.
1296 */
1297int pci_read_irq_line(struct pci_dev *pci_dev)
1298{
1299 struct of_irq oirq;
1300 unsigned int virq;
1301
1302 DBG("Try to map irq for %s...\n", pci_name(pci_dev));
1303
1304#ifdef DEBUG
1305 memset(&oirq, 0xff, sizeof(oirq));
1306#endif
1307 /* Try to get a mapping from the device-tree */
1308 if (of_irq_map_pci(pci_dev, &oirq)) {
1309 u8 line, pin;
1310
1311 /* If that fails, lets fallback to what is in the config
1312 * space and map that through the default controller. We
1313 * also set the type to level low since that's what PCI
1314 * interrupts are. If your platform does differently, then
1315 * either provide a proper interrupt tree or don't use this
1316 * function.
1317 */
1318 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &pin))
1319 return -1;
1320 if (pin == 0)
1321 return -1;
1322 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) ||
1323 line == 0xff) {
1324 return -1;
1325 }
1326 DBG(" -> no map ! Using irq line %d from PCI config\n", line);
1327
1328 virq = irq_create_mapping(NULL, line);
1329 if (virq != NO_IRQ)
1330 set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
1331 } else {
1332 DBG(" -> got one, spec %d cells (0x%08x 0x%08x...) on %s\n",
1333 oirq.size, oirq.specifier[0], oirq.specifier[1],
1334 oirq.controller->full_name);
1335
1336 virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
1337 oirq.size);
1338 }
1339 if(virq == NO_IRQ) {
1340 DBG(" -> failed to map !\n");
1341 return -1;
1342 }
1343
1344 DBG(" -> mapped to linux irq %d\n", virq);
1345
1346 pci_dev->irq = virq;
1347
1348 return 0;
1349}
1350EXPORT_SYMBOL(pci_read_irq_line);
1351
1352void pci_resource_to_user(const struct pci_dev *dev, int bar,
1353 const struct resource *rsrc,
1354 resource_size_t *start, resource_size_t *end)
1355{
1356 struct pci_controller *hose = pci_bus_to_host(dev->bus);
1357 resource_size_t offset = 0;
1358
1359 if (hose == NULL)
1360 return;
1361
1362 if (rsrc->flags & IORESOURCE_IO)
1363 offset = (unsigned long)hose->io_base_virt - pci_io_base;
1364
1365 /* We pass a fully fixed up address to userland for MMIO instead of
1366 * a BAR value because X is lame and expects to be able to use that
1367 * to pass to /dev/mem !
1368 *
1369 * That means that we'll have potentially 64 bits values where some
1370 * userland apps only expect 32 (like X itself since it thinks only
1371 * Sparc has 64 bits MMIO) but if we don't do that, we break it on
1372 * 32 bits CHRPs :-(
1373 *
1374 * Hopefully, the sysfs insterface is immune to that gunk. Once X
1375 * has been fixed (and the fix spread enough), we can re-enable the
1376 * 2 lines below and pass down a BAR value to userland. In that case
1377 * we'll also have to re-enable the matching code in
1378 * __pci_mmap_make_offset().
1379 *
1380 * BenH.
1381 */
1382#if 0
1383 else if (rsrc->flags & IORESOURCE_MEM)
1384 offset = hose->pci_mem_offset;
1385#endif
1386
1387 *start = rsrc->start - offset;
1388 *end = rsrc->end - offset;
1389}
1390
1391struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node)
1392{
1393 if (!have_of)
1394 return NULL;
1395 while(node) {
1396 struct pci_controller *hose, *tmp;
1397 list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
1398 if (hose->arch_data == node)
1399 return hose;
1400 node = node->parent;
1401 }
1402 return NULL;
1403}
1404
1405unsigned long pci_address_to_pio(phys_addr_t address) 909unsigned long pci_address_to_pio(phys_addr_t address)
1406{ 910{
1407 struct pci_controller *hose, *tmp; 911 struct pci_controller *hose, *tmp;
@@ -1410,7 +914,7 @@ unsigned long pci_address_to_pio(phys_addr_t address)
1410 if (address >= hose->io_base_phys && 914 if (address >= hose->io_base_phys &&
1411 address < (hose->io_base_phys + hose->pci_io_size)) { 915 address < (hose->io_base_phys + hose->pci_io_size)) {
1412 unsigned long base = 916 unsigned long base =
1413 (unsigned long)hose->io_base_virt - pci_io_base; 917 (unsigned long)hose->io_base_virt - _IO_BASE;
1414 return base + (address - hose->io_base_phys); 918 return base + (address - hose->io_base_phys);
1415 } 919 }
1416 } 920 }
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index c96fa9bd35a4..a20f1951a5ce 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -67,7 +67,6 @@ EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
67EXPORT_SYMBOL(DMA_MODE_READ); 67EXPORT_SYMBOL(DMA_MODE_READ);
68EXPORT_SYMBOL(DMA_MODE_WRITE); 68EXPORT_SYMBOL(DMA_MODE_WRITE);
69 69
70EXPORT_SYMBOL(do_signal);
71EXPORT_SYMBOL(transfer_to_handler); 70EXPORT_SYMBOL(transfer_to_handler);
72EXPORT_SYMBOL(do_IRQ); 71EXPORT_SYMBOL(do_IRQ);
73EXPORT_SYMBOL(machine_check_exception); 72EXPORT_SYMBOL(machine_check_exception);
@@ -106,10 +105,6 @@ EXPORT_SYMBOL(isa_mem_base);
106EXPORT_SYMBOL(pci_dram_offset); 105EXPORT_SYMBOL(pci_dram_offset);
107EXPORT_SYMBOL(pci_alloc_consistent); 106EXPORT_SYMBOL(pci_alloc_consistent);
108EXPORT_SYMBOL(pci_free_consistent); 107EXPORT_SYMBOL(pci_free_consistent);
109EXPORT_SYMBOL(pci_bus_io_base);
110EXPORT_SYMBOL(pci_bus_io_base_phys);
111EXPORT_SYMBOL(pci_bus_mem_base_phys);
112EXPORT_SYMBOL(pci_bus_to_hose);
113#endif /* CONFIG_PCI */ 108#endif /* CONFIG_PCI */
114 109
115EXPORT_SYMBOL(start_thread); 110EXPORT_SYMBOL(start_thread);
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 6e2f03566b0d..84f000a45e36 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -219,22 +219,26 @@ void discard_lazy_cpu_state(void)
219} 219}
220#endif /* CONFIG_SMP */ 220#endif /* CONFIG_SMP */
221 221
222#ifdef CONFIG_PPC_MERGE /* XXX for now */
223int set_dabr(unsigned long dabr) 222int set_dabr(unsigned long dabr)
224{ 223{
224#ifdef CONFIG_PPC_MERGE /* XXX for now */
225 if (ppc_md.set_dabr) 225 if (ppc_md.set_dabr)
226 return ppc_md.set_dabr(dabr); 226 return ppc_md.set_dabr(dabr);
227#endif
227 228
229 /* XXX should we have a CPU_FTR_HAS_DABR ? */
230#if defined(CONFIG_PPC64) || defined(CONFIG_6xx)
228 mtspr(SPRN_DABR, dabr); 231 mtspr(SPRN_DABR, dabr);
232#endif
229 return 0; 233 return 0;
230} 234}
231#endif
232 235
233#ifdef CONFIG_PPC64 236#ifdef CONFIG_PPC64
234DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array); 237DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array);
235static DEFINE_PER_CPU(unsigned long, current_dabr);
236#endif 238#endif
237 239
240static DEFINE_PER_CPU(unsigned long, current_dabr);
241
238struct task_struct *__switch_to(struct task_struct *prev, 242struct task_struct *__switch_to(struct task_struct *prev,
239 struct task_struct *new) 243 struct task_struct *new)
240{ 244{
@@ -299,12 +303,10 @@ struct task_struct *__switch_to(struct task_struct *prev,
299 303
300#endif /* CONFIG_SMP */ 304#endif /* CONFIG_SMP */
301 305
302#ifdef CONFIG_PPC64 /* for now */
303 if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) { 306 if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) {
304 set_dabr(new->thread.dabr); 307 set_dabr(new->thread.dabr);
305 __get_cpu_var(current_dabr) = new->thread.dabr; 308 __get_cpu_var(current_dabr) = new->thread.dabr;
306 } 309 }
307#endif /* CONFIG_PPC64 */
308 310
309 new_thread = &new->thread; 311 new_thread = &new->thread;
310 old_thread = &current->thread; 312 old_thread = &current->thread;
@@ -473,12 +475,10 @@ void flush_thread(void)
473 475
474 discard_lazy_cpu_state(); 476 discard_lazy_cpu_state();
475 477
476#ifdef CONFIG_PPC64 /* for now */
477 if (current->thread.dabr) { 478 if (current->thread.dabr) {
478 current->thread.dabr = 0; 479 current->thread.dabr = 0;
479 set_dabr(0); 480 set_dabr(0);
480 } 481 }
481#endif
482} 482}
483 483
484void 484void
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 066a6a7a25b8..bdcd23d8d8b9 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -52,6 +52,7 @@
52#include <asm/pSeries_reconfig.h> 52#include <asm/pSeries_reconfig.h>
53#include <asm/pci-bridge.h> 53#include <asm/pci-bridge.h>
54#include <asm/kexec.h> 54#include <asm/kexec.h>
55#include <asm/system.h>
55 56
56#ifdef DEBUG 57#ifdef DEBUG
57#define DBG(fmt...) printk(KERN_ERR fmt) 58#define DBG(fmt...) printk(KERN_ERR fmt)
@@ -77,12 +78,9 @@ static struct boot_param_header *initial_boot_params __initdata;
77struct boot_param_header *initial_boot_params; 78struct boot_param_header *initial_boot_params;
78#endif 79#endif
79 80
80static struct device_node *allnodes = NULL; 81extern struct device_node *allnodes; /* temporary while merging */
81 82
82/* use when traversing tree through the allnext, child, sibling, 83extern rwlock_t devtree_lock; /* temporary while merging */
83 * or parent members of struct device_node.
84 */
85static DEFINE_RWLOCK(devtree_lock);
86 84
87/* export that to outside world */ 85/* export that to outside world */
88struct device_node *of_chosen; 86struct device_node *of_chosen;
@@ -1005,7 +1003,7 @@ static void __init early_reserve_mem(void)
1005 1003
1006void __init early_init_devtree(void *params) 1004void __init early_init_devtree(void *params)
1007{ 1005{
1008 DBG(" -> early_init_devtree()\n"); 1006 DBG(" -> early_init_devtree(%p)\n", params);
1009 1007
1010 /* Setup flat device-tree pointer */ 1008 /* Setup flat device-tree pointer */
1011 initial_boot_params = params; 1009 initial_boot_params = params;
@@ -1055,62 +1053,6 @@ void __init early_init_devtree(void *params)
1055 DBG(" <- early_init_devtree()\n"); 1053 DBG(" <- early_init_devtree()\n");
1056} 1054}
1057 1055
1058#undef printk
1059
1060int of_n_addr_cells(struct device_node* np)
1061{
1062 const int *ip;
1063 do {
1064 if (np->parent)
1065 np = np->parent;
1066 ip = of_get_property(np, "#address-cells", NULL);
1067 if (ip != NULL)
1068 return *ip;
1069 } while (np->parent);
1070 /* No #address-cells property for the root node, default to 1 */
1071 return 1;
1072}
1073EXPORT_SYMBOL(of_n_addr_cells);
1074
1075int of_n_size_cells(struct device_node* np)
1076{
1077 const int* ip;
1078 do {
1079 if (np->parent)
1080 np = np->parent;
1081 ip = of_get_property(np, "#size-cells", NULL);
1082 if (ip != NULL)
1083 return *ip;
1084 } while (np->parent);
1085 /* No #size-cells property for the root node, default to 1 */
1086 return 1;
1087}
1088EXPORT_SYMBOL(of_n_size_cells);
1089
1090/** Checks if the given "compat" string matches one of the strings in
1091 * the device's "compatible" property
1092 */
1093int of_device_is_compatible(const struct device_node *device,
1094 const char *compat)
1095{
1096 const char* cp;
1097 int cplen, l;
1098
1099 cp = of_get_property(device, "compatible", &cplen);
1100 if (cp == NULL)
1101 return 0;
1102 while (cplen > 0) {
1103 if (strncasecmp(cp, compat, strlen(compat)) == 0)
1104 return 1;
1105 l = strlen(cp) + 1;
1106 cp += l;
1107 cplen -= l;
1108 }
1109
1110 return 0;
1111}
1112EXPORT_SYMBOL(of_device_is_compatible);
1113
1114 1056
1115/** 1057/**
1116 * Indicates whether the root node has a given value in its 1058 * Indicates whether the root node has a given value in its
@@ -1142,118 +1084,6 @@ EXPORT_SYMBOL(machine_is_compatible);
1142 *******/ 1084 *******/
1143 1085
1144/** 1086/**
1145 * of_find_node_by_name - Find a node by its "name" property
1146 * @from: The node to start searching from or NULL, the node
1147 * you pass will not be searched, only the next one
1148 * will; typically, you pass what the previous call
1149 * returned. of_node_put() will be called on it
1150 * @name: The name string to match against
1151 *
1152 * Returns a node pointer with refcount incremented, use
1153 * of_node_put() on it when done.
1154 */
1155struct device_node *of_find_node_by_name(struct device_node *from,
1156 const char *name)
1157{
1158 struct device_node *np;
1159
1160 read_lock(&devtree_lock);
1161 np = from ? from->allnext : allnodes;
1162 for (; np != NULL; np = np->allnext)
1163 if (np->name != NULL && strcasecmp(np->name, name) == 0
1164 && of_node_get(np))
1165 break;
1166 of_node_put(from);
1167 read_unlock(&devtree_lock);
1168 return np;
1169}
1170EXPORT_SYMBOL(of_find_node_by_name);
1171
1172/**
1173 * of_find_node_by_type - Find a node by its "device_type" property
1174 * @from: The node to start searching from or NULL, the node
1175 * you pass will not be searched, only the next one
1176 * will; typically, you pass what the previous call
1177 * returned. of_node_put() will be called on it
1178 * @name: The type string to match against
1179 *
1180 * Returns a node pointer with refcount incremented, use
1181 * of_node_put() on it when done.
1182 */
1183struct device_node *of_find_node_by_type(struct device_node *from,
1184 const char *type)
1185{
1186 struct device_node *np;
1187
1188 read_lock(&devtree_lock);
1189 np = from ? from->allnext : allnodes;
1190 for (; np != 0; np = np->allnext)
1191 if (np->type != 0 && strcasecmp(np->type, type) == 0
1192 && of_node_get(np))
1193 break;
1194 of_node_put(from);
1195 read_unlock(&devtree_lock);
1196 return np;
1197}
1198EXPORT_SYMBOL(of_find_node_by_type);
1199
1200/**
1201 * of_find_compatible_node - Find a node based on type and one of the
1202 * tokens in its "compatible" property
1203 * @from: The node to start searching from or NULL, the node
1204 * you pass will not be searched, only the next one
1205 * will; typically, you pass what the previous call
1206 * returned. of_node_put() will be called on it
1207 * @type: The type string to match "device_type" or NULL to ignore
1208 * @compatible: The string to match to one of the tokens in the device
1209 * "compatible" list.
1210 *
1211 * Returns a node pointer with refcount incremented, use
1212 * of_node_put() on it when done.
1213 */
1214struct device_node *of_find_compatible_node(struct device_node *from,
1215 const char *type, const char *compatible)
1216{
1217 struct device_node *np;
1218
1219 read_lock(&devtree_lock);
1220 np = from ? from->allnext : allnodes;
1221 for (; np != 0; np = np->allnext) {
1222 if (type != NULL
1223 && !(np->type != 0 && strcasecmp(np->type, type) == 0))
1224 continue;
1225 if (of_device_is_compatible(np, compatible) && of_node_get(np))
1226 break;
1227 }
1228 of_node_put(from);
1229 read_unlock(&devtree_lock);
1230 return np;
1231}
1232EXPORT_SYMBOL(of_find_compatible_node);
1233
1234/**
1235 * of_find_node_by_path - Find a node matching a full OF path
1236 * @path: The full path to match
1237 *
1238 * Returns a node pointer with refcount incremented, use
1239 * of_node_put() on it when done.
1240 */
1241struct device_node *of_find_node_by_path(const char *path)
1242{
1243 struct device_node *np = allnodes;
1244
1245 read_lock(&devtree_lock);
1246 for (; np != 0; np = np->allnext) {
1247 if (np->full_name != 0 && strcasecmp(np->full_name, path) == 0
1248 && of_node_get(np))
1249 break;
1250 }
1251 read_unlock(&devtree_lock);
1252 return np;
1253}
1254EXPORT_SYMBOL(of_find_node_by_path);
1255
1256/**
1257 * of_find_node_by_phandle - Find a node given a phandle 1087 * of_find_node_by_phandle - Find a node given a phandle
1258 * @handle: phandle of the node to find 1088 * @handle: phandle of the node to find
1259 * 1089 *
@@ -1298,51 +1128,6 @@ struct device_node *of_find_all_nodes(struct device_node *prev)
1298EXPORT_SYMBOL(of_find_all_nodes); 1128EXPORT_SYMBOL(of_find_all_nodes);
1299 1129
1300/** 1130/**
1301 * of_get_parent - Get a node's parent if any
1302 * @node: Node to get parent
1303 *
1304 * Returns a node pointer with refcount incremented, use
1305 * of_node_put() on it when done.
1306 */
1307struct device_node *of_get_parent(const struct device_node *node)
1308{
1309 struct device_node *np;
1310
1311 if (!node)
1312 return NULL;
1313
1314 read_lock(&devtree_lock);
1315 np = of_node_get(node->parent);
1316 read_unlock(&devtree_lock);
1317 return np;
1318}
1319EXPORT_SYMBOL(of_get_parent);
1320
1321/**
1322 * of_get_next_child - Iterate a node childs
1323 * @node: parent node
1324 * @prev: previous child of the parent node, or NULL to get first
1325 *
1326 * Returns a node pointer with refcount incremented, use
1327 * of_node_put() on it when done.
1328 */
1329struct device_node *of_get_next_child(const struct device_node *node,
1330 struct device_node *prev)
1331{
1332 struct device_node *next;
1333
1334 read_lock(&devtree_lock);
1335 next = prev ? prev->sibling : node->child;
1336 for (; next != 0; next = next->sibling)
1337 if (of_node_get(next))
1338 break;
1339 of_node_put(prev);
1340 read_unlock(&devtree_lock);
1341 return next;
1342}
1343EXPORT_SYMBOL(of_get_next_child);
1344
1345/**
1346 * of_node_get - Increment refcount of a node 1131 * of_node_get - Increment refcount of a node
1347 * @node: Node to inc refcount, NULL is supported to 1132 * @node: Node to inc refcount, NULL is supported to
1348 * simplify writing of callers 1133 * simplify writing of callers
@@ -1374,8 +1159,17 @@ static void of_node_release(struct kref *kref)
1374 struct device_node *node = kref_to_device_node(kref); 1159 struct device_node *node = kref_to_device_node(kref);
1375 struct property *prop = node->properties; 1160 struct property *prop = node->properties;
1376 1161
1377 if (!OF_IS_DYNAMIC(node)) 1162 /* We should never be releasing nodes that haven't been detached. */
1163 if (!of_node_check_flag(node, OF_DETACHED)) {
1164 printk("WARNING: Bad of_node_put() on %s\n", node->full_name);
1165 dump_stack();
1166 kref_init(&node->kref);
1167 return;
1168 }
1169
1170 if (!of_node_check_flag(node, OF_DYNAMIC))
1378 return; 1171 return;
1172
1379 while (prop) { 1173 while (prop) {
1380 struct property *next = prop->next; 1174 struct property *next = prop->next;
1381 kfree(prop->name); 1175 kfree(prop->name);
@@ -1431,6 +1225,8 @@ void of_detach_node(const struct device_node *np)
1431 write_lock(&devtree_lock); 1225 write_lock(&devtree_lock);
1432 1226
1433 parent = np->parent; 1227 parent = np->parent;
1228 if (!parent)
1229 goto out_unlock;
1434 1230
1435 if (allnodes == np) 1231 if (allnodes == np)
1436 allnodes = np->allnext; 1232 allnodes = np->allnext;
@@ -1454,6 +1250,9 @@ void of_detach_node(const struct device_node *np)
1454 prevsib->sibling = np->sibling; 1250 prevsib->sibling = np->sibling;
1455 } 1251 }
1456 1252
1253 of_node_set_flag(np, OF_DETACHED);
1254
1255out_unlock:
1457 write_unlock(&devtree_lock); 1256 write_unlock(&devtree_lock);
1458} 1257}
1459 1258
@@ -1529,37 +1328,6 @@ static int __init prom_reconfig_setup(void)
1529__initcall(prom_reconfig_setup); 1328__initcall(prom_reconfig_setup);
1530#endif 1329#endif
1531 1330
1532struct property *of_find_property(const struct device_node *np,
1533 const char *name,
1534 int *lenp)
1535{
1536 struct property *pp;
1537
1538 read_lock(&devtree_lock);
1539 for (pp = np->properties; pp != 0; pp = pp->next)
1540 if (strcmp(pp->name, name) == 0) {
1541 if (lenp != 0)
1542 *lenp = pp->length;
1543 break;
1544 }
1545 read_unlock(&devtree_lock);
1546
1547 return pp;
1548}
1549EXPORT_SYMBOL(of_find_property);
1550
1551/*
1552 * Find a property with a given name for a given node
1553 * and return the value.
1554 */
1555const void *of_get_property(const struct device_node *np, const char *name,
1556 int *lenp)
1557{
1558 struct property *pp = of_find_property(np,name,lenp);
1559 return pp ? pp->value : NULL;
1560}
1561EXPORT_SYMBOL(of_get_property);
1562
1563/* 1331/*
1564 * Add a property to a node 1332 * Add a property to a node
1565 */ 1333 */
@@ -1715,22 +1483,18 @@ struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
1715} 1483}
1716EXPORT_SYMBOL(of_get_cpu_node); 1484EXPORT_SYMBOL(of_get_cpu_node);
1717 1485
1718#ifdef DEBUG 1486#if defined(CONFIG_DEBUG_FS) && defined(DEBUG)
1719static struct debugfs_blob_wrapper flat_dt_blob; 1487static struct debugfs_blob_wrapper flat_dt_blob;
1720 1488
1721static int __init export_flat_device_tree(void) 1489static int __init export_flat_device_tree(void)
1722{ 1490{
1723 struct dentry *d; 1491 struct dentry *d;
1724 1492
1725 d = debugfs_create_dir("powerpc", NULL);
1726 if (!d)
1727 return 1;
1728
1729 flat_dt_blob.data = initial_boot_params; 1493 flat_dt_blob.data = initial_boot_params;
1730 flat_dt_blob.size = initial_boot_params->totalsize; 1494 flat_dt_blob.size = initial_boot_params->totalsize;
1731 1495
1732 d = debugfs_create_blob("flat-device-tree", S_IFREG | S_IRUSR, 1496 d = debugfs_create_blob("flat-device-tree", S_IFREG | S_IRUSR,
1733 d, &flat_dt_blob); 1497 powerpc_debugfs_root, &flat_dt_blob);
1734 if (!d) 1498 if (!d)
1735 return 1; 1499 return 1;
1736 1500
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index d6047c441034..a1d582e38627 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -635,6 +635,7 @@ static void __init early_cmdline_parse(void)
635/* ibm,dynamic-reconfiguration-memory property supported */ 635/* ibm,dynamic-reconfiguration-memory property supported */
636#define OV5_DRCONF_MEMORY 0x20 636#define OV5_DRCONF_MEMORY 0x20
637#define OV5_LARGE_PAGES 0x10 /* large pages supported */ 637#define OV5_LARGE_PAGES 0x10 /* large pages supported */
638#define OV5_DONATE_DEDICATE_CPU 0x02 /* donate dedicated CPU support */
638/* PCIe/MSI support. Without MSI full PCIe is not supported */ 639/* PCIe/MSI support. Without MSI full PCIe is not supported */
639#ifdef CONFIG_PCI_MSI 640#ifdef CONFIG_PCI_MSI
640#define OV5_MSI 0x01 /* PCIe/MSI support */ 641#define OV5_MSI 0x01 /* PCIe/MSI support */
@@ -685,7 +686,8 @@ static unsigned char ibm_architecture_vec[] = {
685 /* option vector 5: PAPR/OF options */ 686 /* option vector 5: PAPR/OF options */
686 3 - 2, /* length */ 687 3 - 2, /* length */
687 0, /* don't ignore, don't halt */ 688 0, /* don't ignore, don't halt */
688 OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES | OV5_DRCONF_MEMORY | OV5_MSI, 689 OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES | OV5_DRCONF_MEMORY |
690 OV5_DONATE_DEDICATE_CPU | OV5_MSI,
689}; 691};
690 692
691/* Old method - ELF header with PT_NOTE sections */ 693/* Old method - ELF header with PT_NOTE sections */
diff --git a/arch/powerpc/kernel/ptrace-common.h b/arch/powerpc/kernel/ptrace-common.h
deleted file mode 100644
index 8797ae737a7b..000000000000
--- a/arch/powerpc/kernel/ptrace-common.h
+++ /dev/null
@@ -1,161 +0,0 @@
1/*
2 * Copyright (c) 2002 Stephen Rothwell, IBM Coproration
3 * Extracted from ptrace.c and ptrace32.c
4 *
5 * This file is subject to the terms and conditions of the GNU General
6 * Public License. See the file README.legal in the main directory of
7 * this archive for more details.
8 */
9
10#ifndef _PPC64_PTRACE_COMMON_H
11#define _PPC64_PTRACE_COMMON_H
12
13#include <asm/system.h>
14
15/*
16 * Set of msr bits that gdb can change on behalf of a process.
17 */
18#define MSR_DEBUGCHANGE (MSR_FE0 | MSR_SE | MSR_BE | MSR_FE1)
19
20/*
21 * Get contents of register REGNO in task TASK.
22 */
23static inline unsigned long get_reg(struct task_struct *task, int regno)
24{
25 unsigned long tmp = 0;
26
27 /*
28 * Put the correct FP bits in, they might be wrong as a result
29 * of our lazy FP restore.
30 */
31 if (regno == PT_MSR) {
32 tmp = ((unsigned long *)task->thread.regs)[PT_MSR];
33 tmp |= task->thread.fpexc_mode;
34 } else if (regno < (sizeof(struct pt_regs) / sizeof(unsigned long))) {
35 tmp = ((unsigned long *)task->thread.regs)[regno];
36 }
37
38 return tmp;
39}
40
41/*
42 * Write contents of register REGNO in task TASK.
43 */
44static inline int put_reg(struct task_struct *task, int regno,
45 unsigned long data)
46{
47 if (regno < PT_SOFTE) {
48 if (regno == PT_MSR)
49 data = (data & MSR_DEBUGCHANGE)
50 | (task->thread.regs->msr & ~MSR_DEBUGCHANGE);
51 ((unsigned long *)task->thread.regs)[regno] = data;
52 return 0;
53 }
54 return -EIO;
55}
56
57static inline void set_single_step(struct task_struct *task)
58{
59 struct pt_regs *regs = task->thread.regs;
60 if (regs != NULL)
61 regs->msr |= MSR_SE;
62 set_tsk_thread_flag(task, TIF_SINGLESTEP);
63}
64
65static inline void clear_single_step(struct task_struct *task)
66{
67 struct pt_regs *regs = task->thread.regs;
68 if (regs != NULL)
69 regs->msr &= ~MSR_SE;
70 clear_tsk_thread_flag(task, TIF_SINGLESTEP);
71}
72
73#ifdef CONFIG_ALTIVEC
74/*
75 * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go.
76 * The transfer totals 34 quadword. Quadwords 0-31 contain the
77 * corresponding vector registers. Quadword 32 contains the vscr as the
78 * last word (offset 12) within that quadword. Quadword 33 contains the
79 * vrsave as the first word (offset 0) within the quadword.
80 *
81 * This definition of the VMX state is compatible with the current PPC32
82 * ptrace interface. This allows signal handling and ptrace to use the
83 * same structures. This also simplifies the implementation of a bi-arch
84 * (combined (32- and 64-bit) gdb.
85 */
86
87/*
88 * Get contents of AltiVec register state in task TASK
89 */
90static inline int get_vrregs(unsigned long __user *data,
91 struct task_struct *task)
92{
93 unsigned long regsize;
94
95 /* copy AltiVec registers VR[0] .. VR[31] */
96 regsize = 32 * sizeof(vector128);
97 if (copy_to_user(data, task->thread.vr, regsize))
98 return -EFAULT;
99 data += (regsize / sizeof(unsigned long));
100
101 /* copy VSCR */
102 regsize = 1 * sizeof(vector128);
103 if (copy_to_user(data, &task->thread.vscr, regsize))
104 return -EFAULT;
105 data += (regsize / sizeof(unsigned long));
106
107 /* copy VRSAVE */
108 if (put_user(task->thread.vrsave, (u32 __user *)data))
109 return -EFAULT;
110
111 return 0;
112}
113
114/*
115 * Write contents of AltiVec register state into task TASK.
116 */
117static inline int set_vrregs(struct task_struct *task,
118 unsigned long __user *data)
119{
120 unsigned long regsize;
121
122 /* copy AltiVec registers VR[0] .. VR[31] */
123 regsize = 32 * sizeof(vector128);
124 if (copy_from_user(task->thread.vr, data, regsize))
125 return -EFAULT;
126 data += (regsize / sizeof(unsigned long));
127
128 /* copy VSCR */
129 regsize = 1 * sizeof(vector128);
130 if (copy_from_user(&task->thread.vscr, data, regsize))
131 return -EFAULT;
132 data += (regsize / sizeof(unsigned long));
133
134 /* copy VRSAVE */
135 if (get_user(task->thread.vrsave, (u32 __user *)data))
136 return -EFAULT;
137
138 return 0;
139}
140#endif
141
142static inline int ptrace_set_debugreg(struct task_struct *task,
143 unsigned long addr, unsigned long data)
144{
145 /* We only support one DABR and no IABRS at the moment */
146 if (addr > 0)
147 return -EINVAL;
148
149 /* The bottom 3 bits are flags */
150 if ((data & ~0x7UL) >= TASK_SIZE)
151 return -EIO;
152
153 /* Ensure translation is on */
154 if (data && !(data & DABR_TRANSLATION))
155 return -EIO;
156
157 task->thread.dabr = data;
158 return 0;
159}
160
161#endif /* _PPC64_PTRACE_COMMON_H */
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index f4f391cdd8f5..8a177bd9eab4 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -35,11 +35,11 @@
35#include <asm/pgtable.h> 35#include <asm/pgtable.h>
36#include <asm/system.h> 36#include <asm/system.h>
37 37
38#ifdef CONFIG_PPC64 38/*
39#include "ptrace-common.h" 39 * does not yet catch signals sent when the child dies.
40#endif 40 * in exit.c or in signal.c.
41 */
41 42
42#ifdef CONFIG_PPC32
43/* 43/*
44 * Set of msr bits that gdb can change on behalf of a process. 44 * Set of msr bits that gdb can change on behalf of a process.
45 */ 45 */
@@ -48,65 +48,117 @@
48#else 48#else
49#define MSR_DEBUGCHANGE (MSR_SE | MSR_BE) 49#define MSR_DEBUGCHANGE (MSR_SE | MSR_BE)
50#endif 50#endif
51#endif /* CONFIG_PPC32 */
52 51
53/* 52/*
54 * does not yet catch signals sent when the child dies. 53 * Max register writeable via put_reg
55 * in exit.c or in signal.c.
56 */ 54 */
57
58#ifdef CONFIG_PPC32 55#ifdef CONFIG_PPC32
56#define PT_MAX_PUT_REG PT_MQ
57#else
58#define PT_MAX_PUT_REG PT_CCR
59#endif
60
59/* 61/*
60 * Get contents of register REGNO in task TASK. 62 * Get contents of register REGNO in task TASK.
61 */ 63 */
62static inline unsigned long get_reg(struct task_struct *task, int regno) 64unsigned long ptrace_get_reg(struct task_struct *task, int regno)
63{ 65{
64 if (regno < sizeof(struct pt_regs) / sizeof(unsigned long) 66 unsigned long tmp = 0;
65 && task->thread.regs != NULL) 67
68 if (task->thread.regs == NULL)
69 return -EIO;
70
71 if (regno == PT_MSR) {
72 tmp = ((unsigned long *)task->thread.regs)[PT_MSR];
73 return tmp | task->thread.fpexc_mode;
74 }
75
76 if (regno < (sizeof(struct pt_regs) / sizeof(unsigned long)))
66 return ((unsigned long *)task->thread.regs)[regno]; 77 return ((unsigned long *)task->thread.regs)[regno];
67 return (0); 78
79 return -EIO;
68} 80}
69 81
70/* 82/*
71 * Write contents of register REGNO in task TASK. 83 * Write contents of register REGNO in task TASK.
72 */ 84 */
73static inline int put_reg(struct task_struct *task, int regno, 85int ptrace_put_reg(struct task_struct *task, int regno, unsigned long data)
74 unsigned long data)
75{ 86{
76 if (regno <= PT_MQ && task->thread.regs != NULL) { 87 if (task->thread.regs == NULL)
88 return -EIO;
89
90 if (regno <= PT_MAX_PUT_REG || regno == PT_TRAP) {
77 if (regno == PT_MSR) 91 if (regno == PT_MSR)
78 data = (data & MSR_DEBUGCHANGE) 92 data = (data & MSR_DEBUGCHANGE)
79 | (task->thread.regs->msr & ~MSR_DEBUGCHANGE); 93 | (task->thread.regs->msr & ~MSR_DEBUGCHANGE);
94 /* We prevent mucking around with the reserved area of trap
95 * which are used internally by the kernel
96 */
97 if (regno == PT_TRAP)
98 data &= 0xfff0;
80 ((unsigned long *)task->thread.regs)[regno] = data; 99 ((unsigned long *)task->thread.regs)[regno] = data;
81 return 0; 100 return 0;
82 } 101 }
83 return -EIO; 102 return -EIO;
84} 103}
85 104
105
106static int get_fpregs(void __user *data, struct task_struct *task,
107 int has_fpscr)
108{
109 unsigned int count = has_fpscr ? 33 : 32;
110
111 if (copy_to_user(data, task->thread.fpr, count * sizeof(double)))
112 return -EFAULT;
113 return 0;
114}
115
116static int set_fpregs(void __user *data, struct task_struct *task,
117 int has_fpscr)
118{
119 unsigned int count = has_fpscr ? 33 : 32;
120
121 if (copy_from_user(task->thread.fpr, data, count * sizeof(double)))
122 return -EFAULT;
123 return 0;
124}
125
126
86#ifdef CONFIG_ALTIVEC 127#ifdef CONFIG_ALTIVEC
87/* 128/*
129 * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go.
130 * The transfer totals 34 quadword. Quadwords 0-31 contain the
131 * corresponding vector registers. Quadword 32 contains the vscr as the
132 * last word (offset 12) within that quadword. Quadword 33 contains the
133 * vrsave as the first word (offset 0) within the quadword.
134 *
135 * This definition of the VMX state is compatible with the current PPC32
136 * ptrace interface. This allows signal handling and ptrace to use the
137 * same structures. This also simplifies the implementation of a bi-arch
138 * (combined (32- and 64-bit) gdb.
139 */
140
141/*
88 * Get contents of AltiVec register state in task TASK 142 * Get contents of AltiVec register state in task TASK
89 */ 143 */
90static inline int get_vrregs(unsigned long __user *data, struct task_struct *task) 144static int get_vrregs(unsigned long __user *data, struct task_struct *task)
91{ 145{
92 int i, j; 146 unsigned long regsize;
93
94 if (!access_ok(VERIFY_WRITE, data, 133 * sizeof(unsigned long)))
95 return -EFAULT;
96 147
97 /* copy AltiVec registers VR[0] .. VR[31] */ 148 /* copy AltiVec registers VR[0] .. VR[31] */
98 for (i = 0; i < 32; i++) 149 regsize = 32 * sizeof(vector128);
99 for (j = 0; j < 4; j++, data++) 150 if (copy_to_user(data, task->thread.vr, regsize))
100 if (__put_user(task->thread.vr[i].u[j], data)) 151 return -EFAULT;
101 return -EFAULT; 152 data += (regsize / sizeof(unsigned long));
102 153
103 /* copy VSCR */ 154 /* copy VSCR */
104 for (i = 0; i < 4; i++, data++) 155 regsize = 1 * sizeof(vector128);
105 if (__put_user(task->thread.vscr.u[i], data)) 156 if (copy_to_user(data, &task->thread.vscr, regsize))
106 return -EFAULT; 157 return -EFAULT;
158 data += (regsize / sizeof(unsigned long));
107 159
108 /* copy VRSAVE */ 160 /* copy VRSAVE */
109 if (__put_user(task->thread.vrsave, data)) 161 if (put_user(task->thread.vrsave, (u32 __user *)data))
110 return -EFAULT; 162 return -EFAULT;
111 163
112 return 0; 164 return 0;
@@ -115,31 +167,29 @@ static inline int get_vrregs(unsigned long __user *data, struct task_struct *tas
115/* 167/*
116 * Write contents of AltiVec register state into task TASK. 168 * Write contents of AltiVec register state into task TASK.
117 */ 169 */
118static inline int set_vrregs(struct task_struct *task, unsigned long __user *data) 170static int set_vrregs(struct task_struct *task, unsigned long __user *data)
119{ 171{
120 int i, j; 172 unsigned long regsize;
121
122 if (!access_ok(VERIFY_READ, data, 133 * sizeof(unsigned long)))
123 return -EFAULT;
124 173
125 /* copy AltiVec registers VR[0] .. VR[31] */ 174 /* copy AltiVec registers VR[0] .. VR[31] */
126 for (i = 0; i < 32; i++) 175 regsize = 32 * sizeof(vector128);
127 for (j = 0; j < 4; j++, data++) 176 if (copy_from_user(task->thread.vr, data, regsize))
128 if (__get_user(task->thread.vr[i].u[j], data)) 177 return -EFAULT;
129 return -EFAULT; 178 data += (regsize / sizeof(unsigned long));
130 179
131 /* copy VSCR */ 180 /* copy VSCR */
132 for (i = 0; i < 4; i++, data++) 181 regsize = 1 * sizeof(vector128);
133 if (__get_user(task->thread.vscr.u[i], data)) 182 if (copy_from_user(&task->thread.vscr, data, regsize))
134 return -EFAULT; 183 return -EFAULT;
184 data += (regsize / sizeof(unsigned long));
135 185
136 /* copy VRSAVE */ 186 /* copy VRSAVE */
137 if (__get_user(task->thread.vrsave, data)) 187 if (get_user(task->thread.vrsave, (u32 __user *)data))
138 return -EFAULT; 188 return -EFAULT;
139 189
140 return 0; 190 return 0;
141} 191}
142#endif 192#endif /* CONFIG_ALTIVEC */
143 193
144#ifdef CONFIG_SPE 194#ifdef CONFIG_SPE
145 195
@@ -156,7 +206,7 @@ static inline int set_vrregs(struct task_struct *task, unsigned long __user *dat
156/* 206/*
157 * Get contents of SPE register state in task TASK. 207 * Get contents of SPE register state in task TASK.
158 */ 208 */
159static inline int get_evrregs(unsigned long *data, struct task_struct *task) 209static int get_evrregs(unsigned long *data, struct task_struct *task)
160{ 210{
161 int i; 211 int i;
162 212
@@ -182,7 +232,7 @@ static inline int get_evrregs(unsigned long *data, struct task_struct *task)
182/* 232/*
183 * Write contents of SPE register state into task TASK. 233 * Write contents of SPE register state into task TASK.
184 */ 234 */
185static inline int set_evrregs(struct task_struct *task, unsigned long *data) 235static int set_evrregs(struct task_struct *task, unsigned long *data)
186{ 236{
187 int i; 237 int i;
188 238
@@ -205,8 +255,8 @@ static inline int set_evrregs(struct task_struct *task, unsigned long *data)
205} 255}
206#endif /* CONFIG_SPE */ 256#endif /* CONFIG_SPE */
207 257
208static inline void 258
209set_single_step(struct task_struct *task) 259static void set_single_step(struct task_struct *task)
210{ 260{
211 struct pt_regs *regs = task->thread.regs; 261 struct pt_regs *regs = task->thread.regs;
212 262
@@ -218,10 +268,10 @@ set_single_step(struct task_struct *task)
218 regs->msr |= MSR_SE; 268 regs->msr |= MSR_SE;
219#endif 269#endif
220 } 270 }
271 set_tsk_thread_flag(task, TIF_SINGLESTEP);
221} 272}
222 273
223static inline void 274static void clear_single_step(struct task_struct *task)
224clear_single_step(struct task_struct *task)
225{ 275{
226 struct pt_regs *regs = task->thread.regs; 276 struct pt_regs *regs = task->thread.regs;
227 277
@@ -233,8 +283,27 @@ clear_single_step(struct task_struct *task)
233 regs->msr &= ~MSR_SE; 283 regs->msr &= ~MSR_SE;
234#endif 284#endif
235 } 285 }
286 clear_tsk_thread_flag(task, TIF_SINGLESTEP);
287}
288
289static int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
290 unsigned long data)
291{
292 /* We only support one DABR and no IABRS at the moment */
293 if (addr > 0)
294 return -EINVAL;
295
296 /* The bottom 3 bits are flags */
297 if ((data & ~0x7UL) >= TASK_SIZE)
298 return -EIO;
299
300 /* Ensure translation is on */
301 if (data && !(data & DABR_TRANSLATION))
302 return -EIO;
303
304 task->thread.dabr = data;
305 return 0;
236} 306}
237#endif /* CONFIG_PPC32 */
238 307
239/* 308/*
240 * Called by kernel/ptrace.c when detaching.. 309 * Called by kernel/ptrace.c when detaching..
@@ -247,6 +316,62 @@ void ptrace_disable(struct task_struct *child)
247 clear_single_step(child); 316 clear_single_step(child);
248} 317}
249 318
319/*
320 * Here are the old "legacy" powerpc specific getregs/setregs ptrace calls,
321 * we mark them as obsolete now, they will be removed in a future version
322 */
323static long arch_ptrace_old(struct task_struct *child, long request, long addr,
324 long data)
325{
326 int ret = -EPERM;
327
328 switch(request) {
329 case PPC_PTRACE_GETREGS: { /* Get GPRs 0 - 31. */
330 int i;
331 unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
332 unsigned long __user *tmp = (unsigned long __user *)addr;
333
334 for (i = 0; i < 32; i++) {
335 ret = put_user(*reg, tmp);
336 if (ret)
337 break;
338 reg++;
339 tmp++;
340 }
341 break;
342 }
343
344 case PPC_PTRACE_SETREGS: { /* Set GPRs 0 - 31. */
345 int i;
346 unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
347 unsigned long __user *tmp = (unsigned long __user *)addr;
348
349 for (i = 0; i < 32; i++) {
350 ret = get_user(*reg, tmp);
351 if (ret)
352 break;
353 reg++;
354 tmp++;
355 }
356 break;
357 }
358
359 case PPC_PTRACE_GETFPREGS: { /* Get FPRs 0 - 31. */
360 flush_fp_to_thread(child);
361 ret = get_fpregs((void __user *)addr, child, 0);
362 break;
363 }
364
365 case PPC_PTRACE_SETFPREGS: { /* Get FPRs 0 - 31. */
366 flush_fp_to_thread(child);
367 ret = set_fpregs((void __user *)addr, child, 0);
368 break;
369 }
370
371 }
372 return ret;
373}
374
250long arch_ptrace(struct task_struct *child, long request, long addr, long data) 375long arch_ptrace(struct task_struct *child, long request, long addr, long data)
251{ 376{
252 int ret = -EPERM; 377 int ret = -EPERM;
@@ -254,17 +379,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
254 switch (request) { 379 switch (request) {
255 /* when I and D space are separate, these will need to be fixed. */ 380 /* when I and D space are separate, these will need to be fixed. */
256 case PTRACE_PEEKTEXT: /* read word at location addr. */ 381 case PTRACE_PEEKTEXT: /* read word at location addr. */
257 case PTRACE_PEEKDATA: { 382 case PTRACE_PEEKDATA:
258 unsigned long tmp; 383 ret = generic_ptrace_peekdata(child, addr, data);
259 int copied;
260
261 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
262 ret = -EIO;
263 if (copied != sizeof(tmp))
264 break;
265 ret = put_user(tmp,(unsigned long __user *) data);
266 break; 384 break;
267 }
268 385
269 /* read the word at location addr in the USER area. */ 386 /* read the word at location addr in the USER area. */
270 case PTRACE_PEEKUSR: { 387 case PTRACE_PEEKUSR: {
@@ -282,11 +399,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
282#endif 399#endif
283 break; 400 break;
284 401
285#ifdef CONFIG_PPC32
286 CHECK_FULL_REGS(child->thread.regs); 402 CHECK_FULL_REGS(child->thread.regs);
287#endif
288 if (index < PT_FPR0) { 403 if (index < PT_FPR0) {
289 tmp = get_reg(child, (int) index); 404 tmp = ptrace_get_reg(child, (int) index);
290 } else { 405 } else {
291 flush_fp_to_thread(child); 406 flush_fp_to_thread(child);
292 tmp = ((unsigned long *)child->thread.fpr)[index - PT_FPR0]; 407 tmp = ((unsigned long *)child->thread.fpr)[index - PT_FPR0];
@@ -298,11 +413,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
298 /* If I and D space are separate, this will have to be fixed. */ 413 /* If I and D space are separate, this will have to be fixed. */
299 case PTRACE_POKETEXT: /* write the word at location addr. */ 414 case PTRACE_POKETEXT: /* write the word at location addr. */
300 case PTRACE_POKEDATA: 415 case PTRACE_POKEDATA:
301 ret = 0; 416 ret = generic_ptrace_pokedata(child, addr, data);
302 if (access_process_vm(child, addr, &data, sizeof(data), 1)
303 == sizeof(data))
304 break;
305 ret = -EIO;
306 break; 417 break;
307 418
308 /* write the word at location addr in the USER area */ 419 /* write the word at location addr in the USER area */
@@ -321,13 +432,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
321#endif 432#endif
322 break; 433 break;
323 434
324#ifdef CONFIG_PPC32
325 CHECK_FULL_REGS(child->thread.regs); 435 CHECK_FULL_REGS(child->thread.regs);
326#endif
327 if (index == PT_ORIG_R3)
328 break;
329 if (index < PT_FPR0) { 436 if (index < PT_FPR0) {
330 ret = put_reg(child, index, data); 437 ret = ptrace_put_reg(child, index, data);
331 } else { 438 } else {
332 flush_fp_to_thread(child); 439 flush_fp_to_thread(child);
333 ((unsigned long *)child->thread.fpr)[index - PT_FPR0] = data; 440 ((unsigned long *)child->thread.fpr)[index - PT_FPR0] = data;
@@ -382,7 +489,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
382 break; 489 break;
383 } 490 }
384 491
385#ifdef CONFIG_PPC64
386 case PTRACE_GET_DEBUGREG: { 492 case PTRACE_GET_DEBUGREG: {
387 ret = -EINVAL; 493 ret = -EINVAL;
388 /* We only support one DABR and no IABRS at the moment */ 494 /* We only support one DABR and no IABRS at the moment */
@@ -396,73 +502,61 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
396 case PTRACE_SET_DEBUGREG: 502 case PTRACE_SET_DEBUGREG:
397 ret = ptrace_set_debugreg(child, addr, data); 503 ret = ptrace_set_debugreg(child, addr, data);
398 break; 504 break;
399#endif
400 505
401 case PTRACE_DETACH: 506 case PTRACE_DETACH:
402 ret = ptrace_detach(child, data); 507 ret = ptrace_detach(child, data);
403 break; 508 break;
404 509
405 case PPC_PTRACE_GETREGS: { /* Get GPRs 0 - 31. */ 510#ifdef CONFIG_PPC64
406 int i; 511 case PTRACE_GETREGS64:
407 unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; 512#endif
408 unsigned long __user *tmp = (unsigned long __user *)addr; 513 case PTRACE_GETREGS: { /* Get all pt_regs from the child. */
409 514 int ui;
410 for (i = 0; i < 32; i++) { 515 if (!access_ok(VERIFY_WRITE, (void __user *)data,
411 ret = put_user(*reg, tmp); 516 sizeof(struct pt_regs))) {
412 if (ret) 517 ret = -EIO;
413 break; 518 break;
414 reg++; 519 }
415 tmp++; 520 ret = 0;
521 for (ui = 0; ui < PT_REGS_COUNT; ui ++) {
522 ret |= __put_user(ptrace_get_reg(child, ui),
523 (unsigned long __user *) data);
524 data += sizeof(long);
416 } 525 }
417 break; 526 break;
418 } 527 }
419 528
420 case PPC_PTRACE_SETREGS: { /* Set GPRs 0 - 31. */ 529#ifdef CONFIG_PPC64
421 int i; 530 case PTRACE_SETREGS64:
422 unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; 531#endif
423 unsigned long __user *tmp = (unsigned long __user *)addr; 532 case PTRACE_SETREGS: { /* Set all gp regs in the child. */
424 533 unsigned long tmp;
425 for (i = 0; i < 32; i++) { 534 int ui;
426 ret = get_user(*reg, tmp); 535 if (!access_ok(VERIFY_READ, (void __user *)data,
536 sizeof(struct pt_regs))) {
537 ret = -EIO;
538 break;
539 }
540 ret = 0;
541 for (ui = 0; ui < PT_REGS_COUNT; ui ++) {
542 ret = __get_user(tmp, (unsigned long __user *) data);
427 if (ret) 543 if (ret)
428 break; 544 break;
429 reg++; 545 ptrace_put_reg(child, ui, tmp);
430 tmp++; 546 data += sizeof(long);
431 } 547 }
432 break; 548 break;
433 } 549 }
434 550
435 case PPC_PTRACE_GETFPREGS: { /* Get FPRs 0 - 31. */ 551 case PTRACE_GETFPREGS: { /* Get the child FPU state (FPR0...31 + FPSCR) */
436 int i;
437 unsigned long *reg = &((unsigned long *)child->thread.fpr)[0];
438 unsigned long __user *tmp = (unsigned long __user *)addr;
439
440 flush_fp_to_thread(child); 552 flush_fp_to_thread(child);
441 553 ret = get_fpregs((void __user *)data, child, 1);
442 for (i = 0; i < 32; i++) {
443 ret = put_user(*reg, tmp);
444 if (ret)
445 break;
446 reg++;
447 tmp++;
448 }
449 break; 554 break;
450 } 555 }
451 556
452 case PPC_PTRACE_SETFPREGS: { /* Get FPRs 0 - 31. */ 557 case PTRACE_SETFPREGS: { /* Set the child FPU state (FPR0...31 + FPSCR) */
453 int i;
454 unsigned long *reg = &((unsigned long *)child->thread.fpr)[0];
455 unsigned long __user *tmp = (unsigned long __user *)addr;
456
457 flush_fp_to_thread(child); 558 flush_fp_to_thread(child);
458 559 ret = set_fpregs((void __user *)data, child, 1);
459 for (i = 0; i < 32; i++) {
460 ret = get_user(*reg, tmp);
461 if (ret)
462 break;
463 reg++;
464 tmp++;
465 }
466 break; 560 break;
467 } 561 }
468 562
@@ -497,11 +591,18 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
497 break; 591 break;
498#endif 592#endif
499 593
594 /* Old reverse args ptrace callss */
595 case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */
596 case PPC_PTRACE_SETREGS: /* Set GPRs 0 - 31. */
597 case PPC_PTRACE_GETFPREGS: /* Get FPRs 0 - 31. */
598 case PPC_PTRACE_SETFPREGS: /* Get FPRs 0 - 31. */
599 ret = arch_ptrace_old(child, request, addr, data);
600 break;
601
500 default: 602 default:
501 ret = ptrace_request(child, request, addr, data); 603 ret = ptrace_request(child, request, addr, data);
502 break; 604 break;
503 } 605 }
504
505 return ret; 606 return ret;
506} 607}
507 608
diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c
index 9b9a230349bc..9e6baeac0fb1 100644
--- a/arch/powerpc/kernel/ptrace32.c
+++ b/arch/powerpc/kernel/ptrace32.c
@@ -33,13 +33,55 @@
33#include <asm/pgtable.h> 33#include <asm/pgtable.h>
34#include <asm/system.h> 34#include <asm/system.h>
35 35
36#include "ptrace-common.h"
37
38/* 36/*
39 * does not yet catch signals sent when the child dies. 37 * does not yet catch signals sent when the child dies.
40 * in exit.c or in signal.c. 38 * in exit.c or in signal.c.
41 */ 39 */
42 40
41/*
42 * Here are the old "legacy" powerpc specific getregs/setregs ptrace calls,
43 * we mark them as obsolete now, they will be removed in a future version
44 */
45static long compat_ptrace_old(struct task_struct *child, long request,
46 long addr, long data)
47{
48 int ret = -EPERM;
49
50 switch(request) {
51 case PPC_PTRACE_GETREGS: { /* Get GPRs 0 - 31. */
52 int i;
53 unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
54 unsigned int __user *tmp = (unsigned int __user *)addr;
55
56 for (i = 0; i < 32; i++) {
57 ret = put_user(*reg, tmp);
58 if (ret)
59 break;
60 reg++;
61 tmp++;
62 }
63 break;
64 }
65
66 case PPC_PTRACE_SETREGS: { /* Set GPRs 0 - 31. */
67 int i;
68 unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
69 unsigned int __user *tmp = (unsigned int __user *)addr;
70
71 for (i = 0; i < 32; i++) {
72 ret = get_user(*reg, tmp);
73 if (ret)
74 break;
75 reg++;
76 tmp++;
77 }
78 break;
79 }
80
81 }
82 return ret;
83}
84
43long compat_sys_ptrace(int request, int pid, unsigned long addr, 85long compat_sys_ptrace(int request, int pid, unsigned long addr,
44 unsigned long data) 86 unsigned long data)
45{ 87{
@@ -123,7 +165,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
123 break; 165 break;
124 166
125 if (index < PT_FPR0) { 167 if (index < PT_FPR0) {
126 tmp = get_reg(child, index); 168 tmp = ptrace_get_reg(child, index);
127 } else { 169 } else {
128 flush_fp_to_thread(child); 170 flush_fp_to_thread(child);
129 /* 171 /*
@@ -162,7 +204,9 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
162 else 204 else
163 part = 0; /* want the 1st half of the register (left-most). */ 205 part = 0; /* want the 1st half of the register (left-most). */
164 206
165 /* Validate the input - check to see if address is on the wrong boundary or beyond the end of the user area */ 207 /* Validate the input - check to see if address is on the wrong boundary
208 * or beyond the end of the user area
209 */
166 if ((addr & 3) || numReg > PT_FPSCR) 210 if ((addr & 3) || numReg > PT_FPSCR)
167 break; 211 break;
168 212
@@ -170,7 +214,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
170 flush_fp_to_thread(child); 214 flush_fp_to_thread(child);
171 tmp = ((unsigned long int *)child->thread.fpr)[numReg - PT_FPR0]; 215 tmp = ((unsigned long int *)child->thread.fpr)[numReg - PT_FPR0];
172 } else { /* register within PT_REGS struct */ 216 } else { /* register within PT_REGS struct */
173 tmp = get_reg(child, numReg); 217 tmp = ptrace_get_reg(child, numReg);
174 } 218 }
175 reg32bits = ((u32*)&tmp)[part]; 219 reg32bits = ((u32*)&tmp)[part];
176 ret = put_user(reg32bits, (u32 __user *)data); 220 ret = put_user(reg32bits, (u32 __user *)data);
@@ -226,10 +270,8 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
226 if ((addr & 3) || (index > PT_FPSCR32)) 270 if ((addr & 3) || (index > PT_FPSCR32))
227 break; 271 break;
228 272
229 if (index == PT_ORIG_R3)
230 break;
231 if (index < PT_FPR0) { 273 if (index < PT_FPR0) {
232 ret = put_reg(child, index, data); 274 ret = ptrace_put_reg(child, index, data);
233 } else { 275 } else {
234 flush_fp_to_thread(child); 276 flush_fp_to_thread(child);
235 /* 277 /*
@@ -258,70 +300,25 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
258 /* Determine which register the user wants */ 300 /* Determine which register the user wants */
259 index = (u64)addr >> 2; 301 index = (u64)addr >> 2;
260 numReg = index / 2; 302 numReg = index / 2;
303
261 /* 304 /*
262 * Validate the input - check to see if address is on the 305 * Validate the input - check to see if address is on the
263 * wrong boundary or beyond the end of the user area 306 * wrong boundary or beyond the end of the user area
264 */ 307 */
265 if ((addr & 3) || (numReg > PT_FPSCR)) 308 if ((addr & 3) || (numReg > PT_FPSCR))
266 break; 309 break;
267 /* Insure it is a register we let them change */ 310 if (numReg < PT_FPR0) {
268 if ((numReg == PT_ORIG_R3) 311 unsigned long freg = ptrace_get_reg(child, numReg);
269 || ((numReg > PT_CCR) && (numReg < PT_FPR0))) 312 if (index % 2)
270 break; 313 freg = (freg & ~0xfffffffful) | (data & 0xfffffffful);
271 if (numReg >= PT_FPR0) { 314 else
315 freg = (freg & 0xfffffffful) | (data << 32);
316 ret = ptrace_put_reg(child, numReg, freg);
317 } else {
272 flush_fp_to_thread(child); 318 flush_fp_to_thread(child);
319 ((unsigned int *)child->thread.regs)[index] = data;
320 ret = 0;
273 } 321 }
274 if (numReg == PT_MSR)
275 data = (data & MSR_DEBUGCHANGE)
276 | (child->thread.regs->msr & ~MSR_DEBUGCHANGE);
277 ((u32*)child->thread.regs)[index] = data;
278 ret = 0;
279 break;
280 }
281
282 case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
283 case PTRACE_CONT: { /* restart after signal. */
284 ret = -EIO;
285 if (!valid_signal(data))
286 break;
287 if (request == PTRACE_SYSCALL)
288 set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
289 else
290 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
291 child->exit_code = data;
292 /* make sure the single step bit is not set. */
293 clear_single_step(child);
294 wake_up_process(child);
295 ret = 0;
296 break;
297 }
298
299 /*
300 * make the child exit. Best I can do is send it a sigkill.
301 * perhaps it should be put in the status that it wants to
302 * exit.
303 */
304 case PTRACE_KILL: {
305 ret = 0;
306 if (child->exit_state == EXIT_ZOMBIE) /* already dead */
307 break;
308 child->exit_code = SIGKILL;
309 /* make sure the single step bit is not set. */
310 clear_single_step(child);
311 wake_up_process(child);
312 break;
313 }
314
315 case PTRACE_SINGLESTEP: { /* set the trap flag. */
316 ret = -EIO;
317 if (!valid_signal(data))
318 break;
319 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
320 set_single_step(child);
321 child->exit_code = data;
322 /* give it a chance to run. */
323 wake_up_process(child);
324 ret = 0;
325 break; 322 break;
326 } 323 }
327 324
@@ -334,95 +331,67 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
334 break; 331 break;
335 } 332 }
336 333
337 case PTRACE_SET_DEBUGREG: 334 case PTRACE_GETEVENTMSG:
338 ret = ptrace_set_debugreg(child, addr, data); 335 ret = put_user(child->ptrace_message, (unsigned int __user *) data);
339 break;
340
341 case PTRACE_DETACH:
342 ret = ptrace_detach(child, data);
343 break; 336 break;
344 337
345 case PPC_PTRACE_GETREGS: { /* Get GPRs 0 - 31. */ 338 case PTRACE_GETREGS: { /* Get all pt_regs from the child. */
346 int i; 339 int ui;
347 unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; 340 if (!access_ok(VERIFY_WRITE, (void __user *)data,
348 unsigned int __user *tmp = (unsigned int __user *)addr; 341 PT_REGS_COUNT * sizeof(int))) {
349 342 ret = -EIO;
350 for (i = 0; i < 32; i++) { 343 break;
351 ret = put_user(*reg, tmp);
352 if (ret)
353 break;
354 reg++;
355 tmp++;
356 } 344 }
357 break; 345 ret = 0;
358 } 346 for (ui = 0; ui < PT_REGS_COUNT; ui ++) {
359 347 ret |= __put_user(ptrace_get_reg(child, ui),
360 case PPC_PTRACE_SETREGS: { /* Set GPRs 0 - 31. */ 348 (unsigned int __user *) data);
361 int i; 349 data += sizeof(int);
362 unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
363 unsigned int __user *tmp = (unsigned int __user *)addr;
364
365 for (i = 0; i < 32; i++) {
366 ret = get_user(*reg, tmp);
367 if (ret)
368 break;
369 reg++;
370 tmp++;
371 } 350 }
372 break; 351 break;
373 } 352 }
374 353
375 case PPC_PTRACE_GETFPREGS: { /* Get FPRs 0 - 31. */ 354 case PTRACE_SETREGS: { /* Set all gp regs in the child. */
376 int i; 355 unsigned long tmp;
377 unsigned long *reg = &((unsigned long *)child->thread.fpr)[0]; 356 int ui;
378 unsigned int __user *tmp = (unsigned int __user *)addr; 357 if (!access_ok(VERIFY_READ, (void __user *)data,
379 358 PT_REGS_COUNT * sizeof(int))) {
380 flush_fp_to_thread(child); 359 ret = -EIO;
381 360 break;
382 for (i = 0; i < 32; i++) {
383 ret = put_user(*reg, tmp);
384 if (ret)
385 break;
386 reg++;
387 tmp++;
388 } 361 }
389 break; 362 ret = 0;
390 } 363 for (ui = 0; ui < PT_REGS_COUNT; ui ++) {
391 364 ret = __get_user(tmp, (unsigned int __user *) data);
392 case PPC_PTRACE_SETFPREGS: { /* Get FPRs 0 - 31. */
393 int i;
394 unsigned long *reg = &((unsigned long *)child->thread.fpr)[0];
395 unsigned int __user *tmp = (unsigned int __user *)addr;
396
397 flush_fp_to_thread(child);
398
399 for (i = 0; i < 32; i++) {
400 ret = get_user(*reg, tmp);
401 if (ret) 365 if (ret)
402 break; 366 break;
403 reg++; 367 ptrace_put_reg(child, ui, tmp);
404 tmp++; 368 data += sizeof(int);
405 } 369 }
406 break; 370 break;
407 } 371 }
408 372
409 case PTRACE_GETEVENTMSG: 373 case PTRACE_GETFPREGS:
410 ret = put_user(child->ptrace_message, (unsigned int __user *) data); 374 case PTRACE_SETFPREGS:
411 break;
412
413#ifdef CONFIG_ALTIVEC
414 case PTRACE_GETVRREGS: 375 case PTRACE_GETVRREGS:
415 /* Get the child altivec register state. */ 376 case PTRACE_SETVRREGS:
416 flush_altivec_to_thread(child); 377 case PTRACE_GETREGS64:
417 ret = get_vrregs((unsigned long __user *)data, child); 378 case PTRACE_SETREGS64:
379 case PPC_PTRACE_GETFPREGS:
380 case PPC_PTRACE_SETFPREGS:
381 case PTRACE_KILL:
382 case PTRACE_SINGLESTEP:
383 case PTRACE_DETACH:
384 case PTRACE_SET_DEBUGREG:
385 case PTRACE_SYSCALL:
386 case PTRACE_CONT:
387 ret = arch_ptrace(child, request, addr, data);
418 break; 388 break;
419 389
420 case PTRACE_SETVRREGS: 390 /* Old reverse args ptrace callss */
421 /* Set the child altivec register state. */ 391 case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */
422 flush_altivec_to_thread(child); 392 case PPC_PTRACE_SETREGS: /* Set GPRs 0 - 31. */
423 ret = set_vrregs(child, (unsigned long __user *)data); 393 ret = compat_ptrace_old(child, request, addr, data);
424 break; 394 break;
425#endif
426 395
427 default: 396 default:
428 ret = ptrace_request(child, request, addr, data); 397 ret = ptrace_request(child, request, addr, data);
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index f72118c0844f..62b7bf2f3eab 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -804,7 +804,7 @@ int __init rtas_flash_init(void)
804 804
805 flash_block_cache = kmem_cache_create("rtas_flash_cache", 805 flash_block_cache = kmem_cache_create("rtas_flash_cache",
806 RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0, 806 RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0,
807 rtas_block_ctor, NULL); 807 rtas_block_ctor);
808 if (!flash_block_cache) { 808 if (!flash_block_cache) {
809 printk(KERN_ERR "%s: failed to create block cache\n", 809 printk(KERN_ERR "%s: failed to create block cache\n",
810 __FUNCTION__); 810 __FUNCTION__);
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index f2286822be09..a5de6211b97a 100644
--- a/arch/powerpc/kernel/rtas_pci.c
+++ b/arch/powerpc/kernel/rtas_pci.c
@@ -278,10 +278,8 @@ void __init find_and_init_phbs(void)
278{ 278{
279 struct device_node *node; 279 struct device_node *node;
280 struct pci_controller *phb; 280 struct pci_controller *phb;
281 unsigned int index;
282 struct device_node *root = of_find_node_by_path("/"); 281 struct device_node *root = of_find_node_by_path("/");
283 282
284 index = 0;
285 for (node = of_get_next_child(root, NULL); 283 for (node = of_get_next_child(root, NULL);
286 node != NULL; 284 node != NULL;
287 node = of_get_next_child(root, node)) { 285 node = of_get_next_child(root, node)) {
@@ -295,8 +293,7 @@ void __init find_and_init_phbs(void)
295 continue; 293 continue;
296 rtas_setup_phb(phb); 294 rtas_setup_phb(phb);
297 pci_process_bridge_OF_ranges(phb, node, 0); 295 pci_process_bridge_OF_ranges(phb, node, 0);
298 pci_setup_phb_io(phb, index == 0); 296 isa_bridge_find_early(phb);
299 index++;
300 } 297 }
301 298
302 of_node_put(root); 299 of_node_put(root);
@@ -335,7 +332,7 @@ int pcibios_remove_root_bus(struct pci_controller *phb)
335 return 1; 332 return 1;
336 } 333 }
337 334
338 rc = unmap_bus_range(b); 335 rc = pcibios_unmap_io_space(b);
339 if (rc) { 336 if (rc) {
340 printk(KERN_ERR "%s: failed to unmap IO on bus %s\n", 337 printk(KERN_ERR "%s: failed to unmap IO on bus %s\n",
341 __FUNCTION__, b->name); 338 __FUNCTION__, b->name);
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index ed07a198f8d6..4924c48cb1ff 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -32,6 +32,7 @@
32#include <linux/unistd.h> 32#include <linux/unistd.h>
33#include <linux/serial.h> 33#include <linux/serial.h>
34#include <linux/serial_8250.h> 34#include <linux/serial_8250.h>
35#include <linux/debugfs.h>
35#include <asm/io.h> 36#include <asm/io.h>
36#include <asm/prom.h> 37#include <asm/prom.h>
37#include <asm/processor.h> 38#include <asm/processor.h>
@@ -486,6 +487,14 @@ int check_legacy_ioport(unsigned long base_port)
486 487
487 switch(base_port) { 488 switch(base_port) {
488 case I8042_DATA_REG: 489 case I8042_DATA_REG:
490 if (!(np = of_find_compatible_node(NULL, NULL, "pnpPNP,303")))
491 np = of_find_compatible_node(NULL, NULL, "pnpPNP,f03");
492 if (np) {
493 parent = of_get_parent(np);
494 of_node_put(np);
495 np = parent;
496 break;
497 }
489 np = of_find_node_by_type(NULL, "8042"); 498 np = of_find_node_by_type(NULL, "8042");
490 break; 499 break;
491 case FDC_BASE: /* FDC1 */ 500 case FDC_BASE: /* FDC1 */
@@ -571,3 +580,15 @@ static int __init check_cache_coherency(void)
571 580
572late_initcall(check_cache_coherency); 581late_initcall(check_cache_coherency);
573#endif /* CONFIG_CHECK_CACHE_COHERENCY */ 582#endif /* CONFIG_CHECK_CACHE_COHERENCY */
583
584#ifdef CONFIG_DEBUG_FS
585struct dentry *powerpc_debugfs_root;
586
587static int powerpc_debugfs_init(void)
588{
589 powerpc_debugfs_root = debugfs_create_dir("powerpc", NULL);
590
591 return powerpc_debugfs_root == NULL;
592}
593arch_initcall(powerpc_debugfs_init);
594#endif
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 35f8f443c14f..7ec6ba56d83d 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -262,13 +262,11 @@ void __init setup_arch(char **cmdline_p)
262 * Systems with OF can look in the properties on the cpu node(s) 262 * Systems with OF can look in the properties on the cpu node(s)
263 * for a possibly more accurate value. 263 * for a possibly more accurate value.
264 */ 264 */
265 if (cpu_has_feature(CPU_FTR_SPLIT_ID_CACHE)) { 265 dcache_bsize = cur_cpu_spec->dcache_bsize;
266 dcache_bsize = cur_cpu_spec->dcache_bsize; 266 icache_bsize = cur_cpu_spec->icache_bsize;
267 icache_bsize = cur_cpu_spec->icache_bsize; 267 ucache_bsize = 0;
268 ucache_bsize = 0; 268 if (cpu_has_feature(CPU_FTR_UNIFIED_ID_CACHE))
269 } else 269 ucache_bsize = icache_bsize = dcache_bsize;
270 ucache_bsize = dcache_bsize = icache_bsize
271 = cur_cpu_spec->dcache_bsize;
272 270
273 /* reboot on panic */ 271 /* reboot on panic */
274 panic_timeout = 180; 272 panic_timeout = 180;
diff --git a/arch/powerpc/kernel/signal.c b/arch/powerpc/kernel/signal.c
new file mode 100644
index 000000000000..c434d6c4e4e6
--- /dev/null
+++ b/arch/powerpc/kernel/signal.c
@@ -0,0 +1,180 @@
1/*
2 * Common signal handling code for both 32 and 64 bits
3 *
4 * Copyright (c) 2007 Benjamin Herrenschmidt, IBM Coproration
5 * Extracted from signal_32.c and signal_64.c
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file README.legal in the main directory of
9 * this archive for more details.
10 */
11
12#include <linux/ptrace.h>
13#include <linux/signal.h>
14#include <asm/uaccess.h>
15#include <asm/unistd.h>
16
17#include "signal.h"
18
19/*
20 * Allocate space for the signal frame
21 */
22void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
23 size_t frame_size)
24{
25 unsigned long oldsp, newsp;
26
27 /* Default to using normal stack */
28 oldsp = regs->gpr[1];
29
30 /* Check for alt stack */
31 if ((ka->sa.sa_flags & SA_ONSTACK) &&
32 current->sas_ss_size && !on_sig_stack(oldsp))
33 oldsp = (current->sas_ss_sp + current->sas_ss_size);
34
35 /* Get aligned frame */
36 newsp = (oldsp - frame_size) & ~0xFUL;
37
38 /* Check access */
39 if (!access_ok(VERIFY_WRITE, (void __user *)newsp, oldsp - newsp))
40 return NULL;
41
42 return (void __user *)newsp;
43}
44
45
46/*
47 * Restore the user process's signal mask
48 */
49void restore_sigmask(sigset_t *set)
50{
51 sigdelsetmask(set, ~_BLOCKABLE);
52 spin_lock_irq(&current->sighand->siglock);
53 current->blocked = *set;
54 recalc_sigpending();
55 spin_unlock_irq(&current->sighand->siglock);
56}
57
58static void check_syscall_restart(struct pt_regs *regs, struct k_sigaction *ka,
59 int has_handler)
60{
61 unsigned long ret = regs->gpr[3];
62 int restart = 1;
63
64 /* syscall ? */
65 if (TRAP(regs) != 0x0C00)
66 return;
67
68 /* error signalled ? */
69 if (!(regs->ccr & 0x10000000))
70 return;
71
72 switch (ret) {
73 case ERESTART_RESTARTBLOCK:
74 case ERESTARTNOHAND:
75 /* ERESTARTNOHAND means that the syscall should only be
76 * restarted if there was no handler for the signal, and since
77 * we only get here if there is a handler, we dont restart.
78 */
79 restart = !has_handler;
80 break;
81 case ERESTARTSYS:
82 /* ERESTARTSYS means to restart the syscall if there is no
83 * handler or the handler was registered with SA_RESTART
84 */
85 restart = !has_handler || (ka->sa.sa_flags & SA_RESTART) != 0;
86 break;
87 case ERESTARTNOINTR:
88 /* ERESTARTNOINTR means that the syscall should be
89 * called again after the signal handler returns.
90 */
91 break;
92 default:
93 return;
94 }
95 if (restart) {
96 if (ret == ERESTART_RESTARTBLOCK)
97 regs->gpr[0] = __NR_restart_syscall;
98 else
99 regs->gpr[3] = regs->orig_gpr3;
100 regs->nip -= 4;
101 regs->result = 0;
102 } else {
103 regs->result = -EINTR;
104 regs->gpr[3] = EINTR;
105 regs->ccr |= 0x10000000;
106 }
107}
108
109int do_signal(sigset_t *oldset, struct pt_regs *regs)
110{
111 siginfo_t info;
112 int signr;
113 struct k_sigaction ka;
114 int ret;
115 int is32 = is_32bit_task();
116
117 if (test_thread_flag(TIF_RESTORE_SIGMASK))
118 oldset = &current->saved_sigmask;
119 else if (!oldset)
120 oldset = &current->blocked;
121
122 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
123
124 /* Is there any syscall restart business here ? */
125 check_syscall_restart(regs, &ka, signr > 0);
126
127 if (signr <= 0) {
128 /* No signal to deliver -- put the saved sigmask back */
129 if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
130 clear_thread_flag(TIF_RESTORE_SIGMASK);
131 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
132 }
133 return 0; /* no signals delivered */
134 }
135
136 /*
137 * Reenable the DABR before delivering the signal to
138 * user space. The DABR will have been cleared if it
139 * triggered inside the kernel.
140 */
141 if (current->thread.dabr)
142 set_dabr(current->thread.dabr);
143
144 if (is32) {
145 if (ka.sa.sa_flags & SA_SIGINFO)
146 ret = handle_rt_signal32(signr, &ka, &info, oldset,
147 regs);
148 else
149 ret = handle_signal32(signr, &ka, &info, oldset,
150 regs);
151 } else {
152 ret = handle_rt_signal64(signr, &ka, &info, oldset, regs);
153 }
154
155 if (ret) {
156 spin_lock_irq(&current->sighand->siglock);
157 sigorsets(&current->blocked, &current->blocked,
158 &ka.sa.sa_mask);
159 if (!(ka.sa.sa_flags & SA_NODEFER))
160 sigaddset(&current->blocked, signr);
161 recalc_sigpending();
162 spin_unlock_irq(&current->sighand->siglock);
163
164 /*
165 * A signal was successfully delivered; the saved sigmask is in
166 * its frame, and we can clear the TIF_RESTORE_SIGMASK flag.
167 */
168 if (test_thread_flag(TIF_RESTORE_SIGMASK))
169 clear_thread_flag(TIF_RESTORE_SIGMASK);
170 }
171
172 return ret;
173}
174
175long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
176 unsigned long r5, unsigned long r6, unsigned long r7,
177 unsigned long r8, struct pt_regs *regs)
178{
179 return do_sigaltstack(uss, uoss, regs->gpr[1]);
180}
diff --git a/arch/powerpc/kernel/signal.h b/arch/powerpc/kernel/signal.h
new file mode 100644
index 000000000000..77efb3d5465a
--- /dev/null
+++ b/arch/powerpc/kernel/signal.h
@@ -0,0 +1,55 @@
1/*
2 * Copyright (c) 2007 Benjamin Herrenschmidt, IBM Coproration
3 * Extracted from signal_32.c and signal_64.c
4 *
5 * This file is subject to the terms and conditions of the GNU General
6 * Public License. See the file README.legal in the main directory of
7 * this archive for more details.
8 */
9
10#ifndef _POWERPC_ARCH_SIGNAL_H
11#define _POWERPC_ARCH_SIGNAL_H
12
13#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
14
15extern void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
16 size_t frame_size);
17extern void restore_sigmask(sigset_t *set);
18
19extern int handle_signal32(unsigned long sig, struct k_sigaction *ka,
20 siginfo_t *info, sigset_t *oldset,
21 struct pt_regs *regs);
22
23extern int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka,
24 siginfo_t *info, sigset_t *oldset,
25 struct pt_regs *regs);
26
27
28#ifdef CONFIG_PPC64
29
30static inline int is_32bit_task(void)
31{
32 return test_thread_flag(TIF_32BIT);
33}
34
35extern int handle_rt_signal64(int signr, struct k_sigaction *ka,
36 siginfo_t *info, sigset_t *set,
37 struct pt_regs *regs);
38
39#else /* CONFIG_PPC64 */
40
41static inline int is_32bit_task(void)
42{
43 return 1;
44}
45
46static inline int handle_rt_signal64(int signr, struct k_sigaction *ka,
47 siginfo_t *info, sigset_t *set,
48 struct pt_regs *regs)
49{
50 return -EFAULT;
51}
52
53#endif /* !defined(CONFIG_PPC64) */
54
55#endif /* _POWERPC_ARCH_SIGNAL_H */
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index dd1dca5bfa81..590057e9e987 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -51,12 +51,11 @@
51#include <asm/pgtable.h> 51#include <asm/pgtable.h>
52#endif 52#endif
53 53
54#undef DEBUG_SIG 54#include "signal.h"
55 55
56#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 56#undef DEBUG_SIG
57 57
58#ifdef CONFIG_PPC64 58#ifdef CONFIG_PPC64
59#define do_signal do_signal32
60#define sys_sigsuspend compat_sys_sigsuspend 59#define sys_sigsuspend compat_sys_sigsuspend
61#define sys_rt_sigsuspend compat_sys_rt_sigsuspend 60#define sys_rt_sigsuspend compat_sys_rt_sigsuspend
62#define sys_rt_sigreturn compat_sys_rt_sigreturn 61#define sys_rt_sigreturn compat_sys_rt_sigreturn
@@ -231,8 +230,6 @@ static inline int restore_general_regs(struct pt_regs *regs,
231 230
232#endif /* CONFIG_PPC64 */ 231#endif /* CONFIG_PPC64 */
233 232
234int do_signal(sigset_t *oldset, struct pt_regs *regs);
235
236/* 233/*
237 * Atomically swap in the new signal mask, and wait for a signal. 234 * Atomically swap in the new signal mask, and wait for a signal.
238 */ 235 */
@@ -251,14 +248,6 @@ long sys_sigsuspend(old_sigset_t mask)
251 return -ERESTARTNOHAND; 248 return -ERESTARTNOHAND;
252} 249}
253 250
254#ifdef CONFIG_PPC32
255long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, int r5,
256 int r6, int r7, int r8, struct pt_regs *regs)
257{
258 return do_sigaltstack(uss, uoss, regs->gpr[1]);
259}
260#endif
261
262long sys_sigaction(int sig, struct old_sigaction __user *act, 251long sys_sigaction(int sig, struct old_sigaction __user *act,
263 struct old_sigaction __user *oact) 252 struct old_sigaction __user *oact)
264{ 253{
@@ -293,14 +282,17 @@ long sys_sigaction(int sig, struct old_sigaction __user *act,
293/* 282/*
294 * When we have signals to deliver, we set up on the 283 * When we have signals to deliver, we set up on the
295 * user stack, going down from the original stack pointer: 284 * user stack, going down from the original stack pointer:
296 * a sigregs struct 285 * an ABI gap of 56 words
286 * an mcontext struct
297 * a sigcontext struct 287 * a sigcontext struct
298 * a gap of __SIGNAL_FRAMESIZE bytes 288 * a gap of __SIGNAL_FRAMESIZE bytes
299 * 289 *
300 * Each of these things must be a multiple of 16 bytes in size. 290 * Each of these things must be a multiple of 16 bytes in size. The following
291 * structure represent all of this except the __SIGNAL_FRAMESIZE gap
301 * 292 *
302 */ 293 */
303struct sigregs { 294struct sigframe {
295 struct sigcontext sctx; /* the sigcontext */
304 struct mcontext mctx; /* all the register values */ 296 struct mcontext mctx; /* all the register values */
305 /* 297 /*
306 * Programs using the rs6000/xcoff abi can save up to 19 gp 298 * Programs using the rs6000/xcoff abi can save up to 19 gp
@@ -703,44 +695,22 @@ int compat_sys_sigaltstack(u32 __new, u32 __old, int r5,
703} 695}
704#endif /* CONFIG_PPC64 */ 696#endif /* CONFIG_PPC64 */
705 697
706
707/*
708 * Restore the user process's signal mask
709 */
710#ifdef CONFIG_PPC64
711extern void restore_sigmask(sigset_t *set);
712#else /* CONFIG_PPC64 */
713static void restore_sigmask(sigset_t *set)
714{
715 sigdelsetmask(set, ~_BLOCKABLE);
716 spin_lock_irq(&current->sighand->siglock);
717 current->blocked = *set;
718 recalc_sigpending();
719 spin_unlock_irq(&current->sighand->siglock);
720}
721#endif
722
723/* 698/*
724 * Set up a signal frame for a "real-time" signal handler 699 * Set up a signal frame for a "real-time" signal handler
725 * (one which gets siginfo). 700 * (one which gets siginfo).
726 */ 701 */
727static int handle_rt_signal(unsigned long sig, struct k_sigaction *ka, 702int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka,
728 siginfo_t *info, sigset_t *oldset, 703 siginfo_t *info, sigset_t *oldset,
729 struct pt_regs *regs, unsigned long newsp) 704 struct pt_regs *regs)
730{ 705{
731 struct rt_sigframe __user *rt_sf; 706 struct rt_sigframe __user *rt_sf;
732 struct mcontext __user *frame; 707 struct mcontext __user *frame;
733 unsigned long origsp = newsp; 708 unsigned long newsp = 0;
734 709
735 /* Set up Signal Frame */ 710 /* Set up Signal Frame */
736 /* Put a Real Time Context onto stack */ 711 /* Put a Real Time Context onto stack */
737 newsp -= sizeof(*rt_sf); 712 rt_sf = get_sigframe(ka, regs, sizeof(*rt_sf));
738 rt_sf = (struct rt_sigframe __user *)newsp; 713 if (unlikely(rt_sf == NULL))
739
740 /* create a stack frame for the caller of the handler */
741 newsp -= __SIGNAL_FRAMESIZE + 16;
742
743 if (!access_ok(VERIFY_WRITE, (void __user *)newsp, origsp - newsp))
744 goto badframe; 714 goto badframe;
745 715
746 /* Put the siginfo & fill in most of the ucontext */ 716 /* Put the siginfo & fill in most of the ucontext */
@@ -770,8 +740,12 @@ static int handle_rt_signal(unsigned long sig, struct k_sigaction *ka,
770 740
771 current->thread.fpscr.val = 0; /* turn off all fp exceptions */ 741 current->thread.fpscr.val = 0; /* turn off all fp exceptions */
772 742
743 /* create a stack frame for the caller of the handler */
744 newsp = ((unsigned long)rt_sf) - (__SIGNAL_FRAMESIZE + 16);
773 if (put_user(regs->gpr[1], (u32 __user *)newsp)) 745 if (put_user(regs->gpr[1], (u32 __user *)newsp))
774 goto badframe; 746 goto badframe;
747
748 /* Fill registers for signal handler */
775 regs->gpr[1] = newsp; 749 regs->gpr[1] = newsp;
776 regs->gpr[3] = sig; 750 regs->gpr[3] = sig;
777 regs->gpr[4] = (unsigned long) &rt_sf->info; 751 regs->gpr[4] = (unsigned long) &rt_sf->info;
@@ -1015,27 +989,18 @@ int sys_debug_setcontext(struct ucontext __user *ctx,
1015/* 989/*
1016 * OK, we're invoking a handler 990 * OK, we're invoking a handler
1017 */ 991 */
1018static int handle_signal(unsigned long sig, struct k_sigaction *ka, 992int handle_signal32(unsigned long sig, struct k_sigaction *ka,
1019 siginfo_t *info, sigset_t *oldset, struct pt_regs *regs, 993 siginfo_t *info, sigset_t *oldset, struct pt_regs *regs)
1020 unsigned long newsp)
1021{ 994{
1022 struct sigcontext __user *sc; 995 struct sigcontext __user *sc;
1023 struct sigregs __user *frame; 996 struct sigframe __user *frame;
1024 unsigned long origsp = newsp; 997 unsigned long newsp = 0;
1025 998
1026 /* Set up Signal Frame */ 999 /* Set up Signal Frame */
1027 newsp -= sizeof(struct sigregs); 1000 frame = get_sigframe(ka, regs, sizeof(*frame));
1028 frame = (struct sigregs __user *) newsp; 1001 if (unlikely(frame == NULL))
1029
1030 /* Put a sigcontext on the stack */
1031 newsp -= sizeof(*sc);
1032 sc = (struct sigcontext __user *) newsp;
1033
1034 /* create a stack frame for the caller of the handler */
1035 newsp -= __SIGNAL_FRAMESIZE;
1036
1037 if (!access_ok(VERIFY_WRITE, (void __user *) newsp, origsp - newsp))
1038 goto badframe; 1002 goto badframe;
1003 sc = (struct sigcontext __user *) &frame->sctx;
1039 1004
1040#if _NSIG != 64 1005#if _NSIG != 64
1041#error "Please adjust handle_signal()" 1006#error "Please adjust handle_signal()"
@@ -1047,7 +1012,7 @@ static int handle_signal(unsigned long sig, struct k_sigaction *ka,
1047#else 1012#else
1048 || __put_user(oldset->sig[1], &sc->_unused[3]) 1013 || __put_user(oldset->sig[1], &sc->_unused[3])
1049#endif 1014#endif
1050 || __put_user(to_user_ptr(frame), &sc->regs) 1015 || __put_user(to_user_ptr(&frame->mctx), &sc->regs)
1051 || __put_user(sig, &sc->signal)) 1016 || __put_user(sig, &sc->signal))
1052 goto badframe; 1017 goto badframe;
1053 1018
@@ -1063,8 +1028,11 @@ static int handle_signal(unsigned long sig, struct k_sigaction *ka,
1063 1028
1064 current->thread.fpscr.val = 0; /* turn off all fp exceptions */ 1029 current->thread.fpscr.val = 0; /* turn off all fp exceptions */
1065 1030
1031 /* create a stack frame for the caller of the handler */
1032 newsp = ((unsigned long)frame) - __SIGNAL_FRAMESIZE;
1066 if (put_user(regs->gpr[1], (u32 __user *)newsp)) 1033 if (put_user(regs->gpr[1], (u32 __user *)newsp))
1067 goto badframe; 1034 goto badframe;
1035
1068 regs->gpr[1] = newsp; 1036 regs->gpr[1] = newsp;
1069 regs->gpr[3] = sig; 1037 regs->gpr[3] = sig;
1070 regs->gpr[4] = (unsigned long) sc; 1038 regs->gpr[4] = (unsigned long) sc;
@@ -1126,106 +1094,3 @@ badframe:
1126 force_sig(SIGSEGV, current); 1094 force_sig(SIGSEGV, current);
1127 return 0; 1095 return 0;
1128} 1096}
1129
1130/*
1131 * Note that 'init' is a special process: it doesn't get signals it doesn't
1132 * want to handle. Thus you cannot kill init even with a SIGKILL even by
1133 * mistake.
1134 */
1135int do_signal(sigset_t *oldset, struct pt_regs *regs)
1136{
1137 siginfo_t info;
1138 struct k_sigaction ka;
1139 unsigned int newsp;
1140 int signr, ret;
1141
1142#ifdef CONFIG_PPC32
1143 if (try_to_freeze()) {
1144 signr = 0;
1145 if (!signal_pending(current))
1146 goto no_signal;
1147 }
1148#endif
1149
1150 if (test_thread_flag(TIF_RESTORE_SIGMASK))
1151 oldset = &current->saved_sigmask;
1152 else if (!oldset)
1153 oldset = &current->blocked;
1154
1155 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
1156#ifdef CONFIG_PPC32
1157no_signal:
1158#endif
1159 if (TRAP(regs) == 0x0C00 /* System Call! */
1160 && regs->ccr & 0x10000000 /* error signalled */
1161 && ((ret = regs->gpr[3]) == ERESTARTSYS
1162 || ret == ERESTARTNOHAND || ret == ERESTARTNOINTR
1163 || ret == ERESTART_RESTARTBLOCK)) {
1164
1165 if (signr > 0
1166 && (ret == ERESTARTNOHAND || ret == ERESTART_RESTARTBLOCK
1167 || (ret == ERESTARTSYS
1168 && !(ka.sa.sa_flags & SA_RESTART)))) {
1169 /* make the system call return an EINTR error */
1170 regs->result = -EINTR;
1171 regs->gpr[3] = EINTR;
1172 /* note that the cr0.SO bit is already set */
1173 } else {
1174 regs->nip -= 4; /* Back up & retry system call */
1175 regs->result = 0;
1176 regs->trap = 0;
1177 if (ret == ERESTART_RESTARTBLOCK)
1178 regs->gpr[0] = __NR_restart_syscall;
1179 else
1180 regs->gpr[3] = regs->orig_gpr3;
1181 }
1182 }
1183
1184 if (signr == 0) {
1185 /* No signal to deliver -- put the saved sigmask back */
1186 if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
1187 clear_thread_flag(TIF_RESTORE_SIGMASK);
1188 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
1189 }
1190 return 0; /* no signals delivered */
1191 }
1192
1193 if ((ka.sa.sa_flags & SA_ONSTACK) && current->sas_ss_size
1194 && !on_sig_stack(regs->gpr[1]))
1195 newsp = current->sas_ss_sp + current->sas_ss_size;
1196 else
1197 newsp = regs->gpr[1];
1198 newsp &= ~0xfUL;
1199
1200#ifdef CONFIG_PPC64
1201 /*
1202 * Reenable the DABR before delivering the signal to
1203 * user space. The DABR will have been cleared if it
1204 * triggered inside the kernel.
1205 */
1206 if (current->thread.dabr)
1207 set_dabr(current->thread.dabr);
1208#endif
1209
1210 /* Whee! Actually deliver the signal. */
1211 if (ka.sa.sa_flags & SA_SIGINFO)
1212 ret = handle_rt_signal(signr, &ka, &info, oldset, regs, newsp);
1213 else
1214 ret = handle_signal(signr, &ka, &info, oldset, regs, newsp);
1215
1216 if (ret) {
1217 spin_lock_irq(&current->sighand->siglock);
1218 sigorsets(&current->blocked, &current->blocked,
1219 &ka.sa.sa_mask);
1220 if (!(ka.sa.sa_flags & SA_NODEFER))
1221 sigaddset(&current->blocked, signr);
1222 recalc_sigpending();
1223 spin_unlock_irq(&current->sighand->siglock);
1224 /* A signal was successfully delivered; the saved sigmask is in
1225 its frame, and we can clear the TIF_RESTORE_SIGMASK flag */
1226 if (test_thread_flag(TIF_RESTORE_SIGMASK))
1227 clear_thread_flag(TIF_RESTORE_SIGMASK);
1228 }
1229
1230 return ret;
1231}
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index 1ce0ae3f6ffc..de895e6d8c62 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -34,9 +34,9 @@
34#include <asm/syscalls.h> 34#include <asm/syscalls.h>
35#include <asm/vdso.h> 35#include <asm/vdso.h>
36 36
37#define DEBUG_SIG 0 37#include "signal.h"
38 38
39#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 39#define DEBUG_SIG 0
40 40
41#define GP_REGS_SIZE min(sizeof(elf_gregset_t), sizeof(struct pt_regs)) 41#define GP_REGS_SIZE min(sizeof(elf_gregset_t), sizeof(struct pt_regs))
42#define FP_REGS_SIZE sizeof(elf_fpregset_t) 42#define FP_REGS_SIZE sizeof(elf_fpregset_t)
@@ -64,14 +64,6 @@ struct rt_sigframe {
64 char abigap[288]; 64 char abigap[288];
65} __attribute__ ((aligned (16))); 65} __attribute__ ((aligned (16)));
66 66
67long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, unsigned long r5,
68 unsigned long r6, unsigned long r7, unsigned long r8,
69 struct pt_regs *regs)
70{
71 return do_sigaltstack(uss, uoss, regs->gpr[1]);
72}
73
74
75/* 67/*
76 * Set up the sigcontext for the signal frame. 68 * Set up the sigcontext for the signal frame.
77 */ 69 */
@@ -176,6 +168,13 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig,
176 */ 168 */
177 discard_lazy_cpu_state(); 169 discard_lazy_cpu_state();
178 170
171 /*
172 * Force reload of FP/VEC.
173 * This has to be done before copying stuff into current->thread.fpr/vr
174 * for the reasons explained in the previous comment.
175 */
176 regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1 | MSR_VEC);
177
179 err |= __copy_from_user(&current->thread.fpr, &sc->fp_regs, FP_REGS_SIZE); 178 err |= __copy_from_user(&current->thread.fpr, &sc->fp_regs, FP_REGS_SIZE);
180 179
181#ifdef CONFIG_ALTIVEC 180#ifdef CONFIG_ALTIVEC
@@ -197,32 +196,10 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig,
197 current->thread.vrsave = 0; 196 current->thread.vrsave = 0;
198#endif /* CONFIG_ALTIVEC */ 197#endif /* CONFIG_ALTIVEC */
199 198
200 /* Force reload of FP/VEC */
201 regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1 | MSR_VEC);
202
203 return err; 199 return err;
204} 200}
205 201
206/* 202/*
207 * Allocate space for the signal frame
208 */
209static inline void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
210 size_t frame_size)
211{
212 unsigned long newsp;
213
214 /* Default to using normal stack */
215 newsp = regs->gpr[1];
216
217 if ((ka->sa.sa_flags & SA_ONSTACK) && current->sas_ss_size) {
218 if (! on_sig_stack(regs->gpr[1]))
219 newsp = (current->sas_ss_sp + current->sas_ss_size);
220 }
221
222 return (void __user *)((newsp - frame_size) & -16ul);
223}
224
225/*
226 * Setup the trampoline code on the stack 203 * Setup the trampoline code on the stack
227 */ 204 */
228static long setup_trampoline(unsigned int syscall, unsigned int __user *tramp) 205static long setup_trampoline(unsigned int syscall, unsigned int __user *tramp)
@@ -249,19 +226,6 @@ static long setup_trampoline(unsigned int syscall, unsigned int __user *tramp)
249} 226}
250 227
251/* 228/*
252 * Restore the user process's signal mask (also used by signal32.c)
253 */
254void restore_sigmask(sigset_t *set)
255{
256 sigdelsetmask(set, ~_BLOCKABLE);
257 spin_lock_irq(&current->sighand->siglock);
258 current->blocked = *set;
259 recalc_sigpending();
260 spin_unlock_irq(&current->sighand->siglock);
261}
262
263
264/*
265 * Handle {get,set,swap}_context operations 229 * Handle {get,set,swap}_context operations
266 */ 230 */
267int sys_swapcontext(struct ucontext __user *old_ctx, 231int sys_swapcontext(struct ucontext __user *old_ctx,
@@ -355,7 +319,7 @@ badframe:
355 return 0; 319 return 0;
356} 320}
357 321
358static int setup_rt_frame(int signr, struct k_sigaction *ka, siginfo_t *info, 322int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info,
359 sigset_t *set, struct pt_regs *regs) 323 sigset_t *set, struct pt_regs *regs)
360{ 324{
361 /* Handler is *really* a pointer to the function descriptor for 325 /* Handler is *really* a pointer to the function descriptor for
@@ -369,8 +333,7 @@ static int setup_rt_frame(int signr, struct k_sigaction *ka, siginfo_t *info,
369 long err = 0; 333 long err = 0;
370 334
371 frame = get_sigframe(ka, regs, sizeof(*frame)); 335 frame = get_sigframe(ka, regs, sizeof(*frame));
372 336 if (unlikely(frame == NULL))
373 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
374 goto badframe; 337 goto badframe;
375 338
376 err |= __put_user(&frame->info, &frame->pinfo); 339 err |= __put_user(&frame->info, &frame->pinfo);
@@ -407,7 +370,7 @@ static int setup_rt_frame(int signr, struct k_sigaction *ka, siginfo_t *info,
407 funct_desc_ptr = (func_descr_t __user *) ka->sa.sa_handler; 370 funct_desc_ptr = (func_descr_t __user *) ka->sa.sa_handler;
408 371
409 /* Allocate a dummy caller frame for the signal handler. */ 372 /* Allocate a dummy caller frame for the signal handler. */
410 newsp = (unsigned long)frame - __SIGNAL_FRAMESIZE; 373 newsp = ((unsigned long)frame) - __SIGNAL_FRAMESIZE;
411 err |= put_user(regs->gpr[1], (unsigned long __user *)newsp); 374 err |= put_user(regs->gpr[1], (unsigned long __user *)newsp);
412 375
413 /* Set up "regs" so we "return" to the signal handler. */ 376 /* Set up "regs" so we "return" to the signal handler. */
@@ -438,134 +401,3 @@ badframe:
438 force_sigsegv(signr, current); 401 force_sigsegv(signr, current);
439 return 0; 402 return 0;
440} 403}
441
442
443/*
444 * OK, we're invoking a handler
445 */
446static int handle_signal(unsigned long sig, struct k_sigaction *ka,
447 siginfo_t *info, sigset_t *oldset, struct pt_regs *regs)
448{
449 int ret;
450
451 /* Set up Signal Frame */
452 ret = setup_rt_frame(sig, ka, info, oldset, regs);
453
454 if (ret) {
455 spin_lock_irq(&current->sighand->siglock);
456 sigorsets(&current->blocked, &current->blocked, &ka->sa.sa_mask);
457 if (!(ka->sa.sa_flags & SA_NODEFER))
458 sigaddset(&current->blocked,sig);
459 recalc_sigpending();
460 spin_unlock_irq(&current->sighand->siglock);
461 }
462
463 return ret;
464}
465
466static inline void syscall_restart(struct pt_regs *regs, struct k_sigaction *ka)
467{
468 switch ((int)regs->result) {
469 case -ERESTART_RESTARTBLOCK:
470 case -ERESTARTNOHAND:
471 /* ERESTARTNOHAND means that the syscall should only be
472 * restarted if there was no handler for the signal, and since
473 * we only get here if there is a handler, we dont restart.
474 */
475 regs->result = -EINTR;
476 regs->gpr[3] = EINTR;
477 regs->ccr |= 0x10000000;
478 break;
479 case -ERESTARTSYS:
480 /* ERESTARTSYS means to restart the syscall if there is no
481 * handler or the handler was registered with SA_RESTART
482 */
483 if (!(ka->sa.sa_flags & SA_RESTART)) {
484 regs->result = -EINTR;
485 regs->gpr[3] = EINTR;
486 regs->ccr |= 0x10000000;
487 break;
488 }
489 /* fallthrough */
490 case -ERESTARTNOINTR:
491 /* ERESTARTNOINTR means that the syscall should be
492 * called again after the signal handler returns.
493 */
494 regs->gpr[3] = regs->orig_gpr3;
495 regs->nip -= 4;
496 regs->result = 0;
497 break;
498 }
499}
500
501/*
502 * Note that 'init' is a special process: it doesn't get signals it doesn't
503 * want to handle. Thus you cannot kill init even with a SIGKILL even by
504 * mistake.
505 */
506int do_signal(sigset_t *oldset, struct pt_regs *regs)
507{
508 siginfo_t info;
509 int signr;
510 struct k_sigaction ka;
511
512 /*
513 * If the current thread is 32 bit - invoke the
514 * 32 bit signal handling code
515 */
516 if (test_thread_flag(TIF_32BIT))
517 return do_signal32(oldset, regs);
518
519 if (test_thread_flag(TIF_RESTORE_SIGMASK))
520 oldset = &current->saved_sigmask;
521 else if (!oldset)
522 oldset = &current->blocked;
523
524 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
525 if (signr > 0) {
526 int ret;
527
528 /* Whee! Actually deliver the signal. */
529 if (TRAP(regs) == 0x0C00)
530 syscall_restart(regs, &ka);
531
532 /*
533 * Reenable the DABR before delivering the signal to
534 * user space. The DABR will have been cleared if it
535 * triggered inside the kernel.
536 */
537 if (current->thread.dabr)
538 set_dabr(current->thread.dabr);
539
540 ret = handle_signal(signr, &ka, &info, oldset, regs);
541
542 /* If a signal was successfully delivered, the saved sigmask is in
543 its frame, and we can clear the TIF_RESTORE_SIGMASK flag */
544 if (ret && test_thread_flag(TIF_RESTORE_SIGMASK))
545 clear_thread_flag(TIF_RESTORE_SIGMASK);
546
547 return ret;
548 }
549
550 if (TRAP(regs) == 0x0C00) { /* System Call! */
551 if ((int)regs->result == -ERESTARTNOHAND ||
552 (int)regs->result == -ERESTARTSYS ||
553 (int)regs->result == -ERESTARTNOINTR) {
554 regs->gpr[3] = regs->orig_gpr3;
555 regs->nip -= 4; /* Back up & retry system call */
556 regs->result = 0;
557 } else if ((int)regs->result == -ERESTART_RESTARTBLOCK) {
558 regs->gpr[0] = __NR_restart_syscall;
559 regs->nip -= 4;
560 regs->result = 0;
561 }
562 }
563 /* No signal to deliver -- put the saved sigmask back */
564 if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
565 clear_thread_flag(TIF_RESTORE_SIGMASK);
566 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
567 }
568
569 return 0;
570}
571EXPORT_SYMBOL(do_signal);
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index 047246ad4f65..bd85b5fd08c8 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -773,6 +773,13 @@ asmlinkage int compat_sys_truncate64(const char __user * path, u32 reg4,
773 return sys_truncate(path, (high << 32) | low); 773 return sys_truncate(path, (high << 32) | low);
774} 774}
775 775
776asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offhi, u32 offlo,
777 u32 lenhi, u32 lenlo)
778{
779 return sys_fallocate(fd, mode, ((loff_t)offhi << 32) | offlo,
780 ((loff_t)lenhi << 32) | lenlo);
781}
782
776asmlinkage int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long high, 783asmlinkage int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long high,
777 unsigned long low) 784 unsigned long low)
778{ 785{
@@ -810,3 +817,12 @@ asmlinkage long compat_sys_request_key(const char __user *_type,
810 return sys_request_key(_type, _description, _callout_info, destringid); 817 return sys_request_key(_type, _description, _callout_info, destringid);
811} 818}
812 819
820asmlinkage long compat_sys_sync_file_range2(int fd, unsigned int flags,
821 unsigned offset_hi, unsigned offset_lo,
822 unsigned nbytes_hi, unsigned nbytes_lo)
823{
824 loff_t offset = ((loff_t)offset_hi << 32) | offset_lo;
825 loff_t nbytes = ((loff_t)nbytes_hi << 32) | nbytes_lo;
826
827 return sys_sync_file_range(fd, offset, nbytes, flags);
828}
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 68991c2d4a1b..55d29ed4b7a0 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -442,12 +442,14 @@ int sysfs_add_device_to_node(struct sys_device *dev, int nid)
442 return sysfs_create_link(&node->sysdev.kobj, &dev->kobj, 442 return sysfs_create_link(&node->sysdev.kobj, &dev->kobj,
443 kobject_name(&dev->kobj)); 443 kobject_name(&dev->kobj));
444} 444}
445EXPORT_SYMBOL_GPL(sysfs_add_device_to_node);
445 446
446void sysfs_remove_device_from_node(struct sys_device *dev, int nid) 447void sysfs_remove_device_from_node(struct sys_device *dev, int nid)
447{ 448{
448 struct node *node = &node_devices[nid]; 449 struct node *node = &node_devices[nid];
449 sysfs_remove_link(&node->sysdev.kobj, kobject_name(&dev->kobj)); 450 sysfs_remove_link(&node->sysdev.kobj, kobject_name(&dev->kobj));
450} 451}
452EXPORT_SYMBOL_GPL(sysfs_remove_device_from_node);
451 453
452#else 454#else
453static void register_nodes(void) 455static void register_nodes(void)
@@ -457,9 +459,6 @@ static void register_nodes(void)
457 459
458#endif 460#endif
459 461
460EXPORT_SYMBOL_GPL(sysfs_add_device_to_node);
461EXPORT_SYMBOL_GPL(sysfs_remove_device_from_node);
462
463/* Only valid if CPU is present. */ 462/* Only valid if CPU is present. */
464static ssize_t show_physical_id(struct sys_device *dev, char *buf) 463static ssize_t show_physical_id(struct sys_device *dev, char *buf)
465{ 464{
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 2c8564d54e4d..727a6699f2f4 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -77,9 +77,8 @@
77/* keep track of when we need to update the rtc */ 77/* keep track of when we need to update the rtc */
78time_t last_rtc_update; 78time_t last_rtc_update;
79#ifdef CONFIG_PPC_ISERIES 79#ifdef CONFIG_PPC_ISERIES
80unsigned long iSeries_recal_titan = 0; 80static unsigned long __initdata iSeries_recal_titan;
81unsigned long iSeries_recal_tb = 0; 81static signed long __initdata iSeries_recal_tb;
82static unsigned long first_settimeofday = 1;
83#endif 82#endif
84 83
85/* The decrementer counts down by 128 every 128ns on a 601. */ 84/* The decrementer counts down by 128 every 128ns on a 601. */
@@ -113,8 +112,9 @@ u64 ticklen_to_xs; /* 0.64 fraction */
113DEFINE_SPINLOCK(rtc_lock); 112DEFINE_SPINLOCK(rtc_lock);
114EXPORT_SYMBOL_GPL(rtc_lock); 113EXPORT_SYMBOL_GPL(rtc_lock);
115 114
116u64 tb_to_ns_scale; 115static u64 tb_to_ns_scale __read_mostly;
117unsigned tb_to_ns_shift; 116static unsigned tb_to_ns_shift __read_mostly;
117static unsigned long boot_tb __read_mostly;
118 118
119struct gettimeofday_struct do_gtod; 119struct gettimeofday_struct do_gtod;
120 120
@@ -122,6 +122,7 @@ extern struct timezone sys_tz;
122static long timezone_offset; 122static long timezone_offset;
123 123
124unsigned long ppc_proc_freq; 124unsigned long ppc_proc_freq;
125EXPORT_SYMBOL(ppc_proc_freq);
125unsigned long ppc_tb_freq; 126unsigned long ppc_tb_freq;
126 127
127static u64 tb_last_jiffy __cacheline_aligned_in_smp; 128static u64 tb_last_jiffy __cacheline_aligned_in_smp;
@@ -214,7 +215,6 @@ static void account_process_time(struct pt_regs *regs)
214 run_posix_cpu_timers(current); 215 run_posix_cpu_timers(current);
215} 216}
216 217
217#ifdef CONFIG_PPC_SPLPAR
218/* 218/*
219 * Stuff for accounting stolen time. 219 * Stuff for accounting stolen time.
220 */ 220 */
@@ -222,19 +222,28 @@ struct cpu_purr_data {
222 int initialized; /* thread is running */ 222 int initialized; /* thread is running */
223 u64 tb; /* last TB value read */ 223 u64 tb; /* last TB value read */
224 u64 purr; /* last PURR value read */ 224 u64 purr; /* last PURR value read */
225 spinlock_t lock;
226}; 225};
227 226
227/*
228 * Each entry in the cpu_purr_data array is manipulated only by its
229 * "owner" cpu -- usually in the timer interrupt but also occasionally
230 * in process context for cpu online. As long as cpus do not touch
231 * each others' cpu_purr_data, disabling local interrupts is
232 * sufficient to serialize accesses.
233 */
228static DEFINE_PER_CPU(struct cpu_purr_data, cpu_purr_data); 234static DEFINE_PER_CPU(struct cpu_purr_data, cpu_purr_data);
229 235
230static void snapshot_tb_and_purr(void *data) 236static void snapshot_tb_and_purr(void *data)
231{ 237{
238 unsigned long flags;
232 struct cpu_purr_data *p = &__get_cpu_var(cpu_purr_data); 239 struct cpu_purr_data *p = &__get_cpu_var(cpu_purr_data);
233 240
241 local_irq_save(flags);
234 p->tb = mftb(); 242 p->tb = mftb();
235 p->purr = mfspr(SPRN_PURR); 243 p->purr = mfspr(SPRN_PURR);
236 wmb(); 244 wmb();
237 p->initialized = 1; 245 p->initialized = 1;
246 local_irq_restore(flags);
238} 247}
239 248
240/* 249/*
@@ -242,15 +251,14 @@ static void snapshot_tb_and_purr(void *data)
242 */ 251 */
243void snapshot_timebases(void) 252void snapshot_timebases(void)
244{ 253{
245 int cpu;
246
247 if (!cpu_has_feature(CPU_FTR_PURR)) 254 if (!cpu_has_feature(CPU_FTR_PURR))
248 return; 255 return;
249 for_each_possible_cpu(cpu)
250 spin_lock_init(&per_cpu(cpu_purr_data, cpu).lock);
251 on_each_cpu(snapshot_tb_and_purr, NULL, 0, 1); 256 on_each_cpu(snapshot_tb_and_purr, NULL, 0, 1);
252} 257}
253 258
259/*
260 * Must be called with interrupts disabled.
261 */
254void calculate_steal_time(void) 262void calculate_steal_time(void)
255{ 263{
256 u64 tb, purr; 264 u64 tb, purr;
@@ -262,7 +270,6 @@ void calculate_steal_time(void)
262 pme = &per_cpu(cpu_purr_data, smp_processor_id()); 270 pme = &per_cpu(cpu_purr_data, smp_processor_id());
263 if (!pme->initialized) 271 if (!pme->initialized)
264 return; /* this can happen in early boot */ 272 return; /* this can happen in early boot */
265 spin_lock(&pme->lock);
266 tb = mftb(); 273 tb = mftb();
267 purr = mfspr(SPRN_PURR); 274 purr = mfspr(SPRN_PURR);
268 stolen = (tb - pme->tb) - (purr - pme->purr); 275 stolen = (tb - pme->tb) - (purr - pme->purr);
@@ -270,9 +277,9 @@ void calculate_steal_time(void)
270 account_steal_time(current, stolen); 277 account_steal_time(current, stolen);
271 pme->tb = tb; 278 pme->tb = tb;
272 pme->purr = purr; 279 pme->purr = purr;
273 spin_unlock(&pme->lock);
274} 280}
275 281
282#ifdef CONFIG_PPC_SPLPAR
276/* 283/*
277 * Must be called before the cpu is added to the online map when 284 * Must be called before the cpu is added to the online map when
278 * a cpu is being brought up at runtime. 285 * a cpu is being brought up at runtime.
@@ -284,12 +291,12 @@ static void snapshot_purr(void)
284 291
285 if (!cpu_has_feature(CPU_FTR_PURR)) 292 if (!cpu_has_feature(CPU_FTR_PURR))
286 return; 293 return;
294 local_irq_save(flags);
287 pme = &per_cpu(cpu_purr_data, smp_processor_id()); 295 pme = &per_cpu(cpu_purr_data, smp_processor_id());
288 spin_lock_irqsave(&pme->lock, flags);
289 pme->tb = mftb(); 296 pme->tb = mftb();
290 pme->purr = mfspr(SPRN_PURR); 297 pme->purr = mfspr(SPRN_PURR);
291 pme->initialized = 1; 298 pme->initialized = 1;
292 spin_unlock_irqrestore(&pme->lock, flags); 299 local_irq_restore(flags);
293} 300}
294 301
295#endif /* CONFIG_PPC_SPLPAR */ 302#endif /* CONFIG_PPC_SPLPAR */
@@ -550,10 +557,15 @@ EXPORT_SYMBOL(profile_pc);
550 * returned by the service processor for the timebase frequency. 557 * returned by the service processor for the timebase frequency.
551 */ 558 */
552 559
553static void iSeries_tb_recal(void) 560static int __init iSeries_tb_recal(void)
554{ 561{
555 struct div_result divres; 562 struct div_result divres;
556 unsigned long titan, tb; 563 unsigned long titan, tb;
564
565 /* Make sure we only run on iSeries */
566 if (!firmware_has_feature(FW_FEATURE_ISERIES))
567 return -ENODEV;
568
557 tb = get_tb(); 569 tb = get_tb();
558 titan = HvCallXm_loadTod(); 570 titan = HvCallXm_loadTod();
559 if ( iSeries_recal_titan ) { 571 if ( iSeries_recal_titan ) {
@@ -594,8 +606,18 @@ static void iSeries_tb_recal(void)
594 } 606 }
595 iSeries_recal_titan = titan; 607 iSeries_recal_titan = titan;
596 iSeries_recal_tb = tb; 608 iSeries_recal_tb = tb;
609
610 return 0;
597} 611}
598#endif 612late_initcall(iSeries_tb_recal);
613
614/* Called from platform early init */
615void __init iSeries_time_init_early(void)
616{
617 iSeries_recal_tb = get_tb();
618 iSeries_recal_titan = HvCallXm_loadTod();
619}
620#endif /* CONFIG_PPC_ISERIES */
599 621
600/* 622/*
601 * For iSeries shared processors, we have to let the hypervisor 623 * For iSeries shared processors, we have to let the hypervisor
@@ -735,7 +757,7 @@ unsigned long long sched_clock(void)
735{ 757{
736 if (__USE_RTC()) 758 if (__USE_RTC())
737 return get_rtc(); 759 return get_rtc();
738 return mulhdu(get_tb(), tb_to_ns_scale) << tb_to_ns_shift; 760 return mulhdu(get_tb() - boot_tb, tb_to_ns_scale) << tb_to_ns_shift;
739} 761}
740 762
741int do_settimeofday(struct timespec *tv) 763int do_settimeofday(struct timespec *tv)
@@ -759,12 +781,6 @@ int do_settimeofday(struct timespec *tv)
759 * to the RTC again, or write to the RTC but then they don't call 781 * to the RTC again, or write to the RTC but then they don't call
760 * settimeofday to perform this operation. 782 * settimeofday to perform this operation.
761 */ 783 */
762#ifdef CONFIG_PPC_ISERIES
763 if (firmware_has_feature(FW_FEATURE_ISERIES) && first_settimeofday) {
764 iSeries_tb_recal();
765 first_settimeofday = 0;
766 }
767#endif
768 784
769 /* Make userspace gettimeofday spin until we're done. */ 785 /* Make userspace gettimeofday spin until we're done. */
770 ++vdso_data->tb_update_count; 786 ++vdso_data->tb_update_count;
@@ -960,6 +976,8 @@ void __init time_init(void)
960 } 976 }
961 tb_to_ns_scale = scale; 977 tb_to_ns_scale = scale;
962 tb_to_ns_shift = shift; 978 tb_to_ns_shift = shift;
979 /* Save the current timebase to pretty up CONFIG_PRINTK_TIME */
980 boot_tb = get_tb();
963 981
964 tm = get_boot_time(); 982 tm = get_boot_time();
965 983
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index bf6445ac9f1c..2bb1cb911783 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -149,6 +149,7 @@ int die(const char *str, struct pt_regs *regs, long err)
149 149
150 bust_spinlocks(0); 150 bust_spinlocks(0);
151 die.lock_owner = -1; 151 die.lock_owner = -1;
152 add_taint(TAINT_DIE);
152 spin_unlock_irqrestore(&die.lock, flags); 153 spin_unlock_irqrestore(&die.lock, flags);
153 154
154 if (kexec_should_crash(current) || 155 if (kexec_should_crash(current) ||
@@ -777,7 +778,7 @@ void __kprobes program_check_exception(struct pt_regs *regs)
777 return; 778 return;
778 779
779 if (!(regs->msr & MSR_PR) && /* not user-mode */ 780 if (!(regs->msr & MSR_PR) && /* not user-mode */
780 report_bug(regs->nip) == BUG_TRAP_TYPE_WARN) { 781 report_bug(regs->nip, regs) == BUG_TRAP_TYPE_WARN) {
781 regs->nip += 4; 782 regs->nip += 4;
782 return; 783 return;
783 } 784 }
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index 87703df87509..cbca1df8bc60 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -151,12 +151,18 @@ static struct console udbg_console = {
151 151
152static int early_console_initialized; 152static int early_console_initialized;
153 153
154/* called by setup_system */ 154/*
155 * Called by setup_system after ppc_md->probe and ppc_md->early_init.
156 * Call it again after setting udbg_putc in ppc_md->setup_arch.
157 */
155void register_early_udbg_console(void) 158void register_early_udbg_console(void)
156{ 159{
157 if (early_console_initialized) 160 if (early_console_initialized)
158 return; 161 return;
159 162
163 if (!udbg_putc)
164 return;
165
160 if (strstr(boot_command_line, "udbg-immortal")) { 166 if (strstr(boot_command_line, "udbg-immortal")) {
161 printk(KERN_INFO "early console immortal !\n"); 167 printk(KERN_INFO "early console immortal !\n");
162 udbg_console.flags &= ~CON_BOOT; 168 udbg_console.flags &= ~CON_BOOT;
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index 4245579edb4e..cef01e4e8989 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -670,7 +670,7 @@ static int __init vdso_init(void)
670 /* 670 /*
671 * Fill up the "systemcfg" stuff for backward compatiblity 671 * Fill up the "systemcfg" stuff for backward compatiblity
672 */ 672 */
673 strcpy(vdso_data->eye_catcher, "SYSTEMCFG:PPC64"); 673 strcpy((char *)vdso_data->eye_catcher, "SYSTEMCFG:PPC64");
674 vdso_data->version.major = SYSTEMCFG_MAJOR; 674 vdso_data->version.major = SYSTEMCFG_MAJOR;
675 vdso_data->version.minor = SYSTEMCFG_MINOR; 675 vdso_data->version.minor = SYSTEMCFG_MINOR;
676 vdso_data->processor = mfspr(SPRN_PVR); 676 vdso_data->processor = mfspr(SPRN_PVR);
diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S b/arch/powerpc/kernel/vdso32/gettimeofday.S
index 05909f754307..72ca26df457e 100644
--- a/arch/powerpc/kernel/vdso32/gettimeofday.S
+++ b/arch/powerpc/kernel/vdso32/gettimeofday.S
@@ -32,6 +32,8 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
32 mr r11,r4 /* r11 saves tz */ 32 mr r11,r4 /* r11 saves tz */
33 bl __get_datapage@local /* get data page */ 33 bl __get_datapage@local /* get data page */
34 mr r9, r3 /* datapage ptr in r9 */ 34 mr r9, r3 /* datapage ptr in r9 */
35 cmplwi r10,0 /* check if tv is NULL */
36 beq 3f
35 bl __do_get_xsec@local /* get xsec from tb & kernel */ 37 bl __do_get_xsec@local /* get xsec from tb & kernel */
36 bne- 2f /* out of line -> do syscall */ 38 bne- 2f /* out of line -> do syscall */
37 39
@@ -50,7 +52,7 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
50 mulhwu r5,r5,r6 52 mulhwu r5,r5,r6
51 stw r5,TVAL32_TV_USEC(r10) 53 stw r5,TVAL32_TV_USEC(r10)
52 54
53 cmpli cr0,r11,0 /* check if tz is NULL */ 553: cmplwi r11,0 /* check if tz is NULL */
54 beq 1f 56 beq 1f
55 lwz r4,CFG_TZ_MINUTEWEST(r9)/* fill tz */ 57 lwz r4,CFG_TZ_MINUTEWEST(r9)/* fill tz */
56 lwz r5,CFG_TZ_DSTTIME(r9) 58 lwz r5,CFG_TZ_DSTTIME(r9)
diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S b/arch/powerpc/kernel/vdso64/gettimeofday.S
index 40ffd9b6cef7..c6401f9e37f1 100644
--- a/arch/powerpc/kernel/vdso64/gettimeofday.S
+++ b/arch/powerpc/kernel/vdso64/gettimeofday.S
@@ -1,5 +1,4 @@
1 1/*
2 /*
3 * Userland implementation of gettimeofday() for 64 bits processes in a 2 * Userland implementation of gettimeofday() for 64 bits processes in a
4 * ppc64 kernel for use in the vDSO 3 * ppc64 kernel for use in the vDSO
5 * 4 *
@@ -32,6 +31,8 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
32 mr r11,r3 /* r11 holds tv */ 31 mr r11,r3 /* r11 holds tv */
33 mr r10,r4 /* r10 holds tz */ 32 mr r10,r4 /* r10 holds tz */
34 bl V_LOCAL_FUNC(__get_datapage) /* get data page */ 33 bl V_LOCAL_FUNC(__get_datapage) /* get data page */
34 cmpldi r11,0 /* check if tv is NULL */
35 beq 2f
35 bl V_LOCAL_FUNC(__do_get_xsec) /* get xsec from tb & kernel */ 36 bl V_LOCAL_FUNC(__do_get_xsec) /* get xsec from tb & kernel */
36 lis r7,15 /* r7 = 1000000 = USEC_PER_SEC */ 37 lis r7,15 /* r7 = 1000000 = USEC_PER_SEC */
37 ori r7,r7,16960 38 ori r7,r7,16960
@@ -43,8 +44,8 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
43 * XSEC_PER_SEC 44 * XSEC_PER_SEC
44 */ 45 */
45 rldicl r0,r0,44,20 46 rldicl r0,r0,44,20
46 cmpldi cr0,r10,0 /* check if tz is NULL */
47 std r0,TVAL64_TV_USEC(r11) /* store usec in tv */ 47 std r0,TVAL64_TV_USEC(r11) /* store usec in tv */
482: cmpldi r10,0 /* check if tz is NULL */
48 beq 1f 49 beq 1f
49 lwz r4,CFG_TZ_MINUTEWEST(r3)/* fill tz */ 50 lwz r4,CFG_TZ_MINUTEWEST(r3)/* fill tz */
50 lwz r5,CFG_TZ_DSTTIME(r3) 51 lwz r5,CFG_TZ_DSTTIME(r3)
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 21c39ff2dc39..0c458556399f 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -7,6 +7,7 @@
7#define PROVIDE32(x) PROVIDE(x) 7#define PROVIDE32(x) PROVIDE(x)
8#endif 8#endif
9#include <asm-generic/vmlinux.lds.h> 9#include <asm-generic/vmlinux.lds.h>
10#include <asm/cache.h>
10 11
11ENTRY(_stext) 12ENTRY(_stext)
12 13
@@ -62,6 +63,8 @@ SECTIONS
62 __stop___ex_table = .; 63 __stop___ex_table = .;
63 } 64 }
64 65
66 NOTES
67
65 BUG_TABLE 68 BUG_TABLE
66 69
67/* 70/*
@@ -143,6 +146,7 @@ SECTIONS
143 .data.percpu : { 146 .data.percpu : {
144 __per_cpu_start = .; 147 __per_cpu_start = .;
145 *(.data.percpu) 148 *(.data.percpu)
149 *(.data.percpu.shared_aligned)
146 __per_cpu_end = .; 150 __per_cpu_end = .;
147 } 151 }
148 152
@@ -173,7 +177,9 @@ SECTIONS
173 } 177 }
174#else 178#else
175 .data : { 179 .data : {
176 *(.data .data.rel* .toc1) 180 DATA_DATA
181 *(.data.rel*)
182 *(.toc1)
177 *(.branch_lt) 183 *(.branch_lt)
178 } 184 }
179 185
@@ -211,6 +217,11 @@ SECTIONS
211 *(.data.cacheline_aligned) 217 *(.data.cacheline_aligned)
212 } 218 }
213 219
220 . = ALIGN(L1_CACHE_BYTES);
221 .data.read_mostly : {
222 *(.data.read_mostly)
223 }
224
214 . = ALIGN(PAGE_SIZE); 225 . = ALIGN(PAGE_SIZE);
215 __data_nosave : { 226 __data_nosave : {
216 __nosave_begin = .; 227 __nosave_begin = .;
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c
index 180ee2933ab9..2f24ea0d723a 100644
--- a/arch/powerpc/lib/rheap.c
+++ b/arch/powerpc/lib/rheap.c
@@ -437,27 +437,26 @@ unsigned long rh_alloc_align(rh_info_t * info, int size, int alignment, const ch
437 struct list_head *l; 437 struct list_head *l;
438 rh_block_t *blk; 438 rh_block_t *blk;
439 rh_block_t *newblk; 439 rh_block_t *newblk;
440 unsigned long start; 440 unsigned long start, sp_size;
441 441
442 /* Validate size, and alignment must be power of two */ 442 /* Validate size, and alignment must be power of two */
443 if (size <= 0 || (alignment & (alignment - 1)) != 0) 443 if (size <= 0 || (alignment & (alignment - 1)) != 0)
444 return (unsigned long) -EINVAL; 444 return (unsigned long) -EINVAL;
445 445
446 /* given alignment larger that default rheap alignment */
447 if (alignment > info->alignment)
448 size += alignment - 1;
449
450 /* Align to configured alignment */ 446 /* Align to configured alignment */
451 size = (size + (info->alignment - 1)) & ~(info->alignment - 1); 447 size = (size + (info->alignment - 1)) & ~(info->alignment - 1);
452 448
453 if (assure_empty(info, 1) < 0) 449 if (assure_empty(info, 2) < 0)
454 return (unsigned long) -ENOMEM; 450 return (unsigned long) -ENOMEM;
455 451
456 blk = NULL; 452 blk = NULL;
457 list_for_each(l, &info->free_list) { 453 list_for_each(l, &info->free_list) {
458 blk = list_entry(l, rh_block_t, list); 454 blk = list_entry(l, rh_block_t, list);
459 if (size <= blk->size) 455 if (size <= blk->size) {
460 break; 456 start = (blk->start + alignment - 1) & ~(alignment - 1);
457 if (start + size <= blk->start + blk->size)
458 break;
459 }
461 blk = NULL; 460 blk = NULL;
462 } 461 }
463 462
@@ -470,25 +469,36 @@ unsigned long rh_alloc_align(rh_info_t * info, int size, int alignment, const ch
470 list_del(&blk->list); 469 list_del(&blk->list);
471 newblk = blk; 470 newblk = blk;
472 } else { 471 } else {
472 /* Fragment caused, split if needed */
473 /* Create block for fragment in the beginning */
474 sp_size = start - blk->start;
475 if (sp_size) {
476 rh_block_t *spblk;
477
478 spblk = get_slot(info);
479 spblk->start = blk->start;
480 spblk->size = sp_size;
481 /* add before the blk */
482 list_add(&spblk->list, blk->list.prev);
483 }
473 newblk = get_slot(info); 484 newblk = get_slot(info);
474 newblk->start = blk->start; 485 newblk->start = start;
475 newblk->size = size; 486 newblk->size = size;
476 487
477 /* blk still in free list, with updated start, size */ 488 /* blk still in free list, with updated start and size
478 blk->start += size; 489 * for fragment in the end */
479 blk->size -= size; 490 blk->start = start + size;
491 blk->size -= sp_size + size;
492 /* No fragment in the end, remove blk */
493 if (blk->size == 0) {
494 list_del(&blk->list);
495 release_slot(info, blk);
496 }
480 } 497 }
481 498
482 newblk->owner = owner; 499 newblk->owner = owner;
483 start = newblk->start;
484 attach_taken_block(info, newblk); 500 attach_taken_block(info, newblk);
485 501
486 /* for larger alignment return fixed up pointer */
487 /* this is no problem with the deallocator since */
488 /* we scan for pointers that lie in the blocks */
489 if (alignment > info->alignment)
490 start = (start + alignment - 1) & ~(alignment - 1);
491
492 return start; 502 return start;
493} 503}
494 504
diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c
index ca4dcb07a939..c3df50476539 100644
--- a/arch/powerpc/mm/44x_mmu.c
+++ b/arch/powerpc/mm/44x_mmu.c
@@ -12,7 +12,6 @@
12 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 12 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
13 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 13 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
14 * Copyright (C) 1996 Paul Mackerras 14 * Copyright (C) 1996 Paul Mackerras
15 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
16 * 15 *
17 * Derived from "arch/i386/mm/init.c" 16 * Derived from "arch/i386/mm/init.c"
18 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 17 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
diff --git a/arch/powerpc/mm/4xx_mmu.c b/arch/powerpc/mm/4xx_mmu.c
index 838e09db71d9..7ff2609b64d1 100644
--- a/arch/powerpc/mm/4xx_mmu.c
+++ b/arch/powerpc/mm/4xx_mmu.c
@@ -9,7 +9,6 @@
9 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 9 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
10 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 10 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
11 * Copyright (C) 1996 Paul Mackerras 11 * Copyright (C) 1996 Paul Mackerras
12 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
13 * 12 *
14 * Derived from "arch/i386/mm/init.c" 13 * Derived from "arch/i386/mm/init.c"
15 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 14 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
index 4f839c6a9768..7e4d27ad3dee 100644
--- a/arch/powerpc/mm/Makefile
+++ b/arch/powerpc/mm/Makefile
@@ -11,8 +11,7 @@ obj-$(CONFIG_PPC32) += init_32.o pgtable_32.o mmu_context_32.o
11hash-$(CONFIG_PPC_NATIVE) := hash_native_64.o 11hash-$(CONFIG_PPC_NATIVE) := hash_native_64.o
12obj-$(CONFIG_PPC64) += init_64.o pgtable_64.o mmu_context_64.o \ 12obj-$(CONFIG_PPC64) += init_64.o pgtable_64.o mmu_context_64.o \
13 hash_utils_64.o hash_low_64.o tlb_64.o \ 13 hash_utils_64.o hash_low_64.o tlb_64.o \
14 slb_low.o slb.o stab.o mmap.o imalloc.o \ 14 slb_low.o slb.o stab.o mmap.o $(hash-y)
15 $(hash-y)
16obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu_32.o hash_low_32.o tlb_32.o 15obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu_32.o hash_low_32.o tlb_32.o
17obj-$(CONFIG_40x) += 4xx_mmu.o 16obj-$(CONFIG_40x) += 4xx_mmu.o
18obj-$(CONFIG_44x) += 44x_mmu.o 17obj-$(CONFIG_44x) += 44x_mmu.o
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index bfe901353142..3767211b3d0f 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -145,7 +145,7 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address,
145 struct mm_struct *mm = current->mm; 145 struct mm_struct *mm = current->mm;
146 siginfo_t info; 146 siginfo_t info;
147 int code = SEGV_MAPERR; 147 int code = SEGV_MAPERR;
148 int is_write = 0; 148 int is_write = 0, ret;
149 int trap = TRAP(regs); 149 int trap = TRAP(regs);
150 int is_exec = trap == 0x400; 150 int is_exec = trap == 0x400;
151 151
@@ -279,14 +279,13 @@ good_area:
279#endif /* CONFIG_8xx */ 279#endif /* CONFIG_8xx */
280 280
281 if (is_exec) { 281 if (is_exec) {
282#ifdef CONFIG_PPC64 282#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
283 /* protection fault */ 283 /* protection fault */
284 if (error_code & DSISR_PROTFAULT) 284 if (error_code & DSISR_PROTFAULT)
285 goto bad_area; 285 goto bad_area;
286 if (!(vma->vm_flags & VM_EXEC)) 286 if (!(vma->vm_flags & VM_EXEC))
287 goto bad_area; 287 goto bad_area;
288#endif 288#else
289#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
290 pte_t *ptep; 289 pte_t *ptep;
291 pmd_t *pmdp; 290 pmd_t *pmdp;
292 291
@@ -331,22 +330,18 @@ good_area:
331 * the fault. 330 * the fault.
332 */ 331 */
333 survive: 332 survive:
334 switch (handle_mm_fault(mm, vma, address, is_write)) { 333 ret = handle_mm_fault(mm, vma, address, is_write);
335 334 if (unlikely(ret & VM_FAULT_ERROR)) {
336 case VM_FAULT_MINOR: 335 if (ret & VM_FAULT_OOM)
337 current->min_flt++; 336 goto out_of_memory;
338 break; 337 else if (ret & VM_FAULT_SIGBUS)
339 case VM_FAULT_MAJOR: 338 goto do_sigbus;
340 current->maj_flt++;
341 break;
342 case VM_FAULT_SIGBUS:
343 goto do_sigbus;
344 case VM_FAULT_OOM:
345 goto out_of_memory;
346 default:
347 BUG(); 339 BUG();
348 } 340 }
349 341 if (ret & VM_FAULT_MAJOR)
342 current->maj_flt++;
343 else
344 current->min_flt++;
350 up_read(&mm->mmap_sem); 345 up_read(&mm->mmap_sem);
351 return 0; 346 return 0;
352 347
@@ -381,7 +376,7 @@ out_of_memory:
381 } 376 }
382 printk("VM: killing process %s\n", current->comm); 377 printk("VM: killing process %s\n", current->comm);
383 if (user_mode(regs)) 378 if (user_mode(regs))
384 do_exit(SIGKILL); 379 do_group_exit(SIGKILL);
385 return SIGKILL; 380 return SIGKILL;
386 381
387do_sigbus: 382do_sigbus:
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c
index 123da03ab118..afab247d472f 100644
--- a/arch/powerpc/mm/fsl_booke_mmu.c
+++ b/arch/powerpc/mm/fsl_booke_mmu.c
@@ -14,7 +14,6 @@
14 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 14 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
15 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 15 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
16 * Copyright (C) 1996 Paul Mackerras 16 * Copyright (C) 1996 Paul Mackerras
17 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
18 * 17 *
19 * Derived from "arch/i386/mm/init.c" 18 * Derived from "arch/i386/mm/init.c"
20 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 19 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c
index 4a20d890e2f4..6ba9b47e55af 100644
--- a/arch/powerpc/mm/hash_native_64.c
+++ b/arch/powerpc/mm/hash_native_64.c
@@ -104,7 +104,7 @@ static inline void tlbie(unsigned long va, int psize, int local)
104 spin_unlock(&native_tlbie_lock); 104 spin_unlock(&native_tlbie_lock);
105} 105}
106 106
107static inline void native_lock_hpte(hpte_t *hptep) 107static inline void native_lock_hpte(struct hash_pte *hptep)
108{ 108{
109 unsigned long *word = &hptep->v; 109 unsigned long *word = &hptep->v;
110 110
@@ -116,7 +116,7 @@ static inline void native_lock_hpte(hpte_t *hptep)
116 } 116 }
117} 117}
118 118
119static inline void native_unlock_hpte(hpte_t *hptep) 119static inline void native_unlock_hpte(struct hash_pte *hptep)
120{ 120{
121 unsigned long *word = &hptep->v; 121 unsigned long *word = &hptep->v;
122 122
@@ -128,7 +128,7 @@ static long native_hpte_insert(unsigned long hpte_group, unsigned long va,
128 unsigned long pa, unsigned long rflags, 128 unsigned long pa, unsigned long rflags,
129 unsigned long vflags, int psize) 129 unsigned long vflags, int psize)
130{ 130{
131 hpte_t *hptep = htab_address + hpte_group; 131 struct hash_pte *hptep = htab_address + hpte_group;
132 unsigned long hpte_v, hpte_r; 132 unsigned long hpte_v, hpte_r;
133 int i; 133 int i;
134 134
@@ -163,7 +163,7 @@ static long native_hpte_insert(unsigned long hpte_group, unsigned long va,
163 163
164 hptep->r = hpte_r; 164 hptep->r = hpte_r;
165 /* Guarantee the second dword is visible before the valid bit */ 165 /* Guarantee the second dword is visible before the valid bit */
166 __asm__ __volatile__ ("eieio" : : : "memory"); 166 eieio();
167 /* 167 /*
168 * Now set the first dword including the valid bit 168 * Now set the first dword including the valid bit
169 * NOTE: this also unlocks the hpte 169 * NOTE: this also unlocks the hpte
@@ -177,7 +177,7 @@ static long native_hpte_insert(unsigned long hpte_group, unsigned long va,
177 177
178static long native_hpte_remove(unsigned long hpte_group) 178static long native_hpte_remove(unsigned long hpte_group)
179{ 179{
180 hpte_t *hptep; 180 struct hash_pte *hptep;
181 int i; 181 int i;
182 int slot_offset; 182 int slot_offset;
183 unsigned long hpte_v; 183 unsigned long hpte_v;
@@ -217,7 +217,7 @@ static long native_hpte_remove(unsigned long hpte_group)
217static long native_hpte_updatepp(unsigned long slot, unsigned long newpp, 217static long native_hpte_updatepp(unsigned long slot, unsigned long newpp,
218 unsigned long va, int psize, int local) 218 unsigned long va, int psize, int local)
219{ 219{
220 hpte_t *hptep = htab_address + slot; 220 struct hash_pte *hptep = htab_address + slot;
221 unsigned long hpte_v, want_v; 221 unsigned long hpte_v, want_v;
222 int ret = 0; 222 int ret = 0;
223 223
@@ -233,15 +233,14 @@ static long native_hpte_updatepp(unsigned long slot, unsigned long newpp,
233 /* Even if we miss, we need to invalidate the TLB */ 233 /* Even if we miss, we need to invalidate the TLB */
234 if (!HPTE_V_COMPARE(hpte_v, want_v) || !(hpte_v & HPTE_V_VALID)) { 234 if (!HPTE_V_COMPARE(hpte_v, want_v) || !(hpte_v & HPTE_V_VALID)) {
235 DBG_LOW(" -> miss\n"); 235 DBG_LOW(" -> miss\n");
236 native_unlock_hpte(hptep);
237 ret = -1; 236 ret = -1;
238 } else { 237 } else {
239 DBG_LOW(" -> hit\n"); 238 DBG_LOW(" -> hit\n");
240 /* Update the HPTE */ 239 /* Update the HPTE */
241 hptep->r = (hptep->r & ~(HPTE_R_PP | HPTE_R_N)) | 240 hptep->r = (hptep->r & ~(HPTE_R_PP | HPTE_R_N)) |
242 (newpp & (HPTE_R_PP | HPTE_R_N | HPTE_R_C)); 241 (newpp & (HPTE_R_PP | HPTE_R_N | HPTE_R_C));
243 native_unlock_hpte(hptep);
244 } 242 }
243 native_unlock_hpte(hptep);
245 244
246 /* Ensure it is out of the tlb too. */ 245 /* Ensure it is out of the tlb too. */
247 tlbie(va, psize, local); 246 tlbie(va, psize, local);
@@ -251,7 +250,7 @@ static long native_hpte_updatepp(unsigned long slot, unsigned long newpp,
251 250
252static long native_hpte_find(unsigned long va, int psize) 251static long native_hpte_find(unsigned long va, int psize)
253{ 252{
254 hpte_t *hptep; 253 struct hash_pte *hptep;
255 unsigned long hash; 254 unsigned long hash;
256 unsigned long i, j; 255 unsigned long i, j;
257 long slot; 256 long slot;
@@ -294,7 +293,7 @@ static void native_hpte_updateboltedpp(unsigned long newpp, unsigned long ea,
294{ 293{
295 unsigned long vsid, va; 294 unsigned long vsid, va;
296 long slot; 295 long slot;
297 hpte_t *hptep; 296 struct hash_pte *hptep;
298 297
299 vsid = get_kernel_vsid(ea); 298 vsid = get_kernel_vsid(ea);
300 va = (vsid << 28) | (ea & 0x0fffffff); 299 va = (vsid << 28) | (ea & 0x0fffffff);
@@ -315,7 +314,7 @@ static void native_hpte_updateboltedpp(unsigned long newpp, unsigned long ea,
315static void native_hpte_invalidate(unsigned long slot, unsigned long va, 314static void native_hpte_invalidate(unsigned long slot, unsigned long va,
316 int psize, int local) 315 int psize, int local)
317{ 316{
318 hpte_t *hptep = htab_address + slot; 317 struct hash_pte *hptep = htab_address + slot;
319 unsigned long hpte_v; 318 unsigned long hpte_v;
320 unsigned long want_v; 319 unsigned long want_v;
321 unsigned long flags; 320 unsigned long flags;
@@ -345,7 +344,7 @@ static void native_hpte_invalidate(unsigned long slot, unsigned long va,
345#define LP_BITS 8 344#define LP_BITS 8
346#define LP_MASK(i) ((0xFF >> (i)) << LP_SHIFT) 345#define LP_MASK(i) ((0xFF >> (i)) << LP_SHIFT)
347 346
348static void hpte_decode(hpte_t *hpte, unsigned long slot, 347static void hpte_decode(struct hash_pte *hpte, unsigned long slot,
349 int *psize, unsigned long *va) 348 int *psize, unsigned long *va)
350{ 349{
351 unsigned long hpte_r = hpte->r; 350 unsigned long hpte_r = hpte->r;
@@ -415,7 +414,7 @@ static void hpte_decode(hpte_t *hpte, unsigned long slot,
415static void native_hpte_clear(void) 414static void native_hpte_clear(void)
416{ 415{
417 unsigned long slot, slots, flags; 416 unsigned long slot, slots, flags;
418 hpte_t *hptep = htab_address; 417 struct hash_pte *hptep = htab_address;
419 unsigned long hpte_v, va; 418 unsigned long hpte_v, va;
420 unsigned long pteg_count; 419 unsigned long pteg_count;
421 int psize; 420 int psize;
@@ -462,7 +461,7 @@ static void native_hpte_clear(void)
462static void native_flush_hash_range(unsigned long number, int local) 461static void native_flush_hash_range(unsigned long number, int local)
463{ 462{
464 unsigned long va, hash, index, hidx, shift, slot; 463 unsigned long va, hash, index, hidx, shift, slot;
465 hpte_t *hptep; 464 struct hash_pte *hptep;
466 unsigned long hpte_v; 465 unsigned long hpte_v;
467 unsigned long want_v; 466 unsigned long want_v;
468 unsigned long flags; 467 unsigned long flags;
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 4f2f4534a9d8..2ce9491b48d4 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -87,7 +87,7 @@ extern unsigned long dart_tablebase;
87static unsigned long _SDR1; 87static unsigned long _SDR1;
88struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; 88struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT];
89 89
90hpte_t *htab_address; 90struct hash_pte *htab_address;
91unsigned long htab_size_bytes; 91unsigned long htab_size_bytes;
92unsigned long htab_hash_mask; 92unsigned long htab_hash_mask;
93int mmu_linear_psize = MMU_PAGE_4K; 93int mmu_linear_psize = MMU_PAGE_4K;
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 92a1b16fb7e3..4835f73af304 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -542,7 +542,7 @@ static int __init hugetlbpage_init(void)
542 HUGEPTE_TABLE_SIZE, 542 HUGEPTE_TABLE_SIZE,
543 HUGEPTE_TABLE_SIZE, 543 HUGEPTE_TABLE_SIZE,
544 0, 544 0,
545 zero_ctor, NULL); 545 zero_ctor);
546 if (! huge_pgtable_cache) 546 if (! huge_pgtable_cache)
547 panic("hugetlbpage_init(): could not create hugepte cache\n"); 547 panic("hugetlbpage_init(): could not create hugepte cache\n");
548 548
diff --git a/arch/powerpc/mm/imalloc.c b/arch/powerpc/mm/imalloc.c
deleted file mode 100644
index c831815c31f0..000000000000
--- a/arch/powerpc/mm/imalloc.c
+++ /dev/null
@@ -1,313 +0,0 @@
1/*
2 * c 2001 PPC 64 Team, IBM Corp
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */
9
10#include <linux/slab.h>
11#include <linux/vmalloc.h>
12
13#include <asm/uaccess.h>
14#include <asm/pgalloc.h>
15#include <asm/pgtable.h>
16#include <linux/mutex.h>
17#include <asm/cacheflush.h>
18
19#include "mmu_decl.h"
20
21static DEFINE_MUTEX(imlist_mutex);
22struct vm_struct * imlist = NULL;
23
24static int get_free_im_addr(unsigned long size, unsigned long *im_addr)
25{
26 unsigned long addr;
27 struct vm_struct **p, *tmp;
28
29 addr = ioremap_bot;
30 for (p = &imlist; (tmp = *p) ; p = &tmp->next) {
31 if (size + addr < (unsigned long) tmp->addr)
32 break;
33 if ((unsigned long)tmp->addr >= ioremap_bot)
34 addr = tmp->size + (unsigned long) tmp->addr;
35 if (addr >= IMALLOC_END-size)
36 return 1;
37 }
38 *im_addr = addr;
39
40 return 0;
41}
42
43/* Return whether the region described by v_addr and size is a subset
44 * of the region described by parent
45 */
46static inline int im_region_is_subset(unsigned long v_addr, unsigned long size,
47 struct vm_struct *parent)
48{
49 return (int) (v_addr >= (unsigned long) parent->addr &&
50 v_addr < (unsigned long) parent->addr + parent->size &&
51 size < parent->size);
52}
53
54/* Return whether the region described by v_addr and size is a superset
55 * of the region described by child
56 */
57static int im_region_is_superset(unsigned long v_addr, unsigned long size,
58 struct vm_struct *child)
59{
60 struct vm_struct parent;
61
62 parent.addr = (void *) v_addr;
63 parent.size = size;
64
65 return im_region_is_subset((unsigned long) child->addr, child->size,
66 &parent);
67}
68
69/* Return whether the region described by v_addr and size overlaps
70 * the region described by vm. Overlapping regions meet the
71 * following conditions:
72 * 1) The regions share some part of the address space
73 * 2) The regions aren't identical
74 * 3) Neither region is a subset of the other
75 */
76static int im_region_overlaps(unsigned long v_addr, unsigned long size,
77 struct vm_struct *vm)
78{
79 if (im_region_is_superset(v_addr, size, vm))
80 return 0;
81
82 return (v_addr + size > (unsigned long) vm->addr + vm->size &&
83 v_addr < (unsigned long) vm->addr + vm->size) ||
84 (v_addr < (unsigned long) vm->addr &&
85 v_addr + size > (unsigned long) vm->addr);
86}
87
88/* Determine imalloc status of region described by v_addr and size.
89 * Can return one of the following:
90 * IM_REGION_UNUSED - Entire region is unallocated in imalloc space.
91 * IM_REGION_SUBSET - Region is a subset of a region that is already
92 * allocated in imalloc space.
93 * vm will be assigned to a ptr to the parent region.
94 * IM_REGION_EXISTS - Exact region already allocated in imalloc space.
95 * vm will be assigned to a ptr to the existing imlist
96 * member.
97 * IM_REGION_OVERLAPS - Region overlaps an allocated region in imalloc space.
98 * IM_REGION_SUPERSET - Region is a superset of a region that is already
99 * allocated in imalloc space.
100 */
101static int im_region_status(unsigned long v_addr, unsigned long size,
102 struct vm_struct **vm)
103{
104 struct vm_struct *tmp;
105
106 for (tmp = imlist; tmp; tmp = tmp->next)
107 if (v_addr < (unsigned long) tmp->addr + tmp->size)
108 break;
109
110 *vm = NULL;
111 if (tmp) {
112 if (im_region_overlaps(v_addr, size, tmp))
113 return IM_REGION_OVERLAP;
114
115 *vm = tmp;
116 if (im_region_is_subset(v_addr, size, tmp)) {
117 /* Return with tmp pointing to superset */
118 return IM_REGION_SUBSET;
119 }
120 if (im_region_is_superset(v_addr, size, tmp)) {
121 /* Return with tmp pointing to first subset */
122 return IM_REGION_SUPERSET;
123 }
124 else if (v_addr == (unsigned long) tmp->addr &&
125 size == tmp->size) {
126 /* Return with tmp pointing to exact region */
127 return IM_REGION_EXISTS;
128 }
129 }
130
131 return IM_REGION_UNUSED;
132}
133
134static struct vm_struct * split_im_region(unsigned long v_addr,
135 unsigned long size, struct vm_struct *parent)
136{
137 struct vm_struct *vm1 = NULL;
138 struct vm_struct *vm2 = NULL;
139 struct vm_struct *new_vm = NULL;
140
141 vm1 = kmalloc(sizeof(*vm1), GFP_KERNEL);
142 if (vm1 == NULL) {
143 printk(KERN_ERR "%s() out of memory\n", __FUNCTION__);
144 return NULL;
145 }
146
147 if (v_addr == (unsigned long) parent->addr) {
148 /* Use existing parent vm_struct to represent child, allocate
149 * new one for the remainder of parent range
150 */
151 vm1->size = parent->size - size;
152 vm1->addr = (void *) (v_addr + size);
153 vm1->next = parent->next;
154
155 parent->size = size;
156 parent->next = vm1;
157 new_vm = parent;
158 } else if (v_addr + size == (unsigned long) parent->addr +
159 parent->size) {
160 /* Allocate new vm_struct to represent child, use existing
161 * parent one for remainder of parent range
162 */
163 vm1->size = size;
164 vm1->addr = (void *) v_addr;
165 vm1->next = parent->next;
166 new_vm = vm1;
167
168 parent->size -= size;
169 parent->next = vm1;
170 } else {
171 /* Allocate two new vm_structs for the new child and
172 * uppermost remainder, and use existing parent one for the
173 * lower remainder of parent range
174 */
175 vm2 = kmalloc(sizeof(*vm2), GFP_KERNEL);
176 if (vm2 == NULL) {
177 printk(KERN_ERR "%s() out of memory\n", __FUNCTION__);
178 kfree(vm1);
179 return NULL;
180 }
181
182 vm1->size = size;
183 vm1->addr = (void *) v_addr;
184 vm1->next = vm2;
185 new_vm = vm1;
186
187 vm2->size = ((unsigned long) parent->addr + parent->size) -
188 (v_addr + size);
189 vm2->addr = (void *) v_addr + size;
190 vm2->next = parent->next;
191
192 parent->size = v_addr - (unsigned long) parent->addr;
193 parent->next = vm1;
194 }
195
196 return new_vm;
197}
198
199static struct vm_struct * __add_new_im_area(unsigned long req_addr,
200 unsigned long size)
201{
202 struct vm_struct **p, *tmp, *area;
203
204 for (p = &imlist; (tmp = *p) ; p = &tmp->next) {
205 if (req_addr + size <= (unsigned long)tmp->addr)
206 break;
207 }
208
209 area = kmalloc(sizeof(*area), GFP_KERNEL);
210 if (!area)
211 return NULL;
212 area->flags = 0;
213 area->addr = (void *)req_addr;
214 area->size = size;
215 area->next = *p;
216 *p = area;
217
218 return area;
219}
220
221static struct vm_struct * __im_get_area(unsigned long req_addr,
222 unsigned long size,
223 int criteria)
224{
225 struct vm_struct *tmp;
226 int status;
227
228 status = im_region_status(req_addr, size, &tmp);
229 if ((criteria & status) == 0) {
230 return NULL;
231 }
232
233 switch (status) {
234 case IM_REGION_UNUSED:
235 tmp = __add_new_im_area(req_addr, size);
236 break;
237 case IM_REGION_SUBSET:
238 tmp = split_im_region(req_addr, size, tmp);
239 break;
240 case IM_REGION_EXISTS:
241 /* Return requested region */
242 break;
243 case IM_REGION_SUPERSET:
244 /* Return first existing subset of requested region */
245 break;
246 default:
247 printk(KERN_ERR "%s() unexpected imalloc region status\n",
248 __FUNCTION__);
249 tmp = NULL;
250 }
251
252 return tmp;
253}
254
255struct vm_struct * im_get_free_area(unsigned long size)
256{
257 struct vm_struct *area;
258 unsigned long addr;
259
260 mutex_lock(&imlist_mutex);
261 if (get_free_im_addr(size, &addr)) {
262 printk(KERN_ERR "%s() cannot obtain addr for size 0x%lx\n",
263 __FUNCTION__, size);
264 area = NULL;
265 goto next_im_done;
266 }
267
268 area = __im_get_area(addr, size, IM_REGION_UNUSED);
269 if (area == NULL) {
270 printk(KERN_ERR
271 "%s() cannot obtain area for addr 0x%lx size 0x%lx\n",
272 __FUNCTION__, addr, size);
273 }
274next_im_done:
275 mutex_unlock(&imlist_mutex);
276 return area;
277}
278
279struct vm_struct * im_get_area(unsigned long v_addr, unsigned long size,
280 int criteria)
281{
282 struct vm_struct *area;
283
284 mutex_lock(&imlist_mutex);
285 area = __im_get_area(v_addr, size, criteria);
286 mutex_unlock(&imlist_mutex);
287 return area;
288}
289
290void im_free(void * addr)
291{
292 struct vm_struct **p, *tmp;
293
294 if (!addr)
295 return;
296 if ((unsigned long) addr & ~PAGE_MASK) {
297 printk(KERN_ERR "Trying to %s bad address (%p)\n", __FUNCTION__, addr);
298 return;
299 }
300 mutex_lock(&imlist_mutex);
301 for (p = &imlist ; (tmp = *p) ; p = &tmp->next) {
302 if (tmp->addr == addr) {
303 *p = tmp->next;
304 unmap_vm_area(tmp);
305 kfree(tmp);
306 mutex_unlock(&imlist_mutex);
307 return;
308 }
309 }
310 mutex_unlock(&imlist_mutex);
311 printk(KERN_ERR "Trying to %s nonexistent area (%p)\n", __FUNCTION__,
312 addr);
313}
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 5fce6ccecb8d..e1f5ded851f6 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -5,7 +5,6 @@
5 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 5 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
6 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 6 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
7 * Copyright (C) 1996 Paul Mackerras 7 * Copyright (C) 1996 Paul Mackerras
8 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
9 * PPC44x/36-bit changes by Matt Porter (mporter@mvista.com) 8 * PPC44x/36-bit changes by Matt Porter (mporter@mvista.com)
10 * 9 *
11 * Derived from "arch/i386/mm/init.c" 10 * Derived from "arch/i386/mm/init.c"
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index 7312a265545f..9f27bb56a61d 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -5,7 +5,6 @@
5 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 5 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
6 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 6 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
7 * Copyright (C) 1996 Paul Mackerras 7 * Copyright (C) 1996 Paul Mackerras
8 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
9 * 8 *
10 * Derived from "arch/i386/mm/init.c" 9 * Derived from "arch/i386/mm/init.c"
11 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 10 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
@@ -179,7 +178,6 @@ void pgtable_cache_init(void)
179 pgtable_cache[i] = kmem_cache_create(name, 178 pgtable_cache[i] = kmem_cache_create(name,
180 size, size, 179 size, size,
181 SLAB_PANIC, 180 SLAB_PANIC,
182 zero_ctor, 181 zero_ctor);
183 NULL);
184 } 182 }
185} 183}
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 0266a94d83b6..f0e7eedb1ba3 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -5,7 +5,6 @@
5 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 5 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
6 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 6 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
7 * Copyright (C) 1996 Paul Mackerras 7 * Copyright (C) 1996 Paul Mackerras
8 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
9 * PPC44x/36-bit changes by Matt Porter (mporter@mvista.com) 8 * PPC44x/36-bit changes by Matt Porter (mporter@mvista.com)
10 * 9 *
11 * Derived from "arch/i386/mm/init.c" 10 * Derived from "arch/i386/mm/init.c"
@@ -129,8 +128,6 @@ int __devinit arch_add_memory(int nid, u64 start, u64 size)
129 zone = pgdata->node_zones; 128 zone = pgdata->node_zones;
130 129
131 return __add_pages(zone, start_pfn, nr_pages); 130 return __add_pages(zone, start_pfn, nr_pages);
132
133 return 0;
134} 131}
135 132
136/* 133/*
diff --git a/arch/powerpc/mm/mmu_context_32.c b/arch/powerpc/mm/mmu_context_32.c
index 792086b01000..cc32ba41d900 100644
--- a/arch/powerpc/mm/mmu_context_32.c
+++ b/arch/powerpc/mm/mmu_context_32.c
@@ -11,7 +11,6 @@
11 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 11 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
12 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 12 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
13 * Copyright (C) 1996 Paul Mackerras 13 * Copyright (C) 1996 Paul Mackerras
14 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
15 * 14 *
16 * Derived from "arch/i386/mm/init.c" 15 * Derived from "arch/i386/mm/init.c"
17 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 16 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index 2558c34eedaa..c94a64fd3c01 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -8,7 +8,6 @@
8 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 8 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
9 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 9 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
10 * Copyright (C) 1996 Paul Mackerras 10 * Copyright (C) 1996 Paul Mackerras
11 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
12 * 11 *
13 * Derived from "arch/i386/mm/init.c" 12 * Derived from "arch/i386/mm/init.c"
14 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 13 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
@@ -40,8 +39,8 @@ extern int __map_without_bats;
40extern unsigned long ioremap_base; 39extern unsigned long ioremap_base;
41extern unsigned int rtas_data, rtas_size; 40extern unsigned int rtas_data, rtas_size;
42 41
43struct _PTE; 42struct hash_pte;
44extern struct _PTE *Hash, *Hash_end; 43extern struct hash_pte *Hash, *Hash_end;
45extern unsigned long Hash_size, Hash_mask; 44extern unsigned long Hash_size, Hash_mask;
46 45
47extern unsigned int num_tlbcam_entries; 46extern unsigned int num_tlbcam_entries;
@@ -90,16 +89,4 @@ static inline void flush_HPTE(unsigned context, unsigned long va,
90 else 89 else
91 _tlbie(va); 90 _tlbie(va);
92} 91}
93#else /* CONFIG_PPC64 */
94/* imalloc region types */
95#define IM_REGION_UNUSED 0x1
96#define IM_REGION_SUBSET 0x2
97#define IM_REGION_EXISTS 0x4
98#define IM_REGION_OVERLAP 0x8
99#define IM_REGION_SUPERSET 0x10
100
101extern struct vm_struct * im_get_free_area(unsigned long size);
102extern struct vm_struct * im_get_area(unsigned long v_addr, unsigned long size,
103 int region_type);
104extern void im_free(void *addr);
105#endif 92#endif
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index f6ae1a57d652..64488723162a 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -8,7 +8,6 @@
8 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 8 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
9 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 9 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
10 * Copyright (C) 1996 Paul Mackerras 10 * Copyright (C) 1996 Paul Mackerras
11 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
12 * 11 *
13 * Derived from "arch/i386/mm/init.c" 12 * Derived from "arch/i386/mm/init.c"
14 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 13 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
@@ -37,7 +36,6 @@
37unsigned long ioremap_base; 36unsigned long ioremap_base;
38unsigned long ioremap_bot; 37unsigned long ioremap_bot;
39EXPORT_SYMBOL(ioremap_bot); /* aka VMALLOC_END */ 38EXPORT_SYMBOL(ioremap_bot); /* aka VMALLOC_END */
40int io_bat_index;
41 39
42#if defined(CONFIG_6xx) || defined(CONFIG_POWER3) 40#if defined(CONFIG_6xx) || defined(CONFIG_POWER3)
43#define HAVE_BATS 1 41#define HAVE_BATS 1
@@ -300,51 +298,6 @@ void __init mapin_ram(void)
300 } 298 }
301} 299}
302 300
303/* is x a power of 4? */
304#define is_power_of_4(x) is_power_of_2(x) && (ffs(x) & 1)
305
306/*
307 * Set up a mapping for a block of I/O.
308 * virt, phys, size must all be page-aligned.
309 * This should only be called before ioremap is called.
310 */
311void __init io_block_mapping(unsigned long virt, phys_addr_t phys,
312 unsigned int size, int flags)
313{
314 int i;
315
316 if (virt > KERNELBASE && virt < ioremap_bot)
317 ioremap_bot = ioremap_base = virt;
318
319#ifdef HAVE_BATS
320 /*
321 * Use a BAT for this if possible...
322 */
323 if (io_bat_index < 2 && is_power_of_2(size)
324 && (virt & (size - 1)) == 0 && (phys & (size - 1)) == 0) {
325 setbat(io_bat_index, virt, phys, size, flags);
326 ++io_bat_index;
327 return;
328 }
329#endif /* HAVE_BATS */
330
331#ifdef HAVE_TLBCAM
332 /*
333 * Use a CAM for this if possible...
334 */
335 if (tlbcam_index < num_tlbcam_entries && is_power_of_4(size)
336 && (virt & (size - 1)) == 0 && (phys & (size - 1)) == 0) {
337 settlbcam(tlbcam_index, virt, phys, size, flags, 0);
338 ++tlbcam_index;
339 return;
340 }
341#endif /* HAVE_TLBCAM */
342
343 /* No BATs available, put it in the page tables. */
344 for (i = 0; i < size; i += PAGE_SIZE)
345 map_page(virt + i, phys + i, flags);
346}
347
348/* Scan the real Linux page tables and return a PTE pointer for 301/* Scan the real Linux page tables and return a PTE pointer for
349 * a virtual address in a context. 302 * a virtual address in a context.
350 * Returns true (1) if PTE was found, zero otherwise. The pointer to 303 * Returns true (1) if PTE was found, zero otherwise. The pointer to
@@ -379,82 +332,6 @@ get_pteptr(struct mm_struct *mm, unsigned long addr, pte_t **ptep, pmd_t **pmdp)
379 return(retval); 332 return(retval);
380} 333}
381 334
382/* Find physical address for this virtual address. Normally used by
383 * I/O functions, but anyone can call it.
384 */
385unsigned long iopa(unsigned long addr)
386{
387 unsigned long pa;
388
389 /* I don't know why this won't work on PMacs or CHRP. It
390 * appears there is some bug, or there is some implicit
391 * mapping done not properly represented by BATs or in page
392 * tables.......I am actively working on resolving this, but
393 * can't hold up other stuff. -- Dan
394 */
395 pte_t *pte;
396 struct mm_struct *mm;
397
398 /* Check the BATs */
399 pa = v_mapped_by_bats(addr);
400 if (pa)
401 return pa;
402
403 /* Allow mapping of user addresses (within the thread)
404 * for DMA if necessary.
405 */
406 if (addr < TASK_SIZE)
407 mm = current->mm;
408 else
409 mm = &init_mm;
410
411 pa = 0;
412 if (get_pteptr(mm, addr, &pte, NULL)) {
413 pa = (pte_val(*pte) & PAGE_MASK) | (addr & ~PAGE_MASK);
414 pte_unmap(pte);
415 }
416
417 return(pa);
418}
419
420/* This is will find the virtual address for a physical one....
421 * Swiped from APUS, could be dangerous :-).
422 * This is only a placeholder until I really find a way to make this
423 * work. -- Dan
424 */
425unsigned long
426mm_ptov (unsigned long paddr)
427{
428 unsigned long ret;
429#if 0
430 if (paddr < 16*1024*1024)
431 ret = ZTWO_VADDR(paddr);
432 else {
433 int i;
434
435 for (i = 0; i < kmap_chunk_count;){
436 unsigned long phys = kmap_chunks[i++];
437 unsigned long size = kmap_chunks[i++];
438 unsigned long virt = kmap_chunks[i++];
439 if (paddr >= phys
440 && paddr < (phys + size)){
441 ret = virt + paddr - phys;
442 goto exit;
443 }
444 }
445
446 ret = (unsigned long) __va(paddr);
447 }
448exit:
449#ifdef DEBUGPV
450 printk ("PTOV(%lx)=%lx\n", paddr, ret);
451#endif
452#else
453 ret = (unsigned long)paddr + KERNELBASE;
454#endif
455 return ret;
456}
457
458#ifdef CONFIG_DEBUG_PAGEALLOC 335#ifdef CONFIG_DEBUG_PAGEALLOC
459 336
460static int __change_page_attr(struct page *page, pgprot_t prot) 337static int __change_page_attr(struct page *page, pgprot_t prot)
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index ad6e135bf212..3dfd10db931a 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -7,7 +7,6 @@
7 * Modifications by Paul Mackerras (PowerMac) (paulus@samba.org) 7 * Modifications by Paul Mackerras (PowerMac) (paulus@samba.org)
8 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 8 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
9 * Copyright (C) 1996 Paul Mackerras 9 * Copyright (C) 1996 Paul Mackerras
10 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
11 * 10 *
12 * Derived from "arch/i386/mm/init.c" 11 * Derived from "arch/i386/mm/init.c"
13 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 12 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
@@ -34,41 +33,27 @@
34#include <linux/stddef.h> 33#include <linux/stddef.h>
35#include <linux/vmalloc.h> 34#include <linux/vmalloc.h>
36#include <linux/init.h> 35#include <linux/init.h>
37#include <linux/delay.h>
38#include <linux/bootmem.h>
39#include <linux/highmem.h>
40#include <linux/idr.h>
41#include <linux/nodemask.h>
42#include <linux/module.h>
43 36
44#include <asm/pgalloc.h> 37#include <asm/pgalloc.h>
45#include <asm/page.h> 38#include <asm/page.h>
46#include <asm/prom.h> 39#include <asm/prom.h>
47#include <asm/lmb.h>
48#include <asm/rtas.h>
49#include <asm/io.h> 40#include <asm/io.h>
50#include <asm/mmu_context.h> 41#include <asm/mmu_context.h>
51#include <asm/pgtable.h> 42#include <asm/pgtable.h>
52#include <asm/mmu.h> 43#include <asm/mmu.h>
53#include <asm/uaccess.h>
54#include <asm/smp.h> 44#include <asm/smp.h>
55#include <asm/machdep.h> 45#include <asm/machdep.h>
56#include <asm/tlb.h> 46#include <asm/tlb.h>
57#include <asm/eeh.h>
58#include <asm/processor.h> 47#include <asm/processor.h>
59#include <asm/mmzone.h>
60#include <asm/cputable.h> 48#include <asm/cputable.h>
61#include <asm/sections.h> 49#include <asm/sections.h>
62#include <asm/system.h> 50#include <asm/system.h>
63#include <asm/iommu.h>
64#include <asm/abs_addr.h> 51#include <asm/abs_addr.h>
65#include <asm/vdso.h>
66#include <asm/firmware.h> 52#include <asm/firmware.h>
67 53
68#include "mmu_decl.h" 54#include "mmu_decl.h"
69 55
70unsigned long ioremap_bot = IMALLOC_BASE; 56unsigned long ioremap_bot = IOREMAP_BASE;
71static unsigned long phbs_io_bot = PHBS_IO_BASE;
72 57
73/* 58/*
74 * map_io_page currently only called by __ioremap 59 * map_io_page currently only called by __ioremap
@@ -102,8 +87,8 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags)
102 * entry in the hardware page table. 87 * entry in the hardware page table.
103 * 88 *
104 */ 89 */
105 if (htab_bolt_mapping(ea, ea + PAGE_SIZE, pa, flags, 90 if (htab_bolt_mapping(ea, (unsigned long)ea + PAGE_SIZE,
106 mmu_io_psize)) { 91 pa, flags, mmu_io_psize)) {
107 printk(KERN_ERR "Failed to do bolted mapping IO " 92 printk(KERN_ERR "Failed to do bolted mapping IO "
108 "memory at %016lx !\n", pa); 93 "memory at %016lx !\n", pa);
109 return -ENOMEM; 94 return -ENOMEM;
@@ -113,8 +98,11 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags)
113} 98}
114 99
115 100
116static void __iomem * __ioremap_com(phys_addr_t addr, unsigned long pa, 101/**
117 unsigned long ea, unsigned long size, 102 * __ioremap_at - Low level function to establish the page tables
103 * for an IO mapping
104 */
105void __iomem * __ioremap_at(phys_addr_t pa, void *ea, unsigned long size,
118 unsigned long flags) 106 unsigned long flags)
119{ 107{
120 unsigned long i; 108 unsigned long i;
@@ -122,17 +110,35 @@ static void __iomem * __ioremap_com(phys_addr_t addr, unsigned long pa,
122 if ((flags & _PAGE_PRESENT) == 0) 110 if ((flags & _PAGE_PRESENT) == 0)
123 flags |= pgprot_val(PAGE_KERNEL); 111 flags |= pgprot_val(PAGE_KERNEL);
124 112
113 WARN_ON(pa & ~PAGE_MASK);
114 WARN_ON(((unsigned long)ea) & ~PAGE_MASK);
115 WARN_ON(size & ~PAGE_MASK);
116
125 for (i = 0; i < size; i += PAGE_SIZE) 117 for (i = 0; i < size; i += PAGE_SIZE)
126 if (map_io_page(ea+i, pa+i, flags)) 118 if (map_io_page((unsigned long)ea+i, pa+i, flags))
127 return NULL; 119 return NULL;
128 120
129 return (void __iomem *) (ea + (addr & ~PAGE_MASK)); 121 return (void __iomem *)ea;
122}
123
124/**
125 * __iounmap_from - Low level function to tear down the page tables
126 * for an IO mapping. This is used for mappings that
127 * are manipulated manually, like partial unmapping of
128 * PCI IOs or ISA space.
129 */
130void __iounmap_at(void *ea, unsigned long size)
131{
132 WARN_ON(((unsigned long)ea) & ~PAGE_MASK);
133 WARN_ON(size & ~PAGE_MASK);
134
135 unmap_kernel_range((unsigned long)ea, size);
130} 136}
131 137
132void __iomem * __ioremap(phys_addr_t addr, unsigned long size, 138void __iomem * __ioremap(phys_addr_t addr, unsigned long size,
133 unsigned long flags) 139 unsigned long flags)
134{ 140{
135 unsigned long pa, ea; 141 phys_addr_t paligned;
136 void __iomem *ret; 142 void __iomem *ret;
137 143
138 /* 144 /*
@@ -144,27 +150,30 @@ void __iomem * __ioremap(phys_addr_t addr, unsigned long size,
144 * IMALLOC_END 150 * IMALLOC_END
145 * 151 *
146 */ 152 */
147 pa = addr & PAGE_MASK; 153 paligned = addr & PAGE_MASK;
148 size = PAGE_ALIGN(addr + size) - pa; 154 size = PAGE_ALIGN(addr + size) - paligned;
149 155
150 if ((size == 0) || (pa == 0)) 156 if ((size == 0) || (paligned == 0))
151 return NULL; 157 return NULL;
152 158
153 if (mem_init_done) { 159 if (mem_init_done) {
154 struct vm_struct *area; 160 struct vm_struct *area;
155 area = im_get_free_area(size); 161
162 area = __get_vm_area(size, VM_IOREMAP,
163 ioremap_bot, IOREMAP_END);
156 if (area == NULL) 164 if (area == NULL)
157 return NULL; 165 return NULL;
158 ea = (unsigned long)(area->addr); 166 ret = __ioremap_at(paligned, area->addr, size, flags);
159 ret = __ioremap_com(addr, pa, ea, size, flags);
160 if (!ret) 167 if (!ret)
161 im_free(area->addr); 168 vunmap(area->addr);
162 } else { 169 } else {
163 ea = ioremap_bot; 170 ret = __ioremap_at(paligned, (void *)ioremap_bot, size, flags);
164 ret = __ioremap_com(addr, pa, ea, size, flags);
165 if (ret) 171 if (ret)
166 ioremap_bot += size; 172 ioremap_bot += size;
167 } 173 }
174
175 if (ret)
176 ret += addr & ~PAGE_MASK;
168 return ret; 177 return ret;
169} 178}
170 179
@@ -187,62 +196,9 @@ void __iomem * ioremap_flags(phys_addr_t addr, unsigned long size,
187} 196}
188 197
189 198
190#define IS_PAGE_ALIGNED(_val) ((_val) == ((_val) & PAGE_MASK))
191
192int __ioremap_explicit(phys_addr_t pa, unsigned long ea,
193 unsigned long size, unsigned long flags)
194{
195 struct vm_struct *area;
196 void __iomem *ret;
197
198 /* For now, require page-aligned values for pa, ea, and size */
199 if (!IS_PAGE_ALIGNED(pa) || !IS_PAGE_ALIGNED(ea) ||
200 !IS_PAGE_ALIGNED(size)) {
201 printk(KERN_ERR "unaligned value in %s\n", __FUNCTION__);
202 return 1;
203 }
204
205 if (!mem_init_done) {
206 /* Two things to consider in this case:
207 * 1) No records will be kept (imalloc, etc) that the region
208 * has been remapped
209 * 2) It won't be easy to iounmap() the region later (because
210 * of 1)
211 */
212 ;
213 } else {
214 area = im_get_area(ea, size,
215 IM_REGION_UNUSED|IM_REGION_SUBSET|IM_REGION_EXISTS);
216 if (area == NULL) {
217 /* Expected when PHB-dlpar is in play */
218 return 1;
219 }
220 if (ea != (unsigned long) area->addr) {
221 printk(KERN_ERR "unexpected addr return from "
222 "im_get_area\n");
223 return 1;
224 }
225 }
226
227 ret = __ioremap_com(pa, pa, ea, size, flags);
228 if (ret == NULL) {
229 printk(KERN_ERR "ioremap_explicit() allocation failure !\n");
230 return 1;
231 }
232 if (ret != (void *) ea) {
233 printk(KERN_ERR "__ioremap_com() returned unexpected addr\n");
234 return 1;
235 }
236
237 return 0;
238}
239
240/* 199/*
241 * Unmap an IO region and remove it from imalloc'd list. 200 * Unmap an IO region and remove it from imalloc'd list.
242 * Access to IO memory should be serialized by driver. 201 * Access to IO memory should be serialized by driver.
243 * This code is modeled after vmalloc code - unmap_vm_area()
244 *
245 * XXX what about calls before mem_init_done (ie python_countermeasures())
246 */ 202 */
247void __iounmap(volatile void __iomem *token) 203void __iounmap(volatile void __iomem *token)
248{ 204{
@@ -251,9 +207,14 @@ void __iounmap(volatile void __iomem *token)
251 if (!mem_init_done) 207 if (!mem_init_done)
252 return; 208 return;
253 209
254 addr = (void *) ((unsigned long __force) token & PAGE_MASK); 210 addr = (void *) ((unsigned long __force)
255 211 PCI_FIX_ADDR(token) & PAGE_MASK);
256 im_free(addr); 212 if ((unsigned long)addr < ioremap_bot) {
213 printk(KERN_WARNING "Attempt to iounmap early bolted mapping"
214 " at 0x%p\n", addr);
215 return;
216 }
217 vunmap(addr);
257} 218}
258 219
259void iounmap(volatile void __iomem *token) 220void iounmap(volatile void __iomem *token)
@@ -264,77 +225,8 @@ void iounmap(volatile void __iomem *token)
264 __iounmap(token); 225 __iounmap(token);
265} 226}
266 227
267static int iounmap_subset_regions(unsigned long addr, unsigned long size)
268{
269 struct vm_struct *area;
270
271 /* Check whether subsets of this region exist */
272 area = im_get_area(addr, size, IM_REGION_SUPERSET);
273 if (area == NULL)
274 return 1;
275
276 while (area) {
277 iounmap((void __iomem *) area->addr);
278 area = im_get_area(addr, size,
279 IM_REGION_SUPERSET);
280 }
281
282 return 0;
283}
284
285int __iounmap_explicit(volatile void __iomem *start, unsigned long size)
286{
287 struct vm_struct *area;
288 unsigned long addr;
289 int rc;
290
291 addr = (unsigned long __force) start & PAGE_MASK;
292
293 /* Verify that the region either exists or is a subset of an existing
294 * region. In the latter case, split the parent region to create
295 * the exact region
296 */
297 area = im_get_area(addr, size,
298 IM_REGION_EXISTS | IM_REGION_SUBSET);
299 if (area == NULL) {
300 /* Determine whether subset regions exist. If so, unmap */
301 rc = iounmap_subset_regions(addr, size);
302 if (rc) {
303 printk(KERN_ERR
304 "%s() cannot unmap nonexistent range 0x%lx\n",
305 __FUNCTION__, addr);
306 return 1;
307 }
308 } else {
309 iounmap((void __iomem *) area->addr);
310 }
311 /*
312 * FIXME! This can't be right:
313 iounmap(area->addr);
314 * Maybe it should be "iounmap(area);"
315 */
316 return 0;
317}
318
319EXPORT_SYMBOL(ioremap); 228EXPORT_SYMBOL(ioremap);
320EXPORT_SYMBOL(ioremap_flags); 229EXPORT_SYMBOL(ioremap_flags);
321EXPORT_SYMBOL(__ioremap); 230EXPORT_SYMBOL(__ioremap);
322EXPORT_SYMBOL(iounmap); 231EXPORT_SYMBOL(iounmap);
323EXPORT_SYMBOL(__iounmap); 232EXPORT_SYMBOL(__iounmap);
324
325static DEFINE_SPINLOCK(phb_io_lock);
326
327void __iomem * reserve_phb_iospace(unsigned long size)
328{
329 void __iomem *virt_addr;
330
331 if (phbs_io_bot >= IMALLOC_BASE)
332 panic("reserve_phb_iospace(): phb io space overflow\n");
333
334 spin_lock(&phb_io_lock);
335 virt_addr = (void __iomem *) phbs_io_bot;
336 phbs_io_bot += size;
337 spin_unlock(&phb_io_lock);
338
339 return virt_addr;
340}
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index ec1421a20aaa..5c45d474cfcc 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -11,7 +11,6 @@
11 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 11 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
12 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 12 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
13 * Copyright (C) 1996 Paul Mackerras 13 * Copyright (C) 1996 Paul Mackerras
14 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
15 * 14 *
16 * Derived from "arch/i386/mm/init.c" 15 * Derived from "arch/i386/mm/init.c"
17 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 16 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
@@ -35,12 +34,12 @@
35 34
36#include "mmu_decl.h" 35#include "mmu_decl.h"
37 36
38PTE *Hash, *Hash_end; 37struct hash_pte *Hash, *Hash_end;
39unsigned long Hash_size, Hash_mask; 38unsigned long Hash_size, Hash_mask;
40unsigned long _SDR1; 39unsigned long _SDR1;
41 40
42union ubat { /* BAT register values to be loaded */ 41union ubat { /* BAT register values to be loaded */
43 BAT bat; 42 struct ppc_bat bat;
44 u32 word[2]; 43 u32 word[2];
45} BATS[8][2]; /* 8 pairs of IBAT, DBAT */ 44} BATS[8][2]; /* 8 pairs of IBAT, DBAT */
46 45
@@ -245,7 +244,7 @@ void __init MMU_init_hw(void)
245 cacheable_memzero(Hash, Hash_size); 244 cacheable_memzero(Hash, Hash_size);
246 _SDR1 = __pa(Hash) | SDR1_LOW_BITS; 245 _SDR1 = __pa(Hash) | SDR1_LOW_BITS;
247 246
248 Hash_end = (PTE *) ((unsigned long)Hash + Hash_size); 247 Hash_end = (struct hash_pte *) ((unsigned long)Hash + Hash_size);
249 248
250 printk("Total memory = %ldMB; using %ldkB for hash table (at %p)\n", 249 printk("Total memory = %ldMB; using %ldkB for hash table (at %p)\n",
251 total_memory >> 20, Hash_size >> 10, Hash); 250 total_memory >> 20, Hash_size >> 10, Hash);
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c
index 132c6bc66ce1..28492bbdee8e 100644
--- a/arch/powerpc/mm/stab.c
+++ b/arch/powerpc/mm/stab.c
@@ -55,7 +55,7 @@ static int make_ste(unsigned long stab, unsigned long esid, unsigned long vsid)
55 for (entry = 0; entry < 8; entry++, ste++) { 55 for (entry = 0; entry < 8; entry++, ste++) {
56 if (!(ste->esid_data & STE_ESID_V)) { 56 if (!(ste->esid_data & STE_ESID_V)) {
57 ste->vsid_data = vsid_data; 57 ste->vsid_data = vsid_data;
58 asm volatile("eieio":::"memory"); 58 eieio();
59 ste->esid_data = esid_data; 59 ste->esid_data = esid_data;
60 return (global_entry | entry); 60 return (global_entry | entry);
61 } 61 }
@@ -101,7 +101,7 @@ static int make_ste(unsigned long stab, unsigned long esid, unsigned long vsid)
101 asm volatile("sync" : : : "memory"); /* Order update */ 101 asm volatile("sync" : : : "memory"); /* Order update */
102 102
103 castout_ste->vsid_data = vsid_data; 103 castout_ste->vsid_data = vsid_data;
104 asm volatile("eieio" : : : "memory"); /* Order update */ 104 eieio(); /* Order update */
105 castout_ste->esid_data = esid_data; 105 castout_ste->esid_data = esid_data;
106 106
107 asm volatile("slbie %0" : : "r" (old_esid << SID_SHIFT)); 107 asm volatile("slbie %0" : : "r" (old_esid << SID_SHIFT));
diff --git a/arch/powerpc/mm/tlb_32.c b/arch/powerpc/mm/tlb_32.c
index 6a69417cbc0e..eb4b512d65fa 100644
--- a/arch/powerpc/mm/tlb_32.c
+++ b/arch/powerpc/mm/tlb_32.c
@@ -11,7 +11,6 @@
11 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 11 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
12 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 12 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
13 * Copyright (C) 1996 Paul Mackerras 13 * Copyright (C) 1996 Paul Mackerras
14 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
15 * 14 *
16 * Derived from "arch/i386/mm/init.c" 15 * Derived from "arch/i386/mm/init.c"
17 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 16 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
@@ -27,6 +26,8 @@
27#include <linux/mm.h> 26#include <linux/mm.h>
28#include <linux/init.h> 27#include <linux/init.h>
29#include <linux/highmem.h> 28#include <linux/highmem.h>
29#include <linux/pagemap.h>
30
30#include <asm/tlbflush.h> 31#include <asm/tlbflush.h>
31#include <asm/tlb.h> 32#include <asm/tlb.h>
32 33
diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c
index 2bfc4d7e1aa2..cbd34fc813ee 100644
--- a/arch/powerpc/mm/tlb_64.c
+++ b/arch/powerpc/mm/tlb_64.c
@@ -8,7 +8,6 @@
8 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 8 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
9 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 9 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
10 * Copyright (C) 1996 Paul Mackerras 10 * Copyright (C) 1996 Paul Mackerras
11 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
12 * 11 *
13 * Derived from "arch/i386/mm/init.c" 12 * Derived from "arch/i386/mm/init.c"
14 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 13 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
@@ -239,3 +238,59 @@ void pte_free_finish(void)
239 pte_free_submit(*batchp); 238 pte_free_submit(*batchp);
240 *batchp = NULL; 239 *batchp = NULL;
241} 240}
241
242/**
243 * __flush_hash_table_range - Flush all HPTEs for a given address range
244 * from the hash table (and the TLB). But keeps
245 * the linux PTEs intact.
246 *
247 * @mm : mm_struct of the target address space (generally init_mm)
248 * @start : starting address
249 * @end : ending address (not included in the flush)
250 *
251 * This function is mostly to be used by some IO hotplug code in order
252 * to remove all hash entries from a given address range used to map IO
253 * space on a removed PCI-PCI bidge without tearing down the full mapping
254 * since 64K pages may overlap with other bridges when using 64K pages
255 * with 4K HW pages on IO space.
256 *
257 * Because of that usage pattern, it's only available with CONFIG_HOTPLUG
258 * and is implemented for small size rather than speed.
259 */
260#ifdef CONFIG_HOTPLUG
261
262void __flush_hash_table_range(struct mm_struct *mm, unsigned long start,
263 unsigned long end)
264{
265 unsigned long flags;
266
267 start = _ALIGN_DOWN(start, PAGE_SIZE);
268 end = _ALIGN_UP(end, PAGE_SIZE);
269
270 BUG_ON(!mm->pgd);
271
272 /* Note: Normally, we should only ever use a batch within a
273 * PTE locked section. This violates the rule, but will work
274 * since we don't actually modify the PTEs, we just flush the
275 * hash while leaving the PTEs intact (including their reference
276 * to being hashed). This is not the most performance oriented
277 * way to do things but is fine for our needs here.
278 */
279 local_irq_save(flags);
280 arch_enter_lazy_mmu_mode();
281 for (; start < end; start += PAGE_SIZE) {
282 pte_t *ptep = find_linux_pte(mm->pgd, start);
283 unsigned long pte;
284
285 if (ptep == NULL)
286 continue;
287 pte = pte_val(*ptep);
288 if (!(pte & _PAGE_HASHPTE))
289 continue;
290 hpte_need_flush(mm, start, ptep, pte, 0);
291 }
292 arch_leave_lazy_mmu_mode();
293 local_irq_restore(flags);
294}
295
296#endif /* CONFIG_HOTPLUG */
diff --git a/arch/powerpc/oprofile/Kconfig b/arch/powerpc/oprofile/Kconfig
index eb2dece76a54..7089e79689b9 100644
--- a/arch/powerpc/oprofile/Kconfig
+++ b/arch/powerpc/oprofile/Kconfig
@@ -15,3 +15,10 @@ config OPROFILE
15 15
16 If unsure, say N. 16 If unsure, say N.
17 17
18config OPROFILE_CELL
19 bool "OProfile for Cell Broadband Engine"
20 depends on (SPU_FS = y && OPROFILE = m) || (SPU_FS = y && OPROFILE = y) || (SPU_FS = m && OPROFILE = m)
21 default y
22 help
23 Profiling of Cell BE SPUs requires special support enabled
24 by this option.
diff --git a/arch/powerpc/oprofile/Makefile b/arch/powerpc/oprofile/Makefile
index 4b5f9528218c..c5f64c3bd668 100644
--- a/arch/powerpc/oprofile/Makefile
+++ b/arch/powerpc/oprofile/Makefile
@@ -11,7 +11,9 @@ DRIVER_OBJS := $(addprefix ../../../drivers/oprofile/, \
11 timer_int.o ) 11 timer_int.o )
12 12
13oprofile-y := $(DRIVER_OBJS) common.o backtrace.o 13oprofile-y := $(DRIVER_OBJS) common.o backtrace.o
14oprofile-$(CONFIG_PPC_CELL_NATIVE) += op_model_cell.o 14oprofile-$(CONFIG_OPROFILE_CELL) += op_model_cell.o \
15 cell/spu_profiler.o cell/vma_map.o \
16 cell/spu_task_sync.o
15oprofile-$(CONFIG_PPC64) += op_model_rs64.o op_model_power4.o op_model_pa6t.o 17oprofile-$(CONFIG_PPC64) += op_model_rs64.o op_model_power4.o op_model_pa6t.o
16oprofile-$(CONFIG_FSL_BOOKE) += op_model_fsl_booke.o 18oprofile-$(CONFIG_FSL_BOOKE) += op_model_fsl_booke.o
17oprofile-$(CONFIG_6xx) += op_model_7450.o 19oprofile-$(CONFIG_6xx) += op_model_7450.o
diff --git a/arch/powerpc/oprofile/cell/pr_util.h b/arch/powerpc/oprofile/cell/pr_util.h
new file mode 100644
index 000000000000..e5704f00c8b4
--- /dev/null
+++ b/arch/powerpc/oprofile/cell/pr_util.h
@@ -0,0 +1,97 @@
1 /*
2 * Cell Broadband Engine OProfile Support
3 *
4 * (C) Copyright IBM Corporation 2006
5 *
6 * Author: Maynard Johnson <maynardj@us.ibm.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 */
13
14#ifndef PR_UTIL_H
15#define PR_UTIL_H
16
17#include <linux/cpumask.h>
18#include <linux/oprofile.h>
19#include <asm/cell-pmu.h>
20#include <asm/spu.h>
21
22#include "../../platforms/cell/cbe_regs.h"
23
24/* Defines used for sync_start */
25#define SKIP_GENERIC_SYNC 0
26#define SYNC_START_ERROR -1
27#define DO_GENERIC_SYNC 1
28
29struct spu_overlay_info { /* map of sections within an SPU overlay */
30 unsigned int vma; /* SPU virtual memory address from elf */
31 unsigned int size; /* size of section from elf */
32 unsigned int offset; /* offset of section into elf file */
33 unsigned int buf;
34};
35
36struct vma_to_fileoffset_map { /* map of sections within an SPU program */
37 struct vma_to_fileoffset_map *next; /* list pointer */
38 unsigned int vma; /* SPU virtual memory address from elf */
39 unsigned int size; /* size of section from elf */
40 unsigned int offset; /* offset of section into elf file */
41 unsigned int guard_ptr;
42 unsigned int guard_val;
43 /*
44 * The guard pointer is an entry in the _ovly_buf_table,
45 * computed using ovly.buf as the index into the table. Since
46 * ovly.buf values begin at '1' to reference the first (or 0th)
47 * entry in the _ovly_buf_table, the computation subtracts 1
48 * from ovly.buf.
49 * The guard value is stored in the _ovly_buf_table entry and
50 * is an index (starting at 1) back to the _ovly_table entry
51 * that is pointing at this _ovly_buf_table entry. So, for
52 * example, for an overlay scenario with one overlay segment
53 * and two overlay sections:
54 * - Section 1 points to the first entry of the
55 * _ovly_buf_table, which contains a guard value
56 * of '1', referencing the first (index=0) entry of
57 * _ovly_table.
58 * - Section 2 points to the second entry of the
59 * _ovly_buf_table, which contains a guard value
60 * of '2', referencing the second (index=1) entry of
61 * _ovly_table.
62 */
63
64};
65
66/* The three functions below are for maintaining and accessing
67 * the vma-to-fileoffset map.
68 */
69struct vma_to_fileoffset_map *create_vma_map(const struct spu *spu,
70 u64 objectid);
71unsigned int vma_map_lookup(struct vma_to_fileoffset_map *map,
72 unsigned int vma, const struct spu *aSpu,
73 int *grd_val);
74void vma_map_free(struct vma_to_fileoffset_map *map);
75
76/*
77 * Entry point for SPU profiling.
78 * cycles_reset is the SPU_CYCLES count value specified by the user.
79 */
80int start_spu_profiling(unsigned int cycles_reset);
81
82void stop_spu_profiling(void);
83
84
85/* add the necessary profiling hooks */
86int spu_sync_start(void);
87
88/* remove the hooks */
89int spu_sync_stop(void);
90
91/* Record SPU program counter samples to the oprofile event buffer. */
92void spu_sync_buffer(int spu_num, unsigned int *samples,
93 int num_samples);
94
95void set_spu_profiling_frequency(unsigned int freq_khz, unsigned int cycles_reset);
96
97#endif /* PR_UTIL_H */
diff --git a/arch/powerpc/oprofile/cell/spu_profiler.c b/arch/powerpc/oprofile/cell/spu_profiler.c
new file mode 100644
index 000000000000..380d7e217531
--- /dev/null
+++ b/arch/powerpc/oprofile/cell/spu_profiler.c
@@ -0,0 +1,221 @@
1/*
2 * Cell Broadband Engine OProfile Support
3 *
4 * (C) Copyright IBM Corporation 2006
5 *
6 * Authors: Maynard Johnson <maynardj@us.ibm.com>
7 * Carl Love <carll@us.ibm.com>
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#include <linux/hrtimer.h>
16#include <linux/smp.h>
17#include <linux/slab.h>
18#include <asm/cell-pmu.h>
19#include "pr_util.h"
20
21#define TRACE_ARRAY_SIZE 1024
22#define SCALE_SHIFT 14
23
24static u32 *samples;
25
26static int spu_prof_running;
27static unsigned int profiling_interval;
28
29#define NUM_SPU_BITS_TRBUF 16
30#define SPUS_PER_TB_ENTRY 4
31#define SPUS_PER_NODE 8
32
33#define SPU_PC_MASK 0xFFFF
34
35static DEFINE_SPINLOCK(sample_array_lock);
36unsigned long sample_array_lock_flags;
37
38void set_spu_profiling_frequency(unsigned int freq_khz, unsigned int cycles_reset)
39{
40 unsigned long ns_per_cyc;
41
42 if (!freq_khz)
43 freq_khz = ppc_proc_freq/1000;
44
45 /* To calculate a timeout in nanoseconds, the basic
46 * formula is ns = cycles_reset * (NSEC_PER_SEC / cpu frequency).
47 * To avoid floating point math, we use the scale math
48 * technique as described in linux/jiffies.h. We use
49 * a scale factor of SCALE_SHIFT, which provides 4 decimal places
50 * of precision. This is close enough for the purpose at hand.
51 *
52 * The value of the timeout should be small enough that the hw
53 * trace buffer will not get more then about 1/3 full for the
54 * maximum user specified (the LFSR value) hw sampling frequency.
55 * This is to ensure the trace buffer will never fill even if the
56 * kernel thread scheduling varies under a heavy system load.
57 */
58
59 ns_per_cyc = (USEC_PER_SEC << SCALE_SHIFT)/freq_khz;
60 profiling_interval = (ns_per_cyc * cycles_reset) >> SCALE_SHIFT;
61
62}
63
64/*
65 * Extract SPU PC from trace buffer entry
66 */
67static void spu_pc_extract(int cpu, int entry)
68{
69 /* the trace buffer is 128 bits */
70 u64 trace_buffer[2];
71 u64 spu_mask;
72 int spu;
73
74 spu_mask = SPU_PC_MASK;
75
76 /* Each SPU PC is 16 bits; hence, four spus in each of
77 * the two 64-bit buffer entries that make up the
78 * 128-bit trace_buffer entry. Process two 64-bit values
79 * simultaneously.
80 * trace[0] SPU PC contents are: 0 1 2 3
81 * trace[1] SPU PC contents are: 4 5 6 7
82 */
83
84 cbe_read_trace_buffer(cpu, trace_buffer);
85
86 for (spu = SPUS_PER_TB_ENTRY-1; spu >= 0; spu--) {
87 /* spu PC trace entry is upper 16 bits of the
88 * 18 bit SPU program counter
89 */
90 samples[spu * TRACE_ARRAY_SIZE + entry]
91 = (spu_mask & trace_buffer[0]) << 2;
92 samples[(spu + SPUS_PER_TB_ENTRY) * TRACE_ARRAY_SIZE + entry]
93 = (spu_mask & trace_buffer[1]) << 2;
94
95 trace_buffer[0] = trace_buffer[0] >> NUM_SPU_BITS_TRBUF;
96 trace_buffer[1] = trace_buffer[1] >> NUM_SPU_BITS_TRBUF;
97 }
98}
99
100static int cell_spu_pc_collection(int cpu)
101{
102 u32 trace_addr;
103 int entry;
104
105 /* process the collected SPU PC for the node */
106
107 entry = 0;
108
109 trace_addr = cbe_read_pm(cpu, trace_address);
110 while (!(trace_addr & CBE_PM_TRACE_BUF_EMPTY)) {
111 /* there is data in the trace buffer to process */
112 spu_pc_extract(cpu, entry);
113
114 entry++;
115
116 if (entry >= TRACE_ARRAY_SIZE)
117 /* spu_samples is full */
118 break;
119
120 trace_addr = cbe_read_pm(cpu, trace_address);
121 }
122
123 return entry;
124}
125
126
127static enum hrtimer_restart profile_spus(struct hrtimer *timer)
128{
129 ktime_t kt;
130 int cpu, node, k, num_samples, spu_num;
131
132 if (!spu_prof_running)
133 goto stop;
134
135 for_each_online_cpu(cpu) {
136 if (cbe_get_hw_thread_id(cpu))
137 continue;
138
139 node = cbe_cpu_to_node(cpu);
140
141 /* There should only be one kernel thread at a time processing
142 * the samples. In the very unlikely case that the processing
143 * is taking a very long time and multiple kernel threads are
144 * started to process the samples. Make sure only one kernel
145 * thread is working on the samples array at a time. The
146 * sample array must be loaded and then processed for a given
147 * cpu. The sample array is not per cpu.
148 */
149 spin_lock_irqsave(&sample_array_lock,
150 sample_array_lock_flags);
151 num_samples = cell_spu_pc_collection(cpu);
152
153 if (num_samples == 0) {
154 spin_unlock_irqrestore(&sample_array_lock,
155 sample_array_lock_flags);
156 continue;
157 }
158
159 for (k = 0; k < SPUS_PER_NODE; k++) {
160 spu_num = k + (node * SPUS_PER_NODE);
161 spu_sync_buffer(spu_num,
162 samples + (k * TRACE_ARRAY_SIZE),
163 num_samples);
164 }
165
166 spin_unlock_irqrestore(&sample_array_lock,
167 sample_array_lock_flags);
168
169 }
170 smp_wmb(); /* insure spu event buffer updates are written */
171 /* don't want events intermingled... */
172
173 kt = ktime_set(0, profiling_interval);
174 if (!spu_prof_running)
175 goto stop;
176 hrtimer_forward(timer, timer->base->get_time(), kt);
177 return HRTIMER_RESTART;
178
179 stop:
180 printk(KERN_INFO "SPU_PROF: spu-prof timer ending\n");
181 return HRTIMER_NORESTART;
182}
183
184static struct hrtimer timer;
185/*
186 * Entry point for SPU profiling.
187 * NOTE: SPU profiling is done system-wide, not per-CPU.
188 *
189 * cycles_reset is the count value specified by the user when
190 * setting up OProfile to count SPU_CYCLES.
191 */
192int start_spu_profiling(unsigned int cycles_reset)
193{
194 ktime_t kt;
195
196 pr_debug("timer resolution: %lu\n", TICK_NSEC);
197 kt = ktime_set(0, profiling_interval);
198 hrtimer_init(&timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
199 timer.expires = kt;
200 timer.function = profile_spus;
201
202 /* Allocate arrays for collecting SPU PC samples */
203 samples = kzalloc(SPUS_PER_NODE *
204 TRACE_ARRAY_SIZE * sizeof(u32), GFP_KERNEL);
205
206 if (!samples)
207 return -ENOMEM;
208
209 spu_prof_running = 1;
210 hrtimer_start(&timer, kt, HRTIMER_MODE_REL);
211
212 return 0;
213}
214
215void stop_spu_profiling(void)
216{
217 spu_prof_running = 0;
218 hrtimer_cancel(&timer);
219 kfree(samples);
220 pr_debug("SPU_PROF: stop_spu_profiling issued\n");
221}
diff --git a/arch/powerpc/oprofile/cell/spu_task_sync.c b/arch/powerpc/oprofile/cell/spu_task_sync.c
new file mode 100644
index 000000000000..133665754a75
--- /dev/null
+++ b/arch/powerpc/oprofile/cell/spu_task_sync.c
@@ -0,0 +1,484 @@
1/*
2 * Cell Broadband Engine OProfile Support
3 *
4 * (C) Copyright IBM Corporation 2006
5 *
6 * Author: Maynard Johnson <maynardj@us.ibm.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 */
13
14/* The purpose of this file is to handle SPU event task switching
15 * and to record SPU context information into the OProfile
16 * event buffer.
17 *
18 * Additionally, the spu_sync_buffer function is provided as a helper
19 * for recoding actual SPU program counter samples to the event buffer.
20 */
21#include <linux/dcookies.h>
22#include <linux/kref.h>
23#include <linux/mm.h>
24#include <linux/module.h>
25#include <linux/notifier.h>
26#include <linux/numa.h>
27#include <linux/oprofile.h>
28#include <linux/spinlock.h>
29#include "pr_util.h"
30
31#define RELEASE_ALL 9999
32
33static DEFINE_SPINLOCK(buffer_lock);
34static DEFINE_SPINLOCK(cache_lock);
35static int num_spu_nodes;
36int spu_prof_num_nodes;
37int last_guard_val[MAX_NUMNODES * 8];
38
39/* Container for caching information about an active SPU task. */
40struct cached_info {
41 struct vma_to_fileoffset_map *map;
42 struct spu *the_spu; /* needed to access pointer to local_store */
43 struct kref cache_ref;
44};
45
46static struct cached_info *spu_info[MAX_NUMNODES * 8];
47
48static void destroy_cached_info(struct kref *kref)
49{
50 struct cached_info *info;
51
52 info = container_of(kref, struct cached_info, cache_ref);
53 vma_map_free(info->map);
54 kfree(info);
55 module_put(THIS_MODULE);
56}
57
58/* Return the cached_info for the passed SPU number.
59 * ATTENTION: Callers are responsible for obtaining the
60 * cache_lock if needed prior to invoking this function.
61 */
62static struct cached_info *get_cached_info(struct spu *the_spu, int spu_num)
63{
64 struct kref *ref;
65 struct cached_info *ret_info;
66
67 if (spu_num >= num_spu_nodes) {
68 printk(KERN_ERR "SPU_PROF: "
69 "%s, line %d: Invalid index %d into spu info cache\n",
70 __FUNCTION__, __LINE__, spu_num);
71 ret_info = NULL;
72 goto out;
73 }
74 if (!spu_info[spu_num] && the_spu) {
75 ref = spu_get_profile_private_kref(the_spu->ctx);
76 if (ref) {
77 spu_info[spu_num] = container_of(ref, struct cached_info, cache_ref);
78 kref_get(&spu_info[spu_num]->cache_ref);
79 }
80 }
81
82 ret_info = spu_info[spu_num];
83 out:
84 return ret_info;
85}
86
87
88/* Looks for cached info for the passed spu. If not found, the
89 * cached info is created for the passed spu.
90 * Returns 0 for success; otherwise, -1 for error.
91 */
92static int
93prepare_cached_spu_info(struct spu *spu, unsigned long objectId)
94{
95 unsigned long flags;
96 struct vma_to_fileoffset_map *new_map;
97 int retval = 0;
98 struct cached_info *info;
99
100 /* We won't bother getting cache_lock here since
101 * don't do anything with the cached_info that's returned.
102 */
103 info = get_cached_info(spu, spu->number);
104
105 if (info) {
106 pr_debug("Found cached SPU info.\n");
107 goto out;
108 }
109
110 /* Create cached_info and set spu_info[spu->number] to point to it.
111 * spu->number is a system-wide value, not a per-node value.
112 */
113 info = kzalloc(sizeof(struct cached_info), GFP_KERNEL);
114 if (!info) {
115 printk(KERN_ERR "SPU_PROF: "
116 "%s, line %d: create vma_map failed\n",
117 __FUNCTION__, __LINE__);
118 retval = -ENOMEM;
119 goto err_alloc;
120 }
121 new_map = create_vma_map(spu, objectId);
122 if (!new_map) {
123 printk(KERN_ERR "SPU_PROF: "
124 "%s, line %d: create vma_map failed\n",
125 __FUNCTION__, __LINE__);
126 retval = -ENOMEM;
127 goto err_alloc;
128 }
129
130 pr_debug("Created vma_map\n");
131 info->map = new_map;
132 info->the_spu = spu;
133 kref_init(&info->cache_ref);
134 spin_lock_irqsave(&cache_lock, flags);
135 spu_info[spu->number] = info;
136 /* Increment count before passing off ref to SPUFS. */
137 kref_get(&info->cache_ref);
138
139 /* We increment the module refcount here since SPUFS is
140 * responsible for the final destruction of the cached_info,
141 * and it must be able to access the destroy_cached_info()
142 * function defined in the OProfile module. We decrement
143 * the module refcount in destroy_cached_info.
144 */
145 try_module_get(THIS_MODULE);
146 spu_set_profile_private_kref(spu->ctx, &info->cache_ref,
147 destroy_cached_info);
148 spin_unlock_irqrestore(&cache_lock, flags);
149 goto out;
150
151err_alloc:
152 kfree(info);
153out:
154 return retval;
155}
156
157/*
158 * NOTE: The caller is responsible for locking the
159 * cache_lock prior to calling this function.
160 */
161static int release_cached_info(int spu_index)
162{
163 int index, end;
164
165 if (spu_index == RELEASE_ALL) {
166 end = num_spu_nodes;
167 index = 0;
168 } else {
169 if (spu_index >= num_spu_nodes) {
170 printk(KERN_ERR "SPU_PROF: "
171 "%s, line %d: "
172 "Invalid index %d into spu info cache\n",
173 __FUNCTION__, __LINE__, spu_index);
174 goto out;
175 }
176 end = spu_index + 1;
177 index = spu_index;
178 }
179 for (; index < end; index++) {
180 if (spu_info[index]) {
181 kref_put(&spu_info[index]->cache_ref,
182 destroy_cached_info);
183 spu_info[index] = NULL;
184 }
185 }
186
187out:
188 return 0;
189}
190
191/* The source code for fast_get_dcookie was "borrowed"
192 * from drivers/oprofile/buffer_sync.c.
193 */
194
195/* Optimisation. We can manage without taking the dcookie sem
196 * because we cannot reach this code without at least one
197 * dcookie user still being registered (namely, the reader
198 * of the event buffer).
199 */
200static inline unsigned long fast_get_dcookie(struct dentry *dentry,
201 struct vfsmount *vfsmnt)
202{
203 unsigned long cookie;
204
205 if (dentry->d_cookie)
206 return (unsigned long)dentry;
207 get_dcookie(dentry, vfsmnt, &cookie);
208 return cookie;
209}
210
211/* Look up the dcookie for the task's first VM_EXECUTABLE mapping,
212 * which corresponds loosely to "application name". Also, determine
213 * the offset for the SPU ELF object. If computed offset is
214 * non-zero, it implies an embedded SPU object; otherwise, it's a
215 * separate SPU binary, in which case we retrieve it's dcookie.
216 * For the embedded case, we must determine if SPU ELF is embedded
217 * in the executable application or another file (i.e., shared lib).
218 * If embedded in a shared lib, we must get the dcookie and return
219 * that to the caller.
220 */
221static unsigned long
222get_exec_dcookie_and_offset(struct spu *spu, unsigned int *offsetp,
223 unsigned long *spu_bin_dcookie,
224 unsigned long spu_ref)
225{
226 unsigned long app_cookie = 0;
227 unsigned int my_offset = 0;
228 struct file *app = NULL;
229 struct vm_area_struct *vma;
230 struct mm_struct *mm = spu->mm;
231
232 if (!mm)
233 goto out;
234
235 down_read(&mm->mmap_sem);
236
237 for (vma = mm->mmap; vma; vma = vma->vm_next) {
238 if (!vma->vm_file)
239 continue;
240 if (!(vma->vm_flags & VM_EXECUTABLE))
241 continue;
242 app_cookie = fast_get_dcookie(vma->vm_file->f_dentry,
243 vma->vm_file->f_vfsmnt);
244 pr_debug("got dcookie for %s\n",
245 vma->vm_file->f_dentry->d_name.name);
246 app = vma->vm_file;
247 break;
248 }
249
250 for (vma = mm->mmap; vma; vma = vma->vm_next) {
251 if (vma->vm_start > spu_ref || vma->vm_end <= spu_ref)
252 continue;
253 my_offset = spu_ref - vma->vm_start;
254 if (!vma->vm_file)
255 goto fail_no_image_cookie;
256
257 pr_debug("Found spu ELF at %X(object-id:%lx) for file %s\n",
258 my_offset, spu_ref,
259 vma->vm_file->f_dentry->d_name.name);
260 *offsetp = my_offset;
261 break;
262 }
263
264 *spu_bin_dcookie = fast_get_dcookie(vma->vm_file->f_dentry,
265 vma->vm_file->f_vfsmnt);
266 pr_debug("got dcookie for %s\n", vma->vm_file->f_dentry->d_name.name);
267
268 up_read(&mm->mmap_sem);
269
270out:
271 return app_cookie;
272
273fail_no_image_cookie:
274 up_read(&mm->mmap_sem);
275
276 printk(KERN_ERR "SPU_PROF: "
277 "%s, line %d: Cannot find dcookie for SPU binary\n",
278 __FUNCTION__, __LINE__);
279 goto out;
280}
281
282
283
284/* This function finds or creates cached context information for the
285 * passed SPU and records SPU context information into the OProfile
286 * event buffer.
287 */
288static int process_context_switch(struct spu *spu, unsigned long objectId)
289{
290 unsigned long flags;
291 int retval;
292 unsigned int offset = 0;
293 unsigned long spu_cookie = 0, app_dcookie;
294
295 retval = prepare_cached_spu_info(spu, objectId);
296 if (retval)
297 goto out;
298
299 /* Get dcookie first because a mutex_lock is taken in that
300 * code path, so interrupts must not be disabled.
301 */
302 app_dcookie = get_exec_dcookie_and_offset(spu, &offset, &spu_cookie, objectId);
303 if (!app_dcookie || !spu_cookie) {
304 retval = -ENOENT;
305 goto out;
306 }
307
308 /* Record context info in event buffer */
309 spin_lock_irqsave(&buffer_lock, flags);
310 add_event_entry(ESCAPE_CODE);
311 add_event_entry(SPU_CTX_SWITCH_CODE);
312 add_event_entry(spu->number);
313 add_event_entry(spu->pid);
314 add_event_entry(spu->tgid);
315 add_event_entry(app_dcookie);
316 add_event_entry(spu_cookie);
317 add_event_entry(offset);
318 spin_unlock_irqrestore(&buffer_lock, flags);
319 smp_wmb(); /* insure spu event buffer updates are written */
320 /* don't want entries intermingled... */
321out:
322 return retval;
323}
324
325/*
326 * This function is invoked on either a bind_context or unbind_context.
327 * If called for an unbind_context, the val arg is 0; otherwise,
328 * it is the object-id value for the spu context.
329 * The data arg is of type 'struct spu *'.
330 */
331static int spu_active_notify(struct notifier_block *self, unsigned long val,
332 void *data)
333{
334 int retval;
335 unsigned long flags;
336 struct spu *the_spu = data;
337
338 pr_debug("SPU event notification arrived\n");
339 if (!val) {
340 spin_lock_irqsave(&cache_lock, flags);
341 retval = release_cached_info(the_spu->number);
342 spin_unlock_irqrestore(&cache_lock, flags);
343 } else {
344 retval = process_context_switch(the_spu, val);
345 }
346 return retval;
347}
348
349static struct notifier_block spu_active = {
350 .notifier_call = spu_active_notify,
351};
352
353static int number_of_online_nodes(void)
354{
355 u32 cpu; u32 tmp;
356 int nodes = 0;
357 for_each_online_cpu(cpu) {
358 tmp = cbe_cpu_to_node(cpu) + 1;
359 if (tmp > nodes)
360 nodes++;
361 }
362 return nodes;
363}
364
365/* The main purpose of this function is to synchronize
366 * OProfile with SPUFS by registering to be notified of
367 * SPU task switches.
368 *
369 * NOTE: When profiling SPUs, we must ensure that only
370 * spu_sync_start is invoked and not the generic sync_start
371 * in drivers/oprofile/oprof.c. A return value of
372 * SKIP_GENERIC_SYNC or SYNC_START_ERROR will
373 * accomplish this.
374 */
375int spu_sync_start(void)
376{
377 int k;
378 int ret = SKIP_GENERIC_SYNC;
379 int register_ret;
380 unsigned long flags = 0;
381
382 spu_prof_num_nodes = number_of_online_nodes();
383 num_spu_nodes = spu_prof_num_nodes * 8;
384
385 spin_lock_irqsave(&buffer_lock, flags);
386 add_event_entry(ESCAPE_CODE);
387 add_event_entry(SPU_PROFILING_CODE);
388 add_event_entry(num_spu_nodes);
389 spin_unlock_irqrestore(&buffer_lock, flags);
390
391 /* Register for SPU events */
392 register_ret = spu_switch_event_register(&spu_active);
393 if (register_ret) {
394 ret = SYNC_START_ERROR;
395 goto out;
396 }
397
398 for (k = 0; k < (MAX_NUMNODES * 8); k++)
399 last_guard_val[k] = 0;
400 pr_debug("spu_sync_start -- running.\n");
401out:
402 return ret;
403}
404
405/* Record SPU program counter samples to the oprofile event buffer. */
406void spu_sync_buffer(int spu_num, unsigned int *samples,
407 int num_samples)
408{
409 unsigned long long file_offset;
410 unsigned long flags;
411 int i;
412 struct vma_to_fileoffset_map *map;
413 struct spu *the_spu;
414 unsigned long long spu_num_ll = spu_num;
415 unsigned long long spu_num_shifted = spu_num_ll << 32;
416 struct cached_info *c_info;
417
418 /* We need to obtain the cache_lock here because it's
419 * possible that after getting the cached_info, the SPU job
420 * corresponding to this cached_info may end, thus resulting
421 * in the destruction of the cached_info.
422 */
423 spin_lock_irqsave(&cache_lock, flags);
424 c_info = get_cached_info(NULL, spu_num);
425 if (!c_info) {
426 /* This legitimately happens when the SPU task ends before all
427 * samples are recorded.
428 * No big deal -- so we just drop a few samples.
429 */
430 pr_debug("SPU_PROF: No cached SPU contex "
431 "for SPU #%d. Dropping samples.\n", spu_num);
432 goto out;
433 }
434
435 map = c_info->map;
436 the_spu = c_info->the_spu;
437 spin_lock(&buffer_lock);
438 for (i = 0; i < num_samples; i++) {
439 unsigned int sample = *(samples+i);
440 int grd_val = 0;
441 file_offset = 0;
442 if (sample == 0)
443 continue;
444 file_offset = vma_map_lookup( map, sample, the_spu, &grd_val);
445
446 /* If overlays are used by this SPU application, the guard
447 * value is non-zero, indicating which overlay section is in
448 * use. We need to discard samples taken during the time
449 * period which an overlay occurs (i.e., guard value changes).
450 */
451 if (grd_val && grd_val != last_guard_val[spu_num]) {
452 last_guard_val[spu_num] = grd_val;
453 /* Drop the rest of the samples. */
454 break;
455 }
456
457 add_event_entry(file_offset | spu_num_shifted);
458 }
459 spin_unlock(&buffer_lock);
460out:
461 spin_unlock_irqrestore(&cache_lock, flags);
462}
463
464
465int spu_sync_stop(void)
466{
467 unsigned long flags = 0;
468 int ret = spu_switch_event_unregister(&spu_active);
469 if (ret) {
470 printk(KERN_ERR "SPU_PROF: "
471 "%s, line %d: spu_switch_event_unregister returned %d\n",
472 __FUNCTION__, __LINE__, ret);
473 goto out;
474 }
475
476 spin_lock_irqsave(&cache_lock, flags);
477 ret = release_cached_info(RELEASE_ALL);
478 spin_unlock_irqrestore(&cache_lock, flags);
479out:
480 pr_debug("spu_sync_stop -- done.\n");
481 return ret;
482}
483
484
diff --git a/arch/powerpc/oprofile/cell/vma_map.c b/arch/powerpc/oprofile/cell/vma_map.c
new file mode 100644
index 000000000000..76ec1d16aef7
--- /dev/null
+++ b/arch/powerpc/oprofile/cell/vma_map.c
@@ -0,0 +1,287 @@
1/*
2 * Cell Broadband Engine OProfile Support
3 *
4 * (C) Copyright IBM Corporation 2006
5 *
6 * Author: Maynard Johnson <maynardj@us.ibm.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 */
13
14/* The code in this source file is responsible for generating
15 * vma-to-fileOffset maps for both overlay and non-overlay SPU
16 * applications.
17 */
18
19#include <linux/mm.h>
20#include <linux/string.h>
21#include <linux/uaccess.h>
22#include <linux/elf.h>
23#include "pr_util.h"
24
25
26void vma_map_free(struct vma_to_fileoffset_map *map)
27{
28 while (map) {
29 struct vma_to_fileoffset_map *next = map->next;
30 kfree(map);
31 map = next;
32 }
33}
34
35unsigned int
36vma_map_lookup(struct vma_to_fileoffset_map *map, unsigned int vma,
37 const struct spu *aSpu, int *grd_val)
38{
39 /*
40 * Default the offset to the physical address + a flag value.
41 * Addresses of dynamically generated code can't be found in the vma
42 * map. For those addresses the flagged value will be sent on to
43 * the user space tools so they can be reported rather than just
44 * thrown away.
45 */
46 u32 offset = 0x10000000 + vma;
47 u32 ovly_grd;
48
49 for (; map; map = map->next) {
50 if (vma < map->vma || vma >= map->vma + map->size)
51 continue;
52
53 if (map->guard_ptr) {
54 ovly_grd = *(u32 *)(aSpu->local_store + map->guard_ptr);
55 if (ovly_grd != map->guard_val)
56 continue;
57 *grd_val = ovly_grd;
58 }
59 offset = vma - map->vma + map->offset;
60 break;
61 }
62
63 return offset;
64}
65
66static struct vma_to_fileoffset_map *
67vma_map_add(struct vma_to_fileoffset_map *map, unsigned int vma,
68 unsigned int size, unsigned int offset, unsigned int guard_ptr,
69 unsigned int guard_val)
70{
71 struct vma_to_fileoffset_map *new =
72 kzalloc(sizeof(struct vma_to_fileoffset_map), GFP_KERNEL);
73 if (!new) {
74 printk(KERN_ERR "SPU_PROF: %s, line %d: malloc failed\n",
75 __FUNCTION__, __LINE__);
76 vma_map_free(map);
77 return NULL;
78 }
79
80 new->next = map;
81 new->vma = vma;
82 new->size = size;
83 new->offset = offset;
84 new->guard_ptr = guard_ptr;
85 new->guard_val = guard_val;
86
87 return new;
88}
89
90
91/* Parse SPE ELF header and generate a list of vma_maps.
92 * A pointer to the first vma_map in the generated list
93 * of vma_maps is returned. */
94struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
95 unsigned long spu_elf_start)
96{
97 static const unsigned char expected[EI_PAD] = {
98 [EI_MAG0] = ELFMAG0,
99 [EI_MAG1] = ELFMAG1,
100 [EI_MAG2] = ELFMAG2,
101 [EI_MAG3] = ELFMAG3,
102 [EI_CLASS] = ELFCLASS32,
103 [EI_DATA] = ELFDATA2MSB,
104 [EI_VERSION] = EV_CURRENT,
105 [EI_OSABI] = ELFOSABI_NONE
106 };
107
108 int grd_val;
109 struct vma_to_fileoffset_map *map = NULL;
110 struct spu_overlay_info ovly;
111 unsigned int overlay_tbl_offset = -1;
112 unsigned long phdr_start, shdr_start;
113 Elf32_Ehdr ehdr;
114 Elf32_Phdr phdr;
115 Elf32_Shdr shdr, shdr_str;
116 Elf32_Sym sym;
117 int i, j;
118 char name[32];
119
120 unsigned int ovly_table_sym = 0;
121 unsigned int ovly_buf_table_sym = 0;
122 unsigned int ovly_table_end_sym = 0;
123 unsigned int ovly_buf_table_end_sym = 0;
124 unsigned long ovly_table;
125 unsigned int n_ovlys;
126
127 /* Get and validate ELF header. */
128
129 if (copy_from_user(&ehdr, (void *) spu_elf_start, sizeof (ehdr)))
130 goto fail;
131
132 if (memcmp(ehdr.e_ident, expected, EI_PAD) != 0) {
133 printk(KERN_ERR "SPU_PROF: "
134 "%s, line %d: Unexpected e_ident parsing SPU ELF\n",
135 __FUNCTION__, __LINE__);
136 goto fail;
137 }
138 if (ehdr.e_machine != EM_SPU) {
139 printk(KERN_ERR "SPU_PROF: "
140 "%s, line %d: Unexpected e_machine parsing SPU ELF\n",
141 __FUNCTION__, __LINE__);
142 goto fail;
143 }
144 if (ehdr.e_type != ET_EXEC) {
145 printk(KERN_ERR "SPU_PROF: "
146 "%s, line %d: Unexpected e_type parsing SPU ELF\n",
147 __FUNCTION__, __LINE__);
148 goto fail;
149 }
150 phdr_start = spu_elf_start + ehdr.e_phoff;
151 shdr_start = spu_elf_start + ehdr.e_shoff;
152
153 /* Traverse program headers. */
154 for (i = 0; i < ehdr.e_phnum; i++) {
155 if (copy_from_user(&phdr,
156 (void *) (phdr_start + i * sizeof(phdr)),
157 sizeof(phdr)))
158 goto fail;
159
160 if (phdr.p_type != PT_LOAD)
161 continue;
162 if (phdr.p_flags & (1 << 27))
163 continue;
164
165 map = vma_map_add(map, phdr.p_vaddr, phdr.p_memsz,
166 phdr.p_offset, 0, 0);
167 if (!map)
168 goto fail;
169 }
170
171 pr_debug("SPU_PROF: Created non-overlay maps\n");
172 /* Traverse section table and search for overlay-related symbols. */
173 for (i = 0; i < ehdr.e_shnum; i++) {
174 if (copy_from_user(&shdr,
175 (void *) (shdr_start + i * sizeof(shdr)),
176 sizeof(shdr)))
177 goto fail;
178
179 if (shdr.sh_type != SHT_SYMTAB)
180 continue;
181 if (shdr.sh_entsize != sizeof (sym))
182 continue;
183
184 if (copy_from_user(&shdr_str,
185 (void *) (shdr_start + shdr.sh_link *
186 sizeof(shdr)),
187 sizeof(shdr)))
188 goto fail;
189
190 if (shdr_str.sh_type != SHT_STRTAB)
191 goto fail;;
192
193 for (j = 0; j < shdr.sh_size / sizeof (sym); j++) {
194 if (copy_from_user(&sym, (void *) (spu_elf_start +
195 shdr.sh_offset + j *
196 sizeof (sym)),
197 sizeof (sym)))
198 goto fail;
199
200 if (copy_from_user(name, (void *)
201 (spu_elf_start + shdr_str.sh_offset +
202 sym.st_name),
203 20))
204 goto fail;
205
206 if (memcmp(name, "_ovly_table", 12) == 0)
207 ovly_table_sym = sym.st_value;
208 if (memcmp(name, "_ovly_buf_table", 16) == 0)
209 ovly_buf_table_sym = sym.st_value;
210 if (memcmp(name, "_ovly_table_end", 16) == 0)
211 ovly_table_end_sym = sym.st_value;
212 if (memcmp(name, "_ovly_buf_table_end", 20) == 0)
213 ovly_buf_table_end_sym = sym.st_value;
214 }
215 }
216
217 /* If we don't have overlays, we're done. */
218 if (ovly_table_sym == 0 || ovly_buf_table_sym == 0
219 || ovly_table_end_sym == 0 || ovly_buf_table_end_sym == 0) {
220 pr_debug("SPU_PROF: No overlay table found\n");
221 goto out;
222 } else {
223 pr_debug("SPU_PROF: Overlay table found\n");
224 }
225
226 /* The _ovly_table symbol represents a table with one entry
227 * per overlay section. The _ovly_buf_table symbol represents
228 * a table with one entry per overlay region.
229 * The struct spu_overlay_info gives the structure of the _ovly_table
230 * entries. The structure of _ovly_table_buf is simply one
231 * u32 word per entry.
232 */
233 overlay_tbl_offset = vma_map_lookup(map, ovly_table_sym,
234 aSpu, &grd_val);
235 if (overlay_tbl_offset < 0) {
236 printk(KERN_ERR "SPU_PROF: "
237 "%s, line %d: Error finding SPU overlay table\n",
238 __FUNCTION__, __LINE__);
239 goto fail;
240 }
241 ovly_table = spu_elf_start + overlay_tbl_offset;
242
243 n_ovlys = (ovly_table_end_sym -
244 ovly_table_sym) / sizeof (ovly);
245
246 /* Traverse overlay table. */
247 for (i = 0; i < n_ovlys; i++) {
248 if (copy_from_user(&ovly, (void *)
249 (ovly_table + i * sizeof (ovly)),
250 sizeof (ovly)))
251 goto fail;
252
253 /* The ovly.vma/size/offset arguments are analogous to the same
254 * arguments used above for non-overlay maps. The final two
255 * args are referred to as the guard pointer and the guard
256 * value.
257 * The guard pointer is an entry in the _ovly_buf_table,
258 * computed using ovly.buf as the index into the table. Since
259 * ovly.buf values begin at '1' to reference the first (or 0th)
260 * entry in the _ovly_buf_table, the computation subtracts 1
261 * from ovly.buf.
262 * The guard value is stored in the _ovly_buf_table entry and
263 * is an index (starting at 1) back to the _ovly_table entry
264 * that is pointing at this _ovly_buf_table entry. So, for
265 * example, for an overlay scenario with one overlay segment
266 * and two overlay sections:
267 * - Section 1 points to the first entry of the
268 * _ovly_buf_table, which contains a guard value
269 * of '1', referencing the first (index=0) entry of
270 * _ovly_table.
271 * - Section 2 points to the second entry of the
272 * _ovly_buf_table, which contains a guard value
273 * of '2', referencing the second (index=1) entry of
274 * _ovly_table.
275 */
276 map = vma_map_add(map, ovly.vma, ovly.size, ovly.offset,
277 ovly_buf_table_sym + (ovly.buf-1) * 4, i+1);
278 if (!map)
279 goto fail;
280 }
281 goto out;
282
283 fail:
284 map = NULL;
285 out:
286 return map;
287}
diff --git a/arch/powerpc/oprofile/common.c b/arch/powerpc/oprofile/common.c
index 1a7ef7e246d2..a28cce1d6c24 100644
--- a/arch/powerpc/oprofile/common.c
+++ b/arch/powerpc/oprofile/common.c
@@ -29,6 +29,8 @@ static struct op_powerpc_model *model;
29static struct op_counter_config ctr[OP_MAX_COUNTER]; 29static struct op_counter_config ctr[OP_MAX_COUNTER];
30static struct op_system_config sys; 30static struct op_system_config sys;
31 31
32static int op_per_cpu_rc;
33
32static void op_handle_interrupt(struct pt_regs *regs) 34static void op_handle_interrupt(struct pt_regs *regs)
33{ 35{
34 model->handle_interrupt(regs, ctr); 36 model->handle_interrupt(regs, ctr);
@@ -36,25 +38,41 @@ static void op_handle_interrupt(struct pt_regs *regs)
36 38
37static void op_powerpc_cpu_setup(void *dummy) 39static void op_powerpc_cpu_setup(void *dummy)
38{ 40{
39 model->cpu_setup(ctr); 41 int ret;
42
43 ret = model->cpu_setup(ctr);
44
45 if (ret != 0)
46 op_per_cpu_rc = ret;
40} 47}
41 48
42static int op_powerpc_setup(void) 49static int op_powerpc_setup(void)
43{ 50{
44 int err; 51 int err;
45 52
53 op_per_cpu_rc = 0;
54
46 /* Grab the hardware */ 55 /* Grab the hardware */
47 err = reserve_pmc_hardware(op_handle_interrupt); 56 err = reserve_pmc_hardware(op_handle_interrupt);
48 if (err) 57 if (err)
49 return err; 58 return err;
50 59
51 /* Pre-compute the values to stuff in the hardware registers. */ 60 /* Pre-compute the values to stuff in the hardware registers. */
52 model->reg_setup(ctr, &sys, model->num_counters); 61 op_per_cpu_rc = model->reg_setup(ctr, &sys, model->num_counters);
53 62
54 /* Configure the registers on all cpus. */ 63 if (op_per_cpu_rc)
64 goto out;
65
66 /* Configure the registers on all cpus. If an error occurs on one
67 * of the cpus, op_per_cpu_rc will be set to the error */
55 on_each_cpu(op_powerpc_cpu_setup, NULL, 0, 1); 68 on_each_cpu(op_powerpc_cpu_setup, NULL, 0, 1);
56 69
57 return 0; 70out: if (op_per_cpu_rc) {
71 /* error on setup release the performance counter hardware */
72 release_pmc_hardware();
73 }
74
75 return op_per_cpu_rc;
58} 76}
59 77
60static void op_powerpc_shutdown(void) 78static void op_powerpc_shutdown(void)
@@ -64,16 +82,29 @@ static void op_powerpc_shutdown(void)
64 82
65static void op_powerpc_cpu_start(void *dummy) 83static void op_powerpc_cpu_start(void *dummy)
66{ 84{
67 model->start(ctr); 85 /* If any of the cpus have return an error, set the
86 * global flag to the error so it can be returned
87 * to the generic OProfile caller.
88 */
89 int ret;
90
91 ret = model->start(ctr);
92 if (ret != 0)
93 op_per_cpu_rc = ret;
68} 94}
69 95
70static int op_powerpc_start(void) 96static int op_powerpc_start(void)
71{ 97{
98 op_per_cpu_rc = 0;
99
72 if (model->global_start) 100 if (model->global_start)
73 model->global_start(ctr); 101 return model->global_start(ctr);
74 if (model->start) 102 if (model->start) {
75 on_each_cpu(op_powerpc_cpu_start, NULL, 0, 1); 103 on_each_cpu(op_powerpc_cpu_start, NULL, 0, 1);
76 return 0; 104 return op_per_cpu_rc;
105 }
106 return -EIO; /* No start function is defined for this
107 power architecture */
77} 108}
78 109
79static inline void op_powerpc_cpu_stop(void *dummy) 110static inline void op_powerpc_cpu_stop(void *dummy)
@@ -147,11 +178,13 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
147 178
148 switch (cur_cpu_spec->oprofile_type) { 179 switch (cur_cpu_spec->oprofile_type) {
149#ifdef CONFIG_PPC64 180#ifdef CONFIG_PPC64
150#ifdef CONFIG_PPC_CELL_NATIVE 181#ifdef CONFIG_OPROFILE_CELL
151 case PPC_OPROFILE_CELL: 182 case PPC_OPROFILE_CELL:
152 if (firmware_has_feature(FW_FEATURE_LPAR)) 183 if (firmware_has_feature(FW_FEATURE_LPAR))
153 return -ENODEV; 184 return -ENODEV;
154 model = &op_model_cell; 185 model = &op_model_cell;
186 ops->sync_start = model->sync_start;
187 ops->sync_stop = model->sync_stop;
155 break; 188 break;
156#endif 189#endif
157 case PPC_OPROFILE_RS64: 190 case PPC_OPROFILE_RS64:
diff --git a/arch/powerpc/oprofile/op_model_7450.c b/arch/powerpc/oprofile/op_model_7450.c
index 5d1bbaf35ccb..cc599eb8768b 100644
--- a/arch/powerpc/oprofile/op_model_7450.c
+++ b/arch/powerpc/oprofile/op_model_7450.c
@@ -81,7 +81,7 @@ static void pmc_stop_ctrs(void)
81 81
82/* Configures the counters on this CPU based on the global 82/* Configures the counters on this CPU based on the global
83 * settings */ 83 * settings */
84static void fsl7450_cpu_setup(struct op_counter_config *ctr) 84static int fsl7450_cpu_setup(struct op_counter_config *ctr)
85{ 85{
86 /* freeze all counters */ 86 /* freeze all counters */
87 pmc_stop_ctrs(); 87 pmc_stop_ctrs();
@@ -89,12 +89,14 @@ static void fsl7450_cpu_setup(struct op_counter_config *ctr)
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 mtspr(SPRN_MMCR2, mmcr2_val);
92
93 return 0;
92} 94}
93 95
94#define NUM_CTRS 6 96#define NUM_CTRS 6
95 97
96/* Configures the global settings for the countes on all CPUs. */ 98/* Configures the global settings for the countes on all CPUs. */
97static void fsl7450_reg_setup(struct op_counter_config *ctr, 99static int fsl7450_reg_setup(struct op_counter_config *ctr,
98 struct op_system_config *sys, 100 struct op_system_config *sys,
99 int num_ctrs) 101 int num_ctrs)
100{ 102{
@@ -126,10 +128,12 @@ static void fsl7450_reg_setup(struct op_counter_config *ctr,
126 | mmcr1_event6(ctr[5].event); 128 | mmcr1_event6(ctr[5].event);
127 129
128 mmcr2_val = 0; 130 mmcr2_val = 0;
131
132 return 0;
129} 133}
130 134
131/* Sets the counters on this CPU to the chosen values, and starts them */ 135/* Sets the counters on this CPU to the chosen values, and starts them */
132static void fsl7450_start(struct op_counter_config *ctr) 136static int fsl7450_start(struct op_counter_config *ctr)
133{ 137{
134 int i; 138 int i;
135 139
@@ -148,6 +152,8 @@ static void fsl7450_start(struct op_counter_config *ctr)
148 pmc_start_ctrs(); 152 pmc_start_ctrs();
149 153
150 oprofile_running = 1; 154 oprofile_running = 1;
155
156 return 0;
151} 157}
152 158
153/* Stop the counters on this CPU */ 159/* Stop the counters on this CPU */
@@ -193,7 +199,7 @@ static void fsl7450_handle_interrupt(struct pt_regs *regs,
193 /* The freeze bit was set by the interrupt. */ 199 /* The freeze bit was set by the interrupt. */
194 /* Clear the freeze bit, and reenable the interrupt. 200 /* Clear the freeze bit, and reenable the interrupt.
195 * The counters won't actually start until the rfi clears 201 * The counters won't actually start until the rfi clears
196 * the PMM bit */ 202 * the PM/M bit */
197 pmc_start_ctrs(); 203 pmc_start_ctrs();
198} 204}
199 205
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c
index c29293befba9..d928b54f3a0f 100644
--- a/arch/powerpc/oprofile/op_model_cell.c
+++ b/arch/powerpc/oprofile/op_model_cell.c
@@ -5,8 +5,8 @@
5 * 5 *
6 * Author: David Erb (djerb@us.ibm.com) 6 * Author: David Erb (djerb@us.ibm.com)
7 * Modifications: 7 * Modifications:
8 * Carl Love <carll@us.ibm.com> 8 * Carl Love <carll@us.ibm.com>
9 * Maynard Johnson <maynardj@us.ibm.com> 9 * Maynard Johnson <maynardj@us.ibm.com>
10 * 10 *
11 * This program is free software; you can redistribute it and/or 11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License 12 * modify it under the terms of the GNU General Public License
@@ -38,12 +38,25 @@
38 38
39#include "../platforms/cell/interrupt.h" 39#include "../platforms/cell/interrupt.h"
40#include "../platforms/cell/cbe_regs.h" 40#include "../platforms/cell/cbe_regs.h"
41#include "cell/pr_util.h"
42
43static void cell_global_stop_spu(void);
44
45/*
46 * spu_cycle_reset is the number of cycles between samples.
47 * This variable is used for SPU profiling and should ONLY be set
48 * at the beginning of cell_reg_setup; otherwise, it's read-only.
49 */
50static unsigned int spu_cycle_reset;
51
52#define NUM_SPUS_PER_NODE 8
53#define SPU_CYCLES_EVENT_NUM 2 /* event number for SPU_CYCLES */
41 54
42#define PPU_CYCLES_EVENT_NUM 1 /* event number for CYCLES */ 55#define PPU_CYCLES_EVENT_NUM 1 /* event number for CYCLES */
43#define PPU_CYCLES_GRP_NUM 1 /* special group number for identifying 56#define PPU_CYCLES_GRP_NUM 1 /* special group number for identifying
44 * PPU_CYCLES event 57 * PPU_CYCLES event
45 */ 58 */
46#define CBE_COUNT_ALL_CYCLES 0x42800000 /* PPU cycle event specifier */ 59#define CBE_COUNT_ALL_CYCLES 0x42800000 /* PPU cycle event specifier */
47 60
48#define NUM_THREADS 2 /* number of physical threads in 61#define NUM_THREADS 2 /* number of physical threads in
49 * physical processor 62 * physical processor
@@ -51,6 +64,7 @@
51#define NUM_TRACE_BUS_WORDS 4 64#define NUM_TRACE_BUS_WORDS 4
52#define NUM_INPUT_BUS_WORDS 2 65#define NUM_INPUT_BUS_WORDS 2
53 66
67#define MAX_SPU_COUNT 0xFFFFFF /* maximum 24 bit LFSR value */
54 68
55struct pmc_cntrl_data { 69struct pmc_cntrl_data {
56 unsigned long vcntr; 70 unsigned long vcntr;
@@ -62,11 +76,10 @@ struct pmc_cntrl_data {
62/* 76/*
63 * ibm,cbe-perftools rtas parameters 77 * ibm,cbe-perftools rtas parameters
64 */ 78 */
65
66struct pm_signal { 79struct pm_signal {
67 u16 cpu; /* Processor to modify */ 80 u16 cpu; /* Processor to modify */
68 u16 sub_unit; /* hw subunit this applies to (if applicable) */ 81 u16 sub_unit; /* hw subunit this applies to (if applicable)*/
69 short int signal_group; /* Signal Group to Enable/Disable */ 82 short int signal_group; /* Signal Group to Enable/Disable */
70 u8 bus_word; /* Enable/Disable on this Trace/Trigger/Event 83 u8 bus_word; /* Enable/Disable on this Trace/Trigger/Event
71 * Bus Word(s) (bitmask) 84 * Bus Word(s) (bitmask)
72 */ 85 */
@@ -112,21 +125,42 @@ static DEFINE_PER_CPU(unsigned long[NR_PHYS_CTRS], pmc_values);
112 125
113static struct pmc_cntrl_data pmc_cntrl[NUM_THREADS][NR_PHYS_CTRS]; 126static struct pmc_cntrl_data pmc_cntrl[NUM_THREADS][NR_PHYS_CTRS];
114 127
115/* Interpetation of hdw_thread: 128/*
129 * The CELL profiling code makes rtas calls to setup the debug bus to
130 * route the performance signals. Additionally, SPU profiling requires
131 * a second rtas call to setup the hardware to capture the SPU PCs.
132 * The EIO error value is returned if the token lookups or the rtas
133 * call fail. The EIO error number is the best choice of the existing
134 * error numbers. The probability of rtas related error is very low. But
135 * by returning EIO and printing additional information to dmsg the user
136 * will know that OProfile did not start and dmesg will tell them why.
137 * OProfile does not support returning errors on Stop. Not a huge issue
138 * since failure to reset the debug bus or stop the SPU PC collection is
139 * not a fatel issue. Chances are if the Stop failed, Start doesn't work
140 * either.
141 */
142
143/*
144 * Interpetation of hdw_thread:
116 * 0 - even virtual cpus 0, 2, 4,... 145 * 0 - even virtual cpus 0, 2, 4,...
117 * 1 - odd virtual cpus 1, 3, 5, ... 146 * 1 - odd virtual cpus 1, 3, 5, ...
147 *
148 * FIXME: this is strictly wrong, we need to clean this up in a number
149 * of places. It works for now. -arnd
118 */ 150 */
119static u32 hdw_thread; 151static u32 hdw_thread;
120 152
121static u32 virt_cntr_inter_mask; 153static u32 virt_cntr_inter_mask;
122static struct timer_list timer_virt_cntr; 154static struct timer_list timer_virt_cntr;
123 155
124/* pm_signal needs to be global since it is initialized in 156/*
157 * pm_signal needs to be global since it is initialized in
125 * cell_reg_setup at the time when the necessary information 158 * cell_reg_setup at the time when the necessary information
126 * is available. 159 * is available.
127 */ 160 */
128static struct pm_signal pm_signal[NR_PHYS_CTRS]; 161static struct pm_signal pm_signal[NR_PHYS_CTRS];
129static int pm_rtas_token; 162static int pm_rtas_token; /* token for debug bus setup call */
163static int spu_rtas_token; /* token for SPU cycle profiling */
130 164
131static u32 reset_value[NR_PHYS_CTRS]; 165static u32 reset_value[NR_PHYS_CTRS];
132static int num_counters; 166static int num_counters;
@@ -147,8 +181,8 @@ rtas_ibm_cbe_perftools(int subfunc, int passthru,
147{ 181{
148 u64 paddr = __pa(address); 182 u64 paddr = __pa(address);
149 183
150 return rtas_call(pm_rtas_token, 5, 1, NULL, subfunc, passthru, 184 return rtas_call(pm_rtas_token, 5, 1, NULL, subfunc,
151 paddr >> 32, paddr & 0xffffffff, length); 185 passthru, paddr >> 32, paddr & 0xffffffff, length);
152} 186}
153 187
154static void pm_rtas_reset_signals(u32 node) 188static void pm_rtas_reset_signals(u32 node)
@@ -156,12 +190,13 @@ static void pm_rtas_reset_signals(u32 node)
156 int ret; 190 int ret;
157 struct pm_signal pm_signal_local; 191 struct pm_signal pm_signal_local;
158 192
159 /* The debug bus is being set to the passthru disable state. 193 /*
160 * However, the FW still expects atleast one legal signal routing 194 * The debug bus is being set to the passthru disable state.
161 * entry or it will return an error on the arguments. If we don't 195 * However, the FW still expects atleast one legal signal routing
162 * supply a valid entry, we must ignore all return values. Ignoring 196 * entry or it will return an error on the arguments. If we don't
163 * all return values means we might miss an error we should be 197 * supply a valid entry, we must ignore all return values. Ignoring
164 * concerned about. 198 * all return values means we might miss an error we should be
199 * concerned about.
165 */ 200 */
166 201
167 /* fw expects physical cpu #. */ 202 /* fw expects physical cpu #. */
@@ -175,18 +210,24 @@ static void pm_rtas_reset_signals(u32 node)
175 &pm_signal_local, 210 &pm_signal_local,
176 sizeof(struct pm_signal)); 211 sizeof(struct pm_signal));
177 212
178 if (ret) 213 if (unlikely(ret))
214 /*
215 * Not a fatal error. For Oprofile stop, the oprofile
216 * functions do not support returning an error for
217 * failure to stop OProfile.
218 */
179 printk(KERN_WARNING "%s: rtas returned: %d\n", 219 printk(KERN_WARNING "%s: rtas returned: %d\n",
180 __FUNCTION__, ret); 220 __FUNCTION__, ret);
181} 221}
182 222
183static void pm_rtas_activate_signals(u32 node, u32 count) 223static int pm_rtas_activate_signals(u32 node, u32 count)
184{ 224{
185 int ret; 225 int ret;
186 int i, j; 226 int i, j;
187 struct pm_signal pm_signal_local[NR_PHYS_CTRS]; 227 struct pm_signal pm_signal_local[NR_PHYS_CTRS];
188 228
189 /* There is no debug setup required for the cycles event. 229 /*
230 * There is no debug setup required for the cycles event.
190 * Note that only events in the same group can be used. 231 * Note that only events in the same group can be used.
191 * Otherwise, there will be conflicts in correctly routing 232 * Otherwise, there will be conflicts in correctly routing
192 * the signals on the debug bus. It is the responsiblity 233 * the signals on the debug bus. It is the responsiblity
@@ -213,10 +254,14 @@ static void pm_rtas_activate_signals(u32 node, u32 count)
213 pm_signal_local, 254 pm_signal_local,
214 i * sizeof(struct pm_signal)); 255 i * sizeof(struct pm_signal));
215 256
216 if (ret) 257 if (unlikely(ret)) {
217 printk(KERN_WARNING "%s: rtas returned: %d\n", 258 printk(KERN_WARNING "%s: rtas returned: %d\n",
218 __FUNCTION__, ret); 259 __FUNCTION__, ret);
260 return -EIO;
261 }
219 } 262 }
263
264 return 0;
220} 265}
221 266
222/* 267/*
@@ -260,11 +305,12 @@ static void set_pm_event(u32 ctr, int event, u32 unit_mask)
260 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_POLARITY(polarity); 305 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_POLARITY(polarity);
261 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_INPUT_CONTROL(input_control); 306 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_INPUT_CONTROL(input_control);
262 307
263 /* Some of the islands signal selection is based on 64 bit words. 308 /*
309 * Some of the islands signal selection is based on 64 bit words.
264 * The debug bus words are 32 bits, the input words to the performance 310 * The debug bus words are 32 bits, the input words to the performance
265 * counters are defined as 32 bits. Need to convert the 64 bit island 311 * counters are defined as 32 bits. Need to convert the 64 bit island
266 * specification to the appropriate 32 input bit and bus word for the 312 * specification to the appropriate 32 input bit and bus word for the
267 * performance counter event selection. See the CELL Performance 313 * performance counter event selection. See the CELL Performance
268 * monitoring signals manual and the Perf cntr hardware descriptions 314 * monitoring signals manual and the Perf cntr hardware descriptions
269 * for the details. 315 * for the details.
270 */ 316 */
@@ -298,6 +344,7 @@ static void set_pm_event(u32 ctr, int event, u32 unit_mask)
298 input_bus[j] = i; 344 input_bus[j] = i;
299 pm_regs.group_control |= 345 pm_regs.group_control |=
300 (i << (31 - i)); 346 (i << (31 - i));
347
301 break; 348 break;
302 } 349 }
303 } 350 }
@@ -309,7 +356,8 @@ out:
309 356
310static void write_pm_cntrl(int cpu) 357static void write_pm_cntrl(int cpu)
311{ 358{
312 /* Oprofile will use 32 bit counters, set bits 7:10 to 0 359 /*
360 * Oprofile will use 32 bit counters, set bits 7:10 to 0
313 * pmregs.pm_cntrl is a global 361 * pmregs.pm_cntrl is a global
314 */ 362 */
315 363
@@ -326,7 +374,8 @@ static void write_pm_cntrl(int cpu)
326 if (pm_regs.pm_cntrl.freeze == 1) 374 if (pm_regs.pm_cntrl.freeze == 1)
327 val |= CBE_PM_FREEZE_ALL_CTRS; 375 val |= CBE_PM_FREEZE_ALL_CTRS;
328 376
329 /* Routine set_count_mode must be called previously to set 377 /*
378 * Routine set_count_mode must be called previously to set
330 * the count mode based on the user selection of user and kernel. 379 * the count mode based on the user selection of user and kernel.
331 */ 380 */
332 val |= CBE_PM_COUNT_MODE_SET(pm_regs.pm_cntrl.count_mode); 381 val |= CBE_PM_COUNT_MODE_SET(pm_regs.pm_cntrl.count_mode);
@@ -336,7 +385,8 @@ static void write_pm_cntrl(int cpu)
336static inline void 385static inline void
337set_count_mode(u32 kernel, u32 user) 386set_count_mode(u32 kernel, u32 user)
338{ 387{
339 /* The user must specify user and kernel if they want them. If 388 /*
389 * The user must specify user and kernel if they want them. If
340 * neither is specified, OProfile will count in hypervisor mode. 390 * neither is specified, OProfile will count in hypervisor mode.
341 * pm_regs.pm_cntrl is a global 391 * pm_regs.pm_cntrl is a global
342 */ 392 */
@@ -364,7 +414,7 @@ static inline void enable_ctr(u32 cpu, u32 ctr, u32 * pm07_cntrl)
364 414
365/* 415/*
366 * Oprofile is expected to collect data on all CPUs simultaneously. 416 * Oprofile is expected to collect data on all CPUs simultaneously.
367 * However, there is one set of performance counters per node. There are 417 * However, there is one set of performance counters per node. There are
368 * two hardware threads or virtual CPUs on each node. Hence, OProfile must 418 * two hardware threads or virtual CPUs on each node. Hence, OProfile must
369 * multiplex in time the performance counter collection on the two virtual 419 * multiplex in time the performance counter collection on the two virtual
370 * CPUs. The multiplexing of the performance counters is done by this 420 * CPUs. The multiplexing of the performance counters is done by this
@@ -377,19 +427,19 @@ static inline void enable_ctr(u32 cpu, u32 ctr, u32 * pm07_cntrl)
377 * pair of per-cpu arrays is used for storing the previous and next 427 * pair of per-cpu arrays is used for storing the previous and next
378 * pmc values for a given node. 428 * pmc values for a given node.
379 * NOTE: We use the per-cpu variable to improve cache performance. 429 * NOTE: We use the per-cpu variable to improve cache performance.
430 *
431 * This routine will alternate loading the virtual counters for
432 * virtual CPUs
380 */ 433 */
381static void cell_virtual_cntr(unsigned long data) 434static void cell_virtual_cntr(unsigned long data)
382{ 435{
383 /* This routine will alternate loading the virtual counters for
384 * virtual CPUs
385 */
386 int i, prev_hdw_thread, next_hdw_thread; 436 int i, prev_hdw_thread, next_hdw_thread;
387 u32 cpu; 437 u32 cpu;
388 unsigned long flags; 438 unsigned long flags;
389 439
390 /* Make sure that the interrupt_hander and 440 /*
391 * the virt counter are not both playing with 441 * Make sure that the interrupt_hander and the virt counter are
392 * the counters on the same node. 442 * not both playing with the counters on the same node.
393 */ 443 */
394 444
395 spin_lock_irqsave(&virt_cntr_lock, flags); 445 spin_lock_irqsave(&virt_cntr_lock, flags);
@@ -400,22 +450,25 @@ static void cell_virtual_cntr(unsigned long data)
400 hdw_thread = 1 ^ hdw_thread; 450 hdw_thread = 1 ^ hdw_thread;
401 next_hdw_thread = hdw_thread; 451 next_hdw_thread = hdw_thread;
402 452
403 for (i = 0; i < num_counters; i++) 453 /*
404 /* There are some per thread events. Must do the 454 * There are some per thread events. Must do the
405 * set event, for the thread that is being started 455 * set event, for the thread that is being started
406 */ 456 */
457 for (i = 0; i < num_counters; i++)
407 set_pm_event(i, 458 set_pm_event(i,
408 pmc_cntrl[next_hdw_thread][i].evnts, 459 pmc_cntrl[next_hdw_thread][i].evnts,
409 pmc_cntrl[next_hdw_thread][i].masks); 460 pmc_cntrl[next_hdw_thread][i].masks);
410 461
411 /* The following is done only once per each node, but 462 /*
463 * The following is done only once per each node, but
412 * we need cpu #, not node #, to pass to the cbe_xxx functions. 464 * we need cpu #, not node #, to pass to the cbe_xxx functions.
413 */ 465 */
414 for_each_online_cpu(cpu) { 466 for_each_online_cpu(cpu) {
415 if (cbe_get_hw_thread_id(cpu)) 467 if (cbe_get_hw_thread_id(cpu))
416 continue; 468 continue;
417 469
418 /* stop counters, save counter values, restore counts 470 /*
471 * stop counters, save counter values, restore counts
419 * for previous thread 472 * for previous thread
420 */ 473 */
421 cbe_disable_pm(cpu); 474 cbe_disable_pm(cpu);
@@ -428,7 +481,7 @@ static void cell_virtual_cntr(unsigned long data)
428 == 0xFFFFFFFF) 481 == 0xFFFFFFFF)
429 /* If the cntr value is 0xffffffff, we must 482 /* If the cntr value is 0xffffffff, we must
430 * reset that to 0xfffffff0 when the current 483 * reset that to 0xfffffff0 when the current
431 * thread is restarted. This will generate a 484 * thread is restarted. This will generate a
432 * new interrupt and make sure that we never 485 * new interrupt and make sure that we never
433 * restore the counters to the max value. If 486 * restore the counters to the max value. If
434 * the counters were restored to the max value, 487 * the counters were restored to the max value,
@@ -444,13 +497,15 @@ static void cell_virtual_cntr(unsigned long data)
444 next_hdw_thread)[i]); 497 next_hdw_thread)[i]);
445 } 498 }
446 499
447 /* Switch to the other thread. Change the interrupt 500 /*
501 * Switch to the other thread. Change the interrupt
448 * and control regs to be scheduled on the CPU 502 * and control regs to be scheduled on the CPU
449 * corresponding to the thread to execute. 503 * corresponding to the thread to execute.
450 */ 504 */
451 for (i = 0; i < num_counters; i++) { 505 for (i = 0; i < num_counters; i++) {
452 if (pmc_cntrl[next_hdw_thread][i].enabled) { 506 if (pmc_cntrl[next_hdw_thread][i].enabled) {
453 /* There are some per thread events. 507 /*
508 * There are some per thread events.
454 * Must do the set event, enable_cntr 509 * Must do the set event, enable_cntr
455 * for each cpu. 510 * for each cpu.
456 */ 511 */
@@ -482,17 +537,42 @@ static void start_virt_cntrs(void)
482} 537}
483 538
484/* This function is called once for all cpus combined */ 539/* This function is called once for all cpus combined */
485static void 540static int cell_reg_setup(struct op_counter_config *ctr,
486cell_reg_setup(struct op_counter_config *ctr, 541 struct op_system_config *sys, int num_ctrs)
487 struct op_system_config *sys, int num_ctrs)
488{ 542{
489 int i, j, cpu; 543 int i, j, cpu;
544 spu_cycle_reset = 0;
545
546 if (ctr[0].event == SPU_CYCLES_EVENT_NUM) {
547 spu_cycle_reset = ctr[0].count;
548
549 /*
550 * Each node will need to make the rtas call to start
551 * and stop SPU profiling. Get the token once and store it.
552 */
553 spu_rtas_token = rtas_token("ibm,cbe-spu-perftools");
554
555 if (unlikely(spu_rtas_token == RTAS_UNKNOWN_SERVICE)) {
556 printk(KERN_ERR
557 "%s: rtas token ibm,cbe-spu-perftools unknown\n",
558 __FUNCTION__);
559 return -EIO;
560 }
561 }
490 562
491 pm_rtas_token = rtas_token("ibm,cbe-perftools"); 563 pm_rtas_token = rtas_token("ibm,cbe-perftools");
492 if (pm_rtas_token == RTAS_UNKNOWN_SERVICE) { 564
493 printk(KERN_WARNING "%s: RTAS_UNKNOWN_SERVICE\n", 565 /*
566 * For all events excetp PPU CYCLEs, each node will need to make
567 * the rtas cbe-perftools call to setup and reset the debug bus.
568 * Make the token lookup call once and store it in the global
569 * variable pm_rtas_token.
570 */
571 if (unlikely(pm_rtas_token == RTAS_UNKNOWN_SERVICE)) {
572 printk(KERN_ERR
573 "%s: rtas token ibm,cbe-perftools unknown\n",
494 __FUNCTION__); 574 __FUNCTION__);
495 goto out; 575 return -EIO;
496 } 576 }
497 577
498 num_counters = num_ctrs; 578 num_counters = num_ctrs;
@@ -520,7 +600,8 @@ cell_reg_setup(struct op_counter_config *ctr,
520 per_cpu(pmc_values, j)[i] = 0; 600 per_cpu(pmc_values, j)[i] = 0;
521 } 601 }
522 602
523 /* Setup the thread 1 events, map the thread 0 event to the 603 /*
604 * Setup the thread 1 events, map the thread 0 event to the
524 * equivalent thread 1 event. 605 * equivalent thread 1 event.
525 */ 606 */
526 for (i = 0; i < num_ctrs; ++i) { 607 for (i = 0; i < num_ctrs; ++i) {
@@ -544,9 +625,10 @@ cell_reg_setup(struct op_counter_config *ctr,
544 for (i = 0; i < NUM_INPUT_BUS_WORDS; i++) 625 for (i = 0; i < NUM_INPUT_BUS_WORDS; i++)
545 input_bus[i] = 0xff; 626 input_bus[i] = 0xff;
546 627
547 /* Our counters count up, and "count" refers to 628 /*
629 * Our counters count up, and "count" refers to
548 * how much before the next interrupt, and we interrupt 630 * how much before the next interrupt, and we interrupt
549 * on overflow. So we calculate the starting value 631 * on overflow. So we calculate the starting value
550 * which will give us "count" until overflow. 632 * which will give us "count" until overflow.
551 * Then we set the events on the enabled counters. 633 * Then we set the events on the enabled counters.
552 */ 634 */
@@ -569,28 +651,27 @@ cell_reg_setup(struct op_counter_config *ctr,
569 for (i = 0; i < num_counters; ++i) { 651 for (i = 0; i < num_counters; ++i) {
570 per_cpu(pmc_values, cpu)[i] = reset_value[i]; 652 per_cpu(pmc_values, cpu)[i] = reset_value[i];
571 } 653 }
572out: 654
573 ; 655 return 0;
574} 656}
575 657
658
659
576/* This function is called once for each cpu */ 660/* This function is called once for each cpu */
577static void cell_cpu_setup(struct op_counter_config *cntr) 661static int cell_cpu_setup(struct op_counter_config *cntr)
578{ 662{
579 u32 cpu = smp_processor_id(); 663 u32 cpu = smp_processor_id();
580 u32 num_enabled = 0; 664 u32 num_enabled = 0;
581 int i; 665 int i;
582 666
667 if (spu_cycle_reset)
668 return 0;
669
583 /* There is one performance monitor per processor chip (i.e. node), 670 /* There is one performance monitor per processor chip (i.e. node),
584 * so we only need to perform this function once per node. 671 * so we only need to perform this function once per node.
585 */ 672 */
586 if (cbe_get_hw_thread_id(cpu)) 673 if (cbe_get_hw_thread_id(cpu))
587 goto out; 674 return 0;
588
589 if (pm_rtas_token == RTAS_UNKNOWN_SERVICE) {
590 printk(KERN_WARNING "%s: RTAS_UNKNOWN_SERVICE\n",
591 __FUNCTION__);
592 goto out;
593 }
594 675
595 /* Stop all counters */ 676 /* Stop all counters */
596 cbe_disable_pm(cpu); 677 cbe_disable_pm(cpu);
@@ -609,16 +690,286 @@ static void cell_cpu_setup(struct op_counter_config *cntr)
609 } 690 }
610 } 691 }
611 692
612 pm_rtas_activate_signals(cbe_cpu_to_node(cpu), num_enabled); 693 /*
694 * The pm_rtas_activate_signals will return -EIO if the FW
695 * call failed.
696 */
697 return pm_rtas_activate_signals(cbe_cpu_to_node(cpu), num_enabled);
698}
699
700#define ENTRIES 303
701#define MAXLFSR 0xFFFFFF
702
703/* precomputed table of 24 bit LFSR values */
704static int initial_lfsr[] = {
705 8221349, 12579195, 5379618, 10097839, 7512963, 7519310, 3955098, 10753424,
706 15507573, 7458917, 285419, 2641121, 9780088, 3915503, 6668768, 1548716,
707 4885000, 8774424, 9650099, 2044357, 2304411, 9326253, 10332526, 4421547,
708 3440748, 10179459, 13332843, 10375561, 1313462, 8375100, 5198480, 6071392,
709 9341783, 1526887, 3985002, 1439429, 13923762, 7010104, 11969769, 4547026,
710 2040072, 4025602, 3437678, 7939992, 11444177, 4496094, 9803157, 10745556,
711 3671780, 4257846, 5662259, 13196905, 3237343, 12077182, 16222879, 7587769,
712 14706824, 2184640, 12591135, 10420257, 7406075, 3648978, 11042541, 15906893,
713 11914928, 4732944, 10695697, 12928164, 11980531, 4430912, 11939291, 2917017,
714 6119256, 4172004, 9373765, 8410071, 14788383, 5047459, 5474428, 1737756,
715 15967514, 13351758, 6691285, 8034329, 2856544, 14394753, 11310160, 12149558,
716 7487528, 7542781, 15668898, 12525138, 12790975, 3707933, 9106617, 1965401,
717 16219109, 12801644, 2443203, 4909502, 8762329, 3120803, 6360315, 9309720,
718 15164599, 10844842, 4456529, 6667610, 14924259, 884312, 6234963, 3326042,
719 15973422, 13919464, 5272099, 6414643, 3909029, 2764324, 5237926, 4774955,
720 10445906, 4955302, 5203726, 10798229, 11443419, 2303395, 333836, 9646934,
721 3464726, 4159182, 568492, 995747, 10318756, 13299332, 4836017, 8237783,
722 3878992, 2581665, 11394667, 5672745, 14412947, 3159169, 9094251, 16467278,
723 8671392, 15230076, 4843545, 7009238, 15504095, 1494895, 9627886, 14485051,
724 8304291, 252817, 12421642, 16085736, 4774072, 2456177, 4160695, 15409741,
725 4902868, 5793091, 13162925, 16039714, 782255, 11347835, 14884586, 366972,
726 16308990, 11913488, 13390465, 2958444, 10340278, 1177858, 1319431, 10426302,
727 2868597, 126119, 5784857, 5245324, 10903900, 16436004, 3389013, 1742384,
728 14674502, 10279218, 8536112, 10364279, 6877778, 14051163, 1025130, 6072469,
729 1988305, 8354440, 8216060, 16342977, 13112639, 3976679, 5913576, 8816697,
730 6879995, 14043764, 3339515, 9364420, 15808858, 12261651, 2141560, 5636398,
731 10345425, 10414756, 781725, 6155650, 4746914, 5078683, 7469001, 6799140,
732 10156444, 9667150, 10116470, 4133858, 2121972, 1124204, 1003577, 1611214,
733 14304602, 16221850, 13878465, 13577744, 3629235, 8772583, 10881308, 2410386,
734 7300044, 5378855, 9301235, 12755149, 4977682, 8083074, 10327581, 6395087,
735 9155434, 15501696, 7514362, 14520507, 15808945, 3244584, 4741962, 9658130,
736 14336147, 8654727, 7969093, 15759799, 14029445, 5038459, 9894848, 8659300,
737 13699287, 8834306, 10712885, 14753895, 10410465, 3373251, 309501, 9561475,
738 5526688, 14647426, 14209836, 5339224, 207299, 14069911, 8722990, 2290950,
739 3258216, 12505185, 6007317, 9218111, 14661019, 10537428, 11731949, 9027003,
740 6641507, 9490160, 200241, 9720425, 16277895, 10816638, 1554761, 10431375,
741 7467528, 6790302, 3429078, 14633753, 14428997, 11463204, 3576212, 2003426,
742 6123687, 820520, 9992513, 15784513, 5778891, 6428165, 8388607
743};
744
745/*
746 * The hardware uses an LFSR counting sequence to determine when to capture
747 * the SPU PCs. An LFSR sequence is like a puesdo random number sequence
748 * where each number occurs once in the sequence but the sequence is not in
749 * numerical order. The SPU PC capture is done when the LFSR sequence reaches
750 * the last value in the sequence. Hence the user specified value N
751 * corresponds to the LFSR number that is N from the end of the sequence.
752 *
753 * To avoid the time to compute the LFSR, a lookup table is used. The 24 bit
754 * LFSR sequence is broken into four ranges. The spacing of the precomputed
755 * values is adjusted in each range so the error between the user specifed
756 * number (N) of events between samples and the actual number of events based
757 * on the precomputed value will be les then about 6.2%. Note, if the user
758 * specifies N < 2^16, the LFSR value that is 2^16 from the end will be used.
759 * This is to prevent the loss of samples because the trace buffer is full.
760 *
761 * User specified N Step between Index in
762 * precomputed values precomputed
763 * table
764 * 0 to 2^16-1 ---- 0
765 * 2^16 to 2^16+2^19-1 2^12 1 to 128
766 * 2^16+2^19 to 2^16+2^19+2^22-1 2^15 129 to 256
767 * 2^16+2^19+2^22 to 2^24-1 2^18 257 to 302
768 *
769 *
770 * For example, the LFSR values in the second range are computed for 2^16,
771 * 2^16+2^12, ... , 2^19-2^16, 2^19 and stored in the table at indicies
772 * 1, 2,..., 127, 128.
773 *
774 * The 24 bit LFSR value for the nth number in the sequence can be
775 * calculated using the following code:
776 *
777 * #define size 24
778 * int calculate_lfsr(int n)
779 * {
780 * int i;
781 * unsigned int newlfsr0;
782 * unsigned int lfsr = 0xFFFFFF;
783 * unsigned int howmany = n;
784 *
785 * for (i = 2; i < howmany + 2; i++) {
786 * newlfsr0 = (((lfsr >> (size - 1 - 0)) & 1) ^
787 * ((lfsr >> (size - 1 - 1)) & 1) ^
788 * (((lfsr >> (size - 1 - 6)) & 1) ^
789 * ((lfsr >> (size - 1 - 23)) & 1)));
790 *
791 * lfsr >>= 1;
792 * lfsr = lfsr | (newlfsr0 << (size - 1));
793 * }
794 * return lfsr;
795 * }
796 */
797
798#define V2_16 (0x1 << 16)
799#define V2_19 (0x1 << 19)
800#define V2_22 (0x1 << 22)
801
802static int calculate_lfsr(int n)
803{
804 /*
805 * The ranges and steps are in powers of 2 so the calculations
806 * can be done using shifts rather then divide.
807 */
808 int index;
809
810 if ((n >> 16) == 0)
811 index = 0;
812 else if (((n - V2_16) >> 19) == 0)
813 index = ((n - V2_16) >> 12) + 1;
814 else if (((n - V2_16 - V2_19) >> 22) == 0)
815 index = ((n - V2_16 - V2_19) >> 15 ) + 1 + 128;
816 else if (((n - V2_16 - V2_19 - V2_22) >> 24) == 0)
817 index = ((n - V2_16 - V2_19 - V2_22) >> 18 ) + 1 + 256;
818 else
819 index = ENTRIES-1;
820
821 /* make sure index is valid */
822 if ((index > ENTRIES) || (index < 0))
823 index = ENTRIES-1;
824
825 return initial_lfsr[index];
826}
827
828static int pm_rtas_activate_spu_profiling(u32 node)
829{
830 int ret, i;
831 struct pm_signal pm_signal_local[NR_PHYS_CTRS];
832
833 /*
834 * Set up the rtas call to configure the debug bus to
835 * route the SPU PCs. Setup the pm_signal for each SPU
836 */
837 for (i = 0; i < NUM_SPUS_PER_NODE; i++) {
838 pm_signal_local[i].cpu = node;
839 pm_signal_local[i].signal_group = 41;
840 /* spu i on word (i/2) */
841 pm_signal_local[i].bus_word = 1 << i / 2;
842 /* spu i */
843 pm_signal_local[i].sub_unit = i;
844 pm_signal_local[i].bit = 63;
845 }
846
847 ret = rtas_ibm_cbe_perftools(SUBFUNC_ACTIVATE,
848 PASSTHRU_ENABLE, pm_signal_local,
849 (NUM_SPUS_PER_NODE
850 * sizeof(struct pm_signal)));
851
852 if (unlikely(ret)) {
853 printk(KERN_WARNING "%s: rtas returned: %d\n",
854 __FUNCTION__, ret);
855 return -EIO;
856 }
857
858 return 0;
859}
860
861#ifdef CONFIG_CPU_FREQ
862static int
863oprof_cpufreq_notify(struct notifier_block *nb, unsigned long val, void *data)
864{
865 int ret = 0;
866 struct cpufreq_freqs *frq = data;
867 if ((val == CPUFREQ_PRECHANGE && frq->old < frq->new) ||
868 (val == CPUFREQ_POSTCHANGE && frq->old > frq->new) ||
869 (val == CPUFREQ_RESUMECHANGE || val == CPUFREQ_SUSPENDCHANGE))
870 set_spu_profiling_frequency(frq->new, spu_cycle_reset);
871 return ret;
872}
873
874static struct notifier_block cpu_freq_notifier_block = {
875 .notifier_call = oprof_cpufreq_notify
876};
877#endif
878
879static int cell_global_start_spu(struct op_counter_config *ctr)
880{
881 int subfunc;
882 unsigned int lfsr_value;
883 int cpu;
884 int ret;
885 int rtas_error;
886 unsigned int cpu_khzfreq = 0;
887
888 /* The SPU profiling uses time-based profiling based on
889 * cpu frequency, so if configured with the CPU_FREQ
890 * option, we should detect frequency changes and react
891 * accordingly.
892 */
893#ifdef CONFIG_CPU_FREQ
894 ret = cpufreq_register_notifier(&cpu_freq_notifier_block,
895 CPUFREQ_TRANSITION_NOTIFIER);
896 if (ret < 0)
897 /* this is not a fatal error */
898 printk(KERN_ERR "CPU freq change registration failed: %d\n",
899 ret);
900
901 else
902 cpu_khzfreq = cpufreq_quick_get(smp_processor_id());
903#endif
904
905 set_spu_profiling_frequency(cpu_khzfreq, spu_cycle_reset);
906
907 for_each_online_cpu(cpu) {
908 if (cbe_get_hw_thread_id(cpu))
909 continue;
910
911 /*
912 * Setup SPU cycle-based profiling.
913 * Set perf_mon_control bit 0 to a zero before
914 * enabling spu collection hardware.
915 */
916 cbe_write_pm(cpu, pm_control, 0);
917
918 if (spu_cycle_reset > MAX_SPU_COUNT)
919 /* use largest possible value */
920 lfsr_value = calculate_lfsr(MAX_SPU_COUNT-1);
921 else
922 lfsr_value = calculate_lfsr(spu_cycle_reset);
923
924 /* must use a non zero value. Zero disables data collection. */
925 if (lfsr_value == 0)
926 lfsr_value = calculate_lfsr(1);
927
928 lfsr_value = lfsr_value << 8; /* shift lfsr to correct
929 * register location
930 */
931
932 /* debug bus setup */
933 ret = pm_rtas_activate_spu_profiling(cbe_cpu_to_node(cpu));
934
935 if (unlikely(ret)) {
936 rtas_error = ret;
937 goto out;
938 }
939
940
941 subfunc = 2; /* 2 - activate SPU tracing, 3 - deactivate */
942
943 /* start profiling */
944 ret = rtas_call(spu_rtas_token, 3, 1, NULL, subfunc,
945 cbe_cpu_to_node(cpu), lfsr_value);
946
947 if (unlikely(ret != 0)) {
948 printk(KERN_ERR
949 "%s: rtas call ibm,cbe-spu-perftools failed, return = %d\n",
950 __FUNCTION__, ret);
951 rtas_error = -EIO;
952 goto out;
953 }
954 }
955
956 rtas_error = start_spu_profiling(spu_cycle_reset);
957 if (rtas_error)
958 goto out_stop;
959
960 oprofile_running = 1;
961 return 0;
962
963out_stop:
964 cell_global_stop_spu(); /* clean up the PMU/debug bus */
613out: 965out:
614 ; 966 return rtas_error;
615} 967}
616 968
617static void cell_global_start(struct op_counter_config *ctr) 969static int cell_global_start_ppu(struct op_counter_config *ctr)
618{ 970{
619 u32 cpu; 971 u32 cpu, i;
620 u32 interrupt_mask = 0; 972 u32 interrupt_mask = 0;
621 u32 i;
622 973
623 /* This routine gets called once for the system. 974 /* This routine gets called once for the system.
624 * There is one performance monitor per node, so we 975 * There is one performance monitor per node, so we
@@ -651,19 +1002,79 @@ static void cell_global_start(struct op_counter_config *ctr)
651 oprofile_running = 1; 1002 oprofile_running = 1;
652 smp_wmb(); 1003 smp_wmb();
653 1004
654 /* NOTE: start_virt_cntrs will result in cell_virtual_cntr() being 1005 /*
655 * executed which manipulates the PMU. We start the "virtual counter" 1006 * NOTE: start_virt_cntrs will result in cell_virtual_cntr() being
1007 * executed which manipulates the PMU. We start the "virtual counter"
656 * here so that we do not need to synchronize access to the PMU in 1008 * here so that we do not need to synchronize access to the PMU in
657 * the above for-loop. 1009 * the above for-loop.
658 */ 1010 */
659 start_virt_cntrs(); 1011 start_virt_cntrs();
1012
1013 return 0;
660} 1014}
661 1015
662static void cell_global_stop(void) 1016static int cell_global_start(struct op_counter_config *ctr)
1017{
1018 if (spu_cycle_reset)
1019 return cell_global_start_spu(ctr);
1020 else
1021 return cell_global_start_ppu(ctr);
1022}
1023
1024/*
1025 * Note the generic OProfile stop calls do not support returning
1026 * an error on stop. Hence, will not return an error if the FW
1027 * calls fail on stop. Failure to reset the debug bus is not an issue.
1028 * Failure to disable the SPU profiling is not an issue. The FW calls
1029 * to enable the performance counters and debug bus will work even if
1030 * the hardware was not cleanly reset.
1031 */
1032static void cell_global_stop_spu(void)
1033{
1034 int subfunc, rtn_value;
1035 unsigned int lfsr_value;
1036 int cpu;
1037
1038 oprofile_running = 0;
1039
1040#ifdef CONFIG_CPU_FREQ
1041 cpufreq_unregister_notifier(&cpu_freq_notifier_block,
1042 CPUFREQ_TRANSITION_NOTIFIER);
1043#endif
1044
1045 for_each_online_cpu(cpu) {
1046 if (cbe_get_hw_thread_id(cpu))
1047 continue;
1048
1049 subfunc = 3; /*
1050 * 2 - activate SPU tracing,
1051 * 3 - deactivate
1052 */
1053 lfsr_value = 0x8f100000;
1054
1055 rtn_value = rtas_call(spu_rtas_token, 3, 1, NULL,
1056 subfunc, cbe_cpu_to_node(cpu),
1057 lfsr_value);
1058
1059 if (unlikely(rtn_value != 0)) {
1060 printk(KERN_ERR
1061 "%s: rtas call ibm,cbe-spu-perftools failed, return = %d\n",
1062 __FUNCTION__, rtn_value);
1063 }
1064
1065 /* Deactivate the signals */
1066 pm_rtas_reset_signals(cbe_cpu_to_node(cpu));
1067 }
1068
1069 stop_spu_profiling();
1070}
1071
1072static void cell_global_stop_ppu(void)
663{ 1073{
664 int cpu; 1074 int cpu;
665 1075
666 /* This routine will be called once for the system. 1076 /*
1077 * This routine will be called once for the system.
667 * There is one performance monitor per node, so we 1078 * There is one performance monitor per node, so we
668 * only need to perform this function once per node. 1079 * only need to perform this function once per node.
669 */ 1080 */
@@ -687,8 +1098,16 @@ static void cell_global_stop(void)
687 } 1098 }
688} 1099}
689 1100
690static void 1101static void cell_global_stop(void)
691cell_handle_interrupt(struct pt_regs *regs, struct op_counter_config *ctr) 1102{
1103 if (spu_cycle_reset)
1104 cell_global_stop_spu();
1105 else
1106 cell_global_stop_ppu();
1107}
1108
1109static void cell_handle_interrupt(struct pt_regs *regs,
1110 struct op_counter_config *ctr)
692{ 1111{
693 u32 cpu; 1112 u32 cpu;
694 u64 pc; 1113 u64 pc;
@@ -699,13 +1118,15 @@ cell_handle_interrupt(struct pt_regs *regs, struct op_counter_config *ctr)
699 1118
700 cpu = smp_processor_id(); 1119 cpu = smp_processor_id();
701 1120
702 /* Need to make sure the interrupt handler and the virt counter 1121 /*
1122 * Need to make sure the interrupt handler and the virt counter
703 * routine are not running at the same time. See the 1123 * routine are not running at the same time. See the
704 * cell_virtual_cntr() routine for additional comments. 1124 * cell_virtual_cntr() routine for additional comments.
705 */ 1125 */
706 spin_lock_irqsave(&virt_cntr_lock, flags); 1126 spin_lock_irqsave(&virt_cntr_lock, flags);
707 1127
708 /* Need to disable and reenable the performance counters 1128 /*
1129 * Need to disable and reenable the performance counters
709 * to get the desired behavior from the hardware. This 1130 * to get the desired behavior from the hardware. This
710 * is hardware specific. 1131 * is hardware specific.
711 */ 1132 */
@@ -714,7 +1135,8 @@ cell_handle_interrupt(struct pt_regs *regs, struct op_counter_config *ctr)
714 1135
715 interrupt_mask = cbe_get_and_clear_pm_interrupts(cpu); 1136 interrupt_mask = cbe_get_and_clear_pm_interrupts(cpu);
716 1137
717 /* If the interrupt mask has been cleared, then the virt cntr 1138 /*
1139 * If the interrupt mask has been cleared, then the virt cntr
718 * has cleared the interrupt. When the thread that generated 1140 * has cleared the interrupt. When the thread that generated
719 * the interrupt is restored, the data count will be restored to 1141 * the interrupt is restored, the data count will be restored to
720 * 0xffffff0 to cause the interrupt to be regenerated. 1142 * 0xffffff0 to cause the interrupt to be regenerated.
@@ -732,18 +1154,20 @@ cell_handle_interrupt(struct pt_regs *regs, struct op_counter_config *ctr)
732 } 1154 }
733 } 1155 }
734 1156
735 /* The counters were frozen by the interrupt. 1157 /*
1158 * The counters were frozen by the interrupt.
736 * Reenable the interrupt and restart the counters. 1159 * Reenable the interrupt and restart the counters.
737 * If there was a race between the interrupt handler and 1160 * If there was a race between the interrupt handler and
738 * the virtual counter routine. The virutal counter 1161 * the virtual counter routine. The virutal counter
739 * routine may have cleared the interrupts. Hence must 1162 * routine may have cleared the interrupts. Hence must
740 * use the virt_cntr_inter_mask to re-enable the interrupts. 1163 * use the virt_cntr_inter_mask to re-enable the interrupts.
741 */ 1164 */
742 cbe_enable_pm_interrupts(cpu, hdw_thread, 1165 cbe_enable_pm_interrupts(cpu, hdw_thread,
743 virt_cntr_inter_mask); 1166 virt_cntr_inter_mask);
744 1167
745 /* The writes to the various performance counters only writes 1168 /*
746 * to a latch. The new values (interrupt setting bits, reset 1169 * The writes to the various performance counters only writes
1170 * to a latch. The new values (interrupt setting bits, reset
747 * counter value etc.) are not copied to the actual registers 1171 * counter value etc.) are not copied to the actual registers
748 * until the performance monitor is enabled. In order to get 1172 * until the performance monitor is enabled. In order to get
749 * this to work as desired, the permormance monitor needs to 1173 * this to work as desired, the permormance monitor needs to
@@ -755,10 +1179,33 @@ cell_handle_interrupt(struct pt_regs *regs, struct op_counter_config *ctr)
755 spin_unlock_irqrestore(&virt_cntr_lock, flags); 1179 spin_unlock_irqrestore(&virt_cntr_lock, flags);
756} 1180}
757 1181
1182/*
1183 * This function is called from the generic OProfile
1184 * driver. When profiling PPUs, we need to do the
1185 * generic sync start; otherwise, do spu_sync_start.
1186 */
1187static int cell_sync_start(void)
1188{
1189 if (spu_cycle_reset)
1190 return spu_sync_start();
1191 else
1192 return DO_GENERIC_SYNC;
1193}
1194
1195static int cell_sync_stop(void)
1196{
1197 if (spu_cycle_reset)
1198 return spu_sync_stop();
1199 else
1200 return 1;
1201}
1202
758struct op_powerpc_model op_model_cell = { 1203struct op_powerpc_model op_model_cell = {
759 .reg_setup = cell_reg_setup, 1204 .reg_setup = cell_reg_setup,
760 .cpu_setup = cell_cpu_setup, 1205 .cpu_setup = cell_cpu_setup,
761 .global_start = cell_global_start, 1206 .global_start = cell_global_start,
762 .global_stop = cell_global_stop, 1207 .global_stop = cell_global_stop,
1208 .sync_start = cell_sync_start,
1209 .sync_stop = cell_sync_stop,
763 .handle_interrupt = cell_handle_interrupt, 1210 .handle_interrupt = cell_handle_interrupt,
764}; 1211};
diff --git a/arch/powerpc/oprofile/op_model_fsl_booke.c b/arch/powerpc/oprofile/op_model_fsl_booke.c
index 2267eb8c661b..183a28bb1812 100644
--- a/arch/powerpc/oprofile/op_model_fsl_booke.c
+++ b/arch/powerpc/oprofile/op_model_fsl_booke.c
@@ -244,7 +244,7 @@ static void dump_pmcs(void)
244 mfpmr(PMRN_PMLCA3), mfpmr(PMRN_PMLCB3)); 244 mfpmr(PMRN_PMLCA3), mfpmr(PMRN_PMLCB3));
245} 245}
246 246
247static void fsl_booke_cpu_setup(struct op_counter_config *ctr) 247static int fsl_booke_cpu_setup(struct op_counter_config *ctr)
248{ 248{
249 int i; 249 int i;
250 250
@@ -258,9 +258,11 @@ static void fsl_booke_cpu_setup(struct op_counter_config *ctr)
258 258
259 set_pmc_user_kernel(i, ctr[i].user, ctr[i].kernel); 259 set_pmc_user_kernel(i, ctr[i].user, ctr[i].kernel);
260 } 260 }
261
262 return 0;
261} 263}
262 264
263static void fsl_booke_reg_setup(struct op_counter_config *ctr, 265static int fsl_booke_reg_setup(struct op_counter_config *ctr,
264 struct op_system_config *sys, 266 struct op_system_config *sys,
265 int num_ctrs) 267 int num_ctrs)
266{ 268{
@@ -276,9 +278,10 @@ static void fsl_booke_reg_setup(struct op_counter_config *ctr,
276 for (i = 0; i < num_counters; ++i) 278 for (i = 0; i < num_counters; ++i)
277 reset_value[i] = 0x80000000UL - ctr[i].count; 279 reset_value[i] = 0x80000000UL - ctr[i].count;
278 280
281 return 0;
279} 282}
280 283
281static void fsl_booke_start(struct op_counter_config *ctr) 284static int fsl_booke_start(struct op_counter_config *ctr)
282{ 285{
283 int i; 286 int i;
284 287
@@ -308,6 +311,8 @@ static void fsl_booke_start(struct op_counter_config *ctr)
308 311
309 pr_debug("start on cpu %d, pmgc0 %x\n", smp_processor_id(), 312 pr_debug("start on cpu %d, pmgc0 %x\n", smp_processor_id(),
310 mfpmr(PMRN_PMGC0)); 313 mfpmr(PMRN_PMGC0));
314
315 return 0;
311} 316}
312 317
313static void fsl_booke_stop(void) 318static void fsl_booke_stop(void)
diff --git a/arch/powerpc/oprofile/op_model_pa6t.c b/arch/powerpc/oprofile/op_model_pa6t.c
index e8a56b0adadc..c40de461fd4e 100644
--- a/arch/powerpc/oprofile/op_model_pa6t.c
+++ b/arch/powerpc/oprofile/op_model_pa6t.c
@@ -89,7 +89,7 @@ static inline void ctr_write(unsigned int i, u64 val)
89 89
90 90
91/* precompute the values to stuff in the hardware registers */ 91/* precompute the values to stuff in the hardware registers */
92static void pa6t_reg_setup(struct op_counter_config *ctr, 92static int pa6t_reg_setup(struct op_counter_config *ctr,
93 struct op_system_config *sys, 93 struct op_system_config *sys,
94 int num_ctrs) 94 int num_ctrs)
95{ 95{
@@ -135,10 +135,12 @@ static void pa6t_reg_setup(struct op_counter_config *ctr,
135 pr_debug("reset_value for pmc%u inited to 0x%lx\n", 135 pr_debug("reset_value for pmc%u inited to 0x%lx\n",
136 pmc, reset_value[pmc]); 136 pmc, reset_value[pmc]);
137 } 137 }
138
139 return 0;
138} 140}
139 141
140/* configure registers on this cpu */ 142/* configure registers on this cpu */
141static void pa6t_cpu_setup(struct op_counter_config *ctr) 143static int pa6t_cpu_setup(struct op_counter_config *ctr)
142{ 144{
143 u64 mmcr0 = mmcr0_val; 145 u64 mmcr0 = mmcr0_val;
144 u64 mmcr1 = mmcr1_val; 146 u64 mmcr1 = mmcr1_val;
@@ -154,9 +156,11 @@ static void pa6t_cpu_setup(struct op_counter_config *ctr)
154 mfspr(SPRN_PA6T_MMCR0)); 156 mfspr(SPRN_PA6T_MMCR0));
155 pr_debug("setup on cpu %d, mmcr1 %016lx\n", smp_processor_id(), 157 pr_debug("setup on cpu %d, mmcr1 %016lx\n", smp_processor_id(),
156 mfspr(SPRN_PA6T_MMCR1)); 158 mfspr(SPRN_PA6T_MMCR1));
159
160 return 0;
157} 161}
158 162
159static void pa6t_start(struct op_counter_config *ctr) 163static int pa6t_start(struct op_counter_config *ctr)
160{ 164{
161 int i; 165 int i;
162 166
@@ -174,6 +178,8 @@ static void pa6t_start(struct op_counter_config *ctr)
174 oprofile_running = 1; 178 oprofile_running = 1;
175 179
176 pr_debug("start on cpu %d, mmcr0 %lx\n", smp_processor_id(), mmcr0); 180 pr_debug("start on cpu %d, mmcr0 %lx\n", smp_processor_id(), mmcr0);
181
182 return 0;
177} 183}
178 184
179static void pa6t_stop(void) 185static void pa6t_stop(void)
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c
index fe597a154d4f..cddc250a6a5c 100644
--- a/arch/powerpc/oprofile/op_model_power4.c
+++ b/arch/powerpc/oprofile/op_model_power4.c
@@ -1,5 +1,7 @@
1/* 1/*
2 * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM 2 * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM
3 * Added mmcra[slot] support:
4 * Copyright (C) 2006-2007 Will Schmidt <willschm@us.ibm.com>, IBM
3 * 5 *
4 * This program is free software; you can redistribute it and/or 6 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License 7 * modify it under the terms of the GNU General Public License
@@ -30,7 +32,7 @@ static u32 mmcr0_val;
30static u64 mmcr1_val; 32static u64 mmcr1_val;
31static u64 mmcra_val; 33static u64 mmcra_val;
32 34
33static void power4_reg_setup(struct op_counter_config *ctr, 35static int power4_reg_setup(struct op_counter_config *ctr,
34 struct op_system_config *sys, 36 struct op_system_config *sys,
35 int num_ctrs) 37 int num_ctrs)
36{ 38{
@@ -58,6 +60,8 @@ static void power4_reg_setup(struct op_counter_config *ctr,
58 mmcr0_val &= ~MMCR0_PROBLEM_DISABLE; 60 mmcr0_val &= ~MMCR0_PROBLEM_DISABLE;
59 else 61 else
60 mmcr0_val |= MMCR0_PROBLEM_DISABLE; 62 mmcr0_val |= MMCR0_PROBLEM_DISABLE;
63
64 return 0;
61} 65}
62 66
63extern void ppc64_enable_pmcs(void); 67extern void ppc64_enable_pmcs(void);
@@ -82,7 +86,7 @@ static inline int mmcra_must_set_sample(void)
82 return 0; 86 return 0;
83} 87}
84 88
85static void power4_cpu_setup(struct op_counter_config *ctr) 89static int power4_cpu_setup(struct op_counter_config *ctr)
86{ 90{
87 unsigned int mmcr0 = mmcr0_val; 91 unsigned int mmcr0 = mmcr0_val;
88 unsigned long mmcra = mmcra_val; 92 unsigned long mmcra = mmcra_val;
@@ -109,9 +113,11 @@ static void power4_cpu_setup(struct op_counter_config *ctr)
109 mfspr(SPRN_MMCR1)); 113 mfspr(SPRN_MMCR1));
110 dbg("setup on cpu %d, mmcra %lx\n", smp_processor_id(), 114 dbg("setup on cpu %d, mmcra %lx\n", smp_processor_id(),
111 mfspr(SPRN_MMCRA)); 115 mfspr(SPRN_MMCRA));
116
117 return 0;
112} 118}
113 119
114static void power4_start(struct op_counter_config *ctr) 120static int power4_start(struct op_counter_config *ctr)
115{ 121{
116 int i; 122 int i;
117 unsigned int mmcr0; 123 unsigned int mmcr0;
@@ -146,6 +152,7 @@ static void power4_start(struct op_counter_config *ctr)
146 oprofile_running = 1; 152 oprofile_running = 1;
147 153
148 dbg("start on cpu %d, mmcr0 %x\n", smp_processor_id(), mmcr0); 154 dbg("start on cpu %d, mmcr0 %x\n", smp_processor_id(), mmcr0);
155 return 0;
149} 156}
150 157
151static void power4_stop(void) 158static void power4_stop(void)
@@ -181,11 +188,17 @@ static void __attribute_used__ kernel_unknown_bucket(void)
181 * On GQ and newer the MMCRA stores the HV and PR bits at the time 188 * On GQ and newer the MMCRA stores the HV and PR bits at the time
182 * the SIAR was sampled. We use that to work out if the SIAR was sampled in 189 * the SIAR was sampled. We use that to work out if the SIAR was sampled in
183 * the hypervisor, our exception vectors or RTAS. 190 * the hypervisor, our exception vectors or RTAS.
191 * If the MMCRA_SAMPLE_ENABLE bit is set, we can use the MMCRA[slot] bits
192 * to more accurately identify the address of the sampled instruction. The
193 * mmcra[slot] bits represent the slot number of a sampled instruction
194 * within an instruction group. The slot will contain a value between 1
195 * and 5 if MMCRA_SAMPLE_ENABLE is set, otherwise 0.
184 */ 196 */
185static unsigned long get_pc(struct pt_regs *regs) 197static unsigned long get_pc(struct pt_regs *regs)
186{ 198{
187 unsigned long pc = mfspr(SPRN_SIAR); 199 unsigned long pc = mfspr(SPRN_SIAR);
188 unsigned long mmcra; 200 unsigned long mmcra;
201 unsigned long slot;
189 202
190 /* Cant do much about it */ 203 /* Cant do much about it */
191 if (!cur_cpu_spec->oprofile_mmcra_sihv) 204 if (!cur_cpu_spec->oprofile_mmcra_sihv)
@@ -193,6 +206,12 @@ static unsigned long get_pc(struct pt_regs *regs)
193 206
194 mmcra = mfspr(SPRN_MMCRA); 207 mmcra = mfspr(SPRN_MMCRA);
195 208
209 if (mmcra & MMCRA_SAMPLE_ENABLE) {
210 slot = ((mmcra & MMCRA_SLOT) >> MMCRA_SLOT_SHIFT);
211 if (slot > 1)
212 pc += 4 * (slot - 1);
213 }
214
196 /* Were we in the hypervisor? */ 215 /* Were we in the hypervisor? */
197 if (firmware_has_feature(FW_FEATURE_LPAR) && 216 if (firmware_has_feature(FW_FEATURE_LPAR) &&
198 (mmcra & cur_cpu_spec->oprofile_mmcra_sihv)) 217 (mmcra & cur_cpu_spec->oprofile_mmcra_sihv))
diff --git a/arch/powerpc/oprofile/op_model_rs64.c b/arch/powerpc/oprofile/op_model_rs64.c
index c731acbfb2a5..a20afe45d936 100644
--- a/arch/powerpc/oprofile/op_model_rs64.c
+++ b/arch/powerpc/oprofile/op_model_rs64.c
@@ -88,7 +88,7 @@ static unsigned long reset_value[OP_MAX_COUNTER];
88 88
89static int num_counters; 89static int num_counters;
90 90
91static void rs64_reg_setup(struct op_counter_config *ctr, 91static int rs64_reg_setup(struct op_counter_config *ctr,
92 struct op_system_config *sys, 92 struct op_system_config *sys,
93 int num_ctrs) 93 int num_ctrs)
94{ 94{
@@ -100,9 +100,10 @@ static void rs64_reg_setup(struct op_counter_config *ctr,
100 reset_value[i] = 0x80000000UL - ctr[i].count; 100 reset_value[i] = 0x80000000UL - ctr[i].count;
101 101
102 /* XXX setup user and kernel profiling */ 102 /* XXX setup user and kernel profiling */
103 return 0;
103} 104}
104 105
105static void rs64_cpu_setup(struct op_counter_config *ctr) 106static int rs64_cpu_setup(struct op_counter_config *ctr)
106{ 107{
107 unsigned int mmcr0; 108 unsigned int mmcr0;
108 109
@@ -125,9 +126,11 @@ static void rs64_cpu_setup(struct op_counter_config *ctr)
125 mfspr(SPRN_MMCR0)); 126 mfspr(SPRN_MMCR0));
126 dbg("setup on cpu %d, mmcr1 %lx\n", smp_processor_id(), 127 dbg("setup on cpu %d, mmcr1 %lx\n", smp_processor_id(),
127 mfspr(SPRN_MMCR1)); 128 mfspr(SPRN_MMCR1));
129
130 return 0;
128} 131}
129 132
130static void rs64_start(struct op_counter_config *ctr) 133static int rs64_start(struct op_counter_config *ctr)
131{ 134{
132 int i; 135 int i;
133 unsigned int mmcr0; 136 unsigned int mmcr0;
@@ -155,6 +158,7 @@ static void rs64_start(struct op_counter_config *ctr)
155 mtspr(SPRN_MMCR0, mmcr0); 158 mtspr(SPRN_MMCR0, mmcr0);
156 159
157 dbg("start on cpu %d, mmcr0 %x\n", smp_processor_id(), mmcr0); 160 dbg("start on cpu %d, mmcr0 %x\n", smp_processor_id(), mmcr0);
161 return 0;
158} 162}
159 163
160static void rs64_stop(void) 164static void rs64_stop(void)
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
index f591a9fc19b9..4be6e7a17b66 100644
--- a/arch/powerpc/platforms/52xx/efika.c
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -54,7 +54,7 @@ static int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
54 struct pci_controller *hose = bus->sysdata; 54 struct pci_controller *hose = bus->sysdata;
55 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) 55 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
56 | (((bus->number - hose->first_busno) & 0xff) << 16) 56 | (((bus->number - hose->first_busno) & 0xff) << 16)
57 | (hose->index << 24); 57 | (hose->global_number << 24);
58 int ret = -1; 58 int ret = -1;
59 int rval; 59 int rval;
60 60
@@ -69,7 +69,7 @@ static int rtas_write_config(struct pci_bus *bus, unsigned int devfn,
69 struct pci_controller *hose = bus->sysdata; 69 struct pci_controller *hose = bus->sysdata;
70 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) 70 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
71 | (((bus->number - hose->first_busno) & 0xff) << 16) 71 | (((bus->number - hose->first_busno) & 0xff) << 16)
72 | (hose->index << 24); 72 | (hose->global_number << 24);
73 int rval; 73 int rval;
74 74
75 rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL, 75 rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL,
@@ -83,7 +83,7 @@ static struct pci_ops rtas_pci_ops = {
83}; 83};
84 84
85 85
86void __init efika_pcisetup(void) 86static void __init efika_pcisetup(void)
87{ 87{
88 const int *bus_range; 88 const int *bus_range;
89 int len; 89 int len;
@@ -128,7 +128,7 @@ void __init efika_pcisetup(void)
128 printk(" controlled by %s\n", pcictrl->full_name); 128 printk(" controlled by %s\n", pcictrl->full_name);
129 printk("\n"); 129 printk("\n");
130 130
131 hose = pcibios_alloc_controller(); 131 hose = pcibios_alloc_controller(of_node_get(pcictrl));
132 if (!hose) { 132 if (!hose) {
133 printk(KERN_WARNING EFIKA_PLATFORM_NAME 133 printk(KERN_WARNING EFIKA_PLATFORM_NAME
134 ": Can't allocate PCI controller structure for %s\n", 134 ": Can't allocate PCI controller structure for %s\n",
@@ -136,7 +136,6 @@ void __init efika_pcisetup(void)
136 return; 136 return;
137 } 137 }
138 138
139 hose->arch_data = of_node_get(pcictrl);
140 hose->first_busno = bus_range[0]; 139 hose->first_busno = bus_range[0];
141 hose->last_busno = bus_range[1]; 140 hose->last_busno = bus_range[1];
142 hose->ops = &rtas_pci_ops; 141 hose->ops = &rtas_pci_ops;
@@ -145,7 +144,7 @@ void __init efika_pcisetup(void)
145} 144}
146 145
147#else 146#else
148void __init efika_pcisetup(void) 147static void __init efika_pcisetup(void)
149{} 148{}
150#endif 149#endif
151 150
@@ -252,6 +251,8 @@ define_machine(efika)
252 .progress = rtas_progress, 251 .progress = rtas_progress,
253 .get_boot_time = rtas_get_boot_time, 252 .get_boot_time = rtas_get_boot_time,
254 .calibrate_decr = generic_calibrate_decr, 253 .calibrate_decr = generic_calibrate_decr,
254#ifdef CONFIG_PCI
255 .phys_mem_access_prot = pci_phys_mem_access_prot, 255 .phys_mem_access_prot = pci_phys_mem_access_prot,
256#endif
256}; 257};
257 258
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 1cfc00dfb99a..5c46e898fd45 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -156,7 +156,7 @@ static void __init lite5200_setup_arch(void)
156 156
157} 157}
158 158
159void lite5200_show_cpuinfo(struct seq_file *m) 159static void lite5200_show_cpuinfo(struct seq_file *m)
160{ 160{
161 struct device_node* np = of_find_all_nodes(NULL); 161 struct device_node* np = of_find_all_nodes(NULL);
162 const char *model = NULL; 162 const char *model = NULL;
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index 34d34a26d305..4c6c82a684b1 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -112,18 +112,18 @@ mpc52xx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
112 u32 value; 112 u32 value;
113 113
114 if (ppc_md.pci_exclude_device) 114 if (ppc_md.pci_exclude_device)
115 if (ppc_md.pci_exclude_device(bus->number, devfn)) 115 if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
116 return PCIBIOS_DEVICE_NOT_FOUND; 116 return PCIBIOS_DEVICE_NOT_FOUND;
117 117
118 out_be32(hose->cfg_addr, 118 out_be32(hose->cfg_addr,
119 (1 << 31) | 119 (1 << 31) |
120 ((bus->number - hose->bus_offset) << 16) | 120 (bus->number << 16) |
121 (devfn << 8) | 121 (devfn << 8) |
122 (offset & 0xfc)); 122 (offset & 0xfc));
123 mb(); 123 mb();
124 124
125#if defined(CONFIG_PPC_MPC5200_BUGFIX) 125#if defined(CONFIG_PPC_MPC5200_BUGFIX)
126 if (bus->number != hose->bus_offset) { 126 if (bus->number) {
127 /* workaround for the bug 435 of the MPC5200 (L25R); 127 /* workaround for the bug 435 of the MPC5200 (L25R);
128 * Don't do 32 bits config access during type-1 cycles */ 128 * Don't do 32 bits config access during type-1 cycles */
129 switch (len) { 129 switch (len) {
@@ -169,18 +169,18 @@ mpc52xx_pci_write_config(struct pci_bus *bus, unsigned int devfn,
169 u32 value, mask; 169 u32 value, mask;
170 170
171 if (ppc_md.pci_exclude_device) 171 if (ppc_md.pci_exclude_device)
172 if (ppc_md.pci_exclude_device(bus->number, devfn)) 172 if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
173 return PCIBIOS_DEVICE_NOT_FOUND; 173 return PCIBIOS_DEVICE_NOT_FOUND;
174 174
175 out_be32(hose->cfg_addr, 175 out_be32(hose->cfg_addr,
176 (1 << 31) | 176 (1 << 31) |
177 ((bus->number - hose->bus_offset) << 16) | 177 (bus->number << 16) |
178 (devfn << 8) | 178 (devfn << 8) |
179 (offset & 0xfc)); 179 (offset & 0xfc));
180 mb(); 180 mb();
181 181
182#if defined(CONFIG_PPC_MPC5200_BUGFIX) 182#if defined(CONFIG_PPC_MPC5200_BUGFIX)
183 if (bus->number != hose->bus_offset) { 183 if (bus->number) {
184 /* workaround for the bug 435 of the MPC5200 (L25R); 184 /* workaround for the bug 435 of the MPC5200 (L25R);
185 * Don't do 32 bits config access during type-1 cycles */ 185 * Don't do 32 bits config access during type-1 cycles */
186 switch (len) { 186 switch (len) {
@@ -385,17 +385,13 @@ mpc52xx_add_bridge(struct device_node *node)
385 * tree are needed to configure the 52xx PCI controller. Rather 385 * tree are needed to configure the 52xx PCI controller. Rather
386 * than parse the tree here, let pci_process_bridge_OF_ranges() 386 * than parse the tree here, let pci_process_bridge_OF_ranges()
387 * do it for us and extract the values after the fact */ 387 * do it for us and extract the values after the fact */
388 hose = pcibios_alloc_controller(); 388 hose = pcibios_alloc_controller(node);
389 if (!hose) 389 if (!hose)
390 return -ENOMEM; 390 return -ENOMEM;
391 391
392 hose->arch_data = node;
393 hose->set_cfg_type = 1;
394
395 hose->first_busno = bus_range ? bus_range[0] : 0; 392 hose->first_busno = bus_range ? bus_range[0] : 0;
396 hose->last_busno = bus_range ? bus_range[1] : 0xff; 393 hose->last_busno = bus_range ? bus_range[1] : 0xff;
397 394
398 hose->bus_offset = 0;
399 hose->ops = &mpc52xx_pci_ops; 395 hose->ops = &mpc52xx_pci_ops;
400 396
401 pci_regs = ioremap(rsrc.start, rsrc.end - rsrc.start + 1); 397 pci_regs = ioremap(rsrc.start, rsrc.end - rsrc.start + 1);
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pm.c b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
index fd40044d16cd..ee2e7639c63e 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pm.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
@@ -9,8 +9,8 @@
9 9
10 10
11/* these are defined in mpc52xx_sleep.S, and only used here */ 11/* these are defined in mpc52xx_sleep.S, and only used here */
12extern void mpc52xx_deep_sleep(void *sram, void *sdram_regs, 12extern void mpc52xx_deep_sleep(void __iomem *sram, void __iomem *sdram_regs,
13 struct mpc52xx_cdm *, struct mpc52xx_intr *); 13 struct mpc52xx_cdm __iomem *, struct mpc52xx_intr __iomem*);
14extern void mpc52xx_ds_sram(void); 14extern void mpc52xx_ds_sram(void);
15extern const long mpc52xx_ds_sram_size; 15extern const long mpc52xx_ds_sram_size;
16extern void mpc52xx_ds_cached(void); 16extern void mpc52xx_ds_cached(void);
@@ -21,7 +21,7 @@ static void __iomem *sdram;
21static struct mpc52xx_cdm __iomem *cdm; 21static struct mpc52xx_cdm __iomem *cdm;
22static struct mpc52xx_intr __iomem *intr; 22static struct mpc52xx_intr __iomem *intr;
23static struct mpc52xx_gpio_wkup __iomem *gpiow; 23static struct mpc52xx_gpio_wkup __iomem *gpiow;
24static void *sram; 24static void __iomem *sram;
25static int sram_size; 25static int sram_size;
26 26
27struct mpc52xx_suspend mpc52xx_suspend; 27struct mpc52xx_suspend mpc52xx_suspend;
@@ -100,7 +100,7 @@ int mpc52xx_pm_enter(suspend_state_t state)
100 u32 clk_enables; 100 u32 clk_enables;
101 u32 msr, hid0; 101 u32 msr, hid0;
102 u32 intr_main_mask; 102 u32 intr_main_mask;
103 void __iomem * irq_0x500 = (void *)CONFIG_KERNEL_START + 0x500; 103 void __iomem * irq_0x500 = (void __iomem *)CONFIG_KERNEL_START + 0x500;
104 unsigned long irq_0x500_stop = (unsigned long)irq_0x500 + mpc52xx_ds_cached_size; 104 unsigned long irq_0x500_stop = (unsigned long)irq_0x500 + mpc52xx_ds_cached_size;
105 char saved_0x500[mpc52xx_ds_cached_size]; 105 char saved_0x500[mpc52xx_ds_cached_size];
106 106
diff --git a/arch/powerpc/platforms/82xx/Kconfig b/arch/powerpc/platforms/82xx/Kconfig
index de7fce9cb6eb..89fde43895c5 100644
--- a/arch/powerpc/platforms/82xx/Kconfig
+++ b/arch/powerpc/platforms/82xx/Kconfig
@@ -1,5 +1,5 @@
1choice 1choice
2 prompt "Machine Type" 2 prompt "82xx Board Type"
3 depends on PPC_82xx 3 depends on PPC_82xx
4 default MPC82xx_ADS 4 default MPC82xx_ADS
5 5
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
index 47cb09f08052..da20832b27f1 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -49,7 +49,7 @@
49#include <linux/fs_enet_pd.h> 49#include <linux/fs_enet_pd.h>
50 50
51#include <sysdev/fsl_soc.h> 51#include <sysdev/fsl_soc.h>
52#include <../sysdev/cpm2_pic.h> 52#include <sysdev/cpm2_pic.h>
53 53
54#include "pq2ads.h" 54#include "pq2ads.h"
55 55
@@ -507,7 +507,8 @@ void m82xx_pci_init_irq(void)
507 return; 507 return;
508} 508}
509 509
510static int m82xx_pci_exclude_device(u_char bus, u_char devfn) 510static int m82xx_pci_exclude_device(struct pci_controller *hose,
511 u_char bus, u_char devfn)
511{ 512{
512 if (bus == 0 && PCI_SLOT(devfn) == 0) 513 if (bus == 0 && PCI_SLOT(devfn) == 0)
513 return PCIBIOS_DEVICE_NOT_FOUND; 514 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -515,7 +516,7 @@ static int m82xx_pci_exclude_device(u_char bus, u_char devfn)
515 return PCIBIOS_SUCCESSFUL; 516 return PCIBIOS_SUCCESSFUL;
516} 517}
517 518
518void __init add_bridge(struct device_node *np) 519static void __init mpc82xx_add_bridge(struct device_node *np)
519{ 520{
520 int len; 521 int len;
521 struct pci_controller *hose; 522 struct pci_controller *hose;
@@ -542,19 +543,13 @@ void __init add_bridge(struct device_node *np)
542 543
543 pci_assign_all_buses = 1; 544 pci_assign_all_buses = 1;
544 545
545 hose = pcibios_alloc_controller(); 546 hose = pcibios_alloc_controller(np);
546 547
547 if (!hose) 548 if (!hose)
548 return; 549 return;
549 550
550 hose->arch_data = np;
551 hose->set_cfg_type = 1;
552
553 hose->first_busno = bus_range ? bus_range[0] : 0; 551 hose->first_busno = bus_range ? bus_range[0] : 0;
554 hose->last_busno = bus_range ? bus_range[1] : 0xff; 552 hose->last_busno = bus_range ? bus_range[1] : 0xff;
555 hose->bus_offset = 0;
556
557 hose->set_cfg_type = 1;
558 553
559 setup_indirect_pci(hose, 554 setup_indirect_pci(hose,
560 r.start + offsetof(pci_cpm2_t, pci_cfg_addr), 555 r.start + offsetof(pci_cpm2_t, pci_cfg_addr),
@@ -584,7 +579,7 @@ static void __init mpc82xx_ads_setup_arch(void)
584#ifdef CONFIG_PCI 579#ifdef CONFIG_PCI
585 ppc_md.pci_exclude_device = m82xx_pci_exclude_device; 580 ppc_md.pci_exclude_device = m82xx_pci_exclude_device;
586 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 581 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
587 add_bridge(np); 582 mpc82xx_add_bridge(np);
588 583
589 of_node_put(np); 584 of_node_put(np);
590#endif 585#endif
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index 19cafdf6df93..ec305f18abd8 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -1,5 +1,5 @@
1choice 1choice
2 prompt "Machine Type" 2 prompt "83xx Board Type"
3 depends on PPC_83xx 3 depends on PPC_83xx
4 default MPC834x_MDS 4 default MPC834x_MDS
5 5
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index 31a91b53f528..5a98f885779f 100644
--- a/arch/powerpc/platforms/83xx/Makefile
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -1,7 +1,7 @@
1# 1#
2# Makefile for the PowerPC 83xx linux kernel. 2# Makefile for the PowerPC 83xx linux kernel.
3# 3#
4obj-y := misc.o 4obj-y := misc.o usb.o
5obj-$(CONFIG_PCI) += pci.o 5obj-$(CONFIG_PCI) += pci.o
6obj-$(CONFIG_MPC8313_RDB) += mpc8313_rdb.o 6obj-$(CONFIG_MPC8313_RDB) += mpc8313_rdb.o
7obj-$(CONFIG_MPC832x_RDB) += mpc832x_rdb.o 7obj-$(CONFIG_MPC832x_RDB) += mpc832x_rdb.o
diff --git a/arch/powerpc/platforms/83xx/mpc8313_rdb.c b/arch/powerpc/platforms/83xx/mpc8313_rdb.c
index 96970ac887ee..3edfe170a03b 100644
--- a/arch/powerpc/platforms/83xx/mpc8313_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc8313_rdb.c
@@ -28,11 +28,6 @@
28#define DBG(fmt...) 28#define DBG(fmt...)
29#endif 29#endif
30 30
31#ifndef CONFIG_PCI
32unsigned long isa_io_base = 0;
33unsigned long isa_mem_base = 0;
34#endif
35
36/* ************************************************************************ 31/* ************************************************************************
37 * 32 *
38 * Setup the architecture 33 * Setup the architecture
@@ -49,10 +44,11 @@ static void __init mpc8313_rdb_setup_arch(void)
49 44
50#ifdef CONFIG_PCI 45#ifdef CONFIG_PCI
51 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 46 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
52 add_bridge(np); 47 mpc83xx_add_bridge(np);
53 48
54 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 49 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
55#endif 50#endif
51 mpc831x_usb_cfg();
56} 52}
57 53
58void __init mpc8313_rdb_init_IRQ(void) 54void __init mpc8313_rdb_init_IRQ(void)
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
index 94843ed52a93..b39cb52c6fb9 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -49,11 +49,6 @@
49#define DBG(fmt...) 49#define DBG(fmt...)
50#endif 50#endif
51 51
52#ifndef CONFIG_PCI
53unsigned long isa_io_base = 0;
54unsigned long isa_mem_base = 0;
55#endif
56
57static u8 *bcsr_regs = NULL; 52static u8 *bcsr_regs = NULL;
58 53
59/* ************************************************************************ 54/* ************************************************************************
@@ -80,7 +75,7 @@ static void __init mpc832x_sys_setup_arch(void)
80 75
81#ifdef CONFIG_PCI 76#ifdef CONFIG_PCI
82 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 77 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
83 add_bridge(np); 78 mpc83xx_add_bridge(np);
84 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 79 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
85#endif 80#endif
86 81
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
index 3db68b73fc32..b2b28a44738c 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -32,11 +32,6 @@
32#define DBG(fmt...) 32#define DBG(fmt...)
33#endif 33#endif
34 34
35#ifndef CONFIG_PCI
36unsigned long isa_io_base = 0;
37unsigned long isa_mem_base = 0;
38#endif
39
40/* ************************************************************************ 35/* ************************************************************************
41 * 36 *
42 * Setup the architecture 37 * Setup the architecture
@@ -53,7 +48,7 @@ static void __init mpc832x_rdb_setup_arch(void)
53 48
54#ifdef CONFIG_PCI 49#ifdef CONFIG_PCI
55 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 50 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
56 add_bridge(np); 51 mpc83xx_add_bridge(np);
57 52
58 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 53 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
59#endif 54#endif
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index 40a01947d684..47ba5446f63c 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -38,11 +38,6 @@
38 38
39#include "mpc83xx.h" 39#include "mpc83xx.h"
40 40
41#ifndef CONFIG_PCI
42unsigned long isa_io_base = 0;
43unsigned long isa_mem_base = 0;
44#endif
45
46/* ************************************************************************ 41/* ************************************************************************
47 * 42 *
48 * Setup the architecture 43 * Setup the architecture
@@ -59,10 +54,12 @@ static void __init mpc834x_itx_setup_arch(void)
59 54
60#ifdef CONFIG_PCI 55#ifdef CONFIG_PCI
61 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 56 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
62 add_bridge(np); 57 mpc83xx_add_bridge(np);
63 58
64 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 59 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
65#endif 60#endif
61
62 mpc834x_usb_cfg();
66} 63}
67 64
68static void __init mpc834x_itx_init_IRQ(void) 65static void __init mpc834x_itx_init_IRQ(void)
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
index 10394b2d7e7a..4c9ff9cadfe4 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
@@ -38,61 +38,17 @@
38 38
39#include "mpc83xx.h" 39#include "mpc83xx.h"
40 40
41#ifndef CONFIG_PCI
42unsigned long isa_io_base = 0;
43unsigned long isa_mem_base = 0;
44#endif
45
46#define BCSR5_INT_USB 0x02 41#define BCSR5_INT_USB 0x02
47/* Note: This is only for PB, not for PB+PIB 42static int mpc834xemds_usb_cfg(void)
48 * On PB only port0 is connected using ULPI */
49static int mpc834x_usb_cfg(void)
50{ 43{
51 unsigned long sccr, sicrl; 44 struct device_node *np;
52 void __iomem *immap;
53 void __iomem *bcsr_regs = NULL; 45 void __iomem *bcsr_regs = NULL;
54 u8 bcsr5; 46 u8 bcsr5;
55 struct device_node *np = NULL;
56 int port0_is_dr = 0;
57
58 if ((np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr")) != NULL)
59 port0_is_dr = 1;
60 if ((np = of_find_compatible_node(NULL, "usb", "fsl-usb2-mph")) != NULL){
61 if (port0_is_dr) {
62 printk(KERN_WARNING
63 "There is only one USB port on PB board! \n");
64 return -1;
65 } else if (!port0_is_dr)
66 /* No usb port enabled */
67 return -1;
68 }
69
70 immap = ioremap(get_immrbase(), 0x1000);
71 if (!immap)
72 return -1;
73
74 /* Configure clock */
75 sccr = in_be32(immap + MPC83XX_SCCR_OFFS);
76 if (port0_is_dr)
77 sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
78 else
79 sccr |= MPC83XX_SCCR_USB_MPHCM_11; /* 1:3 */
80 out_be32(immap + MPC83XX_SCCR_OFFS, sccr);
81
82 /* Configure Pin */
83 sicrl = in_be32(immap + MPC83XX_SICRL_OFFS);
84 /* set port0 only */
85 if (port0_is_dr)
86 sicrl |= MPC83XX_SICRL_USB0;
87 else
88 sicrl &= ~(MPC83XX_SICRL_USB0);
89 out_be32(immap + MPC83XX_SICRL_OFFS, sicrl);
90
91 iounmap(immap);
92 47
48 mpc834x_usb_cfg();
93 /* Map BCSR area */ 49 /* Map BCSR area */
94 np = of_find_node_by_name(NULL, "bcsr"); 50 np = of_find_node_by_name(NULL, "bcsr");
95 if (np != 0) { 51 if (np) {
96 struct resource res; 52 struct resource res;
97 53
98 of_address_to_resource(np, 0, &res); 54 of_address_to_resource(np, 0, &res);
@@ -129,12 +85,12 @@ static void __init mpc834x_mds_setup_arch(void)
129 85
130#ifdef CONFIG_PCI 86#ifdef CONFIG_PCI
131 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 87 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
132 add_bridge(np); 88 mpc83xx_add_bridge(np);
133 89
134 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 90 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
135#endif 91#endif
136 92
137 mpc834x_usb_cfg(); 93 mpc834xemds_usb_cfg();
138} 94}
139 95
140static void __init mpc834x_mds_init_IRQ(void) 96static void __init mpc834x_mds_init_IRQ(void)
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c
index bceeff8bbfd2..0e615fd65c1f 100644
--- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
@@ -55,11 +55,6 @@
55#define DBG(fmt...) 55#define DBG(fmt...)
56#endif 56#endif
57 57
58#ifndef CONFIG_PCI
59unsigned long isa_io_base = 0;
60unsigned long isa_mem_base = 0;
61#endif
62
63static u8 *bcsr_regs = NULL; 58static u8 *bcsr_regs = NULL;
64 59
65/* ************************************************************************ 60/* ************************************************************************
@@ -86,7 +81,7 @@ static void __init mpc836x_mds_setup_arch(void)
86 81
87#ifdef CONFIG_PCI 82#ifdef CONFIG_PCI
88 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 83 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
89 add_bridge(np); 84 mpc83xx_add_bridge(np);
90 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 85 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
91#endif 86#endif
92 87
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index 9cd03b59c8f4..589ee55730f3 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -3,9 +3,11 @@
3 3
4#include <linux/init.h> 4#include <linux/init.h>
5#include <linux/device.h> 5#include <linux/device.h>
6#include <asm/pci-bridge.h>
6 7
7/* System Clock Control Register */ 8/* System Clock Control Register */
8#define MPC83XX_SCCR_OFFS 0xA08 9#define MPC83XX_SCCR_OFFS 0xA08
10#define MPC83XX_SCCR_USB_MASK 0x00f00000
9#define MPC83XX_SCCR_USB_MPHCM_11 0x00c00000 11#define MPC83XX_SCCR_USB_MPHCM_11 0x00c00000
10#define MPC83XX_SCCR_USB_MPHCM_01 0x00400000 12#define MPC83XX_SCCR_USB_MPHCM_01 0x00400000
11#define MPC83XX_SCCR_USB_MPHCM_10 0x00800000 13#define MPC83XX_SCCR_USB_MPHCM_10 0x00800000
@@ -15,21 +17,43 @@
15 17
16/* system i/o configuration register low */ 18/* system i/o configuration register low */
17#define MPC83XX_SICRL_OFFS 0x114 19#define MPC83XX_SICRL_OFFS 0x114
18#define MPC83XX_SICRL_USB0 0x40000000 20#define MPC834X_SICRL_USB_MASK 0x60000000
19#define MPC83XX_SICRL_USB1 0x20000000 21#define MPC834X_SICRL_USB0 0x40000000
22#define MPC834X_SICRL_USB1 0x20000000
23#define MPC831X_SICRL_USB_MASK 0x00000c00
24#define MPC831X_SICRL_USB_ULPI 0x00000800
20 25
21/* system i/o configuration register high */ 26/* system i/o configuration register high */
22#define MPC83XX_SICRH_OFFS 0x118 27#define MPC83XX_SICRH_OFFS 0x118
23#define MPC83XX_SICRH_USB_UTMI 0x00020000 28#define MPC834X_SICRH_USB_UTMI 0x00020000
29#define MPC831X_SICRH_USB_MASK 0x000000e0
30#define MPC831X_SICRH_USB_ULPI 0x000000a0
31
32/* USB Control Register */
33#define FSL_USB2_CONTROL_OFFS 0x500
34#define CONTROL_UTMI_PHY_EN 0x00000200
35#define CONTROL_REFSEL_48MHZ 0x00000080
36#define CONTROL_PHY_CLK_SEL_ULPI 0x00000400
37#define CONTROL_OTG_PORT 0x00000020
38
39/* USB PORTSC Registers */
40#define FSL_USB2_PORTSC1_OFFS 0x184
41#define FSL_USB2_PORTSC2_OFFS 0x188
42#define PORTSCX_PTW_16BIT 0x10000000
43#define PORTSCX_PTS_UTMI 0x00000000
44#define PORTSCX_PTS_ULPI 0x80000000
24 45
25/* 46/*
26 * Declaration for the various functions exported by the 47 * Declaration for the various functions exported by the
27 * mpc83xx_* files. Mostly for use by mpc83xx_setup 48 * mpc83xx_* files. Mostly for use by mpc83xx_setup
28 */ 49 */
29 50
30extern int add_bridge(struct device_node *dev); 51extern int mpc83xx_add_bridge(struct device_node *dev);
31extern int mpc83xx_exclude_device(u_char bus, u_char devfn); 52extern int mpc83xx_exclude_device(struct pci_controller *hose,
53 u_char bus, u_char devfn);
32extern void mpc83xx_restart(char *cmd); 54extern void mpc83xx_restart(char *cmd);
33extern long mpc83xx_time_init(void); 55extern long mpc83xx_time_init(void);
56extern int mpc834x_usb_cfg(void);
57extern int mpc831x_usb_cfg(void);
34 58
35#endif /* __MPC83XX_H__ */ 59#endif /* __MPC83XX_H__ */
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c
index 774457d09e94..c0e2b89154e5 100644
--- a/arch/powerpc/platforms/83xx/pci.c
+++ b/arch/powerpc/platforms/83xx/pci.c
@@ -33,19 +33,14 @@
33#define DBG(x...) 33#define DBG(x...)
34#endif 34#endif
35 35
36int mpc83xx_pci2_busno; 36int mpc83xx_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
37
38int mpc83xx_exclude_device(u_char bus, u_char devfn)
39{ 37{
40 if (bus == 0 && PCI_SLOT(devfn) == 0) 38 if ((bus == hose->first_busno) && PCI_SLOT(devfn) == 0)
41 return PCIBIOS_DEVICE_NOT_FOUND; 39 return PCIBIOS_DEVICE_NOT_FOUND;
42 if (mpc83xx_pci2_busno)
43 if (bus == (mpc83xx_pci2_busno) && PCI_SLOT(devfn) == 0)
44 return PCIBIOS_DEVICE_NOT_FOUND;
45 return PCIBIOS_SUCCESSFUL; 40 return PCIBIOS_SUCCESSFUL;
46} 41}
47 42
48int __init add_bridge(struct device_node *dev) 43int __init mpc83xx_add_bridge(struct device_node *dev)
49{ 44{
50 int len; 45 int len;
51 struct pci_controller *hose; 46 struct pci_controller *hose;
@@ -66,11 +61,10 @@ int __init add_bridge(struct device_node *dev)
66 " bus 0\n", dev->full_name); 61 " bus 0\n", dev->full_name);
67 } 62 }
68 63
69 hose = pcibios_alloc_controller(); 64 pci_assign_all_buses = 1;
65 hose = pcibios_alloc_controller(dev);
70 if (!hose) 66 if (!hose)
71 return -ENOMEM; 67 return -ENOMEM;
72 hose->arch_data = dev;
73 hose->set_cfg_type = 1;
74 68
75 hose->first_busno = bus_range ? bus_range[0] : 0; 69 hose->first_busno = bus_range ? bus_range[0] : 0;
76 hose->last_busno = bus_range ? bus_range[1] : 0xff; 70 hose->last_busno = bus_range ? bus_range[1] : 0xff;
@@ -86,8 +80,6 @@ int __init add_bridge(struct device_node *dev)
86 if ((rsrc.start & 0xfffff) == 0x8600) { 80 if ((rsrc.start & 0xfffff) == 0x8600) {
87 setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); 81 setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384);
88 primary = 0; 82 primary = 0;
89 hose->bus_offset = hose->first_busno;
90 mpc83xx_pci2_busno = hose->first_busno;
91 } 83 }
92 84
93 printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. " 85 printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. "
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
new file mode 100644
index 000000000000..e7fdf013cd39
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -0,0 +1,181 @@
1/*
2 * Freescale 83xx USB SOC setup code
3 *
4 * Copyright (C) 2007 Freescale Semiconductor, Inc.
5 * Author: Li Yang
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
14#include <linux/stddef.h>
15#include <linux/kernel.h>
16#include <linux/errno.h>
17
18#include <asm/io.h>
19#include <asm/prom.h>
20#include <sysdev/fsl_soc.h>
21
22#include "mpc83xx.h"
23
24
25#ifdef CONFIG_MPC834x
26int mpc834x_usb_cfg(void)
27{
28 unsigned long sccr, sicrl, sicrh;
29 void __iomem *immap;
30 struct device_node *np = NULL;
31 int port0_is_dr = 0, port1_is_dr = 0;
32 const void *prop, *dr_mode;
33
34 immap = ioremap(get_immrbase(), 0x1000);
35 if (!immap)
36 return -ENOMEM;
37
38 /* Read registers */
39 /* Note: DR and MPH must use the same clock setting in SCCR */
40 sccr = in_be32(immap + MPC83XX_SCCR_OFFS) & ~MPC83XX_SCCR_USB_MASK;
41 sicrl = in_be32(immap + MPC83XX_SICRL_OFFS) & ~MPC834X_SICRL_USB_MASK;
42 sicrh = in_be32(immap + MPC83XX_SICRH_OFFS) & ~MPC834X_SICRH_USB_UTMI;
43
44 np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
45 if (np) {
46 sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
47
48 prop = of_get_property(np, "phy_type", NULL);
49 if (prop && (!strcmp(prop, "utmi") ||
50 !strcmp(prop, "utmi_wide"))) {
51 sicrl |= MPC834X_SICRL_USB0 | MPC834X_SICRL_USB1;
52 sicrh |= MPC834X_SICRH_USB_UTMI;
53 port1_is_dr = 1;
54 } else if (prop && !strcmp(prop, "serial")) {
55 dr_mode = of_get_property(np, "dr_mode", NULL);
56 if (dr_mode && !strcmp(dr_mode, "otg")) {
57 sicrl |= MPC834X_SICRL_USB0 | MPC834X_SICRL_USB1;
58 port1_is_dr = 1;
59 } else {
60 sicrl |= MPC834X_SICRL_USB0;
61 }
62 } else if (prop && !strcmp(prop, "ulpi")) {
63 sicrl |= MPC834X_SICRL_USB0;
64 } else {
65 printk(KERN_WARNING "834x USB PHY type not supported\n");
66 }
67 port0_is_dr = 1;
68 of_node_put(np);
69 }
70 np = of_find_compatible_node(NULL, "usb", "fsl-usb2-mph");
71 if (np) {
72 sccr |= MPC83XX_SCCR_USB_MPHCM_11; /* 1:3 */
73
74 prop = of_get_property(np, "port0", NULL);
75 if (prop) {
76 if (port0_is_dr)
77 printk(KERN_WARNING
78 "834x USB port0 can't be used by both DR and MPH!\n");
79 sicrl |= MPC834X_SICRL_USB0;
80 }
81 prop = of_get_property(np, "port1", NULL);
82 if (prop) {
83 if (port1_is_dr)
84 printk(KERN_WARNING
85 "834x USB port1 can't be used by both DR and MPH!\n");
86 sicrl |= MPC834X_SICRL_USB1;
87 }
88 of_node_put(np);
89 }
90
91 /* Write back */
92 out_be32(immap + MPC83XX_SCCR_OFFS, sccr);
93 out_be32(immap + MPC83XX_SICRL_OFFS, sicrl);
94 out_be32(immap + MPC83XX_SICRH_OFFS, sicrh);
95
96 iounmap(immap);
97 return 0;
98}
99#endif /* CONFIG_MPC834x */
100
101#ifdef CONFIG_PPC_MPC831x
102int mpc831x_usb_cfg(void)
103{
104 u32 temp;
105 void __iomem *immap, *usb_regs;
106 struct device_node *np = NULL;
107 const void *prop;
108 struct resource res;
109 int ret = 0;
110#ifdef CONFIG_USB_OTG
111 const void *dr_mode;
112#endif
113
114 np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
115 if (!np)
116 return -ENODEV;
117 prop = of_get_property(np, "phy_type", NULL);
118
119 /* Map IMMR space for pin and clock settings */
120 immap = ioremap(get_immrbase(), 0x1000);
121 if (!immap) {
122 of_node_put(np);
123 return -ENOMEM;
124 }
125
126 /* Configure clock */
127 temp = in_be32(immap + MPC83XX_SCCR_OFFS);
128 temp &= ~MPC83XX_SCCR_USB_MASK;
129 temp |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
130 out_be32(immap + MPC83XX_SCCR_OFFS, temp);
131
132 /* Configure pin mux for ULPI. There is no pin mux for UTMI */
133 if (!strcmp(prop, "ulpi")) {
134 temp = in_be32(immap + MPC83XX_SICRL_OFFS);
135 temp &= ~MPC831X_SICRL_USB_MASK;
136 temp |= MPC831X_SICRL_USB_ULPI;
137 out_be32(immap + MPC83XX_SICRL_OFFS, temp);
138
139 temp = in_be32(immap + MPC83XX_SICRH_OFFS);
140 temp &= ~MPC831X_SICRH_USB_MASK;
141 temp |= MPC831X_SICRH_USB_ULPI;
142 out_be32(immap + MPC83XX_SICRH_OFFS, temp);
143 }
144
145 iounmap(immap);
146
147 /* Map USB SOC space */
148 ret = of_address_to_resource(np, 0, &res);
149 if (ret) {
150 of_node_put(np);
151 return ret;
152 }
153 usb_regs = ioremap(res.start, res.end - res.start + 1);
154
155 /* Using on-chip PHY */
156 if (!strcmp(prop, "utmi_wide") ||
157 !strcmp(prop, "utmi")) {
158 /* Set UTMI_PHY_EN, REFSEL to 48MHZ */
159 out_be32(usb_regs + FSL_USB2_CONTROL_OFFS,
160 CONTROL_UTMI_PHY_EN | CONTROL_REFSEL_48MHZ);
161 /* Using external UPLI PHY */
162 } else if (!strcmp(prop, "ulpi")) {
163 /* Set PHY_CLK_SEL to ULPI */
164 temp = CONTROL_PHY_CLK_SEL_ULPI;
165#ifdef CONFIG_USB_OTG
166 /* Set OTG_PORT */
167 dr_mode = of_get_property(np, "dr_mode", NULL);
168 if (dr_mode && !strcmp(dr_mode, "otg"))
169 temp |= CONTROL_OTG_PORT;
170#endif /* CONFIG_USB_OTG */
171 out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, temp);
172 } else {
173 printk(KERN_WARNING "831x USB PHY type not supported\n");
174 ret = -EINVAL;
175 }
176
177 iounmap(usb_regs);
178 of_node_put(np);
179 return ret;
180}
181#endif /* CONFIG_PPC_MPC831x */
diff --git a/arch/powerpc/platforms/85xx/misc.c b/arch/powerpc/platforms/85xx/misc.c
index 3e62fcb04c1c..4fe376e9c3b6 100644
--- a/arch/powerpc/platforms/85xx/misc.c
+++ b/arch/powerpc/platforms/85xx/misc.c
@@ -13,11 +13,43 @@
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <asm/irq.h> 15#include <asm/irq.h>
16#include <asm/io.h>
17#include <asm/prom.h>
18#include <sysdev/fsl_soc.h>
19
20static __be32 __iomem *rstcr;
16 21
17extern void abort(void); 22extern void abort(void);
18 23
24static int __init mpc85xx_rstcr(void)
25{
26 struct device_node *np;
27 np = of_find_node_by_name(NULL, "global-utilities");
28 if ((np && of_get_property(np, "fsl,has-rstcr", NULL))) {
29 const u32 *prop = of_get_property(np, "reg", NULL);
30 if (prop) {
31 /* map reset control register
32 * 0xE00B0 is offset of reset control register
33 */
34 rstcr = ioremap(get_immrbase() + *prop + 0xB0, 0xff);
35 if (!rstcr)
36 printk (KERN_EMERG "Error: reset control "
37 "register not mapped!\n");
38 }
39 } else
40 printk (KERN_INFO "rstcr compatible register does not exist!\n");
41 if (np)
42 of_node_put(np);
43 return 0;
44}
45
46arch_initcall(mpc85xx_rstcr);
47
19void mpc85xx_restart(char *cmd) 48void mpc85xx_restart(char *cmd)
20{ 49{
21 local_irq_disable(); 50 local_irq_disable();
51 if (rstcr)
52 /* set reset control register */
53 out_be32(rstcr, 0x2); /* HRESET_REQ */
22 abort(); 54 abort();
23} 55}
diff --git a/arch/powerpc/platforms/85xx/mpc8544_ds.c b/arch/powerpc/platforms/85xx/mpc8544_ds.c
index bec84ffe708e..6fb90aab879f 100644
--- a/arch/powerpc/platforms/85xx/mpc8544_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8544_ds.c
@@ -61,24 +61,11 @@ void __init mpc8544_ds_pic_init(void)
61 return; 61 return;
62 } 62 }
63 63
64 /* Alloc mpic structure and per isu has 16 INT entries. */
65 mpic = mpic_alloc(np, r.start, 64 mpic = mpic_alloc(np, r.start,
66 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 65 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
67 16, 64, " OPENPIC "); 66 0, 256, " OpenPIC ");
68 BUG_ON(mpic == NULL); 67 BUG_ON(mpic == NULL);
69 68
70 /*
71 * 48 Internal Interrupts
72 */
73 mpic_assign_isu(mpic, 0, r.start + 0x10200);
74 mpic_assign_isu(mpic, 1, r.start + 0x10400);
75 mpic_assign_isu(mpic, 2, r.start + 0x10600);
76
77 /*
78 * 16 External interrupts
79 */
80 mpic_assign_isu(mpic, 3, r.start + 0x10000);
81
82 mpic_init(mpic); 69 mpic_init(mpic);
83 70
84#ifdef CONFIG_PPC_I8259 71#ifdef CONFIG_PPC_I8259
diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms/85xx/mpc85xx.h
index 83415db33378..7286ffac2c1d 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx.h
+++ b/arch/powerpc/platforms/85xx/mpc85xx.h
@@ -15,4 +15,4 @@
15 */ 15 */
16 16
17extern void mpc85xx_restart(char *); 17extern void mpc85xx_restart(char *);
18extern int add_bridge(struct device_node *dev); 18extern int mpc85xx_add_bridge(struct device_node *dev);
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 5d27621f0927..7235f702394c 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -38,13 +38,9 @@
38#include <asm/fs_pd.h> 38#include <asm/fs_pd.h>
39#endif 39#endif
40 40
41#ifndef CONFIG_PCI
42unsigned long isa_io_base = 0;
43unsigned long isa_mem_base = 0;
44#endif
45
46#ifdef CONFIG_PCI 41#ifdef CONFIG_PCI
47static int mpc85xx_exclude_device(u_char bus, u_char devfn) 42static int mpc85xx_exclude_device(struct pci_controller *hose,
43 u_char bus, u_char devfn)
48{ 44{
49 if (bus == 0 && PCI_SLOT(devfn) == 0) 45 if (bus == 0 && PCI_SLOT(devfn) == 0)
50 return PCIBIOS_DEVICE_NOT_FOUND; 46 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -91,30 +87,10 @@ static void __init mpc85xx_ads_pic_init(void)
91 87
92 mpic = mpic_alloc(np, r.start, 88 mpic = mpic_alloc(np, r.start,
93 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 89 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
94 4, 0, " OpenPIC "); 90 0, 256, " OpenPIC ");
95 BUG_ON(mpic == NULL); 91 BUG_ON(mpic == NULL);
96 of_node_put(np); 92 of_node_put(np);
97 93
98 mpic_assign_isu(mpic, 0, r.start + 0x10200);
99 mpic_assign_isu(mpic, 1, r.start + 0x10280);
100 mpic_assign_isu(mpic, 2, r.start + 0x10300);
101 mpic_assign_isu(mpic, 3, r.start + 0x10380);
102 mpic_assign_isu(mpic, 4, r.start + 0x10400);
103 mpic_assign_isu(mpic, 5, r.start + 0x10480);
104 mpic_assign_isu(mpic, 6, r.start + 0x10500);
105 mpic_assign_isu(mpic, 7, r.start + 0x10580);
106
107 /* Unused on this platform (leave room for 8548) */
108 mpic_assign_isu(mpic, 8, r.start + 0x10600);
109 mpic_assign_isu(mpic, 9, r.start + 0x10680);
110 mpic_assign_isu(mpic, 10, r.start + 0x10700);
111 mpic_assign_isu(mpic, 11, r.start + 0x10780);
112
113 /* External Interrupts */
114 mpic_assign_isu(mpic, 12, r.start + 0x10000);
115 mpic_assign_isu(mpic, 13, r.start + 0x10080);
116 mpic_assign_isu(mpic, 14, r.start + 0x10100);
117
118 mpic_init(mpic); 94 mpic_init(mpic);
119 95
120#ifdef CONFIG_CPM2 96#ifdef CONFIG_CPM2
@@ -241,7 +217,7 @@ static void __init mpc85xx_ads_setup_arch(void)
241 217
242#ifdef CONFIG_PCI 218#ifdef CONFIG_PCI
243 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 219 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
244 add_bridge(np); 220 mpc85xx_add_bridge(np);
245 ppc_md.pci_exclude_device = mpc85xx_exclude_device; 221 ppc_md.pci_exclude_device = mpc85xx_exclude_device;
246#endif 222#endif
247} 223}
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 1490eb3ce0d3..50c8d6458362 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -47,11 +47,6 @@
47#include <sysdev/fsl_soc.h> 47#include <sysdev/fsl_soc.h>
48#include "mpc85xx.h" 48#include "mpc85xx.h"
49 49
50#ifndef CONFIG_PCI
51unsigned long isa_io_base = 0;
52unsigned long isa_mem_base = 0;
53#endif
54
55static int cds_pci_slot = 2; 50static int cds_pci_slot = 2;
56static volatile u8 *cadmus; 51static volatile u8 *cadmus;
57 52
@@ -60,15 +55,11 @@ static volatile u8 *cadmus;
60#define ARCADIA_HOST_BRIDGE_IDSEL 17 55#define ARCADIA_HOST_BRIDGE_IDSEL 17
61#define ARCADIA_2ND_BRIDGE_IDSEL 3 56#define ARCADIA_2ND_BRIDGE_IDSEL 3
62 57
63extern int mpc85xx_pci2_busno; 58static int mpc85xx_exclude_device(struct pci_controller *hose,
64 59 u_char bus, u_char devfn)
65static int mpc85xx_exclude_device(u_char bus, u_char devfn)
66{ 60{
67 if (bus == 0 && PCI_SLOT(devfn) == 0) 61 if ((bus == hose->first_busno) && PCI_SLOT(devfn) == 0)
68 return PCIBIOS_DEVICE_NOT_FOUND; 62 return PCIBIOS_DEVICE_NOT_FOUND;
69 if (mpc85xx_pci2_busno)
70 if (bus == (mpc85xx_pci2_busno) && PCI_SLOT(devfn) == 0)
71 return PCIBIOS_DEVICE_NOT_FOUND;
72 /* We explicitly do not go past the Tundra 320 Bridge */ 63 /* We explicitly do not go past the Tundra 320 Bridge */
73 if ((bus == 1) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL)) 64 if ((bus == 1) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL))
74 return PCIBIOS_DEVICE_NOT_FOUND; 65 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -78,52 +69,44 @@ static int mpc85xx_exclude_device(u_char bus, u_char devfn)
78 return PCIBIOS_SUCCESSFUL; 69 return PCIBIOS_SUCCESSFUL;
79} 70}
80 71
81static void __init mpc85xx_cds_pcibios_fixup(void) 72static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev)
82{ 73{
83 struct pci_dev *dev; 74 u_char c;
84 u_char c; 75 if (dev->vendor == PCI_VENDOR_ID_VIA) {
85 76 switch (dev->device) {
86 if ((dev = pci_get_device(PCI_VENDOR_ID_VIA, 77 case PCI_DEVICE_ID_VIA_82C586_1:
87 PCI_DEVICE_ID_VIA_82C586_1, NULL))) { 78 /*
79 * U-Boot does not set the enable bits
80 * for the IDE device. Force them on here.
81 */
82 pci_read_config_byte(dev, 0x40, &c);
83 c |= 0x03; /* IDE: Chip Enable Bits */
84 pci_write_config_byte(dev, 0x40, c);
85
86 /*
87 * Since only primary interface works, force the
88 * IDE function to standard primary IDE interrupt
89 * w/ 8259 offset
90 */
91 dev->irq = 14;
92 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
93 break;
88 /* 94 /*
89 * U-Boot does not set the enable bits 95 * Force legacy USB interrupt routing
90 * for the IDE device. Force them on here.
91 */ 96 */
92 pci_read_config_byte(dev, 0x40, &c); 97 case PCI_DEVICE_ID_VIA_82C586_2:
93 c |= 0x03; /* IDE: Chip Enable Bits */ 98 /* There are two USB controllers.
94 pci_write_config_byte(dev, 0x40, c); 99 * Identify them by functon number
95
96 /*
97 * Since only primary interface works, force the
98 * IDE function to standard primary IDE interrupt
99 * w/ 8259 offset
100 */ 100 */
101 dev->irq = 14; 101 if (PCI_FUNC(dev->devfn))
102 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); 102 dev->irq = 11;
103 pci_dev_put(dev); 103 else
104 } 104 dev->irq = 10;
105 105 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
106 /* 106 default:
107 * Force legacy USB interrupt routing 107 break;
108 */ 108 }
109 if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
110 PCI_DEVICE_ID_VIA_82C586_2, NULL))) {
111 dev->irq = 10;
112 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 10);
113 pci_dev_put(dev);
114 }
115
116 if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
117 PCI_DEVICE_ID_VIA_82C586_2, dev))) {
118 dev->irq = 11;
119 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 11);
120 pci_dev_put(dev);
121 } 109 }
122
123 /* Now map all the PCI irqs */
124 dev = NULL;
125 for_each_pci_dev(dev)
126 pci_read_irq_line(dev);
127} 110}
128 111
129#ifdef CONFIG_PPC_I8259 112#ifdef CONFIG_PPC_I8259
@@ -165,33 +148,12 @@ static void __init mpc85xx_cds_pic_init(void)
165 148
166 mpic = mpic_alloc(np, r.start, 149 mpic = mpic_alloc(np, r.start,
167 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 150 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
168 4, 0, " OpenPIC "); 151 0, 256, " OpenPIC ");
169 BUG_ON(mpic == NULL); 152 BUG_ON(mpic == NULL);
170 153
171 /* Return the mpic node */ 154 /* Return the mpic node */
172 of_node_put(np); 155 of_node_put(np);
173 156
174 mpic_assign_isu(mpic, 0, r.start + 0x10200);
175 mpic_assign_isu(mpic, 1, r.start + 0x10280);
176 mpic_assign_isu(mpic, 2, r.start + 0x10300);
177 mpic_assign_isu(mpic, 3, r.start + 0x10380);
178 mpic_assign_isu(mpic, 4, r.start + 0x10400);
179 mpic_assign_isu(mpic, 5, r.start + 0x10480);
180 mpic_assign_isu(mpic, 6, r.start + 0x10500);
181 mpic_assign_isu(mpic, 7, r.start + 0x10580);
182
183 /* Used only for 8548 so far, but no harm in
184 * allocating them for everyone */
185 mpic_assign_isu(mpic, 8, r.start + 0x10600);
186 mpic_assign_isu(mpic, 9, r.start + 0x10680);
187 mpic_assign_isu(mpic, 10, r.start + 0x10700);
188 mpic_assign_isu(mpic, 11, r.start + 0x10780);
189
190 /* External Interrupts */
191 mpic_assign_isu(mpic, 12, r.start + 0x10000);
192 mpic_assign_isu(mpic, 13, r.start + 0x10080);
193 mpic_assign_isu(mpic, 14, r.start + 0x10100);
194
195 mpic_init(mpic); 157 mpic_init(mpic);
196 158
197#ifdef CONFIG_PPC_I8259 159#ifdef CONFIG_PPC_I8259
@@ -257,9 +219,9 @@ static void __init mpc85xx_cds_setup_arch(void)
257 219
258#ifdef CONFIG_PCI 220#ifdef CONFIG_PCI
259 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 221 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
260 add_bridge(np); 222 mpc85xx_add_bridge(np);
261 223
262 ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup; 224 ppc_md.pci_irq_fixup = mpc85xx_cds_pci_irq_fixup;
263 ppc_md.pci_exclude_device = mpc85xx_exclude_device; 225 ppc_md.pci_exclude_device = mpc85xx_exclude_device;
264#endif 226#endif
265} 227}
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index e3dddbfe66ff..004b80bd0b84 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -59,11 +59,6 @@
59#define DBG(fmt...) 59#define DBG(fmt...)
60#endif 60#endif
61 61
62#ifndef CONFIG_PCI
63unsigned long isa_io_base = 0;
64unsigned long isa_mem_base = 0;
65#endif
66
67/* ************************************************************************ 62/* ************************************************************************
68 * 63 *
69 * Setup the architecture 64 * Setup the architecture
@@ -100,7 +95,7 @@ static void __init mpc85xx_mds_setup_arch(void)
100 95
101#ifdef CONFIG_PCI 96#ifdef CONFIG_PCI
102 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) { 97 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
103 add_bridge(np); 98 mpc85xx_add_bridge(np);
104 } 99 }
105 of_node_put(np); 100 of_node_put(np);
106#endif 101#endif
@@ -181,29 +176,10 @@ static void __init mpc85xx_mds_pic_init(void)
181 176
182 mpic = mpic_alloc(np, r.start, 177 mpic = mpic_alloc(np, r.start,
183 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 178 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
184 4, 0, " OpenPIC "); 179 0, 256, " OpenPIC ");
185 BUG_ON(mpic == NULL); 180 BUG_ON(mpic == NULL);
186 of_node_put(np); 181 of_node_put(np);
187 182
188 /* Internal Interrupts */
189 mpic_assign_isu(mpic, 0, r.start + 0x10200);
190 mpic_assign_isu(mpic, 1, r.start + 0x10280);
191 mpic_assign_isu(mpic, 2, r.start + 0x10300);
192 mpic_assign_isu(mpic, 3, r.start + 0x10380);
193 mpic_assign_isu(mpic, 4, r.start + 0x10400);
194 mpic_assign_isu(mpic, 5, r.start + 0x10480);
195 mpic_assign_isu(mpic, 6, r.start + 0x10500);
196 mpic_assign_isu(mpic, 7, r.start + 0x10580);
197 mpic_assign_isu(mpic, 8, r.start + 0x10600);
198 mpic_assign_isu(mpic, 9, r.start + 0x10680);
199 mpic_assign_isu(mpic, 10, r.start + 0x10700);
200 mpic_assign_isu(mpic, 11, r.start + 0x10780);
201
202 /* External Interrupts */
203 mpic_assign_isu(mpic, 12, r.start + 0x10000);
204 mpic_assign_isu(mpic, 13, r.start + 0x10080);
205 mpic_assign_isu(mpic, 14, r.start + 0x10100);
206
207 mpic_init(mpic); 183 mpic_init(mpic);
208 184
209#ifdef CONFIG_QUICC_ENGINE 185#ifdef CONFIG_QUICC_ENGINE
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c
index 48f17e23d771..8118417b7364 100644
--- a/arch/powerpc/platforms/85xx/pci.c
+++ b/arch/powerpc/platforms/85xx/pci.c
@@ -33,10 +33,8 @@
33#define DBG(x...) 33#define DBG(x...)
34#endif 34#endif
35 35
36int mpc85xx_pci2_busno = 0;
37
38#ifdef CONFIG_PCI 36#ifdef CONFIG_PCI
39int __init add_bridge(struct device_node *dev) 37int __init mpc85xx_add_bridge(struct device_node *dev)
40{ 38{
41 int len; 39 int len;
42 struct pci_controller *hose; 40 struct pci_controller *hose;
@@ -57,11 +55,10 @@ int __init add_bridge(struct device_node *dev)
57 " bus 0\n", dev->full_name); 55 " bus 0\n", dev->full_name);
58 } 56 }
59 57
60 hose = pcibios_alloc_controller(); 58 pci_assign_all_buses = 1;
59 hose = pcibios_alloc_controller(dev);
61 if (!hose) 60 if (!hose)
62 return -ENOMEM; 61 return -ENOMEM;
63 hose->arch_data = dev;
64 hose->set_cfg_type = 1;
65 62
66 hose->first_busno = bus_range ? bus_range[0] : 0; 63 hose->first_busno = bus_range ? bus_range[0] : 0;
67 hose->last_busno = bus_range ? bus_range[1] : 0xff; 64 hose->last_busno = bus_range ? bus_range[1] : 0xff;
@@ -74,8 +71,6 @@ int __init add_bridge(struct device_node *dev)
74 if ((rsrc.start & 0xfffff) == 0x9000) { 71 if ((rsrc.start & 0xfffff) == 0x9000) {
75 setup_indirect_pci(hose, immr + 0x9000, immr + 0x9004); 72 setup_indirect_pci(hose, immr + 0x9000, immr + 0x9004);
76 primary = 0; 73 primary = 0;
77 hose->bus_offset = hose->first_busno;
78 mpc85xx_pci2_busno = hose->first_busno;
79 } 74 }
80 75
81 printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%016llx. " 76 printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%016llx. "
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index d1bcff500464..0faebfdc1596 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -1,5 +1,5 @@
1choice 1choice
2 prompt "Machine Type" 2 prompt "86xx Board Type"
3 depends on PPC_86xx 3 depends on PPC_86xx
4 default MPC8641_HPCN 4 default MPC8641_HPCN
5 5
diff --git a/arch/powerpc/platforms/86xx/mpc86xx.h b/arch/powerpc/platforms/86xx/mpc86xx.h
index 2834462590b8..23f7ed2a7f88 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx.h
+++ b/arch/powerpc/platforms/86xx/mpc86xx.h
@@ -15,15 +15,10 @@
15 * mpc86xx_* files. Mostly for use by mpc86xx_setup(). 15 * mpc86xx_* files. Mostly for use by mpc86xx_setup().
16 */ 16 */
17 17
18extern int add_bridge(struct device_node *dev); 18extern int mpc86xx_add_bridge(struct device_node *dev);
19 19
20extern int mpc86xx_exclude_device(u_char bus, u_char devfn); 20extern int mpc86xx_exclude_device(struct pci_controller *hose,
21 21 u_char bus, u_char devfn);
22extern void setup_indirect_pcie(struct pci_controller *hose,
23 u32 cfg_addr, u32 cfg_data);
24extern void setup_indirect_pcie_nomap(struct pci_controller *hose,
25 void __iomem *cfg_addr,
26 void __iomem *cfg_data);
27 22
28extern void __init mpc86xx_smp_init(void); 23extern void __init mpc86xx_smp_init(void);
29 24
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 1051702c8d4f..5b01ec7c13dc 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -44,13 +44,6 @@
44#define DBG(fmt...) do { } while(0) 44#define DBG(fmt...) do { } while(0)
45#endif 45#endif
46 46
47#ifndef CONFIG_PCI
48unsigned long isa_io_base = 0;
49unsigned long isa_mem_base = 0;
50unsigned long pci_dram_offset = 0;
51#endif
52
53
54#ifdef CONFIG_PCI 47#ifdef CONFIG_PCI
55static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc) 48static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
56{ 49{
@@ -81,22 +74,9 @@ mpc86xx_hpcn_init_irq(void)
81 /* Alloc mpic structure and per isu has 16 INT entries. */ 74 /* Alloc mpic structure and per isu has 16 INT entries. */
82 mpic1 = mpic_alloc(np, res.start, 75 mpic1 = mpic_alloc(np, res.start,
83 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 76 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
84 16, NR_IRQS - 4, 77 0, 256, " MPIC ");
85 " MPIC ");
86 BUG_ON(mpic1 == NULL); 78 BUG_ON(mpic1 == NULL);
87 79
88 mpic_assign_isu(mpic1, 0, res.start + 0x10000);
89
90 /* 48 Internal Interrupts */
91 mpic_assign_isu(mpic1, 1, res.start + 0x10200);
92 mpic_assign_isu(mpic1, 2, res.start + 0x10400);
93 mpic_assign_isu(mpic1, 3, res.start + 0x10600);
94
95 /* 16 External interrupts
96 * Moving them from [0 - 15] to [64 - 79]
97 */
98 mpic_assign_isu(mpic1, 4, res.start + 0x10000);
99
100 mpic_init(mpic1); 80 mpic_init(mpic1);
101 81
102#ifdef CONFIG_PCI 82#ifdef CONFIG_PCI
@@ -319,6 +299,7 @@ static void __devinit quirk_uli5229(struct pci_dev *dev)
319{ 299{
320 unsigned short temp; 300 unsigned short temp;
321 pci_write_config_word(dev, 0x04, 0x0405); 301 pci_write_config_word(dev, 0x04, 0x0405);
302 dev->class &= ~0x5;
322 pci_read_config_word(dev, 0x4a, &temp); 303 pci_read_config_word(dev, 0x4a, &temp);
323 temp |= 0x1000; 304 temp |= 0x1000;
324 pci_write_config_word(dev, 0x4a, temp); 305 pci_write_config_word(dev, 0x4a, temp);
@@ -364,9 +345,7 @@ mpc86xx_hpcn_setup_arch(void)
364 345
365#ifdef CONFIG_PCI 346#ifdef CONFIG_PCI
366 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 347 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
367 add_bridge(np); 348 mpc86xx_add_bridge(np);
368
369 ppc_md.pci_exclude_device = mpc86xx_exclude_device;
370#endif 349#endif
371 350
372 printk("MPC86xx HPCN board from Freescale Semiconductor\n"); 351 printk("MPC86xx HPCN board from Freescale Semiconductor\n");
diff --git a/arch/powerpc/platforms/86xx/pci.c b/arch/powerpc/platforms/86xx/pci.c
index 8235c562661f..73cd5b05a84e 100644
--- a/arch/powerpc/platforms/86xx/pci.c
+++ b/arch/powerpc/platforms/86xx/pci.c
@@ -122,7 +122,6 @@ static void __init
122mpc86xx_setup_pcie(struct pci_controller *hose, u32 pcie_offset, u32 pcie_size) 122mpc86xx_setup_pcie(struct pci_controller *hose, u32 pcie_offset, u32 pcie_size)
123{ 123{
124 u16 cmd; 124 u16 cmd;
125 unsigned int temps;
126 125
127 DBG("PCIE host controller register offset 0x%08x, size 0x%08x.\n", 126 DBG("PCIE host controller register offset 0x%08x, size 0x%08x.\n",
128 pcie_offset, pcie_size); 127 pcie_offset, pcie_size);
@@ -133,22 +132,49 @@ mpc86xx_setup_pcie(struct pci_controller *hose, u32 pcie_offset, u32 pcie_size)
133 early_write_config_word(hose, 0, 0, PCI_COMMAND, cmd); 132 early_write_config_word(hose, 0, 0, PCI_COMMAND, cmd);
134 133
135 early_write_config_byte(hose, 0, 0, PCI_LATENCY_TIMER, 0x80); 134 early_write_config_byte(hose, 0, 0, PCI_LATENCY_TIMER, 0x80);
136
137 /* PCIE Bus, Fix the MPC8641D host bridge's location to bus 0xFF. */
138 early_read_config_dword(hose, 0, 0, PCI_PRIMARY_BUS, &temps);
139 temps = (temps & 0xff000000) | (0xff) | (0x0 << 8) | (0xfe << 16);
140 early_write_config_dword(hose, 0, 0, PCI_PRIMARY_BUS, temps);
141} 135}
142 136
143int mpc86xx_exclude_device(u_char bus, u_char devfn) 137static void __devinit quirk_fsl_pcie_transparent(struct pci_dev *dev)
144{ 138{
145 if (bus == 0 && PCI_SLOT(devfn) == 0) 139 struct resource *res;
146 return PCIBIOS_DEVICE_NOT_FOUND; 140 int i, res_idx = PCI_BRIDGE_RESOURCES;
141 struct pci_controller *hose;
147 142
148 return PCIBIOS_SUCCESSFUL; 143 /*
144 * Make the bridge be transparent.
145 */
146 dev->transparent = 1;
147
148 hose = pci_bus_to_host(dev->bus);
149 if (!hose) {
150 printk(KERN_ERR "Can't find hose for bus %d\n",
151 dev->bus->number);
152 return;
153 }
154
155 if (hose->io_resource.flags) {
156 res = &dev->resource[res_idx++];
157 res->start = hose->io_resource.start;
158 res->end = hose->io_resource.end;
159 res->flags = hose->io_resource.flags;
160 }
161
162 for (i = 0; i < 3; i++) {
163 res = &dev->resource[res_idx + i];
164 res->start = hose->mem_resources[i].start;
165 res->end = hose->mem_resources[i].end;
166 res->flags = hose->mem_resources[i].flags;
167 }
149} 168}
150 169
151int __init add_bridge(struct device_node *dev) 170
171DECLARE_PCI_FIXUP_EARLY(0x1957, 0x7010, quirk_fsl_pcie_transparent);
172DECLARE_PCI_FIXUP_EARLY(0x1957, 0x7011, quirk_fsl_pcie_transparent);
173
174#define PCIE_LTSSM 0x404 /* PCIe Link Training and Status */
175#define PCIE_LTSSM_L0 0x16 /* L0 state */
176
177int __init mpc86xx_add_bridge(struct device_node *dev)
152{ 178{
153 int len; 179 int len;
154 struct pci_controller *hose; 180 struct pci_controller *hose;
@@ -156,6 +182,7 @@ int __init add_bridge(struct device_node *dev)
156 const int *bus_range; 182 const int *bus_range;
157 int has_address = 0; 183 int has_address = 0;
158 int primary = 0; 184 int primary = 0;
185 u16 val;
159 186
160 DBG("Adding PCIE host bridge %s\n", dev->full_name); 187 DBG("Adding PCIE host bridge %s\n", dev->full_name);
161 188
@@ -168,17 +195,23 @@ int __init add_bridge(struct device_node *dev)
168 printk(KERN_WARNING "Can't get bus-range for %s, assume" 195 printk(KERN_WARNING "Can't get bus-range for %s, assume"
169 " bus 0\n", dev->full_name); 196 " bus 0\n", dev->full_name);
170 197
171 hose = pcibios_alloc_controller(); 198 pci_assign_all_buses = 1;
199 hose = pcibios_alloc_controller(dev);
172 if (!hose) 200 if (!hose)
173 return -ENOMEM; 201 return -ENOMEM;
174 hose->arch_data = dev;
175 hose->set_cfg_type = 1;
176 202
177 /* last_busno = 0xfe cause by MPC8641 PCIE bug */ 203 hose->indirect_type = PPC_INDIRECT_TYPE_EXT_REG |
204 PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS;
205
178 hose->first_busno = bus_range ? bus_range[0] : 0x0; 206 hose->first_busno = bus_range ? bus_range[0] : 0x0;
179 hose->last_busno = bus_range ? bus_range[1] : 0xfe; 207 hose->last_busno = bus_range ? bus_range[1] : 0xff;
208
209 setup_indirect_pci(hose, rsrc.start, rsrc.start + 0x4);
180 210
181 setup_indirect_pcie(hose, rsrc.start, rsrc.start + 0x4); 211 /* Probe the hose link training status */
212 early_read_config_word(hose, 0, 0, PCIE_LTSSM, &val);
213 if (val < PCIE_LTSSM_L0)
214 return -ENXIO;
182 215
183 /* Setup the PCIE host controller. */ 216 /* Setup the PCIE host controller. */
184 mpc86xx_setup_pcie(hose, rsrc.start, rsrc.end - rsrc.start + 1); 217 mpc86xx_setup_pcie(hose, rsrc.start, rsrc.end - rsrc.start + 1);
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c
index 0901dbada350..f1693550c70c 100644
--- a/arch/powerpc/platforms/8xx/m8xx_setup.c
+++ b/arch/powerpc/platforms/8xx/m8xx_setup.c
@@ -32,6 +32,7 @@
32#include <linux/root_dev.h> 32#include <linux/root_dev.h>
33#include <linux/time.h> 33#include <linux/time.h>
34#include <linux/rtc.h> 34#include <linux/rtc.h>
35#include <linux/fsl_devices.h>
35 36
36#include <asm/mmu.h> 37#include <asm/mmu.h>
37#include <asm/reg.h> 38#include <asm/reg.h>
@@ -49,6 +50,10 @@
49 50
50#include "sysdev/mpc8xx_pic.h" 51#include "sysdev/mpc8xx_pic.h"
51 52
53#ifdef CONFIG_PCMCIA_M8XX
54struct mpc8xx_pcmcia_ops m8xx_pcmcia_ops;
55#endif
56
52void m8xx_calibrate_decr(void); 57void m8xx_calibrate_decr(void);
53extern void m8xx_wdt_handler_install(bd_t *bp); 58extern void m8xx_wdt_handler_install(bd_t *bp);
54extern int cpm_pic_init(void); 59extern int cpm_pic_init(void);
diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
index c36e475d93dc..5a808d611ae3 100644
--- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
@@ -22,6 +22,7 @@
22 22
23#include <linux/fs_enet_pd.h> 23#include <linux/fs_enet_pd.h>
24#include <linux/fs_uart_pd.h> 24#include <linux/fs_uart_pd.h>
25#include <linux/fsl_devices.h>
25#include <linux/mii.h> 26#include <linux/mii.h>
26 27
27#include <asm/delay.h> 28#include <asm/delay.h>
@@ -39,7 +40,7 @@
39#include <asm/prom.h> 40#include <asm/prom.h>
40 41
41extern void cpm_reset(void); 42extern void cpm_reset(void);
42extern void mpc8xx_show_cpuinfo(struct seq_file*); 43extern void mpc8xx_show_cpuinfo(struct seq_file *);
43extern void mpc8xx_restart(char *cmd); 44extern void mpc8xx_restart(char *cmd);
44extern void mpc8xx_calibrate_decr(void); 45extern void mpc8xx_calibrate_decr(void);
45extern int mpc8xx_set_rtc_time(struct rtc_time *tm); 46extern int mpc8xx_set_rtc_time(struct rtc_time *tm);
@@ -47,9 +48,73 @@ extern void mpc8xx_get_rtc_time(struct rtc_time *tm);
47extern void m8xx_pic_init(void); 48extern void m8xx_pic_init(void);
48extern unsigned int mpc8xx_get_irq(void); 49extern unsigned int mpc8xx_get_irq(void);
49 50
50static void init_smc1_uart_ioports(struct fs_uart_platform_info* fpi); 51static void init_smc1_uart_ioports(struct fs_uart_platform_info *fpi);
51static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi); 52static void init_smc2_uart_ioports(struct fs_uart_platform_info *fpi);
52static void init_scc3_ioports(struct fs_platform_info* ptr); 53static void init_scc3_ioports(struct fs_platform_info *ptr);
54
55#ifdef CONFIG_PCMCIA_M8XX
56static void pcmcia_hw_setup(int slot, int enable)
57{
58 unsigned *bcsr_io;
59
60 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
61 if (enable)
62 clrbits32(bcsr_io, BCSR1_PCCEN);
63 else
64 setbits32(bcsr_io, BCSR1_PCCEN);
65
66 iounmap(bcsr_io);
67}
68
69static int pcmcia_set_voltage(int slot, int vcc, int vpp)
70{
71 u32 reg = 0;
72 unsigned *bcsr_io;
73
74 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
75
76 switch (vcc) {
77 case 0:
78 break;
79 case 33:
80 reg |= BCSR1_PCCVCC0;
81 break;
82 case 50:
83 reg |= BCSR1_PCCVCC1;
84 break;
85 default:
86 return 1;
87 }
88
89 switch (vpp) {
90 case 0:
91 break;
92 case 33:
93 case 50:
94 if (vcc == vpp)
95 reg |= BCSR1_PCCVPP1;
96 else
97 return 1;
98 break;
99 case 120:
100 if ((vcc == 33) || (vcc == 50))
101 reg |= BCSR1_PCCVPP0;
102 else
103 return 1;
104 default:
105 return 1;
106 }
107
108 /* first, turn off all power */
109 clrbits32(bcsr_io, 0x00610000);
110
111 /* enable new powersettings */
112 setbits32(bcsr_io, reg);
113
114 iounmap(bcsr_io);
115 return 0;
116}
117#endif
53 118
54void __init mpc885ads_board_setup(void) 119void __init mpc885ads_board_setup(void)
55{ 120{
@@ -62,7 +127,7 @@ void __init mpc885ads_board_setup(void)
62#endif 127#endif
63 128
64 bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); 129 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
65 cp = (cpm8xx_t *)immr_map(im_cpm); 130 cp = (cpm8xx_t *) immr_map(im_cpm);
66 131
67 if (bcsr_io == NULL) { 132 if (bcsr_io == NULL) {
68 printk(KERN_CRIT "Could not remap BCSR\n"); 133 printk(KERN_CRIT "Could not remap BCSR\n");
@@ -75,13 +140,13 @@ void __init mpc885ads_board_setup(void)
75 out_8(&(cp->cp_smc[0].smc_smcm), tmpval8); 140 out_8(&(cp->cp_smc[0].smc_smcm), tmpval8);
76 clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN); /* brg1 */ 141 clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN); /* brg1 */
77#else 142#else
78 setbits32(bcsr_io,BCSR1_RS232EN_1); 143 setbits32(bcsr_io, BCSR1_RS232EN_1);
79 out_be16(&cp->cp_smc[0].smc_smcmr, 0); 144 out_be16(&cp->cp_smc[0].smc_smcmr, 0);
80 out_8(&cp->cp_smc[0].smc_smce, 0); 145 out_8(&cp->cp_smc[0].smc_smce, 0);
81#endif 146#endif
82 147
83#ifdef CONFIG_SERIAL_CPM_SMC2 148#ifdef CONFIG_SERIAL_CPM_SMC2
84 clrbits32(bcsr_io,BCSR1_RS232EN_2); 149 clrbits32(bcsr_io, BCSR1_RS232EN_2);
85 clrbits32(&cp->cp_simode, 0xe0000000 >> 1); 150 clrbits32(&cp->cp_simode, 0xe0000000 >> 1);
86 setbits32(&cp->cp_simode, 0x20000000 >> 1); /* brg2 */ 151 setbits32(&cp->cp_simode, 0x20000000 >> 1); /* brg2 */
87 tmpval8 = in_8(&(cp->cp_smc[1].smc_smcm)) | (SMCM_RX | SMCM_TX); 152 tmpval8 = in_8(&(cp->cp_smc[1].smc_smcm)) | (SMCM_RX | SMCM_TX);
@@ -90,7 +155,7 @@ void __init mpc885ads_board_setup(void)
90 155
91 init_smc2_uart_ioports(0); 156 init_smc2_uart_ioports(0);
92#else 157#else
93 setbits32(bcsr_io,BCSR1_RS232EN_2); 158 setbits32(bcsr_io, BCSR1_RS232EN_2);
94 out_be16(&cp->cp_smc[1].smc_smcmr, 0); 159 out_be16(&cp->cp_smc[1].smc_smcmr, 0);
95 out_8(&cp->cp_smc[1].smc_smce, 0); 160 out_8(&cp->cp_smc[1].smc_smce, 0);
96#endif 161#endif
@@ -99,29 +164,34 @@ void __init mpc885ads_board_setup(void)
99 164
100#ifdef CONFIG_FS_ENET 165#ifdef CONFIG_FS_ENET
101 /* use MDC for MII (common) */ 166 /* use MDC for MII (common) */
102 io_port = (iop8xx_t*)immr_map(im_ioport); 167 io_port = (iop8xx_t *) immr_map(im_ioport);
103 setbits16(&io_port->iop_pdpar, 0x0080); 168 setbits16(&io_port->iop_pdpar, 0x0080);
104 clrbits16(&io_port->iop_pddir, 0x0080); 169 clrbits16(&io_port->iop_pddir, 0x0080);
105 170
106 bcsr_io = ioremap(BCSR5, sizeof(unsigned long)); 171 bcsr_io = ioremap(BCSR5, sizeof(unsigned long));
107 clrbits32(bcsr_io,BCSR5_MII1_EN); 172 clrbits32(bcsr_io, BCSR5_MII1_EN);
108 clrbits32(bcsr_io,BCSR5_MII1_RST); 173 clrbits32(bcsr_io, BCSR5_MII1_RST);
109#ifndef CONFIG_FC_ENET_HAS_SCC 174#ifndef CONFIG_FC_ENET_HAS_SCC
110 clrbits32(bcsr_io,BCSR5_MII2_EN); 175 clrbits32(bcsr_io, BCSR5_MII2_EN);
111 clrbits32(bcsr_io,BCSR5_MII2_RST); 176 clrbits32(bcsr_io, BCSR5_MII2_RST);
112 177
113#endif 178#endif
114 iounmap(bcsr_io); 179 iounmap(bcsr_io);
115 immr_unmap(io_port); 180 immr_unmap(io_port);
116 181
117#endif 182#endif
118}
119 183
184#ifdef CONFIG_PCMCIA_M8XX
185 /*Set up board specific hook-ups */
186 m8xx_pcmcia_ops.hw_ctrl = pcmcia_hw_setup;
187 m8xx_pcmcia_ops.voltage_set = pcmcia_set_voltage;
188#endif
189}
120 190
121static void init_fec1_ioports(struct fs_platform_info* ptr) 191static void init_fec1_ioports(struct fs_platform_info *ptr)
122{ 192{
123 cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm); 193 cpm8xx_t *cp = (cpm8xx_t *) immr_map(im_cpm);
124 iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport); 194 iop8xx_t *io_port = (iop8xx_t *) immr_map(im_ioport);
125 195
126 /* configure FEC1 pins */ 196 /* configure FEC1 pins */
127 setbits16(&io_port->iop_papar, 0xf830); 197 setbits16(&io_port->iop_papar, 0xf830);
@@ -143,11 +213,10 @@ static void init_fec1_ioports(struct fs_platform_info* ptr)
143 immr_unmap(cp); 213 immr_unmap(cp);
144} 214}
145 215
146 216static void init_fec2_ioports(struct fs_platform_info *ptr)
147static void init_fec2_ioports(struct fs_platform_info* ptr)
148{ 217{
149 cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm); 218 cpm8xx_t *cp = (cpm8xx_t *) immr_map(im_cpm);
150 iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport); 219 iop8xx_t *io_port = (iop8xx_t *) immr_map(im_ioport);
151 220
152 /* configure FEC2 pins */ 221 /* configure FEC2 pins */
153 setbits32(&cp->cp_pepar, 0x0003fffc); 222 setbits32(&cp->cp_pepar, 0x0003fffc);
@@ -177,15 +246,15 @@ void init_fec_ioports(struct fs_platform_info *fpi)
177 } 246 }
178} 247}
179 248
180static void init_scc3_ioports(struct fs_platform_info* fpi) 249static void init_scc3_ioports(struct fs_platform_info *fpi)
181{ 250{
182 unsigned *bcsr_io; 251 unsigned *bcsr_io;
183 iop8xx_t *io_port; 252 iop8xx_t *io_port;
184 cpm8xx_t *cp; 253 cpm8xx_t *cp;
185 254
186 bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE); 255 bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE);
187 io_port = (iop8xx_t *)immr_map(im_ioport); 256 io_port = (iop8xx_t *) immr_map(im_ioport);
188 cp = (cpm8xx_t *)immr_map(im_cpm); 257 cp = (cpm8xx_t *) immr_map(im_cpm);
189 258
190 if (bcsr_io == NULL) { 259 if (bcsr_io == NULL) {
191 printk(KERN_CRIT "Could not remap BCSR\n"); 260 printk(KERN_CRIT "Could not remap BCSR\n");
@@ -194,9 +263,9 @@ static void init_scc3_ioports(struct fs_platform_info* fpi)
194 263
195 /* Enable the PHY. 264 /* Enable the PHY.
196 */ 265 */
197 clrbits32(bcsr_io+4, BCSR4_ETH10_RST); 266 clrbits32(bcsr_io + 4, BCSR4_ETH10_RST);
198 udelay(1000); 267 udelay(1000);
199 setbits32(bcsr_io+4, BCSR4_ETH10_RST); 268 setbits32(bcsr_io + 4, BCSR4_ETH10_RST);
200 /* Configure port A pins for Txd and Rxd. 269 /* Configure port A pins for Txd and Rxd.
201 */ 270 */
202 setbits16(&io_port->iop_papar, PA_ENET_RXD | PA_ENET_TXD); 271 setbits16(&io_port->iop_papar, PA_ENET_RXD | PA_ENET_TXD);
@@ -212,8 +281,7 @@ static void init_scc3_ioports(struct fs_platform_info* fpi)
212 */ 281 */
213 setbits32(&cp->cp_pepar, PE_ENET_TCLK | PE_ENET_RCLK); 282 setbits32(&cp->cp_pepar, PE_ENET_TCLK | PE_ENET_RCLK);
214 clrbits32(&cp->cp_pepar, PE_ENET_TENA); 283 clrbits32(&cp->cp_pepar, PE_ENET_TENA);
215 clrbits32(&cp->cp_pedir, 284 clrbits32(&cp->cp_pedir, PE_ENET_TCLK | PE_ENET_RCLK | PE_ENET_TENA);
216 PE_ENET_TCLK | PE_ENET_RCLK | PE_ENET_TENA);
217 clrbits32(&cp->cp_peso, PE_ENET_TCLK | PE_ENET_RCLK); 285 clrbits32(&cp->cp_peso, PE_ENET_TCLK | PE_ENET_RCLK);
218 setbits32(&cp->cp_peso, PE_ENET_TENA); 286 setbits32(&cp->cp_peso, PE_ENET_TENA);
219 287
@@ -237,7 +305,7 @@ static void init_scc3_ioports(struct fs_platform_info* fpi)
237 clrbits32(&cp->cp_pedir, PE_ENET_TENA); 305 clrbits32(&cp->cp_pedir, PE_ENET_TENA);
238 setbits32(&cp->cp_peso, PE_ENET_TENA); 306 setbits32(&cp->cp_peso, PE_ENET_TENA);
239 307
240 setbits32(bcsr_io+4, BCSR1_ETHEN); 308 setbits32(bcsr_io + 4, BCSR1_ETHEN);
241 iounmap(bcsr_io); 309 iounmap(bcsr_io);
242 immr_unmap(io_port); 310 immr_unmap(io_port);
243 immr_unmap(cp); 311 immr_unmap(cp);
@@ -257,50 +325,48 @@ void init_scc_ioports(struct fs_platform_info *fpi)
257 } 325 }
258} 326}
259 327
260 328static void init_smc1_uart_ioports(struct fs_uart_platform_info *ptr)
261
262static void init_smc1_uart_ioports(struct fs_uart_platform_info* ptr)
263{ 329{
264 unsigned *bcsr_io; 330 unsigned *bcsr_io;
265 cpm8xx_t *cp; 331 cpm8xx_t *cp;
266 332
267 cp = (cpm8xx_t *)immr_map(im_cpm); 333 cp = (cpm8xx_t *) immr_map(im_cpm);
268 setbits32(&cp->cp_pepar, 0x000000c0); 334 setbits32(&cp->cp_pepar, 0x000000c0);
269 clrbits32(&cp->cp_pedir, 0x000000c0); 335 clrbits32(&cp->cp_pedir, 0x000000c0);
270 clrbits32(&cp->cp_peso, 0x00000040); 336 clrbits32(&cp->cp_peso, 0x00000040);
271 setbits32(&cp->cp_peso, 0x00000080); 337 setbits32(&cp->cp_peso, 0x00000080);
272 immr_unmap(cp); 338 immr_unmap(cp);
273 339
274 bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); 340 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
275 341
276 if (bcsr_io == NULL) { 342 if (bcsr_io == NULL) {
277 printk(KERN_CRIT "Could not remap BCSR1\n"); 343 printk(KERN_CRIT "Could not remap BCSR1\n");
278 return; 344 return;
279 } 345 }
280 clrbits32(bcsr_io,BCSR1_RS232EN_1); 346 clrbits32(bcsr_io, BCSR1_RS232EN_1);
281 iounmap(bcsr_io); 347 iounmap(bcsr_io);
282} 348}
283 349
284static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi) 350static void init_smc2_uart_ioports(struct fs_uart_platform_info *fpi)
285{ 351{
286 unsigned *bcsr_io; 352 unsigned *bcsr_io;
287 cpm8xx_t *cp; 353 cpm8xx_t *cp;
288 354
289 cp = (cpm8xx_t *)immr_map(im_cpm); 355 cp = (cpm8xx_t *) immr_map(im_cpm);
290 setbits32(&cp->cp_pepar, 0x00000c00); 356 setbits32(&cp->cp_pepar, 0x00000c00);
291 clrbits32(&cp->cp_pedir, 0x00000c00); 357 clrbits32(&cp->cp_pedir, 0x00000c00);
292 clrbits32(&cp->cp_peso, 0x00000400); 358 clrbits32(&cp->cp_peso, 0x00000400);
293 setbits32(&cp->cp_peso, 0x00000800); 359 setbits32(&cp->cp_peso, 0x00000800);
294 immr_unmap(cp); 360 immr_unmap(cp);
295 361
296 bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); 362 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
297 363
298 if (bcsr_io == NULL) { 364 if (bcsr_io == NULL) {
299 printk(KERN_CRIT "Could not remap BCSR1\n"); 365 printk(KERN_CRIT "Could not remap BCSR1\n");
300 return; 366 return;
301 } 367 }
302 clrbits32(bcsr_io,BCSR1_RS232EN_2); 368 clrbits32(bcsr_io, BCSR1_RS232EN_2);
303 iounmap(bcsr_io); 369 iounmap(bcsr_io);
304} 370}
305 371
306void init_smc_ioports(struct fs_uart_platform_info *data) 372void init_smc_ioports(struct fs_uart_platform_info *data)
@@ -373,15 +439,11 @@ static int __init mpc885ads_probe(void)
373 return 1; 439 return 1;
374} 440}
375 441
376define_machine(mpc885_ads) { 442define_machine(mpc885_ads)
377 .name = "MPC885 ADS", 443{
378 .probe = mpc885ads_probe, 444.name = "MPC885 ADS",.probe = mpc885ads_probe,.setup_arch =
379 .setup_arch = mpc885ads_setup_arch, 445 mpc885ads_setup_arch,.init_IRQ =
380 .init_IRQ = m8xx_pic_init, 446 m8xx_pic_init,.show_cpuinfo = mpc8xx_show_cpuinfo,.get_irq =
381 .show_cpuinfo = mpc8xx_show_cpuinfo, 447 mpc8xx_get_irq,.restart = mpc8xx_restart,.calibrate_decr =
382 .get_irq = mpc8xx_get_irq, 448 mpc8xx_calibrate_decr,.set_rtc_time =
383 .restart = mpc8xx_restart, 449 mpc8xx_set_rtc_time,.get_rtc_time = mpc8xx_get_rtc_time,};
384 .calibrate_decr = mpc8xx_calibrate_decr,
385 .set_rtc_time = mpc8xx_set_rtc_time,
386 .get_rtc_time = mpc8xx_get_rtc_time,
387};
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 361acfa2894c..932538a93c2b 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -2,7 +2,7 @@ menu "Platform support"
2 2
3choice 3choice
4 prompt "Machine type" 4 prompt "Machine type"
5 depends on PPC64 || CLASSIC32 5 depends on PPC64 || 6xx
6 default PPC_MULTIPLATFORM 6 default PPC_MULTIPLATFORM
7 7
8config PPC_MULTIPLATFORM 8config PPC_MULTIPLATFORM
@@ -16,15 +16,30 @@ config EMBEDDED6xx
16 bool "Embedded 6xx/7xx/7xxx-based board" 16 bool "Embedded 6xx/7xx/7xxx-based board"
17 depends on PPC32 && (BROKEN||BROKEN_ON_SMP) 17 depends on PPC32 && (BROKEN||BROKEN_ON_SMP)
18 18
19config APUS 19config PPC_82xx
20 bool "Amiga-APUS" 20 bool "Freescale 82xx"
21 depends on PPC32 && BROKEN 21 depends on 6xx
22
23config PPC_83xx
24 bool "Freescale 83xx"
25 depends on 6xx
26 select FSL_SOC
27 select 83xx
28 select WANT_DEVICE_TREE
29
30config PPC_86xx
31 bool "Freescale 86xx"
32 depends on 6xx
33 select FSL_SOC
34 select ALTIVEC
22 help 35 help
23 Select APUS if configuring for a PowerUP Amiga. 36 The Freescale E600 SoCs have 74xx cores.
24 More information is available at:
25 <http://linux-apus.sourceforge.net/>.
26endchoice 37endchoice
27 38
39config CLASSIC32
40 def_bool y
41 depends on 6xx && PPC_MULTIPLATFORM
42
28source "arch/powerpc/platforms/pseries/Kconfig" 43source "arch/powerpc/platforms/pseries/Kconfig"
29source "arch/powerpc/platforms/iseries/Kconfig" 44source "arch/powerpc/platforms/iseries/Kconfig"
30source "arch/powerpc/platforms/chrp/Kconfig" 45source "arch/powerpc/platforms/chrp/Kconfig"
@@ -257,4 +272,14 @@ config CPM2
257 you wish to build a kernel for a machine with a CPM2 coprocessor 272 you wish to build a kernel for a machine with a CPM2 coprocessor
258 on it (826x, 827x, 8560). 273 on it (826x, 827x, 8560).
259 274
275config AXON_RAM
276 tristate "Axon DDR2 memory device driver"
277 depends on PPC_IBM_CELL_BLADE
278 default m
279 help
280 It registers one block device per Axon's DDR2 memory bank found
281 on a system. Block devices are called axonram?, their major and
282 minor numbers are available in /proc/devices, /proc/partitions or
283 in /sys/block/axonram?/dev.
284
260endmenu 285endmenu
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
new file mode 100644
index 000000000000..b8b5fde94668
--- /dev/null
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -0,0 +1,221 @@
1config PPC64
2 bool "64-bit kernel"
3 default n
4 help
5 This option selects whether a 32-bit or a 64-bit kernel
6 will be built.
7
8menu "Processor support"
9choice
10 prompt "Processor Type"
11 depends on PPC32
12 default 6xx
13 help
14 There are five families of 32 bit PowerPC chips supported.
15 The most common ones are the desktop and server CPUs (601, 603,
16 604, 740, 750, 74xx) CPUs from Freescale and IBM, with their
17 embedded 52xx/82xx/83xx/86xx counterparts.
18 The other embeeded parts, namely 4xx, 8xx, e200 (55xx) and e500
19 (85xx) each form a family of their own that is not compatible
20 with the others.
21
22 If unsure, select 52xx/6xx/7xx/74xx/82xx/83xx/86xx.
23
24config 6xx
25 bool "52xx/6xx/7xx/74xx/82xx/83xx/86xx"
26 select PPC_FPU
27
28config PPC_85xx
29 bool "Freescale 85xx"
30 select E500
31 select FSL_SOC
32 select 85xx
33 select WANT_DEVICE_TREE
34
35config PPC_8xx
36 bool "Freescale 8xx"
37 select FSL_SOC
38 select 8xx
39
40config 40x
41 bool "AMCC 40x"
42 select PPC_DCR_NATIVE
43
44config 44x
45 bool "AMCC 44x"
46 select PPC_DCR_NATIVE
47 select WANT_DEVICE_TREE
48
49config E200
50 bool "Freescale e200"
51
52endchoice
53
54config POWER4_ONLY
55 bool "Optimize for POWER4"
56 depends on PPC64
57 default n
58 ---help---
59 Cause the compiler to optimize for POWER4/POWER5/PPC970 processors.
60 The resulting binary will not work on POWER3 or RS64 processors
61 when compiled with binutils 2.15 or later.
62
63config POWER3
64 bool
65 depends on PPC64
66 default y if !POWER4_ONLY
67
68config POWER4
69 depends on PPC64
70 def_bool y
71
72config 6xx
73 bool
74
75# this is temp to handle compat with arch=ppc
76config 8xx
77 bool
78
79# this is temp to handle compat with arch=ppc
80config 83xx
81 bool
82
83# this is temp to handle compat with arch=ppc
84config 85xx
85 bool
86
87config E500
88 bool
89
90config PPC_FPU
91 bool
92 default y if PPC64
93
94config 4xx
95 bool
96 depends on 40x || 44x
97 default y
98
99config BOOKE
100 bool
101 depends on E200 || E500 || 44x
102 default y
103
104config FSL_BOOKE
105 bool
106 depends on E200 || E500
107 default y
108
109config PTE_64BIT
110 bool
111 depends on 44x || E500
112 default y if 44x
113 default y if E500 && PHYS_64BIT
114
115config PHYS_64BIT
116 bool 'Large physical address support' if E500
117 depends on 44x || E500
118 select RESOURCES_64BIT
119 default y if 44x
120 ---help---
121 This option enables kernel support for larger than 32-bit physical
122 addresses. This features is not be available on all e500 cores.
123
124 If in doubt, say N here.
125
126config ALTIVEC
127 bool "AltiVec Support"
128 depends on CLASSIC32 || POWER4
129 ---help---
130 This option enables kernel support for the Altivec extensions to the
131 PowerPC processor. The kernel currently supports saving and restoring
132 altivec registers, and turning on the 'altivec enable' bit so user
133 processes can execute altivec instructions.
134
135 This option is only usefully if you have a processor that supports
136 altivec (G4, otherwise known as 74xx series), but does not have
137 any affect on a non-altivec cpu (it does, however add code to the
138 kernel).
139
140 If in doubt, say Y here.
141
142config SPE
143 bool "SPE Support"
144 depends on E200 || E500
145 default y
146 ---help---
147 This option enables kernel support for the Signal Processing
148 Extensions (SPE) to the PowerPC processor. The kernel currently
149 supports saving and restoring SPE registers, and turning on the
150 'spe enable' bit so user processes can execute SPE instructions.
151
152 This option is only useful if you have a processor that supports
153 SPE (e500, otherwise known as 85xx series), but does not have any
154 effect on a non-spe cpu (it does, however add code to the kernel).
155
156 If in doubt, say Y here.
157
158config PPC_STD_MMU
159 bool
160 depends on 6xx || POWER3 || POWER4 || PPC64
161 default y
162
163config PPC_STD_MMU_32
164 def_bool y
165 depends on PPC_STD_MMU && PPC32
166
167config PPC_MM_SLICES
168 bool
169 default y if HUGETLB_PAGE
170 default n
171
172config VIRT_CPU_ACCOUNTING
173 bool "Deterministic task and CPU time accounting"
174 depends on PPC64
175 default y
176 help
177 Select this option to enable more accurate task and CPU time
178 accounting. This is done by reading a CPU counter on each
179 kernel entry and exit and on transitions within the kernel
180 between system, softirq and hardirq state, so there is a
181 small performance impact. This also enables accounting of
182 stolen time on logically-partitioned systems running on
183 IBM POWER5-based machines.
184
185 If in doubt, say Y here.
186
187config SMP
188 depends on PPC_STD_MMU
189 bool "Symmetric multi-processing support"
190 ---help---
191 This enables support for systems with more than one CPU. If you have
192 a system with only one CPU, say N. If you have a system with more
193 than one CPU, say Y. Note that the kernel does not currently
194 support SMP machines with 603/603e/603ev or PPC750 ("G3") processors
195 since they have inadequate hardware support for multiprocessor
196 operation.
197
198 If you say N here, the kernel will run on single and multiprocessor
199 machines, but will use only one CPU of a multiprocessor machine. If
200 you say Y here, the kernel will run on single-processor machines.
201 On a single-processor machine, the kernel will run faster if you say
202 N here.
203
204 If you don't know what to do here, say N.
205
206config NR_CPUS
207 int "Maximum number of CPUs (2-128)"
208 range 2 128
209 depends on SMP
210 default "32" if PPC64
211 default "4"
212
213config NOT_COHERENT_CACHE
214 bool
215 depends on 4xx || 8xx || E200
216 default y
217
218config CONFIG_CHECK_CACHE_COHERENCY
219 bool
220
221endmenu
diff --git a/arch/powerpc/platforms/apus/Kconfig b/arch/powerpc/platforms/apus/Kconfig
deleted file mode 100644
index 6bde3bffed86..000000000000
--- a/arch/powerpc/platforms/apus/Kconfig
+++ /dev/null
@@ -1,130 +0,0 @@
1
2config AMIGA
3 bool
4 depends on APUS
5 default y
6 help
7 This option enables support for the Amiga series of computers.
8
9config ZORRO
10 bool
11 depends on APUS
12 default y
13 help
14 This enables support for the Zorro bus in the Amiga. If you have
15 expansion cards in your Amiga that conform to the Amiga
16 AutoConfig(tm) specification, say Y, otherwise N. Note that even
17 expansion cards that do not fit in the Zorro slots but fit in e.g.
18 the CPU slot may fall in this category, so you have to say Y to let
19 Linux use these.
20
21config ABSTRACT_CONSOLE
22 bool
23 depends on APUS
24 default y
25
26config APUS_FAST_EXCEPT
27 bool
28 depends on APUS
29 default y
30
31config AMIGA_PCMCIA
32 bool "Amiga 1200/600 PCMCIA support"
33 depends on APUS && EXPERIMENTAL
34 help
35 Include support in the kernel for pcmcia on Amiga 1200 and Amiga
36 600. If you intend to use pcmcia cards say Y; otherwise say N.
37
38config AMIGA_BUILTIN_SERIAL
39 tristate "Amiga builtin serial support"
40 depends on APUS
41 help
42 If you want to use your Amiga's built-in serial port in Linux,
43 answer Y.
44
45 To compile this driver as a module, choose M here.
46
47config GVPIOEXT
48 tristate "GVP IO-Extender support"
49 depends on APUS
50 help
51 If you want to use a GVP IO-Extender serial card in Linux, say Y.
52 Otherwise, say N.
53
54config GVPIOEXT_LP
55 tristate "GVP IO-Extender parallel printer support"
56 depends on GVPIOEXT
57 help
58 Say Y to enable driving a printer from the parallel port on your
59 GVP IO-Extender card, N otherwise.
60
61config GVPIOEXT_PLIP
62 tristate "GVP IO-Extender PLIP support"
63 depends on GVPIOEXT
64 help
65 Say Y to enable doing IP over the parallel port on your GVP
66 IO-Extender card, N otherwise.
67
68config MULTIFACE_III_TTY
69 tristate "Multiface Card III serial support"
70 depends on APUS
71 help
72 If you want to use a Multiface III card's serial port in Linux,
73 answer Y.
74
75 To compile this driver as a module, choose M here.
76
77config A2232
78 tristate "Commodore A2232 serial support (EXPERIMENTAL)"
79 depends on EXPERIMENTAL && APUS
80 ---help---
81 This option supports the 2232 7-port serial card shipped with the
82 Amiga 2000 and other Zorro-bus machines, dating from 1989. At
83 a max of 19,200 bps, the ports are served by a 6551 ACIA UART chip
84 each, plus a 8520 CIA, and a master 6502 CPU and buffer as well. The
85 ports were connected with 8 pin DIN connectors on the card bracket,
86 for which 8 pin to DB25 adapters were supplied. The card also had
87 jumpers internally to toggle various pinning configurations.
88
89 This driver can be built as a module; but then "generic_serial"
90 will also be built as a module. This has to be loaded before
91 "ser_a2232". If you want to do this, answer M here.
92
93config WHIPPET_SERIAL
94 tristate "Hisoft Whippet PCMCIA serial support"
95 depends on AMIGA_PCMCIA
96 help
97 HiSoft has a web page at <http://www.hisoft.co.uk/>, but there
98 is no listing for the Whippet in their Amiga section.
99
100config APNE
101 tristate "PCMCIA NE2000 support"
102 depends on AMIGA_PCMCIA
103 help
104 If you have a PCMCIA NE2000 compatible adapter, say Y. Otherwise,
105 say N.
106
107 To compile this driver as a module, choose M here: the
108 module will be called apne.
109
110config SERIAL_CONSOLE
111 bool "Support for serial port console"
112 depends on APUS && (AMIGA_BUILTIN_SERIAL=y || GVPIOEXT=y || MULTIFACE_III_TTY=y)
113
114config HEARTBEAT
115 bool "Use power LED as a heartbeat"
116 depends on APUS
117 help
118 Use the power-on LED on your machine as a load meter. The exact
119 behavior is platform-dependent, but normally the flash frequency is
120 a hyperbolic function of the 5-minute load average.
121
122config PROC_HARDWARE
123 bool "/proc/hardware support"
124 depends on APUS
125
126source "drivers/zorro/Kconfig"
127
128config PCI_PERMEDIA
129 bool "PCI for Permedia2"
130 depends on !4xx && !8xx && APUS
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig
index 9b2b386ccf48..ac8032034fb8 100644
--- a/arch/powerpc/platforms/cell/Kconfig
+++ b/arch/powerpc/platforms/cell/Kconfig
@@ -73,4 +73,14 @@ config CBE_CPUFREQ
73 For details, take a look at <file:Documentation/cpu-freq/>. 73 For details, take a look at <file:Documentation/cpu-freq/>.
74 If you don't have such processor, say N 74 If you don't have such processor, say N
75 75
76config CBE_CPUFREQ_PMI
77 tristate "CBE frequency scaling using PMI interface"
78 depends on CBE_CPUFREQ && PPC_PMI && EXPERIMENTAL
79 default n
80 help
81 Select this, if you want to use the PMI interface
82 to switch frequencies. Using PMI, the
83 processor will not only be able to run at lower speed,
84 but also at lower core voltage.
85
76endmenu 86endmenu
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile
index 869af89df6ff..f88a7c76f296 100644
--- a/arch/powerpc/platforms/cell/Makefile
+++ b/arch/powerpc/platforms/cell/Makefile
@@ -4,7 +4,9 @@ obj-$(CONFIG_PPC_CELL_NATIVE) += interrupt.o iommu.o setup.o \
4obj-$(CONFIG_CBE_RAS) += ras.o 4obj-$(CONFIG_CBE_RAS) += ras.o
5 5
6obj-$(CONFIG_CBE_THERM) += cbe_thermal.o 6obj-$(CONFIG_CBE_THERM) += cbe_thermal.o
7obj-$(CONFIG_CBE_CPUFREQ) += cbe_cpufreq.o 7obj-$(CONFIG_CBE_CPUFREQ_PMI) += cbe_cpufreq_pmi.o
8obj-$(CONFIG_CBE_CPUFREQ) += cbe-cpufreq.o
9cbe-cpufreq-y += cbe_cpufreq_pervasive.o cbe_cpufreq.o
8 10
9ifeq ($(CONFIG_SMP),y) 11ifeq ($(CONFIG_SMP),y)
10obj-$(CONFIG_PPC_CELL_NATIVE) += smp.o 12obj-$(CONFIG_PPC_CELL_NATIVE) += smp.o
@@ -23,3 +25,5 @@ obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \
23 $(spu-priv1-y) \ 25 $(spu-priv1-y) \
24 $(spu-manage-y) \ 26 $(spu-manage-y) \
25 spufs/ 27 spufs/
28
29obj-$(CONFIG_PCI_MSI) += axon_msi.o
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
new file mode 100644
index 000000000000..4c9ab5b70bae
--- /dev/null
+++ b/arch/powerpc/platforms/cell/axon_msi.c
@@ -0,0 +1,445 @@
1/*
2 * Copyright 2007, Michael Ellerman, IBM Corporation.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */
9
10
11#include <linux/interrupt.h>
12#include <linux/irq.h>
13#include <linux/kernel.h>
14#include <linux/pci.h>
15#include <linux/msi.h>
16#include <linux/reboot.h>
17
18#include <asm/dcr.h>
19#include <asm/machdep.h>
20#include <asm/prom.h>
21
22
23/*
24 * MSIC registers, specified as offsets from dcr_base
25 */
26#define MSIC_CTRL_REG 0x0
27
28/* Base Address registers specify FIFO location in BE memory */
29#define MSIC_BASE_ADDR_HI_REG 0x3
30#define MSIC_BASE_ADDR_LO_REG 0x4
31
32/* Hold the read/write offsets into the FIFO */
33#define MSIC_READ_OFFSET_REG 0x5
34#define MSIC_WRITE_OFFSET_REG 0x6
35
36
37/* MSIC control register flags */
38#define MSIC_CTRL_ENABLE 0x0001
39#define MSIC_CTRL_FIFO_FULL_ENABLE 0x0002
40#define MSIC_CTRL_IRQ_ENABLE 0x0008
41#define MSIC_CTRL_FULL_STOP_ENABLE 0x0010
42
43/*
44 * The MSIC can be configured to use a FIFO of 32KB, 64KB, 128KB or 256KB.
45 * Currently we're using a 64KB FIFO size.
46 */
47#define MSIC_FIFO_SIZE_SHIFT 16
48#define MSIC_FIFO_SIZE_BYTES (1 << MSIC_FIFO_SIZE_SHIFT)
49
50/*
51 * To configure the FIFO size as (1 << n) bytes, we write (n - 15) into bits
52 * 8-9 of the MSIC control reg.
53 */
54#define MSIC_CTRL_FIFO_SIZE (((MSIC_FIFO_SIZE_SHIFT - 15) << 8) & 0x300)
55
56/*
57 * We need to mask the read/write offsets to make sure they stay within
58 * the bounds of the FIFO. Also they should always be 16-byte aligned.
59 */
60#define MSIC_FIFO_SIZE_MASK ((MSIC_FIFO_SIZE_BYTES - 1) & ~0xFu)
61
62/* Each entry in the FIFO is 16 bytes, the first 4 bytes hold the irq # */
63#define MSIC_FIFO_ENTRY_SIZE 0x10
64
65
66struct axon_msic {
67 struct device_node *dn;
68 struct irq_host *irq_host;
69 __le32 *fifo;
70 dcr_host_t dcr_host;
71 struct list_head list;
72 u32 read_offset;
73 u32 dcr_base;
74};
75
76static LIST_HEAD(axon_msic_list);
77
78static void msic_dcr_write(struct axon_msic *msic, unsigned int dcr_n, u32 val)
79{
80 pr_debug("axon_msi: dcr_write(0x%x, 0x%x)\n", val, dcr_n);
81
82 dcr_write(msic->dcr_host, msic->dcr_base + dcr_n, val);
83}
84
85static u32 msic_dcr_read(struct axon_msic *msic, unsigned int dcr_n)
86{
87 return dcr_read(msic->dcr_host, msic->dcr_base + dcr_n);
88}
89
90static void axon_msi_cascade(unsigned int irq, struct irq_desc *desc)
91{
92 struct axon_msic *msic = get_irq_data(irq);
93 u32 write_offset, msi;
94 int idx;
95
96 write_offset = msic_dcr_read(msic, MSIC_WRITE_OFFSET_REG);
97 pr_debug("axon_msi: original write_offset 0x%x\n", write_offset);
98
99 /* write_offset doesn't wrap properly, so we have to mask it */
100 write_offset &= MSIC_FIFO_SIZE_MASK;
101
102 while (msic->read_offset != write_offset) {
103 idx = msic->read_offset / sizeof(__le32);
104 msi = le32_to_cpu(msic->fifo[idx]);
105 msi &= 0xFFFF;
106
107 pr_debug("axon_msi: woff %x roff %x msi %x\n",
108 write_offset, msic->read_offset, msi);
109
110 msic->read_offset += MSIC_FIFO_ENTRY_SIZE;
111 msic->read_offset &= MSIC_FIFO_SIZE_MASK;
112
113 if (msi < NR_IRQS && irq_map[msi].host == msic->irq_host)
114 generic_handle_irq(msi);
115 else
116 pr_debug("axon_msi: invalid irq 0x%x!\n", msi);
117 }
118
119 desc->chip->eoi(irq);
120}
121
122static struct axon_msic *find_msi_translator(struct pci_dev *dev)
123{
124 struct irq_host *irq_host;
125 struct device_node *dn, *tmp;
126 const phandle *ph;
127 struct axon_msic *msic = NULL;
128
129 dn = pci_device_to_OF_node(dev);
130 if (!dn) {
131 dev_dbg(&dev->dev, "axon_msi: no pci_dn found\n");
132 return NULL;
133 }
134
135 for (; dn; tmp = of_get_parent(dn), of_node_put(dn), dn = tmp) {
136 ph = of_get_property(dn, "msi-translator", NULL);
137 if (ph)
138 break;
139 }
140
141 if (!ph) {
142 dev_dbg(&dev->dev,
143 "axon_msi: no msi-translator property found\n");
144 goto out_error;
145 }
146
147 tmp = dn;
148 dn = of_find_node_by_phandle(*ph);
149 if (!dn) {
150 dev_dbg(&dev->dev,
151 "axon_msi: msi-translator doesn't point to a node\n");
152 goto out_error;
153 }
154
155 irq_host = irq_find_host(dn);
156 if (!irq_host) {
157 dev_dbg(&dev->dev, "axon_msi: no irq_host found for node %s\n",
158 dn->full_name);
159 goto out_error;
160 }
161
162 msic = irq_host->host_data;
163
164out_error:
165 of_node_put(dn);
166 of_node_put(tmp);
167
168 return msic;
169}
170
171static int axon_msi_check_device(struct pci_dev *dev, int nvec, int type)
172{
173 if (!find_msi_translator(dev))
174 return -ENODEV;
175
176 return 0;
177}
178
179static int setup_msi_msg_address(struct pci_dev *dev, struct msi_msg *msg)
180{
181 struct device_node *dn, *tmp;
182 struct msi_desc *entry;
183 int len;
184 const u32 *prop;
185
186 dn = pci_device_to_OF_node(dev);
187 if (!dn) {
188 dev_dbg(&dev->dev, "axon_msi: no pci_dn found\n");
189 return -ENODEV;
190 }
191
192 entry = list_first_entry(&dev->msi_list, struct msi_desc, list);
193
194 for (; dn; tmp = of_get_parent(dn), of_node_put(dn), dn = tmp) {
195 if (entry->msi_attrib.is_64) {
196 prop = of_get_property(dn, "msi-address-64", &len);
197 if (prop)
198 break;
199 }
200
201 prop = of_get_property(dn, "msi-address-32", &len);
202 if (prop)
203 break;
204 }
205
206 if (!prop) {
207 dev_dbg(&dev->dev,
208 "axon_msi: no msi-address-(32|64) properties found\n");
209 return -ENOENT;
210 }
211
212 switch (len) {
213 case 8:
214 msg->address_hi = prop[0];
215 msg->address_lo = prop[1];
216 break;
217 case 4:
218 msg->address_hi = 0;
219 msg->address_lo = prop[0];
220 break;
221 default:
222 dev_dbg(&dev->dev,
223 "axon_msi: malformed msi-address-(32|64) property\n");
224 of_node_put(dn);
225 return -EINVAL;
226 }
227
228 of_node_put(dn);
229
230 return 0;
231}
232
233static int axon_msi_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
234{
235 unsigned int virq, rc;
236 struct msi_desc *entry;
237 struct msi_msg msg;
238 struct axon_msic *msic;
239
240 msic = find_msi_translator(dev);
241 if (!msic)
242 return -ENODEV;
243
244 rc = setup_msi_msg_address(dev, &msg);
245 if (rc)
246 return rc;
247
248 /* We rely on being able to stash a virq in a u16 */
249 BUILD_BUG_ON(NR_IRQS > 65536);
250
251 list_for_each_entry(entry, &dev->msi_list, list) {
252 virq = irq_create_direct_mapping(msic->irq_host);
253 if (virq == NO_IRQ) {
254 dev_warn(&dev->dev,
255 "axon_msi: virq allocation failed!\n");
256 return -1;
257 }
258 dev_dbg(&dev->dev, "axon_msi: allocated virq 0x%x\n", virq);
259
260 set_irq_msi(virq, entry);
261 msg.data = virq;
262 write_msi_msg(virq, &msg);
263 }
264
265 return 0;
266}
267
268static void axon_msi_teardown_msi_irqs(struct pci_dev *dev)
269{
270 struct msi_desc *entry;
271
272 dev_dbg(&dev->dev, "axon_msi: tearing down msi irqs\n");
273
274 list_for_each_entry(entry, &dev->msi_list, list) {
275 if (entry->irq == NO_IRQ)
276 continue;
277
278 set_irq_msi(entry->irq, NULL);
279 irq_dispose_mapping(entry->irq);
280 }
281}
282
283static struct irq_chip msic_irq_chip = {
284 .mask = mask_msi_irq,
285 .unmask = unmask_msi_irq,
286 .shutdown = unmask_msi_irq,
287 .typename = "AXON-MSI",
288};
289
290static int msic_host_map(struct irq_host *h, unsigned int virq,
291 irq_hw_number_t hw)
292{
293 set_irq_chip_and_handler(virq, &msic_irq_chip, handle_simple_irq);
294
295 return 0;
296}
297
298static int msic_host_match(struct irq_host *host, struct device_node *dn)
299{
300 struct axon_msic *msic = host->host_data;
301
302 return msic->dn == dn;
303}
304
305static struct irq_host_ops msic_host_ops = {
306 .match = msic_host_match,
307 .map = msic_host_map,
308};
309
310static int axon_msi_notify_reboot(struct notifier_block *nb,
311 unsigned long code, void *data)
312{
313 struct axon_msic *msic;
314 u32 tmp;
315
316 list_for_each_entry(msic, &axon_msic_list, list) {
317 pr_debug("axon_msi: disabling %s\n", msic->dn->full_name);
318 tmp = msic_dcr_read(msic, MSIC_CTRL_REG);
319 tmp &= ~MSIC_CTRL_ENABLE & ~MSIC_CTRL_IRQ_ENABLE;
320 msic_dcr_write(msic, MSIC_CTRL_REG, tmp);
321 }
322
323 return 0;
324}
325
326static struct notifier_block axon_msi_reboot_notifier = {
327 .notifier_call = axon_msi_notify_reboot
328};
329
330static int axon_msi_setup_one(struct device_node *dn)
331{
332 struct page *page;
333 struct axon_msic *msic;
334 unsigned int virq;
335 int dcr_len;
336
337 pr_debug("axon_msi: setting up dn %s\n", dn->full_name);
338
339 msic = kzalloc(sizeof(struct axon_msic), GFP_KERNEL);
340 if (!msic) {
341 printk(KERN_ERR "axon_msi: couldn't allocate msic for %s\n",
342 dn->full_name);
343 goto out;
344 }
345
346 msic->dcr_base = dcr_resource_start(dn, 0);
347 dcr_len = dcr_resource_len(dn, 0);
348
349 if (msic->dcr_base == 0 || dcr_len == 0) {
350 printk(KERN_ERR
351 "axon_msi: couldn't parse dcr properties on %s\n",
352 dn->full_name);
353 goto out;
354 }
355
356 msic->dcr_host = dcr_map(dn, msic->dcr_base, dcr_len);
357 if (!DCR_MAP_OK(msic->dcr_host)) {
358 printk(KERN_ERR "axon_msi: dcr_map failed for %s\n",
359 dn->full_name);
360 goto out_free_msic;
361 }
362
363 page = alloc_pages_node(of_node_to_nid(dn), GFP_KERNEL,
364 get_order(MSIC_FIFO_SIZE_BYTES));
365 if (!page) {
366 printk(KERN_ERR "axon_msi: couldn't allocate fifo for %s\n",
367 dn->full_name);
368 goto out_free_msic;
369 }
370
371 msic->fifo = page_address(page);
372
373 msic->irq_host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, NR_IRQS,
374 &msic_host_ops, 0);
375 if (!msic->irq_host) {
376 printk(KERN_ERR "axon_msi: couldn't allocate irq_host for %s\n",
377 dn->full_name);
378 goto out_free_fifo;
379 }
380
381 msic->irq_host->host_data = msic;
382
383 virq = irq_of_parse_and_map(dn, 0);
384 if (virq == NO_IRQ) {
385 printk(KERN_ERR "axon_msi: irq parse and map failed for %s\n",
386 dn->full_name);
387 goto out_free_host;
388 }
389
390 msic->dn = of_node_get(dn);
391
392 set_irq_data(virq, msic);
393 set_irq_chained_handler(virq, axon_msi_cascade);
394 pr_debug("axon_msi: irq 0x%x setup for axon_msi\n", virq);
395
396 /* Enable the MSIC hardware */
397 msic_dcr_write(msic, MSIC_BASE_ADDR_HI_REG, (u64)msic->fifo >> 32);
398 msic_dcr_write(msic, MSIC_BASE_ADDR_LO_REG,
399 (u64)msic->fifo & 0xFFFFFFFF);
400 msic_dcr_write(msic, MSIC_CTRL_REG,
401 MSIC_CTRL_IRQ_ENABLE | MSIC_CTRL_ENABLE |
402 MSIC_CTRL_FIFO_SIZE);
403
404 list_add(&msic->list, &axon_msic_list);
405
406 printk(KERN_DEBUG "axon_msi: setup MSIC on %s\n", dn->full_name);
407
408 return 0;
409
410out_free_host:
411 kfree(msic->irq_host);
412out_free_fifo:
413 __free_pages(virt_to_page(msic->fifo), get_order(MSIC_FIFO_SIZE_BYTES));
414out_free_msic:
415 kfree(msic);
416out:
417
418 return -1;
419}
420
421static int axon_msi_init(void)
422{
423 struct device_node *dn;
424 int found = 0;
425
426 pr_debug("axon_msi: initialising ...\n");
427
428 for_each_compatible_node(dn, NULL, "ibm,axon-msic") {
429 if (axon_msi_setup_one(dn) == 0)
430 found++;
431 }
432
433 if (found) {
434 ppc_md.setup_msi_irqs = axon_msi_setup_msi_irqs;
435 ppc_md.teardown_msi_irqs = axon_msi_teardown_msi_irqs;
436 ppc_md.msi_check_device = axon_msi_check_device;
437
438 register_reboot_notifier(&axon_msi_reboot_notifier);
439
440 pr_debug("axon_msi: registered callbacks!\n");
441 }
442
443 return 0;
444}
445arch_initcall(axon_msi_init);
diff --git a/arch/powerpc/platforms/cell/cbe_cpufreq.c b/arch/powerpc/platforms/cell/cbe_cpufreq.c
index f9ac3fe3be97..0b6e8ee85ab1 100644
--- a/arch/powerpc/platforms/cell/cbe_cpufreq.c
+++ b/arch/powerpc/platforms/cell/cbe_cpufreq.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * cpufreq driver for the cell processor 2 * cpufreq driver for the cell processor
3 * 3 *
4 * (C) Copyright IBM Deutschland Entwicklung GmbH 2005 4 * (C) Copyright IBM Deutschland Entwicklung GmbH 2005-2007
5 * 5 *
6 * Author: Christian Krafft <krafft@de.ibm.com> 6 * Author: Christian Krafft <krafft@de.ibm.com>
7 * 7 *
@@ -21,18 +21,11 @@
21 */ 21 */
22 22
23#include <linux/cpufreq.h> 23#include <linux/cpufreq.h>
24#include <linux/timer.h>
25
26#include <asm/hw_irq.h>
27#include <asm/io.h>
28#include <asm/machdep.h> 24#include <asm/machdep.h>
29#include <asm/processor.h>
30#include <asm/prom.h>
31#include <asm/time.h>
32#include <asm/pmi.h>
33#include <asm/of_platform.h> 25#include <asm/of_platform.h>
34 26#include <asm/prom.h>
35#include "cbe_regs.h" 27#include "cbe_regs.h"
28#include "cbe_cpufreq.h"
36 29
37static DEFINE_MUTEX(cbe_switch_mutex); 30static DEFINE_MUTEX(cbe_switch_mutex);
38 31
@@ -50,144 +43,24 @@ static struct cpufreq_frequency_table cbe_freqs[] = {
50 {0, CPUFREQ_TABLE_END}, 43 {0, CPUFREQ_TABLE_END},
51}; 44};
52 45
53/* to write to MIC register */
54static u64 MIC_Slow_Fast_Timer_table[] = {
55 [0 ... 7] = 0x007fc00000000000ull,
56};
57
58/* more values for the MIC */
59static u64 MIC_Slow_Next_Timer_table[] = {
60 0x0000240000000000ull,
61 0x0000268000000000ull,
62 0x000029C000000000ull,
63 0x00002D0000000000ull,
64 0x0000300000000000ull,
65 0x0000334000000000ull,
66 0x000039C000000000ull,
67 0x00003FC000000000ull,
68};
69
70/* 46/*
71 * hardware specific functions 47 * hardware specific functions
72 */ 48 */
73 49
74static struct of_device *pmi_dev; 50static int set_pmode(unsigned int cpu, unsigned int slow_mode)
75
76static int set_pmode_pmi(int cpu, unsigned int pmode)
77{ 51{
78 int ret; 52 int rc;
79 pmi_message_t pmi_msg;
80#ifdef DEBUG
81 u64 time;
82#endif
83
84 pmi_msg.type = PMI_TYPE_FREQ_CHANGE;
85 pmi_msg.data1 = cbe_cpu_to_node(cpu);
86 pmi_msg.data2 = pmode;
87
88#ifdef DEBUG
89 time = (u64) get_cycles();
90#endif
91
92 pmi_send_message(pmi_dev, pmi_msg);
93 ret = pmi_msg.data2;
94
95 pr_debug("PMI returned slow mode %d\n", ret);
96
97#ifdef DEBUG
98 time = (u64) get_cycles() - time; /* actual cycles (not cpu cycles!) */
99 time = 1000000000 * time / CLOCK_TICK_RATE; /* time in ns (10^-9) */
100 pr_debug("had to wait %lu ns for a transition\n", time);
101#endif
102 return ret;
103}
104
105
106static int get_pmode(int cpu)
107{
108 int ret;
109 struct cbe_pmd_regs __iomem *pmd_regs;
110
111 pmd_regs = cbe_get_cpu_pmd_regs(cpu);
112 ret = in_be64(&pmd_regs->pmsr) & 0x07;
113
114 return ret;
115}
116
117static int set_pmode_reg(int cpu, unsigned int pmode)
118{
119 struct cbe_pmd_regs __iomem *pmd_regs;
120 struct cbe_mic_tm_regs __iomem *mic_tm_regs;
121 u64 flags;
122 u64 value;
123
124 local_irq_save(flags);
125
126 mic_tm_regs = cbe_get_cpu_mic_tm_regs(cpu);
127 pmd_regs = cbe_get_cpu_pmd_regs(cpu);
128
129 pr_debug("pm register is mapped at %p\n", &pmd_regs->pmcr);
130 pr_debug("mic register is mapped at %p\n", &mic_tm_regs->slow_fast_timer_0);
131
132 out_be64(&mic_tm_regs->slow_fast_timer_0, MIC_Slow_Fast_Timer_table[pmode]);
133 out_be64(&mic_tm_regs->slow_fast_timer_1, MIC_Slow_Fast_Timer_table[pmode]);
134
135 out_be64(&mic_tm_regs->slow_next_timer_0, MIC_Slow_Next_Timer_table[pmode]);
136 out_be64(&mic_tm_regs->slow_next_timer_1, MIC_Slow_Next_Timer_table[pmode]);
137
138 value = in_be64(&pmd_regs->pmcr);
139 /* set bits to zero */
140 value &= 0xFFFFFFFFFFFFFFF8ull;
141 /* set bits to next pmode */
142 value |= pmode;
143
144 out_be64(&pmd_regs->pmcr, value);
145
146 /* wait until new pmode appears in status register */
147 value = in_be64(&pmd_regs->pmsr) & 0x07;
148 while(value != pmode) {
149 cpu_relax();
150 value = in_be64(&pmd_regs->pmsr) & 0x07;
151 }
152
153 local_irq_restore(flags);
154
155 return 0;
156}
157 53
158static int set_pmode(int cpu, unsigned int slow_mode) { 54 if (cbe_cpufreq_has_pmi)
159 if (pmi_dev) 55 rc = cbe_cpufreq_set_pmode_pmi(cpu, slow_mode);
160 return set_pmode_pmi(cpu, slow_mode);
161 else 56 else
162 return set_pmode_reg(cpu, slow_mode); 57 rc = cbe_cpufreq_set_pmode(cpu, slow_mode);
163}
164
165static void cbe_cpufreq_handle_pmi(struct of_device *dev, pmi_message_t pmi_msg)
166{
167 struct cpufreq_policy policy;
168 u8 cpu;
169 u8 cbe_pmode_new;
170 58
171 BUG_ON(pmi_msg.type != PMI_TYPE_FREQ_CHANGE); 59 pr_debug("register contains slow mode %d\n", cbe_cpufreq_get_pmode(cpu));
172 60
173 cpu = cbe_node_to_cpu(pmi_msg.data1); 61 return rc;
174 cbe_pmode_new = pmi_msg.data2;
175
176 cpufreq_get_policy(&policy, cpu);
177
178 policy.max = min(policy.max, cbe_freqs[cbe_pmode_new].frequency);
179 policy.min = min(policy.min, policy.max);
180
181 pr_debug("cbe_handle_pmi: new policy.min=%d policy.max=%d\n", policy.min, policy.max);
182 cpufreq_set_policy(&policy);
183} 62}
184 63
185static struct pmi_handler cbe_pmi_handler = {
186 .type = PMI_TYPE_FREQ_CHANGE,
187 .handle_pmi_message = cbe_cpufreq_handle_pmi,
188};
189
190
191/* 64/*
192 * cpufreq functions 65 * cpufreq functions
193 */ 66 */
@@ -206,8 +79,19 @@ static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy)
206 79
207 pr_debug("init cpufreq on CPU %d\n", policy->cpu); 80 pr_debug("init cpufreq on CPU %d\n", policy->cpu);
208 81
82 /*
83 * Let's check we can actually get to the CELL regs
84 */
85 if (!cbe_get_cpu_pmd_regs(policy->cpu) ||
86 !cbe_get_cpu_mic_tm_regs(policy->cpu)) {
87 pr_info("invalid CBE regs pointers for cpufreq\n");
88 return -EINVAL;
89 }
90
209 max_freqp = of_get_property(cpu, "clock-frequency", NULL); 91 max_freqp = of_get_property(cpu, "clock-frequency", NULL);
210 92
93 of_node_put(cpu);
94
211 if (!max_freqp) 95 if (!max_freqp)
212 return -EINVAL; 96 return -EINVAL;
213 97
@@ -224,10 +108,12 @@ static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy)
224 } 108 }
225 109
226 policy->governor = CPUFREQ_DEFAULT_GOVERNOR; 110 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
227 /* if DEBUG is enabled set_pmode() measures the correct latency of a transition */ 111
112 /* if DEBUG is enabled set_pmode() measures the latency
113 * of a transition */
228 policy->cpuinfo.transition_latency = 25000; 114 policy->cpuinfo.transition_latency = 25000;
229 115
230 cur_pmode = get_pmode(policy->cpu); 116 cur_pmode = cbe_cpufreq_get_pmode(policy->cpu);
231 pr_debug("current pmode is at %d\n",cur_pmode); 117 pr_debug("current pmode is at %d\n",cur_pmode);
232 118
233 policy->cur = cbe_freqs[cur_pmode].frequency; 119 policy->cur = cbe_freqs[cur_pmode].frequency;
@@ -238,7 +124,8 @@ static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy)
238 124
239 cpufreq_frequency_table_get_attr(cbe_freqs, policy->cpu); 125 cpufreq_frequency_table_get_attr(cbe_freqs, policy->cpu);
240 126
241 /* this ensures that policy->cpuinfo_min and policy->cpuinfo_max are set correctly */ 127 /* this ensures that policy->cpuinfo_min
128 * and policy->cpuinfo_max are set correctly */
242 return cpufreq_frequency_table_cpuinfo(policy, cbe_freqs); 129 return cpufreq_frequency_table_cpuinfo(policy, cbe_freqs);
243} 130}
244 131
@@ -253,13 +140,13 @@ static int cbe_cpufreq_verify(struct cpufreq_policy *policy)
253 return cpufreq_frequency_table_verify(policy, cbe_freqs); 140 return cpufreq_frequency_table_verify(policy, cbe_freqs);
254} 141}
255 142
256 143static int cbe_cpufreq_target(struct cpufreq_policy *policy,
257static int cbe_cpufreq_target(struct cpufreq_policy *policy, unsigned int target_freq, 144 unsigned int target_freq,
258 unsigned int relation) 145 unsigned int relation)
259{ 146{
260 int rc; 147 int rc;
261 struct cpufreq_freqs freqs; 148 struct cpufreq_freqs freqs;
262 int cbe_pmode_new; 149 unsigned int cbe_pmode_new;
263 150
264 cpufreq_frequency_table_target(policy, 151 cpufreq_frequency_table_target(policy,
265 cbe_freqs, 152 cbe_freqs,
@@ -274,12 +161,14 @@ static int cbe_cpufreq_target(struct cpufreq_policy *policy, unsigned int target
274 mutex_lock(&cbe_switch_mutex); 161 mutex_lock(&cbe_switch_mutex);
275 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 162 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
276 163
277 pr_debug("setting frequency for cpu %d to %d kHz, 1/%d of max frequency\n", 164 pr_debug("setting frequency for cpu %d to %d kHz, " \
165 "1/%d of max frequency\n",
278 policy->cpu, 166 policy->cpu,
279 cbe_freqs[cbe_pmode_new].frequency, 167 cbe_freqs[cbe_pmode_new].frequency,
280 cbe_freqs[cbe_pmode_new].index); 168 cbe_freqs[cbe_pmode_new].index);
281 169
282 rc = set_pmode(policy->cpu, cbe_pmode_new); 170 rc = set_pmode(policy->cpu, cbe_pmode_new);
171
283 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 172 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
284 mutex_unlock(&cbe_switch_mutex); 173 mutex_unlock(&cbe_switch_mutex);
285 174
@@ -302,26 +191,14 @@ static struct cpufreq_driver cbe_cpufreq_driver = {
302 191
303static int __init cbe_cpufreq_init(void) 192static int __init cbe_cpufreq_init(void)
304{ 193{
305 struct device_node *np;
306
307 if (!machine_is(cell)) 194 if (!machine_is(cell))
308 return -ENODEV; 195 return -ENODEV;
309 196
310 np = of_find_node_by_type(NULL, "ibm,pmi");
311
312 pmi_dev = of_find_device_by_node(np);
313
314 if (pmi_dev)
315 pmi_register_handler(pmi_dev, &cbe_pmi_handler);
316
317 return cpufreq_register_driver(&cbe_cpufreq_driver); 197 return cpufreq_register_driver(&cbe_cpufreq_driver);
318} 198}
319 199
320static void __exit cbe_cpufreq_exit(void) 200static void __exit cbe_cpufreq_exit(void)
321{ 201{
322 if (pmi_dev)
323 pmi_unregister_handler(pmi_dev, &cbe_pmi_handler);
324
325 cpufreq_unregister_driver(&cbe_cpufreq_driver); 202 cpufreq_unregister_driver(&cbe_cpufreq_driver);
326} 203}
327 204
diff --git a/arch/powerpc/platforms/cell/cbe_cpufreq.h b/arch/powerpc/platforms/cell/cbe_cpufreq.h
new file mode 100644
index 000000000000..c1d86bfa92ff
--- /dev/null
+++ b/arch/powerpc/platforms/cell/cbe_cpufreq.h
@@ -0,0 +1,24 @@
1/*
2 * cbe_cpufreq.h
3 *
4 * This file contains the definitions used by the cbe_cpufreq driver.
5 *
6 * (C) Copyright IBM Deutschland Entwicklung GmbH 2005-2007
7 *
8 * Author: Christian Krafft <krafft@de.ibm.com>
9 *
10 */
11
12#include <linux/cpufreq.h>
13#include <linux/types.h>
14
15int cbe_cpufreq_set_pmode(int cpu, unsigned int pmode);
16int cbe_cpufreq_get_pmode(int cpu);
17
18int cbe_cpufreq_set_pmode_pmi(int cpu, unsigned int pmode);
19
20#if defined(CONFIG_CBE_CPUFREQ_PMI) || defined(CONFIG_CBE_CPUFREQ_PMI_MODULE)
21extern bool cbe_cpufreq_has_pmi;
22#else
23#define cbe_cpufreq_has_pmi (0)
24#endif
diff --git a/arch/powerpc/platforms/cell/cbe_cpufreq_pervasive.c b/arch/powerpc/platforms/cell/cbe_cpufreq_pervasive.c
new file mode 100644
index 000000000000..163263b3e1cd
--- /dev/null
+++ b/arch/powerpc/platforms/cell/cbe_cpufreq_pervasive.c
@@ -0,0 +1,115 @@
1/*
2 * pervasive backend for the cbe_cpufreq driver
3 *
4 * This driver makes use of the pervasive unit to
5 * engage the desired frequency.
6 *
7 * (C) Copyright IBM Deutschland Entwicklung GmbH 2005-2007
8 *
9 * Author: Christian Krafft <krafft@de.ibm.com>
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 as published by
13 * the Free Software Foundation; either version 2, or (at your option)
14 * any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
25
26#include <linux/io.h>
27#include <linux/kernel.h>
28#include <linux/time.h>
29#include <asm/machdep.h>
30#include <asm/hw_irq.h>
31
32#include "cbe_regs.h"
33#include "cbe_cpufreq.h"
34
35/* to write to MIC register */
36static u64 MIC_Slow_Fast_Timer_table[] = {
37 [0 ... 7] = 0x007fc00000000000ull,
38};
39
40/* more values for the MIC */
41static u64 MIC_Slow_Next_Timer_table[] = {
42 0x0000240000000000ull,
43 0x0000268000000000ull,
44 0x000029C000000000ull,
45 0x00002D0000000000ull,
46 0x0000300000000000ull,
47 0x0000334000000000ull,
48 0x000039C000000000ull,
49 0x00003FC000000000ull,
50};
51
52
53int cbe_cpufreq_set_pmode(int cpu, unsigned int pmode)
54{
55 struct cbe_pmd_regs __iomem *pmd_regs;
56 struct cbe_mic_tm_regs __iomem *mic_tm_regs;
57 u64 flags;
58 u64 value;
59#ifdef DEBUG
60 long time;
61#endif
62
63 local_irq_save(flags);
64
65 mic_tm_regs = cbe_get_cpu_mic_tm_regs(cpu);
66 pmd_regs = cbe_get_cpu_pmd_regs(cpu);
67
68#ifdef DEBUG
69 time = jiffies;
70#endif
71
72 out_be64(&mic_tm_regs->slow_fast_timer_0, MIC_Slow_Fast_Timer_table[pmode]);
73 out_be64(&mic_tm_regs->slow_fast_timer_1, MIC_Slow_Fast_Timer_table[pmode]);
74
75 out_be64(&mic_tm_regs->slow_next_timer_0, MIC_Slow_Next_Timer_table[pmode]);
76 out_be64(&mic_tm_regs->slow_next_timer_1, MIC_Slow_Next_Timer_table[pmode]);
77
78 value = in_be64(&pmd_regs->pmcr);
79 /* set bits to zero */
80 value &= 0xFFFFFFFFFFFFFFF8ull;
81 /* set bits to next pmode */
82 value |= pmode;
83
84 out_be64(&pmd_regs->pmcr, value);
85
86#ifdef DEBUG
87 /* wait until new pmode appears in status register */
88 value = in_be64(&pmd_regs->pmsr) & 0x07;
89 while (value != pmode) {
90 cpu_relax();
91 value = in_be64(&pmd_regs->pmsr) & 0x07;
92 }
93
94 time = jiffies - time;
95 time = jiffies_to_msecs(time);
96 pr_debug("had to wait %lu ms for a transition using " \
97 "pervasive unit\n", time);
98#endif
99 local_irq_restore(flags);
100
101 return 0;
102}
103
104
105int cbe_cpufreq_get_pmode(int cpu)
106{
107 int ret;
108 struct cbe_pmd_regs __iomem *pmd_regs;
109
110 pmd_regs = cbe_get_cpu_pmd_regs(cpu);
111 ret = in_be64(&pmd_regs->pmsr) & 0x07;
112
113 return ret;
114}
115
diff --git a/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c b/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c
new file mode 100644
index 000000000000..fc6f38982ff4
--- /dev/null
+++ b/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c
@@ -0,0 +1,148 @@
1/*
2 * pmi backend for the cbe_cpufreq driver
3 *
4 * (C) Copyright IBM Deutschland Entwicklung GmbH 2005-2007
5 *
6 * Author: Christian Krafft <krafft@de.ibm.com>
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/kernel.h>
24#include <linux/types.h>
25#include <linux/timer.h>
26#include <asm/of_platform.h>
27#include <asm/processor.h>
28#include <asm/prom.h>
29#include <asm/pmi.h>
30
31#ifdef DEBUG
32#include <asm/time.h>
33#endif
34
35#include "cbe_regs.h"
36#include "cbe_cpufreq.h"
37
38static u8 pmi_slow_mode_limit[MAX_CBE];
39
40bool cbe_cpufreq_has_pmi = false;
41EXPORT_SYMBOL_GPL(cbe_cpufreq_has_pmi);
42
43/*
44 * hardware specific functions
45 */
46
47int cbe_cpufreq_set_pmode_pmi(int cpu, unsigned int pmode)
48{
49 int ret;
50 pmi_message_t pmi_msg;
51#ifdef DEBUG
52 long time;
53#endif
54 pmi_msg.type = PMI_TYPE_FREQ_CHANGE;
55 pmi_msg.data1 = cbe_cpu_to_node(cpu);
56 pmi_msg.data2 = pmode;
57
58#ifdef DEBUG
59 time = jiffies;
60#endif
61 pmi_send_message(pmi_msg);
62
63#ifdef DEBUG
64 time = jiffies - time;
65 time = jiffies_to_msecs(time);
66 pr_debug("had to wait %lu ms for a transition using " \
67 "PMI\n", time);
68#endif
69 ret = pmi_msg.data2;
70 pr_debug("PMI returned slow mode %d\n", ret);
71
72 return ret;
73}
74EXPORT_SYMBOL_GPL(cbe_cpufreq_set_pmode_pmi);
75
76
77static void cbe_cpufreq_handle_pmi(pmi_message_t pmi_msg)
78{
79 u8 node, slow_mode;
80
81 BUG_ON(pmi_msg.type != PMI_TYPE_FREQ_CHANGE);
82
83 node = pmi_msg.data1;
84 slow_mode = pmi_msg.data2;
85
86 pmi_slow_mode_limit[node] = slow_mode;
87
88 pr_debug("cbe_handle_pmi: node: %d max_freq: %d\n", node, slow_mode);
89}
90
91static int pmi_notifier(struct notifier_block *nb,
92 unsigned long event, void *data)
93{
94 struct cpufreq_policy *policy = data;
95 struct cpufreq_frequency_table *cbe_freqs;
96 u8 node;
97
98 cbe_freqs = cpufreq_frequency_get_table(policy->cpu);
99 node = cbe_cpu_to_node(policy->cpu);
100
101 pr_debug("got notified, event=%lu, node=%u\n", event, node);
102
103 if (pmi_slow_mode_limit[node] != 0) {
104 pr_debug("limiting node %d to slow mode %d\n",
105 node, pmi_slow_mode_limit[node]);
106
107 cpufreq_verify_within_limits(policy, 0,
108
109 cbe_freqs[pmi_slow_mode_limit[node]].frequency);
110 }
111
112 return 0;
113}
114
115static struct notifier_block pmi_notifier_block = {
116 .notifier_call = pmi_notifier,
117};
118
119static struct pmi_handler cbe_pmi_handler = {
120 .type = PMI_TYPE_FREQ_CHANGE,
121 .handle_pmi_message = cbe_cpufreq_handle_pmi,
122};
123
124
125
126static int __init cbe_cpufreq_pmi_init(void)
127{
128 cbe_cpufreq_has_pmi = pmi_register_handler(&cbe_pmi_handler) == 0;
129
130 if (!cbe_cpufreq_has_pmi)
131 return -ENODEV;
132
133 cpufreq_register_notifier(&pmi_notifier_block, CPUFREQ_POLICY_NOTIFIER);
134
135 return 0;
136}
137
138static void __exit cbe_cpufreq_pmi_exit(void)
139{
140 cpufreq_unregister_notifier(&pmi_notifier_block, CPUFREQ_POLICY_NOTIFIER);
141 pmi_unregister_handler(&cbe_pmi_handler);
142}
143
144module_init(cbe_cpufreq_pmi_init);
145module_exit(cbe_cpufreq_pmi_exit);
146
147MODULE_LICENSE("GPL");
148MODULE_AUTHOR("Christian Krafft <krafft@de.ibm.com>");
diff --git a/arch/powerpc/platforms/cell/cbe_regs.c b/arch/powerpc/platforms/cell/cbe_regs.c
index 12c9674b4b1f..c8f7f0007422 100644
--- a/arch/powerpc/platforms/cell/cbe_regs.c
+++ b/arch/powerpc/platforms/cell/cbe_regs.c
@@ -174,6 +174,13 @@ static struct device_node *cbe_get_be_node(int cpu_id)
174 174
175 cpu_handle = of_get_property(np, "cpus", &len); 175 cpu_handle = of_get_property(np, "cpus", &len);
176 176
177 /*
178 * the CAB SLOF tree is non compliant, so we just assume
179 * there is only one node
180 */
181 if (WARN_ON_ONCE(!cpu_handle))
182 return np;
183
177 for (i=0; i<len; i++) 184 for (i=0; i<len; i++)
178 if (of_find_node_by_phandle(cpu_handle[i]) == of_get_cpu_node(cpu_id, NULL)) 185 if (of_find_node_by_phandle(cpu_handle[i]) == of_get_cpu_node(cpu_id, NULL))
179 return np; 186 return np;
diff --git a/arch/powerpc/platforms/cell/cbe_thermal.c b/arch/powerpc/platforms/cell/cbe_thermal.c
index f370f0fa6f4c..e4132f8f51b3 100644
--- a/arch/powerpc/platforms/cell/cbe_thermal.c
+++ b/arch/powerpc/platforms/cell/cbe_thermal.c
@@ -292,7 +292,7 @@ static struct attribute_group ppe_attribute_group = {
292/* 292/*
293 * initialize throttling with default values 293 * initialize throttling with default values
294 */ 294 */
295static void __init init_default_values(void) 295static int __init init_default_values(void)
296{ 296{
297 int cpu; 297 int cpu;
298 struct cbe_pmd_regs __iomem *pmd_regs; 298 struct cbe_pmd_regs __iomem *pmd_regs;
@@ -339,25 +339,40 @@ static void __init init_default_values(void)
339 for_each_possible_cpu (cpu) { 339 for_each_possible_cpu (cpu) {
340 pr_debug("processing cpu %d\n", cpu); 340 pr_debug("processing cpu %d\n", cpu);
341 sysdev = get_cpu_sysdev(cpu); 341 sysdev = get_cpu_sysdev(cpu);
342
343 if (!sysdev) {
344 pr_info("invalid sysdev pointer for cbe_thermal\n");
345 return -EINVAL;
346 }
347
342 pmd_regs = cbe_get_cpu_pmd_regs(sysdev->id); 348 pmd_regs = cbe_get_cpu_pmd_regs(sysdev->id);
343 349
350 if (!pmd_regs) {
351 pr_info("invalid CBE regs pointer for cbe_thermal\n");
352 return -EINVAL;
353 }
354
344 out_be64(&pmd_regs->tm_str2, str2); 355 out_be64(&pmd_regs->tm_str2, str2);
345 out_be64(&pmd_regs->tm_str1.val, str1.val); 356 out_be64(&pmd_regs->tm_str1.val, str1.val);
346 out_be64(&pmd_regs->tm_tpr.val, tpr.val); 357 out_be64(&pmd_regs->tm_tpr.val, tpr.val);
347 out_be64(&pmd_regs->tm_cr1.val, cr1.val); 358 out_be64(&pmd_regs->tm_cr1.val, cr1.val);
348 out_be64(&pmd_regs->tm_cr2, cr2); 359 out_be64(&pmd_regs->tm_cr2, cr2);
349 } 360 }
361
362 return 0;
350} 363}
351 364
352 365
353static int __init thermal_init(void) 366static int __init thermal_init(void)
354{ 367{
355 init_default_values(); 368 int rc = init_default_values();
356 369
357 spu_add_sysdev_attr_group(&spu_attribute_group); 370 if (rc == 0) {
358 cpu_add_sysdev_attr_group(&ppe_attribute_group); 371 spu_add_sysdev_attr_group(&spu_attribute_group);
372 cpu_add_sysdev_attr_group(&ppe_attribute_group);
373 }
359 374
360 return 0; 375 return rc;
361} 376}
362module_init(thermal_init); 377module_init(thermal_init);
363 378
diff --git a/arch/powerpc/platforms/cell/io-workarounds.c b/arch/powerpc/platforms/cell/io-workarounds.c
index 7fb92f23f380..9d7c2ef940a8 100644
--- a/arch/powerpc/platforms/cell/io-workarounds.c
+++ b/arch/powerpc/platforms/cell/io-workarounds.c
@@ -102,7 +102,7 @@ static void spider_io_flush(const volatile void __iomem *addr)
102 vaddr = (unsigned long)PCI_FIX_ADDR(addr); 102 vaddr = (unsigned long)PCI_FIX_ADDR(addr);
103 103
104 /* Check if it's in allowed range for PIO */ 104 /* Check if it's in allowed range for PIO */
105 if (vaddr < PHBS_IO_BASE || vaddr >= IMALLOC_BASE) 105 if (vaddr < PHB_IO_BASE || vaddr > PHB_IO_END)
106 return; 106 return;
107 107
108 /* Try to find a PTE. If not, clear the paddr, we'll do 108 /* Try to find a PTE. If not, clear the paddr, we'll do
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index a7f5a7653c62..90124228b8f4 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -31,21 +31,41 @@
31#include <linux/mm.h> 31#include <linux/mm.h>
32#include <linux/io.h> 32#include <linux/io.h>
33#include <linux/mutex.h> 33#include <linux/mutex.h>
34#include <linux/linux_logo.h>
34#include <asm/spu.h> 35#include <asm/spu.h>
35#include <asm/spu_priv1.h> 36#include <asm/spu_priv1.h>
36#include <asm/xmon.h> 37#include <asm/xmon.h>
38#include <asm/prom.h>
39#include "spu_priv1_mmio.h"
37 40
38const struct spu_management_ops *spu_management_ops; 41const struct spu_management_ops *spu_management_ops;
39EXPORT_SYMBOL_GPL(spu_management_ops); 42EXPORT_SYMBOL_GPL(spu_management_ops);
40 43
41const struct spu_priv1_ops *spu_priv1_ops; 44const struct spu_priv1_ops *spu_priv1_ops;
45EXPORT_SYMBOL_GPL(spu_priv1_ops);
42 46
43static struct list_head spu_list[MAX_NUMNODES]; 47struct cbe_spu_info cbe_spu_info[MAX_NUMNODES];
44static LIST_HEAD(spu_full_list); 48EXPORT_SYMBOL_GPL(cbe_spu_info);
45static DEFINE_MUTEX(spu_mutex);
46static DEFINE_SPINLOCK(spu_list_lock);
47 49
48EXPORT_SYMBOL_GPL(spu_priv1_ops); 50/*
51 * Protects cbe_spu_info and spu->number.
52 */
53static DEFINE_SPINLOCK(spu_lock);
54
55/*
56 * List of all spus in the system.
57 *
58 * This list is iterated by callers from irq context and callers that
59 * want to sleep. Thus modifications need to be done with both
60 * spu_full_list_lock and spu_full_list_mutex held, while iterating
61 * through it requires either of these locks.
62 *
63 * In addition spu_full_list_lock protects all assignmens to
64 * spu->mm.
65 */
66static LIST_HEAD(spu_full_list);
67static DEFINE_SPINLOCK(spu_full_list_lock);
68static DEFINE_MUTEX(spu_full_list_mutex);
49 69
50void spu_invalidate_slbs(struct spu *spu) 70void spu_invalidate_slbs(struct spu *spu)
51{ 71{
@@ -64,12 +84,12 @@ void spu_flush_all_slbs(struct mm_struct *mm)
64 struct spu *spu; 84 struct spu *spu;
65 unsigned long flags; 85 unsigned long flags;
66 86
67 spin_lock_irqsave(&spu_list_lock, flags); 87 spin_lock_irqsave(&spu_full_list_lock, flags);
68 list_for_each_entry(spu, &spu_full_list, full_list) { 88 list_for_each_entry(spu, &spu_full_list, full_list) {
69 if (spu->mm == mm) 89 if (spu->mm == mm)
70 spu_invalidate_slbs(spu); 90 spu_invalidate_slbs(spu);
71 } 91 }
72 spin_unlock_irqrestore(&spu_list_lock, flags); 92 spin_unlock_irqrestore(&spu_full_list_lock, flags);
73} 93}
74 94
75/* The hack below stinks... try to do something better one of 95/* The hack below stinks... try to do something better one of
@@ -87,9 +107,9 @@ void spu_associate_mm(struct spu *spu, struct mm_struct *mm)
87{ 107{
88 unsigned long flags; 108 unsigned long flags;
89 109
90 spin_lock_irqsave(&spu_list_lock, flags); 110 spin_lock_irqsave(&spu_full_list_lock, flags);
91 spu->mm = mm; 111 spu->mm = mm;
92 spin_unlock_irqrestore(&spu_list_lock, flags); 112 spin_unlock_irqrestore(&spu_full_list_lock, flags);
93 if (mm) 113 if (mm)
94 mm_needs_global_tlbie(mm); 114 mm_needs_global_tlbie(mm);
95} 115}
@@ -183,7 +203,7 @@ static int __spu_trap_data_seg(struct spu *spu, unsigned long ea)
183 spu->slb_replace = 0; 203 spu->slb_replace = 0;
184 204
185 spu_restart_dma(spu); 205 spu_restart_dma(spu);
186 206 spu->stats.slb_flt++;
187 return 0; 207 return 0;
188} 208}
189 209
@@ -332,6 +352,7 @@ spu_irq_class_2(int irq, void *data)
332 if (stat & 0x10) /* SPU mailbox threshold */ 352 if (stat & 0x10) /* SPU mailbox threshold */
333 spu->wbox_callback(spu); 353 spu->wbox_callback(spu);
334 354
355 spu->stats.class2_intr++;
335 return stat ? IRQ_HANDLED : IRQ_NONE; 356 return stat ? IRQ_HANDLED : IRQ_NONE;
336} 357}
337 358
@@ -388,7 +409,7 @@ static void spu_free_irqs(struct spu *spu)
388 free_irq(spu->irqs[2], spu); 409 free_irq(spu->irqs[2], spu);
389} 410}
390 411
391static void spu_init_channels(struct spu *spu) 412void spu_init_channels(struct spu *spu)
392{ 413{
393 static const struct { 414 static const struct {
394 unsigned channel; 415 unsigned channel;
@@ -421,60 +442,31 @@ static void spu_init_channels(struct spu *spu)
421 out_be64(&priv2->spu_chnlcnt_RW, count_list[i].count); 442 out_be64(&priv2->spu_chnlcnt_RW, count_list[i].count);
422 } 443 }
423} 444}
445EXPORT_SYMBOL_GPL(spu_init_channels);
424 446
425struct spu *spu_alloc_node(int node) 447static int spu_shutdown(struct sys_device *sysdev)
426{ 448{
427 struct spu *spu = NULL; 449 struct spu *spu = container_of(sysdev, struct spu, sysdev);
428
429 mutex_lock(&spu_mutex);
430 if (!list_empty(&spu_list[node])) {
431 spu = list_entry(spu_list[node].next, struct spu, list);
432 list_del_init(&spu->list);
433 pr_debug("Got SPU %d %d\n", spu->number, spu->node);
434 }
435 mutex_unlock(&spu_mutex);
436
437 if (spu)
438 spu_init_channels(spu);
439 return spu;
440}
441EXPORT_SYMBOL_GPL(spu_alloc_node);
442
443struct spu *spu_alloc(void)
444{
445 struct spu *spu = NULL;
446 int node;
447
448 for (node = 0; node < MAX_NUMNODES; node++) {
449 spu = spu_alloc_node(node);
450 if (spu)
451 break;
452 }
453
454 return spu;
455}
456 450
457void spu_free(struct spu *spu) 451 spu_free_irqs(spu);
458{ 452 spu_destroy_spu(spu);
459 mutex_lock(&spu_mutex); 453 return 0;
460 list_add_tail(&spu->list, &spu_list[spu->node]);
461 mutex_unlock(&spu_mutex);
462} 454}
463EXPORT_SYMBOL_GPL(spu_free);
464 455
465struct sysdev_class spu_sysdev_class = { 456struct sysdev_class spu_sysdev_class = {
466 set_kset_name("spu") 457 set_kset_name("spu"),
458 .shutdown = spu_shutdown,
467}; 459};
468 460
469int spu_add_sysdev_attr(struct sysdev_attribute *attr) 461int spu_add_sysdev_attr(struct sysdev_attribute *attr)
470{ 462{
471 struct spu *spu; 463 struct spu *spu;
472 mutex_lock(&spu_mutex);
473 464
465 mutex_lock(&spu_full_list_mutex);
474 list_for_each_entry(spu, &spu_full_list, full_list) 466 list_for_each_entry(spu, &spu_full_list, full_list)
475 sysdev_create_file(&spu->sysdev, attr); 467 sysdev_create_file(&spu->sysdev, attr);
468 mutex_unlock(&spu_full_list_mutex);
476 469
477 mutex_unlock(&spu_mutex);
478 return 0; 470 return 0;
479} 471}
480EXPORT_SYMBOL_GPL(spu_add_sysdev_attr); 472EXPORT_SYMBOL_GPL(spu_add_sysdev_attr);
@@ -482,12 +474,12 @@ EXPORT_SYMBOL_GPL(spu_add_sysdev_attr);
482int spu_add_sysdev_attr_group(struct attribute_group *attrs) 474int spu_add_sysdev_attr_group(struct attribute_group *attrs)
483{ 475{
484 struct spu *spu; 476 struct spu *spu;
485 mutex_lock(&spu_mutex);
486 477
478 mutex_lock(&spu_full_list_mutex);
487 list_for_each_entry(spu, &spu_full_list, full_list) 479 list_for_each_entry(spu, &spu_full_list, full_list)
488 sysfs_create_group(&spu->sysdev.kobj, attrs); 480 sysfs_create_group(&spu->sysdev.kobj, attrs);
481 mutex_unlock(&spu_full_list_mutex);
489 482
490 mutex_unlock(&spu_mutex);
491 return 0; 483 return 0;
492} 484}
493EXPORT_SYMBOL_GPL(spu_add_sysdev_attr_group); 485EXPORT_SYMBOL_GPL(spu_add_sysdev_attr_group);
@@ -496,24 +488,22 @@ EXPORT_SYMBOL_GPL(spu_add_sysdev_attr_group);
496void spu_remove_sysdev_attr(struct sysdev_attribute *attr) 488void spu_remove_sysdev_attr(struct sysdev_attribute *attr)
497{ 489{
498 struct spu *spu; 490 struct spu *spu;
499 mutex_lock(&spu_mutex);
500 491
492 mutex_lock(&spu_full_list_mutex);
501 list_for_each_entry(spu, &spu_full_list, full_list) 493 list_for_each_entry(spu, &spu_full_list, full_list)
502 sysdev_remove_file(&spu->sysdev, attr); 494 sysdev_remove_file(&spu->sysdev, attr);
503 495 mutex_unlock(&spu_full_list_mutex);
504 mutex_unlock(&spu_mutex);
505} 496}
506EXPORT_SYMBOL_GPL(spu_remove_sysdev_attr); 497EXPORT_SYMBOL_GPL(spu_remove_sysdev_attr);
507 498
508void spu_remove_sysdev_attr_group(struct attribute_group *attrs) 499void spu_remove_sysdev_attr_group(struct attribute_group *attrs)
509{ 500{
510 struct spu *spu; 501 struct spu *spu;
511 mutex_lock(&spu_mutex);
512 502
503 mutex_lock(&spu_full_list_mutex);
513 list_for_each_entry(spu, &spu_full_list, full_list) 504 list_for_each_entry(spu, &spu_full_list, full_list)
514 sysfs_remove_group(&spu->sysdev.kobj, attrs); 505 sysfs_remove_group(&spu->sysdev.kobj, attrs);
515 506 mutex_unlock(&spu_full_list_mutex);
516 mutex_unlock(&spu_mutex);
517} 507}
518EXPORT_SYMBOL_GPL(spu_remove_sysdev_attr_group); 508EXPORT_SYMBOL_GPL(spu_remove_sysdev_attr_group);
519 509
@@ -541,16 +531,19 @@ static int __init create_spu(void *data)
541 int ret; 531 int ret;
542 static int number; 532 static int number;
543 unsigned long flags; 533 unsigned long flags;
534 struct timespec ts;
544 535
545 ret = -ENOMEM; 536 ret = -ENOMEM;
546 spu = kzalloc(sizeof (*spu), GFP_KERNEL); 537 spu = kzalloc(sizeof (*spu), GFP_KERNEL);
547 if (!spu) 538 if (!spu)
548 goto out; 539 goto out;
549 540
541 spu->alloc_state = SPU_FREE;
542
550 spin_lock_init(&spu->register_lock); 543 spin_lock_init(&spu->register_lock);
551 mutex_lock(&spu_mutex); 544 spin_lock(&spu_lock);
552 spu->number = number++; 545 spu->number = number++;
553 mutex_unlock(&spu_mutex); 546 spin_unlock(&spu_lock);
554 547
555 ret = spu_create_spu(spu, data); 548 ret = spu_create_spu(spu, data);
556 549
@@ -567,12 +560,22 @@ static int __init create_spu(void *data)
567 if (ret) 560 if (ret)
568 goto out_free_irqs; 561 goto out_free_irqs;
569 562
570 mutex_lock(&spu_mutex); 563 mutex_lock(&cbe_spu_info[spu->node].list_mutex);
571 spin_lock_irqsave(&spu_list_lock, flags); 564 list_add(&spu->cbe_list, &cbe_spu_info[spu->node].spus);
572 list_add(&spu->list, &spu_list[spu->node]); 565 cbe_spu_info[spu->node].n_spus++;
566 mutex_unlock(&cbe_spu_info[spu->node].list_mutex);
567
568 mutex_lock(&spu_full_list_mutex);
569 spin_lock_irqsave(&spu_full_list_lock, flags);
573 list_add(&spu->full_list, &spu_full_list); 570 list_add(&spu->full_list, &spu_full_list);
574 spin_unlock_irqrestore(&spu_list_lock, flags); 571 spin_unlock_irqrestore(&spu_full_list_lock, flags);
575 mutex_unlock(&spu_mutex); 572 mutex_unlock(&spu_full_list_mutex);
573
574 spu->stats.util_state = SPU_UTIL_IDLE_LOADED;
575 ktime_get_ts(&ts);
576 spu->stats.tstamp = timespec_to_ns(&ts);
577
578 INIT_LIST_HEAD(&spu->aff_list);
576 579
577 goto out; 580 goto out;
578 581
@@ -586,12 +589,193 @@ out:
586 return ret; 589 return ret;
587} 590}
588 591
592static const char *spu_state_names[] = {
593 "user", "system", "iowait", "idle"
594};
595
596static unsigned long long spu_acct_time(struct spu *spu,
597 enum spu_utilization_state state)
598{
599 struct timespec ts;
600 unsigned long long time = spu->stats.times[state];
601
602 /*
603 * If the spu is idle or the context is stopped, utilization
604 * statistics are not updated. Apply the time delta from the
605 * last recorded state of the spu.
606 */
607 if (spu->stats.util_state == state) {
608 ktime_get_ts(&ts);
609 time += timespec_to_ns(&ts) - spu->stats.tstamp;
610 }
611
612 return time / NSEC_PER_MSEC;
613}
614
615
616static ssize_t spu_stat_show(struct sys_device *sysdev, char *buf)
617{
618 struct spu *spu = container_of(sysdev, struct spu, sysdev);
619
620 return sprintf(buf, "%s %llu %llu %llu %llu "
621 "%llu %llu %llu %llu %llu %llu %llu %llu\n",
622 spu_state_names[spu->stats.util_state],
623 spu_acct_time(spu, SPU_UTIL_USER),
624 spu_acct_time(spu, SPU_UTIL_SYSTEM),
625 spu_acct_time(spu, SPU_UTIL_IOWAIT),
626 spu_acct_time(spu, SPU_UTIL_IDLE_LOADED),
627 spu->stats.vol_ctx_switch,
628 spu->stats.invol_ctx_switch,
629 spu->stats.slb_flt,
630 spu->stats.hash_flt,
631 spu->stats.min_flt,
632 spu->stats.maj_flt,
633 spu->stats.class2_intr,
634 spu->stats.libassist);
635}
636
637static SYSDEV_ATTR(stat, 0644, spu_stat_show, NULL);
638
639/* Hardcoded affinity idxs for QS20 */
640#define SPES_PER_BE 8
641static int QS20_reg_idxs[SPES_PER_BE] = { 0, 2, 4, 6, 7, 5, 3, 1 };
642static int QS20_reg_memory[SPES_PER_BE] = { 1, 1, 0, 0, 0, 0, 0, 0 };
643
644static struct spu *spu_lookup_reg(int node, u32 reg)
645{
646 struct spu *spu;
647
648 list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) {
649 if (*(u32 *)get_property(spu_devnode(spu), "reg", NULL) == reg)
650 return spu;
651 }
652 return NULL;
653}
654
655static void init_aff_QS20_harcoded(void)
656{
657 int node, i;
658 struct spu *last_spu, *spu;
659 u32 reg;
660
661 for (node = 0; node < MAX_NUMNODES; node++) {
662 last_spu = NULL;
663 for (i = 0; i < SPES_PER_BE; i++) {
664 reg = QS20_reg_idxs[i];
665 spu = spu_lookup_reg(node, reg);
666 if (!spu)
667 continue;
668 spu->has_mem_affinity = QS20_reg_memory[reg];
669 if (last_spu)
670 list_add_tail(&spu->aff_list,
671 &last_spu->aff_list);
672 last_spu = spu;
673 }
674 }
675}
676
677static int of_has_vicinity(void)
678{
679 struct spu* spu;
680
681 spu = list_entry(cbe_spu_info[0].spus.next, struct spu, cbe_list);
682 return of_find_property(spu_devnode(spu), "vicinity", NULL) != NULL;
683}
684
685static struct spu *aff_devnode_spu(int cbe, struct device_node *dn)
686{
687 struct spu *spu;
688
689 list_for_each_entry(spu, &cbe_spu_info[cbe].spus, cbe_list)
690 if (spu_devnode(spu) == dn)
691 return spu;
692 return NULL;
693}
694
695static struct spu *
696aff_node_next_to(int cbe, struct device_node *target, struct device_node *avoid)
697{
698 struct spu *spu;
699 const phandle *vic_handles;
700 int lenp, i;
701
702 list_for_each_entry(spu, &cbe_spu_info[cbe].spus, cbe_list) {
703 if (spu_devnode(spu) == avoid)
704 continue;
705 vic_handles = get_property(spu_devnode(spu), "vicinity", &lenp);
706 for (i=0; i < (lenp / sizeof(phandle)); i++) {
707 if (vic_handles[i] == target->linux_phandle)
708 return spu;
709 }
710 }
711 return NULL;
712}
713
714static void init_aff_fw_vicinity_node(int cbe)
715{
716 struct spu *spu, *last_spu;
717 struct device_node *vic_dn, *last_spu_dn;
718 phandle avoid_ph;
719 const phandle *vic_handles;
720 const char *name;
721 int lenp, i, added, mem_aff;
722
723 last_spu = list_entry(cbe_spu_info[cbe].spus.next, struct spu, cbe_list);
724 avoid_ph = 0;
725 for (added = 1; added < cbe_spu_info[cbe].n_spus; added++) {
726 last_spu_dn = spu_devnode(last_spu);
727 vic_handles = get_property(last_spu_dn, "vicinity", &lenp);
728
729 for (i = 0; i < (lenp / sizeof(phandle)); i++) {
730 if (vic_handles[i] == avoid_ph)
731 continue;
732
733 vic_dn = of_find_node_by_phandle(vic_handles[i]);
734 if (!vic_dn)
735 continue;
736
737 name = get_property(vic_dn, "name", NULL);
738 if (strcmp(name, "spe") == 0) {
739 spu = aff_devnode_spu(cbe, vic_dn);
740 avoid_ph = last_spu_dn->linux_phandle;
741 }
742 else {
743 mem_aff = strcmp(name, "mic-tm") == 0;
744 spu = aff_node_next_to(cbe, vic_dn, last_spu_dn);
745 if (!spu)
746 continue;
747 if (mem_aff) {
748 last_spu->has_mem_affinity = 1;
749 spu->has_mem_affinity = 1;
750 }
751 avoid_ph = vic_dn->linux_phandle;
752 }
753 list_add_tail(&spu->aff_list, &last_spu->aff_list);
754 last_spu = spu;
755 break;
756 }
757 }
758}
759
760static void init_aff_fw_vicinity(void)
761{
762 int cbe;
763
764 /* sets has_mem_affinity for each spu, as long as the
765 * spu->aff_list list, linking each spu to its neighbors
766 */
767 for (cbe = 0; cbe < MAX_NUMNODES; cbe++)
768 init_aff_fw_vicinity_node(cbe);
769}
770
589static int __init init_spu_base(void) 771static int __init init_spu_base(void)
590{ 772{
591 int i, ret = 0; 773 int i, ret = 0;
592 774
593 for (i = 0; i < MAX_NUMNODES; i++) 775 for (i = 0; i < MAX_NUMNODES; i++) {
594 INIT_LIST_HEAD(&spu_list[i]); 776 mutex_init(&cbe_spu_info[i].list_mutex);
777 INIT_LIST_HEAD(&cbe_spu_info[i].spus);
778 }
595 779
596 if (!spu_management_ops) 780 if (!spu_management_ops)
597 goto out; 781 goto out;
@@ -603,20 +787,43 @@ static int __init init_spu_base(void)
603 787
604 ret = spu_enumerate_spus(create_spu); 788 ret = spu_enumerate_spus(create_spu);
605 789
606 if (ret) { 790 if (ret < 0) {
607 printk(KERN_WARNING "%s: Error initializing spus\n", 791 printk(KERN_WARNING "%s: Error initializing spus\n",
608 __FUNCTION__); 792 __FUNCTION__);
609 goto out_unregister_sysdev_class; 793 goto out_unregister_sysdev_class;
610 } 794 }
611 795
796 if (ret > 0) {
797 /*
798 * We cannot put the forward declaration in
799 * <linux/linux_logo.h> because of conflicting session type
800 * conflicts for const and __initdata with different compiler
801 * versions
802 */
803 extern const struct linux_logo logo_spe_clut224;
804
805 fb_append_extra_logo(&logo_spe_clut224, ret);
806 }
807
808 mutex_lock(&spu_full_list_mutex);
612 xmon_register_spus(&spu_full_list); 809 xmon_register_spus(&spu_full_list);
810 crash_register_spus(&spu_full_list);
811 mutex_unlock(&spu_full_list_mutex);
812 spu_add_sysdev_attr(&attr_stat);
813
814 if (of_has_vicinity()) {
815 init_aff_fw_vicinity();
816 } else {
817 long root = of_get_flat_dt_root();
818 if (of_flat_dt_is_compatible(root, "IBM,CPBW-1.0"))
819 init_aff_QS20_harcoded();
820 }
613 821
614 return 0; 822 return 0;
615 823
616 out_unregister_sysdev_class: 824 out_unregister_sysdev_class:
617 sysdev_class_unregister(&spu_sysdev_class); 825 sysdev_class_unregister(&spu_sysdev_class);
618 out: 826 out:
619
620 return ret; 827 return ret;
621} 828}
622module_init(init_spu_base); 829module_init(init_spu_base);
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c
index 1d4562ae463d..75ed50fcc3db 100644
--- a/arch/powerpc/platforms/cell/spu_manage.c
+++ b/arch/powerpc/platforms/cell/spu_manage.c
@@ -279,6 +279,7 @@ static int __init of_enumerate_spus(int (*fn)(void *data))
279{ 279{
280 int ret; 280 int ret;
281 struct device_node *node; 281 struct device_node *node;
282 unsigned int n = 0;
282 283
283 ret = -ENODEV; 284 ret = -ENODEV;
284 for (node = of_find_node_by_type(NULL, "spe"); 285 for (node = of_find_node_by_type(NULL, "spe");
@@ -289,8 +290,9 @@ static int __init of_enumerate_spus(int (*fn)(void *data))
289 __FUNCTION__, node->name); 290 __FUNCTION__, node->name);
290 break; 291 break;
291 } 292 }
293 n++;
292 } 294 }
293 return ret; 295 return ret ? ret : n;
294} 296}
295 297
296static int __init of_create_spu(struct spu *spu, void *data) 298static int __init of_create_spu(struct spu *spu, void *data)
diff --git a/arch/powerpc/platforms/cell/spu_syscalls.c b/arch/powerpc/platforms/cell/spu_syscalls.c
index 261b507a901a..dd2c6688c8aa 100644
--- a/arch/powerpc/platforms/cell/spu_syscalls.c
+++ b/arch/powerpc/platforms/cell/spu_syscalls.c
@@ -34,14 +34,27 @@ struct spufs_calls spufs_calls = {
34 * this file is not used and the syscalls directly enter the fs code */ 34 * this file is not used and the syscalls directly enter the fs code */
35 35
36asmlinkage long sys_spu_create(const char __user *name, 36asmlinkage long sys_spu_create(const char __user *name,
37 unsigned int flags, mode_t mode) 37 unsigned int flags, mode_t mode, int neighbor_fd)
38{ 38{
39 long ret; 39 long ret;
40 struct module *owner = spufs_calls.owner; 40 struct module *owner = spufs_calls.owner;
41 struct file *neighbor;
42 int fput_needed;
41 43
42 ret = -ENOSYS; 44 ret = -ENOSYS;
43 if (owner && try_module_get(owner)) { 45 if (owner && try_module_get(owner)) {
44 ret = spufs_calls.create_thread(name, flags, mode); 46 if (flags & SPU_CREATE_AFFINITY_SPU) {
47 neighbor = fget_light(neighbor_fd, &fput_needed);
48 if (neighbor) {
49 ret = spufs_calls.create_thread(name, flags,
50 mode, neighbor);
51 fput_light(neighbor, fput_needed);
52 }
53 }
54 else {
55 ret = spufs_calls.create_thread(name, flags,
56 mode, NULL);
57 }
45 module_put(owner); 58 module_put(owner);
46 } 59 }
47 return ret; 60 return ret;
diff --git a/arch/powerpc/platforms/cell/spufs/backing_ops.c b/arch/powerpc/platforms/cell/spufs/backing_ops.c
index d32db9ffc6eb..07a0e815abf5 100644
--- a/arch/powerpc/platforms/cell/spufs/backing_ops.c
+++ b/arch/powerpc/platforms/cell/spufs/backing_ops.c
@@ -320,6 +320,12 @@ static int spu_backing_set_mfc_query(struct spu_context * ctx, u32 mask,
320 /* FIXME: what are the side-effects of this? */ 320 /* FIXME: what are the side-effects of this? */
321 prob->dma_querymask_RW = mask; 321 prob->dma_querymask_RW = mask;
322 prob->dma_querytype_RW = mode; 322 prob->dma_querytype_RW = mode;
323 /* In the current implementation, the SPU context is always
324 * acquired in runnable state when new bits are added to the
325 * mask (tagwait), so it's sufficient just to mask
326 * dma_tagstatus_R with the 'mask' parameter here.
327 */
328 ctx->csa.prob.dma_tagstatus_R &= mask;
323out: 329out:
324 spin_unlock(&ctx->csa.register_lock); 330 spin_unlock(&ctx->csa.register_lock);
325 331
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
index 8654749e317b..6694f86d7000 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -22,11 +22,16 @@
22 22
23#include <linux/fs.h> 23#include <linux/fs.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <linux/module.h>
25#include <linux/slab.h> 26#include <linux/slab.h>
27#include <asm/atomic.h>
26#include <asm/spu.h> 28#include <asm/spu.h>
27#include <asm/spu_csa.h> 29#include <asm/spu_csa.h>
28#include "spufs.h" 30#include "spufs.h"
29 31
32
33atomic_t nr_spu_contexts = ATOMIC_INIT(0);
34
30struct spu_context *alloc_spu_context(struct spu_gang *gang) 35struct spu_context *alloc_spu_context(struct spu_gang *gang)
31{ 36{
32 struct spu_context *ctx; 37 struct spu_context *ctx;
@@ -39,7 +44,7 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
39 if (spu_init_csa(&ctx->csa)) 44 if (spu_init_csa(&ctx->csa))
40 goto out_free; 45 goto out_free;
41 spin_lock_init(&ctx->mmio_lock); 46 spin_lock_init(&ctx->mmio_lock);
42 spin_lock_init(&ctx->mapping_lock); 47 mutex_init(&ctx->mapping_lock);
43 kref_init(&ctx->kref); 48 kref_init(&ctx->kref);
44 mutex_init(&ctx->state_mutex); 49 mutex_init(&ctx->state_mutex);
45 mutex_init(&ctx->run_mutex); 50 mutex_init(&ctx->run_mutex);
@@ -51,12 +56,14 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
51 ctx->ops = &spu_backing_ops; 56 ctx->ops = &spu_backing_ops;
52 ctx->owner = get_task_mm(current); 57 ctx->owner = get_task_mm(current);
53 INIT_LIST_HEAD(&ctx->rq); 58 INIT_LIST_HEAD(&ctx->rq);
59 INIT_LIST_HEAD(&ctx->aff_list);
54 if (gang) 60 if (gang)
55 spu_gang_add_ctx(gang, ctx); 61 spu_gang_add_ctx(gang, ctx);
56 ctx->rt_priority = current->rt_priority; 62 ctx->cpus_allowed = current->cpus_allowed;
57 ctx->policy = current->policy; 63 spu_set_timeslice(ctx);
58 ctx->prio = current->prio; 64 ctx->stats.util_state = SPU_UTIL_IDLE_LOADED;
59 INIT_DELAYED_WORK(&ctx->sched_work, spu_sched_tick); 65
66 atomic_inc(&nr_spu_contexts);
60 goto out; 67 goto out;
61out_free: 68out_free:
62 kfree(ctx); 69 kfree(ctx);
@@ -75,7 +82,10 @@ void destroy_spu_context(struct kref *kref)
75 spu_fini_csa(&ctx->csa); 82 spu_fini_csa(&ctx->csa);
76 if (ctx->gang) 83 if (ctx->gang)
77 spu_gang_remove_ctx(ctx->gang, ctx); 84 spu_gang_remove_ctx(ctx->gang, ctx);
85 if (ctx->prof_priv_kref)
86 kref_put(ctx->prof_priv_kref, ctx->prof_priv_release);
78 BUG_ON(!list_empty(&ctx->rq)); 87 BUG_ON(!list_empty(&ctx->rq));
88 atomic_dec(&nr_spu_contexts);
79 kfree(ctx); 89 kfree(ctx);
80} 90}
81 91
@@ -103,6 +113,7 @@ void spu_forget(struct spu_context *ctx)
103 113
104void spu_unmap_mappings(struct spu_context *ctx) 114void spu_unmap_mappings(struct spu_context *ctx)
105{ 115{
116 mutex_lock(&ctx->mapping_lock);
106 if (ctx->local_store) 117 if (ctx->local_store)
107 unmap_mapping_range(ctx->local_store, 0, LS_SIZE, 1); 118 unmap_mapping_range(ctx->local_store, 0, LS_SIZE, 1);
108 if (ctx->mfc) 119 if (ctx->mfc)
@@ -117,6 +128,7 @@ void spu_unmap_mappings(struct spu_context *ctx)
117 unmap_mapping_range(ctx->mss, 0, 0x1000, 1); 128 unmap_mapping_range(ctx->mss, 0, 0x1000, 1);
118 if (ctx->psmap) 129 if (ctx->psmap)
119 unmap_mapping_range(ctx->psmap, 0, 0x20000, 1); 130 unmap_mapping_range(ctx->psmap, 0, 0x20000, 1);
131 mutex_unlock(&ctx->mapping_lock);
120} 132}
121 133
122/** 134/**
@@ -157,6 +169,39 @@ int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags)
157void spu_acquire_saved(struct spu_context *ctx) 169void spu_acquire_saved(struct spu_context *ctx)
158{ 170{
159 spu_acquire(ctx); 171 spu_acquire(ctx);
160 if (ctx->state != SPU_STATE_SAVED) 172 if (ctx->state != SPU_STATE_SAVED) {
173 set_bit(SPU_SCHED_WAS_ACTIVE, &ctx->sched_flags);
161 spu_deactivate(ctx); 174 spu_deactivate(ctx);
175 }
176}
177
178/**
179 * spu_release_saved - unlock spu context and return it to the runqueue
180 * @ctx: context to unlock
181 */
182void spu_release_saved(struct spu_context *ctx)
183{
184 BUG_ON(ctx->state != SPU_STATE_SAVED);
185
186 if (test_and_clear_bit(SPU_SCHED_WAS_ACTIVE, &ctx->sched_flags))
187 spu_activate(ctx, 0);
188
189 spu_release(ctx);
190}
191
192void spu_set_profile_private_kref(struct spu_context *ctx,
193 struct kref *prof_info_kref,
194 void ( * prof_info_release) (struct kref *kref))
195{
196 ctx->prof_priv_kref = prof_info_kref;
197 ctx->prof_priv_release = prof_info_release;
162} 198}
199EXPORT_SYMBOL_GPL(spu_set_profile_private_kref);
200
201void *spu_get_profile_private_kref(struct spu_context *ctx)
202{
203 return ctx->prof_priv_kref;
204}
205EXPORT_SYMBOL_GPL(spu_get_profile_private_kref);
206
207
diff --git a/arch/powerpc/platforms/cell/spufs/coredump.c b/arch/powerpc/platforms/cell/spufs/coredump.c
index 5d9ad5a0307b..5e31799b1e3f 100644
--- a/arch/powerpc/platforms/cell/spufs/coredump.c
+++ b/arch/powerpc/platforms/cell/spufs/coredump.c
@@ -226,7 +226,7 @@ static void spufs_arch_write_notes(struct file *file)
226 spu_acquire_saved(ctx_info->ctx); 226 spu_acquire_saved(ctx_info->ctx);
227 for (j = 0; j < spufs_coredump_num_notes; j++) 227 for (j = 0; j < spufs_coredump_num_notes; j++)
228 spufs_arch_write_note(ctx_info, j, file); 228 spufs_arch_write_note(ctx_info, j, file);
229 spu_release(ctx_info->ctx); 229 spu_release_saved(ctx_info->ctx);
230 list_del(&ctx_info->list); 230 list_del(&ctx_info->list);
231 kfree(ctx_info); 231 kfree(ctx_info);
232 } 232 }
diff --git a/arch/powerpc/platforms/cell/spufs/fault.c b/arch/powerpc/platforms/cell/spufs/fault.c
index 0f75c07e29d8..917eab4be486 100644
--- a/arch/powerpc/platforms/cell/spufs/fault.c
+++ b/arch/powerpc/platforms/cell/spufs/fault.c
@@ -33,7 +33,8 @@
33 * function. Currently, there are a few corner cases that we haven't had 33 * function. Currently, there are a few corner cases that we haven't had
34 * to handle fortunately. 34 * to handle fortunately.
35 */ 35 */
36static int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea, unsigned long dsisr) 36static int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
37 unsigned long dsisr, unsigned *flt)
37{ 38{
38 struct vm_area_struct *vma; 39 struct vm_area_struct *vma;
39 unsigned long is_write; 40 unsigned long is_write;
@@ -73,22 +74,21 @@ good_area:
73 goto bad_area; 74 goto bad_area;
74 } 75 }
75 ret = 0; 76 ret = 0;
76 switch (handle_mm_fault(mm, vma, ea, is_write)) { 77 *flt = handle_mm_fault(mm, vma, ea, is_write);
77 case VM_FAULT_MINOR: 78 if (unlikely(*flt & VM_FAULT_ERROR)) {
78 current->min_flt++; 79 if (*flt & VM_FAULT_OOM) {
79 break; 80 ret = -ENOMEM;
80 case VM_FAULT_MAJOR: 81 goto bad_area;
81 current->maj_flt++; 82 } else if (*flt & VM_FAULT_SIGBUS) {
82 break; 83 ret = -EFAULT;
83 case VM_FAULT_SIGBUS: 84 goto bad_area;
84 ret = -EFAULT; 85 }
85 goto bad_area;
86 case VM_FAULT_OOM:
87 ret = -ENOMEM;
88 goto bad_area;
89 default:
90 BUG(); 86 BUG();
91 } 87 }
88 if (*flt & VM_FAULT_MAJOR)
89 current->maj_flt++;
90 else
91 current->min_flt++;
92 up_read(&mm->mmap_sem); 92 up_read(&mm->mmap_sem);
93 return ret; 93 return ret;
94 94
@@ -153,6 +153,7 @@ int spufs_handle_class1(struct spu_context *ctx)
153{ 153{
154 u64 ea, dsisr, access; 154 u64 ea, dsisr, access;
155 unsigned long flags; 155 unsigned long flags;
156 unsigned flt = 0;
156 int ret; 157 int ret;
157 158
158 /* 159 /*
@@ -178,9 +179,15 @@ int spufs_handle_class1(struct spu_context *ctx)
178 if (!(dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED))) 179 if (!(dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED)))
179 return 0; 180 return 0;
180 181
182 spuctx_switch_state(ctx, SPU_UTIL_IOWAIT);
183
181 pr_debug("ctx %p: ea %016lx, dsisr %016lx state %d\n", ctx, ea, 184 pr_debug("ctx %p: ea %016lx, dsisr %016lx state %d\n", ctx, ea,
182 dsisr, ctx->state); 185 dsisr, ctx->state);
183 186
187 ctx->stats.hash_flt++;
188 if (ctx->state == SPU_STATE_RUNNABLE)
189 ctx->spu->stats.hash_flt++;
190
184 /* we must not hold the lock when entering spu_handle_mm_fault */ 191 /* we must not hold the lock when entering spu_handle_mm_fault */
185 spu_release(ctx); 192 spu_release(ctx);
186 193
@@ -192,7 +199,7 @@ int spufs_handle_class1(struct spu_context *ctx)
192 199
193 /* hashing failed, so try the actual fault handler */ 200 /* hashing failed, so try the actual fault handler */
194 if (ret) 201 if (ret)
195 ret = spu_handle_mm_fault(current->mm, ea, dsisr); 202 ret = spu_handle_mm_fault(current->mm, ea, dsisr, &flt);
196 203
197 spu_acquire(ctx); 204 spu_acquire(ctx);
198 /* 205 /*
@@ -201,11 +208,23 @@ int spufs_handle_class1(struct spu_context *ctx)
201 * In case of unhandled error report the problem to user space. 208 * In case of unhandled error report the problem to user space.
202 */ 209 */
203 if (!ret) { 210 if (!ret) {
211 if (flt & VM_FAULT_MAJOR)
212 ctx->stats.maj_flt++;
213 else
214 ctx->stats.min_flt++;
215 if (ctx->state == SPU_STATE_RUNNABLE) {
216 if (flt & VM_FAULT_MAJOR)
217 ctx->spu->stats.maj_flt++;
218 else
219 ctx->spu->stats.min_flt++;
220 }
221
204 if (ctx->spu) 222 if (ctx->spu)
205 ctx->ops->restart_dma(ctx); 223 ctx->ops->restart_dma(ctx);
206 } else 224 } else
207 spufs_handle_dma_error(ctx, ea, SPE_EVENT_SPE_DATA_STORAGE); 225 spufs_handle_dma_error(ctx, ea, SPE_EVENT_SPE_DATA_STORAGE);
208 226
227 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
209 return ret; 228 return ret;
210} 229}
211EXPORT_SYMBOL_GPL(spufs_handle_class1); 230EXPORT_SYMBOL_GPL(spufs_handle_class1);
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index 45614c73c784..c2aaec5289dc 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -28,6 +28,7 @@
28#include <linux/pagemap.h> 28#include <linux/pagemap.h>
29#include <linux/poll.h> 29#include <linux/poll.h>
30#include <linux/ptrace.h> 30#include <linux/ptrace.h>
31#include <linux/seq_file.h>
31 32
32#include <asm/io.h> 33#include <asm/io.h>
33#include <asm/semaphore.h> 34#include <asm/semaphore.h>
@@ -39,17 +40,18 @@
39 40
40#define SPUFS_MMAP_4K (PAGE_SIZE == 0x1000) 41#define SPUFS_MMAP_4K (PAGE_SIZE == 0x1000)
41 42
43
42static int 44static int
43spufs_mem_open(struct inode *inode, struct file *file) 45spufs_mem_open(struct inode *inode, struct file *file)
44{ 46{
45 struct spufs_inode_info *i = SPUFS_I(inode); 47 struct spufs_inode_info *i = SPUFS_I(inode);
46 struct spu_context *ctx = i->i_ctx; 48 struct spu_context *ctx = i->i_ctx;
47 49
48 spin_lock(&ctx->mapping_lock); 50 mutex_lock(&ctx->mapping_lock);
49 file->private_data = ctx; 51 file->private_data = ctx;
50 if (!i->i_openers++) 52 if (!i->i_openers++)
51 ctx->local_store = inode->i_mapping; 53 ctx->local_store = inode->i_mapping;
52 spin_unlock(&ctx->mapping_lock); 54 mutex_unlock(&ctx->mapping_lock);
53 return 0; 55 return 0;
54} 56}
55 57
@@ -59,10 +61,10 @@ spufs_mem_release(struct inode *inode, struct file *file)
59 struct spufs_inode_info *i = SPUFS_I(inode); 61 struct spufs_inode_info *i = SPUFS_I(inode);
60 struct spu_context *ctx = i->i_ctx; 62 struct spu_context *ctx = i->i_ctx;
61 63
62 spin_lock(&ctx->mapping_lock); 64 mutex_lock(&ctx->mapping_lock);
63 if (!--i->i_openers) 65 if (!--i->i_openers)
64 ctx->local_store = NULL; 66 ctx->local_store = NULL;
65 spin_unlock(&ctx->mapping_lock); 67 mutex_unlock(&ctx->mapping_lock);
66 return 0; 68 return 0;
67} 69}
68 70
@@ -216,11 +218,12 @@ unsigned long spufs_get_unmapped_area(struct file *file, unsigned long addr,
216#endif /* CONFIG_SPU_FS_64K_LS */ 218#endif /* CONFIG_SPU_FS_64K_LS */
217 219
218static const struct file_operations spufs_mem_fops = { 220static const struct file_operations spufs_mem_fops = {
219 .open = spufs_mem_open, 221 .open = spufs_mem_open,
220 .read = spufs_mem_read, 222 .release = spufs_mem_release,
221 .write = spufs_mem_write, 223 .read = spufs_mem_read,
222 .llseek = generic_file_llseek, 224 .write = spufs_mem_write,
223 .mmap = spufs_mem_mmap, 225 .llseek = generic_file_llseek,
226 .mmap = spufs_mem_mmap,
224#ifdef CONFIG_SPU_FS_64K_LS 227#ifdef CONFIG_SPU_FS_64K_LS
225 .get_unmapped_area = spufs_get_unmapped_area, 228 .get_unmapped_area = spufs_get_unmapped_area,
226#endif 229#endif
@@ -309,11 +312,11 @@ static int spufs_cntl_open(struct inode *inode, struct file *file)
309 struct spufs_inode_info *i = SPUFS_I(inode); 312 struct spufs_inode_info *i = SPUFS_I(inode);
310 struct spu_context *ctx = i->i_ctx; 313 struct spu_context *ctx = i->i_ctx;
311 314
312 spin_lock(&ctx->mapping_lock); 315 mutex_lock(&ctx->mapping_lock);
313 file->private_data = ctx; 316 file->private_data = ctx;
314 if (!i->i_openers++) 317 if (!i->i_openers++)
315 ctx->cntl = inode->i_mapping; 318 ctx->cntl = inode->i_mapping;
316 spin_unlock(&ctx->mapping_lock); 319 mutex_unlock(&ctx->mapping_lock);
317 return simple_attr_open(inode, file, spufs_cntl_get, 320 return simple_attr_open(inode, file, spufs_cntl_get,
318 spufs_cntl_set, "0x%08lx"); 321 spufs_cntl_set, "0x%08lx");
319} 322}
@@ -326,10 +329,10 @@ spufs_cntl_release(struct inode *inode, struct file *file)
326 329
327 simple_attr_close(inode, file); 330 simple_attr_close(inode, file);
328 331
329 spin_lock(&ctx->mapping_lock); 332 mutex_lock(&ctx->mapping_lock);
330 if (!--i->i_openers) 333 if (!--i->i_openers)
331 ctx->cntl = NULL; 334 ctx->cntl = NULL;
332 spin_unlock(&ctx->mapping_lock); 335 mutex_unlock(&ctx->mapping_lock);
333 return 0; 336 return 0;
334} 337}
335 338
@@ -367,7 +370,7 @@ spufs_regs_read(struct file *file, char __user *buffer,
367 370
368 spu_acquire_saved(ctx); 371 spu_acquire_saved(ctx);
369 ret = __spufs_regs_read(ctx, buffer, size, pos); 372 ret = __spufs_regs_read(ctx, buffer, size, pos);
370 spu_release(ctx); 373 spu_release_saved(ctx);
371 return ret; 374 return ret;
372} 375}
373 376
@@ -389,7 +392,7 @@ spufs_regs_write(struct file *file, const char __user *buffer,
389 ret = copy_from_user(lscsa->gprs + *pos - size, 392 ret = copy_from_user(lscsa->gprs + *pos - size,
390 buffer, size) ? -EFAULT : size; 393 buffer, size) ? -EFAULT : size;
391 394
392 spu_release(ctx); 395 spu_release_saved(ctx);
393 return ret; 396 return ret;
394} 397}
395 398
@@ -418,7 +421,7 @@ spufs_fpcr_read(struct file *file, char __user * buffer,
418 421
419 spu_acquire_saved(ctx); 422 spu_acquire_saved(ctx);
420 ret = __spufs_fpcr_read(ctx, buffer, size, pos); 423 ret = __spufs_fpcr_read(ctx, buffer, size, pos);
421 spu_release(ctx); 424 spu_release_saved(ctx);
422 return ret; 425 return ret;
423} 426}
424 427
@@ -440,7 +443,7 @@ spufs_fpcr_write(struct file *file, const char __user * buffer,
440 ret = copy_from_user((char *)&lscsa->fpcr + *pos - size, 443 ret = copy_from_user((char *)&lscsa->fpcr + *pos - size,
441 buffer, size) ? -EFAULT : size; 444 buffer, size) ? -EFAULT : size;
442 445
443 spu_release(ctx); 446 spu_release_saved(ctx);
444 return ret; 447 return ret;
445} 448}
446 449
@@ -812,11 +815,11 @@ static int spufs_signal1_open(struct inode *inode, struct file *file)
812 struct spufs_inode_info *i = SPUFS_I(inode); 815 struct spufs_inode_info *i = SPUFS_I(inode);
813 struct spu_context *ctx = i->i_ctx; 816 struct spu_context *ctx = i->i_ctx;
814 817
815 spin_lock(&ctx->mapping_lock); 818 mutex_lock(&ctx->mapping_lock);
816 file->private_data = ctx; 819 file->private_data = ctx;
817 if (!i->i_openers++) 820 if (!i->i_openers++)
818 ctx->signal1 = inode->i_mapping; 821 ctx->signal1 = inode->i_mapping;
819 spin_unlock(&ctx->mapping_lock); 822 mutex_unlock(&ctx->mapping_lock);
820 return nonseekable_open(inode, file); 823 return nonseekable_open(inode, file);
821} 824}
822 825
@@ -826,10 +829,10 @@ spufs_signal1_release(struct inode *inode, struct file *file)
826 struct spufs_inode_info *i = SPUFS_I(inode); 829 struct spufs_inode_info *i = SPUFS_I(inode);
827 struct spu_context *ctx = i->i_ctx; 830 struct spu_context *ctx = i->i_ctx;
828 831
829 spin_lock(&ctx->mapping_lock); 832 mutex_lock(&ctx->mapping_lock);
830 if (!--i->i_openers) 833 if (!--i->i_openers)
831 ctx->signal1 = NULL; 834 ctx->signal1 = NULL;
832 spin_unlock(&ctx->mapping_lock); 835 mutex_unlock(&ctx->mapping_lock);
833 return 0; 836 return 0;
834} 837}
835 838
@@ -865,7 +868,7 @@ static ssize_t spufs_signal1_read(struct file *file, char __user *buf,
865 868
866 spu_acquire_saved(ctx); 869 spu_acquire_saved(ctx);
867 ret = __spufs_signal1_read(ctx, buf, len, pos); 870 ret = __spufs_signal1_read(ctx, buf, len, pos);
868 spu_release(ctx); 871 spu_release_saved(ctx);
869 872
870 return ret; 873 return ret;
871} 874}
@@ -931,16 +934,30 @@ static const struct file_operations spufs_signal1_fops = {
931 .mmap = spufs_signal1_mmap, 934 .mmap = spufs_signal1_mmap,
932}; 935};
933 936
937static const struct file_operations spufs_signal1_nosched_fops = {
938 .open = spufs_signal1_open,
939 .release = spufs_signal1_release,
940 .write = spufs_signal1_write,
941 .mmap = spufs_signal1_mmap,
942};
943
944static const struct file_operations spufs_signal1_nosched_fops = {
945 .open = spufs_signal1_open,
946 .release = spufs_signal1_release,
947 .write = spufs_signal1_write,
948 .mmap = spufs_signal1_mmap,
949};
950
934static int spufs_signal2_open(struct inode *inode, struct file *file) 951static int spufs_signal2_open(struct inode *inode, struct file *file)
935{ 952{
936 struct spufs_inode_info *i = SPUFS_I(inode); 953 struct spufs_inode_info *i = SPUFS_I(inode);
937 struct spu_context *ctx = i->i_ctx; 954 struct spu_context *ctx = i->i_ctx;
938 955
939 spin_lock(&ctx->mapping_lock); 956 mutex_lock(&ctx->mapping_lock);
940 file->private_data = ctx; 957 file->private_data = ctx;
941 if (!i->i_openers++) 958 if (!i->i_openers++)
942 ctx->signal2 = inode->i_mapping; 959 ctx->signal2 = inode->i_mapping;
943 spin_unlock(&ctx->mapping_lock); 960 mutex_unlock(&ctx->mapping_lock);
944 return nonseekable_open(inode, file); 961 return nonseekable_open(inode, file);
945} 962}
946 963
@@ -950,10 +967,10 @@ spufs_signal2_release(struct inode *inode, struct file *file)
950 struct spufs_inode_info *i = SPUFS_I(inode); 967 struct spufs_inode_info *i = SPUFS_I(inode);
951 struct spu_context *ctx = i->i_ctx; 968 struct spu_context *ctx = i->i_ctx;
952 969
953 spin_lock(&ctx->mapping_lock); 970 mutex_lock(&ctx->mapping_lock);
954 if (!--i->i_openers) 971 if (!--i->i_openers)
955 ctx->signal2 = NULL; 972 ctx->signal2 = NULL;
956 spin_unlock(&ctx->mapping_lock); 973 mutex_unlock(&ctx->mapping_lock);
957 return 0; 974 return 0;
958} 975}
959 976
@@ -989,7 +1006,7 @@ static ssize_t spufs_signal2_read(struct file *file, char __user *buf,
989 1006
990 spu_acquire_saved(ctx); 1007 spu_acquire_saved(ctx);
991 ret = __spufs_signal2_read(ctx, buf, len, pos); 1008 ret = __spufs_signal2_read(ctx, buf, len, pos);
992 spu_release(ctx); 1009 spu_release_saved(ctx);
993 1010
994 return ret; 1011 return ret;
995} 1012}
@@ -1059,6 +1076,20 @@ static const struct file_operations spufs_signal2_fops = {
1059 .mmap = spufs_signal2_mmap, 1076 .mmap = spufs_signal2_mmap,
1060}; 1077};
1061 1078
1079static const struct file_operations spufs_signal2_nosched_fops = {
1080 .open = spufs_signal2_open,
1081 .release = spufs_signal2_release,
1082 .write = spufs_signal2_write,
1083 .mmap = spufs_signal2_mmap,
1084};
1085
1086static const struct file_operations spufs_signal2_nosched_fops = {
1087 .open = spufs_signal2_open,
1088 .release = spufs_signal2_release,
1089 .write = spufs_signal2_write,
1090 .mmap = spufs_signal2_mmap,
1091};
1092
1062static void spufs_signal1_type_set(void *data, u64 val) 1093static void spufs_signal1_type_set(void *data, u64 val)
1063{ 1094{
1064 struct spu_context *ctx = data; 1095 struct spu_context *ctx = data;
@@ -1154,10 +1185,10 @@ static int spufs_mss_open(struct inode *inode, struct file *file)
1154 1185
1155 file->private_data = i->i_ctx; 1186 file->private_data = i->i_ctx;
1156 1187
1157 spin_lock(&ctx->mapping_lock); 1188 mutex_lock(&ctx->mapping_lock);
1158 if (!i->i_openers++) 1189 if (!i->i_openers++)
1159 ctx->mss = inode->i_mapping; 1190 ctx->mss = inode->i_mapping;
1160 spin_unlock(&ctx->mapping_lock); 1191 mutex_unlock(&ctx->mapping_lock);
1161 return nonseekable_open(inode, file); 1192 return nonseekable_open(inode, file);
1162} 1193}
1163 1194
@@ -1167,10 +1198,10 @@ spufs_mss_release(struct inode *inode, struct file *file)
1167 struct spufs_inode_info *i = SPUFS_I(inode); 1198 struct spufs_inode_info *i = SPUFS_I(inode);
1168 struct spu_context *ctx = i->i_ctx; 1199 struct spu_context *ctx = i->i_ctx;
1169 1200
1170 spin_lock(&ctx->mapping_lock); 1201 mutex_lock(&ctx->mapping_lock);
1171 if (!--i->i_openers) 1202 if (!--i->i_openers)
1172 ctx->mss = NULL; 1203 ctx->mss = NULL;
1173 spin_unlock(&ctx->mapping_lock); 1204 mutex_unlock(&ctx->mapping_lock);
1174 return 0; 1205 return 0;
1175} 1206}
1176 1207
@@ -1211,11 +1242,11 @@ static int spufs_psmap_open(struct inode *inode, struct file *file)
1211 struct spufs_inode_info *i = SPUFS_I(inode); 1242 struct spufs_inode_info *i = SPUFS_I(inode);
1212 struct spu_context *ctx = i->i_ctx; 1243 struct spu_context *ctx = i->i_ctx;
1213 1244
1214 spin_lock(&ctx->mapping_lock); 1245 mutex_lock(&ctx->mapping_lock);
1215 file->private_data = i->i_ctx; 1246 file->private_data = i->i_ctx;
1216 if (!i->i_openers++) 1247 if (!i->i_openers++)
1217 ctx->psmap = inode->i_mapping; 1248 ctx->psmap = inode->i_mapping;
1218 spin_unlock(&ctx->mapping_lock); 1249 mutex_unlock(&ctx->mapping_lock);
1219 return nonseekable_open(inode, file); 1250 return nonseekable_open(inode, file);
1220} 1251}
1221 1252
@@ -1225,10 +1256,10 @@ spufs_psmap_release(struct inode *inode, struct file *file)
1225 struct spufs_inode_info *i = SPUFS_I(inode); 1256 struct spufs_inode_info *i = SPUFS_I(inode);
1226 struct spu_context *ctx = i->i_ctx; 1257 struct spu_context *ctx = i->i_ctx;
1227 1258
1228 spin_lock(&ctx->mapping_lock); 1259 mutex_lock(&ctx->mapping_lock);
1229 if (!--i->i_openers) 1260 if (!--i->i_openers)
1230 ctx->psmap = NULL; 1261 ctx->psmap = NULL;
1231 spin_unlock(&ctx->mapping_lock); 1262 mutex_unlock(&ctx->mapping_lock);
1232 return 0; 1263 return 0;
1233} 1264}
1234 1265
@@ -1281,11 +1312,11 @@ static int spufs_mfc_open(struct inode *inode, struct file *file)
1281 if (atomic_read(&inode->i_count) != 1) 1312 if (atomic_read(&inode->i_count) != 1)
1282 return -EBUSY; 1313 return -EBUSY;
1283 1314
1284 spin_lock(&ctx->mapping_lock); 1315 mutex_lock(&ctx->mapping_lock);
1285 file->private_data = ctx; 1316 file->private_data = ctx;
1286 if (!i->i_openers++) 1317 if (!i->i_openers++)
1287 ctx->mfc = inode->i_mapping; 1318 ctx->mfc = inode->i_mapping;
1288 spin_unlock(&ctx->mapping_lock); 1319 mutex_unlock(&ctx->mapping_lock);
1289 return nonseekable_open(inode, file); 1320 return nonseekable_open(inode, file);
1290} 1321}
1291 1322
@@ -1295,10 +1326,10 @@ spufs_mfc_release(struct inode *inode, struct file *file)
1295 struct spufs_inode_info *i = SPUFS_I(inode); 1326 struct spufs_inode_info *i = SPUFS_I(inode);
1296 struct spu_context *ctx = i->i_ctx; 1327 struct spu_context *ctx = i->i_ctx;
1297 1328
1298 spin_lock(&ctx->mapping_lock); 1329 mutex_lock(&ctx->mapping_lock);
1299 if (!--i->i_openers) 1330 if (!--i->i_openers)
1300 ctx->mfc = NULL; 1331 ctx->mfc = NULL;
1301 spin_unlock(&ctx->mapping_lock); 1332 mutex_unlock(&ctx->mapping_lock);
1302 return 0; 1333 return 0;
1303} 1334}
1304 1335
@@ -1496,14 +1527,15 @@ static ssize_t spufs_mfc_write(struct file *file, const char __user *buffer,
1496 if (status) 1527 if (status)
1497 ret = status; 1528 ret = status;
1498 } 1529 }
1499 spu_release(ctx);
1500 1530
1501 if (ret) 1531 if (ret)
1502 goto out; 1532 goto out_unlock;
1503 1533
1504 ctx->tagwait |= 1 << cmd.tag; 1534 ctx->tagwait |= 1 << cmd.tag;
1505 ret = size; 1535 ret = size;
1506 1536
1537out_unlock:
1538 spu_release(ctx);
1507out: 1539out:
1508 return ret; 1540 return ret;
1509} 1541}
@@ -1514,14 +1546,14 @@ static unsigned int spufs_mfc_poll(struct file *file,poll_table *wait)
1514 u32 free_elements, tagstatus; 1546 u32 free_elements, tagstatus;
1515 unsigned int mask; 1547 unsigned int mask;
1516 1548
1549 poll_wait(file, &ctx->mfc_wq, wait);
1550
1517 spu_acquire(ctx); 1551 spu_acquire(ctx);
1518 ctx->ops->set_mfc_query(ctx, ctx->tagwait, 2); 1552 ctx->ops->set_mfc_query(ctx, ctx->tagwait, 2);
1519 free_elements = ctx->ops->get_mfc_free_elements(ctx); 1553 free_elements = ctx->ops->get_mfc_free_elements(ctx);
1520 tagstatus = ctx->ops->read_mfc_tagstatus(ctx); 1554 tagstatus = ctx->ops->read_mfc_tagstatus(ctx);
1521 spu_release(ctx); 1555 spu_release(ctx);
1522 1556
1523 poll_wait(file, &ctx->mfc_wq, wait);
1524
1525 mask = 0; 1557 mask = 0;
1526 if (free_elements & 0xffff) 1558 if (free_elements & 0xffff)
1527 mask |= POLLOUT | POLLWRNORM; 1559 mask |= POLLOUT | POLLWRNORM;
@@ -1608,7 +1640,7 @@ static void spufs_decr_set(void *data, u64 val)
1608 struct spu_lscsa *lscsa = ctx->csa.lscsa; 1640 struct spu_lscsa *lscsa = ctx->csa.lscsa;
1609 spu_acquire_saved(ctx); 1641 spu_acquire_saved(ctx);
1610 lscsa->decr.slot[0] = (u32) val; 1642 lscsa->decr.slot[0] = (u32) val;
1611 spu_release(ctx); 1643 spu_release_saved(ctx);
1612} 1644}
1613 1645
1614static u64 __spufs_decr_get(void *data) 1646static u64 __spufs_decr_get(void *data)
@@ -1624,7 +1656,7 @@ static u64 spufs_decr_get(void *data)
1624 u64 ret; 1656 u64 ret;
1625 spu_acquire_saved(ctx); 1657 spu_acquire_saved(ctx);
1626 ret = __spufs_decr_get(data); 1658 ret = __spufs_decr_get(data);
1627 spu_release(ctx); 1659 spu_release_saved(ctx);
1628 return ret; 1660 return ret;
1629} 1661}
1630DEFINE_SIMPLE_ATTRIBUTE(spufs_decr_ops, spufs_decr_get, spufs_decr_set, 1662DEFINE_SIMPLE_ATTRIBUTE(spufs_decr_ops, spufs_decr_get, spufs_decr_set,
@@ -1633,17 +1665,21 @@ DEFINE_SIMPLE_ATTRIBUTE(spufs_decr_ops, spufs_decr_get, spufs_decr_set,
1633static void spufs_decr_status_set(void *data, u64 val) 1665static void spufs_decr_status_set(void *data, u64 val)
1634{ 1666{
1635 struct spu_context *ctx = data; 1667 struct spu_context *ctx = data;
1636 struct spu_lscsa *lscsa = ctx->csa.lscsa;
1637 spu_acquire_saved(ctx); 1668 spu_acquire_saved(ctx);
1638 lscsa->decr_status.slot[0] = (u32) val; 1669 if (val)
1639 spu_release(ctx); 1670 ctx->csa.priv2.mfc_control_RW |= MFC_CNTL_DECREMENTER_RUNNING;
1671 else
1672 ctx->csa.priv2.mfc_control_RW &= ~MFC_CNTL_DECREMENTER_RUNNING;
1673 spu_release_saved(ctx);
1640} 1674}
1641 1675
1642static u64 __spufs_decr_status_get(void *data) 1676static u64 __spufs_decr_status_get(void *data)
1643{ 1677{
1644 struct spu_context *ctx = data; 1678 struct spu_context *ctx = data;
1645 struct spu_lscsa *lscsa = ctx->csa.lscsa; 1679 if (ctx->csa.priv2.mfc_control_RW & MFC_CNTL_DECREMENTER_RUNNING)
1646 return lscsa->decr_status.slot[0]; 1680 return SPU_DECR_STATUS_RUNNING;
1681 else
1682 return 0;
1647} 1683}
1648 1684
1649static u64 spufs_decr_status_get(void *data) 1685static u64 spufs_decr_status_get(void *data)
@@ -1652,7 +1688,7 @@ static u64 spufs_decr_status_get(void *data)
1652 u64 ret; 1688 u64 ret;
1653 spu_acquire_saved(ctx); 1689 spu_acquire_saved(ctx);
1654 ret = __spufs_decr_status_get(data); 1690 ret = __spufs_decr_status_get(data);
1655 spu_release(ctx); 1691 spu_release_saved(ctx);
1656 return ret; 1692 return ret;
1657} 1693}
1658DEFINE_SIMPLE_ATTRIBUTE(spufs_decr_status_ops, spufs_decr_status_get, 1694DEFINE_SIMPLE_ATTRIBUTE(spufs_decr_status_ops, spufs_decr_status_get,
@@ -1664,7 +1700,7 @@ static void spufs_event_mask_set(void *data, u64 val)
1664 struct spu_lscsa *lscsa = ctx->csa.lscsa; 1700 struct spu_lscsa *lscsa = ctx->csa.lscsa;
1665 spu_acquire_saved(ctx); 1701 spu_acquire_saved(ctx);
1666 lscsa->event_mask.slot[0] = (u32) val; 1702 lscsa->event_mask.slot[0] = (u32) val;
1667 spu_release(ctx); 1703 spu_release_saved(ctx);
1668} 1704}
1669 1705
1670static u64 __spufs_event_mask_get(void *data) 1706static u64 __spufs_event_mask_get(void *data)
@@ -1680,7 +1716,7 @@ static u64 spufs_event_mask_get(void *data)
1680 u64 ret; 1716 u64 ret;
1681 spu_acquire_saved(ctx); 1717 spu_acquire_saved(ctx);
1682 ret = __spufs_event_mask_get(data); 1718 ret = __spufs_event_mask_get(data);
1683 spu_release(ctx); 1719 spu_release_saved(ctx);
1684 return ret; 1720 return ret;
1685} 1721}
1686DEFINE_SIMPLE_ATTRIBUTE(spufs_event_mask_ops, spufs_event_mask_get, 1722DEFINE_SIMPLE_ATTRIBUTE(spufs_event_mask_ops, spufs_event_mask_get,
@@ -1704,7 +1740,7 @@ static u64 spufs_event_status_get(void *data)
1704 1740
1705 spu_acquire_saved(ctx); 1741 spu_acquire_saved(ctx);
1706 ret = __spufs_event_status_get(data); 1742 ret = __spufs_event_status_get(data);
1707 spu_release(ctx); 1743 spu_release_saved(ctx);
1708 return ret; 1744 return ret;
1709} 1745}
1710DEFINE_SIMPLE_ATTRIBUTE(spufs_event_status_ops, spufs_event_status_get, 1746DEFINE_SIMPLE_ATTRIBUTE(spufs_event_status_ops, spufs_event_status_get,
@@ -1716,7 +1752,7 @@ static void spufs_srr0_set(void *data, u64 val)
1716 struct spu_lscsa *lscsa = ctx->csa.lscsa; 1752 struct spu_lscsa *lscsa = ctx->csa.lscsa;
1717 spu_acquire_saved(ctx); 1753 spu_acquire_saved(ctx);
1718 lscsa->srr0.slot[0] = (u32) val; 1754 lscsa->srr0.slot[0] = (u32) val;
1719 spu_release(ctx); 1755 spu_release_saved(ctx);
1720} 1756}
1721 1757
1722static u64 spufs_srr0_get(void *data) 1758static u64 spufs_srr0_get(void *data)
@@ -1726,7 +1762,7 @@ static u64 spufs_srr0_get(void *data)
1726 u64 ret; 1762 u64 ret;
1727 spu_acquire_saved(ctx); 1763 spu_acquire_saved(ctx);
1728 ret = lscsa->srr0.slot[0]; 1764 ret = lscsa->srr0.slot[0];
1729 spu_release(ctx); 1765 spu_release_saved(ctx);
1730 return ret; 1766 return ret;
1731} 1767}
1732DEFINE_SIMPLE_ATTRIBUTE(spufs_srr0_ops, spufs_srr0_get, spufs_srr0_set, 1768DEFINE_SIMPLE_ATTRIBUTE(spufs_srr0_ops, spufs_srr0_get, spufs_srr0_set,
@@ -1782,7 +1818,7 @@ static u64 spufs_lslr_get(void *data)
1782 1818
1783 spu_acquire_saved(ctx); 1819 spu_acquire_saved(ctx);
1784 ret = __spufs_lslr_get(data); 1820 ret = __spufs_lslr_get(data);
1785 spu_release(ctx); 1821 spu_release_saved(ctx);
1786 1822
1787 return ret; 1823 return ret;
1788} 1824}
@@ -1796,6 +1832,29 @@ static int spufs_info_open(struct inode *inode, struct file *file)
1796 return 0; 1832 return 0;
1797} 1833}
1798 1834
1835static int spufs_caps_show(struct seq_file *s, void *private)
1836{
1837 struct spu_context *ctx = s->private;
1838
1839 if (!(ctx->flags & SPU_CREATE_NOSCHED))
1840 seq_puts(s, "sched\n");
1841 if (!(ctx->flags & SPU_CREATE_ISOLATE))
1842 seq_puts(s, "step\n");
1843 return 0;
1844}
1845
1846static int spufs_caps_open(struct inode *inode, struct file *file)
1847{
1848 return single_open(file, spufs_caps_show, SPUFS_I(inode)->i_ctx);
1849}
1850
1851static const struct file_operations spufs_caps_fops = {
1852 .open = spufs_caps_open,
1853 .read = seq_read,
1854 .llseek = seq_lseek,
1855 .release = single_release,
1856};
1857
1799static ssize_t __spufs_mbox_info_read(struct spu_context *ctx, 1858static ssize_t __spufs_mbox_info_read(struct spu_context *ctx,
1800 char __user *buf, size_t len, loff_t *pos) 1859 char __user *buf, size_t len, loff_t *pos)
1801{ 1860{
@@ -1823,7 +1882,7 @@ static ssize_t spufs_mbox_info_read(struct file *file, char __user *buf,
1823 spin_lock(&ctx->csa.register_lock); 1882 spin_lock(&ctx->csa.register_lock);
1824 ret = __spufs_mbox_info_read(ctx, buf, len, pos); 1883 ret = __spufs_mbox_info_read(ctx, buf, len, pos);
1825 spin_unlock(&ctx->csa.register_lock); 1884 spin_unlock(&ctx->csa.register_lock);
1826 spu_release(ctx); 1885 spu_release_saved(ctx);
1827 1886
1828 return ret; 1887 return ret;
1829} 1888}
@@ -1861,7 +1920,7 @@ static ssize_t spufs_ibox_info_read(struct file *file, char __user *buf,
1861 spin_lock(&ctx->csa.register_lock); 1920 spin_lock(&ctx->csa.register_lock);
1862 ret = __spufs_ibox_info_read(ctx, buf, len, pos); 1921 ret = __spufs_ibox_info_read(ctx, buf, len, pos);
1863 spin_unlock(&ctx->csa.register_lock); 1922 spin_unlock(&ctx->csa.register_lock);
1864 spu_release(ctx); 1923 spu_release_saved(ctx);
1865 1924
1866 return ret; 1925 return ret;
1867} 1926}
@@ -1902,7 +1961,7 @@ static ssize_t spufs_wbox_info_read(struct file *file, char __user *buf,
1902 spin_lock(&ctx->csa.register_lock); 1961 spin_lock(&ctx->csa.register_lock);
1903 ret = __spufs_wbox_info_read(ctx, buf, len, pos); 1962 ret = __spufs_wbox_info_read(ctx, buf, len, pos);
1904 spin_unlock(&ctx->csa.register_lock); 1963 spin_unlock(&ctx->csa.register_lock);
1905 spu_release(ctx); 1964 spu_release_saved(ctx);
1906 1965
1907 return ret; 1966 return ret;
1908} 1967}
@@ -1952,7 +2011,7 @@ static ssize_t spufs_dma_info_read(struct file *file, char __user *buf,
1952 spin_lock(&ctx->csa.register_lock); 2011 spin_lock(&ctx->csa.register_lock);
1953 ret = __spufs_dma_info_read(ctx, buf, len, pos); 2012 ret = __spufs_dma_info_read(ctx, buf, len, pos);
1954 spin_unlock(&ctx->csa.register_lock); 2013 spin_unlock(&ctx->csa.register_lock);
1955 spu_release(ctx); 2014 spu_release_saved(ctx);
1956 2015
1957 return ret; 2016 return ret;
1958} 2017}
@@ -2003,7 +2062,7 @@ static ssize_t spufs_proxydma_info_read(struct file *file, char __user *buf,
2003 spin_lock(&ctx->csa.register_lock); 2062 spin_lock(&ctx->csa.register_lock);
2004 ret = __spufs_proxydma_info_read(ctx, buf, len, pos); 2063 ret = __spufs_proxydma_info_read(ctx, buf, len, pos);
2005 spin_unlock(&ctx->csa.register_lock); 2064 spin_unlock(&ctx->csa.register_lock);
2006 spu_release(ctx); 2065 spu_release_saved(ctx);
2007 2066
2008 return ret; 2067 return ret;
2009} 2068}
@@ -2013,7 +2072,117 @@ static const struct file_operations spufs_proxydma_info_fops = {
2013 .read = spufs_proxydma_info_read, 2072 .read = spufs_proxydma_info_read,
2014}; 2073};
2015 2074
2075static int spufs_show_tid(struct seq_file *s, void *private)
2076{
2077 struct spu_context *ctx = s->private;
2078
2079 seq_printf(s, "%d\n", ctx->tid);
2080 return 0;
2081}
2082
2083static int spufs_tid_open(struct inode *inode, struct file *file)
2084{
2085 return single_open(file, spufs_show_tid, SPUFS_I(inode)->i_ctx);
2086}
2087
2088static const struct file_operations spufs_tid_fops = {
2089 .open = spufs_tid_open,
2090 .read = seq_read,
2091 .llseek = seq_lseek,
2092 .release = single_release,
2093};
2094
2095static const char *ctx_state_names[] = {
2096 "user", "system", "iowait", "loaded"
2097};
2098
2099static unsigned long long spufs_acct_time(struct spu_context *ctx,
2100 enum spu_utilization_state state)
2101{
2102 struct timespec ts;
2103 unsigned long long time = ctx->stats.times[state];
2104
2105 /*
2106 * In general, utilization statistics are updated by the controlling
2107 * thread as the spu context moves through various well defined
2108 * state transitions, but if the context is lazily loaded its
2109 * utilization statistics are not updated as the controlling thread
2110 * is not tightly coupled with the execution of the spu context. We
2111 * calculate and apply the time delta from the last recorded state
2112 * of the spu context.
2113 */
2114 if (ctx->spu && ctx->stats.util_state == state) {
2115 ktime_get_ts(&ts);
2116 time += timespec_to_ns(&ts) - ctx->stats.tstamp;
2117 }
2118
2119 return time / NSEC_PER_MSEC;
2120}
2121
2122static unsigned long long spufs_slb_flts(struct spu_context *ctx)
2123{
2124 unsigned long long slb_flts = ctx->stats.slb_flt;
2125
2126 if (ctx->state == SPU_STATE_RUNNABLE) {
2127 slb_flts += (ctx->spu->stats.slb_flt -
2128 ctx->stats.slb_flt_base);
2129 }
2130
2131 return slb_flts;
2132}
2133
2134static unsigned long long spufs_class2_intrs(struct spu_context *ctx)
2135{
2136 unsigned long long class2_intrs = ctx->stats.class2_intr;
2137
2138 if (ctx->state == SPU_STATE_RUNNABLE) {
2139 class2_intrs += (ctx->spu->stats.class2_intr -
2140 ctx->stats.class2_intr_base);
2141 }
2142
2143 return class2_intrs;
2144}
2145
2146
2147static int spufs_show_stat(struct seq_file *s, void *private)
2148{
2149 struct spu_context *ctx = s->private;
2150
2151 spu_acquire(ctx);
2152 seq_printf(s, "%s %llu %llu %llu %llu "
2153 "%llu %llu %llu %llu %llu %llu %llu %llu\n",
2154 ctx_state_names[ctx->stats.util_state],
2155 spufs_acct_time(ctx, SPU_UTIL_USER),
2156 spufs_acct_time(ctx, SPU_UTIL_SYSTEM),
2157 spufs_acct_time(ctx, SPU_UTIL_IOWAIT),
2158 spufs_acct_time(ctx, SPU_UTIL_IDLE_LOADED),
2159 ctx->stats.vol_ctx_switch,
2160 ctx->stats.invol_ctx_switch,
2161 spufs_slb_flts(ctx),
2162 ctx->stats.hash_flt,
2163 ctx->stats.min_flt,
2164 ctx->stats.maj_flt,
2165 spufs_class2_intrs(ctx),
2166 ctx->stats.libassist);
2167 spu_release(ctx);
2168 return 0;
2169}
2170
2171static int spufs_stat_open(struct inode *inode, struct file *file)
2172{
2173 return single_open(file, spufs_show_stat, SPUFS_I(inode)->i_ctx);
2174}
2175
2176static const struct file_operations spufs_stat_fops = {
2177 .open = spufs_stat_open,
2178 .read = seq_read,
2179 .llseek = seq_lseek,
2180 .release = single_release,
2181};
2182
2183
2016struct tree_descr spufs_dir_contents[] = { 2184struct tree_descr spufs_dir_contents[] = {
2185 { "capabilities", &spufs_caps_fops, 0444, },
2017 { "mem", &spufs_mem_fops, 0666, }, 2186 { "mem", &spufs_mem_fops, 0666, },
2018 { "regs", &spufs_regs_fops, 0666, }, 2187 { "regs", &spufs_regs_fops, 0666, },
2019 { "mbox", &spufs_mbox_fops, 0444, }, 2188 { "mbox", &spufs_mbox_fops, 0444, },
@@ -2022,8 +2191,8 @@ struct tree_descr spufs_dir_contents[] = {
2022 { "mbox_stat", &spufs_mbox_stat_fops, 0444, }, 2191 { "mbox_stat", &spufs_mbox_stat_fops, 0444, },
2023 { "ibox_stat", &spufs_ibox_stat_fops, 0444, }, 2192 { "ibox_stat", &spufs_ibox_stat_fops, 0444, },
2024 { "wbox_stat", &spufs_wbox_stat_fops, 0444, }, 2193 { "wbox_stat", &spufs_wbox_stat_fops, 0444, },
2025 { "signal1", &spufs_signal1_fops, 0666, }, 2194 { "signal1", &spufs_signal1_nosched_fops, 0222, },
2026 { "signal2", &spufs_signal2_fops, 0666, }, 2195 { "signal2", &spufs_signal2_nosched_fops, 0222, },
2027 { "signal1_type", &spufs_signal1_type, 0666, }, 2196 { "signal1_type", &spufs_signal1_type, 0666, },
2028 { "signal2_type", &spufs_signal2_type, 0666, }, 2197 { "signal2_type", &spufs_signal2_type, 0666, },
2029 { "cntl", &spufs_cntl_fops, 0666, }, 2198 { "cntl", &spufs_cntl_fops, 0666, },
@@ -2045,10 +2214,13 @@ struct tree_descr spufs_dir_contents[] = {
2045 { "wbox_info", &spufs_wbox_info_fops, 0444, }, 2214 { "wbox_info", &spufs_wbox_info_fops, 0444, },
2046 { "dma_info", &spufs_dma_info_fops, 0444, }, 2215 { "dma_info", &spufs_dma_info_fops, 0444, },
2047 { "proxydma_info", &spufs_proxydma_info_fops, 0444, }, 2216 { "proxydma_info", &spufs_proxydma_info_fops, 0444, },
2217 { "tid", &spufs_tid_fops, 0444, },
2218 { "stat", &spufs_stat_fops, 0444, },
2048 {}, 2219 {},
2049}; 2220};
2050 2221
2051struct tree_descr spufs_dir_nosched_contents[] = { 2222struct tree_descr spufs_dir_nosched_contents[] = {
2223 { "capabilities", &spufs_caps_fops, 0444, },
2052 { "mem", &spufs_mem_fops, 0666, }, 2224 { "mem", &spufs_mem_fops, 0666, },
2053 { "mbox", &spufs_mbox_fops, 0444, }, 2225 { "mbox", &spufs_mbox_fops, 0444, },
2054 { "ibox", &spufs_ibox_fops, 0444, }, 2226 { "ibox", &spufs_ibox_fops, 0444, },
@@ -2056,8 +2228,8 @@ struct tree_descr spufs_dir_nosched_contents[] = {
2056 { "mbox_stat", &spufs_mbox_stat_fops, 0444, }, 2228 { "mbox_stat", &spufs_mbox_stat_fops, 0444, },
2057 { "ibox_stat", &spufs_ibox_stat_fops, 0444, }, 2229 { "ibox_stat", &spufs_ibox_stat_fops, 0444, },
2058 { "wbox_stat", &spufs_wbox_stat_fops, 0444, }, 2230 { "wbox_stat", &spufs_wbox_stat_fops, 0444, },
2059 { "signal1", &spufs_signal1_fops, 0666, }, 2231 { "signal1", &spufs_signal1_nosched_fops, 0222, },
2060 { "signal2", &spufs_signal2_fops, 0666, }, 2232 { "signal2", &spufs_signal2_nosched_fops, 0222, },
2061 { "signal1_type", &spufs_signal1_type, 0666, }, 2233 { "signal1_type", &spufs_signal1_type, 0666, },
2062 { "signal2_type", &spufs_signal2_type, 0666, }, 2234 { "signal2_type", &spufs_signal2_type, 0666, },
2063 { "mss", &spufs_mss_fops, 0666, }, 2235 { "mss", &spufs_mss_fops, 0666, },
@@ -2067,6 +2239,8 @@ struct tree_descr spufs_dir_nosched_contents[] = {
2067 { "psmap", &spufs_psmap_fops, 0666, }, 2239 { "psmap", &spufs_psmap_fops, 0666, },
2068 { "phys-id", &spufs_id_ops, 0666, }, 2240 { "phys-id", &spufs_id_ops, 0666, },
2069 { "object-id", &spufs_object_id_ops, 0666, }, 2241 { "object-id", &spufs_object_id_ops, 0666, },
2242 { "tid", &spufs_tid_fops, 0444, },
2243 { "stat", &spufs_stat_fops, 0444, },
2070 {}, 2244 {},
2071}; 2245};
2072 2246
diff --git a/arch/powerpc/platforms/cell/spufs/gang.c b/arch/powerpc/platforms/cell/spufs/gang.c
index 212ea78f9051..71a443253021 100644
--- a/arch/powerpc/platforms/cell/spufs/gang.c
+++ b/arch/powerpc/platforms/cell/spufs/gang.c
@@ -35,7 +35,9 @@ struct spu_gang *alloc_spu_gang(void)
35 35
36 kref_init(&gang->kref); 36 kref_init(&gang->kref);
37 mutex_init(&gang->mutex); 37 mutex_init(&gang->mutex);
38 mutex_init(&gang->aff_mutex);
38 INIT_LIST_HEAD(&gang->list); 39 INIT_LIST_HEAD(&gang->list);
40 INIT_LIST_HEAD(&gang->aff_list_head);
39 41
40out: 42out:
41 return gang; 43 return gang;
@@ -73,6 +75,10 @@ void spu_gang_remove_ctx(struct spu_gang *gang, struct spu_context *ctx)
73{ 75{
74 mutex_lock(&gang->mutex); 76 mutex_lock(&gang->mutex);
75 WARN_ON(ctx->gang != gang); 77 WARN_ON(ctx->gang != gang);
78 if (!list_empty(&ctx->aff_list)) {
79 list_del_init(&ctx->aff_list);
80 gang->aff_flags &= ~AFF_OFFSETS_SET;
81 }
76 list_del_init(&ctx->gang_list); 82 list_del_init(&ctx->gang_list);
77 gang->contexts--; 83 gang->contexts--;
78 mutex_unlock(&gang->mutex); 84 mutex_unlock(&gang->mutex);
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 7150730e2ff1..b3d0dd118dd0 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -177,7 +177,7 @@ static int spufs_rmdir(struct inode *parent, struct dentry *dir)
177static int spufs_fill_dir(struct dentry *dir, struct tree_descr *files, 177static int spufs_fill_dir(struct dentry *dir, struct tree_descr *files,
178 int mode, struct spu_context *ctx) 178 int mode, struct spu_context *ctx)
179{ 179{
180 struct dentry *dentry; 180 struct dentry *dentry, *tmp;
181 int ret; 181 int ret;
182 182
183 while (files->name && files->name[0]) { 183 while (files->name && files->name[0]) {
@@ -193,7 +193,20 @@ static int spufs_fill_dir(struct dentry *dir, struct tree_descr *files,
193 } 193 }
194 return 0; 194 return 0;
195out: 195out:
196 spufs_prune_dir(dir); 196 /*
197 * remove all children from dir. dir->inode is not set so don't
198 * just simply use spufs_prune_dir() and panic afterwards :)
199 * dput() looks like it will do the right thing:
200 * - dec parent's ref counter
201 * - remove child from parent's child list
202 * - free child's inode if possible
203 * - free child
204 */
205 list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_u.d_child) {
206 dput(dentry);
207 }
208
209 shrink_dcache_parent(dir);
197 return ret; 210 return ret;
198} 211}
199 212
@@ -219,10 +232,6 @@ static int spufs_dir_close(struct inode *inode, struct file *file)
219 return dcache_dir_close(inode, file); 232 return dcache_dir_close(inode, file);
220} 233}
221 234
222const struct inode_operations spufs_dir_inode_operations = {
223 .lookup = simple_lookup,
224};
225
226const struct file_operations spufs_context_fops = { 235const struct file_operations spufs_context_fops = {
227 .open = dcache_dir_open, 236 .open = dcache_dir_open,
228 .release = spufs_dir_close, 237 .release = spufs_dir_close,
@@ -256,7 +265,7 @@ spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags,
256 goto out_iput; 265 goto out_iput;
257 266
258 ctx->flags = flags; 267 ctx->flags = flags;
259 inode->i_op = &spufs_dir_inode_operations; 268 inode->i_op = &simple_dir_inode_operations;
260 inode->i_fop = &simple_dir_operations; 269 inode->i_fop = &simple_dir_operations;
261 if (flags & SPU_CREATE_NOSCHED) 270 if (flags & SPU_CREATE_NOSCHED)
262 ret = spufs_fill_dir(dentry, spufs_dir_nosched_contents, 271 ret = spufs_fill_dir(dentry, spufs_dir_nosched_contents,
@@ -274,6 +283,7 @@ spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags,
274 goto out; 283 goto out;
275 284
276out_free_ctx: 285out_free_ctx:
286 spu_forget(ctx);
277 put_spu_context(ctx); 287 put_spu_context(ctx);
278out_iput: 288out_iput:
279 iput(inode); 289 iput(inode);
@@ -306,11 +316,107 @@ out:
306 return ret; 316 return ret;
307} 317}
308 318
309static int spufs_create_context(struct inode *inode, 319static struct spu_context *
310 struct dentry *dentry, 320spufs_assert_affinity(unsigned int flags, struct spu_gang *gang,
311 struct vfsmount *mnt, int flags, int mode) 321 struct file *filp)
322{
323 struct spu_context *tmp, *neighbor;
324 int count, node;
325 int aff_supp;
326
327 aff_supp = !list_empty(&(list_entry(cbe_spu_info[0].spus.next,
328 struct spu, cbe_list))->aff_list);
329
330 if (!aff_supp)
331 return ERR_PTR(-EINVAL);
332
333 if (flags & SPU_CREATE_GANG)
334 return ERR_PTR(-EINVAL);
335
336 if (flags & SPU_CREATE_AFFINITY_MEM &&
337 gang->aff_ref_ctx &&
338 gang->aff_ref_ctx->flags & SPU_CREATE_AFFINITY_MEM)
339 return ERR_PTR(-EEXIST);
340
341 if (gang->aff_flags & AFF_MERGED)
342 return ERR_PTR(-EBUSY);
343
344 neighbor = NULL;
345 if (flags & SPU_CREATE_AFFINITY_SPU) {
346 if (!filp || filp->f_op != &spufs_context_fops)
347 return ERR_PTR(-EINVAL);
348
349 neighbor = get_spu_context(
350 SPUFS_I(filp->f_dentry->d_inode)->i_ctx);
351
352 if (!list_empty(&neighbor->aff_list) && !(neighbor->aff_head) &&
353 !list_is_last(&neighbor->aff_list, &gang->aff_list_head) &&
354 !list_entry(neighbor->aff_list.next, struct spu_context,
355 aff_list)->aff_head)
356 return ERR_PTR(-EEXIST);
357
358 if (gang != neighbor->gang)
359 return ERR_PTR(-EINVAL);
360
361 count = 1;
362 list_for_each_entry(tmp, &gang->aff_list_head, aff_list)
363 count++;
364 if (list_empty(&neighbor->aff_list))
365 count++;
366
367 for (node = 0; node < MAX_NUMNODES; node++) {
368 if ((cbe_spu_info[node].n_spus - atomic_read(
369 &cbe_spu_info[node].reserved_spus)) >= count)
370 break;
371 }
372
373 if (node == MAX_NUMNODES)
374 return ERR_PTR(-EEXIST);
375 }
376
377 return neighbor;
378}
379
380static void
381spufs_set_affinity(unsigned int flags, struct spu_context *ctx,
382 struct spu_context *neighbor)
383{
384 if (flags & SPU_CREATE_AFFINITY_MEM)
385 ctx->gang->aff_ref_ctx = ctx;
386
387 if (flags & SPU_CREATE_AFFINITY_SPU) {
388 if (list_empty(&neighbor->aff_list)) {
389 list_add_tail(&neighbor->aff_list,
390 &ctx->gang->aff_list_head);
391 neighbor->aff_head = 1;
392 }
393
394 if (list_is_last(&neighbor->aff_list, &ctx->gang->aff_list_head)
395 || list_entry(neighbor->aff_list.next, struct spu_context,
396 aff_list)->aff_head) {
397 list_add(&ctx->aff_list, &neighbor->aff_list);
398 } else {
399 list_add_tail(&ctx->aff_list, &neighbor->aff_list);
400 if (neighbor->aff_head) {
401 neighbor->aff_head = 0;
402 ctx->aff_head = 1;
403 }
404 }
405
406 if (!ctx->gang->aff_ref_ctx)
407 ctx->gang->aff_ref_ctx = ctx;
408 }
409}
410
411static int
412spufs_create_context(struct inode *inode, struct dentry *dentry,
413 struct vfsmount *mnt, int flags, int mode,
414 struct file *aff_filp)
312{ 415{
313 int ret; 416 int ret;
417 int affinity;
418 struct spu_gang *gang;
419 struct spu_context *neighbor;
314 420
315 ret = -EPERM; 421 ret = -EPERM;
316 if ((flags & SPU_CREATE_NOSCHED) && 422 if ((flags & SPU_CREATE_NOSCHED) &&
@@ -326,9 +432,29 @@ static int spufs_create_context(struct inode *inode,
326 if ((flags & SPU_CREATE_ISOLATE) && !isolated_loader) 432 if ((flags & SPU_CREATE_ISOLATE) && !isolated_loader)
327 goto out_unlock; 433 goto out_unlock;
328 434
435 gang = NULL;
436 neighbor = NULL;
437 affinity = flags & (SPU_CREATE_AFFINITY_MEM | SPU_CREATE_AFFINITY_SPU);
438 if (affinity) {
439 gang = SPUFS_I(inode)->i_gang;
440 ret = -EINVAL;
441 if (!gang)
442 goto out_unlock;
443 mutex_lock(&gang->aff_mutex);
444 neighbor = spufs_assert_affinity(flags, gang, aff_filp);
445 if (IS_ERR(neighbor)) {
446 ret = PTR_ERR(neighbor);
447 goto out_aff_unlock;
448 }
449 }
450
329 ret = spufs_mkdir(inode, dentry, flags, mode & S_IRWXUGO); 451 ret = spufs_mkdir(inode, dentry, flags, mode & S_IRWXUGO);
330 if (ret) 452 if (ret)
331 goto out_unlock; 453 goto out_aff_unlock;
454
455 if (affinity)
456 spufs_set_affinity(flags, SPUFS_I(dentry->d_inode)->i_ctx,
457 neighbor);
332 458
333 /* 459 /*
334 * get references for dget and mntget, will be released 460 * get references for dget and mntget, will be released
@@ -342,6 +468,9 @@ static int spufs_create_context(struct inode *inode,
342 goto out; 468 goto out;
343 } 469 }
344 470
471out_aff_unlock:
472 if (affinity)
473 mutex_unlock(&gang->aff_mutex);
345out_unlock: 474out_unlock:
346 mutex_unlock(&inode->i_mutex); 475 mutex_unlock(&inode->i_mutex);
347out: 476out:
@@ -349,37 +478,6 @@ out:
349 return ret; 478 return ret;
350} 479}
351 480
352static int spufs_rmgang(struct inode *root, struct dentry *dir)
353{
354 /* FIXME: this fails if the dir is not empty,
355 which causes a leak of gangs. */
356 return simple_rmdir(root, dir);
357}
358
359static int spufs_gang_close(struct inode *inode, struct file *file)
360{
361 struct inode *parent;
362 struct dentry *dir;
363 int ret;
364
365 dir = file->f_path.dentry;
366 parent = dir->d_parent->d_inode;
367
368 ret = spufs_rmgang(parent, dir);
369 WARN_ON(ret);
370
371 return dcache_dir_close(inode, file);
372}
373
374const struct file_operations spufs_gang_fops = {
375 .open = dcache_dir_open,
376 .release = spufs_gang_close,
377 .llseek = dcache_dir_lseek,
378 .read = generic_read_dir,
379 .readdir = dcache_readdir,
380 .fsync = simple_sync_file,
381};
382
383static int 481static int
384spufs_mkgang(struct inode *dir, struct dentry *dentry, int mode) 482spufs_mkgang(struct inode *dir, struct dentry *dentry, int mode)
385{ 483{
@@ -403,11 +501,10 @@ spufs_mkgang(struct inode *dir, struct dentry *dentry, int mode)
403 if (!gang) 501 if (!gang)
404 goto out_iput; 502 goto out_iput;
405 503
406 inode->i_op = &spufs_dir_inode_operations; 504 inode->i_op = &simple_dir_inode_operations;
407 inode->i_fop = &simple_dir_operations; 505 inode->i_fop = &simple_dir_operations;
408 506
409 d_instantiate(dentry, inode); 507 d_instantiate(dentry, inode);
410 dget(dentry);
411 dir->i_nlink++; 508 dir->i_nlink++;
412 dentry->d_inode->i_nlink++; 509 dentry->d_inode->i_nlink++;
413 return ret; 510 return ret;
@@ -437,7 +534,7 @@ static int spufs_gang_open(struct dentry *dentry, struct vfsmount *mnt)
437 goto out; 534 goto out;
438 } 535 }
439 536
440 filp->f_op = &spufs_gang_fops; 537 filp->f_op = &simple_dir_operations;
441 fd_install(ret, filp); 538 fd_install(ret, filp);
442out: 539out:
443 return ret; 540 return ret;
@@ -458,8 +555,10 @@ static int spufs_create_gang(struct inode *inode,
458 * in error path of *_open(). 555 * in error path of *_open().
459 */ 556 */
460 ret = spufs_gang_open(dget(dentry), mntget(mnt)); 557 ret = spufs_gang_open(dget(dentry), mntget(mnt));
461 if (ret < 0) 558 if (ret < 0) {
462 WARN_ON(spufs_rmgang(inode, dentry)); 559 int err = simple_rmdir(inode, dentry);
560 WARN_ON(err);
561 }
463 562
464out: 563out:
465 mutex_unlock(&inode->i_mutex); 564 mutex_unlock(&inode->i_mutex);
@@ -470,7 +569,8 @@ out:
470 569
471static struct file_system_type spufs_type; 570static struct file_system_type spufs_type;
472 571
473long spufs_create(struct nameidata *nd, unsigned int flags, mode_t mode) 572long spufs_create(struct nameidata *nd, unsigned int flags, mode_t mode,
573 struct file *filp)
474{ 574{
475 struct dentry *dentry; 575 struct dentry *dentry;
476 int ret; 576 int ret;
@@ -507,7 +607,7 @@ long spufs_create(struct nameidata *nd, unsigned int flags, mode_t mode)
507 dentry, nd->mnt, mode); 607 dentry, nd->mnt, mode);
508 else 608 else
509 return spufs_create_context(nd->dentry->d_inode, 609 return spufs_create_context(nd->dentry->d_inode,
510 dentry, nd->mnt, flags, mode); 610 dentry, nd->mnt, flags, mode, filp);
511 611
512out_dput: 612out_dput:
513 dput(dentry); 613 dput(dentry);
@@ -600,12 +700,16 @@ spufs_create_root(struct super_block *sb, void *data)
600 struct inode *inode; 700 struct inode *inode;
601 int ret; 701 int ret;
602 702
703 ret = -ENODEV;
704 if (!spu_management_ops)
705 goto out;
706
603 ret = -ENOMEM; 707 ret = -ENOMEM;
604 inode = spufs_new_inode(sb, S_IFDIR | 0775); 708 inode = spufs_new_inode(sb, S_IFDIR | 0775);
605 if (!inode) 709 if (!inode)
606 goto out; 710 goto out;
607 711
608 inode->i_op = &spufs_dir_inode_operations; 712 inode->i_op = &simple_dir_inode_operations;
609 inode->i_fop = &simple_dir_operations; 713 inode->i_fop = &simple_dir_operations;
610 SPUFS_I(inode)->i_ctx = NULL; 714 SPUFS_I(inode)->i_ctx = NULL;
611 715
@@ -670,7 +774,7 @@ static int __init spufs_init(void)
670 ret = -ENOMEM; 774 ret = -ENOMEM;
671 spufs_inode_cache = kmem_cache_create("spufs_inode_cache", 775 spufs_inode_cache = kmem_cache_create("spufs_inode_cache",
672 sizeof(struct spufs_inode_info), 0, 776 sizeof(struct spufs_inode_info), 0,
673 SLAB_HWCACHE_ALIGN, spufs_init_once, NULL); 777 SLAB_HWCACHE_ALIGN, spufs_init_once);
674 778
675 if (!spufs_inode_cache) 779 if (!spufs_inode_cache)
676 goto out; 780 goto out;
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index 57626600b1a4..0b50fa5cb39d 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -18,18 +18,21 @@ void spufs_stop_callback(struct spu *spu)
18 wake_up_all(&ctx->stop_wq); 18 wake_up_all(&ctx->stop_wq);
19} 19}
20 20
21static inline int spu_stopped(struct spu_context *ctx, u32 * stat) 21static inline int spu_stopped(struct spu_context *ctx, u32 *stat)
22{ 22{
23 struct spu *spu; 23 struct spu *spu;
24 u64 pte_fault; 24 u64 pte_fault;
25 25
26 *stat = ctx->ops->status_read(ctx); 26 *stat = ctx->ops->status_read(ctx);
27 if (ctx->state != SPU_STATE_RUNNABLE) 27
28 return 1;
29 spu = ctx->spu; 28 spu = ctx->spu;
29 if (ctx->state != SPU_STATE_RUNNABLE ||
30 test_bit(SPU_SCHED_NOTIFY_ACTIVE, &ctx->sched_flags))
31 return 1;
30 pte_fault = spu->dsisr & 32 pte_fault = spu->dsisr &
31 (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED); 33 (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED);
32 return (!(*stat & 0x1) || pte_fault || spu->class_0_pending) ? 1 : 0; 34 return (!(*stat & SPU_STATUS_RUNNING) || pte_fault || spu->class_0_pending) ?
35 1 : 0;
33} 36}
34 37
35static int spu_setup_isolated(struct spu_context *ctx) 38static int spu_setup_isolated(struct spu_context *ctx)
@@ -123,8 +126,10 @@ out:
123 return ret; 126 return ret;
124} 127}
125 128
126static int spu_run_init(struct spu_context *ctx, u32 * npc) 129static int spu_run_init(struct spu_context *ctx, u32 *npc)
127{ 130{
131 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
132
128 if (ctx->flags & SPU_CREATE_ISOLATE) { 133 if (ctx->flags & SPU_CREATE_ISOLATE) {
129 unsigned long runcntl; 134 unsigned long runcntl;
130 135
@@ -142,22 +147,28 @@ static int spu_run_init(struct spu_context *ctx, u32 * npc)
142 runcntl = SPU_RUNCNTL_RUNNABLE; 147 runcntl = SPU_RUNCNTL_RUNNABLE;
143 ctx->ops->runcntl_write(ctx, runcntl); 148 ctx->ops->runcntl_write(ctx, runcntl);
144 } else { 149 } else {
145 spu_start_tick(ctx); 150 unsigned long mode = SPU_PRIVCNTL_MODE_NORMAL;
146 ctx->ops->npc_write(ctx, *npc); 151 ctx->ops->npc_write(ctx, *npc);
152 if (test_thread_flag(TIF_SINGLESTEP))
153 mode = SPU_PRIVCNTL_MODE_SINGLE_STEP;
154 out_be64(&ctx->spu->priv2->spu_privcntl_RW, mode);
147 ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_RUNNABLE); 155 ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_RUNNABLE);
148 } 156 }
149 157
158 spuctx_switch_state(ctx, SPU_UTIL_USER);
159
150 return 0; 160 return 0;
151} 161}
152 162
153static int spu_run_fini(struct spu_context *ctx, u32 * npc, 163static int spu_run_fini(struct spu_context *ctx, u32 *npc,
154 u32 * status) 164 u32 *status)
155{ 165{
156 int ret = 0; 166 int ret = 0;
157 167
158 spu_stop_tick(ctx);
159 *status = ctx->ops->status_read(ctx); 168 *status = ctx->ops->status_read(ctx);
160 *npc = ctx->ops->npc_read(ctx); 169 *npc = ctx->ops->npc_read(ctx);
170
171 spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED);
161 spu_release(ctx); 172 spu_release(ctx);
162 173
163 if (signal_pending(current)) 174 if (signal_pending(current))
@@ -286,10 +297,10 @@ static inline int spu_process_events(struct spu_context *ctx)
286 return ret; 297 return ret;
287} 298}
288 299
289long spufs_run_spu(struct file *file, struct spu_context *ctx, 300long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
290 u32 *npc, u32 *event)
291{ 301{
292 int ret; 302 int ret;
303 struct spu *spu;
293 u32 status; 304 u32 status;
294 305
295 if (mutex_lock_interruptible(&ctx->run_mutex)) 306 if (mutex_lock_interruptible(&ctx->run_mutex))
@@ -298,9 +309,22 @@ long spufs_run_spu(struct file *file, struct spu_context *ctx,
298 ctx->ops->master_start(ctx); 309 ctx->ops->master_start(ctx);
299 ctx->event_return = 0; 310 ctx->event_return = 0;
300 311
301 ret = spu_acquire_runnable(ctx, 0); 312 spu_acquire(ctx);
302 if (ret) 313 if (ctx->state == SPU_STATE_SAVED) {
303 return ret; 314 __spu_update_sched_info(ctx);
315
316 ret = spu_activate(ctx, 0);
317 if (ret) {
318 spu_release(ctx);
319 goto out;
320 }
321 } else {
322 /*
323 * We have to update the scheduling priority under active_mutex
324 * to protect against find_victim().
325 */
326 spu_update_sched_info(ctx);
327 }
304 328
305 ret = spu_run_init(ctx, npc); 329 ret = spu_run_init(ctx, npc);
306 if (ret) { 330 if (ret) {
@@ -312,6 +336,17 @@ long spufs_run_spu(struct file *file, struct spu_context *ctx,
312 ret = spufs_wait(ctx->stop_wq, spu_stopped(ctx, &status)); 336 ret = spufs_wait(ctx->stop_wq, spu_stopped(ctx, &status));
313 if (unlikely(ret)) 337 if (unlikely(ret))
314 break; 338 break;
339 spu = ctx->spu;
340 if (unlikely(test_and_clear_bit(SPU_SCHED_NOTIFY_ACTIVE,
341 &ctx->sched_flags))) {
342 if (!(status & SPU_STATUS_STOPPED_BY_STOP)) {
343 spu_switch_notify(spu, ctx);
344 continue;
345 }
346 }
347
348 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
349
315 if ((status & SPU_STATUS_STOPPED_BY_STOP) && 350 if ((status & SPU_STATUS_STOPPED_BY_STOP) &&
316 (status >> SPU_STOP_STATUS_SHIFT == 0x2104)) { 351 (status >> SPU_STOP_STATUS_SHIFT == 0x2104)) {
317 ret = spu_process_callback(ctx); 352 ret = spu_process_callback(ctx);
@@ -325,16 +360,21 @@ long spufs_run_spu(struct file *file, struct spu_context *ctx,
325 360
326 if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) { 361 if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) {
327 ret = spu_reacquire_runnable(ctx, npc, &status); 362 ret = spu_reacquire_runnable(ctx, npc, &status);
328 if (ret) { 363 if (ret)
329 spu_stop_tick(ctx);
330 goto out2; 364 goto out2;
331 }
332 continue; 365 continue;
333 } 366 }
334 ret = spu_process_events(ctx); 367 ret = spu_process_events(ctx);
335 368
336 } while (!ret && !(status & (SPU_STATUS_STOPPED_BY_STOP | 369 } while (!ret && !(status & (SPU_STATUS_STOPPED_BY_STOP |
337 SPU_STATUS_STOPPED_BY_HALT))); 370 SPU_STATUS_STOPPED_BY_HALT |
371 SPU_STATUS_SINGLE_STEP)));
372
373 if ((status & SPU_STATUS_STOPPED_BY_STOP) &&
374 (((status >> SPU_STOP_STATUS_SHIFT) & 0x3f00) == 0x2100) &&
375 (ctx->state == SPU_STATE_RUNNABLE))
376 ctx->stats.libassist++;
377
338 378
339 ctx->ops->master_stop(ctx); 379 ctx->ops->master_stop(ctx);
340 ret = spu_run_fini(ctx, npc, &status); 380 ret = spu_run_fini(ctx, npc, &status);
@@ -344,10 +384,15 @@ out2:
344 if ((ret == 0) || 384 if ((ret == 0) ||
345 ((ret == -ERESTARTSYS) && 385 ((ret == -ERESTARTSYS) &&
346 ((status & SPU_STATUS_STOPPED_BY_HALT) || 386 ((status & SPU_STATUS_STOPPED_BY_HALT) ||
387 (status & SPU_STATUS_SINGLE_STEP) ||
347 ((status & SPU_STATUS_STOPPED_BY_STOP) && 388 ((status & SPU_STATUS_STOPPED_BY_STOP) &&
348 (status >> SPU_STOP_STATUS_SHIFT != 0x2104))))) 389 (status >> SPU_STOP_STATUS_SHIFT != 0x2104)))))
349 ret = status; 390 ret = status;
350 391
392 /* Note: we don't need to force_sig SIGTRAP on single-step
393 * since we have TIF_SINGLESTEP set, thus the kernel will do
394 * it upon return from the syscall anyawy
395 */
351 if ((status & SPU_STATUS_STOPPED_BY_STOP) 396 if ((status & SPU_STATUS_STOPPED_BY_STOP)
352 && (status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) { 397 && (status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) {
353 force_sig(SIGTRAP, current); 398 force_sig(SIGTRAP, current);
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index b6ecb30e7d58..227968b4779d 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -35,6 +35,10 @@
35#include <linux/numa.h> 35#include <linux/numa.h>
36#include <linux/mutex.h> 36#include <linux/mutex.h>
37#include <linux/notifier.h> 37#include <linux/notifier.h>
38#include <linux/kthread.h>
39#include <linux/pid_namespace.h>
40#include <linux/proc_fs.h>
41#include <linux/seq_file.h>
38 42
39#include <asm/io.h> 43#include <asm/io.h>
40#include <asm/mmu_context.h> 44#include <asm/mmu_context.h>
@@ -43,134 +47,175 @@
43#include <asm/spu_priv1.h> 47#include <asm/spu_priv1.h>
44#include "spufs.h" 48#include "spufs.h"
45 49
46#define SPU_TIMESLICE (HZ)
47
48struct spu_prio_array { 50struct spu_prio_array {
49 DECLARE_BITMAP(bitmap, MAX_PRIO); 51 DECLARE_BITMAP(bitmap, MAX_PRIO);
50 struct list_head runq[MAX_PRIO]; 52 struct list_head runq[MAX_PRIO];
51 spinlock_t runq_lock; 53 spinlock_t runq_lock;
52 struct list_head active_list[MAX_NUMNODES]; 54 int nr_waiting;
53 struct mutex active_mutex[MAX_NUMNODES];
54}; 55};
55 56
57static unsigned long spu_avenrun[3];
56static struct spu_prio_array *spu_prio; 58static struct spu_prio_array *spu_prio;
57static struct workqueue_struct *spu_sched_wq; 59static struct task_struct *spusched_task;
60static struct timer_list spusched_timer;
58 61
59static inline int node_allowed(int node) 62/*
60{ 63 * Priority of a normal, non-rt, non-niced'd process (aka nice level 0).
61 cpumask_t mask; 64 */
65#define NORMAL_PRIO 120
62 66
63 if (!nr_cpus_node(node)) 67/*
64 return 0; 68 * Frequency of the spu scheduler tick. By default we do one SPU scheduler
65 mask = node_to_cpumask(node); 69 * tick for every 10 CPU scheduler ticks.
66 if (!cpus_intersects(mask, current->cpus_allowed)) 70 */
67 return 0; 71#define SPUSCHED_TICK (10)
68 return 1;
69}
70 72
71void spu_start_tick(struct spu_context *ctx) 73/*
72{ 74 * These are the 'tuning knobs' of the scheduler:
73 if (ctx->policy == SCHED_RR) { 75 *
74 /* 76 * Minimum timeslice is 5 msecs (or 1 spu scheduler tick, whichever is
75 * Make sure the exiting bit is cleared. 77 * larger), default timeslice is 100 msecs, maximum timeslice is 800 msecs.
76 */ 78 */
77 clear_bit(SPU_SCHED_EXITING, &ctx->sched_flags); 79#define MIN_SPU_TIMESLICE max(5 * HZ / (1000 * SPUSCHED_TICK), 1)
78 mb(); 80#define DEF_SPU_TIMESLICE (100 * HZ / (1000 * SPUSCHED_TICK))
79 queue_delayed_work(spu_sched_wq, &ctx->sched_work, SPU_TIMESLICE);
80 }
81}
82 81
83void spu_stop_tick(struct spu_context *ctx) 82#define MAX_USER_PRIO (MAX_PRIO - MAX_RT_PRIO)
83#define SCALE_PRIO(x, prio) \
84 max(x * (MAX_PRIO - prio) / (MAX_USER_PRIO / 2), MIN_SPU_TIMESLICE)
85
86/*
87 * scale user-nice values [ -20 ... 0 ... 19 ] to time slice values:
88 * [800ms ... 100ms ... 5ms]
89 *
90 * The higher a thread's priority, the bigger timeslices
91 * it gets during one round of execution. But even the lowest
92 * priority thread gets MIN_TIMESLICE worth of execution time.
93 */
94void spu_set_timeslice(struct spu_context *ctx)
84{ 95{
85 if (ctx->policy == SCHED_RR) { 96 if (ctx->prio < NORMAL_PRIO)
86 /* 97 ctx->time_slice = SCALE_PRIO(DEF_SPU_TIMESLICE * 4, ctx->prio);
87 * While the work can be rearming normally setting this flag 98 else
88 * makes sure it does not rearm itself anymore. 99 ctx->time_slice = SCALE_PRIO(DEF_SPU_TIMESLICE, ctx->prio);
89 */
90 set_bit(SPU_SCHED_EXITING, &ctx->sched_flags);
91 mb();
92 cancel_delayed_work(&ctx->sched_work);
93 }
94} 100}
95 101
96void spu_sched_tick(struct work_struct *work) 102/*
103 * Update scheduling information from the owning thread.
104 */
105void __spu_update_sched_info(struct spu_context *ctx)
97{ 106{
98 struct spu_context *ctx = 107 /*
99 container_of(work, struct spu_context, sched_work.work); 108 * 32-Bit assignment are atomic on powerpc, and we don't care about
100 struct spu *spu; 109 * memory ordering here because retriving the controlling thread is
101 int preempted = 0; 110 * per defintion racy.
111 */
112 ctx->tid = current->pid;
102 113
103 /* 114 /*
104 * If this context is being stopped avoid rescheduling from the 115 * We do our own priority calculations, so we normally want
105 * scheduler tick because we would block on the state_mutex. 116 * ->static_prio to start with. Unfortunately thies field
106 * The caller will yield the spu later on anyway. 117 * contains junk for threads with a realtime scheduling
118 * policy so we have to look at ->prio in this case.
107 */ 119 */
108 if (test_bit(SPU_SCHED_EXITING, &ctx->sched_flags)) 120 if (rt_prio(current->prio))
109 return; 121 ctx->prio = current->prio;
122 else
123 ctx->prio = current->static_prio;
124 ctx->policy = current->policy;
110 125
111 mutex_lock(&ctx->state_mutex); 126 /*
112 spu = ctx->spu; 127 * A lot of places that don't hold list_mutex poke into
113 if (spu) { 128 * cpus_allowed, including grab_runnable_context which
114 int best = sched_find_first_bit(spu_prio->bitmap); 129 * already holds the runq_lock. So abuse runq_lock
115 if (best <= ctx->prio) { 130 * to protect this field aswell.
116 spu_deactivate(ctx); 131 */
117 preempted = 1; 132 spin_lock(&spu_prio->runq_lock);
118 } 133 ctx->cpus_allowed = current->cpus_allowed;
119 } 134 spin_unlock(&spu_prio->runq_lock);
120 mutex_unlock(&ctx->state_mutex); 135}
121 136
122 if (preempted) { 137void spu_update_sched_info(struct spu_context *ctx)
123 /* 138{
124 * We need to break out of the wait loop in spu_run manually 139 int node = ctx->spu->node;
125 * to ensure this context gets put on the runqueue again 140
126 * ASAP. 141 mutex_lock(&cbe_spu_info[node].list_mutex);
127 */ 142 __spu_update_sched_info(ctx);
128 wake_up(&ctx->stop_wq); 143 mutex_unlock(&cbe_spu_info[node].list_mutex);
129 } else
130 spu_start_tick(ctx);
131} 144}
132 145
133/** 146static int __node_allowed(struct spu_context *ctx, int node)
134 * spu_add_to_active_list - add spu to active list
135 * @spu: spu to add to the active list
136 */
137static void spu_add_to_active_list(struct spu *spu)
138{ 147{
139 mutex_lock(&spu_prio->active_mutex[spu->node]); 148 if (nr_cpus_node(node)) {
140 list_add_tail(&spu->list, &spu_prio->active_list[spu->node]); 149 cpumask_t mask = node_to_cpumask(node);
141 mutex_unlock(&spu_prio->active_mutex[spu->node]); 150
151 if (cpus_intersects(mask, ctx->cpus_allowed))
152 return 1;
153 }
154
155 return 0;
142} 156}
143 157
144/** 158static int node_allowed(struct spu_context *ctx, int node)
145 * spu_remove_from_active_list - remove spu from active list
146 * @spu: spu to remove from the active list
147 */
148static void spu_remove_from_active_list(struct spu *spu)
149{ 159{
150 int node = spu->node; 160 int rval;
151 161
152 mutex_lock(&spu_prio->active_mutex[node]); 162 spin_lock(&spu_prio->runq_lock);
153 list_del_init(&spu->list); 163 rval = __node_allowed(ctx, node);
154 mutex_unlock(&spu_prio->active_mutex[node]); 164 spin_unlock(&spu_prio->runq_lock);
165
166 return rval;
155} 167}
156 168
157static BLOCKING_NOTIFIER_HEAD(spu_switch_notifier); 169static BLOCKING_NOTIFIER_HEAD(spu_switch_notifier);
158 170
159static void spu_switch_notify(struct spu *spu, struct spu_context *ctx) 171void spu_switch_notify(struct spu *spu, struct spu_context *ctx)
160{ 172{
161 blocking_notifier_call_chain(&spu_switch_notifier, 173 blocking_notifier_call_chain(&spu_switch_notifier,
162 ctx ? ctx->object_id : 0, spu); 174 ctx ? ctx->object_id : 0, spu);
163} 175}
164 176
177static void notify_spus_active(void)
178{
179 int node;
180
181 /*
182 * Wake up the active spu_contexts.
183 *
184 * When the awakened processes see their "notify_active" flag is set,
185 * they will call spu_switch_notify();
186 */
187 for_each_online_node(node) {
188 struct spu *spu;
189
190 mutex_lock(&cbe_spu_info[node].list_mutex);
191 list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) {
192 if (spu->alloc_state != SPU_FREE) {
193 struct spu_context *ctx = spu->ctx;
194 set_bit(SPU_SCHED_NOTIFY_ACTIVE,
195 &ctx->sched_flags);
196 mb();
197 wake_up_all(&ctx->stop_wq);
198 }
199 }
200 mutex_unlock(&cbe_spu_info[node].list_mutex);
201 }
202}
203
165int spu_switch_event_register(struct notifier_block * n) 204int spu_switch_event_register(struct notifier_block * n)
166{ 205{
167 return blocking_notifier_chain_register(&spu_switch_notifier, n); 206 int ret;
207 ret = blocking_notifier_chain_register(&spu_switch_notifier, n);
208 if (!ret)
209 notify_spus_active();
210 return ret;
168} 211}
212EXPORT_SYMBOL_GPL(spu_switch_event_register);
169 213
170int spu_switch_event_unregister(struct notifier_block * n) 214int spu_switch_event_unregister(struct notifier_block * n)
171{ 215{
172 return blocking_notifier_chain_unregister(&spu_switch_notifier, n); 216 return blocking_notifier_chain_unregister(&spu_switch_notifier, n);
173} 217}
218EXPORT_SYMBOL_GPL(spu_switch_event_unregister);
174 219
175/** 220/**
176 * spu_bind_context - bind spu context to physical spu 221 * spu_bind_context - bind spu context to physical spu
@@ -181,11 +226,22 @@ static void spu_bind_context(struct spu *spu, struct spu_context *ctx)
181{ 226{
182 pr_debug("%s: pid=%d SPU=%d NODE=%d\n", __FUNCTION__, current->pid, 227 pr_debug("%s: pid=%d SPU=%d NODE=%d\n", __FUNCTION__, current->pid,
183 spu->number, spu->node); 228 spu->number, spu->node);
229 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
230
231 if (ctx->flags & SPU_CREATE_NOSCHED)
232 atomic_inc(&cbe_spu_info[spu->node].reserved_spus);
233 if (!list_empty(&ctx->aff_list))
234 atomic_inc(&ctx->gang->aff_sched_count);
235
236 ctx->stats.slb_flt_base = spu->stats.slb_flt;
237 ctx->stats.class2_intr_base = spu->stats.class2_intr;
238
184 spu->ctx = ctx; 239 spu->ctx = ctx;
185 spu->flags = 0; 240 spu->flags = 0;
186 ctx->spu = spu; 241 ctx->spu = spu;
187 ctx->ops = &spu_hw_ops; 242 ctx->ops = &spu_hw_ops;
188 spu->pid = current->pid; 243 spu->pid = current->pid;
244 spu->tgid = current->tgid;
189 spu_associate_mm(spu, ctx->owner); 245 spu_associate_mm(spu, ctx->owner);
190 spu->ibox_callback = spufs_ibox_callback; 246 spu->ibox_callback = spufs_ibox_callback;
191 spu->wbox_callback = spufs_wbox_callback; 247 spu->wbox_callback = spufs_wbox_callback;
@@ -198,8 +254,154 @@ static void spu_bind_context(struct spu *spu, struct spu_context *ctx)
198 spu->timestamp = jiffies; 254 spu->timestamp = jiffies;
199 spu_cpu_affinity_set(spu, raw_smp_processor_id()); 255 spu_cpu_affinity_set(spu, raw_smp_processor_id());
200 spu_switch_notify(spu, ctx); 256 spu_switch_notify(spu, ctx);
201 spu_add_to_active_list(spu);
202 ctx->state = SPU_STATE_RUNNABLE; 257 ctx->state = SPU_STATE_RUNNABLE;
258
259 spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED);
260}
261
262/*
263 * Must be used with the list_mutex held.
264 */
265static inline int sched_spu(struct spu *spu)
266{
267 BUG_ON(!mutex_is_locked(&cbe_spu_info[spu->node].list_mutex));
268
269 return (!spu->ctx || !(spu->ctx->flags & SPU_CREATE_NOSCHED));
270}
271
272static void aff_merge_remaining_ctxs(struct spu_gang *gang)
273{
274 struct spu_context *ctx;
275
276 list_for_each_entry(ctx, &gang->aff_list_head, aff_list) {
277 if (list_empty(&ctx->aff_list))
278 list_add(&ctx->aff_list, &gang->aff_list_head);
279 }
280 gang->aff_flags |= AFF_MERGED;
281}
282
283static void aff_set_offsets(struct spu_gang *gang)
284{
285 struct spu_context *ctx;
286 int offset;
287
288 offset = -1;
289 list_for_each_entry_reverse(ctx, &gang->aff_ref_ctx->aff_list,
290 aff_list) {
291 if (&ctx->aff_list == &gang->aff_list_head)
292 break;
293 ctx->aff_offset = offset--;
294 }
295
296 offset = 0;
297 list_for_each_entry(ctx, gang->aff_ref_ctx->aff_list.prev, aff_list) {
298 if (&ctx->aff_list == &gang->aff_list_head)
299 break;
300 ctx->aff_offset = offset++;
301 }
302
303 gang->aff_flags |= AFF_OFFSETS_SET;
304}
305
306static struct spu *aff_ref_location(struct spu_context *ctx, int mem_aff,
307 int group_size, int lowest_offset)
308{
309 struct spu *spu;
310 int node, n;
311
312 /*
313 * TODO: A better algorithm could be used to find a good spu to be
314 * used as reference location for the ctxs chain.
315 */
316 node = cpu_to_node(raw_smp_processor_id());
317 for (n = 0; n < MAX_NUMNODES; n++, node++) {
318 node = (node < MAX_NUMNODES) ? node : 0;
319 if (!node_allowed(ctx, node))
320 continue;
321 mutex_lock(&cbe_spu_info[node].list_mutex);
322 list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) {
323 if ((!mem_aff || spu->has_mem_affinity) &&
324 sched_spu(spu)) {
325 mutex_unlock(&cbe_spu_info[node].list_mutex);
326 return spu;
327 }
328 }
329 mutex_unlock(&cbe_spu_info[node].list_mutex);
330 }
331 return NULL;
332}
333
334static void aff_set_ref_point_location(struct spu_gang *gang)
335{
336 int mem_aff, gs, lowest_offset;
337 struct spu_context *ctx;
338 struct spu *tmp;
339
340 mem_aff = gang->aff_ref_ctx->flags & SPU_CREATE_AFFINITY_MEM;
341 lowest_offset = 0;
342 gs = 0;
343
344 list_for_each_entry(tmp, &gang->aff_list_head, aff_list)
345 gs++;
346
347 list_for_each_entry_reverse(ctx, &gang->aff_ref_ctx->aff_list,
348 aff_list) {
349 if (&ctx->aff_list == &gang->aff_list_head)
350 break;
351 lowest_offset = ctx->aff_offset;
352 }
353
354 gang->aff_ref_spu = aff_ref_location(ctx, mem_aff, gs, lowest_offset);
355}
356
357static struct spu *ctx_location(struct spu *ref, int offset, int node)
358{
359 struct spu *spu;
360
361 spu = NULL;
362 if (offset >= 0) {
363 list_for_each_entry(spu, ref->aff_list.prev, aff_list) {
364 BUG_ON(spu->node != node);
365 if (offset == 0)
366 break;
367 if (sched_spu(spu))
368 offset--;
369 }
370 } else {
371 list_for_each_entry_reverse(spu, ref->aff_list.next, aff_list) {
372 BUG_ON(spu->node != node);
373 if (offset == 0)
374 break;
375 if (sched_spu(spu))
376 offset++;
377 }
378 }
379
380 return spu;
381}
382
383/*
384 * affinity_check is called each time a context is going to be scheduled.
385 * It returns the spu ptr on which the context must run.
386 */
387static int has_affinity(struct spu_context *ctx)
388{
389 struct spu_gang *gang = ctx->gang;
390
391 if (list_empty(&ctx->aff_list))
392 return 0;
393
394 mutex_lock(&gang->aff_mutex);
395 if (!gang->aff_ref_spu) {
396 if (!(gang->aff_flags & AFF_MERGED))
397 aff_merge_remaining_ctxs(gang);
398 if (!(gang->aff_flags & AFF_OFFSETS_SET))
399 aff_set_offsets(gang);
400 aff_set_ref_point_location(gang);
401 }
402 mutex_unlock(&gang->aff_mutex);
403
404 return gang->aff_ref_spu != NULL;
203} 405}
204 406
205/** 407/**
@@ -211,8 +413,13 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
211{ 413{
212 pr_debug("%s: unbind pid=%d SPU=%d NODE=%d\n", __FUNCTION__, 414 pr_debug("%s: unbind pid=%d SPU=%d NODE=%d\n", __FUNCTION__,
213 spu->pid, spu->number, spu->node); 415 spu->pid, spu->number, spu->node);
416 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
214 417
215 spu_remove_from_active_list(spu); 418 if (spu->ctx->flags & SPU_CREATE_NOSCHED)
419 atomic_dec(&cbe_spu_info[spu->node].reserved_spus);
420 if (!list_empty(&ctx->aff_list))
421 if (atomic_dec_and_test(&ctx->gang->aff_sched_count))
422 ctx->gang->aff_ref_spu = NULL;
216 spu_switch_notify(spu, NULL); 423 spu_switch_notify(spu, NULL);
217 spu_unmap_mappings(ctx); 424 spu_unmap_mappings(ctx);
218 spu_save(&ctx->csa, spu); 425 spu_save(&ctx->csa, spu);
@@ -225,10 +432,19 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
225 spu->dma_callback = NULL; 432 spu->dma_callback = NULL;
226 spu_associate_mm(spu, NULL); 433 spu_associate_mm(spu, NULL);
227 spu->pid = 0; 434 spu->pid = 0;
435 spu->tgid = 0;
228 ctx->ops = &spu_backing_ops; 436 ctx->ops = &spu_backing_ops;
229 ctx->spu = NULL;
230 spu->flags = 0; 437 spu->flags = 0;
231 spu->ctx = NULL; 438 spu->ctx = NULL;
439
440 ctx->stats.slb_flt +=
441 (spu->stats.slb_flt - ctx->stats.slb_flt_base);
442 ctx->stats.class2_intr +=
443 (spu->stats.class2_intr - ctx->stats.class2_intr_base);
444
445 /* This maps the underlying spu state to idle */
446 spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED);
447 ctx->spu = NULL;
232} 448}
233 449
234/** 450/**
@@ -237,20 +453,39 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
237 */ 453 */
238static void __spu_add_to_rq(struct spu_context *ctx) 454static void __spu_add_to_rq(struct spu_context *ctx)
239{ 455{
240 int prio = ctx->prio; 456 /*
241 457 * Unfortunately this code path can be called from multiple threads
242 list_add_tail(&ctx->rq, &spu_prio->runq[prio]); 458 * on behalf of a single context due to the way the problem state
243 set_bit(prio, spu_prio->bitmap); 459 * mmap support works.
460 *
461 * Fortunately we need to wake up all these threads at the same time
462 * and can simply skip the runqueue addition for every but the first
463 * thread getting into this codepath.
464 *
465 * It's still quite hacky, and long-term we should proxy all other
466 * threads through the owner thread so that spu_run is in control
467 * of all the scheduling activity for a given context.
468 */
469 if (list_empty(&ctx->rq)) {
470 list_add_tail(&ctx->rq, &spu_prio->runq[ctx->prio]);
471 set_bit(ctx->prio, spu_prio->bitmap);
472 if (!spu_prio->nr_waiting++)
473 __mod_timer(&spusched_timer, jiffies + SPUSCHED_TICK);
474 }
244} 475}
245 476
246static void __spu_del_from_rq(struct spu_context *ctx) 477static void __spu_del_from_rq(struct spu_context *ctx)
247{ 478{
248 int prio = ctx->prio; 479 int prio = ctx->prio;
249 480
250 if (!list_empty(&ctx->rq)) 481 if (!list_empty(&ctx->rq)) {
482 if (!--spu_prio->nr_waiting)
483 del_timer(&spusched_timer);
251 list_del_init(&ctx->rq); 484 list_del_init(&ctx->rq);
252 if (list_empty(&spu_prio->runq[prio])) 485
253 clear_bit(prio, spu_prio->bitmap); 486 if (list_empty(&spu_prio->runq[prio]))
487 clear_bit(prio, spu_prio->bitmap);
488 }
254} 489}
255 490
256static void spu_prio_wait(struct spu_context *ctx) 491static void spu_prio_wait(struct spu_context *ctx)
@@ -273,48 +508,43 @@ static void spu_prio_wait(struct spu_context *ctx)
273 remove_wait_queue(&ctx->stop_wq, &wait); 508 remove_wait_queue(&ctx->stop_wq, &wait);
274} 509}
275 510
276/** 511static struct spu *spu_get_idle(struct spu_context *ctx)
277 * spu_reschedule - try to find a runnable context for a spu
278 * @spu: spu available
279 *
280 * This function is called whenever a spu becomes idle. It looks for the
281 * most suitable runnable spu context and schedules it for execution.
282 */
283static void spu_reschedule(struct spu *spu)
284{ 512{
285 int best; 513 struct spu *spu;
286 514 int node, n;
287 spu_free(spu);
288
289 spin_lock(&spu_prio->runq_lock);
290 best = sched_find_first_bit(spu_prio->bitmap);
291 if (best < MAX_PRIO) {
292 struct list_head *rq = &spu_prio->runq[best];
293 struct spu_context *ctx;
294 515
295 BUG_ON(list_empty(rq)); 516 if (has_affinity(ctx)) {
517 node = ctx->gang->aff_ref_spu->node;
296 518
297 ctx = list_entry(rq->next, struct spu_context, rq); 519 mutex_lock(&cbe_spu_info[node].list_mutex);
298 __spu_del_from_rq(ctx); 520 spu = ctx_location(ctx->gang->aff_ref_spu, ctx->aff_offset, node);
299 wake_up(&ctx->stop_wq); 521 if (spu && spu->alloc_state == SPU_FREE)
522 goto found;
523 mutex_unlock(&cbe_spu_info[node].list_mutex);
524 return NULL;
300 } 525 }
301 spin_unlock(&spu_prio->runq_lock);
302}
303
304static struct spu *spu_get_idle(struct spu_context *ctx)
305{
306 struct spu *spu = NULL;
307 int node = cpu_to_node(raw_smp_processor_id());
308 int n;
309 526
527 node = cpu_to_node(raw_smp_processor_id());
310 for (n = 0; n < MAX_NUMNODES; n++, node++) { 528 for (n = 0; n < MAX_NUMNODES; n++, node++) {
311 node = (node < MAX_NUMNODES) ? node : 0; 529 node = (node < MAX_NUMNODES) ? node : 0;
312 if (!node_allowed(node)) 530 if (!node_allowed(ctx, node))
313 continue; 531 continue;
314 spu = spu_alloc_node(node); 532
315 if (spu) 533 mutex_lock(&cbe_spu_info[node].list_mutex);
316 break; 534 list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) {
535 if (spu->alloc_state == SPU_FREE)
536 goto found;
537 }
538 mutex_unlock(&cbe_spu_info[node].list_mutex);
317 } 539 }
540
541 return NULL;
542
543 found:
544 spu->alloc_state = SPU_USED;
545 mutex_unlock(&cbe_spu_info[node].list_mutex);
546 pr_debug("Got SPU %d %d\n", spu->number, spu->node);
547 spu_init_channels(spu);
318 return spu; 548 return spu;
319} 549}
320 550
@@ -341,18 +571,18 @@ static struct spu *find_victim(struct spu_context *ctx)
341 node = cpu_to_node(raw_smp_processor_id()); 571 node = cpu_to_node(raw_smp_processor_id());
342 for (n = 0; n < MAX_NUMNODES; n++, node++) { 572 for (n = 0; n < MAX_NUMNODES; n++, node++) {
343 node = (node < MAX_NUMNODES) ? node : 0; 573 node = (node < MAX_NUMNODES) ? node : 0;
344 if (!node_allowed(node)) 574 if (!node_allowed(ctx, node))
345 continue; 575 continue;
346 576
347 mutex_lock(&spu_prio->active_mutex[node]); 577 mutex_lock(&cbe_spu_info[node].list_mutex);
348 list_for_each_entry(spu, &spu_prio->active_list[node], list) { 578 list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) {
349 struct spu_context *tmp = spu->ctx; 579 struct spu_context *tmp = spu->ctx;
350 580
351 if (tmp->rt_priority < ctx->rt_priority && 581 if (tmp->prio > ctx->prio &&
352 (!victim || tmp->rt_priority < victim->rt_priority)) 582 (!victim || tmp->prio > victim->prio))
353 victim = spu->ctx; 583 victim = spu->ctx;
354 } 584 }
355 mutex_unlock(&spu_prio->active_mutex[node]); 585 mutex_unlock(&cbe_spu_info[node].list_mutex);
356 586
357 if (victim) { 587 if (victim) {
358 /* 588 /*
@@ -377,7 +607,14 @@ static struct spu *find_victim(struct spu_context *ctx)
377 victim = NULL; 607 victim = NULL;
378 goto restart; 608 goto restart;
379 } 609 }
610
611 mutex_lock(&cbe_spu_info[node].list_mutex);
612 cbe_spu_info[node].nr_active--;
613 mutex_unlock(&cbe_spu_info[node].list_mutex);
614
380 spu_unbind_context(spu, victim); 615 spu_unbind_context(spu, victim);
616 victim->stats.invol_ctx_switch++;
617 spu->stats.invol_ctx_switch++;
381 mutex_unlock(&victim->state_mutex); 618 mutex_unlock(&victim->state_mutex);
382 /* 619 /*
383 * We need to break out of the wait loop in spu_run 620 * We need to break out of the wait loop in spu_run
@@ -403,22 +640,32 @@ static struct spu *find_victim(struct spu_context *ctx)
403 */ 640 */
404int spu_activate(struct spu_context *ctx, unsigned long flags) 641int spu_activate(struct spu_context *ctx, unsigned long flags)
405{ 642{
406
407 if (ctx->spu)
408 return 0;
409
410 do { 643 do {
411 struct spu *spu; 644 struct spu *spu;
412 645
646 /*
647 * If there are multiple threads waiting for a single context
648 * only one actually binds the context while the others will
649 * only be able to acquire the state_mutex once the context
650 * already is in runnable state.
651 */
652 if (ctx->spu)
653 return 0;
654
413 spu = spu_get_idle(ctx); 655 spu = spu_get_idle(ctx);
414 /* 656 /*
415 * If this is a realtime thread we try to get it running by 657 * If this is a realtime thread we try to get it running by
416 * preempting a lower priority thread. 658 * preempting a lower priority thread.
417 */ 659 */
418 if (!spu && ctx->rt_priority) 660 if (!spu && rt_prio(ctx->prio))
419 spu = find_victim(ctx); 661 spu = find_victim(ctx);
420 if (spu) { 662 if (spu) {
663 int node = spu->node;
664
665 mutex_lock(&cbe_spu_info[node].list_mutex);
421 spu_bind_context(spu, ctx); 666 spu_bind_context(spu, ctx);
667 cbe_spu_info[node].nr_active++;
668 mutex_unlock(&cbe_spu_info[node].list_mutex);
422 return 0; 669 return 0;
423 } 670 }
424 671
@@ -429,6 +676,65 @@ int spu_activate(struct spu_context *ctx, unsigned long flags)
429} 676}
430 677
431/** 678/**
679 * grab_runnable_context - try to find a runnable context
680 *
681 * Remove the highest priority context on the runqueue and return it
682 * to the caller. Returns %NULL if no runnable context was found.
683 */
684static struct spu_context *grab_runnable_context(int prio, int node)
685{
686 struct spu_context *ctx;
687 int best;
688
689 spin_lock(&spu_prio->runq_lock);
690 best = find_first_bit(spu_prio->bitmap, prio);
691 while (best < prio) {
692 struct list_head *rq = &spu_prio->runq[best];
693
694 list_for_each_entry(ctx, rq, rq) {
695 /* XXX(hch): check for affinity here aswell */
696 if (__node_allowed(ctx, node)) {
697 __spu_del_from_rq(ctx);
698 goto found;
699 }
700 }
701 best++;
702 }
703 ctx = NULL;
704 found:
705 spin_unlock(&spu_prio->runq_lock);
706 return ctx;
707}
708
709static int __spu_deactivate(struct spu_context *ctx, int force, int max_prio)
710{
711 struct spu *spu = ctx->spu;
712 struct spu_context *new = NULL;
713
714 if (spu) {
715 new = grab_runnable_context(max_prio, spu->node);
716 if (new || force) {
717 int node = spu->node;
718
719 mutex_lock(&cbe_spu_info[node].list_mutex);
720 spu_unbind_context(spu, ctx);
721 spu->alloc_state = SPU_FREE;
722 cbe_spu_info[node].nr_active--;
723 mutex_unlock(&cbe_spu_info[node].list_mutex);
724
725 ctx->stats.vol_ctx_switch++;
726 spu->stats.vol_ctx_switch++;
727
728 if (new)
729 wake_up(&new->stop_wq);
730 }
731
732 }
733
734 return new != NULL;
735}
736
737/**
432 * spu_deactivate - unbind a context from it's physical spu 738 * spu_deactivate - unbind a context from it's physical spu
433 * @ctx: spu context to unbind 739 * @ctx: spu context to unbind
434 * 740 *
@@ -437,16 +743,11 @@ int spu_activate(struct spu_context *ctx, unsigned long flags)
437 */ 743 */
438void spu_deactivate(struct spu_context *ctx) 744void spu_deactivate(struct spu_context *ctx)
439{ 745{
440 struct spu *spu = ctx->spu; 746 __spu_deactivate(ctx, 1, MAX_PRIO);
441
442 if (spu) {
443 spu_unbind_context(spu, ctx);
444 spu_reschedule(spu);
445 }
446} 747}
447 748
448/** 749/**
449 * spu_yield - yield a physical spu if others are waiting 750 * spu_yield - yield a physical spu if others are waiting
450 * @ctx: spu context to yield 751 * @ctx: spu context to yield
451 * 752 *
452 * Check if there is a higher priority context waiting and if yes 753 * Check if there is a higher priority context waiting and if yes
@@ -455,63 +756,224 @@ void spu_deactivate(struct spu_context *ctx)
455 */ 756 */
456void spu_yield(struct spu_context *ctx) 757void spu_yield(struct spu_context *ctx)
457{ 758{
458 struct spu *spu; 759 if (!(ctx->flags & SPU_CREATE_NOSCHED)) {
760 mutex_lock(&ctx->state_mutex);
761 __spu_deactivate(ctx, 0, MAX_PRIO);
762 mutex_unlock(&ctx->state_mutex);
763 }
764}
459 765
766static noinline void spusched_tick(struct spu_context *ctx)
767{
768 if (ctx->flags & SPU_CREATE_NOSCHED)
769 return;
770 if (ctx->policy == SCHED_FIFO)
771 return;
772
773 if (--ctx->time_slice)
774 return;
775
776 /*
777 * Unfortunately list_mutex ranks outside of state_mutex, so
778 * we have to trylock here. If we fail give the context another
779 * tick and try again.
780 */
460 if (mutex_trylock(&ctx->state_mutex)) { 781 if (mutex_trylock(&ctx->state_mutex)) {
461 if ((spu = ctx->spu) != NULL) { 782 struct spu *spu = ctx->spu;
462 int best = sched_find_first_bit(spu_prio->bitmap); 783 struct spu_context *new;
463 if (best < MAX_PRIO) { 784
464 pr_debug("%s: yielding SPU %d NODE %d\n", 785 new = grab_runnable_context(ctx->prio + 1, spu->node);
465 __FUNCTION__, spu->number, spu->node); 786 if (new) {
466 spu_deactivate(ctx); 787 spu_unbind_context(spu, ctx);
467 } 788 ctx->stats.invol_ctx_switch++;
789 spu->stats.invol_ctx_switch++;
790 spu->alloc_state = SPU_FREE;
791 cbe_spu_info[spu->node].nr_active--;
792 wake_up(&new->stop_wq);
793 /*
794 * We need to break out of the wait loop in
795 * spu_run manually to ensure this context
796 * gets put on the runqueue again ASAP.
797 */
798 wake_up(&ctx->stop_wq);
468 } 799 }
800 spu_set_timeslice(ctx);
469 mutex_unlock(&ctx->state_mutex); 801 mutex_unlock(&ctx->state_mutex);
802 } else {
803 ctx->time_slice++;
470 } 804 }
471} 805}
472 806
473int __init spu_sched_init(void) 807/**
808 * count_active_contexts - count nr of active tasks
809 *
810 * Return the number of tasks currently running or waiting to run.
811 *
812 * Note that we don't take runq_lock / list_mutex here. Reading
813 * a single 32bit value is atomic on powerpc, and we don't care
814 * about memory ordering issues here.
815 */
816static unsigned long count_active_contexts(void)
474{ 817{
475 int i; 818 int nr_active = 0, node;
476 819
477 spu_sched_wq = create_singlethread_workqueue("spusched"); 820 for (node = 0; node < MAX_NUMNODES; node++)
478 if (!spu_sched_wq) 821 nr_active += cbe_spu_info[node].nr_active;
479 return 1; 822 nr_active += spu_prio->nr_waiting;
480 823
481 spu_prio = kzalloc(sizeof(struct spu_prio_array), GFP_KERNEL); 824 return nr_active;
482 if (!spu_prio) { 825}
483 printk(KERN_WARNING "%s: Unable to allocate priority queue.\n", 826
484 __FUNCTION__); 827/**
485 destroy_workqueue(spu_sched_wq); 828 * spu_calc_load - given tick count, update the avenrun load estimates.
486 return 1; 829 * @tick: tick count
830 *
831 * No locking against reading these values from userspace, as for
832 * the CPU loadavg code.
833 */
834static void spu_calc_load(unsigned long ticks)
835{
836 unsigned long active_tasks; /* fixed-point */
837 static int count = LOAD_FREQ;
838
839 count -= ticks;
840
841 if (unlikely(count < 0)) {
842 active_tasks = count_active_contexts() * FIXED_1;
843 do {
844 CALC_LOAD(spu_avenrun[0], EXP_1, active_tasks);
845 CALC_LOAD(spu_avenrun[1], EXP_5, active_tasks);
846 CALC_LOAD(spu_avenrun[2], EXP_15, active_tasks);
847 count += LOAD_FREQ;
848 } while (count < 0);
849 }
850}
851
852static void spusched_wake(unsigned long data)
853{
854 mod_timer(&spusched_timer, jiffies + SPUSCHED_TICK);
855 wake_up_process(spusched_task);
856 spu_calc_load(SPUSCHED_TICK);
857}
858
859static int spusched_thread(void *unused)
860{
861 struct spu *spu;
862 int node;
863
864 while (!kthread_should_stop()) {
865 set_current_state(TASK_INTERRUPTIBLE);
866 schedule();
867 for (node = 0; node < MAX_NUMNODES; node++) {
868 mutex_lock(&cbe_spu_info[node].list_mutex);
869 list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list)
870 if (spu->ctx)
871 spusched_tick(spu->ctx);
872 mutex_unlock(&cbe_spu_info[node].list_mutex);
873 }
487 } 874 }
875
876 return 0;
877}
878
879#define LOAD_INT(x) ((x) >> FSHIFT)
880#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
881
882static int show_spu_loadavg(struct seq_file *s, void *private)
883{
884 int a, b, c;
885
886 a = spu_avenrun[0] + (FIXED_1/200);
887 b = spu_avenrun[1] + (FIXED_1/200);
888 c = spu_avenrun[2] + (FIXED_1/200);
889
890 /*
891 * Note that last_pid doesn't really make much sense for the
892 * SPU loadavg (it even seems very odd on the CPU side..),
893 * but we include it here to have a 100% compatible interface.
894 */
895 seq_printf(s, "%d.%02d %d.%02d %d.%02d %ld/%d %d\n",
896 LOAD_INT(a), LOAD_FRAC(a),
897 LOAD_INT(b), LOAD_FRAC(b),
898 LOAD_INT(c), LOAD_FRAC(c),
899 count_active_contexts(),
900 atomic_read(&nr_spu_contexts),
901 current->nsproxy->pid_ns->last_pid);
902 return 0;
903}
904
905static int spu_loadavg_open(struct inode *inode, struct file *file)
906{
907 return single_open(file, show_spu_loadavg, NULL);
908}
909
910static const struct file_operations spu_loadavg_fops = {
911 .open = spu_loadavg_open,
912 .read = seq_read,
913 .llseek = seq_lseek,
914 .release = single_release,
915};
916
917int __init spu_sched_init(void)
918{
919 struct proc_dir_entry *entry;
920 int err = -ENOMEM, i;
921
922 spu_prio = kzalloc(sizeof(struct spu_prio_array), GFP_KERNEL);
923 if (!spu_prio)
924 goto out;
925
488 for (i = 0; i < MAX_PRIO; i++) { 926 for (i = 0; i < MAX_PRIO; i++) {
489 INIT_LIST_HEAD(&spu_prio->runq[i]); 927 INIT_LIST_HEAD(&spu_prio->runq[i]);
490 __clear_bit(i, spu_prio->bitmap); 928 __clear_bit(i, spu_prio->bitmap);
491 } 929 }
492 __set_bit(MAX_PRIO, spu_prio->bitmap);
493 for (i = 0; i < MAX_NUMNODES; i++) { 930 for (i = 0; i < MAX_NUMNODES; i++) {
494 mutex_init(&spu_prio->active_mutex[i]); 931 mutex_init(&cbe_spu_info[i].list_mutex);
495 INIT_LIST_HEAD(&spu_prio->active_list[i]); 932 INIT_LIST_HEAD(&cbe_spu_info[i].spus);
496 } 933 }
497 spin_lock_init(&spu_prio->runq_lock); 934 spin_lock_init(&spu_prio->runq_lock);
935
936 setup_timer(&spusched_timer, spusched_wake, 0);
937
938 spusched_task = kthread_run(spusched_thread, NULL, "spusched");
939 if (IS_ERR(spusched_task)) {
940 err = PTR_ERR(spusched_task);
941 goto out_free_spu_prio;
942 }
943
944 entry = create_proc_entry("spu_loadavg", 0, NULL);
945 if (!entry)
946 goto out_stop_kthread;
947 entry->proc_fops = &spu_loadavg_fops;
948
949 pr_debug("spusched: tick: %d, min ticks: %d, default ticks: %d\n",
950 SPUSCHED_TICK, MIN_SPU_TIMESLICE, DEF_SPU_TIMESLICE);
498 return 0; 951 return 0;
952
953 out_stop_kthread:
954 kthread_stop(spusched_task);
955 out_free_spu_prio:
956 kfree(spu_prio);
957 out:
958 return err;
499} 959}
500 960
501void __exit spu_sched_exit(void) 961void spu_sched_exit(void)
502{ 962{
503 struct spu *spu, *tmp; 963 struct spu *spu;
504 int node; 964 int node;
505 965
966 remove_proc_entry("spu_loadavg", NULL);
967
968 del_timer_sync(&spusched_timer);
969 kthread_stop(spusched_task);
970
506 for (node = 0; node < MAX_NUMNODES; node++) { 971 for (node = 0; node < MAX_NUMNODES; node++) {
507 mutex_lock(&spu_prio->active_mutex[node]); 972 mutex_lock(&cbe_spu_info[node].list_mutex);
508 list_for_each_entry_safe(spu, tmp, &spu_prio->active_list[node], 973 list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list)
509 list) { 974 if (spu->alloc_state != SPU_FREE)
510 list_del_init(&spu->list); 975 spu->alloc_state = SPU_FREE;
511 spu_free(spu); 976 mutex_unlock(&cbe_spu_info[node].list_mutex);
512 }
513 mutex_unlock(&spu_prio->active_mutex[node]);
514 } 977 }
515 kfree(spu_prio); 978 kfree(spu_prio);
516 destroy_workqueue(spu_sched_wq);
517} 979}
diff --git a/arch/powerpc/platforms/cell/spufs/spu_restore.c b/arch/powerpc/platforms/cell/spufs/spu_restore.c
index 0bf723dcd677..21a9c952d88b 100644
--- a/arch/powerpc/platforms/cell/spufs/spu_restore.c
+++ b/arch/powerpc/platforms/cell/spufs/spu_restore.c
@@ -84,13 +84,13 @@ static inline void restore_decr(void)
84 unsigned int decr_running; 84 unsigned int decr_running;
85 unsigned int decr; 85 unsigned int decr;
86 86
87 /* Restore, Step 6: 87 /* Restore, Step 6(moved):
88 * If the LSCSA "decrementer running" flag is set 88 * If the LSCSA "decrementer running" flag is set
89 * then write the SPU_WrDec channel with the 89 * then write the SPU_WrDec channel with the
90 * decrementer value from LSCSA. 90 * decrementer value from LSCSA.
91 */ 91 */
92 offset = LSCSA_QW_OFFSET(decr_status); 92 offset = LSCSA_QW_OFFSET(decr_status);
93 decr_running = regs_spill[offset].slot[0]; 93 decr_running = regs_spill[offset].slot[0] & SPU_DECR_STATUS_RUNNING;
94 if (decr_running) { 94 if (decr_running) {
95 offset = LSCSA_QW_OFFSET(decr); 95 offset = LSCSA_QW_OFFSET(decr);
96 decr = regs_spill[offset].slot[0]; 96 decr = regs_spill[offset].slot[0];
@@ -296,7 +296,7 @@ static inline void restore_complete(void)
296 * This code deviates from the documented sequence in the 296 * This code deviates from the documented sequence in the
297 * following aspects: 297 * following aspects:
298 * 298 *
299 * 1. The EA for LSCSA is passed from PPE in the 299 * 1. The EA for LSCSA is passed from PPE in the
300 * signal notification channels. 300 * signal notification channels.
301 * 2. The register spill area is pulled by SPU 301 * 2. The register spill area is pulled by SPU
302 * into LS, rather than pushed by PPE. 302 * into LS, rather than pushed by PPE.
@@ -318,10 +318,10 @@ int main()
318 build_dma_list(lscsa_ea); /* Step 3. */ 318 build_dma_list(lscsa_ea); /* Step 3. */
319 restore_upper_240kb(lscsa_ea); /* Step 4. */ 319 restore_upper_240kb(lscsa_ea); /* Step 4. */
320 /* Step 5: done by 'exit'. */ 320 /* Step 5: done by 'exit'. */
321 restore_decr(); /* Step 6. */
322 enqueue_putllc(lscsa_ea); /* Step 7. */ 321 enqueue_putllc(lscsa_ea); /* Step 7. */
323 set_tag_update(); /* Step 8. */ 322 set_tag_update(); /* Step 8. */
324 read_tag_status(); /* Step 9. */ 323 read_tag_status(); /* Step 9. */
324 restore_decr(); /* moved Step 6. */
325 read_llar_status(); /* Step 10. */ 325 read_llar_status(); /* Step 10. */
326 write_ppu_mb(); /* Step 11. */ 326 write_ppu_mb(); /* Step 11. */
327 write_ppuint_mb(); /* Step 12. */ 327 write_ppuint_mb(); /* Step 12. */
diff --git a/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped b/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped
index 15183d209b58..f383b027e8bf 100644
--- a/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped
+++ b/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped
@@ -10,7 +10,7 @@ static unsigned int spu_restore_code[] __attribute__((__aligned__(128))) = {
100x24fd8081, 100x24fd8081,
110x1cd80081, 110x1cd80081,
120x33001180, 120x33001180,
130x42030003, 130x42034003,
140x33800284, 140x33800284,
150x1c010204, 150x1c010204,
160x40200000, 160x40200000,
@@ -24,22 +24,22 @@ static unsigned int spu_restore_code[] __attribute__((__aligned__(128))) = {
240x23fffd84, 240x23fffd84,
250x1c100183, 250x1c100183,
260x217ffa85, 260x217ffa85,
270x3080a000, 270x3080b000,
280x3080a201, 280x3080b201,
290x3080a402, 290x3080b402,
300x3080a603, 300x3080b603,
310x3080a804, 310x3080b804,
320x3080aa05, 320x3080ba05,
330x3080ac06, 330x3080bc06,
340x3080ae07, 340x3080be07,
350x3080b008, 350x3080c008,
360x3080b209, 360x3080c209,
370x3080b40a, 370x3080c40a,
380x3080b60b, 380x3080c60b,
390x3080b80c, 390x3080c80c,
400x3080ba0d, 400x3080ca0d,
410x3080bc0e, 410x3080cc0e,
420x3080be0f, 420x3080ce0f,
430x00003ffc, 430x00003ffc,
440x00000000, 440x00000000,
450x00000000, 450x00000000,
@@ -48,19 +48,18 @@ static unsigned int spu_restore_code[] __attribute__((__aligned__(128))) = {
480x3ec00083, 480x3ec00083,
490xb0a14103, 490xb0a14103,
500x01a00204, 500x01a00204,
510x3ec10082, 510x3ec10083,
520x4202800e, 520x4202c002,
530x04000703, 530xb0a14203,
540xb0a14202, 540x21a00802,
550x21a00803, 550x3fbf028a,
560x3fbf028d, 560x3f20050a,
570x3f20068d, 570x3fbe0502,
580x3fbe0682,
590x3fe30102, 580x3fe30102,
600x21a00882, 590x21a00882,
610x3f82028f, 600x3f82028b,
620x3fe3078f, 610x3fe3058b,
630x3fbf0784, 620x3fbf0584,
640x3f200204, 630x3f200204,
650x3fbe0204, 640x3fbe0204,
660x3fe30204, 650x3fe30204,
@@ -75,252 +74,285 @@ static unsigned int spu_restore_code[] __attribute__((__aligned__(128))) = {
750x21a00083, 740x21a00083,
760x40800082, 750x40800082,
770x21a00b02, 760x21a00b02,
780x10002818, 770x10002612,
790x42a00002, 780x42a00003,
800x32800007, 790x42074006,
810x4207000c, 800x1800c204,
820x18008208, 810x40a00008,
830x40a0000b, 820x40800789,
840x4080020a, 830x1c010305,
850x40800709, 840x34000302,
860x00200000,
870x42070002,
880x3ac30384,
890x1cffc489, 850x1cffc489,
900x00200000, 860x3ec00303,
910x18008383, 870x3ec00287,
920x38830382, 880xb0408403,
930x4cffc486, 890x24000302,
940x3ac28185, 900x34000282,
950xb0408584, 910x1c020306,
960x28830382, 920xb0408207,
970x1c020387, 930x18020204,
980x38828182, 940x24000282,
990xb0408405, 950x217ffa09,
1000x1802c408, 960x04000402,
1010x28828182, 970x21a00802,
1020x217ff886, 980x3fbe0504,
1030x04000583, 990x3fe30204,
1040x21a00803, 1000x21a00884,
1050x3fbe0682, 1010x42074002,
1060x3fe30102, 1020x21a00902,
1070x04000106, 1030x40803c03,
1080x21a00886, 1040x21a00983,
1090x04000603, 1050x04000485,
1100x21a00903, 1060x21a00a05,
1110x40803c02,
1120x21a00982,
1130x40800003,
1140x04000184,
1150x21a00a04,
1160x40802202, 1070x40802202,
1170x21a00a82, 1080x21a00a82,
1180x42028005, 1090x21a00805,
1190x34208702, 1100x21a00884,
1200x21002282, 1110x3fbf0582,
1210x21a00804,
1220x21a00886,
1230x3fbf0782,
1240x3f200102, 1120x3f200102,
1250x3fbe0102, 1130x3fbe0102,
1260x3fe30102, 1140x3fe30102,
1270x21a00902, 1150x21a00902,
1280x40804003, 1160x40804003,
1290x21a00983, 1170x21a00983,
1300x21a00a04, 1180x21a00a05,
1310x40805a02, 1190x40805a02,
1320x21a00a82, 1200x21a00a82,
1330x40800083, 1210x40800083,
1340x21a00b83, 1220x21a00b83,
1350x01a00c02, 1230x01a00c02,
1360x01a00d83, 1240x30809c03,
1370x3420c282, 1250x34000182,
1260x14004102,
1270x21002082,
1280x01a00d82,
1290x3080a003,
1300x34000182,
1380x21a00e02, 1310x21a00e02,
1390x34210283, 1320x3080a203,
1400x21a00f03, 1330x34000182,
1410x34200284, 1340x21a00f02,
1420x77400200, 1350x3080a403,
1430x3421c282, 1360x34000182,
1370x77400100,
1380x3080a603,
1390x34000182,
1440x21a00702, 1400x21a00702,
1450x34218283, 1410x3080a803,
1460x21a00083, 1420x34000182,
1470x34214282, 1430x21a00082,
1440x3080aa03,
1450x34000182,
1480x21a00b02, 1460x21a00b02,
1490x4200480c, 1470x4020007f,
1500x00200000, 1480x3080ae02,
1510x1c010286, 1490x42004805,
1520x34220284, 1500x3080ac04,
1530x34220302, 1510x34000103,
1540x0f608203, 1520x34000202,
1550x5c024204, 1530x1cffc183,
1560x3b81810b, 1540x3b810106,
1570x42013c02, 1550x0f608184,
1580x00200000, 1560x42013802,
1590x18008185, 1570x5c020183,
1600x38808183, 1580x38810102,
1610x3b814182, 1590x3b810102,
1620x21004e84, 1600x21000e83,
1630x4020007f, 1610x4020007f,
1640x35000100, 1620x35000100,
1650x000004e0, 1630x00000470,
1660x000002a0, 1640x000002f8,
1670x000002e8, 1650x00000430,
1680x00000428,
1690x00000360, 1660x00000360,
1700x000002e8, 1670x000002f8,
1710x000004a0,
1720x00000468,
1730x000003c8, 1680x000003c8,
1690x000004a8,
1700x00000298,
1740x00000360, 1710x00000360,
1720x00200000,
1750x409ffe02, 1730x409ffe02,
1760x30801203, 1740x30801203,
1770x40800204, 1750x40800208,
1780x3ec40085, 1760x3ec40084,
1790x10009c09, 1770x40800407,
1800x3ac10606, 1780x3ac20289,
1810xb060c105, 1790xb060c104,
1820x4020007f, 1800x3ac1c284,
1830x4020007f,
1840x20801203, 1810x20801203,
1850x38810602, 1820x38820282,
1860xb0408586, 1830x41004003,
1870x28810602, 1840xb0408189,
1880x32004180, 1850x28820282,
1890x34204702, 1860x3881c282,
1870xb0408304,
1880x2881c282,
1890x00400000,
1900x40800003,
1910x35000000,
1920x30809e03,
1930x34000182,
1900x21a00382, 1940x21a00382,
1910x4020007f, 1950x4020007f,
1920x327fdc80, 1960x327fde00,
1930x409ffe02, 1970x409ffe02,
1940x30801203, 1980x30801203,
1950x40800204, 1990x40800206,
1960x3ec40087, 2000x3ec40084,
1970x40800405, 2010x40800407,
1980x00200000, 2020x40800608,
1990x40800606, 2030x3ac1828a,
2000x3ac10608, 2040x3ac20289,
2010x3ac14609, 2050xb060c104,
2020x3ac1860a, 2060x3ac1c284,
2030xb060c107,
2040x20801203, 2070x20801203,
2080x38818282,
2050x41004003, 2090x41004003,
2060x38810602, 2100xb040818a,
2070x4020007f, 2110x10005b0b,
2080xb0408188, 2120x41201003,
2090x4020007f, 2130x28818282,
2100x28810602, 2140x3881c282,
2110x41201002, 2150xb0408184,
2120x38814603,
2130x10009c09,
2140xb060c109,
2150x4020007f,
2160x28814603,
2170x41193f83, 2160x41193f83,
2180x38818602,
2190x60ffc003, 2170x60ffc003,
2200xb040818a, 2180x2881c282,
2210x28818602, 2190x38820282,
2220x32003080, 2200xb0408189,
2210x28820282,
2220x327fef80,
2230x409ffe02, 2230x409ffe02,
2240x30801203, 2240x30801203,
2250x40800204, 2250x40800207,
2260x3ec40087, 2260x3ec40086,
2270x41201008, 2270x4120100b,
2280x10009c14, 2280x10005b14,
2290x40800405, 2290x40800404,
2300x3ac10609, 2300x3ac1c289,
2310x40800606, 2310x40800608,
2320x3ac1460a, 2320xb060c106,
2330xb060c107, 2330x3ac10286,
2340x3ac1860b, 2340x3ac2028a,
2350x20801203, 2350x20801203,
2360x38810602, 2360x3881c282,
2370xb0408409,
2380x28810602,
2390x38814603,
2400xb060c40a,
2410x4020007f,
2420x28814603,
2430x41193f83, 2370x41193f83,
2440x38818602,
2450x60ffc003, 2380x60ffc003,
2460xb040818b, 2390xb0408589,
2470x28818602, 2400x2881c282,
2480x32002380, 2410x38810282,
2490x409ffe02, 2420xb0408586,
2500x30801204, 2430x28810282,
2510x40800205, 2440x38820282,
2520x3ec40083, 2450xb040818a,
2530x40800406, 2460x28820282,
2540x3ac14607,
2550x3ac18608,
2560xb0810103,
2570x41004002,
2580x20801204,
2590x4020007f,
2600x38814603,
2610x10009c0b,
2620xb060c107,
2630x4020007f,
2640x4020007f,
2650x28814603,
2660x38818602,
2670x4020007f,
2680x4020007f, 2470x4020007f,
2690xb0408588, 2480x327fe280,
2700x28818602, 2490x409ffe02,
2500x30801203,
2510x40800207,
2520x3ec40084,
2530x40800408,
2540x10005b14,
2550x40800609,
2560x3ac1c28a,
2570x3ac2028b,
2580xb060c104,
2590x3ac24284,
2600x20801203,
2610x41201003,
2620x3881c282,
2630xb040830a,
2640x2881c282,
2650x38820282,
2660xb040818b,
2670x41193f83,
2680x60ffc003,
2690x28820282,
2700x38824282,
2710xb0408184,
2720x28824282,
2710x4020007f, 2730x4020007f,
2720x32001780, 2740x327fd580,
2730x409ffe02, 2750x409ffe02,
2740x1000640e, 2760x1000658e,
2750x40800204, 2770x40800206,
2760x30801203, 2780x30801203,
2770x40800405, 2790x40800407,
2780x3ec40087, 2800x3ec40084,
2790x40800606, 2810x40800608,
2800x3ac10608, 2820x3ac1828a,
2810x3ac14609, 2830x3ac20289,
2820x3ac1860a, 2840xb060c104,
2830xb060c107, 2850x3ac1c284,
2840x20801203, 2860x20801203,
2850x413d8003, 2870x413d8003,
2860x38810602, 2880x38818282,
2870x4020007f, 2890x4020007f,
2880x327fd780, 2900x327fd800,
2890x409ffe02, 2910x409ffe03,
2900x10007f0c, 2920x30801202,
2910x40800205, 2930x40800207,
2920x30801204, 2940x3ec40084,
2930x40800406, 2950x10005b09,
2940x3ec40083, 2960x3ac1c288,
2950x3ac14607, 2970xb0408184,
2960x3ac18608,
2970xb0810103,
2980x413d8002,
2990x20801204,
3000x38814603,
3010x4020007f, 2980x4020007f,
3020x327feb80, 2990x4020007f,
3000x20801202,
3010x3881c282,
3020xb0408308,
3030x2881c282,
3040x327fc680,
3030x409ffe02, 3050x409ffe02,
3060x1000588b,
3070x40800208,
3040x30801203, 3080x30801203,
3050x40800204, 3090x40800407,
3060x3ec40087, 3100x3ec40084,
3070x40800405, 3110x3ac20289,
3080x1000650a, 3120xb060c104,
3090x40800606, 3130x3ac1c284,
3100x3ac10608,
3110x3ac14609,
3120x3ac1860a,
3130xb060c107,
3140x20801203, 3140x20801203,
3150x38810602, 3150x413d8003,
3160xb0408588, 3160x38820282,
3170x4020007f, 3170x327fbd80,
3180x327fc980, 3180x00200000,
3190x00400000, 3190x00000da0,
3200x40800003, 3200x00000000,
3210x4020007f, 3210x00000000,
3220x35000000, 3220x00000000,
3230x00000d90,
3240x00000000,
3250x00000000,
3260x00000000,
3270x00000db0,
3280x00000000,
3290x00000000,
3300x00000000,
3310x00000dc0,
3320x00000000,
3330x00000000,
3340x00000000,
3350x00000d80,
3360x00000000,
3370x00000000,
3380x00000000,
3390x00000df0,
3400x00000000,
3410x00000000,
3420x00000000,
3430x00000de0,
3440x00000000,
3450x00000000,
3460x00000000,
3470x00000dd0,
3480x00000000,
3490x00000000,
3500x00000000,
3510x00000e04,
3520x00000000,
3530x00000000,
3230x00000000, 3540x00000000,
3550x00000e00,
3240x00000000, 3560x00000000,
3250x00000000, 3570x00000000,
3260x00000000, 3580x00000000,
diff --git a/arch/powerpc/platforms/cell/spufs/spu_save.c b/arch/powerpc/platforms/cell/spufs/spu_save.c
index 196033b8a579..ae95cc1701e9 100644
--- a/arch/powerpc/platforms/cell/spufs/spu_save.c
+++ b/arch/powerpc/platforms/cell/spufs/spu_save.c
@@ -44,7 +44,7 @@ static inline void save_event_mask(void)
44 * Read the SPU_RdEventMsk channel and save to the LSCSA. 44 * Read the SPU_RdEventMsk channel and save to the LSCSA.
45 */ 45 */
46 offset = LSCSA_QW_OFFSET(event_mask); 46 offset = LSCSA_QW_OFFSET(event_mask);
47 regs_spill[offset].slot[0] = spu_readch(SPU_RdEventStatMask); 47 regs_spill[offset].slot[0] = spu_readch(SPU_RdEventMask);
48} 48}
49 49
50static inline void save_tag_mask(void) 50static inline void save_tag_mask(void)
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
index 0a947fd7de57..8b20c0c1556f 100644
--- a/arch/powerpc/platforms/cell/spufs/spufs.h
+++ b/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -26,6 +26,7 @@
26#include <linux/mutex.h> 26#include <linux/mutex.h>
27#include <linux/spinlock.h> 27#include <linux/spinlock.h>
28#include <linux/fs.h> 28#include <linux/fs.h>
29#include <linux/cpumask.h>
29 30
30#include <asm/spu.h> 31#include <asm/spu.h>
31#include <asm/spu_csa.h> 32#include <asm/spu_csa.h>
@@ -39,9 +40,13 @@ enum {
39struct spu_context_ops; 40struct spu_context_ops;
40struct spu_gang; 41struct spu_gang;
41 42
43enum {
44 SPU_SCHED_WAS_ACTIVE, /* was active upon spu_acquire_saved() */
45};
46
42/* ctx->sched_flags */ 47/* ctx->sched_flags */
43enum { 48enum {
44 SPU_SCHED_EXITING = 0, 49 SPU_SCHED_NOTIFY_ACTIVE,
45}; 50};
46 51
47struct spu_context { 52struct spu_context {
@@ -55,7 +60,7 @@ struct spu_context {
55 struct address_space *signal2; /* 'signal2' area mappings. */ 60 struct address_space *signal2; /* 'signal2' area mappings. */
56 struct address_space *mss; /* 'mss' area mappings. */ 61 struct address_space *mss; /* 'mss' area mappings. */
57 struct address_space *psmap; /* 'psmap' area mappings. */ 62 struct address_space *psmap; /* 'psmap' area mappings. */
58 spinlock_t mapping_lock; 63 struct mutex mapping_lock;
59 u64 object_id; /* user space pointer for oprofile */ 64 u64 object_id; /* user space pointer for oprofile */
60 65
61 enum { SPU_STATE_RUNNABLE, SPU_STATE_SAVED } state; 66 enum { SPU_STATE_RUNNABLE, SPU_STATE_SAVED } state;
@@ -80,14 +85,41 @@ struct spu_context {
80 85
81 struct list_head gang_list; 86 struct list_head gang_list;
82 struct spu_gang *gang; 87 struct spu_gang *gang;
88 struct kref *prof_priv_kref;
89 void ( * prof_priv_release) (struct kref *kref);
90
91 /* owner thread */
92 pid_t tid;
83 93
84 /* scheduler fields */ 94 /* scheduler fields */
85 struct list_head rq; 95 struct list_head rq;
86 struct delayed_work sched_work; 96 unsigned int time_slice;
87 unsigned long sched_flags; 97 unsigned long sched_flags;
88 unsigned long rt_priority; 98 cpumask_t cpus_allowed;
89 int policy; 99 int policy;
90 int prio; 100 int prio;
101
102 /* statistics */
103 struct {
104 /* updates protected by ctx->state_mutex */
105 enum spu_utilization_state util_state;
106 unsigned long long tstamp; /* time of last state switch */
107 unsigned long long times[SPU_UTIL_MAX];
108 unsigned long long vol_ctx_switch;
109 unsigned long long invol_ctx_switch;
110 unsigned long long min_flt;
111 unsigned long long maj_flt;
112 unsigned long long hash_flt;
113 unsigned long long slb_flt;
114 unsigned long long slb_flt_base; /* # at last ctx switch */
115 unsigned long long class2_intr;
116 unsigned long long class2_intr_base; /* # at last ctx switch */
117 unsigned long long libassist;
118 } stats;
119
120 struct list_head aff_list;
121 int aff_head;
122 int aff_offset;
91}; 123};
92 124
93struct spu_gang { 125struct spu_gang {
@@ -95,8 +127,19 @@ struct spu_gang {
95 struct mutex mutex; 127 struct mutex mutex;
96 struct kref kref; 128 struct kref kref;
97 int contexts; 129 int contexts;
130
131 struct spu_context *aff_ref_ctx;
132 struct list_head aff_list_head;
133 struct mutex aff_mutex;
134 int aff_flags;
135 struct spu *aff_ref_spu;
136 atomic_t aff_sched_count;
98}; 137};
99 138
139/* Flag bits for spu_gang aff_flags */
140#define AFF_OFFSETS_SET 1
141#define AFF_MERGED 2
142
100struct mfc_dma_command { 143struct mfc_dma_command {
101 int32_t pad; /* reserved */ 144 int32_t pad; /* reserved */
102 uint32_t lsa; /* local storage address */ 145 uint32_t lsa; /* local storage address */
@@ -160,10 +203,9 @@ extern struct tree_descr spufs_dir_contents[];
160extern struct tree_descr spufs_dir_nosched_contents[]; 203extern struct tree_descr spufs_dir_nosched_contents[];
161 204
162/* system call implementation */ 205/* system call implementation */
163long spufs_run_spu(struct file *file, 206long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *status);
164 struct spu_context *ctx, u32 *npc, u32 *status); 207long spufs_create(struct nameidata *nd, unsigned int flags,
165long spufs_create(struct nameidata *nd, 208 mode_t mode, struct file *filp);
166 unsigned int flags, mode_t mode);
167extern const struct file_operations spufs_context_fops; 209extern const struct file_operations spufs_context_fops;
168 210
169/* gang management */ 211/* gang management */
@@ -176,7 +218,11 @@ void spu_gang_add_ctx(struct spu_gang *gang, struct spu_context *ctx);
176/* fault handling */ 218/* fault handling */
177int spufs_handle_class1(struct spu_context *ctx); 219int spufs_handle_class1(struct spu_context *ctx);
178 220
221/* affinity */
222struct spu *affinity_check(struct spu_context *ctx);
223
179/* context management */ 224/* context management */
225extern atomic_t nr_spu_contexts;
180static inline void spu_acquire(struct spu_context *ctx) 226static inline void spu_acquire(struct spu_context *ctx)
181{ 227{
182 mutex_lock(&ctx->state_mutex); 228 mutex_lock(&ctx->state_mutex);
@@ -196,21 +242,23 @@ void spu_unmap_mappings(struct spu_context *ctx);
196void spu_forget(struct spu_context *ctx); 242void spu_forget(struct spu_context *ctx);
197int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags); 243int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags);
198void spu_acquire_saved(struct spu_context *ctx); 244void spu_acquire_saved(struct spu_context *ctx);
245void spu_release_saved(struct spu_context *ctx);
199 246
200int spu_activate(struct spu_context *ctx, unsigned long flags); 247int spu_activate(struct spu_context *ctx, unsigned long flags);
201void spu_deactivate(struct spu_context *ctx); 248void spu_deactivate(struct spu_context *ctx);
202void spu_yield(struct spu_context *ctx); 249void spu_yield(struct spu_context *ctx);
203void spu_start_tick(struct spu_context *ctx); 250void spu_switch_notify(struct spu *spu, struct spu_context *ctx);
204void spu_stop_tick(struct spu_context *ctx); 251void spu_set_timeslice(struct spu_context *ctx);
205void spu_sched_tick(struct work_struct *work); 252void spu_update_sched_info(struct spu_context *ctx);
253void __spu_update_sched_info(struct spu_context *ctx);
206int __init spu_sched_init(void); 254int __init spu_sched_init(void);
207void __exit spu_sched_exit(void); 255void spu_sched_exit(void);
208 256
209extern char *isolated_loader; 257extern char *isolated_loader;
210 258
211/* 259/*
212 * spufs_wait 260 * spufs_wait
213 * Same as wait_event_interruptible(), except that here 261 * Same as wait_event_interruptible(), except that here
214 * we need to call spu_release(ctx) before sleeping, and 262 * we need to call spu_release(ctx) before sleeping, and
215 * then spu_acquire(ctx) when awoken. 263 * then spu_acquire(ctx) when awoken.
216 */ 264 */
@@ -256,4 +304,41 @@ struct spufs_coredump_reader {
256extern struct spufs_coredump_reader spufs_coredump_read[]; 304extern struct spufs_coredump_reader spufs_coredump_read[];
257extern int spufs_coredump_num_notes; 305extern int spufs_coredump_num_notes;
258 306
307/*
308 * This function is a little bit too large for an inline, but
309 * as fault.c is built into the kernel we can't move it out of
310 * line.
311 */
312static inline void spuctx_switch_state(struct spu_context *ctx,
313 enum spu_utilization_state new_state)
314{
315 unsigned long long curtime;
316 signed long long delta;
317 struct timespec ts;
318 struct spu *spu;
319 enum spu_utilization_state old_state;
320
321 ktime_get_ts(&ts);
322 curtime = timespec_to_ns(&ts);
323 delta = curtime - ctx->stats.tstamp;
324
325 WARN_ON(!mutex_is_locked(&ctx->state_mutex));
326 WARN_ON(delta < 0);
327
328 spu = ctx->spu;
329 old_state = ctx->stats.util_state;
330 ctx->stats.util_state = new_state;
331 ctx->stats.tstamp = curtime;
332
333 /*
334 * Update the physical SPU utilization statistics.
335 */
336 if (spu) {
337 ctx->stats.times[old_state] += delta;
338 spu->stats.times[old_state] += delta;
339 spu->stats.util_state = new_state;
340 spu->stats.tstamp = curtime;
341 }
342}
343
259#endif 344#endif
diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c
index 71a0b41adb8c..27ffdae98e5a 100644
--- a/arch/powerpc/platforms/cell/spufs/switch.c
+++ b/arch/powerpc/platforms/cell/spufs/switch.c
@@ -70,7 +70,7 @@
70 } 70 }
71#endif /* debug */ 71#endif /* debug */
72 72
73#define POLL_WHILE_FALSE(_c) POLL_WHILE_TRUE(!(_c)) 73#define POLL_WHILE_FALSE(_c) POLL_WHILE_TRUE(!(_c))
74 74
75static inline void acquire_spu_lock(struct spu *spu) 75static inline void acquire_spu_lock(struct spu *spu)
76{ 76{
@@ -180,7 +180,7 @@ static inline void save_mfc_cntl(struct spu_state *csa, struct spu *spu)
180 case MFC_CNTL_SUSPEND_COMPLETE: 180 case MFC_CNTL_SUSPEND_COMPLETE:
181 if (csa) { 181 if (csa) {
182 csa->priv2.mfc_control_RW = 182 csa->priv2.mfc_control_RW =
183 in_be64(&priv2->mfc_control_RW) | 183 MFC_CNTL_SUSPEND_MASK |
184 MFC_CNTL_SUSPEND_DMA_QUEUE; 184 MFC_CNTL_SUSPEND_DMA_QUEUE;
185 } 185 }
186 break; 186 break;
@@ -190,9 +190,7 @@ static inline void save_mfc_cntl(struct spu_state *csa, struct spu *spu)
190 MFC_CNTL_SUSPEND_DMA_STATUS_MASK) == 190 MFC_CNTL_SUSPEND_DMA_STATUS_MASK) ==
191 MFC_CNTL_SUSPEND_COMPLETE); 191 MFC_CNTL_SUSPEND_COMPLETE);
192 if (csa) { 192 if (csa) {
193 csa->priv2.mfc_control_RW = 193 csa->priv2.mfc_control_RW = 0;
194 in_be64(&priv2->mfc_control_RW) &
195 ~MFC_CNTL_SUSPEND_DMA_QUEUE;
196 } 194 }
197 break; 195 break;
198 } 196 }
@@ -251,16 +249,8 @@ static inline void save_mfc_decr(struct spu_state *csa, struct spu *spu)
251 * Read MFC_CNTL[Ds]. Update saved copy of 249 * Read MFC_CNTL[Ds]. Update saved copy of
252 * CSA.MFC_CNTL[Ds]. 250 * CSA.MFC_CNTL[Ds].
253 */ 251 */
254 if (in_be64(&priv2->mfc_control_RW) & MFC_CNTL_DECREMENTER_RUNNING) { 252 csa->priv2.mfc_control_RW |=
255 csa->priv2.mfc_control_RW |= MFC_CNTL_DECREMENTER_RUNNING; 253 in_be64(&priv2->mfc_control_RW) & MFC_CNTL_DECREMENTER_RUNNING;
256 csa->suspend_time = get_cycles();
257 out_be64(&priv2->spu_chnlcntptr_RW, 7ULL);
258 eieio();
259 csa->spu_chnldata_RW[7] = in_be64(&priv2->spu_chnldata_RW);
260 eieio();
261 } else {
262 csa->priv2.mfc_control_RW &= ~MFC_CNTL_DECREMENTER_RUNNING;
263 }
264} 254}
265 255
266static inline void halt_mfc_decr(struct spu_state *csa, struct spu *spu) 256static inline void halt_mfc_decr(struct spu_state *csa, struct spu *spu)
@@ -271,7 +261,8 @@ static inline void halt_mfc_decr(struct spu_state *csa, struct spu *spu)
271 * Write MFC_CNTL[Dh] set to a '1' to halt 261 * Write MFC_CNTL[Dh] set to a '1' to halt
272 * the decrementer. 262 * the decrementer.
273 */ 263 */
274 out_be64(&priv2->mfc_control_RW, MFC_CNTL_DECREMENTER_HALTED); 264 out_be64(&priv2->mfc_control_RW,
265 MFC_CNTL_DECREMENTER_HALTED | MFC_CNTL_SUSPEND_MASK);
275 eieio(); 266 eieio();
276} 267}
277 268
@@ -387,6 +378,19 @@ static inline void save_ppu_querytype(struct spu_state *csa, struct spu *spu)
387 csa->prob.dma_querytype_RW = in_be32(&prob->dma_querytype_RW); 378 csa->prob.dma_querytype_RW = in_be32(&prob->dma_querytype_RW);
388} 379}
389 380
381static inline void save_ppu_tagstatus(struct spu_state *csa, struct spu *spu)
382{
383 struct spu_problem __iomem *prob = spu->problem;
384
385 /* Save the Prxy_TagStatus register in the CSA.
386 *
387 * It is unnecessary to restore dma_tagstatus_R, however,
388 * dma_tagstatus_R in the CSA is accessed via backing_ops, so
389 * we must save it.
390 */
391 csa->prob.dma_tagstatus_R = in_be32(&prob->dma_tagstatus_R);
392}
393
390static inline void save_mfc_csr_tsq(struct spu_state *csa, struct spu *spu) 394static inline void save_mfc_csr_tsq(struct spu_state *csa, struct spu *spu)
391{ 395{
392 struct spu_priv2 __iomem *priv2 = spu->priv2; 396 struct spu_priv2 __iomem *priv2 = spu->priv2;
@@ -602,7 +606,7 @@ static inline void save_ppuint_mb(struct spu_state *csa, struct spu *spu)
602static inline void save_ch_part1(struct spu_state *csa, struct spu *spu) 606static inline void save_ch_part1(struct spu_state *csa, struct spu *spu)
603{ 607{
604 struct spu_priv2 __iomem *priv2 = spu->priv2; 608 struct spu_priv2 __iomem *priv2 = spu->priv2;
605 u64 idx, ch_indices[7] = { 0UL, 3UL, 4UL, 24UL, 25UL, 27UL }; 609 u64 idx, ch_indices[] = { 0UL, 3UL, 4UL, 24UL, 25UL, 27UL };
606 int i; 610 int i;
607 611
608 /* Save, Step 42: 612 /* Save, Step 42:
@@ -613,7 +617,7 @@ static inline void save_ch_part1(struct spu_state *csa, struct spu *spu)
613 csa->spu_chnldata_RW[1] = in_be64(&priv2->spu_chnldata_RW); 617 csa->spu_chnldata_RW[1] = in_be64(&priv2->spu_chnldata_RW);
614 618
615 /* Save the following CH: [0,3,4,24,25,27] */ 619 /* Save the following CH: [0,3,4,24,25,27] */
616 for (i = 0; i < 7; i++) { 620 for (i = 0; i < ARRAY_SIZE(ch_indices); i++) {
617 idx = ch_indices[i]; 621 idx = ch_indices[i];
618 out_be64(&priv2->spu_chnlcntptr_RW, idx); 622 out_be64(&priv2->spu_chnlcntptr_RW, idx);
619 eieio(); 623 eieio();
@@ -970,13 +974,13 @@ static inline void terminate_spu_app(struct spu_state *csa, struct spu *spu)
970 */ 974 */
971} 975}
972 976
973static inline void suspend_mfc(struct spu_state *csa, struct spu *spu) 977static inline void suspend_mfc_and_halt_decr(struct spu_state *csa,
978 struct spu *spu)
974{ 979{
975 struct spu_priv2 __iomem *priv2 = spu->priv2; 980 struct spu_priv2 __iomem *priv2 = spu->priv2;
976 981
977 /* Restore, Step 7: 982 /* Restore, Step 7:
978 * Restore, Step 47. 983 * Write MFC_Cntl[Dh,Sc,Sm]='1','1','0' to suspend
979 * Write MFC_Cntl[Dh,Sc]='1','1' to suspend
980 * the queue and halt the decrementer. 984 * the queue and halt the decrementer.
981 */ 985 */
982 out_be64(&priv2->mfc_control_RW, MFC_CNTL_SUSPEND_DMA_QUEUE | 986 out_be64(&priv2->mfc_control_RW, MFC_CNTL_SUSPEND_DMA_QUEUE |
@@ -1077,7 +1081,7 @@ static inline void clear_spu_status(struct spu_state *csa, struct spu *spu)
1077static inline void reset_ch_part1(struct spu_state *csa, struct spu *spu) 1081static inline void reset_ch_part1(struct spu_state *csa, struct spu *spu)
1078{ 1082{
1079 struct spu_priv2 __iomem *priv2 = spu->priv2; 1083 struct spu_priv2 __iomem *priv2 = spu->priv2;
1080 u64 ch_indices[7] = { 0UL, 3UL, 4UL, 24UL, 25UL, 27UL }; 1084 u64 ch_indices[] = { 0UL, 3UL, 4UL, 24UL, 25UL, 27UL };
1081 u64 idx; 1085 u64 idx;
1082 int i; 1086 int i;
1083 1087
@@ -1089,7 +1093,7 @@ static inline void reset_ch_part1(struct spu_state *csa, struct spu *spu)
1089 out_be64(&priv2->spu_chnldata_RW, 0UL); 1093 out_be64(&priv2->spu_chnldata_RW, 0UL);
1090 1094
1091 /* Reset the following CH: [0,3,4,24,25,27] */ 1095 /* Reset the following CH: [0,3,4,24,25,27] */
1092 for (i = 0; i < 7; i++) { 1096 for (i = 0; i < ARRAY_SIZE(ch_indices); i++) {
1093 idx = ch_indices[i]; 1097 idx = ch_indices[i];
1094 out_be64(&priv2->spu_chnlcntptr_RW, idx); 1098 out_be64(&priv2->spu_chnlcntptr_RW, idx);
1095 eieio(); 1099 eieio();
@@ -1276,7 +1280,15 @@ static inline void setup_decr(struct spu_state *csa, struct spu *spu)
1276 cycles_t resume_time = get_cycles(); 1280 cycles_t resume_time = get_cycles();
1277 cycles_t delta_time = resume_time - csa->suspend_time; 1281 cycles_t delta_time = resume_time - csa->suspend_time;
1278 1282
1283 csa->lscsa->decr_status.slot[0] = SPU_DECR_STATUS_RUNNING;
1284 if (csa->lscsa->decr.slot[0] < delta_time) {
1285 csa->lscsa->decr_status.slot[0] |=
1286 SPU_DECR_STATUS_WRAPPED;
1287 }
1288
1279 csa->lscsa->decr.slot[0] -= delta_time; 1289 csa->lscsa->decr.slot[0] -= delta_time;
1290 } else {
1291 csa->lscsa->decr_status.slot[0] = 0;
1280 } 1292 }
1281} 1293}
1282 1294
@@ -1385,6 +1397,18 @@ static inline void restore_ls_16kb(struct spu_state *csa, struct spu *spu)
1385 send_mfc_dma(spu, addr, ls_offset, size, tag, rclass, cmd); 1397 send_mfc_dma(spu, addr, ls_offset, size, tag, rclass, cmd);
1386} 1398}
1387 1399
1400static inline void suspend_mfc(struct spu_state *csa, struct spu *spu)
1401{
1402 struct spu_priv2 __iomem *priv2 = spu->priv2;
1403
1404 /* Restore, Step 47.
1405 * Write MFC_Cntl[Sc,Sm]='1','0' to suspend
1406 * the queue.
1407 */
1408 out_be64(&priv2->mfc_control_RW, MFC_CNTL_SUSPEND_DMA_QUEUE);
1409 eieio();
1410}
1411
1388static inline void clear_interrupts(struct spu_state *csa, struct spu *spu) 1412static inline void clear_interrupts(struct spu_state *csa, struct spu *spu)
1389{ 1413{
1390 /* Restore, Step 49: 1414 /* Restore, Step 49:
@@ -1535,10 +1559,10 @@ static inline void restore_decr_wrapped(struct spu_state *csa, struct spu *spu)
1535 * "wrapped" flag is set, OR in a '1' to 1559 * "wrapped" flag is set, OR in a '1' to
1536 * CSA.SPU_Event_Status[Tm]. 1560 * CSA.SPU_Event_Status[Tm].
1537 */ 1561 */
1538 if (csa->lscsa->decr_status.slot[0] == 1) { 1562 if (csa->lscsa->decr_status.slot[0] & SPU_DECR_STATUS_WRAPPED) {
1539 csa->spu_chnldata_RW[0] |= 0x20; 1563 csa->spu_chnldata_RW[0] |= 0x20;
1540 } 1564 }
1541 if ((csa->lscsa->decr_status.slot[0] == 1) && 1565 if ((csa->lscsa->decr_status.slot[0] & SPU_DECR_STATUS_WRAPPED) &&
1542 (csa->spu_chnlcnt_RW[0] == 0 && 1566 (csa->spu_chnlcnt_RW[0] == 0 &&
1543 ((csa->spu_chnldata_RW[2] & 0x20) == 0x0) && 1567 ((csa->spu_chnldata_RW[2] & 0x20) == 0x0) &&
1544 ((csa->spu_chnldata_RW[0] & 0x20) != 0x1))) { 1568 ((csa->spu_chnldata_RW[0] & 0x20) != 0x1))) {
@@ -1549,18 +1573,13 @@ static inline void restore_decr_wrapped(struct spu_state *csa, struct spu *spu)
1549static inline void restore_ch_part1(struct spu_state *csa, struct spu *spu) 1573static inline void restore_ch_part1(struct spu_state *csa, struct spu *spu)
1550{ 1574{
1551 struct spu_priv2 __iomem *priv2 = spu->priv2; 1575 struct spu_priv2 __iomem *priv2 = spu->priv2;
1552 u64 idx, ch_indices[7] = { 0UL, 3UL, 4UL, 24UL, 25UL, 27UL }; 1576 u64 idx, ch_indices[] = { 0UL, 3UL, 4UL, 24UL, 25UL, 27UL };
1553 int i; 1577 int i;
1554 1578
1555 /* Restore, Step 59: 1579 /* Restore, Step 59:
1580 * Restore the following CH: [0,3,4,24,25,27]
1556 */ 1581 */
1557 1582 for (i = 0; i < ARRAY_SIZE(ch_indices); i++) {
1558 /* Restore CH 1 without count */
1559 out_be64(&priv2->spu_chnlcntptr_RW, 1);
1560 out_be64(&priv2->spu_chnldata_RW, csa->spu_chnldata_RW[1]);
1561
1562 /* Restore the following CH: [0,3,4,24,25,27] */
1563 for (i = 0; i < 7; i++) {
1564 idx = ch_indices[i]; 1583 idx = ch_indices[i];
1565 out_be64(&priv2->spu_chnlcntptr_RW, idx); 1584 out_be64(&priv2->spu_chnlcntptr_RW, idx);
1566 eieio(); 1585 eieio();
@@ -1812,6 +1831,7 @@ static void save_csa(struct spu_state *prev, struct spu *spu)
1812 save_mfc_queues(prev, spu); /* Step 19. */ 1831 save_mfc_queues(prev, spu); /* Step 19. */
1813 save_ppu_querymask(prev, spu); /* Step 20. */ 1832 save_ppu_querymask(prev, spu); /* Step 20. */
1814 save_ppu_querytype(prev, spu); /* Step 21. */ 1833 save_ppu_querytype(prev, spu); /* Step 21. */
1834 save_ppu_tagstatus(prev, spu); /* NEW. */
1815 save_mfc_csr_tsq(prev, spu); /* Step 22. */ 1835 save_mfc_csr_tsq(prev, spu); /* Step 22. */
1816 save_mfc_csr_cmd(prev, spu); /* Step 23. */ 1836 save_mfc_csr_cmd(prev, spu); /* Step 23. */
1817 save_mfc_csr_ato(prev, spu); /* Step 24. */ 1837 save_mfc_csr_ato(prev, spu); /* Step 24. */
@@ -1918,7 +1938,7 @@ static void harvest(struct spu_state *prev, struct spu *spu)
1918 set_switch_pending(prev, spu); /* Step 5. */ 1938 set_switch_pending(prev, spu); /* Step 5. */
1919 stop_spu_isolate(spu); /* NEW. */ 1939 stop_spu_isolate(spu); /* NEW. */
1920 remove_other_spu_access(prev, spu); /* Step 6. */ 1940 remove_other_spu_access(prev, spu); /* Step 6. */
1921 suspend_mfc(prev, spu); /* Step 7. */ 1941 suspend_mfc_and_halt_decr(prev, spu); /* Step 7. */
1922 wait_suspend_mfc_complete(prev, spu); /* Step 8. */ 1942 wait_suspend_mfc_complete(prev, spu); /* Step 8. */
1923 if (!suspend_spe(prev, spu)) /* Step 9. */ 1943 if (!suspend_spe(prev, spu)) /* Step 9. */
1924 clear_spu_status(prev, spu); /* Step 10. */ 1944 clear_spu_status(prev, spu); /* Step 10. */
@@ -1930,7 +1950,7 @@ static void harvest(struct spu_state *prev, struct spu *spu)
1930 reset_spu_privcntl(prev, spu); /* Step 16. */ 1950 reset_spu_privcntl(prev, spu); /* Step 16. */
1931 reset_spu_lslr(prev, spu); /* Step 17. */ 1951 reset_spu_lslr(prev, spu); /* Step 17. */
1932 setup_mfc_sr1(prev, spu); /* Step 18. */ 1952 setup_mfc_sr1(prev, spu); /* Step 18. */
1933 spu_invalidate_slbs(spu); /* Step 19. */ 1953 spu_invalidate_slbs(spu); /* Step 19. */
1934 reset_ch_part1(prev, spu); /* Step 20. */ 1954 reset_ch_part1(prev, spu); /* Step 20. */
1935 reset_ch_part2(prev, spu); /* Step 21. */ 1955 reset_ch_part2(prev, spu); /* Step 21. */
1936 enable_interrupts(prev, spu); /* Step 22. */ 1956 enable_interrupts(prev, spu); /* Step 22. */
diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c
index 8e37bdf4dfda..43f0fb88abbc 100644
--- a/arch/powerpc/platforms/cell/spufs/syscalls.c
+++ b/arch/powerpc/platforms/cell/spufs/syscalls.c
@@ -47,7 +47,7 @@ static long do_spu_run(struct file *filp,
47 goto out; 47 goto out;
48 48
49 i = SPUFS_I(filp->f_path.dentry->d_inode); 49 i = SPUFS_I(filp->f_path.dentry->d_inode);
50 ret = spufs_run_spu(filp, i->i_ctx, &npc, &status); 50 ret = spufs_run_spu(i->i_ctx, &npc, &status);
51 51
52 if (put_user(npc, unpc)) 52 if (put_user(npc, unpc))
53 ret = -EFAULT; 53 ret = -EFAULT;
@@ -76,8 +76,8 @@ asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, __u32 __user *ustatus)
76} 76}
77#endif 77#endif
78 78
79asmlinkage long sys_spu_create(const char __user *pathname, 79asmlinkage long do_spu_create(const char __user *pathname, unsigned int flags,
80 unsigned int flags, mode_t mode) 80 mode_t mode, struct file *neighbor)
81{ 81{
82 char *tmp; 82 char *tmp;
83 int ret; 83 int ret;
@@ -90,7 +90,7 @@ asmlinkage long sys_spu_create(const char __user *pathname,
90 ret = path_lookup(tmp, LOOKUP_PARENT| 90 ret = path_lookup(tmp, LOOKUP_PARENT|
91 LOOKUP_OPEN|LOOKUP_CREATE, &nd); 91 LOOKUP_OPEN|LOOKUP_CREATE, &nd);
92 if (!ret) { 92 if (!ret) {
93 ret = spufs_create(&nd, flags, mode); 93 ret = spufs_create(&nd, flags, mode, neighbor);
94 path_release(&nd); 94 path_release(&nd);
95 } 95 }
96 putname(tmp); 96 putname(tmp);
@@ -99,8 +99,32 @@ asmlinkage long sys_spu_create(const char __user *pathname,
99 return ret; 99 return ret;
100} 100}
101 101
102#ifndef MODULE
103asmlinkage long sys_spu_create(const char __user *pathname, unsigned int flags,
104 mode_t mode, int neighbor_fd)
105{
106 int fput_needed;
107 struct file *neighbor;
108 long ret;
109
110 if (flags & SPU_CREATE_AFFINITY_SPU) {
111 ret = -EBADF;
112 neighbor = fget_light(neighbor_fd, &fput_needed);
113 if (neighbor) {
114 ret = do_spu_create(pathname, flags, mode, neighbor);
115 fput_light(neighbor, fput_needed);
116 }
117 }
118 else {
119 ret = do_spu_create(pathname, flags, mode, NULL);
120 }
121
122 return ret;
123}
124#endif
125
102struct spufs_calls spufs_calls = { 126struct spufs_calls spufs_calls = {
103 .create_thread = sys_spu_create, 127 .create_thread = do_spu_create,
104 .spu_run = do_spu_run, 128 .spu_run = do_spu_run,
105 .owner = THIS_MODULE, 129 .owner = THIS_MODULE,
106}; 130};
diff --git a/arch/powerpc/platforms/celleb/Makefile b/arch/powerpc/platforms/celleb/Makefile
index f4f82520dc4f..5240046d8671 100644
--- a/arch/powerpc/platforms/celleb/Makefile
+++ b/arch/powerpc/platforms/celleb/Makefile
@@ -4,5 +4,5 @@ obj-y += interrupt.o iommu.o setup.o \
4 4
5obj-$(CONFIG_SMP) += smp.o 5obj-$(CONFIG_SMP) += smp.o
6obj-$(CONFIG_PPC_UDBG_BEAT) += udbg_beat.o 6obj-$(CONFIG_PPC_UDBG_BEAT) += udbg_beat.o
7obj-$(CONFIG_HAS_TXX9_SERIAL) += scc_sio.o 7obj-$(CONFIG_SERIAL_TXX9) += scc_sio.o
8obj-$(CONFIG_SPU_BASE) += spu_priv1.o 8obj-$(CONFIG_SPU_BASE) += spu_priv1.o
diff --git a/arch/powerpc/platforms/chrp/Kconfig b/arch/powerpc/platforms/chrp/Kconfig
index d2c690531963..22b4b4e3b6f0 100644
--- a/arch/powerpc/platforms/chrp/Kconfig
+++ b/arch/powerpc/platforms/chrp/Kconfig
@@ -8,4 +8,5 @@ config PPC_CHRP
8 select PPC_MPC106 8 select PPC_MPC106
9 select PPC_UDBG_16550 9 select PPC_UDBG_16550
10 select PPC_NATIVE 10 select PPC_NATIVE
11 select PCI
11 default y 12 default y
diff --git a/arch/powerpc/platforms/chrp/Makefile b/arch/powerpc/platforms/chrp/Makefile
index 902feb1ac431..4b3bfadc70fa 100644
--- a/arch/powerpc/platforms/chrp/Makefile
+++ b/arch/powerpc/platforms/chrp/Makefile
@@ -1,4 +1,3 @@
1obj-y += setup.o time.o pegasos_eth.o 1obj-y += setup.o time.o pegasos_eth.o pci.o
2obj-$(CONFIG_PCI) += pci.o
3obj-$(CONFIG_SMP) += smp.o 2obj-$(CONFIG_SMP) += smp.o
4obj-$(CONFIG_NVRAM) += nvram.o 3obj-$(CONFIG_NVRAM) += nvram.o
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index d32fedc991d3..3690624e49d4 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -99,7 +99,7 @@ int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
99 struct pci_controller *hose = bus->sysdata; 99 struct pci_controller *hose = bus->sysdata;
100 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) 100 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
101 | (((bus->number - hose->first_busno) & 0xff) << 16) 101 | (((bus->number - hose->first_busno) & 0xff) << 16)
102 | (hose->index << 24); 102 | (hose->global_number << 24);
103 int ret = -1; 103 int ret = -1;
104 int rval; 104 int rval;
105 105
@@ -114,7 +114,7 @@ int rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
114 struct pci_controller *hose = bus->sysdata; 114 struct pci_controller *hose = bus->sysdata;
115 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) 115 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
116 | (((bus->number - hose->first_busno) & 0xff) << 16) 116 | (((bus->number - hose->first_busno) & 0xff) << 16)
117 | (hose->index << 24); 117 | (hose->global_number << 24);
118 int rval; 118 int rval;
119 119
120 rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL, 120 rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL,
@@ -254,13 +254,12 @@ chrp_find_bridges(void)
254 printk(" at %llx", (unsigned long long)r.start); 254 printk(" at %llx", (unsigned long long)r.start);
255 printk("\n"); 255 printk("\n");
256 256
257 hose = pcibios_alloc_controller(); 257 hose = pcibios_alloc_controller(dev);
258 if (!hose) { 258 if (!hose) {
259 printk("Can't allocate PCI controller structure for %s\n", 259 printk("Can't allocate PCI controller structure for %s\n",
260 dev->full_name); 260 dev->full_name);
261 continue; 261 continue;
262 } 262 }
263 hose->arch_data = dev;
264 hose->first_busno = bus_range[0]; 263 hose->first_busno = bus_range[0];
265 hose->last_busno = bus_range[1]; 264 hose->last_busno = bus_range[1];
266 265
diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig
index f2d26268ca6f..bec772674e40 100644
--- a/arch/powerpc/platforms/embedded6xx/Kconfig
+++ b/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -28,6 +28,7 @@ config PPC_HOLLY
28 bool "PPC750GX/CL with TSI10x bridge (Hickory/Holly)" 28 bool "PPC750GX/CL with TSI10x bridge (Hickory/Holly)"
29 select TSI108_BRIDGE 29 select TSI108_BRIDGE
30 select PPC_UDBG_16550 30 select PPC_UDBG_16550
31 select WANT_DEVICE_TREE
31 help 32 help
32 Select PPC_HOLLY if configuring for an IBM 750GX/CL Eval 33 Select PPC_HOLLY if configuring for an IBM 750GX/CL Eval
33 Board with TSI108/9 bridge (Hickory/Holly) 34 Board with TSI108/9 bridge (Hickory/Holly)
@@ -44,6 +45,7 @@ endchoice
44config TSI108_BRIDGE 45config TSI108_BRIDGE
45 bool 46 bool
46 depends on MPC7448HPC2 || PPC_HOLLY 47 depends on MPC7448HPC2 || PPC_HOLLY
48 select PCI
47 select MPIC 49 select MPIC
48 select MPIC_WEIRD 50 select MPIC_WEIRD
49 default y 51 default y
diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index 3a0b4a01401c..6292e36dc577 100644
--- a/arch/powerpc/platforms/embedded6xx/holly.c
+++ b/arch/powerpc/platforms/embedded6xx/holly.c
@@ -45,7 +45,7 @@
45 45
46#define HOLLY_PCI_CFG_PHYS 0x7c000000 46#define HOLLY_PCI_CFG_PHYS 0x7c000000
47 47
48int holly_exclude_device(u_char bus, u_char devfn) 48int holly_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
49{ 49{
50 if (bus == 0 && PCI_SLOT(devfn) == 0) 50 if (bus == 0 && PCI_SLOT(devfn) == 0)
51 return PCIBIOS_DEVICE_NOT_FOUND; 51 return PCIBIOS_DEVICE_NOT_FOUND;
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c
index b412f006a9c5..f4d0a7a603f5 100644
--- a/arch/powerpc/platforms/embedded6xx/linkstation.c
+++ b/arch/powerpc/platforms/embedded6xx/linkstation.c
@@ -54,8 +54,9 @@ static struct mtd_partition linkstation_physmap_partitions[] = {
54 }, 54 },
55}; 55};
56 56
57static int __init add_bridge(struct device_node *dev) 57static int __init linkstation_add_bridge(struct device_node *dev)
58{ 58{
59#ifdef CONFIG_PCI
59 int len; 60 int len;
60 struct pci_controller *hose; 61 struct pci_controller *hose;
61 const int *bus_range; 62 const int *bus_range;
@@ -67,18 +68,17 @@ static int __init add_bridge(struct device_node *dev)
67 printk(KERN_WARNING "Can't get bus-range for %s, assume" 68 printk(KERN_WARNING "Can't get bus-range for %s, assume"
68 " bus 0\n", dev->full_name); 69 " bus 0\n", dev->full_name);
69 70
70 hose = pcibios_alloc_controller(); 71 hose = pcibios_alloc_controller(dev);
71 if (hose == NULL) 72 if (hose == NULL)
72 return -ENOMEM; 73 return -ENOMEM;
73 hose->first_busno = bus_range ? bus_range[0] : 0; 74 hose->first_busno = bus_range ? bus_range[0] : 0;
74 hose->last_busno = bus_range ? bus_range[1] : 0xff; 75 hose->last_busno = bus_range ? bus_range[1] : 0xff;
75 hose->arch_data = dev;
76 setup_indirect_pci(hose, 0xfec00000, 0xfee00000); 76 setup_indirect_pci(hose, 0xfec00000, 0xfee00000);
77 77
78 /* Interpret the "ranges" property */ 78 /* Interpret the "ranges" property */
79 /* This also maps the I/O region and sets isa_io/mem_base */ 79 /* This also maps the I/O region and sets isa_io/mem_base */
80 pci_process_bridge_OF_ranges(hose, dev, 1); 80 pci_process_bridge_OF_ranges(hose, dev, 1);
81 81#endif
82 return 0; 82 return 0;
83} 83}
84 84
@@ -92,7 +92,7 @@ static void __init linkstation_setup_arch(void)
92 92
93 /* Lookup PCI host bridges */ 93 /* Lookup PCI host bridges */
94 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 94 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
95 add_bridge(np); 95 linkstation_add_bridge(np);
96 96
97 printk(KERN_INFO "BUFFALO Network Attached Storage Series\n"); 97 printk(KERN_INFO "BUFFALO Network Attached Storage Series\n");
98 printk(KERN_INFO "(C) 2002-2005 BUFFALO INC.\n"); 98 printk(KERN_INFO "(C) 2002-2005 BUFFALO INC.\n");
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
index 4542e0c837c0..1e3cc69487b5 100644
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
@@ -54,15 +54,10 @@
54 54
55#define MPC7448HPC2_PCI_CFG_PHYS 0xfb000000 55#define MPC7448HPC2_PCI_CFG_PHYS 0xfb000000
56 56
57#ifndef CONFIG_PCI
58isa_io_base = MPC7448_HPC2_ISA_IO_BASE;
59isa_mem_base = MPC7448_HPC2_ISA_MEM_BASE;
60pci_dram_offset = MPC7448_HPC2_PCI_MEM_OFFSET;
61#endif
62
63extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val); 57extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
64 58
65int mpc7448_hpc2_exclude_device(u_char bus, u_char devfn) 59int mpc7448_hpc2_exclude_device(struct pci_controller *hose,
60 u_char bus, u_char devfn)
66{ 61{
67 if (bus == 0 && PCI_SLOT(devfn) == 0) 62 if (bus == 0 && PCI_SLOT(devfn) == 0)
68 return PCIBIOS_DEVICE_NOT_FOUND; 63 return PCIBIOS_DEVICE_NOT_FOUND;
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h
index a543a5242e34..f7e0e0c7f8d8 100644
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h
+++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h
@@ -18,9 +18,4 @@
18 18
19#include <asm/ppcboot.h> 19#include <asm/ppcboot.h>
20 20
21/* Base Addresses for the PCI bus
22 */
23#define MPC7448_HPC2_PCI_MEM_OFFSET (0x00000000)
24#define MPC7448_HPC2_ISA_IO_BASE (0x00000000)
25#define MPC7448_HPC2_ISA_MEM_BASE (0x00000000)
26#endif /* __PPC_PLATFORMS_MPC7448_HPC2_H */ 21#endif /* __PPC_PLATFORMS_MPC7448_HPC2_H */
diff --git a/arch/powerpc/platforms/iseries/call_hpt.h b/arch/powerpc/platforms/iseries/call_hpt.h
index a843b0f87b72..8d95fe4b554e 100644
--- a/arch/powerpc/platforms/iseries/call_hpt.h
+++ b/arch/powerpc/platforms/iseries/call_hpt.h
@@ -76,24 +76,25 @@ static inline u64 HvCallHpt_invalidateSetSwBitsGet(u32 hpteIndex, u8 bitson,
76 return compressedStatus; 76 return compressedStatus;
77} 77}
78 78
79static inline u64 HvCallHpt_findValid(hpte_t *hpte, u64 vpn) 79static inline u64 HvCallHpt_findValid(struct hash_pte *hpte, u64 vpn)
80{ 80{
81 return HvCall3Ret16(HvCallHptFindValid, hpte, vpn, 0, 0); 81 return HvCall3Ret16(HvCallHptFindValid, hpte, vpn, 0, 0);
82} 82}
83 83
84static inline u64 HvCallHpt_findNextValid(hpte_t *hpte, u32 hpteIndex, 84static inline u64 HvCallHpt_findNextValid(struct hash_pte *hpte, u32 hpteIndex,
85 u8 bitson, u8 bitsoff) 85 u8 bitson, u8 bitsoff)
86{ 86{
87 return HvCall3Ret16(HvCallHptFindNextValid, hpte, hpteIndex, 87 return HvCall3Ret16(HvCallHptFindNextValid, hpte, hpteIndex,
88 bitson, bitsoff); 88 bitson, bitsoff);
89} 89}
90 90
91static inline void HvCallHpt_get(hpte_t *hpte, u32 hpteIndex) 91static inline void HvCallHpt_get(struct hash_pte *hpte, u32 hpteIndex)
92{ 92{
93 HvCall2Ret16(HvCallHptGet, hpte, hpteIndex, 0); 93 HvCall2Ret16(HvCallHptGet, hpte, hpteIndex, 0);
94} 94}
95 95
96static inline void HvCallHpt_addValidate(u32 hpteIndex, u32 hBit, hpte_t *hpte) 96static inline void HvCallHpt_addValidate(u32 hpteIndex, u32 hBit,
97 struct hash_pte *hpte)
97{ 98{
98 HvCall4(HvCallHptAddValidate, hpteIndex, hBit, hpte->v, hpte->r); 99 HvCall4(HvCallHptAddValidate, hpteIndex, hBit, hpte->v, hpte->r);
99} 100}
diff --git a/arch/powerpc/platforms/iseries/htab.c b/arch/powerpc/platforms/iseries/htab.c
index ed44dfceaa45..b4e2c7a038e1 100644
--- a/arch/powerpc/platforms/iseries/htab.c
+++ b/arch/powerpc/platforms/iseries/htab.c
@@ -44,7 +44,7 @@ long iSeries_hpte_insert(unsigned long hpte_group, unsigned long va,
44 unsigned long vflags, int psize) 44 unsigned long vflags, int psize)
45{ 45{
46 long slot; 46 long slot;
47 hpte_t lhpte; 47 struct hash_pte lhpte;
48 int secondary = 0; 48 int secondary = 0;
49 49
50 BUG_ON(psize != MMU_PAGE_4K); 50 BUG_ON(psize != MMU_PAGE_4K);
@@ -99,7 +99,7 @@ long iSeries_hpte_insert(unsigned long hpte_group, unsigned long va,
99 99
100static unsigned long iSeries_hpte_getword0(unsigned long slot) 100static unsigned long iSeries_hpte_getword0(unsigned long slot)
101{ 101{
102 hpte_t hpte; 102 struct hash_pte hpte;
103 103
104 HvCallHpt_get(&hpte, slot); 104 HvCallHpt_get(&hpte, slot);
105 return hpte.v; 105 return hpte.v;
@@ -144,7 +144,7 @@ static long iSeries_hpte_remove(unsigned long hpte_group)
144static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp, 144static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp,
145 unsigned long va, int psize, int local) 145 unsigned long va, int psize, int local)
146{ 146{
147 hpte_t hpte; 147 struct hash_pte hpte;
148 unsigned long want_v; 148 unsigned long want_v;
149 149
150 iSeries_hlock(slot); 150 iSeries_hlock(slot);
@@ -176,7 +176,7 @@ static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp,
176 */ 176 */
177static long iSeries_hpte_find(unsigned long vpn) 177static long iSeries_hpte_find(unsigned long vpn)
178{ 178{
179 hpte_t hpte; 179 struct hash_pte hpte;
180 long slot; 180 long slot;
181 181
182 /* 182 /*
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index 9c974227155e..da87162000f0 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -742,6 +742,11 @@ void __init iSeries_pcibios_init(void)
742 /* Install IO hooks */ 742 /* Install IO hooks */
743 ppc_pci_io = iseries_pci_io; 743 ppc_pci_io = iseries_pci_io;
744 744
745 /* iSeries has no IO space in the common sense, it needs to set
746 * the IO base to 0
747 */
748 pci_io_base = 0;
749
745 if (root == NULL) { 750 if (root == NULL) {
746 printk(KERN_CRIT "iSeries_pcibios_init: can't find root " 751 printk(KERN_CRIT "iSeries_pcibios_init: can't find root "
747 "of device tree\n"); 752 "of device tree\n");
@@ -763,7 +768,7 @@ void __init iSeries_pcibios_init(void)
763 if (phb == NULL) 768 if (phb == NULL)
764 continue; 769 continue;
765 770
766 phb->pci_mem_offset = phb->local_number = bus; 771 phb->pci_mem_offset = bus;
767 phb->first_busno = bus; 772 phb->first_busno = bus;
768 phb->last_busno = bus; 773 phb->last_busno = bus;
769 phb->ops = &iSeries_pci_ops; 774 phb->ops = &iSeries_pci_ops;
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index 7f5dcee814d4..13a8b1908ded 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -79,8 +79,6 @@ extern void iSeries_pci_final_fixup(void);
79static void iSeries_pci_final_fixup(void) { } 79static void iSeries_pci_final_fixup(void) { }
80#endif 80#endif
81 81
82extern unsigned long iSeries_recal_tb;
83extern unsigned long iSeries_recal_titan;
84 82
85struct MemoryBlock { 83struct MemoryBlock {
86 unsigned long absStart; 84 unsigned long absStart;
@@ -292,8 +290,8 @@ static void __init iSeries_init_early(void)
292{ 290{
293 DBG(" -> iSeries_init_early()\n"); 291 DBG(" -> iSeries_init_early()\n");
294 292
295 iSeries_recal_tb = get_tb(); 293 /* Snapshot the timebase, for use in later recalibration */
296 iSeries_recal_titan = HvCallXm_loadTod(); 294 iSeries_time_init_early();
297 295
298 /* 296 /*
299 * Initialize the DMA/TCE management 297 * Initialize the DMA/TCE management
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 7aaa5bbc9363..fceaae40fe70 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -444,7 +444,7 @@ static void __init setup_u3_ht(struct pci_controller* hose)
444 u3_ht = hose; 444 u3_ht = hose;
445} 445}
446 446
447static int __init add_bridge(struct device_node *dev) 447static int __init maple_add_bridge(struct device_node *dev)
448{ 448{
449 int len; 449 int len;
450 struct pci_controller *hose; 450 struct pci_controller *hose;
@@ -519,23 +519,6 @@ void __devinit maple_pci_irq_fixup(struct pci_dev *dev)
519 DBG(" <- maple_pci_irq_fixup\n"); 519 DBG(" <- maple_pci_irq_fixup\n");
520} 520}
521 521
522static void __init maple_fixup_phb_resources(void)
523{
524 struct pci_controller *hose, *tmp;
525
526 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
527 unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base;
528
529 hose->io_resource.start += offset;
530 hose->io_resource.end += offset;
531
532 printk(KERN_INFO "PCI Host %d, io start: %llx; io end: %llx\n",
533 hose->global_number,
534 (unsigned long long)hose->io_resource.start,
535 (unsigned long long)hose->io_resource.end);
536 }
537}
538
539void __init maple_pci_init(void) 522void __init maple_pci_init(void)
540{ 523{
541 struct device_node *np, *root; 524 struct device_node *np, *root;
@@ -558,7 +541,7 @@ void __init maple_pci_init(void)
558 continue; 541 continue;
559 if ((of_device_is_compatible(np, "u4-pcie") || 542 if ((of_device_is_compatible(np, "u4-pcie") ||
560 of_device_is_compatible(np, "u3-agp")) && 543 of_device_is_compatible(np, "u3-agp")) &&
561 add_bridge(np) == 0) 544 maple_add_bridge(np) == 0)
562 of_node_get(np); 545 of_node_get(np);
563 546
564 if (of_device_is_compatible(np, "u3-ht")) { 547 if (of_device_is_compatible(np, "u3-ht")) {
@@ -570,27 +553,9 @@ void __init maple_pci_init(void)
570 553
571 /* Now setup the HyperTransport host if we found any 554 /* Now setup the HyperTransport host if we found any
572 */ 555 */
573 if (ht && add_bridge(ht) != 0) 556 if (ht && maple_add_bridge(ht) != 0)
574 of_node_put(ht); 557 of_node_put(ht);
575 558
576 /*
577 * We need to call pci_setup_phb_io for the HT bridge first
578 * so it gets the I/O port numbers starting at 0, and we
579 * need to call it for the AGP bridge after that so it gets
580 * small positive I/O port numbers.
581 */
582 if (u3_ht)
583 pci_setup_phb_io(u3_ht, 1);
584 if (u3_agp)
585 pci_setup_phb_io(u3_agp, 0);
586 if (u4_pcie)
587 pci_setup_phb_io(u4_pcie, 0);
588
589 /* Fixup the IO resources on our host bridges as the common code
590 * does it only for childs of the host bridges
591 */
592 maple_fixup_phb_resources();
593
594 /* Setup the linkage between OF nodes and PHBs */ 559 /* Setup the linkage between OF nodes and PHBs */
595 pci_devs_phb_init(); 560 pci_devs_phb_init();
596 561
diff --git a/arch/powerpc/platforms/pasemi/Kconfig b/arch/powerpc/platforms/pasemi/Kconfig
index 7c5076e38ea1..95cd90fd81c7 100644
--- a/arch/powerpc/platforms/pasemi/Kconfig
+++ b/arch/powerpc/platforms/pasemi/Kconfig
@@ -25,4 +25,13 @@ config PPC_PASEMI_MDIO
25 help 25 help
26 Driver for MDIO via GPIO on PWRficient platforms 26 Driver for MDIO via GPIO on PWRficient platforms
27 27
28config ELECTRA_IDE
29 tristate "Electra IDE driver"
30 default y
31 depends on PPC_PASEMI && ATA
32 select PATA_PLATFORM
33 help
34 This includes driver support for the Electra on-board IDE
35 interface.
36
28endmenu 37endmenu
diff --git a/arch/powerpc/platforms/pasemi/Makefile b/arch/powerpc/platforms/pasemi/Makefile
index 2cd2a4f26a48..f47fcac7e581 100644
--- a/arch/powerpc/platforms/pasemi/Makefile
+++ b/arch/powerpc/platforms/pasemi/Makefile
@@ -1,3 +1,4 @@
1obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o 1obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o
2obj-$(CONFIG_PPC_PASEMI_MDIO) += gpio_mdio.o 2obj-$(CONFIG_PPC_PASEMI_MDIO) += gpio_mdio.o
3obj-$(CONFIG_ELECTRA_IDE) += electra_ide.o
3obj-$(CONFIG_PPC_PASEMI_CPUFREQ) += cpufreq.o 4obj-$(CONFIG_PPC_PASEMI_CPUFREQ) += cpufreq.o
diff --git a/arch/powerpc/platforms/pasemi/electra_ide.c b/arch/powerpc/platforms/pasemi/electra_ide.c
new file mode 100644
index 000000000000..12fb0c949263
--- /dev/null
+++ b/arch/powerpc/platforms/pasemi/electra_ide.c
@@ -0,0 +1,96 @@
1/*
2 * Copyright (C) 2007 PA Semi, Inc
3 *
4 * Maintained by: Olof Johansson <olof@lixom.net>
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 * 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#include <linux/platform_device.h>
21
22#include <asm/prom.h>
23#include <asm/system.h>
24
25/* The electra IDE interface is incredibly simple: Just a device on the localbus
26 * with interrupts hooked up to one of the GPIOs. The device tree contains the
27 * address window and interrupt mappings already, and the pata_platform driver handles
28 * the rest. We just need to hook the two up.
29 */
30
31#define MAX_IFS 4 /* really, we have only one */
32
33static struct platform_device *pdevs[MAX_IFS];
34
35static int __devinit electra_ide_init(void)
36{
37 struct device_node *np;
38 struct resource r[3];
39 int ret = 0;
40 int i;
41
42 np = of_find_compatible_node(NULL, "ide", "electra-ide");
43 i = 0;
44
45 while (np && i < MAX_IFS) {
46 memset(r, 0, sizeof(r));
47
48 /* pata_platform wants two address ranges: one for the base registers,
49 * another for the control (altstatus). It's located at offset 0x3f6 in
50 * the window, but the device tree only has one large register window
51 * that covers both ranges. So we need to split it up by hand here:
52 */
53
54 ret = of_address_to_resource(np, 0, &r[0]);
55 if (ret)
56 goto out;
57 ret = of_address_to_resource(np, 0, &r[1]);
58 if (ret)
59 goto out;
60
61 r[1].start += 0x3f6;
62 r[0].end = r[1].start-1;
63
64 r[2].start = irq_of_parse_and_map(np, 0);
65 r[2].end = irq_of_parse_and_map(np, 0);
66 r[2].flags = IORESOURCE_IRQ;
67
68 pr_debug("registering platform device at 0x%lx/0x%lx, irq is %ld\n",
69 r[0].start, r[1].start, r[2].start);
70 pdevs[i] = platform_device_register_simple("pata_platform", i, r, 3);
71 if (IS_ERR(pdevs[i])) {
72 ret = PTR_ERR(pdevs[i]);
73 pdevs[i] = NULL;
74 goto out;
75 }
76 np = of_find_compatible_node(np, "ide", "electra-ide");
77 }
78out:
79 return ret;
80}
81module_init(electra_ide_init);
82
83static void __devexit electra_ide_exit(void)
84{
85 int i;
86
87 for (i = 0; i < MAX_IFS; i++)
88 if (pdevs[i])
89 platform_device_unregister(pdevs[i]);
90}
91module_exit(electra_ide_exit);
92
93
94MODULE_LICENSE("GPL");
95MODULE_AUTHOR ("Olof Johansson <olof@lixom.net>");
96MODULE_DESCRIPTION("PA Semi Electra IDE driver");
diff --git a/arch/powerpc/platforms/pasemi/idle.c b/arch/powerpc/platforms/pasemi/idle.c
index 03cd45d8fefa..3c962d5757be 100644
--- a/arch/powerpc/platforms/pasemi/idle.c
+++ b/arch/powerpc/platforms/pasemi/idle.c
@@ -26,6 +26,7 @@
26 26
27#include <asm/machdep.h> 27#include <asm/machdep.h>
28#include <asm/reg.h> 28#include <asm/reg.h>
29#include <asm/smp.h>
29 30
30#include "pasemi.h" 31#include "pasemi.h"
31 32
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
index 95fa6a7d15ee..f33b21b9f5d4 100644
--- a/arch/powerpc/platforms/pasemi/iommu.c
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -31,8 +31,6 @@
31#define IOBMAP_PAGE_SIZE (1 << IOBMAP_PAGE_SHIFT) 31#define IOBMAP_PAGE_SIZE (1 << IOBMAP_PAGE_SHIFT)
32#define IOBMAP_PAGE_MASK (IOBMAP_PAGE_SIZE - 1) 32#define IOBMAP_PAGE_MASK (IOBMAP_PAGE_SIZE - 1)
33 33
34#define IOBMAP_PAGE_FACTOR (PAGE_SHIFT - IOBMAP_PAGE_SHIFT)
35
36#define IOB_BASE 0xe0000000 34#define IOB_BASE 0xe0000000
37#define IOB_SIZE 0x3000 35#define IOB_SIZE 0x3000
38/* Configuration registers */ 36/* Configuration registers */
@@ -97,9 +95,6 @@ static void iobmap_build(struct iommu_table *tbl, long index,
97 95
98 bus_addr = (tbl->it_offset + index) << PAGE_SHIFT; 96 bus_addr = (tbl->it_offset + index) << PAGE_SHIFT;
99 97
100 npages <<= IOBMAP_PAGE_FACTOR;
101 index <<= IOBMAP_PAGE_FACTOR;
102
103 ip = ((u32 *)tbl->it_base) + index; 98 ip = ((u32 *)tbl->it_base) + index;
104 99
105 while (npages--) { 100 while (npages--) {
@@ -125,9 +120,6 @@ static void iobmap_free(struct iommu_table *tbl, long index,
125 120
126 bus_addr = (tbl->it_offset + index) << PAGE_SHIFT; 121 bus_addr = (tbl->it_offset + index) << PAGE_SHIFT;
127 122
128 npages <<= IOBMAP_PAGE_FACTOR;
129 index <<= IOBMAP_PAGE_FACTOR;
130
131 ip = ((u32 *)tbl->it_base) + index; 123 ip = ((u32 *)tbl->it_base) + index;
132 124
133 while (npages--) { 125 while (npages--) {
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
index bbc6dfcfaa91..ab1f5f62bcd8 100644
--- a/arch/powerpc/platforms/pasemi/pci.c
+++ b/arch/powerpc/platforms/pasemi/pci.c
@@ -132,7 +132,7 @@ static void __init setup_pa_pxp(struct pci_controller *hose)
132 hose->cfg_data = ioremap(0xe0000000, 0x10000000); 132 hose->cfg_data = ioremap(0xe0000000, 0x10000000);
133} 133}
134 134
135static int __init add_bridge(struct device_node *dev) 135static int __init pas_add_bridge(struct device_node *dev)
136{ 136{
137 struct pci_controller *hose; 137 struct pci_controller *hose;
138 138
@@ -150,29 +150,11 @@ static int __init add_bridge(struct device_node *dev)
150 printk(KERN_INFO "Found PA-PXP PCI host bridge.\n"); 150 printk(KERN_INFO "Found PA-PXP PCI host bridge.\n");
151 151
152 /* Interpret the "ranges" property */ 152 /* Interpret the "ranges" property */
153 /* This also maps the I/O region and sets isa_io/mem_base */
154 pci_process_bridge_OF_ranges(hose, dev, 1); 153 pci_process_bridge_OF_ranges(hose, dev, 1);
155 pci_setup_phb_io(hose, 1);
156 154
157 return 0; 155 return 0;
158} 156}
159 157
160
161static void __init pas_fixup_phb_resources(void)
162{
163 struct pci_controller *hose, *tmp;
164
165 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
166 unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base;
167 hose->io_resource.start += offset;
168 hose->io_resource.end += offset;
169 printk(KERN_INFO "PCI Host %d, io start: %lx; io end: %lx\n",
170 hose->global_number,
171 hose->io_resource.start, hose->io_resource.end);
172 }
173}
174
175
176void __init pas_pci_init(void) 158void __init pas_pci_init(void)
177{ 159{
178 struct device_node *np, *root; 160 struct device_node *np, *root;
@@ -185,13 +167,11 @@ void __init pas_pci_init(void)
185 } 167 }
186 168
187 for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) 169 for (np = NULL; (np = of_get_next_child(root, np)) != NULL;)
188 if (np->name && !strcmp(np->name, "pxp") && !add_bridge(np)) 170 if (np->name && !strcmp(np->name, "pxp") && !pas_add_bridge(np))
189 of_node_get(np); 171 of_node_get(np);
190 172
191 of_node_put(root); 173 of_node_put(root);
192 174
193 pas_fixup_phb_resources();
194
195 /* Setup the linkage between OF nodes and PHBs */ 175 /* Setup the linkage between OF nodes and PHBs */
196 pci_devs_phb_init(); 176 pci_devs_phb_init();
197 177
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index c5a3f61f8d85..ffe6528048b5 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -239,7 +239,7 @@ static int __init pas_probe(void)
239 return 1; 239 return 1;
240} 240}
241 241
242define_machine(pas) { 242define_machine(pasemi) {
243 .name = "PA Semi PA6T-1682M", 243 .name = "PA Semi PA6T-1682M",
244 .probe = pas_probe, 244 .probe = pas_probe,
245 .setup_arch = pas_setup_arch, 245 .setup_arch = pas_setup_arch,
diff --git a/arch/powerpc/platforms/powermac/Kconfig b/arch/powerpc/platforms/powermac/Kconfig
index 5b7afe50039a..055990ca8ce6 100644
--- a/arch/powerpc/platforms/powermac/Kconfig
+++ b/arch/powerpc/platforms/powermac/Kconfig
@@ -2,6 +2,7 @@ config PPC_PMAC
2 bool "Apple PowerMac based machines" 2 bool "Apple PowerMac based machines"
3 depends on PPC_MULTIPLATFORM 3 depends on PPC_MULTIPLATFORM
4 select MPIC 4 select MPIC
5 select PCI
5 select PPC_INDIRECT_PCI if PPC32 6 select PPC_INDIRECT_PCI if PPC32
6 select PPC_MPC106 if PPC32 7 select PPC_MPC106 if PPC32
7 select PPC_NATIVE 8 select PPC_NATIVE
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
index 3f507ab9c5e5..efdf5eb81ecc 100644
--- a/arch/powerpc/platforms/powermac/low_i2c.c
+++ b/arch/powerpc/platforms/powermac/low_i2c.c
@@ -42,6 +42,7 @@
42#include <linux/interrupt.h> 42#include <linux/interrupt.h>
43#include <linux/completion.h> 43#include <linux/completion.h>
44#include <linux/timer.h> 44#include <linux/timer.h>
45#include <linux/mutex.h>
45#include <asm/keylargo.h> 46#include <asm/keylargo.h>
46#include <asm/uninorth.h> 47#include <asm/uninorth.h>
47#include <asm/io.h> 48#include <asm/io.h>
@@ -84,7 +85,7 @@ struct pmac_i2c_bus
84 void *hostdata; 85 void *hostdata;
85 int channel; /* some hosts have multiple */ 86 int channel; /* some hosts have multiple */
86 int mode; /* current mode */ 87 int mode; /* current mode */
87 struct semaphore sem; 88 struct mutex mutex;
88 int opened; 89 int opened;
89 int polled; /* open mode */ 90 int polled; /* open mode */
90 struct platform_device *platform_dev; 91 struct platform_device *platform_dev;
@@ -104,7 +105,7 @@ static LIST_HEAD(pmac_i2c_busses);
104 105
105struct pmac_i2c_host_kw 106struct pmac_i2c_host_kw
106{ 107{
107 struct semaphore mutex; /* Access mutex for use by 108 struct mutex mutex; /* Access mutex for use by
108 * i2c-keywest */ 109 * i2c-keywest */
109 void __iomem *base; /* register base address */ 110 void __iomem *base; /* register base address */
110 int bsteps; /* register stepping */ 111 int bsteps; /* register stepping */
@@ -375,14 +376,14 @@ static void kw_i2c_timeout(unsigned long data)
375static int kw_i2c_open(struct pmac_i2c_bus *bus) 376static int kw_i2c_open(struct pmac_i2c_bus *bus)
376{ 377{
377 struct pmac_i2c_host_kw *host = bus->hostdata; 378 struct pmac_i2c_host_kw *host = bus->hostdata;
378 down(&host->mutex); 379 mutex_lock(&host->mutex);
379 return 0; 380 return 0;
380} 381}
381 382
382static void kw_i2c_close(struct pmac_i2c_bus *bus) 383static void kw_i2c_close(struct pmac_i2c_bus *bus)
383{ 384{
384 struct pmac_i2c_host_kw *host = bus->hostdata; 385 struct pmac_i2c_host_kw *host = bus->hostdata;
385 up(&host->mutex); 386 mutex_unlock(&host->mutex);
386} 387}
387 388
388static int kw_i2c_xfer(struct pmac_i2c_bus *bus, u8 addrdir, int subsize, 389static int kw_i2c_xfer(struct pmac_i2c_bus *bus, u8 addrdir, int subsize,
@@ -498,7 +499,7 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np)
498 kfree(host); 499 kfree(host);
499 return NULL; 500 return NULL;
500 } 501 }
501 init_MUTEX(&host->mutex); 502 mutex_init(&host->mutex);
502 init_completion(&host->complete); 503 init_completion(&host->complete);
503 spin_lock_init(&host->lock); 504 spin_lock_init(&host->lock);
504 init_timer(&host->timeout_timer); 505 init_timer(&host->timeout_timer);
@@ -571,7 +572,7 @@ static void __init kw_i2c_add(struct pmac_i2c_host_kw *host,
571 bus->open = kw_i2c_open; 572 bus->open = kw_i2c_open;
572 bus->close = kw_i2c_close; 573 bus->close = kw_i2c_close;
573 bus->xfer = kw_i2c_xfer; 574 bus->xfer = kw_i2c_xfer;
574 init_MUTEX(&bus->sem); 575 mutex_init(&bus->mutex);
575 if (controller == busnode) 576 if (controller == busnode)
576 bus->flags = pmac_i2c_multibus; 577 bus->flags = pmac_i2c_multibus;
577 list_add(&bus->link, &pmac_i2c_busses); 578 list_add(&bus->link, &pmac_i2c_busses);
@@ -798,7 +799,7 @@ static void __init pmu_i2c_probe(void)
798 bus->mode = pmac_i2c_mode_std; 799 bus->mode = pmac_i2c_mode_std;
799 bus->hostdata = bus + 1; 800 bus->hostdata = bus + 1;
800 bus->xfer = pmu_i2c_xfer; 801 bus->xfer = pmu_i2c_xfer;
801 init_MUTEX(&bus->sem); 802 mutex_init(&bus->mutex);
802 bus->flags = pmac_i2c_multibus; 803 bus->flags = pmac_i2c_multibus;
803 list_add(&bus->link, &pmac_i2c_busses); 804 list_add(&bus->link, &pmac_i2c_busses);
804 805
@@ -921,7 +922,7 @@ static void __init smu_i2c_probe(void)
921 bus->mode = pmac_i2c_mode_std; 922 bus->mode = pmac_i2c_mode_std;
922 bus->hostdata = bus + 1; 923 bus->hostdata = bus + 1;
923 bus->xfer = smu_i2c_xfer; 924 bus->xfer = smu_i2c_xfer;
924 init_MUTEX(&bus->sem); 925 mutex_init(&bus->mutex);
925 bus->flags = 0; 926 bus->flags = 0;
926 list_add(&bus->link, &pmac_i2c_busses); 927 list_add(&bus->link, &pmac_i2c_busses);
927 928
@@ -1093,13 +1094,13 @@ int pmac_i2c_open(struct pmac_i2c_bus *bus, int polled)
1093{ 1094{
1094 int rc; 1095 int rc;
1095 1096
1096 down(&bus->sem); 1097 mutex_lock(&bus->mutex);
1097 bus->polled = polled || pmac_i2c_force_poll; 1098 bus->polled = polled || pmac_i2c_force_poll;
1098 bus->opened = 1; 1099 bus->opened = 1;
1099 bus->mode = pmac_i2c_mode_std; 1100 bus->mode = pmac_i2c_mode_std;
1100 if (bus->open && (rc = bus->open(bus)) != 0) { 1101 if (bus->open && (rc = bus->open(bus)) != 0) {
1101 bus->opened = 0; 1102 bus->opened = 0;
1102 up(&bus->sem); 1103 mutex_unlock(&bus->mutex);
1103 return rc; 1104 return rc;
1104 } 1105 }
1105 return 0; 1106 return 0;
@@ -1112,7 +1113,7 @@ void pmac_i2c_close(struct pmac_i2c_bus *bus)
1112 if (bus->close) 1113 if (bus->close)
1113 bus->close(bus); 1114 bus->close(bus);
1114 bus->opened = 0; 1115 bus->opened = 0;
1115 up(&bus->sem); 1116 mutex_unlock(&bus->mutex);
1116} 1117}
1117EXPORT_SYMBOL_GPL(pmac_i2c_close); 1118EXPORT_SYMBOL_GPL(pmac_i2c_close);
1118 1119
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index c4af9e21ac93..92586db19754 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -35,8 +35,6 @@
35#define DBG(x...) 35#define DBG(x...)
36#endif 36#endif
37 37
38static int add_bridge(struct device_node *dev);
39
40/* XXX Could be per-controller, but I don't think we risk anything by 38/* XXX Could be per-controller, but I don't think we risk anything by
41 * assuming we won't have both UniNorth and Bandit */ 39 * assuming we won't have both UniNorth and Bandit */
42static int has_uninorth; 40static int has_uninorth;
@@ -897,7 +895,7 @@ static void __init setup_u3_ht(struct pci_controller* hose)
897 * "pci" (a MPC106) and no bandit or chaos bridges, and contrariwise, 895 * "pci" (a MPC106) and no bandit or chaos bridges, and contrariwise,
898 * if we have one or more bandit or chaos bridges, we don't have a MPC106. 896 * if we have one or more bandit or chaos bridges, we don't have a MPC106.
899 */ 897 */
900static int __init add_bridge(struct device_node *dev) 898static int __init pmac_add_bridge(struct device_node *dev)
901{ 899{
902 int len; 900 int len;
903 struct pci_controller *hose; 901 struct pci_controller *hose;
@@ -918,15 +916,9 @@ static int __init add_bridge(struct device_node *dev)
918 " bus 0\n", dev->full_name); 916 " bus 0\n", dev->full_name);
919 } 917 }
920 918
921 /* XXX Different prototypes, to be merged */
922#ifdef CONFIG_PPC64
923 hose = pcibios_alloc_controller(dev); 919 hose = pcibios_alloc_controller(dev);
924#else
925 hose = pcibios_alloc_controller();
926#endif
927 if (!hose) 920 if (!hose)
928 return -ENOMEM; 921 return -ENOMEM;
929 hose->arch_data = dev;
930 hose->first_busno = bus_range ? bus_range[0] : 0; 922 hose->first_busno = bus_range ? bus_range[0] : 0;
931 hose->last_busno = bus_range ? bus_range[1] : 0xff; 923 hose->last_busno = bus_range ? bus_range[1] : 0xff;
932 924
@@ -1006,19 +998,6 @@ void __devinit pmac_pci_irq_fixup(struct pci_dev *dev)
1006#endif /* CONFIG_PPC32 */ 998#endif /* CONFIG_PPC32 */
1007} 999}
1008 1000
1009#ifdef CONFIG_PPC64
1010static void __init pmac_fixup_phb_resources(void)
1011{
1012 struct pci_controller *hose, *tmp;
1013
1014 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
1015 printk(KERN_INFO "PCI Host %d, io start: %lx; io end: %lx\n",
1016 hose->global_number,
1017 hose->io_resource.start, hose->io_resource.end);
1018 }
1019}
1020#endif
1021
1022void __init pmac_pci_init(void) 1001void __init pmac_pci_init(void)
1023{ 1002{
1024 struct device_node *np, *root; 1003 struct device_node *np, *root;
@@ -1036,7 +1015,7 @@ void __init pmac_pci_init(void)
1036 if (strcmp(np->name, "bandit") == 0 1015 if (strcmp(np->name, "bandit") == 0
1037 || strcmp(np->name, "chaos") == 0 1016 || strcmp(np->name, "chaos") == 0
1038 || strcmp(np->name, "pci") == 0) { 1017 || strcmp(np->name, "pci") == 0) {
1039 if (add_bridge(np) == 0) 1018 if (pmac_add_bridge(np) == 0)
1040 of_node_get(np); 1019 of_node_get(np);
1041 } 1020 }
1042 if (strcmp(np->name, "ht") == 0) { 1021 if (strcmp(np->name, "ht") == 0) {
@@ -1050,28 +1029,9 @@ void __init pmac_pci_init(void)
1050 /* Probe HT last as it relies on the agp resources to be already 1029 /* Probe HT last as it relies on the agp resources to be already
1051 * setup 1030 * setup
1052 */ 1031 */
1053 if (ht && add_bridge(ht) != 0) 1032 if (ht && pmac_add_bridge(ht) != 0)
1054 of_node_put(ht); 1033 of_node_put(ht);
1055 1034
1056 /*
1057 * We need to call pci_setup_phb_io for the HT bridge first
1058 * so it gets the I/O port numbers starting at 0, and we
1059 * need to call it for the AGP bridge after that so it gets
1060 * small positive I/O port numbers.
1061 */
1062 if (u3_ht)
1063 pci_setup_phb_io(u3_ht, 1);
1064 if (u3_agp)
1065 pci_setup_phb_io(u3_agp, 0);
1066 if (u4_pcie)
1067 pci_setup_phb_io(u4_pcie, 0);
1068
1069 /*
1070 * On ppc64, fixup the IO resources on our host bridges as
1071 * the common code does it only for children of the host bridges
1072 */
1073 pmac_fixup_phb_resources();
1074
1075 /* Setup the linkage between OF nodes and PHBs */ 1035 /* Setup the linkage between OF nodes and PHBs */
1076 pci_devs_phb_init(); 1036 pci_devs_phb_init();
1077 1037
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 07b1c4ec428d..7ccb9236e8b4 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -363,8 +363,19 @@ static void __init pmac_setup_arch(void)
363 smp_ops = &core99_smp_ops; 363 smp_ops = &core99_smp_ops;
364 } 364 }
365#ifdef CONFIG_PPC32 365#ifdef CONFIG_PPC32
366 else 366 else {
367 /*
368 * We have to set bits in cpu_possible_map here since the
369 * secondary CPU(s) aren't in the device tree, and
370 * setup_per_cpu_areas only allocates per-cpu data for
371 * CPUs in the cpu_possible_map.
372 */
373 int cpu;
374
375 for (cpu = 1; cpu < 4 && cpu < NR_CPUS; ++cpu)
376 cpu_set(cpu, cpu_possible_map);
367 smp_ops = &psurge_smp_ops; 377 smp_ops = &psurge_smp_ops;
378 }
368#endif 379#endif
369#endif /* CONFIG_SMP */ 380#endif /* CONFIG_SMP */
370 381
@@ -443,6 +454,9 @@ static int initializing = 1;
443 454
444static int pmac_late_init(void) 455static int pmac_late_init(void)
445{ 456{
457 if (!machine_is(powermac))
458 return -ENODEV;
459
446 initializing = 0; 460 initializing = 0;
447 /* this is udbg (which is __init) and we can later use it during 461 /* this is udbg (which is __init) and we can later use it during
448 * cpu hotplug (in smp_core99_kick_cpu) */ 462 * cpu hotplug (in smp_core99_kick_cpu) */
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index 686ed82bde79..cb2d894541c6 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -317,7 +317,6 @@ static int __init smp_psurge_probe(void)
317 ncpus = NR_CPUS; 317 ncpus = NR_CPUS;
318 for (i = 1; i < ncpus ; ++i) { 318 for (i = 1; i < ncpus ; ++i) {
319 cpu_set(i, cpu_present_map); 319 cpu_set(i, cpu_present_map);
320 cpu_set(i, cpu_possible_map);
321 set_hard_smp_processor_id(i, i); 320 set_hard_smp_processor_id(i, i);
322 } 321 }
323 322
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig
index 40f0008af4d1..d4fc74f7bb15 100644
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -7,6 +7,7 @@ config PPC_PS3
7 select USB_OHCI_BIG_ENDIAN_MMIO 7 select USB_OHCI_BIG_ENDIAN_MMIO
8 select USB_ARCH_HAS_EHCI 8 select USB_ARCH_HAS_EHCI
9 select USB_EHCI_BIG_ENDIAN_MMIO 9 select USB_EHCI_BIG_ENDIAN_MMIO
10 select MEMORY_HOTPLUG
10 help 11 help
11 This option enables support for the Sony PS3 game console 12 This option enables support for the Sony PS3 game console
12 and other platforms using the PS3 hypervisor. 13 and other platforms using the PS3 hypervisor.
@@ -73,18 +74,12 @@ config PS3_USE_LPAR_ADDR
73 74
74config PS3_VUART 75config PS3_VUART
75 depends on PPC_PS3 76 depends on PPC_PS3
76 bool "PS3 Virtual UART support" if PS3_ADVANCED 77 tristate
77 default y
78 help
79 Include support for the PS3 Virtual UART.
80
81 This support is required for several system services
82 including the System Manager and AV Settings. In
83 general, all users will say Y.
84 78
85config PS3_PS3AV 79config PS3_PS3AV
80 depends on PPC_PS3
86 tristate "PS3 AV settings driver" if PS3_ADVANCED 81 tristate "PS3 AV settings driver" if PS3_ADVANCED
87 depends on PS3_VUART 82 select PS3_VUART
88 default y 83 default y
89 help 84 help
90 Include support for the PS3 AV Settings driver. 85 Include support for the PS3 AV Settings driver.
@@ -93,13 +88,54 @@ config PS3_PS3AV
93 general, all users will say Y or M. 88 general, all users will say Y or M.
94 89
95config PS3_SYS_MANAGER 90config PS3_SYS_MANAGER
96 bool "PS3 System Manager driver" if PS3_ADVANCED 91 depends on PPC_PS3
97 depends on PS3_VUART 92 tristate "PS3 System Manager driver" if PS3_ADVANCED
98 default y 93 select PS3_VUART
94 default m
99 help 95 help
100 Include support for the PS3 System Manager. 96 Include support for the PS3 System Manager.
101 97
102 This support is required for system control. In 98 This support is required for system control. In
103 general, all users will say Y. 99 general, all users will say Y or M.
100
101config PS3_STORAGE
102 depends on PPC_PS3
103 tristate
104
105config PS3_DISK
106 tristate "PS3 Disk Storage Driver"
107 depends on PPC_PS3 && BLOCK
108 select PS3_STORAGE
109 help
110 Include support for the PS3 Disk Storage.
111
112 This support is required to access the PS3 hard disk.
113 In general, all users will say Y or M.
114
115config PS3_ROM
116 tristate "PS3 BD/DVD/CD-ROM Storage Driver"
117 depends on PPC_PS3 && SCSI
118 select PS3_STORAGE
119 help
120 Include support for the PS3 ROM Storage.
121
122 This support is required to access the PS3 BD/DVD/CD-ROM drive.
123 In general, all users will say Y or M.
124 Also make sure to say Y or M to "SCSI CDROM support" later.
125
126config PS3_FLASH
127 tristate "PS3 FLASH ROM Storage Driver"
128 depends on PPC_PS3
129 select PS3_STORAGE
130 help
131 Include support for the PS3 FLASH ROM Storage.
132
133 This support is required to access the PS3 FLASH ROM, which
134 contains the boot loader and some boot options.
135 In general, all users will say Y or M.
136
137 As this driver needs a fixed buffer of 256 KiB of memory, it can
138 be disabled on the kernel command line using "ps3flash=off", to
139 not allocate this fixed buffer.
104 140
105endmenu 141endmenu
diff --git a/arch/powerpc/platforms/ps3/Makefile b/arch/powerpc/platforms/ps3/Makefile
index a0048fcf0866..ac1bdf844eca 100644
--- a/arch/powerpc/platforms/ps3/Makefile
+++ b/arch/powerpc/platforms/ps3/Makefile
@@ -4,3 +4,4 @@ obj-y += system-bus.o
4 4
5obj-$(CONFIG_SMP) += smp.o 5obj-$(CONFIG_SMP) += smp.o
6obj-$(CONFIG_SPU_BASE) += spu.o 6obj-$(CONFIG_SPU_BASE) += spu.o
7obj-y += device-init.o
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c
new file mode 100644
index 000000000000..825ebb2cbc2a
--- /dev/null
+++ b/arch/powerpc/platforms/ps3/device-init.c
@@ -0,0 +1,785 @@
1/*
2 * PS3 device registration routines.
3 *
4 * Copyright (C) 2007 Sony Computer Entertainment Inc.
5 * Copyright 2007 Sony Corp.
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; version 2 of the License.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#include <linux/delay.h>
22#include <linux/freezer.h>
23#include <linux/kernel.h>
24#include <linux/kthread.h>
25#include <linux/init.h>
26
27#include <asm/firmware.h>
28#include <asm/lv1call.h>
29#include <asm/ps3stor.h>
30
31#include "platform.h"
32
33/**
34 * ps3_setup_gelic_device - Setup and register a gelic device instance.
35 *
36 * Allocates memory for a struct ps3_system_bus_device instance, initialises the
37 * structure members, and registers the device instance with the system bus.
38 */
39
40static int __init ps3_setup_gelic_device(
41 const struct ps3_repository_device *repo)
42{
43 int result;
44 struct layout {
45 struct ps3_system_bus_device dev;
46 struct ps3_dma_region d_region;
47 } *p;
48
49 pr_debug(" -> %s:%d\n", __func__, __LINE__);
50
51 BUG_ON(repo->bus_type != PS3_BUS_TYPE_SB);
52 BUG_ON(repo->dev_type != PS3_DEV_TYPE_SB_GELIC);
53
54 p = kzalloc(sizeof(struct layout), GFP_KERNEL);
55
56 if (!p) {
57 result = -ENOMEM;
58 goto fail_malloc;
59 }
60
61 p->dev.match_id = PS3_MATCH_ID_GELIC;
62 p->dev.dev_type = PS3_DEVICE_TYPE_SB;
63 p->dev.bus_id = repo->bus_id;
64 p->dev.dev_id = repo->dev_id;
65 p->dev.d_region = &p->d_region;
66
67 result = ps3_repository_find_interrupt(repo,
68 PS3_INTERRUPT_TYPE_EVENT_PORT, &p->dev.interrupt_id);
69
70 if (result) {
71 pr_debug("%s:%d ps3_repository_find_interrupt failed\n",
72 __func__, __LINE__);
73 goto fail_find_interrupt;
74 }
75
76 BUG_ON(p->dev.interrupt_id != 0);
77
78 result = ps3_dma_region_init(&p->dev, p->dev.d_region, PS3_DMA_64K,
79 PS3_DMA_OTHER, NULL, 0);
80
81 if (result) {
82 pr_debug("%s:%d ps3_dma_region_init failed\n",
83 __func__, __LINE__);
84 goto fail_dma_init;
85 }
86
87 result = ps3_system_bus_device_register(&p->dev);
88
89 if (result) {
90 pr_debug("%s:%d ps3_system_bus_device_register failed\n",
91 __func__, __LINE__);
92 goto fail_device_register;
93 }
94
95 pr_debug(" <- %s:%d\n", __func__, __LINE__);
96 return result;
97
98fail_device_register:
99fail_dma_init:
100fail_find_interrupt:
101 kfree(p);
102fail_malloc:
103 pr_debug(" <- %s:%d: fail.\n", __func__, __LINE__);
104 return result;
105}
106
107static int __init_refok ps3_setup_uhc_device(
108 const struct ps3_repository_device *repo, enum ps3_match_id match_id,
109 enum ps3_interrupt_type interrupt_type, enum ps3_reg_type reg_type)
110{
111 int result;
112 struct layout {
113 struct ps3_system_bus_device dev;
114 struct ps3_dma_region d_region;
115 struct ps3_mmio_region m_region;
116 } *p;
117 u64 bus_addr;
118 u64 len;
119
120 pr_debug(" -> %s:%d\n", __func__, __LINE__);
121
122 BUG_ON(repo->bus_type != PS3_BUS_TYPE_SB);
123 BUG_ON(repo->dev_type != PS3_DEV_TYPE_SB_USB);
124
125 p = kzalloc(sizeof(struct layout), GFP_KERNEL);
126
127 if (!p) {
128 result = -ENOMEM;
129 goto fail_malloc;
130 }
131
132 p->dev.match_id = match_id;
133 p->dev.dev_type = PS3_DEVICE_TYPE_SB;
134 p->dev.bus_id = repo->bus_id;
135 p->dev.dev_id = repo->dev_id;
136 p->dev.d_region = &p->d_region;
137 p->dev.m_region = &p->m_region;
138
139 result = ps3_repository_find_interrupt(repo,
140 interrupt_type, &p->dev.interrupt_id);
141
142 if (result) {
143 pr_debug("%s:%d ps3_repository_find_interrupt failed\n",
144 __func__, __LINE__);
145 goto fail_find_interrupt;
146 }
147
148 result = ps3_repository_find_reg(repo, reg_type,
149 &bus_addr, &len);
150
151 if (result) {
152 pr_debug("%s:%d ps3_repository_find_reg failed\n",
153 __func__, __LINE__);
154 goto fail_find_reg;
155 }
156
157 result = ps3_dma_region_init(&p->dev, p->dev.d_region, PS3_DMA_64K,
158 PS3_DMA_INTERNAL, NULL, 0);
159
160 if (result) {
161 pr_debug("%s:%d ps3_dma_region_init failed\n",
162 __func__, __LINE__);
163 goto fail_dma_init;
164 }
165
166 result = ps3_mmio_region_init(&p->dev, p->dev.m_region, bus_addr, len,
167 PS3_MMIO_4K);
168
169 if (result) {
170 pr_debug("%s:%d ps3_mmio_region_init failed\n",
171 __func__, __LINE__);
172 goto fail_mmio_init;
173 }
174
175 result = ps3_system_bus_device_register(&p->dev);
176
177 if (result) {
178 pr_debug("%s:%d ps3_system_bus_device_register failed\n",
179 __func__, __LINE__);
180 goto fail_device_register;
181 }
182
183 pr_debug(" <- %s:%d\n", __func__, __LINE__);
184 return result;
185
186fail_device_register:
187fail_mmio_init:
188fail_dma_init:
189fail_find_reg:
190fail_find_interrupt:
191 kfree(p);
192fail_malloc:
193 pr_debug(" <- %s:%d: fail.\n", __func__, __LINE__);
194 return result;
195}
196
197static int __init ps3_setup_ehci_device(
198 const struct ps3_repository_device *repo)
199{
200 return ps3_setup_uhc_device(repo, PS3_MATCH_ID_EHCI,
201 PS3_INTERRUPT_TYPE_SB_EHCI, PS3_REG_TYPE_SB_EHCI);
202}
203
204static int __init ps3_setup_ohci_device(
205 const struct ps3_repository_device *repo)
206{
207 return ps3_setup_uhc_device(repo, PS3_MATCH_ID_OHCI,
208 PS3_INTERRUPT_TYPE_SB_OHCI, PS3_REG_TYPE_SB_OHCI);
209}
210
211static int __init ps3_setup_vuart_device(enum ps3_match_id match_id,
212 unsigned int port_number)
213{
214 int result;
215 struct layout {
216 struct ps3_system_bus_device dev;
217 } *p;
218
219 pr_debug(" -> %s:%d: match_id %u, port %u\n", __func__, __LINE__,
220 match_id, port_number);
221
222 p = kzalloc(sizeof(struct layout), GFP_KERNEL);
223
224 if (!p)
225 return -ENOMEM;
226
227 p->dev.match_id = match_id;
228 p->dev.dev_type = PS3_DEVICE_TYPE_VUART;
229 p->dev.port_number = port_number;
230
231 result = ps3_system_bus_device_register(&p->dev);
232
233 if (result)
234 pr_debug("%s:%d ps3_system_bus_device_register failed\n",
235 __func__, __LINE__);
236
237 pr_debug(" <- %s:%d\n", __func__, __LINE__);
238 return result;
239}
240
241static int ps3stor_wait_for_completion(u64 dev_id, u64 tag,
242 unsigned int timeout)
243{
244 int result = -1;
245 unsigned int retries = 0;
246 u64 status;
247
248 for (retries = 0; retries < timeout; retries++) {
249 result = lv1_storage_check_async_status(dev_id, tag, &status);
250 if (!result)
251 break;
252
253 msleep(1);
254 }
255
256 if (result)
257 pr_debug("%s:%u: check_async_status: %s, status %lx\n",
258 __func__, __LINE__, ps3_result(result), status);
259
260 return result;
261}
262
263/**
264 * ps3_storage_wait_for_device - Wait for a storage device to become ready.
265 * @repo: The repository device to wait for.
266 *
267 * Uses the hypervisor's storage device notification mechanism to wait until
268 * a storage device is ready. The device notification mechanism uses a
269 * psuedo device (id = -1) to asynchronously notify the guest when storage
270 * devices become ready. The notification device has a block size of 512
271 * bytes.
272 */
273
274static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo)
275{
276 int result;
277 const u64 notification_dev_id = (u64)-1LL;
278 const unsigned int timeout = HZ;
279 u64 lpar;
280 u64 tag;
281 struct {
282 u64 operation_code; /* must be zero */
283 u64 event_mask; /* 1 = device ready */
284 } *notify_cmd;
285 struct {
286 u64 event_type; /* notify_device_ready */
287 u64 bus_id;
288 u64 dev_id;
289 u64 dev_type;
290 u64 dev_port;
291 } *notify_event;
292 enum {
293 notify_device_ready = 1
294 };
295
296 pr_debug(" -> %s:%u: bus_id %u, dev_id %u, dev_type %u\n", __func__,
297 __LINE__, repo->bus_id, repo->dev_id, repo->dev_type);
298
299 notify_cmd = kzalloc(512, GFP_KERNEL);
300 notify_event = (void *)notify_cmd;
301 if (!notify_cmd)
302 return -ENOMEM;
303
304 lpar = ps3_mm_phys_to_lpar(__pa(notify_cmd));
305
306 result = lv1_open_device(repo->bus_id, notification_dev_id, 0);
307 if (result) {
308 printk(KERN_ERR "%s:%u: lv1_open_device %s\n", __func__,
309 __LINE__, ps3_result(result));
310 result = -ENODEV;
311 goto fail_free;
312 }
313
314 /* Setup and write the request for device notification. */
315
316 notify_cmd->operation_code = 0; /* must be zero */
317 notify_cmd->event_mask = 0x01; /* device ready */
318
319 result = lv1_storage_write(notification_dev_id, 0, 0, 1, 0, lpar,
320 &tag);
321 if (result) {
322 printk(KERN_ERR "%s:%u: write failed %s\n", __func__, __LINE__,
323 ps3_result(result));
324 result = -ENODEV;
325 goto fail_close;
326 }
327
328 /* Wait for the write completion */
329
330 result = ps3stor_wait_for_completion(notification_dev_id, tag,
331 timeout);
332 if (result) {
333 printk(KERN_ERR "%s:%u: write not completed %s\n", __func__,
334 __LINE__, ps3_result(result));
335 result = -ENODEV;
336 goto fail_close;
337 }
338
339 /* Loop here processing the requested notification events. */
340
341 result = -ENODEV;
342 while (1) {
343 memset(notify_event, 0, sizeof(*notify_event));
344
345 result = lv1_storage_read(notification_dev_id, 0, 0, 1, 0,
346 lpar, &tag);
347 if (result) {
348 printk(KERN_ERR "%s:%u: write failed %s\n", __func__,
349 __LINE__, ps3_result(result));
350 break;
351 }
352
353 result = ps3stor_wait_for_completion(notification_dev_id, tag,
354 timeout);
355 if (result) {
356 printk(KERN_ERR "%s:%u: read not completed %s\n",
357 __func__, __LINE__, ps3_result(result));
358 break;
359 }
360
361 if (notify_event->event_type != notify_device_ready ||
362 notify_event->bus_id != repo->bus_id) {
363 pr_debug("%s:%u: bad notify_event: event %lu, "
364 "dev_id %lu, dev_type %lu\n",
365 __func__, __LINE__, notify_event->event_type,
366 notify_event->dev_id, notify_event->dev_type);
367 break;
368 }
369
370 if (notify_event->dev_id == repo->dev_id &&
371 notify_event->dev_type == repo->dev_type) {
372 pr_debug("%s:%u: device ready: dev_id %u\n", __func__,
373 __LINE__, repo->dev_id);
374 result = 0;
375 break;
376 }
377
378 if (notify_event->dev_id == repo->dev_id &&
379 notify_event->dev_type == PS3_DEV_TYPE_NOACCESS) {
380 pr_debug("%s:%u: no access: dev_id %u\n", __func__,
381 __LINE__, repo->dev_id);
382 break;
383 }
384 }
385
386fail_close:
387 lv1_close_device(repo->bus_id, notification_dev_id);
388fail_free:
389 kfree(notify_cmd);
390 pr_debug(" <- %s:%u\n", __func__, __LINE__);
391 return result;
392}
393
394static int ps3_setup_storage_dev(const struct ps3_repository_device *repo,
395 enum ps3_match_id match_id)
396{
397 int result;
398 struct ps3_storage_device *p;
399 u64 port, blk_size, num_blocks;
400 unsigned int num_regions, i;
401
402 pr_debug(" -> %s:%u: match_id %u\n", __func__, __LINE__, match_id);
403
404 result = ps3_repository_read_stor_dev_info(repo->bus_index,
405 repo->dev_index, &port,
406 &blk_size, &num_blocks,
407 &num_regions);
408 if (result) {
409 printk(KERN_ERR "%s:%u: _read_stor_dev_info failed %d\n",
410 __func__, __LINE__, result);
411 return -ENODEV;
412 }
413
414 pr_debug("%s:%u: index %u:%u: port %lu blk_size %lu num_blocks %lu "
415 "num_regions %u\n", __func__, __LINE__, repo->bus_index,
416 repo->dev_index, port, blk_size, num_blocks, num_regions);
417
418 p = kzalloc(sizeof(struct ps3_storage_device) +
419 num_regions * sizeof(struct ps3_storage_region),
420 GFP_KERNEL);
421 if (!p) {
422 result = -ENOMEM;
423 goto fail_malloc;
424 }
425
426 p->sbd.match_id = match_id;
427 p->sbd.dev_type = PS3_DEVICE_TYPE_SB;
428 p->sbd.bus_id = repo->bus_id;
429 p->sbd.dev_id = repo->dev_id;
430 p->sbd.d_region = &p->dma_region;
431 p->blk_size = blk_size;
432 p->num_regions = num_regions;
433
434 result = ps3_repository_find_interrupt(repo,
435 PS3_INTERRUPT_TYPE_EVENT_PORT,
436 &p->sbd.interrupt_id);
437 if (result) {
438 printk(KERN_ERR "%s:%u: find_interrupt failed %d\n", __func__,
439 __LINE__, result);
440 result = -ENODEV;
441 goto fail_find_interrupt;
442 }
443
444 /* FIXME: Arrange to only do this on a 'cold' boot */
445
446 result = ps3_storage_wait_for_device(repo);
447 if (result) {
448 printk(KERN_ERR "%s:%u: storage_notification failed %d\n",
449 __func__, __LINE__, result);
450 result = -ENODEV;
451 goto fail_probe_notification;
452 }
453
454 for (i = 0; i < num_regions; i++) {
455 unsigned int id;
456 u64 start, size;
457
458 result = ps3_repository_read_stor_dev_region(repo->bus_index,
459 repo->dev_index,
460 i, &id, &start,
461 &size);
462 if (result) {
463 printk(KERN_ERR
464 "%s:%u: read_stor_dev_region failed %d\n",
465 __func__, __LINE__, result);
466 result = -ENODEV;
467 goto fail_read_region;
468 }
469 pr_debug("%s:%u: region %u: id %u start %lu size %lu\n",
470 __func__, __LINE__, i, id, start, size);
471
472 p->regions[i].id = id;
473 p->regions[i].start = start;
474 p->regions[i].size = size;
475 }
476
477 result = ps3_system_bus_device_register(&p->sbd);
478 if (result) {
479 pr_debug("%s:%u ps3_system_bus_device_register failed\n",
480 __func__, __LINE__);
481 goto fail_device_register;
482 }
483
484 pr_debug(" <- %s:%u\n", __func__, __LINE__);
485 return 0;
486
487fail_device_register:
488fail_read_region:
489fail_probe_notification:
490fail_find_interrupt:
491 kfree(p);
492fail_malloc:
493 pr_debug(" <- %s:%u: fail.\n", __func__, __LINE__);
494 return result;
495}
496
497static int __init ps3_register_vuart_devices(void)
498{
499 int result;
500 unsigned int port_number;
501
502 pr_debug(" -> %s:%d\n", __func__, __LINE__);
503
504 result = ps3_repository_read_vuart_av_port(&port_number);
505 if (result)
506 port_number = 0; /* av default */
507
508 result = ps3_setup_vuart_device(PS3_MATCH_ID_AV_SETTINGS, port_number);
509 WARN_ON(result);
510
511 result = ps3_repository_read_vuart_sysmgr_port(&port_number);
512 if (result)
513 port_number = 2; /* sysmgr default */
514
515 result = ps3_setup_vuart_device(PS3_MATCH_ID_SYSTEM_MANAGER,
516 port_number);
517 WARN_ON(result);
518
519 pr_debug(" <- %s:%d\n", __func__, __LINE__);
520 return result;
521}
522
523static int __init ps3_register_sound_devices(void)
524{
525 int result;
526 struct layout {
527 struct ps3_system_bus_device dev;
528 struct ps3_dma_region d_region;
529 struct ps3_mmio_region m_region;
530 } *p;
531
532 pr_debug(" -> %s:%d\n", __func__, __LINE__);
533
534 p = kzalloc(sizeof(*p), GFP_KERNEL);
535 if (!p)
536 return -ENOMEM;
537
538 p->dev.match_id = PS3_MATCH_ID_SOUND;
539 p->dev.dev_type = PS3_DEVICE_TYPE_IOC0;
540 p->dev.d_region = &p->d_region;
541 p->dev.m_region = &p->m_region;
542
543 result = ps3_system_bus_device_register(&p->dev);
544
545 if (result)
546 pr_debug("%s:%d ps3_system_bus_device_register failed\n",
547 __func__, __LINE__);
548
549 pr_debug(" <- %s:%d\n", __func__, __LINE__);
550 return result;
551}
552
553static int __init ps3_register_graphics_devices(void)
554{
555 int result;
556 struct layout {
557 struct ps3_system_bus_device dev;
558 } *p;
559
560 pr_debug(" -> %s:%d\n", __func__, __LINE__);
561
562 p = kzalloc(sizeof(struct layout), GFP_KERNEL);
563
564 if (!p)
565 return -ENOMEM;
566
567 p->dev.match_id = PS3_MATCH_ID_GRAPHICS;
568 p->dev.dev_type = PS3_DEVICE_TYPE_IOC0;
569
570 result = ps3_system_bus_device_register(&p->dev);
571
572 if (result)
573 pr_debug("%s:%d ps3_system_bus_device_register failed\n",
574 __func__, __LINE__);
575
576 pr_debug(" <- %s:%d\n", __func__, __LINE__);
577 return result;
578}
579
580/**
581 * ps3_register_repository_device - Register a device from the repositiory info.
582 *
583 */
584
585static int ps3_register_repository_device(
586 const struct ps3_repository_device *repo)
587{
588 int result;
589
590 switch (repo->dev_type) {
591 case PS3_DEV_TYPE_SB_GELIC:
592 result = ps3_setup_gelic_device(repo);
593 if (result) {
594 pr_debug("%s:%d ps3_setup_gelic_device failed\n",
595 __func__, __LINE__);
596 }
597 break;
598 case PS3_DEV_TYPE_SB_USB:
599
600 /* Each USB device has both an EHCI and an OHCI HC */
601
602 result = ps3_setup_ehci_device(repo);
603
604 if (result) {
605 pr_debug("%s:%d ps3_setup_ehci_device failed\n",
606 __func__, __LINE__);
607 }
608
609 result = ps3_setup_ohci_device(repo);
610
611 if (result) {
612 pr_debug("%s:%d ps3_setup_ohci_device failed\n",
613 __func__, __LINE__);
614 }
615 break;
616 case PS3_DEV_TYPE_STOR_DISK:
617 result = ps3_setup_storage_dev(repo, PS3_MATCH_ID_STOR_DISK);
618
619 /* Some devices are not accessable from the Other OS lpar. */
620 if (result == -ENODEV) {
621 result = 0;
622 pr_debug("%s:%u: not accessable\n", __func__,
623 __LINE__);
624 }
625
626 if (result)
627 pr_debug("%s:%u ps3_setup_storage_dev failed\n",
628 __func__, __LINE__);
629 break;
630
631 case PS3_DEV_TYPE_STOR_ROM:
632 result = ps3_setup_storage_dev(repo, PS3_MATCH_ID_STOR_ROM);
633 if (result)
634 pr_debug("%s:%u ps3_setup_storage_dev failed\n",
635 __func__, __LINE__);
636 break;
637
638 case PS3_DEV_TYPE_STOR_FLASH:
639 result = ps3_setup_storage_dev(repo, PS3_MATCH_ID_STOR_FLASH);
640 if (result)
641 pr_debug("%s:%u ps3_setup_storage_dev failed\n",
642 __func__, __LINE__);
643 break;
644
645 default:
646 result = 0;
647 pr_debug("%s:%u: unsupported dev_type %u\n", __func__, __LINE__,
648 repo->dev_type);
649 }
650
651 return result;
652}
653
654/**
655 * ps3_probe_thread - Background repository probing at system startup.
656 *
657 * This implementation only supports background probing on a single bus.
658 */
659
660static int ps3_probe_thread(void *data)
661{
662 struct ps3_repository_device *repo = data;
663 int result;
664 unsigned int ms = 250;
665
666 pr_debug(" -> %s:%u: kthread started\n", __func__, __LINE__);
667
668 do {
669 try_to_freeze();
670
671 pr_debug("%s:%u: probing...\n", __func__, __LINE__);
672
673 do {
674 result = ps3_repository_find_device(repo);
675
676 if (result == -ENODEV)
677 pr_debug("%s:%u: nothing new\n", __func__,
678 __LINE__);
679 else if (result)
680 pr_debug("%s:%u: find device error.\n",
681 __func__, __LINE__);
682 else {
683 pr_debug("%s:%u: found device\n", __func__,
684 __LINE__);
685 ps3_register_repository_device(repo);
686 ps3_repository_bump_device(repo);
687 ms = 250;
688 }
689 } while (!result);
690
691 pr_debug("%s:%u: ms %u\n", __func__, __LINE__, ms);
692
693 if ( ms > 60000)
694 break;
695
696 msleep_interruptible(ms);
697
698 /* An exponential backoff. */
699 ms <<= 1;
700
701 } while (!kthread_should_stop());
702
703 pr_debug(" <- %s:%u: kthread finished\n", __func__, __LINE__);
704
705 return 0;
706}
707
708/**
709 * ps3_start_probe_thread - Starts the background probe thread.
710 *
711 */
712
713static int __init ps3_start_probe_thread(enum ps3_bus_type bus_type)
714{
715 int result;
716 struct task_struct *task;
717 static struct ps3_repository_device repo; /* must be static */
718
719 pr_debug(" -> %s:%d\n", __func__, __LINE__);
720
721 memset(&repo, 0, sizeof(repo));
722
723 repo.bus_type = bus_type;
724
725 result = ps3_repository_find_bus(repo.bus_type, 0, &repo.bus_index);
726
727 if (result) {
728 printk(KERN_ERR "%s: Cannot find bus (%d)\n", __func__, result);
729 return -ENODEV;
730 }
731
732 result = ps3_repository_read_bus_id(repo.bus_index, &repo.bus_id);
733
734 if (result) {
735 printk(KERN_ERR "%s: read_bus_id failed %d\n", __func__,
736 result);
737 return -ENODEV;
738 }
739
740 task = kthread_run(ps3_probe_thread, &repo, "ps3-probe-%u", bus_type);
741
742 if (IS_ERR(task)) {
743 result = PTR_ERR(task);
744 printk(KERN_ERR "%s: kthread_run failed %d\n", __func__,
745 result);
746 return result;
747 }
748
749 pr_debug(" <- %s:%d\n", __func__, __LINE__);
750 return 0;
751}
752
753/**
754 * ps3_register_devices - Probe the system and register devices found.
755 *
756 * A device_initcall() routine.
757 */
758
759static int __init ps3_register_devices(void)
760{
761 int result;
762
763 if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
764 return -ENODEV;
765
766 pr_debug(" -> %s:%d\n", __func__, __LINE__);
767
768 /* ps3_repository_dump_bus_info(); */
769
770 result = ps3_start_probe_thread(PS3_BUS_TYPE_STORAGE);
771
772 ps3_register_vuart_devices();
773
774 ps3_register_graphics_devices();
775
776 ps3_repository_find_devices(PS3_BUS_TYPE_SB,
777 ps3_register_repository_device);
778
779 ps3_register_sound_devices();
780
781 pr_debug(" <- %s:%d\n", __func__, __LINE__);
782 return 0;
783}
784
785device_initcall(ps3_register_devices);
diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc/platforms/ps3/htab.c
index a1409e450c70..5d2e176a1b18 100644
--- a/arch/powerpc/platforms/ps3/htab.c
+++ b/arch/powerpc/platforms/ps3/htab.c
@@ -29,12 +29,12 @@
29#include "platform.h" 29#include "platform.h"
30 30
31#if defined(DEBUG) 31#if defined(DEBUG)
32#define DBG(fmt...) udbg_printf(fmt) 32#define DBG udbg_printf
33#else 33#else
34#define DBG(fmt...) do{if(0)printk(fmt);}while(0) 34#define DBG pr_debug
35#endif 35#endif
36 36
37static hpte_t *htab; 37static struct hash_pte *htab;
38static unsigned long htab_addr; 38static unsigned long htab_addr;
39static unsigned char *bolttab; 39static unsigned char *bolttab;
40static unsigned char *inusetab; 40static unsigned char *inusetab;
@@ -44,8 +44,8 @@ static DEFINE_SPINLOCK(ps3_bolttab_lock);
44#define debug_dump_hpte(_a, _b, _c, _d, _e, _f, _g) \ 44#define debug_dump_hpte(_a, _b, _c, _d, _e, _f, _g) \
45 _debug_dump_hpte(_a, _b, _c, _d, _e, _f, _g, __func__, __LINE__) 45 _debug_dump_hpte(_a, _b, _c, _d, _e, _f, _g, __func__, __LINE__)
46static void _debug_dump_hpte(unsigned long pa, unsigned long va, 46static void _debug_dump_hpte(unsigned long pa, unsigned long va,
47 unsigned long group, unsigned long bitmap, hpte_t lhpte, int psize, 47 unsigned long group, unsigned long bitmap, struct hash_pte lhpte,
48 unsigned long slot, const char* func, int line) 48 int psize, unsigned long slot, const char* func, int line)
49{ 49{
50 DBG("%s:%d: pa = %lxh\n", func, line, pa); 50 DBG("%s:%d: pa = %lxh\n", func, line, pa);
51 DBG("%s:%d: lpar = %lxh\n", func, line, 51 DBG("%s:%d: lpar = %lxh\n", func, line,
@@ -63,7 +63,7 @@ static long ps3_hpte_insert(unsigned long hpte_group, unsigned long va,
63 unsigned long pa, unsigned long rflags, unsigned long vflags, int psize) 63 unsigned long pa, unsigned long rflags, unsigned long vflags, int psize)
64{ 64{
65 unsigned long slot; 65 unsigned long slot;
66 hpte_t lhpte; 66 struct hash_pte lhpte;
67 int secondary = 0; 67 int secondary = 0;
68 unsigned long result; 68 unsigned long result;
69 unsigned long bitmap; 69 unsigned long bitmap;
@@ -234,10 +234,17 @@ static void ps3_hpte_invalidate(unsigned long slot, unsigned long va,
234 234
235static void ps3_hpte_clear(void) 235static void ps3_hpte_clear(void)
236{ 236{
237 /* Make sure to clean up the frame buffer device first */ 237 int result;
238 ps3fb_cleanup();
239 238
240 lv1_unmap_htab(htab_addr); 239 DBG(" -> %s:%d\n", __func__, __LINE__);
240
241 result = lv1_unmap_htab(htab_addr);
242 BUG_ON(result);
243
244 ps3_mm_shutdown();
245 ps3_mm_vas_destroy();
246
247 DBG(" <- %s:%d\n", __func__, __LINE__);
241} 248}
242 249
243void __init ps3_hpte_init(unsigned long htab_size) 250void __init ps3_hpte_init(unsigned long htab_size)
@@ -255,7 +262,7 @@ void __init ps3_hpte_init(unsigned long htab_size)
255 262
256 ppc64_pft_size = __ilog2(htab_size); 263 ppc64_pft_size = __ilog2(htab_size);
257 264
258 bitmap_size = htab_size / sizeof(hpte_t) / 8; 265 bitmap_size = htab_size / sizeof(struct hash_pte) / 8;
259 266
260 bolttab = __va(lmb_alloc(bitmap_size, 1)); 267 bolttab = __va(lmb_alloc(bitmap_size, 1));
261 inusetab = __va(lmb_alloc(bitmap_size, 1)); 268 inusetab = __va(lmb_alloc(bitmap_size, 1));
@@ -273,8 +280,8 @@ void __init ps3_map_htab(void)
273 280
274 result = lv1_map_htab(0, &htab_addr); 281 result = lv1_map_htab(0, &htab_addr);
275 282
276 htab = (hpte_t *)__ioremap(htab_addr, htab_size, 283 htab = (__force struct hash_pte *)ioremap_flags(htab_addr, htab_size,
277 pgprot_val(PAGE_READONLY_X)); 284 pgprot_val(PAGE_READONLY_X));
278 285
279 DBG("%s:%d: lpar %016lxh, virt %016lxh\n", __func__, __LINE__, 286 DBG("%s:%d: lpar %016lxh, virt %016lxh\n", __func__, __LINE__,
280 htab_addr, (unsigned long)htab); 287 htab_addr, (unsigned long)htab);
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c
index 9da82c266ba9..67e32ec9b37e 100644
--- a/arch/powerpc/platforms/ps3/interrupt.c
+++ b/arch/powerpc/platforms/ps3/interrupt.c
@@ -25,13 +25,14 @@
25#include <asm/machdep.h> 25#include <asm/machdep.h>
26#include <asm/udbg.h> 26#include <asm/udbg.h>
27#include <asm/lv1call.h> 27#include <asm/lv1call.h>
28#include <asm/smp.h>
28 29
29#include "platform.h" 30#include "platform.h"
30 31
31#if defined(DEBUG) 32#if defined(DEBUG)
32#define DBG(fmt...) udbg_printf(fmt) 33#define DBG udbg_printf
33#else 34#else
34#define DBG(fmt...) do{if(0)printk(fmt);}while(0) 35#define DBG pr_debug
35#endif 36#endif
36 37
37/** 38/**
@@ -77,19 +78,85 @@ struct ps3_bmp {
77/** 78/**
78 * struct ps3_private - a per cpu data structure 79 * struct ps3_private - a per cpu data structure
79 * @bmp: ps3_bmp structure 80 * @bmp: ps3_bmp structure
80 * @node: HV logical_ppe_id 81 * @ppe_id: HV logical_ppe_id
81 * @cpu: HV thread_id 82 * @thread_id: HV thread_id
82 */ 83 */
83 84
84struct ps3_private { 85struct ps3_private {
85 struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN))); 86 struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN)));
86 u64 node; 87 u64 ppe_id;
87 unsigned int cpu; 88 u64 thread_id;
88}; 89};
89 90
90static DEFINE_PER_CPU(struct ps3_private, ps3_private); 91static DEFINE_PER_CPU(struct ps3_private, ps3_private);
91 92
92/** 93/**
94 * ps3_chip_mask - Set an interrupt mask bit in ps3_bmp.
95 * @virq: The assigned Linux virq.
96 *
97 * Sets ps3_bmp.mask and calls lv1_did_update_interrupt_mask().
98 */
99
100static void ps3_chip_mask(unsigned int virq)
101{
102 struct ps3_private *pd = get_irq_chip_data(virq);
103 unsigned long flags;
104
105 pr_debug("%s:%d: thread_id %lu, virq %d\n", __func__, __LINE__,
106 pd->thread_id, virq);
107
108 local_irq_save(flags);
109 clear_bit(63 - virq, &pd->bmp.mask);
110 lv1_did_update_interrupt_mask(pd->ppe_id, pd->thread_id);
111 local_irq_restore(flags);
112}
113
114/**
115 * ps3_chip_unmask - Clear an interrupt mask bit in ps3_bmp.
116 * @virq: The assigned Linux virq.
117 *
118 * Clears ps3_bmp.mask and calls lv1_did_update_interrupt_mask().
119 */
120
121static void ps3_chip_unmask(unsigned int virq)
122{
123 struct ps3_private *pd = get_irq_chip_data(virq);
124 unsigned long flags;
125
126 pr_debug("%s:%d: thread_id %lu, virq %d\n", __func__, __LINE__,
127 pd->thread_id, virq);
128
129 local_irq_save(flags);
130 set_bit(63 - virq, &pd->bmp.mask);
131 lv1_did_update_interrupt_mask(pd->ppe_id, pd->thread_id);
132 local_irq_restore(flags);
133}
134
135/**
136 * ps3_chip_eoi - HV end-of-interrupt.
137 * @virq: The assigned Linux virq.
138 *
139 * Calls lv1_end_of_interrupt_ext().
140 */
141
142static void ps3_chip_eoi(unsigned int virq)
143{
144 const struct ps3_private *pd = get_irq_chip_data(virq);
145 lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, virq);
146}
147
148/**
149 * ps3_irq_chip - Represents the ps3_bmp as a Linux struct irq_chip.
150 */
151
152static struct irq_chip ps3_irq_chip = {
153 .typename = "ps3",
154 .mask = ps3_chip_mask,
155 .unmask = ps3_chip_unmask,
156 .eoi = ps3_chip_eoi,
157};
158
159/**
93 * ps3_virq_setup - virq related setup. 160 * ps3_virq_setup - virq related setup.
94 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be 161 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be
95 * serviced on. 162 * serviced on.
@@ -133,6 +200,8 @@ int ps3_virq_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
133 goto fail_set; 200 goto fail_set;
134 } 201 }
135 202
203 ps3_chip_mask(*virq);
204
136 return result; 205 return result;
137 206
138fail_set: 207fail_set:
@@ -152,8 +221,8 @@ int ps3_virq_destroy(unsigned int virq)
152{ 221{
153 const struct ps3_private *pd = get_irq_chip_data(virq); 222 const struct ps3_private *pd = get_irq_chip_data(virq);
154 223
155 pr_debug("%s:%d: node %lu, cpu %d, virq %u\n", __func__, __LINE__, 224 pr_debug("%s:%d: ppe_id %lu, thread_id %lu, virq %u\n", __func__,
156 pd->node, pd->cpu, virq); 225 __LINE__, pd->ppe_id, pd->thread_id, virq);
157 226
158 set_irq_chip_data(virq, NULL); 227 set_irq_chip_data(virq, NULL);
159 irq_dispose_mapping(virq); 228 irq_dispose_mapping(virq);
@@ -189,7 +258,8 @@ int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
189 258
190 /* Binds outlet to cpu + virq. */ 259 /* Binds outlet to cpu + virq. */
191 260
192 result = lv1_connect_irq_plug_ext(pd->node, pd->cpu, *virq, outlet, 0); 261 result = lv1_connect_irq_plug_ext(pd->ppe_id, pd->thread_id, *virq,
262 outlet, 0);
193 263
194 if (result) { 264 if (result) {
195 pr_info("%s:%d: lv1_connect_irq_plug_ext failed: %s\n", 265 pr_info("%s:%d: lv1_connect_irq_plug_ext failed: %s\n",
@@ -221,10 +291,12 @@ int ps3_irq_plug_destroy(unsigned int virq)
221 int result; 291 int result;
222 const struct ps3_private *pd = get_irq_chip_data(virq); 292 const struct ps3_private *pd = get_irq_chip_data(virq);
223 293
224 pr_debug("%s:%d: node %lu, cpu %d, virq %u\n", __func__, __LINE__, 294 pr_debug("%s:%d: ppe_id %lu, thread_id %lu, virq %u\n", __func__,
225 pd->node, pd->cpu, virq); 295 __LINE__, pd->ppe_id, pd->thread_id, virq);
296
297 ps3_chip_mask(virq);
226 298
227 result = lv1_disconnect_irq_plug_ext(pd->node, pd->cpu, virq); 299 result = lv1_disconnect_irq_plug_ext(pd->ppe_id, pd->thread_id, virq);
228 300
229 if (result) 301 if (result)
230 pr_info("%s:%d: lv1_disconnect_irq_plug_ext failed: %s\n", 302 pr_info("%s:%d: lv1_disconnect_irq_plug_ext failed: %s\n",
@@ -281,7 +353,9 @@ int ps3_event_receive_port_destroy(unsigned int virq)
281{ 353{
282 int result; 354 int result;
283 355
284 pr_debug(" -> %s:%d virq: %u\n", __func__, __LINE__, virq); 356 pr_debug(" -> %s:%d virq %u\n", __func__, __LINE__, virq);
357
358 ps3_chip_mask(virq);
285 359
286 result = lv1_destruct_event_receive_port(virq_to_hw(virq)); 360 result = lv1_destruct_event_receive_port(virq_to_hw(virq));
287 361
@@ -289,17 +363,14 @@ int ps3_event_receive_port_destroy(unsigned int virq)
289 pr_debug("%s:%d: lv1_destruct_event_receive_port failed: %s\n", 363 pr_debug("%s:%d: lv1_destruct_event_receive_port failed: %s\n",
290 __func__, __LINE__, ps3_result(result)); 364 __func__, __LINE__, ps3_result(result));
291 365
292 /* lv1_destruct_event_receive_port() destroys the IRQ plug, 366 /*
293 * so don't call ps3_irq_plug_destroy() here. 367 * Don't call ps3_virq_destroy() here since ps3_smp_cleanup_cpu()
368 * calls from interrupt context (smp_call_function) when kexecing.
294 */ 369 */
295 370
296 result = ps3_virq_destroy(virq);
297 BUG_ON(result);
298
299 pr_debug(" <- %s:%d\n", __func__, __LINE__); 371 pr_debug(" <- %s:%d\n", __func__, __LINE__);
300 return result; 372 return result;
301} 373}
302EXPORT_SYMBOL_GPL(ps3_event_receive_port_destroy);
303 374
304int ps3_send_event_locally(unsigned int virq) 375int ps3_send_event_locally(unsigned int virq)
305{ 376{
@@ -310,17 +381,15 @@ int ps3_send_event_locally(unsigned int virq)
310 * ps3_sb_event_receive_port_setup - Setup a system bus event receive port. 381 * ps3_sb_event_receive_port_setup - Setup a system bus event receive port.
311 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be 382 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be
312 * serviced on. 383 * serviced on.
313 * @did: The HV device identifier read from the system repository. 384 * @dev: The system bus device instance.
314 * @interrupt_id: The device interrupt id read from the system repository.
315 * @virq: The assigned Linux virq. 385 * @virq: The assigned Linux virq.
316 * 386 *
317 * An event irq represents a virtual device interrupt. The interrupt_id 387 * An event irq represents a virtual device interrupt. The interrupt_id
318 * coresponds to the software interrupt number. 388 * coresponds to the software interrupt number.
319 */ 389 */
320 390
321int ps3_sb_event_receive_port_setup(enum ps3_cpu_binding cpu, 391int ps3_sb_event_receive_port_setup(struct ps3_system_bus_device *dev,
322 const struct ps3_device_id *did, unsigned int interrupt_id, 392 enum ps3_cpu_binding cpu, unsigned int *virq)
323 unsigned int *virq)
324{ 393{
325 /* this should go in system-bus.c */ 394 /* this should go in system-bus.c */
326 395
@@ -331,8 +400,8 @@ int ps3_sb_event_receive_port_setup(enum ps3_cpu_binding cpu,
331 if (result) 400 if (result)
332 return result; 401 return result;
333 402
334 result = lv1_connect_interrupt_event_receive_port(did->bus_id, 403 result = lv1_connect_interrupt_event_receive_port(dev->bus_id,
335 did->dev_id, virq_to_hw(*virq), interrupt_id); 404 dev->dev_id, virq_to_hw(*virq), dev->interrupt_id);
336 405
337 if (result) { 406 if (result) {
338 pr_debug("%s:%d: lv1_connect_interrupt_event_receive_port" 407 pr_debug("%s:%d: lv1_connect_interrupt_event_receive_port"
@@ -344,24 +413,24 @@ int ps3_sb_event_receive_port_setup(enum ps3_cpu_binding cpu,
344 } 413 }
345 414
346 pr_debug("%s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__, 415 pr_debug("%s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__,
347 interrupt_id, *virq); 416 dev->interrupt_id, *virq);
348 417
349 return 0; 418 return 0;
350} 419}
351EXPORT_SYMBOL(ps3_sb_event_receive_port_setup); 420EXPORT_SYMBOL(ps3_sb_event_receive_port_setup);
352 421
353int ps3_sb_event_receive_port_destroy(const struct ps3_device_id *did, 422int ps3_sb_event_receive_port_destroy(struct ps3_system_bus_device *dev,
354 unsigned int interrupt_id, unsigned int virq) 423 unsigned int virq)
355{ 424{
356 /* this should go in system-bus.c */ 425 /* this should go in system-bus.c */
357 426
358 int result; 427 int result;
359 428
360 pr_debug(" -> %s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__, 429 pr_debug(" -> %s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__,
361 interrupt_id, virq); 430 dev->interrupt_id, virq);
362 431
363 result = lv1_disconnect_interrupt_event_receive_port(did->bus_id, 432 result = lv1_disconnect_interrupt_event_receive_port(dev->bus_id,
364 did->dev_id, virq_to_hw(virq), interrupt_id); 433 dev->dev_id, virq_to_hw(virq), dev->interrupt_id);
365 434
366 if (result) 435 if (result)
367 pr_debug("%s:%d: lv1_disconnect_interrupt_event_receive_port" 436 pr_debug("%s:%d: lv1_disconnect_interrupt_event_receive_port"
@@ -371,6 +440,14 @@ int ps3_sb_event_receive_port_destroy(const struct ps3_device_id *did,
371 result = ps3_event_receive_port_destroy(virq); 440 result = ps3_event_receive_port_destroy(virq);
372 BUG_ON(result); 441 BUG_ON(result);
373 442
443 /*
444 * ps3_event_receive_port_destroy() destroys the IRQ plug,
445 * so don't call ps3_irq_plug_destroy() here.
446 */
447
448 result = ps3_virq_destroy(virq);
449 BUG_ON(result);
450
374 pr_debug(" <- %s:%d\n", __func__, __LINE__); 451 pr_debug(" <- %s:%d\n", __func__, __LINE__);
375 return result; 452 return result;
376} 453}
@@ -411,16 +488,24 @@ EXPORT_SYMBOL_GPL(ps3_io_irq_setup);
411int ps3_io_irq_destroy(unsigned int virq) 488int ps3_io_irq_destroy(unsigned int virq)
412{ 489{
413 int result; 490 int result;
491 unsigned long outlet = virq_to_hw(virq);
414 492
415 result = lv1_destruct_io_irq_outlet(virq_to_hw(virq)); 493 ps3_chip_mask(virq);
416 494
417 if (result) 495 /*
418 pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n", 496 * lv1_destruct_io_irq_outlet() will destroy the IRQ plug,
419 __func__, __LINE__, ps3_result(result)); 497 * so call ps3_irq_plug_destroy() first.
498 */
420 499
421 result = ps3_irq_plug_destroy(virq); 500 result = ps3_irq_plug_destroy(virq);
422 BUG_ON(result); 501 BUG_ON(result);
423 502
503 result = lv1_destruct_io_irq_outlet(outlet);
504
505 if (result)
506 pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n",
507 __func__, __LINE__, ps3_result(result));
508
424 return result; 509 return result;
425} 510}
426EXPORT_SYMBOL_GPL(ps3_io_irq_destroy); 511EXPORT_SYMBOL_GPL(ps3_io_irq_destroy);
@@ -460,11 +545,13 @@ int ps3_vuart_irq_setup(enum ps3_cpu_binding cpu, void* virt_addr_bmp,
460 545
461 return result; 546 return result;
462} 547}
548EXPORT_SYMBOL_GPL(ps3_vuart_irq_setup);
463 549
464int ps3_vuart_irq_destroy(unsigned int virq) 550int ps3_vuart_irq_destroy(unsigned int virq)
465{ 551{
466 int result; 552 int result;
467 553
554 ps3_chip_mask(virq);
468 result = lv1_deconfigure_virtual_uart_irq(); 555 result = lv1_deconfigure_virtual_uart_irq();
469 556
470 if (result) { 557 if (result) {
@@ -478,6 +565,7 @@ int ps3_vuart_irq_destroy(unsigned int virq)
478 565
479 return result; 566 return result;
480} 567}
568EXPORT_SYMBOL_GPL(ps3_vuart_irq_destroy);
481 569
482/** 570/**
483 * ps3_spe_irq_setup - Setup an spe virq. 571 * ps3_spe_irq_setup - Setup an spe virq.
@@ -513,9 +601,14 @@ int ps3_spe_irq_setup(enum ps3_cpu_binding cpu, unsigned long spe_id,
513 601
514int ps3_spe_irq_destroy(unsigned int virq) 602int ps3_spe_irq_destroy(unsigned int virq)
515{ 603{
516 int result = ps3_irq_plug_destroy(virq); 604 int result;
605
606 ps3_chip_mask(virq);
607
608 result = ps3_irq_plug_destroy(virq);
517 BUG_ON(result); 609 BUG_ON(result);
518 return 0; 610
611 return result;
519} 612}
520 613
521 614
@@ -532,7 +625,7 @@ static void _dump_64_bmp(const char *header, const u64 *p, unsigned cpu,
532 *p & 0xffff); 625 *p & 0xffff);
533} 626}
534 627
535static void __attribute__ ((unused)) _dump_256_bmp(const char *header, 628static void __maybe_unused _dump_256_bmp(const char *header,
536 const u64 *p, unsigned cpu, const char* func, int line) 629 const u64 *p, unsigned cpu, const char* func, int line)
537{ 630{
538 pr_debug("%s:%d: %s %u {%016lx:%016lx:%016lx:%016lx}\n", 631 pr_debug("%s:%d: %s %u {%016lx:%016lx:%016lx:%016lx}\n",
@@ -545,86 +638,25 @@ static void _dump_bmp(struct ps3_private* pd, const char* func, int line)
545 unsigned long flags; 638 unsigned long flags;
546 639
547 spin_lock_irqsave(&pd->bmp.lock, flags); 640 spin_lock_irqsave(&pd->bmp.lock, flags);
548 _dump_64_bmp("stat", &pd->bmp.status, pd->cpu, func, line); 641 _dump_64_bmp("stat", &pd->bmp.status, pd->thread_id, func, line);
549 _dump_64_bmp("mask", &pd->bmp.mask, pd->cpu, func, line); 642 _dump_64_bmp("mask", &pd->bmp.mask, pd->thread_id, func, line);
550 spin_unlock_irqrestore(&pd->bmp.lock, flags); 643 spin_unlock_irqrestore(&pd->bmp.lock, flags);
551} 644}
552 645
553#define dump_mask(_x) _dump_mask(_x, __func__, __LINE__) 646#define dump_mask(_x) _dump_mask(_x, __func__, __LINE__)
554static void __attribute__ ((unused)) _dump_mask(struct ps3_private* pd, 647static void __maybe_unused _dump_mask(struct ps3_private *pd,
555 const char* func, int line) 648 const char* func, int line)
556{ 649{
557 unsigned long flags; 650 unsigned long flags;
558 651
559 spin_lock_irqsave(&pd->bmp.lock, flags); 652 spin_lock_irqsave(&pd->bmp.lock, flags);
560 _dump_64_bmp("mask", &pd->bmp.mask, pd->cpu, func, line); 653 _dump_64_bmp("mask", &pd->bmp.mask, pd->thread_id, func, line);
561 spin_unlock_irqrestore(&pd->bmp.lock, flags); 654 spin_unlock_irqrestore(&pd->bmp.lock, flags);
562} 655}
563#else 656#else
564static void dump_bmp(struct ps3_private* pd) {}; 657static void dump_bmp(struct ps3_private* pd) {};
565#endif /* defined(DEBUG) */ 658#endif /* defined(DEBUG) */
566 659
567static void ps3_chip_mask(unsigned int virq)
568{
569 struct ps3_private *pd = get_irq_chip_data(virq);
570 u64 bit = 0x8000000000000000UL >> virq;
571 u64 *p = &pd->bmp.mask;
572 u64 old;
573 unsigned long flags;
574
575 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq);
576
577 local_irq_save(flags);
578 asm volatile(
579 "1: ldarx %0,0,%3\n"
580 "andc %0,%0,%2\n"
581 "stdcx. %0,0,%3\n"
582 "bne- 1b"
583 : "=&r" (old), "+m" (*p)
584 : "r" (bit), "r" (p)
585 : "cc" );
586
587 lv1_did_update_interrupt_mask(pd->node, pd->cpu);
588 local_irq_restore(flags);
589}
590
591static void ps3_chip_unmask(unsigned int virq)
592{
593 struct ps3_private *pd = get_irq_chip_data(virq);
594 u64 bit = 0x8000000000000000UL >> virq;
595 u64 *p = &pd->bmp.mask;
596 u64 old;
597 unsigned long flags;
598
599 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq);
600
601 local_irq_save(flags);
602 asm volatile(
603 "1: ldarx %0,0,%3\n"
604 "or %0,%0,%2\n"
605 "stdcx. %0,0,%3\n"
606 "bne- 1b"
607 : "=&r" (old), "+m" (*p)
608 : "r" (bit), "r" (p)
609 : "cc" );
610
611 lv1_did_update_interrupt_mask(pd->node, pd->cpu);
612 local_irq_restore(flags);
613}
614
615static void ps3_chip_eoi(unsigned int virq)
616{
617 const struct ps3_private *pd = get_irq_chip_data(virq);
618 lv1_end_of_interrupt_ext(pd->node, pd->cpu, virq);
619}
620
621static struct irq_chip irq_chip = {
622 .typename = "ps3",
623 .mask = ps3_chip_mask,
624 .unmask = ps3_chip_unmask,
625 .eoi = ps3_chip_eoi,
626};
627
628static void ps3_host_unmap(struct irq_host *h, unsigned int virq) 660static void ps3_host_unmap(struct irq_host *h, unsigned int virq)
629{ 661{
630 set_irq_chip_data(virq, NULL); 662 set_irq_chip_data(virq, NULL);
@@ -636,7 +668,7 @@ static int ps3_host_map(struct irq_host *h, unsigned int virq,
636 pr_debug("%s:%d: hwirq %lu, virq %u\n", __func__, __LINE__, hwirq, 668 pr_debug("%s:%d: hwirq %lu, virq %u\n", __func__, __LINE__, hwirq,
637 virq); 669 virq);
638 670
639 set_irq_chip_and_handler(virq, &irq_chip, handle_fasteoi_irq); 671 set_irq_chip_and_handler(virq, &ps3_irq_chip, handle_fasteoi_irq);
640 672
641 return 0; 673 return 0;
642} 674}
@@ -656,7 +688,7 @@ void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq)
656 cpu, virq, pd->bmp.ipi_debug_brk_mask); 688 cpu, virq, pd->bmp.ipi_debug_brk_mask);
657} 689}
658 690
659unsigned int ps3_get_irq(void) 691static unsigned int ps3_get_irq(void)
660{ 692{
661 struct ps3_private *pd = &__get_cpu_var(ps3_private); 693 struct ps3_private *pd = &__get_cpu_var(ps3_private);
662 u64 x = (pd->bmp.status & pd->bmp.mask); 694 u64 x = (pd->bmp.status & pd->bmp.mask);
@@ -671,8 +703,8 @@ unsigned int ps3_get_irq(void)
671 plug &= 0x3f; 703 plug &= 0x3f;
672 704
673 if (unlikely(plug) == NO_IRQ) { 705 if (unlikely(plug) == NO_IRQ) {
674 pr_debug("%s:%d: no plug found: cpu %u\n", __func__, __LINE__, 706 pr_debug("%s:%d: no plug found: thread_id %lu\n", __func__,
675 pd->cpu); 707 __LINE__, pd->thread_id);
676 dump_bmp(&per_cpu(ps3_private, 0)); 708 dump_bmp(&per_cpu(ps3_private, 0));
677 dump_bmp(&per_cpu(ps3_private, 1)); 709 dump_bmp(&per_cpu(ps3_private, 1));
678 return NO_IRQ; 710 return NO_IRQ;
@@ -702,16 +734,16 @@ void __init ps3_init_IRQ(void)
702 for_each_possible_cpu(cpu) { 734 for_each_possible_cpu(cpu) {
703 struct ps3_private *pd = &per_cpu(ps3_private, cpu); 735 struct ps3_private *pd = &per_cpu(ps3_private, cpu);
704 736
705 lv1_get_logical_ppe_id(&pd->node); 737 lv1_get_logical_ppe_id(&pd->ppe_id);
706 pd->cpu = get_hard_smp_processor_id(cpu); 738 pd->thread_id = get_hard_smp_processor_id(cpu);
707 spin_lock_init(&pd->bmp.lock); 739 spin_lock_init(&pd->bmp.lock);
708 740
709 pr_debug("%s:%d: node %lu, cpu %d, bmp %lxh\n", __func__, 741 pr_debug("%s:%d: ppe_id %lu, thread_id %lu, bmp %lxh\n",
710 __LINE__, pd->node, pd->cpu, 742 __func__, __LINE__, pd->ppe_id, pd->thread_id,
711 ps3_mm_phys_to_lpar(__pa(&pd->bmp))); 743 ps3_mm_phys_to_lpar(__pa(&pd->bmp)));
712 744
713 result = lv1_configure_irq_state_bitmap(pd->node, pd->cpu, 745 result = lv1_configure_irq_state_bitmap(pd->ppe_id,
714 ps3_mm_phys_to_lpar(__pa(&pd->bmp))); 746 pd->thread_id, ps3_mm_phys_to_lpar(__pa(&pd->bmp)));
715 747
716 if (result) 748 if (result)
717 pr_debug("%s:%d: lv1_configure_irq_state_bitmap failed:" 749 pr_debug("%s:%d: lv1_configure_irq_state_bitmap failed:"
@@ -721,3 +753,16 @@ void __init ps3_init_IRQ(void)
721 753
722 ppc_md.get_irq = ps3_get_irq; 754 ppc_md.get_irq = ps3_get_irq;
723} 755}
756
757void ps3_shutdown_IRQ(int cpu)
758{
759 int result;
760 u64 ppe_id;
761 u64 thread_id = get_hard_smp_processor_id(cpu);
762
763 lv1_get_logical_ppe_id(&ppe_id);
764 result = lv1_configure_irq_state_bitmap(ppe_id, thread_id, 0);
765
766 DBG("%s:%d: lv1_configure_irq_state_bitmap (%lu:%lu/%d) %s\n", __func__,
767 __LINE__, ppe_id, thread_id, cpu, ps3_result(result));
768}
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index f8a3e206c584..7bb3e1620974 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -30,9 +30,9 @@
30#include "platform.h" 30#include "platform.h"
31 31
32#if defined(DEBUG) 32#if defined(DEBUG)
33#define DBG(fmt...) udbg_printf(fmt) 33#define DBG udbg_printf
34#else 34#else
35#define DBG(fmt...) do{if(0)printk(fmt);}while(0) 35#define DBG pr_debug
36#endif 36#endif
37 37
38enum { 38enum {
@@ -115,7 +115,8 @@ struct map {
115}; 115};
116 116
117#define debug_dump_map(x) _debug_dump_map(x, __func__, __LINE__) 117#define debug_dump_map(x) _debug_dump_map(x, __func__, __LINE__)
118static void _debug_dump_map(const struct map* m, const char* func, int line) 118static void __maybe_unused _debug_dump_map(const struct map *m,
119 const char *func, int line)
119{ 120{
120 DBG("%s:%d: map.total = %lxh\n", func, line, m->total); 121 DBG("%s:%d: map.total = %lxh\n", func, line, m->total);
121 DBG("%s:%d: map.rm.size = %lxh\n", func, line, m->rm.size); 122 DBG("%s:%d: map.rm.size = %lxh\n", func, line, m->rm.size);
@@ -212,9 +213,15 @@ fail:
212 213
213void ps3_mm_vas_destroy(void) 214void ps3_mm_vas_destroy(void)
214{ 215{
216 int result;
217
218 DBG("%s:%d: map.vas_id = %lu\n", __func__, __LINE__, map.vas_id);
219
215 if (map.vas_id) { 220 if (map.vas_id) {
216 lv1_select_virtual_address_space(0); 221 result = lv1_select_virtual_address_space(0);
217 lv1_destruct_virtual_address_space(map.vas_id); 222 BUG_ON(result);
223 result = lv1_destruct_virtual_address_space(map.vas_id);
224 BUG_ON(result);
218 map.vas_id = 0; 225 map.vas_id = 0;
219 } 226 }
220} 227}
@@ -232,7 +239,7 @@ void ps3_mm_vas_destroy(void)
232 * @size is rounded down to a multiple of the vas large page size. 239 * @size is rounded down to a multiple of the vas large page size.
233 */ 240 */
234 241
235int ps3_mm_region_create(struct mem_region *r, unsigned long size) 242static int ps3_mm_region_create(struct mem_region *r, unsigned long size)
236{ 243{
237 int result; 244 int result;
238 unsigned long muid; 245 unsigned long muid;
@@ -273,10 +280,14 @@ zero_region:
273 * @r: pointer to struct mem_region 280 * @r: pointer to struct mem_region
274 */ 281 */
275 282
276void ps3_mm_region_destroy(struct mem_region *r) 283static void ps3_mm_region_destroy(struct mem_region *r)
277{ 284{
285 int result;
286
287 DBG("%s:%d: r->base = %lxh\n", __func__, __LINE__, r->base);
278 if (r->base) { 288 if (r->base) {
279 lv1_release_memory(r->base); 289 result = lv1_release_memory(r->base);
290 BUG_ON(result);
280 r->size = r->base = r->offset = 0; 291 r->size = r->base = r->offset = 0;
281 map.total = map.rm.size; 292 map.total = map.rm.size;
282 } 293 }
@@ -329,31 +340,34 @@ core_initcall(ps3_mm_add_memory);
329/*============================================================================*/ 340/*============================================================================*/
330 341
331/** 342/**
332 * dma_lpar_to_bus - Translate an lpar address to ioc mapped bus address. 343 * dma_sb_lpar_to_bus - Translate an lpar address to ioc mapped bus address.
333 * @r: pointer to dma region structure 344 * @r: pointer to dma region structure
334 * @lpar_addr: HV lpar address 345 * @lpar_addr: HV lpar address
335 */ 346 */
336 347
337static unsigned long dma_lpar_to_bus(struct ps3_dma_region *r, 348static unsigned long dma_sb_lpar_to_bus(struct ps3_dma_region *r,
338 unsigned long lpar_addr) 349 unsigned long lpar_addr)
339{ 350{
340 BUG_ON(lpar_addr >= map.r1.base + map.r1.size); 351 if (lpar_addr >= map.rm.size)
341 return r->bus_addr + (lpar_addr <= map.rm.size ? lpar_addr 352 lpar_addr -= map.r1.offset;
342 : lpar_addr - map.r1.offset); 353 BUG_ON(lpar_addr < r->offset);
354 BUG_ON(lpar_addr >= r->offset + r->len);
355 return r->bus_addr + lpar_addr - r->offset;
343} 356}
344 357
345#define dma_dump_region(_a) _dma_dump_region(_a, __func__, __LINE__) 358#define dma_dump_region(_a) _dma_dump_region(_a, __func__, __LINE__)
346static void _dma_dump_region(const struct ps3_dma_region *r, const char* func, 359static void __maybe_unused _dma_dump_region(const struct ps3_dma_region *r,
347 int line) 360 const char *func, int line)
348{ 361{
349 DBG("%s:%d: dev %u:%u\n", func, line, r->did.bus_id, 362 DBG("%s:%d: dev %u:%u\n", func, line, r->dev->bus_id,
350 r->did.dev_id); 363 r->dev->dev_id);
351 DBG("%s:%d: page_size %u\n", func, line, r->page_size); 364 DBG("%s:%d: page_size %u\n", func, line, r->page_size);
352 DBG("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr); 365 DBG("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr);
353 DBG("%s:%d: len %lxh\n", func, line, r->len); 366 DBG("%s:%d: len %lxh\n", func, line, r->len);
367 DBG("%s:%d: offset %lxh\n", func, line, r->offset);
354} 368}
355 369
356/** 370 /**
357 * dma_chunk - A chunk of dma pages mapped by the io controller. 371 * dma_chunk - A chunk of dma pages mapped by the io controller.
358 * @region - The dma region that owns this chunk. 372 * @region - The dma region that owns this chunk.
359 * @lpar_addr: Starting lpar address of the area to map. 373 * @lpar_addr: Starting lpar address of the area to map.
@@ -381,10 +395,11 @@ static void _dma_dump_chunk (const struct dma_chunk* c, const char* func,
381 int line) 395 int line)
382{ 396{
383 DBG("%s:%d: r.dev %u:%u\n", func, line, 397 DBG("%s:%d: r.dev %u:%u\n", func, line,
384 c->region->did.bus_id, c->region->did.dev_id); 398 c->region->dev->bus_id, c->region->dev->dev_id);
385 DBG("%s:%d: r.bus_addr %lxh\n", func, line, c->region->bus_addr); 399 DBG("%s:%d: r.bus_addr %lxh\n", func, line, c->region->bus_addr);
386 DBG("%s:%d: r.page_size %u\n", func, line, c->region->page_size); 400 DBG("%s:%d: r.page_size %u\n", func, line, c->region->page_size);
387 DBG("%s:%d: r.len %lxh\n", func, line, c->region->len); 401 DBG("%s:%d: r.len %lxh\n", func, line, c->region->len);
402 DBG("%s:%d: r.offset %lxh\n", func, line, c->region->offset);
388 DBG("%s:%d: c.lpar_addr %lxh\n", func, line, c->lpar_addr); 403 DBG("%s:%d: c.lpar_addr %lxh\n", func, line, c->lpar_addr);
389 DBG("%s:%d: c.bus_addr %lxh\n", func, line, c->bus_addr); 404 DBG("%s:%d: c.bus_addr %lxh\n", func, line, c->bus_addr);
390 DBG("%s:%d: c.len %lxh\n", func, line, c->len); 405 DBG("%s:%d: c.len %lxh\n", func, line, c->len);
@@ -395,39 +410,68 @@ static struct dma_chunk * dma_find_chunk(struct ps3_dma_region *r,
395{ 410{
396 struct dma_chunk *c; 411 struct dma_chunk *c;
397 unsigned long aligned_bus = _ALIGN_DOWN(bus_addr, 1 << r->page_size); 412 unsigned long aligned_bus = _ALIGN_DOWN(bus_addr, 1 << r->page_size);
398 unsigned long aligned_len = _ALIGN_UP(len, 1 << r->page_size); 413 unsigned long aligned_len = _ALIGN_UP(len+bus_addr-aligned_bus,
414 1 << r->page_size);
399 415
400 list_for_each_entry(c, &r->chunk_list.head, link) { 416 list_for_each_entry(c, &r->chunk_list.head, link) {
401 /* intersection */ 417 /* intersection */
402 if (aligned_bus >= c->bus_addr 418 if (aligned_bus >= c->bus_addr &&
403 && aligned_bus < c->bus_addr + c->len 419 aligned_bus + aligned_len <= c->bus_addr + c->len)
404 && aligned_bus + aligned_len <= c->bus_addr + c->len) {
405 return c; 420 return c;
406 } 421
407 /* below */ 422 /* below */
408 if (aligned_bus + aligned_len <= c->bus_addr) { 423 if (aligned_bus + aligned_len <= c->bus_addr)
409 continue; 424 continue;
410 } 425
411 /* above */ 426 /* above */
412 if (aligned_bus >= c->bus_addr + c->len) { 427 if (aligned_bus >= c->bus_addr + c->len)
413 continue; 428 continue;
414 }
415 429
416 /* we don't handle the multi-chunk case for now */ 430 /* we don't handle the multi-chunk case for now */
417
418 dma_dump_chunk(c); 431 dma_dump_chunk(c);
419 BUG(); 432 BUG();
420 } 433 }
421 return NULL; 434 return NULL;
422} 435}
423 436
424static int dma_free_chunk(struct dma_chunk *c) 437static struct dma_chunk *dma_find_chunk_lpar(struct ps3_dma_region *r,
438 unsigned long lpar_addr, unsigned long len)
439{
440 struct dma_chunk *c;
441 unsigned long aligned_lpar = _ALIGN_DOWN(lpar_addr, 1 << r->page_size);
442 unsigned long aligned_len = _ALIGN_UP(len + lpar_addr - aligned_lpar,
443 1 << r->page_size);
444
445 list_for_each_entry(c, &r->chunk_list.head, link) {
446 /* intersection */
447 if (c->lpar_addr <= aligned_lpar &&
448 aligned_lpar < c->lpar_addr + c->len) {
449 if (aligned_lpar + aligned_len <= c->lpar_addr + c->len)
450 return c;
451 else {
452 dma_dump_chunk(c);
453 BUG();
454 }
455 }
456 /* below */
457 if (aligned_lpar + aligned_len <= c->lpar_addr) {
458 continue;
459 }
460 /* above */
461 if (c->lpar_addr + c->len <= aligned_lpar) {
462 continue;
463 }
464 }
465 return NULL;
466}
467
468static int dma_sb_free_chunk(struct dma_chunk *c)
425{ 469{
426 int result = 0; 470 int result = 0;
427 471
428 if (c->bus_addr) { 472 if (c->bus_addr) {
429 result = lv1_unmap_device_dma_region(c->region->did.bus_id, 473 result = lv1_unmap_device_dma_region(c->region->dev->bus_id,
430 c->region->did.dev_id, c->bus_addr, c->len); 474 c->region->dev->dev_id, c->bus_addr, c->len);
431 BUG_ON(result); 475 BUG_ON(result);
432 } 476 }
433 477
@@ -435,8 +479,39 @@ static int dma_free_chunk(struct dma_chunk *c)
435 return result; 479 return result;
436} 480}
437 481
482static int dma_ioc0_free_chunk(struct dma_chunk *c)
483{
484 int result = 0;
485 int iopage;
486 unsigned long offset;
487 struct ps3_dma_region *r = c->region;
488
489 DBG("%s:start\n", __func__);
490 for (iopage = 0; iopage < (c->len >> r->page_size); iopage++) {
491 offset = (1 << r->page_size) * iopage;
492 /* put INVALID entry */
493 result = lv1_put_iopte(0,
494 c->bus_addr + offset,
495 c->lpar_addr + offset,
496 r->ioid,
497 0);
498 DBG("%s: bus=%#lx, lpar=%#lx, ioid=%d\n", __func__,
499 c->bus_addr + offset,
500 c->lpar_addr + offset,
501 r->ioid);
502
503 if (result) {
504 DBG("%s:%d: lv1_put_iopte failed: %s\n", __func__,
505 __LINE__, ps3_result(result));
506 }
507 }
508 kfree(c);
509 DBG("%s:end\n", __func__);
510 return result;
511}
512
438/** 513/**
439 * dma_map_pages - Maps dma pages into the io controller bus address space. 514 * dma_sb_map_pages - Maps dma pages into the io controller bus address space.
440 * @r: Pointer to a struct ps3_dma_region. 515 * @r: Pointer to a struct ps3_dma_region.
441 * @phys_addr: Starting physical address of the area to map. 516 * @phys_addr: Starting physical address of the area to map.
442 * @len: Length in bytes of the area to map. 517 * @len: Length in bytes of the area to map.
@@ -446,8 +521,8 @@ static int dma_free_chunk(struct dma_chunk *c)
446 * make the HV call to add the pages into the io controller address space. 521 * make the HV call to add the pages into the io controller address space.
447 */ 522 */
448 523
449static int dma_map_pages(struct ps3_dma_region *r, unsigned long phys_addr, 524static int dma_sb_map_pages(struct ps3_dma_region *r, unsigned long phys_addr,
450 unsigned long len, struct dma_chunk **c_out) 525 unsigned long len, struct dma_chunk **c_out, u64 iopte_flag)
451{ 526{
452 int result; 527 int result;
453 struct dma_chunk *c; 528 struct dma_chunk *c;
@@ -461,13 +536,13 @@ static int dma_map_pages(struct ps3_dma_region *r, unsigned long phys_addr,
461 536
462 c->region = r; 537 c->region = r;
463 c->lpar_addr = ps3_mm_phys_to_lpar(phys_addr); 538 c->lpar_addr = ps3_mm_phys_to_lpar(phys_addr);
464 c->bus_addr = dma_lpar_to_bus(r, c->lpar_addr); 539 c->bus_addr = dma_sb_lpar_to_bus(r, c->lpar_addr);
465 c->len = len; 540 c->len = len;
466 541
467 result = lv1_map_device_dma_region(c->region->did.bus_id, 542 BUG_ON(iopte_flag != 0xf800000000000000UL);
468 c->region->did.dev_id, c->lpar_addr, c->bus_addr, c->len, 543 result = lv1_map_device_dma_region(c->region->dev->bus_id,
469 0xf800000000000000UL); 544 c->region->dev->dev_id, c->lpar_addr,
470 545 c->bus_addr, c->len, iopte_flag);
471 if (result) { 546 if (result) {
472 DBG("%s:%d: lv1_map_device_dma_region failed: %s\n", 547 DBG("%s:%d: lv1_map_device_dma_region failed: %s\n",
473 __func__, __LINE__, ps3_result(result)); 548 __func__, __LINE__, ps3_result(result));
@@ -487,26 +562,120 @@ fail_alloc:
487 return result; 562 return result;
488} 563}
489 564
565static int dma_ioc0_map_pages(struct ps3_dma_region *r, unsigned long phys_addr,
566 unsigned long len, struct dma_chunk **c_out,
567 u64 iopte_flag)
568{
569 int result;
570 struct dma_chunk *c, *last;
571 int iopage, pages;
572 unsigned long offset;
573
574 DBG(KERN_ERR "%s: phy=%#lx, lpar%#lx, len=%#lx\n", __func__,
575 phys_addr, ps3_mm_phys_to_lpar(phys_addr), len);
576 c = kzalloc(sizeof(struct dma_chunk), GFP_ATOMIC);
577
578 if (!c) {
579 result = -ENOMEM;
580 goto fail_alloc;
581 }
582
583 c->region = r;
584 c->len = len;
585 c->lpar_addr = ps3_mm_phys_to_lpar(phys_addr);
586 /* allocate IO address */
587 if (list_empty(&r->chunk_list.head)) {
588 /* first one */
589 c->bus_addr = r->bus_addr;
590 } else {
591 /* derive from last bus addr*/
592 last = list_entry(r->chunk_list.head.next,
593 struct dma_chunk, link);
594 c->bus_addr = last->bus_addr + last->len;
595 DBG("%s: last bus=%#lx, len=%#lx\n", __func__,
596 last->bus_addr, last->len);
597 }
598
599 /* FIXME: check whether length exceeds region size */
600
601 /* build ioptes for the area */
602 pages = len >> r->page_size;
603 DBG("%s: pgsize=%#x len=%#lx pages=%#x iopteflag=%#lx\n", __func__,
604 r->page_size, r->len, pages, iopte_flag);
605 for (iopage = 0; iopage < pages; iopage++) {
606 offset = (1 << r->page_size) * iopage;
607 result = lv1_put_iopte(0,
608 c->bus_addr + offset,
609 c->lpar_addr + offset,
610 r->ioid,
611 iopte_flag);
612 if (result) {
613 printk(KERN_WARNING "%s:%d: lv1_map_device_dma_region "
614 "failed: %s\n", __func__, __LINE__,
615 ps3_result(result));
616 goto fail_map;
617 }
618 DBG("%s: pg=%d bus=%#lx, lpar=%#lx, ioid=%#x\n", __func__,
619 iopage, c->bus_addr + offset, c->lpar_addr + offset,
620 r->ioid);
621 }
622
623 /* be sure that last allocated one is inserted at head */
624 list_add(&c->link, &r->chunk_list.head);
625
626 *c_out = c;
627 DBG("%s: end\n", __func__);
628 return 0;
629
630fail_map:
631 for (iopage--; 0 <= iopage; iopage--) {
632 lv1_put_iopte(0,
633 c->bus_addr + offset,
634 c->lpar_addr + offset,
635 r->ioid,
636 0);
637 }
638 kfree(c);
639fail_alloc:
640 *c_out = NULL;
641 return result;
642}
643
490/** 644/**
491 * dma_region_create - Create a device dma region. 645 * dma_sb_region_create - Create a device dma region.
492 * @r: Pointer to a struct ps3_dma_region. 646 * @r: Pointer to a struct ps3_dma_region.
493 * 647 *
494 * This is the lowest level dma region create routine, and is the one that 648 * This is the lowest level dma region create routine, and is the one that
495 * will make the HV call to create the region. 649 * will make the HV call to create the region.
496 */ 650 */
497 651
498static int dma_region_create(struct ps3_dma_region* r) 652static int dma_sb_region_create(struct ps3_dma_region *r)
499{ 653{
500 int result; 654 int result;
501 655
502 r->len = _ALIGN_UP(map.total, 1 << r->page_size); 656 pr_info(" -> %s:%d:\n", __func__, __LINE__);
657
658 BUG_ON(!r);
659
660 if (!r->dev->bus_id) {
661 pr_info("%s:%d: %u:%u no dma\n", __func__, __LINE__,
662 r->dev->bus_id, r->dev->dev_id);
663 return 0;
664 }
665
666 DBG("%s:%u: len = 0x%lx, page_size = %u, offset = 0x%lx\n", __func__,
667 __LINE__, r->len, r->page_size, r->offset);
668
669 BUG_ON(!r->len);
670 BUG_ON(!r->page_size);
671 BUG_ON(!r->region_ops);
672
503 INIT_LIST_HEAD(&r->chunk_list.head); 673 INIT_LIST_HEAD(&r->chunk_list.head);
504 spin_lock_init(&r->chunk_list.lock); 674 spin_lock_init(&r->chunk_list.lock);
505 675
506 result = lv1_allocate_device_dma_region(r->did.bus_id, r->did.dev_id, 676 result = lv1_allocate_device_dma_region(r->dev->bus_id, r->dev->dev_id,
507 r->len, r->page_size, r->region_type, &r->bus_addr); 677 roundup_pow_of_two(r->len), r->page_size, r->region_type,
508 678 &r->bus_addr);
509 dma_dump_region(r);
510 679
511 if (result) { 680 if (result) {
512 DBG("%s:%d: lv1_allocate_device_dma_region failed: %s\n", 681 DBG("%s:%d: lv1_allocate_device_dma_region failed: %s\n",
@@ -517,6 +686,27 @@ static int dma_region_create(struct ps3_dma_region* r)
517 return result; 686 return result;
518} 687}
519 688
689static int dma_ioc0_region_create(struct ps3_dma_region *r)
690{
691 int result;
692
693 INIT_LIST_HEAD(&r->chunk_list.head);
694 spin_lock_init(&r->chunk_list.lock);
695
696 result = lv1_allocate_io_segment(0,
697 r->len,
698 r->page_size,
699 &r->bus_addr);
700 if (result) {
701 DBG("%s:%d: lv1_allocate_io_segment failed: %s\n",
702 __func__, __LINE__, ps3_result(result));
703 r->len = r->bus_addr = 0;
704 }
705 DBG("%s: len=%#lx, pg=%d, bus=%#lx\n", __func__,
706 r->len, r->page_size, r->bus_addr);
707 return result;
708}
709
520/** 710/**
521 * dma_region_free - Free a device dma region. 711 * dma_region_free - Free a device dma region.
522 * @r: Pointer to a struct ps3_dma_region. 712 * @r: Pointer to a struct ps3_dma_region.
@@ -525,31 +715,62 @@ static int dma_region_create(struct ps3_dma_region* r)
525 * will make the HV call to free the region. 715 * will make the HV call to free the region.
526 */ 716 */
527 717
528static int dma_region_free(struct ps3_dma_region* r) 718static int dma_sb_region_free(struct ps3_dma_region *r)
529{ 719{
530 int result; 720 int result;
531 struct dma_chunk *c; 721 struct dma_chunk *c;
532 struct dma_chunk *tmp; 722 struct dma_chunk *tmp;
533 723
724 BUG_ON(!r);
725
726 if (!r->dev->bus_id) {
727 pr_info("%s:%d: %u:%u no dma\n", __func__, __LINE__,
728 r->dev->bus_id, r->dev->dev_id);
729 return 0;
730 }
731
534 list_for_each_entry_safe(c, tmp, &r->chunk_list.head, link) { 732 list_for_each_entry_safe(c, tmp, &r->chunk_list.head, link) {
535 list_del(&c->link); 733 list_del(&c->link);
536 dma_free_chunk(c); 734 dma_sb_free_chunk(c);
537 } 735 }
538 736
539 result = lv1_free_device_dma_region(r->did.bus_id, r->did.dev_id, 737 result = lv1_free_device_dma_region(r->dev->bus_id, r->dev->dev_id,
540 r->bus_addr); 738 r->bus_addr);
541 739
542 if (result) 740 if (result)
543 DBG("%s:%d: lv1_free_device_dma_region failed: %s\n", 741 DBG("%s:%d: lv1_free_device_dma_region failed: %s\n",
544 __func__, __LINE__, ps3_result(result)); 742 __func__, __LINE__, ps3_result(result));
545 743
546 r->len = r->bus_addr = 0; 744 r->bus_addr = 0;
745
746 return result;
747}
748
749static int dma_ioc0_region_free(struct ps3_dma_region *r)
750{
751 int result;
752 struct dma_chunk *c, *n;
753
754 DBG("%s: start\n", __func__);
755 list_for_each_entry_safe(c, n, &r->chunk_list.head, link) {
756 list_del(&c->link);
757 dma_ioc0_free_chunk(c);
758 }
759
760 result = lv1_release_io_segment(0, r->bus_addr);
761
762 if (result)
763 DBG("%s:%d: lv1_free_device_dma_region failed: %s\n",
764 __func__, __LINE__, ps3_result(result));
765
766 r->bus_addr = 0;
767 DBG("%s: end\n", __func__);
547 768
548 return result; 769 return result;
549} 770}
550 771
551/** 772/**
552 * dma_map_area - Map an area of memory into a device dma region. 773 * dma_sb_map_area - Map an area of memory into a device dma region.
553 * @r: Pointer to a struct ps3_dma_region. 774 * @r: Pointer to a struct ps3_dma_region.
554 * @virt_addr: Starting virtual address of the area to map. 775 * @virt_addr: Starting virtual address of the area to map.
555 * @len: Length in bytes of the area to map. 776 * @len: Length in bytes of the area to map.
@@ -559,16 +780,19 @@ static int dma_region_free(struct ps3_dma_region* r)
559 * This is the common dma mapping routine. 780 * This is the common dma mapping routine.
560 */ 781 */
561 782
562static int dma_map_area(struct ps3_dma_region *r, unsigned long virt_addr, 783static int dma_sb_map_area(struct ps3_dma_region *r, unsigned long virt_addr,
563 unsigned long len, unsigned long *bus_addr) 784 unsigned long len, unsigned long *bus_addr,
785 u64 iopte_flag)
564{ 786{
565 int result; 787 int result;
566 unsigned long flags; 788 unsigned long flags;
567 struct dma_chunk *c; 789 struct dma_chunk *c;
568 unsigned long phys_addr = is_kernel_addr(virt_addr) ? __pa(virt_addr) 790 unsigned long phys_addr = is_kernel_addr(virt_addr) ? __pa(virt_addr)
569 : virt_addr; 791 : virt_addr;
570 792 unsigned long aligned_phys = _ALIGN_DOWN(phys_addr, 1 << r->page_size);
571 *bus_addr = dma_lpar_to_bus(r, ps3_mm_phys_to_lpar(phys_addr)); 793 unsigned long aligned_len = _ALIGN_UP(len + phys_addr - aligned_phys,
794 1 << r->page_size);
795 *bus_addr = dma_sb_lpar_to_bus(r, ps3_mm_phys_to_lpar(phys_addr));
572 796
573 if (!USE_DYNAMIC_DMA) { 797 if (!USE_DYNAMIC_DMA) {
574 unsigned long lpar_addr = ps3_mm_phys_to_lpar(phys_addr); 798 unsigned long lpar_addr = ps3_mm_phys_to_lpar(phys_addr);
@@ -588,17 +812,18 @@ static int dma_map_area(struct ps3_dma_region *r, unsigned long virt_addr,
588 c = dma_find_chunk(r, *bus_addr, len); 812 c = dma_find_chunk(r, *bus_addr, len);
589 813
590 if (c) { 814 if (c) {
815 DBG("%s:%d: reusing mapped chunk", __func__, __LINE__);
816 dma_dump_chunk(c);
591 c->usage_count++; 817 c->usage_count++;
592 spin_unlock_irqrestore(&r->chunk_list.lock, flags); 818 spin_unlock_irqrestore(&r->chunk_list.lock, flags);
593 return 0; 819 return 0;
594 } 820 }
595 821
596 result = dma_map_pages(r, _ALIGN_DOWN(phys_addr, 1 << r->page_size), 822 result = dma_sb_map_pages(r, aligned_phys, aligned_len, &c, iopte_flag);
597 _ALIGN_UP(len, 1 << r->page_size), &c);
598 823
599 if (result) { 824 if (result) {
600 *bus_addr = 0; 825 *bus_addr = 0;
601 DBG("%s:%d: dma_map_pages failed (%d)\n", 826 DBG("%s:%d: dma_sb_map_pages failed (%d)\n",
602 __func__, __LINE__, result); 827 __func__, __LINE__, result);
603 spin_unlock_irqrestore(&r->chunk_list.lock, flags); 828 spin_unlock_irqrestore(&r->chunk_list.lock, flags);
604 return result; 829 return result;
@@ -610,8 +835,57 @@ static int dma_map_area(struct ps3_dma_region *r, unsigned long virt_addr,
610 return result; 835 return result;
611} 836}
612 837
838static int dma_ioc0_map_area(struct ps3_dma_region *r, unsigned long virt_addr,
839 unsigned long len, unsigned long *bus_addr,
840 u64 iopte_flag)
841{
842 int result;
843 unsigned long flags;
844 struct dma_chunk *c;
845 unsigned long phys_addr = is_kernel_addr(virt_addr) ? __pa(virt_addr)
846 : virt_addr;
847 unsigned long aligned_phys = _ALIGN_DOWN(phys_addr, 1 << r->page_size);
848 unsigned long aligned_len = _ALIGN_UP(len + phys_addr - aligned_phys,
849 1 << r->page_size);
850
851 DBG(KERN_ERR "%s: vaddr=%#lx, len=%#lx\n", __func__,
852 virt_addr, len);
853 DBG(KERN_ERR "%s: ph=%#lx a_ph=%#lx a_l=%#lx\n", __func__,
854 phys_addr, aligned_phys, aligned_len);
855
856 spin_lock_irqsave(&r->chunk_list.lock, flags);
857 c = dma_find_chunk_lpar(r, ps3_mm_phys_to_lpar(phys_addr), len);
858
859 if (c) {
860 /* FIXME */
861 BUG();
862 *bus_addr = c->bus_addr + phys_addr - aligned_phys;
863 c->usage_count++;
864 spin_unlock_irqrestore(&r->chunk_list.lock, flags);
865 return 0;
866 }
867
868 result = dma_ioc0_map_pages(r, aligned_phys, aligned_len, &c,
869 iopte_flag);
870
871 if (result) {
872 *bus_addr = 0;
873 DBG("%s:%d: dma_ioc0_map_pages failed (%d)\n",
874 __func__, __LINE__, result);
875 spin_unlock_irqrestore(&r->chunk_list.lock, flags);
876 return result;
877 }
878 *bus_addr = c->bus_addr + phys_addr - aligned_phys;
879 DBG("%s: va=%#lx pa=%#lx a_pa=%#lx bus=%#lx\n", __func__,
880 virt_addr, phys_addr, aligned_phys, *bus_addr);
881 c->usage_count = 1;
882
883 spin_unlock_irqrestore(&r->chunk_list.lock, flags);
884 return result;
885}
886
613/** 887/**
614 * dma_unmap_area - Unmap an area of memory from a device dma region. 888 * dma_sb_unmap_area - Unmap an area of memory from a device dma region.
615 * @r: Pointer to a struct ps3_dma_region. 889 * @r: Pointer to a struct ps3_dma_region.
616 * @bus_addr: The starting ioc bus address of the area to unmap. 890 * @bus_addr: The starting ioc bus address of the area to unmap.
617 * @len: Length in bytes of the area to unmap. 891 * @len: Length in bytes of the area to unmap.
@@ -619,7 +893,7 @@ static int dma_map_area(struct ps3_dma_region *r, unsigned long virt_addr,
619 * This is the common dma unmap routine. 893 * This is the common dma unmap routine.
620 */ 894 */
621 895
622int dma_unmap_area(struct ps3_dma_region *r, unsigned long bus_addr, 896static int dma_sb_unmap_area(struct ps3_dma_region *r, unsigned long bus_addr,
623 unsigned long len) 897 unsigned long len)
624{ 898{
625 unsigned long flags; 899 unsigned long flags;
@@ -631,7 +905,8 @@ int dma_unmap_area(struct ps3_dma_region *r, unsigned long bus_addr,
631 if (!c) { 905 if (!c) {
632 unsigned long aligned_bus = _ALIGN_DOWN(bus_addr, 906 unsigned long aligned_bus = _ALIGN_DOWN(bus_addr,
633 1 << r->page_size); 907 1 << r->page_size);
634 unsigned long aligned_len = _ALIGN_UP(len, 1 << r->page_size); 908 unsigned long aligned_len = _ALIGN_UP(len + bus_addr
909 - aligned_bus, 1 << r->page_size);
635 DBG("%s:%d: not found: bus_addr %lxh\n", 910 DBG("%s:%d: not found: bus_addr %lxh\n",
636 __func__, __LINE__, bus_addr); 911 __func__, __LINE__, bus_addr);
637 DBG("%s:%d: not found: len %lxh\n", 912 DBG("%s:%d: not found: len %lxh\n",
@@ -647,94 +922,166 @@ int dma_unmap_area(struct ps3_dma_region *r, unsigned long bus_addr,
647 922
648 if (!c->usage_count) { 923 if (!c->usage_count) {
649 list_del(&c->link); 924 list_del(&c->link);
650 dma_free_chunk(c); 925 dma_sb_free_chunk(c);
651 } 926 }
652 927
653 spin_unlock_irqrestore(&r->chunk_list.lock, flags); 928 spin_unlock_irqrestore(&r->chunk_list.lock, flags);
654 return 0; 929 return 0;
655} 930}
656 931
932static int dma_ioc0_unmap_area(struct ps3_dma_region *r,
933 unsigned long bus_addr, unsigned long len)
934{
935 unsigned long flags;
936 struct dma_chunk *c;
937
938 DBG("%s: start a=%#lx l=%#lx\n", __func__, bus_addr, len);
939 spin_lock_irqsave(&r->chunk_list.lock, flags);
940 c = dma_find_chunk(r, bus_addr, len);
941
942 if (!c) {
943 unsigned long aligned_bus = _ALIGN_DOWN(bus_addr,
944 1 << r->page_size);
945 unsigned long aligned_len = _ALIGN_UP(len + bus_addr
946 - aligned_bus,
947 1 << r->page_size);
948 DBG("%s:%d: not found: bus_addr %lxh\n",
949 __func__, __LINE__, bus_addr);
950 DBG("%s:%d: not found: len %lxh\n",
951 __func__, __LINE__, len);
952 DBG("%s:%d: not found: aligned_bus %lxh\n",
953 __func__, __LINE__, aligned_bus);
954 DBG("%s:%d: not found: aligned_len %lxh\n",
955 __func__, __LINE__, aligned_len);
956 BUG();
957 }
958
959 c->usage_count--;
960
961 if (!c->usage_count) {
962 list_del(&c->link);
963 dma_ioc0_free_chunk(c);
964 }
965
966 spin_unlock_irqrestore(&r->chunk_list.lock, flags);
967 DBG("%s: end\n", __func__);
968 return 0;
969}
970
657/** 971/**
658 * dma_region_create_linear - Setup a linear dma maping for a device. 972 * dma_sb_region_create_linear - Setup a linear dma mapping for a device.
659 * @r: Pointer to a struct ps3_dma_region. 973 * @r: Pointer to a struct ps3_dma_region.
660 * 974 *
661 * This routine creates an HV dma region for the device and maps all available 975 * This routine creates an HV dma region for the device and maps all available
662 * ram into the io controller bus address space. 976 * ram into the io controller bus address space.
663 */ 977 */
664 978
665static int dma_region_create_linear(struct ps3_dma_region *r) 979static int dma_sb_region_create_linear(struct ps3_dma_region *r)
666{ 980{
667 int result; 981 int result;
668 unsigned long tmp; 982 unsigned long virt_addr, len, tmp;
669 983
670 /* force 16M dma pages for linear mapping */ 984 if (r->len > 16*1024*1024) { /* FIXME: need proper fix */
671 985 /* force 16M dma pages for linear mapping */
672 if (r->page_size != PS3_DMA_16M) { 986 if (r->page_size != PS3_DMA_16M) {
673 pr_info("%s:%d: forcing 16M pages for linear map\n", 987 pr_info("%s:%d: forcing 16M pages for linear map\n",
674 __func__, __LINE__); 988 __func__, __LINE__);
675 r->page_size = PS3_DMA_16M; 989 r->page_size = PS3_DMA_16M;
990 r->len = _ALIGN_UP(r->len, 1 << r->page_size);
991 }
676 } 992 }
677 993
678 result = dma_region_create(r); 994 result = dma_sb_region_create(r);
679 BUG_ON(result); 995 BUG_ON(result);
680 996
681 result = dma_map_area(r, map.rm.base, map.rm.size, &tmp); 997 if (r->offset < map.rm.size) {
682 BUG_ON(result); 998 /* Map (part of) 1st RAM chunk */
683 999 virt_addr = map.rm.base + r->offset;
684 if (USE_LPAR_ADDR) 1000 len = map.rm.size - r->offset;
685 result = dma_map_area(r, map.r1.base, map.r1.size, 1001 if (len > r->len)
686 &tmp); 1002 len = r->len;
687 else 1003 result = dma_sb_map_area(r, virt_addr, len, &tmp,
688 result = dma_map_area(r, map.rm.size, map.r1.size, 1004 IOPTE_PP_W | IOPTE_PP_R | IOPTE_SO_RW | IOPTE_M);
689 &tmp); 1005 BUG_ON(result);
1006 }
690 1007
691 BUG_ON(result); 1008 if (r->offset + r->len > map.rm.size) {
1009 /* Map (part of) 2nd RAM chunk */
1010 virt_addr = USE_LPAR_ADDR ? map.r1.base : map.rm.size;
1011 len = r->len;
1012 if (r->offset >= map.rm.size)
1013 virt_addr += r->offset - map.rm.size;
1014 else
1015 len -= map.rm.size - r->offset;
1016 result = dma_sb_map_area(r, virt_addr, len, &tmp,
1017 IOPTE_PP_W | IOPTE_PP_R | IOPTE_SO_RW | IOPTE_M);
1018 BUG_ON(result);
1019 }
692 1020
693 return result; 1021 return result;
694} 1022}
695 1023
696/** 1024/**
697 * dma_region_free_linear - Free a linear dma mapping for a device. 1025 * dma_sb_region_free_linear - Free a linear dma mapping for a device.
698 * @r: Pointer to a struct ps3_dma_region. 1026 * @r: Pointer to a struct ps3_dma_region.
699 * 1027 *
700 * This routine will unmap all mapped areas and free the HV dma region. 1028 * This routine will unmap all mapped areas and free the HV dma region.
701 */ 1029 */
702 1030
703static int dma_region_free_linear(struct ps3_dma_region *r) 1031static int dma_sb_region_free_linear(struct ps3_dma_region *r)
704{ 1032{
705 int result; 1033 int result;
1034 unsigned long bus_addr, len, lpar_addr;
1035
1036 if (r->offset < map.rm.size) {
1037 /* Unmap (part of) 1st RAM chunk */
1038 lpar_addr = map.rm.base + r->offset;
1039 len = map.rm.size - r->offset;
1040 if (len > r->len)
1041 len = r->len;
1042 bus_addr = dma_sb_lpar_to_bus(r, lpar_addr);
1043 result = dma_sb_unmap_area(r, bus_addr, len);
1044 BUG_ON(result);
1045 }
706 1046
707 result = dma_unmap_area(r, dma_lpar_to_bus(r, 0), map.rm.size); 1047 if (r->offset + r->len > map.rm.size) {
708 BUG_ON(result); 1048 /* Unmap (part of) 2nd RAM chunk */
709 1049 lpar_addr = map.r1.base;
710 result = dma_unmap_area(r, dma_lpar_to_bus(r, map.r1.base), 1050 len = r->len;
711 map.r1.size); 1051 if (r->offset >= map.rm.size)
712 BUG_ON(result); 1052 lpar_addr += r->offset - map.rm.size;
1053 else
1054 len -= map.rm.size - r->offset;
1055 bus_addr = dma_sb_lpar_to_bus(r, lpar_addr);
1056 result = dma_sb_unmap_area(r, bus_addr, len);
1057 BUG_ON(result);
1058 }
713 1059
714 result = dma_region_free(r); 1060 result = dma_sb_region_free(r);
715 BUG_ON(result); 1061 BUG_ON(result);
716 1062
717 return result; 1063 return result;
718} 1064}
719 1065
720/** 1066/**
721 * dma_map_area_linear - Map an area of memory into a device dma region. 1067 * dma_sb_map_area_linear - Map an area of memory into a device dma region.
722 * @r: Pointer to a struct ps3_dma_region. 1068 * @r: Pointer to a struct ps3_dma_region.
723 * @virt_addr: Starting virtual address of the area to map. 1069 * @virt_addr: Starting virtual address of the area to map.
724 * @len: Length in bytes of the area to map. 1070 * @len: Length in bytes of the area to map.
725 * @bus_addr: A pointer to return the starting ioc bus address of the area to 1071 * @bus_addr: A pointer to return the starting ioc bus address of the area to
726 * map. 1072 * map.
727 * 1073 *
728 * This routine just returns the coresponding bus address. Actual mapping 1074 * This routine just returns the corresponding bus address. Actual mapping
729 * occurs in dma_region_create_linear(). 1075 * occurs in dma_region_create_linear().
730 */ 1076 */
731 1077
732static int dma_map_area_linear(struct ps3_dma_region *r, 1078static int dma_sb_map_area_linear(struct ps3_dma_region *r,
733 unsigned long virt_addr, unsigned long len, unsigned long *bus_addr) 1079 unsigned long virt_addr, unsigned long len, unsigned long *bus_addr,
1080 u64 iopte_flag)
734{ 1081{
735 unsigned long phys_addr = is_kernel_addr(virt_addr) ? __pa(virt_addr) 1082 unsigned long phys_addr = is_kernel_addr(virt_addr) ? __pa(virt_addr)
736 : virt_addr; 1083 : virt_addr;
737 *bus_addr = dma_lpar_to_bus(r, ps3_mm_phys_to_lpar(phys_addr)); 1084 *bus_addr = dma_sb_lpar_to_bus(r, ps3_mm_phys_to_lpar(phys_addr));
738 return 0; 1085 return 0;
739} 1086}
740 1087
@@ -744,42 +1091,98 @@ static int dma_map_area_linear(struct ps3_dma_region *r,
744 * @bus_addr: The starting ioc bus address of the area to unmap. 1091 * @bus_addr: The starting ioc bus address of the area to unmap.
745 * @len: Length in bytes of the area to unmap. 1092 * @len: Length in bytes of the area to unmap.
746 * 1093 *
747 * This routine does nothing. Unmapping occurs in dma_region_free_linear(). 1094 * This routine does nothing. Unmapping occurs in dma_sb_region_free_linear().
748 */ 1095 */
749 1096
750static int dma_unmap_area_linear(struct ps3_dma_region *r, 1097static int dma_sb_unmap_area_linear(struct ps3_dma_region *r,
751 unsigned long bus_addr, unsigned long len) 1098 unsigned long bus_addr, unsigned long len)
752{ 1099{
753 return 0; 1100 return 0;
1101};
1102
1103static const struct ps3_dma_region_ops ps3_dma_sb_region_ops = {
1104 .create = dma_sb_region_create,
1105 .free = dma_sb_region_free,
1106 .map = dma_sb_map_area,
1107 .unmap = dma_sb_unmap_area
1108};
1109
1110static const struct ps3_dma_region_ops ps3_dma_sb_region_linear_ops = {
1111 .create = dma_sb_region_create_linear,
1112 .free = dma_sb_region_free_linear,
1113 .map = dma_sb_map_area_linear,
1114 .unmap = dma_sb_unmap_area_linear
1115};
1116
1117static const struct ps3_dma_region_ops ps3_dma_ioc0_region_ops = {
1118 .create = dma_ioc0_region_create,
1119 .free = dma_ioc0_region_free,
1120 .map = dma_ioc0_map_area,
1121 .unmap = dma_ioc0_unmap_area
1122};
1123
1124int ps3_dma_region_init(struct ps3_system_bus_device *dev,
1125 struct ps3_dma_region *r, enum ps3_dma_page_size page_size,
1126 enum ps3_dma_region_type region_type, void *addr, unsigned long len)
1127{
1128 unsigned long lpar_addr;
1129
1130 lpar_addr = addr ? ps3_mm_phys_to_lpar(__pa(addr)) : 0;
1131
1132 r->dev = dev;
1133 r->page_size = page_size;
1134 r->region_type = region_type;
1135 r->offset = lpar_addr;
1136 if (r->offset >= map.rm.size)
1137 r->offset -= map.r1.offset;
1138 r->len = len ? len : _ALIGN_UP(map.total, 1 << r->page_size);
1139
1140 switch (dev->dev_type) {
1141 case PS3_DEVICE_TYPE_SB:
1142 r->region_ops = (USE_DYNAMIC_DMA)
1143 ? &ps3_dma_sb_region_ops
1144 : &ps3_dma_sb_region_linear_ops;
1145 break;
1146 case PS3_DEVICE_TYPE_IOC0:
1147 r->region_ops = &ps3_dma_ioc0_region_ops;
1148 break;
1149 default:
1150 BUG();
1151 return -EINVAL;
1152 }
1153 return 0;
754} 1154}
1155EXPORT_SYMBOL(ps3_dma_region_init);
755 1156
756int ps3_dma_region_create(struct ps3_dma_region *r) 1157int ps3_dma_region_create(struct ps3_dma_region *r)
757{ 1158{
758 return (USE_DYNAMIC_DMA) 1159 BUG_ON(!r);
759 ? dma_region_create(r) 1160 BUG_ON(!r->region_ops);
760 : dma_region_create_linear(r); 1161 BUG_ON(!r->region_ops->create);
1162 return r->region_ops->create(r);
761} 1163}
1164EXPORT_SYMBOL(ps3_dma_region_create);
762 1165
763int ps3_dma_region_free(struct ps3_dma_region *r) 1166int ps3_dma_region_free(struct ps3_dma_region *r)
764{ 1167{
765 return (USE_DYNAMIC_DMA) 1168 BUG_ON(!r);
766 ? dma_region_free(r) 1169 BUG_ON(!r->region_ops);
767 : dma_region_free_linear(r); 1170 BUG_ON(!r->region_ops->free);
1171 return r->region_ops->free(r);
768} 1172}
1173EXPORT_SYMBOL(ps3_dma_region_free);
769 1174
770int ps3_dma_map(struct ps3_dma_region *r, unsigned long virt_addr, 1175int ps3_dma_map(struct ps3_dma_region *r, unsigned long virt_addr,
771 unsigned long len, unsigned long *bus_addr) 1176 unsigned long len, unsigned long *bus_addr,
1177 u64 iopte_flag)
772{ 1178{
773 return (USE_DYNAMIC_DMA) 1179 return r->region_ops->map(r, virt_addr, len, bus_addr, iopte_flag);
774 ? dma_map_area(r, virt_addr, len, bus_addr)
775 : dma_map_area_linear(r, virt_addr, len, bus_addr);
776} 1180}
777 1181
778int ps3_dma_unmap(struct ps3_dma_region *r, unsigned long bus_addr, 1182int ps3_dma_unmap(struct ps3_dma_region *r, unsigned long bus_addr,
779 unsigned long len) 1183 unsigned long len)
780{ 1184{
781 return (USE_DYNAMIC_DMA) ? dma_unmap_area(r, bus_addr, len) 1185 return r->region_ops->unmap(r, bus_addr, len);
782 : dma_unmap_area_linear(r, bus_addr, len);
783} 1186}
784 1187
785/*============================================================================*/ 1188/*============================================================================*/
@@ -810,12 +1213,13 @@ void __init ps3_mm_init(void)
810 BUG_ON(map.rm.base); 1213 BUG_ON(map.rm.base);
811 BUG_ON(!map.rm.size); 1214 BUG_ON(!map.rm.size);
812 1215
813 lmb_add(map.rm.base, map.rm.size);
814 lmb_analyze();
815 1216
816 /* arrange to do this in ps3_mm_add_memory */ 1217 /* arrange to do this in ps3_mm_add_memory */
817 ps3_mm_region_create(&map.r1, map.total - map.rm.size); 1218 ps3_mm_region_create(&map.r1, map.total - map.rm.size);
818 1219
1220 /* correct map.total for the real total amount of memory we use */
1221 map.total = map.rm.size + map.r1.size;
1222
819 DBG(" <- %s:%d\n", __func__, __LINE__); 1223 DBG(" <- %s:%d\n", __func__, __LINE__);
820} 1224}
821 1225
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c
index 5c3da08bc0c4..b70e474014f0 100644
--- a/arch/powerpc/platforms/ps3/os-area.c
+++ b/arch/powerpc/platforms/ps3/os-area.c
@@ -133,7 +133,7 @@ struct saved_params {
133} static saved_params; 133} static saved_params;
134 134
135#define dump_header(_a) _dump_header(_a, __func__, __LINE__) 135#define dump_header(_a) _dump_header(_a, __func__, __LINE__)
136static void _dump_header(const struct os_area_header __iomem *h, const char* func, 136static void _dump_header(const struct os_area_header *h, const char *func,
137 int line) 137 int line)
138{ 138{
139 pr_debug("%s:%d: h.magic_num: '%s'\n", func, line, 139 pr_debug("%s:%d: h.magic_num: '%s'\n", func, line,
@@ -151,7 +151,7 @@ static void _dump_header(const struct os_area_header __iomem *h, const char* fun
151} 151}
152 152
153#define dump_params(_a) _dump_params(_a, __func__, __LINE__) 153#define dump_params(_a) _dump_params(_a, __func__, __LINE__)
154static void _dump_params(const struct os_area_params __iomem *p, const char* func, 154static void _dump_params(const struct os_area_params *p, const char *func,
155 int line) 155 int line)
156{ 156{
157 pr_debug("%s:%d: p.boot_flag: %u\n", func, line, p->boot_flag); 157 pr_debug("%s:%d: p.boot_flag: %u\n", func, line, p->boot_flag);
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index ca04f03305c7..87d52060fec0 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -41,6 +41,7 @@ void ps3_mm_shutdown(void);
41/* irq */ 41/* irq */
42 42
43void ps3_init_IRQ(void); 43void ps3_init_IRQ(void);
44void ps3_shutdown_IRQ(int cpu);
44void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq); 45void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq);
45 46
46/* smp */ 47/* smp */
@@ -82,6 +83,7 @@ enum ps3_dev_type {
82 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */ 83 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */
83 PS3_DEV_TYPE_SB_GPIO = 6, 84 PS3_DEV_TYPE_SB_GPIO = 6,
84 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */ 85 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */
86 PS3_DEV_TYPE_NOACCESS = 255,
85}; 87};
86 88
87int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str, 89int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
@@ -129,24 +131,28 @@ int ps3_repository_read_dev_reg(unsigned int bus_index,
129/* repository bus enumerators */ 131/* repository bus enumerators */
130 132
131struct ps3_repository_device { 133struct ps3_repository_device {
134 enum ps3_bus_type bus_type;
132 unsigned int bus_index; 135 unsigned int bus_index;
136 unsigned int bus_id;
137 enum ps3_dev_type dev_type;
133 unsigned int dev_index; 138 unsigned int dev_index;
134 struct ps3_device_id did; 139 unsigned int dev_id;
135}; 140};
136 141
137int ps3_repository_find_device(enum ps3_bus_type bus_type, 142static inline struct ps3_repository_device *ps3_repository_bump_device(
138 enum ps3_dev_type dev_type, 143 struct ps3_repository_device *repo)
139 const struct ps3_repository_device *start_dev,
140 struct ps3_repository_device *dev);
141static inline int ps3_repository_find_first_device(
142 enum ps3_bus_type bus_type, enum ps3_dev_type dev_type,
143 struct ps3_repository_device *dev)
144{ 144{
145 return ps3_repository_find_device(bus_type, dev_type, NULL, dev); 145 repo->dev_index++;
146 return repo;
146} 147}
147int ps3_repository_find_interrupt(const struct ps3_repository_device *dev, 148int ps3_repository_find_device(struct ps3_repository_device *repo);
149int ps3_repository_find_devices(enum ps3_bus_type bus_type,
150 int (*callback)(const struct ps3_repository_device *repo));
151int ps3_repository_find_bus(enum ps3_bus_type bus_type, unsigned int from,
152 unsigned int *bus_index);
153int ps3_repository_find_interrupt(const struct ps3_repository_device *repo,
148 enum ps3_interrupt_type intr_type, unsigned int *interrupt_id); 154 enum ps3_interrupt_type intr_type, unsigned int *interrupt_id);
149int ps3_repository_find_reg(const struct ps3_repository_device *dev, 155int ps3_repository_find_reg(const struct ps3_repository_device *repo,
150 enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len); 156 enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len);
151 157
152/* repository block device info */ 158/* repository block device info */
@@ -216,4 +222,19 @@ int ps3_repository_read_num_spu_resource_id(unsigned int *num_resource_id);
216int ps3_repository_read_spu_resource_id(unsigned int res_index, 222int ps3_repository_read_spu_resource_id(unsigned int res_index,
217 enum ps3_spu_resource_type* resource_type, unsigned int *resource_id); 223 enum ps3_spu_resource_type* resource_type, unsigned int *resource_id);
218 224
225/* repository vuart info */
226
227int ps3_repository_read_vuart_av_port(unsigned int *port);
228int ps3_repository_read_vuart_sysmgr_port(unsigned int *port);
229
230/* Page table entries */
231#define IOPTE_PP_W 0x8000000000000000ul /* protection: write */
232#define IOPTE_PP_R 0x4000000000000000ul /* protection: read */
233#define IOPTE_M 0x2000000000000000ul /* coherency required */
234#define IOPTE_SO_R 0x1000000000000000ul /* ordering: writes */
235#define IOPTE_SO_RW 0x1800000000000000ul /* ordering: r & w */
236#define IOPTE_RPN_Mask 0x07fffffffffff000ul /* RPN */
237#define IOPTE_H 0x0000000000000800ul /* cache hint */
238#define IOPTE_IOID_Mask 0x00000000000007fful /* ioid */
239
219#endif 240#endif
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index ae586a0e5d3f..8cc37cfea0f2 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -138,7 +138,7 @@ static int read_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4,
138 pr_debug("%s:%d: lv1_get_repository_node_value failed: %s\n", 138 pr_debug("%s:%d: lv1_get_repository_node_value failed: %s\n",
139 __func__, __LINE__, ps3_result(result)); 139 __func__, __LINE__, ps3_result(result));
140 dump_node_name(lpar_id, n1, n2, n3, n4); 140 dump_node_name(lpar_id, n1, n2, n3, n4);
141 return result; 141 return -ENOENT;
142 } 142 }
143 143
144 dump_node(lpar_id, n1, n2, n3, n4, v1, v2); 144 dump_node(lpar_id, n1, n2, n3, n4, v1, v2);
@@ -155,7 +155,7 @@ static int read_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4,
155 pr_debug("%s:%d: warning: discarding non-zero v2: %016lx\n", 155 pr_debug("%s:%d: warning: discarding non-zero v2: %016lx\n",
156 __func__, __LINE__, v2); 156 __func__, __LINE__, v2);
157 157
158 return result; 158 return 0;
159} 159}
160 160
161int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str, 161int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
@@ -314,324 +314,140 @@ int ps3_repository_read_dev_reg(unsigned int bus_index,
314 reg_index, bus_addr, len); 314 reg_index, bus_addr, len);
315} 315}
316 316
317#if defined(DEBUG)
318int ps3_repository_dump_resource_info(unsigned int bus_index,
319 unsigned int dev_index)
320{
321 int result = 0;
322 unsigned int res_index;
323 317
324 pr_debug(" -> %s:%d: (%u:%u)\n", __func__, __LINE__,
325 bus_index, dev_index);
326 318
327 for (res_index = 0; res_index < 10; res_index++) { 319int ps3_repository_find_device(struct ps3_repository_device *repo)
328 enum ps3_interrupt_type intr_type; 320{
329 unsigned int interrupt_id; 321 int result;
322 struct ps3_repository_device tmp = *repo;
323 unsigned int num_dev;
330 324
331 result = ps3_repository_read_dev_intr(bus_index, dev_index, 325 BUG_ON(repo->bus_index > 10);
332 res_index, &intr_type, &interrupt_id); 326 BUG_ON(repo->dev_index > 10);
333 327
334 if (result) { 328 result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev);
335 if (result != LV1_NO_ENTRY)
336 pr_debug("%s:%d ps3_repository_read_dev_intr"
337 " (%u:%u) failed\n", __func__, __LINE__,
338 bus_index, dev_index);
339 break;
340 }
341 329
342 pr_debug("%s:%d (%u:%u) intr_type %u, interrupt_id %u\n", 330 if (result) {
343 __func__, __LINE__, bus_index, dev_index, intr_type, 331 pr_debug("%s:%d read_bus_num_dev failed\n", __func__, __LINE__);
344 interrupt_id); 332 return result;
345 } 333 }
346 334
347 for (res_index = 0; res_index < 10; res_index++) { 335 pr_debug("%s:%d: bus_type %u, bus_index %u, bus_id %u, num_dev %u\n",
348 enum ps3_reg_type reg_type; 336 __func__, __LINE__, tmp.bus_type, tmp.bus_index, tmp.bus_id,
349 u64 bus_addr; 337 num_dev);
350 u64 len;
351
352 result = ps3_repository_read_dev_reg(bus_index, dev_index,
353 res_index, &reg_type, &bus_addr, &len);
354 338
355 if (result) { 339 if (tmp.dev_index >= num_dev) {
356 if (result != LV1_NO_ENTRY) 340 pr_debug("%s:%d: no device found\n", __func__, __LINE__);
357 pr_debug("%s:%d ps3_repository_read_dev_reg" 341 return -ENODEV;
358 " (%u:%u) failed\n", __func__, __LINE__,
359 bus_index, dev_index);
360 break;
361 }
362
363 pr_debug("%s:%d (%u:%u) reg_type %u, bus_addr %lxh, len %lxh\n",
364 __func__, __LINE__, bus_index, dev_index, reg_type,
365 bus_addr, len);
366 } 342 }
367 343
368 pr_debug(" <- %s:%d\n", __func__, __LINE__); 344 result = ps3_repository_read_dev_type(tmp.bus_index, tmp.dev_index,
369 return result; 345 &tmp.dev_type);
370}
371
372static int dump_stor_dev_info(unsigned int bus_index, unsigned int dev_index)
373{
374 int result = 0;
375 unsigned int num_regions, region_index;
376 u64 port, blk_size, num_blocks;
377
378 pr_debug(" -> %s:%d: (%u:%u)\n", __func__, __LINE__,
379 bus_index, dev_index);
380 346
381 result = ps3_repository_read_stor_dev_info(bus_index, dev_index, &port,
382 &blk_size, &num_blocks, &num_regions);
383 if (result) { 347 if (result) {
384 pr_debug("%s:%d ps3_repository_read_stor_dev_info" 348 pr_debug("%s:%d read_dev_type failed\n", __func__, __LINE__);
385 " (%u:%u) failed\n", __func__, __LINE__, 349 return result;
386 bus_index, dev_index);
387 goto out;
388 } 350 }
389 351
390 pr_debug("%s:%d (%u:%u): port %lu, blk_size %lu, num_blocks " 352 result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index,
391 "%lu, num_regions %u\n", 353 &tmp.dev_id);
392 __func__, __LINE__, bus_index, dev_index, port,
393 blk_size, num_blocks, num_regions);
394
395 for (region_index = 0; region_index < num_regions; region_index++) {
396 unsigned int region_id;
397 u64 region_start, region_size;
398
399 result = ps3_repository_read_stor_dev_region(bus_index,
400 dev_index, region_index, &region_id, &region_start,
401 &region_size);
402 if (result) {
403 pr_debug("%s:%d ps3_repository_read_stor_dev_region"
404 " (%u:%u) failed\n", __func__, __LINE__,
405 bus_index, dev_index);
406 break;
407 }
408 354
409 pr_debug("%s:%d (%u:%u) region_id %u, start %lxh, size %lxh\n", 355 if (result) {
410 __func__, __LINE__, bus_index, dev_index, region_id, 356 pr_debug("%s:%d ps3_repository_read_dev_id failed\n", __func__,
411 region_start, region_size); 357 __LINE__);
358 return result;
412 } 359 }
413 360
414out: 361 pr_debug("%s:%d: found: dev_type %u, dev_index %u, dev_id %u\n",
415 pr_debug(" <- %s:%d\n", __func__, __LINE__); 362 __func__, __LINE__, tmp.dev_type, tmp.dev_index, tmp.dev_id);
416 return result;
417}
418
419static int dump_device_info(unsigned int bus_index, enum ps3_bus_type bus_type,
420 unsigned int num_dev)
421{
422 int result = 0;
423 unsigned int dev_index;
424
425 pr_debug(" -> %s:%d: bus_%u\n", __func__, __LINE__, bus_index);
426
427 for (dev_index = 0; dev_index < num_dev; dev_index++) {
428 enum ps3_dev_type dev_type;
429 unsigned int dev_id;
430
431 result = ps3_repository_read_dev_type(bus_index, dev_index,
432 &dev_type);
433
434 if (result) {
435 pr_debug("%s:%d ps3_repository_read_dev_type"
436 " (%u:%u) failed\n", __func__, __LINE__,
437 bus_index, dev_index);
438 break;
439 }
440
441 result = ps3_repository_read_dev_id(bus_index, dev_index,
442 &dev_id);
443
444 if (result) {
445 pr_debug("%s:%d ps3_repository_read_dev_id"
446 " (%u:%u) failed\n", __func__, __LINE__,
447 bus_index, dev_index);
448 continue;
449 }
450 363
451 pr_debug("%s:%d (%u:%u): dev_type %u, dev_id %u\n", __func__, 364 *repo = tmp;
452 __LINE__, bus_index, dev_index, dev_type, dev_id); 365 return 0;
453
454 ps3_repository_dump_resource_info(bus_index, dev_index);
455
456 if (bus_type == PS3_BUS_TYPE_STORAGE)
457 dump_stor_dev_info(bus_index, dev_index);
458 }
459
460 pr_debug(" <- %s:%d\n", __func__, __LINE__);
461 return result;
462} 366}
463 367
464int ps3_repository_dump_bus_info(void) 368int __devinit ps3_repository_find_devices(enum ps3_bus_type bus_type,
369 int (*callback)(const struct ps3_repository_device *repo))
465{ 370{
466 int result = 0; 371 int result = 0;
467 unsigned int bus_index; 372 struct ps3_repository_device repo;
468 373
469 pr_debug(" -> %s:%d\n", __func__, __LINE__); 374 pr_debug(" -> %s:%d: find bus_type %u\n", __func__, __LINE__, bus_type);
470 375
471 for (bus_index = 0; bus_index < 10; bus_index++) { 376 for (repo.bus_index = 0; repo.bus_index < 10; repo.bus_index++) {
472 enum ps3_bus_type bus_type;
473 unsigned int bus_id;
474 unsigned int num_dev;
475 377
476 result = ps3_repository_read_bus_type(bus_index, &bus_type); 378 result = ps3_repository_read_bus_type(repo.bus_index,
379 &repo.bus_type);
477 380
478 if (result) { 381 if (result) {
479 pr_debug("%s:%d read_bus_type(%u) failed\n", 382 pr_debug("%s:%d read_bus_type(%u) failed\n",
480 __func__, __LINE__, bus_index); 383 __func__, __LINE__, repo.bus_index);
481 break; 384 break;
482 } 385 }
483 386
484 result = ps3_repository_read_bus_id(bus_index, &bus_id); 387 if (repo.bus_type != bus_type) {
485 388 pr_debug("%s:%d: skip, bus_type %u\n", __func__,
486 if (result) { 389 __LINE__, repo.bus_type);
487 pr_debug("%s:%d read_bus_id(%u) failed\n",
488 __func__, __LINE__, bus_index);
489 continue; 390 continue;
490 } 391 }
491 392
492 if (bus_index != bus_id) 393 result = ps3_repository_read_bus_id(repo.bus_index,
493 pr_debug("%s:%d bus_index != bus_id\n", 394 &repo.bus_id);
494 __func__, __LINE__);
495
496 result = ps3_repository_read_bus_num_dev(bus_index, &num_dev);
497 395
498 if (result) { 396 if (result) {
499 pr_debug("%s:%d read_bus_num_dev(%u) failed\n", 397 pr_debug("%s:%d read_bus_id(%u) failed\n",
500 __func__, __LINE__, bus_index); 398 __func__, __LINE__, repo.bus_index);
501 continue; 399 continue;
502 } 400 }
503 401
504 pr_debug("%s:%d bus_%u: bus_type %u, bus_id %u, num_dev %u\n", 402 for (repo.dev_index = 0; ; repo.dev_index++) {
505 __func__, __LINE__, bus_index, bus_type, bus_id, 403 result = ps3_repository_find_device(&repo);
506 num_dev);
507 404
508 dump_device_info(bus_index, bus_type, num_dev); 405 if (result == -ENODEV) {
509 } 406 result = 0;
407 break;
408 } else if (result)
409 break;
510 410
511 pr_debug(" <- %s:%d\n", __func__, __LINE__); 411 result = callback(&repo);
512 return result;
513}
514#endif /* defined(DEBUG) */
515
516static int find_device(unsigned int bus_index, unsigned int num_dev,
517 unsigned int start_dev_index, enum ps3_dev_type dev_type,
518 struct ps3_repository_device *dev)
519{
520 int result = 0;
521 unsigned int dev_index;
522 412
523 pr_debug("%s:%d: find dev_type %u\n", __func__, __LINE__, dev_type); 413 if (result) {
524 414 pr_debug("%s:%d: abort at callback\n", __func__,
525 dev->dev_index = UINT_MAX; 415 __LINE__);
526 416 break;
527 for (dev_index = start_dev_index; dev_index < num_dev; dev_index++) { 417 }
528 enum ps3_dev_type x;
529
530 result = ps3_repository_read_dev_type(bus_index, dev_index,
531 &x);
532
533 if (result) {
534 pr_debug("%s:%d read_dev_type failed\n",
535 __func__, __LINE__);
536 return result;
537 } 418 }
538 419 break;
539 if (x == dev_type)
540 break;
541 }
542
543 if (dev_index == num_dev)
544 return -1;
545
546 pr_debug("%s:%d: found dev_type %u at dev_index %u\n",
547 __func__, __LINE__, dev_type, dev_index);
548
549 result = ps3_repository_read_dev_id(bus_index, dev_index,
550 &dev->did.dev_id);
551
552 if (result) {
553 pr_debug("%s:%d read_dev_id failed\n",
554 __func__, __LINE__);
555 return result;
556 } 420 }
557 421
558 dev->dev_index = dev_index; 422 pr_debug(" <- %s:%d\n", __func__, __LINE__);
559
560 pr_debug("%s:%d found: dev_id %u\n", __func__, __LINE__,
561 dev->did.dev_id);
562
563 return result; 423 return result;
564} 424}
565 425
566int ps3_repository_find_device (enum ps3_bus_type bus_type, 426int ps3_repository_find_bus(enum ps3_bus_type bus_type, unsigned int from,
567 enum ps3_dev_type dev_type, 427 unsigned int *bus_index)
568 const struct ps3_repository_device *start_dev,
569 struct ps3_repository_device *dev)
570{ 428{
571 int result = 0; 429 unsigned int i;
572 unsigned int bus_index; 430 enum ps3_bus_type type;
573 unsigned int num_dev; 431 int error;
574
575 pr_debug("%s:%d: find bus_type %u, dev_type %u\n", __func__, __LINE__,
576 bus_type, dev_type);
577
578 BUG_ON(start_dev && start_dev->bus_index > 10);
579
580 for (bus_index = start_dev ? start_dev->bus_index : 0; bus_index < 10;
581 bus_index++) {
582 enum ps3_bus_type x;
583
584 result = ps3_repository_read_bus_type(bus_index, &x);
585 432
586 if (result) { 433 for (i = from; i < 10; i++) {
434 error = ps3_repository_read_bus_type(i, &type);
435 if (error) {
587 pr_debug("%s:%d read_bus_type failed\n", 436 pr_debug("%s:%d read_bus_type failed\n",
588 __func__, __LINE__); 437 __func__, __LINE__);
589 dev->bus_index = UINT_MAX; 438 *bus_index = UINT_MAX;
590 return result; 439 return error;
440 }
441 if (type == bus_type) {
442 *bus_index = i;
443 return 0;
591 } 444 }
592 if (x == bus_type)
593 break;
594 }
595
596 if (bus_index >= 10)
597 return -ENODEV;
598
599 pr_debug("%s:%d: found bus_type %u at bus_index %u\n",
600 __func__, __LINE__, bus_type, bus_index);
601
602 result = ps3_repository_read_bus_num_dev(bus_index, &num_dev);
603
604 if (result) {
605 pr_debug("%s:%d read_bus_num_dev failed\n",
606 __func__, __LINE__);
607 return result;
608 }
609
610 result = find_device(bus_index, num_dev, start_dev
611 ? start_dev->dev_index + 1 : 0, dev_type, dev);
612
613 if (result) {
614 pr_debug("%s:%d get_did failed\n", __func__, __LINE__);
615 return result;
616 }
617
618 result = ps3_repository_read_bus_id(bus_index, &dev->did.bus_id);
619
620 if (result) {
621 pr_debug("%s:%d read_bus_id failed\n",
622 __func__, __LINE__);
623 return result;
624 } 445 }
625 446 *bus_index = UINT_MAX;
626 dev->bus_index = bus_index; 447 return -ENODEV;
627
628 pr_debug("%s:%d found: bus_id %u, dev_id %u\n",
629 __func__, __LINE__, dev->did.bus_id, dev->did.dev_id);
630
631 return result;
632} 448}
633 449
634int ps3_repository_find_interrupt(const struct ps3_repository_device *dev, 450int ps3_repository_find_interrupt(const struct ps3_repository_device *repo,
635 enum ps3_interrupt_type intr_type, unsigned int *interrupt_id) 451 enum ps3_interrupt_type intr_type, unsigned int *interrupt_id)
636{ 452{
637 int result = 0; 453 int result = 0;
@@ -645,8 +461,8 @@ int ps3_repository_find_interrupt(const struct ps3_repository_device *dev,
645 enum ps3_interrupt_type t; 461 enum ps3_interrupt_type t;
646 unsigned int id; 462 unsigned int id;
647 463
648 result = ps3_repository_read_dev_intr(dev->bus_index, 464 result = ps3_repository_read_dev_intr(repo->bus_index,
649 dev->dev_index, res_index, &t, &id); 465 repo->dev_index, res_index, &t, &id);
650 466
651 if (result) { 467 if (result) {
652 pr_debug("%s:%d read_dev_intr failed\n", 468 pr_debug("%s:%d read_dev_intr failed\n",
@@ -669,7 +485,7 @@ int ps3_repository_find_interrupt(const struct ps3_repository_device *dev,
669 return result; 485 return result;
670} 486}
671 487
672int ps3_repository_find_reg(const struct ps3_repository_device *dev, 488int ps3_repository_find_reg(const struct ps3_repository_device *repo,
673 enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len) 489 enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len)
674{ 490{
675 int result = 0; 491 int result = 0;
@@ -684,8 +500,8 @@ int ps3_repository_find_reg(const struct ps3_repository_device *dev,
684 u64 a; 500 u64 a;
685 u64 l; 501 u64 l;
686 502
687 result = ps3_repository_read_dev_reg(dev->bus_index, 503 result = ps3_repository_read_dev_reg(repo->bus_index,
688 dev->dev_index, res_index, &t, &a, &l); 504 repo->dev_index, res_index, &t, &a, &l);
689 505
690 if (result) { 506 if (result) {
691 pr_debug("%s:%d read_dev_reg failed\n", 507 pr_debug("%s:%d read_dev_reg failed\n",
@@ -965,6 +781,36 @@ int ps3_repository_read_boot_dat_size(unsigned int *size)
965 return result; 781 return result;
966} 782}
967 783
784int ps3_repository_read_vuart_av_port(unsigned int *port)
785{
786 int result;
787 u64 v1;
788
789 result = read_node(PS3_LPAR_ID_CURRENT,
790 make_first_field("bi", 0),
791 make_field("vir_uart", 0),
792 make_field("port", 0),
793 make_field("avset", 0),
794 &v1, 0);
795 *port = v1;
796 return result;
797}
798
799int ps3_repository_read_vuart_sysmgr_port(unsigned int *port)
800{
801 int result;
802 u64 v1;
803
804 result = read_node(PS3_LPAR_ID_CURRENT,
805 make_first_field("bi", 0),
806 make_field("vir_uart", 0),
807 make_field("port", 0),
808 make_field("sysmgr", 0),
809 &v1, 0);
810 *port = v1;
811 return result;
812}
813
968/** 814/**
969 * ps3_repository_read_boot_dat_info - Get address and size of cell_ext_os_area. 815 * ps3_repository_read_boot_dat_info - Get address and size of cell_ext_os_area.
970 * address: lpar address of cell_ext_os_area 816 * address: lpar address of cell_ext_os_area
@@ -1026,3 +872,205 @@ int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq)
1026 return result ? result 872 return result ? result
1027 : ps3_repository_read_tb_freq(node_id, tb_freq); 873 : ps3_repository_read_tb_freq(node_id, tb_freq);
1028} 874}
875
876#if defined(DEBUG)
877
878int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo)
879{
880 int result = 0;
881 unsigned int res_index;
882
883 pr_debug(" -> %s:%d: (%u:%u)\n", __func__, __LINE__,
884 repo->bus_index, repo->dev_index);
885
886 for (res_index = 0; res_index < 10; res_index++) {
887 enum ps3_interrupt_type intr_type;
888 unsigned int interrupt_id;
889
890 result = ps3_repository_read_dev_intr(repo->bus_index,
891 repo->dev_index, res_index, &intr_type, &interrupt_id);
892
893 if (result) {
894 if (result != LV1_NO_ENTRY)
895 pr_debug("%s:%d ps3_repository_read_dev_intr"
896 " (%u:%u) failed\n", __func__, __LINE__,
897 repo->bus_index, repo->dev_index);
898 break;
899 }
900
901 pr_debug("%s:%d (%u:%u) intr_type %u, interrupt_id %u\n",
902 __func__, __LINE__, repo->bus_index, repo->dev_index,
903 intr_type, interrupt_id);
904 }
905
906 for (res_index = 0; res_index < 10; res_index++) {
907 enum ps3_reg_type reg_type;
908 u64 bus_addr;
909 u64 len;
910
911 result = ps3_repository_read_dev_reg(repo->bus_index,
912 repo->dev_index, res_index, &reg_type, &bus_addr, &len);
913
914 if (result) {
915 if (result != LV1_NO_ENTRY)
916 pr_debug("%s:%d ps3_repository_read_dev_reg"
917 " (%u:%u) failed\n", __func__, __LINE__,
918 repo->bus_index, repo->dev_index);
919 break;
920 }
921
922 pr_debug("%s:%d (%u:%u) reg_type %u, bus_addr %lxh, len %lxh\n",
923 __func__, __LINE__, repo->bus_index, repo->dev_index,
924 reg_type, bus_addr, len);
925 }
926
927 pr_debug(" <- %s:%d\n", __func__, __LINE__);
928 return result;
929}
930
931static int dump_stor_dev_info(struct ps3_repository_device *repo)
932{
933 int result = 0;
934 unsigned int num_regions, region_index;
935 u64 port, blk_size, num_blocks;
936
937 pr_debug(" -> %s:%d: (%u:%u)\n", __func__, __LINE__,
938 repo->bus_index, repo->dev_index);
939
940 result = ps3_repository_read_stor_dev_info(repo->bus_index,
941 repo->dev_index, &port, &blk_size, &num_blocks, &num_regions);
942 if (result) {
943 pr_debug("%s:%d ps3_repository_read_stor_dev_info"
944 " (%u:%u) failed\n", __func__, __LINE__,
945 repo->bus_index, repo->dev_index);
946 goto out;
947 }
948
949 pr_debug("%s:%d (%u:%u): port %lu, blk_size %lu, num_blocks "
950 "%lu, num_regions %u\n",
951 __func__, __LINE__, repo->bus_index, repo->dev_index, port,
952 blk_size, num_blocks, num_regions);
953
954 for (region_index = 0; region_index < num_regions; region_index++) {
955 unsigned int region_id;
956 u64 region_start, region_size;
957
958 result = ps3_repository_read_stor_dev_region(repo->bus_index,
959 repo->dev_index, region_index, &region_id,
960 &region_start, &region_size);
961 if (result) {
962 pr_debug("%s:%d ps3_repository_read_stor_dev_region"
963 " (%u:%u) failed\n", __func__, __LINE__,
964 repo->bus_index, repo->dev_index);
965 break;
966 }
967
968 pr_debug("%s:%d (%u:%u) region_id %u, start %lxh, size %lxh\n",
969 __func__, __LINE__, repo->bus_index, repo->dev_index,
970 region_id, region_start, region_size);
971 }
972
973out:
974 pr_debug(" <- %s:%d\n", __func__, __LINE__);
975 return result;
976}
977
978static int dump_device_info(struct ps3_repository_device *repo,
979 unsigned int num_dev)
980{
981 int result = 0;
982
983 pr_debug(" -> %s:%d: bus_%u\n", __func__, __LINE__, repo->bus_index);
984
985 for (repo->dev_index = 0; repo->dev_index < num_dev;
986 repo->dev_index++) {
987
988 result = ps3_repository_read_dev_type(repo->bus_index,
989 repo->dev_index, &repo->dev_type);
990
991 if (result) {
992 pr_debug("%s:%d ps3_repository_read_dev_type"
993 " (%u:%u) failed\n", __func__, __LINE__,
994 repo->bus_index, repo->dev_index);
995 break;
996 }
997
998 result = ps3_repository_read_dev_id(repo->bus_index,
999 repo->dev_index, &repo->dev_id);
1000
1001 if (result) {
1002 pr_debug("%s:%d ps3_repository_read_dev_id"
1003 " (%u:%u) failed\n", __func__, __LINE__,
1004 repo->bus_index, repo->dev_index);
1005 continue;
1006 }
1007
1008 pr_debug("%s:%d (%u:%u): dev_type %u, dev_id %u\n", __func__,
1009 __LINE__, repo->bus_index, repo->dev_index,
1010 repo->dev_type, repo->dev_id);
1011
1012 ps3_repository_dump_resource_info(repo);
1013
1014 if (repo->bus_type == PS3_BUS_TYPE_STORAGE)
1015 dump_stor_dev_info(repo);
1016 }
1017
1018 pr_debug(" <- %s:%d\n", __func__, __LINE__);
1019 return result;
1020}
1021
1022int ps3_repository_dump_bus_info(void)
1023{
1024 int result = 0;
1025 struct ps3_repository_device repo;
1026
1027 pr_debug(" -> %s:%d\n", __func__, __LINE__);
1028
1029 memset(&repo, 0, sizeof(repo));
1030
1031 for (repo.bus_index = 0; repo.bus_index < 10; repo.bus_index++) {
1032 unsigned int num_dev;
1033
1034 result = ps3_repository_read_bus_type(repo.bus_index,
1035 &repo.bus_type);
1036
1037 if (result) {
1038 pr_debug("%s:%d read_bus_type(%u) failed\n",
1039 __func__, __LINE__, repo.bus_index);
1040 break;
1041 }
1042
1043 result = ps3_repository_read_bus_id(repo.bus_index,
1044 &repo.bus_id);
1045
1046 if (result) {
1047 pr_debug("%s:%d read_bus_id(%u) failed\n",
1048 __func__, __LINE__, repo.bus_index);
1049 continue;
1050 }
1051
1052 if (repo.bus_index != repo.bus_id)
1053 pr_debug("%s:%d bus_index != bus_id\n",
1054 __func__, __LINE__);
1055
1056 result = ps3_repository_read_bus_num_dev(repo.bus_index,
1057 &num_dev);
1058
1059 if (result) {
1060 pr_debug("%s:%d read_bus_num_dev(%u) failed\n",
1061 __func__, __LINE__, repo.bus_index);
1062 continue;
1063 }
1064
1065 pr_debug("%s:%d bus_%u: bus_type %u, bus_id %u, num_dev %u\n",
1066 __func__, __LINE__, repo.bus_index, repo.bus_type,
1067 repo.bus_id, num_dev);
1068
1069 dump_device_info(&repo, num_dev);
1070 }
1071
1072 pr_debug(" <- %s:%d\n", __func__, __LINE__);
1073 return result;
1074}
1075
1076#endif /* defined(DEBUG) */
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index 935396766621..aa05288de64e 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -37,27 +37,35 @@
37#include "platform.h" 37#include "platform.h"
38 38
39#if defined(DEBUG) 39#if defined(DEBUG)
40#define DBG(fmt...) udbg_printf(fmt) 40#define DBG udbg_printf
41#else 41#else
42#define DBG(fmt...) do{if(0)printk(fmt);}while(0) 42#define DBG pr_debug
43#endif 43#endif
44 44
45#if !defined(CONFIG_SMP) 45#if !defined(CONFIG_SMP)
46static void smp_send_stop(void) {} 46static void smp_send_stop(void) {}
47#endif 47#endif
48 48
49int ps3_get_firmware_version(union ps3_firmware_version *v) 49static union ps3_firmware_version ps3_firmware_version;
50
51void ps3_get_firmware_version(union ps3_firmware_version *v)
50{ 52{
51 int result = lv1_get_version_info(&v->raw); 53 *v = ps3_firmware_version;
54}
55EXPORT_SYMBOL_GPL(ps3_get_firmware_version);
52 56
53 if (result) { 57int ps3_compare_firmware_version(u16 major, u16 minor, u16 rev)
54 v->raw = 0; 58{
55 return -1; 59 union ps3_firmware_version x;
56 } 60
61 x.pad = 0;
62 x.major = major;
63 x.minor = minor;
64 x.rev = rev;
57 65
58 return result; 66 return (ps3_firmware_version.raw - x.raw);
59} 67}
60EXPORT_SYMBOL_GPL(ps3_get_firmware_version); 68EXPORT_SYMBOL_GPL(ps3_compare_firmware_version);
61 69
62static void ps3_power_save(void) 70static void ps3_power_save(void)
63{ 71{
@@ -99,7 +107,8 @@ static void ps3_panic(char *str)
99 while(1); 107 while(1);
100} 108}
101 109
102#ifdef CONFIG_FB_PS3 110#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \
111 defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
103static void prealloc(struct ps3_prealloc *p) 112static void prealloc(struct ps3_prealloc *p)
104{ 113{
105 if (!p->size) 114 if (!p->size)
@@ -115,12 +124,15 @@ static void prealloc(struct ps3_prealloc *p)
115 printk(KERN_INFO "%s: %lu bytes at %p\n", p->name, p->size, 124 printk(KERN_INFO "%s: %lu bytes at %p\n", p->name, p->size,
116 p->address); 125 p->address);
117} 126}
127#endif
118 128
129#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE)
119struct ps3_prealloc ps3fb_videomemory = { 130struct ps3_prealloc ps3fb_videomemory = {
120 .name = "ps3fb videomemory", 131 .name = "ps3fb videomemory",
121 .size = CONFIG_FB_PS3_DEFAULT_SIZE_M*1024*1024, 132 .size = CONFIG_FB_PS3_DEFAULT_SIZE_M*1024*1024,
122 .align = 1024*1024 /* the GPU requires 1 MiB alignment */ 133 .align = 1024*1024 /* the GPU requires 1 MiB alignment */
123}; 134};
135EXPORT_SYMBOL_GPL(ps3fb_videomemory);
124#define prealloc_ps3fb_videomemory() prealloc(&ps3fb_videomemory) 136#define prealloc_ps3fb_videomemory() prealloc(&ps3fb_videomemory)
125 137
126static int __init early_parse_ps3fb(char *p) 138static int __init early_parse_ps3fb(char *p)
@@ -137,6 +149,30 @@ early_param("ps3fb", early_parse_ps3fb);
137#define prealloc_ps3fb_videomemory() do { } while (0) 149#define prealloc_ps3fb_videomemory() do { } while (0)
138#endif 150#endif
139 151
152#if defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
153struct ps3_prealloc ps3flash_bounce_buffer = {
154 .name = "ps3flash bounce buffer",
155 .size = 256*1024,
156 .align = 256*1024
157};
158EXPORT_SYMBOL_GPL(ps3flash_bounce_buffer);
159#define prealloc_ps3flash_bounce_buffer() prealloc(&ps3flash_bounce_buffer)
160
161static int __init early_parse_ps3flash(char *p)
162{
163 if (!p)
164 return 1;
165
166 if (!strcmp(p, "off"))
167 ps3flash_bounce_buffer.size = 0;
168
169 return 0;
170}
171early_param("ps3flash", early_parse_ps3flash);
172#else
173#define prealloc_ps3flash_bounce_buffer() do { } while (0)
174#endif
175
140static int ps3_set_dabr(u64 dabr) 176static int ps3_set_dabr(u64 dabr)
141{ 177{
142 enum {DABR_USER = 1, DABR_KERNEL = 2,}; 178 enum {DABR_USER = 1, DABR_KERNEL = 2,};
@@ -146,13 +182,13 @@ static int ps3_set_dabr(u64 dabr)
146 182
147static void __init ps3_setup_arch(void) 183static void __init ps3_setup_arch(void)
148{ 184{
149 union ps3_firmware_version v;
150 185
151 DBG(" -> %s:%d\n", __func__, __LINE__); 186 DBG(" -> %s:%d\n", __func__, __LINE__);
152 187
153 ps3_get_firmware_version(&v); 188 lv1_get_version_info(&ps3_firmware_version.raw);
154 printk(KERN_INFO "PS3 firmware version %u.%u.%u\n", v.major, v.minor, 189 printk(KERN_INFO "PS3 firmware version %u.%u.%u\n",
155 v.rev); 190 ps3_firmware_version.major, ps3_firmware_version.minor,
191 ps3_firmware_version.rev);
156 192
157 ps3_spu_set_platform(); 193 ps3_spu_set_platform();
158 ps3_map_htab(); 194 ps3_map_htab();
@@ -166,6 +202,8 @@ static void __init ps3_setup_arch(void)
166#endif 202#endif
167 203
168 prealloc_ps3fb_videomemory(); 204 prealloc_ps3fb_videomemory();
205 prealloc_ps3flash_bounce_buffer();
206
169 ppc_md.power_save = ps3_power_save; 207 ppc_md.power_save = ps3_power_save;
170 208
171 DBG(" <- %s:%d\n", __func__, __LINE__); 209 DBG(" <- %s:%d\n", __func__, __LINE__);
@@ -184,7 +222,7 @@ static int __init ps3_probe(void)
184 DBG(" -> %s:%d\n", __func__, __LINE__); 222 DBG(" -> %s:%d\n", __func__, __LINE__);
185 223
186 dt_root = of_get_flat_dt_root(); 224 dt_root = of_get_flat_dt_root();
187 if (!of_flat_dt_is_compatible(dt_root, "PS3")) 225 if (!of_flat_dt_is_compatible(dt_root, "sony,ps3"))
188 return 0; 226 return 0;
189 227
190 powerpc_firmware_features |= FW_FEATURE_PS3_POSSIBLE; 228 powerpc_firmware_features |= FW_FEATURE_PS3_POSSIBLE;
@@ -201,31 +239,12 @@ static int __init ps3_probe(void)
201#if defined(CONFIG_KEXEC) 239#if defined(CONFIG_KEXEC)
202static void ps3_kexec_cpu_down(int crash_shutdown, int secondary) 240static void ps3_kexec_cpu_down(int crash_shutdown, int secondary)
203{ 241{
204 DBG(" -> %s:%d\n", __func__, __LINE__); 242 int cpu = smp_processor_id();
205
206 if (secondary) {
207 int cpu;
208 for_each_online_cpu(cpu)
209 if (cpu)
210 ps3_smp_cleanup_cpu(cpu);
211 } else
212 ps3_smp_cleanup_cpu(0);
213
214 DBG(" <- %s:%d\n", __func__, __LINE__);
215}
216
217static void ps3_machine_kexec(struct kimage *image)
218{
219 unsigned long ppe_id;
220
221 DBG(" -> %s:%d\n", __func__, __LINE__);
222 243
223 lv1_get_logical_ppe_id(&ppe_id); 244 DBG(" -> %s:%d: (%d)\n", __func__, __LINE__, cpu);
224 lv1_configure_irq_state_bitmap(ppe_id, 0, 0);
225 ps3_mm_shutdown();
226 ps3_mm_vas_destroy();
227 245
228 default_machine_kexec(image); 246 ps3_smp_cleanup_cpu(cpu);
247 ps3_shutdown_IRQ(cpu);
229 248
230 DBG(" <- %s:%d\n", __func__, __LINE__); 249 DBG(" <- %s:%d\n", __func__, __LINE__);
231} 250}
@@ -247,7 +266,7 @@ define_machine(ps3) {
247 .power_off = ps3_power_off, 266 .power_off = ps3_power_off,
248#if defined(CONFIG_KEXEC) 267#if defined(CONFIG_KEXEC)
249 .kexec_cpu_down = ps3_kexec_cpu_down, 268 .kexec_cpu_down = ps3_kexec_cpu_down,
250 .machine_kexec = ps3_machine_kexec, 269 .machine_kexec = default_machine_kexec,
251 .machine_kexec_prepare = default_machine_kexec_prepare, 270 .machine_kexec_prepare = default_machine_kexec_prepare,
252 .machine_crash_shutdown = default_machine_crash_shutdown, 271 .machine_crash_shutdown = default_machine_crash_shutdown,
253#endif 272#endif
diff --git a/arch/powerpc/platforms/ps3/smp.c b/arch/powerpc/platforms/ps3/smp.c
index 53416ec5198b..f0b12f212363 100644
--- a/arch/powerpc/platforms/ps3/smp.c
+++ b/arch/powerpc/platforms/ps3/smp.c
@@ -27,9 +27,9 @@
27#include "platform.h" 27#include "platform.h"
28 28
29#if defined(DEBUG) 29#if defined(DEBUG)
30#define DBG(fmt...) udbg_printf(fmt) 30#define DBG udbg_printf
31#else 31#else
32#define DBG(fmt...) do{if(0)printk(fmt);}while(0) 32#define DBG pr_debug
33#endif 33#endif
34 34
35static irqreturn_t ipi_function_handler(int irq, void *msg) 35static irqreturn_t ipi_function_handler(int irq, void *msg)
@@ -39,11 +39,11 @@ static irqreturn_t ipi_function_handler(int irq, void *msg)
39} 39}
40 40
41/** 41/**
42 * virqs - a per cpu array of virqs for ipi use 42 * ps3_ipi_virqs - a per cpu array of virqs for ipi use
43 */ 43 */
44 44
45#define MSG_COUNT 4 45#define MSG_COUNT 4
46static DEFINE_PER_CPU(unsigned int, virqs[MSG_COUNT]); 46static DEFINE_PER_CPU(unsigned int, ps3_ipi_virqs[MSG_COUNT]);
47 47
48static const char *names[MSG_COUNT] = { 48static const char *names[MSG_COUNT] = {
49 "ipi call", 49 "ipi call",
@@ -62,7 +62,7 @@ static void do_message_pass(int target, int msg)
62 return; 62 return;
63 } 63 }
64 64
65 virq = per_cpu(virqs, target)[msg]; 65 virq = per_cpu(ps3_ipi_virqs, target)[msg];
66 result = ps3_send_event_locally(virq); 66 result = ps3_send_event_locally(virq);
67 67
68 if (result) 68 if (result)
@@ -94,13 +94,13 @@ static int ps3_smp_probe(void)
94static void __init ps3_smp_setup_cpu(int cpu) 94static void __init ps3_smp_setup_cpu(int cpu)
95{ 95{
96 int result; 96 int result;
97 unsigned int *virqs = per_cpu(virqs, cpu); 97 unsigned int *virqs = per_cpu(ps3_ipi_virqs, cpu);
98 int i; 98 int i;
99 99
100 DBG(" -> %s:%d: (%d)\n", __func__, __LINE__, cpu); 100 DBG(" -> %s:%d: (%d)\n", __func__, __LINE__, cpu);
101 101
102 /* 102 /*
103 * Check assumptions on virqs[] indexing. If this 103 * Check assumptions on ps3_ipi_virqs[] indexing. If this
104 * check fails, then a different mapping of PPC_MSG_ 104 * check fails, then a different mapping of PPC_MSG_
105 * to index needs to be setup. 105 * to index needs to be setup.
106 */ 106 */
@@ -132,13 +132,13 @@ static void __init ps3_smp_setup_cpu(int cpu)
132 132
133void ps3_smp_cleanup_cpu(int cpu) 133void ps3_smp_cleanup_cpu(int cpu)
134{ 134{
135 unsigned int *virqs = per_cpu(virqs, cpu); 135 unsigned int *virqs = per_cpu(ps3_ipi_virqs, cpu);
136 int i; 136 int i;
137 137
138 DBG(" -> %s:%d: (%d)\n", __func__, __LINE__, cpu); 138 DBG(" -> %s:%d: (%d)\n", __func__, __LINE__, cpu);
139 139
140 for (i = 0; i < MSG_COUNT; i++) { 140 for (i = 0; i < MSG_COUNT; i++) {
141 free_irq(virqs[i], (void*)(long)i); 141 /* Can't call free_irq from interrupt context. */
142 ps3_event_receive_port_destroy(virqs[i]); 142 ps3_event_receive_port_destroy(virqs[i]);
143 virqs[i] = NO_IRQ; 143 virqs[i] = NO_IRQ;
144 } 144 }
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c
index 651437cb2c18..502d80ed982b 100644
--- a/arch/powerpc/platforms/ps3/spu.c
+++ b/arch/powerpc/platforms/ps3/spu.c
@@ -182,15 +182,18 @@ static int __init setup_areas(struct spu *spu)
182{ 182{
183 struct table {char* name; unsigned long addr; unsigned long size;}; 183 struct table {char* name; unsigned long addr; unsigned long size;};
184 184
185 spu_pdata(spu)->shadow = __ioremap( 185 spu_pdata(spu)->shadow = ioremap_flags(spu_pdata(spu)->shadow_addr,
186 spu_pdata(spu)->shadow_addr, sizeof(struct spe_shadow), 186 sizeof(struct spe_shadow),
187 pgprot_val(PAGE_READONLY) | _PAGE_NO_CACHE | _PAGE_GUARDED); 187 pgprot_val(PAGE_READONLY) |
188 _PAGE_NO_CACHE);
188 if (!spu_pdata(spu)->shadow) { 189 if (!spu_pdata(spu)->shadow) {
189 pr_debug("%s:%d: ioremap shadow failed\n", __func__, __LINE__); 190 pr_debug("%s:%d: ioremap shadow failed\n", __func__, __LINE__);
190 goto fail_ioremap; 191 goto fail_ioremap;
191 } 192 }
192 193
193 spu->local_store = ioremap(spu->local_store_phys, LS_SIZE); 194 spu->local_store = (__force void *)ioremap_flags(spu->local_store_phys,
195 LS_SIZE, _PAGE_NO_CACHE);
196
194 if (!spu->local_store) { 197 if (!spu->local_store) {
195 pr_debug("%s:%d: ioremap local_store failed\n", 198 pr_debug("%s:%d: ioremap local_store failed\n",
196 __func__, __LINE__); 199 __func__, __LINE__);
@@ -199,6 +202,7 @@ static int __init setup_areas(struct spu *spu)
199 202
200 spu->problem = ioremap(spu->problem_phys, 203 spu->problem = ioremap(spu->problem_phys,
201 sizeof(struct spu_problem)); 204 sizeof(struct spu_problem));
205
202 if (!spu->problem) { 206 if (!spu->problem) {
203 pr_debug("%s:%d: ioremap problem failed\n", __func__, __LINE__); 207 pr_debug("%s:%d: ioremap problem failed\n", __func__, __LINE__);
204 goto fail_ioremap; 208 goto fail_ioremap;
@@ -206,6 +210,7 @@ static int __init setup_areas(struct spu *spu)
206 210
207 spu->priv2 = ioremap(spu_pdata(spu)->priv2_addr, 211 spu->priv2 = ioremap(spu_pdata(spu)->priv2_addr,
208 sizeof(struct spu_priv2)); 212 sizeof(struct spu_priv2));
213
209 if (!spu->priv2) { 214 if (!spu->priv2) {
210 pr_debug("%s:%d: ioremap priv2 failed\n", __func__, __LINE__); 215 pr_debug("%s:%d: ioremap priv2 failed\n", __func__, __LINE__);
211 goto fail_ioremap; 216 goto fail_ioremap;
@@ -400,11 +405,13 @@ static int __init ps3_enumerate_spus(int (*fn)(void *data))
400 } 405 }
401 } 406 }
402 407
403 if (result) 408 if (result) {
404 printk(KERN_WARNING "%s:%d: Error initializing spus\n", 409 printk(KERN_WARNING "%s:%d: Error initializing spus\n",
405 __func__, __LINE__); 410 __func__, __LINE__);
411 return result;
412 }
406 413
407 return result; 414 return num_resource_id;
408} 415}
409 416
410const struct spu_management_ops spu_management_ps3_ops = { 417const struct spu_management_ops spu_management_ps3_ops = {
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index 6bda51027cc6..4bb634a17e43 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -30,22 +30,228 @@
30 30
31#include "platform.h" 31#include "platform.h"
32 32
33static struct device ps3_system_bus = {
34 .bus_id = "ps3_system",
35};
36
37/* FIXME: need device usage counters! */
38struct {
39 struct mutex mutex;
40 int sb_11; /* usb 0 */
41 int sb_12; /* usb 0 */
42 int gpu;
43} static usage_hack;
44
45static int ps3_is_device(struct ps3_system_bus_device *dev,
46 unsigned int bus_id, unsigned int dev_id)
47{
48 return dev->bus_id == bus_id && dev->dev_id == dev_id;
49}
50
51static int ps3_open_hv_device_sb(struct ps3_system_bus_device *dev)
52{
53 int result;
54
55 BUG_ON(!dev->bus_id);
56 mutex_lock(&usage_hack.mutex);
57
58 if (ps3_is_device(dev, 1, 1)) {
59 usage_hack.sb_11++;
60 if (usage_hack.sb_11 > 1) {
61 result = 0;
62 goto done;
63 }
64 }
65
66 if (ps3_is_device(dev, 1, 2)) {
67 usage_hack.sb_12++;
68 if (usage_hack.sb_12 > 1) {
69 result = 0;
70 goto done;
71 }
72 }
73
74 result = lv1_open_device(dev->bus_id, dev->dev_id, 0);
75
76 if (result) {
77 pr_debug("%s:%d: lv1_open_device failed: %s\n", __func__,
78 __LINE__, ps3_result(result));
79 result = -EPERM;
80 }
81
82done:
83 mutex_unlock(&usage_hack.mutex);
84 return result;
85}
86
87static int ps3_close_hv_device_sb(struct ps3_system_bus_device *dev)
88{
89 int result;
90
91 BUG_ON(!dev->bus_id);
92 mutex_lock(&usage_hack.mutex);
93
94 if (ps3_is_device(dev, 1, 1)) {
95 usage_hack.sb_11--;
96 if (usage_hack.sb_11) {
97 result = 0;
98 goto done;
99 }
100 }
101
102 if (ps3_is_device(dev, 1, 2)) {
103 usage_hack.sb_12--;
104 if (usage_hack.sb_12) {
105 result = 0;
106 goto done;
107 }
108 }
109
110 result = lv1_close_device(dev->bus_id, dev->dev_id);
111 BUG_ON(result);
112
113done:
114 mutex_unlock(&usage_hack.mutex);
115 return result;
116}
117
118static int ps3_open_hv_device_gpu(struct ps3_system_bus_device *dev)
119{
120 int result;
121
122 mutex_lock(&usage_hack.mutex);
123
124 usage_hack.gpu++;
125 if (usage_hack.gpu > 1) {
126 result = 0;
127 goto done;
128 }
129
130 result = lv1_gpu_open(0);
131
132 if (result) {
133 pr_debug("%s:%d: lv1_gpu_open failed: %s\n", __func__,
134 __LINE__, ps3_result(result));
135 result = -EPERM;
136 }
137
138done:
139 mutex_unlock(&usage_hack.mutex);
140 return result;
141}
142
143static int ps3_close_hv_device_gpu(struct ps3_system_bus_device *dev)
144{
145 int result;
146
147 mutex_lock(&usage_hack.mutex);
148
149 usage_hack.gpu--;
150 if (usage_hack.gpu) {
151 result = 0;
152 goto done;
153 }
154
155 result = lv1_gpu_close();
156 BUG_ON(result);
157
158done:
159 mutex_unlock(&usage_hack.mutex);
160 return result;
161}
162
163int ps3_open_hv_device(struct ps3_system_bus_device *dev)
164{
165 BUG_ON(!dev);
166 pr_debug("%s:%d: match_id: %u\n", __func__, __LINE__, dev->match_id);
167
168 switch (dev->match_id) {
169 case PS3_MATCH_ID_EHCI:
170 case PS3_MATCH_ID_OHCI:
171 case PS3_MATCH_ID_GELIC:
172 case PS3_MATCH_ID_STOR_DISK:
173 case PS3_MATCH_ID_STOR_ROM:
174 case PS3_MATCH_ID_STOR_FLASH:
175 return ps3_open_hv_device_sb(dev);
176
177 case PS3_MATCH_ID_SOUND:
178 case PS3_MATCH_ID_GRAPHICS:
179 return ps3_open_hv_device_gpu(dev);
180
181 case PS3_MATCH_ID_AV_SETTINGS:
182 case PS3_MATCH_ID_SYSTEM_MANAGER:
183 pr_debug("%s:%d: unsupported match_id: %u\n", __func__,
184 __LINE__, dev->match_id);
185 pr_debug("%s:%d: bus_id: %u\n", __func__,
186 __LINE__, dev->bus_id);
187 BUG();
188 return -EINVAL;
189
190 default:
191 break;
192 }
193
194 pr_debug("%s:%d: unknown match_id: %u\n", __func__, __LINE__,
195 dev->match_id);
196 BUG();
197 return -ENODEV;
198}
199EXPORT_SYMBOL_GPL(ps3_open_hv_device);
200
201int ps3_close_hv_device(struct ps3_system_bus_device *dev)
202{
203 BUG_ON(!dev);
204 pr_debug("%s:%d: match_id: %u\n", __func__, __LINE__, dev->match_id);
205
206 switch (dev->match_id) {
207 case PS3_MATCH_ID_EHCI:
208 case PS3_MATCH_ID_OHCI:
209 case PS3_MATCH_ID_GELIC:
210 case PS3_MATCH_ID_STOR_DISK:
211 case PS3_MATCH_ID_STOR_ROM:
212 case PS3_MATCH_ID_STOR_FLASH:
213 return ps3_close_hv_device_sb(dev);
214
215 case PS3_MATCH_ID_SOUND:
216 case PS3_MATCH_ID_GRAPHICS:
217 return ps3_close_hv_device_gpu(dev);
218
219 case PS3_MATCH_ID_AV_SETTINGS:
220 case PS3_MATCH_ID_SYSTEM_MANAGER:
221 pr_debug("%s:%d: unsupported match_id: %u\n", __func__,
222 __LINE__, dev->match_id);
223 pr_debug("%s:%d: bus_id: %u\n", __func__,
224 __LINE__, dev->bus_id);
225 BUG();
226 return -EINVAL;
227
228 default:
229 break;
230 }
231
232 pr_debug("%s:%d: unknown match_id: %u\n", __func__, __LINE__,
233 dev->match_id);
234 BUG();
235 return -ENODEV;
236}
237EXPORT_SYMBOL_GPL(ps3_close_hv_device);
238
33#define dump_mmio_region(_a) _dump_mmio_region(_a, __func__, __LINE__) 239#define dump_mmio_region(_a) _dump_mmio_region(_a, __func__, __LINE__)
34static void _dump_mmio_region(const struct ps3_mmio_region* r, 240static void _dump_mmio_region(const struct ps3_mmio_region* r,
35 const char* func, int line) 241 const char* func, int line)
36{ 242{
37 pr_debug("%s:%d: dev %u:%u\n", func, line, r->did.bus_id, 243 pr_debug("%s:%d: dev %u:%u\n", func, line, r->dev->bus_id,
38 r->did.dev_id); 244 r->dev->dev_id);
39 pr_debug("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr); 245 pr_debug("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr);
40 pr_debug("%s:%d: len %lxh\n", func, line, r->len); 246 pr_debug("%s:%d: len %lxh\n", func, line, r->len);
41 pr_debug("%s:%d: lpar_addr %lxh\n", func, line, r->lpar_addr); 247 pr_debug("%s:%d: lpar_addr %lxh\n", func, line, r->lpar_addr);
42} 248}
43 249
44int ps3_mmio_region_create(struct ps3_mmio_region *r) 250static int ps3_sb_mmio_region_create(struct ps3_mmio_region *r)
45{ 251{
46 int result; 252 int result;
47 253
48 result = lv1_map_device_mmio_region(r->did.bus_id, r->did.dev_id, 254 result = lv1_map_device_mmio_region(r->dev->bus_id, r->dev->dev_id,
49 r->bus_addr, r->len, r->page_size, &r->lpar_addr); 255 r->bus_addr, r->len, r->page_size, &r->lpar_addr);
50 256
51 if (result) { 257 if (result) {
@@ -57,13 +263,26 @@ int ps3_mmio_region_create(struct ps3_mmio_region *r)
57 dump_mmio_region(r); 263 dump_mmio_region(r);
58 return result; 264 return result;
59} 265}
266
267static int ps3_ioc0_mmio_region_create(struct ps3_mmio_region *r)
268{
269 /* device specific; do nothing currently */
270 return 0;
271}
272
273int ps3_mmio_region_create(struct ps3_mmio_region *r)
274{
275 return r->mmio_ops->create(r);
276}
60EXPORT_SYMBOL_GPL(ps3_mmio_region_create); 277EXPORT_SYMBOL_GPL(ps3_mmio_region_create);
61 278
62int ps3_free_mmio_region(struct ps3_mmio_region *r) 279static int ps3_sb_free_mmio_region(struct ps3_mmio_region *r)
63{ 280{
64 int result; 281 int result;
65 282
66 result = lv1_unmap_device_mmio_region(r->did.bus_id, r->did.dev_id, 283 dump_mmio_region(r);
284;
285 result = lv1_unmap_device_mmio_region(r->dev->bus_id, r->dev->dev_id,
67 r->lpar_addr); 286 r->lpar_addr);
68 287
69 if (result) 288 if (result)
@@ -73,14 +292,60 @@ int ps3_free_mmio_region(struct ps3_mmio_region *r)
73 r->lpar_addr = 0; 292 r->lpar_addr = 0;
74 return result; 293 return result;
75} 294}
295
296static int ps3_ioc0_free_mmio_region(struct ps3_mmio_region *r)
297{
298 /* device specific; do nothing currently */
299 return 0;
300}
301
302
303int ps3_free_mmio_region(struct ps3_mmio_region *r)
304{
305 return r->mmio_ops->free(r);
306}
307
76EXPORT_SYMBOL_GPL(ps3_free_mmio_region); 308EXPORT_SYMBOL_GPL(ps3_free_mmio_region);
77 309
310static const struct ps3_mmio_region_ops ps3_mmio_sb_region_ops = {
311 .create = ps3_sb_mmio_region_create,
312 .free = ps3_sb_free_mmio_region
313};
314
315static const struct ps3_mmio_region_ops ps3_mmio_ioc0_region_ops = {
316 .create = ps3_ioc0_mmio_region_create,
317 .free = ps3_ioc0_free_mmio_region
318};
319
320int ps3_mmio_region_init(struct ps3_system_bus_device *dev,
321 struct ps3_mmio_region *r, unsigned long bus_addr, unsigned long len,
322 enum ps3_mmio_page_size page_size)
323{
324 r->dev = dev;
325 r->bus_addr = bus_addr;
326 r->len = len;
327 r->page_size = page_size;
328 switch (dev->dev_type) {
329 case PS3_DEVICE_TYPE_SB:
330 r->mmio_ops = &ps3_mmio_sb_region_ops;
331 break;
332 case PS3_DEVICE_TYPE_IOC0:
333 r->mmio_ops = &ps3_mmio_ioc0_region_ops;
334 break;
335 default:
336 BUG();
337 return -EINVAL;
338 }
339 return 0;
340}
341EXPORT_SYMBOL_GPL(ps3_mmio_region_init);
342
78static int ps3_system_bus_match(struct device *_dev, 343static int ps3_system_bus_match(struct device *_dev,
79 struct device_driver *_drv) 344 struct device_driver *_drv)
80{ 345{
81 int result; 346 int result;
82 struct ps3_system_bus_driver *drv = to_ps3_system_bus_driver(_drv); 347 struct ps3_system_bus_driver *drv = ps3_drv_to_system_bus_drv(_drv);
83 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 348 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
84 349
85 result = dev->match_id == drv->match_id; 350 result = dev->match_id == drv->match_id;
86 351
@@ -92,32 +357,14 @@ static int ps3_system_bus_match(struct device *_dev,
92 357
93static int ps3_system_bus_probe(struct device *_dev) 358static int ps3_system_bus_probe(struct device *_dev)
94{ 359{
95 int result; 360 int result = 0;
96 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 361 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
97 struct ps3_system_bus_driver *drv = 362 struct ps3_system_bus_driver *drv;
98 to_ps3_system_bus_driver(_dev->driver);
99
100 result = lv1_open_device(dev->did.bus_id, dev->did.dev_id, 0);
101
102 if (result) {
103 pr_debug("%s:%d: lv1_open_device failed (%d)\n",
104 __func__, __LINE__, result);
105 result = -EACCES;
106 goto clean_none;
107 }
108
109 if (dev->d_region->did.bus_id) {
110 result = ps3_dma_region_create(dev->d_region);
111 363
112 if (result) { 364 BUG_ON(!dev);
113 pr_debug("%s:%d: ps3_dma_region_create failed (%d)\n", 365 pr_info(" -> %s:%d: %s\n", __func__, __LINE__, _dev->bus_id);
114 __func__, __LINE__, result);
115 BUG_ON("check region type");
116 result = -EINVAL;
117 goto clean_device;
118 }
119 }
120 366
367 drv = ps3_system_bus_dev_to_system_bus_drv(dev);
121 BUG_ON(!drv); 368 BUG_ON(!drv);
122 369
123 if (drv->probe) 370 if (drv->probe)
@@ -126,56 +373,127 @@ static int ps3_system_bus_probe(struct device *_dev)
126 pr_info("%s:%d: %s no probe method\n", __func__, __LINE__, 373 pr_info("%s:%d: %s no probe method\n", __func__, __LINE__,
127 dev->core.bus_id); 374 dev->core.bus_id);
128 375
129 if (result) { 376 pr_info(" <- %s:%d: %s\n", __func__, __LINE__, dev->core.bus_id);
130 pr_debug("%s:%d: drv->probe failed\n", __func__, __LINE__);
131 goto clean_dma;
132 }
133
134 return result;
135
136clean_dma:
137 ps3_dma_region_free(dev->d_region);
138clean_device:
139 lv1_close_device(dev->did.bus_id, dev->did.dev_id);
140clean_none:
141 return result; 377 return result;
142} 378}
143 379
144static int ps3_system_bus_remove(struct device *_dev) 380static int ps3_system_bus_remove(struct device *_dev)
145{ 381{
146 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 382 int result = 0;
147 struct ps3_system_bus_driver *drv = 383 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
148 to_ps3_system_bus_driver(_dev->driver); 384 struct ps3_system_bus_driver *drv;
385
386 BUG_ON(!dev);
387 pr_info(" -> %s:%d: %s\n", __func__, __LINE__, _dev->bus_id);
388
389 drv = ps3_system_bus_dev_to_system_bus_drv(dev);
390 BUG_ON(!drv);
149 391
150 if (drv->remove) 392 if (drv->remove)
151 drv->remove(dev); 393 result = drv->remove(dev);
152 else 394 else
153 pr_info("%s:%d: %s no remove method\n", __func__, __LINE__, 395 dev_dbg(&dev->core, "%s:%d %s: no remove method\n",
154 dev->core.bus_id); 396 __func__, __LINE__, drv->core.name);
397
398 pr_info(" <- %s:%d: %s\n", __func__, __LINE__, dev->core.bus_id);
399 return result;
400}
401
402static void ps3_system_bus_shutdown(struct device *_dev)
403{
404 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
405 struct ps3_system_bus_driver *drv;
406
407 BUG_ON(!dev);
408
409 dev_dbg(&dev->core, " -> %s:%d: match_id %d\n", __func__, __LINE__,
410 dev->match_id);
411
412 if (!dev->core.driver) {
413 dev_dbg(&dev->core, "%s:%d: no driver bound\n", __func__,
414 __LINE__);
415 return;
416 }
417
418 drv = ps3_system_bus_dev_to_system_bus_drv(dev);
419
420 BUG_ON(!drv);
421
422 dev_dbg(&dev->core, "%s:%d: %s -> %s\n", __func__, __LINE__,
423 dev->core.bus_id, drv->core.name);
424
425 if (drv->shutdown)
426 drv->shutdown(dev);
427 else if (drv->remove) {
428 dev_dbg(&dev->core, "%s:%d %s: no shutdown, calling remove\n",
429 __func__, __LINE__, drv->core.name);
430 drv->remove(dev);
431 } else {
432 dev_dbg(&dev->core, "%s:%d %s: no shutdown method\n",
433 __func__, __LINE__, drv->core.name);
434 BUG();
435 }
436
437 dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__);
438}
439
440static int ps3_system_bus_uevent(struct device *_dev, char **envp,
441 int num_envp, char *buffer, int buffer_size)
442{
443 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
444 int i = 0, length = 0;
155 445
156 ps3_dma_region_free(dev->d_region); 446 if (add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
157 ps3_free_mmio_region(dev->m_region); 447 &length, "MODALIAS=ps3:%d",
158 lv1_close_device(dev->did.bus_id, dev->did.dev_id); 448 dev->match_id))
449 return -ENOMEM;
159 450
451 envp[i] = NULL;
160 return 0; 452 return 0;
161} 453}
162 454
455static ssize_t modalias_show(struct device *_dev, struct device_attribute *a,
456 char *buf)
457{
458 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
459 int len = snprintf(buf, PAGE_SIZE, "ps3:%d\n", dev->match_id);
460
461 return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len;
462}
463
464static struct device_attribute ps3_system_bus_dev_attrs[] = {
465 __ATTR_RO(modalias),
466 __ATTR_NULL,
467};
468
163struct bus_type ps3_system_bus_type = { 469struct bus_type ps3_system_bus_type = {
164 .name = "ps3_system_bus", 470 .name = "ps3_system_bus",
165 .match = ps3_system_bus_match, 471 .match = ps3_system_bus_match,
472 .uevent = ps3_system_bus_uevent,
166 .probe = ps3_system_bus_probe, 473 .probe = ps3_system_bus_probe,
167 .remove = ps3_system_bus_remove, 474 .remove = ps3_system_bus_remove,
475 .shutdown = ps3_system_bus_shutdown,
476 .dev_attrs = ps3_system_bus_dev_attrs,
168}; 477};
169 478
170int __init ps3_system_bus_init(void) 479static int __init ps3_system_bus_init(void)
171{ 480{
172 int result; 481 int result;
173 482
174 if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) 483 if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
175 return -ENODEV; 484 return -ENODEV;
176 485
486 pr_debug(" -> %s:%d\n", __func__, __LINE__);
487
488 mutex_init(&usage_hack.mutex);
489
490 result = device_register(&ps3_system_bus);
491 BUG_ON(result);
492
177 result = bus_register(&ps3_system_bus_type); 493 result = bus_register(&ps3_system_bus_type);
178 BUG_ON(result); 494 BUG_ON(result);
495
496 pr_debug(" <- %s:%d\n", __func__, __LINE__);
179 return result; 497 return result;
180} 498}
181 499
@@ -185,16 +503,13 @@ core_initcall(ps3_system_bus_init);
185 * Returns the virtual address of the buffer and sets dma_handle 503 * Returns the virtual address of the buffer and sets dma_handle
186 * to the dma address (mapping) of the first page. 504 * to the dma address (mapping) of the first page.
187 */ 505 */
188
189static void * ps3_alloc_coherent(struct device *_dev, size_t size, 506static void * ps3_alloc_coherent(struct device *_dev, size_t size,
190 dma_addr_t *dma_handle, gfp_t flag) 507 dma_addr_t *dma_handle, gfp_t flag)
191{ 508{
192 int result; 509 int result;
193 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 510 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
194 unsigned long virt_addr; 511 unsigned long virt_addr;
195 512
196 BUG_ON(!dev->d_region->bus_addr);
197
198 flag &= ~(__GFP_DMA | __GFP_HIGHMEM); 513 flag &= ~(__GFP_DMA | __GFP_HIGHMEM);
199 flag |= __GFP_ZERO; 514 flag |= __GFP_ZERO;
200 515
@@ -205,7 +520,8 @@ static void * ps3_alloc_coherent(struct device *_dev, size_t size,
205 goto clean_none; 520 goto clean_none;
206 } 521 }
207 522
208 result = ps3_dma_map(dev->d_region, virt_addr, size, dma_handle); 523 result = ps3_dma_map(dev->d_region, virt_addr, size, dma_handle,
524 IOPTE_PP_W | IOPTE_PP_R | IOPTE_SO_RW | IOPTE_M);
209 525
210 if (result) { 526 if (result) {
211 pr_debug("%s:%d: ps3_dma_map failed (%d)\n", 527 pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
@@ -226,7 +542,7 @@ clean_none:
226static void ps3_free_coherent(struct device *_dev, size_t size, void *vaddr, 542static void ps3_free_coherent(struct device *_dev, size_t size, void *vaddr,
227 dma_addr_t dma_handle) 543 dma_addr_t dma_handle)
228{ 544{
229 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 545 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
230 546
231 ps3_dma_unmap(dev->d_region, dma_handle, size); 547 ps3_dma_unmap(dev->d_region, dma_handle, size);
232 free_pages((unsigned long)vaddr, get_order(size)); 548 free_pages((unsigned long)vaddr, get_order(size));
@@ -239,15 +555,16 @@ static void ps3_free_coherent(struct device *_dev, size_t size, void *vaddr,
239 * byte within the page as vaddr. 555 * byte within the page as vaddr.
240 */ 556 */
241 557
242static dma_addr_t ps3_map_single(struct device *_dev, void *ptr, size_t size, 558static dma_addr_t ps3_sb_map_single(struct device *_dev, void *ptr, size_t size,
243 enum dma_data_direction direction) 559 enum dma_data_direction direction)
244{ 560{
245 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 561 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
246 int result; 562 int result;
247 unsigned long bus_addr; 563 unsigned long bus_addr;
248 564
249 result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size, 565 result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size,
250 &bus_addr); 566 &bus_addr,
567 IOPTE_PP_R | IOPTE_PP_W | IOPTE_SO_RW | IOPTE_M);
251 568
252 if (result) { 569 if (result) {
253 pr_debug("%s:%d: ps3_dma_map failed (%d)\n", 570 pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
@@ -257,10 +574,44 @@ static dma_addr_t ps3_map_single(struct device *_dev, void *ptr, size_t size,
257 return bus_addr; 574 return bus_addr;
258} 575}
259 576
577static dma_addr_t ps3_ioc0_map_single(struct device *_dev, void *ptr,
578 size_t size,
579 enum dma_data_direction direction)
580{
581 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
582 int result;
583 unsigned long bus_addr;
584 u64 iopte_flag;
585
586 iopte_flag = IOPTE_M;
587 switch (direction) {
588 case DMA_BIDIRECTIONAL:
589 iopte_flag |= IOPTE_PP_R | IOPTE_PP_W | IOPTE_SO_RW;
590 break;
591 case DMA_TO_DEVICE:
592 iopte_flag |= IOPTE_PP_R | IOPTE_SO_R;
593 break;
594 case DMA_FROM_DEVICE:
595 iopte_flag |= IOPTE_PP_W | IOPTE_SO_RW;
596 break;
597 default:
598 /* not happned */
599 BUG();
600 };
601 result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size,
602 &bus_addr, iopte_flag);
603
604 if (result) {
605 pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
606 __func__, __LINE__, result);
607 }
608 return bus_addr;
609}
610
260static void ps3_unmap_single(struct device *_dev, dma_addr_t dma_addr, 611static void ps3_unmap_single(struct device *_dev, dma_addr_t dma_addr,
261 size_t size, enum dma_data_direction direction) 612 size_t size, enum dma_data_direction direction)
262{ 613{
263 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 614 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
264 int result; 615 int result;
265 616
266 result = ps3_dma_unmap(dev->d_region, dma_addr, size); 617 result = ps3_dma_unmap(dev->d_region, dma_addr, size);
@@ -271,20 +622,20 @@ static void ps3_unmap_single(struct device *_dev, dma_addr_t dma_addr,
271 } 622 }
272} 623}
273 624
274static int ps3_map_sg(struct device *_dev, struct scatterlist *sg, int nents, 625static int ps3_sb_map_sg(struct device *_dev, struct scatterlist *sg, int nents,
275 enum dma_data_direction direction) 626 enum dma_data_direction direction)
276{ 627{
277#if defined(CONFIG_PS3_DYNAMIC_DMA) 628#if defined(CONFIG_PS3_DYNAMIC_DMA)
278 BUG_ON("do"); 629 BUG_ON("do");
279 return -EPERM; 630 return -EPERM;
280#else 631#else
281 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 632 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
282 int i; 633 int i;
283 634
284 for (i = 0; i < nents; i++, sg++) { 635 for (i = 0; i < nents; i++, sg++) {
285 int result = ps3_dma_map(dev->d_region, 636 int result = ps3_dma_map(dev->d_region,
286 page_to_phys(sg->page) + sg->offset, sg->length, 637 page_to_phys(sg->page) + sg->offset, sg->length,
287 &sg->dma_address); 638 &sg->dma_address, 0);
288 639
289 if (result) { 640 if (result) {
290 pr_debug("%s:%d: ps3_dma_map failed (%d)\n", 641 pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
@@ -299,7 +650,15 @@ static int ps3_map_sg(struct device *_dev, struct scatterlist *sg, int nents,
299#endif 650#endif
300} 651}
301 652
302static void ps3_unmap_sg(struct device *_dev, struct scatterlist *sg, 653static int ps3_ioc0_map_sg(struct device *_dev, struct scatterlist *sg,
654 int nents,
655 enum dma_data_direction direction)
656{
657 BUG();
658 return 0;
659}
660
661static void ps3_sb_unmap_sg(struct device *_dev, struct scatterlist *sg,
303 int nents, enum dma_data_direction direction) 662 int nents, enum dma_data_direction direction)
304{ 663{
305#if defined(CONFIG_PS3_DYNAMIC_DMA) 664#if defined(CONFIG_PS3_DYNAMIC_DMA)
@@ -307,18 +666,34 @@ static void ps3_unmap_sg(struct device *_dev, struct scatterlist *sg,
307#endif 666#endif
308} 667}
309 668
669static void ps3_ioc0_unmap_sg(struct device *_dev, struct scatterlist *sg,
670 int nents, enum dma_data_direction direction)
671{
672 BUG();
673}
674
310static int ps3_dma_supported(struct device *_dev, u64 mask) 675static int ps3_dma_supported(struct device *_dev, u64 mask)
311{ 676{
312 return mask >= DMA_32BIT_MASK; 677 return mask >= DMA_32BIT_MASK;
313} 678}
314 679
315static struct dma_mapping_ops ps3_dma_ops = { 680static struct dma_mapping_ops ps3_sb_dma_ops = {
316 .alloc_coherent = ps3_alloc_coherent, 681 .alloc_coherent = ps3_alloc_coherent,
317 .free_coherent = ps3_free_coherent, 682 .free_coherent = ps3_free_coherent,
318 .map_single = ps3_map_single, 683 .map_single = ps3_sb_map_single,
319 .unmap_single = ps3_unmap_single, 684 .unmap_single = ps3_unmap_single,
320 .map_sg = ps3_map_sg, 685 .map_sg = ps3_sb_map_sg,
321 .unmap_sg = ps3_unmap_sg, 686 .unmap_sg = ps3_sb_unmap_sg,
687 .dma_supported = ps3_dma_supported
688};
689
690static struct dma_mapping_ops ps3_ioc0_dma_ops = {
691 .alloc_coherent = ps3_alloc_coherent,
692 .free_coherent = ps3_free_coherent,
693 .map_single = ps3_ioc0_map_single,
694 .unmap_single = ps3_unmap_single,
695 .map_sg = ps3_ioc0_map_sg,
696 .unmap_sg = ps3_ioc0_unmap_sg,
322 .dma_supported = ps3_dma_supported 697 .dma_supported = ps3_dma_supported
323}; 698};
324 699
@@ -328,7 +703,7 @@ static struct dma_mapping_ops ps3_dma_ops = {
328 703
329static void ps3_system_bus_release_device(struct device *_dev) 704static void ps3_system_bus_release_device(struct device *_dev)
330{ 705{
331 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 706 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
332 kfree(dev); 707 kfree(dev);
333} 708}
334 709
@@ -343,19 +718,38 @@ static void ps3_system_bus_release_device(struct device *_dev)
343int ps3_system_bus_device_register(struct ps3_system_bus_device *dev) 718int ps3_system_bus_device_register(struct ps3_system_bus_device *dev)
344{ 719{
345 int result; 720 int result;
346 static unsigned int dev_count = 1; 721 static unsigned int dev_ioc0_count;
722 static unsigned int dev_sb_count;
723 static unsigned int dev_vuart_count;
347 724
348 dev->core.parent = NULL; 725 if (!dev->core.parent)
726 dev->core.parent = &ps3_system_bus;
349 dev->core.bus = &ps3_system_bus_type; 727 dev->core.bus = &ps3_system_bus_type;
350 dev->core.release = ps3_system_bus_release_device; 728 dev->core.release = ps3_system_bus_release_device;
351 729
730 switch (dev->dev_type) {
731 case PS3_DEVICE_TYPE_IOC0:
732 dev->core.archdata.dma_ops = &ps3_ioc0_dma_ops;
733 snprintf(dev->core.bus_id, sizeof(dev->core.bus_id),
734 "ioc0_%02x", ++dev_ioc0_count);
735 break;
736 case PS3_DEVICE_TYPE_SB:
737 dev->core.archdata.dma_ops = &ps3_sb_dma_ops;
738 snprintf(dev->core.bus_id, sizeof(dev->core.bus_id),
739 "sb_%02x", ++dev_sb_count);
740
741 break;
742 case PS3_DEVICE_TYPE_VUART:
743 snprintf(dev->core.bus_id, sizeof(dev->core.bus_id),
744 "vuart_%02x", ++dev_vuart_count);
745 break;
746 default:
747 BUG();
748 };
749
352 dev->core.archdata.of_node = NULL; 750 dev->core.archdata.of_node = NULL;
353 dev->core.archdata.dma_ops = &ps3_dma_ops;
354 dev->core.archdata.numa_node = 0; 751 dev->core.archdata.numa_node = 0;
355 752
356 snprintf(dev->core.bus_id, sizeof(dev->core.bus_id), "sb_%02x",
357 dev_count++);
358
359 pr_debug("%s:%d add %s\n", __func__, __LINE__, dev->core.bus_id); 753 pr_debug("%s:%d add %s\n", __func__, __LINE__, dev->core.bus_id);
360 754
361 result = device_register(&dev->core); 755 result = device_register(&dev->core);
@@ -368,9 +762,15 @@ int ps3_system_bus_driver_register(struct ps3_system_bus_driver *drv)
368{ 762{
369 int result; 763 int result;
370 764
765 pr_debug(" -> %s:%d: %s\n", __func__, __LINE__, drv->core.name);
766
767 if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
768 return -ENODEV;
769
371 drv->core.bus = &ps3_system_bus_type; 770 drv->core.bus = &ps3_system_bus_type;
372 771
373 result = driver_register(&drv->core); 772 result = driver_register(&drv->core);
773 pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, drv->core.name);
374 return result; 774 return result;
375} 775}
376 776
@@ -378,7 +778,9 @@ EXPORT_SYMBOL_GPL(ps3_system_bus_driver_register);
378 778
379void ps3_system_bus_driver_unregister(struct ps3_system_bus_driver *drv) 779void ps3_system_bus_driver_unregister(struct ps3_system_bus_driver *drv)
380{ 780{
781 pr_debug(" -> %s:%d: %s\n", __func__, __LINE__, drv->core.name);
381 driver_unregister(&drv->core); 782 driver_unregister(&drv->core);
783 pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, drv->core.name);
382} 784}
383 785
384EXPORT_SYMBOL_GPL(ps3_system_bus_driver_unregister); 786EXPORT_SYMBOL_GPL(ps3_system_bus_driver_unregister);
diff --git a/arch/powerpc/platforms/ps3/time.c b/arch/powerpc/platforms/ps3/time.c
index 1bae8b19b363..802a9ccacb5e 100644
--- a/arch/powerpc/platforms/ps3/time.c
+++ b/arch/powerpc/platforms/ps3/time.c
@@ -39,7 +39,7 @@ static void _dump_tm(const struct rtc_time *tm, const char* func, int line)
39} 39}
40 40
41#define dump_time(_a) _dump_time(_a, __func__, __LINE__) 41#define dump_time(_a) _dump_time(_a, __func__, __LINE__)
42static void __attribute__ ((unused)) _dump_time(int time, const char* func, 42static void __maybe_unused _dump_time(int time, const char *func,
43 int line) 43 int line)
44{ 44{
45 struct rtc_time tm; 45 struct rtc_time tm;
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile
index ae1fc92dc1c9..992ba6753cf2 100644
--- a/arch/powerpc/platforms/pseries/Makefile
+++ b/arch/powerpc/platforms/pseries/Makefile
@@ -8,7 +8,7 @@ obj-y := lpar.o hvCall.o nvram.o reconfig.o \
8obj-$(CONFIG_SMP) += smp.o 8obj-$(CONFIG_SMP) += smp.o
9obj-$(CONFIG_XICS) += xics.o 9obj-$(CONFIG_XICS) += xics.o
10obj-$(CONFIG_SCANLOG) += scanlog.o 10obj-$(CONFIG_SCANLOG) += scanlog.o
11obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o 11obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o eeh_sysfs.o
12obj-$(CONFIG_KEXEC) += kexec.o 12obj-$(CONFIG_KEXEC) += kexec.o
13obj-$(CONFIG_PCI) += pci.o pci_dlpar.o 13obj-$(CONFIG_PCI) += pci.o pci_dlpar.o
14obj-$(CONFIG_PCI_MSI) += msi.o 14obj-$(CONFIG_PCI_MSI) += msi.o
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 5f3e6d8659fe..b8770395013d 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -1,6 +1,8 @@
1/* 1/*
2 * eeh.c 2 * eeh.c
3 * Copyright (C) 2001 Dave Engebretsen & Todd Inglett IBM Corporation 3 * Copyright IBM Corporation 2001, 2005, 2006
4 * Copyright Dave Engebretsen & Todd Inglett 2001
5 * Copyright Linas Vepstas 2005, 2006
4 * 6 *
5 * This program is free software; you can redistribute it and/or modify 7 * 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 8 * it under the terms of the GNU General Public License as published by
@@ -15,6 +17,8 @@
15 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 * Please address comments and feedback to Linas Vepstas <linas@austin.ibm.com>
18 */ 22 */
19 23
20#include <linux/delay.h> 24#include <linux/delay.h>
@@ -117,7 +121,6 @@ static unsigned long no_cfg_addr;
117static unsigned long ignored_check; 121static unsigned long ignored_check;
118static unsigned long total_mmio_ffs; 122static unsigned long total_mmio_ffs;
119static unsigned long false_positives; 123static unsigned long false_positives;
120static unsigned long ignored_failures;
121static unsigned long slot_resets; 124static unsigned long slot_resets;
122 125
123#define IS_BRIDGE(class_code) (((class_code)<<16) == PCI_BASE_CLASS_BRIDGE) 126#define IS_BRIDGE(class_code) (((class_code)<<16) == PCI_BASE_CLASS_BRIDGE)
@@ -505,6 +508,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
505 printk(KERN_WARNING "EEH: read_slot_reset_state() failed; rc=%d dn=%s\n", 508 printk(KERN_WARNING "EEH: read_slot_reset_state() failed; rc=%d dn=%s\n",
506 ret, dn->full_name); 509 ret, dn->full_name);
507 false_positives++; 510 false_positives++;
511 pdn->eeh_false_positives ++;
508 rc = 0; 512 rc = 0;
509 goto dn_unlock; 513 goto dn_unlock;
510 } 514 }
@@ -513,6 +517,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
513 * they are empty when they don't have children. */ 517 * they are empty when they don't have children. */
514 if ((rets[0] == 5) && (dn->child == NULL)) { 518 if ((rets[0] == 5) && (dn->child == NULL)) {
515 false_positives++; 519 false_positives++;
520 pdn->eeh_false_positives ++;
516 rc = 0; 521 rc = 0;
517 goto dn_unlock; 522 goto dn_unlock;
518 } 523 }
@@ -522,6 +527,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
522 printk(KERN_WARNING "EEH: event on unsupported device, rc=%d dn=%s\n", 527 printk(KERN_WARNING "EEH: event on unsupported device, rc=%d dn=%s\n",
523 ret, dn->full_name); 528 ret, dn->full_name);
524 false_positives++; 529 false_positives++;
530 pdn->eeh_false_positives ++;
525 rc = 0; 531 rc = 0;
526 goto dn_unlock; 532 goto dn_unlock;
527 } 533 }
@@ -529,6 +535,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
529 /* If not the kind of error we know about, punt. */ 535 /* If not the kind of error we know about, punt. */
530 if (rets[0] != 1 && rets[0] != 2 && rets[0] != 4 && rets[0] != 5) { 536 if (rets[0] != 1 && rets[0] != 2 && rets[0] != 4 && rets[0] != 5) {
531 false_positives++; 537 false_positives++;
538 pdn->eeh_false_positives ++;
532 rc = 0; 539 rc = 0;
533 goto dn_unlock; 540 goto dn_unlock;
534 } 541 }
@@ -921,6 +928,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
921 pdn->eeh_mode = 0; 928 pdn->eeh_mode = 0;
922 pdn->eeh_check_count = 0; 929 pdn->eeh_check_count = 0;
923 pdn->eeh_freeze_count = 0; 930 pdn->eeh_freeze_count = 0;
931 pdn->eeh_false_positives = 0;
924 932
925 if (status && strcmp(status, "ok") != 0) 933 if (status && strcmp(status, "ok") != 0)
926 return NULL; /* ignore devices with bad status */ 934 return NULL; /* ignore devices with bad status */
@@ -1139,7 +1147,8 @@ static void eeh_add_device_late(struct pci_dev *dev)
1139 pdn = PCI_DN(dn); 1147 pdn = PCI_DN(dn);
1140 pdn->pcidev = dev; 1148 pdn->pcidev = dev;
1141 1149
1142 pci_addr_cache_insert_device (dev); 1150 pci_addr_cache_insert_device(dev);
1151 eeh_sysfs_add_device(dev);
1143} 1152}
1144 1153
1145void eeh_add_device_tree_late(struct pci_bus *bus) 1154void eeh_add_device_tree_late(struct pci_bus *bus)
@@ -1178,6 +1187,7 @@ static void eeh_remove_device(struct pci_dev *dev)
1178 printk(KERN_DEBUG "EEH: remove device %s\n", pci_name(dev)); 1187 printk(KERN_DEBUG "EEH: remove device %s\n", pci_name(dev));
1179#endif 1188#endif
1180 pci_addr_cache_remove_device(dev); 1189 pci_addr_cache_remove_device(dev);
1190 eeh_sysfs_remove_device(dev);
1181 1191
1182 dn = pci_device_to_OF_node(dev); 1192 dn = pci_device_to_OF_node(dev);
1183 if (PCI_DN(dn)->pcidev) { 1193 if (PCI_DN(dn)->pcidev) {
@@ -1214,11 +1224,10 @@ static int proc_eeh_show(struct seq_file *m, void *v)
1214 "check not wanted=%ld\n" 1224 "check not wanted=%ld\n"
1215 "eeh_total_mmio_ffs=%ld\n" 1225 "eeh_total_mmio_ffs=%ld\n"
1216 "eeh_false_positives=%ld\n" 1226 "eeh_false_positives=%ld\n"
1217 "eeh_ignored_failures=%ld\n"
1218 "eeh_slot_resets=%ld\n", 1227 "eeh_slot_resets=%ld\n",
1219 no_device, no_dn, no_cfg_addr, 1228 no_device, no_dn, no_cfg_addr,
1220 ignored_check, total_mmio_ffs, 1229 ignored_check, total_mmio_ffs,
1221 false_positives, ignored_failures, 1230 false_positives,
1222 slot_resets); 1231 slot_resets);
1223 } 1232 }
1224 1233
diff --git a/arch/powerpc/platforms/pseries/eeh_cache.c b/arch/powerpc/platforms/pseries/eeh_cache.c
index f2bae04424f8..e49c815eae23 100644
--- a/arch/powerpc/platforms/pseries/eeh_cache.c
+++ b/arch/powerpc/platforms/pseries/eeh_cache.c
@@ -2,7 +2,8 @@
2 * eeh_cache.c 2 * eeh_cache.c
3 * PCI address cache; allows the lookup of PCI devices based on I/O address 3 * PCI address cache; allows the lookup of PCI devices based on I/O address
4 * 4 *
5 * Copyright (C) 2004 Linas Vepstas <linas@austin.ibm.com> IBM Corporation 5 * Copyright IBM Corporation 2004
6 * Copyright Linas Vepstas <linas@austin.ibm.com> 2004
6 * 7 *
7 * 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
8 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -295,6 +296,8 @@ void __init pci_addr_cache_build(void)
295 continue; 296 continue;
296 pci_dev_get (dev); /* matching put is in eeh_remove_device() */ 297 pci_dev_get (dev); /* matching put is in eeh_remove_device() */
297 PCI_DN(dn)->pcidev = dev; 298 PCI_DN(dn)->pcidev = dev;
299
300 eeh_sysfs_add_device(dev);
298 } 301 }
299 302
300#ifdef DEBUG 303#ifdef DEBUG
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index 161a5844ab6c..15e015ef6865 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -1,6 +1,7 @@
1/* 1/*
2 * PCI Error Recovery Driver for RPA-compliant PPC64 platform. 2 * PCI Error Recovery Driver for RPA-compliant PPC64 platform.
3 * Copyright (C) 2004, 2005 Linas Vepstas <linas@linas.org> 3 * Copyright IBM Corp. 2004 2005
4 * Copyright Linas Vepstas <linas@linas.org> 2004, 2005
4 * 5 *
5 * All rights reserved. 6 * All rights reserved.
6 * 7 *
@@ -19,8 +20,7 @@
19 * along with this program; if not, write to the Free Software 20 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * 22 *
22 * Send feedback to <linas@us.ibm.com> 23 * Send comments and feedback to Linas Vepstas <linas@austin.ibm.com>
23 *
24 */ 24 */
25#include <linux/delay.h> 25#include <linux/delay.h>
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
diff --git a/arch/powerpc/platforms/pseries/eeh_sysfs.c b/arch/powerpc/platforms/pseries/eeh_sysfs.c
new file mode 100644
index 000000000000..15e13b568904
--- /dev/null
+++ b/arch/powerpc/platforms/pseries/eeh_sysfs.c
@@ -0,0 +1,87 @@
1/*
2 * Sysfs entries for PCI Error Recovery for PAPR-compliant platform.
3 * Copyright IBM Corporation 2007
4 * Copyright Linas Vepstas <linas@austin.ibm.com> 2007
5 *
6 * All rights reserved.
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 of the License, or (at
11 * your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
16 * NON INFRINGEMENT. See the GNU General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 * Send comments and feedback to Linas Vepstas <linas@austin.ibm.com>
24 */
25#include <linux/pci.h>
26#include <asm/ppc-pci.h>
27#include <asm/pci-bridge.h>
28#include <linux/kobject.h>
29
30/**
31 * EEH_SHOW_ATTR -- create sysfs entry for eeh statistic
32 * @_name: name of file in sysfs directory
33 * @_memb: name of member in struct pci_dn to access
34 * @_format: printf format for display
35 *
36 * All of the attributes look very similar, so just
37 * auto-gen a cut-n-paste routine to display them.
38 */
39#define EEH_SHOW_ATTR(_name,_memb,_format) \
40static ssize_t eeh_show_##_name(struct device *dev, \
41 struct device_attribute *attr, char *buf) \
42{ \
43 struct pci_dev *pdev = to_pci_dev(dev); \
44 struct device_node *dn = pci_device_to_OF_node(pdev); \
45 struct pci_dn *pdn; \
46 \
47 if (!dn || PCI_DN(dn) == NULL) \
48 return 0; \
49 \
50 pdn = PCI_DN(dn); \
51 return sprintf(buf, _format "\n", pdn->_memb); \
52} \
53static DEVICE_ATTR(_name, S_IRUGO, eeh_show_##_name, NULL);
54
55
56EEH_SHOW_ATTR(eeh_mode, eeh_mode, "0x%x");
57EEH_SHOW_ATTR(eeh_config_addr, eeh_config_addr, "0x%x");
58EEH_SHOW_ATTR(eeh_pe_config_addr, eeh_pe_config_addr, "0x%x");
59EEH_SHOW_ATTR(eeh_check_count, eeh_check_count, "%d");
60EEH_SHOW_ATTR(eeh_freeze_count, eeh_freeze_count, "%d");
61EEH_SHOW_ATTR(eeh_false_positives, eeh_false_positives, "%d");
62
63void eeh_sysfs_add_device(struct pci_dev *pdev)
64{
65 int rc=0;
66
67 rc += device_create_file(&pdev->dev, &dev_attr_eeh_mode);
68 rc += device_create_file(&pdev->dev, &dev_attr_eeh_config_addr);
69 rc += device_create_file(&pdev->dev, &dev_attr_eeh_pe_config_addr);
70 rc += device_create_file(&pdev->dev, &dev_attr_eeh_check_count);
71 rc += device_create_file(&pdev->dev, &dev_attr_eeh_false_positives);
72 rc += device_create_file(&pdev->dev, &dev_attr_eeh_freeze_count);
73
74 if (rc)
75 printk(KERN_WARNING "EEH: Unable to create sysfs entries\n");
76}
77
78void eeh_sysfs_remove_device(struct pci_dev *pdev)
79{
80 device_remove_file(&pdev->dev, &dev_attr_eeh_mode);
81 device_remove_file(&pdev->dev, &dev_attr_eeh_config_addr);
82 device_remove_file(&pdev->dev, &dev_attr_eeh_pe_config_addr);
83 device_remove_file(&pdev->dev, &dev_attr_eeh_check_count);
84 device_remove_file(&pdev->dev, &dev_attr_eeh_false_positives);
85 device_remove_file(&pdev->dev, &dev_attr_eeh_freeze_count);
86}
87
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 362dfbc260a6..8cc6eeeaae2f 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -373,12 +373,23 @@ static void pSeries_lpar_hptab_clear(void)
373{ 373{
374 unsigned long size_bytes = 1UL << ppc64_pft_size; 374 unsigned long size_bytes = 1UL << ppc64_pft_size;
375 unsigned long hpte_count = size_bytes >> 4; 375 unsigned long hpte_count = size_bytes >> 4;
376 unsigned long dummy1, dummy2; 376 unsigned long dummy1, dummy2, dword0;
377 long lpar_rc;
377 int i; 378 int i;
378 379
379 /* TODO: Use bulk call */ 380 /* TODO: Use bulk call */
380 for (i = 0; i < hpte_count; i++) 381 for (i = 0; i < hpte_count; i++) {
381 plpar_pte_remove_raw(0, i, 0, &dummy1, &dummy2); 382 /* dont remove HPTEs with VRMA mappings */
383 lpar_rc = plpar_pte_remove_raw(H_ANDCOND, i, HPTE_V_1TB_SEG,
384 &dummy1, &dummy2);
385 if (lpar_rc == H_NOT_FOUND) {
386 lpar_rc = plpar_pte_read_raw(0, i, &dword0, &dummy1);
387 if (!lpar_rc && ((dword0 & HPTE_V_VRMA_MASK)
388 != HPTE_V_VRMA_MASK))
389 /* Can be hpte for 1TB Seg. So remove it */
390 plpar_pte_remove_raw(0, i, 0, &dummy1, &dummy2);
391 }
392 }
382} 393}
383 394
384/* 395/*
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c
index ffaf6c5c517b..47f0e0857f0e 100644
--- a/arch/powerpc/platforms/pseries/pci_dlpar.c
+++ b/arch/powerpc/platforms/pseries/pci_dlpar.c
@@ -110,8 +110,6 @@ pcibios_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus)
110 } 110 }
111 } 111 }
112 } 112 }
113
114 eeh_add_device_tree_late(bus);
115} 113}
116EXPORT_SYMBOL_GPL(pcibios_fixup_new_pci_devices); 114EXPORT_SYMBOL_GPL(pcibios_fixup_new_pci_devices);
117 115
@@ -139,6 +137,8 @@ pcibios_pci_config_bridge(struct pci_dev *dev)
139 137
140 /* Make the discovered devices available */ 138 /* Make the discovered devices available */
141 pci_bus_add_devices(child_bus); 139 pci_bus_add_devices(child_bus);
140
141 eeh_add_device_tree_late(child_bus);
142 return 0; 142 return 0;
143} 143}
144 144
@@ -171,6 +171,7 @@ pcibios_add_pci_devices(struct pci_bus * bus)
171 if (!list_empty(&bus->devices)) { 171 if (!list_empty(&bus->devices)) {
172 pcibios_fixup_new_pci_devices(bus, 0); 172 pcibios_fixup_new_pci_devices(bus, 0);
173 pci_bus_add_devices(bus); 173 pci_bus_add_devices(bus);
174 eeh_add_device_tree_late(bus);
174 } 175 }
175 } else if (mode == PCI_PROBE_NORMAL) { 176 } else if (mode == PCI_PROBE_NORMAL) {
176 /* use legacy probe */ 177 /* use legacy probe */
@@ -179,6 +180,7 @@ pcibios_add_pci_devices(struct pci_bus * bus)
179 if (num) { 180 if (num) {
180 pcibios_fixup_new_pci_devices(bus, 1); 181 pcibios_fixup_new_pci_devices(bus, 1);
181 pci_bus_add_devices(bus); 182 pci_bus_add_devices(bus);
183 eeh_add_device_tree_late(bus);
182 } 184 }
183 185
184 list_for_each_entry(dev, &bus->devices, bus_list) 186 list_for_each_entry(dev, &bus->devices, bus_list)
@@ -200,8 +202,6 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn)
200 rtas_setup_phb(phb); 202 rtas_setup_phb(phb);
201 pci_process_bridge_OF_ranges(phb, dn, 0); 203 pci_process_bridge_OF_ranges(phb, dn, 0);
202 204
203 pci_setup_phb_io_dynamic(phb, primary);
204
205 pci_devs_phb_init_dynamic(phb); 205 pci_devs_phb_init_dynamic(phb);
206 206
207 if (dn->child) 207 if (dn->child)
@@ -210,6 +210,7 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn)
210 scan_phb(phb); 210 scan_phb(phb);
211 pcibios_fixup_new_pci_devices(phb->bus, 0); 211 pcibios_fixup_new_pci_devices(phb->bus, 0);
212 pci_bus_add_devices(phb->bus); 212 pci_bus_add_devices(phb->bus);
213 eeh_add_device_tree_late(phb->bus);
213 214
214 return phb; 215 return phb;
215} 216}
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h
index 2e4d10c9eea8..d003c80fa31d 100644
--- a/arch/powerpc/platforms/pseries/plpar_wrappers.h
+++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h
@@ -108,6 +108,21 @@ static inline long plpar_pte_read(unsigned long flags, unsigned long ptex,
108 return rc; 108 return rc;
109} 109}
110 110
111/* plpar_pte_read_raw can be called in real mode. It calls plpar_hcall_raw */
112static inline long plpar_pte_read_raw(unsigned long flags, unsigned long ptex,
113 unsigned long *old_pteh_ret, unsigned long *old_ptel_ret)
114{
115 long rc;
116 unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
117
118 rc = plpar_hcall_raw(H_READ, retbuf, flags, ptex);
119
120 *old_pteh_ret = retbuf[0];
121 *old_ptel_ret = retbuf[1];
122
123 return rc;
124}
125
111static inline long plpar_pte_protect(unsigned long flags, unsigned long ptex, 126static inline long plpar_pte_protect(unsigned long flags, unsigned long ptex,
112 unsigned long avpn) 127 unsigned long avpn)
113{ 128{
diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
index 2729d559fd91..61e19f78b923 100644
--- a/arch/powerpc/platforms/pseries/pseries.h
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -33,6 +33,8 @@ static inline void setup_kexec_cpu_down_xics(void) { }
33static inline void setup_kexec_cpu_down_mpic(void) { } 33static inline void setup_kexec_cpu_down_mpic(void) { }
34#endif 34#endif
35 35
36extern void pSeries_final_fixup(void);
37
36/* Poweron flag used for enabling auto ups restart */ 38/* Poweron flag used for enabling auto ups restart */
37extern unsigned long rtas_poweron_auto; 39extern unsigned long rtas_poweron_auto;
38 40
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index 5aa97aff3391..c02f8742c54d 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -123,7 +123,7 @@ static int pSeries_reconfig_add_node(const char *path, struct property *proplist
123 strcpy(np->full_name, path); 123 strcpy(np->full_name, path);
124 124
125 np->properties = proplist; 125 np->properties = proplist;
126 OF_MARK_DYNAMIC(np); 126 of_node_set_flag(np, OF_DYNAMIC);
127 kref_init(&np->kref); 127 kref_init(&np->kref);
128 128
129 np->parent = derive_parent(path); 129 np->parent = derive_parent(path);
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 470db6efaeb6..59e69f085cb4 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -176,7 +176,7 @@ static void __init pseries_mpic_init_IRQ(void)
176 return; 176 return;
177 177
178 cascade_irq = irq_of_parse_and_map(cascade, 0); 178 cascade_irq = irq_of_parse_and_map(cascade, 0);
179 if (cascade == NO_IRQ) { 179 if (cascade_irq == NO_IRQ) {
180 printk(KERN_ERR "mpic: failed to map cascade interrupt"); 180 printk(KERN_ERR "mpic: failed to map cascade interrupt");
181 return; 181 return;
182 } 182 }
@@ -399,6 +399,7 @@ static void pseries_dedicated_idle_sleep(void)
399 * a good time to find other work to dispatch. 399 * a good time to find other work to dispatch.
400 */ 400 */
401 get_lppaca()->idle = 1; 401 get_lppaca()->idle = 1;
402 get_lppaca()->donate_dedicated_cpu = 1;
402 403
403 /* 404 /*
404 * We come in with interrupts disabled, and need_resched() 405 * We come in with interrupts disabled, and need_resched()
@@ -431,6 +432,7 @@ static void pseries_dedicated_idle_sleep(void)
431 432
432out: 433out:
433 HMT_medium(); 434 HMT_medium();
435 get_lppaca()->donate_dedicated_cpu = 0;
434 get_lppaca()->idle = 0; 436 get_lppaca()->idle = 0;
435} 437}
436 438
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index b854e7f1001c..5bd90a7eb763 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -156,9 +156,9 @@ static inline void lpar_qirr_info(int n_cpu , u8 value)
156 156
157 157
158#ifdef CONFIG_SMP 158#ifdef CONFIG_SMP
159static int get_irq_server(unsigned int virq) 159static int get_irq_server(unsigned int virq, unsigned int strict_check)
160{ 160{
161 unsigned int server; 161 int server;
162 /* For the moment only implement delivery to all cpus or one cpu */ 162 /* For the moment only implement delivery to all cpus or one cpu */
163 cpumask_t cpumask = irq_desc[virq].affinity; 163 cpumask_t cpumask = irq_desc[virq].affinity;
164 cpumask_t tmp = CPU_MASK_NONE; 164 cpumask_t tmp = CPU_MASK_NONE;
@@ -166,22 +166,25 @@ static int get_irq_server(unsigned int virq)
166 if (!distribute_irqs) 166 if (!distribute_irqs)
167 return default_server; 167 return default_server;
168 168
169 if (cpus_equal(cpumask, CPU_MASK_ALL)) { 169 if (!cpus_equal(cpumask, CPU_MASK_ALL)) {
170 server = default_distrib_server;
171 } else {
172 cpus_and(tmp, cpu_online_map, cpumask); 170 cpus_and(tmp, cpu_online_map, cpumask);
173 171
174 if (cpus_empty(tmp)) 172 server = first_cpu(tmp);
175 server = default_distrib_server; 173
176 else 174 if (server < NR_CPUS)
177 server = get_hard_smp_processor_id(first_cpu(tmp)); 175 return get_hard_smp_processor_id(server);
176
177 if (strict_check)
178 return -1;
178 } 179 }
179 180
180 return server; 181 if (cpus_equal(cpu_online_map, cpu_present_map))
182 return default_distrib_server;
181 183
184 return default_server;
182} 185}
183#else 186#else
184static int get_irq_server(unsigned int virq) 187static int get_irq_server(unsigned int virq, unsigned int strict_check)
185{ 188{
186 return default_server; 189 return default_server;
187} 190}
@@ -192,7 +195,7 @@ static void xics_unmask_irq(unsigned int virq)
192{ 195{
193 unsigned int irq; 196 unsigned int irq;
194 int call_status; 197 int call_status;
195 unsigned int server; 198 int server;
196 199
197 pr_debug("xics: unmask virq %d\n", virq); 200 pr_debug("xics: unmask virq %d\n", virq);
198 201
@@ -201,7 +204,7 @@ static void xics_unmask_irq(unsigned int virq)
201 if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) 204 if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS)
202 return; 205 return;
203 206
204 server = get_irq_server(virq); 207 server = get_irq_server(virq, 0);
205 208
206 call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, server, 209 call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, server,
207 DEFAULT_PRIORITY); 210 DEFAULT_PRIORITY);
@@ -398,8 +401,7 @@ static void xics_set_affinity(unsigned int virq, cpumask_t cpumask)
398 unsigned int irq; 401 unsigned int irq;
399 int status; 402 int status;
400 int xics_status[2]; 403 int xics_status[2];
401 unsigned long newmask; 404 int irq_server;
402 cpumask_t tmp = CPU_MASK_NONE;
403 405
404 irq = (unsigned int)irq_map[virq].hwirq; 406 irq = (unsigned int)irq_map[virq].hwirq;
405 if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) 407 if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS)
@@ -413,18 +415,21 @@ static void xics_set_affinity(unsigned int virq, cpumask_t cpumask)
413 return; 415 return;
414 } 416 }
415 417
416 /* For the moment only implement delivery to all cpus or one cpu */ 418 /*
417 if (cpus_equal(cpumask, CPU_MASK_ALL)) { 419 * For the moment only implement delivery to all cpus or one cpu.
418 newmask = default_distrib_server; 420 * Get current irq_server for the given irq
419 } else { 421 */
420 cpus_and(tmp, cpu_online_map, cpumask); 422 irq_server = get_irq_server(irq, 1);
421 if (cpus_empty(tmp)) 423 if (irq_server == -1) {
422 return; 424 char cpulist[128];
423 newmask = get_hard_smp_processor_id(first_cpu(tmp)); 425 cpumask_scnprintf(cpulist, sizeof(cpulist), cpumask);
426 printk(KERN_WARNING "xics_set_affinity: No online cpus in "
427 "the mask %s for irq %d\n", cpulist, virq);
428 return;
424 } 429 }
425 430
426 status = rtas_call(ibm_set_xive, 3, 1, NULL, 431 status = rtas_call(ibm_set_xive, 3, 1, NULL,
427 irq, newmask, xics_status[1]); 432 irq, irq_server, xics_status[1]);
428 433
429 if (status) { 434 if (status) {
430 printk(KERN_ERR "xics_set_affinity: irq=%u ibm,set-xive " 435 printk(KERN_ERR "xics_set_affinity: irq=%u ibm,set-xive "
@@ -752,6 +757,7 @@ skip_gserver_check:
752void xics_request_IPIs(void) 757void xics_request_IPIs(void)
753{ 758{
754 unsigned int ipi; 759 unsigned int ipi;
760 int rc;
755 761
756 ipi = irq_create_mapping(xics_host, XICS_IPI); 762 ipi = irq_create_mapping(xics_host, XICS_IPI);
757 BUG_ON(ipi == NO_IRQ); 763 BUG_ON(ipi == NO_IRQ);
@@ -762,11 +768,12 @@ void xics_request_IPIs(void)
762 */ 768 */
763 set_irq_handler(ipi, handle_percpu_irq); 769 set_irq_handler(ipi, handle_percpu_irq);
764 if (firmware_has_feature(FW_FEATURE_LPAR)) 770 if (firmware_has_feature(FW_FEATURE_LPAR))
765 request_irq(ipi, xics_ipi_action_lpar, IRQF_DISABLED, 771 rc = request_irq(ipi, xics_ipi_action_lpar, IRQF_DISABLED,
766 "IPI", NULL); 772 "IPI", NULL);
767 else 773 else
768 request_irq(ipi, xics_ipi_action_direct, IRQF_DISABLED, 774 rc = request_irq(ipi, xics_ipi_action_direct, IRQF_DISABLED,
769 "IPI", NULL); 775 "IPI", NULL);
776 BUG_ON(rc);
770} 777}
771#endif /* CONFIG_SMP */ 778#endif /* CONFIG_SMP */
772 779
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index c3ce0bd12c0b..484eb4e0e9db 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -5,7 +5,6 @@ endif
5mpic-msi-obj-$(CONFIG_PCI_MSI) += mpic_msi.o mpic_u3msi.o 5mpic-msi-obj-$(CONFIG_PCI_MSI) += mpic_msi.o mpic_u3msi.o
6obj-$(CONFIG_MPIC) += mpic.o $(mpic-msi-obj-y) 6obj-$(CONFIG_MPIC) += mpic.o $(mpic-msi-obj-y)
7 7
8obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
9obj-$(CONFIG_PPC_MPC106) += grackle.o 8obj-$(CONFIG_PPC_MPC106) += grackle.o
10obj-$(CONFIG_PPC_DCR) += dcr.o 9obj-$(CONFIG_PPC_DCR) += dcr.o
11obj-$(CONFIG_PPC_DCR_NATIVE) += dcr-low.o 10obj-$(CONFIG_PPC_DCR_NATIVE) += dcr-low.o
@@ -13,16 +12,20 @@ obj-$(CONFIG_PPC_PMI) += pmi.o
13obj-$(CONFIG_U3_DART) += dart_iommu.o 12obj-$(CONFIG_U3_DART) += dart_iommu.o
14obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o 13obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o
15obj-$(CONFIG_FSL_SOC) += fsl_soc.o 14obj-$(CONFIG_FSL_SOC) += fsl_soc.o
16obj-$(CONFIG_FSL_PCIE) += fsl_pcie.o
17obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o 15obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o
18obj-$(CONFIG_QUICC_ENGINE) += qe_lib/ 16obj-$(CONFIG_QUICC_ENGINE) += qe_lib/
19mv64x60-$(CONFIG_PCI) += mv64x60_pci.o 17mv64x60-$(CONFIG_PCI) += mv64x60_pci.o
20obj-$(CONFIG_MV64X60) += $(mv64x60-y) mv64x60_pic.o mv64x60_dev.o 18obj-$(CONFIG_MV64X60) += $(mv64x60-y) mv64x60_pic.o mv64x60_dev.o
19obj-$(CONFIG_RTC_DRV_CMOS) += rtc_cmos_setup.o
20obj-$(CONFIG_AXON_RAM) += axonram.o
21 21
22# contains only the suspend handler for time 22# contains only the suspend handler for time
23ifeq ($(CONFIG_RTC_CLASS),)
23obj-$(CONFIG_PM) += timer.o 24obj-$(CONFIG_PM) += timer.o
25endif
24 26
25ifeq ($(CONFIG_PPC_MERGE),y) 27ifeq ($(CONFIG_PPC_MERGE),y)
28obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
26obj-$(CONFIG_PPC_I8259) += i8259.o 29obj-$(CONFIG_PPC_I8259) += i8259.o
27obj-$(CONFIG_PPC_83xx) += ipic.o 30obj-$(CONFIG_PPC_83xx) += ipic.o
28obj-$(CONFIG_4xx) += uic.o 31obj-$(CONFIG_4xx) += uic.o
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
new file mode 100644
index 000000000000..2326d5dc5752
--- /dev/null
+++ b/arch/powerpc/sysdev/axonram.c
@@ -0,0 +1,381 @@
1/*
2 * (C) Copyright IBM Deutschland Entwicklung GmbH 2006
3 *
4 * Author: Maxim Shchetynin <maxim@de.ibm.com>
5 *
6 * Axon DDR2 device driver.
7 * It registers one block device per Axon's DDR2 memory bank found on a system.
8 * Block devices are called axonram?, their major and minor numbers are
9 * available in /proc/devices, /proc/partitions or in /sys/block/axonram?/dev.
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 as published by
13 * the Free Software Foundation; either version 2, or (at your option)
14 * any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
25
26#include <linux/bio.h>
27#include <linux/blkdev.h>
28#include <linux/buffer_head.h>
29#include <linux/device.h>
30#include <linux/errno.h>
31#include <linux/fs.h>
32#include <linux/genhd.h>
33#include <linux/interrupt.h>
34#include <linux/io.h>
35#include <linux/ioport.h>
36#include <linux/irq.h>
37#include <linux/irqreturn.h>
38#include <linux/kernel.h>
39#include <linux/mm.h>
40#include <linux/mod_devicetable.h>
41#include <linux/module.h>
42#include <linux/slab.h>
43#include <linux/string.h>
44#include <linux/types.h>
45#include <asm/of_device.h>
46#include <asm/of_platform.h>
47#include <asm/page.h>
48#include <asm/prom.h>
49
50#define AXON_RAM_MODULE_NAME "axonram"
51#define AXON_RAM_DEVICE_NAME "axonram"
52#define AXON_RAM_MINORS_PER_DISK 16
53#define AXON_RAM_BLOCK_SHIFT PAGE_SHIFT
54#define AXON_RAM_BLOCK_SIZE 1 << AXON_RAM_BLOCK_SHIFT
55#define AXON_RAM_SECTOR_SHIFT 9
56#define AXON_RAM_SECTOR_SIZE 1 << AXON_RAM_SECTOR_SHIFT
57#define AXON_RAM_IRQ_FLAGS IRQF_SHARED | IRQF_TRIGGER_RISING
58
59struct axon_ram_bank {
60 struct of_device *device;
61 struct gendisk *disk;
62 unsigned int irq_correctable;
63 unsigned int irq_uncorrectable;
64 unsigned long ph_addr;
65 unsigned long io_addr;
66 unsigned long size;
67 unsigned long ecc_counter;
68};
69
70static ssize_t
71axon_ram_sysfs_ecc(struct device *dev, struct device_attribute *attr, char *buf)
72{
73 struct of_device *device = to_of_device(dev);
74 struct axon_ram_bank *bank = device->dev.platform_data;
75
76 BUG_ON(!bank);
77
78 return sprintf(buf, "%ld\n", bank->ecc_counter);
79}
80
81static DEVICE_ATTR(ecc, S_IRUGO, axon_ram_sysfs_ecc, NULL);
82
83/**
84 * axon_ram_irq_handler - interrupt handler for Axon RAM ECC
85 * @irq: interrupt ID
86 * @dev: pointer to of_device
87 */
88static irqreturn_t
89axon_ram_irq_handler(int irq, void *dev)
90{
91 struct of_device *device = dev;
92 struct axon_ram_bank *bank = device->dev.platform_data;
93
94 BUG_ON(!bank);
95
96 if (irq == bank->irq_correctable) {
97 dev_err(&device->dev, "Correctable memory error occured\n");
98 bank->ecc_counter++;
99 return IRQ_HANDLED;
100 } else if (irq == bank->irq_uncorrectable) {
101 dev_err(&device->dev, "Uncorrectable memory error occured\n");
102 panic("Critical ECC error on %s", device->node->full_name);
103 }
104
105 return IRQ_NONE;
106}
107
108/**
109 * axon_ram_make_request - make_request() method for block device
110 * @queue, @bio: see blk_queue_make_request()
111 */
112static int
113axon_ram_make_request(struct request_queue *queue, struct bio *bio)
114{
115 struct axon_ram_bank *bank = bio->bi_bdev->bd_disk->private_data;
116 unsigned long phys_mem, phys_end;
117 void *user_mem;
118 struct bio_vec *vec;
119 unsigned int transfered;
120 unsigned short idx;
121 int rc = 0;
122
123 phys_mem = bank->io_addr + (bio->bi_sector << AXON_RAM_SECTOR_SHIFT);
124 phys_end = bank->io_addr + bank->size;
125 transfered = 0;
126 bio_for_each_segment(vec, bio, idx) {
127 if (unlikely(phys_mem + vec->bv_len > phys_end)) {
128 bio_io_error(bio, bio->bi_size);
129 rc = -ERANGE;
130 break;
131 }
132
133 user_mem = page_address(vec->bv_page) + vec->bv_offset;
134 if (bio_data_dir(bio) == READ)
135 memcpy(user_mem, (void *) phys_mem, vec->bv_len);
136 else
137 memcpy((void *) phys_mem, user_mem, vec->bv_len);
138
139 phys_mem += vec->bv_len;
140 transfered += vec->bv_len;
141 }
142 bio_endio(bio, transfered, 0);
143
144 return rc;
145}
146
147/**
148 * axon_ram_direct_access - direct_access() method for block device
149 * @device, @sector, @data: see block_device_operations method
150 */
151static int
152axon_ram_direct_access(struct block_device *device, sector_t sector,
153 unsigned long *data)
154{
155 struct axon_ram_bank *bank = device->bd_disk->private_data;
156 loff_t offset;
157
158 offset = sector << AXON_RAM_SECTOR_SHIFT;
159 if (offset >= bank->size) {
160 dev_err(&bank->device->dev, "Access outside of address space\n");
161 return -ERANGE;
162 }
163
164 *data = bank->ph_addr + offset;
165
166 return 0;
167}
168
169static struct block_device_operations axon_ram_devops = {
170 .owner = THIS_MODULE,
171 .direct_access = axon_ram_direct_access
172};
173
174/**
175 * axon_ram_probe - probe() method for platform driver
176 * @device, @device_id: see of_platform_driver method
177 */
178static int
179axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
180{
181 static int axon_ram_bank_id = -1;
182 struct axon_ram_bank *bank;
183 struct resource resource;
184 int rc = 0;
185
186 axon_ram_bank_id++;
187
188 dev_info(&device->dev, "Found memory controller on %s\n",
189 device->node->full_name);
190
191 bank = kzalloc(sizeof(struct axon_ram_bank), GFP_KERNEL);
192 if (bank == NULL) {
193 dev_err(&device->dev, "Out of memory\n");
194 rc = -ENOMEM;
195 goto failed;
196 }
197
198 device->dev.platform_data = bank;
199
200 bank->device = device;
201
202 if (of_address_to_resource(device->node, 0, &resource) != 0) {
203 dev_err(&device->dev, "Cannot access device tree\n");
204 rc = -EFAULT;
205 goto failed;
206 }
207
208 bank->size = resource.end - resource.start + 1;
209
210 if (bank->size == 0) {
211 dev_err(&device->dev, "No DDR2 memory found for %s%d\n",
212 AXON_RAM_DEVICE_NAME, axon_ram_bank_id);
213 rc = -ENODEV;
214 goto failed;
215 }
216
217 dev_info(&device->dev, "Register DDR2 memory device %s%d with %luMB\n",
218 AXON_RAM_DEVICE_NAME, axon_ram_bank_id, bank->size >> 20);
219
220 bank->ph_addr = resource.start;
221 bank->io_addr = (unsigned long) ioremap_flags(
222 bank->ph_addr, bank->size, _PAGE_NO_CACHE);
223 if (bank->io_addr == 0) {
224 dev_err(&device->dev, "ioremap() failed\n");
225 rc = -EFAULT;
226 goto failed;
227 }
228
229 bank->disk = alloc_disk(AXON_RAM_MINORS_PER_DISK);
230 if (bank->disk == NULL) {
231 dev_err(&device->dev, "Cannot register disk\n");
232 rc = -EFAULT;
233 goto failed;
234 }
235
236 bank->disk->first_minor = 0;
237 bank->disk->fops = &axon_ram_devops;
238 bank->disk->private_data = bank;
239 bank->disk->driverfs_dev = &device->dev;
240
241 sprintf(bank->disk->disk_name, "%s%d",
242 AXON_RAM_DEVICE_NAME, axon_ram_bank_id);
243 bank->disk->major = register_blkdev(0, bank->disk->disk_name);
244 if (bank->disk->major < 0) {
245 dev_err(&device->dev, "Cannot register block device\n");
246 rc = -EFAULT;
247 goto failed;
248 }
249
250 bank->disk->queue = blk_alloc_queue(GFP_KERNEL);
251 if (bank->disk->queue == NULL) {
252 dev_err(&device->dev, "Cannot register disk queue\n");
253 rc = -EFAULT;
254 goto failed;
255 }
256
257 set_capacity(bank->disk, bank->size >> AXON_RAM_SECTOR_SHIFT);
258 blk_queue_make_request(bank->disk->queue, axon_ram_make_request);
259 blk_queue_hardsect_size(bank->disk->queue, AXON_RAM_SECTOR_SIZE);
260 add_disk(bank->disk);
261
262 bank->irq_correctable = irq_of_parse_and_map(device->node, 0);
263 bank->irq_uncorrectable = irq_of_parse_and_map(device->node, 1);
264 if ((bank->irq_correctable <= 0) || (bank->irq_uncorrectable <= 0)) {
265 dev_err(&device->dev, "Cannot access ECC interrupt ID\n");
266 rc = -EFAULT;
267 goto failed;
268 }
269
270 rc = request_irq(bank->irq_correctable, axon_ram_irq_handler,
271 AXON_RAM_IRQ_FLAGS, bank->disk->disk_name, device);
272 if (rc != 0) {
273 dev_err(&device->dev, "Cannot register ECC interrupt handler\n");
274 bank->irq_correctable = bank->irq_uncorrectable = 0;
275 rc = -EFAULT;
276 goto failed;
277 }
278
279 rc = request_irq(bank->irq_uncorrectable, axon_ram_irq_handler,
280 AXON_RAM_IRQ_FLAGS, bank->disk->disk_name, device);
281 if (rc != 0) {
282 dev_err(&device->dev, "Cannot register ECC interrupt handler\n");
283 bank->irq_uncorrectable = 0;
284 rc = -EFAULT;
285 goto failed;
286 }
287
288 rc = device_create_file(&device->dev, &dev_attr_ecc);
289 if (rc != 0) {
290 dev_err(&device->dev, "Cannot create sysfs file\n");
291 rc = -EFAULT;
292 goto failed;
293 }
294
295 return 0;
296
297failed:
298 if (bank != NULL) {
299 if (bank->irq_uncorrectable > 0)
300 free_irq(bank->irq_uncorrectable, device);
301 if (bank->irq_correctable > 0)
302 free_irq(bank->irq_correctable, device);
303 if (bank->disk != NULL) {
304 if (bank->disk->queue != NULL)
305 blk_cleanup_queue(bank->disk->queue);
306 if (bank->disk->major > 0)
307 unregister_blkdev(bank->disk->major,
308 bank->disk->disk_name);
309 del_gendisk(bank->disk);
310 }
311 device->dev.platform_data = NULL;
312 if (bank->io_addr != 0)
313 iounmap((void __iomem *) bank->io_addr);
314 kfree(bank);
315 }
316
317 return rc;
318}
319
320/**
321 * axon_ram_remove - remove() method for platform driver
322 * @device: see of_platform_driver method
323 */
324static int
325axon_ram_remove(struct of_device *device)
326{
327 struct axon_ram_bank *bank = device->dev.platform_data;
328
329 BUG_ON(!bank || !bank->disk);
330
331 device_remove_file(&device->dev, &dev_attr_ecc);
332 free_irq(bank->irq_uncorrectable, device);
333 free_irq(bank->irq_correctable, device);
334 blk_cleanup_queue(bank->disk->queue);
335 unregister_blkdev(bank->disk->major, bank->disk->disk_name);
336 del_gendisk(bank->disk);
337 iounmap((void __iomem *) bank->io_addr);
338 kfree(bank);
339
340 return 0;
341}
342
343static struct of_device_id axon_ram_device_id[] = {
344 {
345 .type = "dma-memory"
346 },
347 {}
348};
349
350static struct of_platform_driver axon_ram_driver = {
351 .owner = THIS_MODULE,
352 .name = AXON_RAM_MODULE_NAME,
353 .match_table = axon_ram_device_id,
354 .probe = axon_ram_probe,
355 .remove = axon_ram_remove
356};
357
358/**
359 * axon_ram_init
360 */
361static int __init
362axon_ram_init(void)
363{
364 return of_register_platform_driver(&axon_ram_driver);
365}
366
367/**
368 * axon_ram_exit
369 */
370static void __exit
371axon_ram_exit(void)
372{
373 of_unregister_platform_driver(&axon_ram_driver);
374}
375
376module_init(axon_ram_init);
377module_exit(axon_ram_exit);
378
379MODULE_LICENSE("GPL");
380MODULE_AUTHOR("Maxim Shchetynin <maxim@de.ibm.com>");
381MODULE_DESCRIPTION("Axon DDR2 RAM device driver for IBM Cell BE");
diff --git a/arch/powerpc/sysdev/fsl_pcie.c b/arch/powerpc/sysdev/fsl_pcie.c
deleted file mode 100644
index 041c07e8b665..000000000000
--- a/arch/powerpc/sysdev/fsl_pcie.c
+++ /dev/null
@@ -1,171 +0,0 @@
1/*
2 * Support for indirect PCI bridges.
3 *
4 * Copyright (C) 1998 Gabriel Paubert.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 *
11 * "Temporary" MPC8548 Errata file -
12 * The standard indirect_pci code should work with future silicon versions.
13 */
14
15#include <linux/kernel.h>
16#include <linux/pci.h>
17#include <linux/delay.h>
18#include <linux/string.h>
19#include <linux/init.h>
20#include <linux/bootmem.h>
21
22#include <asm/io.h>
23#include <asm/prom.h>
24#include <asm/pci-bridge.h>
25#include <asm/machdep.h>
26
27#define PCI_CFG_OUT out_be32
28
29/* ERRATA PCI-Ex 14 PCIE Controller timeout */
30#define PCIE_FIX out_be32(hose->cfg_addr+0x4, 0x0400ffff)
31
32
33static int
34indirect_read_config_pcie(struct pci_bus *bus, unsigned int devfn, int offset,
35 int len, u32 *val)
36{
37 struct pci_controller *hose = bus->sysdata;
38 volatile void __iomem *cfg_data;
39 u32 temp;
40
41 if (ppc_md.pci_exclude_device)
42 if (ppc_md.pci_exclude_device(bus->number, devfn))
43 return PCIBIOS_DEVICE_NOT_FOUND;
44
45 /* Possible artifact of CDCpp50937 needs further investigation */
46 if (devfn != 0x0 && bus->number == 0xff)
47 return PCIBIOS_DEVICE_NOT_FOUND;
48
49 PCIE_FIX;
50 if (bus->number == 0xff) {
51 PCI_CFG_OUT(hose->cfg_addr,
52 (0x80000000 | ((offset & 0xf00) << 16) |
53 ((bus->number - hose->bus_offset) << 16)
54 | (devfn << 8) | ((offset & 0xfc) )));
55 } else {
56 PCI_CFG_OUT(hose->cfg_addr,
57 (0x80000001 | ((offset & 0xf00) << 16) |
58 ((bus->number - hose->bus_offset) << 16)
59 | (devfn << 8) | ((offset & 0xfc) )));
60 }
61
62 /*
63 * Note: the caller has already checked that offset is
64 * suitably aligned and that len is 1, 2 or 4.
65 */
66 /* ERRATA PCI-Ex 12 - Configuration Address/Data Alignment */
67 cfg_data = hose->cfg_data;
68 PCIE_FIX;
69 temp = in_le32(cfg_data);
70 switch (len) {
71 case 1:
72 *val = (temp >> (((offset & 3))*8)) & 0xff;
73 break;
74 case 2:
75 *val = (temp >> (((offset & 3))*8)) & 0xffff;
76 break;
77 default:
78 *val = temp;
79 break;
80 }
81 return PCIBIOS_SUCCESSFUL;
82}
83
84static int
85indirect_write_config_pcie(struct pci_bus *bus, unsigned int devfn, int offset,
86 int len, u32 val)
87{
88 struct pci_controller *hose = bus->sysdata;
89 volatile void __iomem *cfg_data;
90 u32 temp;
91
92 if (ppc_md.pci_exclude_device)
93 if (ppc_md.pci_exclude_device(bus->number, devfn))
94 return PCIBIOS_DEVICE_NOT_FOUND;
95
96 /* Possible artifact of CDCpp50937 needs further investigation */
97 if (devfn != 0x0 && bus->number == 0xff)
98 return PCIBIOS_DEVICE_NOT_FOUND;
99
100 PCIE_FIX;
101 if (bus->number == 0xff) {
102 PCI_CFG_OUT(hose->cfg_addr,
103 (0x80000000 | ((offset & 0xf00) << 16) |
104 ((bus->number - hose->bus_offset) << 16)
105 | (devfn << 8) | ((offset & 0xfc) )));
106 } else {
107 PCI_CFG_OUT(hose->cfg_addr,
108 (0x80000001 | ((offset & 0xf00) << 16) |
109 ((bus->number - hose->bus_offset) << 16)
110 | (devfn << 8) | ((offset & 0xfc) )));
111 }
112
113 /*
114 * Note: the caller has already checked that offset is
115 * suitably aligned and that len is 1, 2 or 4.
116 */
117 /* ERRATA PCI-Ex 12 - Configuration Address/Data Alignment */
118 cfg_data = hose->cfg_data;
119 switch (len) {
120 case 1:
121 PCIE_FIX;
122 temp = in_le32(cfg_data);
123 temp = (temp & ~(0xff << ((offset & 3) * 8))) |
124 (val << ((offset & 3) * 8));
125 PCIE_FIX;
126 out_le32(cfg_data, temp);
127 break;
128 case 2:
129 PCIE_FIX;
130 temp = in_le32(cfg_data);
131 temp = (temp & ~(0xffff << ((offset & 3) * 8)));
132 temp |= (val << ((offset & 3) * 8)) ;
133 PCIE_FIX;
134 out_le32(cfg_data, temp);
135 break;
136 default:
137 PCIE_FIX;
138 out_le32(cfg_data, val);
139 break;
140 }
141 PCIE_FIX;
142 return PCIBIOS_SUCCESSFUL;
143}
144
145static struct pci_ops indirect_pcie_ops = {
146 indirect_read_config_pcie,
147 indirect_write_config_pcie
148};
149
150void __init
151setup_indirect_pcie_nomap(struct pci_controller* hose, void __iomem * cfg_addr,
152 void __iomem * cfg_data)
153{
154 hose->cfg_addr = cfg_addr;
155 hose->cfg_data = cfg_data;
156 hose->ops = &indirect_pcie_ops;
157}
158
159void __init
160setup_indirect_pcie(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
161{
162 unsigned long base = cfg_addr & PAGE_MASK;
163 void __iomem *mbase, *addr, *data;
164
165 mbase = ioremap(base, PAGE_SIZE);
166 addr = mbase + (cfg_addr & ~PAGE_MASK);
167 if ((cfg_data & PAGE_MASK) != base)
168 mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE);
169 data = mbase + (cfg_data & ~PAGE_MASK);
170 setup_indirect_pcie_nomap(hose, addr, data);
171}
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index cad175724359..3289fab01e92 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -197,6 +197,7 @@ static int __init gfar_of_init(void)
197 struct gianfar_platform_data gfar_data; 197 struct gianfar_platform_data gfar_data;
198 const unsigned int *id; 198 const unsigned int *id;
199 const char *model; 199 const char *model;
200 const char *ctype;
200 const void *mac_addr; 201 const void *mac_addr;
201 const phandle *ph; 202 const phandle *ph;
202 int n_res = 2; 203 int n_res = 2;
@@ -254,6 +255,14 @@ static int __init gfar_of_init(void)
254 FSL_GIANFAR_DEV_HAS_VLAN | 255 FSL_GIANFAR_DEV_HAS_VLAN |
255 FSL_GIANFAR_DEV_HAS_EXTENDED_HASH; 256 FSL_GIANFAR_DEV_HAS_EXTENDED_HASH;
256 257
258 ctype = of_get_property(np, "phy-connection-type", NULL);
259
260 /* We only care about rgmii-id. The rest are autodetected */
261 if (ctype && !strcmp(ctype, "rgmii-id"))
262 gfar_data.interface = PHY_INTERFACE_MODE_RGMII_ID;
263 else
264 gfar_data.interface = PHY_INTERFACE_MODE_MII;
265
257 ph = of_get_property(np, "phy-handle", NULL); 266 ph = of_get_property(np, "phy-handle", NULL);
258 phy = of_find_node_by_phandle(*ph); 267 phy = of_find_node_by_phandle(*ph);
259 268
@@ -1028,6 +1037,19 @@ err:
1028 1037
1029arch_initcall(fs_enet_of_init); 1038arch_initcall(fs_enet_of_init);
1030 1039
1040static int __init fsl_pcmcia_of_init(void)
1041{
1042 struct device_node *np = NULL;
1043 /*
1044 * Register all the devices which type is "pcmcia"
1045 */
1046 while ((np = of_find_compatible_node(np,
1047 "pcmcia", "fsl,pq-pcmcia")) != NULL)
1048 of_platform_device_create(np, "m8xx-pcmcia", NULL);
1049 return 0;
1050}
1051
1052arch_initcall(fsl_pcmcia_of_init);
1031 1053
1032static const char *smc_regs = "regs"; 1054static const char *smc_regs = "regs";
1033static const char *smc_pram = "pram"; 1055static const char *smc_pram = "pram";
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c
index e71488469704..c7e6e859b393 100644
--- a/arch/powerpc/sysdev/indirect_pci.c
+++ b/arch/powerpc/sysdev/indirect_pci.c
@@ -33,18 +33,27 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
33 struct pci_controller *hose = bus->sysdata; 33 struct pci_controller *hose = bus->sysdata;
34 volatile void __iomem *cfg_data; 34 volatile void __iomem *cfg_data;
35 u8 cfg_type = 0; 35 u8 cfg_type = 0;
36 u32 bus_no, reg;
36 37
37 if (ppc_md.pci_exclude_device) 38 if (ppc_md.pci_exclude_device)
38 if (ppc_md.pci_exclude_device(bus->number, devfn)) 39 if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
39 return PCIBIOS_DEVICE_NOT_FOUND; 40 return PCIBIOS_DEVICE_NOT_FOUND;
40 41
41 if (hose->set_cfg_type) 42 if (hose->indirect_type & PPC_INDIRECT_TYPE_SET_CFG_TYPE)
42 if (bus->number != hose->first_busno) 43 if (bus->number != hose->first_busno)
43 cfg_type = 1; 44 cfg_type = 1;
44 45
45 PCI_CFG_OUT(hose->cfg_addr, 46 bus_no = (bus->number == hose->first_busno) ?
46 (0x80000000 | ((bus->number - hose->bus_offset) << 16) 47 hose->self_busno : bus->number;
47 | (devfn << 8) | ((offset & 0xfc) | cfg_type))); 48
49 if (hose->indirect_type & PPC_INDIRECT_TYPE_EXT_REG)
50 reg = ((offset & 0xf00) << 16) | (offset & 0xfc);
51 else
52 reg = offset & 0xfc;
53
54 PCI_CFG_OUT(hose->cfg_addr,
55 (0x80000000 | (bus_no << 16)
56 | (devfn << 8) | reg | cfg_type));
48 57
49 /* 58 /*
50 * Note: the caller has already checked that offset is 59 * Note: the caller has already checked that offset is
@@ -72,18 +81,33 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
72 struct pci_controller *hose = bus->sysdata; 81 struct pci_controller *hose = bus->sysdata;
73 volatile void __iomem *cfg_data; 82 volatile void __iomem *cfg_data;
74 u8 cfg_type = 0; 83 u8 cfg_type = 0;
84 u32 bus_no, reg;
75 85
76 if (ppc_md.pci_exclude_device) 86 if (ppc_md.pci_exclude_device)
77 if (ppc_md.pci_exclude_device(bus->number, devfn)) 87 if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
78 return PCIBIOS_DEVICE_NOT_FOUND; 88 return PCIBIOS_DEVICE_NOT_FOUND;
79 89
80 if (hose->set_cfg_type) 90 if (hose->indirect_type & PPC_INDIRECT_TYPE_SET_CFG_TYPE)
81 if (bus->number != hose->first_busno) 91 if (bus->number != hose->first_busno)
82 cfg_type = 1; 92 cfg_type = 1;
83 93
84 PCI_CFG_OUT(hose->cfg_addr, 94 bus_no = (bus->number == hose->first_busno) ?
85 (0x80000000 | ((bus->number - hose->bus_offset) << 16) 95 hose->self_busno : bus->number;
86 | (devfn << 8) | ((offset & 0xfc) | cfg_type))); 96
97 if (hose->indirect_type & PPC_INDIRECT_TYPE_EXT_REG)
98 reg = ((offset & 0xf00) << 16) | (offset & 0xfc);
99 else
100 reg = offset & 0xfc;
101
102 PCI_CFG_OUT(hose->cfg_addr,
103 (0x80000000 | (bus_no << 16)
104 | (devfn << 8) | reg | cfg_type));
105
106 /* surpress setting of PCI_PRIMARY_BUS */
107 if (hose->indirect_type & PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS)
108 if ((offset == PCI_PRIMARY_BUS) &&
109 (bus->number == hose->first_busno))
110 val &= 0xffffff00;
87 111
88 /* 112 /*
89 * Note: the caller has already checked that offset is 113 * Note: the caller has already checked that offset is
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.h b/arch/powerpc/sysdev/mpc8xx_pic.h
index afa2ee6717c1..9fe00eebdc8b 100644
--- a/arch/powerpc/sysdev/mpc8xx_pic.h
+++ b/arch/powerpc/sysdev/mpc8xx_pic.h
@@ -4,9 +4,16 @@
4#include <linux/irq.h> 4#include <linux/irq.h>
5#include <linux/interrupt.h> 5#include <linux/interrupt.h>
6 6
7extern struct hw_interrupt_type mpc8xx_pic;
8
9int mpc8xx_pic_init(void); 7int mpc8xx_pic_init(void);
10unsigned int mpc8xx_get_irq(void); 8unsigned int mpc8xx_get_irq(void);
11 9
10/*
11 * Some internal interrupt registers use an 8-bit mask for the interrupt
12 * level instead of a number.
13 */
14static inline uint mk_int_int_mask(uint mask)
15{
16 return (1 << (7 - (mask/2)));
17}
18
12#endif /* _PPC_KERNEL_PPC8xx_H */ 19#endif /* _PPC_KERNEL_PPC8xx_H */
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c
index 4b0a9c88eeb3..b618fa60aef3 100644
--- a/arch/powerpc/sysdev/mv64x60_dev.c
+++ b/arch/powerpc/sysdev/mv64x60_dev.c
@@ -12,6 +12,7 @@
12#include <linux/stddef.h> 12#include <linux/stddef.h>
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/console.h>
15#include <linux/mv643xx.h> 16#include <linux/mv643xx.h>
16#include <linux/platform_device.h> 17#include <linux/platform_device.h>
17 18
@@ -420,3 +421,30 @@ error:
420 return err; 421 return err;
421} 422}
422arch_initcall(mv64x60_device_setup); 423arch_initcall(mv64x60_device_setup);
424
425static int __init mv64x60_add_mpsc_console(void)
426{
427 struct device_node *np = NULL;
428 const char *prop;
429
430 prop = of_get_property(of_chosen, "linux,stdout-path", NULL);
431 if (prop == NULL)
432 goto not_mpsc;
433
434 np = of_find_node_by_path(prop);
435 if (!np)
436 goto not_mpsc;
437
438 if (!of_device_is_compatible(np, "marvell,mpsc"))
439 goto not_mpsc;
440
441 prop = of_get_property(np, "block-index", NULL);
442 if (!prop)
443 goto not_mpsc;
444
445 add_preferred_console("ttyMM", *(int *)prop, NULL);
446
447not_mpsc:
448 return 0;
449}
450console_initcall(mv64x60_add_mpsc_console);
diff --git a/arch/powerpc/sysdev/mv64x60_pci.c b/arch/powerpc/sysdev/mv64x60_pci.c
index b5aef4cbc8d2..45db86c2363c 100644
--- a/arch/powerpc/sysdev/mv64x60_pci.c
+++ b/arch/powerpc/sysdev/mv64x60_pci.c
@@ -137,18 +137,15 @@ static int __init mv64x60_add_bridge(struct device_node *dev)
137 printk(KERN_WARNING "Can't get bus-range for %s, assume" 137 printk(KERN_WARNING "Can't get bus-range for %s, assume"
138 " bus 0\n", dev->full_name); 138 " bus 0\n", dev->full_name);
139 139
140 hose = pcibios_alloc_controller(); 140 hose = pcibios_alloc_controller(dev);
141 if (!hose) 141 if (!hose)
142 return -ENOMEM; 142 return -ENOMEM;
143 143
144 hose->arch_data = dev;
145 hose->set_cfg_type = 1;
146
147 hose->first_busno = bus_range ? bus_range[0] : 0; 144 hose->first_busno = bus_range ? bus_range[0] : 0;
148 hose->last_busno = bus_range ? bus_range[1] : 0xff; 145 hose->last_busno = bus_range ? bus_range[1] : 0xff;
149 146
150 setup_indirect_pci(hose, rsrc.start, rsrc.start + 4); 147 setup_indirect_pci(hose, rsrc.start, rsrc.start + 4);
151 hose->bus_offset = hose->first_busno; 148 hose->self_busno = hose->first_busno;
152 149
153 printk(KERN_INFO "Found MV64x60 PCI host bridge at 0x%016llx. " 150 printk(KERN_INFO "Found MV64x60 PCI host bridge at 0x%016llx. "
154 "Firmware bus number: %d->%d\n", 151 "Firmware bus number: %d->%d\n",
diff --git a/arch/powerpc/sysdev/pmi.c b/arch/powerpc/sysdev/pmi.c
index 85a7c99c1003..2f91b55b7754 100644
--- a/arch/powerpc/sysdev/pmi.c
+++ b/arch/powerpc/sysdev/pmi.c
@@ -48,15 +48,13 @@ struct pmi_data {
48 struct work_struct work; 48 struct work_struct work;
49}; 49};
50 50
51static struct pmi_data *data;
51 52
52static int pmi_irq_handler(int irq, void *dev_id) 53static int pmi_irq_handler(int irq, void *dev_id)
53{ 54{
54 struct pmi_data *data;
55 u8 type; 55 u8 type;
56 int rc; 56 int rc;
57 57
58 data = dev_id;
59
60 spin_lock(&data->pmi_spinlock); 58 spin_lock(&data->pmi_spinlock);
61 59
62 type = ioread8(data->pmi_reg + PMI_READ_TYPE); 60 type = ioread8(data->pmi_reg + PMI_READ_TYPE);
@@ -111,16 +109,13 @@ MODULE_DEVICE_TABLE(of, pmi_match);
111 109
112static void pmi_notify_handlers(struct work_struct *work) 110static void pmi_notify_handlers(struct work_struct *work)
113{ 111{
114 struct pmi_data *data;
115 struct pmi_handler *handler; 112 struct pmi_handler *handler;
116 113
117 data = container_of(work, struct pmi_data, work);
118
119 spin_lock(&data->handler_spinlock); 114 spin_lock(&data->handler_spinlock);
120 list_for_each_entry(handler, &data->handler, node) { 115 list_for_each_entry(handler, &data->handler, node) {
121 pr_debug(KERN_INFO "pmi: notifying handler %p\n", handler); 116 pr_debug(KERN_INFO "pmi: notifying handler %p\n", handler);
122 if (handler->type == data->msg.type) 117 if (handler->type == data->msg.type)
123 handler->handle_pmi_message(data->dev, data->msg); 118 handler->handle_pmi_message(data->msg);
124 } 119 }
125 spin_unlock(&data->handler_spinlock); 120 spin_unlock(&data->handler_spinlock);
126} 121}
@@ -129,9 +124,14 @@ static int pmi_of_probe(struct of_device *dev,
129 const struct of_device_id *match) 124 const struct of_device_id *match)
130{ 125{
131 struct device_node *np = dev->node; 126 struct device_node *np = dev->node;
132 struct pmi_data *data;
133 int rc; 127 int rc;
134 128
129 if (data) {
130 printk(KERN_ERR "pmi: driver has already been initialized.\n");
131 rc = -EBUSY;
132 goto out;
133 }
134
135 data = kzalloc(sizeof(struct pmi_data), GFP_KERNEL); 135 data = kzalloc(sizeof(struct pmi_data), GFP_KERNEL);
136 if (!data) { 136 if (!data) {
137 printk(KERN_ERR "pmi: could not allocate memory.\n"); 137 printk(KERN_ERR "pmi: could not allocate memory.\n");
@@ -154,7 +154,6 @@ static int pmi_of_probe(struct of_device *dev,
154 154
155 INIT_WORK(&data->work, pmi_notify_handlers); 155 INIT_WORK(&data->work, pmi_notify_handlers);
156 156
157 dev->dev.driver_data = data;
158 data->dev = dev; 157 data->dev = dev;
159 158
160 data->irq = irq_of_parse_and_map(np, 0); 159 data->irq = irq_of_parse_and_map(np, 0);
@@ -164,7 +163,7 @@ static int pmi_of_probe(struct of_device *dev,
164 goto error_cleanup_iomap; 163 goto error_cleanup_iomap;
165 } 164 }
166 165
167 rc = request_irq(data->irq, pmi_irq_handler, 0, "pmi", data); 166 rc = request_irq(data->irq, pmi_irq_handler, 0, "pmi", NULL);
168 if (rc) { 167 if (rc) {
169 printk(KERN_ERR "pmi: can't request IRQ %d: returned %d\n", 168 printk(KERN_ERR "pmi: can't request IRQ %d: returned %d\n",
170 data->irq, rc); 169 data->irq, rc);
@@ -187,12 +186,9 @@ out:
187 186
188static int pmi_of_remove(struct of_device *dev) 187static int pmi_of_remove(struct of_device *dev)
189{ 188{
190 struct pmi_data *data;
191 struct pmi_handler *handler, *tmp; 189 struct pmi_handler *handler, *tmp;
192 190
193 data = dev->dev.driver_data; 191 free_irq(data->irq, NULL);
194
195 free_irq(data->irq, data);
196 iounmap(data->pmi_reg); 192 iounmap(data->pmi_reg);
197 193
198 spin_lock(&data->handler_spinlock); 194 spin_lock(&data->handler_spinlock);
@@ -202,7 +198,8 @@ static int pmi_of_remove(struct of_device *dev)
202 198
203 spin_unlock(&data->handler_spinlock); 199 spin_unlock(&data->handler_spinlock);
204 200
205 kfree(dev->dev.driver_data); 201 kfree(data);
202 data = NULL;
206 203
207 return 0; 204 return 0;
208} 205}
@@ -226,13 +223,13 @@ static void __exit pmi_module_exit(void)
226} 223}
227module_exit(pmi_module_exit); 224module_exit(pmi_module_exit);
228 225
229void pmi_send_message(struct of_device *device, pmi_message_t msg) 226int pmi_send_message(pmi_message_t msg)
230{ 227{
231 struct pmi_data *data;
232 unsigned long flags; 228 unsigned long flags;
233 DECLARE_COMPLETION_ONSTACK(completion); 229 DECLARE_COMPLETION_ONSTACK(completion);
234 230
235 data = device->dev.driver_data; 231 if (!data)
232 return -ENODEV;
236 233
237 mutex_lock(&data->msg_mutex); 234 mutex_lock(&data->msg_mutex);
238 235
@@ -256,30 +253,26 @@ void pmi_send_message(struct of_device *device, pmi_message_t msg)
256 data->completion = NULL; 253 data->completion = NULL;
257 254
258 mutex_unlock(&data->msg_mutex); 255 mutex_unlock(&data->msg_mutex);
256
257 return 0;
259} 258}
260EXPORT_SYMBOL_GPL(pmi_send_message); 259EXPORT_SYMBOL_GPL(pmi_send_message);
261 260
262void pmi_register_handler(struct of_device *device, 261int pmi_register_handler(struct pmi_handler *handler)
263 struct pmi_handler *handler)
264{ 262{
265 struct pmi_data *data;
266 data = device->dev.driver_data;
267
268 if (!data) 263 if (!data)
269 return; 264 return -ENODEV;
270 265
271 spin_lock(&data->handler_spinlock); 266 spin_lock(&data->handler_spinlock);
272 list_add_tail(&handler->node, &data->handler); 267 list_add_tail(&handler->node, &data->handler);
273 spin_unlock(&data->handler_spinlock); 268 spin_unlock(&data->handler_spinlock);
269
270 return 0;
274} 271}
275EXPORT_SYMBOL_GPL(pmi_register_handler); 272EXPORT_SYMBOL_GPL(pmi_register_handler);
276 273
277void pmi_unregister_handler(struct of_device *device, 274void pmi_unregister_handler(struct pmi_handler *handler)
278 struct pmi_handler *handler)
279{ 275{
280 struct pmi_data *data;
281 data = device->dev.driver_data;
282
283 if (!data) 276 if (!data)
284 return; 277 return;
285 278
diff --git a/arch/powerpc/sysdev/qe_lib/ucc.c b/arch/powerpc/sysdev/qe_lib/ucc.c
index ac12a44d516f..f970e5415ac0 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc.c
@@ -18,6 +18,7 @@
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include <linux/stddef.h> 20#include <linux/stddef.h>
21#include <linux/module.h>
21 22
22#include <asm/irq.h> 23#include <asm/irq.h>
23#include <asm/io.h> 24#include <asm/io.h>
@@ -40,6 +41,7 @@ int ucc_set_qe_mux_mii_mng(int ucc_num)
40 41
41 return 0; 42 return 0;
42} 43}
44EXPORT_SYMBOL(ucc_set_qe_mux_mii_mng);
43 45
44int ucc_set_type(int ucc_num, struct ucc_common *regs, 46int ucc_set_type(int ucc_num, struct ucc_common *regs,
45 enum ucc_speed_type speed) 47 enum ucc_speed_type speed)
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_fast.c b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
index 9143236853fc..3df202e8d332 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc_fast.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
@@ -19,6 +19,7 @@
19#include <linux/stddef.h> 19#include <linux/stddef.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/module.h>
22 23
23#include <asm/io.h> 24#include <asm/io.h>
24#include <asm/immap_qe.h> 25#include <asm/immap_qe.h>
@@ -70,6 +71,7 @@ void ucc_fast_dump_regs(struct ucc_fast_private * uccf)
70 printk(KERN_INFO "guemr : addr - 0x%08x, val - 0x%02x", 71 printk(KERN_INFO "guemr : addr - 0x%08x, val - 0x%02x",
71 (u32) & uccf->uf_regs->guemr, uccf->uf_regs->guemr); 72 (u32) & uccf->uf_regs->guemr, uccf->uf_regs->guemr);
72} 73}
74EXPORT_SYMBOL(ucc_fast_dump_regs);
73 75
74u32 ucc_fast_get_qe_cr_subblock(int uccf_num) 76u32 ucc_fast_get_qe_cr_subblock(int uccf_num)
75{ 77{
@@ -85,11 +87,13 @@ u32 ucc_fast_get_qe_cr_subblock(int uccf_num)
85 default: return QE_CR_SUBBLOCK_INVALID; 87 default: return QE_CR_SUBBLOCK_INVALID;
86 } 88 }
87} 89}
90EXPORT_SYMBOL(ucc_fast_get_qe_cr_subblock);
88 91
89void ucc_fast_transmit_on_demand(struct ucc_fast_private * uccf) 92void ucc_fast_transmit_on_demand(struct ucc_fast_private * uccf)
90{ 93{
91 out_be16(&uccf->uf_regs->utodr, UCC_FAST_TOD); 94 out_be16(&uccf->uf_regs->utodr, UCC_FAST_TOD);
92} 95}
96EXPORT_SYMBOL(ucc_fast_transmit_on_demand);
93 97
94void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode) 98void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode)
95{ 99{
@@ -110,6 +114,7 @@ void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode)
110 } 114 }
111 out_be32(&uf_regs->gumr, gumr); 115 out_be32(&uf_regs->gumr, gumr);
112} 116}
117EXPORT_SYMBOL(ucc_fast_enable);
113 118
114void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode) 119void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode)
115{ 120{
@@ -130,6 +135,7 @@ void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode)
130 } 135 }
131 out_be32(&uf_regs->gumr, gumr); 136 out_be32(&uf_regs->gumr, gumr);
132} 137}
138EXPORT_SYMBOL(ucc_fast_disable);
133 139
134int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** uccf_ret) 140int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** uccf_ret)
135{ 141{
@@ -341,6 +347,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
341 *uccf_ret = uccf; 347 *uccf_ret = uccf;
342 return 0; 348 return 0;
343} 349}
350EXPORT_SYMBOL(ucc_fast_init);
344 351
345void ucc_fast_free(struct ucc_fast_private * uccf) 352void ucc_fast_free(struct ucc_fast_private * uccf)
346{ 353{
@@ -355,3 +362,4 @@ void ucc_fast_free(struct ucc_fast_private * uccf)
355 362
356 kfree(uccf); 363 kfree(uccf);
357} 364}
365EXPORT_SYMBOL(ucc_fast_free);
diff --git a/arch/powerpc/sysdev/rtc_cmos_setup.c b/arch/powerpc/sysdev/rtc_cmos_setup.c
new file mode 100644
index 000000000000..e276048b8c5f
--- /dev/null
+++ b/arch/powerpc/sysdev/rtc_cmos_setup.c
@@ -0,0 +1,49 @@
1/*
2 * Setup code for PC-style Real-Time Clock.
3 *
4 * Author: Wade Farnsworth <wfarnsworth@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11
12#include <linux/platform_device.h>
13#include <linux/err.h>
14#include <linux/init.h>
15#include <linux/mc146818rtc.h>
16
17#include <asm/prom.h>
18
19static int __init add_rtc(void)
20{
21 struct device_node *np;
22 struct platform_device *pd;
23 struct resource res;
24 int ret;
25
26 np = of_find_compatible_node(NULL, NULL, "pnpPNP,b00");
27 if (!np)
28 return -ENODEV;
29
30 ret = of_address_to_resource(np, 0, &res);
31 of_node_put(np);
32 if (ret)
33 return ret;
34
35 /*
36 * RTC_PORT(x) is hardcoded in asm/mc146818rtc.h. Verify that the
37 * address provided by the device node matches.
38 */
39 if (res.start != RTC_PORT(0))
40 return -EINVAL;
41
42 pd = platform_device_register_simple("rtc_cmos", -1,
43 &res, 1);
44 if (IS_ERR(pd))
45 return PTR_ERR(pd);
46
47 return 0;
48}
49fs_initcall(add_rtc);
diff --git a/arch/powerpc/sysdev/timer.c b/arch/powerpc/sysdev/timer.c
index 4a01748b4217..e81e7ec2e799 100644
--- a/arch/powerpc/sysdev/timer.c
+++ b/arch/powerpc/sysdev/timer.c
@@ -24,7 +24,12 @@ static int timer_resume(struct sys_device *dev)
24 24
25 /* get current RTC time and convert to seconds */ 25 /* get current RTC time and convert to seconds */
26 get_rtc_time(&cur_rtc_tm); 26 get_rtc_time(&cur_rtc_tm);
27 rtc_tm_to_time(&cur_rtc_tm, &cur_rtc_time); 27 cur_rtc_time = mktime(cur_rtc_tm.tm_year + 1900,
28 cur_rtc_tm.tm_mon + 1,
29 cur_rtc_tm.tm_mday,
30 cur_rtc_tm.tm_hour,
31 cur_rtc_tm.tm_min,
32 cur_rtc_tm.tm_sec);
28 33
29 diff = cur_rtc_time - suspend_rtc_time; 34 diff = cur_rtc_time - suspend_rtc_time;
30 35
@@ -44,7 +49,12 @@ static int timer_suspend(struct sys_device *dev, pm_message_t state)
44 WARN_ON(!ppc_md.get_rtc_time); 49 WARN_ON(!ppc_md.get_rtc_time);
45 50
46 get_rtc_time(&suspend_rtc_tm); 51 get_rtc_time(&suspend_rtc_tm);
47 rtc_tm_to_time(&suspend_rtc_tm, &suspend_rtc_time); 52 suspend_rtc_time = mktime(suspend_rtc_tm.tm_year + 1900,
53 suspend_rtc_tm.tm_mon + 1,
54 suspend_rtc_tm.tm_mday,
55 suspend_rtc_tm.tm_hour,
56 suspend_rtc_tm.tm_min,
57 suspend_rtc_tm.tm_sec);
48 58
49 return 0; 59 return 0;
50} 60}
diff --git a/arch/powerpc/sysdev/tsi108_dev.c b/arch/powerpc/sysdev/tsi108_dev.c
index 7d3b09b7d544..a113d800cbf0 100644
--- a/arch/powerpc/sysdev/tsi108_dev.c
+++ b/arch/powerpc/sysdev/tsi108_dev.c
@@ -72,12 +72,11 @@ static int __init tsi108_eth_of_init(void)
72 int ret; 72 int ret;
73 73
74 for (np = NULL, i = 0; 74 for (np = NULL, i = 0;
75 (np = of_find_compatible_node(np, "network", "tsi-ethernet")) != NULL; 75 (np = of_find_compatible_node(np, "network", "tsi108-ethernet")) != NULL;
76 i++) { 76 i++) {
77 struct resource r[2]; 77 struct resource r[2];
78 struct device_node *phy; 78 struct device_node *phy, *mdio;
79 hw_info tsi_eth_data; 79 hw_info tsi_eth_data;
80 const unsigned int *id;
81 const unsigned int *phy_id; 80 const unsigned int *phy_id;
82 const void *mac_addr; 81 const void *mac_addr;
83 const phandle *ph; 82 const phandle *ph;
@@ -111,6 +110,13 @@ static int __init tsi108_eth_of_init(void)
111 if (mac_addr) 110 if (mac_addr)
112 memcpy(tsi_eth_data.mac_addr, mac_addr, 6); 111 memcpy(tsi_eth_data.mac_addr, mac_addr, 6);
113 112
113 ph = of_get_property(np, "mdio-handle", NULL);
114 mdio = of_find_node_by_phandle(*ph);
115 ret = of_address_to_resource(mdio, 0, &res);
116 of_node_put(mdio);
117 if (ret)
118 goto unreg;
119
114 ph = of_get_property(np, "phy-handle", NULL); 120 ph = of_get_property(np, "phy-handle", NULL);
115 phy = of_find_node_by_phandle(*ph); 121 phy = of_find_node_by_phandle(*ph);
116 122
@@ -119,20 +125,25 @@ static int __init tsi108_eth_of_init(void)
119 goto unreg; 125 goto unreg;
120 } 126 }
121 127
122 id = of_get_property(phy, "reg", NULL); 128 phy_id = of_get_property(phy, "reg", NULL);
123 phy_id = of_get_property(phy, "phy-id", NULL); 129
124 ret = of_address_to_resource(phy, 0, &res);
125 if (ret) {
126 of_node_put(phy);
127 goto unreg;
128 }
129 tsi_eth_data.regs = r[0].start; 130 tsi_eth_data.regs = r[0].start;
130 tsi_eth_data.phyregs = res.start; 131 tsi_eth_data.phyregs = res.start;
131 tsi_eth_data.phy = *phy_id; 132 tsi_eth_data.phy = *phy_id;
132 tsi_eth_data.irq_num = irq_of_parse_and_map(np, 0); 133 tsi_eth_data.irq_num = irq_of_parse_and_map(np, 0);
133 if (of_device_is_compatible(phy, "bcm54xx")) 134
135 /* Some boards with the TSI108 bridge (e.g. Holly)
136 * have a miswiring of the ethernet PHYs which
137 * requires a workaround. The special
138 * "txc-rxc-delay-disable" property enables this
139 * workaround. FIXME: Need to port the tsi108_eth
140 * driver itself to phylib and use a non-misleading
141 * name for the workaround flag - it's not actually to
142 * do with the model of PHY in use */
143 if (of_get_property(phy, "txc-rxc-delay-disable", NULL))
134 tsi_eth_data.phy_type = TSI108_PHY_BCM54XX; 144 tsi_eth_data.phy_type = TSI108_PHY_BCM54XX;
135 of_node_put(phy); 145 of_node_put(phy);
146
136 ret = 147 ret =
137 platform_device_add_data(tsi_eth_dev, &tsi_eth_data, 148 platform_device_add_data(tsi_eth_dev, &tsi_eth_data,
138 sizeof(hw_info)); 149 sizeof(hw_info));
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c
index 2153163fa593..90db8a720fed 100644
--- a/arch/powerpc/sysdev/tsi108_pci.c
+++ b/arch/powerpc/sysdev/tsi108_pci.c
@@ -64,9 +64,10 @@ tsi108_direct_write_config(struct pci_bus *bus, unsigned int devfunc,
64 int offset, int len, u32 val) 64 int offset, int len, u32 val)
65{ 65{
66 volatile unsigned char *cfg_addr; 66 volatile unsigned char *cfg_addr;
67 struct pci_controller *hose = bus->sysdata;
67 68
68 if (ppc_md.pci_exclude_device) 69 if (ppc_md.pci_exclude_device)
69 if (ppc_md.pci_exclude_device(bus->number, devfunc)) 70 if (ppc_md.pci_exclude_device(hose, bus->number, devfunc))
70 return PCIBIOS_DEVICE_NOT_FOUND; 71 return PCIBIOS_DEVICE_NOT_FOUND;
71 72
72 cfg_addr = (unsigned char *)(tsi_mk_config_addr(bus->number, 73 cfg_addr = (unsigned char *)(tsi_mk_config_addr(bus->number,
@@ -149,10 +150,11 @@ tsi108_direct_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
149 int len, u32 * val) 150 int len, u32 * val)
150{ 151{
151 volatile unsigned char *cfg_addr; 152 volatile unsigned char *cfg_addr;
153 struct pci_controller *hose = bus->sysdata;
152 u32 temp; 154 u32 temp;
153 155
154 if (ppc_md.pci_exclude_device) 156 if (ppc_md.pci_exclude_device)
155 if (ppc_md.pci_exclude_device(bus->number, devfn)) 157 if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
156 return PCIBIOS_DEVICE_NOT_FOUND; 158 return PCIBIOS_DEVICE_NOT_FOUND;
157 159
158 cfg_addr = (unsigned char *)(tsi_mk_config_addr(bus->number, 160 cfg_addr = (unsigned char *)(tsi_mk_config_addr(bus->number,
@@ -219,14 +221,12 @@ int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary)
219 " bus 0\n", dev->full_name); 221 " bus 0\n", dev->full_name);
220 } 222 }
221 223
222 hose = pcibios_alloc_controller(); 224 hose = pcibios_alloc_controller(dev);
223 225
224 if (!hose) { 226 if (!hose) {
225 printk("PCI Host bridge init failed\n"); 227 printk("PCI Host bridge init failed\n");
226 return -ENOMEM; 228 return -ENOMEM;
227 } 229 }
228 hose->arch_data = dev;
229 hose->set_cfg_type = 1;
230 230
231 hose->first_busno = bus_range ? bus_range[0] : 0; 231 hose->first_busno = bus_range ? bus_range[0] : 0;
232 hose->last_busno = bus_range ? bus_range[1] : 0xff; 232 hose->last_busno = bus_range ? bus_range[1] : 0xff;
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 28fdf4f50c27..669e6566ad70 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -2634,7 +2634,7 @@ static int __init setup_xmon_sysrq(void)
2634__initcall(setup_xmon_sysrq); 2634__initcall(setup_xmon_sysrq);
2635#endif /* CONFIG_MAGIC_SYSRQ */ 2635#endif /* CONFIG_MAGIC_SYSRQ */
2636 2636
2637int __initdata xmon_early, xmon_off; 2637static int __initdata xmon_early, xmon_off;
2638 2638
2639static int __init early_parse_xmon(char *p) 2639static int __init early_parse_xmon(char *p)
2640{ 2640{
diff --git a/arch/ppc/8260_io/enet.c b/arch/ppc/8260_io/enet.c
index 4c0a7d732f69..615b6583d9b0 100644
--- a/arch/ppc/8260_io/enet.c
+++ b/arch/ppc/8260_io/enet.c
@@ -477,9 +477,9 @@ for (;;) {
477 } 477 }
478 else { 478 else {
479 skb_put(skb,pkt_len-4); /* Make room */ 479 skb_put(skb,pkt_len-4); /* Make room */
480 eth_copy_and_sum(skb, 480 skb_copy_to_linear_data(skb,
481 (unsigned char *)__va(bdp->cbd_bufaddr), 481 (unsigned char *)__va(bdp->cbd_bufaddr),
482 pkt_len-4, 0); 482 pkt_len-4);
483 skb->protocol=eth_type_trans(skb,dev); 483 skb->protocol=eth_type_trans(skb,dev);
484 netif_rx(skb); 484 netif_rx(skb);
485 } 485 }
diff --git a/arch/ppc/8260_io/fcc_enet.c b/arch/ppc/8260_io/fcc_enet.c
index cab395da25da..6f3ed6a72e0b 100644
--- a/arch/ppc/8260_io/fcc_enet.c
+++ b/arch/ppc/8260_io/fcc_enet.c
@@ -734,9 +734,9 @@ for (;;) {
734 } 734 }
735 else { 735 else {
736 skb_put(skb,pkt_len); /* Make room */ 736 skb_put(skb,pkt_len); /* Make room */
737 eth_copy_and_sum(skb, 737 skb_copy_to_linear_data(skb,
738 (unsigned char *)__va(bdp->cbd_bufaddr), 738 (unsigned char *)__va(bdp->cbd_bufaddr),
739 pkt_len, 0); 739 pkt_len);
740 skb->protocol=eth_type_trans(skb,dev); 740 skb->protocol=eth_type_trans(skb,dev);
741 netif_rx(skb); 741 netif_rx(skb);
742 } 742 }
diff --git a/arch/ppc/8xx_io/enet.c b/arch/ppc/8xx_io/enet.c
index e58288e14369..703d47eee436 100644
--- a/arch/ppc/8xx_io/enet.c
+++ b/arch/ppc/8xx_io/enet.c
@@ -506,9 +506,9 @@ for (;;) {
506 } 506 }
507 else { 507 else {
508 skb_put(skb,pkt_len-4); /* Make room */ 508 skb_put(skb,pkt_len-4); /* Make room */
509 eth_copy_and_sum(skb, 509 skb_copy_to_linear_data(skb,
510 cep->rx_vaddr[bdp - cep->rx_bd_base], 510 cep->rx_vaddr[bdp - cep->rx_bd_base],
511 pkt_len-4, 0); 511 pkt_len-4);
512 skb->protocol=eth_type_trans(skb,dev); 512 skb->protocol=eth_type_trans(skb,dev);
513 netif_rx(skb); 513 netif_rx(skb);
514 } 514 }
diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c
index d38335d2d710..0288279be9aa 100644
--- a/arch/ppc/8xx_io/fec.c
+++ b/arch/ppc/8xx_io/fec.c
@@ -725,7 +725,7 @@ while (!(bdp->cbd_sc & BD_ENET_RX_EMPTY)) {
725 fep->stats.rx_dropped++; 725 fep->stats.rx_dropped++;
726 } else { 726 } else {
727 skb_put(skb,pkt_len-4); /* Make room */ 727 skb_put(skb,pkt_len-4); /* Make room */
728 eth_copy_and_sum(skb, data, pkt_len-4, 0); 728 skb_copy_to_linear_data(skb, data, pkt_len-4);
729 skb->protocol=eth_type_trans(skb,dev); 729 skb->protocol=eth_type_trans(skb,dev);
730 netif_rx(skb); 730 netif_rx(skb);
731 } 731 }
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index ccce2a4a1522..6bdeeb70b157 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -1237,8 +1237,10 @@ config PCI
1237 infrastructure code to support PCI bus devices. 1237 infrastructure code to support PCI bus devices.
1238 1238
1239config PCI_DOMAINS 1239config PCI_DOMAINS
1240 bool 1240 def_bool PCI
1241 default PCI 1241
1242config PCI_SYSCALL
1243 def_bool PCI
1242 1244
1243config MPC83xx_PCI2 1245config MPC83xx_PCI2
1244 bool "Support for 2nd PCI host controller" 1246 bool "Support for 2nd PCI host controller"
diff --git a/arch/ppc/configs/ev64260_defconfig b/arch/ppc/configs/ev64260_defconfig
index 84cc142a67bb..587e9a3b9491 100644
--- a/arch/ppc/configs/ev64260_defconfig
+++ b/arch/ppc/configs/ev64260_defconfig
@@ -531,7 +531,6 @@ CONFIG_I2C_CHARDEV=m
531# CONFIG_I2C_AMD8111 is not set 531# CONFIG_I2C_AMD8111 is not set
532# CONFIG_I2C_I801 is not set 532# CONFIG_I2C_I801 is not set
533# CONFIG_I2C_I810 is not set 533# CONFIG_I2C_I810 is not set
534# CONFIG_I2C_ISA is not set
535# CONFIG_I2C_NFORCE2 is not set 534# CONFIG_I2C_NFORCE2 is not set
536# CONFIG_I2C_PARPORT_LIGHT is not set 535# CONFIG_I2C_PARPORT_LIGHT is not set
537# CONFIG_I2C_PIIX4 is not set 536# CONFIG_I2C_PIIX4 is not set
diff --git a/arch/ppc/configs/mpc8540_ads_defconfig b/arch/ppc/configs/mpc8540_ads_defconfig
index c5c86025e261..bf676ebd99ab 100644
--- a/arch/ppc/configs/mpc8540_ads_defconfig
+++ b/arch/ppc/configs/mpc8540_ads_defconfig
@@ -452,7 +452,6 @@ CONFIG_I2C_CHARDEV=y
452# CONFIG_I2C_AMD8111 is not set 452# CONFIG_I2C_AMD8111 is not set
453# CONFIG_I2C_I801 is not set 453# CONFIG_I2C_I801 is not set
454# CONFIG_I2C_I810 is not set 454# CONFIG_I2C_I810 is not set
455# CONFIG_I2C_ISA is not set
456CONFIG_I2C_MPC=y 455CONFIG_I2C_MPC=y
457# CONFIG_I2C_NFORCE2 is not set 456# CONFIG_I2C_NFORCE2 is not set
458# CONFIG_I2C_PARPORT_LIGHT is not set 457# CONFIG_I2C_PARPORT_LIGHT is not set
diff --git a/arch/ppc/configs/mpc8548_cds_defconfig b/arch/ppc/configs/mpc8548_cds_defconfig
index abe034f24b83..f36fc5db540b 100644
--- a/arch/ppc/configs/mpc8548_cds_defconfig
+++ b/arch/ppc/configs/mpc8548_cds_defconfig
@@ -413,7 +413,6 @@ CONFIG_I2C_CHARDEV=y
413# 413#
414# I2C Hardware Bus support 414# I2C Hardware Bus support
415# 415#
416# CONFIG_I2C_ISA is not set
417CONFIG_I2C_MPC=y 416CONFIG_I2C_MPC=y
418# CONFIG_I2C_PARPORT_LIGHT is not set 417# CONFIG_I2C_PARPORT_LIGHT is not set
419# CONFIG_I2C_PCA_ISA is not set 418# CONFIG_I2C_PCA_ISA is not set
diff --git a/arch/ppc/configs/mpc8555_cds_defconfig b/arch/ppc/configs/mpc8555_cds_defconfig
index 15abebf46b96..4f1e320acfbe 100644
--- a/arch/ppc/configs/mpc8555_cds_defconfig
+++ b/arch/ppc/configs/mpc8555_cds_defconfig
@@ -518,7 +518,6 @@ CONFIG_I2C_CHARDEV=y
518# CONFIG_I2C_I801 is not set 518# CONFIG_I2C_I801 is not set
519# CONFIG_I2C_I810 is not set 519# CONFIG_I2C_I810 is not set
520# CONFIG_I2C_PIIX4 is not set 520# CONFIG_I2C_PIIX4 is not set
521# CONFIG_I2C_ISA is not set
522CONFIG_I2C_MPC=y 521CONFIG_I2C_MPC=y
523# CONFIG_I2C_NFORCE2 is not set 522# CONFIG_I2C_NFORCE2 is not set
524# CONFIG_I2C_PARPORT_LIGHT is not set 523# CONFIG_I2C_PARPORT_LIGHT is not set
diff --git a/arch/ppc/configs/mpc8560_ads_defconfig b/arch/ppc/configs/mpc8560_ads_defconfig
index f834fb541ad5..f12d48fcbba7 100644
--- a/arch/ppc/configs/mpc8560_ads_defconfig
+++ b/arch/ppc/configs/mpc8560_ads_defconfig
@@ -489,7 +489,6 @@ CONFIG_I2C_CHARDEV=y
489# CONFIG_I2C_I801 is not set 489# CONFIG_I2C_I801 is not set
490# CONFIG_I2C_I810 is not set 490# CONFIG_I2C_I810 is not set
491# CONFIG_I2C_PIIX4 is not set 491# CONFIG_I2C_PIIX4 is not set
492# CONFIG_I2C_ISA is not set
493CONFIG_I2C_MPC=y 492CONFIG_I2C_MPC=y
494# CONFIG_I2C_NFORCE2 is not set 493# CONFIG_I2C_NFORCE2 is not set
495# CONFIG_I2C_PARPORT_LIGHT is not set 494# CONFIG_I2C_PARPORT_LIGHT is not set
diff --git a/arch/ppc/configs/radstone_ppc7d_defconfig b/arch/ppc/configs/radstone_ppc7d_defconfig
index ca4d1fd0ca05..9f64532f2a81 100644
--- a/arch/ppc/configs/radstone_ppc7d_defconfig
+++ b/arch/ppc/configs/radstone_ppc7d_defconfig
@@ -710,7 +710,6 @@ CONFIG_I2C_CHARDEV=y
710# CONFIG_I2C_I801 is not set 710# CONFIG_I2C_I801 is not set
711# CONFIG_I2C_I810 is not set 711# CONFIG_I2C_I810 is not set
712# CONFIG_I2C_PIIX4 is not set 712# CONFIG_I2C_PIIX4 is not set
713# CONFIG_I2C_ISA is not set
714# CONFIG_I2C_MPC is not set 713# CONFIG_I2C_MPC is not set
715# CONFIG_I2C_NFORCE2 is not set 714# CONFIG_I2C_NFORCE2 is not set
716# CONFIG_I2C_PARPORT_LIGHT is not set 715# CONFIG_I2C_PARPORT_LIGHT is not set
diff --git a/arch/ppc/configs/stx_gp3_defconfig b/arch/ppc/configs/stx_gp3_defconfig
index 3fedc43e44ad..70d6f842aa9b 100644
--- a/arch/ppc/configs/stx_gp3_defconfig
+++ b/arch/ppc/configs/stx_gp3_defconfig
@@ -661,7 +661,6 @@ CONFIG_I2C_ALGOBIT=m
661# CONFIG_I2C_I801 is not set 661# CONFIG_I2C_I801 is not set
662# CONFIG_I2C_I810 is not set 662# CONFIG_I2C_I810 is not set
663# CONFIG_I2C_PIIX4 is not set 663# CONFIG_I2C_PIIX4 is not set
664# CONFIG_I2C_ISA is not set
665# CONFIG_I2C_MPC is not set 664# CONFIG_I2C_MPC is not set
666# CONFIG_I2C_NFORCE2 is not set 665# CONFIG_I2C_NFORCE2 is not set
667# CONFIG_I2C_PARPORT is not set 666# CONFIG_I2C_PARPORT is not set
diff --git a/arch/ppc/configs/sycamore_defconfig b/arch/ppc/configs/sycamore_defconfig
index 758114cfea5c..6996cca18f3e 100644
--- a/arch/ppc/configs/sycamore_defconfig
+++ b/arch/ppc/configs/sycamore_defconfig
@@ -461,7 +461,6 @@ CONFIG_I2C_CHARDEV=y
461# CONFIG_I2C_I801 is not set 461# CONFIG_I2C_I801 is not set
462# CONFIG_I2C_I810 is not set 462# CONFIG_I2C_I810 is not set
463# CONFIG_I2C_IBM_IIC is not set 463# CONFIG_I2C_IBM_IIC is not set
464# CONFIG_I2C_ISA is not set
465# CONFIG_I2C_NFORCE2 is not set 464# CONFIG_I2C_NFORCE2 is not set
466# CONFIG_I2C_PARPORT_LIGHT is not set 465# CONFIG_I2C_PARPORT_LIGHT is not set
467# CONFIG_I2C_PIIX4 is not set 466# CONFIG_I2C_PIIX4 is not set
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
index d319f9ba2379..0da55368655c 100644
--- a/arch/ppc/kernel/misc.S
+++ b/arch/ppc/kernel/misc.S
@@ -328,7 +328,7 @@ BEGIN_FTR_SECTION
328 mtspr SPRN_L1CSR0,r3 328 mtspr SPRN_L1CSR0,r3
329 isync 329 isync
330 blr 330 blr
331END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 331END_FTR_SECTION_IFSET(CPU_FTR_UNIFIED_ID_CACHE)
332 mfspr r3,SPRN_L1CSR1 332 mfspr r3,SPRN_L1CSR1
333 ori r3,r3,L1CSR1_ICFI|L1CSR1_ICLFR 333 ori r3,r3,L1CSR1_ICFI|L1CSR1_ICLFR
334 mtspr SPRN_L1CSR1,r3 334 mtspr SPRN_L1CSR1,r3
@@ -355,7 +355,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)
355_GLOBAL(__flush_icache_range) 355_GLOBAL(__flush_icache_range)
356BEGIN_FTR_SECTION 356BEGIN_FTR_SECTION
357 blr /* for 601, do nothing */ 357 blr /* for 601, do nothing */
358END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 358END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
359 li r5,L1_CACHE_BYTES-1 359 li r5,L1_CACHE_BYTES-1
360 andc r3,r3,r5 360 andc r3,r3,r5
361 subf r4,r3,r4 361 subf r4,r3,r4
@@ -472,7 +472,7 @@ _GLOBAL(flush_dcache_all)
472_GLOBAL(__flush_dcache_icache) 472_GLOBAL(__flush_dcache_icache)
473BEGIN_FTR_SECTION 473BEGIN_FTR_SECTION
474 blr /* for 601, do nothing */ 474 blr /* for 601, do nothing */
475END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 475END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
476 rlwinm r3,r3,0,0,19 /* Get page base address */ 476 rlwinm r3,r3,0,0,19 /* Get page base address */
477 li r4,4096/L1_CACHE_BYTES /* Number of lines in a page */ 477 li r4,4096/L1_CACHE_BYTES /* Number of lines in a page */
478 mtctr r4 478 mtctr r4
@@ -500,7 +500,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)
500_GLOBAL(__flush_dcache_icache_phys) 500_GLOBAL(__flush_dcache_icache_phys)
501BEGIN_FTR_SECTION 501BEGIN_FTR_SECTION
502 blr /* for 601, do nothing */ 502 blr /* for 601, do nothing */
503END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 503END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
504 mfmsr r10 504 mfmsr r10
505 rlwinm r0,r10,0,28,26 /* clear DR */ 505 rlwinm r0,r10,0,28,26 /* clear DR */
506 mtmsr r0 506 mtmsr r0
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c
index 5e723c4c2571..c2ec13bea006 100644
--- a/arch/ppc/kernel/pci.c
+++ b/arch/ppc/kernel/pci.c
@@ -633,12 +633,6 @@ void pcibios_make_OF_bus_map(void)
633{ 633{
634} 634}
635 635
636/* Add sysfs properties */
637void pcibios_add_platform_entries(struct pci_dev *pdev)
638{
639}
640
641
642static int __init 636static int __init
643pcibios_init(void) 637pcibios_init(void)
644{ 638{
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index a4165209ac7c..63f0a987139b 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -64,7 +64,6 @@ extern unsigned long mm_ptov (unsigned long paddr);
64 64
65EXPORT_SYMBOL(clear_pages); 65EXPORT_SYMBOL(clear_pages);
66EXPORT_SYMBOL(clear_user_page); 66EXPORT_SYMBOL(clear_user_page);
67EXPORT_SYMBOL(do_signal);
68EXPORT_SYMBOL(transfer_to_handler); 67EXPORT_SYMBOL(transfer_to_handler);
69EXPORT_SYMBOL(do_IRQ); 68EXPORT_SYMBOL(do_IRQ);
70EXPORT_SYMBOL(machine_check_exception); 69EXPORT_SYMBOL(machine_check_exception);
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index c79704f5409c..967c1ef59a6b 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -526,7 +526,7 @@ void __init setup_arch(char **cmdline_p)
526 * Systems with OF can look in the properties on the cpu node(s) 526 * Systems with OF can look in the properties on the cpu node(s)
527 * for a possibly more accurate value. 527 * for a possibly more accurate value.
528 */ 528 */
529 if (cpu_has_feature(CPU_FTR_SPLIT_ID_CACHE)) { 529 if (! cpu_has_feature(CPU_FTR_UNIFIED_ID_CACHE)) {
530 dcache_bsize = cur_cpu_spec->dcache_bsize; 530 dcache_bsize = cur_cpu_spec->dcache_bsize;
531 icache_bsize = cur_cpu_spec->icache_bsize; 531 icache_bsize = cur_cpu_spec->icache_bsize;
532 ucache_bsize = 0; 532 ucache_bsize = 0;
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
index aea100be52c8..3f3b292eb773 100644
--- a/arch/ppc/kernel/traps.c
+++ b/arch/ppc/kernel/traps.c
@@ -92,6 +92,7 @@ int die(const char * str, struct pt_regs * fp, long err)
92 if (nl) 92 if (nl)
93 printk("\n"); 93 printk("\n");
94 show_regs(fp); 94 show_regs(fp);
95 add_taint(TAINT_DIE);
95 spin_unlock_irq(&die_lock); 96 spin_unlock_irq(&die_lock);
96 /* do_exit() should take care of panic'ing from an interrupt 97 /* do_exit() should take care of panic'ing from an interrupt
97 * context so we don't handle it here 98 * context so we don't handle it here
@@ -619,7 +620,7 @@ void program_check_exception(struct pt_regs *regs)
619 return; 620 return;
620 621
621 if (!(regs->msr & MSR_PR) && /* not user-mode */ 622 if (!(regs->msr & MSR_PR) && /* not user-mode */
622 report_bug(regs->nip) == BUG_TRAP_TYPE_WARN) { 623 report_bug(regs->nip, regs) == BUG_TRAP_TYPE_WARN) {
623 regs->nip += 4; 624 regs->nip += 4;
624 return; 625 return;
625 } 626 }
diff --git a/arch/ppc/kernel/vmlinux.lds.S b/arch/ppc/kernel/vmlinux.lds.S
index 19db8746ff14..c0aac3ff9e91 100644
--- a/arch/ppc/kernel/vmlinux.lds.S
+++ b/arch/ppc/kernel/vmlinux.lds.S
@@ -130,10 +130,7 @@ SECTIONS
130 __ftr_fixup : { *(__ftr_fixup) } 130 __ftr_fixup : { *(__ftr_fixup) }
131 __stop___ftr_fixup = .; 131 __stop___ftr_fixup = .;
132 132
133 . = ALIGN(4096); 133 PERCPU(4096)
134 __per_cpu_start = .;
135 .data.percpu : { *(.data.percpu) }
136 __per_cpu_end = .;
137 134
138#ifdef CONFIG_BLK_DEV_INITRD 135#ifdef CONFIG_BLK_DEV_INITRD
139 . = ALIGN(4096); 136 . = ALIGN(4096);
diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c
index 465f451f3bc3..b98244e277fb 100644
--- a/arch/ppc/mm/fault.c
+++ b/arch/ppc/mm/fault.c
@@ -96,6 +96,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
96 struct mm_struct *mm = current->mm; 96 struct mm_struct *mm = current->mm;
97 siginfo_t info; 97 siginfo_t info;
98 int code = SEGV_MAPERR; 98 int code = SEGV_MAPERR;
99 int fault;
99#if defined(CONFIG_4xx) || defined (CONFIG_BOOKE) 100#if defined(CONFIG_4xx) || defined (CONFIG_BOOKE)
100 int is_write = error_code & ESR_DST; 101 int is_write = error_code & ESR_DST;
101#else 102#else
@@ -249,20 +250,18 @@ good_area:
249 * the fault. 250 * the fault.
250 */ 251 */
251 survive: 252 survive:
252 switch (handle_mm_fault(mm, vma, address, is_write)) { 253 fault = handle_mm_fault(mm, vma, address, is_write);
253 case VM_FAULT_MINOR: 254 if (unlikely(fault & VM_FAULT_ERROR)) {
254 current->min_flt++; 255 if (fault & VM_FAULT_OOM)
255 break; 256 goto out_of_memory;
256 case VM_FAULT_MAJOR: 257 else if (fault & VM_FAULT_SIGBUS)
257 current->maj_flt++; 258 goto do_sigbus;
258 break;
259 case VM_FAULT_SIGBUS:
260 goto do_sigbus;
261 case VM_FAULT_OOM:
262 goto out_of_memory;
263 default:
264 BUG(); 259 BUG();
265 } 260 }
261 if (fault & VM_FAULT_MAJOR)
262 current->maj_flt++;
263 else
264 current->min_flt++;
266 265
267 up_read(&mm->mmap_sem); 266 up_read(&mm->mmap_sem);
268 /* 267 /*
diff --git a/arch/ppc/mm/tlb.c b/arch/ppc/mm/tlb.c
index fa29740a28f5..4ff260bc9dd1 100644
--- a/arch/ppc/mm/tlb.c
+++ b/arch/ppc/mm/tlb.c
@@ -27,6 +27,7 @@
27#include <linux/mm.h> 27#include <linux/mm.h>
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/highmem.h> 29#include <linux/highmem.h>
30#include <linux/pagemap.h>
30#include <asm/tlbflush.h> 31#include <asm/tlbflush.h>
31#include <asm/tlb.h> 32#include <asm/tlb.h>
32 33
diff --git a/arch/ppc/platforms/4xx/bamboo.c b/arch/ppc/platforms/4xx/bamboo.c
index 349660b84a02..017623c9bc4b 100644
--- a/arch/ppc/platforms/4xx/bamboo.c
+++ b/arch/ppc/platforms/4xx/bamboo.c
@@ -29,6 +29,7 @@
29#include <linux/tty.h> 29#include <linux/tty.h>
30#include <linux/serial.h> 30#include <linux/serial.h>
31#include <linux/serial_core.h> 31#include <linux/serial_core.h>
32#include <linux/serial_8250.h>
32#include <linux/ethtool.h> 33#include <linux/ethtool.h>
33 34
34#include <asm/system.h> 35#include <asm/system.h>
diff --git a/arch/ppc/platforms/4xx/bubinga.c b/arch/ppc/platforms/4xx/bubinga.c
index 1a7f075b754f..cd696be55aca 100644
--- a/arch/ppc/platforms/4xx/bubinga.c
+++ b/arch/ppc/platforms/4xx/bubinga.c
@@ -21,6 +21,7 @@
21#include <linux/tty.h> 21#include <linux/tty.h>
22#include <linux/serial.h> 22#include <linux/serial.h>
23#include <linux/serial_core.h> 23#include <linux/serial_core.h>
24#include <linux/serial_8250.h>
24 25
25#include <asm/system.h> 26#include <asm/system.h>
26#include <asm/pci-bridge.h> 27#include <asm/pci-bridge.h>
diff --git a/arch/ppc/platforms/4xx/cpci405.c b/arch/ppc/platforms/4xx/cpci405.c
index 8474b05b795a..2e7e25dd84cb 100644
--- a/arch/ppc/platforms/4xx/cpci405.c
+++ b/arch/ppc/platforms/4xx/cpci405.c
@@ -23,6 +23,7 @@
23#include <asm/todc.h> 23#include <asm/todc.h>
24#include <linux/serial.h> 24#include <linux/serial.h>
25#include <linux/serial_core.h> 25#include <linux/serial_core.h>
26#include <linux/serial_8250.h>
26#include <asm/ocp.h> 27#include <asm/ocp.h>
27#include <asm/ibm_ocp_pci.h> 28#include <asm/ibm_ocp_pci.h>
28#include <platforms/4xx/ibm405gp.h> 29#include <platforms/4xx/ibm405gp.h>
diff --git a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c
index f0f9cc8480ca..05d7184d7e14 100644
--- a/arch/ppc/platforms/4xx/ebony.c
+++ b/arch/ppc/platforms/4xx/ebony.c
@@ -32,6 +32,7 @@
32#include <linux/tty.h> 32#include <linux/tty.h>
33#include <linux/serial.h> 33#include <linux/serial.h>
34#include <linux/serial_core.h> 34#include <linux/serial_core.h>
35#include <linux/serial_8250.h>
35 36
36#include <asm/system.h> 37#include <asm/system.h>
37#include <asm/pgtable.h> 38#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c
index 61706ef37112..4b169610f154 100644
--- a/arch/ppc/platforms/4xx/luan.c
+++ b/arch/ppc/platforms/4xx/luan.c
@@ -30,6 +30,7 @@
30#include <linux/tty.h> 30#include <linux/tty.h>
31#include <linux/serial.h> 31#include <linux/serial.h>
32#include <linux/serial_core.h> 32#include <linux/serial_core.h>
33#include <linux/serial_8250.h>
33 34
34#include <asm/system.h> 35#include <asm/system.h>
35#include <asm/pgtable.h> 36#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c
index 5e994e146ba8..fd0f971881d6 100644
--- a/arch/ppc/platforms/4xx/ocotea.c
+++ b/arch/ppc/platforms/4xx/ocotea.c
@@ -30,6 +30,7 @@
30#include <linux/tty.h> 30#include <linux/tty.h>
31#include <linux/serial.h> 31#include <linux/serial.h>
32#include <linux/serial_core.h> 32#include <linux/serial_core.h>
33#include <linux/serial_8250.h>
33 34
34#include <asm/system.h> 35#include <asm/system.h>
35#include <asm/pgtable.h> 36#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/4xx/taishan.c b/arch/ppc/platforms/4xx/taishan.c
index 5d9af8ddb155..888c492b4a45 100644
--- a/arch/ppc/platforms/4xx/taishan.c
+++ b/arch/ppc/platforms/4xx/taishan.c
@@ -30,6 +30,7 @@
30#include <linux/tty.h> 30#include <linux/tty.h>
31#include <linux/serial.h> 31#include <linux/serial.h>
32#include <linux/serial_core.h> 32#include <linux/serial_core.h>
33#include <linux/serial_8250.h>
33#include <linux/platform_device.h> 34#include <linux/platform_device.h>
34#include <linux/mtd/partitions.h> 35#include <linux/mtd/partitions.h>
35#include <linux/mtd/nand.h> 36#include <linux/mtd/nand.h>
diff --git a/arch/ppc/platforms/4xx/yucca.c b/arch/ppc/platforms/4xx/yucca.c
index 346787df0ddb..a83b0baea011 100644
--- a/arch/ppc/platforms/4xx/yucca.c
+++ b/arch/ppc/platforms/4xx/yucca.c
@@ -31,6 +31,7 @@
31#include <linux/tty.h> 31#include <linux/tty.h>
32#include <linux/serial.h> 32#include <linux/serial.h>
33#include <linux/serial_core.h> 33#include <linux/serial_core.h>
34#include <linux/serial_8250.h>
34 35
35#include <asm/system.h> 36#include <asm/system.h>
36#include <asm/pgtable.h> 37#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c
index 1d10ab98f66d..3d7addbdecfd 100644
--- a/arch/ppc/platforms/85xx/sbc8560.c
+++ b/arch/ppc/platforms/85xx/sbc8560.c
@@ -26,6 +26,7 @@
26#include <linux/serial.h> 26#include <linux/serial.h>
27#include <linux/tty.h> /* for linux/serial_core.h */ 27#include <linux/tty.h> /* for linux/serial_core.h */
28#include <linux/serial_core.h> 28#include <linux/serial_core.h>
29#include <linux/serial_8250.h>
29#include <linux/initrd.h> 30#include <linux/initrd.h>
30#include <linux/module.h> 31#include <linux/module.h>
31#include <linux/fsl_devices.h> 32#include <linux/fsl_devices.h>
diff --git a/arch/ppc/platforms/chestnut.c b/arch/ppc/platforms/chestnut.c
index a764ae71cbcb..248684f50dd9 100644
--- a/arch/ppc/platforms/chestnut.c
+++ b/arch/ppc/platforms/chestnut.c
@@ -25,6 +25,7 @@
25#include <linux/ide.h> 25#include <linux/ide.h>
26#include <linux/serial.h> 26#include <linux/serial.h>
27#include <linux/serial_core.h> 27#include <linux/serial_core.h>
28#include <linux/serial_8250.h>
28#include <linux/mtd/physmap.h> 29#include <linux/mtd/physmap.h>
29#include <asm/system.h> 30#include <asm/system.h>
30#include <asm/pgtable.h> 31#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/ev64260.c b/arch/ppc/platforms/ev64260.c
index 4957a7bcde22..976270d537c1 100644
--- a/arch/ppc/platforms/ev64260.c
+++ b/arch/ppc/platforms/ev64260.c
@@ -35,6 +35,7 @@
35#include <linux/serial.h> 35#include <linux/serial.h>
36#include <linux/tty.h> 36#include <linux/tty.h>
37#include <linux/serial_core.h> 37#include <linux/serial_core.h>
38#include <linux/serial_8250.h>
38#else 39#else
39#include <linux/mv643xx.h> 40#include <linux/mv643xx.h>
40#endif 41#endif
diff --git a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c
index 6f21110a9747..3c56654bfc6f 100644
--- a/arch/ppc/platforms/prep_setup.c
+++ b/arch/ppc/platforms/prep_setup.c
@@ -69,9 +69,6 @@
69 69
70TODC_ALLOC(); 70TODC_ALLOC();
71 71
72unsigned char ucBoardRev;
73unsigned char ucBoardRevMaj, ucBoardRevMin;
74
75extern unsigned char prep_nvram_read_val(int addr); 72extern unsigned char prep_nvram_read_val(int addr);
76extern void prep_nvram_write_val(int addr, 73extern void prep_nvram_write_val(int addr,
77 unsigned char val); 74 unsigned char val);
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c
index b55860734a72..44d4398a36ff 100644
--- a/arch/ppc/platforms/radstone_ppc7d.c
+++ b/arch/ppc/platforms/radstone_ppc7d.c
@@ -35,6 +35,7 @@
35#include <linux/serial.h> 35#include <linux/serial.h>
36#include <linux/tty.h> /* for linux/serial_core.h */ 36#include <linux/tty.h> /* for linux/serial_core.h */
37#include <linux/serial_core.h> 37#include <linux/serial_core.h>
38#include <linux/serial_8250.h>
38#include <linux/mv643xx.h> 39#include <linux/mv643xx.h>
39#include <linux/netdevice.h> 40#include <linux/netdevice.h>
40#include <linux/platform_device.h> 41#include <linux/platform_device.h>
diff --git a/arch/ppc/platforms/spruce.c b/arch/ppc/platforms/spruce.c
index 3c7842784876..f4de50ba292e 100644
--- a/arch/ppc/platforms/spruce.c
+++ b/arch/ppc/platforms/spruce.c
@@ -27,6 +27,7 @@
27#include <linux/serial.h> 27#include <linux/serial.h>
28#include <linux/tty.h> 28#include <linux/tty.h>
29#include <linux/serial_core.h> 29#include <linux/serial_core.h>
30#include <linux/serial_8250.h>
30 31
31#include <asm/system.h> 32#include <asm/system.h>
32#include <asm/pgtable.h> 33#include <asm/pgtable.h>
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile
index 95694159b226..543795be58c8 100644
--- a/arch/ppc/syslib/Makefile
+++ b/arch/ppc/syslib/Makefile
@@ -7,6 +7,7 @@ CFLAGS_btext.o += -fPIC
7 7
8wdt-mpc8xx-$(CONFIG_8xx_WDT) += m8xx_wdt.o 8wdt-mpc8xx-$(CONFIG_8xx_WDT) += m8xx_wdt.o
9 9
10obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
10obj-$(CONFIG_PPCBUG_NVRAM) += prep_nvram.o 11obj-$(CONFIG_PPCBUG_NVRAM) += prep_nvram.o
11obj-$(CONFIG_PPC_OCP) += ocp.o 12obj-$(CONFIG_PPC_OCP) += ocp.o
12obj-$(CONFIG_IBM_OCP) += ibm_ocp.o 13obj-$(CONFIG_IBM_OCP) += ibm_ocp.o
diff --git a/arch/ppc/syslib/ibm_ocp.c b/arch/ppc/syslib/ibm_ocp.c
index 3f6e55c79181..2ee176610e7c 100644
--- a/arch/ppc/syslib/ibm_ocp.c
+++ b/arch/ppc/syslib/ibm_ocp.c
@@ -1,4 +1,5 @@
1#include <linux/module.h> 1#include <linux/module.h>
2#include <asm/ibm4xx.h>
2#include <asm/ocp.h> 3#include <asm/ocp.h>
3 4
4struct ocp_sys_info_data ocp_sys_info = { 5struct ocp_sys_info_data ocp_sys_info = {
diff --git a/arch/ppc/syslib/indirect_pci.c b/arch/ppc/syslib/indirect_pci.c
new file mode 100644
index 000000000000..83b323a7d029
--- /dev/null
+++ b/arch/ppc/syslib/indirect_pci.c
@@ -0,0 +1,134 @@
1/*
2 * Support for indirect PCI bridges.
3 *
4 * Copyright (C) 1998 Gabriel Paubert.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12#include <linux/kernel.h>
13#include <linux/pci.h>
14#include <linux/delay.h>
15#include <linux/string.h>
16#include <linux/init.h>
17
18#include <asm/io.h>
19#include <asm/prom.h>
20#include <asm/pci-bridge.h>
21#include <asm/machdep.h>
22
23#ifdef CONFIG_PPC_INDIRECT_PCI_BE
24#define PCI_CFG_OUT out_be32
25#else
26#define PCI_CFG_OUT out_le32
27#endif
28
29static int
30indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
31 int len, u32 *val)
32{
33 struct pci_controller *hose = bus->sysdata;
34 volatile void __iomem *cfg_data;
35 u8 cfg_type = 0;
36
37 if (ppc_md.pci_exclude_device)
38 if (ppc_md.pci_exclude_device(bus->number, devfn))
39 return PCIBIOS_DEVICE_NOT_FOUND;
40
41 if (hose->set_cfg_type)
42 if (bus->number != hose->first_busno)
43 cfg_type = 1;
44
45 PCI_CFG_OUT(hose->cfg_addr,
46 (0x80000000 | ((bus->number - hose->bus_offset) << 16)
47 | (devfn << 8) | ((offset & 0xfc) | cfg_type)));
48
49 /*
50 * Note: the caller has already checked that offset is
51 * suitably aligned and that len is 1, 2 or 4.
52 */
53 cfg_data = hose->cfg_data + (offset & 3);
54 switch (len) {
55 case 1:
56 *val = in_8(cfg_data);
57 break;
58 case 2:
59 *val = in_le16(cfg_data);
60 break;
61 default:
62 *val = in_le32(cfg_data);
63 break;
64 }
65 return PCIBIOS_SUCCESSFUL;
66}
67
68static int
69indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
70 int len, u32 val)
71{
72 struct pci_controller *hose = bus->sysdata;
73 volatile void __iomem *cfg_data;
74 u8 cfg_type = 0;
75
76 if (ppc_md.pci_exclude_device)
77 if (ppc_md.pci_exclude_device(bus->number, devfn))
78 return PCIBIOS_DEVICE_NOT_FOUND;
79
80 if (hose->set_cfg_type)
81 if (bus->number != hose->first_busno)
82 cfg_type = 1;
83
84 PCI_CFG_OUT(hose->cfg_addr,
85 (0x80000000 | ((bus->number - hose->bus_offset) << 16)
86 | (devfn << 8) | ((offset & 0xfc) | cfg_type)));
87
88 /*
89 * Note: the caller has already checked that offset is
90 * suitably aligned and that len is 1, 2 or 4.
91 */
92 cfg_data = hose->cfg_data + (offset & 3);
93 switch (len) {
94 case 1:
95 out_8(cfg_data, val);
96 break;
97 case 2:
98 out_le16(cfg_data, val);
99 break;
100 default:
101 out_le32(cfg_data, val);
102 break;
103 }
104 return PCIBIOS_SUCCESSFUL;
105}
106
107static struct pci_ops indirect_pci_ops =
108{
109 indirect_read_config,
110 indirect_write_config
111};
112
113void __init
114setup_indirect_pci_nomap(struct pci_controller* hose, void __iomem * cfg_addr,
115 void __iomem * cfg_data)
116{
117 hose->cfg_addr = cfg_addr;
118 hose->cfg_data = cfg_data;
119 hose->ops = &indirect_pci_ops;
120}
121
122void __init
123setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
124{
125 unsigned long base = cfg_addr & PAGE_MASK;
126 void __iomem *mbase, *addr, *data;
127
128 mbase = ioremap(base, PAGE_SIZE);
129 addr = mbase + (cfg_addr & ~PAGE_MASK);
130 if ((cfg_data & PAGE_MASK) != base)
131 mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE);
132 data = mbase + (cfg_data & ~PAGE_MASK);
133 setup_indirect_pci_nomap(hose, addr, data);
134}
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c
index 8485a68cd475..032f4b7f4225 100644
--- a/arch/ppc/syslib/mv64x60.c
+++ b/arch/ppc/syslib/mv64x60.c
@@ -2415,7 +2415,6 @@ static struct bin_attribute mv64xxx_hs_reg_attr = { /* Hotswap register */
2415 .attr = { 2415 .attr = {
2416 .name = "hs_reg", 2416 .name = "hs_reg",
2417 .mode = S_IRUGO | S_IWUSR, 2417 .mode = S_IRUGO | S_IWUSR,
2418 .owner = THIS_MODULE,
2419 }, 2418 },
2420 .size = VAL_LEN_MAX, 2419 .size = VAL_LEN_MAX,
2421 .read = mv64xxx_hs_reg_read, 2420 .read = mv64xxx_hs_reg_read,
diff --git a/arch/ppc/syslib/qspan_pci.c b/arch/ppc/syslib/qspan_pci.c
index 85053b2816a9..7a97c7440b30 100644
--- a/arch/ppc/syslib/qspan_pci.c
+++ b/arch/ppc/syslib/qspan_pci.c
@@ -365,13 +365,13 @@ int qspan_pcibios_find_class(unsigned int class_code, unsigned short index,
365} 365}
366 366
367void __init 367void __init
368m8xx_pcibios_fixup(void)) 368m8xx_pcibios_fixup(void)
369{ 369{
370 /* Lots to do here, all board and configuration specific. */ 370 /* Lots to do here, all board and configuration specific. */
371} 371}
372 372
373void __init 373void __init
374m8xx_setup_pci_ptrs(void)) 374m8xx_setup_pci_ptrs(void)
375{ 375{
376 set_config_access_method(qspan); 376 set_config_access_method(qspan);
377 377
diff --git a/arch/ppc/syslib/virtex_devices.c b/arch/ppc/syslib/virtex_devices.c
index 16546788e23b..ace4ec08de51 100644
--- a/arch/ppc/syslib/virtex_devices.c
+++ b/arch/ppc/syslib/virtex_devices.c
@@ -71,6 +71,21 @@
71 }, \ 71 }, \
72} 72}
73 73
74/*
75 * ML300/ML403 Video Device: shortcut macro for single instance
76 */
77#define XPAR_TFT(num) { \
78 .name = "xilinxfb", \
79 .id = num, \
80 .num_resources = 1, \
81 .resource = (struct resource[]) { \
82 { \
83 .start = XPAR_TFT_##num##_BASEADDR, \
84 .end = XPAR_TFT_##num##_BASEADDR+7, \
85 .flags = IORESOURCE_IO, \
86 }, \
87 }, \
88}
74 89
75/* UART 8250 driver platform data table */ 90/* UART 8250 driver platform data table */
76struct plat_serial8250_port virtex_serial_platform_data[] = { 91struct plat_serial8250_port virtex_serial_platform_data[] = {
@@ -146,20 +161,17 @@ struct platform_device virtex_platform_devices[] = {
146 XPAR_SYSACE(1), 161 XPAR_SYSACE(1),
147#endif 162#endif
148 163
149 /* ML300/403 reference design framebuffer */
150#if defined(XPAR_TFT_0_BASEADDR) 164#if defined(XPAR_TFT_0_BASEADDR)
151 { 165 XPAR_TFT(0),
152 .name = "xilinxfb", 166#endif
153 .id = 0, 167#if defined(XPAR_TFT_1_BASEADDR)
154 .num_resources = 1, 168 XPAR_TFT(1),
155 .resource = (struct resource[]) { 169#endif
156 { 170#if defined(XPAR_TFT_2_BASEADDR)
157 .start = XPAR_TFT_0_BASEADDR, 171 XPAR_TFT(2),
158 .end = XPAR_TFT_0_BASEADDR+7, 172#endif
159 .flags = IORESOURCE_IO, 173#if defined(XPAR_TFT_3_BASEADDR)
160 }, 174 XPAR_TFT(3),
161 },
162 },
163#endif 175#endif
164}; 176};
165 177
diff --git a/arch/ppc/syslib/virtex_devices.h b/arch/ppc/syslib/virtex_devices.h
index 3d4be1412f60..9f38d92ae536 100644
--- a/arch/ppc/syslib/virtex_devices.h
+++ b/arch/ppc/syslib/virtex_devices.h
@@ -31,4 +31,11 @@ void __init virtex_early_serial_map(void);
31 */ 31 */
32int virtex_device_fixup(struct platform_device *dev); 32int virtex_device_fixup(struct platform_device *dev);
33 33
34/* SPI Controller IP */
35struct xspi_platform_data {
36 s16 bus_num;
37 u16 num_chipselect;
38 u32 speed_hz;
39};
40
34#endif /* __ASM_VIRTEX_DEVICES_H__ */ 41#endif /* __ASM_VIRTEX_DEVICES_H__ */
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index 68441e0e74b6..143ed8e154af 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -19,7 +19,7 @@ CFLAGS += -m31
19AFLAGS += -m31 19AFLAGS += -m31
20UTS_MACHINE := s390 20UTS_MACHINE := s390
21STACK_SIZE := 8192 21STACK_SIZE := 8192
22CHECKFLAGS += -D__s390__ 22CHECKFLAGS += -D__s390__ -msize-long
23else 23else
24LDFLAGS := -m elf64_s390 24LDFLAGS := -m elf64_s390
25MODFLAGS += -fpic -D__PIC__ 25MODFLAGS += -fpic -D__PIC__
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 81a2b92ab0c2..6ffbab77ae4d 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -535,8 +535,7 @@ void appldata_unregister_ops(struct appldata_ops *ops)
535 535
536/******************************* init / exit *********************************/ 536/******************************* init / exit *********************************/
537 537
538static void 538static void __cpuinit appldata_online_cpu(int cpu)
539appldata_online_cpu(int cpu)
540{ 539{
541 init_virt_timer(&per_cpu(appldata_timer, cpu)); 540 init_virt_timer(&per_cpu(appldata_timer, cpu));
542 per_cpu(appldata_timer, cpu).function = appldata_timer_function; 541 per_cpu(appldata_timer, cpu).function = appldata_timer_function;
@@ -580,7 +579,7 @@ appldata_cpu_notify(struct notifier_block *self,
580 return NOTIFY_OK; 579 return NOTIFY_OK;
581} 580}
582 581
583static struct notifier_block appldata_nb = { 582static struct notifier_block __cpuinitdata appldata_nb = {
584 .notifier_call = appldata_cpu_notify, 583 .notifier_call = appldata_cpu_notify,
585}; 584};
586 585
diff --git a/arch/s390/crypto/crypt_s390.h b/arch/s390/crypto/crypt_s390.h
index 2775d2618332..95f5160df27f 100644
--- a/arch/s390/crypto/crypt_s390.h
+++ b/arch/s390/crypto/crypt_s390.h
@@ -24,7 +24,7 @@
24#define CRYPT_S390_PRIORITY 300 24#define CRYPT_S390_PRIORITY 300
25#define CRYPT_S390_COMPOSITE_PRIORITY 400 25#define CRYPT_S390_COMPOSITE_PRIORITY 400
26 26
27/* s930 cryptographic operations */ 27/* s390 cryptographic operations */
28enum crypt_s390_operations { 28enum crypt_s390_operations {
29 CRYPT_S390_KM = 0x0100, 29 CRYPT_S390_KM = 0x0100,
30 CRYPT_S390_KMC = 0x0200, 30 CRYPT_S390_KMC = 0x0200,
diff --git a/arch/s390/defconfig b/arch/s390/defconfig
index 485b60c1983c..2aae23dba4bb 100644
--- a/arch/s390/defconfig
+++ b/arch/s390/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.21 3# Linux kernel version: 2.6.22
4# Thu May 10 15:18:19 2007 4# Tue Jul 17 12:50:23 2007
5# 5#
6CONFIG_MMU=y 6CONFIG_MMU=y
7CONFIG_ZONE_DMA=y 7CONFIG_ZONE_DMA=y
@@ -32,12 +32,11 @@ CONFIG_LOCALVERSION=""
32CONFIG_LOCALVERSION_AUTO=y 32CONFIG_LOCALVERSION_AUTO=y
33CONFIG_SWAP=y 33CONFIG_SWAP=y
34CONFIG_SYSVIPC=y 34CONFIG_SYSVIPC=y
35# CONFIG_IPC_NS is not set
36CONFIG_SYSVIPC_SYSCTL=y 35CONFIG_SYSVIPC_SYSCTL=y
37CONFIG_POSIX_MQUEUE=y 36CONFIG_POSIX_MQUEUE=y
38# CONFIG_BSD_PROCESS_ACCT is not set 37# CONFIG_BSD_PROCESS_ACCT is not set
39# CONFIG_TASKSTATS is not set 38# CONFIG_TASKSTATS is not set
40# CONFIG_UTS_NS is not set 39# CONFIG_USER_NS is not set
41CONFIG_AUDIT=y 40CONFIG_AUDIT=y
42# CONFIG_AUDITSYSCALL is not set 41# CONFIG_AUDITSYSCALL is not set
43CONFIG_IKCONFIG=y 42CONFIG_IKCONFIG=y
@@ -61,20 +60,19 @@ CONFIG_BUG=y
61CONFIG_ELF_CORE=y 60CONFIG_ELF_CORE=y
62CONFIG_BASE_FULL=y 61CONFIG_BASE_FULL=y
63CONFIG_FUTEX=y 62CONFIG_FUTEX=y
63CONFIG_ANON_INODES=y
64CONFIG_EPOLL=y 64CONFIG_EPOLL=y
65CONFIG_SIGNALFD=y
66CONFIG_TIMERFD=y
67CONFIG_EVENTFD=y
65CONFIG_SHMEM=y 68CONFIG_SHMEM=y
66CONFIG_VM_EVENT_COUNTERS=y 69CONFIG_VM_EVENT_COUNTERS=y
67CONFIG_SLUB_DEBUG=y
68CONFIG_SLAB=y 70CONFIG_SLAB=y
69# CONFIG_SLUB is not set 71# CONFIG_SLUB is not set
70# CONFIG_SLOB is not set 72# CONFIG_SLOB is not set
71CONFIG_RT_MUTEXES=y 73CONFIG_RT_MUTEXES=y
72# CONFIG_TINY_SHMEM is not set 74# CONFIG_TINY_SHMEM is not set
73CONFIG_BASE_SMALL=0 75CONFIG_BASE_SMALL=0
74
75#
76# Loadable module support
77#
78CONFIG_MODULES=y 76CONFIG_MODULES=y
79CONFIG_MODULE_UNLOAD=y 77CONFIG_MODULE_UNLOAD=y
80# CONFIG_MODULE_FORCE_UNLOAD is not set 78# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -82,12 +80,9 @@ CONFIG_MODVERSIONS=y
82# CONFIG_MODULE_SRCVERSION_ALL is not set 80# CONFIG_MODULE_SRCVERSION_ALL is not set
83CONFIG_KMOD=y 81CONFIG_KMOD=y
84CONFIG_STOP_MACHINE=y 82CONFIG_STOP_MACHINE=y
85
86#
87# Block layer
88#
89CONFIG_BLOCK=y 83CONFIG_BLOCK=y
90# CONFIG_BLK_DEV_IO_TRACE is not set 84# CONFIG_BLK_DEV_IO_TRACE is not set
85CONFIG_BLK_DEV_BSG=y
91 86
92# 87#
93# IO Schedulers 88# IO Schedulers
@@ -151,6 +146,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
151CONFIG_SPLIT_PTLOCK_CPUS=4 146CONFIG_SPLIT_PTLOCK_CPUS=4
152CONFIG_RESOURCES_64BIT=y 147CONFIG_RESOURCES_64BIT=y
153CONFIG_ZONE_DMA_FLAG=1 148CONFIG_ZONE_DMA_FLAG=1
149CONFIG_VIRT_TO_BUS=y
154CONFIG_HOLES_IN_ZONE=y 150CONFIG_HOLES_IN_ZONE=y
155 151
156# 152#
@@ -248,25 +244,13 @@ CONFIG_IPV6_SIT=y
248# CONFIG_IPV6_MULTIPLE_TABLES is not set 244# CONFIG_IPV6_MULTIPLE_TABLES is not set
249# CONFIG_NETWORK_SECMARK is not set 245# CONFIG_NETWORK_SECMARK is not set
250# CONFIG_NETFILTER is not set 246# CONFIG_NETFILTER is not set
251
252#
253# DCCP Configuration (EXPERIMENTAL)
254#
255# CONFIG_IP_DCCP is not set 247# CONFIG_IP_DCCP is not set
256
257#
258# SCTP Configuration (EXPERIMENTAL)
259#
260CONFIG_IP_SCTP=m 248CONFIG_IP_SCTP=m
261# CONFIG_SCTP_DBG_MSG is not set 249# CONFIG_SCTP_DBG_MSG is not set
262# CONFIG_SCTP_DBG_OBJCNT is not set 250# CONFIG_SCTP_DBG_OBJCNT is not set
263# CONFIG_SCTP_HMAC_NONE is not set 251# CONFIG_SCTP_HMAC_NONE is not set
264# CONFIG_SCTP_HMAC_SHA1 is not set 252# CONFIG_SCTP_HMAC_SHA1 is not set
265CONFIG_SCTP_HMAC_MD5=y 253CONFIG_SCTP_HMAC_MD5=y
266
267#
268# TIPC Configuration (EXPERIMENTAL)
269#
270# CONFIG_TIPC is not set 254# CONFIG_TIPC is not set
271# CONFIG_ATM is not set 255# CONFIG_ATM is not set
272# CONFIG_BRIDGE is not set 256# CONFIG_BRIDGE is not set
@@ -293,6 +277,7 @@ CONFIG_NET_SCH_CBQ=m
293# CONFIG_NET_SCH_HTB is not set 277# CONFIG_NET_SCH_HTB is not set
294# CONFIG_NET_SCH_HFSC is not set 278# CONFIG_NET_SCH_HFSC is not set
295CONFIG_NET_SCH_PRIO=m 279CONFIG_NET_SCH_PRIO=m
280CONFIG_NET_SCH_RR=m
296CONFIG_NET_SCH_RED=m 281CONFIG_NET_SCH_RED=m
297CONFIG_NET_SCH_SFQ=m 282CONFIG_NET_SCH_SFQ=m
298CONFIG_NET_SCH_TEQL=m 283CONFIG_NET_SCH_TEQL=m
@@ -317,10 +302,14 @@ CONFIG_CLS_U32_MARK=y
317CONFIG_NET_CLS_RSVP=m 302CONFIG_NET_CLS_RSVP=m
318CONFIG_NET_CLS_RSVP6=m 303CONFIG_NET_CLS_RSVP6=m
319# CONFIG_NET_EMATCH is not set 304# CONFIG_NET_EMATCH is not set
320# CONFIG_NET_CLS_ACT is not set 305CONFIG_NET_CLS_ACT=y
306CONFIG_NET_ACT_POLICE=y
307# CONFIG_NET_ACT_GACT is not set
308# CONFIG_NET_ACT_MIRRED is not set
309# CONFIG_NET_ACT_PEDIT is not set
310# CONFIG_NET_ACT_SIMP is not set
321CONFIG_NET_CLS_POLICE=y 311CONFIG_NET_CLS_POLICE=y
322# CONFIG_NET_CLS_IND is not set 312# CONFIG_NET_CLS_IND is not set
323CONFIG_NET_ESTIMATOR=y
324 313
325# 314#
326# Network testing 315# Network testing
@@ -329,6 +318,7 @@ CONFIG_NET_ESTIMATOR=y
329# CONFIG_NET_TCPPROBE is not set 318# CONFIG_NET_TCPPROBE is not set
330# CONFIG_AF_RXRPC is not set 319# CONFIG_AF_RXRPC is not set
331# CONFIG_RFKILL is not set 320# CONFIG_RFKILL is not set
321# CONFIG_NET_9P is not set
332# CONFIG_PCMCIA is not set 322# CONFIG_PCMCIA is not set
333CONFIG_CCW=y 323CONFIG_CCW=y
334 324
@@ -345,15 +335,8 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
345# CONFIG_DEBUG_DRIVER is not set 335# CONFIG_DEBUG_DRIVER is not set
346# CONFIG_DEBUG_DEVRES is not set 336# CONFIG_DEBUG_DEVRES is not set
347CONFIG_SYS_HYPERVISOR=y 337CONFIG_SYS_HYPERVISOR=y
348
349#
350# Connector - unified userspace <-> kernelspace linker
351#
352# CONFIG_CONNECTOR is not set 338# CONFIG_CONNECTOR is not set
353 339CONFIG_BLK_DEV=y
354#
355# Block devices
356#
357# CONFIG_BLK_DEV_COW_COMMON is not set 340# CONFIG_BLK_DEV_COW_COMMON is not set
358CONFIG_BLK_DEV_LOOP=m 341CONFIG_BLK_DEV_LOOP=m
359# CONFIG_BLK_DEV_CRYPTOLOOP is not set 342# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -376,17 +359,15 @@ CONFIG_DASD_ECKD=y
376CONFIG_DASD_FBA=y 359CONFIG_DASD_FBA=y
377CONFIG_DASD_DIAG=y 360CONFIG_DASD_DIAG=y
378CONFIG_DASD_EER=y 361CONFIG_DASD_EER=y
379 362CONFIG_MISC_DEVICES=y
380# 363# CONFIG_EEPROM_93CX6 is not set
381# Misc devices
382#
383# CONFIG_BLINK is not set
384 364
385# 365#
386# SCSI device support 366# SCSI device support
387# 367#
388# CONFIG_RAID_ATTRS is not set 368# CONFIG_RAID_ATTRS is not set
389CONFIG_SCSI=y 369CONFIG_SCSI=y
370# CONFIG_SCSI_DMA is not set
390# CONFIG_SCSI_TGT is not set 371# CONFIG_SCSI_TGT is not set
391CONFIG_SCSI_NETLINK=y 372CONFIG_SCSI_NETLINK=y
392CONFIG_SCSI_PROC_FS=y 373CONFIG_SCSI_PROC_FS=y
@@ -447,40 +428,21 @@ CONFIG_DM_MIRROR=y
447CONFIG_DM_ZERO=y 428CONFIG_DM_ZERO=y
448CONFIG_DM_MULTIPATH=y 429CONFIG_DM_MULTIPATH=y
449# CONFIG_DM_MULTIPATH_EMC is not set 430# CONFIG_DM_MULTIPATH_EMC is not set
431# CONFIG_DM_MULTIPATH_RDAC is not set
450# CONFIG_DM_DELAY is not set 432# CONFIG_DM_DELAY is not set
451
452#
453# Network device support
454#
455CONFIG_NETDEVICES=y 433CONFIG_NETDEVICES=y
434# CONFIG_NETDEVICES_MULTIQUEUE is not set
435# CONFIG_IFB is not set
456CONFIG_DUMMY=m 436CONFIG_DUMMY=m
457CONFIG_BONDING=m 437CONFIG_BONDING=m
438# CONFIG_MACVLAN is not set
458CONFIG_EQUALIZER=m 439CONFIG_EQUALIZER=m
459CONFIG_TUN=m 440CONFIG_TUN=m
460
461#
462# Ethernet (10 or 100Mbit)
463#
464CONFIG_NET_ETHERNET=y 441CONFIG_NET_ETHERNET=y
465# CONFIG_MII is not set 442# CONFIG_MII is not set
466 443CONFIG_NETDEV_1000=y
467# 444CONFIG_NETDEV_10000=y
468# Ethernet (1000 Mbit)
469#
470
471#
472# Ethernet (10000 Mbit)
473#
474CONFIG_MLX4_DEBUG=y
475
476#
477# Token Ring devices
478#
479# CONFIG_TR is not set 445# CONFIG_TR is not set
480
481#
482# Wan interfaces
483#
484# CONFIG_WAN is not set 446# CONFIG_WAN is not set
485 447
486# 448#
@@ -511,10 +473,6 @@ CONFIG_CCWGROUP=y
511CONFIG_UNIX98_PTYS=y 473CONFIG_UNIX98_PTYS=y
512CONFIG_LEGACY_PTYS=y 474CONFIG_LEGACY_PTYS=y
513CONFIG_LEGACY_PTY_COUNT=256 475CONFIG_LEGACY_PTY_COUNT=256
514
515#
516# Watchdog Cards
517#
518# CONFIG_WATCHDOG is not set 476# CONFIG_WATCHDOG is not set
519CONFIG_HW_RANDOM=m 477CONFIG_HW_RANDOM=m
520# CONFIG_R3964 is not set 478# CONFIG_R3964 is not set
@@ -554,6 +512,8 @@ CONFIG_S390_TAPE_34XX=m
554# CONFIG_VMCP is not set 512# CONFIG_VMCP is not set
555# CONFIG_MONREADER is not set 513# CONFIG_MONREADER is not set
556CONFIG_MONWRITER=m 514CONFIG_MONWRITER=m
515CONFIG_S390_VMUR=m
516# CONFIG_POWER_SUPPLY is not set
557 517
558# 518#
559# File systems 519# File systems
@@ -655,7 +615,6 @@ CONFIG_SUNRPC=y
655# CONFIG_NCP_FS is not set 615# CONFIG_NCP_FS is not set
656# CONFIG_CODA_FS is not set 616# CONFIG_CODA_FS is not set
657# CONFIG_AFS_FS is not set 617# CONFIG_AFS_FS is not set
658# CONFIG_9P_FS is not set
659 618
660# 619#
661# Partition Types 620# Partition Types
@@ -712,6 +671,7 @@ CONFIG_MAGIC_SYSRQ=y
712CONFIG_DEBUG_FS=y 671CONFIG_DEBUG_FS=y
713CONFIG_HEADERS_CHECK=y 672CONFIG_HEADERS_CHECK=y
714CONFIG_DEBUG_KERNEL=y 673CONFIG_DEBUG_KERNEL=y
674# CONFIG_SCHED_DEBUG is not set
715# CONFIG_SCHEDSTATS is not set 675# CONFIG_SCHEDSTATS is not set
716# CONFIG_TIMER_STATS is not set 676# CONFIG_TIMER_STATS is not set
717# CONFIG_DEBUG_SLAB is not set 677# CONFIG_DEBUG_SLAB is not set
@@ -740,10 +700,6 @@ CONFIG_FORCED_INLINING=y
740# 700#
741# CONFIG_KEYS is not set 701# CONFIG_KEYS is not set
742# CONFIG_SECURITY is not set 702# CONFIG_SECURITY is not set
743
744#
745# Cryptographic options
746#
747CONFIG_CRYPTO=y 703CONFIG_CRYPTO=y
748CONFIG_CRYPTO_ALGAPI=y 704CONFIG_CRYPTO_ALGAPI=y
749CONFIG_CRYPTO_BLKCIPHER=y 705CONFIG_CRYPTO_BLKCIPHER=y
@@ -782,10 +738,7 @@ CONFIG_CRYPTO_FCRYPT=m
782# CONFIG_CRYPTO_CRC32C is not set 738# CONFIG_CRYPTO_CRC32C is not set
783CONFIG_CRYPTO_CAMELLIA=m 739CONFIG_CRYPTO_CAMELLIA=m
784# CONFIG_CRYPTO_TEST is not set 740# CONFIG_CRYPTO_TEST is not set
785 741CONFIG_CRYPTO_HW=y
786#
787# Hardware crypto devices
788#
789# CONFIG_CRYPTO_SHA1_S390 is not set 742# CONFIG_CRYPTO_SHA1_S390 is not set
790# CONFIG_CRYPTO_SHA256_S390 is not set 743# CONFIG_CRYPTO_SHA256_S390 is not set
791# CONFIG_CRYPTO_DES_S390 is not set 744# CONFIG_CRYPTO_DES_S390 is not set
@@ -800,6 +753,7 @@ CONFIG_ZCRYPT=m
800CONFIG_BITREVERSE=m 753CONFIG_BITREVERSE=m
801# CONFIG_CRC_CCITT is not set 754# CONFIG_CRC_CCITT is not set
802# CONFIG_CRC16 is not set 755# CONFIG_CRC16 is not set
756# CONFIG_CRC_ITU_T is not set
803CONFIG_CRC32=m 757CONFIG_CRC32=m
804# CONFIG_LIBCRC32C is not set 758# CONFIG_LIBCRC32C is not set
805CONFIG_PLIST=y 759CONFIG_PLIST=y
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c
index a057ebf108a7..d3057318f2bf 100644
--- a/arch/s390/kernel/dis.c
+++ b/arch/s390/kernel/dis.c
@@ -240,8 +240,8 @@ static const unsigned char formats[][7] = {
240 [INSTR_RXY_FRRD] = { 0xff, F_8,D20_20,X_12,B_16,0,0 },/* e.g. ley */ 240 [INSTR_RXY_FRRD] = { 0xff, F_8,D20_20,X_12,B_16,0,0 },/* e.g. ley */
241 [INSTR_RX_FRRD] = { 0xff, F_8,D_20,X_12,B_16,0,0 }, /* e.g. ae */ 241 [INSTR_RX_FRRD] = { 0xff, F_8,D_20,X_12,B_16,0,0 }, /* e.g. ae */
242 [INSTR_RX_RRRD] = { 0xff, R_8,D_20,X_12,B_16,0,0 }, /* e.g. l */ 242 [INSTR_RX_RRRD] = { 0xff, R_8,D_20,X_12,B_16,0,0 }, /* e.g. l */
243 [INSTR_RX_URRD] = { 0x00, U4_8,D_20,X_12,B_16,0,0 }, /* e.g. bc */ 243 [INSTR_RX_URRD] = { 0xff, U4_8,D_20,X_12,B_16,0,0 }, /* e.g. bc */
244 [INSTR_SI_URD] = { 0x00, D_20,B_16,U8_8,0,0,0 }, /* e.g. cli */ 244 [INSTR_SI_URD] = { 0xff, D_20,B_16,U8_8,0,0,0 }, /* e.g. cli */
245 [INSTR_SIY_URD] = { 0xff, D20_20,B_16,U8_8,0,0,0 }, /* e.g. tmy */ 245 [INSTR_SIY_URD] = { 0xff, D20_20,B_16,U8_8,0,0,0 }, /* e.g. tmy */
246 [INSTR_SSE_RDRD] = { 0xff, D_20,B_16,D_36,B_32,0,0 }, /* e.g. mvsdk */ 246 [INSTR_SSE_RDRD] = { 0xff, D_20,B_16,D_36,B_32,0,0 }, /* e.g. mvsdk */
247 [INSTR_SS_L0RDRD] = { 0xff, D_20,L8_8,B_16,D_36,B_32,0 }, 247 [INSTR_SS_L0RDRD] = { 0xff, D_20,L8_8,B_16,D_36,B_32,0 },
@@ -1190,7 +1190,8 @@ static int print_insn(char *buffer, unsigned char *code, unsigned long addr)
1190 else if (operand->flags & OPERAND_CR) 1190 else if (operand->flags & OPERAND_CR)
1191 ptr += sprintf(ptr, "%%c%i", value); 1191 ptr += sprintf(ptr, "%%c%i", value);
1192 else if (operand->flags & OPERAND_PCREL) 1192 else if (operand->flags & OPERAND_PCREL)
1193 ptr += sprintf(ptr, "%lx", value + addr); 1193 ptr += sprintf(ptr, "%lx", (signed int) value
1194 + addr);
1194 else if (operand->flags & OPERAND_SIGNED) 1195 else if (operand->flags & OPERAND_SIGNED)
1195 ptr += sprintf(ptr, "%i", value); 1196 ptr += sprintf(ptr, "%i", value);
1196 else 1197 else
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index 50538e545618..e6289ee74ecd 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -171,37 +171,6 @@ static inline int memory_fast_detect(void)
171} 171}
172#endif 172#endif
173 173
174#define ADDR2G (1UL << 31)
175
176static noinline __init unsigned long sclp_memory_detect(void)
177{
178 struct sclp_readinfo_sccb *sccb;
179 unsigned long long memsize;
180
181 sccb = &s390_readinfo_sccb;
182
183 if (sccb->header.response_code != 0x10)
184 return 0;
185
186 if (sccb->rnsize)
187 memsize = sccb->rnsize << 20;
188 else
189 memsize = sccb->rnsize2 << 20;
190 if (sccb->rnmax)
191 memsize *= sccb->rnmax;
192 else
193 memsize *= sccb->rnmax2;
194#ifndef CONFIG_64BIT
195 /*
196 * Can't deal with more than 2G in 31 bit addressing mode, so
197 * limit the value in order to avoid strange side effects.
198 */
199 if (memsize > ADDR2G)
200 memsize = ADDR2G;
201#endif
202 return (unsigned long) memsize;
203}
204
205static inline __init unsigned long __tprot(unsigned long addr) 174static inline __init unsigned long __tprot(unsigned long addr)
206{ 175{
207 int cc = -1; 176 int cc = -1;
@@ -218,6 +187,7 @@ static inline __init unsigned long __tprot(unsigned long addr)
218 187
219/* Checking memory in 128KB increments. */ 188/* Checking memory in 128KB increments. */
220#define CHUNK_INCR (1UL << 17) 189#define CHUNK_INCR (1UL << 17)
190#define ADDR2G (1UL << 31)
221 191
222static noinline __init void find_memory_chunks(unsigned long memsize) 192static noinline __init void find_memory_chunks(unsigned long memsize)
223{ 193{
@@ -293,7 +263,7 @@ static noinline __init void setup_lowcore_early(void)
293 */ 263 */
294void __init startup_init(void) 264void __init startup_init(void)
295{ 265{
296 unsigned long memsize; 266 unsigned long long memsize;
297 267
298 ipl_save_parameters(); 268 ipl_save_parameters();
299 clear_bss_section(); 269 clear_bss_section();
@@ -305,8 +275,17 @@ void __init startup_init(void)
305 sort_main_extable(); 275 sort_main_extable();
306 setup_lowcore_early(); 276 setup_lowcore_early();
307 sclp_readinfo_early(); 277 sclp_readinfo_early();
278 sclp_facilities_detect();
308 memsize = sclp_memory_detect(); 279 memsize = sclp_memory_detect();
280#ifndef CONFIG_64BIT
281 /*
282 * Can't deal with more than 2G in 31 bit addressing mode, so
283 * limit the value in order to avoid strange side effects.
284 */
285 if (memsize > ADDR2G)
286 memsize = ADDR2G;
287#endif
309 if (memory_fast_detect() < 0) 288 if (memory_fast_detect() < 0)
310 find_memory_chunks(memsize); 289 find_memory_chunks((unsigned long) memsize);
311 lockdep_on(); 290 lockdep_on();
312} 291}
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index c8a2212014e0..bc7ff3658c3d 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -107,6 +107,11 @@ STACK_SIZE = 1 << STACK_SHIFT
107 l %r13,__LC_SVC_NEW_PSW+4 # load &system_call to %r13 107 l %r13,__LC_SVC_NEW_PSW+4 # load &system_call to %r13
108 .endm 108 .endm
109 109
110 .macro SAVE_ALL_SVC psworg,savearea
111 la %r12,\psworg
112 l %r15,__LC_KERNEL_STACK # problem state -> load ksp
113 .endm
114
110 .macro SAVE_ALL_SYNC psworg,savearea 115 .macro SAVE_ALL_SYNC psworg,savearea
111 la %r12,\psworg 116 la %r12,\psworg
112 tm \psworg+1,0x01 # test problem state bit 117 tm \psworg+1,0x01 # test problem state bit
@@ -218,7 +223,7 @@ system_call:
218 STORE_TIMER __LC_SYNC_ENTER_TIMER 223 STORE_TIMER __LC_SYNC_ENTER_TIMER
219sysc_saveall: 224sysc_saveall:
220 SAVE_ALL_BASE __LC_SAVE_AREA 225 SAVE_ALL_BASE __LC_SAVE_AREA
221 SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA 226 SAVE_ALL_SVC __LC_SVC_OLD_PSW,__LC_SAVE_AREA
222 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA 227 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA
223 lh %r7,0x8a # get svc number from lowcore 228 lh %r7,0x8a # get svc number from lowcore
224#ifdef CONFIG_VIRT_CPU_ACCOUNTING 229#ifdef CONFIG_VIRT_CPU_ACCOUNTING
@@ -769,10 +774,13 @@ mcck_return:
769 774
770 RESTORE_ALL __LC_RETURN_MCCK_PSW,0 775 RESTORE_ALL __LC_RETURN_MCCK_PSW,0
771 776
772#ifdef CONFIG_SMP
773/* 777/*
774 * Restart interruption handler, kick starter for additional CPUs 778 * Restart interruption handler, kick starter for additional CPUs
775 */ 779 */
780#ifdef CONFIG_SMP
781#ifndef CONFIG_HOTPLUG_CPU
782 .section .init.text,"ax"
783#endif
776 .globl restart_int_handler 784 .globl restart_int_handler
777restart_int_handler: 785restart_int_handler:
778 l %r15,__LC_SAVE_AREA+60 # load ksp 786 l %r15,__LC_SAVE_AREA+60 # load ksp
@@ -785,6 +793,9 @@ restart_int_handler:
785 br %r14 # branch to start_secondary 793 br %r14 # branch to start_secondary
786restart_addr: 794restart_addr:
787 .long start_secondary 795 .long start_secondary
796#ifndef CONFIG_HOTPLUG_CPU
797 .previous
798#endif
788#else 799#else
789/* 800/*
790 * If we do not run with SMP enabled, let the new CPU crash ... 801 * If we do not run with SMP enabled, let the new CPU crash ...
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index 93745fd8f555..2a7b1304418b 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -99,6 +99,11 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \
99 larl %r13,system_call 99 larl %r13,system_call
100 .endm 100 .endm
101 101
102 .macro SAVE_ALL_SVC psworg,savearea
103 la %r12,\psworg
104 lg %r15,__LC_KERNEL_STACK # problem state -> load ksp
105 .endm
106
102 .macro SAVE_ALL_SYNC psworg,savearea 107 .macro SAVE_ALL_SYNC psworg,savearea
103 la %r12,\psworg 108 la %r12,\psworg
104 tm \psworg+1,0x01 # test problem state bit 109 tm \psworg+1,0x01 # test problem state bit
@@ -207,7 +212,7 @@ system_call:
207 STORE_TIMER __LC_SYNC_ENTER_TIMER 212 STORE_TIMER __LC_SYNC_ENTER_TIMER
208sysc_saveall: 213sysc_saveall:
209 SAVE_ALL_BASE __LC_SAVE_AREA 214 SAVE_ALL_BASE __LC_SAVE_AREA
210 SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA 215 SAVE_ALL_SVC __LC_SVC_OLD_PSW,__LC_SAVE_AREA
211 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA 216 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA
212 llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore 217 llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore
213#ifdef CONFIG_VIRT_CPU_ACCOUNTING 218#ifdef CONFIG_VIRT_CPU_ACCOUNTING
@@ -745,10 +750,13 @@ mcck_return:
745#endif 750#endif
746 lpswe __LC_RETURN_MCCK_PSW # back to caller 751 lpswe __LC_RETURN_MCCK_PSW # back to caller
747 752
748#ifdef CONFIG_SMP
749/* 753/*
750 * Restart interruption handler, kick starter for additional CPUs 754 * Restart interruption handler, kick starter for additional CPUs
751 */ 755 */
756#ifdef CONFIG_SMP
757#ifndef CONFIG_HOTPLUG_CPU
758 .section .init.text,"ax"
759#endif
752 .globl restart_int_handler 760 .globl restart_int_handler
753restart_int_handler: 761restart_int_handler:
754 lg %r15,__LC_SAVE_AREA+120 # load ksp 762 lg %r15,__LC_SAVE_AREA+120 # load ksp
@@ -759,6 +767,9 @@ restart_int_handler:
759 lmg %r6,%r15,__SF_GPRS(%r15) # load registers from clone 767 lmg %r6,%r15,__SF_GPRS(%r15) # load registers from clone
760 stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on 768 stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on
761 jg start_secondary 769 jg start_secondary
770#ifndef CONFIG_HOTPLUG_CPU
771 .previous
772#endif
762#else 773#else
763/* 774/*
764 * If we do not run with SMP enabled, let the new CPU crash ... 775 * If we do not run with SMP enabled, let the new CPU crash ...
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 367caf92ea78..8b8f136d9cc7 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -25,10 +25,6 @@
25 25
26#define IPL_PARM_BLOCK_VERSION 0 26#define IPL_PARM_BLOCK_VERSION 0
27 27
28#define SCCB_VALID (s390_readinfo_sccb.header.response_code == 0x10)
29#define SCCB_LOADPARM (&s390_readinfo_sccb.loadparm)
30#define SCCB_FLAG (s390_readinfo_sccb.flags)
31
32#define IPL_UNKNOWN_STR "unknown" 28#define IPL_UNKNOWN_STR "unknown"
33#define IPL_CCW_STR "ccw" 29#define IPL_CCW_STR "ccw"
34#define IPL_FCP_STR "fcp" 30#define IPL_FCP_STR "fcp"
@@ -146,6 +142,8 @@ static struct ipl_parameter_block *dump_block_ccw;
146 142
147static enum shutdown_action on_panic_action = SHUTDOWN_STOP; 143static enum shutdown_action on_panic_action = SHUTDOWN_STOP;
148 144
145static struct sclp_ipl_info sclp_ipl_info;
146
149int diag308(unsigned long subcode, void *addr) 147int diag308(unsigned long subcode, void *addr)
150{ 148{
151 register unsigned long _addr asm("0") = (unsigned long) addr; 149 register unsigned long _addr asm("0") = (unsigned long) addr;
@@ -297,8 +295,8 @@ static ssize_t sys_ipl_device_show(struct kset *kset, char *page)
297static struct subsys_attribute sys_ipl_device_attr = 295static struct subsys_attribute sys_ipl_device_attr =
298 __ATTR(device, S_IRUGO, sys_ipl_device_show, NULL); 296 __ATTR(device, S_IRUGO, sys_ipl_device_show, NULL);
299 297
300static ssize_t ipl_parameter_read(struct kobject *kobj, char *buf, loff_t off, 298static ssize_t ipl_parameter_read(struct kobject *kobj, struct bin_attribute *attr,
301 size_t count) 299 char *buf, loff_t off, size_t count)
302{ 300{
303 unsigned int size = IPL_PARMBLOCK_SIZE; 301 unsigned int size = IPL_PARMBLOCK_SIZE;
304 302
@@ -314,14 +312,13 @@ static struct bin_attribute ipl_parameter_attr = {
314 .attr = { 312 .attr = {
315 .name = "binary_parameter", 313 .name = "binary_parameter",
316 .mode = S_IRUGO, 314 .mode = S_IRUGO,
317 .owner = THIS_MODULE,
318 }, 315 },
319 .size = PAGE_SIZE, 316 .size = PAGE_SIZE,
320 .read = &ipl_parameter_read, 317 .read = &ipl_parameter_read,
321}; 318};
322 319
323static ssize_t ipl_scp_data_read(struct kobject *kobj, char *buf, loff_t off, 320static ssize_t ipl_scp_data_read(struct kobject *kobj, struct bin_attribute *attr,
324 size_t count) 321 char *buf, loff_t off, size_t count)
325{ 322{
326 unsigned int size = IPL_PARMBLOCK_START->ipl_info.fcp.scp_data_len; 323 unsigned int size = IPL_PARMBLOCK_START->ipl_info.fcp.scp_data_len;
327 void *scp_data = &IPL_PARMBLOCK_START->ipl_info.fcp.scp_data; 324 void *scp_data = &IPL_PARMBLOCK_START->ipl_info.fcp.scp_data;
@@ -338,10 +335,9 @@ static struct bin_attribute ipl_scp_data_attr = {
338 .attr = { 335 .attr = {
339 .name = "scp_data", 336 .name = "scp_data",
340 .mode = S_IRUGO, 337 .mode = S_IRUGO,
341 .owner = THIS_MODULE,
342 }, 338 },
343 .size = PAGE_SIZE, 339 .size = PAGE_SIZE,
344 .read = &ipl_scp_data_read, 340 .read = ipl_scp_data_read,
345}; 341};
346 342
347/* FCP ipl device attributes */ 343/* FCP ipl device attributes */
@@ -375,9 +371,9 @@ static ssize_t ipl_ccw_loadparm_show(struct kset *kset, char *page)
375{ 371{
376 char loadparm[LOADPARM_LEN + 1] = {}; 372 char loadparm[LOADPARM_LEN + 1] = {};
377 373
378 if (!SCCB_VALID) 374 if (!sclp_ipl_info.is_valid)
379 return sprintf(page, "#unknown#\n"); 375 return sprintf(page, "#unknown#\n");
380 memcpy(loadparm, SCCB_LOADPARM, LOADPARM_LEN); 376 memcpy(loadparm, &sclp_ipl_info.loadparm, LOADPARM_LEN);
381 EBCASC(loadparm, LOADPARM_LEN); 377 EBCASC(loadparm, LOADPARM_LEN);
382 strstrip(loadparm); 378 strstrip(loadparm);
383 return sprintf(page, "%s\n", loadparm); 379 return sprintf(page, "%s\n", loadparm);
@@ -910,9 +906,9 @@ static int __init reipl_ccw_init(void)
910 reipl_block_ccw->hdr.blk0_len = IPL_PARM_BLK0_CCW_LEN; 906 reipl_block_ccw->hdr.blk0_len = IPL_PARM_BLK0_CCW_LEN;
911 reipl_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW; 907 reipl_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW;
912 /* check if read scp info worked and set loadparm */ 908 /* check if read scp info worked and set loadparm */
913 if (SCCB_VALID) 909 if (sclp_ipl_info.is_valid)
914 memcpy(reipl_block_ccw->ipl_info.ccw.load_param, 910 memcpy(reipl_block_ccw->ipl_info.ccw.load_param,
915 SCCB_LOADPARM, LOADPARM_LEN); 911 &sclp_ipl_info.loadparm, LOADPARM_LEN);
916 else 912 else
917 /* read scp info failed: set empty loadparm (EBCDIC blanks) */ 913 /* read scp info failed: set empty loadparm (EBCDIC blanks) */
918 memset(reipl_block_ccw->ipl_info.ccw.load_param, 0x40, 914 memset(reipl_block_ccw->ipl_info.ccw.load_param, 0x40,
@@ -1007,7 +1003,7 @@ static int __init dump_fcp_init(void)
1007{ 1003{
1008 int rc; 1004 int rc;
1009 1005
1010 if(!(SCCB_FLAG & 0x2) || !SCCB_VALID) 1006 if (!sclp_ipl_info.has_dump)
1011 return 0; /* LDIPL DUMP is not installed */ 1007 return 0; /* LDIPL DUMP is not installed */
1012 if (!diag308_set_works) 1008 if (!diag308_set_works)
1013 return 0; 1009 return 0;
@@ -1088,6 +1084,7 @@ static int __init s390_ipl_init(void)
1088{ 1084{
1089 int rc; 1085 int rc;
1090 1086
1087 sclp_get_ipl_info(&sclp_ipl_info);
1091 reipl_probe(); 1088 reipl_probe();
1092 rc = ipl_init(); 1089 rc = ipl_init();
1093 if (rc) 1090 if (rc)
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index eb43c3b31269..441975b796fb 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -93,8 +93,8 @@ void do_monitor_call(struct pt_regs *regs, long interruption_code)
93 /* disable monitor call class 0 */ 93 /* disable monitor call class 0 */
94 __ctl_clear_bit(8, 15); 94 __ctl_clear_bit(8, 15);
95 95
96 atomic_notifier_call_chain(&idle_chain, CPU_NOT_IDLE, 96 atomic_notifier_call_chain(&idle_chain, S390_CPU_NOT_IDLE,
97 (void *)(long) smp_processor_id()); 97 (void *)(long) smp_processor_id());
98} 98}
99 99
100extern void s390_handle_mcck(void); 100extern void s390_handle_mcck(void);
@@ -115,7 +115,7 @@ static void default_idle(void)
115 } 115 }
116 116
117 rc = atomic_notifier_call_chain(&idle_chain, 117 rc = atomic_notifier_call_chain(&idle_chain,
118 CPU_IDLE, (void *)(long) cpu); 118 S390_CPU_IDLE, (void *)(long) cpu);
119 if (rc != NOTIFY_OK && rc != NOTIFY_DONE) 119 if (rc != NOTIFY_OK && rc != NOTIFY_DONE)
120 BUG(); 120 BUG();
121 if (rc != NOTIFY_OK) { 121 if (rc != NOTIFY_OK) {
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index 2a8f0872ea8b..f4503ca27630 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -294,7 +294,6 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data)
294static int 294static int
295do_ptrace_normal(struct task_struct *child, long request, long addr, long data) 295do_ptrace_normal(struct task_struct *child, long request, long addr, long data)
296{ 296{
297 unsigned long tmp;
298 ptrace_area parea; 297 ptrace_area parea;
299 int copied, ret; 298 int copied, ret;
300 299
@@ -304,10 +303,7 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data)
304 /* Remove high order bit from address (only for 31 bit). */ 303 /* Remove high order bit from address (only for 31 bit). */
305 addr &= PSW_ADDR_INSN; 304 addr &= PSW_ADDR_INSN;
306 /* read word at location addr. */ 305 /* read word at location addr. */
307 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); 306 return generic_ptrace_peekdata(child, addr, data);
308 if (copied != sizeof(tmp))
309 return -EIO;
310 return put_user(tmp, (unsigned long __force __user *) data);
311 307
312 case PTRACE_PEEKUSR: 308 case PTRACE_PEEKUSR:
313 /* read the word at location addr in the USER area. */ 309 /* read the word at location addr in the USER area. */
@@ -318,10 +314,7 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data)
318 /* Remove high order bit from address (only for 31 bit). */ 314 /* Remove high order bit from address (only for 31 bit). */
319 addr &= PSW_ADDR_INSN; 315 addr &= PSW_ADDR_INSN;
320 /* write the word at location addr. */ 316 /* write the word at location addr. */
321 copied = access_process_vm(child, addr, &data, sizeof(data),1); 317 return generic_ptrace_pokedata(child, addr, data);
322 if (copied != sizeof(data))
323 return -EIO;
324 return 0;
325 318
326 case PTRACE_POKEUSR: 319 case PTRACE_POKEUSR:
327 /* write the word at location addr in the USER area */ 320 /* write the word at location addr in the USER area */
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 51d6309e7f3b..7e1bfb984064 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -300,6 +300,7 @@ static void __init setup_zfcpdump(unsigned int console_devno)
300 else 300 else
301 sprintf(str, "cio_ignore=all,!0.0.%04x", 301 sprintf(str, "cio_ignore=all,!0.0.%04x",
302 ipl_info.data.fcp.dev_id.devno); 302 ipl_info.data.fcp.dev_id.devno);
303 strcat(COMMAND_LINE, " ");
303 strcat(COMMAND_LINE, str); 304 strcat(COMMAND_LINE, str);
304 console_loglevel = 2; 305 console_loglevel = 2;
305} 306}
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 8ff2feaf9b00..182c085ae4dd 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -410,58 +410,40 @@ EXPORT_SYMBOL(smp_ctl_clear_bit);
410unsigned int zfcpdump_prefix_array[NR_CPUS + 1] \ 410unsigned int zfcpdump_prefix_array[NR_CPUS + 1] \
411 __attribute__((__section__(".data"))); 411 __attribute__((__section__(".data")));
412 412
413static void __init smp_get_save_areas(void) 413static void __init smp_get_save_area(unsigned int cpu, unsigned int phy_cpu)
414{ 414{
415 unsigned int cpu, cpu_num, rc;
416 __u16 boot_cpu_addr;
417
418 if (ipl_info.type != IPL_TYPE_FCP_DUMP) 415 if (ipl_info.type != IPL_TYPE_FCP_DUMP)
419 return; 416 return;
420 boot_cpu_addr = S390_lowcore.cpu_data.cpu_addr; 417 if (cpu >= NR_CPUS) {
421 cpu_num = 1; 418 printk(KERN_WARNING "Registers for cpu %i not saved since dump "
422 for (cpu = 0; cpu <= 65535; cpu++) { 419 "kernel was compiled with NR_CPUS=%i\n", cpu, NR_CPUS);
423 if ((u16) cpu == boot_cpu_addr) 420 return;
424 continue;
425 __cpu_logical_map[1] = (__u16) cpu;
426 if (signal_processor(1, sigp_sense) == sigp_not_operational)
427 continue;
428 if (cpu_num >= NR_CPUS) {
429 printk("WARNING: Registers for cpu %i are not "
430 "saved, since dump kernel was compiled with"
431 "NR_CPUS=%i!\n", cpu_num, NR_CPUS);
432 continue;
433 }
434 zfcpdump_save_areas[cpu_num] =
435 alloc_bootmem(sizeof(union save_area));
436 while (1) {
437 rc = signal_processor(1, sigp_stop_and_store_status);
438 if (rc != sigp_busy)
439 break;
440 cpu_relax();
441 }
442 memcpy(zfcpdump_save_areas[cpu_num],
443 (void *)(unsigned long) store_prefix() +
444 SAVE_AREA_BASE, SAVE_AREA_SIZE);
445#ifdef __s390x__
446 /* copy original prefix register */
447 zfcpdump_save_areas[cpu_num]->s390x.pref_reg =
448 zfcpdump_prefix_array[cpu_num];
449#endif
450 cpu_num++;
451 } 421 }
422 zfcpdump_save_areas[cpu] = alloc_bootmem(sizeof(union save_area));
423 __cpu_logical_map[1] = (__u16) phy_cpu;
424 while (signal_processor(1, sigp_stop_and_store_status) == sigp_busy)
425 cpu_relax();
426 memcpy(zfcpdump_save_areas[cpu],
427 (void *)(unsigned long) store_prefix() + SAVE_AREA_BASE,
428 SAVE_AREA_SIZE);
429#ifdef CONFIG_64BIT
430 /* copy original prefix register */
431 zfcpdump_save_areas[cpu]->s390x.pref_reg = zfcpdump_prefix_array[cpu];
432#endif
452} 433}
453 434
454union save_area *zfcpdump_save_areas[NR_CPUS + 1]; 435union save_area *zfcpdump_save_areas[NR_CPUS + 1];
455EXPORT_SYMBOL_GPL(zfcpdump_save_areas); 436EXPORT_SYMBOL_GPL(zfcpdump_save_areas);
456 437
457#else 438#else
458#define smp_get_save_areas() do { } while (0) 439
459#endif 440static inline void smp_get_save_area(unsigned int cpu, unsigned int phy_cpu) { }
441
442#endif /* CONFIG_ZFCPDUMP || CONFIG_ZFCPDUMP_MODULE */
460 443
461/* 444/*
462 * Lets check how many CPUs we have. 445 * Lets check how many CPUs we have.
463 */ 446 */
464
465static unsigned int __init smp_count_cpus(void) 447static unsigned int __init smp_count_cpus(void)
466{ 448{
467 unsigned int cpu, num_cpus; 449 unsigned int cpu, num_cpus;
@@ -470,7 +452,6 @@ static unsigned int __init smp_count_cpus(void)
470 /* 452 /*
471 * cpu 0 is the boot cpu. See smp_prepare_boot_cpu. 453 * cpu 0 is the boot cpu. See smp_prepare_boot_cpu.
472 */ 454 */
473
474 boot_cpu_addr = S390_lowcore.cpu_data.cpu_addr; 455 boot_cpu_addr = S390_lowcore.cpu_data.cpu_addr;
475 current_thread_info()->cpu = 0; 456 current_thread_info()->cpu = 0;
476 num_cpus = 1; 457 num_cpus = 1;
@@ -480,12 +461,11 @@ static unsigned int __init smp_count_cpus(void)
480 __cpu_logical_map[1] = (__u16) cpu; 461 __cpu_logical_map[1] = (__u16) cpu;
481 if (signal_processor(1, sigp_sense) == sigp_not_operational) 462 if (signal_processor(1, sigp_sense) == sigp_not_operational)
482 continue; 463 continue;
464 smp_get_save_area(num_cpus, cpu);
483 num_cpus++; 465 num_cpus++;
484 } 466 }
485
486 printk("Detected %d CPU's\n", (int) num_cpus); 467 printk("Detected %d CPU's\n", (int) num_cpus);
487 printk("Boot cpu address %2X\n", boot_cpu_addr); 468 printk("Boot cpu address %2X\n", boot_cpu_addr);
488
489 return num_cpus; 469 return num_cpus;
490} 470}
491 471
@@ -606,7 +586,6 @@ void __init smp_setup_cpu_possible_map(void)
606{ 586{
607 unsigned int phy_cpus, pos_cpus, cpu; 587 unsigned int phy_cpus, pos_cpus, cpu;
608 588
609 smp_get_save_areas();
610 phy_cpus = smp_count_cpus(); 589 phy_cpus = smp_count_cpus();
611 pos_cpus = min(phy_cpus + additional_cpus, (unsigned int) NR_CPUS); 590 pos_cpus = min(phy_cpus + additional_cpus, (unsigned int) NR_CPUS);
612 591
diff --git a/arch/s390/kernel/stacktrace.c b/arch/s390/kernel/stacktrace.c
index 515ff9011dd7..da6924729964 100644
--- a/arch/s390/kernel/stacktrace.c
+++ b/arch/s390/kernel/stacktrace.c
@@ -12,7 +12,6 @@
12#include <linux/kallsyms.h> 12#include <linux/kallsyms.h>
13 13
14static unsigned long save_context_stack(struct stack_trace *trace, 14static unsigned long save_context_stack(struct stack_trace *trace,
15 unsigned int *skip,
16 unsigned long sp, 15 unsigned long sp,
17 unsigned long low, 16 unsigned long low,
18 unsigned long high) 17 unsigned long high)
@@ -28,10 +27,10 @@ static unsigned long save_context_stack(struct stack_trace *trace,
28 sf = (struct stack_frame *)sp; 27 sf = (struct stack_frame *)sp;
29 while(1) { 28 while(1) {
30 addr = sf->gprs[8] & PSW_ADDR_INSN; 29 addr = sf->gprs[8] & PSW_ADDR_INSN;
31 if (!(*skip)) 30 if (!trace->skip)
32 trace->entries[trace->nr_entries++] = addr; 31 trace->entries[trace->nr_entries++] = addr;
33 else 32 else
34 (*skip)--; 33 trace->skip--;
35 if (trace->nr_entries >= trace->max_entries) 34 if (trace->nr_entries >= trace->max_entries)
36 return sp; 35 return sp;
37 low = sp; 36 low = sp;
@@ -48,10 +47,10 @@ static unsigned long save_context_stack(struct stack_trace *trace,
48 return sp; 47 return sp;
49 regs = (struct pt_regs *)sp; 48 regs = (struct pt_regs *)sp;
50 addr = regs->psw.addr & PSW_ADDR_INSN; 49 addr = regs->psw.addr & PSW_ADDR_INSN;
51 if (!(*skip)) 50 if (!trace->skip)
52 trace->entries[trace->nr_entries++] = addr; 51 trace->entries[trace->nr_entries++] = addr;
53 else 52 else
54 (*skip)--; 53 trace->skip--;
55 if (trace->nr_entries >= trace->max_entries) 54 if (trace->nr_entries >= trace->max_entries)
56 return sp; 55 return sp;
57 low = sp; 56 low = sp;
@@ -65,20 +64,17 @@ void save_stack_trace(struct stack_trace *trace)
65 unsigned long orig_sp, new_sp; 64 unsigned long orig_sp, new_sp;
66 65
67 orig_sp = sp & PSW_ADDR_INSN; 66 orig_sp = sp & PSW_ADDR_INSN;
68 67 new_sp = save_context_stack(trace, orig_sp,
69 new_sp = save_context_stack(trace, &trace->skip, orig_sp, 68 S390_lowcore.panic_stack - PAGE_SIZE,
70 S390_lowcore.panic_stack - PAGE_SIZE, 69 S390_lowcore.panic_stack);
71 S390_lowcore.panic_stack);
72 if (new_sp != orig_sp) 70 if (new_sp != orig_sp)
73 return; 71 return;
74 new_sp = save_context_stack(trace, &trace->skip, new_sp, 72 new_sp = save_context_stack(trace, new_sp,
75 S390_lowcore.async_stack - ASYNC_SIZE, 73 S390_lowcore.async_stack - ASYNC_SIZE,
76 S390_lowcore.async_stack); 74 S390_lowcore.async_stack);
77 if (new_sp != orig_sp) 75 if (new_sp != orig_sp)
78 return; 76 return;
79 77 save_context_stack(trace, new_sp,
80 save_context_stack(trace, &trace->skip, new_sp,
81 S390_lowcore.thread_info, 78 S390_lowcore.thread_info,
82 S390_lowcore.thread_info + THREAD_SIZE); 79 S390_lowcore.thread_info + THREAD_SIZE);
83 return;
84} 80}
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 9c2872a7cca7..48dae49bc1ec 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -226,10 +226,10 @@ static int nohz_idle_notify(struct notifier_block *self,
226 unsigned long action, void *hcpu) 226 unsigned long action, void *hcpu)
227{ 227{
228 switch (action) { 228 switch (action) {
229 case CPU_IDLE: 229 case S390_CPU_IDLE:
230 stop_hz_timer(); 230 stop_hz_timer();
231 break; 231 break;
232 case CPU_NOT_IDLE: 232 case S390_CPU_NOT_IDLE:
233 start_hz_timer(); 233 start_hz_timer();
234 break; 234 break;
235 } 235 }
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index cbfe73034c30..8ec9def83ccb 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -253,19 +253,23 @@ void die(const char * str, struct pt_regs * regs, long err)
253{ 253{
254 static int die_counter; 254 static int die_counter;
255 255
256 oops_enter();
256 debug_stop_all(); 257 debug_stop_all();
257 console_verbose(); 258 console_verbose();
258 spin_lock_irq(&die_lock); 259 spin_lock_irq(&die_lock);
259 bust_spinlocks(1); 260 bust_spinlocks(1);
260 printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); 261 printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
261 show_regs(regs); 262 print_modules();
263 show_regs(regs);
262 bust_spinlocks(0); 264 bust_spinlocks(0);
263 spin_unlock_irq(&die_lock); 265 add_taint(TAINT_DIE);
266 spin_unlock_irq(&die_lock);
264 if (in_interrupt()) 267 if (in_interrupt())
265 panic("Fatal exception in interrupt"); 268 panic("Fatal exception in interrupt");
266 if (panic_on_oops) 269 if (panic_on_oops)
267 panic("Fatal exception: panic_on_oops"); 270 panic("Fatal exception: panic_on_oops");
268 do_exit(SIGSEGV); 271 oops_exit();
272 do_exit(SIGSEGV);
269} 273}
270 274
271static void inline 275static void inline
@@ -316,7 +320,7 @@ static void __kprobes inline do_trap(long interruption_code, int signr,
316 else { 320 else {
317 enum bug_trap_type btt; 321 enum bug_trap_type btt;
318 322
319 btt = report_bug(regs->psw.addr & PSW_ADDR_INSN); 323 btt = report_bug(regs->psw.addr & PSW_ADDR_INSN, regs);
320 if (btt == BUG_TRAP_TYPE_WARN) 324 if (btt == BUG_TRAP_TYPE_WARN)
321 return; 325 return;
322 die(str, regs, interruption_code); 326 die(str, regs, interruption_code);
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index 7158a804a5e4..6ab7d4ee13a4 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -45,6 +45,8 @@ SECTIONS
45 __ex_table : { *(__ex_table) } 45 __ex_table : { *(__ex_table) }
46 __stop___ex_table = .; 46 __stop___ex_table = .;
47 47
48 NOTES
49
48 BUG_TABLE 50 BUG_TABLE
49 51
50 .data : { /* Data */ 52 .data : { /* Data */
@@ -107,10 +109,7 @@ SECTIONS
107 . = ALIGN(2); 109 . = ALIGN(2);
108 __initramfs_end = .; 110 __initramfs_end = .;
109#endif 111#endif
110 . = ALIGN(4096); 112 PERCPU(4096)
111 __per_cpu_start = .;
112 .data.percpu : { *(.data.percpu) }
113 __per_cpu_end = .;
114 . = ALIGN(4096); 113 . = ALIGN(4096);
115 __init_end = .; 114 __init_end = .;
116 /* freed after init ends here */ 115 /* freed after init ends here */
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index 1e1a6ee2cac1..b6ed143e8597 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -545,10 +545,10 @@ static int vtimer_idle_notify(struct notifier_block *self,
545 unsigned long action, void *hcpu) 545 unsigned long action, void *hcpu)
546{ 546{
547 switch (action) { 547 switch (action) {
548 case CPU_IDLE: 548 case S390_CPU_IDLE:
549 stop_cpu_timer(); 549 stop_cpu_timer();
550 break; 550 break;
551 case CPU_NOT_IDLE: 551 case S390_CPU_NOT_IDLE:
552 start_cpu_timer(); 552 start_cpu_timer();
553 break; 553 break;
554 } 554 }
diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile
index 59aea65ce99f..52084436ab69 100644
--- a/arch/s390/lib/Makefile
+++ b/arch/s390/lib/Makefile
@@ -4,7 +4,7 @@
4 4
5EXTRA_AFLAGS := -traditional 5EXTRA_AFLAGS := -traditional
6 6
7lib-y += delay.o string.o uaccess_std.o uaccess_pt.o qrnnd.o 7lib-y += delay.o string.o uaccess_std.o uaccess_pt.o
8obj-$(CONFIG_32BIT) += div64.o 8obj-$(CONFIG_32BIT) += div64.o qrnnd.o
9lib-$(CONFIG_64BIT) += uaccess_mvcos.o 9lib-$(CONFIG_64BIT) += uaccess_mvcos.o
10lib-$(CONFIG_SMP) += spinlock.o 10lib-$(CONFIG_SMP) += spinlock.o
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c
index 63181671e3e3..60604b2819b2 100644
--- a/arch/s390/lib/uaccess_pt.c
+++ b/arch/s390/lib/uaccess_pt.c
@@ -20,6 +20,7 @@ static int __handle_fault(struct mm_struct *mm, unsigned long address,
20{ 20{
21 struct vm_area_struct *vma; 21 struct vm_area_struct *vma;
22 int ret = -EFAULT; 22 int ret = -EFAULT;
23 int fault;
23 24
24 if (in_atomic()) 25 if (in_atomic())
25 return ret; 26 return ret;
@@ -44,20 +45,18 @@ static int __handle_fault(struct mm_struct *mm, unsigned long address,
44 } 45 }
45 46
46survive: 47survive:
47 switch (handle_mm_fault(mm, vma, address, write_access)) { 48 fault = handle_mm_fault(mm, vma, address, write_access);
48 case VM_FAULT_MINOR: 49 if (unlikely(fault & VM_FAULT_ERROR)) {
49 current->min_flt++; 50 if (fault & VM_FAULT_OOM)
50 break; 51 goto out_of_memory;
51 case VM_FAULT_MAJOR: 52 else if (fault & VM_FAULT_SIGBUS)
52 current->maj_flt++; 53 goto out_sigbus;
53 break;
54 case VM_FAULT_SIGBUS:
55 goto out_sigbus;
56 case VM_FAULT_OOM:
57 goto out_of_memory;
58 default:
59 BUG(); 54 BUG();
60 } 55 }
56 if (fault & VM_FAULT_MAJOR)
57 current->maj_flt++;
58 else
59 current->min_flt++;
61 ret = 0; 60 ret = 0;
62out: 61out:
63 up_read(&mm->mmap_sem); 62 up_read(&mm->mmap_sem);
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index d855cdbf8fb8..54055194e9af 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -307,6 +307,7 @@ do_exception(struct pt_regs *regs, unsigned long error_code, int write)
307 unsigned long address; 307 unsigned long address;
308 int space; 308 int space;
309 int si_code; 309 int si_code;
310 int fault;
310 311
311 if (notify_page_fault(regs, error_code)) 312 if (notify_page_fault(regs, error_code))
312 return; 313 return;
@@ -377,23 +378,22 @@ survive:
377 * make sure we exit gracefully rather than endlessly redo 378 * make sure we exit gracefully rather than endlessly redo
378 * the fault. 379 * the fault.
379 */ 380 */
380 switch (handle_mm_fault(mm, vma, address, write)) { 381 fault = handle_mm_fault(mm, vma, address, write);
381 case VM_FAULT_MINOR: 382 if (unlikely(fault & VM_FAULT_ERROR)) {
382 tsk->min_flt++; 383 if (fault & VM_FAULT_OOM) {
383 break; 384 if (do_out_of_memory(regs, error_code, address))
384 case VM_FAULT_MAJOR: 385 goto survive;
385 tsk->maj_flt++; 386 return;
386 break; 387 } else if (fault & VM_FAULT_SIGBUS) {
387 case VM_FAULT_SIGBUS: 388 do_sigbus(regs, error_code, address);
388 do_sigbus(regs, error_code, address); 389 return;
389 return; 390 }
390 case VM_FAULT_OOM:
391 if (do_out_of_memory(regs, error_code, address))
392 goto survive;
393 return;
394 default:
395 BUG(); 391 BUG();
396 } 392 }
393 if (fault & VM_FAULT_MAJOR)
394 tsk->maj_flt++;
395 else
396 tsk->min_flt++;
397 397
398 up_read(&mm->mmap_sem); 398 up_read(&mm->mmap_sem);
399 /* 399 /*
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 038179ecf6a9..f87f429e0b24 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -55,8 +55,21 @@ config GENERIC_TIME
55config GENERIC_CLOCKEVENTS 55config GENERIC_CLOCKEVENTS
56 def_bool n 56 def_bool n
57 57
58config SYS_SUPPORTS_PM
59 bool
60
58config SYS_SUPPORTS_APM_EMULATION 61config SYS_SUPPORTS_APM_EMULATION
59 bool 62 bool
63 select SYS_SUPPORTS_PM
64
65config SYS_SUPPORTS_SMP
66 bool
67
68config SYS_SUPPORTS_NUMA
69 bool
70
71config SYS_SUPPORTS_PCI
72 bool
60 73
61config ARCH_MAY_HAVE_PC_FDC 74config ARCH_MAY_HAVE_PC_FDC
62 bool 75 bool
@@ -81,24 +94,150 @@ source "init/Kconfig"
81 94
82menu "System type" 95menu "System type"
83 96
84config SOLUTION_ENGINE 97source "arch/sh/mm/Kconfig"
85 bool 98
99menu "Processor features"
86 100
87choice 101choice
88 prompt "SuperH system type" 102 prompt "Endianess selection"
89 default SH_UNKNOWN 103 default CPU_LITTLE_ENDIAN
104 help
105 Some SuperH machines can be configured for either little or big
106 endian byte order. These modes require different kernels.
107
108config CPU_LITTLE_ENDIAN
109 bool "Little Endian"
110
111config CPU_BIG_ENDIAN
112 bool "Big Endian"
113
114endchoice
115
116config SH_FPU
117 bool "FPU support"
118 depends on CPU_SH4
119 default y
120 help
121 Selecting this option will enable support for SH processors that
122 have FPU units (ie, SH77xx).
123
124 This option must be set in order to enable the FPU.
125
126config SH_FPU_EMU
127 bool "FPU emulation support"
128 depends on !SH_FPU && EXPERIMENTAL
129 default n
130 help
131 Selecting this option will enable support for software FPU emulation.
132 Most SH-3 users will want to say Y here, whereas most SH-4 users will
133 want to say N.
134
135config SH_DSP
136 bool "DSP support"
137 default y if SH4AL_DSP || !CPU_SH4
138 default n
139 help
140 Selecting this option will enable support for SH processors that
141 have DSP units (ie, SH2-DSP, SH3-DSP, and SH4AL-DSP).
142
143 This option must be set in order to enable the DSP.
144
145config SH_ADC
146 bool "ADC support"
147 depends on CPU_SH3
148 default y
149 help
150 Selecting this option will allow the Linux kernel to use SH3 on-chip
151 ADC module.
152
153 If unsure, say N.
154
155config SH_STORE_QUEUES
156 bool "Support for Store Queues"
157 depends on CPU_SH4
158 help
159 Selecting this option will enable an in-kernel API for manipulating
160 the store queues integrated in the SH-4 processors.
161
162config SPECULATIVE_EXECUTION
163 bool "Speculative subroutine return"
164 depends on CPU_SUBTYPE_SH7780 && EXPERIMENTAL
165 help
166 This enables support for a speculative instruction fetch for
167 subroutine return. There are various pitfalls associated with
168 this, as outlined in the SH7780 hardware manual.
169
170 If unsure, say N.
171
172config CPU_HAS_INTEVT
173 bool
174
175config CPU_HAS_PINT_IRQ
176 bool
177
178config CPU_HAS_MASKREG_IRQ
179 bool
180
181config CPU_HAS_INTC_IRQ
182 bool
183
184config CPU_HAS_INTC2_IRQ
185 bool
186
187config CPU_HAS_IPR_IRQ
188 bool
189
190config CPU_HAS_SR_RB
191 bool "CPU has SR.RB"
192 depends on CPU_SH3 || CPU_SH4
193 default y
194 help
195 This will enable the use of SR.RB register bank usage. Processors
196 that are lacking this bit must have another method in place for
197 accomplishing what is taken care of by the banked registers.
198
199 See <file:Documentation/sh/register-banks.txt> for further
200 information on SR.RB and register banking in the kernel in general.
201
202config CPU_HAS_PTEA
203 bool
204
205endmenu
206
207menu "Board support"
208
209config SOLUTION_ENGINE
210 bool
90 211
91config SH_SOLUTION_ENGINE 212config SH_SOLUTION_ENGINE
92 bool "SolutionEngine" 213 bool "SolutionEngine"
93 select SOLUTION_ENGINE 214 select SOLUTION_ENGINE
215 select CPU_HAS_IPR_IRQ
216 depends on CPU_SUBTYPE_SH7709 || CPU_SUBTYPE_SH7750
94 help 217 help
95 Select SolutionEngine if configuring for a Hitachi SH7709 218 Select SolutionEngine if configuring for a Hitachi SH7709
96 or SH7750 evaluation board. 219 or SH7750 evaluation board.
97 220
221config SH_7206_SOLUTION_ENGINE
222 bool "SolutionEngine7206"
223 select SOLUTION_ENGINE
224 depends on CPU_SUBTYPE_SH7206
225 help
226 Select 7206 SolutionEngine if configuring for a Hitachi SH7206
227 evaluation board.
228
229config SH_7619_SOLUTION_ENGINE
230 bool "SolutionEngine7619"
231 select SOLUTION_ENGINE
232 depends on CPU_SUBTYPE_SH7619
233 help
234 Select 7619 SolutionEngine if configuring for a Hitachi SH7619
235 evaluation board.
236
98config SH_7722_SOLUTION_ENGINE 237config SH_7722_SOLUTION_ENGINE
99 bool "SolutionEngine7722" 238 bool "SolutionEngine7722"
100 select SOLUTION_ENGINE 239 select SOLUTION_ENGINE
101 select CPU_SUBTYPE_SH7722 240 depends on CPU_SUBTYPE_SH7722
102 help 241 help
103 Select 7722 SolutionEngine if configuring for a Hitachi SH772 242 Select 7722 SolutionEngine if configuring for a Hitachi SH772
104 evaluation board. 243 evaluation board.
@@ -106,7 +245,8 @@ config SH_7722_SOLUTION_ENGINE
106config SH_7751_SOLUTION_ENGINE 245config SH_7751_SOLUTION_ENGINE
107 bool "SolutionEngine7751" 246 bool "SolutionEngine7751"
108 select SOLUTION_ENGINE 247 select SOLUTION_ENGINE
109 select CPU_SUBTYPE_SH7751 248 select CPU_HAS_IPR_IRQ
249 depends on CPU_SUBTYPE_SH7751
110 help 250 help
111 Select 7751 SolutionEngine if configuring for a Hitachi SH7751 251 Select 7751 SolutionEngine if configuring for a Hitachi SH7751
112 evaluation board. 252 evaluation board.
@@ -114,7 +254,9 @@ config SH_7751_SOLUTION_ENGINE
114config SH_7780_SOLUTION_ENGINE 254config SH_7780_SOLUTION_ENGINE
115 bool "SolutionEngine7780" 255 bool "SolutionEngine7780"
116 select SOLUTION_ENGINE 256 select SOLUTION_ENGINE
117 select CPU_SUBTYPE_SH7780 257 select SYS_SUPPORTS_PCI
258 select CPU_HAS_INTC2_IRQ
259 depends on CPU_SUBTYPE_SH7780
118 help 260 help
119 Select 7780 SolutionEngine if configuring for a Renesas SH7780 261 Select 7780 SolutionEngine if configuring for a Renesas SH7780
120 evaluation board. 262 evaluation board.
@@ -122,7 +264,7 @@ config SH_7780_SOLUTION_ENGINE
122config SH_7300_SOLUTION_ENGINE 264config SH_7300_SOLUTION_ENGINE
123 bool "SolutionEngine7300" 265 bool "SolutionEngine7300"
124 select SOLUTION_ENGINE 266 select SOLUTION_ENGINE
125 select CPU_SUBTYPE_SH7300 267 depends on CPU_SUBTYPE_SH7300
126 help 268 help
127 Select 7300 SolutionEngine if configuring for a Hitachi 269 Select 7300 SolutionEngine if configuring for a Hitachi
128 SH7300(SH-Mobile V) evaluation board. 270 SH7300(SH-Mobile V) evaluation board.
@@ -130,22 +272,22 @@ config SH_7300_SOLUTION_ENGINE
130config SH_7343_SOLUTION_ENGINE 272config SH_7343_SOLUTION_ENGINE
131 bool "SolutionEngine7343" 273 bool "SolutionEngine7343"
132 select SOLUTION_ENGINE 274 select SOLUTION_ENGINE
133 select CPU_SUBTYPE_SH7343 275 depends on CPU_SUBTYPE_SH7343
134 help 276 help
135 Select 7343 SolutionEngine if configuring for a Hitachi 277 Select 7343 SolutionEngine if configuring for a Hitachi
136 SH7343 (SH-Mobile 3AS) evaluation board. 278 SH7343 (SH-Mobile 3AS) evaluation board.
137 279
138config SH_73180_SOLUTION_ENGINE 280config SH_73180_SOLUTION_ENGINE
139 bool "SolutionEngine73180" 281 bool "SolutionEngine73180"
140 select SOLUTION_ENGINE 282 select SOLUTION_ENGINE
141 select CPU_SUBTYPE_SH73180 283 depends on CPU_SUBTYPE_SH73180
142 help 284 help
143 Select 73180 SolutionEngine if configuring for a Hitachi 285 Select 73180 SolutionEngine if configuring for a Hitachi
144 SH73180(SH-Mobile 3) evaluation board. 286 SH73180(SH-Mobile 3) evaluation board.
145 287
146config SH_7751_SYSTEMH 288config SH_7751_SYSTEMH
147 bool "SystemH7751R" 289 bool "SystemH7751R"
148 select CPU_SUBTYPE_SH7751R 290 depends on CPU_SUBTYPE_SH7751R
149 help 291 help
150 Select SystemH if you are configuring for a Renesas SystemH 292 Select SystemH if you are configuring for a Renesas SystemH
151 7751R evaluation board. 293 7751R evaluation board.
@@ -153,20 +295,17 @@ config SH_7751_SYSTEMH
153config SH_HP6XX 295config SH_HP6XX
154 bool "HP6XX" 296 bool "HP6XX"
155 select SYS_SUPPORTS_APM_EMULATION 297 select SYS_SUPPORTS_APM_EMULATION
298 select HD6446X_SERIES
299 depends on CPU_SUBTYPE_SH7709
156 help 300 help
157 Select HP6XX if configuring for a HP jornada HP6xx. 301 Select HP6XX if configuring for a HP jornada HP6xx.
158 More information (hardware only) at 302 More information (hardware only) at
159 <http://www.hp.com/jornada/>. 303 <http://www.hp.com/jornada/>.
160 304
161config SH_SATURN
162 bool "Saturn"
163 select CPU_SUBTYPE_SH7604
164 help
165 Select Saturn if configuring for a SEGA Saturn.
166
167config SH_DREAMCAST 305config SH_DREAMCAST
168 bool "Dreamcast" 306 bool "Dreamcast"
169 select CPU_SUBTYPE_SH7091 307 select SYS_SUPPORTS_PCI
308 depends on CPU_SUBTYPE_SH7091
170 help 309 help
171 Select Dreamcast if configuring for a SEGA Dreamcast. 310 Select Dreamcast if configuring for a SEGA Dreamcast.
172 More information at 311 More information at
@@ -175,6 +314,7 @@ config SH_DREAMCAST
175 314
176config SH_MPC1211 315config SH_MPC1211
177 bool "Interface MPC1211" 316 bool "Interface MPC1211"
317 depends on CPU_SUBTYPE_SH7751 && BROKEN
178 help 318 help
179 CTP/PCI-SH02 is a CPU module computer that is produced 319 CTP/PCI-SH02 is a CPU module computer that is produced
180 by Interface Corporation. 320 by Interface Corporation.
@@ -182,6 +322,9 @@ config SH_MPC1211
182 322
183config SH_SH03 323config SH_SH03
184 bool "Interface CTP/PCI-SH03" 324 bool "Interface CTP/PCI-SH03"
325 depends on CPU_SUBTYPE_SH7751 && BROKEN
326 select CPU_HAS_IPR_IRQ
327 select SYS_SUPPORTS_PCI
185 help 328 help
186 CTP/PCI-SH03 is a CPU module computer that is produced 329 CTP/PCI-SH03 is a CPU module computer that is produced
187 by Interface Corporation. 330 by Interface Corporation.
@@ -189,7 +332,9 @@ config SH_SH03
189 332
190config SH_SECUREEDGE5410 333config SH_SECUREEDGE5410
191 bool "SecureEdge5410" 334 bool "SecureEdge5410"
192 select CPU_SUBTYPE_SH7751R 335 depends on CPU_SUBTYPE_SH7751R
336 select CPU_HAS_IPR_IRQ
337 select SYS_SUPPORTS_PCI
193 help 338 help
194 Select SecureEdge5410 if configuring for a SnapGear SH board. 339 Select SecureEdge5410 if configuring for a SnapGear SH board.
195 This includes both the OEM SecureEdge products as well as the 340 This includes both the OEM SecureEdge products as well as the
@@ -197,246 +342,78 @@ config SH_SECUREEDGE5410
197 342
198config SH_HS7751RVOIP 343config SH_HS7751RVOIP
199 bool "HS7751RVOIP" 344 bool "HS7751RVOIP"
200 select CPU_SUBTYPE_SH7751R 345 depends on CPU_SUBTYPE_SH7751R
201 help 346 help
202 Select HS7751RVOIP if configuring for a Renesas Technology 347 Select HS7751RVOIP if configuring for a Renesas Technology
203 Sales VoIP board. 348 Sales VoIP board.
204 349
205config SH_7710VOIPGW 350config SH_7710VOIPGW
206 bool "SH7710-VOIP-GW" 351 bool "SH7710-VOIP-GW"
207 select CPU_SUBTYPE_SH7710 352 depends on CPU_SUBTYPE_SH7710
208 help 353 help
209 Select this option to build a kernel for the SH7710 based 354 Select this option to build a kernel for the SH7710 based
210 VOIP GW. 355 VOIP GW.
211 356
212config SH_RTS7751R2D 357config SH_RTS7751R2D
213 bool "RTS7751R2D" 358 bool "RTS7751R2D"
214 select CPU_SUBTYPE_SH7751R 359 depends on CPU_SUBTYPE_SH7751R
360 select SYS_SUPPORTS_PCI
215 help 361 help
216 Select RTS7751R2D if configuring for a Renesas Technology 362 Select RTS7751R2D if configuring for a Renesas Technology
217 Sales SH-Graphics board. 363 Sales SH-Graphics board.
218 364
219config SH_HIGHLANDER 365config SH_HIGHLANDER
220 bool "Highlander" 366 bool "Highlander"
367 depends on CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785
368 select SYS_SUPPORTS_PCI
221 369
222config SH_EDOSK7705 370config SH_EDOSK7705
223 bool "EDOSK7705" 371 bool "EDOSK7705"
224 select CPU_SUBTYPE_SH7705 372 depends on CPU_SUBTYPE_SH7705
225 373
226config SH_SH4202_MICRODEV 374config SH_SH4202_MICRODEV
227 bool "SH4-202 MicroDev" 375 bool "SH4-202 MicroDev"
228 select CPU_SUBTYPE_SH4_202 376 depends on CPU_SUBTYPE_SH4_202
229 help 377 help
230 Select SH4-202 MicroDev if configuring for a SuperH MicroDev board 378 Select SH4-202 MicroDev if configuring for a SuperH MicroDev board
231 with an SH4-202 CPU. 379 with an SH4-202 CPU.
232 380
233config SH_LANDISK 381config SH_LANDISK
234 bool "LANDISK" 382 bool "LANDISK"
235 select CPU_SUBTYPE_SH7751R 383 depends on CPU_SUBTYPE_SH7751R
384 select SYS_SUPPORTS_PCI
236 help 385 help
237 I-O DATA DEVICE, INC. "LANDISK Series" support. 386 I-O DATA DEVICE, INC. "LANDISK Series" support.
238 387
239config SH_TITAN 388config SH_TITAN
240 bool "TITAN" 389 bool "TITAN"
241 select CPU_SUBTYPE_SH7751R 390 depends on CPU_SUBTYPE_SH7751R
391 select CPU_HAS_IPR_IRQ
392 select SYS_SUPPORTS_PCI
242 help 393 help
243 Select Titan if you are configuring for a Nimble Microsystems 394 Select Titan if you are configuring for a Nimble Microsystems
244 NetEngine NP51R. 395 NetEngine NP51R.
245 396
246config SH_SHMIN 397config SH_SHMIN
247 bool "SHMIN" 398 bool "SHMIN"
248 select CPU_SUBTYPE_SH7706 399 depends on CPU_SUBTYPE_SH7706
400 select CPU_HAS_IPR_IRQ
249 help 401 help
250 Select SHMIN if configuring for the SHMIN board. 402 Select SHMIN if configuring for the SHMIN board.
251 403
252config SH_7206_SOLUTION_ENGINE
253 bool "SolutionEngine7206"
254 select CPU_SUBTYPE_SH7206
255 help
256 Select 7206 SolutionEngine if configuring for a Hitachi SH7206
257 evaluation board.
258
259config SH_7619_SOLUTION_ENGINE
260 bool "SolutionEngine7619"
261 select CPU_SUBTYPE_SH7619
262 help
263 Select 7619 SolutionEngine if configuring for a Hitachi SH7619
264 evaluation board.
265
266config SH_LBOX_RE2 404config SH_LBOX_RE2
267 bool "L-BOX RE2" 405 bool "L-BOX RE2"
268 select CPU_SUBTYPE_SH7751R 406 depends on CPU_SUBTYPE_SH7751R
407 select SYS_SUPPORTS_PCI
269 help 408 help
270 Select L-BOX RE2 if configuring for the NTT COMWARE L-BOX RE2. 409 Select L-BOX RE2 if configuring for the NTT COMWARE L-BOX RE2.
271 410
272config SH_UNKNOWN 411endmenu
273 bool "BareCPU"
274 help
275 "Bare CPU" aka "unknown" means an SH-based system which is not one
276 of the specific ones mentioned above, which means you need to enter
277 all sorts of stuff like CONFIG_MEMORY_START because the config
278 system doesn't already know what it is. You get a machine vector
279 without any platform-specific code in it, so things like the RTC may
280 not work.
281
282 This option is for the early stages of porting to a new machine.
283
284endchoice
285 412
286source "arch/sh/boards/renesas/hs7751rvoip/Kconfig" 413source "arch/sh/boards/renesas/hs7751rvoip/Kconfig"
287source "arch/sh/boards/renesas/rts7751r2d/Kconfig" 414source "arch/sh/boards/renesas/rts7751r2d/Kconfig"
288source "arch/sh/boards/renesas/r7780rp/Kconfig" 415source "arch/sh/boards/renesas/r7780rp/Kconfig"
289 416
290source "arch/sh/mm/Kconfig"
291
292config CF_ENABLER
293 bool "Compact Flash Enabler support"
294 depends on SH_SOLUTION_ENGINE || SH_UNKNOWN || SH_SH03
295 ---help---
296 Compact Flash is a small, removable mass storage device introduced
297 in 1994 originally as a PCMCIA device. If you say `Y' here, you
298 compile in support for Compact Flash devices directly connected to
299 a SuperH processor. A Compact Flash FAQ is available at
300 <http://www.compactflash.org/faqs/faq.htm>.
301
302 If your board has "Directly Connected" CompactFlash at area 5 or 6,
303 you may want to enable this option. Then, you can use CF as
304 primary IDE drive (only tested for SanDisk).
305
306 If in doubt, select 'N'.
307
308choice
309 prompt "Compact Flash Connection Area"
310 depends on CF_ENABLER
311 default CF_AREA6
312
313config CF_AREA5
314 bool "Area5"
315 help
316 If your board has "Directly Connected" CompactFlash, You should
317 select the area where your CF is connected to.
318
319 - "Area5" if CompactFlash is connected to Area 5 (0x14000000)
320 - "Area6" if it is connected to Area 6 (0x18000000)
321
322 "Area6" will work for most boards.
323
324config CF_AREA6
325 bool "Area6"
326
327endchoice
328
329config CF_BASE_ADDR
330 hex
331 depends on CF_ENABLER
332 default "0xb8000000" if CF_AREA6
333 default "0xb4000000" if CF_AREA5
334
335menu "Processor features"
336
337choice
338 prompt "Endianess selection"
339 default CPU_LITTLE_ENDIAN
340 help
341 Some SuperH machines can be configured for either little or big
342 endian byte order. These modes require different kernels.
343
344config CPU_LITTLE_ENDIAN
345 bool "Little Endian"
346
347config CPU_BIG_ENDIAN
348 bool "Big Endian"
349
350endchoice
351
352config SH_FPU
353 bool "FPU support"
354 depends on !CPU_SH3
355 default y
356 help
357 Selecting this option will enable support for SH processors that
358 have FPU units (ie, SH77xx).
359
360 This option must be set in order to enable the FPU.
361
362config SH_FPU_EMU
363 bool "FPU emulation support"
364 depends on !SH_FPU && EXPERIMENTAL
365 default n
366 help
367 Selecting this option will enable support for software FPU emulation.
368 Most SH-3 users will want to say Y here, whereas most SH-4 users will
369 want to say N.
370
371config SH_DSP
372 bool "DSP support"
373 default y if SH4AL_DSP || !CPU_SH4
374 default n
375 help
376 Selecting this option will enable support for SH processors that
377 have DSP units (ie, SH2-DSP, SH3-DSP, and SH4AL-DSP).
378
379 This option must be set in order to enable the DSP.
380
381config SH_ADC
382 bool "ADC support"
383 depends on CPU_SH3
384 default y
385 help
386 Selecting this option will allow the Linux kernel to use SH3 on-chip
387 ADC module.
388
389 If unsure, say N.
390
391config SH_STORE_QUEUES
392 bool "Support for Store Queues"
393 depends on CPU_SH4
394 help
395 Selecting this option will enable an in-kernel API for manipulating
396 the store queues integrated in the SH-4 processors.
397
398config SPECULATIVE_EXECUTION
399 bool "Speculative subroutine return"
400 depends on CPU_SUBTYPE_SH7780 && EXPERIMENTAL
401 help
402 This enables support for a speculative instruction fetch for
403 subroutine return. There are various pitfalls associated with
404 this, as outlined in the SH7780 hardware manual.
405
406 If unsure, say N.
407
408config CPU_HAS_INTEVT
409 bool
410
411config CPU_HAS_PINT_IRQ
412 bool
413
414config CPU_HAS_MASKREG_IRQ
415 bool
416
417config CPU_HAS_INTC2_IRQ
418 bool
419
420config CPU_HAS_IPR_IRQ
421 bool
422
423config CPU_HAS_SR_RB
424 bool "CPU has SR.RB"
425 depends on CPU_SH3 || CPU_SH4
426 default y
427 help
428 This will enable the use of SR.RB register bank usage. Processors
429 that are lacking this bit must have another method in place for
430 accomplishing what is taken care of by the banked registers.
431
432 See <file:Documentation/sh/register-banks.txt> for further
433 information on SR.RB and register banking in the kernel in general.
434
435config CPU_HAS_PTEA
436 bool
437
438endmenu
439
440menu "Timer and clock configuration" 417menu "Timer and clock configuration"
441 418
442config SH_TMU 419config SH_TMU
@@ -473,13 +450,13 @@ config SH_PCLK_FREQ
473 int "Peripheral clock frequency (in Hz)" 450 int "Peripheral clock frequency (in Hz)"
474 default "27000000" if CPU_SUBTYPE_SH73180 || CPU_SUBTYPE_SH7343 451 default "27000000" if CPU_SUBTYPE_SH73180 || CPU_SUBTYPE_SH7343
475 default "31250000" if CPU_SUBTYPE_SH7619 452 default "31250000" if CPU_SUBTYPE_SH7619
453 default "32000000" if CPU_SUBTYPE_SH7722
476 default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || \ 454 default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || \
477 CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7705 || \ 455 CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7705 || \
478 CPU_SUBTYPE_SH7206 456 CPU_SUBTYPE_SH7206
479 default "50000000" if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7780 || \ 457 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
480 CPU_SUBTYPE_SH7785
481 default "60000000" if CPU_SUBTYPE_SH7751
482 default "66000000" if CPU_SUBTYPE_SH4_202 458 default "66000000" if CPU_SUBTYPE_SH4_202
459 default "50000000"
483 help 460 help
484 This option is used to specify the peripheral clock frequency. 461 This option is used to specify the peripheral clock frequency.
485 This is necessary for determining the reference clock value on 462 This is necessary for determining the reference clock value on
@@ -487,8 +464,10 @@ config SH_PCLK_FREQ
487 464
488config SH_CLK_MD 465config SH_CLK_MD
489 int "CPU Mode Pin Setting" 466 int "CPU Mode Pin Setting"
490 default 0
491 depends on CPU_SUBTYPE_SH7619 || CPU_SUBTYPE_SH7206 467 depends on CPU_SUBTYPE_SH7619 || CPU_SUBTYPE_SH7206
468 default 6 if CPU_SUBTYPE_SH7206
469 default 5 if CPU_SUBTYPE_SH7619
470 default 0
492 help 471 help
493 MD2 - MD0 pin setting. 472 MD2 - MD0 pin setting.
494 473
@@ -560,6 +539,7 @@ config CRASH_DUMP
560 539
561config SMP 540config SMP
562 bool "Symmetric multi-processing support" 541 bool "Symmetric multi-processing support"
542 depends on SYS_SUPPORTS_SMP
563 ---help--- 543 ---help---
564 This enables support for systems with more than one CPU. If you have 544 This enables support for systems with more than one CPU. If you have
565 a system with only one CPU, like most personal computers, say N. If 545 a system with only one CPU, like most personal computers, say N. If
@@ -584,6 +564,7 @@ config NR_CPUS
584 int "Maximum number of CPUs (2-32)" 564 int "Maximum number of CPUs (2-32)"
585 range 2 32 565 range 2 32
586 depends on SMP 566 depends on SMP
567 default "4" if CPU_SHX3
587 default "2" 568 default "2"
588 help 569 help
589 This allows you to specify the maximum number of CPUs which this 570 This allows you to specify the maximum number of CPUs which this
@@ -623,6 +604,7 @@ config BOOT_LINK_OFFSET
623 604
624config UBC_WAKEUP 605config UBC_WAKEUP
625 bool "Wakeup UBC on startup" 606 bool "Wakeup UBC on startup"
607 depends on CPU_SH4
626 help 608 help
627 Selecting this option will wakeup the User Break Controller (UBC) on 609 Selecting this option will wakeup the User Break Controller (UBC) on
628 startup. Although the UBC is left in an awake state when the processor 610 startup. Although the UBC is left in an awake state when the processor
@@ -651,8 +633,8 @@ menu "Bus options"
651# we're not using PCMCIA, so we make it dependent on 633# we're not using PCMCIA, so we make it dependent on
652# PCMCIA outright. -- PFM. 634# PCMCIA outright. -- PFM.
653config ISA 635config ISA
654 bool 636 def_bool y
655 default y if PCMCIA 637 depends on PCMCIA && HD6446X_SERIES
656 help 638 help
657 Find out whether you have ISA slots on your motherboard. ISA is the 639 Find out whether you have ISA slots on your motherboard. ISA is the
658 name of a bus system, i.e. the way the CPU talks to the other stuff 640 name of a bus system, i.e. the way the CPU talks to the other stuff
@@ -690,6 +672,49 @@ config SUPERHYWAY
690 tristate "SuperHyway Bus support" 672 tristate "SuperHyway Bus support"
691 depends on CPU_SUBTYPE_SH4_202 673 depends on CPU_SUBTYPE_SH4_202
692 674
675config CF_ENABLER
676 bool "Compact Flash Enabler support"
677 depends on SOLUTION_ENGINE || SH_SH03
678 ---help---
679 Compact Flash is a small, removable mass storage device introduced
680 in 1994 originally as a PCMCIA device. If you say `Y' here, you
681 compile in support for Compact Flash devices directly connected to
682 a SuperH processor. A Compact Flash FAQ is available at
683 <http://www.compactflash.org/faqs/faq.htm>.
684
685 If your board has "Directly Connected" CompactFlash at area 5 or 6,
686 you may want to enable this option. Then, you can use CF as
687 primary IDE drive (only tested for SanDisk).
688
689 If in doubt, select 'N'.
690
691choice
692 prompt "Compact Flash Connection Area"
693 depends on CF_ENABLER
694 default CF_AREA6
695
696config CF_AREA5
697 bool "Area5"
698 help
699 If your board has "Directly Connected" CompactFlash, You should
700 select the area where your CF is connected to.
701
702 - "Area5" if CompactFlash is connected to Area 5 (0x14000000)
703 - "Area6" if it is connected to Area 6 (0x18000000)
704
705 "Area6" will work for most boards.
706
707config CF_AREA6
708 bool "Area6"
709
710endchoice
711
712config CF_BASE_ADDR
713 hex
714 depends on CF_ENABLER
715 default "0xb8000000" if CF_AREA6
716 default "0xb4000000" if CF_AREA5
717
693source "arch/sh/drivers/pci/Kconfig" 718source "arch/sh/drivers/pci/Kconfig"
694 719
695source "drivers/pci/Kconfig" 720source "drivers/pci/Kconfig"
@@ -707,7 +732,7 @@ source "fs/Kconfig.binfmt"
707endmenu 732endmenu
708 733
709menu "Power management options (EXPERIMENTAL)" 734menu "Power management options (EXPERIMENTAL)"
710depends on EXPERIMENTAL 735depends on EXPERIMENTAL && SYS_SUPPORTS_PM
711 736
712source kernel/power/Kconfig 737source kernel/power/Kconfig
713 738
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index b56307294b67..52f6a99c8ecc 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -52,6 +52,10 @@ config EARLY_PRINTK
52 select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using 52 select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using
53 the kernel command line option to toggle back and forth. 53 the kernel command line option to toggle back and forth.
54 54
55config DEBUG_BOOTMEM
56 depends on DEBUG_KERNEL
57 bool "Debug BOOTMEM initialization"
58
55config DEBUG_STACKOVERFLOW 59config DEBUG_STACKOVERFLOW
56 bool "Check for stack overflows" 60 bool "Check for stack overflows"
57 depends on DEBUG_KERNEL 61 depends on DEBUG_KERNEL
@@ -82,6 +86,7 @@ config SH_KGDB
82 bool "Include KGDB kernel debugger" 86 bool "Include KGDB kernel debugger"
83 select FRAME_POINTER 87 select FRAME_POINTER
84 select DEBUG_INFO 88 select DEBUG_INFO
89 depends on CPU_SH3 || CPU_SH4
85 help 90 help
86 Include in-kernel hooks for kgdb, the Linux kernel source level 91 Include in-kernel hooks for kgdb, the Linux kernel source level
87 debugger. See <http://kgdb.sourceforge.net/> for more information. 92 debugger. See <http://kgdb.sourceforge.net/> for more information.
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 883b03b040c4..0016609d1eba 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -34,20 +34,20 @@ isa-y := $(isa-y)-nofpu
34endif 34endif
35endif 35endif
36 36
37cflags-$(CONFIG_CPU_SH2) := -m2 37cflags-$(CONFIG_CPU_SH2) := $(call cc-option,-m2,)
38cflags-$(CONFIG_CPU_SH2A) := -m2a $(call cc-option,-m2a-nofpu,) 38cflags-$(CONFIG_CPU_SH2A) += $(call cc-option,-m2a,) \
39cflags-$(CONFIG_CPU_SH3) := -m3 39 $(call cc-option,-m2a-nofpu,)
40cflags-$(CONFIG_CPU_SH4) := -m4 \ 40cflags-$(CONFIG_CPU_SH3) := $(call cc-option,-m3,)
41cflags-$(CONFIG_CPU_SH4) := $(call cc-option,-m4,) \
41 $(call cc-option,-mno-implicit-fp,-m4-nofpu) 42 $(call cc-option,-mno-implicit-fp,-m4-nofpu)
42cflags-$(CONFIG_CPU_SH4A) := $(call cc-option,-m4a,) $(call cc-option,-m4a-nofpu,) 43cflags-$(CONFIG_CPU_SH4A) += $(call cc-option,-m4a,) \
44 $(call cc-option,-m4a-nofpu,)
43 45
44cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb 46cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb
45cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml 47cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml
46 48
47cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),) -ffreestanding 49cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),) -ffreestanding
48 50
49cflags-$(CONFIG_SH_DSP) += -Wa,-dsp
50
51cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \ 51cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \
52 $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g') 52 $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
53 53
@@ -87,44 +87,41 @@ core-y += arch/sh/kernel/ arch/sh/mm/
87core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/ 87core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/
88 88
89# Boards 89# Boards
90machdir-$(CONFIG_SH_SOLUTION_ENGINE) := se/770x 90machdir-$(CONFIG_SH_SOLUTION_ENGINE) += se/770x
91machdir-$(CONFIG_SH_7722_SOLUTION_ENGINE) := se/7722 91machdir-$(CONFIG_SH_7722_SOLUTION_ENGINE) += se/7722
92machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE) := se/7751 92machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE) += se/7751
93machdir-$(CONFIG_SH_7780_SOLUTION_ENGINE) := se/7780 93machdir-$(CONFIG_SH_7780_SOLUTION_ENGINE) += se/7780
94machdir-$(CONFIG_SH_7300_SOLUTION_ENGINE) := se/7300 94machdir-$(CONFIG_SH_7300_SOLUTION_ENGINE) += se/7300
95machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE) := se/7343 95machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE) += se/7343
96machdir-$(CONFIG_SH_73180_SOLUTION_ENGINE) := se/73180 96machdir-$(CONFIG_SH_73180_SOLUTION_ENGINE) += se/73180
97machdir-$(CONFIG_SH_HP6XX) := hp6xx 97machdir-$(CONFIG_SH_HP6XX) += hp6xx
98machdir-$(CONFIG_SH_SATURN) := saturn 98machdir-$(CONFIG_SH_DREAMCAST) += dreamcast
99machdir-$(CONFIG_SH_DREAMCAST) := dreamcast 99machdir-$(CONFIG_SH_MPC1211) += mpc1211
100machdir-$(CONFIG_SH_MPC1211) := mpc1211 100machdir-$(CONFIG_SH_SH03) += sh03
101machdir-$(CONFIG_SH_SH03) := sh03 101machdir-$(CONFIG_SH_SECUREEDGE5410) += snapgear
102machdir-$(CONFIG_SH_SECUREEDGE5410) := snapgear 102machdir-$(CONFIG_SH_HS7751RVOIP) += renesas/hs7751rvoip
103machdir-$(CONFIG_SH_HS7751RVOIP) := renesas/hs7751rvoip 103machdir-$(CONFIG_SH_RTS7751R2D) += renesas/rts7751r2d
104machdir-$(CONFIG_SH_RTS7751R2D) := renesas/rts7751r2d 104machdir-$(CONFIG_SH_7751_SYSTEMH) += renesas/systemh
105machdir-$(CONFIG_SH_7751_SYSTEMH) := renesas/systemh 105machdir-$(CONFIG_SH_EDOSK7705) += renesas/edosk7705
106machdir-$(CONFIG_SH_EDOSK7705) := renesas/edosk7705 106machdir-$(CONFIG_SH_HIGHLANDER) += renesas/r7780rp
107machdir-$(CONFIG_SH_HIGHLANDER) := renesas/r7780rp 107machdir-$(CONFIG_SH_7710VOIPGW) += renesas/sh7710voipgw
108machdir-$(CONFIG_SH_7710VOIPGW) := renesas/sh7710voipgw 108machdir-$(CONFIG_SH_SH4202_MICRODEV) += superh/microdev
109machdir-$(CONFIG_SH_SH4202_MICRODEV) := superh/microdev 109machdir-$(CONFIG_SH_LANDISK) += landisk
110machdir-$(CONFIG_SH_LANDISK) := landisk 110machdir-$(CONFIG_SH_TITAN) += titan
111machdir-$(CONFIG_SH_TITAN) := titan 111machdir-$(CONFIG_SH_SHMIN) += shmin
112machdir-$(CONFIG_SH_SHMIN) := shmin 112machdir-$(CONFIG_SH_7206_SOLUTION_ENGINE) += se/7206
113machdir-$(CONFIG_SH_7206_SOLUTION_ENGINE) := se/7206 113machdir-$(CONFIG_SH_7619_SOLUTION_ENGINE) += se/7619
114machdir-$(CONFIG_SH_7619_SOLUTION_ENGINE) := se/7619 114machdir-$(CONFIG_SH_LBOX_RE2) += lboxre2
115machdir-$(CONFIG_SH_LBOX_RE2) := lboxre2 115
116machdir-$(CONFIG_SH_UNKNOWN) := unknown 116incdir-y := $(notdir $(machdir-y))
117
118incdir-y := $(notdir $(machdir-y))
119incdir-$(CONFIG_SH_HP6XX) := hp6xx
120 117
121ifneq ($(machdir-y),) 118ifneq ($(machdir-y),)
122core-y += arch/sh/boards/$(machdir-y)/ 119core-y += $(addprefix arch/sh/boards/, \
120 $(filter-out ., $(patsubst %,%/,$(machdir-y))))
123endif 121endif
124 122
125# Companion chips 123# Companion chips
126core-$(CONFIG_HD64461) += arch/sh/cchips/hd6446x/hd64461/ 124core-$(CONFIG_HD6446X_SERIES) += arch/sh/cchips/hd6446x/
127core-$(CONFIG_HD64465) += arch/sh/cchips/hd6446x/hd64465/
128core-$(CONFIG_VOYAGERGX) += arch/sh/cchips/voyagergx/ 125core-$(CONFIG_VOYAGERGX) += arch/sh/cchips/voyagergx/
129 126
130cpuincdir-$(CONFIG_CPU_SH2) := cpu-sh2 127cpuincdir-$(CONFIG_CPU_SH2) := cpu-sh2
@@ -157,19 +154,31 @@ include/asm-sh/.cpu: $(wildcard include/config/cpu/*.h) \
157# Most boards have their own mach directories. For the ones that 154# Most boards have their own mach directories. For the ones that
158# don't, just reference the parent directory so the semantics are 155# don't, just reference the parent directory so the semantics are
159# kept roughly the same. 156# kept roughly the same.
157#
158# When multiple boards are compiled in at the same time, preference
159# for the mach link is given to whichever has a directory for its
160# headers. However, this is only a workaround until platforms that
161# can live in the same kernel image back away from relying on the
162# mach link.
160 163
161include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \ 164include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \
162 include/config/auto.conf FORCE 165 include/config/auto.conf FORCE
163 @echo -n ' SYMLINK include/asm-sh/mach -> '
164 $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi 166 $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi
165 $(Q)if [ -d $(incdir-prefix)$(incdir-y) ]; then \ 167 $(Q)rm -f include/asm-sh/mach
166 echo -e 'include/asm-sh/$(incdir-y)'; \ 168 $(Q)for i in $(incdir-y); do \
167 ln -fsn $(incdir-prefix)$(incdir-y) \ 169 if [ -d $(incdir-prefix)$$i ]; then \
170 echo -n ' SYMLINK include/asm-sh/mach -> '; \
171 echo -e "include/asm-sh/$$i"; \
172 ln -fsn $(incdir-prefix)$$i \
168 include/asm-sh/mach; \ 173 include/asm-sh/mach; \
169 else \ 174 else \
170 echo -e 'include/asm-sh'; \ 175 if [ ! -d include/asm-sh/mach ]; then \
171 ln -fsn $(incdir-prefix) include/asm-sh/mach; \ 176 echo -n ' SYMLINK include/asm-sh/mach -> '; \
172 fi 177 echo -e 'include/asm-sh'; \
178 ln -fsn $(incdir-prefix) include/asm-sh/mach; \
179 fi; \
180 fi; \
181 done
173 @touch $@ 182 @touch $@
174 183
175archprepare: include/asm-sh/.cpu include/asm-sh/.mach maketools 184archprepare: include/asm-sh/.cpu include/asm-sh/.mach maketools
@@ -188,7 +197,9 @@ compressed: zImage
188archclean: 197archclean:
189 $(Q)$(MAKE) $(clean)=$(boot) 198 $(Q)$(MAKE) $(clean)=$(boot)
190 199
191CLEAN_FILES += include/asm-sh/machtypes.h 200CLEAN_FILES += include/asm-sh/machtypes.h \
201 include/asm-sh/cpu include/asm-sh/.cpu \
202 include/asm-sh/mach include/asm-sh/.mach
192 203
193define archhelp 204define archhelp
194 @echo '* zImage - Compressed kernel image' 205 @echo '* zImage - Compressed kernel image'
diff --git a/arch/sh/boards/dreamcast/setup.c b/arch/sh/boards/dreamcast/setup.c
index f13017eeeb27..8799df6e866a 100644
--- a/arch/sh/boards/dreamcast/setup.c
+++ b/arch/sh/boards/dreamcast/setup.c
@@ -60,7 +60,7 @@ static void __init dreamcast_setup(char **cmdline_p)
60#endif 60#endif
61} 61}
62 62
63struct sh_machine_vector mv_dreamcast __initmv = { 63static struct sh_machine_vector mv_dreamcast __initmv = {
64 .mv_name = "Sega Dreamcast", 64 .mv_name = "Sega Dreamcast",
65 .mv_setup = dreamcast_setup, 65 .mv_setup = dreamcast_setup,
66 .mv_irq_demux = systemasic_irq_demux, 66 .mv_irq_demux = systemasic_irq_demux,
@@ -70,4 +70,3 @@ struct sh_machine_vector mv_dreamcast __initmv = {
70 .mv_consistent_free = dreamcast_consistent_free, 70 .mv_consistent_free = dreamcast_consistent_free,
71#endif 71#endif
72}; 72};
73ALIAS_MV(dreamcast)
diff --git a/arch/sh/boards/hp6xx/mach.c b/arch/sh/boards/hp6xx/mach.c
deleted file mode 100644
index 08dbba910f74..000000000000
--- a/arch/sh/boards/hp6xx/mach.c
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * linux/arch/sh/boards/hp6xx/mach.c
3 *
4 * Copyright (C) 2000 Stuart Menefy (stuart.menefy@st.com)
5 *
6 * May be copied or modified under the terms of the GNU General Public
7 * License. See linux/COPYING for more information.
8 *
9 * Machine vector for the HP680
10 */
11#include <asm/machvec.h>
12#include <asm/hd64461.h>
13#include <asm/io.h>
14#include <asm/irq.h>
15
16struct sh_machine_vector mv_hp6xx __initmv = {
17 .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM,
18
19 .mv_inb = hd64461_inb,
20 .mv_inw = hd64461_inw,
21 .mv_inl = hd64461_inl,
22 .mv_outb = hd64461_outb,
23 .mv_outw = hd64461_outw,
24 .mv_outl = hd64461_outl,
25
26 .mv_inb_p = hd64461_inb_p,
27 .mv_inw_p = hd64461_inw,
28 .mv_inl_p = hd64461_inl,
29 .mv_outb_p = hd64461_outb_p,
30 .mv_outw_p = hd64461_outw,
31 .mv_outl_p = hd64461_outl,
32
33 .mv_insb = hd64461_insb,
34 .mv_insw = hd64461_insw,
35 .mv_insl = hd64461_insl,
36 .mv_outsb = hd64461_outsb,
37 .mv_outsw = hd64461_outsw,
38 .mv_outsl = hd64461_outsl,
39
40 .mv_readw = hd64461_readw,
41 .mv_writew = hd64461_writew,
42
43 .mv_irq_demux = hd64461_irq_demux,
44};
45
46ALIAS_MV(hp6xx)
diff --git a/arch/sh/boards/hp6xx/setup.c b/arch/sh/boards/hp6xx/setup.c
index 6aeee85c9785..7ae708930bac 100644
--- a/arch/sh/boards/hp6xx/setup.c
+++ b/arch/sh/boards/hp6xx/setup.c
@@ -98,10 +98,9 @@ static void __init hp6xx_setup(char **cmdline_p)
98} 98}
99device_initcall(hp6xx_devices_setup); 99device_initcall(hp6xx_devices_setup);
100 100
101struct sh_machine_vector mv_hp6xx __initmv = { 101static struct sh_machine_vector mv_hp6xx __initmv = {
102 .mv_name = "hp6xx", 102 .mv_name = "hp6xx",
103 .mv_setup = hp6xx_setup, 103 .mv_setup = hp6xx_setup,
104 .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM, 104 .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM,
105 .mv_irq_demux = hd64461_irq_demux, 105 .mv_irq_demux = hd64461_irq_demux,
106}; 106};
107ALIAS_MV(hp6xx)
diff --git a/arch/sh/boards/landisk/setup.c b/arch/sh/boards/landisk/setup.c
index f953c7427769..eda71763ecc5 100644
--- a/arch/sh/boards/landisk/setup.c
+++ b/arch/sh/boards/landisk/setup.c
@@ -97,10 +97,9 @@ static void __init landisk_setup(char **cmdline_p)
97/* 97/*
98 * The Machine Vector 98 * The Machine Vector
99 */ 99 */
100struct sh_machine_vector mv_landisk __initmv = { 100static struct sh_machine_vector mv_landisk __initmv = {
101 .mv_name = "LANDISK", 101 .mv_name = "LANDISK",
102 .mv_nr_irqs = 72, 102 .mv_nr_irqs = 72,
103 .mv_setup = landisk_setup, 103 .mv_setup = landisk_setup,
104 .mv_init_irq = init_landisk_IRQ, 104 .mv_init_irq = init_landisk_IRQ,
105}; 105};
106ALIAS_MV(landisk)
diff --git a/arch/sh/boards/lboxre2/setup.c b/arch/sh/boards/lboxre2/setup.c
index 4e20f7c63bf3..9c830fdc411b 100644
--- a/arch/sh/boards/lboxre2/setup.c
+++ b/arch/sh/boards/lboxre2/setup.c
@@ -77,9 +77,8 @@ device_initcall(lboxre2_devices_setup);
77/* 77/*
78 * The Machine Vector 78 * The Machine Vector
79 */ 79 */
80struct sh_machine_vector mv_lboxre2 __initmv = { 80static struct sh_machine_vector mv_lboxre2 __initmv = {
81 .mv_name = "L-BOX RE2", 81 .mv_name = "L-BOX RE2",
82 .mv_nr_irqs = 72, 82 .mv_nr_irqs = 72,
83 .mv_init_irq = init_lboxre2_IRQ, 83 .mv_init_irq = init_lboxre2_IRQ,
84}; 84};
85ALIAS_MV(lboxre2)
diff --git a/arch/sh/boards/mpc1211/pci.c b/arch/sh/boards/mpc1211/pci.c
index 4ed1a95c6d56..23849f70f133 100644
--- a/arch/sh/boards/mpc1211/pci.c
+++ b/arch/sh/boards/mpc1211/pci.c
@@ -187,7 +187,7 @@ char * __devinit pcibios_setup(char *str)
187 * are examined. 187 * are examined.
188 */ 188 */
189 189
190void __init pcibios_fixup_bus(struct pci_bus *b) 190void __devinit pcibios_fixup_bus(struct pci_bus *b)
191{ 191{
192 pci_read_bridge_bases(b); 192 pci_read_bridge_bases(b);
193} 193}
diff --git a/arch/sh/boards/mpc1211/setup.c b/arch/sh/boards/mpc1211/setup.c
index 1a0604b23ce0..8ce03e00b0ae 100644
--- a/arch/sh/boards/mpc1211/setup.c
+++ b/arch/sh/boards/mpc1211/setup.c
@@ -338,11 +338,10 @@ static void __init mpc1211_setup(char **cmdline_p)
338/* 338/*
339 * The Machine Vector 339 * The Machine Vector
340 */ 340 */
341struct sh_machine_vector mv_mpc1211 __initmv = { 341static struct sh_machine_vector mv_mpc1211 __initmv = {
342 .mv_name = "Interface MPC-1211(CTP/PCI/MPC-SH02)", 342 .mv_name = "Interface MPC-1211(CTP/PCI/MPC-SH02)",
343 .mv_setup = mpc1211_setup, 343 .mv_setup = mpc1211_setup,
344 .mv_nr_irqs = 48, 344 .mv_nr_irqs = 48,
345 .mv_irq_demux = mpc1211_irq_demux, 345 .mv_irq_demux = mpc1211_irq_demux,
346 .mv_init_irq = init_mpc1211_IRQ, 346 .mv_init_irq = init_mpc1211_IRQ,
347}; 347};
348ALIAS_MV(mpc1211)
diff --git a/arch/sh/boards/renesas/edosk7705/setup.c b/arch/sh/boards/renesas/edosk7705/setup.c
index ec5be0107719..f076c45308dd 100644
--- a/arch/sh/boards/renesas/edosk7705/setup.c
+++ b/arch/sh/boards/renesas/edosk7705/setup.c
@@ -21,7 +21,7 @@ static void __init sh_edosk7705_init_irq(void)
21/* 21/*
22 * The Machine Vector 22 * The Machine Vector
23 */ 23 */
24struct sh_machine_vector mv_edosk7705 __initmv = { 24static struct sh_machine_vector mv_edosk7705 __initmv = {
25 .mv_name = "EDOSK7705", 25 .mv_name = "EDOSK7705",
26 .mv_nr_irqs = 80, 26 .mv_nr_irqs = 80,
27 27
@@ -41,4 +41,3 @@ struct sh_machine_vector mv_edosk7705 __initmv = {
41 .mv_isa_port2addr = sh_edosk7705_isa_port2addr, 41 .mv_isa_port2addr = sh_edosk7705_isa_port2addr,
42 .mv_init_irq = sh_edosk7705_init_irq, 42 .mv_init_irq = sh_edosk7705_init_irq,
43}; 43};
44ALIAS_MV(edosk7705)
diff --git a/arch/sh/boards/renesas/hs7751rvoip/setup.c b/arch/sh/boards/renesas/hs7751rvoip/setup.c
index f7d0e304d899..fa5fa3920222 100644
--- a/arch/sh/boards/renesas/hs7751rvoip/setup.c
+++ b/arch/sh/boards/renesas/hs7751rvoip/setup.c
@@ -89,7 +89,7 @@ static void __init hs7751rvoip_setup(char **cmdline_p)
89 printk(KERN_INFO "Renesas Technology Sales HS7751RVoIP-2 support.\n"); 89 printk(KERN_INFO "Renesas Technology Sales HS7751RVoIP-2 support.\n");
90} 90}
91 91
92struct sh_machine_vector mv_hs7751rvoip __initmv = { 92static struct sh_machine_vector mv_hs7751rvoip __initmv = {
93 .mv_name = "HS7751RVoIP", 93 .mv_name = "HS7751RVoIP",
94 .mv_setup = hs7751rvoip_setup, 94 .mv_setup = hs7751rvoip_setup,
95 .mv_nr_irqs = 72, 95 .mv_nr_irqs = 72,
@@ -118,4 +118,3 @@ struct sh_machine_vector mv_hs7751rvoip __initmv = {
118 .mv_init_irq = hs7751rvoip_init_irq, 118 .mv_init_irq = hs7751rvoip_init_irq,
119 .mv_ioport_map = hs7751rvoip_ioport_map, 119 .mv_ioport_map = hs7751rvoip_ioport_map,
120}; 120};
121ALIAS_MV(hs7751rvoip)
diff --git a/arch/sh/boards/renesas/r7780rp/Kconfig b/arch/sh/boards/renesas/r7780rp/Kconfig
index 9fb11641fe13..fc8f28e04ba3 100644
--- a/arch/sh/boards/renesas/r7780rp/Kconfig
+++ b/arch/sh/boards/renesas/r7780rp/Kconfig
@@ -6,18 +6,18 @@ choice
6 6
7config SH_R7780RP 7config SH_R7780RP
8 bool "R7780RP-1 board support" 8 bool "R7780RP-1 board support"
9 select CPU_SUBTYPE_SH7780 9 depends on CPU_SUBTYPE_SH7780
10 10
11config SH_R7780MP 11config SH_R7780MP
12 bool "R7780MP board support" 12 bool "R7780MP board support"
13 select CPU_SUBTYPE_SH7780 13 depends on CPU_SUBTYPE_SH7780
14 help 14 help
15 Selecting this option will enable support for the mass-production 15 Selecting this option will enable support for the mass-production
16 version of the R7780RP. If in doubt, say Y. 16 version of the R7780RP. If in doubt, say Y.
17 17
18config SH_R7785RP 18config SH_R7785RP
19 bool "R7785RP board support" 19 bool "R7785RP board support"
20 select CPU_SUBTYPE_SH7785 20 depends on CPU_SUBTYPE_SH7785
21 21
22endchoice 22endchoice
23 23
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c
index 0727ef92f2b3..adb529d01bae 100644
--- a/arch/sh/boards/renesas/r7780rp/setup.c
+++ b/arch/sh/boards/renesas/r7780rp/setup.c
@@ -21,6 +21,58 @@
21#include <asm/clock.h> 21#include <asm/clock.h>
22#include <asm/io.h> 22#include <asm/io.h>
23 23
24static struct resource r8a66597_usb_host_resources[] = {
25 [0] = {
26 .name = "r8a66597_hcd",
27 .start = 0xA4200000,
28 .end = 0xA42000FF,
29 .flags = IORESOURCE_MEM,
30 },
31 [1] = {
32 .name = "r8a66597_hcd",
33 .start = 11, /* irq number */
34 .end = 11,
35 .flags = IORESOURCE_IRQ,
36 },
37};
38
39static struct platform_device r8a66597_usb_host_device = {
40 .name = "r8a66597_hcd",
41 .id = -1,
42 .dev = {
43 .dma_mask = NULL, /* don't use dma */
44 .coherent_dma_mask = 0xffffffff,
45 },
46 .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources),
47 .resource = r8a66597_usb_host_resources,
48};
49
50static struct resource m66592_usb_peripheral_resources[] = {
51 [0] = {
52 .name = "m66592_udc",
53 .start = 0xb0000000,
54 .end = 0xb00000FF,
55 .flags = IORESOURCE_MEM,
56 },
57 [1] = {
58 .name = "m66592_udc",
59 .start = 9, /* irq number */
60 .end = 9,
61 .flags = IORESOURCE_IRQ,
62 },
63};
64
65static struct platform_device m66592_usb_peripheral_device = {
66 .name = "m66592_udc",
67 .id = -1,
68 .dev = {
69 .dma_mask = NULL, /* don't use dma */
70 .coherent_dma_mask = 0xffffffff,
71 },
72 .num_resources = ARRAY_SIZE(m66592_usb_peripheral_resources),
73 .resource = m66592_usb_peripheral_resources,
74};
75
24static struct resource cf_ide_resources[] = { 76static struct resource cf_ide_resources[] = {
25 [0] = { 77 [0] = {
26 .start = PA_AREA5_IO + 0x1000, 78 .start = PA_AREA5_IO + 0x1000,
@@ -81,6 +133,8 @@ static struct platform_device heartbeat_device = {
81}; 133};
82 134
83static struct platform_device *r7780rp_devices[] __initdata = { 135static struct platform_device *r7780rp_devices[] __initdata = {
136 &r8a66597_usb_host_device,
137 &m66592_usb_peripheral_device,
84 &cf_ide_device, 138 &cf_ide_device,
85 &heartbeat_device, 139 &heartbeat_device,
86}; 140};
@@ -166,10 +220,9 @@ static void __init highlander_setup(char **cmdline_p)
166/* 220/*
167 * The Machine Vector 221 * The Machine Vector
168 */ 222 */
169struct sh_machine_vector mv_highlander __initmv = { 223static struct sh_machine_vector mv_highlander __initmv = {
170 .mv_name = "Highlander", 224 .mv_name = "Highlander",
171 .mv_nr_irqs = 109, 225 .mv_nr_irqs = 109,
172 .mv_setup = highlander_setup, 226 .mv_setup = highlander_setup,
173 .mv_init_irq = highlander_init_irq, 227 .mv_init_irq = highlander_init_irq,
174}; 228};
175ALIAS_MV(highlander)
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c
index 593f26a85e9c..e165d85c03b5 100644
--- a/arch/sh/boards/renesas/rts7751r2d/setup.c
+++ b/arch/sh/boards/renesas/rts7751r2d/setup.c
@@ -86,7 +86,8 @@ static struct plat_serial8250_port uart_platform_data[] = {
86 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, 86 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
87 .regshift = 2, 87 .regshift = 2,
88 .uartclk = (9600 * 16), 88 .uartclk = (9600 * 16),
89 } 89 },
90 { 0 },
90}; 91};
91 92
92static struct platform_device uart_device = { 93static struct platform_device uart_device = {
@@ -176,7 +177,7 @@ static void __init rts7751r2d_setup(char **cmdline_p)
176/* 177/*
177 * The Machine Vector 178 * The Machine Vector
178 */ 179 */
179struct sh_machine_vector mv_rts7751r2d __initmv = { 180static struct sh_machine_vector mv_rts7751r2d __initmv = {
180 .mv_name = "RTS7751R2D", 181 .mv_name = "RTS7751R2D",
181 .mv_setup = rts7751r2d_setup, 182 .mv_setup = rts7751r2d_setup,
182 .mv_nr_irqs = 72, 183 .mv_nr_irqs = 72,
@@ -189,4 +190,3 @@ struct sh_machine_vector mv_rts7751r2d __initmv = {
189 .mv_consistent_free = voyagergx_consistent_free, 190 .mv_consistent_free = voyagergx_consistent_free,
190#endif 191#endif
191}; 192};
192ALIAS_MV(rts7751r2d)
diff --git a/arch/sh/boards/renesas/sh7710voipgw/setup.c b/arch/sh/boards/renesas/sh7710voipgw/setup.c
index 180810b12107..2dce8bd97f90 100644
--- a/arch/sh/boards/renesas/sh7710voipgw/setup.c
+++ b/arch/sh/boards/renesas/sh7710voipgw/setup.c
@@ -88,9 +88,8 @@ static void __init sh7710voipgw_init_irq(void)
88/* 88/*
89 * The Machine Vector 89 * The Machine Vector
90 */ 90 */
91struct sh_machine_vector mv_sh7710voipgw __initmv = { 91static struct sh_machine_vector mv_sh7710voipgw __initmv = {
92 .mv_name = "SH7710 VoIP Gateway", 92 .mv_name = "SH7710 VoIP Gateway",
93 .mv_nr_irqs = 104, 93 .mv_nr_irqs = 104,
94 .mv_init_irq = sh7710voipgw_init_irq, 94 .mv_init_irq = sh7710voipgw_init_irq,
95}; 95};
96ALIAS_MV(sh7710voipgw)
diff --git a/arch/sh/boards/renesas/systemh/setup.c b/arch/sh/boards/renesas/systemh/setup.c
index 936117659b74..ee78af842778 100644
--- a/arch/sh/boards/renesas/systemh/setup.c
+++ b/arch/sh/boards/renesas/systemh/setup.c
@@ -28,7 +28,7 @@ static void __init sh7751systemh_init_irq(void)
28 make_systemh_irq(0xb); /* Ethernet interrupt */ 28 make_systemh_irq(0xb); /* Ethernet interrupt */
29} 29}
30 30
31struct sh_machine_vector mv_7751systemh __initmv = { 31static struct sh_machine_vector mv_7751systemh __initmv = {
32 .mv_name = "7751 SystemH", 32 .mv_name = "7751 SystemH",
33 .mv_nr_irqs = 72, 33 .mv_nr_irqs = 72,
34 34
@@ -55,4 +55,3 @@ struct sh_machine_vector mv_7751systemh __initmv = {
55 55
56 .mv_init_irq = sh7751systemh_init_irq, 56 .mv_init_irq = sh7751systemh_init_irq,
57}; 57};
58ALIAS_MV(7751systemh)
diff --git a/arch/sh/boards/saturn/Makefile b/arch/sh/boards/saturn/Makefile
deleted file mode 100644
index 75a3042e252e..000000000000
--- a/arch/sh/boards/saturn/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
1#
2# Makefile for the Sega Saturn specific parts of the kernel
3#
4
5obj-y := setup.o io.o irq.o
6
7obj-$(CONFIG_SMP) += smp.o
8
diff --git a/arch/sh/boards/saturn/io.c b/arch/sh/boards/saturn/io.c
deleted file mode 100644
index c6e4f7f2e686..000000000000
--- a/arch/sh/boards/saturn/io.c
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * arch/sh/boards/saturn/io.c
3 *
4 * I/O routines for the Sega Saturn.
5 *
6 * Copyright (C) 2002 Paul Mundt
7 *
8 * Released under the terms of the GNU GPL v2.0.
9 */
10#include <asm/saturn/io.h>
11#include <asm/machvec.h>
12
13unsigned long saturn_isa_port2addr(unsigned long offset)
14{
15 return offset;
16}
17
18void *saturn_ioremap(unsigned long offset, unsigned long size)
19{
20 return (void *)offset;
21}
22
23void saturn_iounmap(void *addr)
24{
25}
26
diff --git a/arch/sh/boards/saturn/irq.c b/arch/sh/boards/saturn/irq.c
deleted file mode 100644
index 15d1d3f0f787..000000000000
--- a/arch/sh/boards/saturn/irq.c
+++ /dev/null
@@ -1,118 +0,0 @@
1/*
2 * arch/sh/boards/saturn/irq.c
3 *
4 * Copyright (C) 2002 Paul Mundt
5 *
6 * Released under the terms of the GNU GPL v2.0.
7 */
8#include <linux/kernel.h>
9#include <linux/init.h>
10#include <linux/interrupt.h>
11#include <asm/irq.h>
12#include <asm/io.h>
13
14/*
15 * Interrupts map out as follows:
16 *
17 * Vector Name Mask
18 *
19 * 64 VBLANKIN 0x0001
20 * 65 VBLANKOUT 0x0002
21 * 66 HBLANKIN 0x0004
22 * 67 TIMER0 0x0008
23 * 68 TIMER1 0x0010
24 * 69 DSPEND 0x0020
25 * 70 SOUNDREQUEST 0x0040
26 * 71 SYSTEMMANAGER 0x0080
27 * 72 PAD 0x0100
28 * 73 LEVEL2DMAEND 0x0200
29 * 74 LEVEL1DMAEND 0x0400
30 * 75 LEVEL0DMAEND 0x0800
31 * 76 DMAILLEGAL 0x1000
32 * 77 SRITEDRAWEND 0x2000
33 * 78 ABUS 0x8000
34 *
35 */
36#define SATURN_IRQ_MIN 64 /* VBLANKIN */
37#define SATURN_IRQ_MAX 78 /* ABUS */
38
39#define SATURN_IRQ_MASK 0xbfff
40
41static inline u32 saturn_irq_mask(unsigned int irq_nr)
42{
43 u32 mask;
44
45 mask = (1 << (irq_nr - SATURN_IRQ_MIN));
46 mask <<= (irq_nr == SATURN_IRQ_MAX);
47 mask &= SATURN_IRQ_MASK;
48
49 return mask;
50}
51
52static inline void mask_saturn_irq(unsigned int irq_nr)
53{
54 u32 mask;
55
56 mask = ctrl_inl(SATURN_IMR);
57 mask |= saturn_irq_mask(irq_nr);
58 ctrl_outl(mask, SATURN_IMR);
59}
60
61static inline void unmask_saturn_irq(unsigned int irq_nr)
62{
63 u32 mask;
64
65 mask = ctrl_inl(SATURN_IMR);
66 mask &= ~saturn_irq_mask(irq_nr);
67 ctrl_outl(mask, SATURN_IMR);
68}
69
70static void disable_saturn_irq(unsigned int irq_nr)
71{
72 mask_saturn_irq(irq_nr);
73}
74
75static void enable_saturn_irq(unsigned int irq_nr)
76{
77 unmask_saturn_irq(irq_nr);
78}
79
80static void mask_and_ack_saturn_irq(unsigned int irq_nr)
81{
82 mask_saturn_irq(irq_nr);
83}
84
85static void end_saturn_irq(unsigned int irq_nr)
86{
87 if (!(irq_desc[irq_nr].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
88 unmask_saturn_irq(irq_nr);
89}
90
91static unsigned int startup_saturn_irq(unsigned int irq_nr)
92{
93 unmask_saturn_irq(irq_nr);
94
95 return 0;
96}
97
98static void shutdown_saturn_irq(unsigned int irq_nr)
99{
100 mask_saturn_irq(irq_nr);
101}
102
103static struct hw_interrupt_type saturn_int = {
104 .typename = "Saturn",
105 .enable = enable_saturn_irq,
106 .disable = disable_saturn_irq,
107 .ack = mask_and_ack_saturn_irq,
108 .end = end_saturn_irq,
109 .startup = startup_saturn_irq,
110 .shutdown = shutdown_saturn_irq,
111};
112
113int saturn_irq_demux(int irq_nr)
114{
115 /* FIXME */
116 return irq_nr;
117}
118
diff --git a/arch/sh/boards/saturn/setup.c b/arch/sh/boards/saturn/setup.c
deleted file mode 100644
index a3a37c9aad2e..000000000000
--- a/arch/sh/boards/saturn/setup.c
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * arch/sh/boards/saturn/setup.c
3 *
4 * Hardware support for the Sega Saturn.
5 *
6 * Copyright (c) 2002 Paul Mundt
7 *
8 * Released under the terms of the GNU GPL v2.0.
9 */
10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <asm/io.h>
13#include <asm/machvec.h>
14#include <asm/mach/io.h>
15
16extern int saturn_irq_demux(int irq_nr);
17
18/*
19 * The Machine Vector
20 */
21struct sh_machine_vector mv_saturn __initmv = {
22 .mv_name = "Sega Saturn",
23 .mv_nr_irqs = 80, /* Fix this later */
24
25 .mv_isa_port2addr = saturn_isa_port2addr,
26 .mv_irq_demux = saturn_irq_demux,
27
28 .mv_ioremap = saturn_ioremap,
29 .mv_iounmap = saturn_iounmap,
30};
31ALIAS_MV(saturn)
diff --git a/arch/sh/boards/saturn/smp.c b/arch/sh/boards/saturn/smp.c
deleted file mode 100644
index 76460918c9cd..000000000000
--- a/arch/sh/boards/saturn/smp.c
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * arch/sh/boards/saturn/smp.c
3 *
4 * SMP support for the Sega Saturn.
5 *
6 * Copyright (c) 2002 Paul Mundt
7 *
8 * Released under the terms of the GNU GPL v2.0.
9 */
10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <linux/smp.h>
13
14#include <asm/saturn/smpc.h>
15
16extern void start_secondary(void);
17
18void __smp_send_ipi(unsigned int cpu, unsigned int action)
19{
20 /* Nothing here yet .. */
21}
22
23unsigned int __smp_probe_cpus(void)
24{
25 /*
26 * This is just a straightforward master/slave configuration,
27 * and probing isn't really supported..
28 */
29 return 2;
30}
31
32/*
33 * We're only allowed to do byte-access to SMPC registers. In
34 * addition to which, we treat them as write-only, since
35 * reading from them will return undefined data.
36 */
37static inline void smpc_slave_stop(unsigned int cpu)
38{
39 smpc_barrier();
40 ctrl_outb(1, SMPC_STATUS);
41
42 ctrl_outb(SMPC_CMD_SSHOFF, SMPC_COMMAND);
43 smpc_barrier();
44}
45
46static inline void smpc_slave_start(unsigned int cpu)
47{
48 ctrl_outb(1, SMPC_STATUS);
49 ctrl_outb(SMPC_CMD_SSHON, SMPC_COMMAND);
50
51 smpc_barrier();
52}
53
54void __smp_slave_init(unsigned int cpu)
55{
56 register unsigned long vbr;
57 void **entry;
58
59 __asm__ __volatile__ ("stc vbr, %0\n\t" : "=r" (vbr));
60 entry = (void **)(vbr + 0x310 + 0x94);
61
62 smpc_slave_stop(cpu);
63
64 *(void **)entry = (void *)start_secondary;
65
66 smpc_slave_start(cpu);
67}
68
diff --git a/arch/sh/boards/se/7206/setup.c b/arch/sh/boards/se/7206/setup.c
index ca714879f559..a074b62505ef 100644
--- a/arch/sh/boards/se/7206/setup.c
+++ b/arch/sh/boards/se/7206/setup.c
@@ -70,7 +70,7 @@ __initcall(se7206_devices_setup);
70 * The Machine Vector 70 * The Machine Vector
71 */ 71 */
72 72
73struct sh_machine_vector mv_se __initmv = { 73static struct sh_machine_vector mv_se __initmv = {
74 .mv_name = "SolutionEngine", 74 .mv_name = "SolutionEngine",
75 .mv_nr_irqs = 256, 75 .mv_nr_irqs = 256,
76 .mv_inb = se7206_inb, 76 .mv_inb = se7206_inb,
@@ -96,4 +96,3 @@ struct sh_machine_vector mv_se __initmv = {
96 96
97 .mv_init_irq = init_se7206_IRQ, 97 .mv_init_irq = init_se7206_IRQ,
98}; 98};
99ALIAS_MV(se)
diff --git a/arch/sh/boards/se/7300/setup.c b/arch/sh/boards/se/7300/setup.c
index f1960956bad0..eb469f5b6e97 100644
--- a/arch/sh/boards/se/7300/setup.c
+++ b/arch/sh/boards/se/7300/setup.c
@@ -46,7 +46,7 @@ __initcall(se7300_devices_setup);
46/* 46/*
47 * The Machine Vector 47 * The Machine Vector
48 */ 48 */
49struct sh_machine_vector mv_7300se __initmv = { 49static struct sh_machine_vector mv_7300se __initmv = {
50 .mv_name = "SolutionEngine 7300", 50 .mv_name = "SolutionEngine 7300",
51 .mv_nr_irqs = 109, 51 .mv_nr_irqs = 109,
52 .mv_inb = sh7300se_inb, 52 .mv_inb = sh7300se_inb,
@@ -72,4 +72,3 @@ struct sh_machine_vector mv_7300se __initmv = {
72 72
73 .mv_init_irq = init_7300se_IRQ, 73 .mv_init_irq = init_7300se_IRQ,
74}; 74};
75ALIAS_MV(7300se)
diff --git a/arch/sh/boards/se/73180/setup.c b/arch/sh/boards/se/73180/setup.c
index 911ce1cdbd7f..1deee8556642 100644
--- a/arch/sh/boards/se/73180/setup.c
+++ b/arch/sh/boards/se/73180/setup.c
@@ -38,15 +38,15 @@ static struct platform_device *se73180_devices[] __initdata = {
38 38
39static int __init se73180_devices_setup(void) 39static int __init se73180_devices_setup(void)
40{ 40{
41 return platform_add_devices(sh7343se_platform_devices, 41 return platform_add_devices(se73180_devices,
42 ARRAY_SIZE(sh7343se_platform_devices)); 42 ARRAY_SIZE(se73180_devices));
43} 43}
44__initcall(se73180_devices_setup); 44__initcall(se73180_devices_setup);
45 45
46/* 46/*
47 * The Machine Vector 47 * The Machine Vector
48 */ 48 */
49struct sh_machine_vector mv_73180se __initmv = { 49static struct sh_machine_vector mv_73180se __initmv = {
50 .mv_name = "SolutionEngine 73180", 50 .mv_name = "SolutionEngine 73180",
51 .mv_nr_irqs = 108, 51 .mv_nr_irqs = 108,
52 .mv_inb = sh73180se_inb, 52 .mv_inb = sh73180se_inb,
@@ -73,4 +73,3 @@ struct sh_machine_vector mv_73180se __initmv = {
73 .mv_init_irq = init_73180se_IRQ, 73 .mv_init_irq = init_73180se_IRQ,
74 .mv_irq_demux = shmse_irq_demux, 74 .mv_irq_demux = shmse_irq_demux,
75}; 75};
76ALIAS_MV(73180se)
diff --git a/arch/sh/boards/se/7343/setup.c b/arch/sh/boards/se/7343/setup.c
index 3fdb16f2cef1..8fec155e2ff7 100644
--- a/arch/sh/boards/se/7343/setup.c
+++ b/arch/sh/boards/se/7343/setup.c
@@ -64,7 +64,7 @@ static void __init sh7343se_setup(char **cmdline_p)
64/* 64/*
65 * The Machine Vector 65 * The Machine Vector
66 */ 66 */
67struct sh_machine_vector mv_7343se __initmv = { 67static struct sh_machine_vector mv_7343se __initmv = {
68 .mv_name = "SolutionEngine 7343", 68 .mv_name = "SolutionEngine 7343",
69 .mv_setup = sh7343se_setup, 69 .mv_setup = sh7343se_setup,
70 .mv_nr_irqs = 108, 70 .mv_nr_irqs = 108,
@@ -92,4 +92,3 @@ struct sh_machine_vector mv_7343se __initmv = {
92 .mv_init_irq = init_7343se_IRQ, 92 .mv_init_irq = init_7343se_IRQ,
93 .mv_irq_demux = shmse_irq_demux, 93 .mv_irq_demux = shmse_irq_demux,
94}; 94};
95ALIAS_MV(7343se)
diff --git a/arch/sh/boards/se/7619/setup.c b/arch/sh/boards/se/7619/setup.c
index 52d2c4d5d2fa..1d0ef7faa10d 100644
--- a/arch/sh/boards/se/7619/setup.c
+++ b/arch/sh/boards/se/7619/setup.c
@@ -15,8 +15,7 @@
15 * The Machine Vector 15 * The Machine Vector
16 */ 16 */
17 17
18struct sh_machine_vector mv_se __initmv = { 18static struct sh_machine_vector mv_se __initmv = {
19 .mv_name = "SolutionEngine", 19 .mv_name = "SolutionEngine",
20 .mv_nr_irqs = 108, 20 .mv_nr_irqs = 108,
21}; 21};
22ALIAS_MV(se)
diff --git a/arch/sh/boards/se/770x/irq.c b/arch/sh/boards/se/770x/irq.c
index c8eccff77a04..cdb0807928a5 100644
--- a/arch/sh/boards/se/770x/irq.c
+++ b/arch/sh/boards/se/770x/irq.c
@@ -15,46 +15,7 @@
15#include <asm/io.h> 15#include <asm/io.h>
16#include <asm/se.h> 16#include <asm/se.h>
17 17
18/* 18static struct ipr_data ipr_irq_table[] = {
19 * If the problem of make_ipr_irq is solved,
20 * this code will become unnecessary. :-)
21 */
22static void se770x_disable_ipr_irq(unsigned int irq)
23{
24 struct ipr_data *p = get_irq_chip_data(irq);
25
26 ctrl_outw(ctrl_inw(p->addr) & (0xffff ^ (0xf << p->shift)), p->addr);
27}
28
29static void se770x_enable_ipr_irq(unsigned int irq)
30{
31 struct ipr_data *p = get_irq_chip_data(irq);
32
33 ctrl_outw(ctrl_inw(p->addr) | (p->priority << p->shift), p->addr);
34}
35
36static struct irq_chip se770x_irq_chip = {
37 .name = "MS770xSE-FPGA",
38 .mask = se770x_disable_ipr_irq,
39 .unmask = se770x_enable_ipr_irq,
40 .mask_ack = se770x_disable_ipr_irq,
41};
42
43void make_se770x_irq(struct ipr_data *table, unsigned int nr_irqs)
44{
45 int i;
46
47 for (i = 0; i < nr_irqs; i++) {
48 unsigned int irq = table[i].irq;
49 disable_irq_nosync(irq);
50 set_irq_chip_and_handler_name(irq, &se770x_irq_chip,
51 handle_level_irq, "level");
52 set_irq_chip_data(irq, &table[i]);
53 se770x_enable_ipr_irq(irq);
54 }
55}
56
57static struct ipr_data se770x_ipr_map[] = {
58 /* 19 /*
59 * Super I/O (Just mimic PC): 20 * Super I/O (Just mimic PC):
60 * 1: keyboard 21 * 1: keyboard
@@ -68,46 +29,67 @@ static struct ipr_data se770x_ipr_map[] = {
68 */ 29 */
69#if defined(CONFIG_CPU_SUBTYPE_SH7705) 30#if defined(CONFIG_CPU_SUBTYPE_SH7705)
70 /* This is default value */ 31 /* This is default value */
71 { 13, 0, 8, 0x0f-13 ,BCR_ILCRA}, 32 { 13, 0, 8, 0x0f-13, },
72 { 5 , 0, 4, 0x0f- 5 ,BCR_ILCRA}, 33 { 5 , 0, 4, 0x0f- 5, },
73 { 10, 0, 0, 0x0f-10, BCR_ILCRB}, 34 { 10, 1, 0, 0x0f-10, },
74 { 7 , 0, 4, 0x0f- 7, BCR_ILCRC}, 35 { 7 , 2, 4, 0x0f- 7, },
75 { 3 , 0, 0, 0x0f- 3, BCR_ILCRC}, 36 { 3 , 2, 0, 0x0f- 3, },
76 { 1 , 0, 12, 0x0f- 1, BCR_ILCRD}, 37 { 1 , 3, 12, 0x0f- 1, },
77 { 12, 0, 4, 0x0f-12, BCR_ILCRD}, /* LAN */ 38 { 12, 3, 4, 0x0f-12, }, /* LAN */
78 { 2 , 0, 8, 0x0f- 2, BCR_ILCRE}, /* PCIRQ2 */ 39 { 2 , 4, 8, 0x0f- 2, }, /* PCIRQ2 */
79 { 6 , 0, 4, 0x0f- 6, BCR_ILCRE}, /* PCIRQ1 */ 40 { 6 , 4, 4, 0x0f- 6, }, /* PCIRQ1 */
80 { 14, 0, 0, 0x0f-14, BCR_ILCRE}, /* PCIRQ0 */ 41 { 14, 4, 0, 0x0f-14, }, /* PCIRQ0 */
81 { 0 , 0, 12, 0x0f , BCR_ILCRF}, 42 { 0 , 5, 12, 0x0f , },
82 { 4 , 0, 4, 0x0f- 4, BCR_ILCRF}, 43 { 4 , 5, 4, 0x0f- 4, },
83 { 8 , 0, 12, 0x0f- 8, BCR_ILCRG}, 44 { 8 , 6, 12, 0x0f- 8, },
84 { 9 , 0, 8, 0x0f- 9, BCR_ILCRG}, 45 { 9 , 6, 8, 0x0f- 9, },
85 { 11, 0, 4, 0x0f-11, BCR_ILCRG}, 46 { 11, 6, 4, 0x0f-11, },
86#else 47#else
87 { 14, 0, 8, 0x0f-14 ,BCR_ILCRA}, 48 { 14, 0, 8, 0x0f-14, },
88 { 12, 0, 4, 0x0f-12 ,BCR_ILCRA}, 49 { 12, 0, 4, 0x0f-12, },
89 { 8, 0, 4, 0x0f- 8 ,BCR_ILCRB}, 50 { 8, 1, 4, 0x0f- 8, },
90 { 6, 0, 12, 0x0f- 6 ,BCR_ILCRC}, 51 { 6, 2, 12, 0x0f- 6, },
91 { 5, 0, 8, 0x0f- 5 ,BCR_ILCRC}, 52 { 5, 2, 8, 0x0f- 5, },
92 { 4, 0, 4, 0x0f- 4 ,BCR_ILCRC}, 53 { 4, 2, 4, 0x0f- 4, },
93 { 3, 0, 0, 0x0f- 3 ,BCR_ILCRC}, 54 { 3, 2, 0, 0x0f- 3, },
94 { 1, 0, 12, 0x0f- 1 ,BCR_ILCRD}, 55 { 1, 3, 12, 0x0f- 1, },
95#if defined(CONFIG_STNIC) 56#if defined(CONFIG_STNIC)
96 /* ST NIC */ 57 /* ST NIC */
97 { 10, 0, 4, 0x0f-10 ,BCR_ILCRD}, /* LAN */ 58 { 10, 3, 4, 0x0f-10, }, /* LAN */
98#endif 59#endif
99 /* MRSHPC IRQs setting */ 60 /* MRSHPC IRQs setting */
100 { 0, 0, 12, 0x0f- 0 ,BCR_ILCRE}, /* PCIRQ3 */ 61 { 0, 4, 12, 0x0f- 0, }, /* PCIRQ3 */
101 { 11, 0, 8, 0x0f-11 ,BCR_ILCRE}, /* PCIRQ2 */ 62 { 11, 4, 8, 0x0f-11, }, /* PCIRQ2 */
102 { 9, 0, 4, 0x0f- 9 ,BCR_ILCRE}, /* PCIRQ1 */ 63 { 9, 4, 4, 0x0f- 9, }, /* PCIRQ1 */
103 { 7, 0, 0, 0x0f- 7 ,BCR_ILCRE}, /* PCIRQ0 */ 64 { 7, 4, 0, 0x0f- 7, }, /* PCIRQ0 */
104 /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */ 65 /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */
105 /* NOTE: #2 and #13 are not used on PC */ 66 /* NOTE: #2 and #13 are not used on PC */
106 { 13, 0, 4, 0x0f-13 ,BCR_ILCRG}, /* SLOTIRQ2 */ 67 { 13, 6, 4, 0x0f-13, }, /* SLOTIRQ2 */
107 { 2, 0, 0, 0x0f- 2 ,BCR_ILCRG}, /* SLOTIRQ1 */ 68 { 2, 6, 0, 0x0f- 2, }, /* SLOTIRQ1 */
108#endif 69#endif
109}; 70};
110 71
72static unsigned long ipr_offsets[] = {
73 BCR_ILCRA,
74 BCR_ILCRB,
75 BCR_ILCRC,
76 BCR_ILCRD,
77 BCR_ILCRE,
78 BCR_ILCRF,
79 BCR_ILCRG,
80};
81
82static struct ipr_desc ipr_irq_desc = {
83 .ipr_offsets = ipr_offsets,
84 .nr_offsets = ARRAY_SIZE(ipr_offsets),
85
86 .ipr_data = ipr_irq_table,
87 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
88 .chip = {
89 .name = "IPR-se770x",
90 },
91};
92
111/* 93/*
112 * Initialize IRQ setting 94 * Initialize IRQ setting
113 */ 95 */
@@ -122,5 +104,5 @@ void __init init_se_IRQ(void)
122 ctrl_outw(0, BCR_ILCRF); 104 ctrl_outw(0, BCR_ILCRF);
123 ctrl_outw(0, BCR_ILCRG); 105 ctrl_outw(0, BCR_ILCRG);
124 106
125 make_se770x_irq(se770x_ipr_map, ARRAY_SIZE(se770x_ipr_map)); 107 register_ipr_controller(&ipr_irq_desc);
126} 108}
diff --git a/arch/sh/boards/se/770x/setup.c b/arch/sh/boards/se/770x/setup.c
index 17a2631de3ba..2962da148f3f 100644
--- a/arch/sh/boards/se/770x/setup.c
+++ b/arch/sh/boards/se/770x/setup.c
@@ -122,7 +122,7 @@ device_initcall(se_devices_setup);
122/* 122/*
123 * The Machine Vector 123 * The Machine Vector
124 */ 124 */
125struct sh_machine_vector mv_se __initmv = { 125static struct sh_machine_vector mv_se __initmv = {
126 .mv_name = "SolutionEngine", 126 .mv_name = "SolutionEngine",
127 .mv_setup = smsc_setup, 127 .mv_setup = smsc_setup,
128#if defined(CONFIG_CPU_SH4) 128#if defined(CONFIG_CPU_SH4)
@@ -160,4 +160,3 @@ struct sh_machine_vector mv_se __initmv = {
160 160
161 .mv_init_irq = init_se_IRQ, 161 .mv_init_irq = init_se_IRQ,
162}; 162};
163ALIAS_MV(se)
diff --git a/arch/sh/boards/se/7722/irq.c b/arch/sh/boards/se/7722/irq.c
index 099e5deb77f8..0b03f3f610b8 100644
--- a/arch/sh/boards/se/7722/irq.c
+++ b/arch/sh/boards/se/7722/irq.c
@@ -16,86 +16,61 @@
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/se7722.h> 17#include <asm/se7722.h>
18 18
19#define INTC_INTMSK0 0xFFD00044
20#define INTC_INTMSKCLR0 0xFFD00064
21
22static void disable_se7722_irq(unsigned int irq) 19static void disable_se7722_irq(unsigned int irq)
23{ 20{
24 struct ipr_data *p = get_irq_chip_data(irq); 21 unsigned int bit = irq - SE7722_FPGA_IRQ_BASE;
25 ctrl_outw( ctrl_inw( p->addr ) | p->priority , p->addr ); 22 ctrl_outw(ctrl_inw(IRQ01_MASK) | 1 << bit, IRQ01_MASK);
26} 23}
27 24
28static void enable_se7722_irq(unsigned int irq) 25static void enable_se7722_irq(unsigned int irq)
29{ 26{
30 struct ipr_data *p = get_irq_chip_data(irq); 27 unsigned int bit = irq - SE7722_FPGA_IRQ_BASE;
31 ctrl_outw( ctrl_inw( p->addr ) & ~p->priority , p->addr ); 28 ctrl_outw(ctrl_inw(IRQ01_MASK) & ~(1 << bit), IRQ01_MASK);
32} 29}
33 30
34static struct irq_chip se7722_irq_chip __read_mostly = { 31static struct irq_chip se7722_irq_chip __read_mostly = {
35 .name = "SE7722", 32 .name = "SE7722-FPGA",
36 .mask = disable_se7722_irq, 33 .mask = disable_se7722_irq,
37 .unmask = enable_se7722_irq, 34 .unmask = enable_se7722_irq,
38 .mask_ack = disable_se7722_irq, 35 .mask_ack = disable_se7722_irq,
39}; 36};
40 37
41static struct ipr_data ipr_irq_table[] = { 38static void se7722_irq_demux(unsigned int irq, struct irq_desc *desc)
42 /* irq ,idx,sft, priority , addr */
43 { MRSHPC_IRQ0 , 0 , 0 , MRSHPC_BIT0 , IRQ01_MASK } ,
44 { MRSHPC_IRQ1 , 0 , 0 , MRSHPC_BIT1 , IRQ01_MASK } ,
45 { MRSHPC_IRQ2 , 0 , 0 , MRSHPC_BIT2 , IRQ01_MASK } ,
46 { MRSHPC_IRQ3 , 0 , 0 , MRSHPC_BIT3 , IRQ01_MASK } ,
47 { SMC_IRQ , 0 , 0 , SMC_BIT , IRQ01_MASK } ,
48 { EXT_IRQ , 0 , 0 , EXT_BIT , IRQ01_MASK } ,
49};
50
51int se7722_irq_demux(int irq)
52{ 39{
40 unsigned short intv = ctrl_inw(IRQ01_STS);
41 struct irq_desc *ext_desc;
42 unsigned int ext_irq = SE7722_FPGA_IRQ_BASE;
53 43
54 if ((irq == IRQ0_IRQ)||(irq == IRQ1_IRQ)) { 44 intv &= (1 << SE7722_FPGA_IRQ_NR) - 1;
55 volatile unsigned short intv = 45
56 *(volatile unsigned short *)IRQ01_STS; 46 while (intv) {
57 if (irq == IRQ0_IRQ){ 47 if (intv & 1) {
58 if(intv & SMC_BIT ) { 48 ext_desc = irq_desc + ext_irq;
59 return SMC_IRQ; 49 handle_level_irq(ext_irq, ext_desc);
60 } else if(intv & USB_BIT) {
61 return USB_IRQ;
62 } else {
63 printk("intv =%04x\n", intv);
64 return SMC_IRQ;
65 }
66 } else if(irq == IRQ1_IRQ){
67 if(intv & MRSHPC_BIT0) {
68 return MRSHPC_IRQ0;
69 } else if(intv & MRSHPC_BIT1) {
70 return MRSHPC_IRQ1;
71 } else if(intv & MRSHPC_BIT2) {
72 return MRSHPC_IRQ2;
73 } else if(intv & MRSHPC_BIT3) {
74 return MRSHPC_IRQ3;
75 } else {
76 printk("BIT_EXTENTION =%04x\n", intv);
77 return EXT_IRQ;
78 }
79 } 50 }
51 intv >>= 1;
52 ext_irq++;
80 } 53 }
81 return irq;
82
83} 54}
55
84/* 56/*
85 * Initialize IRQ setting 57 * Initialize IRQ setting
86 */ 58 */
87void __init init_se7722_IRQ(void) 59void __init init_se7722_IRQ(void)
88{ 60{
89 int i = 0; 61 int i;
62
63 ctrl_outw(0, IRQ01_MASK); /* disable all irqs */
90 ctrl_outw(0x2000, 0xb03fffec); /* mrshpc irq enable */ 64 ctrl_outw(0x2000, 0xb03fffec); /* mrshpc irq enable */
91 ctrl_outl((3 << ((7 - 0) * 4))|(3 << ((7 - 1) * 4)), INTC_INTPRI0); /* irq0 pri=3,irq1,pri=3 */
92 ctrl_outw((2 << ((7 - 0) * 2))|(2 << ((7 - 1) * 2)), INTC_ICR1); /* irq0,1 low-level irq */
93 65
94 for (i = 0; i < ARRAY_SIZE(ipr_irq_table); i++) { 66 for (i = 0; i < SE7722_FPGA_IRQ_NR; i++)
95 disable_irq_nosync(ipr_irq_table[i].irq); 67 set_irq_chip_and_handler_name(SE7722_FPGA_IRQ_BASE + i,
96 set_irq_chip_and_handler_name( ipr_irq_table[i].irq, &se7722_irq_chip, 68 &se7722_irq_chip,
97 handle_level_irq, "level"); 69 handle_level_irq, "level");
98 set_irq_chip_data( ipr_irq_table[i].irq, &ipr_irq_table[i] ); 70
99 disable_se7722_irq(ipr_irq_table[i].irq); 71 set_irq_chained_handler(IRQ0_IRQ, se7722_irq_demux);
100 } 72 set_irq_type(IRQ0_IRQ, IRQ_TYPE_LEVEL_LOW);
73
74 set_irq_chained_handler(IRQ1_IRQ, se7722_irq_demux);
75 set_irq_type(IRQ1_IRQ, IRQ_TYPE_LEVEL_LOW);
101} 76}
diff --git a/arch/sh/boards/se/7722/setup.c b/arch/sh/boards/se/7722/setup.c
index 636ca6c987e0..495fc7e2b60f 100644
--- a/arch/sh/boards/se/7722/setup.c
+++ b/arch/sh/boards/se/7722/setup.c
@@ -77,6 +77,7 @@ static struct resource cf_ide_resources[] = {
77 }, 77 },
78 [2] = { 78 [2] = {
79 .start = MRSHPC_IRQ0, 79 .start = MRSHPC_IRQ0,
80 .end = MRSHPC_IRQ0,
80 .flags = IORESOURCE_IRQ, 81 .flags = IORESOURCE_IRQ,
81 }, 82 },
82}; 83};
@@ -137,12 +138,9 @@ static void __init se7722_setup(char **cmdline_p)
137/* 138/*
138 * The Machine Vector 139 * The Machine Vector
139 */ 140 */
140struct sh_machine_vector mv_se7722 __initmv = { 141static struct sh_machine_vector mv_se7722 __initmv = {
141 .mv_name = "Solution Engine 7722" , 142 .mv_name = "Solution Engine 7722" ,
142 .mv_setup = se7722_setup , 143 .mv_setup = se7722_setup ,
143 .mv_nr_irqs = 109 , 144 .mv_nr_irqs = SE7722_FPGA_IRQ_BASE + SE7722_FPGA_IRQ_NR,
144 .mv_init_irq = init_se7722_IRQ, 145 .mv_init_irq = init_se7722_IRQ,
145 .mv_irq_demux = se7722_irq_demux,
146
147}; 146};
148ALIAS_MV(se7722)
diff --git a/arch/sh/boards/se/7751/irq.c b/arch/sh/boards/se/7751/irq.c
index e4c63a48296c..c3d12590e5db 100644
--- a/arch/sh/boards/se/7751/irq.c
+++ b/arch/sh/boards/se/7751/irq.c
@@ -14,44 +14,31 @@
14#include <asm/irq.h> 14#include <asm/irq.h>
15#include <asm/se7751.h> 15#include <asm/se7751.h>
16 16
17static struct ipr_data se7751_ipr_map[] = { 17static struct ipr_data ipr_irq_table[] = {
18 /* Leave old Solution Engine code in for reference. */ 18 { 13, 3, 3, 2 },
19#if defined(CONFIG_SH_SOLUTION_ENGINE) 19 /* Add additional entries here as drivers are added and tested. */
20 /* 20};
21 * Super I/O (Just mimic PC):
22 * 1: keyboard
23 * 3: serial 0
24 * 4: serial 1
25 * 5: printer
26 * 6: floppy
27 * 8: rtc
28 * 12: mouse
29 * 14: ide0
30 */
31 { 14, BCR_ILCRA, 2, 0x0f-14 },
32 { 12, BCR_ILCRA, 1, 0x0f-12 },
33 { 8, BCR_ILCRB, 1, 0x0f- 8 },
34 { 6, BCR_ILCRC, 3, 0x0f- 6 },
35 { 5, BCR_ILCRC, 2, 0x0f- 5 },
36 { 4, BCR_ILCRC, 1, 0x0f- 4 },
37 { 3, BCR_ILCRC, 0, 0x0f- 3 },
38 { 1, BCR_ILCRD, 3, 0x0f- 1 },
39 21
40 { 10, BCR_ILCRD, 1, 0x0f-10 }, /* LAN */ 22static unsigned long ipr_offsets[] = {
23 BCR_ILCRA,
24 BCR_ILCRB,
25 BCR_ILCRC,
26 BCR_ILCRD,
27 BCR_ILCRE,
28 BCR_ILCRF,
29 BCR_ILCRG,
30};
41 31
42 { 0, BCR_ILCRE, 3, 0x0f- 0 }, /* PCIRQ3 */ 32static struct ipr_desc ipr_irq_desc = {
43 { 11, BCR_ILCRE, 2, 0x0f-11 }, /* PCIRQ2 */ 33 .ipr_offsets = ipr_offsets,
44 { 9, BCR_ILCRE, 1, 0x0f- 9 }, /* PCIRQ1 */ 34 .nr_offsets = ARRAY_SIZE(ipr_offsets),
45 { 7, BCR_ILCRE, 0, 0x0f- 7 }, /* PCIRQ0 */
46 35
47 /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */ 36 .ipr_data = ipr_irq_table,
48 /* NOTE: #2 and #13 are not used on PC */ 37 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
49 { 13, BCR_ILCRG, 1, 0x0f-13 }, /* SLOTIRQ2 */ 38
50 { 2, BCR_ILCRG, 0, 0x0f- 2 }, /* SLOTIRQ1 */ 39 .chip = {
51#elif defined(CONFIG_SH_7751_SOLUTION_ENGINE) 40 .name = "IPR-se7751",
52 { 13, BCR_ILCRD, 3, 2 }, 41 },
53 /* Add additional entries here as drivers are added and tested. */
54#endif
55}; 42};
56 43
57/* 44/*
@@ -59,5 +46,5 @@ static struct ipr_data se7751_ipr_map[] = {
59 */ 46 */
60void __init init_7751se_IRQ(void) 47void __init init_7751se_IRQ(void)
61{ 48{
62 make_ipr_irq(se7751_ipr_map, ARRAY_SIZE(se7751_ipr_map)); 49 register_ipr_controller(&ipr_irq_desc);
63} 50}
diff --git a/arch/sh/boards/se/7751/setup.c b/arch/sh/boards/se/7751/setup.c
index 52c7bfa57c2c..7873d07e40c1 100644
--- a/arch/sh/boards/se/7751/setup.c
+++ b/arch/sh/boards/se/7751/setup.c
@@ -48,7 +48,7 @@ __initcall(se7751_devices_setup);
48/* 48/*
49 * The Machine Vector 49 * The Machine Vector
50 */ 50 */
51struct sh_machine_vector mv_7751se __initmv = { 51static struct sh_machine_vector mv_7751se __initmv = {
52 .mv_name = "7751 SolutionEngine", 52 .mv_name = "7751 SolutionEngine",
53 .mv_nr_irqs = 72, 53 .mv_nr_irqs = 72,
54 54
@@ -71,4 +71,3 @@ struct sh_machine_vector mv_7751se __initmv = {
71 71
72 .mv_init_irq = init_7751se_IRQ, 72 .mv_init_irq = init_7751se_IRQ,
73}; 73};
74ALIAS_MV(7751se)
diff --git a/arch/sh/boards/se/7780/irq.c b/arch/sh/boards/se/7780/irq.c
index 3d0625c2d07b..874914746009 100644
--- a/arch/sh/boards/se/7780/irq.c
+++ b/arch/sh/boards/se/7780/irq.c
@@ -16,28 +16,6 @@
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/se7780.h> 17#include <asm/se7780.h>
18 18
19#define INTC_INTMSK0 0xFFD00044
20#define INTC_INTMSKCLR0 0xFFD00064
21
22static void disable_se7780_irq(unsigned int irq)
23{
24 struct intc2_data *p = get_irq_chip_data(irq);
25 ctrl_outl(1 << p->msk_shift, INTC_INTMSK0 + p->msk_offset);
26}
27
28static void enable_se7780_irq(unsigned int irq)
29{
30 struct intc2_data *p = get_irq_chip_data(irq);
31 ctrl_outl(1 << p->msk_shift, INTC_INTMSKCLR0 + p->msk_offset);
32}
33
34static struct irq_chip se7780_irq_chip __read_mostly = {
35 .name = "SE7780",
36 .mask = disable_se7780_irq,
37 .unmask = enable_se7780_irq,
38 .mask_ack = disable_se7780_irq,
39};
40
41static struct intc2_data intc2_irq_table[] = { 19static struct intc2_data intc2_irq_table[] = {
42 { 2, 0, 31, 0, 31, 3 }, /* daughter board EXTINT1 */ 20 { 2, 0, 31, 0, 31, 3 }, /* daughter board EXTINT1 */
43 { 4, 0, 30, 0, 30, 3 }, /* daughter board EXTINT2 */ 21 { 4, 0, 30, 0, 30, 3 }, /* daughter board EXTINT2 */
@@ -51,13 +29,24 @@ static struct intc2_data intc2_irq_table[] = {
51 { 0 , 0, 24, 0, 24, 3 }, /* SM501 */ 29 { 0 , 0, 24, 0, 24, 3 }, /* SM501 */
52}; 30};
53 31
32static struct intc2_desc intc2_irq_desc __read_mostly = {
33 .prio_base = 0, /* N/A */
34 .msk_base = 0xffd00044,
35 .mskclr_base = 0xffd00064,
36
37 .intc2_data = intc2_irq_table,
38 .nr_irqs = ARRAY_SIZE(intc2_irq_table),
39
40 .chip = {
41 .name = "INTC2-se7780",
42 },
43};
44
54/* 45/*
55 * Initialize IRQ setting 46 * Initialize IRQ setting
56 */ 47 */
57void __init init_se7780_IRQ(void) 48void __init init_se7780_IRQ(void)
58{ 49{
59 int i ;
60
61 /* enable all interrupt at FPGA */ 50 /* enable all interrupt at FPGA */
62 ctrl_outw(0, FPGA_INTMSK1); 51 ctrl_outw(0, FPGA_INTMSK1);
63 /* mask SM501 interrupt */ 52 /* mask SM501 interrupt */
@@ -79,11 +68,5 @@ void __init init_se7780_IRQ(void)
79 /* FPGA + 0x0A */ 68 /* FPGA + 0x0A */
80 ctrl_outw((IRQPIN_PCCPW << IRQPOS_PCCPW), FPGA_INTSEL3); 69 ctrl_outw((IRQPIN_PCCPW << IRQPOS_PCCPW), FPGA_INTSEL3);
81 70
82 for (i = 0; i < ARRAY_SIZE(intc2_irq_table); i++) { 71 register_intc2_controller(&intc2_irq_desc);
83 disable_irq_nosync(intc2_irq_table[i].irq);
84 set_irq_chip_and_handler_name( intc2_irq_table[i].irq, &se7780_irq_chip,
85 handle_level_irq, "level");
86 set_irq_chip_data( intc2_irq_table[i].irq, &intc2_irq_table[i] );
87 disable_se7780_irq(intc2_irq_table[i].irq);
88 }
89} 72}
diff --git a/arch/sh/boards/se/7780/setup.c b/arch/sh/boards/se/7780/setup.c
index df7d08a24c9f..723f2fd4d55b 100644
--- a/arch/sh/boards/se/7780/setup.c
+++ b/arch/sh/boards/se/7780/setup.c
@@ -113,10 +113,9 @@ static void __init se7780_setup(char **cmdline_p)
113/* 113/*
114 * The Machine Vector 114 * The Machine Vector
115 */ 115 */
116struct sh_machine_vector mv_se7780 __initmv = { 116static struct sh_machine_vector mv_se7780 __initmv = {
117 .mv_name = "Solution Engine 7780" , 117 .mv_name = "Solution Engine 7780" ,
118 .mv_setup = se7780_setup , 118 .mv_setup = se7780_setup ,
119 .mv_nr_irqs = 111 , 119 .mv_nr_irqs = 111 ,
120 .mv_init_irq = init_se7780_IRQ, 120 .mv_init_irq = init_se7780_IRQ,
121}; 121};
122ALIAS_MV(se7780)
diff --git a/arch/sh/boards/sh03/setup.c b/arch/sh/boards/sh03/setup.c
index c069c444b4ec..9c031a8c0a1c 100644
--- a/arch/sh/boards/sh03/setup.c
+++ b/arch/sh/boards/sh03/setup.c
@@ -15,17 +15,33 @@
15#include <asm/sh03/sh03.h> 15#include <asm/sh03/sh03.h>
16#include <asm/addrspace.h> 16#include <asm/addrspace.h>
17 17
18static struct ipr_data sh03_ipr_map[] = { 18static struct ipr_data ipr_irq_table[] = {
19 { IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY }, 19 { IRL0_IRQ, 0, IRL0_IPR_POS, IRL0_PRIORITY },
20 { IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY }, 20 { IRL1_IRQ, 0, IRL1_IPR_POS, IRL1_PRIORITY },
21 { IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY }, 21 { IRL2_IRQ, 0, IRL2_IPR_POS, IRL2_PRIORITY },
22 { IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY }, 22 { IRL3_IRQ, 0, IRL3_IPR_POS, IRL3_PRIORITY },
23};
24
25static unsigned long ipr_offsets[] = {
26 INTC_IPRD,
27};
28
29static struct ipr_desc ipr_irq_desc = {
30 .ipr_offsets = ipr_offsets,
31 .nr_offsets = ARRAY_SIZE(ipr_offsets),
32
33 .ipr_data = ipr_irq_table,
34 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
35
36 .chip = {
37 .name = "IPR-sh03",
38 },
23}; 39};
24 40
25static void __init init_sh03_IRQ(void) 41static void __init init_sh03_IRQ(void)
26{ 42{
27 ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); 43 ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR);
28 make_ipr_irq(sh03_ipr_map, ARRAY_SIZE(sh03_ipr_map)); 44 register_ipr_controller(&ipr_irq_desc);
29} 45}
30 46
31extern void *cf_io_base; 47extern void *cf_io_base;
@@ -74,11 +90,10 @@ static int __init sh03_devices_setup(void)
74} 90}
75__initcall(sh03_devices_setup); 91__initcall(sh03_devices_setup);
76 92
77struct sh_machine_vector mv_sh03 __initmv = { 93static struct sh_machine_vector mv_sh03 __initmv = {
78 .mv_name = "Interface (CTP/PCI-SH03)", 94 .mv_name = "Interface (CTP/PCI-SH03)",
79 .mv_setup = sh03_setup, 95 .mv_setup = sh03_setup,
80 .mv_nr_irqs = 48, 96 .mv_nr_irqs = 48,
81 .mv_ioport_map = sh03_ioport_map, 97 .mv_ioport_map = sh03_ioport_map,
82 .mv_init_irq = init_sh03_IRQ, 98 .mv_init_irq = init_sh03_IRQ,
83}; 99};
84ALIAS_MV(sh03)
diff --git a/arch/sh/boards/shmin/setup.c b/arch/sh/boards/shmin/setup.c
index 4a9df4a6b034..dfd124509f42 100644
--- a/arch/sh/boards/shmin/setup.c
+++ b/arch/sh/boards/shmin/setup.c
@@ -6,28 +6,44 @@
6 * SHMIN Support. 6 * SHMIN Support.
7 */ 7 */
8#include <linux/init.h> 8#include <linux/init.h>
9#include <linux/irq.h>
9#include <asm/machvec.h> 10#include <asm/machvec.h>
10#include <asm/shmin.h> 11#include <asm/shmin.h>
11#include <asm/clock.h> 12#include <asm/clock.h>
12#include <asm/irq.h>
13#include <asm/io.h> 13#include <asm/io.h>
14 14
15#define PFC_PHCR 0xa400010eUL 15#define PFC_PHCR 0xa400010eUL
16#define INTC_ICR1 0xa4000010UL 16#define INTC_ICR1 0xa4000010UL
17#define INTC_IPRC 0xa4000016UL 17#define INTC_IPRC 0xa4000016UL
18 18
19static struct ipr_data shmin_ipr_map[] = { 19static struct ipr_data ipr_irq_table[] = {
20 { .irq=32, .addr=INTC_IPRC, .shift= 0, .priority=0 }, 20 { 32, 0, 0, 0 },
21 { .irq=33, .addr=INTC_IPRC, .shift= 4, .priority=0 }, 21 { 33, 0, 4, 0 },
22 { .irq=34, .addr=INTC_IPRC, .shift= 8, .priority=8 }, 22 { 34, 0, 8, 8 },
23 { .irq=35, .addr=INTC_IPRC, .shift=12, .priority=0 }, 23 { 35, 0, 12, 0 },
24};
25
26static unsigned long ipr_offsets[] = {
27 INTC_IPRC,
28};
29
30static struct ipr_desc ipr_irq_desc = {
31 .ipr_offsets = ipr_offsets,
32 .nr_offsets = ARRAY_SIZE(ipr_offsets),
33
34 .ipr_data = ipr_irq_table,
35 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
36
37 .chip = {
38 .name = "IPR-shmin",
39 },
24}; 40};
25 41
26static void __init init_shmin_irq(void) 42static void __init init_shmin_irq(void)
27{ 43{
28 ctrl_outw(0x2a00, PFC_PHCR); // IRQ0-3=IRQ 44 ctrl_outw(0x2a00, PFC_PHCR); // IRQ0-3=IRQ
29 ctrl_outw(0x0aaa, INTC_ICR1); // IRQ0-3=IRQ-mode,Low-active. 45 ctrl_outw(0x0aaa, INTC_ICR1); // IRQ0-3=IRQ-mode,Low-active.
30 make_ipr_irq(shmin_ipr_map, ARRAY_SIZE(shmin_ipr_map)); 46 register_ipr_controller(&ipr_irq_desc);
31} 47}
32 48
33static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size) 49static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size)
@@ -43,9 +59,8 @@ static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size)
43 59
44} 60}
45 61
46struct sh_machine_vector mv_shmin __initmv = { 62static struct sh_machine_vector mv_shmin __initmv = {
47 .mv_name = "SHMIN", 63 .mv_name = "SHMIN",
48 .mv_init_irq = init_shmin_irq, 64 .mv_init_irq = init_shmin_irq,
49 .mv_ioport_map = shmin_ioport_map, 65 .mv_ioport_map = shmin_ioport_map,
50}; 66};
51ALIAS_MV(shmin)
diff --git a/arch/sh/boards/snapgear/setup.c b/arch/sh/boards/snapgear/setup.c
index 650fb3645947..84271d85a8dd 100644
--- a/arch/sh/boards/snapgear/setup.c
+++ b/arch/sh/boards/snapgear/setup.c
@@ -68,11 +68,27 @@ module_init(eraseconfig_init);
68 * IRL3 = crypto 68 * IRL3 = crypto
69 */ 69 */
70 70
71static struct ipr_data snapgear_ipr_map[] = { 71static struct ipr_data ipr_irq_table[] = {
72 make_ipr_irq(IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY); 72 { IRL0_IRQ, 0, IRL0_IPR_POS, IRL0_PRIORITY },
73 make_ipr_irq(IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY); 73 { IRL1_IRQ, 0, IRL1_IPR_POS, IRL1_PRIORITY },
74 make_ipr_irq(IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY); 74 { IRL2_IRQ, 0, IRL2_IPR_POS, IRL2_PRIORITY },
75 make_ipr_irq(IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY); 75 { IRL3_IRQ, 0, IRL3_IPR_POS, IRL3_PRIORITY },
76};
77
78static unsigned long ipr_offsets[] = {
79 INTC_IPRD,
80};
81
82static struct ipr_desc ipr_irq_desc = {
83 .ipr_offsets = ipr_offsets,
84 .nr_offsets = ARRAY_SIZE(ipr_offsets),
85
86 .ipr_data = ipr_irq_table,
87 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
88
89 .chip = {
90 .name = "IPR-snapgear",
91 },
76}; 92};
77 93
78static void __init init_snapgear_IRQ(void) 94static void __init init_snapgear_IRQ(void)
@@ -82,7 +98,7 @@ static void __init init_snapgear_IRQ(void)
82 98
83 printk("Setup SnapGear IRQ/IPR ...\n"); 99 printk("Setup SnapGear IRQ/IPR ...\n");
84 100
85 make_ipr_irq(snapgear_ipr_map, ARRAY_SIZE(snapgear_ipr_map)); 101 register_ipr_controller(&ipr_irq_desc);
86} 102}
87 103
88/* 104/*
@@ -96,7 +112,7 @@ static void __init snapgear_setup(char **cmdline_p)
96/* 112/*
97 * The Machine Vector 113 * The Machine Vector
98 */ 114 */
99struct sh_machine_vector mv_snapgear __initmv = { 115static struct sh_machine_vector mv_snapgear __initmv = {
100 .mv_name = "SnapGear SecureEdge5410", 116 .mv_name = "SnapGear SecureEdge5410",
101 .mv_setup = snapgear_setup, 117 .mv_setup = snapgear_setup,
102 .mv_nr_irqs = 72, 118 .mv_nr_irqs = 72,
@@ -117,4 +133,3 @@ struct sh_machine_vector mv_snapgear __initmv = {
117 133
118 .mv_init_irq = init_snapgear_IRQ, 134 .mv_init_irq = init_snapgear_IRQ,
119}; 135};
120ALIAS_MV(snapgear)
diff --git a/arch/sh/boards/superh/microdev/irq.c b/arch/sh/boards/superh/microdev/irq.c
index cc1cb04fa618..4d335077a3ff 100644
--- a/arch/sh/boards/superh/microdev/irq.c
+++ b/arch/sh/boards/superh/microdev/irq.c
@@ -11,6 +11,7 @@
11 11
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/interrupt.h>
14#include <asm/system.h> 15#include <asm/system.h>
15#include <asm/io.h> 16#include <asm/io.h>
16#include <asm/microdev.h> 17#include <asm/microdev.h>
diff --git a/arch/sh/boards/superh/microdev/setup.c b/arch/sh/boards/superh/microdev/setup.c
index 6396cea1c896..fc8cd06d66cf 100644
--- a/arch/sh/boards/superh/microdev/setup.c
+++ b/arch/sh/boards/superh/microdev/setup.c
@@ -371,7 +371,7 @@ static void __init microdev_setup(char **cmdline_p)
371/* 371/*
372 * The Machine Vector 372 * The Machine Vector
373 */ 373 */
374struct sh_machine_vector mv_sh4202_microdev __initmv = { 374static struct sh_machine_vector mv_sh4202_microdev __initmv = {
375 .mv_name = "SH4-202 MicroDev", 375 .mv_name = "SH4-202 MicroDev",
376 .mv_setup = microdev_setup, 376 .mv_setup = microdev_setup,
377 .mv_nr_irqs = 72, /* QQQ need to check this - use the MACRO */ 377 .mv_nr_irqs = 72, /* QQQ need to check this - use the MACRO */
@@ -403,4 +403,3 @@ struct sh_machine_vector mv_sh4202_microdev __initmv = {
403 .mv_heartbeat = microdev_heartbeat, 403 .mv_heartbeat = microdev_heartbeat,
404#endif 404#endif
405}; 405};
406ALIAS_MV(sh4202_microdev)
diff --git a/arch/sh/boards/titan/setup.c b/arch/sh/boards/titan/setup.c
index 6bcd939bfaed..606d25a4b870 100644
--- a/arch/sh/boards/titan/setup.c
+++ b/arch/sh/boards/titan/setup.c
@@ -12,7 +12,7 @@
12#include <asm/titan.h> 12#include <asm/titan.h>
13#include <asm/io.h> 13#include <asm/io.h>
14 14
15static struct ipr_data titan_ipr_map[] = { 15static struct ipr_data ipr_irq_table[] = {
16 /* IRQ, IPR idx, shift, prio */ 16 /* IRQ, IPR idx, shift, prio */
17 { TITAN_IRQ_WAN, 3, 12, 8 }, /* eth0 (WAN) */ 17 { TITAN_IRQ_WAN, 3, 12, 8 }, /* eth0 (WAN) */
18 { TITAN_IRQ_LAN, 3, 8, 8 }, /* eth1 (LAN) */ 18 { TITAN_IRQ_LAN, 3, 8, 8 }, /* eth1 (LAN) */
@@ -20,15 +20,33 @@ static struct ipr_data titan_ipr_map[] = {
20 { TITAN_IRQ_USB, 3, 0, 8 }, /* mPCI B (bottom), USB */ 20 { TITAN_IRQ_USB, 3, 0, 8 }, /* mPCI B (bottom), USB */
21}; 21};
22 22
23static unsigned long ipr_offsets[] = { /* stolen from setup-sh7750.c */
24 0xffd00004UL, /* 0: IPRA */
25 0xffd00008UL, /* 1: IPRB */
26 0xffd0000cUL, /* 2: IPRC */
27 0xffd00010UL, /* 3: IPRD */
28};
29
30static struct ipr_desc ipr_irq_desc = {
31 .ipr_offsets = ipr_offsets,
32 .nr_offsets = ARRAY_SIZE(ipr_offsets),
33
34 .ipr_data = ipr_irq_table,
35 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
36
37 .chip = {
38 .name = "IPR-titan",
39 },
40};
23static void __init init_titan_irq(void) 41static void __init init_titan_irq(void)
24{ 42{
25 /* enable individual interrupt mode for externals */ 43 /* enable individual interrupt mode for externals */
26 ipr_irq_enable_irlm(); 44 ipr_irq_enable_irlm();
27 /* register ipr irqs */ 45 /* register ipr irqs */
28 make_ipr_irq(titan_ipr_map, ARRAY_SIZE(titan_ipr_map)); 46 register_ipr_controller(&ipr_irq_desc);
29} 47}
30 48
31struct sh_machine_vector mv_titan __initmv = { 49static struct sh_machine_vector mv_titan __initmv = {
32 .mv_name = "Titan", 50 .mv_name = "Titan",
33 51
34 .mv_inb = titan_inb, 52 .mv_inb = titan_inb,
@@ -52,4 +70,3 @@ struct sh_machine_vector mv_titan __initmv = {
52 70
53 .mv_init_irq = init_titan_irq, 71 .mv_init_irq = init_titan_irq,
54}; 72};
55ALIAS_MV(titan)
diff --git a/arch/sh/boards/unknown/Makefile b/arch/sh/boards/unknown/Makefile
deleted file mode 100644
index 7d18f408b0c5..000000000000
--- a/arch/sh/boards/unknown/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
1#
2# Makefile for unknown SH boards
3#
4
5obj-y := setup.o
6
diff --git a/arch/sh/boards/unknown/setup.c b/arch/sh/boards/unknown/setup.c
deleted file mode 100644
index bee4612de59b..000000000000
--- a/arch/sh/boards/unknown/setup.c
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * linux/arch/sh/boards/unknown/setup.c
3 *
4 * Copyright (C) 2002 Paul Mundt
5 *
6 * May be copied or modified under the terms of the GNU General Public
7 * License. See linux/COPYING for more information.
8 *
9 * Setup code for an unknown machine (internal peripherals only)
10 *
11 * This is the simplest of all boards, and serves only as a quick and dirty
12 * method to start debugging a new board during bring-up until proper board
13 * setup code is written.
14 */
15#include <linux/init.h>
16#include <asm/machvec.h>
17
18struct sh_machine_vector mv_unknown __initmv = {
19 .mv_name = "Unknown",
20};
21ALIAS_MV(unknown)
diff --git a/arch/sh/cchips/Kconfig b/arch/sh/cchips/Kconfig
index 0582ca8346b6..2e516e9a6ede 100644
--- a/arch/sh/cchips/Kconfig
+++ b/arch/sh/cchips/Kconfig
@@ -13,10 +13,8 @@ config VOYAGERGX
13 are additional GPIO bits that can be used to interface to 13 are additional GPIO bits that can be used to interface to
14 external as well. 14 external as well.
15 15
16# A board must have defined HD6446X_SERIES in order to see these
17config HD6446X_SERIES 16config HD6446X_SERIES
18 bool "HD6446x support" 17 bool
19 default n
20 18
21choice 19choice
22 prompt "HD6446x options" 20 prompt "HD6446x options"
@@ -25,7 +23,6 @@ choice
25 23
26config HD64461 24config HD64461
27 bool "Hitachi HD64461 companion chip support" 25 bool "Hitachi HD64461 companion chip support"
28 depends on CPU_SUBTYPE_SH7709
29 ---help--- 26 ---help---
30 The Hitachi HD64461 provides an interface for 27 The Hitachi HD64461 provides an interface for
31 the SH7709 CPU, supporting a LCD controller, 28 the SH7709 CPU, supporting a LCD controller,
@@ -40,7 +37,6 @@ config HD64461
40 37
41config HD64465 38config HD64465
42 bool "Hitachi HD64465 companion chip support" 39 bool "Hitachi HD64465 companion chip support"
43 depends on CPU_SUBTYPE_SH7750
44 ---help--- 40 ---help---
45 The Hitachi HD64465 provides an interface for 41 The Hitachi HD64465 provides an interface for
46 the SH7750 CPU, supporting a LCD controller, 42 the SH7750 CPU, supporting a LCD controller,
diff --git a/arch/sh/cchips/hd6446x/Makefile b/arch/sh/cchips/hd6446x/Makefile
new file mode 100644
index 000000000000..a106dd9db986
--- /dev/null
+++ b/arch/sh/cchips/hd6446x/Makefile
@@ -0,0 +1,2 @@
1obj-$(CONFIG_HD64461) += hd64461.o
2obj-$(CONFIG_HD64465) += hd64465/
diff --git a/arch/sh/cchips/hd6446x/hd64461/setup.c b/arch/sh/cchips/hd6446x/hd64461.c
index 4d49b5cbcc13..97f6512aa1b7 100644
--- a/arch/sh/cchips/hd6446x/hd64461/setup.c
+++ b/arch/sh/cchips/hd6446x/hd64461.c
@@ -1,5 +1,4 @@
1/* 1/*
2 * $Id: setup.c,v 1.5 2004/03/16 00:07:50 lethal Exp $
3 * Copyright (C) 2000 YAEGASHI Takeshi 2 * Copyright (C) 2000 YAEGASHI Takeshi
4 * Hitachi HD64461 companion chip support 3 * Hitachi HD64461 companion chip support
5 */ 4 */
diff --git a/arch/sh/cchips/hd6446x/hd64461/Makefile b/arch/sh/cchips/hd6446x/hd64461/Makefile
deleted file mode 100644
index bff4b92e388c..000000000000
--- a/arch/sh/cchips/hd6446x/hd64461/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
1#
2# Makefile for the HD64461
3#
4
5obj-y := setup.o io.o
6
diff --git a/arch/sh/cchips/hd6446x/hd64461/io.c b/arch/sh/cchips/hd6446x/hd64461/io.c
deleted file mode 100644
index 7909a1b7b512..000000000000
--- a/arch/sh/cchips/hd6446x/hd64461/io.c
+++ /dev/null
@@ -1,150 +0,0 @@
1/*
2 * Copyright (C) 2000 YAEGASHI Takeshi
3 * Typical I/O routines for HD64461 system.
4 */
5
6#include <asm/io.h>
7#include <asm/hd64461.h>
8
9#define MEM_BASE (CONFIG_HD64461_IOBASE - HD64461_STBCR)
10
11static __inline__ unsigned long PORT2ADDR(unsigned long port)
12{
13 /* 16550A: HD64461 internal */
14 if (0x3f8<=port && port<=0x3ff)
15 return CONFIG_HD64461_IOBASE + 0x8000 + ((port-0x3f8)<<1);
16 if (0x2f8<=port && port<=0x2ff)
17 return CONFIG_HD64461_IOBASE + 0x7000 + ((port-0x2f8)<<1);
18
19#ifdef CONFIG_HD64461_ENABLER
20 /* NE2000: HD64461 PCMCIA channel 0 (I/O) */
21 if (0x300<=port && port<=0x31f)
22 return 0xba000000 + port;
23
24 /* ide0: HD64461 PCMCIA channel 1 (memory) */
25 /* On HP690, CF in slot 1 is configured as a memory card
26 device. See CF+ and CompactFlash Specification for the
27 detail of CF's memory mapped addressing. */
28 if (0x1f0<=port && port<=0x1f7) return 0xb5000000 + port;
29 if (port == 0x3f6) return 0xb50001fe;
30 if (port == 0x3f7) return 0xb50001ff;
31
32 /* ide1 */
33 if (0x170<=port && port<=0x177) return 0xba000000 + port;
34 if (port == 0x376) return 0xba000376;
35 if (port == 0x377) return 0xba000377;
36#endif
37
38 /* ??? */
39 if (port < 0xf000) return 0xa0000000 + port;
40 /* PCMCIA channel 0, I/O (0xba000000) */
41 if (port < 0x10000) return 0xba000000 + port - 0xf000;
42
43 /* HD64461 internal devices (0xb0000000) */
44 if (port < 0x20000) return CONFIG_HD64461_IOBASE + port - 0x10000;
45
46 /* PCMCIA channel 0, I/O (0xba000000) */
47 if (port < 0x30000) return 0xba000000 + port - 0x20000;
48
49 /* PCMCIA channel 1, memory (0xb5000000) */
50 if (port < 0x40000) return 0xb5000000 + port - 0x30000;
51
52 /* Whole physical address space (0xa0000000) */
53 return 0xa0000000 + (port & 0x1fffffff);
54}
55
56unsigned char hd64461_inb(unsigned long port)
57{
58 return *(volatile unsigned char*)PORT2ADDR(port);
59}
60
61unsigned char hd64461_inb_p(unsigned long port)
62{
63 unsigned long v = *(volatile unsigned char*)PORT2ADDR(port);
64 ctrl_delay();
65 return v;
66}
67
68unsigned short hd64461_inw(unsigned long port)
69{
70 return *(volatile unsigned short*)PORT2ADDR(port);
71}
72
73unsigned int hd64461_inl(unsigned long port)
74{
75 return *(volatile unsigned long*)PORT2ADDR(port);
76}
77
78void hd64461_outb(unsigned char b, unsigned long port)
79{
80 *(volatile unsigned char*)PORT2ADDR(port) = b;
81}
82
83void hd64461_outb_p(unsigned char b, unsigned long port)
84{
85 *(volatile unsigned char*)PORT2ADDR(port) = b;
86 ctrl_delay();
87}
88
89void hd64461_outw(unsigned short b, unsigned long port)
90{
91 *(volatile unsigned short*)PORT2ADDR(port) = b;
92}
93
94void hd64461_outl(unsigned int b, unsigned long port)
95{
96 *(volatile unsigned long*)PORT2ADDR(port) = b;
97}
98
99void hd64461_insb(unsigned long port, void *buffer, unsigned long count)
100{
101 volatile unsigned char* addr=(volatile unsigned char*)PORT2ADDR(port);
102 unsigned char *buf=buffer;
103 while(count--) *buf++=*addr;
104}
105
106void hd64461_insw(unsigned long port, void *buffer, unsigned long count)
107{
108 volatile unsigned short* addr=(volatile unsigned short*)PORT2ADDR(port);
109 unsigned short *buf=buffer;
110 while(count--) *buf++=*addr;
111}
112
113void hd64461_insl(unsigned long port, void *buffer, unsigned long count)
114{
115 volatile unsigned long* addr=(volatile unsigned long*)PORT2ADDR(port);
116 unsigned long *buf=buffer;
117 while(count--) *buf++=*addr;
118}
119
120void hd64461_outsb(unsigned long port, const void *buffer, unsigned long count)
121{
122 volatile unsigned char* addr=(volatile unsigned char*)PORT2ADDR(port);
123 const unsigned char *buf=buffer;
124 while(count--) *addr=*buf++;
125}
126
127void hd64461_outsw(unsigned long port, const void *buffer, unsigned long count)
128{
129 volatile unsigned short* addr=(volatile unsigned short*)PORT2ADDR(port);
130 const unsigned short *buf=buffer;
131 while(count--) *addr=*buf++;
132}
133
134void hd64461_outsl(unsigned long port, const void *buffer, unsigned long count)
135{
136 volatile unsigned long* addr=(volatile unsigned long*)PORT2ADDR(port);
137 const unsigned long *buf=buffer;
138 while(count--) *addr=*buf++;
139}
140
141unsigned short hd64461_readw(void __iomem *addr)
142{
143 return ctrl_inw(MEM_BASE+(unsigned long __force)addr);
144}
145
146void hd64461_writew(unsigned short b, void __iomem *addr)
147{
148 ctrl_outw(b, MEM_BASE+(unsigned long __force)addr);
149}
150
diff --git a/arch/sh/cchips/voyagergx/irq.c b/arch/sh/cchips/voyagergx/irq.c
index 70f12907647f..d70e5c8461b5 100644
--- a/arch/sh/cchips/voyagergx/irq.c
+++ b/arch/sh/cchips/voyagergx/irq.c
@@ -28,7 +28,7 @@ static void disable_voyagergx_irq(unsigned int irq)
28 unsigned long val; 28 unsigned long val;
29 unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); 29 unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE);
30 30
31 pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask); 31 pr_debug("disable_voyagergx_irq(%d): mask=%lx\n", irq, mask);
32 val = readl((void __iomem *)VOYAGER_INT_MASK); 32 val = readl((void __iomem *)VOYAGER_INT_MASK);
33 val &= ~mask; 33 val &= ~mask;
34 writel(val, (void __iomem *)VOYAGER_INT_MASK); 34 writel(val, (void __iomem *)VOYAGER_INT_MASK);
@@ -39,7 +39,7 @@ static void enable_voyagergx_irq(unsigned int irq)
39 unsigned long val; 39 unsigned long val;
40 unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); 40 unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE);
41 41
42 pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask); 42 pr_debug("disable_voyagergx_irq(%d): mask=%lx\n", irq, mask);
43 val = readl((void __iomem *)VOYAGER_INT_MASK); 43 val = readl((void __iomem *)VOYAGER_INT_MASK);
44 val |= mask; 44 val |= mask;
45 writel(val, (void __iomem *)VOYAGER_INT_MASK); 45 writel(val, (void __iomem *)VOYAGER_INT_MASK);
@@ -125,11 +125,12 @@ int voyagergx_irq_demux(int irq)
125 i = 17; 125 i = 17;
126 else 126 else
127 printk("Unexpected IRQ irq = %d status = 0x%08lx\n", irq, val); 127 printk("Unexpected IRQ irq = %d status = 0x%08lx\n", irq, val);
128 pr_debug("voyagergx_irq_demux %d \n", i); 128 pr_debug("voyagergx_irq_demux %ld \n", i);
129 if (i < VOYAGER_IRQ_NUM) { 129 if (i < VOYAGER_IRQ_NUM) {
130 irq = VOYAGER_IRQ_BASE + i; 130 irq = VOYAGER_IRQ_BASE + i;
131 if (voyagergx_demux[i].func != 0) 131 if (voyagergx_demux[i].func != 0)
132 irq = voyagergx_demux[i].func(irq, voyagergx_demux[i].dev); 132 irq = voyagergx_demux[i].func(irq,
133 voyagergx_demux[i].dev);
133 } 134 }
134 } 135 }
135 return irq; 136 return irq;
diff --git a/arch/sh/configs/dreamcast_defconfig b/arch/sh/configs/dreamcast_defconfig
index 8b6b5a779de8..3fdd270eecf7 100644
--- a/arch/sh/configs/dreamcast_defconfig
+++ b/arch/sh/configs/dreamcast_defconfig
@@ -1,15 +1,23 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18 3# Linux kernel version: 2.6.22-rc4
4# Tue Oct 3 10:51:55 2006 4# Sat Jul 7 03:47:45 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8CONFIG_GENERIC_BUG=y
8CONFIG_GENERIC_FIND_NEXT_BIT=y 9CONFIG_GENERIC_FIND_NEXT_BIT=y
9CONFIG_GENERIC_HWEIGHT=y 10CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_HARDIRQS=y 11CONFIG_GENERIC_HARDIRQS=y
11CONFIG_GENERIC_IRQ_PROBE=y 12CONFIG_GENERIC_IRQ_PROBE=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
14CONFIG_GENERIC_TIME=y
15CONFIG_GENERIC_CLOCKEVENTS=y
16CONFIG_SYS_SUPPORTS_PCI=y
17CONFIG_STACKTRACE_SUPPORT=y
18CONFIG_LOCKDEP_SUPPORT=y
19# CONFIG_ARCH_HAS_ILOG2_U32 is not set
20# CONFIG_ARCH_HAS_ILOG2_U64 is not set
13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
14 22
15# 23#
@@ -28,6 +36,7 @@ CONFIG_LOCALVERSION_AUTO=y
28CONFIG_SWAP=y 36CONFIG_SWAP=y
29CONFIG_SYSVIPC=y 37CONFIG_SYSVIPC=y
30# CONFIG_IPC_NS is not set 38# CONFIG_IPC_NS is not set
39CONFIG_SYSVIPC_SYSCTL=y
31# CONFIG_POSIX_MQUEUE is not set 40# CONFIG_POSIX_MQUEUE is not set
32CONFIG_BSD_PROCESS_ACCT=y 41CONFIG_BSD_PROCESS_ACCT=y
33# CONFIG_BSD_PROCESS_ACCT_V3 is not set 42# CONFIG_BSD_PROCESS_ACCT_V3 is not set
@@ -35,8 +44,10 @@ CONFIG_BSD_PROCESS_ACCT=y
35# CONFIG_UTS_NS is not set 44# CONFIG_UTS_NS is not set
36# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
37# CONFIG_IKCONFIG is not set 46# CONFIG_IKCONFIG is not set
47CONFIG_LOG_BUF_SHIFT=14
48CONFIG_SYSFS_DEPRECATED=y
38# CONFIG_RELAY is not set 49# CONFIG_RELAY is not set
39CONFIG_INITRAMFS_SOURCE="" 50# CONFIG_BLK_DEV_INITRD is not set
40CONFIG_CC_OPTIMIZE_FOR_SIZE=y 51CONFIG_CC_OPTIMIZE_FOR_SIZE=y
41CONFIG_SYSCTL=y 52CONFIG_SYSCTL=y
42CONFIG_EMBEDDED=y 53CONFIG_EMBEDDED=y
@@ -50,14 +61,19 @@ CONFIG_BUG=y
50CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
51CONFIG_BASE_FULL=y 62CONFIG_BASE_FULL=y
52CONFIG_FUTEX=y 63CONFIG_FUTEX=y
64CONFIG_ANON_INODES=y
53CONFIG_EPOLL=y 65CONFIG_EPOLL=y
66CONFIG_SIGNALFD=y
67CONFIG_TIMERFD=y
68CONFIG_EVENTFD=y
54CONFIG_SHMEM=y 69CONFIG_SHMEM=y
55CONFIG_SLAB=y
56CONFIG_VM_EVENT_COUNTERS=y 70CONFIG_VM_EVENT_COUNTERS=y
71CONFIG_SLAB=y
72# CONFIG_SLUB is not set
73# CONFIG_SLOB is not set
57CONFIG_RT_MUTEXES=y 74CONFIG_RT_MUTEXES=y
58# CONFIG_TINY_SHMEM is not set 75# CONFIG_TINY_SHMEM is not set
59CONFIG_BASE_SMALL=0 76CONFIG_BASE_SMALL=0
60# CONFIG_SLOB is not set
61 77
62# 78#
63# Loadable module support 79# Loadable module support
@@ -93,44 +109,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
93# 109#
94# System type 110# System type
95# 111#
96# CONFIG_SH_SOLUTION_ENGINE is not set
97# CONFIG_SH_7751_SOLUTION_ENGINE is not set
98# CONFIG_SH_7300_SOLUTION_ENGINE is not set
99# CONFIG_SH_7343_SOLUTION_ENGINE is not set
100# CONFIG_SH_73180_SOLUTION_ENGINE is not set
101# CONFIG_SH_7751_SYSTEMH is not set
102# CONFIG_SH_HP6XX is not set
103# CONFIG_SH_EC3104 is not set
104# CONFIG_SH_SATURN is not set
105CONFIG_SH_DREAMCAST=y
106# CONFIG_SH_BIGSUR is not set
107# CONFIG_SH_MPC1211 is not set
108# CONFIG_SH_SH03 is not set
109# CONFIG_SH_SECUREEDGE5410 is not set
110# CONFIG_SH_HS7751RVOIP is not set
111# CONFIG_SH_7710VOIPGW is not set
112# CONFIG_SH_RTS7751R2D is not set
113# CONFIG_SH_R7780RP is not set
114# CONFIG_SH_EDOSK7705 is not set
115# CONFIG_SH_SH4202_MICRODEV is not set
116# CONFIG_SH_LANDISK is not set
117# CONFIG_SH_TITAN is not set
118# CONFIG_SH_SHMIN is not set
119# CONFIG_SH_UNKNOWN is not set
120
121#
122# Processor selection
123#
124CONFIG_CPU_SH4=y 112CONFIG_CPU_SH4=y
125 113# CONFIG_CPU_SUBTYPE_SH7619 is not set
126# 114# CONFIG_CPU_SUBTYPE_SH7206 is not set
127# SH-2 Processor Support
128#
129# CONFIG_CPU_SUBTYPE_SH7604 is not set
130
131#
132# SH-3 Processor Support
133#
134# CONFIG_CPU_SUBTYPE_SH7300 is not set 115# CONFIG_CPU_SUBTYPE_SH7300 is not set
135# CONFIG_CPU_SUBTYPE_SH7705 is not set 116# CONFIG_CPU_SUBTYPE_SH7705 is not set
136# CONFIG_CPU_SUBTYPE_SH7706 is not set 117# CONFIG_CPU_SUBTYPE_SH7706 is not set
@@ -138,79 +119,93 @@ CONFIG_CPU_SH4=y
138# CONFIG_CPU_SUBTYPE_SH7708 is not set 119# CONFIG_CPU_SUBTYPE_SH7708 is not set
139# CONFIG_CPU_SUBTYPE_SH7709 is not set 120# CONFIG_CPU_SUBTYPE_SH7709 is not set
140# CONFIG_CPU_SUBTYPE_SH7710 is not set 121# CONFIG_CPU_SUBTYPE_SH7710 is not set
141 122# CONFIG_CPU_SUBTYPE_SH7712 is not set
142# 123# CONFIG_CPU_SUBTYPE_SH7750 is not set
143# SH-4 Processor Support
144#
145CONFIG_CPU_SUBTYPE_SH7750=y
146CONFIG_CPU_SUBTYPE_SH7091=y 124CONFIG_CPU_SUBTYPE_SH7091=y
147CONFIG_CPU_SUBTYPE_SH7750R=y 125# CONFIG_CPU_SUBTYPE_SH7750R is not set
148# CONFIG_CPU_SUBTYPE_SH7750S is not set 126# CONFIG_CPU_SUBTYPE_SH7750S is not set
149# CONFIG_CPU_SUBTYPE_SH7751 is not set 127# CONFIG_CPU_SUBTYPE_SH7751 is not set
150# CONFIG_CPU_SUBTYPE_SH7751R is not set 128# CONFIG_CPU_SUBTYPE_SH7751R is not set
151# CONFIG_CPU_SUBTYPE_SH7760 is not set 129# CONFIG_CPU_SUBTYPE_SH7760 is not set
152# CONFIG_CPU_SUBTYPE_SH4_202 is not set 130# CONFIG_CPU_SUBTYPE_SH4_202 is not set
153
154#
155# ST40 Processor Support
156#
157# CONFIG_CPU_SUBTYPE_ST40STB1 is not set 131# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
158# CONFIG_CPU_SUBTYPE_ST40GX1 is not set 132# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
159
160#
161# SH-4A Processor Support
162#
163# CONFIG_CPU_SUBTYPE_SH7770 is not set 133# CONFIG_CPU_SUBTYPE_SH7770 is not set
164# CONFIG_CPU_SUBTYPE_SH7780 is not set 134# CONFIG_CPU_SUBTYPE_SH7780 is not set
165 135# CONFIG_CPU_SUBTYPE_SH7785 is not set
166# 136# CONFIG_CPU_SUBTYPE_SHX3 is not set
167# SH4AL-DSP Processor Support
168#
169# CONFIG_CPU_SUBTYPE_SH73180 is not set 137# CONFIG_CPU_SUBTYPE_SH73180 is not set
170# CONFIG_CPU_SUBTYPE_SH7343 is not set 138# CONFIG_CPU_SUBTYPE_SH7343 is not set
139# CONFIG_CPU_SUBTYPE_SH7722 is not set
171 140
172# 141#
173# Memory management options 142# Memory management options
174# 143#
144CONFIG_QUICKLIST=y
175CONFIG_MMU=y 145CONFIG_MMU=y
176CONFIG_PAGE_OFFSET=0x80000000 146CONFIG_PAGE_OFFSET=0x80000000
177CONFIG_MEMORY_START=0x0c000000 147CONFIG_MEMORY_START=0x0c000000
178CONFIG_MEMORY_SIZE=0x01000000 148CONFIG_MEMORY_SIZE=0x01000000
179CONFIG_VSYSCALL=y 149CONFIG_VSYSCALL=y
150CONFIG_ARCH_FLATMEM_ENABLE=y
151CONFIG_ARCH_SPARSEMEM_ENABLE=y
152CONFIG_ARCH_SPARSEMEM_DEFAULT=y
153CONFIG_MAX_ACTIVE_REGIONS=1
154CONFIG_ARCH_POPULATES_NODE_MAP=y
155CONFIG_ARCH_SELECT_MEMORY_MODEL=y
156CONFIG_PAGE_SIZE_4KB=y
157# CONFIG_PAGE_SIZE_8KB is not set
158# CONFIG_PAGE_SIZE_64KB is not set
180CONFIG_HUGETLB_PAGE_SIZE_64K=y 159CONFIG_HUGETLB_PAGE_SIZE_64K=y
160# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
181# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set 161# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
162# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
163# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set
182CONFIG_SELECT_MEMORY_MODEL=y 164CONFIG_SELECT_MEMORY_MODEL=y
183CONFIG_FLATMEM_MANUAL=y 165CONFIG_FLATMEM_MANUAL=y
184# CONFIG_DISCONTIGMEM_MANUAL is not set 166# CONFIG_DISCONTIGMEM_MANUAL is not set
185# CONFIG_SPARSEMEM_MANUAL is not set 167# CONFIG_SPARSEMEM_MANUAL is not set
186CONFIG_FLATMEM=y 168CONFIG_FLATMEM=y
187CONFIG_FLAT_NODE_MEM_MAP=y 169CONFIG_FLAT_NODE_MEM_MAP=y
188# CONFIG_SPARSEMEM_STATIC is not set 170CONFIG_SPARSEMEM_STATIC=y
189CONFIG_SPLIT_PTLOCK_CPUS=4 171CONFIG_SPLIT_PTLOCK_CPUS=4
190# CONFIG_RESOURCES_64BIT is not set 172# CONFIG_RESOURCES_64BIT is not set
173CONFIG_ZONE_DMA_FLAG=0
174CONFIG_NR_QUICK=2
191 175
192# 176#
193# Cache configuration 177# Cache configuration
194# 178#
195# CONFIG_SH_DIRECT_MAPPED is not set 179# CONFIG_SH_DIRECT_MAPPED is not set
196# CONFIG_SH_WRITETHROUGH is not set 180# CONFIG_SH_WRITETHROUGH is not set
197# CONFIG_SH_OCRAM is not set
198 181
199# 182#
200# Processor features 183# Processor features
201# 184#
202CONFIG_CPU_LITTLE_ENDIAN=y 185CONFIG_CPU_LITTLE_ENDIAN=y
186# CONFIG_CPU_BIG_ENDIAN is not set
203CONFIG_SH_FPU=y 187CONFIG_SH_FPU=y
204# CONFIG_SH_DSP is not set 188# CONFIG_SH_DSP is not set
205CONFIG_SH_STORE_QUEUES=y 189CONFIG_SH_STORE_QUEUES=y
206CONFIG_CPU_HAS_INTEVT=y 190CONFIG_CPU_HAS_INTEVT=y
191CONFIG_CPU_HAS_IPR_IRQ=y
207CONFIG_CPU_HAS_SR_RB=y 192CONFIG_CPU_HAS_SR_RB=y
193CONFIG_CPU_HAS_PTEA=y
208 194
209# 195#
210# Timer support 196# Board support
197#
198CONFIG_SH_DREAMCAST=y
199
200#
201# Timer and clock configuration
211# 202#
212CONFIG_SH_TMU=y 203CONFIG_SH_TMU=y
204CONFIG_SH_TIMER_IRQ=16
213CONFIG_SH_PCLK_FREQ=49876504 205CONFIG_SH_PCLK_FREQ=49876504
206# CONFIG_TICK_ONESHOT is not set
207# CONFIG_NO_HZ is not set
208# CONFIG_HIGH_RES_TIMERS is not set
214 209
215# 210#
216# CPU Frequency scaling 211# CPU Frequency scaling
@@ -232,6 +227,7 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
232# 227#
233# DMA support 228# DMA support
234# 229#
230CONFIG_SH_DMA_API=y
235CONFIG_SH_DMA=y 231CONFIG_SH_DMA=y
236CONFIG_NR_ONCHIP_DMA_CHANNELS=4 232CONFIG_NR_ONCHIP_DMA_CHANNELS=4
237CONFIG_NR_DMA_CHANNELS_BOOL=y 233CONFIG_NR_DMA_CHANNELS_BOOL=y
@@ -240,17 +236,23 @@ CONFIG_NR_DMA_CHANNELS=9
240# 236#
241# Companion Chips 237# Companion Chips
242# 238#
243# CONFIG_HD6446X_SERIES is not set 239
240#
241# Additional SuperH Device Drivers
242#
243# CONFIG_HEARTBEAT is not set
244# CONFIG_PUSH_SWITCH is not set
244 245
245# 246#
246# Kernel features 247# Kernel features
247# 248#
248# CONFIG_HZ_100 is not set 249# CONFIG_HZ_100 is not set
249CONFIG_HZ_250=y 250CONFIG_HZ_250=y
251# CONFIG_HZ_300 is not set
250# CONFIG_HZ_1000 is not set 252# CONFIG_HZ_1000 is not set
251CONFIG_HZ=250 253CONFIG_HZ=250
252# CONFIG_KEXEC is not set 254# CONFIG_KEXEC is not set
253# CONFIG_SMP is not set 255# CONFIG_CRASH_DUMP is not set
254# CONFIG_PREEMPT_NONE is not set 256# CONFIG_PREEMPT_NONE is not set
255# CONFIG_PREEMPT_VOLUNTARY is not set 257# CONFIG_PREEMPT_VOLUNTARY is not set
256CONFIG_PREEMPT=y 258CONFIG_PREEMPT=y
@@ -269,33 +271,23 @@ CONFIG_CMDLINE="console=ttySC1,115200 panic=3"
269# Bus options 271# Bus options
270# 272#
271CONFIG_PCI=y 273CONFIG_PCI=y
272# CONFIG_SH_PCIDMA_NONCOHERENT is not set 274CONFIG_SH_PCIDMA_NONCOHERENT=y
273CONFIG_PCI_AUTO=y 275CONFIG_PCI_AUTO=y
274# CONFIG_PCI_MULTITHREAD_PROBE is not set 276# CONFIG_ARCH_SUPPORTS_MSI is not set
275 277
276# 278#
277# PCCARD (PCMCIA/CardBus) support 279# PCCARD (PCMCIA/CardBus) support
278# 280#
279# CONFIG_PCCARD is not set 281# CONFIG_PCCARD is not set
280
281#
282# PCI Hotplug Support
283#
284# CONFIG_HOTPLUG_PCI is not set 282# CONFIG_HOTPLUG_PCI is not set
285 283
286# 284#
287# Executable file formats 285# Executable file formats
288# 286#
289CONFIG_BINFMT_ELF=y 287CONFIG_BINFMT_ELF=y
290# CONFIG_BINFMT_FLAT is not set
291# CONFIG_BINFMT_MISC is not set 288# CONFIG_BINFMT_MISC is not set
292 289
293# 290#
294# Power management options (EXPERIMENTAL)
295#
296# CONFIG_PM is not set
297
298#
299# Networking 291# Networking
300# 292#
301CONFIG_NET=y 293CONFIG_NET=y
@@ -303,13 +295,13 @@ CONFIG_NET=y
303# 295#
304# Networking options 296# Networking options
305# 297#
306# CONFIG_NETDEBUG is not set
307CONFIG_PACKET=y 298CONFIG_PACKET=y
308# CONFIG_PACKET_MMAP is not set 299# CONFIG_PACKET_MMAP is not set
309CONFIG_UNIX=y 300CONFIG_UNIX=y
310CONFIG_XFRM=y 301CONFIG_XFRM=y
311# CONFIG_XFRM_USER is not set 302# CONFIG_XFRM_USER is not set
312# CONFIG_XFRM_SUB_POLICY is not set 303# CONFIG_XFRM_SUB_POLICY is not set
304# CONFIG_XFRM_MIGRATE is not set
313# CONFIG_NET_KEY is not set 305# CONFIG_NET_KEY is not set
314CONFIG_INET=y 306CONFIG_INET=y
315# CONFIG_IP_MULTICAST is not set 307# CONFIG_IP_MULTICAST is not set
@@ -327,30 +319,20 @@ CONFIG_IP_FIB_HASH=y
327# CONFIG_INET_TUNNEL is not set 319# CONFIG_INET_TUNNEL is not set
328CONFIG_INET_XFRM_MODE_TRANSPORT=y 320CONFIG_INET_XFRM_MODE_TRANSPORT=y
329CONFIG_INET_XFRM_MODE_TUNNEL=y 321CONFIG_INET_XFRM_MODE_TUNNEL=y
322CONFIG_INET_XFRM_MODE_BEET=y
330CONFIG_INET_DIAG=y 323CONFIG_INET_DIAG=y
331CONFIG_INET_TCP_DIAG=y 324CONFIG_INET_TCP_DIAG=y
332# CONFIG_TCP_CONG_ADVANCED is not set 325# CONFIG_TCP_CONG_ADVANCED is not set
333CONFIG_TCP_CONG_CUBIC=y 326CONFIG_TCP_CONG_CUBIC=y
334CONFIG_DEFAULT_TCP_CONG="cubic" 327CONFIG_DEFAULT_TCP_CONG="cubic"
328# CONFIG_TCP_MD5SIG is not set
335# CONFIG_IPV6 is not set 329# CONFIG_IPV6 is not set
336# CONFIG_INET6_XFRM_TUNNEL is not set 330# CONFIG_INET6_XFRM_TUNNEL is not set
337# CONFIG_INET6_TUNNEL is not set 331# CONFIG_INET6_TUNNEL is not set
338# CONFIG_NETWORK_SECMARK is not set 332# CONFIG_NETWORK_SECMARK is not set
339# CONFIG_NETFILTER is not set 333# CONFIG_NETFILTER is not set
340
341#
342# DCCP Configuration (EXPERIMENTAL)
343#
344# CONFIG_IP_DCCP is not set 334# CONFIG_IP_DCCP is not set
345
346#
347# SCTP Configuration (EXPERIMENTAL)
348#
349# CONFIG_IP_SCTP is not set 335# CONFIG_IP_SCTP is not set
350
351#
352# TIPC Configuration (EXPERIMENTAL)
353#
354# CONFIG_TIPC is not set 336# CONFIG_TIPC is not set
355# CONFIG_ATM is not set 337# CONFIG_ATM is not set
356# CONFIG_BRIDGE is not set 338# CONFIG_BRIDGE is not set
@@ -376,7 +358,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
376# CONFIG_HAMRADIO is not set 358# CONFIG_HAMRADIO is not set
377# CONFIG_IRDA is not set 359# CONFIG_IRDA is not set
378# CONFIG_BT is not set 360# CONFIG_BT is not set
361# CONFIG_AF_RXRPC is not set
362
363#
364# Wireless
365#
366# CONFIG_CFG80211 is not set
367# CONFIG_WIRELESS_EXT is not set
368# CONFIG_MAC80211 is not set
379# CONFIG_IEEE80211 is not set 369# CONFIG_IEEE80211 is not set
370# CONFIG_RFKILL is not set
380 371
381# 372#
382# Device Drivers 373# Device Drivers
@@ -394,10 +385,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
394# Connector - unified userspace <-> kernelspace linker 385# Connector - unified userspace <-> kernelspace linker
395# 386#
396# CONFIG_CONNECTOR is not set 387# CONFIG_CONNECTOR is not set
397
398#
399# Memory Technology Devices (MTD)
400#
401# CONFIG_MTD is not set 388# CONFIG_MTD is not set
402 389
403# 390#
@@ -408,6 +395,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
408# 395#
409# Plug and Play support 396# Plug and Play support
410# 397#
398# CONFIG_PNPACPI is not set
411 399
412# 400#
413# Block devices 401# Block devices
@@ -421,13 +409,16 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
421# CONFIG_BLK_DEV_NBD is not set 409# CONFIG_BLK_DEV_NBD is not set
422# CONFIG_BLK_DEV_SX8 is not set 410# CONFIG_BLK_DEV_SX8 is not set
423# CONFIG_BLK_DEV_RAM is not set 411# CONFIG_BLK_DEV_RAM is not set
424# CONFIG_BLK_DEV_INITRD is not set
425# CONFIG_CDROM_PKTCDVD is not set 412# CONFIG_CDROM_PKTCDVD is not set
426# CONFIG_ATA_OVER_ETH is not set 413# CONFIG_ATA_OVER_ETH is not set
427 414
428# 415#
429# ATA/ATAPI/MFM/RLL support 416# Misc devices
430# 417#
418# CONFIG_PHANTOM is not set
419# CONFIG_SGI_IOC4 is not set
420# CONFIG_TIFM_CORE is not set
421# CONFIG_BLINK is not set
431# CONFIG_IDE is not set 422# CONFIG_IDE is not set
432 423
433# 424#
@@ -436,10 +427,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
436# CONFIG_RAID_ATTRS is not set 427# CONFIG_RAID_ATTRS is not set
437# CONFIG_SCSI is not set 428# CONFIG_SCSI is not set
438# CONFIG_SCSI_NETLINK is not set 429# CONFIG_SCSI_NETLINK is not set
439
440#
441# Serial ATA (prod) and Parallel ATA (experimental) drivers
442#
443# CONFIG_ATA is not set 430# CONFIG_ATA is not set
444 431
445# 432#
@@ -455,6 +442,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
455# 442#
456# IEEE 1394 (FireWire) support 443# IEEE 1394 (FireWire) support
457# 444#
445# CONFIG_FIREWIRE is not set
458# CONFIG_IEEE1394 is not set 446# CONFIG_IEEE1394 is not set
459 447
460# 448#
@@ -470,15 +458,7 @@ CONFIG_NETDEVICES=y
470# CONFIG_BONDING is not set 458# CONFIG_BONDING is not set
471# CONFIG_EQUALIZER is not set 459# CONFIG_EQUALIZER is not set
472# CONFIG_TUN is not set 460# CONFIG_TUN is not set
473
474#
475# ARCnet devices
476#
477# CONFIG_ARCNET is not set 461# CONFIG_ARCNET is not set
478
479#
480# PHY device support
481#
482# CONFIG_PHYLIB is not set 462# CONFIG_PHYLIB is not set
483 463
484# 464#
@@ -521,47 +501,16 @@ CONFIG_8139TOO=y
521# CONFIG_SUNDANCE is not set 501# CONFIG_SUNDANCE is not set
522# CONFIG_TLAN is not set 502# CONFIG_TLAN is not set
523# CONFIG_VIA_RHINE is not set 503# CONFIG_VIA_RHINE is not set
524 504# CONFIG_SC92031 is not set
525# 505# CONFIG_NETDEV_1000 is not set
526# Ethernet (1000 Mbit) 506# CONFIG_NETDEV_10000 is not set
527#
528# CONFIG_ACENIC is not set
529# CONFIG_DL2K is not set
530# CONFIG_E1000 is not set
531# CONFIG_NS83820 is not set
532# CONFIG_HAMACHI is not set
533# CONFIG_YELLOWFIN is not set
534# CONFIG_R8169 is not set
535# CONFIG_SIS190 is not set
536# CONFIG_SKGE is not set
537# CONFIG_SKY2 is not set
538# CONFIG_SK98LIN is not set
539# CONFIG_VIA_VELOCITY is not set
540# CONFIG_TIGON3 is not set
541# CONFIG_BNX2 is not set
542# CONFIG_QLA3XXX is not set
543
544#
545# Ethernet (10000 Mbit)
546#
547# CONFIG_CHELSIO_T1 is not set
548# CONFIG_IXGB is not set
549# CONFIG_S2IO is not set
550# CONFIG_MYRI10GE is not set
551
552#
553# Token Ring devices
554#
555# CONFIG_TR is not set 507# CONFIG_TR is not set
556 508
557# 509#
558# Wireless LAN (non-hamradio) 510# Wireless LAN
559#
560# CONFIG_NET_RADIO is not set
561
562#
563# Wan interfaces
564# 511#
512# CONFIG_WLAN_PRE80211 is not set
513# CONFIG_WLAN_80211 is not set
565# CONFIG_WAN is not set 514# CONFIG_WAN is not set
566# CONFIG_FDDI is not set 515# CONFIG_FDDI is not set
567# CONFIG_HIPPI is not set 516# CONFIG_HIPPI is not set
@@ -604,17 +553,19 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
604# Input Device Drivers 553# Input Device Drivers
605# 554#
606CONFIG_INPUT_KEYBOARD=y 555CONFIG_INPUT_KEYBOARD=y
607CONFIG_KEYBOARD_ATKBD=y 556# CONFIG_KEYBOARD_ATKBD is not set
608# CONFIG_KEYBOARD_SUNKBD is not set 557# CONFIG_KEYBOARD_SUNKBD is not set
609# CONFIG_KEYBOARD_LKKBD is not set 558# CONFIG_KEYBOARD_LKKBD is not set
610# CONFIG_KEYBOARD_XTKBD is not set 559# CONFIG_KEYBOARD_XTKBD is not set
611# CONFIG_KEYBOARD_NEWTON is not set 560# CONFIG_KEYBOARD_NEWTON is not set
612# CONFIG_KEYBOARD_STOWAWAY is not set 561# CONFIG_KEYBOARD_STOWAWAY is not set
613CONFIG_INPUT_MOUSE=y 562CONFIG_INPUT_MOUSE=y
614CONFIG_MOUSE_PS2=y 563# CONFIG_MOUSE_PS2 is not set
615# CONFIG_MOUSE_SERIAL is not set 564# CONFIG_MOUSE_SERIAL is not set
565# CONFIG_MOUSE_APPLETOUCH is not set
616# CONFIG_MOUSE_VSXXXAA is not set 566# CONFIG_MOUSE_VSXXXAA is not set
617# CONFIG_INPUT_JOYSTICK is not set 567# CONFIG_INPUT_JOYSTICK is not set
568# CONFIG_INPUT_TABLET is not set
618# CONFIG_INPUT_TOUCHSCREEN is not set 569# CONFIG_INPUT_TOUCHSCREEN is not set
619# CONFIG_INPUT_MISC is not set 570# CONFIG_INPUT_MISC is not set
620 571
@@ -660,10 +611,6 @@ CONFIG_LEGACY_PTY_COUNT=256
660# IPMI 611# IPMI
661# 612#
662# CONFIG_IPMI_HANDLER is not set 613# CONFIG_IPMI_HANDLER is not set
663
664#
665# Watchdog Cards
666#
667CONFIG_WATCHDOG=y 614CONFIG_WATCHDOG=y
668# CONFIG_WATCHDOG_NOWAYOUT is not set 615# CONFIG_WATCHDOG_NOWAYOUT is not set
669 616
@@ -680,14 +627,8 @@ CONFIG_SH_WDT=y
680# CONFIG_PCIPCWATCHDOG is not set 627# CONFIG_PCIPCWATCHDOG is not set
681# CONFIG_WDTPCI is not set 628# CONFIG_WDTPCI is not set
682CONFIG_HW_RANDOM=y 629CONFIG_HW_RANDOM=y
683# CONFIG_GEN_RTC is not set
684# CONFIG_DTLK is not set
685# CONFIG_R3964 is not set 630# CONFIG_R3964 is not set
686# CONFIG_APPLICOM is not set 631# CONFIG_APPLICOM is not set
687
688#
689# Ftape, the floppy tape device driver
690#
691# CONFIG_DRM is not set 632# CONFIG_DRM is not set
692# CONFIG_RAW_DRIVER is not set 633# CONFIG_RAW_DRIVER is not set
693 634
@@ -695,11 +636,7 @@ CONFIG_HW_RANDOM=y
695# TPM devices 636# TPM devices
696# 637#
697# CONFIG_TCG_TPM is not set 638# CONFIG_TCG_TPM is not set
698# CONFIG_TELCLOCK is not set 639CONFIG_DEVPORT=y
699
700#
701# I2C support
702#
703# CONFIG_I2C is not set 640# CONFIG_I2C is not set
704 641
705# 642#
@@ -711,44 +648,51 @@ CONFIG_HW_RANDOM=y
711# 648#
712# Dallas's 1-wire bus 649# Dallas's 1-wire bus
713# 650#
651# CONFIG_W1 is not set
652# CONFIG_HWMON is not set
714 653
715# 654#
716# Hardware Monitoring support 655# Multifunction device drivers
717#
718CONFIG_HWMON=y
719# CONFIG_HWMON_VID is not set
720# CONFIG_SENSORS_ABITUGURU is not set
721# CONFIG_SENSORS_F71805F is not set
722# CONFIG_SENSORS_VT1211 is not set
723# CONFIG_HWMON_DEBUG_CHIP is not set
724
725#
726# Misc devices
727# 656#
657# CONFIG_MFD_SM501 is not set
728 658
729# 659#
730# Multimedia devices 660# Multimedia devices
731# 661#
732# CONFIG_VIDEO_DEV is not set 662# CONFIG_VIDEO_DEV is not set
733CONFIG_VIDEO_V4L2=y 663# CONFIG_DVB_CORE is not set
664# CONFIG_DAB is not set
734 665
735# 666#
736# Digital Video Broadcasting Devices 667# Graphics support
737# 668#
738# CONFIG_DVB is not set 669# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
739 670
740# 671#
741# Graphics support 672# Display device support
742# 673#
743CONFIG_FIRMWARE_EDID=y 674# CONFIG_DISPLAY_SUPPORT is not set
675# CONFIG_VGASTATE is not set
744CONFIG_FB=y 676CONFIG_FB=y
677CONFIG_FIRMWARE_EDID=y
678# CONFIG_FB_DDC is not set
745CONFIG_FB_CFB_FILLRECT=y 679CONFIG_FB_CFB_FILLRECT=y
746CONFIG_FB_CFB_COPYAREA=y 680CONFIG_FB_CFB_COPYAREA=y
747CONFIG_FB_CFB_IMAGEBLIT=y 681CONFIG_FB_CFB_IMAGEBLIT=y
682# CONFIG_FB_SYS_FILLRECT is not set
683# CONFIG_FB_SYS_COPYAREA is not set
684# CONFIG_FB_SYS_IMAGEBLIT is not set
685# CONFIG_FB_SYS_FOPS is not set
686CONFIG_FB_DEFERRED_IO=y
687# CONFIG_FB_SVGALIB is not set
748# CONFIG_FB_MACMODES is not set 688# CONFIG_FB_MACMODES is not set
749# CONFIG_FB_BACKLIGHT is not set 689# CONFIG_FB_BACKLIGHT is not set
750# CONFIG_FB_MODE_HELPERS is not set 690# CONFIG_FB_MODE_HELPERS is not set
751# CONFIG_FB_TILEBLITTING is not set 691# CONFIG_FB_TILEBLITTING is not set
692
693#
694# Frame buffer hardware drivers
695#
752# CONFIG_FB_CIRRUS is not set 696# CONFIG_FB_CIRRUS is not set
753# CONFIG_FB_PM2 is not set 697# CONFIG_FB_PM2 is not set
754# CONFIG_FB_CYBER2000 is not set 698# CONFIG_FB_CYBER2000 is not set
@@ -763,13 +707,17 @@ CONFIG_FB_PVR2=y
763# CONFIG_FB_RADEON is not set 707# CONFIG_FB_RADEON is not set
764# CONFIG_FB_ATY128 is not set 708# CONFIG_FB_ATY128 is not set
765# CONFIG_FB_ATY is not set 709# CONFIG_FB_ATY is not set
710# CONFIG_FB_S3 is not set
766# CONFIG_FB_SAVAGE is not set 711# CONFIG_FB_SAVAGE is not set
767# CONFIG_FB_SIS is not set 712# CONFIG_FB_SIS is not set
768# CONFIG_FB_NEOMAGIC is not set 713# CONFIG_FB_NEOMAGIC is not set
769# CONFIG_FB_KYRO is not set 714# CONFIG_FB_KYRO is not set
770# CONFIG_FB_3DFX is not set 715# CONFIG_FB_3DFX is not set
771# CONFIG_FB_VOODOO1 is not set 716# CONFIG_FB_VOODOO1 is not set
717# CONFIG_FB_VT8623 is not set
772# CONFIG_FB_TRIDENT is not set 718# CONFIG_FB_TRIDENT is not set
719# CONFIG_FB_ARK is not set
720# CONFIG_FB_PM3 is not set
773# CONFIG_FB_VIRTUAL is not set 721# CONFIG_FB_VIRTUAL is not set
774 722
775# 723#
@@ -789,10 +737,6 @@ CONFIG_FONT_8x16=y
789# CONFIG_FONT_SUN8x16 is not set 737# CONFIG_FONT_SUN8x16 is not set
790# CONFIG_FONT_SUN12x22 is not set 738# CONFIG_FONT_SUN12x22 is not set
791# CONFIG_FONT_10x18 is not set 739# CONFIG_FONT_10x18 is not set
792
793#
794# Logo configuration
795#
796CONFIG_LOGO=y 740CONFIG_LOGO=y
797# CONFIG_LOGO_LINUX_MONO is not set 741# CONFIG_LOGO_LINUX_MONO is not set
798# CONFIG_LOGO_LINUX_VGA16 is not set 742# CONFIG_LOGO_LINUX_VGA16 is not set
@@ -800,7 +744,6 @@ CONFIG_LOGO=y
800# CONFIG_LOGO_SUPERH_MONO is not set 744# CONFIG_LOGO_SUPERH_MONO is not set
801# CONFIG_LOGO_SUPERH_VGA16 is not set 745# CONFIG_LOGO_SUPERH_VGA16 is not set
802CONFIG_LOGO_SUPERH_CLUT224=y 746CONFIG_LOGO_SUPERH_CLUT224=y
803# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
804 747
805# 748#
806# Sound 749# Sound
@@ -808,6 +751,12 @@ CONFIG_LOGO_SUPERH_CLUT224=y
808# CONFIG_SOUND is not set 751# CONFIG_SOUND is not set
809 752
810# 753#
754# HID Devices
755#
756CONFIG_HID=y
757# CONFIG_HID_DEBUG is not set
758
759#
811# USB support 760# USB support
812# 761#
813CONFIG_USB_ARCH_HAS_HCD=y 762CONFIG_USB_ARCH_HAS_HCD=y
@@ -823,10 +772,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
823# USB Gadget Support 772# USB Gadget Support
824# 773#
825# CONFIG_USB_GADGET is not set 774# CONFIG_USB_GADGET is not set
826
827#
828# MMC/SD Card support
829#
830# CONFIG_MMC is not set 775# CONFIG_MMC is not set
831 776
832# 777#
@@ -874,10 +819,12 @@ CONFIG_USB_ARCH_HAS_EHCI=y
874# 819#
875# CONFIG_EXT2_FS is not set 820# CONFIG_EXT2_FS is not set
876# CONFIG_EXT3_FS is not set 821# CONFIG_EXT3_FS is not set
822# CONFIG_EXT4DEV_FS is not set
877# CONFIG_REISERFS_FS is not set 823# CONFIG_REISERFS_FS is not set
878# CONFIG_JFS_FS is not set 824# CONFIG_JFS_FS is not set
879# CONFIG_FS_POSIX_ACL is not set 825# CONFIG_FS_POSIX_ACL is not set
880# CONFIG_XFS_FS is not set 826# CONFIG_XFS_FS is not set
827# CONFIG_GFS2_FS is not set
881# CONFIG_OCFS2_FS is not set 828# CONFIG_OCFS2_FS is not set
882# CONFIG_MINIX_FS is not set 829# CONFIG_MINIX_FS is not set
883# CONFIG_ROMFS_FS is not set 830# CONFIG_ROMFS_FS is not set
@@ -957,6 +904,11 @@ CONFIG_MSDOS_PARTITION=y
957# CONFIG_NLS is not set 904# CONFIG_NLS is not set
958 905
959# 906#
907# Distributed Lock Manager
908#
909# CONFIG_DLM is not set
910
911#
960# Profiling support 912# Profiling support
961# 913#
962CONFIG_PROFILING=y 914CONFIG_PROFILING=y
@@ -965,17 +917,18 @@ CONFIG_PROFILING=y
965# 917#
966# Kernel hacking 918# Kernel hacking
967# 919#
920CONFIG_TRACE_IRQFLAGS_SUPPORT=y
968# CONFIG_PRINTK_TIME is not set 921# CONFIG_PRINTK_TIME is not set
969CONFIG_ENABLE_MUST_CHECK=y 922CONFIG_ENABLE_MUST_CHECK=y
970# CONFIG_MAGIC_SYSRQ is not set 923# CONFIG_MAGIC_SYSRQ is not set
971# CONFIG_UNUSED_SYMBOLS is not set 924# CONFIG_UNUSED_SYMBOLS is not set
925# CONFIG_DEBUG_FS is not set
926# CONFIG_HEADERS_CHECK is not set
972# CONFIG_DEBUG_KERNEL is not set 927# CONFIG_DEBUG_KERNEL is not set
973CONFIG_LOG_BUF_SHIFT=14
974# CONFIG_DEBUG_BUGVERBOSE is not set 928# CONFIG_DEBUG_BUGVERBOSE is not set
975# CONFIG_DEBUG_FS is not set
976# CONFIG_SH_STANDARD_BIOS is not set 929# CONFIG_SH_STANDARD_BIOS is not set
977# CONFIG_EARLY_SCIF_CONSOLE is not set 930# CONFIG_EARLY_SCIF_CONSOLE is not set
978# CONFIG_KGDB is not set 931# CONFIG_SH_KGDB is not set
979 932
980# 933#
981# Security options 934# Security options
@@ -991,8 +944,13 @@ CONFIG_LOG_BUF_SHIFT=14
991# 944#
992# Library routines 945# Library routines
993# 946#
947CONFIG_BITREVERSE=y
994# CONFIG_CRC_CCITT is not set 948# CONFIG_CRC_CCITT is not set
995# CONFIG_CRC16 is not set 949# CONFIG_CRC16 is not set
950# CONFIG_CRC_ITU_T is not set
996CONFIG_CRC32=y 951CONFIG_CRC32=y
997# CONFIG_LIBCRC32C is not set 952# CONFIG_LIBCRC32C is not set
998CONFIG_PLIST=y 953CONFIG_PLIST=y
954CONFIG_HAS_IOMEM=y
955CONFIG_HAS_IOPORT=y
956CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/landisk_defconfig b/arch/sh/configs/landisk_defconfig
index e7f8ddb0ada4..07310fa03250 100644
--- a/arch/sh/configs/landisk_defconfig
+++ b/arch/sh/configs/landisk_defconfig
@@ -217,7 +217,7 @@ CONFIG_SH_FPU=y
217# CONFIG_SH_DSP is not set 217# CONFIG_SH_DSP is not set
218# CONFIG_SH_STORE_QUEUES is not set 218# CONFIG_SH_STORE_QUEUES is not set
219CONFIG_CPU_HAS_INTEVT=y 219CONFIG_CPU_HAS_INTEVT=y
220CONFIG_CPU_HAS_IPR_IRQ=y 220CONFIG_CPU_HAS_INTC_IRQ=y
221CONFIG_CPU_HAS_SR_RB=y 221CONFIG_CPU_HAS_SR_RB=y
222CONFIG_CPU_HAS_PTEA=y 222CONFIG_CPU_HAS_PTEA=y
223 223
diff --git a/arch/sh/configs/lboxre2_defconfig b/arch/sh/configs/lboxre2_defconfig
index be86414dcc87..fa09d68d057a 100644
--- a/arch/sh/configs/lboxre2_defconfig
+++ b/arch/sh/configs/lboxre2_defconfig
@@ -222,7 +222,7 @@ CONFIG_SH_FPU=y
222# CONFIG_SH_DSP is not set 222# CONFIG_SH_DSP is not set
223# CONFIG_SH_STORE_QUEUES is not set 223# CONFIG_SH_STORE_QUEUES is not set
224CONFIG_CPU_HAS_INTEVT=y 224CONFIG_CPU_HAS_INTEVT=y
225CONFIG_CPU_HAS_IPR_IRQ=y 225CONFIG_CPU_HAS_INTC_IRQ=y
226CONFIG_CPU_HAS_SR_RB=y 226CONFIG_CPU_HAS_SR_RB=y
227CONFIG_CPU_HAS_PTEA=y 227CONFIG_CPU_HAS_PTEA=y
228 228
diff --git a/arch/sh/configs/r7780mp_defconfig b/arch/sh/configs/r7780mp_defconfig
new file mode 100644
index 000000000000..ac4de4973b60
--- /dev/null
+++ b/arch/sh/configs/r7780mp_defconfig
@@ -0,0 +1,1223 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc4
4# Mon Jun 11 10:24:57 2007
5#
6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8CONFIG_GENERIC_BUG=y
9CONFIG_GENERIC_FIND_NEXT_BIT=y
10CONFIG_GENERIC_HWEIGHT=y
11CONFIG_GENERIC_HARDIRQS=y
12CONFIG_GENERIC_IRQ_PROBE=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y
14CONFIG_GENERIC_TIME=y
15CONFIG_GENERIC_CLOCKEVENTS=y
16CONFIG_STACKTRACE_SUPPORT=y
17CONFIG_LOCKDEP_SUPPORT=y
18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
21
22#
23# Code maturity level options
24#
25CONFIG_EXPERIMENTAL=y
26CONFIG_BROKEN_ON_SMP=y
27CONFIG_LOCK_KERNEL=y
28CONFIG_INIT_ENV_ARG_LIMIT=32
29
30#
31# General setup
32#
33CONFIG_LOCALVERSION=""
34CONFIG_LOCALVERSION_AUTO=y
35CONFIG_SWAP=y
36CONFIG_SYSVIPC=y
37# CONFIG_IPC_NS is not set
38CONFIG_SYSVIPC_SYSCTL=y
39# CONFIG_POSIX_MQUEUE is not set
40CONFIG_BSD_PROCESS_ACCT=y
41# CONFIG_BSD_PROCESS_ACCT_V3 is not set
42# CONFIG_TASKSTATS is not set
43# CONFIG_UTS_NS is not set
44# CONFIG_AUDIT is not set
45CONFIG_IKCONFIG=y
46CONFIG_IKCONFIG_PROC=y
47CONFIG_LOG_BUF_SHIFT=14
48# CONFIG_SYSFS_DEPRECATED is not set
49# CONFIG_RELAY is not set
50# CONFIG_BLK_DEV_INITRD is not set
51CONFIG_CC_OPTIMIZE_FOR_SIZE=y
52CONFIG_SYSCTL=y
53CONFIG_EMBEDDED=y
54CONFIG_UID16=y
55# CONFIG_SYSCTL_SYSCALL is not set
56CONFIG_KALLSYMS=y
57# CONFIG_KALLSYMS_ALL is not set
58# CONFIG_KALLSYMS_EXTRA_PASS is not set
59CONFIG_HOTPLUG=y
60CONFIG_PRINTK=y
61CONFIG_BUG=y
62CONFIG_ELF_CORE=y
63CONFIG_BASE_FULL=y
64# CONFIG_FUTEX is not set
65CONFIG_ANON_INODES=y
66# CONFIG_EPOLL is not set
67CONFIG_SIGNALFD=y
68CONFIG_TIMERFD=y
69CONFIG_EVENTFD=y
70CONFIG_SHMEM=y
71CONFIG_VM_EVENT_COUNTERS=y
72CONFIG_SLAB=y
73# CONFIG_SLUB is not set
74# CONFIG_SLOB is not set
75# CONFIG_TINY_SHMEM is not set
76CONFIG_BASE_SMALL=0
77
78#
79# Loadable module support
80#
81CONFIG_MODULES=y
82CONFIG_MODULE_UNLOAD=y
83# CONFIG_MODULE_FORCE_UNLOAD is not set
84# CONFIG_MODVERSIONS is not set
85# CONFIG_MODULE_SRCVERSION_ALL is not set
86CONFIG_KMOD=y
87
88#
89# Block layer
90#
91CONFIG_BLOCK=y
92# CONFIG_LBD is not set
93# CONFIG_BLK_DEV_IO_TRACE is not set
94# CONFIG_LSF is not set
95
96#
97# IO Schedulers
98#
99CONFIG_IOSCHED_NOOP=y
100# CONFIG_IOSCHED_AS is not set
101# CONFIG_IOSCHED_DEADLINE is not set
102# CONFIG_IOSCHED_CFQ is not set
103# CONFIG_DEFAULT_AS is not set
104# CONFIG_DEFAULT_DEADLINE is not set
105# CONFIG_DEFAULT_CFQ is not set
106CONFIG_DEFAULT_NOOP=y
107CONFIG_DEFAULT_IOSCHED="noop"
108
109#
110# System type
111#
112CONFIG_CPU_SH4=y
113CONFIG_CPU_SH4A=y
114# CONFIG_CPU_SUBTYPE_SH7619 is not set
115# CONFIG_CPU_SUBTYPE_SH7206 is not set
116# CONFIG_CPU_SUBTYPE_SH7300 is not set
117# CONFIG_CPU_SUBTYPE_SH7705 is not set
118# CONFIG_CPU_SUBTYPE_SH7706 is not set
119# CONFIG_CPU_SUBTYPE_SH7707 is not set
120# CONFIG_CPU_SUBTYPE_SH7708 is not set
121# CONFIG_CPU_SUBTYPE_SH7709 is not set
122# CONFIG_CPU_SUBTYPE_SH7710 is not set
123# CONFIG_CPU_SUBTYPE_SH7712 is not set
124# CONFIG_CPU_SUBTYPE_SH7750 is not set
125# CONFIG_CPU_SUBTYPE_SH7091 is not set
126# CONFIG_CPU_SUBTYPE_SH7750R is not set
127# CONFIG_CPU_SUBTYPE_SH7750S is not set
128# CONFIG_CPU_SUBTYPE_SH7751 is not set
129# CONFIG_CPU_SUBTYPE_SH7751R is not set
130# CONFIG_CPU_SUBTYPE_SH7760 is not set
131# CONFIG_CPU_SUBTYPE_SH4_202 is not set
132# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
133# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
134# CONFIG_CPU_SUBTYPE_SH7770 is not set
135CONFIG_CPU_SUBTYPE_SH7780=y
136# CONFIG_CPU_SUBTYPE_SH7785 is not set
137# CONFIG_CPU_SUBTYPE_SH73180 is not set
138# CONFIG_CPU_SUBTYPE_SH7343 is not set
139# CONFIG_CPU_SUBTYPE_SH7722 is not set
140
141#
142# Memory management options
143#
144CONFIG_QUICKLIST=y
145CONFIG_MMU=y
146CONFIG_PAGE_OFFSET=0x80000000
147CONFIG_MEMORY_START=0x08000000
148CONFIG_MEMORY_SIZE=0x08000000
149# CONFIG_32BIT is not set
150CONFIG_VSYSCALL=y
151CONFIG_ARCH_FLATMEM_ENABLE=y
152CONFIG_ARCH_SPARSEMEM_ENABLE=y
153CONFIG_ARCH_SPARSEMEM_DEFAULT=y
154CONFIG_MAX_ACTIVE_REGIONS=1
155CONFIG_ARCH_POPULATES_NODE_MAP=y
156CONFIG_ARCH_SELECT_MEMORY_MODEL=y
157CONFIG_PAGE_SIZE_4KB=y
158# CONFIG_PAGE_SIZE_8KB is not set
159# CONFIG_PAGE_SIZE_64KB is not set
160CONFIG_HUGETLB_PAGE_SIZE_64K=y
161# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
162# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
163# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
164# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set
165CONFIG_SELECT_MEMORY_MODEL=y
166CONFIG_FLATMEM_MANUAL=y
167# CONFIG_DISCONTIGMEM_MANUAL is not set
168# CONFIG_SPARSEMEM_MANUAL is not set
169CONFIG_FLATMEM=y
170CONFIG_FLAT_NODE_MEM_MAP=y
171CONFIG_SPARSEMEM_STATIC=y
172CONFIG_SPLIT_PTLOCK_CPUS=4
173# CONFIG_RESOURCES_64BIT is not set
174CONFIG_ZONE_DMA_FLAG=0
175CONFIG_NR_QUICK=2
176
177#
178# Cache configuration
179#
180# CONFIG_SH_DIRECT_MAPPED is not set
181# CONFIG_SH_WRITETHROUGH is not set
182# CONFIG_SH_OCRAM is not set
183
184#
185# Processor features
186#
187CONFIG_CPU_LITTLE_ENDIAN=y
188# CONFIG_CPU_BIG_ENDIAN is not set
189CONFIG_SH_FPU=y
190# CONFIG_SH_DSP is not set
191CONFIG_SH_STORE_QUEUES=y
192CONFIG_SPECULATIVE_EXECUTION=y
193CONFIG_CPU_HAS_INTEVT=y
194CONFIG_CPU_HAS_INTC_IRQ=y
195CONFIG_CPU_HAS_SR_RB=y
196
197#
198# Board support
199#
200# CONFIG_SH_7780_SOLUTION_ENGINE is not set
201CONFIG_SH_HIGHLANDER=y
202# CONFIG_SH_R7780RP is not set
203CONFIG_SH_R7780MP=y
204# CONFIG_SH_R7785RP is not set
205
206#
207# Timer and clock configuration
208#
209CONFIG_SH_TMU=y
210CONFIG_SH_TIMER_IRQ=28
211CONFIG_SH_PCLK_FREQ=32000000
212# CONFIG_TICK_ONESHOT is not set
213# CONFIG_NO_HZ is not set
214# CONFIG_HIGH_RES_TIMERS is not set
215
216#
217# CPU Frequency scaling
218#
219# CONFIG_CPU_FREQ is not set
220
221#
222# DMA support
223#
224# CONFIG_SH_DMA is not set
225
226#
227# Companion Chips
228#
229# CONFIG_HD6446X_SERIES is not set
230
231#
232# Additional SuperH Device Drivers
233#
234# CONFIG_HEARTBEAT is not set
235CONFIG_PUSH_SWITCH=y
236
237#
238# Kernel features
239#
240# CONFIG_HZ_100 is not set
241CONFIG_HZ_250=y
242# CONFIG_HZ_300 is not set
243# CONFIG_HZ_1000 is not set
244CONFIG_HZ=250
245CONFIG_KEXEC=y
246# CONFIG_CRASH_DUMP is not set
247# CONFIG_SMP is not set
248# CONFIG_PREEMPT_NONE is not set
249# CONFIG_PREEMPT_VOLUNTARY is not set
250CONFIG_PREEMPT=y
251CONFIG_PREEMPT_BKL=y
252
253#
254# Boot options
255#
256CONFIG_ZERO_PAGE_OFFSET=0x00001000
257CONFIG_BOOT_LINK_OFFSET=0x00800000
258# CONFIG_UBC_WAKEUP is not set
259CONFIG_CMDLINE_BOOL=y
260CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1"
261
262#
263# Bus options
264#
265CONFIG_PCI=y
266CONFIG_SH_PCIDMA_NONCOHERENT=y
267CONFIG_PCI_AUTO=y
268CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
269# CONFIG_ARCH_SUPPORTS_MSI is not set
270# CONFIG_PCI_DEBUG is not set
271
272#
273# PCCARD (PCMCIA/CardBus) support
274#
275# CONFIG_PCCARD is not set
276# CONFIG_HOTPLUG_PCI is not set
277
278#
279# Executable file formats
280#
281CONFIG_BINFMT_ELF=y
282# CONFIG_BINFMT_MISC is not set
283
284#
285# Power management options (EXPERIMENTAL)
286#
287# CONFIG_PM is not set
288
289#
290# Networking
291#
292CONFIG_NET=y
293
294#
295# Networking options
296#
297CONFIG_PACKET=y
298# CONFIG_PACKET_MMAP is not set
299CONFIG_UNIX=y
300CONFIG_XFRM=y
301# CONFIG_XFRM_USER is not set
302# CONFIG_XFRM_SUB_POLICY is not set
303# CONFIG_XFRM_MIGRATE is not set
304# CONFIG_NET_KEY is not set
305CONFIG_INET=y
306# CONFIG_IP_MULTICAST is not set
307CONFIG_IP_ADVANCED_ROUTER=y
308CONFIG_ASK_IP_FIB_HASH=y
309# CONFIG_IP_FIB_TRIE is not set
310CONFIG_IP_FIB_HASH=y
311# CONFIG_IP_MULTIPLE_TABLES is not set
312# CONFIG_IP_ROUTE_MULTIPATH is not set
313# CONFIG_IP_ROUTE_VERBOSE is not set
314CONFIG_IP_PNP=y
315CONFIG_IP_PNP_DHCP=y
316# CONFIG_IP_PNP_BOOTP is not set
317# CONFIG_IP_PNP_RARP is not set
318# CONFIG_NET_IPIP is not set
319# CONFIG_NET_IPGRE is not set
320# CONFIG_ARPD is not set
321# CONFIG_SYN_COOKIES is not set
322# CONFIG_INET_AH is not set
323# CONFIG_INET_ESP is not set
324# CONFIG_INET_IPCOMP is not set
325# CONFIG_INET_XFRM_TUNNEL is not set
326# CONFIG_INET_TUNNEL is not set
327CONFIG_INET_XFRM_MODE_TRANSPORT=y
328CONFIG_INET_XFRM_MODE_TUNNEL=y
329CONFIG_INET_XFRM_MODE_BEET=y
330CONFIG_INET_DIAG=y
331CONFIG_INET_TCP_DIAG=y
332# CONFIG_TCP_CONG_ADVANCED is not set
333CONFIG_TCP_CONG_CUBIC=y
334CONFIG_DEFAULT_TCP_CONG="cubic"
335# CONFIG_TCP_MD5SIG is not set
336# CONFIG_IPV6 is not set
337# CONFIG_INET6_XFRM_TUNNEL is not set
338# CONFIG_INET6_TUNNEL is not set
339# CONFIG_NETWORK_SECMARK is not set
340# CONFIG_NETFILTER is not set
341# CONFIG_IP_DCCP is not set
342# CONFIG_IP_SCTP is not set
343# CONFIG_TIPC is not set
344# CONFIG_ATM is not set
345CONFIG_BRIDGE=m
346# CONFIG_VLAN_8021Q is not set
347# CONFIG_DECNET is not set
348CONFIG_LLC=m
349# CONFIG_LLC2 is not set
350# CONFIG_IPX is not set
351# CONFIG_ATALK is not set
352# CONFIG_X25 is not set
353# CONFIG_LAPB is not set
354# CONFIG_ECONET is not set
355# CONFIG_WAN_ROUTER is not set
356
357#
358# QoS and/or fair queueing
359#
360# CONFIG_NET_SCHED is not set
361
362#
363# Network testing
364#
365# CONFIG_NET_PKTGEN is not set
366# CONFIG_HAMRADIO is not set
367# CONFIG_IRDA is not set
368# CONFIG_BT is not set
369# CONFIG_AF_RXRPC is not set
370
371#
372# Wireless
373#
374# CONFIG_CFG80211 is not set
375CONFIG_WIRELESS_EXT=y
376# CONFIG_MAC80211 is not set
377# CONFIG_IEEE80211 is not set
378# CONFIG_RFKILL is not set
379
380#
381# Device Drivers
382#
383
384#
385# Generic Driver Options
386#
387CONFIG_STANDALONE=y
388CONFIG_PREVENT_FIRMWARE_BUILD=y
389CONFIG_FW_LOADER=m
390# CONFIG_DEBUG_DRIVER is not set
391# CONFIG_DEBUG_DEVRES is not set
392# CONFIG_SYS_HYPERVISOR is not set
393
394#
395# Connector - unified userspace <-> kernelspace linker
396#
397# CONFIG_CONNECTOR is not set
398# CONFIG_MTD is not set
399
400#
401# Parallel port support
402#
403# CONFIG_PARPORT is not set
404
405#
406# Plug and Play support
407#
408# CONFIG_PNPACPI is not set
409
410#
411# Block devices
412#
413# CONFIG_BLK_CPQ_DA is not set
414# CONFIG_BLK_CPQ_CISS_DA is not set
415# CONFIG_BLK_DEV_DAC960 is not set
416# CONFIG_BLK_DEV_UMEM is not set
417# CONFIG_BLK_DEV_COW_COMMON is not set
418# CONFIG_BLK_DEV_LOOP is not set
419# CONFIG_BLK_DEV_NBD is not set
420# CONFIG_BLK_DEV_SX8 is not set
421CONFIG_BLK_DEV_RAM=y
422CONFIG_BLK_DEV_RAM_COUNT=16
423CONFIG_BLK_DEV_RAM_SIZE=4096
424CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
425# CONFIG_CDROM_PKTCDVD is not set
426# CONFIG_ATA_OVER_ETH is not set
427
428#
429# Misc devices
430#
431# CONFIG_PHANTOM is not set
432# CONFIG_SGI_IOC4 is not set
433# CONFIG_TIFM_CORE is not set
434# CONFIG_BLINK is not set
435# CONFIG_IDE is not set
436
437#
438# SCSI device support
439#
440# CONFIG_RAID_ATTRS is not set
441CONFIG_SCSI=y
442# CONFIG_SCSI_TGT is not set
443# CONFIG_SCSI_NETLINK is not set
444CONFIG_SCSI_PROC_FS=y
445
446#
447# SCSI support type (disk, tape, CD-ROM)
448#
449CONFIG_BLK_DEV_SD=y
450# CONFIG_CHR_DEV_ST is not set
451# CONFIG_CHR_DEV_OSST is not set
452# CONFIG_BLK_DEV_SR is not set
453CONFIG_CHR_DEV_SG=m
454# CONFIG_CHR_DEV_SCH is not set
455
456#
457# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
458#
459# CONFIG_SCSI_MULTI_LUN is not set
460# CONFIG_SCSI_CONSTANTS is not set
461# CONFIG_SCSI_LOGGING is not set
462# CONFIG_SCSI_SCAN_ASYNC is not set
463CONFIG_SCSI_WAIT_SCAN=m
464
465#
466# SCSI Transports
467#
468# CONFIG_SCSI_SPI_ATTRS is not set
469# CONFIG_SCSI_FC_ATTRS is not set
470# CONFIG_SCSI_ISCSI_ATTRS is not set
471# CONFIG_SCSI_SAS_ATTRS is not set
472# CONFIG_SCSI_SAS_LIBSAS is not set
473
474#
475# SCSI low-level drivers
476#
477# CONFIG_ISCSI_TCP is not set
478# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
479# CONFIG_SCSI_3W_9XXX is not set
480# CONFIG_SCSI_ACARD is not set
481# CONFIG_SCSI_AACRAID is not set
482# CONFIG_SCSI_AIC7XXX is not set
483# CONFIG_SCSI_AIC7XXX_OLD is not set
484# CONFIG_SCSI_AIC79XX is not set
485# CONFIG_SCSI_AIC94XX is not set
486# CONFIG_SCSI_DPT_I2O is not set
487# CONFIG_SCSI_ARCMSR is not set
488# CONFIG_MEGARAID_NEWGEN is not set
489# CONFIG_MEGARAID_LEGACY is not set
490# CONFIG_MEGARAID_SAS is not set
491# CONFIG_SCSI_HPTIOP is not set
492# CONFIG_SCSI_DMX3191D is not set
493# CONFIG_SCSI_FUTURE_DOMAIN is not set
494# CONFIG_SCSI_IPS is not set
495# CONFIG_SCSI_INITIO is not set
496# CONFIG_SCSI_INIA100 is not set
497# CONFIG_SCSI_STEX is not set
498# CONFIG_SCSI_SYM53C8XX_2 is not set
499# CONFIG_SCSI_IPR is not set
500# CONFIG_SCSI_QLOGIC_1280 is not set
501# CONFIG_SCSI_QLA_FC is not set
502# CONFIG_SCSI_QLA_ISCSI is not set
503# CONFIG_SCSI_LPFC is not set
504# CONFIG_SCSI_DC395x is not set
505# CONFIG_SCSI_DC390T is not set
506# CONFIG_SCSI_NSP32 is not set
507# CONFIG_SCSI_DEBUG is not set
508# CONFIG_SCSI_SRP is not set
509CONFIG_ATA=y
510# CONFIG_ATA_NONSTANDARD is not set
511# CONFIG_SATA_AHCI is not set
512# CONFIG_SATA_SVW is not set
513# CONFIG_ATA_PIIX is not set
514# CONFIG_SATA_MV is not set
515# CONFIG_SATA_NV is not set
516# CONFIG_PDC_ADMA is not set
517# CONFIG_SATA_QSTOR is not set
518# CONFIG_SATA_PROMISE is not set
519# CONFIG_SATA_SX4 is not set
520CONFIG_SATA_SIL=y
521# CONFIG_SATA_SIL24 is not set
522# CONFIG_SATA_SIS is not set
523# CONFIG_SATA_ULI is not set
524# CONFIG_SATA_VIA is not set
525# CONFIG_SATA_VITESSE is not set
526# CONFIG_SATA_INIC162X is not set
527# CONFIG_PATA_ALI is not set
528# CONFIG_PATA_AMD is not set
529# CONFIG_PATA_ARTOP is not set
530# CONFIG_PATA_ATIIXP is not set
531# CONFIG_PATA_CMD640_PCI is not set
532# CONFIG_PATA_CMD64X is not set
533# CONFIG_PATA_CS5520 is not set
534# CONFIG_PATA_CS5530 is not set
535# CONFIG_PATA_CYPRESS is not set
536# CONFIG_PATA_EFAR is not set
537# CONFIG_ATA_GENERIC is not set
538# CONFIG_PATA_HPT366 is not set
539# CONFIG_PATA_HPT37X is not set
540# CONFIG_PATA_HPT3X2N is not set
541# CONFIG_PATA_HPT3X3 is not set
542# CONFIG_PATA_IT821X is not set
543# CONFIG_PATA_IT8213 is not set
544# CONFIG_PATA_JMICRON is not set
545# CONFIG_PATA_TRIFLEX is not set
546# CONFIG_PATA_MARVELL is not set
547# CONFIG_PATA_MPIIX is not set
548# CONFIG_PATA_OLDPIIX is not set
549# CONFIG_PATA_NETCELL is not set
550# CONFIG_PATA_NS87410 is not set
551# CONFIG_PATA_OPTI is not set
552# CONFIG_PATA_OPTIDMA is not set
553# CONFIG_PATA_PDC_OLD is not set
554# CONFIG_PATA_RADISYS is not set
555# CONFIG_PATA_RZ1000 is not set
556# CONFIG_PATA_SC1200 is not set
557# CONFIG_PATA_SERVERWORKS is not set
558# CONFIG_PATA_PDC2027X is not set
559# CONFIG_PATA_SIL680 is not set
560# CONFIG_PATA_SIS is not set
561# CONFIG_PATA_VIA is not set
562# CONFIG_PATA_WINBOND is not set
563CONFIG_PATA_PLATFORM=y
564
565#
566# Multi-device support (RAID and LVM)
567#
568# CONFIG_MD is not set
569
570#
571# Fusion MPT device support
572#
573# CONFIG_FUSION is not set
574# CONFIG_FUSION_SPI is not set
575# CONFIG_FUSION_FC is not set
576# CONFIG_FUSION_SAS is not set
577
578#
579# IEEE 1394 (FireWire) support
580#
581# CONFIG_FIREWIRE is not set
582# CONFIG_IEEE1394 is not set
583
584#
585# I2O device support
586#
587# CONFIG_I2O is not set
588
589#
590# Network device support
591#
592CONFIG_NETDEVICES=y
593# CONFIG_DUMMY is not set
594# CONFIG_BONDING is not set
595# CONFIG_EQUALIZER is not set
596# CONFIG_TUN is not set
597# CONFIG_ARCNET is not set
598# CONFIG_PHYLIB is not set
599
600#
601# Ethernet (10 or 100Mbit)
602#
603CONFIG_NET_ETHERNET=y
604CONFIG_MII=y
605# CONFIG_STNIC is not set
606# CONFIG_HAPPYMEAL is not set
607# CONFIG_SUNGEM is not set
608# CONFIG_CASSINI is not set
609# CONFIG_NET_VENDOR_3COM is not set
610# CONFIG_SMC91X is not set
611
612#
613# Tulip family network device support
614#
615# CONFIG_NET_TULIP is not set
616# CONFIG_HP100 is not set
617CONFIG_NET_PCI=y
618CONFIG_PCNET32=m
619# CONFIG_PCNET32_NAPI is not set
620# CONFIG_AMD8111_ETH is not set
621# CONFIG_ADAPTEC_STARFIRE is not set
622# CONFIG_B44 is not set
623# CONFIG_FORCEDETH is not set
624# CONFIG_DGRS is not set
625# CONFIG_EEPRO100 is not set
626# CONFIG_E100 is not set
627# CONFIG_FEALNX is not set
628# CONFIG_NATSEMI is not set
629# CONFIG_NE2K_PCI is not set
630CONFIG_8139CP=m
631CONFIG_8139TOO=m
632# CONFIG_8139TOO_PIO is not set
633# CONFIG_8139TOO_TUNE_TWISTER is not set
634CONFIG_8139TOO_8129=y
635# CONFIG_8139_OLD_RX_RESET is not set
636# CONFIG_SIS900 is not set
637# CONFIG_EPIC100 is not set
638# CONFIG_SUNDANCE is not set
639# CONFIG_TLAN is not set
640CONFIG_VIA_RHINE=m
641CONFIG_VIA_RHINE_MMIO=y
642# CONFIG_VIA_RHINE_NAPI is not set
643# CONFIG_SC92031 is not set
644CONFIG_NETDEV_1000=y
645# CONFIG_ACENIC is not set
646# CONFIG_DL2K is not set
647CONFIG_E1000=m
648# CONFIG_E1000_NAPI is not set
649# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
650# CONFIG_NS83820 is not set
651# CONFIG_HAMACHI is not set
652# CONFIG_YELLOWFIN is not set
653CONFIG_R8169=y
654# CONFIG_R8169_NAPI is not set
655# CONFIG_SIS190 is not set
656# CONFIG_SKGE is not set
657# CONFIG_SKY2 is not set
658# CONFIG_SK98LIN is not set
659# CONFIG_VIA_VELOCITY is not set
660# CONFIG_TIGON3 is not set
661# CONFIG_BNX2 is not set
662# CONFIG_QLA3XXX is not set
663# CONFIG_ATL1 is not set
664CONFIG_NETDEV_10000=y
665# CONFIG_CHELSIO_T1 is not set
666# CONFIG_CHELSIO_T3 is not set
667# CONFIG_IXGB is not set
668# CONFIG_S2IO is not set
669# CONFIG_MYRI10GE is not set
670# CONFIG_NETXEN_NIC is not set
671# CONFIG_MLX4_CORE is not set
672# CONFIG_TR is not set
673
674#
675# Wireless LAN
676#
677# CONFIG_WLAN_PRE80211 is not set
678# CONFIG_WLAN_80211 is not set
679# CONFIG_WAN is not set
680# CONFIG_FDDI is not set
681# CONFIG_HIPPI is not set
682# CONFIG_PPP is not set
683# CONFIG_SLIP is not set
684# CONFIG_NET_FC is not set
685# CONFIG_SHAPER is not set
686# CONFIG_NETCONSOLE is not set
687# CONFIG_NETPOLL is not set
688# CONFIG_NET_POLL_CONTROLLER is not set
689
690#
691# ISDN subsystem
692#
693# CONFIG_ISDN is not set
694
695#
696# Telephony Support
697#
698# CONFIG_PHONE is not set
699
700#
701# Input device support
702#
703CONFIG_INPUT=y
704# CONFIG_INPUT_FF_MEMLESS is not set
705
706#
707# Userland interfaces
708#
709CONFIG_INPUT_MOUSEDEV=y
710# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
711CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
712CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
713# CONFIG_INPUT_JOYDEV is not set
714# CONFIG_INPUT_TSDEV is not set
715# CONFIG_INPUT_EVDEV is not set
716# CONFIG_INPUT_EVBUG is not set
717
718#
719# Input Device Drivers
720#
721CONFIG_INPUT_KEYBOARD=y
722CONFIG_KEYBOARD_ATKBD=y
723# CONFIG_KEYBOARD_SUNKBD is not set
724# CONFIG_KEYBOARD_LKKBD is not set
725# CONFIG_KEYBOARD_XTKBD is not set
726# CONFIG_KEYBOARD_NEWTON is not set
727# CONFIG_KEYBOARD_STOWAWAY is not set
728# CONFIG_INPUT_MOUSE is not set
729# CONFIG_INPUT_JOYSTICK is not set
730# CONFIG_INPUT_TABLET is not set
731# CONFIG_INPUT_TOUCHSCREEN is not set
732# CONFIG_INPUT_MISC is not set
733
734#
735# Hardware I/O ports
736#
737CONFIG_SERIO=y
738# CONFIG_SERIO_I8042 is not set
739# CONFIG_SERIO_SERPORT is not set
740# CONFIG_SERIO_PCIPS2 is not set
741CONFIG_SERIO_LIBPS2=y
742# CONFIG_SERIO_RAW is not set
743# CONFIG_GAMEPORT is not set
744
745#
746# Character devices
747#
748# CONFIG_VT is not set
749# CONFIG_SERIAL_NONSTANDARD is not set
750
751#
752# Serial drivers
753#
754# CONFIG_SERIAL_8250 is not set
755
756#
757# Non-8250 serial port support
758#
759CONFIG_SERIAL_SH_SCI=y
760CONFIG_SERIAL_SH_SCI_NR_UARTS=2
761CONFIG_SERIAL_SH_SCI_CONSOLE=y
762CONFIG_SERIAL_CORE=y
763CONFIG_SERIAL_CORE_CONSOLE=y
764# CONFIG_SERIAL_JSM is not set
765CONFIG_UNIX98_PTYS=y
766CONFIG_LEGACY_PTYS=y
767CONFIG_LEGACY_PTY_COUNT=256
768
769#
770# IPMI
771#
772# CONFIG_IPMI_HANDLER is not set
773# CONFIG_WATCHDOG is not set
774CONFIG_HW_RANDOM=y
775# CONFIG_R3964 is not set
776# CONFIG_APPLICOM is not set
777# CONFIG_DRM is not set
778# CONFIG_RAW_DRIVER is not set
779
780#
781# TPM devices
782#
783# CONFIG_TCG_TPM is not set
784CONFIG_DEVPORT=y
785# CONFIG_I2C is not set
786
787#
788# SPI support
789#
790# CONFIG_SPI is not set
791# CONFIG_SPI_MASTER is not set
792
793#
794# Dallas's 1-wire bus
795#
796# CONFIG_W1 is not set
797CONFIG_HWMON=y
798# CONFIG_HWMON_VID is not set
799# CONFIG_SENSORS_ABITUGURU is not set
800# CONFIG_SENSORS_F71805F is not set
801# CONFIG_SENSORS_PC87427 is not set
802# CONFIG_SENSORS_SMSC47M1 is not set
803# CONFIG_SENSORS_SMSC47B397 is not set
804# CONFIG_SENSORS_VT1211 is not set
805# CONFIG_SENSORS_W83627HF is not set
806# CONFIG_HWMON_DEBUG_CHIP is not set
807
808#
809# Multifunction device drivers
810#
811# CONFIG_MFD_SM501 is not set
812
813#
814# Multimedia devices
815#
816# CONFIG_VIDEO_DEV is not set
817# CONFIG_DVB_CORE is not set
818CONFIG_DAB=y
819
820#
821# Graphics support
822#
823# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
824
825#
826# Display device support
827#
828# CONFIG_DISPLAY_SUPPORT is not set
829# CONFIG_VGASTATE is not set
830# CONFIG_FB is not set
831
832#
833# Sound
834#
835CONFIG_SOUND=m
836
837#
838# Advanced Linux Sound Architecture
839#
840# CONFIG_SND is not set
841
842#
843# Open Sound System
844#
845CONFIG_SOUND_PRIME=m
846# CONFIG_OSS_OBSOLETE is not set
847# CONFIG_SOUND_TRIDENT is not set
848# CONFIG_SOUND_MSNDCLAS is not set
849# CONFIG_SOUND_MSNDPIN is not set
850
851#
852# HID Devices
853#
854CONFIG_HID=y
855# CONFIG_HID_DEBUG is not set
856
857#
858# USB support
859#
860CONFIG_USB_ARCH_HAS_HCD=y
861CONFIG_USB_ARCH_HAS_OHCI=y
862CONFIG_USB_ARCH_HAS_EHCI=y
863# CONFIG_USB is not set
864
865#
866# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
867#
868
869#
870# USB Gadget Support
871#
872# CONFIG_USB_GADGET is not set
873# CONFIG_MMC is not set
874
875#
876# LED devices
877#
878# CONFIG_NEW_LEDS is not set
879
880#
881# LED drivers
882#
883
884#
885# LED Triggers
886#
887
888#
889# InfiniBand support
890#
891# CONFIG_INFINIBAND is not set
892
893#
894# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
895#
896
897#
898# Real Time Clock
899#
900CONFIG_RTC_LIB=y
901CONFIG_RTC_CLASS=y
902CONFIG_RTC_HCTOSYS=y
903CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
904# CONFIG_RTC_DEBUG is not set
905
906#
907# RTC interfaces
908#
909CONFIG_RTC_INTF_SYSFS=y
910CONFIG_RTC_INTF_PROC=y
911CONFIG_RTC_INTF_DEV=y
912# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
913# CONFIG_RTC_DRV_TEST is not set
914
915#
916# I2C RTC drivers
917#
918
919#
920# SPI RTC drivers
921#
922
923#
924# Platform RTC drivers
925#
926# CONFIG_RTC_DRV_DS1553 is not set
927# CONFIG_RTC_DRV_DS1742 is not set
928# CONFIG_RTC_DRV_M48T86 is not set
929# CONFIG_RTC_DRV_V3020 is not set
930
931#
932# on-CPU RTC drivers
933#
934CONFIG_RTC_DRV_SH=y
935
936#
937# DMA Engine support
938#
939# CONFIG_DMA_ENGINE is not set
940
941#
942# DMA Clients
943#
944
945#
946# DMA Devices
947#
948
949#
950# File systems
951#
952CONFIG_EXT2_FS=y
953# CONFIG_EXT2_FS_XATTR is not set
954# CONFIG_EXT2_FS_XIP is not set
955CONFIG_EXT3_FS=y
956CONFIG_EXT3_FS_XATTR=y
957# CONFIG_EXT3_FS_POSIX_ACL is not set
958# CONFIG_EXT3_FS_SECURITY is not set
959# CONFIG_EXT4DEV_FS is not set
960CONFIG_JBD=y
961# CONFIG_JBD_DEBUG is not set
962CONFIG_FS_MBCACHE=y
963# CONFIG_REISERFS_FS is not set
964# CONFIG_JFS_FS is not set
965CONFIG_FS_POSIX_ACL=y
966# CONFIG_XFS_FS is not set
967# CONFIG_GFS2_FS is not set
968# CONFIG_OCFS2_FS is not set
969CONFIG_MINIX_FS=y
970# CONFIG_ROMFS_FS is not set
971CONFIG_INOTIFY=y
972CONFIG_INOTIFY_USER=y
973# CONFIG_QUOTA is not set
974CONFIG_DNOTIFY=y
975# CONFIG_AUTOFS_FS is not set
976# CONFIG_AUTOFS4_FS is not set
977CONFIG_FUSE_FS=m
978
979#
980# CD-ROM/DVD Filesystems
981#
982# CONFIG_ISO9660_FS is not set
983# CONFIG_UDF_FS is not set
984
985#
986# DOS/FAT/NT Filesystems
987#
988CONFIG_FAT_FS=y
989CONFIG_MSDOS_FS=y
990CONFIG_VFAT_FS=y
991CONFIG_FAT_DEFAULT_CODEPAGE=437
992CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
993CONFIG_NTFS_FS=y
994# CONFIG_NTFS_DEBUG is not set
995CONFIG_NTFS_RW=y
996
997#
998# Pseudo filesystems
999#
1000CONFIG_PROC_FS=y
1001CONFIG_PROC_KCORE=y
1002CONFIG_PROC_SYSCTL=y
1003CONFIG_SYSFS=y
1004CONFIG_TMPFS=y
1005# CONFIG_TMPFS_POSIX_ACL is not set
1006CONFIG_HUGETLBFS=y
1007CONFIG_HUGETLB_PAGE=y
1008CONFIG_RAMFS=y
1009CONFIG_CONFIGFS_FS=m
1010
1011#
1012# Miscellaneous filesystems
1013#
1014# CONFIG_ADFS_FS is not set
1015# CONFIG_AFFS_FS is not set
1016# CONFIG_HFS_FS is not set
1017# CONFIG_HFSPLUS_FS is not set
1018# CONFIG_BEFS_FS is not set
1019# CONFIG_BFS_FS is not set
1020# CONFIG_EFS_FS is not set
1021# CONFIG_CRAMFS is not set
1022# CONFIG_VXFS_FS is not set
1023# CONFIG_HPFS_FS is not set
1024# CONFIG_QNX4FS_FS is not set
1025# CONFIG_SYSV_FS is not set
1026# CONFIG_UFS_FS is not set
1027
1028#
1029# Network File Systems
1030#
1031CONFIG_NFS_FS=y
1032CONFIG_NFS_V3=y
1033# CONFIG_NFS_V3_ACL is not set
1034CONFIG_NFS_V4=y
1035# CONFIG_NFS_DIRECTIO is not set
1036CONFIG_NFSD=y
1037CONFIG_NFSD_V3=y
1038# CONFIG_NFSD_V3_ACL is not set
1039CONFIG_NFSD_V4=y
1040CONFIG_NFSD_TCP=y
1041CONFIG_ROOT_NFS=y
1042CONFIG_LOCKD=y
1043CONFIG_LOCKD_V4=y
1044CONFIG_EXPORTFS=y
1045CONFIG_NFS_COMMON=y
1046CONFIG_SUNRPC=y
1047CONFIG_SUNRPC_GSS=y
1048# CONFIG_SUNRPC_BIND34 is not set
1049CONFIG_RPCSEC_GSS_KRB5=y
1050# CONFIG_RPCSEC_GSS_SPKM3 is not set
1051# CONFIG_SMB_FS is not set
1052# CONFIG_CIFS is not set
1053# CONFIG_NCP_FS is not set
1054# CONFIG_CODA_FS is not set
1055# CONFIG_AFS_FS is not set
1056# CONFIG_9P_FS is not set
1057
1058#
1059# Partition Types
1060#
1061# CONFIG_PARTITION_ADVANCED is not set
1062CONFIG_MSDOS_PARTITION=y
1063
1064#
1065# Native Language Support
1066#
1067CONFIG_NLS=y
1068CONFIG_NLS_DEFAULT="iso8859-1"
1069CONFIG_NLS_CODEPAGE_437=y
1070# CONFIG_NLS_CODEPAGE_737 is not set
1071# CONFIG_NLS_CODEPAGE_775 is not set
1072# CONFIG_NLS_CODEPAGE_850 is not set
1073# CONFIG_NLS_CODEPAGE_852 is not set
1074# CONFIG_NLS_CODEPAGE_855 is not set
1075# CONFIG_NLS_CODEPAGE_857 is not set
1076# CONFIG_NLS_CODEPAGE_860 is not set
1077# CONFIG_NLS_CODEPAGE_861 is not set
1078# CONFIG_NLS_CODEPAGE_862 is not set
1079# CONFIG_NLS_CODEPAGE_863 is not set
1080# CONFIG_NLS_CODEPAGE_864 is not set
1081# CONFIG_NLS_CODEPAGE_865 is not set
1082# CONFIG_NLS_CODEPAGE_866 is not set
1083# CONFIG_NLS_CODEPAGE_869 is not set
1084# CONFIG_NLS_CODEPAGE_936 is not set
1085# CONFIG_NLS_CODEPAGE_950 is not set
1086CONFIG_NLS_CODEPAGE_932=y
1087# CONFIG_NLS_CODEPAGE_949 is not set
1088# CONFIG_NLS_CODEPAGE_874 is not set
1089# CONFIG_NLS_ISO8859_8 is not set
1090# CONFIG_NLS_CODEPAGE_1250 is not set
1091# CONFIG_NLS_CODEPAGE_1251 is not set
1092# CONFIG_NLS_ASCII is not set
1093CONFIG_NLS_ISO8859_1=y
1094# CONFIG_NLS_ISO8859_2 is not set
1095# CONFIG_NLS_ISO8859_3 is not set
1096# CONFIG_NLS_ISO8859_4 is not set
1097# CONFIG_NLS_ISO8859_5 is not set
1098# CONFIG_NLS_ISO8859_6 is not set
1099# CONFIG_NLS_ISO8859_7 is not set
1100# CONFIG_NLS_ISO8859_9 is not set
1101# CONFIG_NLS_ISO8859_13 is not set
1102# CONFIG_NLS_ISO8859_14 is not set
1103# CONFIG_NLS_ISO8859_15 is not set
1104# CONFIG_NLS_KOI8_R is not set
1105# CONFIG_NLS_KOI8_U is not set
1106# CONFIG_NLS_UTF8 is not set
1107
1108#
1109# Distributed Lock Manager
1110#
1111# CONFIG_DLM is not set
1112
1113#
1114# Profiling support
1115#
1116CONFIG_PROFILING=y
1117CONFIG_OPROFILE=m
1118
1119#
1120# Kernel hacking
1121#
1122CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1123# CONFIG_PRINTK_TIME is not set
1124CONFIG_ENABLE_MUST_CHECK=y
1125CONFIG_MAGIC_SYSRQ=y
1126# CONFIG_UNUSED_SYMBOLS is not set
1127CONFIG_DEBUG_FS=y
1128# CONFIG_HEADERS_CHECK is not set
1129CONFIG_DEBUG_KERNEL=y
1130# CONFIG_DEBUG_SHIRQ is not set
1131CONFIG_DETECT_SOFTLOCKUP=y
1132# CONFIG_SCHEDSTATS is not set
1133# CONFIG_TIMER_STATS is not set
1134# CONFIG_DEBUG_SLAB is not set
1135# CONFIG_DEBUG_PREEMPT is not set
1136# CONFIG_DEBUG_SPINLOCK is not set
1137# CONFIG_DEBUG_MUTEXES is not set
1138# CONFIG_DEBUG_LOCK_ALLOC is not set
1139# CONFIG_PROVE_LOCKING is not set
1140# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1141# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1142# CONFIG_DEBUG_KOBJECT is not set
1143CONFIG_DEBUG_BUGVERBOSE=y
1144CONFIG_DEBUG_INFO=y
1145# CONFIG_DEBUG_VM is not set
1146# CONFIG_DEBUG_LIST is not set
1147# CONFIG_FRAME_POINTER is not set
1148CONFIG_FORCED_INLINING=y
1149# CONFIG_RCU_TORTURE_TEST is not set
1150# CONFIG_FAULT_INJECTION is not set
1151CONFIG_SH_STANDARD_BIOS=y
1152# CONFIG_EARLY_SCIF_CONSOLE is not set
1153CONFIG_EARLY_PRINTK=y
1154# CONFIG_DEBUG_BOOTMEM is not set
1155CONFIG_DEBUG_STACKOVERFLOW=y
1156# CONFIG_DEBUG_STACK_USAGE is not set
1157# CONFIG_4KSTACKS is not set
1158# CONFIG_SH_KGDB is not set
1159
1160#
1161# Security options
1162#
1163# CONFIG_KEYS is not set
1164# CONFIG_SECURITY is not set
1165
1166#
1167# Cryptographic options
1168#
1169CONFIG_CRYPTO=y
1170CONFIG_CRYPTO_ALGAPI=y
1171CONFIG_CRYPTO_BLKCIPHER=y
1172CONFIG_CRYPTO_HASH=y
1173CONFIG_CRYPTO_MANAGER=y
1174CONFIG_CRYPTO_HMAC=y
1175# CONFIG_CRYPTO_XCBC is not set
1176# CONFIG_CRYPTO_NULL is not set
1177# CONFIG_CRYPTO_MD4 is not set
1178CONFIG_CRYPTO_MD5=y
1179# CONFIG_CRYPTO_SHA1 is not set
1180# CONFIG_CRYPTO_SHA256 is not set
1181# CONFIG_CRYPTO_SHA512 is not set
1182# CONFIG_CRYPTO_WP512 is not set
1183# CONFIG_CRYPTO_TGR192 is not set
1184# CONFIG_CRYPTO_GF128MUL is not set
1185CONFIG_CRYPTO_ECB=m
1186CONFIG_CRYPTO_CBC=y
1187CONFIG_CRYPTO_PCBC=m
1188# CONFIG_CRYPTO_LRW is not set
1189# CONFIG_CRYPTO_CRYPTD is not set
1190CONFIG_CRYPTO_DES=y
1191# CONFIG_CRYPTO_FCRYPT is not set
1192# CONFIG_CRYPTO_BLOWFISH is not set
1193# CONFIG_CRYPTO_TWOFISH is not set
1194# CONFIG_CRYPTO_SERPENT is not set
1195# CONFIG_CRYPTO_AES is not set
1196# CONFIG_CRYPTO_CAST5 is not set
1197# CONFIG_CRYPTO_CAST6 is not set
1198# CONFIG_CRYPTO_TEA is not set
1199# CONFIG_CRYPTO_ARC4 is not set
1200# CONFIG_CRYPTO_KHAZAD is not set
1201# CONFIG_CRYPTO_ANUBIS is not set
1202# CONFIG_CRYPTO_DEFLATE is not set
1203# CONFIG_CRYPTO_MICHAEL_MIC is not set
1204# CONFIG_CRYPTO_CRC32C is not set
1205# CONFIG_CRYPTO_CAMELLIA is not set
1206# CONFIG_CRYPTO_TEST is not set
1207
1208#
1209# Hardware crypto devices
1210#
1211
1212#
1213# Library routines
1214#
1215CONFIG_BITREVERSE=y
1216# CONFIG_CRC_CCITT is not set
1217# CONFIG_CRC16 is not set
1218# CONFIG_CRC_ITU_T is not set
1219CONFIG_CRC32=y
1220# CONFIG_LIBCRC32C is not set
1221CONFIG_HAS_IOMEM=y
1222CONFIG_HAS_IOPORT=y
1223CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/r7780rp_defconfig b/arch/sh/configs/r7780rp_defconfig
index 48c6a2194c98..12cc01910cf8 100644
--- a/arch/sh/configs/r7780rp_defconfig
+++ b/arch/sh/configs/r7780rp_defconfig
@@ -241,7 +241,7 @@ CONFIG_SH_FPU=y
241CONFIG_SH_STORE_QUEUES=y 241CONFIG_SH_STORE_QUEUES=y
242CONFIG_SPECULATIVE_EXECUTION=y 242CONFIG_SPECULATIVE_EXECUTION=y
243CONFIG_CPU_HAS_INTEVT=y 243CONFIG_CPU_HAS_INTEVT=y
244CONFIG_CPU_HAS_INTC2_IRQ=y 244CONFIG_CPU_HAS_INTC_IRQ=y
245CONFIG_CPU_HAS_SR_RB=y 245CONFIG_CPU_HAS_SR_RB=y
246 246
247# 247#
diff --git a/arch/sh/configs/r7785rp_defconfig b/arch/sh/configs/r7785rp_defconfig
index 0f5ec649daf8..5c29338532da 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.21-rc3 3# Linux kernel version: 2.6.22-rc4
4# Mon Mar 12 14:26:33 2007 4# Thu Jul 12 12:33:15 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -11,7 +11,9 @@ CONFIG_GENERIC_HWEIGHT=y
11CONFIG_GENERIC_HARDIRQS=y 11CONFIG_GENERIC_HARDIRQS=y
12CONFIG_GENERIC_IRQ_PROBE=y 12CONFIG_GENERIC_IRQ_PROBE=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
14# CONFIG_GENERIC_TIME is not set 14CONFIG_GENERIC_TIME=y
15CONFIG_GENERIC_CLOCKEVENTS=y
16CONFIG_SYS_SUPPORTS_PCI=y
15CONFIG_STACKTRACE_SUPPORT=y 17CONFIG_STACKTRACE_SUPPORT=y
16CONFIG_LOCKDEP_SUPPORT=y 18CONFIG_LOCKDEP_SUPPORT=y
17# CONFIG_ARCH_HAS_ILOG2_U32 is not set 19# CONFIG_ARCH_HAS_ILOG2_U32 is not set
@@ -43,6 +45,7 @@ CONFIG_BSD_PROCESS_ACCT=y
43# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
44CONFIG_IKCONFIG=y 46CONFIG_IKCONFIG=y
45CONFIG_IKCONFIG_PROC=y 47CONFIG_IKCONFIG_PROC=y
48CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_SYSFS_DEPRECATED is not set 49# CONFIG_SYSFS_DEPRECATED is not set
47# CONFIG_RELAY is not set 50# CONFIG_RELAY is not set
48# CONFIG_BLK_DEV_INITRD is not set 51# CONFIG_BLK_DEV_INITRD is not set
@@ -60,13 +63,18 @@ CONFIG_BUG=y
60CONFIG_ELF_CORE=y 63CONFIG_ELF_CORE=y
61CONFIG_BASE_FULL=y 64CONFIG_BASE_FULL=y
62# CONFIG_FUTEX is not set 65# CONFIG_FUTEX is not set
66CONFIG_ANON_INODES=y
63# CONFIG_EPOLL is not set 67# CONFIG_EPOLL is not set
68CONFIG_SIGNALFD=y
69CONFIG_TIMERFD=y
70CONFIG_EVENTFD=y
64CONFIG_SHMEM=y 71CONFIG_SHMEM=y
65CONFIG_SLAB=y
66CONFIG_VM_EVENT_COUNTERS=y 72CONFIG_VM_EVENT_COUNTERS=y
73CONFIG_SLAB=y
74# CONFIG_SLUB is not set
75# CONFIG_SLOB is not set
67# CONFIG_TINY_SHMEM is not set 76# CONFIG_TINY_SHMEM is not set
68CONFIG_BASE_SMALL=0 77CONFIG_BASE_SMALL=0
69# CONFIG_SLOB is not set
70 78
71# 79#
72# Loadable module support 80# Loadable module support
@@ -102,55 +110,11 @@ CONFIG_DEFAULT_IOSCHED="noop"
102# 110#
103# System type 111# System type
104# 112#
105# CONFIG_SH_SOLUTION_ENGINE is not set
106# CONFIG_SH_7751_SOLUTION_ENGINE is not set
107# CONFIG_SH_7300_SOLUTION_ENGINE is not set
108# CONFIG_SH_7343_SOLUTION_ENGINE is not set
109# CONFIG_SH_73180_SOLUTION_ENGINE is not set
110# CONFIG_SH_7751_SYSTEMH is not set
111# CONFIG_SH_HP6XX is not set
112# CONFIG_SH_SATURN is not set
113# CONFIG_SH_DREAMCAST is not set
114# CONFIG_SH_MPC1211 is not set
115# CONFIG_SH_SH03 is not set
116# CONFIG_SH_SECUREEDGE5410 is not set
117# CONFIG_SH_HS7751RVOIP is not set
118# CONFIG_SH_7710VOIPGW is not set
119# CONFIG_SH_RTS7751R2D is not set
120CONFIG_SH_HIGHLANDER=y
121# CONFIG_SH_EDOSK7705 is not set
122# CONFIG_SH_SH4202_MICRODEV is not set
123# CONFIG_SH_LANDISK is not set
124# CONFIG_SH_TITAN is not set
125# CONFIG_SH_SHMIN is not set
126# CONFIG_SH_7206_SOLUTION_ENGINE is not set
127# CONFIG_SH_7619_SOLUTION_ENGINE is not set
128# CONFIG_SH_UNKNOWN is not set
129# CONFIG_SH_R7780RP is not set
130# CONFIG_SH_R7780MP is not set
131CONFIG_SH_R7785RP=y
132
133#
134# Processor selection
135#
136CONFIG_CPU_SH4=y 113CONFIG_CPU_SH4=y
137CONFIG_CPU_SH4A=y 114CONFIG_CPU_SH4A=y
138CONFIG_CPU_SHX2=y 115CONFIG_CPU_SHX2=y
139
140#
141# SH-2 Processor Support
142#
143# CONFIG_CPU_SUBTYPE_SH7604 is not set
144# CONFIG_CPU_SUBTYPE_SH7619 is not set 116# CONFIG_CPU_SUBTYPE_SH7619 is not set
145
146#
147# SH-2A Processor Support
148#
149# CONFIG_CPU_SUBTYPE_SH7206 is not set 117# CONFIG_CPU_SUBTYPE_SH7206 is not set
150
151#
152# SH-3 Processor Support
153#
154# CONFIG_CPU_SUBTYPE_SH7300 is not set 118# CONFIG_CPU_SUBTYPE_SH7300 is not set
155# CONFIG_CPU_SUBTYPE_SH7705 is not set 119# CONFIG_CPU_SUBTYPE_SH7705 is not set
156# CONFIG_CPU_SUBTYPE_SH7706 is not set 120# CONFIG_CPU_SUBTYPE_SH7706 is not set
@@ -158,10 +122,7 @@ CONFIG_CPU_SHX2=y
158# CONFIG_CPU_SUBTYPE_SH7708 is not set 122# CONFIG_CPU_SUBTYPE_SH7708 is not set
159# CONFIG_CPU_SUBTYPE_SH7709 is not set 123# CONFIG_CPU_SUBTYPE_SH7709 is not set
160# CONFIG_CPU_SUBTYPE_SH7710 is not set 124# CONFIG_CPU_SUBTYPE_SH7710 is not set
161 125# CONFIG_CPU_SUBTYPE_SH7712 is not set
162#
163# SH-4 Processor Support
164#
165# CONFIG_CPU_SUBTYPE_SH7750 is not set 126# CONFIG_CPU_SUBTYPE_SH7750 is not set
166# CONFIG_CPU_SUBTYPE_SH7091 is not set 127# CONFIG_CPU_SUBTYPE_SH7091 is not set
167# CONFIG_CPU_SUBTYPE_SH7750R is not set 128# CONFIG_CPU_SUBTYPE_SH7750R is not set
@@ -170,23 +131,12 @@ CONFIG_CPU_SHX2=y
170# CONFIG_CPU_SUBTYPE_SH7751R is not set 131# CONFIG_CPU_SUBTYPE_SH7751R is not set
171# CONFIG_CPU_SUBTYPE_SH7760 is not set 132# CONFIG_CPU_SUBTYPE_SH7760 is not set
172# CONFIG_CPU_SUBTYPE_SH4_202 is not set 133# CONFIG_CPU_SUBTYPE_SH4_202 is not set
173
174#
175# ST40 Processor Support
176#
177# CONFIG_CPU_SUBTYPE_ST40STB1 is not set 134# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
178# CONFIG_CPU_SUBTYPE_ST40GX1 is not set 135# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
179
180#
181# SH-4A Processor Support
182#
183# CONFIG_CPU_SUBTYPE_SH7770 is not set 136# CONFIG_CPU_SUBTYPE_SH7770 is not set
184# CONFIG_CPU_SUBTYPE_SH7780 is not set 137# CONFIG_CPU_SUBTYPE_SH7780 is not set
185CONFIG_CPU_SUBTYPE_SH7785=y 138CONFIG_CPU_SUBTYPE_SH7785=y
186 139# CONFIG_CPU_SUBTYPE_SHX3 is not set
187#
188# SH4AL-DSP Processor Support
189#
190# CONFIG_CPU_SUBTYPE_SH73180 is not set 140# CONFIG_CPU_SUBTYPE_SH73180 is not set
191# CONFIG_CPU_SUBTYPE_SH7343 is not set 141# CONFIG_CPU_SUBTYPE_SH7343 is not set
192# CONFIG_CPU_SUBTYPE_SH7722 is not set 142# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -194,6 +144,7 @@ CONFIG_CPU_SUBTYPE_SH7785=y
194# 144#
195# Memory management options 145# Memory management options
196# 146#
147CONFIG_QUICKLIST=y
197CONFIG_MMU=y 148CONFIG_MMU=y
198CONFIG_PAGE_OFFSET=0x80000000 149CONFIG_PAGE_OFFSET=0x80000000
199CONFIG_MEMORY_START=0x08000000 150CONFIG_MEMORY_START=0x08000000
@@ -201,6 +152,12 @@ CONFIG_MEMORY_SIZE=0x08000000
201CONFIG_32BIT=y 152CONFIG_32BIT=y
202# CONFIG_X2TLB is not set 153# CONFIG_X2TLB is not set
203CONFIG_VSYSCALL=y 154CONFIG_VSYSCALL=y
155CONFIG_ARCH_FLATMEM_ENABLE=y
156CONFIG_ARCH_SPARSEMEM_ENABLE=y
157CONFIG_ARCH_SPARSEMEM_DEFAULT=y
158CONFIG_MAX_ACTIVE_REGIONS=1
159CONFIG_ARCH_POPULATES_NODE_MAP=y
160CONFIG_ARCH_SELECT_MEMORY_MODEL=y
204CONFIG_PAGE_SIZE_4KB=y 161CONFIG_PAGE_SIZE_4KB=y
205# CONFIG_PAGE_SIZE_8KB is not set 162# CONFIG_PAGE_SIZE_8KB is not set
206# CONFIG_PAGE_SIZE_64KB is not set 163# CONFIG_PAGE_SIZE_64KB is not set
@@ -215,17 +172,17 @@ CONFIG_FLATMEM_MANUAL=y
215# CONFIG_SPARSEMEM_MANUAL is not set 172# CONFIG_SPARSEMEM_MANUAL is not set
216CONFIG_FLATMEM=y 173CONFIG_FLATMEM=y
217CONFIG_FLAT_NODE_MEM_MAP=y 174CONFIG_FLAT_NODE_MEM_MAP=y
218# CONFIG_SPARSEMEM_STATIC is not set 175CONFIG_SPARSEMEM_STATIC=y
219CONFIG_SPLIT_PTLOCK_CPUS=4 176CONFIG_SPLIT_PTLOCK_CPUS=4
220# CONFIG_RESOURCES_64BIT is not set 177# CONFIG_RESOURCES_64BIT is not set
221CONFIG_ZONE_DMA_FLAG=0 178CONFIG_ZONE_DMA_FLAG=0
179CONFIG_NR_QUICK=2
222 180
223# 181#
224# Cache configuration 182# Cache configuration
225# 183#
226# CONFIG_SH_DIRECT_MAPPED is not set 184# CONFIG_SH_DIRECT_MAPPED is not set
227# CONFIG_SH_WRITETHROUGH is not set 185# CONFIG_SH_WRITETHROUGH is not set
228# CONFIG_SH_OCRAM is not set
229 186
230# 187#
231# Processor features 188# Processor features
@@ -241,12 +198,22 @@ CONFIG_CPU_HAS_SR_RB=y
241CONFIG_CPU_HAS_PTEA=y 198CONFIG_CPU_HAS_PTEA=y
242 199
243# 200#
201# Board support
202#
203CONFIG_SH_HIGHLANDER=y
204# CONFIG_SH_R7780RP is not set
205# CONFIG_SH_R7780MP is not set
206CONFIG_SH_R7785RP=y
207
208#
244# Timer and clock configuration 209# Timer and clock configuration
245# 210#
246CONFIG_SH_TMU=y 211CONFIG_SH_TMU=y
247CONFIG_SH_TIMER_IRQ=28 212CONFIG_SH_TIMER_IRQ=28
248CONFIG_NO_IDLE_HZ=y
249CONFIG_SH_PCLK_FREQ=50000000 213CONFIG_SH_PCLK_FREQ=50000000
214# CONFIG_TICK_ONESHOT is not set
215# CONFIG_NO_HZ is not set
216# CONFIG_HIGH_RES_TIMERS is not set
250 217
251# 218#
252# CPU Frequency scaling 219# CPU Frequency scaling
@@ -261,7 +228,6 @@ CONFIG_SH_PCLK_FREQ=50000000
261# 228#
262# Companion Chips 229# Companion Chips
263# 230#
264# CONFIG_HD6446X_SERIES is not set
265 231
266# 232#
267# Additional SuperH Device Drivers 233# Additional SuperH Device Drivers
@@ -278,7 +244,7 @@ CONFIG_HZ_250=y
278# CONFIG_HZ_1000 is not set 244# CONFIG_HZ_1000 is not set
279CONFIG_HZ=250 245CONFIG_HZ=250
280CONFIG_KEXEC=y 246CONFIG_KEXEC=y
281# CONFIG_SMP is not set 247# CONFIG_CRASH_DUMP is not set
282# CONFIG_PREEMPT_NONE is not set 248# CONFIG_PREEMPT_NONE is not set
283# CONFIG_PREEMPT_VOLUNTARY is not set 249# CONFIG_PREEMPT_VOLUNTARY is not set
284CONFIG_PREEMPT=y 250CONFIG_PREEMPT=y
@@ -300,31 +266,22 @@ CONFIG_PCI=y
300CONFIG_SH_PCIDMA_NONCOHERENT=y 266CONFIG_SH_PCIDMA_NONCOHERENT=y
301CONFIG_PCI_AUTO=y 267CONFIG_PCI_AUTO=y
302CONFIG_PCI_AUTO_UPDATE_RESOURCES=y 268CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
269# CONFIG_ARCH_SUPPORTS_MSI is not set
303# CONFIG_PCI_DEBUG is not set 270# CONFIG_PCI_DEBUG is not set
304 271
305# 272#
306# PCCARD (PCMCIA/CardBus) support 273# PCCARD (PCMCIA/CardBus) support
307# 274#
308# CONFIG_PCCARD is not set 275# CONFIG_PCCARD is not set
309
310#
311# PCI Hotplug Support
312#
313# CONFIG_HOTPLUG_PCI is not set 276# CONFIG_HOTPLUG_PCI is not set
314 277
315# 278#
316# Executable file formats 279# Executable file formats
317# 280#
318CONFIG_BINFMT_ELF=y 281CONFIG_BINFMT_ELF=y
319# CONFIG_BINFMT_FLAT is not set
320# CONFIG_BINFMT_MISC is not set 282# CONFIG_BINFMT_MISC is not set
321 283
322# 284#
323# Power management options (EXPERIMENTAL)
324#
325# CONFIG_PM is not set
326
327#
328# Networking 285# Networking
329# 286#
330CONFIG_NET=y 287CONFIG_NET=y
@@ -332,7 +289,6 @@ CONFIG_NET=y
332# 289#
333# Networking options 290# Networking options
334# 291#
335# CONFIG_NETDEBUG is not set
336CONFIG_PACKET=y 292CONFIG_PACKET=y
337# CONFIG_PACKET_MMAP is not set 293# CONFIG_PACKET_MMAP is not set
338CONFIG_UNIX=y 294CONFIG_UNIX=y
@@ -377,20 +333,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
377# CONFIG_INET6_TUNNEL is not set 333# CONFIG_INET6_TUNNEL is not set
378# CONFIG_NETWORK_SECMARK is not set 334# CONFIG_NETWORK_SECMARK is not set
379# CONFIG_NETFILTER is not set 335# CONFIG_NETFILTER is not set
380
381#
382# DCCP Configuration (EXPERIMENTAL)
383#
384# CONFIG_IP_DCCP is not set 336# CONFIG_IP_DCCP is not set
385
386#
387# SCTP Configuration (EXPERIMENTAL)
388#
389# CONFIG_IP_SCTP is not set 337# CONFIG_IP_SCTP is not set
390
391#
392# TIPC Configuration (EXPERIMENTAL)
393#
394# CONFIG_TIPC is not set 338# CONFIG_TIPC is not set
395# CONFIG_ATM is not set 339# CONFIG_ATM is not set
396CONFIG_BRIDGE=m 340CONFIG_BRIDGE=m
@@ -417,8 +361,16 @@ CONFIG_LLC=m
417# CONFIG_HAMRADIO is not set 361# CONFIG_HAMRADIO is not set
418# CONFIG_IRDA is not set 362# CONFIG_IRDA is not set
419# CONFIG_BT is not set 363# CONFIG_BT is not set
420# CONFIG_IEEE80211 is not set 364# CONFIG_AF_RXRPC is not set
365
366#
367# Wireless
368#
369# CONFIG_CFG80211 is not set
421CONFIG_WIRELESS_EXT=y 370CONFIG_WIRELESS_EXT=y
371# CONFIG_MAC80211 is not set
372# CONFIG_IEEE80211 is not set
373# CONFIG_RFKILL is not set
422 374
423# 375#
424# Device Drivers 376# Device Drivers
@@ -438,10 +390,6 @@ CONFIG_FW_LOADER=m
438# Connector - unified userspace <-> kernelspace linker 390# Connector - unified userspace <-> kernelspace linker
439# 391#
440# CONFIG_CONNECTOR is not set 392# CONFIG_CONNECTOR is not set
441
442#
443# Memory Technology Devices (MTD)
444#
445# CONFIG_MTD is not set 393# CONFIG_MTD is not set
446 394
447# 395#
@@ -475,12 +423,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
475# 423#
476# Misc devices 424# Misc devices
477# 425#
426# CONFIG_PHANTOM is not set
478# CONFIG_SGI_IOC4 is not set 427# CONFIG_SGI_IOC4 is not set
479# CONFIG_TIFM_CORE is not set 428# CONFIG_TIFM_CORE is not set
480 429# CONFIG_BLINK is not set
481#
482# ATA/ATAPI/MFM/RLL support
483#
484# CONFIG_IDE is not set 430# CONFIG_IDE is not set
485 431
486# 432#
@@ -509,6 +455,7 @@ CONFIG_CHR_DEV_SG=m
509# CONFIG_SCSI_CONSTANTS is not set 455# CONFIG_SCSI_CONSTANTS is not set
510# CONFIG_SCSI_LOGGING is not set 456# CONFIG_SCSI_LOGGING is not set
511# CONFIG_SCSI_SCAN_ASYNC is not set 457# CONFIG_SCSI_SCAN_ASYNC is not set
458CONFIG_SCSI_WAIT_SCAN=m
512 459
513# 460#
514# SCSI Transports 461# SCSI Transports
@@ -554,10 +501,6 @@ CONFIG_CHR_DEV_SG=m
554# CONFIG_SCSI_NSP32 is not set 501# CONFIG_SCSI_NSP32 is not set
555# CONFIG_SCSI_DEBUG is not set 502# CONFIG_SCSI_DEBUG is not set
556# CONFIG_SCSI_SRP is not set 503# CONFIG_SCSI_SRP is not set
557
558#
559# Serial ATA (prod) and Parallel ATA (experimental) drivers
560#
561CONFIG_ATA=y 504CONFIG_ATA=y
562# CONFIG_ATA_NONSTANDARD is not set 505# CONFIG_ATA_NONSTANDARD is not set
563# CONFIG_SATA_AHCI is not set 506# CONFIG_SATA_AHCI is not set
@@ -580,6 +523,7 @@ CONFIG_SATA_SIL=y
580# CONFIG_PATA_AMD is not set 523# CONFIG_PATA_AMD is not set
581# CONFIG_PATA_ARTOP is not set 524# CONFIG_PATA_ARTOP is not set
582# CONFIG_PATA_ATIIXP is not set 525# CONFIG_PATA_ATIIXP is not set
526# CONFIG_PATA_CMD640_PCI is not set
583# CONFIG_PATA_CMD64X is not set 527# CONFIG_PATA_CMD64X is not set
584# CONFIG_PATA_CS5520 is not set 528# CONFIG_PATA_CS5520 is not set
585# CONFIG_PATA_CS5530 is not set 529# CONFIG_PATA_CS5530 is not set
@@ -629,6 +573,7 @@ CONFIG_PATA_PLATFORM=y
629# 573#
630# IEEE 1394 (FireWire) support 574# IEEE 1394 (FireWire) support
631# 575#
576# CONFIG_FIREWIRE is not set
632# CONFIG_IEEE1394 is not set 577# CONFIG_IEEE1394 is not set
633 578
634# 579#
@@ -644,15 +589,7 @@ CONFIG_NETDEVICES=y
644# CONFIG_BONDING is not set 589# CONFIG_BONDING is not set
645# CONFIG_EQUALIZER is not set 590# CONFIG_EQUALIZER is not set
646# CONFIG_TUN is not set 591# CONFIG_TUN is not set
647
648#
649# ARCnet devices
650#
651# CONFIG_ARCNET is not set 592# CONFIG_ARCNET is not set
652
653#
654# PHY device support
655#
656# CONFIG_PHYLIB is not set 593# CONFIG_PHYLIB is not set
657 594
658# 595#
@@ -673,10 +610,7 @@ CONFIG_MII=y
673# CONFIG_NET_TULIP is not set 610# CONFIG_NET_TULIP is not set
674# CONFIG_HP100 is not set 611# CONFIG_HP100 is not set
675# CONFIG_NET_PCI is not set 612# CONFIG_NET_PCI is not set
676 613CONFIG_NETDEV_1000=y
677#
678# Ethernet (1000 Mbit)
679#
680# CONFIG_ACENIC is not set 614# CONFIG_ACENIC is not set
681# CONFIG_DL2K is not set 615# CONFIG_DL2K is not set
682# CONFIG_E1000 is not set 616# CONFIG_E1000 is not set
@@ -689,55 +623,26 @@ CONFIG_R8169=y
689# CONFIG_SKGE is not set 623# CONFIG_SKGE is not set
690# CONFIG_SKY2 is not set 624# CONFIG_SKY2 is not set
691# CONFIG_SK98LIN is not set 625# CONFIG_SK98LIN is not set
626# CONFIG_VIA_VELOCITY is not set
692# CONFIG_TIGON3 is not set 627# CONFIG_TIGON3 is not set
693# CONFIG_BNX2 is not set 628# CONFIG_BNX2 is not set
694# CONFIG_QLA3XXX is not set 629# CONFIG_QLA3XXX is not set
695# CONFIG_ATL1 is not set 630# CONFIG_ATL1 is not set
696 631CONFIG_NETDEV_10000=y
697#
698# Ethernet (10000 Mbit)
699#
700# CONFIG_CHELSIO_T1 is not set 632# CONFIG_CHELSIO_T1 is not set
701# CONFIG_CHELSIO_T3 is not set 633# CONFIG_CHELSIO_T3 is not set
702# CONFIG_IXGB is not set 634# CONFIG_IXGB is not set
703# CONFIG_S2IO is not set 635# CONFIG_S2IO is not set
704# CONFIG_MYRI10GE is not set 636# CONFIG_MYRI10GE is not set
705# CONFIG_NETXEN_NIC is not set 637# CONFIG_NETXEN_NIC is not set
706 638# CONFIG_MLX4_CORE is not set
707#
708# Token Ring devices
709#
710# CONFIG_TR is not set 639# CONFIG_TR is not set
711 640
712# 641#
713# Wireless LAN (non-hamradio) 642# Wireless LAN
714#
715CONFIG_NET_RADIO=y
716# CONFIG_NET_WIRELESS_RTNETLINK is not set
717
718#
719# Obsolete Wireless cards support (pre-802.11)
720#
721# CONFIG_STRIP is not set
722
723#
724# Wireless 802.11b ISA/PCI cards support
725#
726# CONFIG_IPW2100 is not set
727# CONFIG_IPW2200 is not set
728# CONFIG_HERMES is not set
729# CONFIG_ATMEL is not set
730
731#
732# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
733#
734# CONFIG_PRISM54 is not set
735# CONFIG_HOSTAP is not set
736CONFIG_NET_WIRELESS=y
737
738#
739# Wan interfaces
740# 643#
644# CONFIG_WLAN_PRE80211 is not set
645# CONFIG_WLAN_80211 is not set
741# CONFIG_WAN is not set 646# CONFIG_WAN is not set
742# CONFIG_FDDI is not set 647# CONFIG_FDDI is not set
743# CONFIG_HIPPI is not set 648# CONFIG_HIPPI is not set
@@ -789,6 +694,7 @@ CONFIG_KEYBOARD_ATKBD=y
789# CONFIG_KEYBOARD_STOWAWAY is not set 694# CONFIG_KEYBOARD_STOWAWAY is not set
790# CONFIG_INPUT_MOUSE is not set 695# CONFIG_INPUT_MOUSE is not set
791# CONFIG_INPUT_JOYSTICK is not set 696# CONFIG_INPUT_JOYSTICK is not set
697# CONFIG_INPUT_TABLET is not set
792# CONFIG_INPUT_TOUCHSCREEN is not set 698# CONFIG_INPUT_TOUCHSCREEN is not set
793# CONFIG_INPUT_MISC is not set 699# CONFIG_INPUT_MISC is not set
794 700
@@ -831,14 +737,8 @@ CONFIG_LEGACY_PTY_COUNT=256
831# IPMI 737# IPMI
832# 738#
833# CONFIG_IPMI_HANDLER is not set 739# CONFIG_IPMI_HANDLER is not set
834
835#
836# Watchdog Cards
837#
838# CONFIG_WATCHDOG is not set 740# CONFIG_WATCHDOG is not set
839CONFIG_HW_RANDOM=y 741CONFIG_HW_RANDOM=y
840# CONFIG_GEN_RTC is not set
841# CONFIG_DTLK is not set
842# CONFIG_R3964 is not set 742# CONFIG_R3964 is not set
843# CONFIG_APPLICOM is not set 743# CONFIG_APPLICOM is not set
844# CONFIG_DRM is not set 744# CONFIG_DRM is not set
@@ -848,10 +748,7 @@ CONFIG_HW_RANDOM=y
848# TPM devices 748# TPM devices
849# 749#
850# CONFIG_TCG_TPM is not set 750# CONFIG_TCG_TPM is not set
851 751CONFIG_DEVPORT=y
852#
853# I2C support
854#
855# CONFIG_I2C is not set 752# CONFIG_I2C is not set
856 753
857# 754#
@@ -864,16 +761,15 @@ CONFIG_HW_RANDOM=y
864# Dallas's 1-wire bus 761# Dallas's 1-wire bus
865# 762#
866# CONFIG_W1 is not set 763# CONFIG_W1 is not set
867
868#
869# Hardware Monitoring support
870#
871CONFIG_HWMON=y 764CONFIG_HWMON=y
872# CONFIG_HWMON_VID is not set 765# CONFIG_HWMON_VID is not set
873# CONFIG_SENSORS_ABITUGURU is not set 766# CONFIG_SENSORS_ABITUGURU is not set
874# CONFIG_SENSORS_F71805F is not set 767# CONFIG_SENSORS_F71805F is not set
875# CONFIG_SENSORS_PC87427 is not set 768# CONFIG_SENSORS_PC87427 is not set
769# CONFIG_SENSORS_SMSC47M1 is not set
770# CONFIG_SENSORS_SMSC47B397 is not set
876# CONFIG_SENSORS_VT1211 is not set 771# CONFIG_SENSORS_VT1211 is not set
772# CONFIG_SENSORS_W83627HF is not set
877# CONFIG_HWMON_DEBUG_CHIP is not set 773# CONFIG_HWMON_DEBUG_CHIP is not set
878 774
879# 775#
@@ -885,22 +781,30 @@ CONFIG_HWMON=y
885# Multimedia devices 781# Multimedia devices
886# 782#
887# CONFIG_VIDEO_DEV is not set 783# CONFIG_VIDEO_DEV is not set
784# CONFIG_DVB_CORE is not set
785# CONFIG_DAB is not set
888 786
889# 787#
890# Digital Video Broadcasting Devices 788# Graphics support
891# 789#
892# CONFIG_DVB is not set 790# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
893 791
894# 792#
895# Graphics support 793# Display device support
896# 794#
897# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 795# CONFIG_DISPLAY_SUPPORT is not set
796# CONFIG_VGASTATE is not set
898CONFIG_FB=y 797CONFIG_FB=y
899# CONFIG_FIRMWARE_EDID is not set 798# CONFIG_FIRMWARE_EDID is not set
900# CONFIG_FB_DDC is not set 799# CONFIG_FB_DDC is not set
901# CONFIG_FB_CFB_FILLRECT is not set 800# CONFIG_FB_CFB_FILLRECT is not set
902# CONFIG_FB_CFB_COPYAREA is not set 801# CONFIG_FB_CFB_COPYAREA is not set
903# CONFIG_FB_CFB_IMAGEBLIT is not set 802# CONFIG_FB_CFB_IMAGEBLIT is not set
803# CONFIG_FB_SYS_FILLRECT is not set
804# CONFIG_FB_SYS_COPYAREA is not set
805# CONFIG_FB_SYS_IMAGEBLIT is not set
806# CONFIG_FB_SYS_FOPS is not set
807CONFIG_FB_DEFERRED_IO=y
904# CONFIG_FB_SVGALIB is not set 808# CONFIG_FB_SVGALIB is not set
905# CONFIG_FB_MACMODES is not set 809# CONFIG_FB_MACMODES is not set
906# CONFIG_FB_BACKLIGHT is not set 810# CONFIG_FB_BACKLIGHT is not set
@@ -908,7 +812,7 @@ CONFIG_FB=y
908# CONFIG_FB_TILEBLITTING is not set 812# CONFIG_FB_TILEBLITTING is not set
909 813
910# 814#
911# Frambuffer hardware drivers 815# Frame buffer hardware drivers
912# 816#
913# CONFIG_FB_CIRRUS is not set 817# CONFIG_FB_CIRRUS is not set
914# CONFIG_FB_PM2 is not set 818# CONFIG_FB_PM2 is not set
@@ -930,12 +834,11 @@ CONFIG_FB=y
930# CONFIG_FB_KYRO is not set 834# CONFIG_FB_KYRO is not set
931# CONFIG_FB_3DFX is not set 835# CONFIG_FB_3DFX is not set
932# CONFIG_FB_VOODOO1 is not set 836# CONFIG_FB_VOODOO1 is not set
837# CONFIG_FB_VT8623 is not set
933# CONFIG_FB_TRIDENT is not set 838# CONFIG_FB_TRIDENT is not set
839# CONFIG_FB_ARK is not set
840# CONFIG_FB_PM3 is not set
934# CONFIG_FB_VIRTUAL is not set 841# CONFIG_FB_VIRTUAL is not set
935
936#
937# Logo configuration
938#
939# CONFIG_LOGO is not set 842# CONFIG_LOGO is not set
940 843
941# 844#
@@ -952,13 +855,10 @@ CONFIG_SOUND=m
952# Open Sound System 855# Open Sound System
953# 856#
954CONFIG_SOUND_PRIME=m 857CONFIG_SOUND_PRIME=m
955# CONFIG_OBSOLETE_OSS is not set 858# CONFIG_OSS_OBSOLETE is not set
956# CONFIG_SOUND_BT878 is not set
957# CONFIG_SOUND_ICH is not set
958# CONFIG_SOUND_TRIDENT is not set 859# CONFIG_SOUND_TRIDENT is not set
959# CONFIG_SOUND_MSNDCLAS is not set 860# CONFIG_SOUND_MSNDCLAS is not set
960# CONFIG_SOUND_MSNDPIN is not set 861# CONFIG_SOUND_MSNDPIN is not set
961# CONFIG_SOUND_VIA82CXXX is not set
962 862
963# 863#
964# HID Devices 864# HID Devices
@@ -982,10 +882,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
982# USB Gadget Support 882# USB Gadget Support
983# 883#
984# CONFIG_USB_GADGET is not set 884# CONFIG_USB_GADGET is not set
985
986#
987# MMC/SD Card support
988#
989# CONFIG_MMC is not set 885# CONFIG_MMC is not set
990 886
991# 887#
@@ -1026,18 +922,30 @@ CONFIG_RTC_INTF_SYSFS=y
1026CONFIG_RTC_INTF_PROC=y 922CONFIG_RTC_INTF_PROC=y
1027CONFIG_RTC_INTF_DEV=y 923CONFIG_RTC_INTF_DEV=y
1028# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 924# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
925# CONFIG_RTC_DRV_TEST is not set
926
927#
928# I2C RTC drivers
929#
1029 930
1030# 931#
1031# RTC drivers 932# SPI RTC drivers
933#
934
935#
936# Platform RTC drivers
1032# 937#
1033# CONFIG_RTC_DRV_DS1553 is not set 938# CONFIG_RTC_DRV_DS1553 is not set
1034# CONFIG_RTC_DRV_DS1742 is not set 939# CONFIG_RTC_DRV_DS1742 is not set
1035# CONFIG_RTC_DRV_M48T86 is not set 940# CONFIG_RTC_DRV_M48T86 is not set
1036CONFIG_RTC_DRV_SH=y
1037# CONFIG_RTC_DRV_TEST is not set
1038# CONFIG_RTC_DRV_V3020 is not set 941# CONFIG_RTC_DRV_V3020 is not set
1039 942
1040# 943#
944# on-CPU RTC drivers
945#
946CONFIG_RTC_DRV_SH=y
947
948#
1041# DMA Engine support 949# DMA Engine support
1042# 950#
1043# CONFIG_DMA_ENGINE is not set 951# CONFIG_DMA_ENGINE is not set
@@ -1051,14 +959,6 @@ CONFIG_RTC_DRV_SH=y
1051# 959#
1052 960
1053# 961#
1054# Auxiliary Display support
1055#
1056
1057#
1058# Virtualization
1059#
1060
1061#
1062# File systems 962# File systems
1063# 963#
1064CONFIG_EXT2_FS=y 964CONFIG_EXT2_FS=y
@@ -1157,6 +1057,7 @@ CONFIG_EXPORTFS=y
1157CONFIG_NFS_COMMON=y 1057CONFIG_NFS_COMMON=y
1158CONFIG_SUNRPC=y 1058CONFIG_SUNRPC=y
1159CONFIG_SUNRPC_GSS=y 1059CONFIG_SUNRPC_GSS=y
1060# CONFIG_SUNRPC_BIND34 is not set
1160CONFIG_RPCSEC_GSS_KRB5=y 1061CONFIG_RPCSEC_GSS_KRB5=y
1161# CONFIG_RPCSEC_GSS_SPKM3 is not set 1062# CONFIG_RPCSEC_GSS_SPKM3 is not set
1162# CONFIG_SMB_FS is not set 1063# CONFIG_SMB_FS is not set
@@ -1239,7 +1140,6 @@ CONFIG_DEBUG_FS=y
1239# CONFIG_HEADERS_CHECK is not set 1140# CONFIG_HEADERS_CHECK is not set
1240CONFIG_DEBUG_KERNEL=y 1141CONFIG_DEBUG_KERNEL=y
1241# CONFIG_DEBUG_SHIRQ is not set 1142# CONFIG_DEBUG_SHIRQ is not set
1242CONFIG_LOG_BUF_SHIFT=14
1243# CONFIG_DETECT_SOFTLOCKUP is not set 1143# CONFIG_DETECT_SOFTLOCKUP is not set
1244# CONFIG_SCHEDSTATS is not set 1144# CONFIG_SCHEDSTATS is not set
1245# CONFIG_TIMER_STATS is not set 1145# CONFIG_TIMER_STATS is not set
@@ -1266,6 +1166,7 @@ CONFIG_FORCED_INLINING=y
1266CONFIG_SH_STANDARD_BIOS=y 1166CONFIG_SH_STANDARD_BIOS=y
1267# CONFIG_EARLY_SCIF_CONSOLE is not set 1167# CONFIG_EARLY_SCIF_CONSOLE is not set
1268CONFIG_EARLY_PRINTK=y 1168CONFIG_EARLY_PRINTK=y
1169# CONFIG_DEBUG_BOOTMEM is not set
1269CONFIG_DEBUG_STACKOVERFLOW=y 1170CONFIG_DEBUG_STACKOVERFLOW=y
1270CONFIG_DEBUG_STACK_USAGE=y 1171CONFIG_DEBUG_STACK_USAGE=y
1271# CONFIG_4KSTACKS is not set 1172# CONFIG_4KSTACKS is not set
@@ -1300,6 +1201,7 @@ CONFIG_CRYPTO_ECB=m
1300CONFIG_CRYPTO_CBC=y 1201CONFIG_CRYPTO_CBC=y
1301CONFIG_CRYPTO_PCBC=m 1202CONFIG_CRYPTO_PCBC=m
1302# CONFIG_CRYPTO_LRW is not set 1203# CONFIG_CRYPTO_LRW is not set
1204# CONFIG_CRYPTO_CRYPTD is not set
1303CONFIG_CRYPTO_DES=y 1205CONFIG_CRYPTO_DES=y
1304# CONFIG_CRYPTO_FCRYPT is not set 1206# CONFIG_CRYPTO_FCRYPT is not set
1305# CONFIG_CRYPTO_BLOWFISH is not set 1207# CONFIG_CRYPTO_BLOWFISH is not set
@@ -1328,7 +1230,9 @@ CONFIG_CRYPTO_DES=y
1328CONFIG_BITREVERSE=y 1230CONFIG_BITREVERSE=y
1329# CONFIG_CRC_CCITT is not set 1231# CONFIG_CRC_CCITT is not set
1330# CONFIG_CRC16 is not set 1232# CONFIG_CRC16 is not set
1233# CONFIG_CRC_ITU_T is not set
1331CONFIG_CRC32=y 1234CONFIG_CRC32=y
1332# CONFIG_LIBCRC32C is not set 1235# CONFIG_LIBCRC32C is not set
1333CONFIG_HAS_IOMEM=y 1236CONFIG_HAS_IOMEM=y
1334CONFIG_HAS_IOPORT=y 1237CONFIG_HAS_IOPORT=y
1238CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/rts7751r2d_defconfig b/arch/sh/configs/rts7751r2d_defconfig
index a59bb78bd071..f1e979b1e495 100644
--- a/arch/sh/configs/rts7751r2d_defconfig
+++ b/arch/sh/configs/rts7751r2d_defconfig
@@ -155,7 +155,7 @@ CONFIG_CPU_SH4=y
155# CONFIG_CPU_SUBTYPE_SH7091 is not set 155# CONFIG_CPU_SUBTYPE_SH7091 is not set
156# CONFIG_CPU_SUBTYPE_SH7750R is not set 156# CONFIG_CPU_SUBTYPE_SH7750R is not set
157# CONFIG_CPU_SUBTYPE_SH7750S is not set 157# CONFIG_CPU_SUBTYPE_SH7750S is not set
158CONFIG_CPU_SUBTYPE_SH7751=y 158# CONFIG_CPU_SUBTYPE_SH7751 is not set
159CONFIG_CPU_SUBTYPE_SH7751R=y 159CONFIG_CPU_SUBTYPE_SH7751R=y
160# CONFIG_CPU_SUBTYPE_SH7760 is not set 160# CONFIG_CPU_SUBTYPE_SH7760 is not set
161# CONFIG_CPU_SUBTYPE_SH4_202 is not set 161# CONFIG_CPU_SUBTYPE_SH4_202 is not set
@@ -218,7 +218,7 @@ CONFIG_SH_FPU=y
218# CONFIG_SH_DSP is not set 218# CONFIG_SH_DSP is not set
219# CONFIG_SH_STORE_QUEUES is not set 219# CONFIG_SH_STORE_QUEUES is not set
220CONFIG_CPU_HAS_INTEVT=y 220CONFIG_CPU_HAS_INTEVT=y
221CONFIG_CPU_HAS_IPR_IRQ=y 221CONFIG_CPU_HAS_INTC_IRQ=y
222CONFIG_CPU_HAS_SR_RB=y 222CONFIG_CPU_HAS_SR_RB=y
223CONFIG_CPU_HAS_PTEA=y 223CONFIG_CPU_HAS_PTEA=y
224 224
@@ -280,7 +280,7 @@ CONFIG_ZERO_PAGE_OFFSET=0x00010000
280CONFIG_BOOT_LINK_OFFSET=0x00800000 280CONFIG_BOOT_LINK_OFFSET=0x00800000
281# CONFIG_UBC_WAKEUP is not set 281# CONFIG_UBC_WAKEUP is not set
282CONFIG_CMDLINE_BOOL=y 282CONFIG_CMDLINE_BOOL=y
283CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1" 283CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=bios"
284 284
285# 285#
286# Bus options 286# Bus options
@@ -1323,7 +1323,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1323# CONFIG_DEBUG_KERNEL is not set 1323# CONFIG_DEBUG_KERNEL is not set
1324CONFIG_LOG_BUF_SHIFT=14 1324CONFIG_LOG_BUF_SHIFT=14
1325# CONFIG_DEBUG_BUGVERBOSE is not set 1325# CONFIG_DEBUG_BUGVERBOSE is not set
1326# CONFIG_SH_STANDARD_BIOS is not set 1326CONFIG_SH_STANDARD_BIOS=y
1327CONFIG_EARLY_SCIF_CONSOLE=y 1327CONFIG_EARLY_SCIF_CONSOLE=y
1328CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000 1328CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000
1329CONFIG_EARLY_PRINTK=y 1329CONFIG_EARLY_PRINTK=y
diff --git a/arch/sh/configs/se7206_defconfig b/arch/sh/configs/se7206_defconfig
index 87ab9080fd1d..f2f2a3c9c32d 100644
--- a/arch/sh/configs/se7206_defconfig
+++ b/arch/sh/configs/se7206_defconfig
@@ -1,18 +1,22 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19 3# Linux kernel version: 2.6.22-rc4
4# Wed Dec 6 14:40:15 2006 4# Fri Jun 15 19:37:46 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8CONFIG_GENERIC_BUG=y
8CONFIG_GENERIC_FIND_NEXT_BIT=y 9CONFIG_GENERIC_FIND_NEXT_BIT=y
9CONFIG_GENERIC_HWEIGHT=y 10CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_HARDIRQS=y 11CONFIG_GENERIC_HARDIRQS=y
11CONFIG_GENERIC_IRQ_PROBE=y 12CONFIG_GENERIC_IRQ_PROBE=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
13# CONFIG_GENERIC_TIME is not set 14# CONFIG_GENERIC_TIME is not set
15# CONFIG_GENERIC_CLOCKEVENTS is not set
14CONFIG_STACKTRACE_SUPPORT=y 16CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y 17CONFIG_LOCKDEP_SUPPORT=y
18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
16CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
17 21
18# 22#
@@ -34,8 +38,10 @@ CONFIG_LOCALVERSION=""
34# CONFIG_UTS_NS is not set 38# CONFIG_UTS_NS is not set
35# CONFIG_AUDIT is not set 39# CONFIG_AUDIT is not set
36# CONFIG_IKCONFIG is not set 40# CONFIG_IKCONFIG is not set
41CONFIG_LOG_BUF_SHIFT=14
42CONFIG_SYSFS_DEPRECATED=y
37# CONFIG_RELAY is not set 43# CONFIG_RELAY is not set
38CONFIG_INITRAMFS_SOURCE="" 44# CONFIG_BLK_DEV_INITRD is not set
39CONFIG_CC_OPTIMIZE_FOR_SIZE=y 45CONFIG_CC_OPTIMIZE_FOR_SIZE=y
40CONFIG_SYSCTL=y 46CONFIG_SYSCTL=y
41CONFIG_EMBEDDED=y 47CONFIG_EMBEDDED=y
@@ -48,12 +54,17 @@ CONFIG_BUG=y
48# CONFIG_ELF_CORE is not set 54# CONFIG_ELF_CORE is not set
49# CONFIG_BASE_FULL is not set 55# CONFIG_BASE_FULL is not set
50# CONFIG_FUTEX is not set 56# CONFIG_FUTEX is not set
57CONFIG_ANON_INODES=y
51# CONFIG_EPOLL is not set 58# CONFIG_EPOLL is not set
52CONFIG_SLAB=y 59CONFIG_SIGNALFD=y
60CONFIG_TIMERFD=y
61CONFIG_EVENTFD=y
53# CONFIG_VM_EVENT_COUNTERS is not set 62# CONFIG_VM_EVENT_COUNTERS is not set
63CONFIG_SLAB=y
64# CONFIG_SLUB is not set
65# CONFIG_SLOB is not set
54CONFIG_TINY_SHMEM=y 66CONFIG_TINY_SHMEM=y
55CONFIG_BASE_SMALL=1 67CONFIG_BASE_SMALL=1
56# CONFIG_SLOB is not set
57 68
58# 69#
59# Loadable module support 70# Loadable module support
@@ -83,53 +94,10 @@ CONFIG_DEFAULT_IOSCHED="noop"
83# 94#
84# System type 95# System type
85# 96#
86# CONFIG_SH_SOLUTION_ENGINE is not set
87# CONFIG_SH_7751_SOLUTION_ENGINE is not set
88# CONFIG_SH_7300_SOLUTION_ENGINE is not set
89# CONFIG_SH_7343_SOLUTION_ENGINE is not set
90# CONFIG_SH_73180_SOLUTION_ENGINE is not set
91# CONFIG_SH_7751_SYSTEMH is not set
92# CONFIG_SH_HP6XX is not set
93# CONFIG_SH_EC3104 is not set
94# CONFIG_SH_SATURN is not set
95# CONFIG_SH_DREAMCAST is not set
96# CONFIG_SH_BIGSUR is not set
97# CONFIG_SH_MPC1211 is not set
98# CONFIG_SH_SH03 is not set
99# CONFIG_SH_SECUREEDGE5410 is not set
100# CONFIG_SH_HS7751RVOIP is not set
101# CONFIG_SH_7710VOIPGW is not set
102# CONFIG_SH_RTS7751R2D is not set
103# CONFIG_SH_R7780RP is not set
104# CONFIG_SH_EDOSK7705 is not set
105# CONFIG_SH_SH4202_MICRODEV is not set
106# CONFIG_SH_LANDISK is not set
107# CONFIG_SH_TITAN is not set
108# CONFIG_SH_SHMIN is not set
109CONFIG_SH_7206_SOLUTION_ENGINE=y
110# CONFIG_SH_7619_SOLUTION_ENGINE is not set
111# CONFIG_SH_UNKNOWN is not set
112
113#
114# Processor selection
115#
116CONFIG_CPU_SH2=y 97CONFIG_CPU_SH2=y
117CONFIG_CPU_SH2A=y 98CONFIG_CPU_SH2A=y
118
119#
120# SH-2 Processor Support
121#
122# CONFIG_CPU_SUBTYPE_SH7604 is not set
123# CONFIG_CPU_SUBTYPE_SH7619 is not set 99# CONFIG_CPU_SUBTYPE_SH7619 is not set
124
125#
126# SH-2A Processor Support
127#
128CONFIG_CPU_SUBTYPE_SH7206=y 100CONFIG_CPU_SUBTYPE_SH7206=y
129
130#
131# SH-3 Processor Support
132#
133# CONFIG_CPU_SUBTYPE_SH7300 is not set 101# CONFIG_CPU_SUBTYPE_SH7300 is not set
134# CONFIG_CPU_SUBTYPE_SH7705 is not set 102# CONFIG_CPU_SUBTYPE_SH7705 is not set
135# CONFIG_CPU_SUBTYPE_SH7706 is not set 103# CONFIG_CPU_SUBTYPE_SH7706 is not set
@@ -137,10 +105,7 @@ CONFIG_CPU_SUBTYPE_SH7206=y
137# CONFIG_CPU_SUBTYPE_SH7708 is not set 105# CONFIG_CPU_SUBTYPE_SH7708 is not set
138# CONFIG_CPU_SUBTYPE_SH7709 is not set 106# CONFIG_CPU_SUBTYPE_SH7709 is not set
139# CONFIG_CPU_SUBTYPE_SH7710 is not set 107# CONFIG_CPU_SUBTYPE_SH7710 is not set
140 108# CONFIG_CPU_SUBTYPE_SH7712 is not set
141#
142# SH-4 Processor Support
143#
144# CONFIG_CPU_SUBTYPE_SH7750 is not set 109# CONFIG_CPU_SUBTYPE_SH7750 is not set
145# CONFIG_CPU_SUBTYPE_SH7091 is not set 110# CONFIG_CPU_SUBTYPE_SH7091 is not set
146# CONFIG_CPU_SUBTYPE_SH7750R is not set 111# CONFIG_CPU_SUBTYPE_SH7750R is not set
@@ -149,32 +114,28 @@ CONFIG_CPU_SUBTYPE_SH7206=y
149# CONFIG_CPU_SUBTYPE_SH7751R is not set 114# CONFIG_CPU_SUBTYPE_SH7751R is not set
150# CONFIG_CPU_SUBTYPE_SH7760 is not set 115# CONFIG_CPU_SUBTYPE_SH7760 is not set
151# CONFIG_CPU_SUBTYPE_SH4_202 is not set 116# CONFIG_CPU_SUBTYPE_SH4_202 is not set
152
153#
154# ST40 Processor Support
155#
156# CONFIG_CPU_SUBTYPE_ST40STB1 is not set 117# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
157# CONFIG_CPU_SUBTYPE_ST40GX1 is not set 118# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
158
159#
160# SH-4A Processor Support
161#
162# CONFIG_CPU_SUBTYPE_SH7770 is not set 119# CONFIG_CPU_SUBTYPE_SH7770 is not set
163# CONFIG_CPU_SUBTYPE_SH7780 is not set 120# CONFIG_CPU_SUBTYPE_SH7780 is not set
164# CONFIG_CPU_SUBTYPE_SH7785 is not set 121# CONFIG_CPU_SUBTYPE_SH7785 is not set
165
166#
167# SH4AL-DSP Processor Support
168#
169# CONFIG_CPU_SUBTYPE_SH73180 is not set 122# CONFIG_CPU_SUBTYPE_SH73180 is not set
170# CONFIG_CPU_SUBTYPE_SH7343 is not set 123# CONFIG_CPU_SUBTYPE_SH7343 is not set
124# CONFIG_CPU_SUBTYPE_SH7722 is not set
171 125
172# 126#
173# Memory management options 127# Memory management options
174# 128#
129CONFIG_QUICKLIST=y
175CONFIG_PAGE_OFFSET=0x00000000 130CONFIG_PAGE_OFFSET=0x00000000
176CONFIG_MEMORY_START=0x0c000000 131CONFIG_MEMORY_START=0x0c000000
177CONFIG_MEMORY_SIZE=0x04000000 132CONFIG_MEMORY_SIZE=0x04000000
133CONFIG_ARCH_FLATMEM_ENABLE=y
134CONFIG_ARCH_SPARSEMEM_ENABLE=y
135CONFIG_ARCH_SPARSEMEM_DEFAULT=y
136CONFIG_MAX_ACTIVE_REGIONS=1
137CONFIG_ARCH_POPULATES_NODE_MAP=y
138CONFIG_ARCH_SELECT_MEMORY_MODEL=y
178CONFIG_PAGE_SIZE_4KB=y 139CONFIG_PAGE_SIZE_4KB=y
179# CONFIG_PAGE_SIZE_8KB is not set 140# CONFIG_PAGE_SIZE_8KB is not set
180# CONFIG_PAGE_SIZE_64KB is not set 141# CONFIG_PAGE_SIZE_64KB is not set
@@ -184,35 +145,42 @@ CONFIG_FLATMEM_MANUAL=y
184# CONFIG_SPARSEMEM_MANUAL is not set 145# CONFIG_SPARSEMEM_MANUAL is not set
185CONFIG_FLATMEM=y 146CONFIG_FLATMEM=y
186CONFIG_FLAT_NODE_MEM_MAP=y 147CONFIG_FLAT_NODE_MEM_MAP=y
187# CONFIG_SPARSEMEM_STATIC is not set 148CONFIG_SPARSEMEM_STATIC=y
188CONFIG_SPLIT_PTLOCK_CPUS=4 149CONFIG_SPLIT_PTLOCK_CPUS=4
189# CONFIG_RESOURCES_64BIT is not set 150# CONFIG_RESOURCES_64BIT is not set
151CONFIG_ZONE_DMA_FLAG=0
152CONFIG_NR_QUICK=2
190 153
191# 154#
192# Cache configuration 155# Cache configuration
193# 156#
194# CONFIG_SH_DIRECT_MAPPED is not set 157# CONFIG_SH_DIRECT_MAPPED is not set
195# CONFIG_SH_WRITETHROUGH is not set 158# CONFIG_SH_WRITETHROUGH is not set
196# CONFIG_SH_OCRAM is not set
197 159
198# 160#
199# Processor features 161# Processor features
200# 162#
201# CONFIG_CPU_LITTLE_ENDIAN is not set 163# CONFIG_CPU_LITTLE_ENDIAN is not set
202CONFIG_CPU_BIG_ENDIAN=y 164CONFIG_CPU_BIG_ENDIAN=y
203# CONFIG_SH_FPU is not set
204# CONFIG_SH_FPU_EMU is not set 165# CONFIG_SH_FPU_EMU is not set
205# CONFIG_SH_DSP is not set 166# CONFIG_SH_DSP is not set
167CONFIG_CPU_HAS_IPR_IRQ=y
168
169#
170# Board support
171#
172CONFIG_SOLUTION_ENGINE=y
173CONFIG_SH_7206_SOLUTION_ENGINE=y
206 174
207# 175#
208# Timer support 176# Timer and clock configuration
209# 177#
210CONFIG_SH_CMT=y 178CONFIG_SH_CMT=y
211# CONFIG_SH_MTU2 is not set 179# CONFIG_SH_MTU2 is not set
212CONFIG_SH_TIMER_IRQ=140 180CONFIG_SH_TIMER_IRQ=140
213# CONFIG_NO_IDLE_HZ is not set
214CONFIG_SH_PCLK_FREQ=33333333 181CONFIG_SH_PCLK_FREQ=33333333
215CONFIG_SH_CLK_MD=6 182CONFIG_SH_CLK_MD=6
183# CONFIG_TICK_ONESHOT is not set
216 184
217# 185#
218# CPU Frequency scaling 186# CPU Frequency scaling
@@ -227,11 +195,11 @@ CONFIG_SH_CLK_MD=6
227# 195#
228# Companion Chips 196# Companion Chips
229# 197#
230# CONFIG_HD6446X_SERIES is not set
231 198
232# 199#
233# Additional SuperH Device Drivers 200# Additional SuperH Device Drivers
234# 201#
202# CONFIG_HEARTBEAT is not set
235# CONFIG_PUSH_SWITCH is not set 203# CONFIG_PUSH_SWITCH is not set
236 204
237# 205#
@@ -239,10 +207,11 @@ CONFIG_SH_CLK_MD=6
239# 207#
240CONFIG_HZ_100=y 208CONFIG_HZ_100=y
241# CONFIG_HZ_250 is not set 209# CONFIG_HZ_250 is not set
210# CONFIG_HZ_300 is not set
242# CONFIG_HZ_1000 is not set 211# CONFIG_HZ_1000 is not set
243CONFIG_HZ=100 212CONFIG_HZ=100
244# CONFIG_KEXEC is not set 213# CONFIG_KEXEC is not set
245# CONFIG_SMP is not set 214# CONFIG_CRASH_DUMP is not set
246CONFIG_PREEMPT_NONE=y 215CONFIG_PREEMPT_NONE=y
247# CONFIG_PREEMPT_VOLUNTARY is not set 216# CONFIG_PREEMPT_VOLUNTARY is not set
248# CONFIG_PREEMPT is not set 217# CONFIG_PREEMPT is not set
@@ -252,23 +221,18 @@ CONFIG_PREEMPT_NONE=y
252# 221#
253CONFIG_ZERO_PAGE_OFFSET=0x00001000 222CONFIG_ZERO_PAGE_OFFSET=0x00001000
254CONFIG_BOOT_LINK_OFFSET=0x00800000 223CONFIG_BOOT_LINK_OFFSET=0x00800000
255# CONFIG_UBC_WAKEUP is not set
256# CONFIG_CMDLINE_BOOL is not set 224# CONFIG_CMDLINE_BOOL is not set
257 225
258# 226#
259# Bus options 227# Bus options
260# 228#
261# CONFIG_PCI is not set 229# CONFIG_ARCH_SUPPORTS_MSI is not set
262 230
263# 231#
264# PCCARD (PCMCIA/CardBus) support 232# PCCARD (PCMCIA/CardBus) support
265# 233#
266 234
267# 235#
268# PCI Hotplug Support
269#
270
271#
272# Executable file formats 236# Executable file formats
273# 237#
274CONFIG_BINFMT_FLAT=y 238CONFIG_BINFMT_FLAT=y
@@ -277,11 +241,6 @@ CONFIG_BINFMT_ZFLAT=y
277# CONFIG_BINFMT_MISC is not set 241# CONFIG_BINFMT_MISC is not set
278 242
279# 243#
280# Power management options (EXPERIMENTAL)
281#
282# CONFIG_PM is not set
283
284#
285# Networking 244# Networking
286# 245#
287CONFIG_NET=y 246CONFIG_NET=y
@@ -289,7 +248,6 @@ CONFIG_NET=y
289# 248#
290# Networking options 249# Networking options
291# 250#
292# CONFIG_NETDEBUG is not set
293# CONFIG_PACKET is not set 251# CONFIG_PACKET is not set
294# CONFIG_UNIX is not set 252# CONFIG_UNIX is not set
295# CONFIG_NET_KEY is not set 253# CONFIG_NET_KEY is not set
@@ -314,25 +272,14 @@ CONFIG_IP_FIB_HASH=y
314# CONFIG_TCP_CONG_ADVANCED is not set 272# CONFIG_TCP_CONG_ADVANCED is not set
315CONFIG_TCP_CONG_CUBIC=y 273CONFIG_TCP_CONG_CUBIC=y
316CONFIG_DEFAULT_TCP_CONG="cubic" 274CONFIG_DEFAULT_TCP_CONG="cubic"
275# CONFIG_TCP_MD5SIG is not set
317# CONFIG_IPV6 is not set 276# CONFIG_IPV6 is not set
318# CONFIG_INET6_XFRM_TUNNEL is not set 277# CONFIG_INET6_XFRM_TUNNEL is not set
319# CONFIG_INET6_TUNNEL is not set 278# CONFIG_INET6_TUNNEL is not set
320# CONFIG_NETWORK_SECMARK is not set 279# CONFIG_NETWORK_SECMARK is not set
321# CONFIG_NETFILTER is not set 280# CONFIG_NETFILTER is not set
322
323#
324# DCCP Configuration (EXPERIMENTAL)
325#
326# CONFIG_IP_DCCP is not set 281# CONFIG_IP_DCCP is not set
327
328#
329# SCTP Configuration (EXPERIMENTAL)
330#
331# CONFIG_IP_SCTP is not set 282# CONFIG_IP_SCTP is not set
332
333#
334# TIPC Configuration (EXPERIMENTAL)
335#
336# CONFIG_TIPC is not set 283# CONFIG_TIPC is not set
337# CONFIG_ATM is not set 284# CONFIG_ATM is not set
338# CONFIG_BRIDGE is not set 285# CONFIG_BRIDGE is not set
@@ -358,7 +305,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
358# CONFIG_HAMRADIO is not set 305# CONFIG_HAMRADIO is not set
359# CONFIG_IRDA is not set 306# CONFIG_IRDA is not set
360# CONFIG_BT is not set 307# CONFIG_BT is not set
308# CONFIG_AF_RXRPC is not set
309
310#
311# Wireless
312#
313# CONFIG_CFG80211 is not set
314# CONFIG_WIRELESS_EXT is not set
315# CONFIG_MAC80211 is not set
361# CONFIG_IEEE80211 is not set 316# CONFIG_IEEE80211 is not set
317# CONFIG_RFKILL is not set
362 318
363# 319#
364# Device Drivers 320# Device Drivers
@@ -375,10 +331,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
375# Connector - unified userspace <-> kernelspace linker 331# Connector - unified userspace <-> kernelspace linker
376# 332#
377# CONFIG_CONNECTOR is not set 333# CONFIG_CONNECTOR is not set
378
379#
380# Memory Technology Devices (MTD)
381#
382CONFIG_MTD=y 334CONFIG_MTD=y
383# CONFIG_MTD_DEBUG is not set 335# CONFIG_MTD_DEBUG is not set
384CONFIG_MTD_CONCAT=y 336CONFIG_MTD_CONCAT=y
@@ -393,6 +345,7 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
393# User Modules And Translation Layers 345# User Modules And Translation Layers
394# 346#
395CONFIG_MTD_CHAR=y 347CONFIG_MTD_CHAR=y
348CONFIG_MTD_BLKDEVS=y
396CONFIG_MTD_BLOCK=y 349CONFIG_MTD_BLOCK=y
397# CONFIG_FTL is not set 350# CONFIG_FTL is not set
398# CONFIG_NFTL is not set 351# CONFIG_NFTL is not set
@@ -424,7 +377,6 @@ CONFIG_MTD_CFI_UTIL=y
424# CONFIG_MTD_RAM is not set 377# CONFIG_MTD_RAM is not set
425# CONFIG_MTD_ROM is not set 378# CONFIG_MTD_ROM is not set
426# CONFIG_MTD_ABSENT is not set 379# CONFIG_MTD_ABSENT is not set
427# CONFIG_MTD_OBSOLETE_CHIPS is not set
428 380
429# 381#
430# Mapping drivers for chip access 382# Mapping drivers for chip access
@@ -452,16 +404,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
452# CONFIG_MTD_DOC2000 is not set 404# CONFIG_MTD_DOC2000 is not set
453# CONFIG_MTD_DOC2001 is not set 405# CONFIG_MTD_DOC2001 is not set
454# CONFIG_MTD_DOC2001PLUS is not set 406# CONFIG_MTD_DOC2001PLUS is not set
455
456#
457# NAND Flash Device Drivers
458#
459# CONFIG_MTD_NAND is not set 407# CONFIG_MTD_NAND is not set
408# CONFIG_MTD_ONENAND is not set
460 409
461# 410#
462# OneNAND Flash Device Drivers 411# UBI - Unsorted block images
463# 412#
464# CONFIG_MTD_ONENAND is not set 413# CONFIG_MTD_UBI is not set
465 414
466# 415#
467# Parallel port support 416# Parallel port support
@@ -471,6 +420,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
471# 420#
472# Plug and Play support 421# Plug and Play support
473# 422#
423# CONFIG_PNPACPI is not set
474 424
475# 425#
476# Block devices 426# Block devices
@@ -479,18 +429,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
479# CONFIG_BLK_DEV_LOOP is not set 429# CONFIG_BLK_DEV_LOOP is not set
480# CONFIG_BLK_DEV_NBD is not set 430# CONFIG_BLK_DEV_NBD is not set
481# CONFIG_BLK_DEV_RAM is not set 431# CONFIG_BLK_DEV_RAM is not set
482# CONFIG_BLK_DEV_INITRD is not set
483# CONFIG_CDROM_PKTCDVD is not set 432# CONFIG_CDROM_PKTCDVD is not set
484# CONFIG_ATA_OVER_ETH is not set 433# CONFIG_ATA_OVER_ETH is not set
485 434
486# 435#
487# Misc devices 436# Misc devices
488# 437#
489# CONFIG_TIFM_CORE is not set 438# CONFIG_BLINK is not set
490
491#
492# ATA/ATAPI/MFM/RLL support
493#
494# CONFIG_IDE is not set 439# CONFIG_IDE is not set
495 440
496# 441#
@@ -499,10 +444,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
499# CONFIG_RAID_ATTRS is not set 444# CONFIG_RAID_ATTRS is not set
500# CONFIG_SCSI is not set 445# CONFIG_SCSI is not set
501# CONFIG_SCSI_NETLINK is not set 446# CONFIG_SCSI_NETLINK is not set
502
503#
504# Serial ATA (prod) and Parallel ATA (experimental) drivers
505#
506# CONFIG_ATA is not set 447# CONFIG_ATA is not set
507 448
508# 449#
@@ -511,19 +452,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
511# CONFIG_MD is not set 452# CONFIG_MD is not set
512 453
513# 454#
514# Fusion MPT device support
515#
516# CONFIG_FUSION is not set
517
518#
519# IEEE 1394 (FireWire) support
520#
521
522#
523# I2O device support
524#
525
526#
527# Network device support 455# Network device support
528# 456#
529CONFIG_NETDEVICES=y 457CONFIG_NETDEVICES=y
@@ -531,10 +459,6 @@ CONFIG_NETDEVICES=y
531# CONFIG_BONDING is not set 459# CONFIG_BONDING is not set
532# CONFIG_EQUALIZER is not set 460# CONFIG_EQUALIZER is not set
533# CONFIG_TUN is not set 461# CONFIG_TUN is not set
534
535#
536# PHY device support
537#
538# CONFIG_PHYLIB is not set 462# CONFIG_PHYLIB is not set
539 463
540# 464#
@@ -544,27 +468,14 @@ CONFIG_NET_ETHERNET=y
544CONFIG_MII=y 468CONFIG_MII=y
545# CONFIG_STNIC is not set 469# CONFIG_STNIC is not set
546CONFIG_SMC91X=y 470CONFIG_SMC91X=y
471CONFIG_NETDEV_1000=y
472CONFIG_NETDEV_10000=y
547 473
548# 474#
549# Ethernet (1000 Mbit) 475# Wireless LAN
550#
551
552#
553# Ethernet (10000 Mbit)
554#
555
556#
557# Token Ring devices
558#
559
560#
561# Wireless LAN (non-hamradio)
562#
563# CONFIG_NET_RADIO is not set
564
565#
566# Wan interfaces
567# 476#
477# CONFIG_WLAN_PRE80211 is not set
478# CONFIG_WLAN_80211 is not set
568# CONFIG_WAN is not set 479# CONFIG_WAN is not set
569# CONFIG_PPP is not set 480# CONFIG_PPP is not set
570# CONFIG_SLIP is not set 481# CONFIG_SLIP is not set
@@ -604,6 +515,7 @@ CONFIG_INPUT=y
604# CONFIG_INPUT_KEYBOARD is not set 515# CONFIG_INPUT_KEYBOARD is not set
605# CONFIG_INPUT_MOUSE is not set 516# CONFIG_INPUT_MOUSE is not set
606# CONFIG_INPUT_JOYSTICK is not set 517# CONFIG_INPUT_JOYSTICK is not set
518# CONFIG_INPUT_TABLET is not set
607# CONFIG_INPUT_TOUCHSCREEN is not set 519# CONFIG_INPUT_TOUCHSCREEN is not set
608# CONFIG_INPUT_MISC is not set 520# CONFIG_INPUT_MISC is not set
609 521
@@ -639,29 +551,15 @@ CONFIG_SERIAL_CORE_CONSOLE=y
639# IPMI 551# IPMI
640# 552#
641# CONFIG_IPMI_HANDLER is not set 553# CONFIG_IPMI_HANDLER is not set
642
643#
644# Watchdog Cards
645#
646# CONFIG_WATCHDOG is not set 554# CONFIG_WATCHDOG is not set
647# CONFIG_HW_RANDOM is not set 555# CONFIG_HW_RANDOM is not set
648# CONFIG_GEN_RTC is not set
649# CONFIG_DTLK is not set
650# CONFIG_R3964 is not set 556# CONFIG_R3964 is not set
651
652#
653# Ftape, the floppy tape device driver
654#
655# CONFIG_RAW_DRIVER is not set 557# CONFIG_RAW_DRIVER is not set
656 558
657# 559#
658# TPM devices 560# TPM devices
659# 561#
660# CONFIG_TCG_TPM is not set 562# CONFIG_TCG_TPM is not set
661
662#
663# I2C support
664#
665# CONFIG_I2C is not set 563# CONFIG_I2C is not set
666 564
667# 565#
@@ -674,27 +572,30 @@ CONFIG_SERIAL_CORE_CONSOLE=y
674# Dallas's 1-wire bus 572# Dallas's 1-wire bus
675# 573#
676# CONFIG_W1 is not set 574# CONFIG_W1 is not set
575# CONFIG_HWMON is not set
677 576
678# 577#
679# Hardware Monitoring support 578# Multifunction device drivers
680# 579#
681# CONFIG_HWMON is not set 580# CONFIG_MFD_SM501 is not set
682# CONFIG_HWMON_VID is not set
683 581
684# 582#
685# Multimedia devices 583# Multimedia devices
686# 584#
687# CONFIG_VIDEO_DEV is not set 585# CONFIG_VIDEO_DEV is not set
586# CONFIG_DVB_CORE is not set
587CONFIG_DAB=y
688 588
689# 589#
690# Digital Video Broadcasting Devices 590# Graphics support
691# 591#
692# CONFIG_DVB is not set 592# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
693 593
694# 594#
695# Graphics support 595# Display device support
696# 596#
697# CONFIG_FIRMWARE_EDID is not set 597# CONFIG_DISPLAY_SUPPORT is not set
598# CONFIG_VGASTATE is not set
698# CONFIG_FB is not set 599# CONFIG_FB is not set
699 600
700# 601#
@@ -703,6 +604,12 @@ CONFIG_SERIAL_CORE_CONSOLE=y
703# CONFIG_SOUND is not set 604# CONFIG_SOUND is not set
704 605
705# 606#
607# HID Devices
608#
609CONFIG_HID=y
610# CONFIG_HID_DEBUG is not set
611
612#
706# USB support 613# USB support
707# 614#
708# CONFIG_USB_ARCH_HAS_HCD is not set 615# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -717,10 +624,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
717# USB Gadget Support 624# USB Gadget Support
718# 625#
719# CONFIG_USB_GADGET is not set 626# CONFIG_USB_GADGET is not set
720
721#
722# MMC/SD Card support
723#
724# CONFIG_MMC is not set 627# CONFIG_MMC is not set
725 628
726# 629#
@@ -802,7 +705,6 @@ CONFIG_PROC_FS=y
802CONFIG_PROC_SYSCTL=y 705CONFIG_PROC_SYSCTL=y
803# CONFIG_SYSFS is not set 706# CONFIG_SYSFS is not set
804# CONFIG_TMPFS is not set 707# CONFIG_TMPFS is not set
805# CONFIG_HUGETLBFS is not set
806# CONFIG_HUGETLB_PAGE is not set 708# CONFIG_HUGETLB_PAGE is not set
807CONFIG_RAMFS=y 709CONFIG_RAMFS=y
808 710
@@ -816,7 +718,6 @@ CONFIG_RAMFS=y
816# CONFIG_BEFS_FS is not set 718# CONFIG_BEFS_FS is not set
817# CONFIG_BFS_FS is not set 719# CONFIG_BFS_FS is not set
818# CONFIG_EFS_FS is not set 720# CONFIG_EFS_FS is not set
819# CONFIG_JFFS_FS is not set
820# CONFIG_JFFS2_FS is not set 721# CONFIG_JFFS2_FS is not set
821# CONFIG_CRAMFS is not set 722# CONFIG_CRAMFS is not set
822# CONFIG_VXFS_FS is not set 723# CONFIG_VXFS_FS is not set
@@ -849,6 +750,11 @@ CONFIG_MSDOS_PARTITION=y
849# CONFIG_NLS is not set 750# CONFIG_NLS is not set
850 751
851# 752#
753# Distributed Lock Manager
754#
755# CONFIG_DLM is not set
756
757#
852# Profiling support 758# Profiling support
853# 759#
854# CONFIG_PROFILING is not set 760# CONFIG_PROFILING is not set
@@ -861,14 +767,11 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
861# CONFIG_ENABLE_MUST_CHECK is not set 767# CONFIG_ENABLE_MUST_CHECK is not set
862# CONFIG_MAGIC_SYSRQ is not set 768# CONFIG_MAGIC_SYSRQ is not set
863# CONFIG_UNUSED_SYMBOLS is not set 769# CONFIG_UNUSED_SYMBOLS is not set
770# CONFIG_HEADERS_CHECK is not set
864# CONFIG_DEBUG_KERNEL is not set 771# CONFIG_DEBUG_KERNEL is not set
865CONFIG_LOG_BUF_SHIFT=14
866# CONFIG_DEBUG_BUGVERBOSE is not set 772# CONFIG_DEBUG_BUGVERBOSE is not set
867# CONFIG_UNWIND_INFO is not set
868# CONFIG_HEADERS_CHECK is not set
869# CONFIG_SH_STANDARD_BIOS is not set 773# CONFIG_SH_STANDARD_BIOS is not set
870# CONFIG_EARLY_SCIF_CONSOLE is not set 774# CONFIG_EARLY_SCIF_CONSOLE is not set
871# CONFIG_KGDB is not set
872 775
873# 776#
874# Security options 777# Security options
@@ -883,8 +786,13 @@ CONFIG_LOG_BUF_SHIFT=14
883# 786#
884# Library routines 787# Library routines
885# 788#
789CONFIG_BITREVERSE=y
886# CONFIG_CRC_CCITT is not set 790# CONFIG_CRC_CCITT is not set
887# CONFIG_CRC16 is not set 791# CONFIG_CRC16 is not set
792# CONFIG_CRC_ITU_T is not set
888CONFIG_CRC32=y 793CONFIG_CRC32=y
889# CONFIG_LIBCRC32C is not set 794# CONFIG_LIBCRC32C is not set
890CONFIG_ZLIB_INFLATE=y 795CONFIG_ZLIB_INFLATE=y
796CONFIG_HAS_IOMEM=y
797CONFIG_HAS_IOPORT=y
798CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/se7619_defconfig b/arch/sh/configs/se7619_defconfig
index 20ac7f4c53fb..3a3c3c1f507d 100644
--- a/arch/sh/configs/se7619_defconfig
+++ b/arch/sh/configs/se7619_defconfig
@@ -1,18 +1,22 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19 3# Linux kernel version: 2.6.22-rc4
4# Wed Dec 6 16:35:36 2006 4# Fri Jun 15 19:43:06 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8CONFIG_GENERIC_BUG=y
8CONFIG_GENERIC_FIND_NEXT_BIT=y 9CONFIG_GENERIC_FIND_NEXT_BIT=y
9CONFIG_GENERIC_HWEIGHT=y 10CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_HARDIRQS=y 11CONFIG_GENERIC_HARDIRQS=y
11CONFIG_GENERIC_IRQ_PROBE=y 12CONFIG_GENERIC_IRQ_PROBE=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
13# CONFIG_GENERIC_TIME is not set 14# CONFIG_GENERIC_TIME is not set
15# CONFIG_GENERIC_CLOCKEVENTS is not set
14CONFIG_STACKTRACE_SUPPORT=y 16CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y 17CONFIG_LOCKDEP_SUPPORT=y
18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
16CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
17 21
18# 22#
@@ -31,8 +35,10 @@ CONFIG_LOCALVERSION=""
31# CONFIG_BSD_PROCESS_ACCT is not set 35# CONFIG_BSD_PROCESS_ACCT is not set
32# CONFIG_UTS_NS is not set 36# CONFIG_UTS_NS is not set
33# CONFIG_IKCONFIG is not set 37# CONFIG_IKCONFIG is not set
38CONFIG_LOG_BUF_SHIFT=14
39CONFIG_SYSFS_DEPRECATED=y
34# CONFIG_RELAY is not set 40# CONFIG_RELAY is not set
35CONFIG_INITRAMFS_SOURCE="" 41# CONFIG_BLK_DEV_INITRD is not set
36CONFIG_CC_OPTIMIZE_FOR_SIZE=y 42CONFIG_CC_OPTIMIZE_FOR_SIZE=y
37CONFIG_SYSCTL=y 43CONFIG_SYSCTL=y
38CONFIG_EMBEDDED=y 44CONFIG_EMBEDDED=y
@@ -45,12 +51,17 @@ CONFIG_BUG=y
45# CONFIG_ELF_CORE is not set 51# CONFIG_ELF_CORE is not set
46# CONFIG_BASE_FULL is not set 52# CONFIG_BASE_FULL is not set
47# CONFIG_FUTEX is not set 53# CONFIG_FUTEX is not set
54CONFIG_ANON_INODES=y
48# CONFIG_EPOLL is not set 55# CONFIG_EPOLL is not set
49CONFIG_SLAB=y 56CONFIG_SIGNALFD=y
57CONFIG_TIMERFD=y
58CONFIG_EVENTFD=y
50# CONFIG_VM_EVENT_COUNTERS is not set 59# CONFIG_VM_EVENT_COUNTERS is not set
60CONFIG_SLAB=y
61# CONFIG_SLUB is not set
62# CONFIG_SLOB is not set
51CONFIG_TINY_SHMEM=y 63CONFIG_TINY_SHMEM=y
52CONFIG_BASE_SMALL=1 64CONFIG_BASE_SMALL=1
53# CONFIG_SLOB is not set
54 65
55# 66#
56# Loadable module support 67# Loadable module support
@@ -80,52 +91,9 @@ CONFIG_DEFAULT_IOSCHED="noop"
80# 91#
81# System type 92# System type
82# 93#
83# CONFIG_SH_SOLUTION_ENGINE is not set
84# CONFIG_SH_7751_SOLUTION_ENGINE is not set
85# CONFIG_SH_7300_SOLUTION_ENGINE is not set
86# CONFIG_SH_7343_SOLUTION_ENGINE is not set
87# CONFIG_SH_73180_SOLUTION_ENGINE is not set
88# CONFIG_SH_7751_SYSTEMH is not set
89# CONFIG_SH_HP6XX is not set
90# CONFIG_SH_EC3104 is not set
91# CONFIG_SH_SATURN is not set
92# CONFIG_SH_DREAMCAST is not set
93# CONFIG_SH_BIGSUR is not set
94# CONFIG_SH_MPC1211 is not set
95# CONFIG_SH_SH03 is not set
96# CONFIG_SH_SECUREEDGE5410 is not set
97# CONFIG_SH_HS7751RVOIP is not set
98# CONFIG_SH_7710VOIPGW is not set
99# CONFIG_SH_RTS7751R2D is not set
100# CONFIG_SH_R7780RP is not set
101# CONFIG_SH_EDOSK7705 is not set
102# CONFIG_SH_SH4202_MICRODEV is not set
103# CONFIG_SH_LANDISK is not set
104# CONFIG_SH_TITAN is not set
105# CONFIG_SH_SHMIN is not set
106# CONFIG_SH_7206_SOLUTION_ENGINE is not set
107CONFIG_SH_7619_SOLUTION_ENGINE=y
108# CONFIG_SH_UNKNOWN is not set
109
110#
111# Processor selection
112#
113CONFIG_CPU_SH2=y 94CONFIG_CPU_SH2=y
114
115#
116# SH-2 Processor Support
117#
118# CONFIG_CPU_SUBTYPE_SH7604 is not set
119CONFIG_CPU_SUBTYPE_SH7619=y 95CONFIG_CPU_SUBTYPE_SH7619=y
120
121#
122# SH-2A Processor Support
123#
124# CONFIG_CPU_SUBTYPE_SH7206 is not set 96# CONFIG_CPU_SUBTYPE_SH7206 is not set
125
126#
127# SH-3 Processor Support
128#
129# CONFIG_CPU_SUBTYPE_SH7300 is not set 97# CONFIG_CPU_SUBTYPE_SH7300 is not set
130# CONFIG_CPU_SUBTYPE_SH7705 is not set 98# CONFIG_CPU_SUBTYPE_SH7705 is not set
131# CONFIG_CPU_SUBTYPE_SH7706 is not set 99# CONFIG_CPU_SUBTYPE_SH7706 is not set
@@ -133,10 +101,7 @@ CONFIG_CPU_SUBTYPE_SH7619=y
133# CONFIG_CPU_SUBTYPE_SH7708 is not set 101# CONFIG_CPU_SUBTYPE_SH7708 is not set
134# CONFIG_CPU_SUBTYPE_SH7709 is not set 102# CONFIG_CPU_SUBTYPE_SH7709 is not set
135# CONFIG_CPU_SUBTYPE_SH7710 is not set 103# CONFIG_CPU_SUBTYPE_SH7710 is not set
136 104# CONFIG_CPU_SUBTYPE_SH7712 is not set
137#
138# SH-4 Processor Support
139#
140# CONFIG_CPU_SUBTYPE_SH7750 is not set 105# CONFIG_CPU_SUBTYPE_SH7750 is not set
141# CONFIG_CPU_SUBTYPE_SH7091 is not set 106# CONFIG_CPU_SUBTYPE_SH7091 is not set
142# CONFIG_CPU_SUBTYPE_SH7750R is not set 107# CONFIG_CPU_SUBTYPE_SH7750R is not set
@@ -145,32 +110,28 @@ CONFIG_CPU_SUBTYPE_SH7619=y
145# CONFIG_CPU_SUBTYPE_SH7751R is not set 110# CONFIG_CPU_SUBTYPE_SH7751R is not set
146# CONFIG_CPU_SUBTYPE_SH7760 is not set 111# CONFIG_CPU_SUBTYPE_SH7760 is not set
147# CONFIG_CPU_SUBTYPE_SH4_202 is not set 112# CONFIG_CPU_SUBTYPE_SH4_202 is not set
148
149#
150# ST40 Processor Support
151#
152# CONFIG_CPU_SUBTYPE_ST40STB1 is not set 113# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
153# CONFIG_CPU_SUBTYPE_ST40GX1 is not set 114# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
154
155#
156# SH-4A Processor Support
157#
158# CONFIG_CPU_SUBTYPE_SH7770 is not set 115# CONFIG_CPU_SUBTYPE_SH7770 is not set
159# CONFIG_CPU_SUBTYPE_SH7780 is not set 116# CONFIG_CPU_SUBTYPE_SH7780 is not set
160# CONFIG_CPU_SUBTYPE_SH7785 is not set 117# CONFIG_CPU_SUBTYPE_SH7785 is not set
161
162#
163# SH4AL-DSP Processor Support
164#
165# CONFIG_CPU_SUBTYPE_SH73180 is not set 118# CONFIG_CPU_SUBTYPE_SH73180 is not set
166# CONFIG_CPU_SUBTYPE_SH7343 is not set 119# CONFIG_CPU_SUBTYPE_SH7343 is not set
120# CONFIG_CPU_SUBTYPE_SH7722 is not set
167 121
168# 122#
169# Memory management options 123# Memory management options
170# 124#
125CONFIG_QUICKLIST=y
171CONFIG_PAGE_OFFSET=0x00000000 126CONFIG_PAGE_OFFSET=0x00000000
172CONFIG_MEMORY_START=0x0c000000 127CONFIG_MEMORY_START=0x0c000000
173CONFIG_MEMORY_SIZE=0x04000000 128CONFIG_MEMORY_SIZE=0x04000000
129CONFIG_ARCH_FLATMEM_ENABLE=y
130CONFIG_ARCH_SPARSEMEM_ENABLE=y
131CONFIG_ARCH_SPARSEMEM_DEFAULT=y
132CONFIG_MAX_ACTIVE_REGIONS=1
133CONFIG_ARCH_POPULATES_NODE_MAP=y
134CONFIG_ARCH_SELECT_MEMORY_MODEL=y
174CONFIG_PAGE_SIZE_4KB=y 135CONFIG_PAGE_SIZE_4KB=y
175# CONFIG_PAGE_SIZE_8KB is not set 136# CONFIG_PAGE_SIZE_8KB is not set
176# CONFIG_PAGE_SIZE_64KB is not set 137# CONFIG_PAGE_SIZE_64KB is not set
@@ -180,34 +141,41 @@ CONFIG_FLATMEM_MANUAL=y
180# CONFIG_SPARSEMEM_MANUAL is not set 141# CONFIG_SPARSEMEM_MANUAL is not set
181CONFIG_FLATMEM=y 142CONFIG_FLATMEM=y
182CONFIG_FLAT_NODE_MEM_MAP=y 143CONFIG_FLAT_NODE_MEM_MAP=y
183# CONFIG_SPARSEMEM_STATIC is not set 144CONFIG_SPARSEMEM_STATIC=y
184CONFIG_SPLIT_PTLOCK_CPUS=4 145CONFIG_SPLIT_PTLOCK_CPUS=4
185# CONFIG_RESOURCES_64BIT is not set 146# CONFIG_RESOURCES_64BIT is not set
147CONFIG_ZONE_DMA_FLAG=0
148CONFIG_NR_QUICK=2
186 149
187# 150#
188# Cache configuration 151# Cache configuration
189# 152#
190# CONFIG_SH_DIRECT_MAPPED is not set 153# CONFIG_SH_DIRECT_MAPPED is not set
191CONFIG_SH_WRITETHROUGH=y 154CONFIG_SH_WRITETHROUGH=y
192# CONFIG_SH_OCRAM is not set
193 155
194# 156#
195# Processor features 157# Processor features
196# 158#
197# CONFIG_CPU_LITTLE_ENDIAN is not set 159# CONFIG_CPU_LITTLE_ENDIAN is not set
198CONFIG_CPU_BIG_ENDIAN=y 160CONFIG_CPU_BIG_ENDIAN=y
199# CONFIG_SH_FPU is not set
200# CONFIG_SH_FPU_EMU is not set 161# CONFIG_SH_FPU_EMU is not set
201# CONFIG_SH_DSP is not set 162# CONFIG_SH_DSP is not set
163CONFIG_CPU_HAS_IPR_IRQ=y
164
165#
166# Board support
167#
168CONFIG_SOLUTION_ENGINE=y
169CONFIG_SH_7619_SOLUTION_ENGINE=y
202 170
203# 171#
204# Timer support 172# Timer and clock configuration
205# 173#
206CONFIG_SH_CMT=y 174CONFIG_SH_CMT=y
207CONFIG_SH_TIMER_IRQ=86 175CONFIG_SH_TIMER_IRQ=86
208# CONFIG_NO_IDLE_HZ is not set
209CONFIG_SH_PCLK_FREQ=31250000 176CONFIG_SH_PCLK_FREQ=31250000
210CONFIG_SH_CLK_MD=5 177CONFIG_SH_CLK_MD=5
178# CONFIG_TICK_ONESHOT is not set
211 179
212# 180#
213# CPU Frequency scaling 181# CPU Frequency scaling
@@ -222,11 +190,11 @@ CONFIG_SH_CLK_MD=5
222# 190#
223# Companion Chips 191# Companion Chips
224# 192#
225# CONFIG_HD6446X_SERIES is not set
226 193
227# 194#
228# Additional SuperH Device Drivers 195# Additional SuperH Device Drivers
229# 196#
197# CONFIG_HEARTBEAT is not set
230# CONFIG_PUSH_SWITCH is not set 198# CONFIG_PUSH_SWITCH is not set
231 199
232# 200#
@@ -234,10 +202,11 @@ CONFIG_SH_CLK_MD=5
234# 202#
235CONFIG_HZ_100=y 203CONFIG_HZ_100=y
236# CONFIG_HZ_250 is not set 204# CONFIG_HZ_250 is not set
205# CONFIG_HZ_300 is not set
237# CONFIG_HZ_1000 is not set 206# CONFIG_HZ_1000 is not set
238CONFIG_HZ=100 207CONFIG_HZ=100
239# CONFIG_KEXEC is not set 208# CONFIG_KEXEC is not set
240# CONFIG_SMP is not set 209# CONFIG_CRASH_DUMP is not set
241CONFIG_PREEMPT_NONE=y 210CONFIG_PREEMPT_NONE=y
242# CONFIG_PREEMPT_VOLUNTARY is not set 211# CONFIG_PREEMPT_VOLUNTARY is not set
243# CONFIG_PREEMPT is not set 212# CONFIG_PREEMPT is not set
@@ -247,23 +216,18 @@ CONFIG_PREEMPT_NONE=y
247# 216#
248CONFIG_ZERO_PAGE_OFFSET=0x00001000 217CONFIG_ZERO_PAGE_OFFSET=0x00001000
249CONFIG_BOOT_LINK_OFFSET=0x00800000 218CONFIG_BOOT_LINK_OFFSET=0x00800000
250# CONFIG_UBC_WAKEUP is not set
251# CONFIG_CMDLINE_BOOL is not set 219# CONFIG_CMDLINE_BOOL is not set
252 220
253# 221#
254# Bus options 222# Bus options
255# 223#
256# CONFIG_PCI is not set 224# CONFIG_ARCH_SUPPORTS_MSI is not set
257 225
258# 226#
259# PCCARD (PCMCIA/CardBus) support 227# PCCARD (PCMCIA/CardBus) support
260# 228#
261 229
262# 230#
263# PCI Hotplug Support
264#
265
266#
267# Executable file formats 231# Executable file formats
268# 232#
269CONFIG_BINFMT_FLAT=y 233CONFIG_BINFMT_FLAT=y
@@ -272,11 +236,6 @@ CONFIG_BINFMT_ZFLAT=y
272# CONFIG_BINFMT_MISC is not set 236# CONFIG_BINFMT_MISC is not set
273 237
274# 238#
275# Power management options (EXPERIMENTAL)
276#
277# CONFIG_PM is not set
278
279#
280# Networking 239# Networking
281# 240#
282# CONFIG_NET is not set 241# CONFIG_NET is not set
@@ -295,10 +254,6 @@ CONFIG_BINFMT_ZFLAT=y
295# 254#
296# Connector - unified userspace <-> kernelspace linker 255# Connector - unified userspace <-> kernelspace linker
297# 256#
298
299#
300# Memory Technology Devices (MTD)
301#
302CONFIG_MTD=y 257CONFIG_MTD=y
303# CONFIG_MTD_DEBUG is not set 258# CONFIG_MTD_DEBUG is not set
304CONFIG_MTD_CONCAT=y 259CONFIG_MTD_CONCAT=y
@@ -313,6 +268,7 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
313# User Modules And Translation Layers 268# User Modules And Translation Layers
314# 269#
315CONFIG_MTD_CHAR=y 270CONFIG_MTD_CHAR=y
271CONFIG_MTD_BLKDEVS=y
316CONFIG_MTD_BLOCK=y 272CONFIG_MTD_BLOCK=y
317# CONFIG_FTL is not set 273# CONFIG_FTL is not set
318# CONFIG_NFTL is not set 274# CONFIG_NFTL is not set
@@ -344,7 +300,6 @@ CONFIG_MTD_CFI_UTIL=y
344# CONFIG_MTD_RAM is not set 300# CONFIG_MTD_RAM is not set
345# CONFIG_MTD_ROM is not set 301# CONFIG_MTD_ROM is not set
346# CONFIG_MTD_ABSENT is not set 302# CONFIG_MTD_ABSENT is not set
347# CONFIG_MTD_OBSOLETE_CHIPS is not set
348 303
349# 304#
350# Mapping drivers for chip access 305# Mapping drivers for chip access
@@ -372,16 +327,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
372# CONFIG_MTD_DOC2000 is not set 327# CONFIG_MTD_DOC2000 is not set
373# CONFIG_MTD_DOC2001 is not set 328# CONFIG_MTD_DOC2001 is not set
374# CONFIG_MTD_DOC2001PLUS is not set 329# CONFIG_MTD_DOC2001PLUS is not set
375
376#
377# NAND Flash Device Drivers
378#
379# CONFIG_MTD_NAND is not set 330# CONFIG_MTD_NAND is not set
331# CONFIG_MTD_ONENAND is not set
380 332
381# 333#
382# OneNAND Flash Device Drivers 334# UBI - Unsorted block images
383# 335#
384# CONFIG_MTD_ONENAND is not set 336# CONFIG_MTD_UBI is not set
385 337
386# 338#
387# Parallel port support 339# Parallel port support
@@ -391,6 +343,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
391# 343#
392# Plug and Play support 344# Plug and Play support
393# 345#
346# CONFIG_PNPACPI is not set
394 347
395# 348#
396# Block devices 349# Block devices
@@ -398,17 +351,12 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
398# CONFIG_BLK_DEV_COW_COMMON is not set 351# CONFIG_BLK_DEV_COW_COMMON is not set
399# CONFIG_BLK_DEV_LOOP is not set 352# CONFIG_BLK_DEV_LOOP is not set
400# CONFIG_BLK_DEV_RAM is not set 353# CONFIG_BLK_DEV_RAM is not set
401# CONFIG_BLK_DEV_INITRD is not set
402# CONFIG_CDROM_PKTCDVD is not set 354# CONFIG_CDROM_PKTCDVD is not set
403 355
404# 356#
405# Misc devices 357# Misc devices
406# 358#
407# CONFIG_TIFM_CORE is not set 359# CONFIG_BLINK is not set
408
409#
410# ATA/ATAPI/MFM/RLL support
411#
412# CONFIG_IDE is not set 360# CONFIG_IDE is not set
413 361
414# 362#
@@ -417,10 +365,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
417# CONFIG_RAID_ATTRS is not set 365# CONFIG_RAID_ATTRS is not set
418# CONFIG_SCSI is not set 366# CONFIG_SCSI is not set
419# CONFIG_SCSI_NETLINK is not set 367# CONFIG_SCSI_NETLINK is not set
420
421#
422# Serial ATA (prod) and Parallel ATA (experimental) drivers
423#
424# CONFIG_ATA is not set 368# CONFIG_ATA is not set
425 369
426# 370#
@@ -429,19 +373,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
429# CONFIG_MD is not set 373# CONFIG_MD is not set
430 374
431# 375#
432# Fusion MPT device support
433#
434# CONFIG_FUSION is not set
435
436#
437# IEEE 1394 (FireWire) support
438#
439
440#
441# I2O device support
442#
443
444#
445# ISDN subsystem 376# ISDN subsystem
446# 377#
447 378
@@ -471,6 +402,7 @@ CONFIG_INPUT=y
471# CONFIG_INPUT_KEYBOARD is not set 402# CONFIG_INPUT_KEYBOARD is not set
472# CONFIG_INPUT_MOUSE is not set 403# CONFIG_INPUT_MOUSE is not set
473# CONFIG_INPUT_JOYSTICK is not set 404# CONFIG_INPUT_JOYSTICK is not set
405# CONFIG_INPUT_TABLET is not set
474# CONFIG_INPUT_TOUCHSCREEN is not set 406# CONFIG_INPUT_TOUCHSCREEN is not set
475# CONFIG_INPUT_MISC is not set 407# CONFIG_INPUT_MISC is not set
476 408
@@ -506,29 +438,15 @@ CONFIG_SERIAL_CORE_CONSOLE=y
506# IPMI 438# IPMI
507# 439#
508# CONFIG_IPMI_HANDLER is not set 440# CONFIG_IPMI_HANDLER is not set
509
510#
511# Watchdog Cards
512#
513# CONFIG_WATCHDOG is not set 441# CONFIG_WATCHDOG is not set
514# CONFIG_HW_RANDOM is not set 442# CONFIG_HW_RANDOM is not set
515# CONFIG_GEN_RTC is not set
516# CONFIG_DTLK is not set
517# CONFIG_R3964 is not set 443# CONFIG_R3964 is not set
518
519#
520# Ftape, the floppy tape device driver
521#
522# CONFIG_RAW_DRIVER is not set 444# CONFIG_RAW_DRIVER is not set
523 445
524# 446#
525# TPM devices 447# TPM devices
526# 448#
527# CONFIG_TCG_TPM is not set 449# CONFIG_TCG_TPM is not set
528
529#
530# I2C support
531#
532# CONFIG_I2C is not set 450# CONFIG_I2C is not set
533 451
534# 452#
@@ -541,26 +459,29 @@ CONFIG_SERIAL_CORE_CONSOLE=y
541# Dallas's 1-wire bus 459# Dallas's 1-wire bus
542# 460#
543# CONFIG_W1 is not set 461# CONFIG_W1 is not set
462# CONFIG_HWMON is not set
544 463
545# 464#
546# Hardware Monitoring support 465# Multifunction device drivers
547# 466#
548# CONFIG_HWMON is not set 467# CONFIG_MFD_SM501 is not set
549# CONFIG_HWMON_VID is not set
550 468
551# 469#
552# Multimedia devices 470# Multimedia devices
553# 471#
554# CONFIG_VIDEO_DEV is not set 472# CONFIG_VIDEO_DEV is not set
473CONFIG_DAB=y
555 474
556# 475#
557# Digital Video Broadcasting Devices 476# Graphics support
558# 477#
478# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
559 479
560# 480#
561# Graphics support 481# Display device support
562# 482#
563# CONFIG_FIRMWARE_EDID is not set 483# CONFIG_DISPLAY_SUPPORT is not set
484# CONFIG_VGASTATE is not set
564# CONFIG_FB is not set 485# CONFIG_FB is not set
565 486
566# 487#
@@ -569,6 +490,12 @@ CONFIG_SERIAL_CORE_CONSOLE=y
569# CONFIG_SOUND is not set 490# CONFIG_SOUND is not set
570 491
571# 492#
493# HID Devices
494#
495CONFIG_HID=y
496# CONFIG_HID_DEBUG is not set
497
498#
572# USB support 499# USB support
573# 500#
574# CONFIG_USB_ARCH_HAS_HCD is not set 501# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -583,10 +510,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
583# USB Gadget Support 510# USB Gadget Support
584# 511#
585# CONFIG_USB_GADGET is not set 512# CONFIG_USB_GADGET is not set
586
587#
588# MMC/SD Card support
589#
590# CONFIG_MMC is not set 513# CONFIG_MMC is not set
591 514
592# 515#
@@ -668,7 +591,6 @@ CONFIG_PROC_FS=y
668CONFIG_PROC_SYSCTL=y 591CONFIG_PROC_SYSCTL=y
669# CONFIG_SYSFS is not set 592# CONFIG_SYSFS is not set
670# CONFIG_TMPFS is not set 593# CONFIG_TMPFS is not set
671# CONFIG_HUGETLBFS is not set
672# CONFIG_HUGETLB_PAGE is not set 594# CONFIG_HUGETLB_PAGE is not set
673CONFIG_RAMFS=y 595CONFIG_RAMFS=y
674 596
@@ -682,7 +604,6 @@ CONFIG_RAMFS=y
682# CONFIG_BEFS_FS is not set 604# CONFIG_BEFS_FS is not set
683# CONFIG_BFS_FS is not set 605# CONFIG_BFS_FS is not set
684# CONFIG_EFS_FS is not set 606# CONFIG_EFS_FS is not set
685# CONFIG_JFFS_FS is not set
686# CONFIG_JFFS2_FS is not set 607# CONFIG_JFFS2_FS is not set
687# CONFIG_CRAMFS is not set 608# CONFIG_CRAMFS is not set
688# CONFIG_VXFS_FS is not set 609# CONFIG_VXFS_FS is not set
@@ -715,14 +636,11 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
715# CONFIG_ENABLE_MUST_CHECK is not set 636# CONFIG_ENABLE_MUST_CHECK is not set
716# CONFIG_MAGIC_SYSRQ is not set 637# CONFIG_MAGIC_SYSRQ is not set
717# CONFIG_UNUSED_SYMBOLS is not set 638# CONFIG_UNUSED_SYMBOLS is not set
639# CONFIG_HEADERS_CHECK is not set
718# CONFIG_DEBUG_KERNEL is not set 640# CONFIG_DEBUG_KERNEL is not set
719CONFIG_LOG_BUF_SHIFT=14
720# CONFIG_DEBUG_BUGVERBOSE is not set 641# CONFIG_DEBUG_BUGVERBOSE is not set
721# CONFIG_UNWIND_INFO is not set
722# CONFIG_HEADERS_CHECK is not set
723# CONFIG_SH_STANDARD_BIOS is not set 642# CONFIG_SH_STANDARD_BIOS is not set
724# CONFIG_EARLY_SCIF_CONSOLE is not set 643# CONFIG_EARLY_SCIF_CONSOLE is not set
725# CONFIG_KGDB is not set
726 644
727# 645#
728# Security options 646# Security options
@@ -737,8 +655,13 @@ CONFIG_LOG_BUF_SHIFT=14
737# 655#
738# Library routines 656# Library routines
739# 657#
658CONFIG_BITREVERSE=y
740# CONFIG_CRC_CCITT is not set 659# CONFIG_CRC_CCITT is not set
741# CONFIG_CRC16 is not set 660# CONFIG_CRC16 is not set
661# CONFIG_CRC_ITU_T is not set
742CONFIG_CRC32=y 662CONFIG_CRC32=y
743# CONFIG_LIBCRC32C is not set 663# CONFIG_LIBCRC32C is not set
744CONFIG_ZLIB_INFLATE=y 664CONFIG_ZLIB_INFLATE=y
665CONFIG_HAS_IOMEM=y
666CONFIG_HAS_IOPORT=y
667CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/se7722_defconfig b/arch/sh/configs/se7722_defconfig
index ca4c663dfa37..8e6a6baf5d27 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.21-rc7 3# Linux kernel version: 2.6.22-rc4
4# Fri Apr 27 16:30:30 2007 4# Wed Jun 20 18:08:04 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -11,7 +11,9 @@ CONFIG_GENERIC_HWEIGHT=y
11CONFIG_GENERIC_HARDIRQS=y 11CONFIG_GENERIC_HARDIRQS=y
12CONFIG_GENERIC_IRQ_PROBE=y 12CONFIG_GENERIC_IRQ_PROBE=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
14# CONFIG_GENERIC_TIME is not set 14CONFIG_GENERIC_TIME=y
15CONFIG_GENERIC_CLOCKEVENTS=y
16CONFIG_SYS_SUPPORTS_NUMA=y
15CONFIG_STACKTRACE_SUPPORT=y 17CONFIG_STACKTRACE_SUPPORT=y
16CONFIG_LOCKDEP_SUPPORT=y 18CONFIG_LOCKDEP_SUPPORT=y
17# CONFIG_ARCH_HAS_ILOG2_U32 is not set 19# CONFIG_ARCH_HAS_ILOG2_U32 is not set
@@ -43,6 +45,7 @@ CONFIG_BSD_PROCESS_ACCT=y
43# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
44CONFIG_IKCONFIG=y 46CONFIG_IKCONFIG=y
45CONFIG_IKCONFIG_PROC=y 47CONFIG_IKCONFIG_PROC=y
48CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_SYSFS_DEPRECATED is not set 49# CONFIG_SYSFS_DEPRECATED is not set
47# CONFIG_RELAY is not set 50# CONFIG_RELAY is not set
48CONFIG_BLK_DEV_INITRD=y 51CONFIG_BLK_DEV_INITRD=y
@@ -60,14 +63,20 @@ CONFIG_BUG=y
60CONFIG_ELF_CORE=y 63CONFIG_ELF_CORE=y
61CONFIG_BASE_FULL=y 64CONFIG_BASE_FULL=y
62CONFIG_FUTEX=y 65CONFIG_FUTEX=y
66CONFIG_ANON_INODES=y
63CONFIG_EPOLL=y 67CONFIG_EPOLL=y
68CONFIG_SIGNALFD=y
69CONFIG_TIMERFD=y
70CONFIG_EVENTFD=y
64CONFIG_SHMEM=y 71CONFIG_SHMEM=y
65CONFIG_SLAB=y
66CONFIG_VM_EVENT_COUNTERS=y 72CONFIG_VM_EVENT_COUNTERS=y
73CONFIG_SLUB_DEBUG=y
74# CONFIG_SLAB is not set
75CONFIG_SLUB=y
76# CONFIG_SLOB is not set
67CONFIG_RT_MUTEXES=y 77CONFIG_RT_MUTEXES=y
68# CONFIG_TINY_SHMEM is not set 78# CONFIG_TINY_SHMEM is not set
69CONFIG_BASE_SMALL=0 79CONFIG_BASE_SMALL=0
70# CONFIG_SLOB is not set
71 80
72# 81#
73# Loadable module support 82# Loadable module support
@@ -103,57 +112,12 @@ CONFIG_DEFAULT_IOSCHED="noop"
103# 112#
104# System type 113# System type
105# 114#
106CONFIG_SOLUTION_ENGINE=y
107# CONFIG_SH_SOLUTION_ENGINE is not set
108CONFIG_SH_7722_SOLUTION_ENGINE=y
109# CONFIG_SH_7751_SOLUTION_ENGINE is not set
110# CONFIG_SH_7780_SOLUTION_ENGINE is not set
111# CONFIG_SH_7300_SOLUTION_ENGINE is not set
112# CONFIG_SH_7343_SOLUTION_ENGINE is not set
113# CONFIG_SH_73180_SOLUTION_ENGINE is not set
114# CONFIG_SH_7751_SYSTEMH is not set
115# CONFIG_SH_HP6XX is not set
116# CONFIG_SH_SATURN is not set
117# CONFIG_SH_DREAMCAST is not set
118# CONFIG_SH_MPC1211 is not set
119# CONFIG_SH_SH03 is not set
120# CONFIG_SH_SECUREEDGE5410 is not set
121# CONFIG_SH_HS7751RVOIP is not set
122# CONFIG_SH_7710VOIPGW is not set
123# CONFIG_SH_RTS7751R2D is not set
124# CONFIG_SH_HIGHLANDER is not set
125# CONFIG_SH_EDOSK7705 is not set
126# CONFIG_SH_SH4202_MICRODEV is not set
127# CONFIG_SH_LANDISK is not set
128# CONFIG_SH_TITAN is not set
129# CONFIG_SH_SHMIN is not set
130# CONFIG_SH_7206_SOLUTION_ENGINE is not set
131# CONFIG_SH_7619_SOLUTION_ENGINE is not set
132# CONFIG_SH_LBOX_RE2 is not set
133# CONFIG_SH_UNKNOWN is not set
134
135#
136# Processor selection
137#
138CONFIG_CPU_SH4=y 115CONFIG_CPU_SH4=y
139CONFIG_CPU_SH4A=y 116CONFIG_CPU_SH4A=y
140CONFIG_CPU_SH4AL_DSP=y 117CONFIG_CPU_SH4AL_DSP=y
141CONFIG_CPU_SHX2=y 118CONFIG_CPU_SHX2=y
142
143#
144# SH-2 Processor Support
145#
146# CONFIG_CPU_SUBTYPE_SH7604 is not set
147# CONFIG_CPU_SUBTYPE_SH7619 is not set 119# CONFIG_CPU_SUBTYPE_SH7619 is not set
148
149#
150# SH-2A Processor Support
151#
152# CONFIG_CPU_SUBTYPE_SH7206 is not set 120# CONFIG_CPU_SUBTYPE_SH7206 is not set
153
154#
155# SH-3 Processor Support
156#
157# CONFIG_CPU_SUBTYPE_SH7300 is not set 121# CONFIG_CPU_SUBTYPE_SH7300 is not set
158# CONFIG_CPU_SUBTYPE_SH7705 is not set 122# CONFIG_CPU_SUBTYPE_SH7705 is not set
159# CONFIG_CPU_SUBTYPE_SH7706 is not set 123# CONFIG_CPU_SUBTYPE_SH7706 is not set
@@ -162,10 +126,6 @@ CONFIG_CPU_SHX2=y
162# CONFIG_CPU_SUBTYPE_SH7709 is not set 126# CONFIG_CPU_SUBTYPE_SH7709 is not set
163# CONFIG_CPU_SUBTYPE_SH7710 is not set 127# CONFIG_CPU_SUBTYPE_SH7710 is not set
164# CONFIG_CPU_SUBTYPE_SH7712 is not set 128# CONFIG_CPU_SUBTYPE_SH7712 is not set
165
166#
167# SH-4 Processor Support
168#
169# CONFIG_CPU_SUBTYPE_SH7750 is not set 129# CONFIG_CPU_SUBTYPE_SH7750 is not set
170# CONFIG_CPU_SUBTYPE_SH7091 is not set 130# CONFIG_CPU_SUBTYPE_SH7091 is not set
171# CONFIG_CPU_SUBTYPE_SH7750R is not set 131# CONFIG_CPU_SUBTYPE_SH7750R is not set
@@ -174,23 +134,11 @@ CONFIG_CPU_SHX2=y
174# CONFIG_CPU_SUBTYPE_SH7751R is not set 134# CONFIG_CPU_SUBTYPE_SH7751R is not set
175# CONFIG_CPU_SUBTYPE_SH7760 is not set 135# CONFIG_CPU_SUBTYPE_SH7760 is not set
176# CONFIG_CPU_SUBTYPE_SH4_202 is not set 136# CONFIG_CPU_SUBTYPE_SH4_202 is not set
177
178#
179# ST40 Processor Support
180#
181# CONFIG_CPU_SUBTYPE_ST40STB1 is not set 137# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
182# CONFIG_CPU_SUBTYPE_ST40GX1 is not set 138# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
183
184#
185# SH-4A Processor Support
186#
187# CONFIG_CPU_SUBTYPE_SH7770 is not set 139# CONFIG_CPU_SUBTYPE_SH7770 is not set
188# CONFIG_CPU_SUBTYPE_SH7780 is not set 140# CONFIG_CPU_SUBTYPE_SH7780 is not set
189# CONFIG_CPU_SUBTYPE_SH7785 is not set 141# CONFIG_CPU_SUBTYPE_SH7785 is not set
190
191#
192# SH4AL-DSP Processor Support
193#
194# CONFIG_CPU_SUBTYPE_SH73180 is not set 142# CONFIG_CPU_SUBTYPE_SH73180 is not set
195# CONFIG_CPU_SUBTYPE_SH7343 is not set 143# CONFIG_CPU_SUBTYPE_SH7343 is not set
196CONFIG_CPU_SUBTYPE_SH7722=y 144CONFIG_CPU_SUBTYPE_SH7722=y
@@ -198,15 +146,21 @@ CONFIG_CPU_SUBTYPE_SH7722=y
198# 146#
199# Memory management options 147# Memory management options
200# 148#
149CONFIG_QUICKLIST=y
201CONFIG_MMU=y 150CONFIG_MMU=y
202CONFIG_PAGE_OFFSET=0x80000000 151CONFIG_PAGE_OFFSET=0x80000000
203CONFIG_MEMORY_START=0x0c000000 152CONFIG_MEMORY_START=0x0c000000
204CONFIG_MEMORY_SIZE=0x04000000 153CONFIG_MEMORY_SIZE=0x04000000
205# CONFIG_32BIT is not set
206# CONFIG_X2TLB is not set 154# CONFIG_X2TLB is not set
207CONFIG_VSYSCALL=y 155CONFIG_VSYSCALL=y
208CONFIG_ARCH_FLATMEM_ENABLE=y 156CONFIG_NUMA=y
157CONFIG_NODES_SHIFT=1
158CONFIG_ARCH_SPARSEMEM_ENABLE=y
159CONFIG_ARCH_SPARSEMEM_DEFAULT=y
160CONFIG_MAX_ACTIVE_REGIONS=2
209CONFIG_ARCH_POPULATES_NODE_MAP=y 161CONFIG_ARCH_POPULATES_NODE_MAP=y
162CONFIG_ARCH_SELECT_MEMORY_MODEL=y
163CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
210CONFIG_PAGE_SIZE_4KB=y 164CONFIG_PAGE_SIZE_4KB=y
211# CONFIG_PAGE_SIZE_8KB is not set 165# CONFIG_PAGE_SIZE_8KB is not set
212# CONFIG_PAGE_SIZE_64KB is not set 166# CONFIG_PAGE_SIZE_64KB is not set
@@ -216,26 +170,25 @@ CONFIG_HUGETLB_PAGE_SIZE_64K=y
216# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set 170# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
217# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set 171# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set
218CONFIG_SELECT_MEMORY_MODEL=y 172CONFIG_SELECT_MEMORY_MODEL=y
219CONFIG_FLATMEM_MANUAL=y 173# CONFIG_FLATMEM_MANUAL is not set
220# CONFIG_DISCONTIGMEM_MANUAL is not set 174# CONFIG_DISCONTIGMEM_MANUAL is not set
221# CONFIG_SPARSEMEM_MANUAL is not set 175CONFIG_SPARSEMEM_MANUAL=y
222CONFIG_FLATMEM=y 176CONFIG_SPARSEMEM=y
223CONFIG_FLAT_NODE_MEM_MAP=y 177CONFIG_NEED_MULTIPLE_NODES=y
224# CONFIG_SPARSEMEM_STATIC is not set 178CONFIG_HAVE_MEMORY_PRESENT=y
179CONFIG_SPARSEMEM_STATIC=y
180# CONFIG_MEMORY_HOTPLUG is not set
225CONFIG_SPLIT_PTLOCK_CPUS=4 181CONFIG_SPLIT_PTLOCK_CPUS=4
182CONFIG_MIGRATION=y
226# CONFIG_RESOURCES_64BIT is not set 183# CONFIG_RESOURCES_64BIT is not set
227CONFIG_ZONE_DMA_FLAG=0 184CONFIG_ZONE_DMA_FLAG=0
185CONFIG_NR_QUICK=2
228 186
229# 187#
230# Cache configuration 188# Cache configuration
231# 189#
232# CONFIG_SH_DIRECT_MAPPED is not set 190# CONFIG_SH_DIRECT_MAPPED is not set
233# CONFIG_SH_WRITETHROUGH is not set 191# CONFIG_SH_WRITETHROUGH is not set
234# CONFIG_SH_OCRAM is not set
235CONFIG_CF_ENABLER=y
236# CONFIG_CF_AREA5 is not set
237CONFIG_CF_AREA6=y
238CONFIG_CF_BASE_ADDR=0xb8000000
239 192
240# 193#
241# Processor features 194# Processor features
@@ -247,17 +200,25 @@ CONFIG_CPU_LITTLE_ENDIAN=y
247CONFIG_SH_DSP=y 200CONFIG_SH_DSP=y
248CONFIG_SH_STORE_QUEUES=y 201CONFIG_SH_STORE_QUEUES=y
249CONFIG_CPU_HAS_INTEVT=y 202CONFIG_CPU_HAS_INTEVT=y
250CONFIG_CPU_HAS_IPR_IRQ=y 203CONFIG_CPU_HAS_INTC_IRQ=y
251CONFIG_CPU_HAS_SR_RB=y 204CONFIG_CPU_HAS_SR_RB=y
252CONFIG_CPU_HAS_PTEA=y 205CONFIG_CPU_HAS_PTEA=y
253 206
254# 207#
208# Board support
209#
210CONFIG_SOLUTION_ENGINE=y
211CONFIG_SH_7722_SOLUTION_ENGINE=y
212
213#
255# Timer and clock configuration 214# Timer and clock configuration
256# 215#
257CONFIG_SH_TMU=y 216CONFIG_SH_TMU=y
258CONFIG_SH_TIMER_IRQ=16 217CONFIG_SH_TIMER_IRQ=16
259CONFIG_NO_IDLE_HZ=y
260CONFIG_SH_PCLK_FREQ=33333333 218CONFIG_SH_PCLK_FREQ=33333333
219CONFIG_TICK_ONESHOT=y
220CONFIG_NO_HZ=y
221CONFIG_HIGH_RES_TIMERS=y
261 222
262# 223#
263# CPU Frequency scaling 224# CPU Frequency scaling
@@ -272,7 +233,6 @@ CONFIG_SH_PCLK_FREQ=33333333
272# 233#
273# Companion Chips 234# Companion Chips
274# 235#
275# CONFIG_HD6446X_SERIES is not set
276 236
277# 237#
278# Additional SuperH Device Drivers 238# Additional SuperH Device Drivers
@@ -290,7 +250,6 @@ CONFIG_HZ_250=y
290CONFIG_HZ=250 250CONFIG_HZ=250
291CONFIG_KEXEC=y 251CONFIG_KEXEC=y
292# CONFIG_CRASH_DUMP is not set 252# CONFIG_CRASH_DUMP is not set
293# CONFIG_SMP is not set
294# CONFIG_PREEMPT_NONE is not set 253# CONFIG_PREEMPT_NONE is not set
295# CONFIG_PREEMPT_VOLUNTARY is not set 254# CONFIG_PREEMPT_VOLUNTARY is not set
296CONFIG_PREEMPT=y 255CONFIG_PREEMPT=y
@@ -307,7 +266,11 @@ CONFIG_BOOT_LINK_OFFSET=0x00800000
307# 266#
308# Bus options 267# Bus options
309# 268#
310# CONFIG_PCI is not set 269CONFIG_CF_ENABLER=y
270# CONFIG_CF_AREA5 is not set
271CONFIG_CF_AREA6=y
272CONFIG_CF_BASE_ADDR=0xb8000000
273# CONFIG_ARCH_SUPPORTS_MSI is not set
311 274
312# 275#
313# PCCARD (PCMCIA/CardBus) support 276# PCCARD (PCMCIA/CardBus) support
@@ -315,22 +278,12 @@ CONFIG_BOOT_LINK_OFFSET=0x00800000
315# CONFIG_PCCARD is not set 278# CONFIG_PCCARD is not set
316 279
317# 280#
318# PCI Hotplug Support
319#
320
321#
322# Executable file formats 281# Executable file formats
323# 282#
324CONFIG_BINFMT_ELF=y 283CONFIG_BINFMT_ELF=y
325# CONFIG_BINFMT_FLAT is not set
326# CONFIG_BINFMT_MISC is not set 284# CONFIG_BINFMT_MISC is not set
327 285
328# 286#
329# Power management options (EXPERIMENTAL)
330#
331# CONFIG_PM is not set
332
333#
334# Networking 287# Networking
335# 288#
336CONFIG_NET=y 289CONFIG_NET=y
@@ -338,7 +291,6 @@ CONFIG_NET=y
338# 291#
339# Networking options 292# Networking options
340# 293#
341# CONFIG_NETDEBUG is not set
342CONFIG_PACKET=y 294CONFIG_PACKET=y
343CONFIG_PACKET_MMAP=y 295CONFIG_PACKET_MMAP=y
344CONFIG_UNIX=y 296CONFIG_UNIX=y
@@ -375,20 +327,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
375# CONFIG_INET6_TUNNEL is not set 327# CONFIG_INET6_TUNNEL is not set
376# CONFIG_NETWORK_SECMARK is not set 328# CONFIG_NETWORK_SECMARK is not set
377# CONFIG_NETFILTER is not set 329# CONFIG_NETFILTER is not set
378
379#
380# DCCP Configuration (EXPERIMENTAL)
381#
382# CONFIG_IP_DCCP is not set 330# CONFIG_IP_DCCP is not set
383
384#
385# SCTP Configuration (EXPERIMENTAL)
386#
387# CONFIG_IP_SCTP is not set 331# CONFIG_IP_SCTP is not set
388
389#
390# TIPC Configuration (EXPERIMENTAL)
391#
392# CONFIG_TIPC is not set 332# CONFIG_TIPC is not set
393# CONFIG_ATM is not set 333# CONFIG_ATM is not set
394# CONFIG_BRIDGE is not set 334# CONFIG_BRIDGE is not set
@@ -414,7 +354,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
414# CONFIG_HAMRADIO is not set 354# CONFIG_HAMRADIO is not set
415# CONFIG_IRDA is not set 355# CONFIG_IRDA is not set
416# CONFIG_BT is not set 356# CONFIG_BT is not set
357# CONFIG_AF_RXRPC is not set
358
359#
360# Wireless
361#
362# CONFIG_CFG80211 is not set
363# CONFIG_WIRELESS_EXT is not set
364# CONFIG_MAC80211 is not set
417# CONFIG_IEEE80211 is not set 365# CONFIG_IEEE80211 is not set
366# CONFIG_RFKILL is not set
418 367
419# 368#
420# Device Drivers 369# Device Drivers
@@ -432,10 +381,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
432# Connector - unified userspace <-> kernelspace linker 381# Connector - unified userspace <-> kernelspace linker
433# 382#
434# CONFIG_CONNECTOR is not set 383# CONFIG_CONNECTOR is not set
435
436#
437# Memory Technology Devices (MTD)
438#
439# CONFIG_MTD is not set 384# CONFIG_MTD is not set
440 385
441# 386#
@@ -464,10 +409,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
464# 409#
465# Misc devices 410# Misc devices
466# 411#
467 412# CONFIG_BLINK is not set
468#
469# ATA/ATAPI/MFM/RLL support
470#
471# CONFIG_IDE is not set 413# CONFIG_IDE is not set
472 414
473# 415#
@@ -496,6 +438,7 @@ CONFIG_BLK_DEV_SD=y
496# CONFIG_SCSI_CONSTANTS is not set 438# CONFIG_SCSI_CONSTANTS is not set
497# CONFIG_SCSI_LOGGING is not set 439# CONFIG_SCSI_LOGGING is not set
498# CONFIG_SCSI_SCAN_ASYNC is not set 440# CONFIG_SCSI_SCAN_ASYNC is not set
441CONFIG_SCSI_WAIT_SCAN=m
499 442
500# 443#
501# SCSI Transports 444# SCSI Transports
@@ -511,10 +454,6 @@ CONFIG_BLK_DEV_SD=y
511# 454#
512# CONFIG_ISCSI_TCP is not set 455# CONFIG_ISCSI_TCP is not set
513# CONFIG_SCSI_DEBUG is not set 456# CONFIG_SCSI_DEBUG is not set
514
515#
516# Serial ATA (prod) and Parallel ATA (experimental) drivers
517#
518CONFIG_ATA=y 457CONFIG_ATA=y
519# CONFIG_ATA_NONSTANDARD is not set 458# CONFIG_ATA_NONSTANDARD is not set
520CONFIG_PATA_PLATFORM=y 459CONFIG_PATA_PLATFORM=y
@@ -525,19 +464,6 @@ CONFIG_PATA_PLATFORM=y
525# CONFIG_MD is not set 464# CONFIG_MD is not set
526 465
527# 466#
528# Fusion MPT device support
529#
530# CONFIG_FUSION is not set
531
532#
533# IEEE 1394 (FireWire) support
534#
535
536#
537# I2O device support
538#
539
540#
541# Network device support 467# Network device support
542# 468#
543CONFIG_NETDEVICES=y 469CONFIG_NETDEVICES=y
@@ -545,10 +471,6 @@ CONFIG_NETDEVICES=y
545# CONFIG_BONDING is not set 471# CONFIG_BONDING is not set
546# CONFIG_EQUALIZER is not set 472# CONFIG_EQUALIZER is not set
547# CONFIG_TUN is not set 473# CONFIG_TUN is not set
548
549#
550# PHY device support
551#
552# CONFIG_PHYLIB is not set 474# CONFIG_PHYLIB is not set
553 475
554# 476#
@@ -558,27 +480,14 @@ CONFIG_NET_ETHERNET=y
558CONFIG_MII=y 480CONFIG_MII=y
559# CONFIG_STNIC is not set 481# CONFIG_STNIC is not set
560CONFIG_SMC91X=y 482CONFIG_SMC91X=y
483CONFIG_NETDEV_1000=y
484CONFIG_NETDEV_10000=y
561 485
562# 486#
563# Ethernet (1000 Mbit) 487# Wireless LAN
564#
565
566#
567# Ethernet (10000 Mbit)
568#
569
570#
571# Token Ring devices
572#
573
574#
575# Wireless LAN (non-hamradio)
576#
577# CONFIG_NET_RADIO is not set
578
579#
580# Wan interfaces
581# 488#
489# CONFIG_WLAN_PRE80211 is not set
490# CONFIG_WLAN_80211 is not set
582# CONFIG_WAN is not set 491# CONFIG_WAN is not set
583# CONFIG_PPP is not set 492# CONFIG_PPP is not set
584# CONFIG_SLIP is not set 493# CONFIG_SLIP is not set
@@ -627,6 +536,7 @@ CONFIG_KEYBOARD_ATKBD=y
627# CONFIG_KEYBOARD_STOWAWAY is not set 536# CONFIG_KEYBOARD_STOWAWAY is not set
628# CONFIG_INPUT_MOUSE is not set 537# CONFIG_INPUT_MOUSE is not set
629# CONFIG_INPUT_JOYSTICK is not set 538# CONFIG_INPUT_JOYSTICK is not set
539# CONFIG_INPUT_TABLET is not set
630# CONFIG_INPUT_TOUCHSCREEN is not set 540# CONFIG_INPUT_TOUCHSCREEN is not set
631# CONFIG_INPUT_MISC is not set 541# CONFIG_INPUT_MISC is not set
632 542
@@ -655,7 +565,7 @@ CONFIG_SERIO_LIBPS2=y
655# Non-8250 serial port support 565# Non-8250 serial port support
656# 566#
657CONFIG_SERIAL_SH_SCI=y 567CONFIG_SERIAL_SH_SCI=y
658CONFIG_SERIAL_SH_SCI_NR_UARTS=2 568CONFIG_SERIAL_SH_SCI_NR_UARTS=3
659CONFIG_SERIAL_SH_SCI_CONSOLE=y 569CONFIG_SERIAL_SH_SCI_CONSOLE=y
660CONFIG_SERIAL_CORE=y 570CONFIG_SERIAL_CORE=y
661CONFIG_SERIAL_CORE_CONSOLE=y 571CONFIG_SERIAL_CORE_CONSOLE=y
@@ -667,14 +577,8 @@ CONFIG_LEGACY_PTY_COUNT=256
667# IPMI 577# IPMI
668# 578#
669# CONFIG_IPMI_HANDLER is not set 579# CONFIG_IPMI_HANDLER is not set
670
671#
672# Watchdog Cards
673#
674# CONFIG_WATCHDOG is not set 580# CONFIG_WATCHDOG is not set
675CONFIG_HW_RANDOM=y 581CONFIG_HW_RANDOM=y
676# CONFIG_GEN_RTC is not set
677# CONFIG_DTLK is not set
678# CONFIG_R3964 is not set 582# CONFIG_R3964 is not set
679# CONFIG_RAW_DRIVER is not set 583# CONFIG_RAW_DRIVER is not set
680 584
@@ -682,10 +586,6 @@ CONFIG_HW_RANDOM=y
682# TPM devices 586# TPM devices
683# 587#
684# CONFIG_TCG_TPM is not set 588# CONFIG_TCG_TPM is not set
685
686#
687# I2C support
688#
689# CONFIG_I2C is not set 589# CONFIG_I2C is not set
690 590
691# 591#
@@ -698,16 +598,15 @@ CONFIG_HW_RANDOM=y
698# Dallas's 1-wire bus 598# Dallas's 1-wire bus
699# 599#
700# CONFIG_W1 is not set 600# CONFIG_W1 is not set
701
702#
703# Hardware Monitoring support
704#
705CONFIG_HWMON=y 601CONFIG_HWMON=y
706# CONFIG_HWMON_VID is not set 602# CONFIG_HWMON_VID is not set
707# CONFIG_SENSORS_ABITUGURU is not set 603# CONFIG_SENSORS_ABITUGURU is not set
708# CONFIG_SENSORS_F71805F is not set 604# CONFIG_SENSORS_F71805F is not set
709# CONFIG_SENSORS_PC87427 is not set 605# CONFIG_SENSORS_PC87427 is not set
606# CONFIG_SENSORS_SMSC47M1 is not set
607# CONFIG_SENSORS_SMSC47B397 is not set
710# CONFIG_SENSORS_VT1211 is not set 608# CONFIG_SENSORS_VT1211 is not set
609# CONFIG_SENSORS_W83627HF is not set
711# CONFIG_HWMON_DEBUG_CHIP is not set 610# CONFIG_HWMON_DEBUG_CHIP is not set
712 611
713# 612#
@@ -719,16 +618,19 @@ CONFIG_HWMON=y
719# Multimedia devices 618# Multimedia devices
720# 619#
721# CONFIG_VIDEO_DEV is not set 620# CONFIG_VIDEO_DEV is not set
621# CONFIG_DVB_CORE is not set
622CONFIG_DAB=y
722 623
723# 624#
724# Digital Video Broadcasting Devices 625# Graphics support
725# 626#
726# CONFIG_DVB is not set 627# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
727 628
728# 629#
729# Graphics support 630# Display device support
730# 631#
731# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 632# CONFIG_DISPLAY_SUPPORT is not set
633# CONFIG_VGASTATE is not set
732# CONFIG_FB is not set 634# CONFIG_FB is not set
733 635
734# 636#
@@ -757,10 +659,6 @@ CONFIG_HID=y
757# USB Gadget Support 659# USB Gadget Support
758# 660#
759# CONFIG_USB_GADGET is not set 661# CONFIG_USB_GADGET is not set
760
761#
762# MMC/SD Card support
763#
764# CONFIG_MMC is not set 662# CONFIG_MMC is not set
765 663
766# 664#
@@ -800,18 +698,30 @@ CONFIG_RTC_INTF_SYSFS=y
800CONFIG_RTC_INTF_PROC=y 698CONFIG_RTC_INTF_PROC=y
801CONFIG_RTC_INTF_DEV=y 699CONFIG_RTC_INTF_DEV=y
802# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 700# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
701# CONFIG_RTC_DRV_TEST is not set
803 702
804# 703#
805# RTC drivers 704# I2C RTC drivers
705#
706
707#
708# SPI RTC drivers
709#
710
711#
712# Platform RTC drivers
806# 713#
807# CONFIG_RTC_DRV_DS1553 is not set 714# CONFIG_RTC_DRV_DS1553 is not set
808# CONFIG_RTC_DRV_DS1742 is not set 715# CONFIG_RTC_DRV_DS1742 is not set
809# CONFIG_RTC_DRV_M48T86 is not set 716# CONFIG_RTC_DRV_M48T86 is not set
810CONFIG_RTC_DRV_SH=y
811# CONFIG_RTC_DRV_TEST is not set
812# CONFIG_RTC_DRV_V3020 is not set 717# CONFIG_RTC_DRV_V3020 is not set
813 718
814# 719#
720# on-CPU RTC drivers
721#
722CONFIG_RTC_DRV_SH=y
723
724#
815# DMA Engine support 725# DMA Engine support
816# 726#
817# CONFIG_DMA_ENGINE is not set 727# CONFIG_DMA_ENGINE is not set
@@ -825,14 +735,6 @@ CONFIG_RTC_DRV_SH=y
825# 735#
826 736
827# 737#
828# Auxiliary Display support
829#
830
831#
832# Virtualization
833#
834
835#
836# File systems 738# File systems
837# 739#
838CONFIG_EXT2_FS=y 740CONFIG_EXT2_FS=y
@@ -937,23 +839,24 @@ CONFIG_MSDOS_PARTITION=y
937# 839#
938# Profiling support 840# Profiling support
939# 841#
940# CONFIG_PROFILING is not set 842CONFIG_PROFILING=y
843# CONFIG_OPROFILE is not set
941 844
942# 845#
943# Kernel hacking 846# Kernel hacking
944# 847#
945CONFIG_TRACE_IRQFLAGS_SUPPORT=y 848CONFIG_TRACE_IRQFLAGS_SUPPORT=y
946# CONFIG_PRINTK_TIME is not set 849CONFIG_PRINTK_TIME=y
947# CONFIG_ENABLE_MUST_CHECK is not set 850# CONFIG_ENABLE_MUST_CHECK is not set
948# CONFIG_MAGIC_SYSRQ is not set 851CONFIG_MAGIC_SYSRQ=y
949# CONFIG_UNUSED_SYMBOLS is not set 852# CONFIG_UNUSED_SYMBOLS is not set
950# CONFIG_DEBUG_FS is not set 853CONFIG_DEBUG_FS=y
951# CONFIG_HEADERS_CHECK is not set 854# CONFIG_HEADERS_CHECK is not set
952# CONFIG_DEBUG_KERNEL is not set 855# CONFIG_DEBUG_KERNEL is not set
953CONFIG_LOG_BUF_SHIFT=14
954# CONFIG_DEBUG_BUGVERBOSE is not set 856# CONFIG_DEBUG_BUGVERBOSE is not set
955# CONFIG_SH_STANDARD_BIOS is not set 857CONFIG_SH_STANDARD_BIOS=y
956# CONFIG_EARLY_SCIF_CONSOLE is not set 858# CONFIG_EARLY_SCIF_CONSOLE is not set
859# CONFIG_EARLY_PRINTK is not set
957# CONFIG_SH_KGDB is not set 860# CONFIG_SH_KGDB is not set
958 861
959# 862#
@@ -973,8 +876,10 @@ CONFIG_LOG_BUF_SHIFT=14
973CONFIG_BITREVERSE=y 876CONFIG_BITREVERSE=y
974# CONFIG_CRC_CCITT is not set 877# CONFIG_CRC_CCITT is not set
975# CONFIG_CRC16 is not set 878# CONFIG_CRC16 is not set
879# CONFIG_CRC_ITU_T is not set
976CONFIG_CRC32=y 880CONFIG_CRC32=y
977# CONFIG_LIBCRC32C is not set 881# CONFIG_LIBCRC32C is not set
978CONFIG_PLIST=y 882CONFIG_PLIST=y
979CONFIG_HAS_IOMEM=y 883CONFIG_HAS_IOMEM=y
980CONFIG_HAS_IOPORT=y 884CONFIG_HAS_IOPORT=y
885CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/se7750_defconfig b/arch/sh/configs/se7750_defconfig
index 4e6e77fa4ce7..c60b6fd4fc42 100644
--- a/arch/sh/configs/se7750_defconfig
+++ b/arch/sh/configs/se7750_defconfig
@@ -226,7 +226,7 @@ CONFIG_SH_FPU=y
226# CONFIG_SH_DSP is not set 226# CONFIG_SH_DSP is not set
227# CONFIG_SH_STORE_QUEUES is not set 227# CONFIG_SH_STORE_QUEUES is not set
228CONFIG_CPU_HAS_INTEVT=y 228CONFIG_CPU_HAS_INTEVT=y
229CONFIG_CPU_HAS_IPR_IRQ=y 229CONFIG_CPU_HAS_INTC_IRQ=y
230CONFIG_CPU_HAS_SR_RB=y 230CONFIG_CPU_HAS_SR_RB=y
231CONFIG_CPU_HAS_PTEA=y 231CONFIG_CPU_HAS_PTEA=y
232 232
diff --git a/arch/sh/configs/se7780_defconfig b/arch/sh/configs/se7780_defconfig
index 538661e98793..f68743dc3931 100644
--- a/arch/sh/configs/se7780_defconfig
+++ b/arch/sh/configs/se7780_defconfig
@@ -218,6 +218,7 @@ CONFIG_SH_FPU=y
218# CONFIG_SH_STORE_QUEUES is not set 218# CONFIG_SH_STORE_QUEUES is not set
219CONFIG_CPU_HAS_INTEVT=y 219CONFIG_CPU_HAS_INTEVT=y
220CONFIG_CPU_HAS_INTC2_IRQ=y 220CONFIG_CPU_HAS_INTC2_IRQ=y
221CONFIG_CPU_HAS_INTC_IRQ=y
221CONFIG_CPU_HAS_SR_RB=y 222CONFIG_CPU_HAS_SR_RB=y
222 223
223# 224#
diff --git a/arch/sh/configs/shx3_defconfig b/arch/sh/configs/shx3_defconfig
new file mode 100644
index 000000000000..219bad558b10
--- /dev/null
+++ b/arch/sh/configs/shx3_defconfig
@@ -0,0 +1,756 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc4
4# Wed Jun 20 14:09:27 2007
5#
6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8CONFIG_GENERIC_BUG=y
9CONFIG_GENERIC_FIND_NEXT_BIT=y
10CONFIG_GENERIC_HWEIGHT=y
11CONFIG_GENERIC_HARDIRQS=y
12CONFIG_GENERIC_IRQ_PROBE=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y
14CONFIG_GENERIC_TIME=y
15CONFIG_GENERIC_CLOCKEVENTS=y
16CONFIG_STACKTRACE_SUPPORT=y
17CONFIG_LOCKDEP_SUPPORT=y
18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
21
22#
23# Code maturity level options
24#
25CONFIG_EXPERIMENTAL=y
26CONFIG_BROKEN_ON_SMP=y
27CONFIG_LOCK_KERNEL=y
28CONFIG_INIT_ENV_ARG_LIMIT=32
29
30#
31# General setup
32#
33CONFIG_LOCALVERSION=""
34CONFIG_LOCALVERSION_AUTO=y
35CONFIG_SWAP=y
36CONFIG_SYSVIPC=y
37# CONFIG_IPC_NS is not set
38CONFIG_SYSVIPC_SYSCTL=y
39CONFIG_BSD_PROCESS_ACCT=y
40# CONFIG_BSD_PROCESS_ACCT_V3 is not set
41# CONFIG_UTS_NS is not set
42CONFIG_IKCONFIG=y
43CONFIG_IKCONFIG_PROC=y
44CONFIG_LOG_BUF_SHIFT=14
45# CONFIG_SYSFS_DEPRECATED is not set
46# CONFIG_RELAY is not set
47CONFIG_BLK_DEV_INITRD=y
48CONFIG_INITRAMFS_SOURCE=""
49CONFIG_CC_OPTIMIZE_FOR_SIZE=y
50CONFIG_SYSCTL=y
51CONFIG_EMBEDDED=y
52CONFIG_UID16=y
53CONFIG_SYSCTL_SYSCALL=y
54CONFIG_KALLSYMS=y
55CONFIG_KALLSYMS_ALL=y
56# CONFIG_KALLSYMS_EXTRA_PASS is not set
57CONFIG_HOTPLUG=y
58CONFIG_PRINTK=y
59CONFIG_BUG=y
60CONFIG_ELF_CORE=y
61CONFIG_BASE_FULL=y
62CONFIG_FUTEX=y
63CONFIG_ANON_INODES=y
64CONFIG_EPOLL=y
65CONFIG_SIGNALFD=y
66CONFIG_TIMERFD=y
67CONFIG_EVENTFD=y
68CONFIG_SHMEM=y
69CONFIG_VM_EVENT_COUNTERS=y
70CONFIG_SLAB=y
71# CONFIG_SLUB is not set
72# CONFIG_SLOB is not set
73CONFIG_RT_MUTEXES=y
74# CONFIG_TINY_SHMEM is not set
75CONFIG_BASE_SMALL=0
76
77#
78# Loadable module support
79#
80CONFIG_MODULES=y
81CONFIG_MODULE_UNLOAD=y
82# CONFIG_MODULE_FORCE_UNLOAD is not set
83# CONFIG_MODVERSIONS is not set
84# CONFIG_MODULE_SRCVERSION_ALL is not set
85CONFIG_KMOD=y
86
87#
88# Block layer
89#
90CONFIG_BLOCK=y
91# CONFIG_LBD is not set
92# CONFIG_BLK_DEV_IO_TRACE is not set
93# CONFIG_LSF is not set
94
95#
96# IO Schedulers
97#
98CONFIG_IOSCHED_NOOP=y
99# CONFIG_IOSCHED_AS is not set
100# CONFIG_IOSCHED_DEADLINE is not set
101# CONFIG_IOSCHED_CFQ is not set
102# CONFIG_DEFAULT_AS is not set
103# CONFIG_DEFAULT_DEADLINE is not set
104# CONFIG_DEFAULT_CFQ is not set
105CONFIG_DEFAULT_NOOP=y
106CONFIG_DEFAULT_IOSCHED="noop"
107
108#
109# System type
110#
111CONFIG_CPU_SH4=y
112CONFIG_CPU_SH4A=y
113CONFIG_CPU_SHX3=y
114# CONFIG_CPU_SUBTYPE_SH7619 is not set
115# CONFIG_CPU_SUBTYPE_SH7206 is not set
116# CONFIG_CPU_SUBTYPE_SH7300 is not set
117# CONFIG_CPU_SUBTYPE_SH7705 is not set
118# CONFIG_CPU_SUBTYPE_SH7706 is not set
119# CONFIG_CPU_SUBTYPE_SH7707 is not set
120# CONFIG_CPU_SUBTYPE_SH7708 is not set
121# CONFIG_CPU_SUBTYPE_SH7709 is not set
122# CONFIG_CPU_SUBTYPE_SH7710 is not set
123# CONFIG_CPU_SUBTYPE_SH7712 is not set
124# CONFIG_CPU_SUBTYPE_SH7750 is not set
125# CONFIG_CPU_SUBTYPE_SH7091 is not set
126# CONFIG_CPU_SUBTYPE_SH7750R is not set
127# CONFIG_CPU_SUBTYPE_SH7750S is not set
128# CONFIG_CPU_SUBTYPE_SH7751 is not set
129# CONFIG_CPU_SUBTYPE_SH7751R is not set
130# CONFIG_CPU_SUBTYPE_SH7760 is not set
131# CONFIG_CPU_SUBTYPE_SH4_202 is not set
132# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
133# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
134# CONFIG_CPU_SUBTYPE_SH7770 is not set
135# CONFIG_CPU_SUBTYPE_SH7780 is not set
136# CONFIG_CPU_SUBTYPE_SH7785 is not set
137CONFIG_CPU_SUBTYPE_SHX3=y
138# CONFIG_CPU_SUBTYPE_SH73180 is not set
139# CONFIG_CPU_SUBTYPE_SH7343 is not set
140# CONFIG_CPU_SUBTYPE_SH7722 is not set
141
142#
143# Memory management options
144#
145CONFIG_QUICKLIST=y
146CONFIG_MMU=y
147CONFIG_PAGE_OFFSET=0x80000000
148CONFIG_MEMORY_START=0x0c000000
149CONFIG_MEMORY_SIZE=0x04000000
150CONFIG_VSYSCALL=y
151CONFIG_ARCH_FLATMEM_ENABLE=y
152CONFIG_ARCH_SPARSEMEM_ENABLE=y
153CONFIG_ARCH_SPARSEMEM_DEFAULT=y
154CONFIG_MAX_ACTIVE_REGIONS=1
155CONFIG_ARCH_POPULATES_NODE_MAP=y
156CONFIG_ARCH_SELECT_MEMORY_MODEL=y
157CONFIG_PAGE_SIZE_4KB=y
158# CONFIG_PAGE_SIZE_8KB is not set
159# CONFIG_PAGE_SIZE_64KB is not set
160CONFIG_HUGETLB_PAGE_SIZE_64K=y
161# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
162# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
163# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
164# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set
165CONFIG_SELECT_MEMORY_MODEL=y
166CONFIG_FLATMEM_MANUAL=y
167# CONFIG_DISCONTIGMEM_MANUAL is not set
168# CONFIG_SPARSEMEM_MANUAL is not set
169CONFIG_FLATMEM=y
170CONFIG_FLAT_NODE_MEM_MAP=y
171CONFIG_SPARSEMEM_STATIC=y
172CONFIG_SPLIT_PTLOCK_CPUS=4
173# CONFIG_RESOURCES_64BIT is not set
174CONFIG_ZONE_DMA_FLAG=0
175CONFIG_NR_QUICK=2
176
177#
178# Cache configuration
179#
180# CONFIG_SH_DIRECT_MAPPED is not set
181# CONFIG_SH_WRITETHROUGH is not set
182
183#
184# Processor features
185#
186CONFIG_CPU_LITTLE_ENDIAN=y
187# CONFIG_CPU_BIG_ENDIAN is not set
188# CONFIG_SH_FPU is not set
189# CONFIG_SH_FPU_EMU is not set
190CONFIG_SH_DSP=y
191CONFIG_SH_STORE_QUEUES=y
192CONFIG_CPU_HAS_INTEVT=y
193CONFIG_CPU_HAS_INTC2_IRQ=y
194CONFIG_CPU_HAS_SR_RB=y
195
196#
197# Board support
198#
199
200#
201# Timer and clock configuration
202#
203CONFIG_SH_TMU=y
204CONFIG_SH_TIMER_IRQ=16
205CONFIG_SH_PCLK_FREQ=50000000
206CONFIG_TICK_ONESHOT=y
207CONFIG_NO_HZ=y
208CONFIG_HIGH_RES_TIMERS=y
209
210#
211# CPU Frequency scaling
212#
213# CONFIG_CPU_FREQ is not set
214
215#
216# DMA support
217#
218# CONFIG_SH_DMA is not set
219
220#
221# Companion Chips
222#
223
224#
225# Additional SuperH Device Drivers
226#
227CONFIG_HEARTBEAT=y
228# CONFIG_PUSH_SWITCH is not set
229
230#
231# Kernel features
232#
233# CONFIG_HZ_100 is not set
234CONFIG_HZ_250=y
235# CONFIG_HZ_300 is not set
236# CONFIG_HZ_1000 is not set
237CONFIG_HZ=250
238CONFIG_KEXEC=y
239# CONFIG_CRASH_DUMP is not set
240# CONFIG_PREEMPT_NONE is not set
241# CONFIG_PREEMPT_VOLUNTARY is not set
242CONFIG_PREEMPT=y
243CONFIG_PREEMPT_BKL=y
244
245#
246# Boot options
247#
248CONFIG_ZERO_PAGE_OFFSET=0x00001000
249CONFIG_BOOT_LINK_OFFSET=0x00800000
250# CONFIG_UBC_WAKEUP is not set
251CONFIG_CMDLINE_BOOL=y
252CONFIG_CMDLINE="console=ttySC0,115200 ip=192.168.1.2:::255.255.255.0 root=/dev/nfs nfsroot=192.168.1.1:/exports/devel/rfs/mobiler noaliencache earlyprintk=bios ignore_loglevel"
253
254#
255# Bus options
256#
257# CONFIG_ARCH_SUPPORTS_MSI is not set
258
259#
260# PCCARD (PCMCIA/CardBus) support
261#
262# CONFIG_PCCARD is not set
263
264#
265# Executable file formats
266#
267CONFIG_BINFMT_ELF=y
268# CONFIG_BINFMT_MISC is not set
269
270#
271# Networking
272#
273# CONFIG_NET is not set
274
275#
276# Device Drivers
277#
278
279#
280# Generic Driver Options
281#
282CONFIG_STANDALONE=y
283CONFIG_PREVENT_FIRMWARE_BUILD=y
284# CONFIG_FW_LOADER is not set
285# CONFIG_DEBUG_DRIVER is not set
286# CONFIG_DEBUG_DEVRES is not set
287# CONFIG_SYS_HYPERVISOR is not set
288
289#
290# Connector - unified userspace <-> kernelspace linker
291#
292# CONFIG_MTD is not set
293
294#
295# Parallel port support
296#
297# CONFIG_PARPORT is not set
298
299#
300# Plug and Play support
301#
302# CONFIG_PNPACPI is not set
303
304#
305# Block devices
306#
307# CONFIG_BLK_DEV_COW_COMMON is not set
308# CONFIG_BLK_DEV_LOOP is not set
309CONFIG_BLK_DEV_RAM=y
310CONFIG_BLK_DEV_RAM_COUNT=16
311CONFIG_BLK_DEV_RAM_SIZE=4096
312CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
313# CONFIG_CDROM_PKTCDVD is not set
314
315#
316# Misc devices
317#
318# CONFIG_BLINK is not set
319# CONFIG_IDE is not set
320
321#
322# SCSI device support
323#
324# CONFIG_RAID_ATTRS is not set
325CONFIG_SCSI=y
326# CONFIG_SCSI_TGT is not set
327# CONFIG_SCSI_NETLINK is not set
328CONFIG_SCSI_PROC_FS=y
329
330#
331# SCSI support type (disk, tape, CD-ROM)
332#
333CONFIG_BLK_DEV_SD=y
334# CONFIG_CHR_DEV_ST is not set
335# CONFIG_CHR_DEV_OSST is not set
336# CONFIG_BLK_DEV_SR is not set
337# CONFIG_CHR_DEV_SG is not set
338# CONFIG_CHR_DEV_SCH is not set
339
340#
341# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
342#
343# CONFIG_SCSI_MULTI_LUN is not set
344# CONFIG_SCSI_CONSTANTS is not set
345# CONFIG_SCSI_LOGGING is not set
346# CONFIG_SCSI_SCAN_ASYNC is not set
347CONFIG_SCSI_WAIT_SCAN=m
348
349#
350# SCSI Transports
351#
352# CONFIG_SCSI_SPI_ATTRS is not set
353# CONFIG_SCSI_FC_ATTRS is not set
354# CONFIG_SCSI_SAS_ATTRS is not set
355# CONFIG_SCSI_SAS_LIBSAS is not set
356
357#
358# SCSI low-level drivers
359#
360# CONFIG_SCSI_DEBUG is not set
361CONFIG_ATA=y
362# CONFIG_ATA_NONSTANDARD is not set
363CONFIG_PATA_PLATFORM=y
364
365#
366# Multi-device support (RAID and LVM)
367#
368# CONFIG_MD is not set
369
370#
371# ISDN subsystem
372#
373
374#
375# Telephony Support
376#
377# CONFIG_PHONE is not set
378
379#
380# Input device support
381#
382CONFIG_INPUT=y
383# CONFIG_INPUT_FF_MEMLESS is not set
384
385#
386# Userland interfaces
387#
388CONFIG_INPUT_MOUSEDEV=y
389# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
390CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
391CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
392# CONFIG_INPUT_JOYDEV is not set
393# CONFIG_INPUT_TSDEV is not set
394# CONFIG_INPUT_EVDEV is not set
395# CONFIG_INPUT_EVBUG is not set
396
397#
398# Input Device Drivers
399#
400CONFIG_INPUT_KEYBOARD=y
401CONFIG_KEYBOARD_ATKBD=y
402# CONFIG_KEYBOARD_SUNKBD is not set
403# CONFIG_KEYBOARD_LKKBD is not set
404# CONFIG_KEYBOARD_XTKBD is not set
405# CONFIG_KEYBOARD_NEWTON is not set
406# CONFIG_KEYBOARD_STOWAWAY is not set
407# CONFIG_INPUT_MOUSE is not set
408# CONFIG_INPUT_JOYSTICK is not set
409# CONFIG_INPUT_TABLET is not set
410# CONFIG_INPUT_TOUCHSCREEN is not set
411# CONFIG_INPUT_MISC is not set
412
413#
414# Hardware I/O ports
415#
416CONFIG_SERIO=y
417# CONFIG_SERIO_I8042 is not set
418# CONFIG_SERIO_SERPORT is not set
419CONFIG_SERIO_LIBPS2=y
420# CONFIG_SERIO_RAW is not set
421# CONFIG_GAMEPORT is not set
422
423#
424# Character devices
425#
426# CONFIG_VT is not set
427# CONFIG_SERIAL_NONSTANDARD is not set
428
429#
430# Serial drivers
431#
432# CONFIG_SERIAL_8250 is not set
433
434#
435# Non-8250 serial port support
436#
437CONFIG_SERIAL_SH_SCI=y
438CONFIG_SERIAL_SH_SCI_NR_UARTS=2
439CONFIG_SERIAL_SH_SCI_CONSOLE=y
440CONFIG_SERIAL_CORE=y
441CONFIG_SERIAL_CORE_CONSOLE=y
442CONFIG_UNIX98_PTYS=y
443CONFIG_LEGACY_PTYS=y
444CONFIG_LEGACY_PTY_COUNT=256
445
446#
447# IPMI
448#
449# CONFIG_IPMI_HANDLER is not set
450# CONFIG_WATCHDOG is not set
451CONFIG_HW_RANDOM=y
452# CONFIG_R3964 is not set
453# CONFIG_RAW_DRIVER is not set
454
455#
456# TPM devices
457#
458# CONFIG_TCG_TPM is not set
459# CONFIG_I2C is not set
460
461#
462# SPI support
463#
464# CONFIG_SPI is not set
465# CONFIG_SPI_MASTER is not set
466
467#
468# Dallas's 1-wire bus
469#
470# CONFIG_W1 is not set
471# CONFIG_HWMON is not set
472
473#
474# Multifunction device drivers
475#
476# CONFIG_MFD_SM501 is not set
477
478#
479# Multimedia devices
480#
481# CONFIG_VIDEO_DEV is not set
482# CONFIG_DAB is not set
483
484#
485# Graphics support
486#
487# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
488
489#
490# Display device support
491#
492# CONFIG_DISPLAY_SUPPORT is not set
493# CONFIG_VGASTATE is not set
494# CONFIG_FB is not set
495
496#
497# Sound
498#
499# CONFIG_SOUND is not set
500
501#
502# HID Devices
503#
504# CONFIG_HID is not set
505
506#
507# USB support
508#
509# CONFIG_USB_ARCH_HAS_HCD is not set
510# CONFIG_USB_ARCH_HAS_OHCI is not set
511# CONFIG_USB_ARCH_HAS_EHCI is not set
512
513#
514# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
515#
516
517#
518# USB Gadget Support
519#
520# CONFIG_USB_GADGET is not set
521# CONFIG_MMC is not set
522
523#
524# LED devices
525#
526# CONFIG_NEW_LEDS is not set
527
528#
529# LED drivers
530#
531
532#
533# LED Triggers
534#
535
536#
537# InfiniBand support
538#
539
540#
541# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
542#
543
544#
545# Real Time Clock
546#
547CONFIG_RTC_LIB=y
548CONFIG_RTC_CLASS=y
549CONFIG_RTC_HCTOSYS=y
550CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
551# CONFIG_RTC_DEBUG is not set
552
553#
554# RTC interfaces
555#
556CONFIG_RTC_INTF_SYSFS=y
557CONFIG_RTC_INTF_PROC=y
558CONFIG_RTC_INTF_DEV=y
559# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
560# CONFIG_RTC_DRV_TEST is not set
561
562#
563# I2C RTC drivers
564#
565
566#
567# SPI RTC drivers
568#
569
570#
571# Platform RTC drivers
572#
573# CONFIG_RTC_DRV_DS1553 is not set
574# CONFIG_RTC_DRV_DS1742 is not set
575# CONFIG_RTC_DRV_M48T86 is not set
576# CONFIG_RTC_DRV_V3020 is not set
577
578#
579# on-CPU RTC drivers
580#
581CONFIG_RTC_DRV_SH=y
582
583#
584# DMA Engine support
585#
586# CONFIG_DMA_ENGINE is not set
587
588#
589# DMA Clients
590#
591
592#
593# DMA Devices
594#
595
596#
597# File systems
598#
599CONFIG_EXT2_FS=y
600# CONFIG_EXT2_FS_XATTR is not set
601# CONFIG_EXT2_FS_XIP is not set
602CONFIG_EXT3_FS=y
603CONFIG_EXT3_FS_XATTR=y
604# CONFIG_EXT3_FS_POSIX_ACL is not set
605# CONFIG_EXT3_FS_SECURITY is not set
606# CONFIG_EXT4DEV_FS is not set
607CONFIG_JBD=y
608# CONFIG_JBD_DEBUG is not set
609CONFIG_FS_MBCACHE=y
610# CONFIG_REISERFS_FS is not set
611# CONFIG_JFS_FS is not set
612# CONFIG_FS_POSIX_ACL is not set
613# CONFIG_XFS_FS is not set
614# CONFIG_GFS2_FS is not set
615# CONFIG_MINIX_FS is not set
616# CONFIG_ROMFS_FS is not set
617CONFIG_INOTIFY=y
618CONFIG_INOTIFY_USER=y
619# CONFIG_QUOTA is not set
620CONFIG_DNOTIFY=y
621# CONFIG_AUTOFS_FS is not set
622# CONFIG_AUTOFS4_FS is not set
623# CONFIG_FUSE_FS is not set
624
625#
626# CD-ROM/DVD Filesystems
627#
628# CONFIG_ISO9660_FS is not set
629# CONFIG_UDF_FS is not set
630
631#
632# DOS/FAT/NT Filesystems
633#
634# CONFIG_MSDOS_FS is not set
635# CONFIG_VFAT_FS is not set
636# CONFIG_NTFS_FS is not set
637
638#
639# Pseudo filesystems
640#
641CONFIG_PROC_FS=y
642CONFIG_PROC_KCORE=y
643CONFIG_PROC_SYSCTL=y
644CONFIG_SYSFS=y
645CONFIG_TMPFS=y
646# CONFIG_TMPFS_POSIX_ACL is not set
647CONFIG_HUGETLBFS=y
648CONFIG_HUGETLB_PAGE=y
649CONFIG_RAMFS=y
650# CONFIG_CONFIGFS_FS is not set
651
652#
653# Miscellaneous filesystems
654#
655# CONFIG_ADFS_FS is not set
656# CONFIG_AFFS_FS is not set
657# CONFIG_HFS_FS is not set
658# CONFIG_HFSPLUS_FS is not set
659# CONFIG_BEFS_FS is not set
660# CONFIG_BFS_FS is not set
661# CONFIG_EFS_FS is not set
662# CONFIG_CRAMFS is not set
663# CONFIG_VXFS_FS is not set
664# CONFIG_HPFS_FS is not set
665# CONFIG_QNX4FS_FS is not set
666# CONFIG_SYSV_FS is not set
667# CONFIG_UFS_FS is not set
668
669#
670# Partition Types
671#
672# CONFIG_PARTITION_ADVANCED is not set
673CONFIG_MSDOS_PARTITION=y
674
675#
676# Native Language Support
677#
678# CONFIG_NLS is not set
679
680#
681# Profiling support
682#
683CONFIG_PROFILING=y
684# CONFIG_OPROFILE is not set
685
686#
687# Kernel hacking
688#
689CONFIG_TRACE_IRQFLAGS_SUPPORT=y
690CONFIG_PRINTK_TIME=y
691# CONFIG_ENABLE_MUST_CHECK is not set
692CONFIG_MAGIC_SYSRQ=y
693# CONFIG_UNUSED_SYMBOLS is not set
694CONFIG_DEBUG_FS=y
695# CONFIG_HEADERS_CHECK is not set
696CONFIG_DEBUG_KERNEL=y
697# CONFIG_DEBUG_SHIRQ is not set
698CONFIG_DETECT_SOFTLOCKUP=y
699# CONFIG_SCHEDSTATS is not set
700# CONFIG_TIMER_STATS is not set
701CONFIG_DEBUG_SLAB=y
702CONFIG_DEBUG_SLAB_LEAK=y
703CONFIG_DEBUG_PREEMPT=y
704# CONFIG_DEBUG_RT_MUTEXES is not set
705# CONFIG_RT_MUTEX_TESTER is not set
706CONFIG_DEBUG_SPINLOCK=y
707CONFIG_DEBUG_MUTEXES=y
708CONFIG_DEBUG_LOCK_ALLOC=y
709# CONFIG_PROVE_LOCKING is not set
710CONFIG_LOCKDEP=y
711CONFIG_DEBUG_LOCKDEP=y
712# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
713# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
714CONFIG_STACKTRACE=y
715# CONFIG_DEBUG_KOBJECT is not set
716CONFIG_DEBUG_BUGVERBOSE=y
717# CONFIG_DEBUG_INFO is not set
718CONFIG_DEBUG_VM=y
719# CONFIG_DEBUG_LIST is not set
720CONFIG_FRAME_POINTER=y
721CONFIG_FORCED_INLINING=y
722# CONFIG_RCU_TORTURE_TEST is not set
723# CONFIG_FAULT_INJECTION is not set
724CONFIG_SH_STANDARD_BIOS=y
725# CONFIG_EARLY_SCIF_CONSOLE is not set
726CONFIG_EARLY_PRINTK=y
727# CONFIG_DEBUG_BOOTMEM is not set
728CONFIG_DEBUG_STACKOVERFLOW=y
729CONFIG_DEBUG_STACK_USAGE=y
730# CONFIG_4KSTACKS is not set
731# CONFIG_SH_KGDB is not set
732
733#
734# Security options
735#
736# CONFIG_KEYS is not set
737# CONFIG_SECURITY is not set
738
739#
740# Cryptographic options
741#
742# CONFIG_CRYPTO is not set
743
744#
745# Library routines
746#
747CONFIG_BITREVERSE=y
748# CONFIG_CRC_CCITT is not set
749# CONFIG_CRC16 is not set
750# CONFIG_CRC_ITU_T is not set
751CONFIG_CRC32=y
752# CONFIG_LIBCRC32C is not set
753CONFIG_PLIST=y
754CONFIG_HAS_IOMEM=y
755CONFIG_HAS_IOPORT=y
756CONFIG_HAS_DMA=y
diff --git a/arch/sh/drivers/dma/Kconfig b/arch/sh/drivers/dma/Kconfig
index 99935f9daf4b..ee711431e504 100644
--- a/arch/sh/drivers/dma/Kconfig
+++ b/arch/sh/drivers/dma/Kconfig
@@ -5,12 +5,13 @@ config SH_DMA_API
5 5
6config SH_DMA 6config SH_DMA
7 bool "SuperH on-chip DMA controller (DMAC) support" 7 bool "SuperH on-chip DMA controller (DMAC) support"
8 depends on CPU_SH3 || CPU_SH4
8 select SH_DMA_API 9 select SH_DMA_API
9 default n 10 default n
10 11
11config NR_ONCHIP_DMA_CHANNELS 12config NR_ONCHIP_DMA_CHANNELS
13 int
12 depends on SH_DMA 14 depends on SH_DMA
13 int "Number of on-chip DMAC channels"
14 default "8" if CPU_SUBTYPE_SH7750R || CPU_SUBTYPE_SH7751R 15 default "8" if CPU_SUBTYPE_SH7750R || CPU_SUBTYPE_SH7751R
15 default "12" if CPU_SUBTYPE_SH7780 16 default "12" if CPU_SUBTYPE_SH7780
16 default "4" 17 default "4"
@@ -36,23 +37,6 @@ config NR_DMA_CHANNELS
36 support. Setting this to a higher value allows for cascading DMACs 37 support. Setting this to a higher value allows for cascading DMACs
37 with additional channels. 38 with additional channels.
38 39
39config DMA_PAGE_OPS
40 bool "Use DMAC for page copy/clear"
41 depends on SH_DMA && BROKEN
42 help
43 Selecting this option will use a dual-address mode configured channel
44 in the SH DMAC for copy_page()/clear_page(). Primarily a performance
45 hack.
46
47config DMA_PAGE_OPS_CHANNEL
48 depends on DMA_PAGE_OPS
49 int "DMA channel for sh memory-manager page copy/clear"
50 default "3"
51 help
52 This allows the specification of the dual address dma channel,
53 in case channel 3 is unavailable. On the SH4, channels 1,2, and 3
54 are dual-address capable.
55
56config SH_DMABRG 40config SH_DMABRG
57 bool "SH7760 DMABRG support" 41 bool "SH7760 DMABRG support"
58 depends on CPU_SUBTYPE_SH7760 42 depends on CPU_SUBTYPE_SH7760
diff --git a/arch/sh/drivers/heartbeat.c b/arch/sh/drivers/heartbeat.c
index 23dd6080422f..10c1828c9ff5 100644
--- a/arch/sh/drivers/heartbeat.c
+++ b/arch/sh/drivers/heartbeat.c
@@ -78,7 +78,7 @@ static int heartbeat_drv_probe(struct platform_device *pdev)
78 hd->bit_pos[i] = i; 78 hd->bit_pos[i] = i;
79 } 79 }
80 80
81 hd->base = (void __iomem *)res->start; 81 hd->base = (void __iomem *)(unsigned long)res->start;
82 82
83 setup_timer(&hd->timer, heartbeat_timer, (unsigned long)hd); 83 setup_timer(&hd->timer, heartbeat_timer, (unsigned long)hd);
84 platform_set_drvdata(pdev, hd); 84 platform_set_drvdata(pdev, hd);
diff --git a/arch/sh/drivers/pci/Kconfig b/arch/sh/drivers/pci/Kconfig
index 6d1cbbe6745c..fbc6f2c8649f 100644
--- a/arch/sh/drivers/pci/Kconfig
+++ b/arch/sh/drivers/pci/Kconfig
@@ -1,5 +1,6 @@
1config PCI 1config PCI
2 bool "PCI support" 2 bool "PCI support"
3 depends on SYS_SUPPORTS_PCI
3 help 4 help
4 Find out whether you have a PCI motherboard. PCI is the name of a 5 Find out whether you have a PCI motherboard. PCI is the name of a
5 bus system, i.e. the way the CPU talks to the other stuff inside 6 bus system, i.e. the way the CPU talks to the other stuff inside
diff --git a/arch/sh/drivers/pci/Makefile b/arch/sh/drivers/pci/Makefile
index 0e9b532b9fbc..2f65ac72f48a 100644
--- a/arch/sh/drivers/pci/Makefile
+++ b/arch/sh/drivers/pci/Makefile
@@ -7,6 +7,7 @@ obj-$(CONFIG_PCI_AUTO) += pci-auto.o
7 7
8obj-$(CONFIG_CPU_SUBTYPE_ST40STB1) += pci-st40.o 8obj-$(CONFIG_CPU_SUBTYPE_ST40STB1) += pci-st40.o
9obj-$(CONFIG_CPU_SUBTYPE_SH7751) += pci-sh7751.o ops-sh4.o 9obj-$(CONFIG_CPU_SUBTYPE_SH7751) += pci-sh7751.o ops-sh4.o
10obj-$(CONFIG_CPU_SUBTYPE_SH7751R) += pci-sh7751.o ops-sh4.o
10obj-$(CONFIG_CPU_SUBTYPE_SH7780) += pci-sh7780.o ops-sh4.o 11obj-$(CONFIG_CPU_SUBTYPE_SH7780) += pci-sh7780.o ops-sh4.o
11obj-$(CONFIG_CPU_SUBTYPE_SH7785) += pci-sh7780.o ops-sh4.o 12obj-$(CONFIG_CPU_SUBTYPE_SH7785) += pci-sh7780.o ops-sh4.o
12 13
diff --git a/arch/sh/drivers/pci/ops-sh4.c b/arch/sh/drivers/pci/ops-sh4.c
index 54232f13e406..710a3b0306e5 100644
--- a/arch/sh/drivers/pci/ops-sh4.c
+++ b/arch/sh/drivers/pci/ops-sh4.c
@@ -153,7 +153,7 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d)
153} 153}
154DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases); 154DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases);
155 155
156char * __init pcibios_setup(char *str) 156char * __devinit pcibios_setup(char *str)
157{ 157{
158 if (!strcmp(str, "off")) { 158 if (!strcmp(str, "off")) {
159 pci_probe = 0; 159 pci_probe = 0;
diff --git a/arch/sh/drivers/pci/pci-st40.c b/arch/sh/drivers/pci/pci-st40.c
index 543417ff8314..1502a14386b6 100644
--- a/arch/sh/drivers/pci/pci-st40.c
+++ b/arch/sh/drivers/pci/pci-st40.c
@@ -328,7 +328,7 @@ int __init st40pci_init(unsigned memStart, unsigned memSize)
328 return 1; 328 return 1;
329} 329}
330 330
331char * __init pcibios_setup(char *str) 331char * __devinit pcibios_setup(char *str)
332{ 332{
333 return str; 333 return str;
334} 334}
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index d439336d2e18..ccaba368ac9b 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -71,7 +71,7 @@ subsys_initcall(pcibios_init);
71 * Called after each bus is probed, but before its children 71 * Called after each bus is probed, but before its children
72 * are examined. 72 * are examined.
73 */ 73 */
74void __init pcibios_fixup_bus(struct pci_bus *bus) 74void __devinit pcibios_fixup_bus(struct pci_bus *bus)
75{ 75{
76 pci_read_bridge_bases(bus); 76 pci_read_bridge_bases(bus);
77} 77}
diff --git a/arch/sh/drivers/push-switch.c b/arch/sh/drivers/push-switch.c
index b3d20c0e021f..725be6de589b 100644
--- a/arch/sh/drivers/push-switch.c
+++ b/arch/sh/drivers/push-switch.c
@@ -138,4 +138,4 @@ module_exit(switch_exit);
138 138
139MODULE_VERSION(DRV_VERSION); 139MODULE_VERSION(DRV_VERSION);
140MODULE_AUTHOR("Paul Mundt"); 140MODULE_AUTHOR("Paul Mundt");
141MODULE_LICENSE("GPLv2"); 141MODULE_LICENSE("GPL v2");
diff --git a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile
index 9104b6257644..1f141a8ba17c 100644
--- a/arch/sh/kernel/Makefile
+++ b/arch/sh/kernel/Makefile
@@ -4,10 +4,9 @@
4 4
5extra-y := head.o init_task.o vmlinux.lds 5extra-y := head.o init_task.o vmlinux.lds
6 6
7obj-y := process.o signal.o traps.o irq.o \ 7obj-y := debugtraps.o io.o io_generic.o irq.o machvec.o process.o ptrace.o \
8 ptrace.o setup.o time.o sys_sh.o semaphore.o \ 8 semaphore.o setup.o signal.o sys_sh.o syscalls.o \
9 io.o io_generic.o sh_ksyms.o syscalls.o \ 9 time.o topology.o traps.o
10 debugtraps.o
11 10
12obj-y += cpu/ timers/ 11obj-y += cpu/ timers/
13obj-$(CONFIG_VSYSCALL) += vsyscall/ 12obj-$(CONFIG_VSYSCALL) += vsyscall/
@@ -17,7 +16,7 @@ obj-$(CONFIG_CF_ENABLER) += cf-enabler.o
17obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o 16obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o
18obj-$(CONFIG_SH_KGDB) += kgdb_stub.o kgdb_jmp.o 17obj-$(CONFIG_SH_KGDB) += kgdb_stub.o kgdb_jmp.o
19obj-$(CONFIG_SH_CPU_FREQ) += cpufreq.o 18obj-$(CONFIG_SH_CPU_FREQ) += cpufreq.o
20obj-$(CONFIG_MODULES) += module.o 19obj-$(CONFIG_MODULES) += sh_ksyms.o module.o
21obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 20obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
22obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o 21obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
23obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 22obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
diff --git a/arch/sh/kernel/cf-enabler.c b/arch/sh/kernel/cf-enabler.c
index ebc73b85094a..1c3b99642e1c 100644
--- a/arch/sh/kernel/cf-enabler.c
+++ b/arch/sh/kernel/cf-enabler.c
@@ -75,11 +75,7 @@ static int __init cf_init_default(void)
75#if defined(CONFIG_CPU_SH4) 75#if defined(CONFIG_CPU_SH4)
76 allocate_cf_area(); 76 allocate_cf_area();
77#endif 77#endif
78#if defined(CONFIG_SH_UNKNOWN) 78
79 /* This should be done in each board's init_xxx_irq. */
80 make_imask_irq(14);
81 disable_irq(14);
82#endif
83 return 0; 79 return 0;
84} 80}
85 81
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c
index 63251549e9a8..92807ffa8e20 100644
--- a/arch/sh/kernel/cpu/clock.c
+++ b/arch/sh/kernel/cpu/clock.c
@@ -229,6 +229,22 @@ void clk_recalc_rate(struct clk *clk)
229} 229}
230EXPORT_SYMBOL_GPL(clk_recalc_rate); 230EXPORT_SYMBOL_GPL(clk_recalc_rate);
231 231
232long clk_round_rate(struct clk *clk, unsigned long rate)
233{
234 if (likely(clk->ops && clk->ops->round_rate)) {
235 unsigned long flags, rounded;
236
237 spin_lock_irqsave(&clock_lock, flags);
238 rounded = clk->ops->round_rate(clk, rate);
239 spin_unlock_irqrestore(&clock_lock, flags);
240
241 return rounded;
242 }
243
244 return clk_get_rate(clk);
245}
246EXPORT_SYMBOL_GPL(clk_round_rate);
247
232/* 248/*
233 * Returns a clock. Note that we first try to use device id on the bus 249 * Returns a clock. Note that we first try to use device id on the bus
234 * and clock name. If this fails, we try to use clock name only. 250 * and clock name. If this fails, we try to use clock name only.
diff --git a/arch/sh/kernel/cpu/init.c b/arch/sh/kernel/cpu/init.c
index 6451ad630174..9172e97dc26a 100644
--- a/arch/sh/kernel/cpu/init.c
+++ b/arch/sh/kernel/cpu/init.c
@@ -21,8 +21,7 @@
21#include <asm/cacheflush.h> 21#include <asm/cacheflush.h>
22#include <asm/cache.h> 22#include <asm/cache.h>
23#include <asm/io.h> 23#include <asm/io.h>
24 24#include <asm/ubc.h>
25extern void detect_cpu_and_cache_system(void);
26 25
27/* 26/*
28 * Generic wrapper for command line arguments to disable on-chip 27 * Generic wrapper for command line arguments to disable on-chip
@@ -152,15 +151,6 @@ static void __init cache_init(void)
152 flags |= CCR_CACHE_CB; 151 flags |= CCR_CACHE_CB;
153#endif 152#endif
154 153
155#ifdef CONFIG_SH_OCRAM
156 /* Turn on OCRAM -- halve the OC */
157 flags |= CCR_CACHE_ORA;
158 current_cpu_data.dcache.sets >>= 1;
159
160 current_cpu_data.dcache.way_size = current_cpu_data.dcache.sets *
161 current_cpu_data.dcache.linesz;
162#endif
163
164 ctrl_outl(flags, CCR); 154 ctrl_outl(flags, CCR);
165 back_to_P1(); 155 back_to_P1();
166} 156}
@@ -269,7 +259,6 @@ asmlinkage void __init sh_cpu_init(void)
269 } 259 }
270#endif 260#endif
271 261
272#ifdef CONFIG_UBC_WAKEUP
273 /* 262 /*
274 * Some brain-damaged loaders decided it would be a good idea to put 263 * Some brain-damaged loaders decided it would be a good idea to put
275 * the UBC to sleep. This causes some issues when it comes to things 264 * the UBC to sleep. This causes some issues when it comes to things
@@ -277,7 +266,5 @@ asmlinkage void __init sh_cpu_init(void)
277 * we wake it up and hope that all is well. 266 * we wake it up and hope that all is well.
278 */ 267 */
279 ubc_wakeup(); 268 ubc_wakeup();
280#endif
281
282 speculative_execution_init(); 269 speculative_execution_init();
283} 270}
diff --git a/arch/sh/kernel/cpu/irq/Makefile b/arch/sh/kernel/cpu/irq/Makefile
index 1c23308cfc25..9ddb446ac930 100644
--- a/arch/sh/kernel/cpu/irq/Makefile
+++ b/arch/sh/kernel/cpu/irq/Makefile
@@ -6,4 +6,5 @@ obj-y += imask.o
6obj-$(CONFIG_CPU_HAS_IPR_IRQ) += ipr.o 6obj-$(CONFIG_CPU_HAS_IPR_IRQ) += ipr.o
7obj-$(CONFIG_CPU_HAS_PINT_IRQ) += pint.o 7obj-$(CONFIG_CPU_HAS_PINT_IRQ) += pint.o
8obj-$(CONFIG_CPU_HAS_MASKREG_IRQ) += maskreg.o 8obj-$(CONFIG_CPU_HAS_MASKREG_IRQ) += maskreg.o
9obj-$(CONFIG_CPU_HAS_INTC_IRQ) += intc.o
9obj-$(CONFIG_CPU_HAS_INTC2_IRQ) += intc2.o 10obj-$(CONFIG_CPU_HAS_INTC2_IRQ) += intc2.o
diff --git a/arch/sh/kernel/cpu/irq/intc.c b/arch/sh/kernel/cpu/irq/intc.c
new file mode 100644
index 000000000000..9345a7130e9e
--- /dev/null
+++ b/arch/sh/kernel/cpu/irq/intc.c
@@ -0,0 +1,405 @@
1/*
2 * Shared interrupt handling code for IPR and INTC2 types of IRQs.
3 *
4 * Copyright (C) 2007 Magnus Damm
5 *
6 * Based on intc2.c and ipr.c
7 *
8 * Copyright (C) 1999 Niibe Yutaka & Takeshi Yaegashi
9 * Copyright (C) 2000 Kazumoto Kojima
10 * Copyright (C) 2001 David J. Mckay (david.mckay@st.com)
11 * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp>
12 * Copyright (C) 2005, 2006 Paul Mundt
13 *
14 * This file is subject to the terms and conditions of the GNU General Public
15 * License. See the file "COPYING" in the main directory of this archive
16 * for more details.
17 */
18#include <linux/init.h>
19#include <linux/irq.h>
20#include <linux/module.h>
21#include <linux/io.h>
22#include <linux/interrupt.h>
23
24#define _INTC_MK(fn, idx, bit, value) \
25 ((fn) << 24 | ((value) << 16) | ((idx) << 8) | (bit))
26#define _INTC_FN(h) (h >> 24)
27#define _INTC_VALUE(h) ((h >> 16) & 0xff)
28#define _INTC_IDX(h) ((h >> 8) & 0xff)
29#define _INTC_BIT(h) (h & 0xff)
30
31#define _INTC_PTR(desc, member, data) \
32 (desc->member + _INTC_IDX(data))
33
34static inline struct intc_desc *get_intc_desc(unsigned int irq)
35{
36 struct irq_chip *chip = get_irq_chip(irq);
37 return (void *)((char *)chip - offsetof(struct intc_desc, chip));
38}
39
40static inline unsigned int set_field(unsigned int value,
41 unsigned int field_value,
42 unsigned int width,
43 unsigned int shift)
44{
45 value &= ~(((1 << width) - 1) << shift);
46 value |= field_value << shift;
47 return value;
48}
49
50static inline unsigned int set_prio_field(struct intc_desc *desc,
51 unsigned int value,
52 unsigned int priority,
53 unsigned int data)
54{
55 unsigned int width = _INTC_PTR(desc, prio_regs, data)->field_width;
56
57 return set_field(value, priority, width, _INTC_BIT(data));
58}
59
60static void disable_prio_16(struct intc_desc *desc, unsigned int data)
61{
62 unsigned long addr = _INTC_PTR(desc, prio_regs, data)->reg;
63
64 ctrl_outw(set_prio_field(desc, ctrl_inw(addr), 0, data), addr);
65}
66
67static void enable_prio_16(struct intc_desc *desc, unsigned int data)
68{
69 unsigned long addr = _INTC_PTR(desc, prio_regs, data)->reg;
70 unsigned int prio = _INTC_VALUE(data);
71
72 ctrl_outw(set_prio_field(desc, ctrl_inw(addr), prio, data), addr);
73}
74
75static void disable_prio_32(struct intc_desc *desc, unsigned int data)
76{
77 unsigned long addr = _INTC_PTR(desc, prio_regs, data)->reg;
78
79 ctrl_outl(set_prio_field(desc, ctrl_inl(addr), 0, data), addr);
80}
81
82static void enable_prio_32(struct intc_desc *desc, unsigned int data)
83{
84 unsigned long addr = _INTC_PTR(desc, prio_regs, data)->reg;
85 unsigned int prio = _INTC_VALUE(data);
86
87 ctrl_outl(set_prio_field(desc, ctrl_inl(addr), prio, data), addr);
88}
89
90static void disable_mask_8(struct intc_desc *desc, unsigned int data)
91{
92 ctrl_outb(1 << _INTC_BIT(data),
93 _INTC_PTR(desc, mask_regs, data)->set_reg);
94}
95
96static void enable_mask_8(struct intc_desc *desc, unsigned int data)
97{
98 ctrl_outb(1 << _INTC_BIT(data),
99 _INTC_PTR(desc, mask_regs, data)->clr_reg);
100}
101
102static void disable_mask_32(struct intc_desc *desc, unsigned int data)
103{
104 ctrl_outl(1 << _INTC_BIT(data),
105 _INTC_PTR(desc, mask_regs, data)->set_reg);
106}
107
108static void enable_mask_32(struct intc_desc *desc, unsigned int data)
109{
110 ctrl_outl(1 << _INTC_BIT(data),
111 _INTC_PTR(desc, mask_regs, data)->clr_reg);
112}
113
114enum { REG_FN_ERROR=0,
115 REG_FN_MASK_8, REG_FN_MASK_32,
116 REG_FN_PRIO_16, REG_FN_PRIO_32 };
117
118static struct {
119 void (*enable)(struct intc_desc *, unsigned int);
120 void (*disable)(struct intc_desc *, unsigned int);
121} intc_reg_fns[] = {
122 [REG_FN_MASK_8] = { enable_mask_8, disable_mask_8 },
123 [REG_FN_MASK_32] = { enable_mask_32, disable_mask_32 },
124 [REG_FN_PRIO_16] = { enable_prio_16, disable_prio_16 },
125 [REG_FN_PRIO_32] = { enable_prio_32, disable_prio_32 },
126};
127
128static void intc_enable(unsigned int irq)
129{
130 struct intc_desc *desc = get_intc_desc(irq);
131 unsigned int data = (unsigned int) get_irq_chip_data(irq);
132
133 intc_reg_fns[_INTC_FN(data)].enable(desc, data);
134}
135
136static void intc_disable(unsigned int irq)
137{
138 struct intc_desc *desc = get_intc_desc(irq);
139 unsigned int data = (unsigned int) get_irq_chip_data(irq);
140
141 intc_reg_fns[_INTC_FN(data)].disable(desc, data);
142}
143
144static void set_sense_16(struct intc_desc *desc, unsigned int data)
145{
146 unsigned long addr = _INTC_PTR(desc, sense_regs, data)->reg;
147 unsigned int width = _INTC_PTR(desc, sense_regs, data)->field_width;
148 unsigned int bit = _INTC_BIT(data);
149 unsigned int value = _INTC_VALUE(data);
150
151 ctrl_outw(set_field(ctrl_inw(addr), value, width, bit), addr);
152}
153
154static void set_sense_32(struct intc_desc *desc, unsigned int data)
155{
156 unsigned long addr = _INTC_PTR(desc, sense_regs, data)->reg;
157 unsigned int width = _INTC_PTR(desc, sense_regs, data)->field_width;
158 unsigned int bit = _INTC_BIT(data);
159 unsigned int value = _INTC_VALUE(data);
160
161 ctrl_outl(set_field(ctrl_inl(addr), value, width, bit), addr);
162}
163
164#define VALID(x) (x | 0x80)
165
166static unsigned char intc_irq_sense_table[IRQ_TYPE_SENSE_MASK + 1] = {
167 [IRQ_TYPE_EDGE_FALLING] = VALID(0),
168 [IRQ_TYPE_EDGE_RISING] = VALID(1),
169 [IRQ_TYPE_LEVEL_LOW] = VALID(2),
170 [IRQ_TYPE_LEVEL_HIGH] = VALID(3),
171};
172
173static int intc_set_sense(unsigned int irq, unsigned int type)
174{
175 struct intc_desc *desc = get_intc_desc(irq);
176 unsigned char value = intc_irq_sense_table[type & IRQ_TYPE_SENSE_MASK];
177 unsigned int i, j, data, bit;
178 intc_enum enum_id = 0;
179
180 for (i = 0; i < desc->nr_vectors; i++) {
181 struct intc_vect *vect = desc->vectors + i;
182
183 if (evt2irq(vect->vect) != irq)
184 continue;
185
186 enum_id = vect->enum_id;
187 break;
188 }
189
190 if (!enum_id || !value)
191 return -EINVAL;
192
193 value ^= VALID(0);
194
195 for (i = 0; i < desc->nr_sense_regs; i++) {
196 struct intc_sense_reg *sr = desc->sense_regs + i;
197
198 for (j = 0; j < ARRAY_SIZE(sr->enum_ids); j++) {
199 if (sr->enum_ids[j] != enum_id)
200 continue;
201
202 bit = sr->reg_width - ((j + 1) * sr->field_width);
203 data = _INTC_MK(0, i, bit, value);
204
205 switch(sr->reg_width) {
206 case 16:
207 set_sense_16(desc, data);
208 break;
209 case 32:
210 set_sense_32(desc, data);
211 break;
212 }
213
214 return 0;
215 }
216 }
217
218 return -EINVAL;
219}
220
221static unsigned int __init intc_find_mask_handler(unsigned int width)
222{
223 switch (width) {
224 case 8:
225 return REG_FN_MASK_8;
226 case 32:
227 return REG_FN_MASK_32;
228 }
229
230 BUG();
231 return REG_FN_ERROR;
232}
233
234static unsigned int __init intc_find_prio_handler(unsigned int width)
235{
236 switch (width) {
237 case 16:
238 return REG_FN_PRIO_16;
239 case 32:
240 return REG_FN_PRIO_32;
241 }
242
243 BUG();
244 return REG_FN_ERROR;
245}
246
247static intc_enum __init intc_grp_id(struct intc_desc *desc, intc_enum enum_id)
248{
249 struct intc_group *g = desc->groups;
250 unsigned int i, j;
251
252 for (i = 0; g && enum_id && i < desc->nr_groups; i++) {
253 g = desc->groups + i;
254
255 for (j = 0; g->enum_ids[j]; j++) {
256 if (g->enum_ids[j] != enum_id)
257 continue;
258
259 return g->enum_id;
260 }
261 }
262
263 return 0;
264}
265
266static unsigned int __init intc_prio_value(struct intc_desc *desc,
267 intc_enum enum_id, int do_grps)
268{
269 struct intc_prio *p = desc->priorities;
270 unsigned int i;
271
272 for (i = 0; p && enum_id && i < desc->nr_priorities; i++) {
273 p = desc->priorities + i;
274
275 if (p->enum_id != enum_id)
276 continue;
277
278 return p->priority;
279 }
280
281 if (do_grps)
282 return intc_prio_value(desc, intc_grp_id(desc, enum_id), 0);
283
284 /* default to the lowest priority possible if no priority is set
285 * - this needs to be at least 2 for 5-bit priorities on 7780
286 */
287
288 return 2;
289}
290
291static unsigned int __init intc_mask_data(struct intc_desc *desc,
292 intc_enum enum_id, int do_grps)
293{
294 struct intc_mask_reg *mr = desc->mask_regs;
295 unsigned int i, j, fn;
296
297 for (i = 0; mr && enum_id && i < desc->nr_mask_regs; i++) {
298 mr = desc->mask_regs + i;
299
300 for (j = 0; j < ARRAY_SIZE(mr->enum_ids); j++) {
301 if (mr->enum_ids[j] != enum_id)
302 continue;
303
304 fn = intc_find_mask_handler(mr->reg_width);
305 if (fn == REG_FN_ERROR)
306 return 0;
307
308 return _INTC_MK(fn, i, (mr->reg_width - 1) - j, 0);
309 }
310 }
311
312 if (do_grps)
313 return intc_mask_data(desc, intc_grp_id(desc, enum_id), 0);
314
315 return 0;
316}
317
318static unsigned int __init intc_prio_data(struct intc_desc *desc,
319 intc_enum enum_id, int do_grps)
320{
321 struct intc_prio_reg *pr = desc->prio_regs;
322 unsigned int i, j, fn, bit, prio;
323
324 for (i = 0; pr && enum_id && i < desc->nr_prio_regs; i++) {
325 pr = desc->prio_regs + i;
326
327 for (j = 0; j < ARRAY_SIZE(pr->enum_ids); j++) {
328 if (pr->enum_ids[j] != enum_id)
329 continue;
330
331 fn = intc_find_prio_handler(pr->reg_width);
332 if (fn == REG_FN_ERROR)
333 return 0;
334
335 prio = intc_prio_value(desc, enum_id, 1);
336 bit = pr->reg_width - ((j + 1) * pr->field_width);
337
338 BUG_ON(bit < 0);
339
340 return _INTC_MK(fn, i, bit, prio);
341 }
342 }
343
344 if (do_grps)
345 return intc_prio_data(desc, intc_grp_id(desc, enum_id), 0);
346
347 return 0;
348}
349
350static void __init intc_register_irq(struct intc_desc *desc, intc_enum enum_id,
351 unsigned int irq)
352{
353 unsigned int data[2], primary;
354
355 /* Prefer single interrupt source bitmap over other combinations:
356 * 1. bitmap, single interrupt source
357 * 2. priority, single interrupt source
358 * 3. bitmap, multiple interrupt sources (groups)
359 * 4. priority, multiple interrupt sources (groups)
360 */
361
362 data[0] = intc_mask_data(desc, enum_id, 0);
363 data[1] = intc_prio_data(desc, enum_id, 0);
364
365 primary = 0;
366 if (!data[0] && data[1])
367 primary = 1;
368
369 data[0] = data[0] ? data[0] : intc_mask_data(desc, enum_id, 1);
370 data[1] = data[1] ? data[1] : intc_prio_data(desc, enum_id, 1);
371
372 if (!data[primary])
373 primary ^= 1;
374
375 BUG_ON(!data[primary]); /* must have primary masking method */
376
377 disable_irq_nosync(irq);
378 set_irq_chip_and_handler_name(irq, &desc->chip,
379 handle_level_irq, "level");
380 set_irq_chip_data(irq, (void *)data[primary]);
381
382 /* enable secondary masking method if present */
383 if (data[!primary])
384 intc_reg_fns[_INTC_FN(data[!primary])].enable(desc,
385 data[!primary]);
386
387 /* irq should be disabled by default */
388 desc->chip.mask(irq);
389}
390
391void __init register_intc_controller(struct intc_desc *desc)
392{
393 unsigned int i;
394
395 desc->chip.mask = intc_disable;
396 desc->chip.unmask = intc_enable;
397 desc->chip.mask_ack = intc_disable;
398 desc->chip.set_type = intc_set_sense;
399
400 for (i = 0; i < desc->nr_vectors; i++) {
401 struct intc_vect *vect = desc->vectors + i;
402
403 intc_register_irq(desc, vect->enum_id, evt2irq(vect->vect));
404 }
405}
diff --git a/arch/sh/kernel/cpu/irq/intc2.c b/arch/sh/kernel/cpu/irq/intc2.c
index d8e22f4ff0f0..cc5221390e09 100644
--- a/arch/sh/kernel/cpu/irq/intc2.c
+++ b/arch/sh/kernel/cpu/irq/intc2.c
@@ -13,36 +13,31 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <asm/smp.h>
16 17
17#if defined(CONFIG_CPU_SUBTYPE_SH7760) 18static inline struct intc2_desc *get_intc2_desc(unsigned int irq)
18#define INTC2_BASE 0xfe080000 19{
19#define INTC2_INTMSK (INTC2_BASE + 0x40) 20 struct irq_chip *chip = get_irq_chip(irq);
20#define INTC2_INTMSKCLR (INTC2_BASE + 0x60) 21 return (void *)((char *)chip - offsetof(struct intc2_desc, chip));
21#elif defined(CONFIG_CPU_SUBTYPE_SH7780) || \ 22}
22 defined(CONFIG_CPU_SUBTYPE_SH7785)
23#define INTC2_BASE 0xffd40000
24#define INTC2_INTMSK (INTC2_BASE + 0x38)
25#define INTC2_INTMSKCLR (INTC2_BASE + 0x3c)
26#endif
27 23
28static void disable_intc2_irq(unsigned int irq) 24static void disable_intc2_irq(unsigned int irq)
29{ 25{
30 struct intc2_data *p = get_irq_chip_data(irq); 26 struct intc2_data *p = get_irq_chip_data(irq);
31 ctrl_outl(1 << p->msk_shift, INTC2_INTMSK + p->msk_offset); 27 struct intc2_desc *d = get_intc2_desc(irq);
28
29 ctrl_outl(1 << p->msk_shift, d->msk_base + p->msk_offset +
30 (hard_smp_processor_id() * 4));
32} 31}
33 32
34static void enable_intc2_irq(unsigned int irq) 33static void enable_intc2_irq(unsigned int irq)
35{ 34{
36 struct intc2_data *p = get_irq_chip_data(irq); 35 struct intc2_data *p = get_irq_chip_data(irq);
37 ctrl_outl(1 << p->msk_shift, INTC2_INTMSKCLR + p->msk_offset); 36 struct intc2_desc *d = get_intc2_desc(irq);
38}
39 37
40static struct irq_chip intc2_irq_chip = { 38 ctrl_outl(1 << p->msk_shift, d->mskclr_base + p->msk_offset +
41 .name = "INTC2", 39 (hard_smp_processor_id() * 4));
42 .mask = disable_intc2_irq, 40}
43 .unmask = enable_intc2_irq,
44 .mask_ack = disable_intc2_irq,
45};
46 41
47/* 42/*
48 * Setup an INTC2 style interrupt. 43 * Setup an INTC2 style interrupt.
@@ -56,30 +51,36 @@ static struct irq_chip intc2_irq_chip = {
56 * 51 *
57 * in the intc2_data table. 52 * in the intc2_data table.
58 */ 53 */
59void make_intc2_irq(struct intc2_data *table, unsigned int nr_irqs) 54void register_intc2_controller(struct intc2_desc *desc)
60{ 55{
61 int i; 56 int i;
62 57
63 for (i = 0; i < nr_irqs; i++) { 58 desc->chip.mask = disable_intc2_irq;
59 desc->chip.unmask = enable_intc2_irq;
60 desc->chip.mask_ack = disable_intc2_irq;
61
62 for (i = 0; i < desc->nr_irqs; i++) {
64 unsigned long ipr, flags; 63 unsigned long ipr, flags;
65 struct intc2_data *p = table + i; 64 struct intc2_data *p = desc->intc2_data + i;
66 65
67 disable_irq_nosync(p->irq); 66 disable_irq_nosync(p->irq);
68 67
69 /* Set the priority level */ 68 if (desc->prio_base) {
70 local_irq_save(flags); 69 /* Set the priority level */
70 local_irq_save(flags);
71 71
72 ipr = ctrl_inl(INTC2_BASE + p->ipr_offset); 72 ipr = ctrl_inl(desc->prio_base + p->ipr_offset);
73 ipr &= ~(0xf << p->ipr_shift); 73 ipr &= ~(0xf << p->ipr_shift);
74 ipr |= p->priority << p->ipr_shift; 74 ipr |= p->priority << p->ipr_shift;
75 ctrl_outl(ipr, INTC2_BASE + p->ipr_offset); 75 ctrl_outl(ipr, desc->prio_base + p->ipr_offset);
76 76
77 local_irq_restore(flags); 77 local_irq_restore(flags);
78 }
78 79
79 set_irq_chip_and_handler_name(p->irq, &intc2_irq_chip, 80 set_irq_chip_and_handler_name(p->irq, &desc->chip,
80 handle_level_irq, "level"); 81 handle_level_irq, "level");
81 set_irq_chip_data(p->irq, p); 82 set_irq_chip_data(p->irq, p);
82 83
83 enable_intc2_irq(p->irq); 84 disable_intc2_irq(p->irq);
84 } 85 }
85} 86}
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c
index 210280b6fddf..98e84f40c713 100644
--- a/arch/sh/kernel/cpu/irq/ipr.c
+++ b/arch/sh/kernel/cpu/irq/ipr.c
@@ -22,58 +22,57 @@
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24 24
25static inline struct ipr_desc *get_ipr_desc(unsigned int irq)
26{
27 struct irq_chip *chip = get_irq_chip(irq);
28 return (void *)((char *)chip - offsetof(struct ipr_desc, chip));
29}
30
25static void disable_ipr_irq(unsigned int irq) 31static void disable_ipr_irq(unsigned int irq)
26{ 32{
27 struct ipr_data *p = get_irq_chip_data(irq); 33 struct ipr_data *p = get_irq_chip_data(irq);
34 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx];
28 /* Set the priority in IPR to 0 */ 35 /* Set the priority in IPR to 0 */
29 ctrl_outw(ctrl_inw(p->addr) & (0xffff ^ (0xf << p->shift)), p->addr); 36 ctrl_outw(ctrl_inw(addr) & (0xffff ^ (0xf << p->shift)), addr);
30} 37}
31 38
32static void enable_ipr_irq(unsigned int irq) 39static void enable_ipr_irq(unsigned int irq)
33{ 40{
34 struct ipr_data *p = get_irq_chip_data(irq); 41 struct ipr_data *p = get_irq_chip_data(irq);
42 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx];
35 /* Set priority in IPR back to original value */ 43 /* Set priority in IPR back to original value */
36 ctrl_outw(ctrl_inw(p->addr) | (p->priority << p->shift), p->addr); 44 ctrl_outw(ctrl_inw(addr) | (p->priority << p->shift), addr);
37} 45}
38 46
39static struct irq_chip ipr_irq_chip = { 47/*
40 .name = "IPR", 48 * The shift value is now the number of bits to shift, not the number of
41 .mask = disable_ipr_irq, 49 * bits/4. This is to make it easier to read the value directly from the
42 .unmask = enable_ipr_irq, 50 * datasheets. The IPR address is calculated using the ipr_offset table.
43 .mask_ack = disable_ipr_irq, 51 */
44};
45
46unsigned int map_ipridx_to_addr(int idx) __attribute__ ((weak));
47unsigned int map_ipridx_to_addr(int idx)
48{
49 return 0;
50}
51 52
52void make_ipr_irq(struct ipr_data *table, unsigned int nr_irqs) 53void register_ipr_controller(struct ipr_desc *desc)
53{ 54{
54 int i; 55 int i;
55 56
56 for (i = 0; i < nr_irqs; i++) { 57 desc->chip.mask = disable_ipr_irq;
57 unsigned int irq = table[i].irq; 58 desc->chip.unmask = enable_ipr_irq;
59 desc->chip.mask_ack = disable_ipr_irq;
58 60
59 if (!irq) 61 for (i = 0; i < desc->nr_irqs; i++) {
60 irq = table[i].irq = i; 62 struct ipr_data *p = desc->ipr_data + i;
61 63
62 /* could the IPR index be mapped, if not we ignore this */ 64 BUG_ON(p->ipr_idx >= desc->nr_offsets);
63 if (!table[i].addr) { 65 BUG_ON(!desc->ipr_offsets[p->ipr_idx]);
64 table[i].addr = map_ipridx_to_addr(table[i].ipr_idx);
65 if (!table[i].addr)
66 continue;
67 }
68 66
69 disable_irq_nosync(irq); 67 disable_irq_nosync(p->irq);
70 set_irq_chip_and_handler_name(irq, &ipr_irq_chip, 68 set_irq_chip_and_handler_name(p->irq, &desc->chip,
71 handle_level_irq, "level"); 69 handle_level_irq, "level");
72 set_irq_chip_data(irq, &table[i]); 70 set_irq_chip_data(p->irq, p);
73 enable_ipr_irq(irq); 71 disable_ipr_irq(p->irq);
74 } 72 }
75} 73}
76EXPORT_SYMBOL(make_ipr_irq); 74
75EXPORT_SYMBOL(register_ipr_controller);
77 76
78#if !defined(CONFIG_CPU_HAS_PINT_IRQ) 77#if !defined(CONFIG_CPU_HAS_PINT_IRQ)
79int ipr_irq_demux(int irq) 78int ipr_irq_demux(int irq)
diff --git a/arch/sh/kernel/cpu/sh2/entry.S b/arch/sh/kernel/cpu/sh2/entry.S
index c16dc8fec489..ee8f1fe84b08 100644
--- a/arch/sh/kernel/cpu/sh2/entry.S
+++ b/arch/sh/kernel/cpu/sh2/entry.S
@@ -311,6 +311,7 @@ restore_all:
311 rte 311 rte
312 nop 312 nop
313 313
314 .align 2
314#ifdef CONFIG_TRACE_IRQFLAGS 315#ifdef CONFIG_TRACE_IRQFLAGS
3151: .long trace_hardirqs_off 3161: .long trace_hardirqs_off
316#endif 317#endif
diff --git a/arch/sh/kernel/cpu/sh2/probe.c b/arch/sh/kernel/cpu/sh2/probe.c
index 108e81b682ed..abbf17427e52 100644
--- a/arch/sh/kernel/cpu/sh2/probe.c
+++ b/arch/sh/kernel/cpu/sh2/probe.c
@@ -9,23 +9,14 @@
9 * License. See the file "COPYING" in the main directory of this archive 9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details. 10 * for more details.
11 */ 11 */
12
13
14#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/smp.h>
15#include <asm/processor.h> 14#include <asm/processor.h>
16#include <asm/cache.h> 15#include <asm/cache.h>
17 16
18int __init detect_cpu_and_cache_system(void) 17int __init detect_cpu_and_cache_system(void)
19{ 18{
20#if defined(CONFIG_CPU_SUBTYPE_SH7604) 19#if defined(CONFIG_CPU_SUBTYPE_SH7619)
21 current_cpu_data.type = CPU_SH7604;
22 current_cpu_data.dcache.ways = 4;
23 current_cpu_data.dcache.way_incr = (1<<10);
24 current_cpu_data.dcache.sets = 64;
25 current_cpu_data.dcache.entry_shift = 4;
26 current_cpu_data.dcache.linesz = L1_CACHE_BYTES;
27 current_cpu_data.dcache.flags = 0;
28#elif defined(CONFIG_CPU_SUBTYPE_SH7619)
29 current_cpu_data.type = CPU_SH7619; 20 current_cpu_data.type = CPU_SH7619;
30 current_cpu_data.dcache.ways = 4; 21 current_cpu_data.dcache.ways = 4;
31 current_cpu_data.dcache.way_incr = (1<<12); 22 current_cpu_data.dcache.way_incr = (1<<12);
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
index f83ff8a68f35..a979b981e6a3 100644
--- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c
+++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
@@ -52,7 +52,7 @@ static int __init sh7619_devices_setup(void)
52} 52}
53__initcall(sh7619_devices_setup); 53__initcall(sh7619_devices_setup);
54 54
55static struct ipr_data sh7619_ipr_map[] = { 55static struct ipr_data ipr_irq_table[] = {
56 { 86, 0, 4, 2 }, /* CMI0 */ 56 { 86, 0, 4, 2 }, /* CMI0 */
57 { 88, 1, 12, 3 }, /* SCIF0_ERI */ 57 { 88, 1, 12, 3 }, /* SCIF0_ERI */
58 { 89, 1, 12, 3 }, /* SCIF0_RXI */ 58 { 89, 1, 12, 3 }, /* SCIF0_RXI */
@@ -68,7 +68,7 @@ static struct ipr_data sh7619_ipr_map[] = {
68 { 99, 1, 4, 3 }, /* SCIF2_TXI */ 68 { 99, 1, 4, 3 }, /* SCIF2_TXI */
69}; 69};
70 70
71static unsigned int ipr_offsets[] = { 71static unsigned long ipr_offsets[] = {
72 0xf8080000, /* IPRC */ 72 0xf8080000, /* IPRC */
73 0xf8080002, /* IPRD */ 73 0xf8080002, /* IPRD */
74 0xf8080004, /* IPRE */ 74 0xf8080004, /* IPRE */
@@ -76,15 +76,19 @@ static unsigned int ipr_offsets[] = {
76 0xf8080008, /* IPRG */ 76 0xf8080008, /* IPRG */
77}; 77};
78 78
79/* given the IPR index return the address of the IPR register */ 79static struct ipr_desc ipr_irq_desc = {
80unsigned int map_ipridx_to_addr(int idx) 80 .ipr_offsets = ipr_offsets,
81{ 81 .nr_offsets = ARRAY_SIZE(ipr_offsets),
82 if (unlikely(idx >= ARRAY_SIZE(ipr_offsets))) 82
83 return 0; 83 .ipr_data = ipr_irq_table,
84 return ipr_offsets[idx]; 84 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
85} 85
86 .chip = {
87 .name = "IPR-sh7619",
88 },
89};
86 90
87void __init init_IRQ_ipr(void) 91void __init plat_irq_setup(void)
88{ 92{
89 make_ipr_irq(sh7619_ipr_map, ARRAY_SIZE(sh7619_ipr_map)); 93 register_ipr_controller(&ipr_irq_desc);
90} 94}
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
index 4ed9110632bc..deab16500167 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
@@ -57,7 +57,7 @@ static int __init sh7206_devices_setup(void)
57} 57}
58__initcall(sh7206_devices_setup); 58__initcall(sh7206_devices_setup);
59 59
60static struct ipr_data sh7206_ipr_map[] = { 60static struct ipr_data ipr_irq_table[] = {
61 { 140, 7, 12, 2 }, /* CMI0 */ 61 { 140, 7, 12, 2 }, /* CMI0 */
62 { 164, 8, 4, 2 }, /* MTU2_TGI1A */ 62 { 164, 8, 4, 2 }, /* MTU2_TGI1A */
63 { 240, 13, 12, 3 }, /* SCIF0_BRI */ 63 { 240, 13, 12, 3 }, /* SCIF0_BRI */
@@ -78,7 +78,7 @@ static struct ipr_data sh7206_ipr_map[] = {
78 { 255, 13, 0, 3 }, /* SCIF3_TXI */ 78 { 255, 13, 0, 3 }, /* SCIF3_TXI */
79}; 79};
80 80
81static unsigned int ipr_offsets[] = { 81static unsigned long ipr_offsets[] = {
82 0xfffe0818, /* IPR01 */ 82 0xfffe0818, /* IPR01 */
83 0xfffe081a, /* IPR02 */ 83 0xfffe081a, /* IPR02 */
84 0, /* unused */ 84 0, /* unused */
@@ -95,15 +95,19 @@ static unsigned int ipr_offsets[] = {
95 0xfffe0c10, /* IPR14 */ 95 0xfffe0c10, /* IPR14 */
96}; 96};
97 97
98/* given the IPR index return the address of the IPR register */ 98static struct ipr_desc ipr_irq_desc = {
99unsigned int map_ipridx_to_addr(int idx) 99 .ipr_offsets = ipr_offsets,
100{ 100 .nr_offsets = ARRAY_SIZE(ipr_offsets),
101 if (unlikely(idx >= ARRAY_SIZE(ipr_offsets))) 101
102 return 0; 102 .ipr_data = ipr_irq_table,
103 return ipr_offsets[idx]; 103 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
104} 104
105 .chip = {
106 .name = "IPR-sh7206",
107 },
108};
105 109
106void __init init_IRQ_ipr(void) 110void __init plat_irq_setup(void)
107{ 111{
108 make_ipr_irq(sh7206_ipr_map, ARRAY_SIZE(sh7206_ipr_map)); 112 register_ipr_controller(&ipr_irq_desc);
109} 113}
diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S
index 659cc081e5e7..d8e122971c3e 100644
--- a/arch/sh/kernel/cpu/sh3/entry.S
+++ b/arch/sh/kernel/cpu/sh3/entry.S
@@ -320,7 +320,9 @@ skip_restore:
320 320
321 .align 2 321 .align 2
3225: .long 0x00001000 ! DSP 3225: .long 0x00001000 ! DSP
323#ifdef CONFIG_KGDB_NMI
3236: .long in_nmi 3246: .long in_nmi
325#endif
3247: .long 0x30000000 3267: .long 0x30000000
325 327
326! common exception handler 328! common exception handler
@@ -338,8 +340,27 @@ ENTRY(vbr_base)
338general_exception: 340general_exception:
339 mov.l 1f, k2 341 mov.l 1f, k2
340 mov.l 2f, k3 342 mov.l 2f, k3
343#ifdef CONFIG_CPU_SUBTYPE_SHX3
344 mov.l @k2, k2
345
346 ! Is EXPEVT larger than 0x800?
347 mov #0x8, k0
348 shll8 k0
349 cmp/hs k0, k2
350 bf 0f
351
352 ! then add 0x580 (k2 is 0xd80 or 0xda0)
353 mov #0x58, k0
354 shll2 k0
355 shll2 k0
356 add k0, k2
3570:
358 bra handle_exception
359 nop
360#else
341 bra handle_exception 361 bra handle_exception
342 mov.l @k2, k2 362 mov.l @k2, k2
363#endif
343 .align 2 364 .align 2
3441: .long EXPEVT 3651: .long EXPEVT
3452: .long ret_from_exception 3662: .long ret_from_exception
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7705.c b/arch/sh/kernel/cpu/sh3/setup-sh7705.c
index 1983fb7ad6ea..ebd9d06d8bdd 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7705.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7705.c
@@ -48,7 +48,7 @@ static int __init sh7705_devices_setup(void)
48} 48}
49__initcall(sh7705_devices_setup); 49__initcall(sh7705_devices_setup);
50 50
51static struct ipr_data sh7705_ipr_map[] = { 51static struct ipr_data ipr_irq_table[] = {
52 /* IRQ, IPR-idx, shift, priority */ 52 /* IRQ, IPR-idx, shift, priority */
53 { 16, 0, 12, 2 }, /* TMU0 TUNI*/ 53 { 16, 0, 12, 2 }, /* TMU0 TUNI*/
54 { 17, 0, 8, 2 }, /* TMU1 TUNI */ 54 { 17, 0, 8, 2 }, /* TMU1 TUNI */
@@ -70,25 +70,29 @@ static struct ipr_data sh7705_ipr_map[] = {
70}; 70};
71 71
72static unsigned long ipr_offsets[] = { 72static unsigned long ipr_offsets[] = {
73 0xFFFFFEE2 /* 0: IPRA */ 73 0xFFFFFEE2, /* 0: IPRA */
74, 0xFFFFFEE4 /* 1: IPRB */ 74 0xFFFFFEE4, /* 1: IPRB */
75, 0xA4000016 /* 2: IPRC */ 75 0xA4000016, /* 2: IPRC */
76, 0xA4000018 /* 3: IPRD */ 76 0xA4000018, /* 3: IPRD */
77, 0xA400001A /* 4: IPRE */ 77 0xA400001A, /* 4: IPRE */
78, 0xA4080000 /* 5: IPRF */ 78 0xA4080000, /* 5: IPRF */
79, 0xA4080002 /* 6: IPRG */ 79 0xA4080002, /* 6: IPRG */
80, 0xA4080004 /* 7: IPRH */ 80 0xA4080004, /* 7: IPRH */
81}; 81};
82 82
83/* given the IPR index return the address of the IPR register */ 83static struct ipr_desc ipr_irq_desc = {
84unsigned int map_ipridx_to_addr(int idx) 84 .ipr_offsets = ipr_offsets,
85{ 85 .nr_offsets = ARRAY_SIZE(ipr_offsets),
86 if (idx >= ARRAY_SIZE(ipr_offsets)) 86
87 return 0; 87 .ipr_data = ipr_irq_table,
88 return ipr_offsets[idx]; 88 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
89} 89
90 .chip = {
91 .name = "IPR-sh7705",
92 },
93};
90 94
91void __init init_IRQ_ipr() 95void __init plat_irq_setup(void)
92{ 96{
93 make_ipr_irq(sh7705_ipr_map, ARRAY_SIZE(sh7705_ipr_map)); 97 register_ipr_controller(&ipr_irq_desc);
94} 98}
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7709.c b/arch/sh/kernel/cpu/sh3/setup-sh7709.c
index c7d7c35fc834..086f8e2545af 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7709.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7709.c
@@ -12,6 +12,26 @@
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <asm/sci.h> 13#include <asm/sci.h>
14 14
15static struct resource rtc_resources[] = {
16 [0] = {
17 .start = 0xfffffec0,
18 .end = 0xfffffec0 + 0x1e,
19 .flags = IORESOURCE_IO,
20 },
21 [1] = {
22 .start = 20,
23 .flags = IORESOURCE_IRQ,
24 },
25 [2] = {
26 .start = 21,
27 .flags = IORESOURCE_IRQ,
28 },
29 [3] = {
30 .start = 22,
31 .flags = IORESOURCE_IRQ,
32 },
33};
34
15static struct plat_sci_port sci_platform_data[] = { 35static struct plat_sci_port sci_platform_data[] = {
16 { 36 {
17 .mapbase = 0xfffffe80, 37 .mapbase = 0xfffffe80,
@@ -41,8 +61,16 @@ static struct platform_device sci_device = {
41 }, 61 },
42}; 62};
43 63
64static struct platform_device rtc_device = {
65 .name = "sh-rtc",
66 .id = -1,
67 .num_resources = ARRAY_SIZE(rtc_resources),
68 .resource = rtc_resources,
69};
70
44static struct platform_device *sh7709_devices[] __initdata = { 71static struct platform_device *sh7709_devices[] __initdata = {
45 &sci_device, 72 &sci_device,
73 &rtc_device,
46}; 74};
47 75
48static int __init sh7709_devices_setup(void) 76static int __init sh7709_devices_setup(void)
@@ -52,32 +80,66 @@ static int __init sh7709_devices_setup(void)
52} 80}
53__initcall(sh7709_devices_setup); 81__initcall(sh7709_devices_setup);
54 82
55#define IPRx(A,N) .addr=A, .shift=N 83static struct ipr_data ipr_irq_table[] = {
56#define IPRA(N) IPRx(0xfffffee2UL,N) 84 { 16, 0, 12, 2 }, /* TMU TUNI0 */
57#define IPRB(N) IPRx(0xfffffee4UL,N) 85 { 17, 0, 8, 4 }, /* TMU TUNI1 */
58#define IPRC(N) IPRx(0xa4000016UL,N) 86 { 18, 0, 4, 1 }, /* TMU TUNI1 */
59#define IPRD(N) IPRx(0xa4000018UL,N) 87 { 19, 0, 4, 1 }, /* TMU TUNI1 */
60#define IPRE(N) IPRx(0xa400001aUL,N) 88 { 20, 0, 0, 2 }, /* RTC CUI */
61 89 { 21, 0, 0, 2 }, /* RTC CUI */
62static struct ipr_data sh7709_ipr_map[] = { 90 { 22, 0, 0, 2 }, /* RTC CUI */
63 [16] = { IPRA(12), 2 }, /* TMU TUNI0 */ 91
64 [17] = { IPRA(8), 4 }, /* TMU TUNI1 */ 92 { 23, 1, 4, 3 }, /* SCI */
65 [18 ... 19] = { IPRA(4), 1 }, /* TMU TUNI1 */ 93 { 24, 1, 4, 3 }, /* SCI */
66 [20 ... 22] = { IPRA(0), 2 }, /* RTC CUI */ 94 { 25, 1, 4, 3 }, /* SCI */
67 [23 ... 26] = { IPRB(4), 3 }, /* SCI */ 95 { 26, 1, 4, 3 }, /* SCI */
68 [27] = { IPRB(12), 2 }, /* WDT ITI */ 96 { 27, 1, 12, 3 }, /* WDT ITI */
69 [32] = { IPRC(0), 1 }, /* IRQ 0 */ 97
70 [33] = { IPRC(4), 1 }, /* IRQ 1 */ 98 { 32, 2, 0, 1 }, /* IRQ 0 */
71 [34] = { IPRC(8), 1 }, /* IRQ 2 APM */ 99 { 33, 2, 4, 1 }, /* IRQ 1 */
72 [35] = { IPRC(12), 1 }, /* IRQ 3 TOUCHSCREEN */ 100 { 34, 2, 8, 1 }, /* IRQ 2 APM */
73 [36] = { IPRD(0), 1 }, /* IRQ 4 */ 101 { 35, 2, 12, 1 }, /* IRQ 3 TOUCHSCREEN */
74 [37] = { IPRD(4), 1 }, /* IRQ 5 */ 102
75 [48 ... 51] = { IPRE(12), 7 }, /* DMA */ 103 { 36, 3, 0, 1 }, /* IRQ 4 */
76 [52 ... 55] = { IPRE(8), 3 }, /* IRDA */ 104 { 37, 3, 4, 1 }, /* IRQ 5 */
77 [56 ... 59] = { IPRE(4), 3 }, /* SCIF */ 105
106 { 48, 4, 12, 7 }, /* DMA */
107 { 49, 4, 12, 7 }, /* DMA */
108 { 50, 4, 12, 7 }, /* DMA */
109 { 51, 4, 12, 7 }, /* DMA */
110
111 { 52, 4, 8, 3 }, /* IRDA */
112 { 53, 4, 8, 3 }, /* IRDA */
113 { 54, 4, 8, 3 }, /* IRDA */
114 { 55, 4, 8, 3 }, /* IRDA */
115
116 { 56, 4, 4, 3 }, /* SCIF */
117 { 57, 4, 4, 3 }, /* SCIF */
118 { 58, 4, 4, 3 }, /* SCIF */
119 { 59, 4, 4, 3 }, /* SCIF */
120};
121
122static unsigned long ipr_offsets[] = {
123 0xfffffee2, /* 0: IPRA */
124 0xfffffee4, /* 1: IPRB */
125 0xa4000016, /* 2: IPRC */
126 0xa4000018, /* 3: IPRD */
127 0xa400001a, /* 4: IPRE */
128};
129
130static struct ipr_desc ipr_irq_desc = {
131 .ipr_offsets = ipr_offsets,
132 .nr_offsets = ARRAY_SIZE(ipr_offsets),
133
134 .ipr_data = ipr_irq_table,
135 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
136
137 .chip = {
138 .name = "IPR-sh7709",
139 },
78}; 140};
79 141
80void __init init_IRQ_ipr() 142void __init plat_irq_setup(void)
81{ 143{
82 make_ipr_irq(sh7709_ipr_map, ARRAY_SIZE(sh7709_ipr_map)); 144 register_ipr_controller(&ipr_irq_desc);
83} 145}
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7710.c b/arch/sh/kernel/cpu/sh3/setup-sh7710.c
index 51760a7e7f1c..132284893373 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7710.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7710.c
@@ -49,7 +49,7 @@ static int __init sh7710_devices_setup(void)
49} 49}
50__initcall(sh7710_devices_setup); 50__initcall(sh7710_devices_setup);
51 51
52static struct ipr_data sh7710_ipr_map[] = { 52static struct ipr_data ipr_irq_table[] = {
53 /* IRQ, IPR-idx, shift, priority */ 53 /* IRQ, IPR-idx, shift, priority */
54 { 16, 0, 12, 2 }, /* TMU0 TUNI*/ 54 { 16, 0, 12, 2 }, /* TMU0 TUNI*/
55 { 17, 0, 8, 2 }, /* TMU1 TUNI */ 55 { 17, 0, 8, 2 }, /* TMU1 TUNI */
@@ -78,26 +78,30 @@ static struct ipr_data sh7710_ipr_map[] = {
78}; 78};
79 79
80static unsigned long ipr_offsets[] = { 80static unsigned long ipr_offsets[] = {
81 0xA414FEE2 /* 0: IPRA */ 81 0xA414FEE2, /* 0: IPRA */
82, 0xA414FEE4 /* 1: IPRB */ 82 0xA414FEE4, /* 1: IPRB */
83, 0xA4140016 /* 2: IPRC */ 83 0xA4140016, /* 2: IPRC */
84, 0xA4140018 /* 3: IPRD */ 84 0xA4140018, /* 3: IPRD */
85, 0xA414001A /* 4: IPRE */ 85 0xA414001A, /* 4: IPRE */
86, 0xA4080000 /* 5: IPRF */ 86 0xA4080000, /* 5: IPRF */
87, 0xA4080002 /* 6: IPRG */ 87 0xA4080002, /* 6: IPRG */
88, 0xA4080004 /* 7: IPRH */ 88 0xA4080004, /* 7: IPRH */
89, 0xA4080006 /* 8: IPRI */ 89 0xA4080006, /* 8: IPRI */
90}; 90};
91 91
92/* given the IPR index return the address of the IPR register */ 92static struct ipr_desc ipr_irq_desc = {
93unsigned int map_ipridx_to_addr(int idx) 93 .ipr_offsets = ipr_offsets,
94{ 94 .nr_offsets = ARRAY_SIZE(ipr_offsets),
95 if (idx >= ARRAY_SIZE(ipr_offsets)) 95
96 return 0; 96 .ipr_data = ipr_irq_table,
97 return ipr_offsets[idx]; 97 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
98} 98
99 .chip = {
100 .name = "IPR-sh7710",
101 },
102};
99 103
100void __init init_IRQ_ipr() 104void __init plat_irq_setup(void)
101{ 105{
102 make_ipr_irq(sh7710_ipr_map, ARRAY_SIZE(sh7710_ipr_map)); 106 register_ipr_controller(&ipr_irq_desc);
103} 107}
diff --git a/arch/sh/kernel/cpu/sh4/Makefile b/arch/sh/kernel/cpu/sh4/Makefile
index 8add10bd8268..dadd6bffc128 100644
--- a/arch/sh/kernel/cpu/sh4/Makefile
+++ b/arch/sh/kernel/cpu/sh4/Makefile
@@ -10,7 +10,11 @@ obj-$(CONFIG_SH_STORE_QUEUES) += sq.o
10 10
11# CPU subtype setup 11# CPU subtype setup
12obj-$(CONFIG_CPU_SUBTYPE_SH7750) += setup-sh7750.o 12obj-$(CONFIG_CPU_SUBTYPE_SH7750) += setup-sh7750.o
13obj-$(CONFIG_CPU_SUBTYPE_SH7750R) += setup-sh7750.o
14obj-$(CONFIG_CPU_SUBTYPE_SH7750S) += setup-sh7750.o
15obj-$(CONFIG_CPU_SUBTYPE_SH7091) += setup-sh7750.o
13obj-$(CONFIG_CPU_SUBTYPE_SH7751) += setup-sh7750.o 16obj-$(CONFIG_CPU_SUBTYPE_SH7751) += setup-sh7750.o
17obj-$(CONFIG_CPU_SUBTYPE_SH7751R) += setup-sh7750.o
14obj-$(CONFIG_CPU_SUBTYPE_SH7760) += setup-sh7760.o 18obj-$(CONFIG_CPU_SUBTYPE_SH7760) += setup-sh7760.o
15obj-$(CONFIG_CPU_SUBTYPE_SH4_202) += setup-sh4-202.o 19obj-$(CONFIG_CPU_SUBTYPE_SH4_202) += setup-sh4-202.o
16 20
diff --git a/arch/sh/kernel/cpu/sh4/clock-sh4-202.c b/arch/sh/kernel/cpu/sh4/clock-sh4-202.c
index fcb2c41bc34e..a33429463e96 100644
--- a/arch/sh/kernel/cpu/sh4/clock-sh4-202.c
+++ b/arch/sh/kernel/cpu/sh4/clock-sh4-202.c
@@ -111,7 +111,7 @@ static int shoc_clk_verify_rate(struct clk *clk, unsigned long rate)
111 return 0; 111 return 0;
112} 112}
113 113
114static int shoc_clk_set_rate(struct clk *clk, unsigned long rate) 114static int shoc_clk_set_rate(struct clk *clk, unsigned long rate, int algo_id)
115{ 115{
116 unsigned long frqcr3; 116 unsigned long frqcr3;
117 unsigned int tmp; 117 unsigned int tmp;
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c
index fab2eb07196b..66c3f75647b2 100644
--- a/arch/sh/kernel/cpu/sh4/probe.c
+++ b/arch/sh/kernel/cpu/sh4/probe.c
@@ -141,6 +141,14 @@ int __init detect_cpu_and_cache_system(void)
141 current_cpu_data.flags |= CPU_HAS_LLSC; 141 current_cpu_data.flags |= CPU_HAS_LLSC;
142 } 142 }
143 break; 143 break;
144 case 0x4000: /* 1st cut */
145 case 0x4001: /* 2nd cut */
146 current_cpu_data.type = CPU_SHX3;
147 current_cpu_data.icache.ways = 4;
148 current_cpu_data.dcache.ways = 4;
149 current_cpu_data.flags |= CPU_HAS_FPU | CPU_HAS_PERF_COUNTER |
150 CPU_HAS_LLSC;
151 break;
144 case 0x8000: 152 case 0x8000:
145 current_cpu_data.type = CPU_ST40RA; 153 current_cpu_data.type = CPU_ST40RA;
146 current_cpu_data.flags |= CPU_HAS_FPU; 154 current_cpu_data.flags |= CPU_HAS_FPU;
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
index 03b14cf78ddf..f2286de22bd5 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
@@ -82,72 +82,213 @@ static int __init sh7750_devices_setup(void)
82} 82}
83__initcall(sh7750_devices_setup); 83__initcall(sh7750_devices_setup);
84 84
85static struct ipr_data sh7750_ipr_map[] = { 85enum {
86 /* IRQ, IPR-idx, shift, priority */ 86 UNUSED = 0,
87 { 16, 0, 12, 2 }, /* TMU0 TUNI*/ 87
88 { 17, 0, 12, 2 }, /* TMU1 TUNI */ 88 /* interrupt sources */
89 { 18, 0, 4, 2 }, /* TMU2 TUNI */ 89 IRL0, IRL1, IRL2, IRL3, /* only IRLM mode supported */
90 { 19, 0, 4, 2 }, /* TMU2 TIPCI */ 90 HUDI, GPIOI,
91 { 27, 1, 12, 2 }, /* WDT ITI */ 91 DMAC_DMTE0, DMAC_DMTE1, DMAC_DMTE2, DMAC_DMTE3,
92 { 20, 0, 0, 2 }, /* RTC ATI (alarm) */ 92 DMAC_DMTE4, DMAC_DMTE5, DMAC_DMTE6, DMAC_DMTE7,
93 { 21, 0, 0, 2 }, /* RTC PRI (period) */ 93 DMAC_DMAE,
94 { 22, 0, 0, 2 }, /* RTC CUI (carry) */ 94 PCIC0_PCISERR, PCIC1_PCIERR, PCIC1_PCIPWDWN, PCIC1_PCIPWON,
95 { 23, 1, 4, 3 }, /* SCI ERI */ 95 PCIC1_PCIDMA0, PCIC1_PCIDMA1, PCIC1_PCIDMA2, PCIC1_PCIDMA3,
96 { 24, 1, 4, 3 }, /* SCI RXI */ 96 TMU3, TMU4, TMU0, TMU1, TMU2_TUNI, TMU2_TICPI,
97 { 25, 1, 4, 3 }, /* SCI TXI */ 97 RTC_ATI, RTC_PRI, RTC_CUI,
98 { 40, 2, 4, 3 }, /* SCIF ERI */ 98 SCI1_ERI, SCI1_RXI, SCI1_TXI, SCI1_TEI,
99 { 41, 2, 4, 3 }, /* SCIF RXI */ 99 SCIF_ERI, SCIF_RXI, SCIF_BRI, SCIF_TXI,
100 { 42, 2, 4, 3 }, /* SCIF BRI */ 100 WDT,
101 { 43, 2, 4, 3 }, /* SCIF TXI */ 101 REF_RCMI, REF_ROVI,
102 { 34, 2, 8, 7 }, /* DMAC DMTE0 */ 102
103 { 35, 2, 8, 7 }, /* DMAC DMTE1 */ 103 /* interrupt groups */
104 { 36, 2, 8, 7 }, /* DMAC DMTE2 */ 104 DMAC, PCIC1, TMU2, RTC, SCI1, SCIF, REF,
105 { 37, 2, 8, 7 }, /* DMAC DMTE3 */ 105};
106 { 38, 2, 8, 7 }, /* DMAC DMAE */ 106
107}; 107static struct intc_vect vectors[] = {
108 108 INTC_VECT(HUDI, 0x600), INTC_VECT(GPIOI, 0x620),
109#ifdef CONFIG_CPU_SUBTYPE_SH7751 109 INTC_VECT(TMU0, 0x400), INTC_VECT(TMU1, 0x420),
110static struct ipr_data sh7751_ipr_map[] = { 110 INTC_VECT(TMU2_TUNI, 0x440), INTC_VECT(TMU2_TICPI, 0x460),
111 { 44, 2, 8, 7 }, /* DMAC DMTE4 */ 111 INTC_VECT(RTC_ATI, 0x480), INTC_VECT(RTC_PRI, 0x4a0),
112 { 45, 2, 8, 7 }, /* DMAC DMTE5 */ 112 INTC_VECT(RTC_CUI, 0x4c0),
113 { 46, 2, 8, 7 }, /* DMAC DMTE6 */ 113 INTC_VECT(SCI1_ERI, 0x4e0), INTC_VECT(SCI1_RXI, 0x500),
114 { 47, 2, 8, 7 }, /* DMAC DMTE7 */ 114 INTC_VECT(SCI1_TXI, 0x520), INTC_VECT(SCI1_TEI, 0x540),
115 /* The following use INTC_INPRI00 for masking, which is a 32-bit 115 INTC_VECT(SCIF_ERI, 0x700), INTC_VECT(SCIF_RXI, 0x720),
116 register, not a 16-bit register like the IPRx registers, so it 116 INTC_VECT(SCIF_BRI, 0x740), INTC_VECT(SCIF_TXI, 0x760),
117 would need special support */ 117 INTC_VECT(WDT, 0x560),
118 /*{ 72, INTPRI00, 8, ? },*/ /* TMU3 TUNI */ 118 INTC_VECT(REF_RCMI, 0x580), INTC_VECT(REF_ROVI, 0x5a0),
119 /*{ 76, INTPRI00, 12, ? },*/ /* TMU4 TUNI */ 119};
120
121static struct intc_group groups[] = {
122 INTC_GROUP(TMU2, TMU2_TUNI, TMU2_TICPI),
123 INTC_GROUP(RTC, RTC_ATI, RTC_PRI, RTC_CUI),
124 INTC_GROUP(SCI1, SCI1_ERI, SCI1_RXI, SCI1_TXI, SCI1_TEI),
125 INTC_GROUP(SCIF, SCIF_ERI, SCIF_RXI, SCIF_BRI, SCIF_TXI),
126 INTC_GROUP(REF, REF_RCMI, REF_ROVI),
127};
128
129static struct intc_prio priorities[] = {
130 INTC_PRIO(SCIF, 3),
131 INTC_PRIO(SCI1, 3),
132 INTC_PRIO(DMAC, 7),
133};
134
135static struct intc_prio_reg prio_registers[] = {
136 { 0xffd00004, 16, 4, /* IPRA */ { TMU0, TMU1, TMU2, RTC } },
137 { 0xffd00008, 16, 4, /* IPRB */ { WDT, REF, SCI1, 0 } },
138 { 0xffd0000c, 16, 4, /* IPRC */ { GPIOI, DMAC, SCIF, HUDI } },
139 { 0xffd00010, 16, 4, /* IPRD */ { IRL0, IRL1, IRL2, IRL3 } },
140 { 0xfe080000, 32, 4, /* INTPRI00 */ { 0, 0, 0, 0,
141 TMU4, TMU3,
142 PCIC1, PCIC0_PCISERR } },
143};
144
145static DECLARE_INTC_DESC(intc_desc, "sh7750", vectors, groups,
146 priorities, NULL, prio_registers, NULL);
147
148/* SH7750, SH7750S, SH7751 and SH7091 all have 4-channel DMA controllers */
149#if defined(CONFIG_CPU_SUBTYPE_SH7750) || \
150 defined(CONFIG_CPU_SUBTYPE_SH7750S) || \
151 defined(CONFIG_CPU_SUBTYPE_SH7751) || \
152 defined(CONFIG_CPU_SUBTYPE_SH7091)
153static struct intc_vect vectors_dma4[] = {
154 INTC_VECT(DMAC_DMTE0, 0x640), INTC_VECT(DMAC_DMTE1, 0x660),
155 INTC_VECT(DMAC_DMTE2, 0x680), INTC_VECT(DMAC_DMTE3, 0x6a0),
156 INTC_VECT(DMAC_DMAE, 0x6c0),
157};
158
159static struct intc_group groups_dma4[] = {
160 INTC_GROUP(DMAC, DMAC_DMTE0, DMAC_DMTE1, DMAC_DMTE2,
161 DMAC_DMTE3, DMAC_DMAE),
162};
163
164static DECLARE_INTC_DESC(intc_desc_dma4, "sh7750_dma4",
165 vectors_dma4, groups_dma4,
166 priorities, NULL, prio_registers, NULL);
167#endif
168
169/* SH7750R and SH7751R both have 8-channel DMA controllers */
170#if defined(CONFIG_CPU_SUBTYPE_SH7750R) || defined(CONFIG_CPU_SUBTYPE_SH7751R)
171static struct intc_vect vectors_dma8[] = {
172 INTC_VECT(DMAC_DMTE0, 0x640), INTC_VECT(DMAC_DMTE1, 0x660),
173 INTC_VECT(DMAC_DMTE2, 0x680), INTC_VECT(DMAC_DMTE3, 0x6a0),
174 INTC_VECT(DMAC_DMTE4, 0x780), INTC_VECT(DMAC_DMTE5, 0x7a0),
175 INTC_VECT(DMAC_DMTE6, 0x7c0), INTC_VECT(DMAC_DMTE7, 0x7e0),
176 INTC_VECT(DMAC_DMAE, 0x6c0),
177};
178
179static struct intc_group groups_dma8[] = {
180 INTC_GROUP(DMAC, DMAC_DMTE0, DMAC_DMTE1, DMAC_DMTE2,
181 DMAC_DMTE3, DMAC_DMTE4, DMAC_DMTE5,
182 DMAC_DMTE6, DMAC_DMTE7, DMAC_DMAE),
183};
184
185static DECLARE_INTC_DESC(intc_desc_dma8, "sh7750_dma8",
186 vectors_dma8, groups_dma8,
187 priorities, NULL, prio_registers, NULL);
188#endif
189
190/* SH7750R, SH7751 and SH7751R all have two extra timer channels */
191#if defined(CONFIG_CPU_SUBTYPE_SH7750R) || \
192 defined(CONFIG_CPU_SUBTYPE_SH7751) || \
193 defined(CONFIG_CPU_SUBTYPE_SH7751R)
194static struct intc_vect vectors_tmu34[] = {
195 INTC_VECT(TMU3, 0xb00), INTC_VECT(TMU4, 0xb80),
196};
197
198static struct intc_mask_reg mask_registers[] = {
199 { 0xfe080040, 0xfe080060, 32, /* INTMSK00 / INTMSKCLR00 */
200 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
201 0, 0, 0, 0, 0, 0, TMU4, TMU3,
202 PCIC1_PCIERR, PCIC1_PCIPWDWN, PCIC1_PCIPWON,
203 PCIC1_PCIDMA0, PCIC1_PCIDMA1, PCIC1_PCIDMA2,
204 PCIC1_PCIDMA3, PCIC0_PCISERR } },
120}; 205};
206
207static DECLARE_INTC_DESC(intc_desc_tmu34, "sh7750_tmu34",
208 vectors_tmu34, NULL, priorities,
209 mask_registers, prio_registers, NULL);
121#endif 210#endif
122 211
123static unsigned long ipr_offsets[] = { 212/* SH7750S, SH7750R, SH7751 and SH7751R all have IRLM priority registers */
124 0xffd00004UL, /* 0: IPRA */ 213static struct intc_vect vectors_irlm[] = {
125 0xffd00008UL, /* 1: IPRB */ 214 INTC_VECT(IRL0, 0x240), INTC_VECT(IRL1, 0x2a0),
126 0xffd0000cUL, /* 2: IPRC */ 215 INTC_VECT(IRL2, 0x300), INTC_VECT(IRL3, 0x360),
127 0xffd00010UL, /* 3: IPRD */ 216};
217
218static DECLARE_INTC_DESC(intc_desc_irlm, "sh7750_irlm", vectors_irlm, NULL,
219 priorities, NULL, prio_registers, NULL);
220
221/* SH7751 and SH7751R both have PCI */
222#if defined(CONFIG_CPU_SUBTYPE_SH7751) || defined(CONFIG_CPU_SUBTYPE_SH7751R)
223static struct intc_vect vectors_pci[] = {
224 INTC_VECT(PCIC0_PCISERR, 0xa00), INTC_VECT(PCIC1_PCIERR, 0xae0),
225 INTC_VECT(PCIC1_PCIPWDWN, 0xac0), INTC_VECT(PCIC1_PCIPWON, 0xaa0),
226 INTC_VECT(PCIC1_PCIDMA0, 0xa80), INTC_VECT(PCIC1_PCIDMA1, 0xa60),
227 INTC_VECT(PCIC1_PCIDMA2, 0xa40), INTC_VECT(PCIC1_PCIDMA3, 0xa20),
128}; 228};
129 229
130/* given the IPR index return the address of the IPR register */ 230static struct intc_group groups_pci[] = {
131unsigned int map_ipridx_to_addr(int idx) 231 INTC_GROUP(PCIC1, PCIC1_PCIERR, PCIC1_PCIPWDWN, PCIC1_PCIPWON,
232 PCIC1_PCIDMA0, PCIC1_PCIDMA1, PCIC1_PCIDMA2, PCIC1_PCIDMA3),
233};
234
235static DECLARE_INTC_DESC(intc_desc_pci, "sh7750_pci", vectors_pci, groups_pci,
236 priorities, mask_registers, prio_registers, NULL);
237#endif
238
239#if defined(CONFIG_CPU_SUBTYPE_SH7750) || \
240 defined(CONFIG_CPU_SUBTYPE_SH7750S) || \
241 defined(CONFIG_CPU_SUBTYPE_SH7091)
242void __init plat_irq_setup(void)
132{ 243{
133 if (idx >= ARRAY_SIZE(ipr_offsets)) 244 /*
134 return 0; 245 * same vectors for SH7750, SH7750S and SH7091 except for IRLM,
135 return ipr_offsets[idx]; 246 * see below..
247 */
248 register_intc_controller(&intc_desc);
249 register_intc_controller(&intc_desc_dma4);
136} 250}
251#endif
137 252
138#define INTC_ICR 0xffd00000UL 253#if defined(CONFIG_CPU_SUBTYPE_SH7750R)
139#define INTC_ICR_IRLM (1<<7) 254void __init plat_irq_setup(void)
255{
256 register_intc_controller(&intc_desc);
257 register_intc_controller(&intc_desc_dma8);
258 register_intc_controller(&intc_desc_tmu34);
259}
260#endif
140 261
141/* enable individual interrupt mode for external interupts */ 262#if defined(CONFIG_CPU_SUBTYPE_SH7751)
142void ipr_irq_enable_irlm(void) 263void __init plat_irq_setup(void)
143{ 264{
144 ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); 265 register_intc_controller(&intc_desc);
266 register_intc_controller(&intc_desc_dma4);
267 register_intc_controller(&intc_desc_tmu34);
268 register_intc_controller(&intc_desc_pci);
145} 269}
270#endif
146 271
147void __init init_IRQ_ipr() 272#if defined(CONFIG_CPU_SUBTYPE_SH7751R)
273void __init plat_irq_setup(void)
148{ 274{
149 make_ipr_irq(sh7750_ipr_map, ARRAY_SIZE(sh7750_ipr_map)); 275 register_intc_controller(&intc_desc);
150#ifdef CONFIG_CPU_SUBTYPE_SH7751 276 register_intc_controller(&intc_desc_dma8);
151 make_ipr_irq(sh7751_ipr_map, ARRAY_SIZE(sh7751_ipr_map)); 277 register_intc_controller(&intc_desc_tmu34);
278 register_intc_controller(&intc_desc_pci);
279}
152#endif 280#endif
281
282#define INTC_ICR 0xffd00000UL
283#define INTC_ICR_IRLM (1<<7)
284
285/* enable individual interrupt mode for external interupts */
286void __init ipr_irq_enable_irlm(void)
287{
288#if defined(CONFIG_CPU_SUBTYPE_SH7750) || defined(CONFIG_CPU_SUBTYPE_SH7091)
289 BUG(); /* impossible to mask interrupts on SH7750 and SH7091 */
290#endif
291 register_intc_controller(&intc_desc_irlm);
292
293 ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR);
153} 294}
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
index b7c702821e6f..47fa27056253 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
@@ -96,7 +96,20 @@ static struct intc2_data intc2_irq_table[] = {
96 {109,12, 0, 4, 0, 3}, /* CMTI */ 96 {109,12, 0, 4, 0, 3}, /* CMTI */
97}; 97};
98 98
99static struct ipr_data sh7760_ipr_map[] = { 99static struct intc2_desc intc2_irq_desc __read_mostly = {
100 .prio_base = 0xfe080000,
101 .msk_base = 0xfe080040,
102 .mskclr_base = 0xfe080060,
103
104 .intc2_data = intc2_irq_table,
105 .nr_irqs = ARRAY_SIZE(intc2_irq_table),
106
107 .chip = {
108 .name = "INTC2-sh7760",
109 },
110};
111
112static struct ipr_data ipr_irq_table[] = {
100 /* IRQ, IPR-idx, shift, priority */ 113 /* IRQ, IPR-idx, shift, priority */
101 { 16, 0, 12, 2 }, /* TMU0 TUNI*/ 114 { 16, 0, 12, 2 }, /* TMU0 TUNI*/
102 { 17, 0, 8, 2 }, /* TMU1 TUNI */ 115 { 17, 0, 8, 2 }, /* TMU1 TUNI */
@@ -133,20 +146,20 @@ static unsigned long ipr_offsets[] = {
133 0xffd00010UL, /* 3: IPRD */ 146 0xffd00010UL, /* 3: IPRD */
134}; 147};
135 148
136/* given the IPR index return the address of the IPR register */ 149static struct ipr_desc ipr_irq_desc = {
137unsigned int map_ipridx_to_addr(int idx) 150 .ipr_offsets = ipr_offsets,
138{ 151 .nr_offsets = ARRAY_SIZE(ipr_offsets),
139 if (idx >= ARRAY_SIZE(ipr_offsets))
140 return 0;
141 return ipr_offsets[idx];
142}
143 152
144void __init init_IRQ_intc2(void) 153 .ipr_data = ipr_irq_table,
145{ 154 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
146 make_intc2_irq(intc2_irq_table, ARRAY_SIZE(intc2_irq_table)); 155
147} 156 .chip = {
157 .name = "IPR-sh7760",
158 },
159};
148 160
149void __init init_IRQ_ipr(void) 161void __init plat_irq_setup(void)
150{ 162{
151 make_ipr_irq(sh7760_ipr_map, ARRAY_SIZE(sh7760_ipr_map)); 163 register_intc2_controller(&intc2_irq_desc);
164 register_ipr_controller(&ipr_irq_desc);
152} 165}
diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c
index d7fff752e569..b98d6c3e6f36 100644
--- a/arch/sh/kernel/cpu/sh4/sq.c
+++ b/arch/sh/kernel/cpu/sh4/sq.c
@@ -371,8 +371,7 @@ static int __init sq_api_init(void)
371 printk(KERN_NOTICE "sq: Registering store queue API.\n"); 371 printk(KERN_NOTICE "sq: Registering store queue API.\n");
372 372
373 sq_cache = kmem_cache_create("store_queue_cache", 373 sq_cache = kmem_cache_create("store_queue_cache",
374 sizeof(struct sq_mapping), 0, 0, 374 sizeof(struct sq_mapping), 0, 0, NULL);
375 NULL, NULL);
376 if (unlikely(!sq_cache)) 375 if (unlikely(!sq_cache))
377 return ret; 376 return ret;
378 377
diff --git a/arch/sh/kernel/cpu/sh4a/Makefile b/arch/sh/kernel/cpu/sh4a/Makefile
index ab7422f8f820..400623286487 100644
--- a/arch/sh/kernel/cpu/sh4a/Makefile
+++ b/arch/sh/kernel/cpu/sh4a/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_CPU_SUBTYPE_SH7785) += setup-sh7785.o
9obj-$(CONFIG_CPU_SUBTYPE_SH73180) += setup-sh73180.o 9obj-$(CONFIG_CPU_SUBTYPE_SH73180) += setup-sh73180.o
10obj-$(CONFIG_CPU_SUBTYPE_SH7343) += setup-sh7343.o 10obj-$(CONFIG_CPU_SUBTYPE_SH7343) += setup-sh7343.o
11obj-$(CONFIG_CPU_SUBTYPE_SH7722) += setup-sh7722.o 11obj-$(CONFIG_CPU_SUBTYPE_SH7722) += setup-sh7722.o
12obj-$(CONFIG_CPU_SUBTYPE_SHX3) += setup-shx3.o
12 13
13# Primary on-chip clocks (common) 14# Primary on-chip clocks (common)
14clock-$(CONFIG_CPU_SUBTYPE_SH73180) := clock-sh73180.o 15clock-$(CONFIG_CPU_SUBTYPE_SH73180) := clock-sh73180.o
@@ -17,5 +18,6 @@ clock-$(CONFIG_CPU_SUBTYPE_SH7780) := clock-sh7780.o
17clock-$(CONFIG_CPU_SUBTYPE_SH7785) := clock-sh7785.o 18clock-$(CONFIG_CPU_SUBTYPE_SH7785) := clock-sh7785.o
18clock-$(CONFIG_CPU_SUBTYPE_SH7343) := clock-sh7343.o 19clock-$(CONFIG_CPU_SUBTYPE_SH7343) := clock-sh7343.o
19clock-$(CONFIG_CPU_SUBTYPE_SH7722) := clock-sh7722.o 20clock-$(CONFIG_CPU_SUBTYPE_SH7722) := clock-sh7722.o
21clock-$(CONFIG_CPU_SUBTYPE_SHX3) := clock-shx3.o
20 22
21obj-y += $(clock-y) 23obj-y += $(clock-y)
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
index 51b386d454de..a0fd8bb21f7c 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
@@ -387,9 +387,24 @@ out_err:
387 return err; 387 return err;
388} 388}
389 389
390static long sh7722_frqcr_round_rate(struct clk *clk, unsigned long rate)
391{
392 unsigned long parent_rate = clk->parent->rate;
393 int div;
394
395 /* look for multiplier/divisor pair */
396 div = sh7722_find_divisors(parent_rate, rate);
397 if (div < 0)
398 return clk->rate;
399
400 /* calculate new value of clock rate */
401 return parent_rate * 2 / div;
402}
403
390static struct clk_ops sh7722_frqcr_clk_ops = { 404static struct clk_ops sh7722_frqcr_clk_ops = {
391 .recalc = sh7722_frqcr_recalc, 405 .recalc = sh7722_frqcr_recalc,
392 .set_rate = sh7722_frqcr_set_rate, 406 .set_rate = sh7722_frqcr_set_rate,
407 .round_rate = sh7722_frqcr_round_rate,
393}; 408};
394 409
395/* 410/*
diff --git a/arch/sh/kernel/cpu/sh4a/clock-shx3.c b/arch/sh/kernel/cpu/sh4a/clock-shx3.c
new file mode 100644
index 000000000000..c630b29e06a8
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh4a/clock-shx3.c
@@ -0,0 +1,135 @@
1/*
2 * arch/sh/kernel/cpu/sh4/clock-shx3.c
3 *
4 * SH-X3 support for the clock framework
5 *
6 * Copyright (C) 2006-2007 Renesas Technology Corp.
7 * Copyright (C) 2006-2007 Renesas Solutions Corp.
8 * Copyright (C) 2006-2007 Paul Mundt
9 *
10 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file "COPYING" in the main directory of this archive
12 * for more details.
13 */
14#include <linux/init.h>
15#include <linux/kernel.h>
16#include <asm/clock.h>
17#include <asm/freq.h>
18#include <asm/io.h>
19
20static int ifc_divisors[] = { 1, 2, 4 ,6 };
21static int bfc_divisors[] = { 1, 1, 1, 1, 1, 12, 16, 18, 24, 32, 36, 48 };
22static int pfc_divisors[] = { 1, 1, 1, 1, 1, 1, 1, 18, 24, 32, 36, 48 };
23static int cfc_divisors[] = { 1, 1, 4, 6 };
24
25#define IFC_POS 28
26#define IFC_MSK 0x0003
27#define BFC_MSK 0x000f
28#define PFC_MSK 0x000f
29#define CFC_MSK 0x0003
30#define BFC_POS 16
31#define PFC_POS 0
32#define CFC_POS 20
33
34static void master_clk_init(struct clk *clk)
35{
36 clk->rate *= pfc_divisors[(ctrl_inl(FRQCR) >> PFC_POS) & PFC_MSK];
37}
38
39static struct clk_ops shx3_master_clk_ops = {
40 .init = master_clk_init,
41};
42
43static void module_clk_recalc(struct clk *clk)
44{
45 int idx = ((ctrl_inl(FRQCR) >> PFC_POS) & PFC_MSK);
46 clk->rate = clk->parent->rate / pfc_divisors[idx];
47}
48
49static struct clk_ops shx3_module_clk_ops = {
50 .recalc = module_clk_recalc,
51};
52
53static void bus_clk_recalc(struct clk *clk)
54{
55 int idx = ((ctrl_inl(FRQCR) >> BFC_POS) & BFC_MSK);
56 clk->rate = clk->parent->rate / bfc_divisors[idx];
57}
58
59static struct clk_ops shx3_bus_clk_ops = {
60 .recalc = bus_clk_recalc,
61};
62
63static void cpu_clk_recalc(struct clk *clk)
64{
65 int idx = ((ctrl_inl(FRQCR) >> IFC_POS) & IFC_MSK);
66 clk->rate = clk->parent->rate / ifc_divisors[idx];
67}
68
69static struct clk_ops shx3_cpu_clk_ops = {
70 .recalc = cpu_clk_recalc,
71};
72
73static struct clk_ops *shx3_clk_ops[] = {
74 &shx3_master_clk_ops,
75 &shx3_module_clk_ops,
76 &shx3_bus_clk_ops,
77 &shx3_cpu_clk_ops,
78};
79
80void __init arch_init_clk_ops(struct clk_ops **ops, int idx)
81{
82 if (idx < ARRAY_SIZE(shx3_clk_ops))
83 *ops = shx3_clk_ops[idx];
84}
85
86static void shyway_clk_recalc(struct clk *clk)
87{
88 int idx = ((ctrl_inl(FRQCR) >> CFC_POS) & CFC_MSK);
89 clk->rate = clk->parent->rate / cfc_divisors[idx];
90}
91
92static struct clk_ops shx3_shyway_clk_ops = {
93 .recalc = shyway_clk_recalc,
94};
95
96static struct clk shx3_shyway_clk = {
97 .name = "shyway_clk",
98 .flags = CLK_ALWAYS_ENABLED,
99 .ops = &shx3_shyway_clk_ops,
100};
101
102/*
103 * Additional SHx3-specific on-chip clocks that aren't already part of the
104 * clock framework
105 */
106static struct clk *shx3_onchip_clocks[] = {
107 &shx3_shyway_clk,
108};
109
110static int __init shx3_clk_init(void)
111{
112 struct clk *clk = clk_get(NULL, "master_clk");
113 int i;
114
115 for (i = 0; i < ARRAY_SIZE(shx3_onchip_clocks); i++) {
116 struct clk *clkp = shx3_onchip_clocks[i];
117
118 clkp->parent = clk;
119 clk_register(clkp);
120 clk_enable(clkp);
121 }
122
123 /*
124 * Now that we have the rest of the clocks registered, we need to
125 * force the parent clock to propagate so that these clocks will
126 * automatically figure out their rate. We cheat by handing the
127 * parent clock its current rate and forcing child propagation.
128 */
129 clk_set_rate(clk, clk_get_rate(clk));
130
131 clk_put(clk);
132
133 return 0;
134}
135arch_initcall(shx3_clk_init);
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index 1143fbf65faf..25b913e07e2c 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * SH7722 Setup 2 * SH7722 Setup
3 * 3 *
4 * Copyright (C) 2006 Paul Mundt 4 * Copyright (C) 2006 - 2007 Paul Mundt
5 * 5 *
6 * This file is subject to the terms and conditions of the GNU General Public 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 7 * License. See the file "COPYING" in the main directory of this archive
@@ -10,6 +10,8 @@
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <linux/mm.h>
14#include <asm/mmzone.h>
13#include <asm/sci.h> 15#include <asm/sci.h>
14 16
15static struct plat_sci_port sci_platform_data[] = { 17static struct plat_sci_port sci_platform_data[] = {
@@ -17,8 +19,21 @@ static struct plat_sci_port sci_platform_data[] = {
17 .mapbase = 0xffe00000, 19 .mapbase = 0xffe00000,
18 .flags = UPF_BOOT_AUTOCONF, 20 .flags = UPF_BOOT_AUTOCONF,
19 .type = PORT_SCIF, 21 .type = PORT_SCIF,
20 .irqs = { 80, 81, 83, 82 }, 22 .irqs = { 80, 80, 80, 80 },
21 }, { 23 },
24 {
25 .mapbase = 0xffe10000,
26 .flags = UPF_BOOT_AUTOCONF,
27 .type = PORT_SCIF,
28 .irqs = { 81, 81, 81, 81 },
29 },
30 {
31 .mapbase = 0xffe20000,
32 .flags = UPF_BOOT_AUTOCONF,
33 .type = PORT_SCIF,
34 .irqs = { 82, 82, 82, 82 },
35 },
36 {
22 .flags = 0, 37 .flags = 0,
23 } 38 }
24}; 39};
@@ -42,39 +57,149 @@ static int __init sh7722_devices_setup(void)
42} 57}
43__initcall(sh7722_devices_setup); 58__initcall(sh7722_devices_setup);
44 59
45static struct ipr_data sh7722_ipr_map[] = { 60enum {
46 /* IRQ, IPR-idx, shift, prio */ 61 UNUSED=0,
47 { 16, 0, 12, 2 }, /* TMU0 */ 62
48 { 17, 0, 8, 2 }, /* TMU1 */ 63 /* interrupt sources */
49 { 80, 6, 12, 3 }, /* SCIF ERI */ 64 IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7,
50 { 81, 6, 12, 3 }, /* SCIF RXI */ 65 HUDI,
51 { 82, 6, 12, 3 }, /* SCIF BRI */ 66 SIM_ERI, SIM_RXI, SIM_TXI, SIM_TEI,
52 { 83, 6, 12, 3 }, /* SCIF TXI */ 67 RTC_ATI, RTC_PRI, RTC_CUI,
68 DMAC0, DMAC1, DMAC2, DMAC3,
69 VIO_CEUI, VIO_BEUI, VIO_VEUI, VOU,
70 VPU, TPU,
71 USB_USBI0, USB_USBI1,
72 DMAC4, DMAC5, DMAC_DADERR,
73 KEYSC,
74 SCIF0, SCIF1, SCIF2, SIOF0, SIOF1, SIO,
75 FLCTL_FLSTEI, FLCTL_FLENDI, FLCTL_FLTREQ0I, FLCTL_FLTREQ1I,
76 I2C_ALI, I2C_TACKI, I2C_WAITI, I2C_DTEI,
77 SDHI0, SDHI1, SDHI2, SDHI3,
78 CMT, TSIF, SIU, TWODG,
79 TMU0, TMU1, TMU2,
80 IRDA, JPU, LCDC,
81
82 /* interrupt groups */
83
84 SIM, RTC, DMAC0123, VIOVOU, USB, DMAC45, FLCTL, I2C, SDHI,
85};
86
87static struct intc_vect vectors[] = {
88 INTC_VECT(IRQ0, 0x600), INTC_VECT(IRQ1, 0x620),
89 INTC_VECT(IRQ2, 0x640), INTC_VECT(IRQ3, 0x660),
90 INTC_VECT(IRQ4, 0x680), INTC_VECT(IRQ5, 0x6a0),
91 INTC_VECT(IRQ6, 0x6c0), INTC_VECT(IRQ7, 0x6e0),
92 INTC_VECT(SIM_ERI, 0x700), INTC_VECT(SIM_RXI, 0x720),
93 INTC_VECT(SIM_TXI, 0x740), INTC_VECT(SIM_TEI, 0x760),
94 INTC_VECT(RTC_ATI, 0x780), INTC_VECT(RTC_PRI, 0x7a0),
95 INTC_VECT(RTC_CUI, 0x7c0),
96 INTC_VECT(DMAC0, 0x800), INTC_VECT(DMAC1, 0x820),
97 INTC_VECT(DMAC2, 0x840), INTC_VECT(DMAC3, 0x860),
98 INTC_VECT(VIO_CEUI, 0x880), INTC_VECT(VIO_BEUI, 0x8a0),
99 INTC_VECT(VIO_VEUI, 0x8c0), INTC_VECT(VOU, 0x8e0),
100 INTC_VECT(VPU, 0x980), INTC_VECT(TPU, 0x9a0),
101 INTC_VECT(USB_USBI0, 0xa20), INTC_VECT(USB_USBI1, 0xa40),
102 INTC_VECT(DMAC4, 0xb80), INTC_VECT(DMAC5, 0xba0),
103 INTC_VECT(DMAC_DADERR, 0xbc0), INTC_VECT(KEYSC, 0xbe0),
104 INTC_VECT(SCIF0, 0xc00), INTC_VECT(SCIF1, 0xc20),
105 INTC_VECT(SCIF2, 0xc40), INTC_VECT(SIOF0, 0xc80),
106 INTC_VECT(SIOF1, 0xca0), INTC_VECT(SIO, 0xd00),
107 INTC_VECT(FLCTL_FLSTEI, 0xd80), INTC_VECT(FLCTL_FLENDI, 0xda0),
108 INTC_VECT(FLCTL_FLTREQ0I, 0xdc0), INTC_VECT(FLCTL_FLTREQ1I, 0xde0),
109 INTC_VECT(I2C_ALI, 0xe00), INTC_VECT(I2C_TACKI, 0xe20),
110 INTC_VECT(I2C_WAITI, 0xe40), INTC_VECT(I2C_DTEI, 0xe60),
111 INTC_VECT(SDHI0, 0xe80), INTC_VECT(SDHI1, 0xea0),
112 INTC_VECT(SDHI2, 0xec0), INTC_VECT(SDHI3, 0xee0),
113 INTC_VECT(CMT, 0xf00), INTC_VECT(TSIF, 0xf20),
114 INTC_VECT(SIU, 0xf80), INTC_VECT(TWODG, 0xfa0),
115 INTC_VECT(TMU0, 0x400), INTC_VECT(TMU1, 0x420),
116 INTC_VECT(TMU2, 0x440), INTC_VECT(IRDA, 0x480),
117 INTC_VECT(JPU, 0x560), INTC_VECT(LCDC, 0x580),
118};
119
120static struct intc_group groups[] = {
121 INTC_GROUP(SIM, SIM_ERI, SIM_RXI, SIM_TXI, SIM_TEI),
122 INTC_GROUP(RTC, RTC_ATI, RTC_PRI, RTC_CUI),
123 INTC_GROUP(DMAC0123, DMAC0, DMAC1, DMAC2, DMAC3),
124 INTC_GROUP(VIOVOU, VIO_CEUI, VIO_BEUI, VIO_VEUI, VOU),
125 INTC_GROUP(USB, USB_USBI0, USB_USBI1),
126 INTC_GROUP(DMAC45, DMAC4, DMAC5, DMAC_DADERR),
127 INTC_GROUP(FLCTL, FLCTL_FLSTEI, FLCTL_FLENDI,
128 FLCTL_FLTREQ0I, FLCTL_FLTREQ1I),
129 INTC_GROUP(I2C, I2C_ALI, I2C_TACKI, I2C_WAITI, I2C_DTEI),
130 INTC_GROUP(SDHI, SDHI0, SDHI1, SDHI2, SDHI3),
131};
132
133static struct intc_prio priorities[] = {
134 INTC_PRIO(SCIF0, 3),
135 INTC_PRIO(SCIF1, 3),
136 INTC_PRIO(SCIF2, 3),
137 INTC_PRIO(TMU0, 2),
138 INTC_PRIO(TMU1, 2),
139};
140
141static struct intc_mask_reg mask_registers[] = {
142 { 0xa4080080, 0xa40800c0, 8, /* IMR0 / IMCR0 */
143 { } },
144 { 0xa4080084, 0xa40800c4, 8, /* IMR1 / IMCR1 */
145 { VOU, VIO_VEUI, VIO_BEUI, VIO_CEUI, DMAC3, DMAC2, DMAC1, DMAC0 } },
146 { 0xa4080088, 0xa40800c8, 8, /* IMR2 / IMCR2 */
147 { 0, 0, 0, VPU, } },
148 { 0xa408008c, 0xa40800cc, 8, /* IMR3 / IMCR3 */
149 { SIM_TEI, SIM_TXI, SIM_RXI, SIM_ERI, 0, 0, 0, IRDA } },
150 { 0xa4080090, 0xa40800d0, 8, /* IMR4 / IMCR4 */
151 { 0, TMU2, TMU1, TMU0, JPU, 0, 0, LCDC } },
152 { 0xa4080094, 0xa40800d4, 8, /* IMR5 / IMCR5 */
153 { KEYSC, DMAC_DADERR, DMAC5, DMAC4, 0, SCIF2, SCIF1, SCIF0 } },
154 { 0xa4080098, 0xa40800d8, 8, /* IMR6 / IMCR6 */
155 { 0, 0, 0, SIO, 0, 0, SIOF1, SIOF0 } },
156 { 0xa408009c, 0xa40800dc, 8, /* IMR7 / IMCR7 */
157 { I2C_DTEI, I2C_WAITI, I2C_TACKI, I2C_ALI,
158 FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLENDI, FLCTL_FLSTEI } },
159 { 0xa40800a0, 0xa40800e0, 8, /* IMR8 / IMCR8 */
160 { SDHI3, SDHI2, SDHI1, SDHI0, 0, 0, TWODG, SIU } },
161 { 0xa40800a4, 0xa40800e4, 8, /* IMR9 / IMCR9 */
162 { 0, 0, 0, CMT, 0, USB_USBI1, USB_USBI0, } },
163 { 0xa40800a8, 0xa40800e8, 8, /* IMR10 / IMCR10 */
164 { } },
165 { 0xa40800ac, 0xa40800ec, 8, /* IMR11 / IMCR11 */
166 { 0, RTC_CUI, RTC_PRI, RTC_ATI, 0, TPU, 0, TSIF } },
167 { 0xa4140044, 0xa4140064, 8, /* INTMSK00 / INTMSKCLR00 */
168 { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
53}; 169};
54 170
55static unsigned long ipr_offsets[] = { 171static struct intc_prio_reg prio_registers[] = {
56 0xa4080000, /* 0: IPRA */ 172 { 0xa4080000, 16, 4, /* IPRA */ { TMU0, TMU1, TMU2, IRDA } },
57 0xa4080004, /* 1: IPRB */ 173 { 0xa4080004, 16, 4, /* IPRB */ { JPU, LCDC, SIM } },
58 0xa4080008, /* 2: IPRC */ 174 { 0xa4080008, 16, 4, /* IPRC */ { } },
59 0xa408000c, /* 3: IPRD */ 175 { 0xa408000c, 16, 4, /* IPRD */ { } },
60 0xa4080010, /* 4: IPRE */ 176 { 0xa4080010, 16, 4, /* IPRE */ { DMAC0123, VIOVOU, 0, VPU } },
61 0xa4080014, /* 5: IPRF */ 177 { 0xa4080014, 16, 4, /* IPRF */ { KEYSC, DMAC45, USB, CMT } },
62 0xa4080018, /* 6: IPRG */ 178 { 0xa4080018, 16, 4, /* IPRG */ { SCIF0, SCIF1, SCIF2 } },
63 0xa408001c, /* 7: IPRH */ 179 { 0xa408001c, 16, 4, /* IPRH */ { SIOF0, SIOF1, FLCTL, I2C } },
64 0xa4080020, /* 8: IPRI */ 180 { 0xa4080020, 16, 4, /* IPRI */ { SIO, 0, TSIF, RTC } },
65 0xa4080024, /* 9: IPRJ */ 181 { 0xa4080024, 16, 4, /* IPRJ */ { 0, 0, SIU } },
66 0xa4080028, /* 10: IPRK */ 182 { 0xa4080028, 16, 4, /* IPRK */ { 0, 0, 0, SDHI } },
67 0xa408002c, /* 11: IPRL */ 183 { 0xa408002c, 16, 4, /* IPRL */ { TWODG, 0, TPU } },
184 { 0xa4140010, 32, 4, /* INTPRI00 */
185 { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
68}; 186};
69 187
70unsigned int map_ipridx_to_addr(int idx) 188static struct intc_sense_reg sense_registers[] = {
189 { 0xa414001c, 16, 2, /* ICR1 */
190 { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
191};
192
193static DECLARE_INTC_DESC(intc_desc, "sh7722", vectors, groups, priorities,
194 mask_registers, prio_registers, sense_registers);
195
196void __init plat_irq_setup(void)
71{ 197{
72 if (unlikely(idx >= ARRAY_SIZE(ipr_offsets))) 198 register_intc_controller(&intc_desc);
73 return 0;
74 return ipr_offsets[idx];
75} 199}
76 200
77void __init init_IRQ_ipr(void) 201void __init plat_mem_setup(void)
78{ 202{
79 make_ipr_irq(sh7722_ipr_map, ARRAY_SIZE(sh7722_ipr_map)); 203 /* Register the URAM space as Node 1 */
204 setup_bootmem_node(1, 0x055f0000, 0x05610000);
80} 205}
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
index 9aeaa2ddaa28..a4127ec15203 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
@@ -30,7 +30,7 @@ static struct resource rtc_resources[] = {
30 }, 30 },
31 [3] = { 31 [3] = {
32 /* Alarm IRQ */ 32 /* Alarm IRQ */
33 .start = 23, 33 .start = 20,
34 .flags = IORESOURCE_IRQ, 34 .flags = IORESOURCE_IRQ,
35 }, 35 },
36}; 36};
@@ -78,31 +78,205 @@ static int __init sh7780_devices_setup(void)
78} 78}
79__initcall(sh7780_devices_setup); 79__initcall(sh7780_devices_setup);
80 80
81static struct intc2_data intc2_irq_table[] = { 81enum {
82 { 28, 0, 24, 0, 0, 2 }, /* TMU0 */ 82 UNUSED = 0,
83 83
84 { 21, 1, 0, 0, 2, 2 }, 84 /* interrupt sources */
85 { 22, 1, 1, 0, 2, 2 },
86 { 23, 1, 2, 0, 2, 2 },
87 85
88 { 40, 8, 24, 0, 3, 3 }, /* SCIF0 ERI */ 86 IRL_LLLL, IRL_LLLH, IRL_LLHL, IRL_LLHH,
89 { 41, 8, 24, 0, 3, 3 }, /* SCIF0 RXI */ 87 IRL_LHLL, IRL_LHLH, IRL_LHHL, IRL_LHHH,
90 { 42, 8, 24, 0, 3, 3 }, /* SCIF0 BRI */ 88 IRL_HLLL, IRL_HLLH, IRL_HLHL, IRL_HLHH,
91 { 43, 8, 24, 0, 3, 3 }, /* SCIF0 TXI */ 89 IRL_HHLL, IRL_HHLH, IRL_HHHL,
92 90
93 { 76, 8, 16, 0, 4, 3 }, /* SCIF1 ERI */ 91 IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7,
94 { 77, 8, 16, 0, 4, 3 }, /* SCIF1 RXI */ 92 RTC_ATI, RTC_PRI, RTC_CUI,
95 { 78, 8, 16, 0, 4, 3 }, /* SCIF1 BRI */ 93 WDT,
96 { 79, 8, 16, 0, 4, 3 }, /* SCIF1 TXI */ 94 TMU0, TMU1, TMU2, TMU2_TICPI,
95 HUDI,
96 DMAC0_DMINT0, DMAC0_DMINT1, DMAC0_DMINT2, DMAC0_DMINT3, DMAC0_DMAE,
97 SCIF0_ERI, SCIF0_RXI, SCIF0_BRI, SCIF0_TXI,
98 DMAC0_DMINT4, DMAC0_DMINT5, DMAC1_DMINT6, DMAC1_DMINT7,
99 CMT, HAC,
100 PCISERR, PCIINTA, PCIINTB, PCIINTC, PCIINTD,
101 PCIERR, PCIPWD3, PCIPWD2, PCIPWD1, PCIPWD0,
102 SCIF1_ERI, SCIF1_RXI, SCIF1_BRI, SCIF1_TXI,
103 SIOF, HSPI,
104 MMCIF_FSTAT, MMCIF_TRAN, MMCIF_ERR, MMCIF_FRDY,
105 DMAC1_DMINT8, DMAC1_DMINT9, DMAC1_DMINT10, DMAC1_DMINT11,
106 TMU3, TMU4, TMU5,
107 SSI,
108 FLCTL_FLSTE, FLCTL_FLEND, FLCTL_FLTRQ0, FLCTL_FLTRQ1,
109 GPIOI0, GPIOI1, GPIOI2, GPIOI3,
97 110
98 { 64, 0x10, 8, 0, 14, 2 }, /* PCIC0 */ 111 /* interrupt groups */
99 { 65, 0x10, 0, 0, 15, 2 }, /* PCIC1 */ 112
100 { 66, 0x14, 24, 0, 16, 2 }, /* PCIC2 */ 113 RTC, TMU012, DMAC0, SCIF0, DMAC45, DMAC1,
101 { 67, 0x14, 16, 0, 17, 2 }, /* PCIC3 */ 114 PCIC5, SCIF1, MMCIF, TMU345, FLCTL, GPIO,
102 { 68, 0x14, 8, 0, 18, 2 }, /* PCIC4 */ 115};
116
117static struct intc_vect vectors[] = {
118 INTC_VECT(RTC_ATI, 0x480), INTC_VECT(RTC_PRI, 0x4a0),
119 INTC_VECT(RTC_CUI, 0x4c0),
120 INTC_VECT(WDT, 0x560),
121 INTC_VECT(TMU0, 0x580), INTC_VECT(TMU1, 0x5a0),
122 INTC_VECT(TMU2, 0x5c0), INTC_VECT(TMU2_TICPI, 0x5e0),
123 INTC_VECT(HUDI, 0x600),
124 INTC_VECT(DMAC0_DMINT0, 0x640), INTC_VECT(DMAC0_DMINT1, 0x660),
125 INTC_VECT(DMAC0_DMINT2, 0x680), INTC_VECT(DMAC0_DMINT3, 0x6a0),
126 INTC_VECT(DMAC0_DMAE, 0x6c0),
127 INTC_VECT(SCIF0_ERI, 0x700), INTC_VECT(SCIF0_RXI, 0x720),
128 INTC_VECT(SCIF0_BRI, 0x740), INTC_VECT(SCIF0_TXI, 0x760),
129 INTC_VECT(DMAC0_DMINT4, 0x780), INTC_VECT(DMAC0_DMINT5, 0x7a0),
130 INTC_VECT(DMAC1_DMINT6, 0x7c0), INTC_VECT(DMAC1_DMINT7, 0x7e0),
131 INTC_VECT(CMT, 0x900), INTC_VECT(HAC, 0x980),
132 INTC_VECT(PCISERR, 0xa00), INTC_VECT(PCIINTA, 0xa20),
133 INTC_VECT(PCIINTB, 0xa40), INTC_VECT(PCIINTC, 0xa60),
134 INTC_VECT(PCIINTD, 0xa80), INTC_VECT(PCIERR, 0xaa0),
135 INTC_VECT(PCIPWD3, 0xac0), INTC_VECT(PCIPWD2, 0xae0),
136 INTC_VECT(PCIPWD1, 0xb00), INTC_VECT(PCIPWD0, 0xb20),
137 INTC_VECT(SCIF1_ERI, 0xb80), INTC_VECT(SCIF1_RXI, 0xba0),
138 INTC_VECT(SCIF1_BRI, 0xbc0), INTC_VECT(SCIF1_TXI, 0xbe0),
139 INTC_VECT(SIOF, 0xc00), INTC_VECT(HSPI, 0xc80),
140 INTC_VECT(MMCIF_FSTAT, 0xd00), INTC_VECT(MMCIF_TRAN, 0xd20),
141 INTC_VECT(MMCIF_ERR, 0xd40), INTC_VECT(MMCIF_FRDY, 0xd60),
142 INTC_VECT(DMAC1_DMINT8, 0xd80), INTC_VECT(DMAC1_DMINT9, 0xda0),
143 INTC_VECT(DMAC1_DMINT10, 0xdc0), INTC_VECT(DMAC1_DMINT11, 0xde0),
144 INTC_VECT(TMU3, 0xe00), INTC_VECT(TMU4, 0xe20),
145 INTC_VECT(TMU5, 0xe40),
146 INTC_VECT(SSI, 0xe80),
147 INTC_VECT(FLCTL_FLSTE, 0xf00), INTC_VECT(FLCTL_FLEND, 0xf20),
148 INTC_VECT(FLCTL_FLTRQ0, 0xf40), INTC_VECT(FLCTL_FLTRQ1, 0xf60),
149 INTC_VECT(GPIOI0, 0xf80), INTC_VECT(GPIOI1, 0xfa0),
150 INTC_VECT(GPIOI2, 0xfc0), INTC_VECT(GPIOI3, 0xfe0),
151};
152
153static struct intc_group groups[] = {
154 INTC_GROUP(RTC, RTC_ATI, RTC_PRI, RTC_CUI),
155 INTC_GROUP(TMU012, TMU0, TMU1, TMU2, TMU2_TICPI),
156 INTC_GROUP(DMAC0, DMAC0_DMINT0, DMAC0_DMINT1, DMAC0_DMINT2,
157 DMAC0_DMINT3, DMAC0_DMINT4, DMAC0_DMINT5, DMAC0_DMAE),
158 INTC_GROUP(SCIF0, SCIF0_ERI, SCIF0_RXI, SCIF0_BRI, SCIF0_TXI),
159 INTC_GROUP(DMAC1, DMAC1_DMINT6, DMAC1_DMINT7, DMAC1_DMINT8,
160 DMAC1_DMINT9, DMAC1_DMINT10, DMAC1_DMINT11),
161 INTC_GROUP(PCIC5, PCIERR, PCIPWD3, PCIPWD2, PCIPWD1, PCIPWD0),
162 INTC_GROUP(SCIF1, SCIF1_ERI, SCIF1_RXI, SCIF1_BRI, SCIF1_TXI),
163 INTC_GROUP(MMCIF, MMCIF_FSTAT, MMCIF_TRAN, MMCIF_ERR, MMCIF_FRDY),
164 INTC_GROUP(TMU345, TMU3, TMU4, TMU5),
165 INTC_GROUP(FLCTL, FLCTL_FLSTE, FLCTL_FLEND,
166 FLCTL_FLTRQ0, FLCTL_FLTRQ1),
167 INTC_GROUP(GPIO, GPIOI0, GPIOI1, GPIOI2, GPIOI3),
168};
169
170static struct intc_prio priorities[] = {
171 INTC_PRIO(SCIF0, 3),
172 INTC_PRIO(SCIF1, 3),
173};
174
175static struct intc_mask_reg mask_registers[] = {
176 { 0xffd40038, 0xffd4003c, 32, /* INT2MSKR / INT2MSKCR */
177 { 0, 0, 0, 0, 0, 0, GPIO, FLCTL,
178 SSI, MMCIF, HSPI, SIOF, PCIC5, PCIINTD, PCIINTC, PCIINTB,
179 PCIINTA, PCISERR, HAC, CMT, 0, 0, DMAC1, DMAC0,
180 HUDI, 0, WDT, SCIF1, SCIF0, RTC, TMU345, TMU012 } },
103}; 181};
104 182
105void __init init_IRQ_intc2(void) 183static struct intc_prio_reg prio_registers[] = {
184 { 0xffd40000, 32, 8, /* INT2PRI0 */ { TMU0, TMU1, TMU2, TMU2_TICPI } },
185 { 0xffd40004, 32, 8, /* INT2PRI1 */ { TMU3, TMU4, TMU5, RTC } },
186 { 0xffd40008, 32, 8, /* INT2PRI2 */ { SCIF0, SCIF1, WDT } },
187 { 0xffd4000c, 32, 8, /* INT2PRI3 */ { HUDI, DMAC0, DMAC1 } },
188 { 0xffd40010, 32, 8, /* INT2PRI4 */ { CMT, HAC, PCISERR, PCIINTA, } },
189 { 0xffd40014, 32, 8, /* INT2PRI5 */ { PCIINTB, PCIINTC,
190 PCIINTD, PCIC5 } },
191 { 0xffd40018, 32, 8, /* INT2PRI6 */ { SIOF, HSPI, MMCIF, SSI } },
192 { 0xffd4001c, 32, 8, /* INT2PRI7 */ { FLCTL, GPIO } },
193};
194
195static DECLARE_INTC_DESC(intc_desc, "sh7780", vectors, groups, priorities,
196 mask_registers, prio_registers, NULL);
197
198/* Support for external interrupt pins in IRQ mode */
199
200static struct intc_vect irq_vectors[] = {
201 INTC_VECT(IRQ0, 0x240), INTC_VECT(IRQ1, 0x280),
202 INTC_VECT(IRQ2, 0x2c0), INTC_VECT(IRQ3, 0x300),
203 INTC_VECT(IRQ4, 0x340), INTC_VECT(IRQ5, 0x380),
204 INTC_VECT(IRQ6, 0x3c0), INTC_VECT(IRQ7, 0x200),
205};
206
207static struct intc_mask_reg irq_mask_registers[] = {
208 { 0xffd00044, 0xffd00064, 32, /* INTMSK0 / INTMSKCLR0 */
209 { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
210};
211
212static struct intc_prio_reg irq_prio_registers[] = {
213 { 0xffd00010, 32, 4, /* INTPRI */ { IRQ0, IRQ1, IRQ2, IRQ3,
214 IRQ4, IRQ5, IRQ6, IRQ7 } },
215};
216
217static struct intc_sense_reg irq_sense_registers[] = {
218 { 0xffd0001c, 32, 2, /* ICR1 */ { IRQ0, IRQ1, IRQ2, IRQ3,
219 IRQ4, IRQ5, IRQ6, IRQ7 } },
220};
221
222static DECLARE_INTC_DESC(intc_irq_desc, "sh7780-irq", irq_vectors,
223 NULL, NULL, irq_mask_registers, irq_prio_registers,
224 irq_sense_registers);
225
226/* External interrupt pins in IRL mode */
227
228static struct intc_vect irl_vectors[] = {
229 INTC_VECT(IRL_LLLL, 0x200), INTC_VECT(IRL_LLLH, 0x220),
230 INTC_VECT(IRL_LLHL, 0x240), INTC_VECT(IRL_LLHH, 0x260),
231 INTC_VECT(IRL_LHLL, 0x280), INTC_VECT(IRL_LHLH, 0x2a0),
232 INTC_VECT(IRL_LHHL, 0x2c0), INTC_VECT(IRL_LHHH, 0x2e0),
233 INTC_VECT(IRL_HLLL, 0x300), INTC_VECT(IRL_HLLH, 0x320),
234 INTC_VECT(IRL_HLHL, 0x340), INTC_VECT(IRL_HLHH, 0x360),
235 INTC_VECT(IRL_HHLL, 0x380), INTC_VECT(IRL_HHLH, 0x3a0),
236 INTC_VECT(IRL_HHHL, 0x3c0),
237};
238
239static struct intc_mask_reg irl3210_mask_registers[] = {
240 { 0xffd00080, 0xffd00084, 32, /* INTMSK2 / INTMSKCLR2 */
241 { IRL_LLLL, IRL_LLLH, IRL_LLHL, IRL_LLHH,
242 IRL_LHLL, IRL_LHLH, IRL_LHHL, IRL_LHHH,
243 IRL_HLLL, IRL_HLLH, IRL_HLHL, IRL_HLHH,
244 IRL_HHLL, IRL_HHLH, IRL_HHHL, } },
245};
246
247static struct intc_mask_reg irl7654_mask_registers[] = {
248 { 0xffd00080, 0xffd00084, 32, /* INTMSK2 / INTMSKCLR2 */
249 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
250 IRL_LLLL, IRL_LLLH, IRL_LLHL, IRL_LLHH,
251 IRL_LHLL, IRL_LHLH, IRL_LHHL, IRL_LHHH,
252 IRL_HLLL, IRL_HLLH, IRL_HLHL, IRL_HLHH,
253 IRL_HHLL, IRL_HHLH, IRL_HHHL, } },
254};
255
256static DECLARE_INTC_DESC(intc_irl7654_desc, "sh7780-irl7654", irl_vectors,
257 NULL, NULL, irl7654_mask_registers, NULL, NULL);
258
259static DECLARE_INTC_DESC(intc_irl3210_desc, "sh7780-irl3210", irl_vectors,
260 NULL, NULL, irl3210_mask_registers, NULL, NULL);
261
262void __init plat_irq_setup(void)
106{ 263{
107 make_intc2_irq(intc2_irq_table, ARRAY_SIZE(intc2_irq_table)); 264 register_intc_controller(&intc_desc);
265}
266
267void __init plat_irq_setup_pins(int mode)
268{
269 switch (mode) {
270 case IRQ_MODE_IRQ:
271 register_intc_controller(&intc_irq_desc);
272 break;
273 case IRQ_MODE_IRL7654:
274 register_intc_controller(&intc_irl7654_desc);
275 break;
276 case IRQ_MODE_IRL3210:
277 register_intc_controller(&intc_irl3210_desc);
278 break;
279 default:
280 BUG();
281 }
108} 282}
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
index 07b0de82cfe6..cf047562e43f 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
@@ -97,7 +97,21 @@ static struct intc2_data intc2_irq_table[] = {
97 { 60, 12, 16, 0, 7, 3 }, /* SCIF5 ERI, RXI, BRI, TXI */ 97 { 60, 12, 16, 0, 7, 3 }, /* SCIF5 ERI, RXI, BRI, TXI */
98}; 98};
99 99
100void __init init_IRQ_intc2(void) 100static struct intc2_desc intc2_irq_desc __read_mostly = {
101 .prio_base = 0xffd40000,
102 .msk_base = 0xffd40038,
103 .mskclr_base = 0xffd4003c,
104
105 .intc2_data = intc2_irq_table,
106 .nr_irqs = ARRAY_SIZE(intc2_irq_table),
107
108 .chip = {
109 .name = "INTC2-sh7785",
110 },
111};
112
113void __init plat_irq_setup(void)
101{ 114{
102 make_intc2_irq(intc2_irq_table, ARRAY_SIZE(intc2_irq_table)); 115 register_intc2_controller(&intc2_irq_desc);
103} 116}
117
diff --git a/arch/sh/kernel/cpu/sh4a/setup-shx3.c b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
new file mode 100644
index 000000000000..704c064f70dc
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
@@ -0,0 +1,85 @@
1/*
2 * SH-X3 Setup
3 *
4 * Copyright (C) 2007 Paul Mundt
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#include <linux/platform_device.h>
11#include <linux/init.h>
12#include <linux/serial.h>
13#include <linux/io.h>
14#include <asm/sci.h>
15
16static struct plat_sci_port sci_platform_data[] = {
17 {
18 .mapbase = 0xffc30000,
19 .flags = UPF_BOOT_AUTOCONF,
20 .type = PORT_SCIF,
21 .irqs = { 40, 41, 43, 42 },
22 }, {
23 .mapbase = 0xffc40000,
24 .flags = UPF_BOOT_AUTOCONF,
25 .type = PORT_SCIF,
26 .irqs = { 44, 45, 47, 46 },
27 }, {
28 .mapbase = 0xffc50000,
29 .flags = UPF_BOOT_AUTOCONF,
30 .type = PORT_SCIF,
31 .irqs = { 48, 49, 51, 50 },
32 }, {
33 .mapbase = 0xffc60000,
34 .flags = UPF_BOOT_AUTOCONF,
35 .type = PORT_SCIF,
36 .irqs = { 52, 53, 55, 54 },
37 }, {
38 .flags = 0,
39 }
40};
41
42static struct platform_device sci_device = {
43 .name = "sh-sci",
44 .id = -1,
45 .dev = {
46 .platform_data = sci_platform_data,
47 },
48};
49
50static struct platform_device *shx3_devices[] __initdata = {
51 &sci_device,
52};
53
54static int __init shx3_devices_setup(void)
55{
56 return platform_add_devices(shx3_devices,
57 ARRAY_SIZE(shx3_devices));
58}
59__initcall(shx3_devices_setup);
60
61static struct intc2_data intc2_irq_table[] = {
62 { 16, 0, 0, 0, 1, 2 }, /* TMU0 */
63 { 40, 4, 0, 0x20, 0, 3 }, /* SCIF0 ERI */
64 { 41, 4, 0, 0x20, 1, 3 }, /* SCIF0 RXI */
65 { 42, 4, 0, 0x20, 2, 3 }, /* SCIF0 BRI */
66 { 43, 4, 0, 0x20, 3, 3 }, /* SCIF0 TXI */
67};
68
69static struct intc2_desc intc2_irq_desc __read_mostly = {
70 .prio_base = 0xfe410000,
71 .msk_base = 0xfe410820,
72 .mskclr_base = 0xfe410850,
73
74 .intc2_data = intc2_irq_table,
75 .nr_irqs = ARRAY_SIZE(intc2_irq_table),
76
77 .chip = {
78 .name = "INTC2-SHX3",
79 },
80};
81
82void __init plat_irq_setup(void)
83{
84 register_intc2_controller(&intc2_irq_desc);
85}
diff --git a/arch/sh/kernel/cpufreq.c b/arch/sh/kernel/cpufreq.c
index 47abf6e49dfb..e61890217c50 100644
--- a/arch/sh/kernel/cpufreq.c
+++ b/arch/sh/kernel/cpufreq.c
@@ -3,89 +3,46 @@
3 * 3 *
4 * cpufreq driver for the SuperH processors. 4 * cpufreq driver for the SuperH processors.
5 * 5 *
6 * Copyright (C) 2002, 2003, 2004, 2005 Paul Mundt 6 * Copyright (C) 2002 - 2007 Paul Mundt
7 * Copyright (C) 2002 M. R. Brown 7 * Copyright (C) 2002 M. R. Brown
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify it 9 * Clock framework bits from arch/avr32/mach-at32ap/cpufreq.c
10 * under the terms of the GNU General Public License as published by the 10 *
11 * Free Software Foundation; either version 2 of the License, or (at your 11 * Copyright (C) 2004-2007 Atmel Corporation
12 * option) any later version. 12 *
13 * This file is subject to the terms and conditions of the GNU General Public
14 * License. See the file "COPYING" in the main directory of this archive
15 * for more details.
13 */ 16 */
14#include <linux/types.h> 17#include <linux/types.h>
15#include <linux/cpufreq.h> 18#include <linux/cpufreq.h>
16#include <linux/kernel.h> 19#include <linux/kernel.h>
17#include <linux/module.h> 20#include <linux/module.h>
18#include <linux/slab.h>
19#include <linux/init.h> 21#include <linux/init.h>
20#include <linux/delay.h> 22#include <linux/err.h>
21#include <linux/cpumask.h> 23#include <linux/cpumask.h>
22#include <linux/smp.h> 24#include <linux/smp.h>
23#include <linux/sched.h> /* set_cpus_allowed() */ 25#include <linux/sched.h> /* set_cpus_allowed() */
26#include <linux/clk.h>
24 27
25#include <asm/processor.h> 28static struct clk *cpuclk;
26#include <asm/watchdog.h>
27#include <asm/freq.h>
28#include <asm/io.h>
29
30/*
31 * For SuperH, each policy change requires that we change the IFC, BFC, and
32 * PFC at the same time. Here we define sane values that won't trash the
33 * system.
34 *
35 * Note the max set is computed at runtime, we use the divisors that we booted
36 * with to setup our maximum operating frequencies.
37 */
38struct clock_set {
39 unsigned int ifc;
40 unsigned int bfc;
41 unsigned int pfc;
42} clock_sets[] = {
43#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH2)
44 { 0, 0, 0 }, /* not implemented yet */
45#elif defined(CONFIG_CPU_SH4)
46 { 4, 8, 8 }, /* min - IFC: 1/4, BFC: 1/8, PFC: 1/8 */
47 { 1, 2, 2 }, /* max - IFC: 1, BFC: 1/2, PFC: 1/2 */
48#endif
49};
50
51#define MIN_CLOCK_SET 0
52#define MAX_CLOCK_SET (ARRAY_SIZE(clock_sets) - 1)
53
54/*
55 * For the time being, we only support two frequencies, which in turn are
56 * aimed at the POWERSAVE and PERFORMANCE policies, which in turn are derived
57 * directly from the respective min/max clock sets. Technically we could
58 * support a wider range of frequencies, but these vary far too much for each
59 * CPU subtype (and we'd have to construct a frequency table for each subtype).
60 *
61 * Maybe something to implement in the future..
62 */
63#define SH_FREQ_MAX 0
64#define SH_FREQ_MIN 1
65
66static struct cpufreq_frequency_table sh_freqs[] = {
67 { SH_FREQ_MAX, 0 },
68 { SH_FREQ_MIN, 0 },
69 { 0, CPUFREQ_TABLE_END },
70};
71 29
72static void sh_cpufreq_update_clocks(unsigned int set) 30static unsigned int sh_cpufreq_get(unsigned int cpu)
73{ 31{
74 current_cpu_data.cpu_clock = current_cpu_data.master_clock / clock_sets[set].ifc; 32 return (clk_get_rate(cpuclk) + 500) / 1000;
75 current_cpu_data.bus_clock = current_cpu_data.master_clock / clock_sets[set].bfc;
76 current_cpu_data.module_clock = current_cpu_data.master_clock / clock_sets[set].pfc;
77 current_cpu_data.loops_per_jiffy = loops_per_jiffy;
78} 33}
79 34
80/* XXX: This needs to be split out per CPU and CPU subtype. */
81/* 35/*
82 * Here we notify other drivers of the proposed change and the final change. 36 * Here we notify other drivers of the proposed change and the final change.
83 */ 37 */
84static int sh_cpufreq_setstate(unsigned int cpu, unsigned int set) 38static int sh_cpufreq_target(struct cpufreq_policy *policy,
39 unsigned int target_freq,
40 unsigned int relation)
85{ 41{
86 unsigned short frqcr = ctrl_inw(FRQCR); 42 unsigned int cpu = policy->cpu;
87 cpumask_t cpus_allowed; 43 cpumask_t cpus_allowed;
88 struct cpufreq_freqs freqs; 44 struct cpufreq_freqs freqs;
45 long freq;
89 46
90 if (!cpu_online(cpu)) 47 if (!cpu_online(cpu))
91 return -ENODEV; 48 return -ENODEV;
@@ -95,125 +52,109 @@ static int sh_cpufreq_setstate(unsigned int cpu, unsigned int set)
95 52
96 BUG_ON(smp_processor_id() != cpu); 53 BUG_ON(smp_processor_id() != cpu);
97 54
98 freqs.cpu = cpu; 55 /* Convert target_freq from kHz to Hz */
99 freqs.old = current_cpu_data.cpu_clock / 1000; 56 freq = clk_round_rate(cpuclk, target_freq * 1000);
100 freqs.new = (current_cpu_data.master_clock / clock_sets[set].ifc) / 1000;
101 57
102 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 58 if (freq < (policy->min * 1000) || freq > (policy->max * 1000))
103#if defined(CONFIG_CPU_SH3) 59 return -EINVAL;
104 frqcr |= (newstate & 0x4000) << 14; 60
105 frqcr |= (newstate & 0x000c) << 2; 61 pr_debug("cpufreq: requested frequency %u Hz\n", target_freq * 1000);
106#elif defined(CONFIG_CPU_SH4)
107 /*
108 * FRQCR.PLL2EN is 1, we need to allow the PLL to stabilize by
109 * initializing the WDT.
110 */
111 if (frqcr & (1 << 9)) {
112 __u8 csr;
113
114 /*
115 * Set the overflow period to the highest available,
116 * in this case a 1/4096 division ratio yields a 5.25ms
117 * overflow period. See asm-sh/watchdog.h for more
118 * information and a range of other divisors.
119 */
120 csr = sh_wdt_read_csr();
121 csr |= WTCSR_CKS_4096;
122 sh_wdt_write_csr(csr);
123
124 sh_wdt_write_cnt(0);
125 }
126 frqcr &= 0x0e00; /* Clear ifc, bfc, pfc */
127 frqcr |= get_ifc_value(clock_sets[set].ifc) << 6;
128 frqcr |= get_bfc_value(clock_sets[set].bfc) << 3;
129 frqcr |= get_pfc_value(clock_sets[set].pfc);
130#endif
131 ctrl_outw(frqcr, FRQCR);
132 sh_cpufreq_update_clocks(set);
133 62
63 freqs.cpu = cpu;
64 freqs.old = sh_cpufreq_get(cpu);
65 freqs.new = (freq + 500) / 1000;
66 freqs.flags = 0;
67
68 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
134 set_cpus_allowed(current, cpus_allowed); 69 set_cpus_allowed(current, cpus_allowed);
70 clk_set_rate(cpuclk, freq);
135 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 71 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
136 72
73 pr_debug("cpufreq: set frequency %lu Hz\n", freq);
74
137 return 0; 75 return 0;
138} 76}
139 77
140static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy) 78static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy)
141{ 79{
142 unsigned int min_freq, max_freq; 80 printk(KERN_INFO "cpufreq: SuperH CPU frequency driver.\n");
143 unsigned int ifc, bfc, pfc;
144 81
145 if (!cpu_online(policy->cpu)) 82 if (!cpu_online(policy->cpu))
146 return -ENODEV; 83 return -ENODEV;
147 84
148 /* Update our maximum clock set */ 85 cpuclk = clk_get(NULL, "cpu_clk");
149 get_current_frequency_divisors(&ifc, &bfc, &pfc); 86 if (IS_ERR(cpuclk)) {
150 clock_sets[MAX_CLOCK_SET].ifc = ifc; 87 printk(KERN_ERR "cpufreq: couldn't get CPU clk\n");
151 clock_sets[MAX_CLOCK_SET].bfc = bfc; 88 return PTR_ERR(cpuclk);
152 clock_sets[MAX_CLOCK_SET].pfc = pfc; 89 }
153
154 /* Convert from Hz to kHz */
155 max_freq = current_cpu_data.cpu_clock / 1000;
156 min_freq = (current_cpu_data.master_clock / clock_sets[MIN_CLOCK_SET].ifc) / 1000;
157
158 sh_freqs[SH_FREQ_MAX].frequency = max_freq;
159 sh_freqs[SH_FREQ_MIN].frequency = min_freq;
160 90
161 /* cpuinfo and default policy values */ 91 /* cpuinfo and default policy values */
162 policy->governor = CPUFREQ_DEFAULT_GOVERNOR; 92 policy->cpuinfo.min_freq = (clk_round_rate(cpuclk, 1) + 500) / 1000;
93 policy->cpuinfo.max_freq = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000;
163 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; 94 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
164 policy->cur = max_freq;
165 95
166 return cpufreq_frequency_table_cpuinfo(policy, &sh_freqs[0]); 96 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
167} 97 policy->cur = sh_cpufreq_get(policy->cpu);
98 policy->min = policy->cpuinfo.min_freq;
99 policy->max = policy->cpuinfo.max_freq;
168 100
169static int sh_cpufreq_verify(struct cpufreq_policy *policy)
170{
171 return cpufreq_frequency_table_verify(policy, &sh_freqs[0]);
172}
173 101
174static int sh_cpufreq_target(struct cpufreq_policy *policy, 102 /*
175 unsigned int target_freq, 103 * Catch the cases where the clock framework hasn't been wired up
176 unsigned int relation) 104 * properly to support scaling.
177{ 105 */
178 unsigned int set, idx = 0; 106 if (unlikely(policy->min == policy->max)) {
107 printk(KERN_ERR "cpufreq: clock framework rate rounding "
108 "not supported on this CPU.\n");
179 109
180 if (cpufreq_frequency_table_target(policy, &sh_freqs[0], target_freq, relation, &idx)) 110 clk_put(cpuclk);
181 return -EINVAL; 111 return -EINVAL;
112 }
182 113
183 set = (idx == SH_FREQ_MIN) ? MIN_CLOCK_SET : MAX_CLOCK_SET; 114 printk(KERN_INFO "cpufreq: Frequencies - Minimum %u.%03u MHz, "
115 "Maximum %u.%03u MHz.\n",
116 policy->min / 1000, policy->min % 1000,
117 policy->max / 1000, policy->max % 1000);
184 118
185 sh_cpufreq_setstate(policy->cpu, set); 119 return 0;
120}
186 121
122static int sh_cpufreq_verify(struct cpufreq_policy *policy)
123{
124 cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
125 policy->cpuinfo.max_freq);
126 return 0;
127}
128
129static int sh_cpufreq_exit(struct cpufreq_policy *policy)
130{
131 clk_put(cpuclk);
187 return 0; 132 return 0;
188} 133}
189 134
190static struct cpufreq_driver sh_cpufreq_driver = { 135static struct cpufreq_driver sh_cpufreq_driver = {
191 .owner = THIS_MODULE, 136 .owner = THIS_MODULE,
192 .name = "SH cpufreq", 137 .name = "sh",
193 .init = sh_cpufreq_cpu_init, 138 .init = sh_cpufreq_cpu_init,
194 .verify = sh_cpufreq_verify, 139 .verify = sh_cpufreq_verify,
195 .target = sh_cpufreq_target, 140 .target = sh_cpufreq_target,
141 .get = sh_cpufreq_get,
142 .exit = sh_cpufreq_exit,
196}; 143};
197 144
198static int __init sh_cpufreq_init(void) 145static int __init sh_cpufreq_module_init(void)
199{ 146{
200 if (!current_cpu_data.cpu_clock) 147 return cpufreq_register_driver(&sh_cpufreq_driver);
201 return -EINVAL;
202 if (cpufreq_register_driver(&sh_cpufreq_driver))
203 return -EINVAL;
204
205 return 0;
206} 148}
207 149
208static void __exit sh_cpufreq_exit(void) 150static void __exit sh_cpufreq_module_exit(void)
209{ 151{
210 cpufreq_unregister_driver(&sh_cpufreq_driver); 152 cpufreq_unregister_driver(&sh_cpufreq_driver);
211} 153}
212 154
213module_init(sh_cpufreq_init); 155module_init(sh_cpufreq_module_init);
214module_exit(sh_cpufreq_exit); 156module_exit(sh_cpufreq_module_exit);
215 157
216MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>"); 158MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>");
217MODULE_DESCRIPTION("cpufreq driver for SuperH"); 159MODULE_DESCRIPTION("cpufreq driver for SuperH");
218MODULE_LICENSE("GPL"); 160MODULE_LICENSE("GPL");
219
diff --git a/arch/sh/kernel/head.S b/arch/sh/kernel/head.S
index 71a3ad7d283e..0bccc0ca5a0f 100644
--- a/arch/sh/kernel/head.S
+++ b/arch/sh/kernel/head.S
@@ -36,7 +36,8 @@ ENTRY(empty_zero_page)
361: 361:
37 .skip PAGE_SIZE - empty_zero_page - 1b 37 .skip PAGE_SIZE - empty_zero_page - 1b
38 38
39 .text 39 .section .text.head, "ax"
40
40/* 41/*
41 * Condition at the entry of _stext: 42 * Condition at the entry of _stext:
42 * 43 *
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
index 27b923c45b3d..03404987528d 100644
--- a/arch/sh/kernel/irq.c
+++ b/arch/sh/kernel/irq.c
@@ -158,15 +158,11 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
158} 158}
159 159
160#ifdef CONFIG_4KSTACKS 160#ifdef CONFIG_4KSTACKS
161/*
162 * These should really be __section__(".bss.page_aligned") as well, but
163 * gcc's 3.0 and earlier don't handle that correctly.
164 */
165static char softirq_stack[NR_CPUS * THREAD_SIZE] 161static char softirq_stack[NR_CPUS * THREAD_SIZE]
166 __attribute__((__aligned__(THREAD_SIZE))); 162 __attribute__((__section__(".bss.page_aligned")));
167 163
168static char hardirq_stack[NR_CPUS * THREAD_SIZE] 164static char hardirq_stack[NR_CPUS * THREAD_SIZE]
169 __attribute__((__aligned__(THREAD_SIZE))); 165 __attribute__((__section__(".bss.page_aligned")));
170 166
171/* 167/*
172 * allocate per-cpu stacks for hardirq and for softirq processing 168 * allocate per-cpu stacks for hardirq and for softirq processing
@@ -257,14 +253,7 @@ void __init init_IRQ(void)
257#ifdef CONFIG_CPU_HAS_PINT_IRQ 253#ifdef CONFIG_CPU_HAS_PINT_IRQ
258 init_IRQ_pint(); 254 init_IRQ_pint();
259#endif 255#endif
260 256 plat_irq_setup();
261#ifdef CONFIG_CPU_HAS_INTC2_IRQ
262 init_IRQ_intc2();
263#endif
264
265#ifdef CONFIG_CPU_HAS_IPR_IRQ
266 init_IRQ_ipr();
267#endif
268 257
269 /* Perform the machine specific initialisation */ 258 /* Perform the machine specific initialisation */
270 if (sh_mv.mv_init_irq) 259 if (sh_mv.mv_init_irq)
diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c
new file mode 100644
index 000000000000..23c5948f0124
--- /dev/null
+++ b/arch/sh/kernel/machvec.c
@@ -0,0 +1,130 @@
1/*
2 * arch/sh/kernel/machvec.c
3 *
4 * The SuperH machine vector setup handlers, yanked from setup.c
5 *
6 * Copyright (C) 1999 Niibe Yutaka
7 * Copyright (C) 2002 - 2007 Paul Mundt
8 *
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file "COPYING" in the main directory of this archive
11 * for more details.
12 */
13#include <linux/init.h>
14#include <linux/string.h>
15#include <asm/machvec.h>
16#include <asm/sections.h>
17#include <asm/io.h>
18#include <asm/irq.h>
19
20#define MV_NAME_SIZE 32
21
22#define for_each_mv(mv) \
23 for ((mv) = (struct sh_machine_vector *)&__machvec_start; \
24 (mv) && (unsigned long)(mv) < (unsigned long)&__machvec_end; \
25 (mv)++)
26
27static struct sh_machine_vector * __init get_mv_byname(const char *name)
28{
29 struct sh_machine_vector *mv;
30
31 for_each_mv(mv)
32 if (strcasecmp(name, mv->mv_name) == 0)
33 return mv;
34
35 return NULL;
36}
37
38static unsigned int __initdata machvec_selected;
39
40static int __init early_parse_mv(char *from)
41{
42 char mv_name[MV_NAME_SIZE] = "";
43 char *mv_end;
44 char *mv_comma;
45 int mv_len;
46 struct sh_machine_vector *mvp;
47
48 mv_end = strchr(from, ' ');
49 if (mv_end == NULL)
50 mv_end = from + strlen(from);
51
52 mv_comma = strchr(from, ',');
53 mv_len = mv_end - from;
54 if (mv_len > (MV_NAME_SIZE-1))
55 mv_len = MV_NAME_SIZE-1;
56 memcpy(mv_name, from, mv_len);
57 mv_name[mv_len] = '\0';
58 from = mv_end;
59
60 machvec_selected = 1;
61
62 /* Boot with the generic vector */
63 if (strcmp(mv_name, "generic") == 0)
64 return 0;
65
66 mvp = get_mv_byname(mv_name);
67 if (unlikely(!mvp)) {
68 printk("Available vectors:\n\n\t'%s', ", sh_mv.mv_name);
69 for_each_mv(mvp)
70 printk("'%s', ", mvp->mv_name);
71 printk("\n\n");
72 panic("Failed to select machvec '%s' -- halting.\n",
73 mv_name);
74 } else
75 sh_mv = *mvp;
76
77 return 0;
78}
79early_param("sh_mv", early_parse_mv);
80
81void __init sh_mv_setup(void)
82{
83 /*
84 * Only overload the machvec if one hasn't been selected on
85 * the command line with sh_mv=
86 */
87 if (!machvec_selected) {
88 unsigned long machvec_size;
89
90 machvec_size = ((unsigned long)&__machvec_end -
91 (unsigned long)&__machvec_start);
92
93 /*
94 * If the machvec hasn't been preselected, use the first
95 * vector (usually the only one) from .machvec.init.
96 */
97 if (machvec_size >= sizeof(struct sh_machine_vector))
98 sh_mv = *(struct sh_machine_vector *)&__machvec_start;
99 }
100
101 printk(KERN_NOTICE "Booting machvec: %s\n", get_system_type());
102
103 /*
104 * Manually walk the vec, fill in anything that the board hasn't yet
105 * by hand, wrapping to the generic implementation.
106 */
107#define mv_set(elem) do { \
108 if (!sh_mv.mv_##elem) \
109 sh_mv.mv_##elem = generic_##elem; \
110} while (0)
111
112 mv_set(inb); mv_set(inw); mv_set(inl);
113 mv_set(outb); mv_set(outw); mv_set(outl);
114
115 mv_set(inb_p); mv_set(inw_p); mv_set(inl_p);
116 mv_set(outb_p); mv_set(outw_p); mv_set(outl_p);
117
118 mv_set(insb); mv_set(insw); mv_set(insl);
119 mv_set(outsb); mv_set(outsw); mv_set(outsl);
120
121 mv_set(readb); mv_set(readw); mv_set(readl);
122 mv_set(writeb); mv_set(writew); mv_set(writel);
123
124 mv_set(ioport_map);
125 mv_set(ioport_unmap);
126 mv_set(irq_demux);
127
128 if (!sh_mv.mv_nr_irqs)
129 sh_mv.mv_nr_irqs = NR_IRQS;
130}
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index a11e2aa73cbc..6334a4c54c7c 100644
--- a/arch/sh/kernel/process.c
+++ b/arch/sh/kernel/process.c
@@ -17,6 +17,7 @@
17#include <linux/kexec.h> 17#include <linux/kexec.h>
18#include <linux/kdebug.h> 18#include <linux/kdebug.h>
19#include <linux/tick.h> 19#include <linux/tick.h>
20#include <linux/reboot.h>
20#include <asm/uaccess.h> 21#include <asm/uaccess.h>
21#include <asm/mmu_context.h> 22#include <asm/mmu_context.h>
22#include <asm/pgalloc.h> 23#include <asm/pgalloc.h>
@@ -319,9 +320,7 @@ static void ubc_set_tracing(int asid, unsigned long pc)
319 ctrl_outl(pc, UBC_BARA); 320 ctrl_outl(pc, UBC_BARA);
320 321
321#ifdef CONFIG_MMU 322#ifdef CONFIG_MMU
322 /* We don't have any ASID settings for the SH-2! */ 323 ctrl_outb(asid, UBC_BASRA);
323 if (current_cpu_data.type != CPU_SH7604)
324 ctrl_outb(asid, UBC_BASRA);
325#endif 324#endif
326 325
327 ctrl_outl(0, UBC_BAMRA); 326 ctrl_outl(0, UBC_BAMRA);
@@ -405,8 +404,8 @@ asmlinkage int sys_fork(unsigned long r4, unsigned long r5,
405 unsigned long r6, unsigned long r7, 404 unsigned long r6, unsigned long r7,
406 struct pt_regs __regs) 405 struct pt_regs __regs)
407{ 406{
408 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
409#ifdef CONFIG_MMU 407#ifdef CONFIG_MMU
408 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
410 return do_fork(SIGCHLD, regs->regs[15], regs, 0, NULL, NULL); 409 return do_fork(SIGCHLD, regs->regs[15], regs, 0, NULL, NULL);
411#else 410#else
412 /* fork almost works, enough to trick you into looking elsewhere :-( */ 411 /* fork almost works, enough to trick you into looking elsewhere :-( */
@@ -449,23 +448,20 @@ asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
449/* 448/*
450 * sys_execve() executes a new program. 449 * sys_execve() executes a new program.
451 */ 450 */
452asmlinkage int sys_execve(char *ufilename, char **uargv, 451asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv,
453 char **uenvp, unsigned long r7, 452 char __user * __user *uenvp, unsigned long r7,
454 struct pt_regs __regs) 453 struct pt_regs __regs)
455{ 454{
456 struct pt_regs *regs = RELOC_HIDE(&__regs, 0); 455 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
457 int error; 456 int error;
458 char *filename; 457 char *filename;
459 458
460 filename = getname((char __user *)ufilename); 459 filename = getname(ufilename);
461 error = PTR_ERR(filename); 460 error = PTR_ERR(filename);
462 if (IS_ERR(filename)) 461 if (IS_ERR(filename))
463 goto out; 462 goto out;
464 463
465 error = do_execve(filename, 464 error = do_execve(filename, uargv, uenvp, regs);
466 (char __user * __user *)uargv,
467 (char __user * __user *)uenvp,
468 regs);
469 if (error == 0) { 465 if (error == 0) {
470 task_lock(current); 466 task_lock(current);
471 current->ptrace &= ~PT_DTRACE; 467 current->ptrace &= ~PT_DTRACE;
diff --git a/arch/sh/kernel/ptrace.c b/arch/sh/kernel/ptrace.c
index 3fb5fc0b550d..891d1d46c902 100644
--- a/arch/sh/kernel/ptrace.c
+++ b/arch/sh/kernel/ptrace.c
@@ -91,17 +91,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
91 switch (request) { 91 switch (request) {
92 /* when I and D space are separate, these will need to be fixed. */ 92 /* when I and D space are separate, these will need to be fixed. */
93 case PTRACE_PEEKTEXT: /* read word at location addr. */ 93 case PTRACE_PEEKTEXT: /* read word at location addr. */
94 case PTRACE_PEEKDATA: { 94 case PTRACE_PEEKDATA:
95 unsigned long tmp; 95 ret = generic_ptrace_peekdata(child, addr, data);
96 int copied;
97
98 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
99 ret = -EIO;
100 if (copied != sizeof(tmp))
101 break;
102 ret = put_user(tmp,(unsigned long *) data);
103 break;
104 }
105 96
106 /* read the word at location addr in the USER area. */ 97 /* read the word at location addr in the USER area. */
107 case PTRACE_PEEKUSR: { 98 case PTRACE_PEEKUSR: {
@@ -128,17 +119,14 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
128 tmp = !!tsk_used_math(child); 119 tmp = !!tsk_used_math(child);
129 else 120 else
130 tmp = 0; 121 tmp = 0;
131 ret = put_user(tmp, (unsigned long *)data); 122 ret = put_user(tmp, (unsigned long __user *)data);
132 break; 123 break;
133 } 124 }
134 125
135 /* when I and D space are separate, this will have to be fixed. */ 126 /* when I and D space are separate, this will have to be fixed. */
136 case PTRACE_POKETEXT: /* write the word at location addr. */ 127 case PTRACE_POKETEXT: /* write the word at location addr. */
137 case PTRACE_POKEDATA: 128 case PTRACE_POKEDATA:
138 ret = 0; 129 ret = generic_ptrace_pokedata(child, addr, data);
139 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
140 break;
141 ret = -EIO;
142 break; 130 break;
143 131
144 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 132 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
@@ -196,7 +184,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
196 184
197 case PTRACE_SINGLESTEP: { /* set the trap flag. */ 185 case PTRACE_SINGLESTEP: { /* set the trap flag. */
198 long pc; 186 long pc;
199 struct pt_regs *dummy = NULL; 187 struct pt_regs *regs = NULL;
200 188
201 ret = -EIO; 189 ret = -EIO;
202 if (!valid_signal(data)) 190 if (!valid_signal(data))
@@ -207,7 +195,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
207 child->ptrace |= PT_DTRACE; 195 child->ptrace |= PT_DTRACE;
208 } 196 }
209 197
210 pc = get_stack_long(child, (long)&dummy->pc); 198 pc = get_stack_long(child, (long)&regs->pc);
211 199
212 /* Next scheduling will set up UBC */ 200 /* Next scheduling will set up UBC */
213 if (child->thread.ubc_pc == 0) 201 if (child->thread.ubc_pc == 0)
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index c27729135935..c14a3e95d0b1 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -21,8 +21,10 @@
21#include <linux/fs.h> 21#include <linux/fs.h>
22#include <linux/mm.h> 22#include <linux/mm.h>
23#include <linux/kexec.h> 23#include <linux/kexec.h>
24#include <linux/module.h>
24#include <asm/uaccess.h> 25#include <asm/uaccess.h>
25#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/page.h>
26#include <asm/sections.h> 28#include <asm/sections.h>
27#include <asm/irq.h> 29#include <asm/irq.h>
28#include <asm/setup.h> 30#include <asm/setup.h>
@@ -41,20 +43,19 @@ extern void * __rd_start, * __rd_end;
41 * The bigger value means no problem. 43 * The bigger value means no problem.
42 */ 44 */
43struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, }; 45struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, };
46
47/*
48 * The machine vector. First entry in .machvec.init, or clobbered by
49 * sh_mv= on the command line, prior to .machvec.init teardown.
50 */
51struct sh_machine_vector sh_mv = { .mv_name = "generic", };
52
44#ifdef CONFIG_VT 53#ifdef CONFIG_VT
45struct screen_info screen_info; 54struct screen_info screen_info;
46#endif 55#endif
47 56
48#if defined(CONFIG_SH_UNKNOWN)
49struct sh_machine_vector sh_mv;
50#endif
51
52extern int root_mountflags; 57extern int root_mountflags;
53 58
54#define MV_NAME_SIZE 32
55
56static struct sh_machine_vector* __init get_mv_byname(const char* name);
57
58/* 59/*
59 * This is set up by the setup-routine at boot-time 60 * This is set up by the setup-routine at boot-time
60 */ 61 */
@@ -78,133 +79,23 @@ static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
78static struct resource code_resource = { .name = "Kernel code", }; 79static struct resource code_resource = { .name = "Kernel code", };
79static struct resource data_resource = { .name = "Kernel data", }; 80static struct resource data_resource = { .name = "Kernel data", };
80 81
81unsigned long memory_start, memory_end; 82unsigned long memory_start;
83EXPORT_SYMBOL(memory_start);
82 84
83static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], 85unsigned long memory_end;
84 struct sh_machine_vector** mvp, 86EXPORT_SYMBOL(memory_end);
85 unsigned long *mv_io_base)
86{
87 char c = ' ', *to = command_line, *from = COMMAND_LINE;
88 int len = 0;
89 87
90 /* Save unparsed command line copy for /proc/cmdline */ 88static int __init early_parse_mem(char *p)
91 memcpy(boot_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
92 boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
93
94 memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
95 memory_end = memory_start + __MEMORY_SIZE;
96
97 for (;;) {
98 /*
99 * "mem=XXX[kKmM]" defines a size of memory.
100 */
101 if (c == ' ' && !memcmp(from, "mem=", 4)) {
102 if (to != command_line)
103 to--;
104 {
105 unsigned long mem_size;
106
107 mem_size = memparse(from+4, &from);
108 memory_end = memory_start + mem_size;
109 }
110 }
111
112 if (c == ' ' && !memcmp(from, "sh_mv=", 6)) {
113 char* mv_end;
114 char* mv_comma;
115 int mv_len;
116 if (to != command_line)
117 to--;
118 from += 6;
119 mv_end = strchr(from, ' ');
120 if (mv_end == NULL)
121 mv_end = from + strlen(from);
122
123 mv_comma = strchr(from, ',');
124 if ((mv_comma != NULL) && (mv_comma < mv_end)) {
125 int ints[3];
126 get_options(mv_comma+1, ARRAY_SIZE(ints), ints);
127 *mv_io_base = ints[1];
128 mv_len = mv_comma - from;
129 } else {
130 mv_len = mv_end - from;
131 }
132 if (mv_len > (MV_NAME_SIZE-1))
133 mv_len = MV_NAME_SIZE-1;
134 memcpy(mv_name, from, mv_len);
135 mv_name[mv_len] = '\0';
136 from = mv_end;
137
138 *mvp = get_mv_byname(mv_name);
139 }
140
141 c = *(from++);
142 if (!c)
143 break;
144 if (COMMAND_LINE_SIZE <= ++len)
145 break;
146 *(to++) = c;
147 }
148 *to = '\0';
149 *cmdline_p = command_line;
150}
151
152static int __init sh_mv_setup(char **cmdline_p)
153{ 89{
154#ifdef CONFIG_SH_UNKNOWN 90 unsigned long size;
155 extern struct sh_machine_vector mv_unknown;
156#endif
157 struct sh_machine_vector *mv = NULL;
158 char mv_name[MV_NAME_SIZE] = "";
159 unsigned long mv_io_base = 0;
160
161 parse_cmdline(cmdline_p, mv_name, &mv, &mv_io_base);
162
163#ifdef CONFIG_SH_UNKNOWN
164 if (mv == NULL) {
165 mv = &mv_unknown;
166 if (*mv_name != '\0') {
167 printk("Warning: Unsupported machine %s, using unknown\n",
168 mv_name);
169 }
170 }
171 sh_mv = *mv;
172#endif
173
174 /*
175 * Manually walk the vec, fill in anything that the board hasn't yet
176 * by hand, wrapping to the generic implementation.
177 */
178#define mv_set(elem) do { \
179 if (!sh_mv.mv_##elem) \
180 sh_mv.mv_##elem = generic_##elem; \
181} while (0)
182
183 mv_set(inb); mv_set(inw); mv_set(inl);
184 mv_set(outb); mv_set(outw); mv_set(outl);
185
186 mv_set(inb_p); mv_set(inw_p); mv_set(inl_p);
187 mv_set(outb_p); mv_set(outw_p); mv_set(outl_p);
188
189 mv_set(insb); mv_set(insw); mv_set(insl);
190 mv_set(outsb); mv_set(outsw); mv_set(outsl);
191
192 mv_set(readb); mv_set(readw); mv_set(readl);
193 mv_set(writeb); mv_set(writew); mv_set(writel);
194 91
195 mv_set(ioport_map); 92 memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
196 mv_set(ioport_unmap); 93 size = memparse(p, &p);
197 mv_set(irq_demux); 94 memory_end = memory_start + size;
198
199#ifdef CONFIG_SH_UNKNOWN
200 __set_io_port_base(mv_io_base);
201#endif
202
203 if (!sh_mv.mv_nr_irqs)
204 sh_mv.mv_nr_irqs = NR_IRQS;
205 95
206 return 0; 96 return 0;
207} 97}
98early_param("mem", early_parse_mem);
208 99
209/* 100/*
210 * Register fully available low RAM pages with the bootmem allocator. 101 * Register fully available low RAM pages with the bootmem allocator.
@@ -230,7 +121,7 @@ static void __init register_bootmem_low_pages(void)
230 free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(pages)); 121 free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(pages));
231} 122}
232 123
233void __init setup_bootmem_allocator(unsigned long start_pfn) 124void __init setup_bootmem_allocator(unsigned long free_pfn)
234{ 125{
235 unsigned long bootmap_size; 126 unsigned long bootmap_size;
236 127
@@ -239,9 +130,10 @@ void __init setup_bootmem_allocator(unsigned long start_pfn)
239 * bootstrap step all allocations (until the page allocator 130 * bootstrap step all allocations (until the page allocator
240 * is intact) must be done via bootmem_alloc(). 131 * is intact) must be done via bootmem_alloc().
241 */ 132 */
242 bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn, 133 bootmap_size = init_bootmem_node(NODE_DATA(0), free_pfn,
243 min_low_pfn, max_low_pfn); 134 min_low_pfn, max_low_pfn);
244 135
136 add_active_range(0, min_low_pfn, max_low_pfn);
245 register_bootmem_low_pages(); 137 register_bootmem_low_pages();
246 138
247 node_set_online(0); 139 node_set_online(0);
@@ -254,7 +146,7 @@ void __init setup_bootmem_allocator(unsigned long start_pfn)
254 * an invalid RAM area. 146 * an invalid RAM area.
255 */ 147 */
256 reserve_bootmem(__MEMORY_START+PAGE_SIZE, 148 reserve_bootmem(__MEMORY_START+PAGE_SIZE,
257 (PFN_PHYS(start_pfn)+bootmap_size+PAGE_SIZE-1)-__MEMORY_START); 149 (PFN_PHYS(free_pfn)+bootmap_size+PAGE_SIZE-1)-__MEMORY_START);
258 150
259 /* 151 /*
260 * reserve physical page 0 - it's a special BIOS page on many boxes, 152 * reserve physical page 0 - it's a special BIOS page on many boxes,
@@ -262,6 +154,8 @@ void __init setup_bootmem_allocator(unsigned long start_pfn)
262 */ 154 */
263 reserve_bootmem(__MEMORY_START, PAGE_SIZE); 155 reserve_bootmem(__MEMORY_START, PAGE_SIZE);
264 156
157 sparse_memory_present_with_active_regions(0);
158
265#ifdef CONFIG_BLK_DEV_INITRD 159#ifdef CONFIG_BLK_DEV_INITRD
266 ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); 160 ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0);
267 if (&__rd_start != &__rd_end) { 161 if (&__rd_start != &__rd_end) {
@@ -315,10 +209,6 @@ void __init setup_arch(char **cmdline_p)
315{ 209{
316 enable_mmu(); 210 enable_mmu();
317 211
318#ifdef CONFIG_CMDLINE_BOOL
319 strcpy(COMMAND_LINE, CONFIG_CMDLINE);
320#endif
321
322 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); 212 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
323 213
324#ifdef CONFIG_BLK_DEV_RAM 214#ifdef CONFIG_BLK_DEV_RAM
@@ -339,9 +229,22 @@ void __init setup_arch(char **cmdline_p)
339 data_resource.start = virt_to_phys(_etext); 229 data_resource.start = virt_to_phys(_etext);
340 data_resource.end = virt_to_phys(_edata)-1; 230 data_resource.end = virt_to_phys(_edata)-1;
341 231
232 memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
233 memory_end = memory_start + __MEMORY_SIZE;
234
235#ifdef CONFIG_CMDLINE_BOOL
236 strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line));
237#else
238 strlcpy(command_line, COMMAND_LINE, sizeof(command_line));
239#endif
240
241 /* Save unparsed command line copy for /proc/cmdline */
242 memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
243 *cmdline_p = command_line;
244
342 parse_early_param(); 245 parse_early_param();
343 246
344 sh_mv_setup(cmdline_p); 247 sh_mv_setup();
345 248
346 /* 249 /*
347 * Find the highest page frame number we have available 250 * Find the highest page frame number we have available
@@ -355,8 +258,9 @@ void __init setup_arch(char **cmdline_p)
355 min_low_pfn = __MEMORY_START >> PAGE_SHIFT; 258 min_low_pfn = __MEMORY_START >> PAGE_SHIFT;
356 259
357 nodes_clear(node_online_map); 260 nodes_clear(node_online_map);
261
262 /* Setup bootmem with available RAM */
358 setup_memory(); 263 setup_memory();
359 paging_init();
360 sparse_init(); 264 sparse_init();
361 265
362#ifdef CONFIG_DUMMY_CONSOLE 266#ifdef CONFIG_DUMMY_CONSOLE
@@ -366,46 +270,13 @@ void __init setup_arch(char **cmdline_p)
366 /* Perform the machine specific initialisation */ 270 /* Perform the machine specific initialisation */
367 if (likely(sh_mv.mv_setup)) 271 if (likely(sh_mv.mv_setup))
368 sh_mv.mv_setup(cmdline_p); 272 sh_mv.mv_setup(cmdline_p);
369}
370
371struct sh_machine_vector* __init get_mv_byname(const char* name)
372{
373 extern long __machvec_start, __machvec_end;
374 struct sh_machine_vector *all_vecs =
375 (struct sh_machine_vector *)&__machvec_start;
376
377 int i, n = ((unsigned long)&__machvec_end
378 - (unsigned long)&__machvec_start)/
379 sizeof(struct sh_machine_vector);
380
381 for (i = 0; i < n; ++i) {
382 struct sh_machine_vector *mv = &all_vecs[i];
383 if (mv == NULL)
384 continue;
385 if (strcasecmp(name, get_system_type()) == 0) {
386 return mv;
387 }
388 }
389 return NULL;
390}
391
392static struct cpu cpu[NR_CPUS];
393
394static int __init topology_init(void)
395{
396 int cpu_id;
397 273
398 for_each_possible_cpu(cpu_id) 274 paging_init();
399 register_cpu(&cpu[cpu_id], cpu_id);
400
401 return 0;
402} 275}
403 276
404subsys_initcall(topology_init);
405
406static const char *cpu_name[] = { 277static const char *cpu_name[] = {
407 [CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619", 278 [CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619",
408 [CPU_SH7604] = "SH7604", [CPU_SH7300] = "SH7300", 279 [CPU_SH7300] = "SH7300",
409 [CPU_SH7705] = "SH7705", [CPU_SH7706] = "SH7706", 280 [CPU_SH7705] = "SH7705", [CPU_SH7706] = "SH7706",
410 [CPU_SH7707] = "SH7707", [CPU_SH7708] = "SH7708", 281 [CPU_SH7707] = "SH7707", [CPU_SH7708] = "SH7708",
411 [CPU_SH7709] = "SH7709", [CPU_SH7710] = "SH7710", 282 [CPU_SH7709] = "SH7709", [CPU_SH7710] = "SH7710",
@@ -419,7 +290,7 @@ static const char *cpu_name[] = {
419 [CPU_SH7770] = "SH7770", [CPU_SH7780] = "SH7780", 290 [CPU_SH7770] = "SH7770", [CPU_SH7780] = "SH7780",
420 [CPU_SH7781] = "SH7781", [CPU_SH7343] = "SH7343", 291 [CPU_SH7781] = "SH7781", [CPU_SH7343] = "SH7343",
421 [CPU_SH7785] = "SH7785", [CPU_SH7722] = "SH7722", 292 [CPU_SH7785] = "SH7785", [CPU_SH7722] = "SH7722",
422 [CPU_SH_NONE] = "Unknown" 293 [CPU_SHX3] = "SH-X3", [CPU_SH_NONE] = "Unknown"
423}; 294};
424 295
425const char *get_cpu_subtype(struct sh_cpuinfo *c) 296const char *get_cpu_subtype(struct sh_cpuinfo *c)
diff --git a/arch/sh/kernel/sh_bios.c b/arch/sh/kernel/sh_bios.c
index 5b53e10bb9cd..d1bcac4fa269 100644
--- a/arch/sh/kernel/sh_bios.c
+++ b/arch/sh/kernel/sh_bios.c
@@ -5,7 +5,7 @@
5 * Copyright (C) 2000 Greg Banks, Mitch Davis 5 * Copyright (C) 2000 Greg Banks, Mitch Davis
6 * 6 *
7 */ 7 */
8 8#include <linux/module.h>
9#include <asm/sh_bios.h> 9#include <asm/sh_bios.h>
10 10
11#define BIOS_CALL_CONSOLE_WRITE 0 11#define BIOS_CALL_CONSOLE_WRITE 0
@@ -63,6 +63,7 @@ void sh_bios_gdb_detach(void)
63{ 63{
64 sh_bios_call(BIOS_CALL_GDB_DETACH, 0, 0, 0, 0); 64 sh_bios_call(BIOS_CALL_GDB_DETACH, 0, 0, 0, 0);
65} 65}
66EXPORT_SYMBOL(sh_bios_gdb_detach);
66 67
67void sh_bios_get_node_addr (unsigned char *node_addr) 68void sh_bios_get_node_addr (unsigned char *node_addr)
68{ 69{
diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c
index c1cfcb9f047c..37aef0a85197 100644
--- a/arch/sh/kernel/sh_ksyms.c
+++ b/arch/sh/kernel/sh_ksyms.c
@@ -63,10 +63,43 @@ EXPORT_SYMBOL(__const_udelay);
63/* These symbols are generated by the compiler itself */ 63/* These symbols are generated by the compiler itself */
64DECLARE_EXPORT(__udivsi3); 64DECLARE_EXPORT(__udivsi3);
65DECLARE_EXPORT(__sdivsi3); 65DECLARE_EXPORT(__sdivsi3);
66DECLARE_EXPORT(__ashrsi3);
67DECLARE_EXPORT(__ashlsi3);
66DECLARE_EXPORT(__ashrdi3); 68DECLARE_EXPORT(__ashrdi3);
67DECLARE_EXPORT(__ashldi3); 69DECLARE_EXPORT(__ashldi3);
70DECLARE_EXPORT(__ashiftrt_r4_6);
71DECLARE_EXPORT(__ashiftrt_r4_7);
72DECLARE_EXPORT(__ashiftrt_r4_8);
73DECLARE_EXPORT(__ashiftrt_r4_9);
74DECLARE_EXPORT(__ashiftrt_r4_10);
75DECLARE_EXPORT(__ashiftrt_r4_11);
76DECLARE_EXPORT(__ashiftrt_r4_12);
77DECLARE_EXPORT(__ashiftrt_r4_13);
78DECLARE_EXPORT(__ashiftrt_r4_14);
79DECLARE_EXPORT(__ashiftrt_r4_15);
80DECLARE_EXPORT(__ashiftrt_r4_20);
81DECLARE_EXPORT(__ashiftrt_r4_21);
82DECLARE_EXPORT(__ashiftrt_r4_22);
83DECLARE_EXPORT(__ashiftrt_r4_23);
84DECLARE_EXPORT(__ashiftrt_r4_24);
85DECLARE_EXPORT(__ashiftrt_r4_27);
86DECLARE_EXPORT(__ashiftrt_r4_30);
87DECLARE_EXPORT(__lshrsi3);
68DECLARE_EXPORT(__lshrdi3); 88DECLARE_EXPORT(__lshrdi3);
89DECLARE_EXPORT(__movstrSI8);
90DECLARE_EXPORT(__movstrSI12);
69DECLARE_EXPORT(__movstrSI16); 91DECLARE_EXPORT(__movstrSI16);
92DECLARE_EXPORT(__movstrSI20);
93DECLARE_EXPORT(__movstrSI24);
94DECLARE_EXPORT(__movstrSI28);
95DECLARE_EXPORT(__movstrSI32);
96DECLARE_EXPORT(__movstrSI36);
97DECLARE_EXPORT(__movstrSI40);
98DECLARE_EXPORT(__movstrSI44);
99DECLARE_EXPORT(__movstrSI48);
100DECLARE_EXPORT(__movstrSI52);
101DECLARE_EXPORT(__movstrSI56);
102DECLARE_EXPORT(__movstrSI60);
70#if __GNUC__ == 4 103#if __GNUC__ == 4
71DECLARE_EXPORT(__movmem); 104DECLARE_EXPORT(__movmem);
72#else 105#else
@@ -78,6 +111,16 @@ DECLARE_EXPORT(__movstr);
78DECLARE_EXPORT(__movmem_i4_even); 111DECLARE_EXPORT(__movmem_i4_even);
79DECLARE_EXPORT(__movmem_i4_odd); 112DECLARE_EXPORT(__movmem_i4_odd);
80DECLARE_EXPORT(__movmemSI12_i4); 113DECLARE_EXPORT(__movmemSI12_i4);
114
115#if (__GNUC_MINOR__ == 2 || defined(__GNUC_STM_RELEASE__))
116/*
117 * GCC 4.2 emits these for division, as do GCC 4.1.x versions of the ST
118 * compiler which include backported patches.
119 */
120DECLARE_EXPORT(__sdivsi3_i4i);
121DECLARE_EXPORT(__udiv_qrnnd_16);
122DECLARE_EXPORT(__udivsi3_i4i);
123#endif
81#else /* GCC 3.x */ 124#else /* GCC 3.x */
82DECLARE_EXPORT(__movstr_i4_even); 125DECLARE_EXPORT(__movstr_i4_even);
83DECLARE_EXPORT(__movstr_i4_odd); 126DECLARE_EXPORT(__movstr_i4_odd);
@@ -105,7 +148,9 @@ EXPORT_SYMBOL(synchronize_irq);
105#endif 148#endif
106 149
107EXPORT_SYMBOL(csum_partial); 150EXPORT_SYMBOL(csum_partial);
151EXPORT_SYMBOL(csum_partial_copy_generic);
108#ifdef CONFIG_IPV6 152#ifdef CONFIG_IPV6
109EXPORT_SYMBOL(csum_ipv6_magic); 153EXPORT_SYMBOL(csum_ipv6_magic);
110#endif 154#endif
111EXPORT_SYMBOL(clear_page); 155EXPORT_SYMBOL(clear_page);
156EXPORT_SYMBOL(__clear_user);
diff --git a/arch/sh/kernel/signal.c b/arch/sh/kernel/signal.c
index b32c35a7c0a3..706d81ccd101 100644
--- a/arch/sh/kernel/signal.c
+++ b/arch/sh/kernel/signal.c
@@ -23,6 +23,7 @@
23#include <linux/personality.h> 23#include <linux/personality.h>
24#include <linux/binfmts.h> 24#include <linux/binfmts.h>
25#include <linux/freezer.h> 25#include <linux/freezer.h>
26#include <linux/io.h>
26#include <asm/system.h> 27#include <asm/system.h>
27#include <asm/ucontext.h> 28#include <asm/ucontext.h>
28#include <asm/uaccess.h> 29#include <asm/uaccess.h>
@@ -261,14 +262,14 @@ asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5,
261 goto badframe; 262 goto badframe;
262 /* It is more difficult to avoid calling this function than to 263 /* It is more difficult to avoid calling this function than to
263 call it and ignore errors. */ 264 call it and ignore errors. */
264 do_sigaltstack(&st, NULL, regs->regs[15]); 265 do_sigaltstack((const stack_t __user *)&st, NULL, (unsigned long)frame);
265 266
266 return r0; 267 return r0;
267 268
268badframe: 269badframe:
269 force_sig(SIGSEGV, current); 270 force_sig(SIGSEGV, current);
270 return 0; 271 return 0;
271} 272}
272 273
273/* 274/*
274 * Set up a signal frame. 275 * Set up a signal frame.
@@ -481,7 +482,7 @@ give_sigsegv:
481 482
482static int 483static int
483handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, 484handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
484 sigset_t *oldset, struct pt_regs *regs) 485 sigset_t *oldset, struct pt_regs *regs, unsigned int save_r0)
485{ 486{
486 int ret; 487 int ret;
487 488
@@ -489,6 +490,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
489 if (regs->tra >= 0) { 490 if (regs->tra >= 0) {
490 /* If so, check system call restarting.. */ 491 /* If so, check system call restarting.. */
491 switch (regs->regs[0]) { 492 switch (regs->regs[0]) {
493 case -ERESTART_RESTARTBLOCK:
492 case -ERESTARTNOHAND: 494 case -ERESTARTNOHAND:
493 regs->regs[0] = -EINTR; 495 regs->regs[0] = -EINTR;
494 break; 496 break;
@@ -500,6 +502,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
500 } 502 }
501 /* fallthrough */ 503 /* fallthrough */
502 case -ERESTARTNOINTR: 504 case -ERESTARTNOINTR:
505 regs->regs[0] = save_r0;
503 regs->pc -= instruction_size( 506 regs->pc -= instruction_size(
504 ctrl_inw(regs->pc - 4)); 507 ctrl_inw(regs->pc - 4));
505 break; 508 break;
@@ -583,7 +586,8 @@ static void do_signal(struct pt_regs *regs, unsigned int save_r0)
583 signr = get_signal_to_deliver(&info, &ka, regs, NULL); 586 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
584 if (signr > 0) { 587 if (signr > 0) {
585 /* Whee! Actually deliver the signal. */ 588 /* Whee! Actually deliver the signal. */
586 if (handle_signal(signr, &ka, &info, oldset, regs) == 0) { 589 if (handle_signal(signr, &ka, &info, oldset,
590 regs, save_r0) == 0) {
587 /* a signal was successfully delivered; the saved 591 /* a signal was successfully delivered; the saved
588 * sigmask will have been stored in the signal frame, 592 * sigmask will have been stored in the signal frame,
589 * and will be restored by sigreturn, so we can simply 593 * and will be restored by sigreturn, so we can simply
diff --git a/arch/sh/kernel/syscalls.S b/arch/sh/kernel/syscalls.S
index 7db1c2dc5992..91fb7024e06f 100644
--- a/arch/sh/kernel/syscalls.S
+++ b/arch/sh/kernel/syscalls.S
@@ -308,9 +308,9 @@ ENTRY(sys_call_table)
308 .long sys_utimes 308 .long sys_utimes
309 .long sys_fadvise64_64_wrapper 309 .long sys_fadvise64_64_wrapper
310 .long sys_ni_syscall /* Reserved for vserver */ 310 .long sys_ni_syscall /* Reserved for vserver */
311 .long sys_ni_syscall /* Reserved for mbind */ 311 .long sys_mbind
312 .long sys_ni_syscall /* 275 - get_mempolicy */ 312 .long sys_get_mempolicy /* 275 */
313 .long sys_ni_syscall /* set_mempolicy */ 313 .long sys_set_mempolicy
314 .long sys_mq_open 314 .long sys_mq_open
315 .long sys_mq_unlink 315 .long sys_mq_unlink
316 .long sys_mq_timedsend 316 .long sys_mq_timedsend
@@ -358,3 +358,4 @@ ENTRY(sys_call_table)
358 .long sys_signalfd 358 .long sys_signalfd
359 .long sys_timerfd 359 .long sys_timerfd
360 .long sys_eventfd 360 .long sys_eventfd
361 .long sys_fallocate
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c
index 2d997e2a5b6c..7aca37d79766 100644
--- a/arch/sh/kernel/timers/timer-tmu.c
+++ b/arch/sh/kernel/timers/timer-tmu.c
@@ -30,7 +30,7 @@
30 30
31static int tmu_timer_start(void) 31static int tmu_timer_start(void)
32{ 32{
33 ctrl_outb(ctrl_inb(TMU_TSTR) | 0x3, TMU_TSTR); 33 ctrl_outb(ctrl_inb(TMU_012_TSTR) | 0x3, TMU_012_TSTR);
34 return 0; 34 return 0;
35} 35}
36 36
@@ -52,7 +52,7 @@ static void tmu0_timer_set_interval(unsigned long interval, unsigned int reload)
52 52
53static int tmu_timer_stop(void) 53static int tmu_timer_stop(void)
54{ 54{
55 ctrl_outb(ctrl_inb(TMU_TSTR) & ~0x3, TMU_TSTR); 55 ctrl_outb(ctrl_inb(TMU_012_TSTR) & ~0x3, TMU_012_TSTR);
56 return 0; 56 return 0;
57} 57}
58 58
@@ -80,6 +80,7 @@ static void tmu_set_mode(enum clock_event_mode mode,
80 break; 80 break;
81 case CLOCK_EVT_MODE_UNUSED: 81 case CLOCK_EVT_MODE_UNUSED:
82 case CLOCK_EVT_MODE_SHUTDOWN: 82 case CLOCK_EVT_MODE_SHUTDOWN:
83 case CLOCK_EVT_MODE_RESUME:
83 break; 84 break;
84 } 85 }
85} 86}
@@ -174,7 +175,8 @@ static int tmu_timer_init(void)
174 175
175#if !defined(CONFIG_CPU_SUBTYPE_SH7300) && \ 176#if !defined(CONFIG_CPU_SUBTYPE_SH7300) && \
176 !defined(CONFIG_CPU_SUBTYPE_SH7760) && \ 177 !defined(CONFIG_CPU_SUBTYPE_SH7760) && \
177 !defined(CONFIG_CPU_SUBTYPE_SH7785) 178 !defined(CONFIG_CPU_SUBTYPE_SH7785) && \
179 !defined(CONFIG_CPU_SUBTYPE_SHX3)
178 ctrl_outb(TMU_TOCR_INIT, TMU_TOCR); 180 ctrl_outb(TMU_TOCR_INIT, TMU_TOCR);
179#endif 181#endif
180 182
diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c
new file mode 100644
index 000000000000..9b5844a1bdaa
--- /dev/null
+++ b/arch/sh/kernel/topology.c
@@ -0,0 +1,49 @@
1/*
2 * arch/sh/kernel/topology.c
3 *
4 * Copyright (C) 2007 Paul Mundt
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#include <linux/cpu.h>
11#include <linux/cpumask.h>
12#include <linux/init.h>
13#include <linux/percpu.h>
14#include <linux/node.h>
15#include <linux/nodemask.h>
16
17static DEFINE_PER_CPU(struct cpu, cpu_devices);
18
19static int __init topology_init(void)
20{
21 int i, ret;
22
23#ifdef CONFIG_NEED_MULTIPLE_NODES
24 for_each_online_node(i)
25 register_one_node(i);
26#endif
27
28 for_each_present_cpu(i) {
29 ret = register_cpu(&per_cpu(cpu_devices, i), i);
30 if (unlikely(ret))
31 printk(KERN_WARNING "%s: register_cpu %d failed (%d)\n",
32 __FUNCTION__, i, ret);
33 }
34
35#if defined(CONFIG_NUMA) && !defined(CONFIG_SMP)
36 /*
37 * In the UP case, make sure the CPU association is still
38 * registered under each node. Without this, sysfs fails
39 * to make the connection between nodes other than node0
40 * and cpu0.
41 */
42 for_each_online_node(i)
43 if (i != numa_node_id())
44 register_cpu_under_node(raw_smp_processor_id(), i);
45#endif
46
47 return 0;
48}
49subsys_initcall(topology_init);
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c
index 5b75cb6f8f9b..502d43e4785c 100644
--- a/arch/sh/kernel/traps.c
+++ b/arch/sh/kernel/traps.c
@@ -83,6 +83,8 @@ void die(const char * str, struct pt_regs * regs, long err)
83{ 83{
84 static int die_counter; 84 static int die_counter;
85 85
86 oops_enter();
87
86 console_verbose(); 88 console_verbose();
87 spin_lock_irq(&die_lock); 89 spin_lock_irq(&die_lock);
88 bust_spinlocks(1); 90 bust_spinlocks(1);
@@ -101,6 +103,7 @@ void die(const char * str, struct pt_regs * regs, long err)
101 (unsigned long)task_stack_page(current)); 103 (unsigned long)task_stack_page(current));
102 104
103 bust_spinlocks(0); 105 bust_spinlocks(0);
106 add_taint(TAINT_DIE);
104 spin_unlock_irq(&die_lock); 107 spin_unlock_irq(&die_lock);
105 108
106 if (kexec_should_crash(current)) 109 if (kexec_should_crash(current))
@@ -112,6 +115,7 @@ void die(const char * str, struct pt_regs * regs, long err)
112 if (panic_on_oops) 115 if (panic_on_oops)
113 panic("Fatal exception"); 116 panic("Fatal exception");
114 117
118 oops_exit();
115 do_exit(SIGSEGV); 119 do_exit(SIGSEGV);
116} 120}
117 121
@@ -581,7 +585,7 @@ uspace_segv:
581 info.si_signo = SIGBUS; 585 info.si_signo = SIGBUS;
582 info.si_errno = 0; 586 info.si_errno = 0;
583 info.si_code = si_code; 587 info.si_code = si_code;
584 info.si_addr = (void *) address; 588 info.si_addr = (void __user *)address;
585 force_sig_info(SIGBUS, &info, current); 589 force_sig_info(SIGBUS, &info, current);
586 } else { 590 } else {
587 if (regs->pc & 1) 591 if (regs->pc & 1)
@@ -614,7 +618,7 @@ uspace_segv:
614 */ 618 */
615int is_dsp_inst(struct pt_regs *regs) 619int is_dsp_inst(struct pt_regs *regs)
616{ 620{
617 unsigned short inst; 621 unsigned short inst = 0;
618 622
619 /* 623 /*
620 * Safe guard if DSP mode is already enabled or we're lacking 624 * Safe guard if DSP mode is already enabled or we're lacking
@@ -642,7 +646,6 @@ asmlinkage void do_divide_error(unsigned long r4, unsigned long r5,
642 unsigned long r6, unsigned long r7, 646 unsigned long r6, unsigned long r7,
643 struct pt_regs __regs) 647 struct pt_regs __regs)
644{ 648{
645 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
646 siginfo_t info; 649 siginfo_t info;
647 650
648 switch (r4) { 651 switch (r4) {
@@ -871,7 +874,7 @@ void __init trap_init(void)
871void handle_BUG(struct pt_regs *regs) 874void handle_BUG(struct pt_regs *regs)
872{ 875{
873 enum bug_trap_type tt; 876 enum bug_trap_type tt;
874 tt = report_bug(regs->pc); 877 tt = report_bug(regs->pc, regs);
875 if (tt == BUG_TRAP_TYPE_WARN) { 878 if (tt == BUG_TRAP_TYPE_WARN) {
876 regs->pc += 2; 879 regs->pc += 2;
877 return; 880 return;
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
index 4c5b57e9c3c1..9cb95af7b090 100644
--- a/arch/sh/kernel/vmlinux.lds.S
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -22,6 +22,7 @@ SECTIONS
22 *(.empty_zero_page) 22 *(.empty_zero_page)
23 } = 0 23 } = 0
24 .text : { 24 .text : {
25 *(.text.head)
25 TEXT_TEXT 26 TEXT_TEXT
26 SCHED_TEXT 27 SCHED_TEXT
27 LOCK_TEXT 28 LOCK_TEXT
@@ -60,10 +61,7 @@ SECTIONS
60 . = ALIGN(PAGE_SIZE); 61 . = ALIGN(PAGE_SIZE);
61 __nosave_end = .; 62 __nosave_end = .;
62 63
63 . = ALIGN(PAGE_SIZE); 64 PERCPU(PAGE_SIZE)
64 __per_cpu_start = .;
65 .data.percpu : { *(.data.percpu) }
66 __per_cpu_end = .;
67 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 65 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
68 66
69 _edata = .; /* End of data section */ 67 _edata = .; /* End of data section */
@@ -97,18 +95,20 @@ SECTIONS
97 __initramfs_end = .; 95 __initramfs_end = .;
98#endif 96#endif
99 97
98 . = ALIGN(4);
100 __machvec_start = .; 99 __machvec_start = .;
101 .init.machvec : { *(.init.machvec) } 100 .machvec.init : { *(.machvec.init) }
102 __machvec_end = .; 101 __machvec_end = .;
103 . = ALIGN(PAGE_SIZE);
104 __init_end = .;
105
106 . = ALIGN(4);
107 __bss_start = .; /* BSS */
108 .bss : { *(.bss) }
109 102
110 . = ALIGN(4); 103 . = ALIGN(PAGE_SIZE);
111 _end = . ; 104 .bss : {
105 __init_end = .;
106 __bss_start = .; /* BSS */
107 *(.bss.page_aligned)
108 *(.bss)
109 . = ALIGN(4);
110 _end = . ;
111 }
112 112
113 /* When something in the kernel is NOT compiled as a module, the 113 /* When something in the kernel is NOT compiled as a module, the
114 * module cleanup code and data are put into these segments. Both 114 * module cleanup code and data are put into these segments. Both
diff --git a/arch/sh/lib/div64-generic.c b/arch/sh/lib/div64-generic.c
index c02473afd581..4bef3b5d964a 100644
--- a/arch/sh/lib/div64-generic.c
+++ b/arch/sh/lib/div64-generic.c
@@ -4,16 +4,15 @@
4 4
5#include <linux/types.h> 5#include <linux/types.h>
6 6
7extern u64 __xdiv64_32(u64 n, u32 d); 7extern uint64_t __xdiv64_32(u64 n, u32 d);
8 8
9u64 __div64_32(u64 *xp, u32 y) 9uint32_t __div64_32(u64 *xp, u32 y)
10{ 10{
11 u64 rem; 11 uint32_t rem;
12 u64 q = __xdiv64_32(*xp, y); 12 uint64_t q = __xdiv64_32(*xp, y);
13 13
14 rem = *xp - q * y; 14 rem = *xp - q * y;
15 *xp = q; 15 *xp = q;
16 16
17 return rem; 17 return rem;
18} 18}
19
diff --git a/arch/sh/lib/div64.S b/arch/sh/lib/div64.S
index eefc275d64a7..5ee7334ea64f 100644
--- a/arch/sh/lib/div64.S
+++ b/arch/sh/lib/div64.S
@@ -1,12 +1,12 @@
1/* 1/*
2 * unsigned long long __xdiv64_32(unsigned long long n, unsigned long d); 2 * unsigned long __xdiv64_32(unsigned long long n, unsigned long d);
3 */ 3 */
4 4
5#include <linux/linkage.h> 5#include <linux/linkage.h>
6 6
7.text 7.text
8ENTRY(__xdiv64_32) 8ENTRY(__xdiv64_32)
9#ifdef __LITTLE_ENDIAN__ 9#ifdef CONFIG_CPU_LITTLE_ENDIAN
10 mov r4, r0 10 mov r4, r0
11 mov r5, r1 11 mov r5, r1
12#else 12#else
@@ -34,7 +34,7 @@ ENTRY(__xdiv64_32)
34 rotcl r0 34 rotcl r0
35 div1 r6, r1 35 div1 r6, r1
36 .endr 36 .endr
37#ifdef __LITTLE_ENDIAN__ 37#ifdef CONFIG_CPU_LITTLE_ENDIAN
38 mov r2, r1 38 mov r2, r1
39 rts 39 rts
40 rotcl r0 40 rotcl r0
diff --git a/arch/sh/math-emu/math.c b/arch/sh/math-emu/math.c
index a38e1eed9e77..ac2d7abd2567 100644
--- a/arch/sh/math-emu/math.c
+++ b/arch/sh/math-emu/math.c
@@ -507,6 +507,7 @@ static int ieee_fpe_handler(struct pt_regs *regs)
507 unsigned short insn = *(unsigned short *)regs->pc; 507 unsigned short insn = *(unsigned short *)regs->pc;
508 unsigned short finsn; 508 unsigned short finsn;
509 unsigned long nextpc; 509 unsigned long nextpc;
510 siginfo_t info;
510 int nib[4] = { 511 int nib[4] = {
511 (insn >> 12) & 0xf, 512 (insn >> 12) & 0xf,
512 (insn >> 8) & 0xf, 513 (insn >> 8) & 0xf,
@@ -559,9 +560,11 @@ static int ieee_fpe_handler(struct pt_regs *regs)
559 ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK); 560 ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK);
560 set_tsk_thread_flag(tsk, TIF_USEDFPU); 561 set_tsk_thread_flag(tsk, TIF_USEDFPU);
561 } else { 562 } else {
562 tsk->thread.trap_no = 11; 563 info.si_signo = SIGFPE;
563 tsk->thread.error_code = 0; 564 info.si_errno = 0;
564 force_sig(SIGFPE, tsk); 565 info.si_code = FPE_FLTINV;
566 info.si_addr = (void __user *)regs->pc;
567 force_sig_info(SIGFPE, &info, tsk);
565 } 568 }
566 569
567 regs->pc = nextpc; 570 regs->pc = nextpc;
@@ -576,14 +579,17 @@ asmlinkage void do_fpu_error(unsigned long r4, unsigned long r5,
576 struct pt_regs regs) 579 struct pt_regs regs)
577{ 580{
578 struct task_struct *tsk = current; 581 struct task_struct *tsk = current;
582 siginfo_t info;
579 583
580 if (ieee_fpe_handler (&regs)) 584 if (ieee_fpe_handler (&regs))
581 return; 585 return;
582 586
583 regs.pc += 2; 587 regs.pc += 2;
584 tsk->thread.trap_no = 11; 588 info.si_signo = SIGFPE;
585 tsk->thread.error_code = 0; 589 info.si_errno = 0;
586 force_sig(SIGFPE, tsk); 590 info.si_code = FPE_FLTINV;
591 info.si_addr = (void __user *)regs.pc;
592 force_sig_info(SIGFPE, &info, tsk);
587} 593}
588 594
589/** 595/**
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index 253346d7b316..70da1c8d407e 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -1,5 +1,3 @@
1menu "Processor selection"
2
3# 1#
4# Processor families 2# Processor families
5# 3#
@@ -38,27 +36,31 @@ config CPU_SUBTYPE_ST40
38config CPU_SHX2 36config CPU_SHX2
39 bool 37 bool
40 38
39config CPU_SHX3
40 bool
41
42choice
43 prompt "Processor sub-type selection"
44
41# 45#
42# Processor subtypes 46# Processor subtypes
43# 47#
44 48
45comment "SH-2 Processor Support" 49# SH-2 Processor Support
46
47config CPU_SUBTYPE_SH7604
48 bool "Support SH7604 processor"
49 select CPU_SH2
50 50
51config CPU_SUBTYPE_SH7619 51config CPU_SUBTYPE_SH7619
52 bool "Support SH7619 processor" 52 bool "Support SH7619 processor"
53 select CPU_SH2 53 select CPU_SH2
54 select CPU_HAS_IPR_IRQ
54 55
55comment "SH-2A Processor Support" 56# SH-2A Processor Support
56 57
57config CPU_SUBTYPE_SH7206 58config CPU_SUBTYPE_SH7206
58 bool "Support SH7206 processor" 59 bool "Support SH7206 processor"
59 select CPU_SH2A 60 select CPU_SH2A
61 select CPU_HAS_IPR_IRQ
60 62
61comment "SH-3 Processor Support" 63# SH-3 Processor Support
62 64
63config CPU_SUBTYPE_SH7300 65config CPU_SUBTYPE_SH7300
64 bool "Support SH7300 processor" 66 bool "Support SH7300 processor"
@@ -113,19 +115,19 @@ config CPU_SUBTYPE_SH7712
113 help 115 help
114 Select SH7712 if you have a SH3-DSP SH7712 CPU. 116 Select SH7712 if you have a SH3-DSP SH7712 CPU.
115 117
116comment "SH-4 Processor Support" 118# SH-4 Processor Support
117 119
118config CPU_SUBTYPE_SH7750 120config CPU_SUBTYPE_SH7750
119 bool "Support SH7750 processor" 121 bool "Support SH7750 processor"
120 select CPU_SH4 122 select CPU_SH4
121 select CPU_HAS_IPR_IRQ 123 select CPU_HAS_INTC_IRQ
122 help 124 help
123 Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU. 125 Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
124 126
125config CPU_SUBTYPE_SH7091 127config CPU_SUBTYPE_SH7091
126 bool "Support SH7091 processor" 128 bool "Support SH7091 processor"
127 select CPU_SH4 129 select CPU_SH4
128 select CPU_SUBTYPE_SH7750 130 select CPU_HAS_INTC_IRQ
129 help 131 help
130 Select SH7091 if you have an SH-4 based Sega device (such as 132 Select SH7091 if you have an SH-4 based Sega device (such as
131 the Dreamcast, Naomi, and Naomi 2). 133 the Dreamcast, Naomi, and Naomi 2).
@@ -133,19 +135,17 @@ config CPU_SUBTYPE_SH7091
133config CPU_SUBTYPE_SH7750R 135config CPU_SUBTYPE_SH7750R
134 bool "Support SH7750R processor" 136 bool "Support SH7750R processor"
135 select CPU_SH4 137 select CPU_SH4
136 select CPU_SUBTYPE_SH7750 138 select CPU_HAS_INTC_IRQ
137 select CPU_HAS_IPR_IRQ
138 139
139config CPU_SUBTYPE_SH7750S 140config CPU_SUBTYPE_SH7750S
140 bool "Support SH7750S processor" 141 bool "Support SH7750S processor"
141 select CPU_SH4 142 select CPU_SH4
142 select CPU_SUBTYPE_SH7750 143 select CPU_HAS_INTC_IRQ
143 select CPU_HAS_IPR_IRQ
144 144
145config CPU_SUBTYPE_SH7751 145config CPU_SUBTYPE_SH7751
146 bool "Support SH7751 processor" 146 bool "Support SH7751 processor"
147 select CPU_SH4 147 select CPU_SH4
148 select CPU_HAS_IPR_IRQ 148 select CPU_HAS_INTC_IRQ
149 help 149 help
150 Select SH7751 if you have a 166 Mhz SH-4 HD6417751 CPU, 150 Select SH7751 if you have a 166 Mhz SH-4 HD6417751 CPU,
151 or if you have a HD6417751R CPU. 151 or if you have a HD6417751R CPU.
@@ -153,8 +153,7 @@ config CPU_SUBTYPE_SH7751
153config CPU_SUBTYPE_SH7751R 153config CPU_SUBTYPE_SH7751R
154 bool "Support SH7751R processor" 154 bool "Support SH7751R processor"
155 select CPU_SH4 155 select CPU_SH4
156 select CPU_SUBTYPE_SH7751 156 select CPU_HAS_INTC_IRQ
157 select CPU_HAS_IPR_IRQ
158 157
159config CPU_SUBTYPE_SH7760 158config CPU_SUBTYPE_SH7760
160 bool "Support SH7760 processor" 159 bool "Support SH7760 processor"
@@ -166,7 +165,7 @@ config CPU_SUBTYPE_SH4_202
166 bool "Support SH4-202 processor" 165 bool "Support SH4-202 processor"
167 select CPU_SH4 166 select CPU_SH4
168 167
169comment "ST40 Processor Support" 168# ST40 Processor Support
170 169
171config CPU_SUBTYPE_ST40STB1 170config CPU_SUBTYPE_ST40STB1
172 bool "Support ST40STB1/ST40RA processors" 171 bool "Support ST40STB1/ST40RA processors"
@@ -181,7 +180,7 @@ config CPU_SUBTYPE_ST40GX1
181 help 180 help
182 Select ST40GX1 if you have a ST40GX1 CPU. 181 Select ST40GX1 if you have a ST40GX1 CPU.
183 182
184comment "SH-4A Processor Support" 183# SH-4A Processor Support
185 184
186config CPU_SUBTYPE_SH7770 185config CPU_SUBTYPE_SH7770
187 bool "Support SH7770 processor" 186 bool "Support SH7770 processor"
@@ -190,7 +189,7 @@ config CPU_SUBTYPE_SH7770
190config CPU_SUBTYPE_SH7780 189config CPU_SUBTYPE_SH7780
191 bool "Support SH7780 processor" 190 bool "Support SH7780 processor"
192 select CPU_SH4A 191 select CPU_SH4A
193 select CPU_HAS_INTC2_IRQ 192 select CPU_HAS_INTC_IRQ
194 193
195config CPU_SUBTYPE_SH7785 194config CPU_SUBTYPE_SH7785
196 bool "Support SH7785 processor" 195 bool "Support SH7785 processor"
@@ -198,7 +197,13 @@ config CPU_SUBTYPE_SH7785
198 select CPU_SHX2 197 select CPU_SHX2
199 select CPU_HAS_INTC2_IRQ 198 select CPU_HAS_INTC2_IRQ
200 199
201comment "SH4AL-DSP Processor Support" 200config CPU_SUBTYPE_SHX3
201 bool "Support SH-X3 processor"
202 select CPU_SH4A
203 select CPU_SHX3
204 select CPU_HAS_INTC2_IRQ
205
206# SH4AL-DSP Processor Support
202 207
203config CPU_SUBTYPE_SH73180 208config CPU_SUBTYPE_SH73180
204 bool "Support SH73180 processor" 209 bool "Support SH73180 processor"
@@ -212,9 +217,11 @@ config CPU_SUBTYPE_SH7722
212 bool "Support SH7722 processor" 217 bool "Support SH7722 processor"
213 select CPU_SH4AL_DSP 218 select CPU_SH4AL_DSP
214 select CPU_SHX2 219 select CPU_SHX2
215 select CPU_HAS_IPR_IRQ 220 select CPU_HAS_INTC_IRQ
221 select ARCH_SPARSEMEM_ENABLE
222 select SYS_SUPPORTS_NUMA
216 223
217endmenu 224endchoice
218 225
219menu "Memory management options" 226menu "Memory management options"
220 227
@@ -266,7 +273,7 @@ config MEMORY_SIZE
266 273
267config 32BIT 274config 32BIT
268 bool "Support 32-bit physical addressing through PMB" 275 bool "Support 32-bit physical addressing through PMB"
269 depends on CPU_SH4A && MMU && (!X2TLB || BROKEN) 276 depends on MMU && (CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785)
270 default y 277 default y
271 help 278 help
272 If you say Y here, physical addressing will be extended to 279 If you say Y here, physical addressing will be extended to
@@ -295,6 +302,17 @@ config VSYSCALL
295 For systems with an MMU that can afford to give up a page, 302 For systems with an MMU that can afford to give up a page,
296 (the default value) say Y. 303 (the default value) say Y.
297 304
305config NUMA
306 bool "Non Uniform Memory Access (NUMA) Support"
307 depends on MMU && SYS_SUPPORTS_NUMA && EXPERIMENTAL
308 default n
309 help
310 Some SH systems have many various memories scattered around
311 the address space, each with varying latencies. This enables
312 support for these blocks by binding them to nodes and allowing
313 memory policies to be used for prioritizing and controlling
314 allocation behaviour.
315
298config NODES_SHIFT 316config NODES_SHIFT
299 int 317 int
300 default "1" 318 default "1"
@@ -302,14 +320,34 @@ config NODES_SHIFT
302 320
303config ARCH_FLATMEM_ENABLE 321config ARCH_FLATMEM_ENABLE
304 def_bool y 322 def_bool y
323 depends on !NUMA
324
325config ARCH_SPARSEMEM_ENABLE
326 def_bool y
327 select SPARSEMEM_STATIC
328
329config ARCH_SPARSEMEM_DEFAULT
330 def_bool y
305 331
306config MAX_ACTIVE_REGIONS 332config MAX_ACTIVE_REGIONS
307 int 333 int
334 default "2" if (CPU_SUBTYPE_SH7722 && SPARSEMEM)
308 default "1" 335 default "1"
309 336
310config ARCH_POPULATES_NODE_MAP 337config ARCH_POPULATES_NODE_MAP
311 def_bool y 338 def_bool y
312 339
340config ARCH_SELECT_MEMORY_MODEL
341 def_bool y
342
343config ARCH_ENABLE_MEMORY_HOTPLUG
344 def_bool y
345 depends on SPARSEMEM
346
347config ARCH_MEMORY_PROBE
348 def_bool y
349 depends on MEMORY_HOTPLUG
350
313choice 351choice
314 prompt "Kernel page size" 352 prompt "Kernel page size"
315 default PAGE_SIZE_4KB 353 default PAGE_SIZE_4KB
@@ -394,15 +432,4 @@ config SH_WRITETHROUGH
394 432
395 If unsure, say N. 433 If unsure, say N.
396 434
397config SH_OCRAM
398 bool "Operand Cache RAM (OCRAM) support"
399 help
400 Selecting this option will automatically tear down the number of
401 sets in the dcache by half, which in turn exposes a memory range.
402
403 The addresses for the OC RAM base will vary according to the
404 processor version. Consult vendor documentation for specifics.
405
406 If unsure, say N.
407
408endmenu 435endmenu
diff --git a/arch/sh/mm/Makefile b/arch/sh/mm/Makefile
index 3ffd7f68c0a2..d677d7f3afc1 100644
--- a/arch/sh/mm/Makefile
+++ b/arch/sh/mm/Makefile
@@ -8,9 +8,6 @@ obj-$(CONFIG_CPU_SH2) += cache-sh2.o
8obj-$(CONFIG_CPU_SH3) += cache-sh3.o 8obj-$(CONFIG_CPU_SH3) += cache-sh3.o
9obj-$(CONFIG_CPU_SH4) += cache-sh4.o 9obj-$(CONFIG_CPU_SH4) += cache-sh4.o
10 10
11obj-$(CONFIG_DMA_PAGE_OPS) += pg-dma.o
12obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
13
14mmu-y := fault-nommu.o tlb-nommu.o pg-nommu.o 11mmu-y := fault-nommu.o tlb-nommu.o pg-nommu.o
15mmu-$(CONFIG_MMU) := fault.o clear_page.o copy_page.o tlb-flush.o \ 12mmu-$(CONFIG_MMU) := fault.o clear_page.o copy_page.o tlb-flush.o \
16 ioremap.o 13 ioremap.o
@@ -27,5 +24,7 @@ obj-$(CONFIG_CPU_SH4) += tlb-sh4.o pg-sh4.o
27obj-$(CONFIG_SH7705_CACHE_32KB) += pg-sh7705.o 24obj-$(CONFIG_SH7705_CACHE_32KB) += pg-sh7705.o
28endif 25endif
29 26
27obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
30obj-$(CONFIG_SH7705_CACHE_32KB) += cache-sh7705.o 28obj-$(CONFIG_SH7705_CACHE_32KB) += cache-sh7705.o
31obj-$(CONFIG_32BIT) += pmb.o 29obj-$(CONFIG_32BIT) += pmb.o
30obj-$(CONFIG_NUMA) += numa.o
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c
index c878faa4ae46..964c6767dc73 100644
--- a/arch/sh/mm/fault.c
+++ b/arch/sh/mm/fault.c
@@ -32,8 +32,8 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
32 struct task_struct *tsk; 32 struct task_struct *tsk;
33 struct mm_struct *mm; 33 struct mm_struct *mm;
34 struct vm_area_struct * vma; 34 struct vm_area_struct * vma;
35 unsigned long page;
36 int si_code; 35 int si_code;
36 int fault;
37 siginfo_t info; 37 siginfo_t info;
38 38
39 trace_hardirqs_on(); 39 trace_hardirqs_on();
@@ -125,20 +125,18 @@ good_area:
125 * the fault. 125 * the fault.
126 */ 126 */
127survive: 127survive:
128 switch (handle_mm_fault(mm, vma, address, writeaccess)) { 128 fault = handle_mm_fault(mm, vma, address, writeaccess);
129 case VM_FAULT_MINOR: 129 if (unlikely(fault & VM_FAULT_ERROR)) {
130 tsk->min_flt++; 130 if (fault & VM_FAULT_OOM)
131 break;
132 case VM_FAULT_MAJOR:
133 tsk->maj_flt++;
134 break;
135 case VM_FAULT_SIGBUS:
136 goto do_sigbus;
137 case VM_FAULT_OOM:
138 goto out_of_memory; 131 goto out_of_memory;
139 default: 132 else if (fault & VM_FAULT_SIGBUS)
140 BUG(); 133 goto do_sigbus;
134 BUG();
141 } 135 }
136 if (fault & VM_FAULT_MAJOR)
137 tsk->maj_flt++;
138 else
139 tsk->min_flt++;
142 140
143 up_read(&mm->mmap_sem); 141 up_read(&mm->mmap_sem);
144 return; 142 return;
@@ -170,24 +168,38 @@ no_context:
170 * terminate things with extreme prejudice. 168 * terminate things with extreme prejudice.
171 * 169 *
172 */ 170 */
173 if (address < PAGE_SIZE) 171
174 printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference"); 172 bust_spinlocks(1);
175 else 173
176 printk(KERN_ALERT "Unable to handle kernel paging request"); 174 if (oops_may_print()) {
177 printk(" at virtual address %08lx\n", address); 175 __typeof__(pte_val(__pte(0))) page;
178 printk(KERN_ALERT "pc = %08lx\n", regs->pc); 176
179 page = (unsigned long)get_TTB(); 177 if (address < PAGE_SIZE)
180 if (page) { 178 printk(KERN_ALERT "Unable to handle kernel NULL "
181 page = ((unsigned long *) page)[address >> PGDIR_SHIFT]; 179 "pointer dereference");
182 printk(KERN_ALERT "*pde = %08lx\n", page); 180 else
183 if (page & _PAGE_PRESENT) { 181 printk(KERN_ALERT "Unable to handle kernel paging "
184 page &= PAGE_MASK; 182 "request");
185 address &= 0x003ff000; 183 printk(" at virtual address %08lx\n", address);
186 page = ((unsigned long *) __va(page))[address >> PAGE_SHIFT]; 184 printk(KERN_ALERT "pc = %08lx\n", regs->pc);
187 printk(KERN_ALERT "*pte = %08lx\n", page); 185 page = (unsigned long)get_TTB();
186 if (page) {
187 page = ((__typeof__(page) *) __va(page))[address >>
188 PGDIR_SHIFT];
189 printk(KERN_ALERT "*pde = %08lx\n", page);
190 if (page & _PAGE_PRESENT) {
191 page &= PAGE_MASK;
192 address &= 0x003ff000;
193 page = ((__typeof__(page) *)
194 __va(page))[address >>
195 PAGE_SHIFT];
196 printk(KERN_ALERT "*pte = %08lx\n", page);
197 }
188 } 198 }
189 } 199 }
200
190 die("Oops", regs, writeaccess); 201 die("Oops", regs, writeaccess);
202 bust_spinlocks(0);
191 do_exit(SIGKILL); 203 do_exit(SIGKILL);
192 204
193/* 205/*
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index e0e644ff3204..82b68c789a5f 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -18,6 +18,7 @@
18#include <asm/mmu_context.h> 18#include <asm/mmu_context.h>
19#include <asm/tlb.h> 19#include <asm/tlb.h>
20#include <asm/cacheflush.h> 20#include <asm/cacheflush.h>
21#include <asm/sections.h>
21#include <asm/cache.h> 22#include <asm/cache.h>
22 23
23DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 24DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
@@ -36,14 +37,11 @@ void show_mem(void)
36 show_free_areas(); 37 show_free_areas();
37 38
38 for_each_online_pgdat(pgdat) { 39 for_each_online_pgdat(pgdat) {
39 struct page *page, *end; 40 unsigned long flags, i;
40 unsigned long flags;
41 41
42 pgdat_resize_lock(pgdat, &flags); 42 pgdat_resize_lock(pgdat, &flags);
43 page = pgdat->node_mem_map; 43 for (i = 0; i < pgdat->node_spanned_pages; i++) {
44 end = page + pgdat->node_spanned_pages; 44 struct page *page = pgdat_page_nr(pgdat, i);
45
46 do {
47 total++; 45 total++;
48 if (PageReserved(page)) 46 if (PageReserved(page))
49 reserved++; 47 reserved++;
@@ -55,9 +53,7 @@ void show_mem(void)
55 free++; 53 free++;
56 else 54 else
57 shared += page_count(page) - 1; 55 shared += page_count(page) - 1;
58 page++; 56 }
59 } while (page < end);
60
61 pgdat_resize_unlock(pgdat, &flags); 57 pgdat_resize_unlock(pgdat, &flags);
62 } 58 }
63 59
@@ -137,16 +133,12 @@ void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
137} 133}
138#endif /* CONFIG_MMU */ 134#endif /* CONFIG_MMU */
139 135
140/* References to section boundaries */
141
142extern char _text, _etext, _edata, __bss_start, _end;
143extern char __init_begin, __init_end;
144
145/* 136/*
146 * paging_init() sets up the page tables 137 * paging_init() sets up the page tables
147 */ 138 */
148void __init paging_init(void) 139void __init paging_init(void)
149{ 140{
141 unsigned long max_zone_pfns[MAX_NR_ZONES];
150 int nid; 142 int nid;
151 143
152 /* We don't need to map the kernel through the TLB, as 144 /* We don't need to map the kernel through the TLB, as
@@ -158,43 +150,39 @@ void __init paging_init(void)
158 * check for a null value. */ 150 * check for a null value. */
159 set_TTB(swapper_pg_dir); 151 set_TTB(swapper_pg_dir);
160 152
153 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
154
161 for_each_online_node(nid) { 155 for_each_online_node(nid) {
162 pg_data_t *pgdat = NODE_DATA(nid); 156 pg_data_t *pgdat = NODE_DATA(nid);
163 unsigned long max_zone_pfns[MAX_NR_ZONES];
164 unsigned long low, start_pfn; 157 unsigned long low, start_pfn;
165 158
166 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
167
168 start_pfn = pgdat->bdata->node_boot_start >> PAGE_SHIFT; 159 start_pfn = pgdat->bdata->node_boot_start >> PAGE_SHIFT;
169 low = pgdat->bdata->node_low_pfn; 160 low = pgdat->bdata->node_low_pfn;
170 161
171 max_zone_pfns[ZONE_NORMAL] = low; 162 if (max_zone_pfns[ZONE_NORMAL] < low)
172 add_active_range(nid, start_pfn, low); 163 max_zone_pfns[ZONE_NORMAL] = low;
173 164
174 printk("Node %u: start_pfn = 0x%lx, low = 0x%lx\n", 165 printk("Node %u: start_pfn = 0x%lx, low = 0x%lx\n",
175 nid, start_pfn, low); 166 nid, start_pfn, low);
176
177 free_area_init_nodes(max_zone_pfns);
178
179 printk("Node %u: mem_map starts at %p\n",
180 pgdat->node_id, pgdat->node_mem_map);
181 } 167 }
168
169 free_area_init_nodes(max_zone_pfns);
182} 170}
183 171
184static struct kcore_list kcore_mem, kcore_vmalloc; 172static struct kcore_list kcore_mem, kcore_vmalloc;
185 173
186void __init mem_init(void) 174void __init mem_init(void)
187{ 175{
188 int codesize, reservedpages, datasize, initsize; 176 int codesize, datasize, initsize;
189 int nid; 177 int nid;
190 178
191 reservedpages = 0; 179 num_physpages = 0;
180 high_memory = NULL;
192 181
193 for_each_online_node(nid) { 182 for_each_online_node(nid) {
194 pg_data_t *pgdat = NODE_DATA(nid); 183 pg_data_t *pgdat = NODE_DATA(nid);
195 unsigned long node_pages = 0; 184 unsigned long node_pages = 0;
196 void *node_high_memory; 185 void *node_high_memory;
197 int i;
198 186
199 num_physpages += pgdat->node_present_pages; 187 num_physpages += pgdat->node_present_pages;
200 188
@@ -203,13 +191,9 @@ void __init mem_init(void)
203 191
204 totalram_pages += node_pages; 192 totalram_pages += node_pages;
205 193
206 for (i = 0; i < node_pages; i++) 194 node_high_memory = (void *)__va((pgdat->node_start_pfn +
207 if (PageReserved(pgdat->node_mem_map + i)) 195 pgdat->node_spanned_pages) <<
208 reservedpages++; 196 PAGE_SHIFT);
209
210 node_high_memory = (void *)((pgdat->node_start_pfn +
211 pgdat->node_spanned_pages) <<
212 PAGE_SHIFT);
213 if (node_high_memory > high_memory) 197 if (node_high_memory > high_memory)
214 high_memory = node_high_memory; 198 high_memory = node_high_memory;
215 } 199 }
@@ -239,11 +223,10 @@ void __init mem_init(void)
239 VMALLOC_END - VMALLOC_START); 223 VMALLOC_END - VMALLOC_START);
240 224
241 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, " 225 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, "
242 "%dk reserved, %dk data, %dk init)\n", 226 "%dk data, %dk init)\n",
243 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 227 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
244 totalram_pages << (PAGE_SHIFT-10), 228 num_physpages << (PAGE_SHIFT-10),
245 codesize >> 10, 229 codesize >> 10,
246 reservedpages << (PAGE_SHIFT-10),
247 datasize >> 10, 230 datasize >> 10,
248 initsize >> 10); 231 initsize >> 10);
249 232
@@ -264,7 +247,9 @@ void free_initmem(void)
264 free_page(addr); 247 free_page(addr);
265 totalram_pages++; 248 totalram_pages++;
266 } 249 }
267 printk ("Freeing unused kernel memory: %dk freed\n", (&__init_end - &__init_begin) >> 10); 250 printk("Freeing unused kernel memory: %ldk freed\n",
251 ((unsigned long)&__init_end -
252 (unsigned long)&__init_begin) >> 10);
268} 253}
269 254
270#ifdef CONFIG_BLK_DEV_INITRD 255#ifdef CONFIG_BLK_DEV_INITRD
@@ -277,6 +262,50 @@ void free_initrd_mem(unsigned long start, unsigned long end)
277 free_page(p); 262 free_page(p);
278 totalram_pages++; 263 totalram_pages++;
279 } 264 }
280 printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); 265 printk("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
266}
267#endif
268
269#ifdef CONFIG_MEMORY_HOTPLUG
270void online_page(struct page *page)
271{
272 ClearPageReserved(page);
273 init_page_count(page);
274 __free_page(page);
275 totalram_pages++;
276 num_physpages++;
281} 277}
278
279int arch_add_memory(int nid, u64 start, u64 size)
280{
281 pg_data_t *pgdat;
282 unsigned long start_pfn = start >> PAGE_SHIFT;
283 unsigned long nr_pages = size >> PAGE_SHIFT;
284 int ret;
285
286 pgdat = NODE_DATA(nid);
287
288 /* We only have ZONE_NORMAL, so this is easy.. */
289 ret = __add_pages(pgdat->node_zones + ZONE_NORMAL, start_pfn, nr_pages);
290 if (unlikely(ret))
291 printk("%s: Failed, __add_pages() == %d\n", __FUNCTION__, ret);
292
293 return ret;
294}
295EXPORT_SYMBOL_GPL(arch_add_memory);
296
297int remove_memory(u64 start, u64 size)
298{
299 return -EINVAL;
300}
301EXPORT_SYMBOL_GPL(remove_memory);
302
303#ifdef CONFIG_NUMA
304int memory_add_physaddr_to_nid(u64 addr)
305{
306 /* Node 0 for now.. */
307 return 0;
308}
309EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
310#endif
282#endif 311#endif
diff --git a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c
index be03d74e99cb..0c7b7e33abdc 100644
--- a/arch/sh/mm/ioremap.c
+++ b/arch/sh/mm/ioremap.c
@@ -22,6 +22,7 @@
22#include <asm/addrspace.h> 22#include <asm/addrspace.h>
23#include <asm/cacheflush.h> 23#include <asm/cacheflush.h>
24#include <asm/tlbflush.h> 24#include <asm/tlbflush.h>
25#include <asm/mmu.h>
25 26
26/* 27/*
27 * Remap an arbitrary physical address space into the kernel virtual 28 * Remap an arbitrary physical address space into the kernel virtual
diff --git a/arch/sh/mm/numa.c b/arch/sh/mm/numa.c
new file mode 100644
index 000000000000..8aff065dd307
--- /dev/null
+++ b/arch/sh/mm/numa.c
@@ -0,0 +1,92 @@
1/*
2 * arch/sh/mm/numa.c - Multiple node support for SH machines
3 *
4 * Copyright (C) 2007 Paul Mundt
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#include <linux/module.h>
11#include <linux/bootmem.h>
12#include <linux/mm.h>
13#include <linux/numa.h>
14#include <linux/pfn.h>
15#include <asm/sections.h>
16
17static bootmem_data_t plat_node_bdata[MAX_NUMNODES];
18struct pglist_data *node_data[MAX_NUMNODES] __read_mostly;
19EXPORT_SYMBOL_GPL(node_data);
20
21/*
22 * On SH machines the conventional approach is to stash system RAM
23 * in node 0, and other memory blocks in to node 1 and up, ordered by
24 * latency. Each node's pgdat is node-local at the beginning of the node,
25 * immediately followed by the node mem map.
26 */
27void __init setup_memory(void)
28{
29 unsigned long free_pfn = PFN_UP(__pa(_end));
30
31 /*
32 * Node 0 sets up its pgdat at the first available pfn,
33 * and bumps it up before setting up the bootmem allocator.
34 */
35 NODE_DATA(0) = pfn_to_kaddr(free_pfn);
36 memset(NODE_DATA(0), 0, sizeof(struct pglist_data));
37 free_pfn += PFN_UP(sizeof(struct pglist_data));
38 NODE_DATA(0)->bdata = &plat_node_bdata[0];
39
40 /* Set up node 0 */
41 setup_bootmem_allocator(free_pfn);
42
43 /* Give the platforms a chance to hook up their nodes */
44 plat_mem_setup();
45}
46
47void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
48{
49 unsigned long bootmap_pages, bootmap_start, bootmap_size;
50 unsigned long start_pfn, free_pfn, end_pfn;
51
52 /* Don't allow bogus node assignment */
53 BUG_ON(nid > MAX_NUMNODES || nid == 0);
54
55 /*
56 * The free pfn starts at the beginning of the range, and is
57 * advanced as necessary for pgdat and node map allocations.
58 */
59 free_pfn = start_pfn = start >> PAGE_SHIFT;
60 end_pfn = end >> PAGE_SHIFT;
61
62 add_active_range(nid, start_pfn, end_pfn);
63
64 /* Node-local pgdat */
65 NODE_DATA(nid) = pfn_to_kaddr(free_pfn);
66 free_pfn += PFN_UP(sizeof(struct pglist_data));
67 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
68
69 NODE_DATA(nid)->bdata = &plat_node_bdata[nid];
70 NODE_DATA(nid)->node_start_pfn = start_pfn;
71 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn;
72
73 /* Node-local bootmap */
74 bootmap_pages = bootmem_bootmap_pages(end_pfn - start_pfn);
75 bootmap_start = (unsigned long)pfn_to_kaddr(free_pfn);
76 bootmap_size = init_bootmem_node(NODE_DATA(nid), free_pfn, start_pfn,
77 end_pfn);
78
79 free_bootmem_with_active_regions(nid, end_pfn);
80
81 /* Reserve the pgdat and bootmap space with the bootmem allocator */
82 reserve_bootmem_node(NODE_DATA(nid), start_pfn << PAGE_SHIFT,
83 sizeof(struct pglist_data));
84 reserve_bootmem_node(NODE_DATA(nid), free_pfn << PAGE_SHIFT,
85 bootmap_pages << PAGE_SHIFT);
86
87 /* It's up */
88 node_set_online(nid);
89
90 /* Kick sparsemem */
91 sparse_memory_present_with_active_regions(nid);
92}
diff --git a/arch/sh/mm/pg-dma.c b/arch/sh/mm/pg-dma.c
deleted file mode 100644
index bb23679369d6..000000000000
--- a/arch/sh/mm/pg-dma.c
+++ /dev/null
@@ -1,95 +0,0 @@
1/*
2 * arch/sh/mm/pg-dma.c
3 *
4 * Fast clear_page()/copy_page() implementation using the SH DMAC
5 *
6 * Copyright (C) 2003 Paul Mundt
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12#include <linux/init.h>
13#include <linux/kernel.h>
14#include <linux/module.h>
15#include <asm/semaphore.h>
16#include <asm/mmu_context.h>
17#include <asm/addrspace.h>
18#include <asm/atomic.h>
19#include <asm/page.h>
20#include <asm/dma.h>
21#include <asm/io.h>
22
23/* Channel to use for page ops, must be dual-address mode capable. */
24static int dma_channel = CONFIG_DMA_PAGE_OPS_CHANNEL;
25
26static void copy_page_dma(void *to, void *from)
27{
28 /*
29 * This doesn't seem to get triggered until further along in the
30 * boot process, at which point the DMAC is already initialized.
31 * Fix this in the same fashion as clear_page_dma() in the event
32 * that this crashes due to the DMAC not being initialized.
33 */
34
35 flush_icache_range((unsigned long)from, PAGE_SIZE);
36 dma_write_page(dma_channel, (unsigned long)from, (unsigned long)to);
37 dma_wait_for_completion(dma_channel);
38}
39
40static void clear_page_dma(void *to)
41{
42 /*
43 * We get invoked quite early on, if the DMAC hasn't been initialized
44 * yet, fall back on the slow manual implementation.
45 */
46 if (dma_info[dma_channel].chan != dma_channel) {
47 clear_page_slow(to);
48 return;
49 }
50
51 dma_write_page(dma_channel, (unsigned long)empty_zero_page,
52 (unsigned long)to);
53
54 /*
55 * FIXME: Something is a bit racy here, if we poll the counter right
56 * away, we seem to lock. flushing the page from the dcache doesn't
57 * seem to make a difference one way or the other, though either a full
58 * icache or dcache flush does.
59 *
60 * The location of this is important as well, and must happen prior to
61 * the completion loop but after the transfer was initiated.
62 *
63 * Oddly enough, this doesn't appear to be an issue for copy_page()..
64 */
65 flush_icache_range((unsigned long)to, PAGE_SIZE);
66
67 dma_wait_for_completion(dma_channel);
68}
69
70static int __init pg_dma_init(void)
71{
72 int ret;
73
74 ret = request_dma(dma_channel, "page ops");
75 if (ret != 0)
76 return ret;
77
78 copy_page = copy_page_dma;
79 clear_page = clear_page_dma;
80
81 return ret;
82}
83
84static void __exit pg_dma_exit(void)
85{
86 free_dma(dma_channel);
87}
88
89module_init(pg_dma_init);
90module_exit(pg_dma_exit);
91
92MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>");
93MODULE_DESCRIPTION("Optimized page copy/clear routines using a dual-address mode capable DMAC channel");
94MODULE_LICENSE("GPL");
95
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c
index b6a5a338145b..a08a4a958add 100644
--- a/arch/sh/mm/pmb.c
+++ b/arch/sh/mm/pmb.c
@@ -310,7 +310,7 @@ static int __init pmb_init(void)
310 BUG_ON(unlikely(nr_entries >= NR_PMB_ENTRIES)); 310 BUG_ON(unlikely(nr_entries >= NR_PMB_ENTRIES));
311 311
312 pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), 0, 312 pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), 0,
313 SLAB_PANIC, pmb_cache_ctor, NULL); 313 SLAB_PANIC, pmb_cache_ctor);
314 314
315 jump_to_P2(); 315 jump_to_P2();
316 316
diff --git a/arch/sh/tools/Makefile b/arch/sh/tools/Makefile
index 3c370a113291..567516b58acc 100644
--- a/arch/sh/tools/Makefile
+++ b/arch/sh/tools/Makefile
@@ -12,4 +12,5 @@
12 12
13include/asm-sh/machtypes.h: $(src)/gen-mach-types $(src)/mach-types 13include/asm-sh/machtypes.h: $(src)/gen-mach-types $(src)/mach-types
14 @echo ' Generating $@' 14 @echo ' Generating $@'
15 $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi
15 $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; } 16 $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
diff --git a/arch/sh/tools/mach-types b/arch/sh/tools/mach-types
index fb40f188aff9..4b5e9305092e 100644
--- a/arch/sh/tools/mach-types
+++ b/arch/sh/tools/mach-types
@@ -18,7 +18,6 @@ SE SH_SOLUTION_ENGINE
18HP6XX SH_HP6XX 18HP6XX SH_HP6XX
19HD64461 HD64461 19HD64461 HD64461
20HD64465 HD64465 20HD64465 HD64465
21SATURN SH_SATURN
22DREAMCAST SH_DREAMCAST 21DREAMCAST SH_DREAMCAST
23MPC1211 SH_MPC1211 22MPC1211 SH_MPC1211
24SNAPGEAR SH_SECUREEDGE5410 23SNAPGEAR SH_SECUREEDGE5410
@@ -34,3 +33,4 @@ R7785RP SH_R7785RP
34TITAN SH_TITAN 33TITAN SH_TITAN
35SHMIN SH_SHMIN 34SHMIN SH_SHMIN
367710VOIPGW SH_7710VOIPGW 357710VOIPGW SH_7710VOIPGW
36LBOXRE2 SH_LBOX_RE2
diff --git a/arch/sh64/configs/cayman_defconfig b/arch/sh64/configs/cayman_defconfig
index ed035084b053..784434143343 100644
--- a/arch/sh64/configs/cayman_defconfig
+++ b/arch/sh64/configs/cayman_defconfig
@@ -1,11 +1,12 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc1 3# Linux kernel version: 2.6.22
4# Mon May 14 08:43:31 2007 4# Fri Jul 20 12:28:34 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH64=y 7CONFIG_SUPERH64=y
8CONFIG_MMU=y 8CONFIG_MMU=y
9CONFIG_QUICKLIST=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 10CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_FIND_NEXT_BIT=y 11CONFIG_GENERIC_FIND_NEXT_BIT=y
11CONFIG_GENERIC_HWEIGHT=y 12CONFIG_GENERIC_HWEIGHT=y
@@ -32,7 +33,7 @@ CONFIG_SWAP=y
32CONFIG_POSIX_MQUEUE=y 33CONFIG_POSIX_MQUEUE=y
33# CONFIG_BSD_PROCESS_ACCT is not set 34# CONFIG_BSD_PROCESS_ACCT is not set
34# CONFIG_TASKSTATS is not set 35# CONFIG_TASKSTATS is not set
35# CONFIG_UTS_NS is not set 36# CONFIG_USER_NS is not set
36# CONFIG_AUDIT is not set 37# CONFIG_AUDIT is not set
37# CONFIG_IKCONFIG is not set 38# CONFIG_IKCONFIG is not set
38CONFIG_LOG_BUF_SHIFT=14 39CONFIG_LOG_BUF_SHIFT=14
@@ -66,19 +67,12 @@ CONFIG_SLAB=y
66CONFIG_RT_MUTEXES=y 67CONFIG_RT_MUTEXES=y
67# CONFIG_TINY_SHMEM is not set 68# CONFIG_TINY_SHMEM is not set
68CONFIG_BASE_SMALL=0 69CONFIG_BASE_SMALL=0
69
70#
71# Loadable module support
72#
73# CONFIG_MODULES is not set 70# CONFIG_MODULES is not set
74
75#
76# Block layer
77#
78CONFIG_BLOCK=y 71CONFIG_BLOCK=y
79# CONFIG_LBD is not set 72# CONFIG_LBD is not set
80# CONFIG_BLK_DEV_IO_TRACE is not set 73# CONFIG_BLK_DEV_IO_TRACE is not set
81# CONFIG_LSF is not set 74# CONFIG_LSF is not set
75# CONFIG_BLK_DEV_BSG is not set
82 76
83# 77#
84# IO Schedulers 78# IO Schedulers
@@ -156,6 +150,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
156CONFIG_SPLIT_PTLOCK_CPUS=4 150CONFIG_SPLIT_PTLOCK_CPUS=4
157# CONFIG_RESOURCES_64BIT is not set 151# CONFIG_RESOURCES_64BIT is not set
158CONFIG_ZONE_DMA_FLAG=0 152CONFIG_ZONE_DMA_FLAG=0
153CONFIG_NR_QUICK=1
154CONFIG_VIRT_TO_BUS=y
159 155
160# 156#
161# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 157# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
@@ -175,7 +171,6 @@ CONFIG_SH_PCIDMA_NONCOHERENT=y
175# Executable file formats 171# Executable file formats
176# 172#
177CONFIG_BINFMT_ELF=y 173CONFIG_BINFMT_ELF=y
178# CONFIG_BINFMT_FLAT is not set
179# CONFIG_BINFMT_MISC is not set 174# CONFIG_BINFMT_MISC is not set
180 175
181# 176#
@@ -225,20 +220,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
225# CONFIG_INET6_TUNNEL is not set 220# CONFIG_INET6_TUNNEL is not set
226# CONFIG_NETWORK_SECMARK is not set 221# CONFIG_NETWORK_SECMARK is not set
227# CONFIG_NETFILTER is not set 222# CONFIG_NETFILTER is not set
228
229#
230# DCCP Configuration (EXPERIMENTAL)
231#
232# CONFIG_IP_DCCP is not set 223# CONFIG_IP_DCCP is not set
233
234#
235# SCTP Configuration (EXPERIMENTAL)
236#
237# CONFIG_IP_SCTP is not set 224# CONFIG_IP_SCTP is not set
238
239#
240# TIPC Configuration (EXPERIMENTAL)
241#
242# CONFIG_TIPC is not set 225# CONFIG_TIPC is not set
243# CONFIG_ATM is not set 226# CONFIG_ATM is not set
244# CONFIG_BRIDGE is not set 227# CONFIG_BRIDGE is not set
@@ -274,6 +257,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
274# CONFIG_MAC80211 is not set 257# CONFIG_MAC80211 is not set
275# CONFIG_IEEE80211 is not set 258# CONFIG_IEEE80211 is not set
276# CONFIG_RFKILL is not set 259# CONFIG_RFKILL is not set
260# CONFIG_NET_9P is not set
277 261
278# 262#
279# Device Drivers 263# Device Drivers
@@ -288,26 +272,10 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
288# CONFIG_DEBUG_DRIVER is not set 272# CONFIG_DEBUG_DRIVER is not set
289# CONFIG_DEBUG_DEVRES is not set 273# CONFIG_DEBUG_DEVRES is not set
290# CONFIG_SYS_HYPERVISOR is not set 274# CONFIG_SYS_HYPERVISOR is not set
291
292#
293# Connector - unified userspace <-> kernelspace linker
294#
295# CONFIG_CONNECTOR is not set 275# CONFIG_CONNECTOR is not set
296# CONFIG_MTD is not set 276# CONFIG_MTD is not set
297
298#
299# Parallel port support
300#
301# CONFIG_PARPORT is not set 277# CONFIG_PARPORT is not set
302 278CONFIG_BLK_DEV=y
303#
304# Plug and Play support
305#
306# CONFIG_PNPACPI is not set
307
308#
309# Block devices
310#
311# CONFIG_BLK_CPQ_DA is not set 279# CONFIG_BLK_CPQ_DA is not set
312# CONFIG_BLK_CPQ_CISS_DA is not set 280# CONFIG_BLK_CPQ_CISS_DA is not set
313# CONFIG_BLK_DEV_DAC960 is not set 281# CONFIG_BLK_DEV_DAC960 is not set
@@ -323,18 +291,11 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
323CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 291CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
324# CONFIG_CDROM_PKTCDVD is not set 292# CONFIG_CDROM_PKTCDVD is not set
325# CONFIG_ATA_OVER_ETH is not set 293# CONFIG_ATA_OVER_ETH is not set
326 294CONFIG_MISC_DEVICES=y
327#
328# Misc devices
329#
330# CONFIG_PHANTOM is not set 295# CONFIG_PHANTOM is not set
296# CONFIG_EEPROM_93CX6 is not set
331# CONFIG_SGI_IOC4 is not set 297# CONFIG_SGI_IOC4 is not set
332# CONFIG_TIFM_CORE is not set 298# CONFIG_TIFM_CORE is not set
333# CONFIG_BLINK is not set
334
335#
336# ATA/ATAPI/MFM/RLL support
337#
338# CONFIG_IDE is not set 299# CONFIG_IDE is not set
339 300
340# 301#
@@ -342,6 +303,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
342# 303#
343# CONFIG_RAID_ATTRS is not set 304# CONFIG_RAID_ATTRS is not set
344CONFIG_SCSI=y 305CONFIG_SCSI=y
306CONFIG_SCSI_DMA=y
345# CONFIG_SCSI_TGT is not set 307# CONFIG_SCSI_TGT is not set
346# CONFIG_SCSI_NETLINK is not set 308# CONFIG_SCSI_NETLINK is not set
347CONFIG_SCSI_PROC_FS=y 309CONFIG_SCSI_PROC_FS=y
@@ -410,13 +372,8 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y
410# CONFIG_SCSI_DC390T is not set 372# CONFIG_SCSI_DC390T is not set
411# CONFIG_SCSI_NSP32 is not set 373# CONFIG_SCSI_NSP32 is not set
412# CONFIG_SCSI_DEBUG is not set 374# CONFIG_SCSI_DEBUG is not set
413# CONFIG_SCSI_ESP_CORE is not set
414# CONFIG_SCSI_SRP is not set 375# CONFIG_SCSI_SRP is not set
415# CONFIG_ATA is not set 376# CONFIG_ATA is not set
416
417#
418# Multi-device support (RAID and LVM)
419#
420# CONFIG_MD is not set 377# CONFIG_MD is not set
421 378
422# 379#
@@ -432,30 +389,16 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y
432# 389#
433# CONFIG_FIREWIRE is not set 390# CONFIG_FIREWIRE is not set
434# CONFIG_IEEE1394 is not set 391# CONFIG_IEEE1394 is not set
435
436#
437# I2O device support
438#
439# CONFIG_I2O is not set 392# CONFIG_I2O is not set
440
441#
442# Network device support
443#
444CONFIG_NETDEVICES=y 393CONFIG_NETDEVICES=y
394# CONFIG_NETDEVICES_MULTIQUEUE is not set
445# CONFIG_DUMMY is not set 395# CONFIG_DUMMY is not set
446# CONFIG_BONDING is not set 396# CONFIG_BONDING is not set
397# CONFIG_MACVLAN is not set
447# CONFIG_EQUALIZER is not set 398# CONFIG_EQUALIZER is not set
448# CONFIG_TUN is not set 399# CONFIG_TUN is not set
449
450#
451# ARCnet devices
452#
453# CONFIG_ARCNET is not set 400# CONFIG_ARCNET is not set
454# CONFIG_PHYLIB is not set 401# CONFIG_PHYLIB is not set
455
456#
457# Ethernet (10 or 100Mbit)
458#
459CONFIG_NET_ETHERNET=y 402CONFIG_NET_ETHERNET=y
460# CONFIG_MII is not set 403# CONFIG_MII is not set
461# CONFIG_STNIC is not set 404# CONFIG_STNIC is not set
@@ -464,10 +407,6 @@ CONFIG_NET_ETHERNET=y
464# CONFIG_CASSINI is not set 407# CONFIG_CASSINI is not set
465# CONFIG_NET_VENDOR_3COM is not set 408# CONFIG_NET_VENDOR_3COM is not set
466# CONFIG_SMC91X is not set 409# CONFIG_SMC91X is not set
467
468#
469# Tulip family network device support
470#
471CONFIG_NET_TULIP=y 410CONFIG_NET_TULIP=y
472# CONFIG_DE2104X is not set 411# CONFIG_DE2104X is not set
473CONFIG_TULIP=y 412CONFIG_TULIP=y
@@ -510,7 +449,6 @@ CONFIG_NETDEV_1000=y
510# CONFIG_SIS190 is not set 449# CONFIG_SIS190 is not set
511# CONFIG_SKGE is not set 450# CONFIG_SKGE is not set
512# CONFIG_SKY2 is not set 451# CONFIG_SKY2 is not set
513# CONFIG_SK98LIN is not set
514# CONFIG_VIA_VELOCITY is not set 452# CONFIG_VIA_VELOCITY is not set
515# CONFIG_TIGON3 is not set 453# CONFIG_TIGON3 is not set
516# CONFIG_BNX2 is not set 454# CONFIG_BNX2 is not set
@@ -524,11 +462,6 @@ CONFIG_NETDEV_10000=y
524# CONFIG_MYRI10GE is not set 462# CONFIG_MYRI10GE is not set
525# CONFIG_NETXEN_NIC is not set 463# CONFIG_NETXEN_NIC is not set
526# CONFIG_MLX4_CORE is not set 464# CONFIG_MLX4_CORE is not set
527CONFIG_MLX4_DEBUG=y
528
529#
530# Token Ring devices
531#
532# CONFIG_TR is not set 465# CONFIG_TR is not set
533 466
534# 467#
@@ -546,15 +479,7 @@ CONFIG_MLX4_DEBUG=y
546# CONFIG_NETCONSOLE is not set 479# CONFIG_NETCONSOLE is not set
547# CONFIG_NETPOLL is not set 480# CONFIG_NETPOLL is not set
548# CONFIG_NET_POLL_CONTROLLER is not set 481# CONFIG_NET_POLL_CONTROLLER is not set
549
550#
551# ISDN subsystem
552#
553# CONFIG_ISDN is not set 482# CONFIG_ISDN is not set
554
555#
556# Telephony Support
557#
558# CONFIG_PHONE is not set 483# CONFIG_PHONE is not set
559 484
560# 485#
@@ -562,6 +487,7 @@ CONFIG_MLX4_DEBUG=y
562# 487#
563CONFIG_INPUT=y 488CONFIG_INPUT=y
564# CONFIG_INPUT_FF_MEMLESS is not set 489# CONFIG_INPUT_FF_MEMLESS is not set
490# CONFIG_INPUT_POLLDEV is not set
565 491
566# 492#
567# Userland interfaces 493# Userland interfaces
@@ -638,10 +564,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
638CONFIG_UNIX98_PTYS=y 564CONFIG_UNIX98_PTYS=y
639CONFIG_LEGACY_PTYS=y 565CONFIG_LEGACY_PTYS=y
640CONFIG_LEGACY_PTY_COUNT=256 566CONFIG_LEGACY_PTY_COUNT=256
641
642#
643# IPMI
644#
645# CONFIG_IPMI_HANDLER is not set 567# CONFIG_IPMI_HANDLER is not set
646CONFIG_WATCHDOG=y 568CONFIG_WATCHDOG=y
647# CONFIG_WATCHDOG_NOWAYOUT is not set 569# CONFIG_WATCHDOG_NOWAYOUT is not set
@@ -658,15 +580,10 @@ CONFIG_WATCHDOG=y
658# CONFIG_PCIPCWATCHDOG is not set 580# CONFIG_PCIPCWATCHDOG is not set
659# CONFIG_WDTPCI is not set 581# CONFIG_WDTPCI is not set
660CONFIG_HW_RANDOM=y 582CONFIG_HW_RANDOM=y
661# CONFIG_GEN_RTC is not set
662# CONFIG_R3964 is not set 583# CONFIG_R3964 is not set
663# CONFIG_APPLICOM is not set 584# CONFIG_APPLICOM is not set
664# CONFIG_DRM is not set 585# CONFIG_DRM is not set
665# CONFIG_RAW_DRIVER is not set 586# CONFIG_RAW_DRIVER is not set
666
667#
668# TPM devices
669#
670# CONFIG_TCG_TPM is not set 587# CONFIG_TCG_TPM is not set
671CONFIG_DEVPORT=y 588CONFIG_DEVPORT=y
672# CONFIG_I2C is not set 589# CONFIG_I2C is not set
@@ -676,20 +593,24 @@ CONFIG_DEVPORT=y
676# 593#
677# CONFIG_SPI is not set 594# CONFIG_SPI is not set
678# CONFIG_SPI_MASTER is not set 595# CONFIG_SPI_MASTER is not set
679
680#
681# Dallas's 1-wire bus
682#
683# CONFIG_W1 is not set 596# CONFIG_W1 is not set
597# CONFIG_POWER_SUPPLY is not set
684CONFIG_HWMON=y 598CONFIG_HWMON=y
685# CONFIG_HWMON_VID is not set 599# CONFIG_HWMON_VID is not set
686# CONFIG_SENSORS_ABITUGURU is not set 600# CONFIG_SENSORS_ABITUGURU is not set
601# CONFIG_SENSORS_ABITUGURU3 is not set
687# CONFIG_SENSORS_F71805F is not set 602# CONFIG_SENSORS_F71805F is not set
603# CONFIG_SENSORS_IT87 is not set
604# CONFIG_SENSORS_PC87360 is not set
688# CONFIG_SENSORS_PC87427 is not set 605# CONFIG_SENSORS_PC87427 is not set
606# CONFIG_SENSORS_SIS5595 is not set
689# CONFIG_SENSORS_SMSC47M1 is not set 607# CONFIG_SENSORS_SMSC47M1 is not set
690# CONFIG_SENSORS_SMSC47B397 is not set 608# CONFIG_SENSORS_SMSC47B397 is not set
609# CONFIG_SENSORS_VIA686A is not set
691# CONFIG_SENSORS_VT1211 is not set 610# CONFIG_SENSORS_VT1211 is not set
611# CONFIG_SENSORS_VT8231 is not set
692# CONFIG_SENSORS_W83627HF is not set 612# CONFIG_SENSORS_W83627HF is not set
613# CONFIG_SENSORS_W83627EHF is not set
693# CONFIG_HWMON_DEBUG_CHIP is not set 614# CONFIG_HWMON_DEBUG_CHIP is not set
694 615
695# 616#
@@ -739,7 +660,6 @@ CONFIG_FB_MODE_HELPERS=y
739# CONFIG_FB_CYBER2000 is not set 660# CONFIG_FB_CYBER2000 is not set
740# CONFIG_FB_ASILIANT is not set 661# CONFIG_FB_ASILIANT is not set
741# CONFIG_FB_IMSTT is not set 662# CONFIG_FB_IMSTT is not set
742# CONFIG_FB_EPSON1355 is not set
743# CONFIG_FB_S1D13XXX is not set 663# CONFIG_FB_S1D13XXX is not set
744# CONFIG_FB_NVIDIA is not set 664# CONFIG_FB_NVIDIA is not set
745# CONFIG_FB_RIVA is not set 665# CONFIG_FB_RIVA is not set
@@ -765,6 +685,7 @@ CONFIG_FB_KYRO=y
765# 685#
766CONFIG_DUMMY_CONSOLE=y 686CONFIG_DUMMY_CONSOLE=y
767CONFIG_FRAMEBUFFER_CONSOLE=y 687CONFIG_FRAMEBUFFER_CONSOLE=y
688# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
768# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 689# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
769CONFIG_FONTS=y 690CONFIG_FONTS=y
770# CONFIG_FONT_8x8 is not set 691# CONFIG_FONT_8x8 is not set
@@ -789,16 +710,10 @@ CONFIG_LOGO_SUPERH_CLUT224=y
789# Sound 710# Sound
790# 711#
791# CONFIG_SOUND is not set 712# CONFIG_SOUND is not set
792 713CONFIG_HID_SUPPORT=y
793#
794# HID Devices
795#
796CONFIG_HID=y 714CONFIG_HID=y
797# CONFIG_HID_DEBUG is not set 715# CONFIG_HID_DEBUG is not set
798 716CONFIG_USB_SUPPORT=y
799#
800# USB support
801#
802CONFIG_USB_ARCH_HAS_HCD=y 717CONFIG_USB_ARCH_HAS_HCD=y
803CONFIG_USB_ARCH_HAS_OHCI=y 718CONFIG_USB_ARCH_HAS_OHCI=y
804CONFIG_USB_ARCH_HAS_EHCI=y 719CONFIG_USB_ARCH_HAS_EHCI=y
@@ -826,17 +741,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y
826# 741#
827# LED Triggers 742# LED Triggers
828# 743#
829
830#
831# InfiniBand support
832#
833# CONFIG_INFINIBAND is not set 744# CONFIG_INFINIBAND is not set
834 745
835# 746#
836# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
837#
838
839#
840# Real Time Clock 747# Real Time Clock
841# 748#
842# CONFIG_RTC_CLASS is not set 749# CONFIG_RTC_CLASS is not set
@@ -855,6 +762,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
855# 762#
856 763
857# 764#
765# Userspace I/O
766#
767# CONFIG_UIO is not set
768
769#
858# File systems 770# File systems
859# 771#
860CONFIG_EXT2_FS=y 772CONFIG_EXT2_FS=y
@@ -950,7 +862,6 @@ CONFIG_SUNRPC=y
950# CONFIG_NCP_FS is not set 862# CONFIG_NCP_FS is not set
951# CONFIG_CODA_FS is not set 863# CONFIG_CODA_FS is not set
952# CONFIG_AFS_FS is not set 864# CONFIG_AFS_FS is not set
953# CONFIG_9P_FS is not set
954 865
955# 866#
956# Partition Types 867# Partition Types
@@ -1001,6 +912,7 @@ CONFIG_DEBUG_FS=y
1001CONFIG_DEBUG_KERNEL=y 912CONFIG_DEBUG_KERNEL=y
1002# CONFIG_DEBUG_SHIRQ is not set 913# CONFIG_DEBUG_SHIRQ is not set
1003CONFIG_DETECT_SOFTLOCKUP=y 914CONFIG_DETECT_SOFTLOCKUP=y
915CONFIG_SCHED_DEBUG=y
1004CONFIG_SCHEDSTATS=y 916CONFIG_SCHEDSTATS=y
1005# CONFIG_TIMER_STATS is not set 917# CONFIG_TIMER_STATS is not set
1006# CONFIG_DEBUG_SLAB is not set 918# CONFIG_DEBUG_SLAB is not set
@@ -1017,7 +929,6 @@ CONFIG_DEBUG_BUGVERBOSE=y
1017# CONFIG_DEBUG_LIST is not set 929# CONFIG_DEBUG_LIST is not set
1018CONFIG_FRAME_POINTER=y 930CONFIG_FRAME_POINTER=y
1019CONFIG_FORCED_INLINING=y 931CONFIG_FORCED_INLINING=y
1020# CONFIG_RCU_TORTURE_TEST is not set
1021# CONFIG_FAULT_INJECTION is not set 932# CONFIG_FAULT_INJECTION is not set
1022# CONFIG_EARLY_PRINTK is not set 933# CONFIG_EARLY_PRINTK is not set
1023# CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set 934# CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set
@@ -1033,10 +944,6 @@ CONFIG_SH64_SR_WATCH=y
1033# 944#
1034# CONFIG_KEYS is not set 945# CONFIG_KEYS is not set
1035# CONFIG_SECURITY is not set 946# CONFIG_SECURITY is not set
1036
1037#
1038# Cryptographic options
1039#
1040# CONFIG_CRYPTO is not set 947# CONFIG_CRYPTO is not set
1041 948
1042# 949#
@@ -1047,6 +954,7 @@ CONFIG_BITREVERSE=y
1047# CONFIG_CRC16 is not set 954# CONFIG_CRC16 is not set
1048# CONFIG_CRC_ITU_T is not set 955# CONFIG_CRC_ITU_T is not set
1049CONFIG_CRC32=y 956CONFIG_CRC32=y
957# CONFIG_CRC7 is not set
1050# CONFIG_LIBCRC32C is not set 958# CONFIG_LIBCRC32C is not set
1051CONFIG_PLIST=y 959CONFIG_PLIST=y
1052CONFIG_HAS_IOMEM=y 960CONFIG_HAS_IOMEM=y
diff --git a/arch/sh64/kernel/head.S b/arch/sh64/kernel/head.S
index f3740ddbc471..186406d3ad9c 100644
--- a/arch/sh64/kernel/head.S
+++ b/arch/sh64/kernel/head.S
@@ -124,7 +124,7 @@ empty_bad_pte_table:
124fpu_in_use: .quad 0 124fpu_in_use: .quad 0
125 125
126 126
127 .section .text, "ax" 127 .section .text.head, "ax"
128 .balign L1_CACHE_BYTES 128 .balign L1_CACHE_BYTES
129/* 129/*
130 * Condition at the entry of __stext: 130 * Condition at the entry of __stext:
diff --git a/arch/sh64/kernel/pci_sh5.c b/arch/sh64/kernel/pci_sh5.c
index fb51660847c8..388bb711f1b0 100644
--- a/arch/sh64/kernel/pci_sh5.c
+++ b/arch/sh64/kernel/pci_sh5.c
@@ -48,7 +48,7 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d)
48} 48}
49DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases); 49DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases);
50 50
51char * __init pcibios_setup(char *str) 51char * __devinit pcibios_setup(char *str)
52{ 52{
53 return str; 53 return str;
54} 54}
@@ -497,7 +497,7 @@ static int __init pcibios_init(void)
497 497
498subsys_initcall(pcibios_init); 498subsys_initcall(pcibios_init);
499 499
500void __init pcibios_fixup_bus(struct pci_bus *bus) 500void __devinit pcibios_fixup_bus(struct pci_bus *bus)
501{ 501{
502 struct pci_dev *dev = bus->self; 502 struct pci_dev *dev = bus->self;
503 int i; 503 int i;
@@ -521,10 +521,10 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
521 bus->resource[0]->start = PCIBIOS_MIN_IO; 521 bus->resource[0]->start = PCIBIOS_MIN_IO;
522 bus->resource[1]->start = PCIBIOS_MIN_MEM; 522 bus->resource[1]->start = PCIBIOS_MIN_MEM;
523#else 523#else
524 bus->resource[0]->end = 0 524 bus->resource[0]->end = 0;
525 bus->resource[1]->end = 0 525 bus->resource[1]->end = 0;
526 bus->resource[0]->start =0 526 bus->resource[0]->start =0;
527 bus->resource[1]->start = 0; 527 bus->resource[1]->start = 0;
528#endif 528#endif
529 /* Turn off downstream PF memory address range by default */ 529 /* Turn off downstream PF memory address range by default */
530 bus->resource[2]->start = 1024*1024; 530 bus->resource[2]->start = 1024*1024;
diff --git a/arch/sh64/kernel/ptrace.c b/arch/sh64/kernel/ptrace.c
index 4e95e18b46d9..df06c6477468 100644
--- a/arch/sh64/kernel/ptrace.c
+++ b/arch/sh64/kernel/ptrace.c
@@ -129,17 +129,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
129 switch (request) { 129 switch (request) {
130 /* when I and D space are separate, these will need to be fixed. */ 130 /* when I and D space are separate, these will need to be fixed. */
131 case PTRACE_PEEKTEXT: /* read word at location addr. */ 131 case PTRACE_PEEKTEXT: /* read word at location addr. */
132 case PTRACE_PEEKDATA: { 132 case PTRACE_PEEKDATA:
133 unsigned long tmp; 133 ret = generic_ptrace_peekdata(child, addr, data);
134 int copied;
135
136 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
137 ret = -EIO;
138 if (copied != sizeof(tmp))
139 break;
140 ret = put_user(tmp,(unsigned long *) data);
141 break; 134 break;
142 }
143 135
144 /* read the word at location addr in the USER area. */ 136 /* read the word at location addr in the USER area. */
145 case PTRACE_PEEKUSR: { 137 case PTRACE_PEEKUSR: {
@@ -166,10 +158,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
166 /* when I and D space are separate, this will have to be fixed. */ 158 /* when I and D space are separate, this will have to be fixed. */
167 case PTRACE_POKETEXT: /* write the word at location addr. */ 159 case PTRACE_POKETEXT: /* write the word at location addr. */
168 case PTRACE_POKEDATA: 160 case PTRACE_POKEDATA:
169 ret = 0; 161 ret = generic_ptrace_pokedata(child, addr, data);
170 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
171 break;
172 ret = -EIO;
173 break; 162 break;
174 163
175 case PTRACE_POKEUSR: 164 case PTRACE_POKEUSR:
diff --git a/arch/sh64/kernel/signal.c b/arch/sh64/kernel/signal.c
index c8525ade0564..0bb4a8f94276 100644
--- a/arch/sh64/kernel/signal.c
+++ b/arch/sh64/kernel/signal.c
@@ -640,6 +640,7 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
640 if (regs->syscall_nr >= 0) { 640 if (regs->syscall_nr >= 0) {
641 /* If so, check system call restarting.. */ 641 /* If so, check system call restarting.. */
642 switch (regs->regs[REG_RET]) { 642 switch (regs->regs[REG_RET]) {
643 case -ERESTART_RESTARTBLOCK:
643 case -ERESTARTNOHAND: 644 case -ERESTARTNOHAND:
644 regs->regs[REG_RET] = -EINTR; 645 regs->regs[REG_RET] = -EINTR;
645 break; 646 break;
diff --git a/arch/sh64/kernel/syscalls.S b/arch/sh64/kernel/syscalls.S
index a5c680d29384..abb94c05d07a 100644
--- a/arch/sh64/kernel/syscalls.S
+++ b/arch/sh64/kernel/syscalls.S
@@ -378,3 +378,4 @@ sys_call_table:
378 .long sys_signalfd 378 .long sys_signalfd
379 .long sys_timerfd /* 350 */ 379 .long sys_timerfd /* 350 */
380 .long sys_eventfd 380 .long sys_eventfd
381 .long sys_fallocate
diff --git a/arch/sh64/kernel/vmlinux.lds.S b/arch/sh64/kernel/vmlinux.lds.S
index 02aea86c5907..267b4f9af2e1 100644
--- a/arch/sh64/kernel/vmlinux.lds.S
+++ b/arch/sh64/kernel/vmlinux.lds.S
@@ -54,6 +54,7 @@ SECTIONS
54 } = 0 54 } = 0
55 55
56 .text : C_PHYS(.text) { 56 .text : C_PHYS(.text) {
57 *(.text.head)
57 TEXT_TEXT 58 TEXT_TEXT
58 *(.text64) 59 *(.text64)
59 *(.text..SHmedia32) 60 *(.text..SHmedia32)
@@ -87,7 +88,10 @@ SECTIONS
87 88
88 . = ALIGN(PAGE_SIZE); 89 . = ALIGN(PAGE_SIZE);
89 __per_cpu_start = .; 90 __per_cpu_start = .;
90 .data.percpu : C_PHYS(.data.percpu) { *(.data.percpu) } 91 .data.percpu : C_PHYS(.data.percpu) {
92 *(.data.percpu)
93 *(.data.percpu.shared_aligned)
94 }
91 __per_cpu_end = . ; 95 __per_cpu_end = . ;
92 .data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) } 96 .data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) }
93 97
diff --git a/arch/sh64/lib/c-checksum.c b/arch/sh64/lib/c-checksum.c
index 4b2676380deb..bd5501760240 100644
--- a/arch/sh64/lib/c-checksum.c
+++ b/arch/sh64/lib/c-checksum.c
@@ -213,3 +213,4 @@ __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
213 213
214 return (__wsum)result; 214 return (__wsum)result;
215} 215}
216EXPORT_SYMBOL(csum_tcpudp_nofold);
diff --git a/arch/sh64/mm/fault.c b/arch/sh64/mm/fault.c
index 3cd93ba5d826..0d069d82141f 100644
--- a/arch/sh64/mm/fault.c
+++ b/arch/sh64/mm/fault.c
@@ -127,6 +127,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
127 struct vm_area_struct * vma; 127 struct vm_area_struct * vma;
128 const struct exception_table_entry *fixup; 128 const struct exception_table_entry *fixup;
129 pte_t *pte; 129 pte_t *pte;
130 int fault;
130 131
131#if defined(CONFIG_SH64_PROC_TLB) 132#if defined(CONFIG_SH64_PROC_TLB)
132 ++calls_to_do_slow_page_fault; 133 ++calls_to_do_slow_page_fault;
@@ -221,18 +222,19 @@ good_area:
221 * the fault. 222 * the fault.
222 */ 223 */
223survive: 224survive:
224 switch (handle_mm_fault(mm, vma, address, writeaccess)) { 225 fault = handle_mm_fault(mm, vma, address, writeaccess);
225 case VM_FAULT_MINOR: 226 if (unlikely(fault & VM_FAULT_ERROR)) {
226 tsk->min_flt++; 227 if (fault & VM_FAULT_OOM)
227 break; 228 goto out_of_memory;
228 case VM_FAULT_MAJOR: 229 else if (fault & VM_FAULT_SIGBUS)
229 tsk->maj_flt++; 230 goto do_sigbus;
230 break; 231 BUG();
231 case VM_FAULT_SIGBUS:
232 goto do_sigbus;
233 default:
234 goto out_of_memory;
235 } 232 }
233 if (fault & VM_FAULT_MAJOR)
234 tsk->maj_flt++;
235 else
236 tsk->min_flt++;
237
236 /* If we get here, the page fault has been handled. Do the TLB refill 238 /* If we get here, the page fault has been handled. Do the TLB refill
237 now from the newly-setup PTE, to avoid having to fault again right 239 now from the newly-setup PTE, to avoid having to fault again right
238 away on the same instruction. */ 240 away on the same instruction. */
diff --git a/arch/sh64/mm/ioremap.c b/arch/sh64/mm/ioremap.c
index ff26c02511aa..990857756d44 100644
--- a/arch/sh64/mm/ioremap.c
+++ b/arch/sh64/mm/ioremap.c
@@ -242,7 +242,7 @@ static void shmedia_free_io(struct resource *res)
242 release_resource(res); 242 release_resource(res);
243} 243}
244 244
245static void *sh64_get_page(void) 245static __init_refok void *sh64_get_page(void)
246{ 246{
247 extern int after_bootmem; 247 extern int after_bootmem;
248 void *page; 248 void *page;
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index fbcc00c6c06e..9d327ec59759 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -21,6 +21,12 @@ config GENERIC_ISA_DMA
21 bool 21 bool
22 default y 22 default y
23 23
24config ARCH_NO_VIRT_TO_BUS
25 def_bool y
26
27config OF
28 def_bool y
29
24source "init/Kconfig" 30source "init/Kconfig"
25 31
26menu "General machine setup" 32menu "General machine setup"
@@ -210,10 +216,16 @@ config PCI
210 CP-1200, JavaEngine-1, Corona, Red October, and Serengeti SGSC. 216 CP-1200, JavaEngine-1, Corona, Red October, and Serengeti SGSC.
211 All of these platforms are extremely obscure, so say N if unsure. 217 All of these platforms are extremely obscure, so say N if unsure.
212 218
219config PCI_SYSCALL
220 def_bool PCI
221
213source "drivers/pci/Kconfig" 222source "drivers/pci/Kconfig"
214 223
215endif 224endif
216 225
226config NO_DMA
227 def_bool !PCI
228
217config SUN_OPENPROMFS 229config SUN_OPENPROMFS
218 tristate "Openprom tree appears in /proc/openprom" 230 tristate "Openprom tree appears in /proc/openprom"
219 help 231 help
diff --git a/arch/sparc/kernel/ebus.c b/arch/sparc/kernel/ebus.c
index 7bb86b9cdaa3..ac352eb6dff3 100644
--- a/arch/sparc/kernel/ebus.c
+++ b/arch/sparc/kernel/ebus.c
@@ -148,6 +148,7 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d
148{ 148{
149 const struct linux_prom_registers *regs; 149 const struct linux_prom_registers *regs;
150 struct linux_ebus_child *child; 150 struct linux_ebus_child *child;
151 struct dev_archdata *sd;
151 const int *irqs; 152 const int *irqs;
152 int i, n, len; 153 int i, n, len;
153 unsigned long baseaddr; 154 unsigned long baseaddr;
@@ -234,6 +235,10 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d
234 } 235 }
235 } 236 }
236 237
238 sd = &dev->ofdev.dev.archdata;
239 sd->prom_node = dp;
240 sd->op = &dev->ofdev;
241
237 dev->ofdev.node = dp; 242 dev->ofdev.node = dp;
238 dev->ofdev.dev.parent = &dev->bus->ofdev.dev; 243 dev->ofdev.dev.parent = &dev->bus->ofdev.dev;
239 dev->ofdev.dev.bus = &ebus_bus_type; 244 dev->ofdev.dev.bus = &ebus_bus_type;
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S
index 831f540251f8..eac38388f5fd 100644
--- a/arch/sparc/kernel/entry.S
+++ b/arch/sparc/kernel/entry.S
@@ -1749,8 +1749,8 @@ fpload:
1749__ndelay: 1749__ndelay:
1750 save %sp, -STACKFRAME_SZ, %sp 1750 save %sp, -STACKFRAME_SZ, %sp
1751 mov %i0, %o0 1751 mov %i0, %o0
1752 call .umul 1752 call .umul ! round multiplier up so large ns ok
1753 mov 0x1ad, %o1 ! 2**32 / (1 000 000 000 / HZ) 1753 mov 0x1ae, %o1 ! 2**32 / (1 000 000 000 / HZ)
1754 call .umul 1754 call .umul
1755 mov %i1, %o1 ! udelay_val 1755 mov %i1, %o1 ! udelay_val
1756 ba delay_continue 1756 ba delay_continue
@@ -1760,11 +1760,17 @@ __ndelay:
1760__udelay: 1760__udelay:
1761 save %sp, -STACKFRAME_SZ, %sp 1761 save %sp, -STACKFRAME_SZ, %sp
1762 mov %i0, %o0 1762 mov %i0, %o0
1763 sethi %hi(0x10c6), %o1 1763 sethi %hi(0x10c7), %o1 ! round multiplier up so large us ok
1764 call .umul 1764 call .umul
1765 or %o1, %lo(0x10c6), %o1 ! 2**32 / 1 000 000 1765 or %o1, %lo(0x10c7), %o1 ! 2**32 / 1 000 000
1766 call .umul 1766 call .umul
1767 mov %i1, %o1 ! udelay_val 1767 mov %i1, %o1 ! udelay_val
1768 sethi %hi(0x028f4b62), %l0 ! Add in rounding constant * 2**32,
1769 or %g0, %lo(0x028f4b62), %l0
1770 addcc %o0, %l0, %o0 ! 2**32 * 0.009 999
1771 bcs,a 3f
1772 add %o1, 0x01, %o1
17733:
1768 call .umul 1774 call .umul
1769 mov HZ, %o0 ! >>32 earlier for wider range 1775 mov HZ, %o0 ! >>32 earlier for wider range
1770 1776
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index f257a67bcf93..75b2240ad0f9 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -47,6 +47,8 @@
47#include <asm/cacheflush.h> 47#include <asm/cacheflush.h>
48#include <asm/irq_regs.h> 48#include <asm/irq_regs.h>
49 49
50#include "irq.h"
51
50#ifdef CONFIG_SMP 52#ifdef CONFIG_SMP
51#define SMP_NOP2 "nop; nop;\n\t" 53#define SMP_NOP2 "nop; nop;\n\t"
52#define SMP_NOP3 "nop; nop; nop;\n\t" 54#define SMP_NOP3 "nop; nop; nop;\n\t"
@@ -268,7 +270,7 @@ void free_irq(unsigned int irq, void *dev_id)
268 kfree(action); 270 kfree(action);
269 271
270 if (!sparc_irq[cpu_irq].action) 272 if (!sparc_irq[cpu_irq].action)
271 disable_irq(irq); 273 __disable_irq(irq);
272 274
273out_unlock: 275out_unlock:
274 spin_unlock_irqrestore(&irq_action_lock, flags); 276 spin_unlock_irqrestore(&irq_action_lock, flags);
@@ -464,7 +466,7 @@ int request_fast_irq(unsigned int irq,
464 466
465 sparc_irq[cpu_irq].action = action; 467 sparc_irq[cpu_irq].action = action;
466 468
467 enable_irq(irq); 469 __enable_irq(irq);
468 470
469 ret = 0; 471 ret = 0;
470out_unlock: 472out_unlock:
@@ -544,7 +546,7 @@ int request_irq(unsigned int irq,
544 546
545 *actionp = action; 547 *actionp = action;
546 548
547 enable_irq(irq); 549 __enable_irq(irq);
548 550
549 ret = 0; 551 ret = 0;
550out_unlock: 552out_unlock:
@@ -555,6 +557,25 @@ out:
555 557
556EXPORT_SYMBOL(request_irq); 558EXPORT_SYMBOL(request_irq);
557 559
560void disable_irq_nosync(unsigned int irq)
561{
562 return __disable_irq(irq);
563}
564EXPORT_SYMBOL(disable_irq_nosync);
565
566void disable_irq(unsigned int irq)
567{
568 return __disable_irq(irq);
569}
570EXPORT_SYMBOL(disable_irq);
571
572void enable_irq(unsigned int irq)
573{
574 return __enable_irq(irq);
575}
576
577EXPORT_SYMBOL(enable_irq);
578
558/* We really don't need these at all on the Sparc. We only have 579/* We really don't need these at all on the Sparc. We only have
559 * stubs here because they are exported to modules. 580 * stubs here because they are exported to modules.
560 */ 581 */
diff --git a/arch/sparc/kernel/irq.h b/arch/sparc/kernel/irq.h
new file mode 100644
index 000000000000..32ef3ebd0a88
--- /dev/null
+++ b/arch/sparc/kernel/irq.h
@@ -0,0 +1,68 @@
1#include <asm/btfixup.h>
2
3/* Dave Redman (djhr@tadpole.co.uk)
4 * changed these to function pointers.. it saves cycles and will allow
5 * the irq dependencies to be split into different files at a later date
6 * sun4c_irq.c, sun4m_irq.c etc so we could reduce the kernel size.
7 * Jakub Jelinek (jj@sunsite.mff.cuni.cz)
8 * Changed these to btfixup entities... It saves cycles :)
9 */
10
11BTFIXUPDEF_CALL(void, disable_irq, unsigned int)
12BTFIXUPDEF_CALL(void, enable_irq, unsigned int)
13BTFIXUPDEF_CALL(void, disable_pil_irq, unsigned int)
14BTFIXUPDEF_CALL(void, enable_pil_irq, unsigned int)
15BTFIXUPDEF_CALL(void, clear_clock_irq, void)
16BTFIXUPDEF_CALL(void, clear_profile_irq, int)
17BTFIXUPDEF_CALL(void, load_profile_irq, int, unsigned int)
18
19static inline void __disable_irq(unsigned int irq)
20{
21 BTFIXUP_CALL(disable_irq)(irq);
22}
23
24static inline void __enable_irq(unsigned int irq)
25{
26 BTFIXUP_CALL(enable_irq)(irq);
27}
28
29static inline void disable_pil_irq(unsigned int irq)
30{
31 BTFIXUP_CALL(disable_pil_irq)(irq);
32}
33
34static inline void enable_pil_irq(unsigned int irq)
35{
36 BTFIXUP_CALL(enable_pil_irq)(irq);
37}
38
39static inline void clear_clock_irq(void)
40{
41 BTFIXUP_CALL(clear_clock_irq)();
42}
43
44static inline void clear_profile_irq(int irq)
45{
46 BTFIXUP_CALL(clear_profile_irq)(irq);
47}
48
49static inline void load_profile_irq(int cpu, int limit)
50{
51 BTFIXUP_CALL(load_profile_irq)(cpu, limit);
52}
53
54extern void (*sparc_init_timers)(irq_handler_t lvl10_irq);
55
56extern void claim_ticker14(irq_handler_t irq_handler,
57 int irq,
58 unsigned int timeout);
59
60#ifdef CONFIG_SMP
61BTFIXUPDEF_CALL(void, set_cpu_int, int, int)
62BTFIXUPDEF_CALL(void, clear_cpu_int, int, int)
63BTFIXUPDEF_CALL(void, set_irq_udt, int)
64
65#define set_cpu_int(cpu,level) BTFIXUP_CALL(set_cpu_int)(cpu,level)
66#define clear_cpu_int(cpu,level) BTFIXUP_CALL(clear_cpu_int)(cpu,level)
67#define set_irq_udt(cpu) BTFIXUP_CALL(set_irq_udt)(cpu)
68#endif
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c
index fd7f8cb668a3..36383f73d685 100644
--- a/arch/sparc/kernel/of_device.c
+++ b/arch/sparc/kernel/of_device.c
@@ -1,132 +1,13 @@
1#include <linux/string.h> 1#include <linux/string.h>
2#include <linux/kernel.h> 2#include <linux/kernel.h>
3#include <linux/of.h>
3#include <linux/init.h> 4#include <linux/init.h>
4#include <linux/module.h> 5#include <linux/module.h>
5#include <linux/mod_devicetable.h> 6#include <linux/mod_devicetable.h>
6#include <linux/slab.h> 7#include <linux/slab.h>
7 8#include <linux/errno.h>
8#include <asm/errno.h> 9#include <linux/of_device.h>
9#include <asm/of_device.h> 10#include <linux/of_platform.h>
10
11/**
12 * of_match_device - Tell if an of_device structure has a matching
13 * of_match structure
14 * @ids: array of of device match structures to search in
15 * @dev: the of device structure to match against
16 *
17 * Used by a driver to check whether an of_device present in the
18 * system is in its list of supported devices.
19 */
20const struct of_device_id *of_match_device(const struct of_device_id *matches,
21 const struct of_device *dev)
22{
23 if (!dev->node)
24 return NULL;
25 while (matches->name[0] || matches->type[0] || matches->compatible[0]) {
26 int match = 1;
27 if (matches->name[0])
28 match &= dev->node->name
29 && !strcmp(matches->name, dev->node->name);
30 if (matches->type[0])
31 match &= dev->node->type
32 && !strcmp(matches->type, dev->node->type);
33 if (matches->compatible[0])
34 match &= of_device_is_compatible(dev->node,
35 matches->compatible);
36 if (match)
37 return matches;
38 matches++;
39 }
40 return NULL;
41}
42
43static int of_platform_bus_match(struct device *dev, struct device_driver *drv)
44{
45 struct of_device * of_dev = to_of_device(dev);
46 struct of_platform_driver * of_drv = to_of_platform_driver(drv);
47 const struct of_device_id * matches = of_drv->match_table;
48
49 if (!matches)
50 return 0;
51
52 return of_match_device(matches, of_dev) != NULL;
53}
54
55struct of_device *of_dev_get(struct of_device *dev)
56{
57 struct device *tmp;
58
59 if (!dev)
60 return NULL;
61 tmp = get_device(&dev->dev);
62 if (tmp)
63 return to_of_device(tmp);
64 else
65 return NULL;
66}
67
68void of_dev_put(struct of_device *dev)
69{
70 if (dev)
71 put_device(&dev->dev);
72}
73
74
75static int of_device_probe(struct device *dev)
76{
77 int error = -ENODEV;
78 struct of_platform_driver *drv;
79 struct of_device *of_dev;
80 const struct of_device_id *match;
81
82 drv = to_of_platform_driver(dev->driver);
83 of_dev = to_of_device(dev);
84
85 if (!drv->probe)
86 return error;
87
88 of_dev_get(of_dev);
89
90 match = of_match_device(drv->match_table, of_dev);
91 if (match)
92 error = drv->probe(of_dev, match);
93 if (error)
94 of_dev_put(of_dev);
95
96 return error;
97}
98
99static int of_device_remove(struct device *dev)
100{
101 struct of_device * of_dev = to_of_device(dev);
102 struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
103
104 if (dev->driver && drv->remove)
105 drv->remove(of_dev);
106 return 0;
107}
108
109static int of_device_suspend(struct device *dev, pm_message_t state)
110{
111 struct of_device * of_dev = to_of_device(dev);
112 struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
113 int error = 0;
114
115 if (dev->driver && drv->suspend)
116 error = drv->suspend(of_dev, state);
117 return error;
118}
119
120static int of_device_resume(struct device * dev)
121{
122 struct of_device * of_dev = to_of_device(dev);
123 struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
124 int error = 0;
125
126 if (dev->driver && drv->resume)
127 error = drv->resume(of_dev);
128 return error;
129}
130 11
131static int node_match(struct device *dev, void *data) 12static int node_match(struct device *dev, void *data)
132{ 13{
@@ -138,7 +19,7 @@ static int node_match(struct device *dev, void *data)
138 19
139struct of_device *of_find_device_by_node(struct device_node *dp) 20struct of_device *of_find_device_by_node(struct device_node *dp)
140{ 21{
141 struct device *dev = bus_find_device(&of_bus_type, NULL, 22 struct device *dev = bus_find_device(&of_platform_bus_type, NULL,
142 dp, node_match); 23 dp, node_match);
143 24
144 if (dev) 25 if (dev)
@@ -149,38 +30,17 @@ struct of_device *of_find_device_by_node(struct device_node *dp)
149EXPORT_SYMBOL(of_find_device_by_node); 30EXPORT_SYMBOL(of_find_device_by_node);
150 31
151#ifdef CONFIG_PCI 32#ifdef CONFIG_PCI
152struct bus_type ebus_bus_type = { 33struct bus_type ebus_bus_type;
153 .name = "ebus",
154 .match = of_platform_bus_match,
155 .probe = of_device_probe,
156 .remove = of_device_remove,
157 .suspend = of_device_suspend,
158 .resume = of_device_resume,
159};
160EXPORT_SYMBOL(ebus_bus_type); 34EXPORT_SYMBOL(ebus_bus_type);
161#endif 35#endif
162 36
163#ifdef CONFIG_SBUS 37#ifdef CONFIG_SBUS
164struct bus_type sbus_bus_type = { 38struct bus_type sbus_bus_type;
165 .name = "sbus",
166 .match = of_platform_bus_match,
167 .probe = of_device_probe,
168 .remove = of_device_remove,
169 .suspend = of_device_suspend,
170 .resume = of_device_resume,
171};
172EXPORT_SYMBOL(sbus_bus_type); 39EXPORT_SYMBOL(sbus_bus_type);
173#endif 40#endif
174 41
175struct bus_type of_bus_type = { 42struct bus_type of_platform_bus_type;
176 .name = "of", 43EXPORT_SYMBOL(of_platform_bus_type);
177 .match = of_platform_bus_match,
178 .probe = of_device_probe,
179 .remove = of_device_remove,
180 .suspend = of_device_suspend,
181 .resume = of_device_resume,
182};
183EXPORT_SYMBOL(of_bus_type);
184 44
185static inline u64 of_read_addr(const u32 *cell, int size) 45static inline u64 of_read_addr(const u32 *cell, int size)
186{ 46{
@@ -560,11 +420,16 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
560{ 420{
561 struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL); 421 struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL);
562 const struct linux_prom_irqs *intr; 422 const struct linux_prom_irqs *intr;
423 struct dev_archdata *sd;
563 int len, i; 424 int len, i;
564 425
565 if (!op) 426 if (!op)
566 return NULL; 427 return NULL;
567 428
429 sd = &op->dev.archdata;
430 sd->prom_node = dp;
431 sd->op = op;
432
568 op->node = dp; 433 op->node = dp;
569 434
570 op->clock_freq = of_getintprop_default(dp, "clock-frequency", 435 op->clock_freq = of_getintprop_default(dp, "clock-frequency",
@@ -646,7 +511,7 @@ build_resources:
646 build_device_resources(op, parent); 511 build_device_resources(op, parent);
647 512
648 op->dev.parent = parent; 513 op->dev.parent = parent;
649 op->dev.bus = &of_bus_type; 514 op->dev.bus = &of_platform_bus_type;
650 if (!parent) 515 if (!parent)
651 strcpy(op->dev.bus_id, "root"); 516 strcpy(op->dev.bus_id, "root");
652 else 517 else
@@ -690,14 +555,14 @@ static int __init of_bus_driver_init(void)
690{ 555{
691 int err; 556 int err;
692 557
693 err = bus_register(&of_bus_type); 558 err = of_bus_type_init(&of_platform_bus_type, "of");
694#ifdef CONFIG_PCI 559#ifdef CONFIG_PCI
695 if (!err) 560 if (!err)
696 err = bus_register(&ebus_bus_type); 561 err = of_bus_type_init(&ebus_bus_type, "ebus");
697#endif 562#endif
698#ifdef CONFIG_SBUS 563#ifdef CONFIG_SBUS
699 if (!err) 564 if (!err)
700 err = bus_register(&sbus_bus_type); 565 err = of_bus_type_init(&sbus_bus_type, "sbus");
701#endif 566#endif
702 567
703 if (!err) 568 if (!err)
@@ -735,56 +600,6 @@ void of_unregister_driver(struct of_platform_driver *drv)
735 driver_unregister(&drv->driver); 600 driver_unregister(&drv->driver);
736} 601}
737 602
738
739static ssize_t dev_show_devspec(struct device *dev, struct device_attribute *attr, char *buf)
740{
741 struct of_device *ofdev;
742
743 ofdev = to_of_device(dev);
744 return sprintf(buf, "%s", ofdev->node->full_name);
745}
746
747static DEVICE_ATTR(devspec, S_IRUGO, dev_show_devspec, NULL);
748
749/**
750 * of_release_dev - free an of device structure when all users of it are finished.
751 * @dev: device that's been disconnected
752 *
753 * Will be called only by the device core when all users of this of device are
754 * done.
755 */
756void of_release_dev(struct device *dev)
757{
758 struct of_device *ofdev;
759
760 ofdev = to_of_device(dev);
761
762 kfree(ofdev);
763}
764
765int of_device_register(struct of_device *ofdev)
766{
767 int rc;
768
769 BUG_ON(ofdev->node == NULL);
770
771 rc = device_register(&ofdev->dev);
772 if (rc)
773 return rc;
774
775 rc = device_create_file(&ofdev->dev, &dev_attr_devspec);
776 if (rc)
777 device_unregister(&ofdev->dev);
778
779 return rc;
780}
781
782void of_device_unregister(struct of_device *ofdev)
783{
784 device_remove_file(&ofdev->dev, &dev_attr_devspec);
785 device_unregister(&ofdev->dev);
786}
787
788struct of_device* of_platform_device_create(struct device_node *np, 603struct of_device* of_platform_device_create(struct device_node *np,
789 const char *bus_id, 604 const char *bus_id,
790 struct device *parent, 605 struct device *parent,
@@ -810,12 +625,6 @@ struct of_device* of_platform_device_create(struct device_node *np,
810 return dev; 625 return dev;
811} 626}
812 627
813EXPORT_SYMBOL(of_match_device);
814EXPORT_SYMBOL(of_register_driver); 628EXPORT_SYMBOL(of_register_driver);
815EXPORT_SYMBOL(of_unregister_driver); 629EXPORT_SYMBOL(of_unregister_driver);
816EXPORT_SYMBOL(of_device_register);
817EXPORT_SYMBOL(of_device_unregister);
818EXPORT_SYMBOL(of_dev_get);
819EXPORT_SYMBOL(of_dev_put);
820EXPORT_SYMBOL(of_platform_device_create); 630EXPORT_SYMBOL(of_platform_device_create);
821EXPORT_SYMBOL(of_release_dev);
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
index 791771196905..f2eae457fc9a 100644
--- a/arch/sparc/kernel/pcic.c
+++ b/arch/sparc/kernel/pcic.c
@@ -36,6 +36,7 @@
36#include <asm/uaccess.h> 36#include <asm/uaccess.h>
37#include <asm/irq_regs.h> 37#include <asm/irq_regs.h>
38 38
39#include "irq.h"
39 40
40/* 41/*
41 * I studied different documents and many live PROMs both from 2.30 42 * I studied different documents and many live PROMs both from 2.30
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c
index 8c37f8f5adb7..33f7a3ddb104 100644
--- a/arch/sparc/kernel/process.c
+++ b/arch/sparc/kernel/process.c
@@ -39,6 +39,7 @@
39#include <asm/processor.h> 39#include <asm/processor.h>
40#include <asm/psr.h> 40#include <asm/psr.h>
41#include <asm/elf.h> 41#include <asm/elf.h>
42#include <asm/prom.h>
42#include <asm/unistd.h> 43#include <asm/unistd.h>
43 44
44/* 45/*
@@ -150,7 +151,7 @@ void machine_halt(void)
150 local_irq_enable(); 151 local_irq_enable();
151 mdelay(8); 152 mdelay(8);
152 local_irq_disable(); 153 local_irq_disable();
153 if (!serial_console && prom_palette) 154 if (prom_palette)
154 prom_palette (1); 155 prom_palette (1);
155 prom_halt(); 156 prom_halt();
156 panic("Halt failed!"); 157 panic("Halt failed!");
@@ -166,7 +167,7 @@ void machine_restart(char * cmd)
166 167
167 p = strchr (reboot_command, '\n'); 168 p = strchr (reboot_command, '\n');
168 if (p) *p = 0; 169 if (p) *p = 0;
169 if (!serial_console && prom_palette) 170 if (prom_palette)
170 prom_palette (1); 171 prom_palette (1);
171 if (cmd) 172 if (cmd)
172 prom_reboot(cmd); 173 prom_reboot(cmd);
@@ -179,7 +180,8 @@ void machine_restart(char * cmd)
179void machine_power_off(void) 180void machine_power_off(void)
180{ 181{
181#ifdef CONFIG_SUN_AUXIO 182#ifdef CONFIG_SUN_AUXIO
182 if (auxio_power_register && (!serial_console || scons_pwroff)) 183 if (auxio_power_register &&
184 (strcmp(of_console_device->type, "serial") || scons_pwroff))
183 *auxio_power_register |= AUXIO_POWER_OFF; 185 *auxio_power_register |= AUXIO_POWER_OFF;
184#endif 186#endif
185 machine_halt(); 187 machine_halt();
diff --git a/arch/sparc/kernel/prom.c b/arch/sparc/kernel/prom.c
index eed140b3c739..e3a537650db1 100644
--- a/arch/sparc/kernel/prom.c
+++ b/arch/sparc/kernel/prom.c
@@ -25,73 +25,9 @@
25#include <asm/prom.h> 25#include <asm/prom.h>
26#include <asm/oplib.h> 26#include <asm/oplib.h>
27 27
28static struct device_node *allnodes; 28extern struct device_node *allnodes; /* temporary while merging */
29 29
30/* use when traversing tree through the allnext, child, sibling, 30extern rwlock_t devtree_lock; /* temporary while merging */
31 * or parent members of struct device_node.
32 */
33static DEFINE_RWLOCK(devtree_lock);
34
35int of_device_is_compatible(const struct device_node *device,
36 const char *compat)
37{
38 const char* cp;
39 int cplen, l;
40
41 cp = of_get_property(device, "compatible", &cplen);
42 if (cp == NULL)
43 return 0;
44 while (cplen > 0) {
45 if (strncmp(cp, compat, strlen(compat)) == 0)
46 return 1;
47 l = strlen(cp) + 1;
48 cp += l;
49 cplen -= l;
50 }
51
52 return 0;
53}
54EXPORT_SYMBOL(of_device_is_compatible);
55
56struct device_node *of_get_parent(const struct device_node *node)
57{
58 struct device_node *np;
59
60 if (!node)
61 return NULL;
62
63 np = node->parent;
64
65 return np;
66}
67EXPORT_SYMBOL(of_get_parent);
68
69struct device_node *of_get_next_child(const struct device_node *node,
70 struct device_node *prev)
71{
72 struct device_node *next;
73
74 next = prev ? prev->sibling : node->child;
75 for (; next != 0; next = next->sibling) {
76 break;
77 }
78
79 return next;
80}
81EXPORT_SYMBOL(of_get_next_child);
82
83struct device_node *of_find_node_by_path(const char *path)
84{
85 struct device_node *np = allnodes;
86
87 for (; np != 0; np = np->allnext) {
88 if (np->full_name != 0 && strcmp(np->full_name, path) == 0)
89 break;
90 }
91
92 return np;
93}
94EXPORT_SYMBOL(of_find_node_by_path);
95 31
96struct device_node *of_find_node_by_phandle(phandle handle) 32struct device_node *of_find_node_by_phandle(phandle handle)
97{ 33{
@@ -105,81 +41,6 @@ struct device_node *of_find_node_by_phandle(phandle handle)
105} 41}
106EXPORT_SYMBOL(of_find_node_by_phandle); 42EXPORT_SYMBOL(of_find_node_by_phandle);
107 43
108struct device_node *of_find_node_by_name(struct device_node *from,
109 const char *name)
110{
111 struct device_node *np;
112
113 np = from ? from->allnext : allnodes;
114 for (; np != NULL; np = np->allnext)
115 if (np->name != NULL && strcmp(np->name, name) == 0)
116 break;
117
118 return np;
119}
120EXPORT_SYMBOL(of_find_node_by_name);
121
122struct device_node *of_find_node_by_type(struct device_node *from,
123 const char *type)
124{
125 struct device_node *np;
126
127 np = from ? from->allnext : allnodes;
128 for (; np != 0; np = np->allnext)
129 if (np->type != 0 && strcmp(np->type, type) == 0)
130 break;
131
132 return np;
133}
134EXPORT_SYMBOL(of_find_node_by_type);
135
136struct device_node *of_find_compatible_node(struct device_node *from,
137 const char *type, const char *compatible)
138{
139 struct device_node *np;
140
141 np = from ? from->allnext : allnodes;
142 for (; np != 0; np = np->allnext) {
143 if (type != NULL
144 && !(np->type != 0 && strcmp(np->type, type) == 0))
145 continue;
146 if (of_device_is_compatible(np, compatible))
147 break;
148 }
149
150 return np;
151}
152EXPORT_SYMBOL(of_find_compatible_node);
153
154struct property *of_find_property(const struct device_node *np,
155 const char *name,
156 int *lenp)
157{
158 struct property *pp;
159
160 for (pp = np->properties; pp != 0; pp = pp->next) {
161 if (strcasecmp(pp->name, name) == 0) {
162 if (lenp != 0)
163 *lenp = pp->length;
164 break;
165 }
166 }
167 return pp;
168}
169EXPORT_SYMBOL(of_find_property);
170
171/*
172 * Find a property with a given name for a given node
173 * and return the value.
174 */
175const void *of_get_property(const struct device_node *np, const char *name,
176 int *lenp)
177{
178 struct property *pp = of_find_property(np,name,lenp);
179 return pp ? pp->value : NULL;
180}
181EXPORT_SYMBOL(of_get_property);
182
183int of_getintprop_default(struct device_node *np, const char *name, int def) 44int of_getintprop_default(struct device_node *np, const char *name, int def)
184{ 45{
185 struct property *prop; 46 struct property *prop;
@@ -193,36 +54,6 @@ int of_getintprop_default(struct device_node *np, const char *name, int def)
193} 54}
194EXPORT_SYMBOL(of_getintprop_default); 55EXPORT_SYMBOL(of_getintprop_default);
195 56
196int of_n_addr_cells(struct device_node *np)
197{
198 const int* ip;
199 do {
200 if (np->parent)
201 np = np->parent;
202 ip = of_get_property(np, "#address-cells", NULL);
203 if (ip != NULL)
204 return *ip;
205 } while (np->parent);
206 /* No #address-cells property for the root node, default to 2 */
207 return 2;
208}
209EXPORT_SYMBOL(of_n_addr_cells);
210
211int of_n_size_cells(struct device_node *np)
212{
213 const int* ip;
214 do {
215 if (np->parent)
216 np = np->parent;
217 ip = of_get_property(np, "#size-cells", NULL);
218 if (ip != NULL)
219 return *ip;
220 } while (np->parent);
221 /* No #size-cells property for the root node, default to 1 */
222 return 1;
223}
224EXPORT_SYMBOL(of_n_size_cells);
225
226int of_set_property(struct device_node *dp, const char *name, void *val, int len) 57int of_set_property(struct device_node *dp, const char *name, void *val, int len)
227{ 58{
228 struct property **prevp; 59 struct property **prevp;
@@ -566,6 +397,135 @@ static struct device_node * __init build_tree(struct device_node *parent, phandl
566 return dp; 397 return dp;
567} 398}
568 399
400struct device_node *of_console_device;
401EXPORT_SYMBOL(of_console_device);
402
403char *of_console_path;
404EXPORT_SYMBOL(of_console_path);
405
406char *of_console_options;
407EXPORT_SYMBOL(of_console_options);
408
409extern void restore_current(void);
410
411static void __init of_console_init(void)
412{
413 char *msg = "OF stdout device is: %s\n";
414 struct device_node *dp;
415 unsigned long flags;
416 const char *type;
417 phandle node;
418 int skip, fd;
419
420 of_console_path = prom_early_alloc(256);
421
422 switch (prom_vers) {
423 case PROM_V0:
424 case PROM_SUN4:
425 skip = 0;
426 switch (*romvec->pv_stdout) {
427 case PROMDEV_SCREEN:
428 type = "display";
429 break;
430
431 case PROMDEV_TTYB:
432 skip = 1;
433 /* FALLTHRU */
434
435 case PROMDEV_TTYA:
436 type = "serial";
437 break;
438
439 default:
440 prom_printf("Invalid PROM_V0 stdout value %u\n",
441 *romvec->pv_stdout);
442 prom_halt();
443 }
444
445 for_each_node_by_type(dp, type) {
446 if (!skip--)
447 break;
448 }
449 if (!dp) {
450 prom_printf("Cannot find PROM_V0 console node.\n");
451 prom_halt();
452 }
453 of_console_device = dp;
454
455 strcpy(of_console_path, dp->full_name);
456 if (!strcmp(type, "serial")) {
457 strcat(of_console_path,
458 (skip ? ":b" : ":a"));
459 }
460 break;
461
462 default:
463 case PROM_V2:
464 case PROM_V3:
465 fd = *romvec->pv_v2bootargs.fd_stdout;
466
467 spin_lock_irqsave(&prom_lock, flags);
468 node = (*romvec->pv_v2devops.v2_inst2pkg)(fd);
469 restore_current();
470 spin_unlock_irqrestore(&prom_lock, flags);
471
472 if (!node) {
473 prom_printf("Cannot resolve stdout node from "
474 "instance %08x.\n", fd);
475 prom_halt();
476 }
477 dp = of_find_node_by_phandle(node);
478 type = of_get_property(dp, "device_type", NULL);
479
480 if (!type) {
481 prom_printf("Console stdout lacks "
482 "device_type property.\n");
483 prom_halt();
484 }
485
486 if (strcmp(type, "display") && strcmp(type, "serial")) {
487 prom_printf("Console device_type is neither display "
488 "nor serial.\n");
489 prom_halt();
490 }
491
492 of_console_device = dp;
493
494 if (prom_vers == PROM_V2) {
495 strcpy(of_console_path, dp->full_name);
496 switch (*romvec->pv_stdout) {
497 case PROMDEV_TTYA:
498 strcat(of_console_path, ":a");
499 break;
500 case PROMDEV_TTYB:
501 strcat(of_console_path, ":b");
502 break;
503 }
504 } else {
505 const char *path;
506
507 dp = of_find_node_by_path("/");
508 path = of_get_property(dp, "stdout-path", NULL);
509 if (!path) {
510 prom_printf("No stdout-path in root node.\n");
511 prom_halt();
512 }
513 strcpy(of_console_path, path);
514 }
515 break;
516 }
517
518 of_console_options = strrchr(of_console_path, ':');
519 if (of_console_options) {
520 of_console_options++;
521 if (*of_console_options == '\0')
522 of_console_options = NULL;
523 }
524
525 prom_printf(msg, of_console_path);
526 printk(msg, of_console_path);
527}
528
569void __init prom_build_devicetree(void) 529void __init prom_build_devicetree(void)
570{ 530{
571 struct device_node **nextp; 531 struct device_node **nextp;
@@ -578,6 +538,8 @@ void __init prom_build_devicetree(void)
578 allnodes->child = build_tree(allnodes, 538 allnodes->child = build_tree(allnodes,
579 prom_getchild(allnodes->node), 539 prom_getchild(allnodes->node),
580 &nextp); 540 &nextp);
541 of_console_init();
542
581 printk("PROM: Built device tree with %u bytes of memory.\n", 543 printk("PROM: Built device tree with %u bytes of memory.\n",
582 prom_early_allocated); 544 prom_early_allocated);
583} 545}
diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c
index 64c0ed98820a..f8228383895a 100644
--- a/arch/sparc/kernel/setup.c
+++ b/arch/sparc/kernel/setup.c
@@ -146,31 +146,6 @@ static void __init process_switch(char c)
146 } 146 }
147} 147}
148 148
149static void __init process_console(char *commands)
150{
151 serial_console = 0;
152 commands += 8;
153 /* Linux-style serial */
154 if (!strncmp(commands, "ttyS", 4))
155 serial_console = simple_strtoul(commands + 4, NULL, 10) + 1;
156 else if (!strncmp(commands, "tty", 3)) {
157 char c = *(commands + 3);
158 /* Solaris-style serial */
159 if (c == 'a' || c == 'b')
160 serial_console = c - 'a' + 1;
161 /* else Linux-style fbcon, not serial */
162 }
163#if defined(CONFIG_PROM_CONSOLE)
164 if (!strncmp(commands, "prom", 4)) {
165 char *p;
166
167 for (p = commands - 8; *p && *p != ' '; p++)
168 *p = ' ';
169 conswitchp = &prom_con;
170 }
171#endif
172}
173
174static void __init boot_flags_init(char *commands) 149static void __init boot_flags_init(char *commands)
175{ 150{
176 while (*commands) { 151 while (*commands) {
@@ -187,9 +162,7 @@ static void __init boot_flags_init(char *commands)
187 process_switch(*commands++); 162 process_switch(*commands++);
188 continue; 163 continue;
189 } 164 }
190 if (!strncmp(commands, "console=", 8)) { 165 if (!strncmp(commands, "mem=", 4)) {
191 process_console(commands);
192 } else if (!strncmp(commands, "mem=", 4)) {
193 /* 166 /*
194 * "mem=XXX[kKmM] overrides the PROM-reported 167 * "mem=XXX[kKmM] overrides the PROM-reported
195 * memory size. 168 * memory size.
@@ -341,41 +314,6 @@ void __init setup_arch(char **cmdline_p)
341 smp_setup_cpu_possible_map(); 314 smp_setup_cpu_possible_map();
342} 315}
343 316
344static int __init set_preferred_console(void)
345{
346 int idev, odev;
347
348 /* The user has requested a console so this is already set up. */
349 if (serial_console >= 0)
350 return -EBUSY;
351
352 idev = prom_query_input_device();
353 odev = prom_query_output_device();
354 if (idev == PROMDEV_IKBD && odev == PROMDEV_OSCREEN) {
355 serial_console = 0;
356 } else if (idev == PROMDEV_ITTYA && odev == PROMDEV_OTTYA) {
357 serial_console = 1;
358 } else if (idev == PROMDEV_ITTYB && odev == PROMDEV_OTTYB) {
359 serial_console = 2;
360 } else if (idev == PROMDEV_I_UNK && odev == PROMDEV_OTTYA) {
361 prom_printf("MrCoffee ttya\n");
362 serial_console = 1;
363 } else if (idev == PROMDEV_I_UNK && odev == PROMDEV_OSCREEN) {
364 serial_console = 0;
365 prom_printf("MrCoffee keyboard\n");
366 } else {
367 prom_printf("Confusing console (idev %d, odev %d)\n",
368 idev, odev);
369 serial_console = 1;
370 }
371
372 if (serial_console)
373 return add_preferred_console("ttyS", serial_console - 1, NULL);
374
375 return -ENODEV;
376}
377console_initcall(set_preferred_console);
378
379extern char *sparc_cpu_type; 317extern char *sparc_cpu_type;
380extern char *sparc_fpu_type; 318extern char *sparc_fpu_type;
381 319
@@ -461,7 +399,6 @@ void sun_do_break(void)
461 prom_cmdline(); 399 prom_cmdline();
462} 400}
463 401
464int serial_console = -1;
465int stop_a_enabled = 1; 402int stop_a_enabled = 1;
466 403
467static int __init topology_init(void) 404static int __init topology_init(void)
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c
index 4d9ad59031bb..6724ab90f82b 100644
--- a/arch/sparc/kernel/smp.c
+++ b/arch/sparc/kernel/smp.c
@@ -33,6 +33,8 @@
33#include <asm/tlbflush.h> 33#include <asm/tlbflush.h>
34#include <asm/cpudata.h> 34#include <asm/cpudata.h>
35 35
36#include "irq.h"
37
36int smp_num_cpus = 1; 38int smp_num_cpus = 1;
37volatile unsigned long cpu_callin_map[NR_CPUS] __initdata = {0,}; 39volatile unsigned long cpu_callin_map[NR_CPUS] __initdata = {0,};
38unsigned char boot_cpu_id = 0; 40unsigned char boot_cpu_id = 0;
@@ -68,16 +70,6 @@ void __cpuinit smp_store_cpu_info(int id)
68 cpu_data(id).prom_node = cpu_node; 70 cpu_data(id).prom_node = cpu_node;
69 cpu_data(id).mid = cpu_get_hwmid(cpu_node); 71 cpu_data(id).mid = cpu_get_hwmid(cpu_node);
70 72
71 /* this is required to tune the scheduler correctly */
72 /* is it possible to have CPUs with different cache sizes? */
73 if (id == boot_cpu_id) {
74 int cache_line,cache_nlines;
75 cache_line = 0x20;
76 cache_line = prom_getintdefault(cpu_node, "ecache-line-size", cache_line);
77 cache_nlines = 0x8000;
78 cache_nlines = prom_getintdefault(cpu_node, "ecache-nlines", cache_nlines);
79 max_cache_size = cache_line * cache_nlines;
80 }
81 if (cpu_data(id).mid < 0) 73 if (cpu_data(id).mid < 0)
82 panic("No MID found for CPU%d at node 0x%08d", id, cpu_node); 74 panic("No MID found for CPU%d at node 0x%08d", id, cpu_node);
83} 75}
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
index d8e008a04e2b..55bac516dfe2 100644
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -154,8 +154,6 @@ EXPORT_SYMBOL(BTFIXUP_CALL(___xchg32));
154#else 154#else
155EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id)); 155EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id));
156#endif 156#endif
157EXPORT_SYMBOL(BTFIXUP_CALL(enable_irq));
158EXPORT_SYMBOL(BTFIXUP_CALL(disable_irq));
159EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea)); 157EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea));
160EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea)); 158EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea));
161EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl)); 159EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl));
diff --git a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c
index 009e891a4329..c6ac9fc52563 100644
--- a/arch/sparc/kernel/sun4c_irq.c
+++ b/arch/sparc/kernel/sun4c_irq.c
@@ -18,6 +18,7 @@
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include "irq.h"
21 22
22#include <asm/ptrace.h> 23#include <asm/ptrace.h>
23#include <asm/processor.h> 24#include <asm/processor.h>
@@ -40,6 +41,20 @@ static struct resource sun4c_timer_eb = { "sun4c_timer" };
40static struct resource sun4c_intr_eb = { "sun4c_intr" }; 41static struct resource sun4c_intr_eb = { "sun4c_intr" };
41#endif 42#endif
42 43
44/*
45 * Bit field defines for the interrupt registers on various
46 * Sparc machines.
47 */
48
49/* The sun4c interrupt register. */
50#define SUN4C_INT_ENABLE 0x01 /* Allow interrupts. */
51#define SUN4C_INT_E14 0x80 /* Enable level 14 IRQ. */
52#define SUN4C_INT_E10 0x20 /* Enable level 10 IRQ. */
53#define SUN4C_INT_E8 0x10 /* Enable level 8 IRQ. */
54#define SUN4C_INT_E6 0x08 /* Enable level 6 IRQ. */
55#define SUN4C_INT_E4 0x04 /* Enable level 4 IRQ. */
56#define SUN4C_INT_E1 0x02 /* Enable level 1 IRQ. */
57
43/* Pointer to the interrupt enable byte 58/* Pointer to the interrupt enable byte
44 * 59 *
45 * Dave Redman (djhr@tadpole.co.uk) 60 * Dave Redman (djhr@tadpole.co.uk)
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index 396797e20c39..e0efab2a6bef 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -39,6 +39,8 @@
39#include <asm/cacheflush.h> 39#include <asm/cacheflush.h>
40#include <asm/irq_regs.h> 40#include <asm/irq_regs.h>
41 41
42#include "irq.h"
43
42/* If you trust current SCSI layer to handle different SCSI IRQs, enable this. I don't trust it... -jj */ 44/* If you trust current SCSI layer to handle different SCSI IRQs, enable this. I don't trust it... -jj */
43/* #define DISTRIBUTE_IRQS */ 45/* #define DISTRIBUTE_IRQS */
44 46
@@ -188,7 +190,7 @@ void sun4d_free_irq(unsigned int irq, void *dev_id)
188 kfree(action); 190 kfree(action);
189 191
190 if (!(*actionp)) 192 if (!(*actionp))
191 disable_irq(irq); 193 __disable_irq(irq);
192 194
193out_unlock: 195out_unlock:
194 spin_unlock_irqrestore(&irq_action_lock, flags); 196 spin_unlock_irqrestore(&irq_action_lock, flags);
@@ -346,7 +348,7 @@ int sun4d_request_irq(unsigned int irq,
346 else 348 else
347 *actionp = action; 349 *actionp = action;
348 350
349 enable_irq(irq); 351 __enable_irq(irq);
350 352
351 ret = 0; 353 ret = 0;
352out_unlock: 354out_unlock:
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c
index 098c94f1a322..89a6de95070c 100644
--- a/arch/sparc/kernel/sun4d_smp.c
+++ b/arch/sparc/kernel/sun4d_smp.c
@@ -36,6 +36,7 @@
36#include <asm/cacheflush.h> 36#include <asm/cacheflush.h>
37#include <asm/cpudata.h> 37#include <asm/cpudata.h>
38 38
39#include "irq.h"
39#define IRQ_CROSS_CALL 15 40#define IRQ_CROSS_CALL 15
40 41
41extern ctxd_t *srmmu_ctx_table_phys; 42extern ctxd_t *srmmu_ctx_table_phys;
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c
index 91a803ea88be..b92d6d2d5b04 100644
--- a/arch/sparc/kernel/sun4m_irq.c
+++ b/arch/sparc/kernel/sun4m_irq.c
@@ -38,11 +38,85 @@
38#include <asm/sbus.h> 38#include <asm/sbus.h>
39#include <asm/cacheflush.h> 39#include <asm/cacheflush.h>
40 40
41#include "irq.h"
42
43/* On the sun4m, just like the timers, we have both per-cpu and master
44 * interrupt registers.
45 */
46
47/* These registers are used for sending/receiving irqs from/to
48 * different cpu's.
49 */
50struct sun4m_intreg_percpu {
51 unsigned int tbt; /* Interrupts still pending for this cpu. */
52
53 /* These next two registers are WRITE-ONLY and are only
54 * "on bit" sensitive, "off bits" written have NO affect.
55 */
56 unsigned int clear; /* Clear this cpus irqs here. */
57 unsigned int set; /* Set this cpus irqs here. */
58 unsigned char space[PAGE_SIZE - 12];
59};
60
61/*
62 * djhr
63 * Actually the clear and set fields in this struct are misleading..
64 * according to the SLAVIO manual (and the same applies for the SEC)
65 * the clear field clears bits in the mask which will ENABLE that IRQ
66 * the set field sets bits in the mask to DISABLE the IRQ.
67 *
68 * Also the undirected_xx address in the SLAVIO is defined as
69 * RESERVED and write only..
70 *
71 * DAVEM_NOTE: The SLAVIO only specifies behavior on uniprocessor
72 * sun4m machines, for MP the layout makes more sense.
73 */
74struct sun4m_intregs {
75 struct sun4m_intreg_percpu cpu_intregs[SUN4M_NCPUS];
76 unsigned int tbt; /* IRQ's that are still pending. */
77 unsigned int irqs; /* Master IRQ bits. */
78
79 /* Again, like the above, two these registers are WRITE-ONLY. */
80 unsigned int clear; /* Clear master IRQ's by setting bits here. */
81 unsigned int set; /* Set master IRQ's by setting bits here. */
82
83 /* This register is both READ and WRITE. */
84 unsigned int undirected_target; /* Which cpu gets undirected irqs. */
85};
86
41static unsigned long dummy; 87static unsigned long dummy;
42 88
43struct sun4m_intregs *sun4m_interrupts; 89struct sun4m_intregs *sun4m_interrupts;
44unsigned long *irq_rcvreg = &dummy; 90unsigned long *irq_rcvreg = &dummy;
45 91
92/* Dave Redman (djhr@tadpole.co.uk)
93 * The sun4m interrupt registers.
94 */
95#define SUN4M_INT_ENABLE 0x80000000
96#define SUN4M_INT_E14 0x00000080
97#define SUN4M_INT_E10 0x00080000
98
99#define SUN4M_HARD_INT(x) (0x000000001 << (x))
100#define SUN4M_SOFT_INT(x) (0x000010000 << (x))
101
102#define SUN4M_INT_MASKALL 0x80000000 /* mask all interrupts */
103#define SUN4M_INT_MODULE_ERR 0x40000000 /* module error */
104#define SUN4M_INT_M2S_WRITE 0x20000000 /* write buffer error */
105#define SUN4M_INT_ECC 0x10000000 /* ecc memory error */
106#define SUN4M_INT_FLOPPY 0x00400000 /* floppy disk */
107#define SUN4M_INT_MODULE 0x00200000 /* module interrupt */
108#define SUN4M_INT_VIDEO 0x00100000 /* onboard video */
109#define SUN4M_INT_REALTIME 0x00080000 /* system timer */
110#define SUN4M_INT_SCSI 0x00040000 /* onboard scsi */
111#define SUN4M_INT_AUDIO 0x00020000 /* audio/isdn */
112#define SUN4M_INT_ETHERNET 0x00010000 /* onboard ethernet */
113#define SUN4M_INT_SERIAL 0x00008000 /* serial ports */
114#define SUN4M_INT_KBDMS 0x00004000 /* keyboard/mouse */
115#define SUN4M_INT_SBUSBITS 0x00003F80 /* sbus int bits */
116
117#define SUN4M_INT_SBUS(x) (1 << (x+7))
118#define SUN4M_INT_VME(x) (1 << (x))
119
46/* These tables only apply for interrupts greater than 15.. 120/* These tables only apply for interrupts greater than 15..
47 * 121 *
48 * any intr value below 0x10 is considered to be a soft-int 122 * any intr value below 0x10 is considered to be a soft-int
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c
index 63ed19bfd028..730eb5796f8e 100644
--- a/arch/sparc/kernel/sun4m_smp.c
+++ b/arch/sparc/kernel/sun4m_smp.c
@@ -31,6 +31,8 @@
31#include <asm/oplib.h> 31#include <asm/oplib.h>
32#include <asm/cpudata.h> 32#include <asm/cpudata.h>
33 33
34#include "irq.h"
35
34#define IRQ_RESCHEDULE 13 36#define IRQ_RESCHEDULE 13
35#define IRQ_STOP_CPU 14 37#define IRQ_STOP_CPU 14
36#define IRQ_CROSS_CALL 15 38#define IRQ_CROSS_CALL 15
diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S
index 90b52d4dab9a..55722840859c 100644
--- a/arch/sparc/kernel/systbls.S
+++ b/arch/sparc/kernel/systbls.S
@@ -1,8 +1,7 @@
1/* $Id: systbls.S,v 1.103 2002/02/08 03:57:14 davem Exp $ 1/* systbls.S: System call entry point tables for OS compatibility.
2 * systbls.S: System call entry point tables for OS compatibility.
3 * The native Linux system call table lives here also. 2 * The native Linux system call table lives here also.
4 * 3 *
5 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
6 * 5 *
7 * Based upon preliminary work which is: 6 * Based upon preliminary work which is:
8 * 7 *
@@ -80,7 +79,7 @@ sys_call_table:
80/*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare 79/*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare
81/*300*/ .long sys_set_robust_list, sys_get_robust_list, sys_migrate_pages, sys_mbind, sys_get_mempolicy 80/*300*/ .long sys_set_robust_list, sys_get_robust_list, sys_migrate_pages, sys_mbind, sys_get_mempolicy
82/*305*/ .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait 81/*305*/ .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait
83/*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd, sys_eventfd 82/*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd, sys_eventfd, sys_fallocate
84 83
85#ifdef CONFIG_SUNOS_EMUL 84#ifdef CONFIG_SUNOS_EMUL
86 /* Now the SunOS syscall table. */ 85 /* Now the SunOS syscall table. */
@@ -198,6 +197,6 @@ sunos_sys_table:
198 .long sunos_nosys, sunos_nosys, sunos_nosys 197 .long sunos_nosys, sunos_nosys, sunos_nosys
199 .long sunos_nosys 198 .long sunos_nosys
200/*310*/ .long sunos_nosys, sunos_nosys, sunos_nosys 199/*310*/ .long sunos_nosys, sunos_nosys, sunos_nosys
201 .long sunos_nosys 200 .long sunos_nosys, sunos_nosys
202 201
203#endif 202#endif
diff --git a/arch/sparc/kernel/tick14.c b/arch/sparc/kernel/tick14.c
index f1a7bd19e04f..707bfda86570 100644
--- a/arch/sparc/kernel/tick14.c
+++ b/arch/sparc/kernel/tick14.c
@@ -25,6 +25,8 @@
25#include <asm/irq.h> 25#include <asm/irq.h>
26#include <asm/io.h> 26#include <asm/io.h>
27 27
28#include "irq.h"
29
28extern unsigned long lvl14_save[5]; 30extern unsigned long lvl14_save[5];
29static unsigned long *linux_lvl14 = NULL; 31static unsigned long *linux_lvl14 = NULL;
30static unsigned long obp_lvl14[4]; 32static unsigned long obp_lvl14[4];
@@ -62,7 +64,7 @@ void claim_ticker14(irq_handler_t handler,
62 64
63 /* first we copy the obp handler instructions 65 /* first we copy the obp handler instructions
64 */ 66 */
65 disable_irq(irq_nr); 67 __disable_irq(irq_nr);
66 if (!handler) 68 if (!handler)
67 return; 69 return;
68 70
@@ -79,6 +81,6 @@ void claim_ticker14(irq_handler_t handler,
79 NULL)) { 81 NULL)) {
80 install_linux_ticker(); 82 install_linux_ticker();
81 load_profile_irq(cpu, timeout); 83 load_profile_irq(cpu, timeout);
82 enable_irq(irq_nr); 84 __enable_irq(irq_nr);
83 } 85 }
84} 86}
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c
index 7b4612da74a6..6a2513321620 100644
--- a/arch/sparc/kernel/time.c
+++ b/arch/sparc/kernel/time.c
@@ -44,6 +44,8 @@
44#include <asm/of_device.h> 44#include <asm/of_device.h>
45#include <asm/irq_regs.h> 45#include <asm/irq_regs.h>
46 46
47#include "irq.h"
48
47DEFINE_SPINLOCK(rtc_lock); 49DEFINE_SPINLOCK(rtc_lock);
48enum sparc_clock_type sp_clock_typ; 50enum sparc_clock_type sp_clock_typ;
49DEFINE_SPINLOCK(mostek_lock); 51DEFINE_SPINLOCK(mostek_lock);
@@ -354,7 +356,7 @@ static struct of_platform_driver clock_driver = {
354/* Probe for the mostek real time clock chip. */ 356/* Probe for the mostek real time clock chip. */
355static int __init clock_init(void) 357static int __init clock_init(void)
356{ 358{
357 return of_register_driver(&clock_driver, &of_bus_type); 359 return of_register_driver(&clock_driver, &of_platform_bus_type);
358} 360}
359 361
360/* Must be after subsys_initcall() so that busses are probed. Must 362/* Must be after subsys_initcall() so that busses are probed. Must
diff --git a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c
index dc9ffea2a4f7..3bc3bff51e08 100644
--- a/arch/sparc/kernel/traps.c
+++ b/arch/sparc/kernel/traps.c
@@ -101,6 +101,7 @@ void die_if_kernel(char *str, struct pt_regs *regs)
101 101
102 printk("%s(%d): %s [#%d]\n", current->comm, current->pid, str, ++die_counter); 102 printk("%s(%d): %s [#%d]\n", current->comm, current->pid, str, ++die_counter);
103 show_regs(regs); 103 show_regs(regs);
104 add_taint(TAINT_DIE);
104 105
105 __SAVE; __SAVE; __SAVE; __SAVE; 106 __SAVE; __SAVE; __SAVE; __SAVE;
106 __SAVE; __SAVE; __SAVE; __SAVE; 107 __SAVE; __SAVE; __SAVE; __SAVE;
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S
index f75a1b822789..47583887abc6 100644
--- a/arch/sparc/kernel/vmlinux.lds.S
+++ b/arch/sparc/kernel/vmlinux.lds.S
@@ -65,10 +65,7 @@ SECTIONS
65 __initramfs_end = .; 65 __initramfs_end = .;
66#endif 66#endif
67 67
68 . = ALIGN(4096); 68 PERCPU(4096)
69 __per_cpu_start = .;
70 .data.percpu : { *(.data.percpu) }
71 __per_cpu_end = .;
72 . = ALIGN(4096); 69 . = ALIGN(4096);
73 __init_end = .; 70 __init_end = .;
74 . = ALIGN(32); 71 . = ALIGN(32);
diff --git a/arch/sparc/mm/fault.c b/arch/sparc/mm/fault.c
index c3483365db4b..50747fe44356 100644
--- a/arch/sparc/mm/fault.c
+++ b/arch/sparc/mm/fault.c
@@ -226,6 +226,7 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
226 unsigned long g2; 226 unsigned long g2;
227 siginfo_t info; 227 siginfo_t info;
228 int from_user = !(regs->psr & PSR_PS); 228 int from_user = !(regs->psr & PSR_PS);
229 int fault;
229 230
230 if(text_fault) 231 if(text_fault)
231 address = regs->pc; 232 address = regs->pc;
@@ -289,19 +290,18 @@ good_area:
289 * make sure we exit gracefully rather than endlessly redo 290 * make sure we exit gracefully rather than endlessly redo
290 * the fault. 291 * the fault.
291 */ 292 */
292 switch (handle_mm_fault(mm, vma, address, write)) { 293 fault = handle_mm_fault(mm, vma, address, write);
293 case VM_FAULT_SIGBUS: 294 if (unlikely(fault & VM_FAULT_ERROR)) {
294 goto do_sigbus; 295 if (fault & VM_FAULT_OOM)
295 case VM_FAULT_OOM: 296 goto out_of_memory;
296 goto out_of_memory; 297 else if (fault & VM_FAULT_SIGBUS)
297 case VM_FAULT_MAJOR: 298 goto do_sigbus;
299 BUG();
300 }
301 if (fault & VM_FAULT_MAJOR)
298 current->maj_flt++; 302 current->maj_flt++;
299 break; 303 else
300 case VM_FAULT_MINOR:
301 default:
302 current->min_flt++; 304 current->min_flt++;
303 break;
304 }
305 up_read(&mm->mmap_sem); 305 up_read(&mm->mmap_sem);
306 return; 306 return;
307 307
diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c
index a532922e2e35..a1bef07755a9 100644
--- a/arch/sparc/mm/init.c
+++ b/arch/sparc/mm/init.c
@@ -308,6 +308,9 @@ extern void sun4c_paging_init(void);
308extern void srmmu_paging_init(void); 308extern void srmmu_paging_init(void);
309extern void device_scan(void); 309extern void device_scan(void);
310 310
311pgprot_t PAGE_SHARED __read_mostly;
312EXPORT_SYMBOL(PAGE_SHARED);
313
311void __init paging_init(void) 314void __init paging_init(void)
312{ 315{
313 switch(sparc_cpu_model) { 316 switch(sparc_cpu_model) {
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index e5eaa8072ae0..17b485f2825c 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -160,9 +160,6 @@ static inline int srmmu_pte_none(pte_t pte)
160static inline int srmmu_pte_present(pte_t pte) 160static inline int srmmu_pte_present(pte_t pte)
161{ return ((pte_val(pte) & SRMMU_ET_MASK) == SRMMU_ET_PTE); } 161{ return ((pte_val(pte) & SRMMU_ET_MASK) == SRMMU_ET_PTE); }
162 162
163static inline int srmmu_pte_read(pte_t pte)
164{ return !(pte_val(pte) & SRMMU_NOREAD); }
165
166static inline void srmmu_pte_clear(pte_t *ptep) 163static inline void srmmu_pte_clear(pte_t *ptep)
167{ srmmu_set_pte(ptep, __pte(0)); } 164{ srmmu_set_pte(ptep, __pte(0)); }
168 165
@@ -2157,7 +2154,7 @@ void __init ld_mmu_srmmu(void)
2157 BTFIXUPSET_SIMM13(ptrs_per_pgd, SRMMU_PTRS_PER_PGD); 2154 BTFIXUPSET_SIMM13(ptrs_per_pgd, SRMMU_PTRS_PER_PGD);
2158 2155
2159 BTFIXUPSET_INT(page_none, pgprot_val(SRMMU_PAGE_NONE)); 2156 BTFIXUPSET_INT(page_none, pgprot_val(SRMMU_PAGE_NONE));
2160 BTFIXUPSET_INT(page_shared, pgprot_val(SRMMU_PAGE_SHARED)); 2157 PAGE_SHARED = pgprot_val(SRMMU_PAGE_SHARED);
2161 BTFIXUPSET_INT(page_copy, pgprot_val(SRMMU_PAGE_COPY)); 2158 BTFIXUPSET_INT(page_copy, pgprot_val(SRMMU_PAGE_COPY));
2162 BTFIXUPSET_INT(page_readonly, pgprot_val(SRMMU_PAGE_RDONLY)); 2159 BTFIXUPSET_INT(page_readonly, pgprot_val(SRMMU_PAGE_RDONLY));
2163 BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL)); 2160 BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL));
@@ -2181,7 +2178,6 @@ void __init ld_mmu_srmmu(void)
2181 2178
2182 BTFIXUPSET_CALL(pte_present, srmmu_pte_present, BTFIXUPCALL_NORM); 2179 BTFIXUPSET_CALL(pte_present, srmmu_pte_present, BTFIXUPCALL_NORM);
2183 BTFIXUPSET_CALL(pte_clear, srmmu_pte_clear, BTFIXUPCALL_SWAPO0G0); 2180 BTFIXUPSET_CALL(pte_clear, srmmu_pte_clear, BTFIXUPCALL_SWAPO0G0);
2184 BTFIXUPSET_CALL(pte_read, srmmu_pte_read, BTFIXUPCALL_NORM);
2185 2181
2186 BTFIXUPSET_CALL(pmd_bad, srmmu_pmd_bad, BTFIXUPCALL_NORM); 2182 BTFIXUPSET_CALL(pmd_bad, srmmu_pmd_bad, BTFIXUPCALL_NORM);
2187 BTFIXUPSET_CALL(pmd_present, srmmu_pmd_present, BTFIXUPCALL_NORM); 2183 BTFIXUPSET_CALL(pmd_present, srmmu_pmd_present, BTFIXUPCALL_NORM);
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c
index 436021ceb2e7..a57a366e339a 100644
--- a/arch/sparc/mm/sun4c.c
+++ b/arch/sparc/mm/sun4c.c
@@ -1748,11 +1748,6 @@ static int sun4c_pte_present(pte_t pte)
1748} 1748}
1749static void sun4c_pte_clear(pte_t *ptep) { *ptep = __pte(0); } 1749static void sun4c_pte_clear(pte_t *ptep) { *ptep = __pte(0); }
1750 1750
1751static int sun4c_pte_read(pte_t pte)
1752{
1753 return (pte_val(pte) & _SUN4C_PAGE_READ);
1754}
1755
1756static int sun4c_pmd_bad(pmd_t pmd) 1751static int sun4c_pmd_bad(pmd_t pmd)
1757{ 1752{
1758 return (((pmd_val(pmd) & ~PAGE_MASK) != PGD_TABLE) || 1753 return (((pmd_val(pmd) & ~PAGE_MASK) != PGD_TABLE) ||
@@ -2160,7 +2155,7 @@ void __init ld_mmu_sun4c(void)
2160 BTFIXUPSET_SIMM13(user_ptrs_per_pgd, KERNBASE / SUN4C_PGDIR_SIZE); 2155 BTFIXUPSET_SIMM13(user_ptrs_per_pgd, KERNBASE / SUN4C_PGDIR_SIZE);
2161 2156
2162 BTFIXUPSET_INT(page_none, pgprot_val(SUN4C_PAGE_NONE)); 2157 BTFIXUPSET_INT(page_none, pgprot_val(SUN4C_PAGE_NONE));
2163 BTFIXUPSET_INT(page_shared, pgprot_val(SUN4C_PAGE_SHARED)); 2158 PAGE_SHARED = pgprot_val(SUN4C_PAGE_SHARED);
2164 BTFIXUPSET_INT(page_copy, pgprot_val(SUN4C_PAGE_COPY)); 2159 BTFIXUPSET_INT(page_copy, pgprot_val(SUN4C_PAGE_COPY));
2165 BTFIXUPSET_INT(page_readonly, pgprot_val(SUN4C_PAGE_READONLY)); 2160 BTFIXUPSET_INT(page_readonly, pgprot_val(SUN4C_PAGE_READONLY));
2166 BTFIXUPSET_INT(page_kernel, pgprot_val(SUN4C_PAGE_KERNEL)); 2161 BTFIXUPSET_INT(page_kernel, pgprot_val(SUN4C_PAGE_KERNEL));
@@ -2212,7 +2207,6 @@ void __init ld_mmu_sun4c(void)
2212 2207
2213 BTFIXUPSET_CALL(pte_present, sun4c_pte_present, BTFIXUPCALL_NORM); 2208 BTFIXUPSET_CALL(pte_present, sun4c_pte_present, BTFIXUPCALL_NORM);
2214 BTFIXUPSET_CALL(pte_clear, sun4c_pte_clear, BTFIXUPCALL_STG0O0); 2209 BTFIXUPSET_CALL(pte_clear, sun4c_pte_clear, BTFIXUPCALL_STG0O0);
2215 BTFIXUPSET_CALL(pte_read, sun4c_pte_read, BTFIXUPCALL_NORM);
2216 2210
2217 BTFIXUPSET_CALL(pmd_bad, sun4c_pmd_bad, BTFIXUPCALL_NORM); 2211 BTFIXUPSET_CALL(pmd_bad, sun4c_pmd_bad, BTFIXUPCALL_NORM);
2218 BTFIXUPSET_CALL(pmd_present, sun4c_pmd_present, BTFIXUPCALL_NORM); 2212 BTFIXUPSET_CALL(pmd_present, sun4c_pmd_present, BTFIXUPCALL_NORM);
diff --git a/arch/sparc/prom/console.c b/arch/sparc/prom/console.c
index 4e6e41d3291d..8d1cfb0d5068 100644
--- a/arch/sparc/prom/console.c
+++ b/arch/sparc/prom/console.c
@@ -102,119 +102,3 @@ prom_putchar(char c)
102 while(prom_nbputchar(c) == -1) ; 102 while(prom_nbputchar(c) == -1) ;
103 return; 103 return;
104} 104}
105
106/* Query for input device type */
107enum prom_input_device
108prom_query_input_device(void)
109{
110 unsigned long flags;
111 int st_p;
112 char propb[64];
113 char *p;
114 int propl;
115
116 switch(prom_vers) {
117 case PROM_V0:
118 case PROM_V2:
119 case PROM_SUN4:
120 default:
121 switch(*romvec->pv_stdin) {
122 case PROMDEV_KBD: return PROMDEV_IKBD;
123 case PROMDEV_TTYA: return PROMDEV_ITTYA;
124 case PROMDEV_TTYB: return PROMDEV_ITTYB;
125 default:
126 return PROMDEV_I_UNK;
127 };
128 case PROM_V3:
129 spin_lock_irqsave(&prom_lock, flags);
130 st_p = (*romvec->pv_v2devops.v2_inst2pkg)(*romvec->pv_v2bootargs.fd_stdin);
131 restore_current();
132 spin_unlock_irqrestore(&prom_lock, flags);
133 if(prom_node_has_property(st_p, "keyboard"))
134 return PROMDEV_IKBD;
135 if (prom_getproperty(st_p, "name", propb, sizeof(propb)) != -1) {
136 if(strncmp(propb, "keyboard", sizeof("serial")) == 0)
137 return PROMDEV_IKBD;
138 }
139 if (prom_getproperty(st_p, "device_type", propb, sizeof(propb)) != -1) {
140 if(strncmp(propb, "serial", sizeof("serial")))
141 return PROMDEV_I_UNK;
142 }
143 propl = prom_getproperty(prom_root_node, "stdin-path", propb, sizeof(propb));
144 if(propl > 2) {
145 p = propb;
146 while(*p) p++; p -= 2;
147 if(p[0] == ':') {
148 if(p[1] == 'a')
149 return PROMDEV_ITTYA;
150 else if(p[1] == 'b')
151 return PROMDEV_ITTYB;
152 }
153 }
154 return PROMDEV_I_UNK;
155 }
156}
157
158/* Query for output device type */
159
160enum prom_output_device
161prom_query_output_device(void)
162{
163 unsigned long flags;
164 int st_p;
165 char propb[64];
166 char *p;
167 int propl;
168
169 switch(prom_vers) {
170 case PROM_V0:
171 case PROM_SUN4:
172 switch(*romvec->pv_stdin) {
173 case PROMDEV_SCREEN: return PROMDEV_OSCREEN;
174 case PROMDEV_TTYA: return PROMDEV_OTTYA;
175 case PROMDEV_TTYB: return PROMDEV_OTTYB;
176 };
177 break;
178 case PROM_V2:
179 case PROM_V3:
180 spin_lock_irqsave(&prom_lock, flags);
181 st_p = (*romvec->pv_v2devops.v2_inst2pkg)(*romvec->pv_v2bootargs.fd_stdout);
182 restore_current();
183 spin_unlock_irqrestore(&prom_lock, flags);
184 propl = prom_getproperty(st_p, "device_type", propb, sizeof(propb));
185 if (propl == sizeof("display") &&
186 strncmp("display", propb, sizeof("display")) == 0)
187 {
188 return PROMDEV_OSCREEN;
189 }
190 if(prom_vers == PROM_V3) {
191 if(propl >= 0 &&
192 strncmp("serial", propb, sizeof("serial")) != 0)
193 return PROMDEV_O_UNK;
194 propl = prom_getproperty(prom_root_node, "stdout-path",
195 propb, sizeof(propb));
196 if(propl == CON_SIZE_JMC &&
197 strncmp(propb, con_name_jmc, CON_SIZE_JMC) == 0)
198 return PROMDEV_OTTYA;
199 if(propl > 2) {
200 p = propb;
201 while(*p) p++; p-= 2;
202 if(p[0]==':') {
203 if(p[1] == 'a')
204 return PROMDEV_OTTYA;
205 else if(p[1] == 'b')
206 return PROMDEV_OTTYB;
207 }
208 }
209 } else {
210 switch(*romvec->pv_stdin) {
211 case PROMDEV_TTYA: return PROMDEV_OTTYA;
212 case PROMDEV_TTYB: return PROMDEV_OTTYB;
213 };
214 }
215 break;
216 default:
217 ;
218 };
219 return PROMDEV_O_UNK;
220}
diff --git a/arch/sparc/prom/misc.c b/arch/sparc/prom/misc.c
index 1942c7c05cb1..37cff5f54704 100644
--- a/arch/sparc/prom/misc.c
+++ b/arch/sparc/prom/misc.c
@@ -58,7 +58,7 @@ prom_cmdline(void)
58 extern void install_linux_ticker(void); 58 extern void install_linux_ticker(void);
59 unsigned long flags; 59 unsigned long flags;
60 60
61 if(!serial_console && prom_palette) 61 if (prom_palette)
62 prom_palette (1); 62 prom_palette (1);
63 spin_lock_irqsave(&prom_lock, flags); 63 spin_lock_irqsave(&prom_lock, flags);
64 install_obp_ticker(); 64 install_obp_ticker();
@@ -69,7 +69,7 @@ prom_cmdline(void)
69#ifdef CONFIG_SUN_AUXIO 69#ifdef CONFIG_SUN_AUXIO
70 set_auxio(AUXIO_LED, 0); 70 set_auxio(AUXIO_LED, 0);
71#endif 71#endif
72 if(!serial_console && prom_palette) 72 if (prom_palette)
73 prom_palette (0); 73 prom_palette (0);
74} 74}
75 75
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index bd00f89eed1e..33dabf588bdd 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -23,6 +23,10 @@ config GENERIC_TIME
23 bool 23 bool
24 default y 24 default y
25 25
26config GENERIC_CMOS_UPDATE
27 bool
28 default y
29
26config GENERIC_CLOCKEVENTS 30config GENERIC_CLOCKEVENTS
27 bool 31 bool
28 default y 32 default y
@@ -62,6 +66,12 @@ config AUDIT_ARCH
62 bool 66 bool
63 default y 67 default y
64 68
69config ARCH_NO_VIRT_TO_BUS
70 def_bool y
71
72config OF
73 def_bool y
74
65choice 75choice
66 prompt "Kernel page size" 76 prompt "Kernel page size"
67 default SPARC64_PAGE_SIZE_8KB 77 default SPARC64_PAGE_SIZE_8KB
@@ -108,6 +118,15 @@ config SECCOMP
108 118
109source kernel/Kconfig.hz 119source kernel/Kconfig.hz
110 120
121config HOTPLUG_CPU
122 bool "Support for hot-pluggable CPUs"
123 depends on SMP
124 select HOTPLUG
125 ---help---
126 Say Y here to experiment with turning CPUs off and on. CPUs
127 can be controlled through /sys/devices/system/cpu/cpu#.
128 Say N if you want to disable CPU hotplug.
129
111source "init/Kconfig" 130source "init/Kconfig"
112 131
113config SYSVIPC_COMPAT 132config SYSVIPC_COMPAT
@@ -305,6 +324,12 @@ config SUN_IO
305 bool 324 bool
306 default y 325 default y
307 326
327config SUN_LDOMS
328 bool "Sun Logical Domains support"
329 help
330 Say Y here is you want to support virtual devices via
331 Logical Domains.
332
308config PCI 333config PCI
309 bool "PCI support" 334 bool "PCI support"
310 select ARCH_SUPPORTS_MSI 335 select ARCH_SUPPORTS_MSI
@@ -320,8 +345,10 @@ config PCI
320 doesn't. 345 doesn't.
321 346
322config PCI_DOMAINS 347config PCI_DOMAINS
323 bool 348 def_bool PCI
324 default PCI 349
350config PCI_SYSCALL
351 def_bool PCI
325 352
326source "drivers/pci/Kconfig" 353source "drivers/pci/Kconfig"
327 354
@@ -396,6 +423,15 @@ config SCHED_SMT
396 when dealing with UltraSPARC cpus at a cost of slightly increased 423 when dealing with UltraSPARC cpus at a cost of slightly increased
397 overhead in some places. If unsure say N here. 424 overhead in some places. If unsure say N here.
398 425
426config SCHED_MC
427 bool "Multi-core scheduler support"
428 depends on SMP
429 default y
430 help
431 Multi-core scheduler support improves the CPU scheduler's decision
432 making when dealing with multi-core CPU chips at a cost of slightly
433 increased overhead in some places. If unsure say N here.
434
399source "kernel/Kconfig.preempt" 435source "kernel/Kconfig.preempt"
400 436
401config CMDLINE_BOOL 437config CMDLINE_BOOL
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig
index 65840a62bb9c..10e301970a44 100644
--- a/arch/sparc64/defconfig
+++ b/arch/sparc64/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.22-rc1 3# Linux kernel version: 2.6.22
4# Mon May 14 04:17:48 2007 4# Thu Jul 19 21:30:37 2007
5# 5#
6CONFIG_SPARC=y 6CONFIG_SPARC=y
7CONFIG_SPARC64=y 7CONFIG_SPARC64=y
@@ -16,6 +16,7 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
16# CONFIG_ARCH_HAS_ILOG2_U32 is not set 16# CONFIG_ARCH_HAS_ILOG2_U32 is not set
17# CONFIG_ARCH_HAS_ILOG2_U64 is not set 17# CONFIG_ARCH_HAS_ILOG2_U64 is not set
18CONFIG_AUDIT_ARCH=y 18CONFIG_AUDIT_ARCH=y
19CONFIG_ARCH_NO_VIRT_TO_BUS=y
19CONFIG_SPARC64_PAGE_SIZE_8KB=y 20CONFIG_SPARC64_PAGE_SIZE_8KB=y
20# CONFIG_SPARC64_PAGE_SIZE_64KB is not set 21# CONFIG_SPARC64_PAGE_SIZE_64KB is not set
21# CONFIG_SPARC64_PAGE_SIZE_512KB is not set 22# CONFIG_SPARC64_PAGE_SIZE_512KB is not set
@@ -42,12 +43,11 @@ CONFIG_LOCALVERSION=""
42# CONFIG_LOCALVERSION_AUTO is not set 43# CONFIG_LOCALVERSION_AUTO is not set
43CONFIG_SWAP=y 44CONFIG_SWAP=y
44CONFIG_SYSVIPC=y 45CONFIG_SYSVIPC=y
45# CONFIG_IPC_NS is not set
46CONFIG_SYSVIPC_SYSCTL=y 46CONFIG_SYSVIPC_SYSCTL=y
47CONFIG_POSIX_MQUEUE=y 47CONFIG_POSIX_MQUEUE=y
48# CONFIG_BSD_PROCESS_ACCT is not set 48# CONFIG_BSD_PROCESS_ACCT is not set
49# CONFIG_TASKSTATS is not set 49# CONFIG_TASKSTATS is not set
50# CONFIG_UTS_NS is not set 50# CONFIG_USER_NS is not set
51# CONFIG_AUDIT is not set 51# CONFIG_AUDIT is not set
52# CONFIG_IKCONFIG is not set 52# CONFIG_IKCONFIG is not set
53CONFIG_LOG_BUF_SHIFT=18 53CONFIG_LOG_BUF_SHIFT=18
@@ -82,22 +82,15 @@ CONFIG_SLUB=y
82CONFIG_RT_MUTEXES=y 82CONFIG_RT_MUTEXES=y
83# CONFIG_TINY_SHMEM is not set 83# CONFIG_TINY_SHMEM is not set
84CONFIG_BASE_SMALL=0 84CONFIG_BASE_SMALL=0
85
86#
87# Loadable module support
88#
89CONFIG_MODULES=y 85CONFIG_MODULES=y
90CONFIG_MODULE_UNLOAD=y 86CONFIG_MODULE_UNLOAD=y
91CONFIG_MODULE_FORCE_UNLOAD=y 87CONFIG_MODULE_FORCE_UNLOAD=y
92CONFIG_MODVERSIONS=y 88CONFIG_MODVERSIONS=y
93CONFIG_MODULE_SRCVERSION_ALL=y 89CONFIG_MODULE_SRCVERSION_ALL=y
94CONFIG_KMOD=y 90CONFIG_KMOD=y
95
96#
97# Block layer
98#
99CONFIG_BLOCK=y 91CONFIG_BLOCK=y
100CONFIG_BLK_DEV_IO_TRACE=y 92CONFIG_BLK_DEV_IO_TRACE=y
93CONFIG_BLK_DEV_BSG=y
101 94
102# 95#
103# IO Schedulers 96# IO Schedulers
@@ -160,8 +153,10 @@ CONFIG_SBUS=y
160CONFIG_SBUSCHAR=y 153CONFIG_SBUSCHAR=y
161CONFIG_SUN_AUXIO=y 154CONFIG_SUN_AUXIO=y
162CONFIG_SUN_IO=y 155CONFIG_SUN_IO=y
156# CONFIG_SUN_LDOMS is not set
163CONFIG_PCI=y 157CONFIG_PCI=y
164CONFIG_PCI_DOMAINS=y 158CONFIG_PCI_DOMAINS=y
159CONFIG_PCI_SYSCALL=y
165CONFIG_ARCH_SUPPORTS_MSI=y 160CONFIG_ARCH_SUPPORTS_MSI=y
166CONFIG_PCI_MSI=y 161CONFIG_PCI_MSI=y
167# CONFIG_PCI_DEBUG is not set 162# CONFIG_PCI_DEBUG is not set
@@ -246,10 +241,6 @@ CONFIG_IPV6_TUNNEL=m
246# CONFIG_IPV6_MULTIPLE_TABLES is not set 241# CONFIG_IPV6_MULTIPLE_TABLES is not set
247# CONFIG_NETWORK_SECMARK is not set 242# CONFIG_NETWORK_SECMARK is not set
248# CONFIG_NETFILTER is not set 243# CONFIG_NETFILTER is not set
249
250#
251# DCCP Configuration (EXPERIMENTAL)
252#
253CONFIG_IP_DCCP=m 244CONFIG_IP_DCCP=m
254CONFIG_INET_DCCP_DIAG=m 245CONFIG_INET_DCCP_DIAG=m
255CONFIG_IP_DCCP_ACKVEC=y 246CONFIG_IP_DCCP_ACKVEC=y
@@ -269,15 +260,7 @@ CONFIG_IP_DCCP_CCID3_RTO=100
269# 260#
270# CONFIG_IP_DCCP_DEBUG is not set 261# CONFIG_IP_DCCP_DEBUG is not set
271# CONFIG_NET_DCCPPROBE is not set 262# CONFIG_NET_DCCPPROBE is not set
272
273#
274# SCTP Configuration (EXPERIMENTAL)
275#
276# CONFIG_IP_SCTP is not set 263# CONFIG_IP_SCTP is not set
277
278#
279# TIPC Configuration (EXPERIMENTAL)
280#
281# CONFIG_TIPC is not set 264# CONFIG_TIPC is not set
282# CONFIG_ATM is not set 265# CONFIG_ATM is not set
283# CONFIG_BRIDGE is not set 266# CONFIG_BRIDGE is not set
@@ -314,6 +297,7 @@ CONFIG_NET_TCPPROBE=m
314# CONFIG_MAC80211 is not set 297# CONFIG_MAC80211 is not set
315# CONFIG_IEEE80211 is not set 298# CONFIG_IEEE80211 is not set
316# CONFIG_RFKILL is not set 299# CONFIG_RFKILL is not set
300# CONFIG_NET_9P is not set
317 301
318# 302#
319# Device Drivers 303# Device Drivers
@@ -328,28 +312,11 @@ CONFIG_FW_LOADER=y
328# CONFIG_DEBUG_DRIVER is not set 312# CONFIG_DEBUG_DRIVER is not set
329# CONFIG_DEBUG_DEVRES is not set 313# CONFIG_DEBUG_DEVRES is not set
330# CONFIG_SYS_HYPERVISOR is not set 314# CONFIG_SYS_HYPERVISOR is not set
331
332#
333# Connector - unified userspace <-> kernelspace linker
334#
335CONFIG_CONNECTOR=m 315CONFIG_CONNECTOR=m
336# CONFIG_MTD is not set 316# CONFIG_MTD is not set
337
338#
339# Parallel port support
340#
341# CONFIG_PARPORT is not set 317# CONFIG_PARPORT is not set
342 318CONFIG_BLK_DEV=y
343#
344# Plug and Play support
345#
346# CONFIG_PNPACPI is not set
347
348#
349# Block devices
350#
351# CONFIG_BLK_DEV_FD is not set 319# CONFIG_BLK_DEV_FD is not set
352# CONFIG_BLK_CPQ_DA is not set
353# CONFIG_BLK_CPQ_CISS_DA is not set 320# CONFIG_BLK_CPQ_CISS_DA is not set
354# CONFIG_BLK_DEV_DAC960 is not set 321# CONFIG_BLK_DEV_DAC960 is not set
355# CONFIG_BLK_DEV_UMEM is not set 322# CONFIG_BLK_DEV_UMEM is not set
@@ -364,18 +331,11 @@ CONFIG_CDROM_PKTCDVD=m
364CONFIG_CDROM_PKTCDVD_BUFFERS=8 331CONFIG_CDROM_PKTCDVD_BUFFERS=8
365CONFIG_CDROM_PKTCDVD_WCACHE=y 332CONFIG_CDROM_PKTCDVD_WCACHE=y
366CONFIG_ATA_OVER_ETH=m 333CONFIG_ATA_OVER_ETH=m
367 334CONFIG_MISC_DEVICES=y
368#
369# Misc devices
370#
371# CONFIG_PHANTOM is not set 335# CONFIG_PHANTOM is not set
336# CONFIG_EEPROM_93CX6 is not set
372# CONFIG_SGI_IOC4 is not set 337# CONFIG_SGI_IOC4 is not set
373# CONFIG_TIFM_CORE is not set 338# CONFIG_TIFM_CORE is not set
374# CONFIG_BLINK is not set
375
376#
377# ATA/ATAPI/MFM/RLL support
378#
379CONFIG_IDE=y 339CONFIG_IDE=y
380CONFIG_BLK_DEV_IDE=y 340CONFIG_BLK_DEV_IDE=y
381 341
@@ -440,6 +400,7 @@ CONFIG_BLK_DEV_IDEDMA=y
440# 400#
441CONFIG_RAID_ATTRS=m 401CONFIG_RAID_ATTRS=m
442CONFIG_SCSI=y 402CONFIG_SCSI=y
403CONFIG_SCSI_DMA=y
443# CONFIG_SCSI_TGT is not set 404# CONFIG_SCSI_TGT is not set
444CONFIG_SCSI_NETLINK=y 405CONFIG_SCSI_NETLINK=y
445CONFIG_SCSI_PROC_FS=y 406CONFIG_SCSI_PROC_FS=y
@@ -505,14 +466,9 @@ CONFIG_ISCSI_TCP=m
505# CONFIG_SCSI_DC395x is not set 466# CONFIG_SCSI_DC395x is not set
506# CONFIG_SCSI_DC390T is not set 467# CONFIG_SCSI_DC390T is not set
507# CONFIG_SCSI_DEBUG is not set 468# CONFIG_SCSI_DEBUG is not set
508# CONFIG_SCSI_ESP_CORE is not set
509# CONFIG_SCSI_SUNESP is not set 469# CONFIG_SCSI_SUNESP is not set
510# CONFIG_SCSI_SRP is not set 470# CONFIG_SCSI_SRP is not set
511# CONFIG_ATA is not set 471# CONFIG_ATA is not set
512
513#
514# Multi-device support (RAID and LVM)
515#
516CONFIG_MD=y 472CONFIG_MD=y
517CONFIG_BLK_DEV_MD=m 473CONFIG_BLK_DEV_MD=m
518CONFIG_MD_LINEAR=m 474CONFIG_MD_LINEAR=m
@@ -545,30 +501,16 @@ CONFIG_DM_ZERO=m
545# 501#
546# CONFIG_FIREWIRE is not set 502# CONFIG_FIREWIRE is not set
547# CONFIG_IEEE1394 is not set 503# CONFIG_IEEE1394 is not set
548
549#
550# I2O device support
551#
552# CONFIG_I2O is not set 504# CONFIG_I2O is not set
553
554#
555# Network device support
556#
557CONFIG_NETDEVICES=y 505CONFIG_NETDEVICES=y
506# CONFIG_NETDEVICES_MULTIQUEUE is not set
558CONFIG_DUMMY=m 507CONFIG_DUMMY=m
559# CONFIG_BONDING is not set 508# CONFIG_BONDING is not set
509# CONFIG_MACVLAN is not set
560# CONFIG_EQUALIZER is not set 510# CONFIG_EQUALIZER is not set
561# CONFIG_TUN is not set 511# CONFIG_TUN is not set
562
563#
564# ARCnet devices
565#
566# CONFIG_ARCNET is not set 512# CONFIG_ARCNET is not set
567# CONFIG_PHYLIB is not set 513# CONFIG_PHYLIB is not set
568
569#
570# Ethernet (10 or 100Mbit)
571#
572CONFIG_NET_ETHERNET=y 514CONFIG_NET_ETHERNET=y
573CONFIG_MII=m 515CONFIG_MII=m
574# CONFIG_SUNLANCE is not set 516# CONFIG_SUNLANCE is not set
@@ -578,10 +520,6 @@ CONFIG_MII=m
578# CONFIG_SUNGEM is not set 520# CONFIG_SUNGEM is not set
579CONFIG_CASSINI=m 521CONFIG_CASSINI=m
580# CONFIG_NET_VENDOR_3COM is not set 522# CONFIG_NET_VENDOR_3COM is not set
581
582#
583# Tulip family network device support
584#
585# CONFIG_NET_TULIP is not set 523# CONFIG_NET_TULIP is not set
586# CONFIG_HP100 is not set 524# CONFIG_HP100 is not set
587CONFIG_NET_PCI=y 525CONFIG_NET_PCI=y
@@ -617,7 +555,6 @@ CONFIG_E1000_NAPI=y
617# CONFIG_SIS190 is not set 555# CONFIG_SIS190 is not set
618# CONFIG_SKGE is not set 556# CONFIG_SKGE is not set
619# CONFIG_SKY2 is not set 557# CONFIG_SKY2 is not set
620# CONFIG_SK98LIN is not set
621# CONFIG_VIA_VELOCITY is not set 558# CONFIG_VIA_VELOCITY is not set
622CONFIG_TIGON3=m 559CONFIG_TIGON3=m
623CONFIG_BNX2=m 560CONFIG_BNX2=m
@@ -631,11 +568,6 @@ CONFIG_NETDEV_10000=y
631# CONFIG_MYRI10GE is not set 568# CONFIG_MYRI10GE is not set
632# CONFIG_NETXEN_NIC is not set 569# CONFIG_NETXEN_NIC is not set
633# CONFIG_MLX4_CORE is not set 570# CONFIG_MLX4_CORE is not set
634CONFIG_MLX4_DEBUG=y
635
636#
637# Token Ring devices
638#
639# CONFIG_TR is not set 571# CONFIG_TR is not set
640 572
641# 573#
@@ -665,6 +597,7 @@ CONFIG_PPP_DEFLATE=m
665CONFIG_PPP_BSDCOMP=m 597CONFIG_PPP_BSDCOMP=m
666CONFIG_PPP_MPPE=m 598CONFIG_PPP_MPPE=m
667CONFIG_PPPOE=m 599CONFIG_PPPOE=m
600# CONFIG_PPPOL2TP is not set
668# CONFIG_SLIP is not set 601# CONFIG_SLIP is not set
669CONFIG_SLHC=m 602CONFIG_SLHC=m
670# CONFIG_NET_FC is not set 603# CONFIG_NET_FC is not set
@@ -672,15 +605,7 @@ CONFIG_SLHC=m
672# CONFIG_NETCONSOLE is not set 605# CONFIG_NETCONSOLE is not set
673# CONFIG_NETPOLL is not set 606# CONFIG_NETPOLL is not set
674# CONFIG_NET_POLL_CONTROLLER is not set 607# CONFIG_NET_POLL_CONTROLLER is not set
675
676#
677# ISDN subsystem
678#
679# CONFIG_ISDN is not set 608# CONFIG_ISDN is not set
680
681#
682# Telephony Support
683#
684# CONFIG_PHONE is not set 609# CONFIG_PHONE is not set
685 610
686# 611#
@@ -688,6 +613,7 @@ CONFIG_SLHC=m
688# 613#
689CONFIG_INPUT=y 614CONFIG_INPUT=y
690# CONFIG_INPUT_FF_MEMLESS is not set 615# CONFIG_INPUT_FF_MEMLESS is not set
616# CONFIG_INPUT_POLLDEV is not set
691 617
692# 618#
693# Userland interfaces 619# Userland interfaces
@@ -733,7 +659,6 @@ CONFIG_INPUT_SPARCSPKR=y
733# CONFIG_INPUT_POWERMATE is not set 659# CONFIG_INPUT_POWERMATE is not set
734# CONFIG_INPUT_YEALINK is not set 660# CONFIG_INPUT_YEALINK is not set
735# CONFIG_INPUT_UINPUT is not set 661# CONFIG_INPUT_UINPUT is not set
736# CONFIG_INPUT_POLLDEV is not set
737 662
738# 663#
739# Hardware I/O ports 664# Hardware I/O ports
@@ -773,10 +698,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
773# CONFIG_SERIAL_JSM is not set 698# CONFIG_SERIAL_JSM is not set
774CONFIG_UNIX98_PTYS=y 699CONFIG_UNIX98_PTYS=y
775# CONFIG_LEGACY_PTYS is not set 700# CONFIG_LEGACY_PTYS is not set
776
777#
778# IPMI
779#
780# CONFIG_IPMI_HANDLER is not set 701# CONFIG_IPMI_HANDLER is not set
781# CONFIG_WATCHDOG is not set 702# CONFIG_WATCHDOG is not set
782# CONFIG_HW_RANDOM is not set 703# CONFIG_HW_RANDOM is not set
@@ -785,10 +706,6 @@ CONFIG_RTC=y
785# CONFIG_APPLICOM is not set 706# CONFIG_APPLICOM is not set
786# CONFIG_DRM is not set 707# CONFIG_DRM is not set
787# CONFIG_RAW_DRIVER is not set 708# CONFIG_RAW_DRIVER is not set
788
789#
790# TPM devices
791#
792# CONFIG_TCG_TPM is not set 709# CONFIG_TCG_TPM is not set
793CONFIG_DEVPORT=y 710CONFIG_DEVPORT=y
794CONFIG_I2C=y 711CONFIG_I2C=y
@@ -822,6 +739,7 @@ CONFIG_I2C_ALGOBIT=y
822# CONFIG_I2C_SIS5595 is not set 739# CONFIG_I2C_SIS5595 is not set
823# CONFIG_I2C_SIS630 is not set 740# CONFIG_I2C_SIS630 is not set
824# CONFIG_I2C_SIS96X is not set 741# CONFIG_I2C_SIS96X is not set
742# CONFIG_I2C_TAOS_EVM is not set
825# CONFIG_I2C_STUB is not set 743# CONFIG_I2C_STUB is not set
826# CONFIG_I2C_TINY_USB is not set 744# CONFIG_I2C_TINY_USB is not set
827# CONFIG_I2C_VIA is not set 745# CONFIG_I2C_VIA is not set
@@ -833,11 +751,13 @@ CONFIG_I2C_ALGOBIT=y
833# 751#
834# CONFIG_SENSORS_DS1337 is not set 752# CONFIG_SENSORS_DS1337 is not set
835# CONFIG_SENSORS_DS1374 is not set 753# CONFIG_SENSORS_DS1374 is not set
754# CONFIG_DS1682 is not set
836# CONFIG_SENSORS_EEPROM is not set 755# CONFIG_SENSORS_EEPROM is not set
837# CONFIG_SENSORS_PCF8574 is not set 756# CONFIG_SENSORS_PCF8574 is not set
838# CONFIG_SENSORS_PCA9539 is not set 757# CONFIG_SENSORS_PCA9539 is not set
839# CONFIG_SENSORS_PCF8591 is not set 758# CONFIG_SENSORS_PCF8591 is not set
840# CONFIG_SENSORS_MAX6875 is not set 759# CONFIG_SENSORS_MAX6875 is not set
760# CONFIG_SENSORS_TSL2550 is not set
841# CONFIG_I2C_DEBUG_CORE is not set 761# CONFIG_I2C_DEBUG_CORE is not set
842# CONFIG_I2C_DEBUG_ALGO is not set 762# CONFIG_I2C_DEBUG_ALGO is not set
843# CONFIG_I2C_DEBUG_BUS is not set 763# CONFIG_I2C_DEBUG_BUS is not set
@@ -848,14 +768,12 @@ CONFIG_I2C_ALGOBIT=y
848# 768#
849# CONFIG_SPI is not set 769# CONFIG_SPI is not set
850# CONFIG_SPI_MASTER is not set 770# CONFIG_SPI_MASTER is not set
851
852#
853# Dallas's 1-wire bus
854#
855# CONFIG_W1 is not set 771# CONFIG_W1 is not set
772# CONFIG_POWER_SUPPLY is not set
856CONFIG_HWMON=y 773CONFIG_HWMON=y
857# CONFIG_HWMON_VID is not set 774# CONFIG_HWMON_VID is not set
858# CONFIG_SENSORS_ABITUGURU is not set 775# CONFIG_SENSORS_ABITUGURU is not set
776# CONFIG_SENSORS_ABITUGURU3 is not set
859# CONFIG_SENSORS_AD7418 is not set 777# CONFIG_SENSORS_AD7418 is not set
860# CONFIG_SENSORS_ADM1021 is not set 778# CONFIG_SENSORS_ADM1021 is not set
861# CONFIG_SENSORS_ADM1025 is not set 779# CONFIG_SENSORS_ADM1025 is not set
@@ -882,11 +800,13 @@ CONFIG_HWMON=y
882# CONFIG_SENSORS_LM87 is not set 800# CONFIG_SENSORS_LM87 is not set
883# CONFIG_SENSORS_LM90 is not set 801# CONFIG_SENSORS_LM90 is not set
884# CONFIG_SENSORS_LM92 is not set 802# CONFIG_SENSORS_LM92 is not set
803# CONFIG_SENSORS_LM93 is not set
885# CONFIG_SENSORS_MAX1619 is not set 804# CONFIG_SENSORS_MAX1619 is not set
886# CONFIG_SENSORS_MAX6650 is not set 805# CONFIG_SENSORS_MAX6650 is not set
887# CONFIG_SENSORS_PC87360 is not set 806# CONFIG_SENSORS_PC87360 is not set
888# CONFIG_SENSORS_PC87427 is not set 807# CONFIG_SENSORS_PC87427 is not set
889# CONFIG_SENSORS_SIS5595 is not set 808# CONFIG_SENSORS_SIS5595 is not set
809# CONFIG_SENSORS_DME1737 is not set
890# CONFIG_SENSORS_SMSC47M1 is not set 810# CONFIG_SENSORS_SMSC47M1 is not set
891# CONFIG_SENSORS_SMSC47M192 is not set 811# CONFIG_SENSORS_SMSC47M192 is not set
892# CONFIG_SENSORS_SMSC47B397 is not set 812# CONFIG_SENSORS_SMSC47B397 is not set
@@ -949,6 +869,8 @@ CONFIG_FB_TILEBLITTING=y
949# CONFIG_FB_ASILIANT is not set 869# CONFIG_FB_ASILIANT is not set
950# CONFIG_FB_IMSTT is not set 870# CONFIG_FB_IMSTT is not set
951# CONFIG_FB_SBUS is not set 871# CONFIG_FB_SBUS is not set
872# CONFIG_FB_XVR500 is not set
873# CONFIG_FB_XVR2500 is not set
952# CONFIG_FB_S1D13XXX is not set 874# CONFIG_FB_S1D13XXX is not set
953# CONFIG_FB_NVIDIA is not set 875# CONFIG_FB_NVIDIA is not set
954# CONFIG_FB_RIVA is not set 876# CONFIG_FB_RIVA is not set
@@ -970,9 +892,6 @@ CONFIG_FB_RADEON_I2C=y
970# CONFIG_FB_TRIDENT is not set 892# CONFIG_FB_TRIDENT is not set
971# CONFIG_FB_ARK is not set 893# CONFIG_FB_ARK is not set
972# CONFIG_FB_PM3 is not set 894# CONFIG_FB_PM3 is not set
973# CONFIG_FB_XVR500 is not set
974# CONFIG_FB_XVR2500 is not set
975# CONFIG_FB_PCI is not set
976# CONFIG_FB_VIRTUAL is not set 895# CONFIG_FB_VIRTUAL is not set
977 896
978# 897#
@@ -981,6 +900,7 @@ CONFIG_FB_RADEON_I2C=y
981# CONFIG_PROM_CONSOLE is not set 900# CONFIG_PROM_CONSOLE is not set
982CONFIG_DUMMY_CONSOLE=y 901CONFIG_DUMMY_CONSOLE=y
983CONFIG_FRAMEBUFFER_CONSOLE=y 902CONFIG_FRAMEBUFFER_CONSOLE=y
903CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
984# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 904# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
985CONFIG_FONTS=y 905CONFIG_FONTS=y
986# CONFIG_FONT_8x8 is not set 906# CONFIG_FONT_8x8 is not set
@@ -1118,10 +1038,7 @@ CONFIG_SND_SUN_CS4231=m
1118# 1038#
1119# CONFIG_SOUND_PRIME is not set 1039# CONFIG_SOUND_PRIME is not set
1120CONFIG_AC97_BUS=m 1040CONFIG_AC97_BUS=m
1121 1041CONFIG_HID_SUPPORT=y
1122#
1123# HID Devices
1124#
1125CONFIG_HID=y 1042CONFIG_HID=y
1126# CONFIG_HID_DEBUG is not set 1043# CONFIG_HID_DEBUG is not set
1127 1044
@@ -1132,10 +1049,7 @@ CONFIG_USB_HID=y
1132# CONFIG_USB_HIDINPUT_POWERBOOK is not set 1049# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1133# CONFIG_HID_FF is not set 1050# CONFIG_HID_FF is not set
1134CONFIG_USB_HIDDEV=y 1051CONFIG_USB_HIDDEV=y
1135 1052CONFIG_USB_SUPPORT=y
1136#
1137# USB support
1138#
1139CONFIG_USB_ARCH_HAS_HCD=y 1053CONFIG_USB_ARCH_HAS_HCD=y
1140CONFIG_USB_ARCH_HAS_OHCI=y 1054CONFIG_USB_ARCH_HAS_OHCI=y
1141CONFIG_USB_ARCH_HAS_EHCI=y 1055CONFIG_USB_ARCH_HAS_EHCI=y
@@ -1157,7 +1071,6 @@ CONFIG_USB_EHCI_HCD=m
1157# CONFIG_USB_EHCI_SPLIT_ISO is not set 1071# CONFIG_USB_EHCI_SPLIT_ISO is not set
1158# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1072# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1159# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1073# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1160# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1161# CONFIG_USB_ISP116X_HCD is not set 1074# CONFIG_USB_ISP116X_HCD is not set
1162CONFIG_USB_OHCI_HCD=y 1075CONFIG_USB_OHCI_HCD=y
1163# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1076# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -1165,6 +1078,7 @@ CONFIG_USB_OHCI_HCD=y
1165CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1078CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1166CONFIG_USB_UHCI_HCD=m 1079CONFIG_USB_UHCI_HCD=m
1167# CONFIG_USB_SL811_HCD is not set 1080# CONFIG_USB_SL811_HCD is not set
1081# CONFIG_USB_R8A66597_HCD is not set
1168 1082
1169# 1083#
1170# USB Device Class drivers 1084# USB Device Class drivers
@@ -1256,17 +1170,9 @@ CONFIG_USB_STORAGE=m
1256# 1170#
1257# LED Triggers 1171# LED Triggers
1258# 1172#
1259
1260#
1261# InfiniBand support
1262#
1263# CONFIG_INFINIBAND is not set 1173# CONFIG_INFINIBAND is not set
1264 1174
1265# 1175#
1266# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1267#
1268
1269#
1270# Real Time Clock 1176# Real Time Clock
1271# 1177#
1272# CONFIG_RTC_CLASS is not set 1178# CONFIG_RTC_CLASS is not set
@@ -1285,6 +1191,11 @@ CONFIG_USB_STORAGE=m
1285# 1191#
1286 1192
1287# 1193#
1194# Userspace I/O
1195#
1196# CONFIG_UIO is not set
1197
1198#
1288# Misc Linux/SPARC drivers 1199# Misc Linux/SPARC drivers
1289# 1200#
1290CONFIG_SUN_OPENPROMIO=m 1201CONFIG_SUN_OPENPROMIO=m
@@ -1387,7 +1298,6 @@ CONFIG_RAMFS=y
1387# CONFIG_NCP_FS is not set 1298# CONFIG_NCP_FS is not set
1388# CONFIG_CODA_FS is not set 1299# CONFIG_CODA_FS is not set
1389# CONFIG_AFS_FS is not set 1300# CONFIG_AFS_FS is not set
1390# CONFIG_9P_FS is not set
1391 1301
1392# 1302#
1393# Partition Types 1303# Partition Types
@@ -1465,14 +1375,17 @@ CONFIG_DEBUG_FS=y
1465CONFIG_DEBUG_KERNEL=y 1375CONFIG_DEBUG_KERNEL=y
1466# CONFIG_DEBUG_SHIRQ is not set 1376# CONFIG_DEBUG_SHIRQ is not set
1467CONFIG_DETECT_SOFTLOCKUP=y 1377CONFIG_DETECT_SOFTLOCKUP=y
1378# CONFIG_SCHED_DEBUG is not set
1468CONFIG_SCHEDSTATS=y 1379CONFIG_SCHEDSTATS=y
1469# CONFIG_TIMER_STATS is not set 1380# CONFIG_TIMER_STATS is not set
1381# CONFIG_SLUB_DEBUG_ON is not set
1470# CONFIG_DEBUG_RT_MUTEXES is not set 1382# CONFIG_DEBUG_RT_MUTEXES is not set
1471# CONFIG_RT_MUTEX_TESTER is not set 1383# CONFIG_RT_MUTEX_TESTER is not set
1472# CONFIG_DEBUG_SPINLOCK is not set 1384# CONFIG_DEBUG_SPINLOCK is not set
1473# CONFIG_DEBUG_MUTEXES is not set 1385# CONFIG_DEBUG_MUTEXES is not set
1474# CONFIG_DEBUG_LOCK_ALLOC is not set 1386# CONFIG_DEBUG_LOCK_ALLOC is not set
1475# CONFIG_PROVE_LOCKING is not set 1387# CONFIG_PROVE_LOCKING is not set
1388# CONFIG_LOCK_STAT is not set
1476# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1389# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1477# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1390# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1478# CONFIG_DEBUG_KOBJECT is not set 1391# CONFIG_DEBUG_KOBJECT is not set
@@ -1496,10 +1409,10 @@ CONFIG_FORCED_INLINING=y
1496CONFIG_KEYS=y 1409CONFIG_KEYS=y
1497# CONFIG_KEYS_DEBUG_PROC_KEYS is not set 1410# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
1498# CONFIG_SECURITY is not set 1411# CONFIG_SECURITY is not set
1499 1412CONFIG_XOR_BLOCKS=m
1500# 1413CONFIG_ASYNC_CORE=m
1501# Cryptographic options 1414CONFIG_ASYNC_MEMCPY=m
1502# 1415CONFIG_ASYNC_XOR=m
1503CONFIG_CRYPTO=y 1416CONFIG_CRYPTO=y
1504CONFIG_CRYPTO_ALGAPI=y 1417CONFIG_CRYPTO_ALGAPI=y
1505CONFIG_CRYPTO_BLKCIPHER=y 1418CONFIG_CRYPTO_BLKCIPHER=y
@@ -1539,10 +1452,7 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
1539CONFIG_CRYPTO_CRC32C=m 1452CONFIG_CRYPTO_CRC32C=m
1540CONFIG_CRYPTO_CAMELLIA=m 1453CONFIG_CRYPTO_CAMELLIA=m
1541CONFIG_CRYPTO_TEST=m 1454CONFIG_CRYPTO_TEST=m
1542 1455CONFIG_CRYPTO_HW=y
1543#
1544# Hardware crypto devices
1545#
1546 1456
1547# 1457#
1548# Library routines 1458# Library routines
@@ -1552,6 +1462,7 @@ CONFIG_CRC_CCITT=m
1552CONFIG_CRC16=m 1462CONFIG_CRC16=m
1553# CONFIG_CRC_ITU_T is not set 1463# CONFIG_CRC_ITU_T is not set
1554CONFIG_CRC32=y 1464CONFIG_CRC32=y
1465# CONFIG_CRC7 is not set
1555CONFIG_LIBCRC32C=m 1466CONFIG_LIBCRC32C=m
1556CONFIG_ZLIB_INFLATE=y 1467CONFIG_ZLIB_INFLATE=y
1557CONFIG_ZLIB_DEFLATE=y 1468CONFIG_ZLIB_DEFLATE=y
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile
index d8d19093d12f..b66876bf410c 100644
--- a/arch/sparc64/kernel/Makefile
+++ b/arch/sparc64/kernel/Makefile
@@ -1,4 +1,4 @@
1# $Id: Makefile,v 1.70 2002/02/09 19:49:30 davem Exp $ 1#
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4 4
@@ -8,7 +8,7 @@ EXTRA_CFLAGS := -Werror
8extra-y := head.o init_task.o vmlinux.lds 8extra-y := head.o init_task.o vmlinux.lds
9 9
10obj-y := process.o setup.o cpu.o idprom.o \ 10obj-y := process.o setup.o cpu.o idprom.o \
11 traps.o auxio.o una_asm.o \ 11 traps.o auxio.o una_asm.o sysfs.o \
12 irq.o ptrace.o time.o sys_sparc.o signal.o \ 12 irq.o ptrace.o time.o sys_sparc.o signal.o \
13 unaligned.o central.o pci.o starfire.o semaphore.o \ 13 unaligned.o central.o pci.o starfire.o semaphore.o \
14 power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o \ 14 power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o \
@@ -18,7 +18,7 @@ obj-$(CONFIG_STACKTRACE) += stacktrace.o
18obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o pci_iommu.o \ 18obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o pci_iommu.o \
19 pci_psycho.o pci_sabre.o pci_schizo.o \ 19 pci_psycho.o pci_sabre.o pci_schizo.o \
20 pci_sun4v.o pci_sun4v_asm.o pci_fire.o 20 pci_sun4v.o pci_sun4v_asm.o pci_fire.o
21obj-$(CONFIG_SMP) += smp.o trampoline.o 21obj-$(CONFIG_SMP) += smp.o trampoline.o hvtramp.o
22obj-$(CONFIG_SPARC32_COMPAT) += sys32.o sys_sparc32.o signal32.o 22obj-$(CONFIG_SPARC32_COMPAT) += sys32.o sys_sparc32.o signal32.o
23obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o 23obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o
24obj-$(CONFIG_BINFMT_AOUT32) += binfmt_aout32.o 24obj-$(CONFIG_BINFMT_AOUT32) += binfmt_aout32.o
@@ -26,6 +26,7 @@ obj-$(CONFIG_MODULES) += module.o
26obj-$(CONFIG_US3_FREQ) += us3_cpufreq.o 26obj-$(CONFIG_US3_FREQ) += us3_cpufreq.o
27obj-$(CONFIG_US2E_FREQ) += us2e_cpufreq.o 27obj-$(CONFIG_US2E_FREQ) += us2e_cpufreq.o
28obj-$(CONFIG_KPROBES) += kprobes.o 28obj-$(CONFIG_KPROBES) += kprobes.o
29obj-$(CONFIG_SUN_LDOMS) += ldc.o vio.o viohs.o ds.o
29obj-$(CONFIG_AUDIT) += audit.o 30obj-$(CONFIG_AUDIT) += audit.o
30obj-$(CONFIG_AUDIT)$(CONFIG_SPARC32_COMPAT) += compat_audit.o 31obj-$(CONFIG_AUDIT)$(CONFIG_SPARC32_COMPAT) += compat_audit.o
31obj-y += $(obj-yy) 32obj-y += $(obj-yy)
diff --git a/arch/sparc64/kernel/auxio.c b/arch/sparc64/kernel/auxio.c
index 826118ee53d5..7b379761e9f8 100644
--- a/arch/sparc64/kernel/auxio.c
+++ b/arch/sparc64/kernel/auxio.c
@@ -155,7 +155,7 @@ static struct of_platform_driver auxio_driver = {
155 155
156static int __init auxio_init(void) 156static int __init auxio_init(void)
157{ 157{
158 return of_register_driver(&auxio_driver, &of_bus_type); 158 return of_register_driver(&auxio_driver, &of_platform_bus_type);
159} 159}
160 160
161/* Must be after subsys_initcall() so that busses are probed. Must 161/* Must be after subsys_initcall() so that busses are probed. Must
diff --git a/arch/sparc64/kernel/ds.c b/arch/sparc64/kernel/ds.c
new file mode 100644
index 000000000000..9f472a79d37e
--- /dev/null
+++ b/arch/sparc64/kernel/ds.c
@@ -0,0 +1,1246 @@
1/* ds.c: Domain Services driver for Logical Domains
2 *
3 * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
4 */
5
6#include <linux/kernel.h>
7#include <linux/module.h>
8#include <linux/types.h>
9#include <linux/module.h>
10#include <linux/string.h>
11#include <linux/slab.h>
12#include <linux/sched.h>
13#include <linux/delay.h>
14#include <linux/mutex.h>
15#include <linux/kthread.h>
16#include <linux/reboot.h>
17#include <linux/cpu.h>
18
19#include <asm/ldc.h>
20#include <asm/vio.h>
21#include <asm/mdesc.h>
22#include <asm/head.h>
23#include <asm/irq.h>
24
25#define DRV_MODULE_NAME "ds"
26#define PFX DRV_MODULE_NAME ": "
27#define DRV_MODULE_VERSION "1.0"
28#define DRV_MODULE_RELDATE "Jul 11, 2007"
29
30static char version[] __devinitdata =
31 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
32MODULE_AUTHOR("David S. Miller (davem@davemloft.net)");
33MODULE_DESCRIPTION("Sun LDOM domain services driver");
34MODULE_LICENSE("GPL");
35MODULE_VERSION(DRV_MODULE_VERSION);
36
37struct ds_msg_tag {
38 __u32 type;
39#define DS_INIT_REQ 0x00
40#define DS_INIT_ACK 0x01
41#define DS_INIT_NACK 0x02
42#define DS_REG_REQ 0x03
43#define DS_REG_ACK 0x04
44#define DS_REG_NACK 0x05
45#define DS_UNREG_REQ 0x06
46#define DS_UNREG_ACK 0x07
47#define DS_UNREG_NACK 0x08
48#define DS_DATA 0x09
49#define DS_NACK 0x0a
50
51 __u32 len;
52};
53
54/* Result codes */
55#define DS_OK 0x00
56#define DS_REG_VER_NACK 0x01
57#define DS_REG_DUP 0x02
58#define DS_INV_HDL 0x03
59#define DS_TYPE_UNKNOWN 0x04
60
61struct ds_version {
62 __u16 major;
63 __u16 minor;
64};
65
66struct ds_ver_req {
67 struct ds_msg_tag tag;
68 struct ds_version ver;
69};
70
71struct ds_ver_ack {
72 struct ds_msg_tag tag;
73 __u16 minor;
74};
75
76struct ds_ver_nack {
77 struct ds_msg_tag tag;
78 __u16 major;
79};
80
81struct ds_reg_req {
82 struct ds_msg_tag tag;
83 __u64 handle;
84 __u16 major;
85 __u16 minor;
86 char svc_id[0];
87};
88
89struct ds_reg_ack {
90 struct ds_msg_tag tag;
91 __u64 handle;
92 __u16 minor;
93};
94
95struct ds_reg_nack {
96 struct ds_msg_tag tag;
97 __u64 handle;
98 __u16 major;
99};
100
101struct ds_unreg_req {
102 struct ds_msg_tag tag;
103 __u64 handle;
104};
105
106struct ds_unreg_ack {
107 struct ds_msg_tag tag;
108 __u64 handle;
109};
110
111struct ds_unreg_nack {
112 struct ds_msg_tag tag;
113 __u64 handle;
114};
115
116struct ds_data {
117 struct ds_msg_tag tag;
118 __u64 handle;
119};
120
121struct ds_data_nack {
122 struct ds_msg_tag tag;
123 __u64 handle;
124 __u64 result;
125};
126
127struct ds_info;
128struct ds_cap_state {
129 __u64 handle;
130
131 void (*data)(struct ds_info *dp,
132 struct ds_cap_state *cp,
133 void *buf, int len);
134
135 const char *service_id;
136
137 u8 state;
138#define CAP_STATE_UNKNOWN 0x00
139#define CAP_STATE_REG_SENT 0x01
140#define CAP_STATE_REGISTERED 0x02
141};
142
143static void md_update_data(struct ds_info *dp, struct ds_cap_state *cp,
144 void *buf, int len);
145static void domain_shutdown_data(struct ds_info *dp,
146 struct ds_cap_state *cp,
147 void *buf, int len);
148static void domain_panic_data(struct ds_info *dp,
149 struct ds_cap_state *cp,
150 void *buf, int len);
151#ifdef CONFIG_HOTPLUG_CPU
152static void dr_cpu_data(struct ds_info *dp,
153 struct ds_cap_state *cp,
154 void *buf, int len);
155#endif
156static void ds_pri_data(struct ds_info *dp,
157 struct ds_cap_state *cp,
158 void *buf, int len);
159static void ds_var_data(struct ds_info *dp,
160 struct ds_cap_state *cp,
161 void *buf, int len);
162
163struct ds_cap_state ds_states_template[] = {
164 {
165 .service_id = "md-update",
166 .data = md_update_data,
167 },
168 {
169 .service_id = "domain-shutdown",
170 .data = domain_shutdown_data,
171 },
172 {
173 .service_id = "domain-panic",
174 .data = domain_panic_data,
175 },
176#ifdef CONFIG_HOTPLUG_CPU
177 {
178 .service_id = "dr-cpu",
179 .data = dr_cpu_data,
180 },
181#endif
182 {
183 .service_id = "pri",
184 .data = ds_pri_data,
185 },
186 {
187 .service_id = "var-config",
188 .data = ds_var_data,
189 },
190 {
191 .service_id = "var-config-backup",
192 .data = ds_var_data,
193 },
194};
195
196static DEFINE_SPINLOCK(ds_lock);
197
198struct ds_info {
199 struct ldc_channel *lp;
200 u8 hs_state;
201#define DS_HS_START 0x01
202#define DS_HS_DONE 0x02
203
204 u64 id;
205
206 void *rcv_buf;
207 int rcv_buf_len;
208
209 struct ds_cap_state *ds_states;
210 int num_ds_states;
211
212 struct ds_info *next;
213};
214
215static struct ds_info *ds_info_list;
216
217static struct ds_cap_state *find_cap(struct ds_info *dp, u64 handle)
218{
219 unsigned int index = handle >> 32;
220
221 if (index >= dp->num_ds_states)
222 return NULL;
223 return &dp->ds_states[index];
224}
225
226static struct ds_cap_state *find_cap_by_string(struct ds_info *dp,
227 const char *name)
228{
229 int i;
230
231 for (i = 0; i < dp->num_ds_states; i++) {
232 if (strcmp(dp->ds_states[i].service_id, name))
233 continue;
234
235 return &dp->ds_states[i];
236 }
237 return NULL;
238}
239
240static int __ds_send(struct ldc_channel *lp, void *data, int len)
241{
242 int err, limit = 1000;
243
244 err = -EINVAL;
245 while (limit-- > 0) {
246 err = ldc_write(lp, data, len);
247 if (!err || (err != -EAGAIN))
248 break;
249 udelay(1);
250 }
251
252 return err;
253}
254
255static int ds_send(struct ldc_channel *lp, void *data, int len)
256{
257 unsigned long flags;
258 int err;
259
260 spin_lock_irqsave(&ds_lock, flags);
261 err = __ds_send(lp, data, len);
262 spin_unlock_irqrestore(&ds_lock, flags);
263
264 return err;
265}
266
267struct ds_md_update_req {
268 __u64 req_num;
269};
270
271struct ds_md_update_res {
272 __u64 req_num;
273 __u32 result;
274};
275
276static void md_update_data(struct ds_info *dp,
277 struct ds_cap_state *cp,
278 void *buf, int len)
279{
280 struct ldc_channel *lp = dp->lp;
281 struct ds_data *dpkt = buf;
282 struct ds_md_update_req *rp;
283 struct {
284 struct ds_data data;
285 struct ds_md_update_res res;
286 } pkt;
287
288 rp = (struct ds_md_update_req *) (dpkt + 1);
289
290 printk(KERN_INFO "ds-%lu: Machine description update.\n", dp->id);
291
292 mdesc_update();
293
294 memset(&pkt, 0, sizeof(pkt));
295 pkt.data.tag.type = DS_DATA;
296 pkt.data.tag.len = sizeof(pkt) - sizeof(struct ds_msg_tag);
297 pkt.data.handle = cp->handle;
298 pkt.res.req_num = rp->req_num;
299 pkt.res.result = DS_OK;
300
301 ds_send(lp, &pkt, sizeof(pkt));
302}
303
304struct ds_shutdown_req {
305 __u64 req_num;
306 __u32 ms_delay;
307};
308
309struct ds_shutdown_res {
310 __u64 req_num;
311 __u32 result;
312 char reason[1];
313};
314
315static void domain_shutdown_data(struct ds_info *dp,
316 struct ds_cap_state *cp,
317 void *buf, int len)
318{
319 struct ldc_channel *lp = dp->lp;
320 struct ds_data *dpkt = buf;
321 struct ds_shutdown_req *rp;
322 struct {
323 struct ds_data data;
324 struct ds_shutdown_res res;
325 } pkt;
326
327 rp = (struct ds_shutdown_req *) (dpkt + 1);
328
329 printk(KERN_ALERT "ds-%lu: Shutdown request from "
330 "LDOM manager received.\n", dp->id);
331
332 memset(&pkt, 0, sizeof(pkt));
333 pkt.data.tag.type = DS_DATA;
334 pkt.data.tag.len = sizeof(pkt) - sizeof(struct ds_msg_tag);
335 pkt.data.handle = cp->handle;
336 pkt.res.req_num = rp->req_num;
337 pkt.res.result = DS_OK;
338 pkt.res.reason[0] = 0;
339
340 ds_send(lp, &pkt, sizeof(pkt));
341
342 orderly_poweroff(true);
343}
344
345struct ds_panic_req {
346 __u64 req_num;
347};
348
349struct ds_panic_res {
350 __u64 req_num;
351 __u32 result;
352 char reason[1];
353};
354
355static void domain_panic_data(struct ds_info *dp,
356 struct ds_cap_state *cp,
357 void *buf, int len)
358{
359 struct ldc_channel *lp = dp->lp;
360 struct ds_data *dpkt = buf;
361 struct ds_panic_req *rp;
362 struct {
363 struct ds_data data;
364 struct ds_panic_res res;
365 } pkt;
366
367 rp = (struct ds_panic_req *) (dpkt + 1);
368
369 printk(KERN_ALERT "ds-%lu: Panic request from "
370 "LDOM manager received.\n", dp->id);
371
372 memset(&pkt, 0, sizeof(pkt));
373 pkt.data.tag.type = DS_DATA;
374 pkt.data.tag.len = sizeof(pkt) - sizeof(struct ds_msg_tag);
375 pkt.data.handle = cp->handle;
376 pkt.res.req_num = rp->req_num;
377 pkt.res.result = DS_OK;
378 pkt.res.reason[0] = 0;
379
380 ds_send(lp, &pkt, sizeof(pkt));
381
382 panic("PANIC requested by LDOM manager.");
383}
384
385#ifdef CONFIG_HOTPLUG_CPU
386struct dr_cpu_tag {
387 __u64 req_num;
388 __u32 type;
389#define DR_CPU_CONFIGURE 0x43
390#define DR_CPU_UNCONFIGURE 0x55
391#define DR_CPU_FORCE_UNCONFIGURE 0x46
392#define DR_CPU_STATUS 0x53
393
394/* Responses */
395#define DR_CPU_OK 0x6f
396#define DR_CPU_ERROR 0x65
397
398 __u32 num_records;
399};
400
401struct dr_cpu_resp_entry {
402 __u32 cpu;
403 __u32 result;
404#define DR_CPU_RES_OK 0x00
405#define DR_CPU_RES_FAILURE 0x01
406#define DR_CPU_RES_BLOCKED 0x02
407#define DR_CPU_RES_CPU_NOT_RESPONDING 0x03
408#define DR_CPU_RES_NOT_IN_MD 0x04
409
410 __u32 stat;
411#define DR_CPU_STAT_NOT_PRESENT 0x00
412#define DR_CPU_STAT_UNCONFIGURED 0x01
413#define DR_CPU_STAT_CONFIGURED 0x02
414
415 __u32 str_off;
416};
417
418static void __dr_cpu_send_error(struct ds_info *dp,
419 struct ds_cap_state *cp,
420 struct ds_data *data)
421{
422 struct dr_cpu_tag *tag = (struct dr_cpu_tag *) (data + 1);
423 struct {
424 struct ds_data data;
425 struct dr_cpu_tag tag;
426 } pkt;
427 int msg_len;
428
429 memset(&pkt, 0, sizeof(pkt));
430 pkt.data.tag.type = DS_DATA;
431 pkt.data.handle = cp->handle;
432 pkt.tag.req_num = tag->req_num;
433 pkt.tag.type = DR_CPU_ERROR;
434 pkt.tag.num_records = 0;
435
436 msg_len = (sizeof(struct ds_data) +
437 sizeof(struct dr_cpu_tag));
438
439 pkt.data.tag.len = msg_len - sizeof(struct ds_msg_tag);
440
441 __ds_send(dp->lp, &pkt, msg_len);
442}
443
444static void dr_cpu_send_error(struct ds_info *dp,
445 struct ds_cap_state *cp,
446 struct ds_data *data)
447{
448 unsigned long flags;
449
450 spin_lock_irqsave(&ds_lock, flags);
451 __dr_cpu_send_error(dp, cp, data);
452 spin_unlock_irqrestore(&ds_lock, flags);
453}
454
455#define CPU_SENTINEL 0xffffffff
456
457static void purge_dups(u32 *list, u32 num_ents)
458{
459 unsigned int i;
460
461 for (i = 0; i < num_ents; i++) {
462 u32 cpu = list[i];
463 unsigned int j;
464
465 if (cpu == CPU_SENTINEL)
466 continue;
467
468 for (j = i + 1; j < num_ents; j++) {
469 if (list[j] == cpu)
470 list[j] = CPU_SENTINEL;
471 }
472 }
473}
474
475static int dr_cpu_size_response(int ncpus)
476{
477 return (sizeof(struct ds_data) +
478 sizeof(struct dr_cpu_tag) +
479 (sizeof(struct dr_cpu_resp_entry) * ncpus));
480}
481
482static void dr_cpu_init_response(struct ds_data *resp, u64 req_num,
483 u64 handle, int resp_len, int ncpus,
484 cpumask_t *mask, u32 default_stat)
485{
486 struct dr_cpu_resp_entry *ent;
487 struct dr_cpu_tag *tag;
488 int i, cpu;
489
490 tag = (struct dr_cpu_tag *) (resp + 1);
491 ent = (struct dr_cpu_resp_entry *) (tag + 1);
492
493 resp->tag.type = DS_DATA;
494 resp->tag.len = resp_len - sizeof(struct ds_msg_tag);
495 resp->handle = handle;
496 tag->req_num = req_num;
497 tag->type = DR_CPU_OK;
498 tag->num_records = ncpus;
499
500 i = 0;
501 for_each_cpu_mask(cpu, *mask) {
502 ent[i].cpu = cpu;
503 ent[i].result = DR_CPU_RES_OK;
504 ent[i].stat = default_stat;
505 i++;
506 }
507 BUG_ON(i != ncpus);
508}
509
510static void dr_cpu_mark(struct ds_data *resp, int cpu, int ncpus,
511 u32 res, u32 stat)
512{
513 struct dr_cpu_resp_entry *ent;
514 struct dr_cpu_tag *tag;
515 int i;
516
517 tag = (struct dr_cpu_tag *) (resp + 1);
518 ent = (struct dr_cpu_resp_entry *) (tag + 1);
519
520 for (i = 0; i < ncpus; i++) {
521 if (ent[i].cpu != cpu)
522 continue;
523 ent[i].result = res;
524 ent[i].stat = stat;
525 break;
526 }
527}
528
529static int dr_cpu_configure(struct ds_info *dp,
530 struct ds_cap_state *cp,
531 u64 req_num,
532 cpumask_t *mask)
533{
534 struct ds_data *resp;
535 int resp_len, ncpus, cpu;
536 unsigned long flags;
537
538 ncpus = cpus_weight(*mask);
539 resp_len = dr_cpu_size_response(ncpus);
540 resp = kzalloc(resp_len, GFP_KERNEL);
541 if (!resp)
542 return -ENOMEM;
543
544 dr_cpu_init_response(resp, req_num, cp->handle,
545 resp_len, ncpus, mask,
546 DR_CPU_STAT_CONFIGURED);
547
548 mdesc_fill_in_cpu_data(*mask);
549
550 for_each_cpu_mask(cpu, *mask) {
551 int err;
552
553 printk(KERN_INFO "ds-%lu: Starting cpu %d...\n",
554 dp->id, cpu);
555 err = cpu_up(cpu);
556 if (err) {
557 __u32 res = DR_CPU_RES_FAILURE;
558 __u32 stat = DR_CPU_STAT_UNCONFIGURED;
559
560 if (!cpu_present(cpu)) {
561 /* CPU not present in MD */
562 res = DR_CPU_RES_NOT_IN_MD;
563 stat = DR_CPU_STAT_NOT_PRESENT;
564 } else if (err == -ENODEV) {
565 /* CPU did not call in successfully */
566 res = DR_CPU_RES_CPU_NOT_RESPONDING;
567 }
568
569 printk(KERN_INFO "ds-%lu: CPU startup failed err=%d\n",
570 dp->id, err);
571 dr_cpu_mark(resp, cpu, ncpus, res, stat);
572 }
573 }
574
575 spin_lock_irqsave(&ds_lock, flags);
576 __ds_send(dp->lp, resp, resp_len);
577 spin_unlock_irqrestore(&ds_lock, flags);
578
579 kfree(resp);
580
581 /* Redistribute IRQs, taking into account the new cpus. */
582 fixup_irqs();
583
584 return 0;
585}
586
587static int dr_cpu_unconfigure(struct ds_info *dp,
588 struct ds_cap_state *cp,
589 u64 req_num,
590 cpumask_t *mask)
591{
592 struct ds_data *resp;
593 int resp_len, ncpus, cpu;
594 unsigned long flags;
595
596 ncpus = cpus_weight(*mask);
597 resp_len = dr_cpu_size_response(ncpus);
598 resp = kzalloc(resp_len, GFP_KERNEL);
599 if (!resp)
600 return -ENOMEM;
601
602 dr_cpu_init_response(resp, req_num, cp->handle,
603 resp_len, ncpus, mask,
604 DR_CPU_STAT_UNCONFIGURED);
605
606 for_each_cpu_mask(cpu, *mask) {
607 int err;
608
609 printk(KERN_INFO "ds-%lu: Shutting down cpu %d...\n",
610 dp->id, cpu);
611 err = cpu_down(cpu);
612 if (err)
613 dr_cpu_mark(resp, cpu, ncpus,
614 DR_CPU_RES_FAILURE,
615 DR_CPU_STAT_CONFIGURED);
616 }
617
618 spin_lock_irqsave(&ds_lock, flags);
619 __ds_send(dp->lp, resp, resp_len);
620 spin_unlock_irqrestore(&ds_lock, flags);
621
622 kfree(resp);
623
624 return 0;
625}
626
627static void dr_cpu_data(struct ds_info *dp,
628 struct ds_cap_state *cp,
629 void *buf, int len)
630{
631 struct ds_data *data = buf;
632 struct dr_cpu_tag *tag = (struct dr_cpu_tag *) (data + 1);
633 u32 *cpu_list = (u32 *) (tag + 1);
634 u64 req_num = tag->req_num;
635 cpumask_t mask;
636 unsigned int i;
637 int err;
638
639 switch (tag->type) {
640 case DR_CPU_CONFIGURE:
641 case DR_CPU_UNCONFIGURE:
642 case DR_CPU_FORCE_UNCONFIGURE:
643 break;
644
645 default:
646 dr_cpu_send_error(dp, cp, data);
647 return;
648 }
649
650 purge_dups(cpu_list, tag->num_records);
651
652 cpus_clear(mask);
653 for (i = 0; i < tag->num_records; i++) {
654 if (cpu_list[i] == CPU_SENTINEL)
655 continue;
656
657 if (cpu_list[i] < NR_CPUS)
658 cpu_set(cpu_list[i], mask);
659 }
660
661 if (tag->type == DR_CPU_CONFIGURE)
662 err = dr_cpu_configure(dp, cp, req_num, &mask);
663 else
664 err = dr_cpu_unconfigure(dp, cp, req_num, &mask);
665
666 if (err)
667 dr_cpu_send_error(dp, cp, data);
668}
669#endif /* CONFIG_HOTPLUG_CPU */
670
671struct ds_pri_msg {
672 __u64 req_num;
673 __u64 type;
674#define DS_PRI_REQUEST 0x00
675#define DS_PRI_DATA 0x01
676#define DS_PRI_UPDATE 0x02
677};
678
679static void ds_pri_data(struct ds_info *dp,
680 struct ds_cap_state *cp,
681 void *buf, int len)
682{
683 struct ds_data *dpkt = buf;
684 struct ds_pri_msg *rp;
685
686 rp = (struct ds_pri_msg *) (dpkt + 1);
687
688 printk(KERN_INFO "ds-%lu: PRI REQ [%lx:%lx], len=%d\n",
689 dp->id, rp->req_num, rp->type, len);
690}
691
692struct ds_var_hdr {
693 __u32 type;
694#define DS_VAR_SET_REQ 0x00
695#define DS_VAR_DELETE_REQ 0x01
696#define DS_VAR_SET_RESP 0x02
697#define DS_VAR_DELETE_RESP 0x03
698};
699
700struct ds_var_set_msg {
701 struct ds_var_hdr hdr;
702 char name_and_value[0];
703};
704
705struct ds_var_delete_msg {
706 struct ds_var_hdr hdr;
707 char name[0];
708};
709
710struct ds_var_resp {
711 struct ds_var_hdr hdr;
712 __u32 result;
713#define DS_VAR_SUCCESS 0x00
714#define DS_VAR_NO_SPACE 0x01
715#define DS_VAR_INVALID_VAR 0x02
716#define DS_VAR_INVALID_VAL 0x03
717#define DS_VAR_NOT_PRESENT 0x04
718};
719
720static DEFINE_MUTEX(ds_var_mutex);
721static int ds_var_doorbell;
722static int ds_var_response;
723
724static void ds_var_data(struct ds_info *dp,
725 struct ds_cap_state *cp,
726 void *buf, int len)
727{
728 struct ds_data *dpkt = buf;
729 struct ds_var_resp *rp;
730
731 rp = (struct ds_var_resp *) (dpkt + 1);
732
733 if (rp->hdr.type != DS_VAR_SET_RESP &&
734 rp->hdr.type != DS_VAR_DELETE_RESP)
735 return;
736
737 ds_var_response = rp->result;
738 wmb();
739 ds_var_doorbell = 1;
740}
741
742void ldom_set_var(const char *var, const char *value)
743{
744 struct ds_cap_state *cp;
745 struct ds_info *dp;
746 unsigned long flags;
747
748 spin_lock_irqsave(&ds_lock, flags);
749 cp = NULL;
750 for (dp = ds_info_list; dp; dp = dp->next) {
751 struct ds_cap_state *tmp;
752
753 tmp = find_cap_by_string(dp, "var-config");
754 if (tmp && tmp->state == CAP_STATE_REGISTERED) {
755 cp = tmp;
756 break;
757 }
758 }
759 if (!cp) {
760 for (dp = ds_info_list; dp; dp = dp->next) {
761 struct ds_cap_state *tmp;
762
763 tmp = find_cap_by_string(dp, "var-config-backup");
764 if (tmp && tmp->state == CAP_STATE_REGISTERED) {
765 cp = tmp;
766 break;
767 }
768 }
769 }
770 spin_unlock_irqrestore(&ds_lock, flags);
771
772 if (cp) {
773 union {
774 struct {
775 struct ds_data data;
776 struct ds_var_set_msg msg;
777 } header;
778 char all[512];
779 } pkt;
780 char *base, *p;
781 int msg_len, loops;
782
783 memset(&pkt, 0, sizeof(pkt));
784 pkt.header.data.tag.type = DS_DATA;
785 pkt.header.data.handle = cp->handle;
786 pkt.header.msg.hdr.type = DS_VAR_SET_REQ;
787 base = p = &pkt.header.msg.name_and_value[0];
788 strcpy(p, var);
789 p += strlen(var) + 1;
790 strcpy(p, value);
791 p += strlen(value) + 1;
792
793 msg_len = (sizeof(struct ds_data) +
794 sizeof(struct ds_var_set_msg) +
795 (p - base));
796 msg_len = (msg_len + 3) & ~3;
797 pkt.header.data.tag.len = msg_len - sizeof(struct ds_msg_tag);
798
799 mutex_lock(&ds_var_mutex);
800
801 spin_lock_irqsave(&ds_lock, flags);
802 ds_var_doorbell = 0;
803 ds_var_response = -1;
804
805 __ds_send(dp->lp, &pkt, msg_len);
806 spin_unlock_irqrestore(&ds_lock, flags);
807
808 loops = 1000;
809 while (ds_var_doorbell == 0) {
810 if (loops-- < 0)
811 break;
812 barrier();
813 udelay(100);
814 }
815
816 mutex_unlock(&ds_var_mutex);
817
818 if (ds_var_doorbell == 0 ||
819 ds_var_response != DS_VAR_SUCCESS)
820 printk(KERN_ERR "ds-%lu: var-config [%s:%s] "
821 "failed, response(%d).\n",
822 dp->id, var, value,
823 ds_var_response);
824 } else {
825 printk(KERN_ERR PFX "var-config not registered so "
826 "could not set (%s) variable to (%s).\n",
827 var, value);
828 }
829}
830
831void ldom_reboot(const char *boot_command)
832{
833 /* Don't bother with any of this if the boot_command
834 * is empty.
835 */
836 if (boot_command && strlen(boot_command)) {
837 char full_boot_str[256];
838
839 strcpy(full_boot_str, "boot ");
840 strcpy(full_boot_str + strlen("boot "), boot_command);
841
842 ldom_set_var("reboot-command", full_boot_str);
843 }
844 sun4v_mach_sir();
845}
846
847void ldom_power_off(void)
848{
849 sun4v_mach_exit(0);
850}
851
852static void ds_conn_reset(struct ds_info *dp)
853{
854 printk(KERN_ERR "ds-%lu: ds_conn_reset() from %p\n",
855 dp->id, __builtin_return_address(0));
856}
857
858static int register_services(struct ds_info *dp)
859{
860 struct ldc_channel *lp = dp->lp;
861 int i;
862
863 for (i = 0; i < dp->num_ds_states; i++) {
864 struct {
865 struct ds_reg_req req;
866 u8 id_buf[256];
867 } pbuf;
868 struct ds_cap_state *cp = &dp->ds_states[i];
869 int err, msg_len;
870 u64 new_count;
871
872 if (cp->state == CAP_STATE_REGISTERED)
873 continue;
874
875 new_count = sched_clock() & 0xffffffff;
876 cp->handle = ((u64) i << 32) | new_count;
877
878 msg_len = (sizeof(struct ds_reg_req) +
879 strlen(cp->service_id));
880
881 memset(&pbuf, 0, sizeof(pbuf));
882 pbuf.req.tag.type = DS_REG_REQ;
883 pbuf.req.tag.len = (msg_len - sizeof(struct ds_msg_tag));
884 pbuf.req.handle = cp->handle;
885 pbuf.req.major = 1;
886 pbuf.req.minor = 0;
887 strcpy(pbuf.req.svc_id, cp->service_id);
888
889 err = __ds_send(lp, &pbuf, msg_len);
890 if (err > 0)
891 cp->state = CAP_STATE_REG_SENT;
892 }
893 return 0;
894}
895
896static int ds_handshake(struct ds_info *dp, struct ds_msg_tag *pkt)
897{
898
899 if (dp->hs_state == DS_HS_START) {
900 if (pkt->type != DS_INIT_ACK)
901 goto conn_reset;
902
903 dp->hs_state = DS_HS_DONE;
904
905 return register_services(dp);
906 }
907
908 if (dp->hs_state != DS_HS_DONE)
909 goto conn_reset;
910
911 if (pkt->type == DS_REG_ACK) {
912 struct ds_reg_ack *ap = (struct ds_reg_ack *) pkt;
913 struct ds_cap_state *cp = find_cap(dp, ap->handle);
914
915 if (!cp) {
916 printk(KERN_ERR "ds-%lu: REG ACK for unknown "
917 "handle %lx\n", dp->id, ap->handle);
918 return 0;
919 }
920 printk(KERN_INFO "ds-%lu: Registered %s service.\n",
921 dp->id, cp->service_id);
922 cp->state = CAP_STATE_REGISTERED;
923 } else if (pkt->type == DS_REG_NACK) {
924 struct ds_reg_nack *np = (struct ds_reg_nack *) pkt;
925 struct ds_cap_state *cp = find_cap(dp, np->handle);
926
927 if (!cp) {
928 printk(KERN_ERR "ds-%lu: REG NACK for "
929 "unknown handle %lx\n",
930 dp->id, np->handle);
931 return 0;
932 }
933 cp->state = CAP_STATE_UNKNOWN;
934 }
935
936 return 0;
937
938conn_reset:
939 ds_conn_reset(dp);
940 return -ECONNRESET;
941}
942
943static void __send_ds_nack(struct ds_info *dp, u64 handle)
944{
945 struct ds_data_nack nack = {
946 .tag = {
947 .type = DS_NACK,
948 .len = (sizeof(struct ds_data_nack) -
949 sizeof(struct ds_msg_tag)),
950 },
951 .handle = handle,
952 .result = DS_INV_HDL,
953 };
954
955 __ds_send(dp->lp, &nack, sizeof(nack));
956}
957
958static LIST_HEAD(ds_work_list);
959static DECLARE_WAIT_QUEUE_HEAD(ds_wait);
960
961struct ds_queue_entry {
962 struct list_head list;
963 struct ds_info *dp;
964 int req_len;
965 int __pad;
966 u64 req[0];
967};
968
969static void process_ds_work(void)
970{
971 struct ds_queue_entry *qp, *tmp;
972 unsigned long flags;
973 LIST_HEAD(todo);
974
975 spin_lock_irqsave(&ds_lock, flags);
976 list_splice(&ds_work_list, &todo);
977 INIT_LIST_HEAD(&ds_work_list);
978 spin_unlock_irqrestore(&ds_lock, flags);
979
980 list_for_each_entry_safe(qp, tmp, &todo, list) {
981 struct ds_data *dpkt = (struct ds_data *) qp->req;
982 struct ds_info *dp = qp->dp;
983 struct ds_cap_state *cp = find_cap(dp, dpkt->handle);
984 int req_len = qp->req_len;
985
986 if (!cp) {
987 printk(KERN_ERR "ds-%lu: Data for unknown "
988 "handle %lu\n",
989 dp->id, dpkt->handle);
990
991 spin_lock_irqsave(&ds_lock, flags);
992 __send_ds_nack(dp, dpkt->handle);
993 spin_unlock_irqrestore(&ds_lock, flags);
994 } else {
995 cp->data(dp, cp, dpkt, req_len);
996 }
997
998 list_del(&qp->list);
999 kfree(qp);
1000 }
1001}
1002
1003static int ds_thread(void *__unused)
1004{
1005 DEFINE_WAIT(wait);
1006
1007 while (1) {
1008 prepare_to_wait(&ds_wait, &wait, TASK_INTERRUPTIBLE);
1009 if (list_empty(&ds_work_list))
1010 schedule();
1011 finish_wait(&ds_wait, &wait);
1012
1013 if (kthread_should_stop())
1014 break;
1015
1016 process_ds_work();
1017 }
1018
1019 return 0;
1020}
1021
1022static int ds_data(struct ds_info *dp, struct ds_msg_tag *pkt, int len)
1023{
1024 struct ds_data *dpkt = (struct ds_data *) pkt;
1025 struct ds_queue_entry *qp;
1026
1027 qp = kmalloc(sizeof(struct ds_queue_entry) + len, GFP_ATOMIC);
1028 if (!qp) {
1029 __send_ds_nack(dp, dpkt->handle);
1030 } else {
1031 qp->dp = dp;
1032 memcpy(&qp->req, pkt, len);
1033 list_add_tail(&qp->list, &ds_work_list);
1034 wake_up(&ds_wait);
1035 }
1036 return 0;
1037}
1038
1039static void ds_up(struct ds_info *dp)
1040{
1041 struct ldc_channel *lp = dp->lp;
1042 struct ds_ver_req req;
1043 int err;
1044
1045 req.tag.type = DS_INIT_REQ;
1046 req.tag.len = sizeof(req) - sizeof(struct ds_msg_tag);
1047 req.ver.major = 1;
1048 req.ver.minor = 0;
1049
1050 err = __ds_send(lp, &req, sizeof(req));
1051 if (err > 0)
1052 dp->hs_state = DS_HS_START;
1053}
1054
1055static void ds_reset(struct ds_info *dp)
1056{
1057 int i;
1058
1059 dp->hs_state = 0;
1060
1061 for (i = 0; i < dp->num_ds_states; i++) {
1062 struct ds_cap_state *cp = &dp->ds_states[i];
1063
1064 cp->state = CAP_STATE_UNKNOWN;
1065 }
1066}
1067
1068static void ds_event(void *arg, int event)
1069{
1070 struct ds_info *dp = arg;
1071 struct ldc_channel *lp = dp->lp;
1072 unsigned long flags;
1073 int err;
1074
1075 spin_lock_irqsave(&ds_lock, flags);
1076
1077 if (event == LDC_EVENT_UP) {
1078 ds_up(dp);
1079 spin_unlock_irqrestore(&ds_lock, flags);
1080 return;
1081 }
1082
1083 if (event == LDC_EVENT_RESET) {
1084 ds_reset(dp);
1085 spin_unlock_irqrestore(&ds_lock, flags);
1086 return;
1087 }
1088
1089 if (event != LDC_EVENT_DATA_READY) {
1090 printk(KERN_WARNING "ds-%lu: Unexpected LDC event %d\n",
1091 dp->id, event);
1092 spin_unlock_irqrestore(&ds_lock, flags);
1093 return;
1094 }
1095
1096 err = 0;
1097 while (1) {
1098 struct ds_msg_tag *tag;
1099
1100 err = ldc_read(lp, dp->rcv_buf, sizeof(*tag));
1101
1102 if (unlikely(err < 0)) {
1103 if (err == -ECONNRESET)
1104 ds_conn_reset(dp);
1105 break;
1106 }
1107 if (err == 0)
1108 break;
1109
1110 tag = dp->rcv_buf;
1111 err = ldc_read(lp, tag + 1, tag->len);
1112
1113 if (unlikely(err < 0)) {
1114 if (err == -ECONNRESET)
1115 ds_conn_reset(dp);
1116 break;
1117 }
1118 if (err < tag->len)
1119 break;
1120
1121 if (tag->type < DS_DATA)
1122 err = ds_handshake(dp, dp->rcv_buf);
1123 else
1124 err = ds_data(dp, dp->rcv_buf,
1125 sizeof(*tag) + err);
1126 if (err == -ECONNRESET)
1127 break;
1128 }
1129
1130 spin_unlock_irqrestore(&ds_lock, flags);
1131}
1132
1133static int __devinit ds_probe(struct vio_dev *vdev,
1134 const struct vio_device_id *id)
1135{
1136 static int ds_version_printed;
1137 struct ldc_channel_config ds_cfg = {
1138 .event = ds_event,
1139 .mtu = 4096,
1140 .mode = LDC_MODE_STREAM,
1141 };
1142 struct mdesc_handle *hp;
1143 struct ldc_channel *lp;
1144 struct ds_info *dp;
1145 const u64 *val;
1146 int err, i;
1147
1148 if (ds_version_printed++ == 0)
1149 printk(KERN_INFO "%s", version);
1150
1151 dp = kzalloc(sizeof(*dp), GFP_KERNEL);
1152 err = -ENOMEM;
1153 if (!dp)
1154 goto out_err;
1155
1156 hp = mdesc_grab();
1157 val = mdesc_get_property(hp, vdev->mp, "id", NULL);
1158 if (val)
1159 dp->id = *val;
1160 mdesc_release(hp);
1161
1162 dp->rcv_buf = kzalloc(4096, GFP_KERNEL);
1163 if (!dp->rcv_buf)
1164 goto out_free_dp;
1165
1166 dp->rcv_buf_len = 4096;
1167
1168 dp->ds_states = kzalloc(sizeof(ds_states_template),
1169 GFP_KERNEL);
1170 if (!dp->ds_states)
1171 goto out_free_rcv_buf;
1172
1173 memcpy(dp->ds_states, ds_states_template,
1174 sizeof(ds_states_template));
1175 dp->num_ds_states = ARRAY_SIZE(ds_states_template);
1176
1177 for (i = 0; i < dp->num_ds_states; i++)
1178 dp->ds_states[i].handle = ((u64)i << 32);
1179
1180 ds_cfg.tx_irq = vdev->tx_irq;
1181 ds_cfg.rx_irq = vdev->rx_irq;
1182
1183 lp = ldc_alloc(vdev->channel_id, &ds_cfg, dp);
1184 if (IS_ERR(lp)) {
1185 err = PTR_ERR(lp);
1186 goto out_free_ds_states;
1187 }
1188 dp->lp = lp;
1189
1190 err = ldc_bind(lp, "DS");
1191 if (err)
1192 goto out_free_ldc;
1193
1194 spin_lock_irq(&ds_lock);
1195 dp->next = ds_info_list;
1196 ds_info_list = dp;
1197 spin_unlock_irq(&ds_lock);
1198
1199 return err;
1200
1201out_free_ldc:
1202 ldc_free(dp->lp);
1203
1204out_free_ds_states:
1205 kfree(dp->ds_states);
1206
1207out_free_rcv_buf:
1208 kfree(dp->rcv_buf);
1209
1210out_free_dp:
1211 kfree(dp);
1212
1213out_err:
1214 return err;
1215}
1216
1217static int ds_remove(struct vio_dev *vdev)
1218{
1219 return 0;
1220}
1221
1222static struct vio_device_id ds_match[] = {
1223 {
1224 .type = "domain-services-port",
1225 },
1226 {},
1227};
1228
1229static struct vio_driver ds_driver = {
1230 .id_table = ds_match,
1231 .probe = ds_probe,
1232 .remove = ds_remove,
1233 .driver = {
1234 .name = "ds",
1235 .owner = THIS_MODULE,
1236 }
1237};
1238
1239static int __init ds_init(void)
1240{
1241 kthread_run(ds_thread, NULL, "kldomd");
1242
1243 return vio_register_driver(&ds_driver);
1244}
1245
1246subsys_initcall(ds_init);
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c
index ad55a9bb50dd..6d2956179cde 100644
--- a/arch/sparc64/kernel/ebus.c
+++ b/arch/sparc64/kernel/ebus.c
@@ -362,6 +362,7 @@ static int __init child_regs_nonstandard(struct linux_ebus_device *dev)
362static void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *dev) 362static void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *dev)
363{ 363{
364 struct linux_ebus_child *child; 364 struct linux_ebus_child *child;
365 struct dev_archdata *sd;
365 struct of_device *op; 366 struct of_device *op;
366 int i, len; 367 int i, len;
367 368
@@ -387,6 +388,10 @@ static void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_de
387 dev->irqs[i] = op->irqs[i]; 388 dev->irqs[i] = op->irqs[i];
388 } 389 }
389 390
391 sd = &dev->ofdev.dev.archdata;
392 sd->prom_node = dp;
393 sd->op = &dev->ofdev;
394
390 dev->ofdev.node = dp; 395 dev->ofdev.node = dp;
391 dev->ofdev.dev.parent = &dev->bus->ofdev.dev; 396 dev->ofdev.dev.parent = &dev->bus->ofdev.dev;
392 dev->ofdev.dev.bus = &ebus_bus_type; 397 dev->ofdev.dev.bus = &ebus_bus_type;
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S
index ed712e0b3372..8059531bf0ac 100644
--- a/arch/sparc64/kernel/entry.S
+++ b/arch/sparc64/kernel/entry.S
@@ -2357,8 +2357,9 @@ sun4v_ldc_unmap:
2357 nop 2357 nop
2358 .size sun4v_ldc_unmap, .-sun4v_ldc_unmap 2358 .size sun4v_ldc_unmap, .-sun4v_ldc_unmap
2359 2359
2360 /* %o0: cookie 2360 /* %o0: channel
2361 * %o1: mte_cookie 2361 * %o1: cookie
2362 * %o2: mte_cookie
2362 * 2363 *
2363 * returns %o0: status 2364 * returns %o0: status
2364 */ 2365 */
@@ -2514,9 +2515,9 @@ sun4v_ncs_request:
2514 nop 2515 nop
2515 .size sun4v_ncs_request, .-sun4v_ncs_request 2516 .size sun4v_ncs_request, .-sun4v_ncs_request
2516 2517
2517 .globl sun4v_scv_send 2518 .globl sun4v_svc_send
2518 .type sun4v_scv_send,#function 2519 .type sun4v_svc_send,#function
2519sun4v_scv_send: 2520sun4v_svc_send:
2520 save %sp, -192, %sp 2521 save %sp, -192, %sp
2521 mov %i0, %o0 2522 mov %i0, %o0
2522 mov %i1, %o1 2523 mov %i1, %o1
@@ -2526,11 +2527,11 @@ sun4v_scv_send:
2526 stx %o1, [%i3] 2527 stx %o1, [%i3]
2527 ret 2528 ret
2528 restore 2529 restore
2529 .size sun4v_scv_send, .-sun4v_scv_send 2530 .size sun4v_svc_send, .-sun4v_svc_send
2530 2531
2531 .globl sun4v_scv_recv 2532 .globl sun4v_svc_recv
2532 .type sun4v_scv_recv,#function 2533 .type sun4v_svc_recv,#function
2533sun4v_scv_recv: 2534sun4v_svc_recv:
2534 save %sp, -192, %sp 2535 save %sp, -192, %sp
2535 mov %i0, %o0 2536 mov %i0, %o0
2536 mov %i1, %o1 2537 mov %i1, %o1
@@ -2540,33 +2541,55 @@ sun4v_scv_recv:
2540 stx %o1, [%i3] 2541 stx %o1, [%i3]
2541 ret 2542 ret
2542 restore 2543 restore
2543 .size sun4v_scv_recv, .-sun4v_scv_recv 2544 .size sun4v_svc_recv, .-sun4v_svc_recv
2544 2545
2545 .globl sun4v_scv_getstatus 2546 .globl sun4v_svc_getstatus
2546 .type sun4v_scv_getstatus,#function 2547 .type sun4v_svc_getstatus,#function
2547sun4v_scv_getstatus: 2548sun4v_svc_getstatus:
2548 mov HV_FAST_SVC_GETSTATUS, %o5 2549 mov HV_FAST_SVC_GETSTATUS, %o5
2549 mov %o1, %o4 2550 mov %o1, %o4
2550 ta HV_FAST_TRAP 2551 ta HV_FAST_TRAP
2551 stx %o1, [%o4] 2552 stx %o1, [%o4]
2552 retl 2553 retl
2553 nop 2554 nop
2554 .size sun4v_scv_getstatus, .-sun4v_scv_getstatus 2555 .size sun4v_svc_getstatus, .-sun4v_svc_getstatus
2555 2556
2556 .globl sun4v_scv_setstatus 2557 .globl sun4v_svc_setstatus
2557 .type sun4v_scv_setstatus,#function 2558 .type sun4v_svc_setstatus,#function
2558sun4v_scv_setstatus: 2559sun4v_svc_setstatus:
2559 mov HV_FAST_SVC_SETSTATUS, %o5 2560 mov HV_FAST_SVC_SETSTATUS, %o5
2560 ta HV_FAST_TRAP 2561 ta HV_FAST_TRAP
2561 retl 2562 retl
2562 nop 2563 nop
2563 .size sun4v_scv_setstatus, .-sun4v_scv_setstatus 2564 .size sun4v_svc_setstatus, .-sun4v_svc_setstatus
2564 2565
2565 .globl sun4v_scv_clrstatus 2566 .globl sun4v_svc_clrstatus
2566 .type sun4v_scv_clrstatus,#function 2567 .type sun4v_svc_clrstatus,#function
2567sun4v_scv_clrstatus: 2568sun4v_svc_clrstatus:
2568 mov HV_FAST_SVC_CLRSTATUS, %o5 2569 mov HV_FAST_SVC_CLRSTATUS, %o5
2569 ta HV_FAST_TRAP 2570 ta HV_FAST_TRAP
2570 retl 2571 retl
2571 nop 2572 nop
2572 .size sun4v_scv_clrstatus, .-sun4v_scv_clrstatus 2573 .size sun4v_svc_clrstatus, .-sun4v_svc_clrstatus
2574
2575 .globl sun4v_mmustat_conf
2576 .type sun4v_mmustat_conf,#function
2577sun4v_mmustat_conf:
2578 mov %o1, %o4
2579 mov HV_FAST_MMUSTAT_CONF, %o5
2580 ta HV_FAST_TRAP
2581 stx %o1, [%o4]
2582 retl
2583 nop
2584 .size sun4v_mmustat_conf, .-sun4v_mmustat_conf
2585
2586 .globl sun4v_mmustat_info
2587 .type sun4v_mmustat_info,#function
2588sun4v_mmustat_info:
2589 mov %o0, %o4
2590 mov HV_FAST_MMUSTAT_INFO, %o5
2591 ta HV_FAST_TRAP
2592 stx %o1, [%o4]
2593 retl
2594 nop
2595 .size sun4v_mmustat_info, .-sun4v_mmustat_info
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S
index 77259526cb15..35feacb6b8ec 100644
--- a/arch/sparc64/kernel/head.S
+++ b/arch/sparc64/kernel/head.S
@@ -458,7 +458,6 @@ tlb_fixup_done:
458 or %g6, %lo(init_thread_union), %g6 458 or %g6, %lo(init_thread_union), %g6
459 ldx [%g6 + TI_TASK], %g4 459 ldx [%g6 + TI_TASK], %g4
460 mov %sp, %l6 460 mov %sp, %l6
461 mov %o4, %l7
462 461
463 wr %g0, ASI_P, %asi 462 wr %g0, ASI_P, %asi
464 mov 1, %g1 463 mov 1, %g1
diff --git a/arch/sparc64/kernel/hvtramp.S b/arch/sparc64/kernel/hvtramp.S
new file mode 100644
index 000000000000..a55c252e18cc
--- /dev/null
+++ b/arch/sparc64/kernel/hvtramp.S
@@ -0,0 +1,140 @@
1/* hvtramp.S: Hypervisor start-cpu trampoline code.
2 *
3 * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
4 */
5
6#include <asm/thread_info.h>
7#include <asm/hypervisor.h>
8#include <asm/scratchpad.h>
9#include <asm/spitfire.h>
10#include <asm/hvtramp.h>
11#include <asm/pstate.h>
12#include <asm/ptrace.h>
13#include <asm/head.h>
14#include <asm/asi.h>
15
16 .text
17 .align 8
18 .globl hv_cpu_startup, hv_cpu_startup_end
19
20 /* This code executes directly out of the hypervisor
21 * with physical addressing (va==pa). %o0 contains
22 * our client argument which for Linux points to
23 * a descriptor data structure which defines the
24 * MMU entries we need to load up.
25 *
26 * After we set things up we enable the MMU and call
27 * into the kernel.
28 *
29 * First setup basic privileged cpu state.
30 */
31hv_cpu_startup:
32 SET_GL(0)
33 wrpr %g0, 15, %pil
34 wrpr %g0, 0, %canrestore
35 wrpr %g0, 0, %otherwin
36 wrpr %g0, 6, %cansave
37 wrpr %g0, 6, %cleanwin
38 wrpr %g0, 0, %cwp
39 wrpr %g0, 0, %wstate
40 wrpr %g0, 0, %tl
41
42 sethi %hi(sparc64_ttable_tl0), %g1
43 wrpr %g1, %tba
44
45 mov %o0, %l0
46
47 lduw [%l0 + HVTRAMP_DESCR_CPU], %g1
48 mov SCRATCHPAD_CPUID, %g2
49 stxa %g1, [%g2] ASI_SCRATCHPAD
50
51 ldx [%l0 + HVTRAMP_DESCR_FAULT_INFO_VA], %g2
52 stxa %g2, [%g0] ASI_SCRATCHPAD
53
54 mov 0, %l1
55 lduw [%l0 + HVTRAMP_DESCR_NUM_MAPPINGS], %l2
56 add %l0, HVTRAMP_DESCR_MAPS, %l3
57
581: ldx [%l3 + HVTRAMP_MAPPING_VADDR], %o0
59 clr %o1
60 ldx [%l3 + HVTRAMP_MAPPING_TTE], %o2
61 mov HV_MMU_IMMU | HV_MMU_DMMU, %o3
62 mov HV_FAST_MMU_MAP_PERM_ADDR, %o5
63 ta HV_FAST_TRAP
64
65 brnz,pn %o0, 80f
66 nop
67
68 add %l1, 1, %l1
69 cmp %l1, %l2
70 blt,a,pt %xcc, 1b
71 add %l3, HVTRAMP_MAPPING_SIZE, %l3
72
73 ldx [%l0 + HVTRAMP_DESCR_FAULT_INFO_PA], %o0
74 mov HV_FAST_MMU_FAULT_AREA_CONF, %o5
75 ta HV_FAST_TRAP
76
77 brnz,pn %o0, 80f
78 nop
79
80 wrpr %g0, (PSTATE_PRIV | PSTATE_PEF), %pstate
81
82 ldx [%l0 + HVTRAMP_DESCR_THREAD_REG], %l6
83
84 mov 1, %o0
85 set 1f, %o1
86 mov HV_FAST_MMU_ENABLE, %o5
87 ta HV_FAST_TRAP
88
89 ba,pt %xcc, 80f
90 nop
91
921:
93 wr %g0, 0, %fprs
94 wr %g0, ASI_P, %asi
95
96 mov PRIMARY_CONTEXT, %g7
97 stxa %g0, [%g7] ASI_MMU
98 membar #Sync
99
100 mov SECONDARY_CONTEXT, %g7
101 stxa %g0, [%g7] ASI_MMU
102 membar #Sync
103
104 mov %l6, %g6
105 ldx [%g6 + TI_TASK], %g4
106
107 mov 1, %g5
108 sllx %g5, THREAD_SHIFT, %g5
109 sub %g5, (STACKFRAME_SZ + STACK_BIAS), %g5
110 add %g6, %g5, %sp
111 mov 0, %fp
112
113 call init_irqwork_curcpu
114 nop
115 call hard_smp_processor_id
116 nop
117
118 mov %o0, %o1
119 mov 0, %o0
120 mov 0, %o2
121 call sun4v_init_mondo_queues
122 mov 1, %o3
123
124 call init_cur_cpu_trap
125 mov %g6, %o0
126
127 wrpr %g0, (PSTATE_PRIV | PSTATE_PEF | PSTATE_IE), %pstate
128
129 call smp_callin
130 nop
131 call cpu_idle
132 mov 0, %o0
133 call cpu_panic
134 nop
135
13680: ba,pt %xcc, 80b
137 nop
138
139 .align 8
140hv_cpu_startup_end:
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index a36f8dd0c021..db31bf6b42db 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -1,7 +1,6 @@
1/* $Id: irq.c,v 1.114 2002/01/11 08:45:38 davem Exp $ 1/* irq.c: UltraSparc IRQ handling/init/registry.
2 * irq.c: UltraSparc IRQ handling/init/registry.
3 * 2 *
4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1997, 2007 David S. Miller (davem@davemloft.net)
5 * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be)
6 * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) 5 * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
7 */ 6 */
@@ -43,6 +42,7 @@
43#include <asm/cpudata.h> 42#include <asm/cpudata.h>
44#include <asm/auxio.h> 43#include <asm/auxio.h>
45#include <asm/head.h> 44#include <asm/head.h>
45#include <asm/hypervisor.h>
46 46
47/* UPA nodes send interrupt packet to UltraSparc with first data reg 47/* UPA nodes send interrupt packet to UltraSparc with first data reg
48 * value low 5 (7 on Starfire) bits holding the IRQ identifier being 48 * value low 5 (7 on Starfire) bits holding the IRQ identifier being
@@ -87,7 +87,11 @@ struct ino_bucket ivector_table[NUM_IVECS] __attribute__ ((aligned (SMP_CACHE_BY
87 */ 87 */
88#define irq_work(__cpu) &(trap_block[(__cpu)].irq_worklist) 88#define irq_work(__cpu) &(trap_block[(__cpu)].irq_worklist)
89 89
90static unsigned int virt_to_real_irq_table[NR_IRQS]; 90static struct {
91 unsigned int irq;
92 unsigned int dev_handle;
93 unsigned int dev_ino;
94} virt_to_real_irq_table[NR_IRQS];
91 95
92static unsigned char virt_irq_alloc(unsigned int real_irq) 96static unsigned char virt_irq_alloc(unsigned int real_irq)
93{ 97{
@@ -96,7 +100,7 @@ static unsigned char virt_irq_alloc(unsigned int real_irq)
96 BUILD_BUG_ON(NR_IRQS >= 256); 100 BUILD_BUG_ON(NR_IRQS >= 256);
97 101
98 for (ent = 1; ent < NR_IRQS; ent++) { 102 for (ent = 1; ent < NR_IRQS; ent++) {
99 if (!virt_to_real_irq_table[ent]) 103 if (!virt_to_real_irq_table[ent].irq)
100 break; 104 break;
101 } 105 }
102 if (ent >= NR_IRQS) { 106 if (ent >= NR_IRQS) {
@@ -104,7 +108,7 @@ static unsigned char virt_irq_alloc(unsigned int real_irq)
104 return 0; 108 return 0;
105 } 109 }
106 110
107 virt_to_real_irq_table[ent] = real_irq; 111 virt_to_real_irq_table[ent].irq = real_irq;
108 112
109 return ent; 113 return ent;
110} 114}
@@ -117,8 +121,8 @@ static void virt_irq_free(unsigned int virt_irq)
117 if (virt_irq >= NR_IRQS) 121 if (virt_irq >= NR_IRQS)
118 return; 122 return;
119 123
120 real_irq = virt_to_real_irq_table[virt_irq]; 124 real_irq = virt_to_real_irq_table[virt_irq].irq;
121 virt_to_real_irq_table[virt_irq] = 0; 125 virt_to_real_irq_table[virt_irq].irq = 0;
122 126
123 __bucket(real_irq)->virt_irq = 0; 127 __bucket(real_irq)->virt_irq = 0;
124} 128}
@@ -126,7 +130,7 @@ static void virt_irq_free(unsigned int virt_irq)
126 130
127static unsigned int virt_to_real_irq(unsigned char virt_irq) 131static unsigned int virt_to_real_irq(unsigned char virt_irq)
128{ 132{
129 return virt_to_real_irq_table[virt_irq]; 133 return virt_to_real_irq_table[virt_irq].irq;
130} 134}
131 135
132/* 136/*
@@ -293,6 +297,11 @@ static void sun4u_irq_enable(unsigned int virt_irq)
293 } 297 }
294} 298}
295 299
300static void sun4u_set_affinity(unsigned int virt_irq, cpumask_t mask)
301{
302 sun4u_irq_enable(virt_irq);
303}
304
296static void sun4u_irq_disable(unsigned int virt_irq) 305static void sun4u_irq_disable(unsigned int virt_irq)
297{ 306{
298 struct irq_handler_data *data = get_irq_chip_data(virt_irq); 307 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
@@ -309,6 +318,10 @@ static void sun4u_irq_disable(unsigned int virt_irq)
309static void sun4u_irq_end(unsigned int virt_irq) 318static void sun4u_irq_end(unsigned int virt_irq)
310{ 319{
311 struct irq_handler_data *data = get_irq_chip_data(virt_irq); 320 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
321 struct irq_desc *desc = irq_desc + virt_irq;
322
323 if (unlikely(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
324 return;
312 325
313 if (likely(data)) 326 if (likely(data))
314 upa_writeq(ICLR_IDLE, data->iclr); 327 upa_writeq(ICLR_IDLE, data->iclr);
@@ -327,15 +340,37 @@ static void sun4v_irq_enable(unsigned int virt_irq)
327 340
328 err = sun4v_intr_settarget(ino, cpuid); 341 err = sun4v_intr_settarget(ino, cpuid);
329 if (err != HV_EOK) 342 if (err != HV_EOK)
330 printk("sun4v_intr_settarget(%x,%lu): err(%d)\n", 343 printk(KERN_ERR "sun4v_intr_settarget(%x,%lu): "
331 ino, cpuid, err); 344 "err(%d)\n", ino, cpuid, err);
345 err = sun4v_intr_setstate(ino, HV_INTR_STATE_IDLE);
346 if (err != HV_EOK)
347 printk(KERN_ERR "sun4v_intr_setstate(%x): "
348 "err(%d)\n", ino, err);
332 err = sun4v_intr_setenabled(ino, HV_INTR_ENABLED); 349 err = sun4v_intr_setenabled(ino, HV_INTR_ENABLED);
333 if (err != HV_EOK) 350 if (err != HV_EOK)
334 printk("sun4v_intr_setenabled(%x): err(%d)\n", 351 printk(KERN_ERR "sun4v_intr_setenabled(%x): err(%d)\n",
335 ino, err); 352 ino, err);
336 } 353 }
337} 354}
338 355
356static void sun4v_set_affinity(unsigned int virt_irq, cpumask_t mask)
357{
358 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
359 unsigned int ino = bucket - &ivector_table[0];
360
361 if (likely(bucket)) {
362 unsigned long cpuid;
363 int err;
364
365 cpuid = irq_choose_cpu(virt_irq);
366
367 err = sun4v_intr_settarget(ino, cpuid);
368 if (err != HV_EOK)
369 printk(KERN_ERR "sun4v_intr_settarget(%x,%lu): "
370 "err(%d)\n", ino, cpuid, err);
371 }
372}
373
339static void sun4v_irq_disable(unsigned int virt_irq) 374static void sun4v_irq_disable(unsigned int virt_irq)
340{ 375{
341 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); 376 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
@@ -346,7 +381,7 @@ static void sun4v_irq_disable(unsigned int virt_irq)
346 381
347 err = sun4v_intr_setenabled(ino, HV_INTR_DISABLED); 382 err = sun4v_intr_setenabled(ino, HV_INTR_DISABLED);
348 if (err != HV_EOK) 383 if (err != HV_EOK)
349 printk("sun4v_intr_setenabled(%x): " 384 printk(KERN_ERR "sun4v_intr_setenabled(%x): "
350 "err(%d)\n", ino, err); 385 "err(%d)\n", ino, err);
351 } 386 }
352} 387}
@@ -369,17 +404,119 @@ static void sun4v_irq_end(unsigned int virt_irq)
369{ 404{
370 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); 405 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
371 unsigned int ino = bucket - &ivector_table[0]; 406 unsigned int ino = bucket - &ivector_table[0];
407 struct irq_desc *desc = irq_desc + virt_irq;
408
409 if (unlikely(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
410 return;
372 411
373 if (likely(bucket)) { 412 if (likely(bucket)) {
374 int err; 413 int err;
375 414
376 err = sun4v_intr_setstate(ino, HV_INTR_STATE_IDLE); 415 err = sun4v_intr_setstate(ino, HV_INTR_STATE_IDLE);
377 if (err != HV_EOK) 416 if (err != HV_EOK)
378 printk("sun4v_intr_setstate(%x): " 417 printk(KERN_ERR "sun4v_intr_setstate(%x): "
379 "err(%d)\n", ino, err); 418 "err(%d)\n", ino, err);
380 } 419 }
381} 420}
382 421
422static void sun4v_virq_enable(unsigned int virt_irq)
423{
424 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
425
426 if (likely(bucket)) {
427 unsigned long cpuid, dev_handle, dev_ino;
428 int err;
429
430 cpuid = irq_choose_cpu(virt_irq);
431
432 dev_handle = virt_to_real_irq_table[virt_irq].dev_handle;
433 dev_ino = virt_to_real_irq_table[virt_irq].dev_ino;
434
435 err = sun4v_vintr_set_target(dev_handle, dev_ino, cpuid);
436 if (err != HV_EOK)
437 printk(KERN_ERR "sun4v_vintr_set_target(%lx,%lx,%lu): "
438 "err(%d)\n",
439 dev_handle, dev_ino, cpuid, err);
440 err = sun4v_vintr_set_state(dev_handle, dev_ino,
441 HV_INTR_STATE_IDLE);
442 if (err != HV_EOK)
443 printk(KERN_ERR "sun4v_vintr_set_state(%lx,%lx,"
444 "HV_INTR_STATE_IDLE): err(%d)\n",
445 dev_handle, dev_ino, err);
446 err = sun4v_vintr_set_valid(dev_handle, dev_ino,
447 HV_INTR_ENABLED);
448 if (err != HV_EOK)
449 printk(KERN_ERR "sun4v_vintr_set_state(%lx,%lx,"
450 "HV_INTR_ENABLED): err(%d)\n",
451 dev_handle, dev_ino, err);
452 }
453}
454
455static void sun4v_virt_set_affinity(unsigned int virt_irq, cpumask_t mask)
456{
457 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
458
459 if (likely(bucket)) {
460 unsigned long cpuid, dev_handle, dev_ino;
461 int err;
462
463 cpuid = irq_choose_cpu(virt_irq);
464
465 dev_handle = virt_to_real_irq_table[virt_irq].dev_handle;
466 dev_ino = virt_to_real_irq_table[virt_irq].dev_ino;
467
468 err = sun4v_vintr_set_target(dev_handle, dev_ino, cpuid);
469 if (err != HV_EOK)
470 printk(KERN_ERR "sun4v_vintr_set_target(%lx,%lx,%lu): "
471 "err(%d)\n",
472 dev_handle, dev_ino, cpuid, err);
473 }
474}
475
476static void sun4v_virq_disable(unsigned int virt_irq)
477{
478 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
479
480 if (likely(bucket)) {
481 unsigned long dev_handle, dev_ino;
482 int err;
483
484 dev_handle = virt_to_real_irq_table[virt_irq].dev_handle;
485 dev_ino = virt_to_real_irq_table[virt_irq].dev_ino;
486
487 err = sun4v_vintr_set_valid(dev_handle, dev_ino,
488 HV_INTR_DISABLED);
489 if (err != HV_EOK)
490 printk(KERN_ERR "sun4v_vintr_set_state(%lx,%lx,"
491 "HV_INTR_DISABLED): err(%d)\n",
492 dev_handle, dev_ino, err);
493 }
494}
495
496static void sun4v_virq_end(unsigned int virt_irq)
497{
498 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
499 struct irq_desc *desc = irq_desc + virt_irq;
500
501 if (unlikely(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
502 return;
503
504 if (likely(bucket)) {
505 unsigned long dev_handle, dev_ino;
506 int err;
507
508 dev_handle = virt_to_real_irq_table[virt_irq].dev_handle;
509 dev_ino = virt_to_real_irq_table[virt_irq].dev_ino;
510
511 err = sun4v_vintr_set_state(dev_handle, dev_ino,
512 HV_INTR_STATE_IDLE);
513 if (err != HV_EOK)
514 printk(KERN_ERR "sun4v_vintr_set_state(%lx,%lx,"
515 "HV_INTR_STATE_IDLE): err(%d)\n",
516 dev_handle, dev_ino, err);
517 }
518}
519
383static void run_pre_handler(unsigned int virt_irq) 520static void run_pre_handler(unsigned int virt_irq)
384{ 521{
385 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); 522 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
@@ -397,6 +534,7 @@ static struct irq_chip sun4u_irq = {
397 .enable = sun4u_irq_enable, 534 .enable = sun4u_irq_enable,
398 .disable = sun4u_irq_disable, 535 .disable = sun4u_irq_disable,
399 .end = sun4u_irq_end, 536 .end = sun4u_irq_end,
537 .set_affinity = sun4u_set_affinity,
400}; 538};
401 539
402static struct irq_chip sun4u_irq_ack = { 540static struct irq_chip sun4u_irq_ack = {
@@ -405,6 +543,7 @@ static struct irq_chip sun4u_irq_ack = {
405 .disable = sun4u_irq_disable, 543 .disable = sun4u_irq_disable,
406 .ack = run_pre_handler, 544 .ack = run_pre_handler,
407 .end = sun4u_irq_end, 545 .end = sun4u_irq_end,
546 .set_affinity = sun4u_set_affinity,
408}; 547};
409 548
410static struct irq_chip sun4v_irq = { 549static struct irq_chip sun4v_irq = {
@@ -412,6 +551,7 @@ static struct irq_chip sun4v_irq = {
412 .enable = sun4v_irq_enable, 551 .enable = sun4v_irq_enable,
413 .disable = sun4v_irq_disable, 552 .disable = sun4v_irq_disable,
414 .end = sun4v_irq_end, 553 .end = sun4v_irq_end,
554 .set_affinity = sun4v_set_affinity,
415}; 555};
416 556
417static struct irq_chip sun4v_irq_ack = { 557static struct irq_chip sun4v_irq_ack = {
@@ -420,6 +560,7 @@ static struct irq_chip sun4v_irq_ack = {
420 .disable = sun4v_irq_disable, 560 .disable = sun4v_irq_disable,
421 .ack = run_pre_handler, 561 .ack = run_pre_handler,
422 .end = sun4v_irq_end, 562 .end = sun4v_irq_end,
563 .set_affinity = sun4v_set_affinity,
423}; 564};
424 565
425#ifdef CONFIG_PCI_MSI 566#ifdef CONFIG_PCI_MSI
@@ -431,9 +572,27 @@ static struct irq_chip sun4v_msi = {
431 .disable = sun4v_msi_disable, 572 .disable = sun4v_msi_disable,
432 .ack = run_pre_handler, 573 .ack = run_pre_handler,
433 .end = sun4v_irq_end, 574 .end = sun4v_irq_end,
575 .set_affinity = sun4v_set_affinity,
434}; 576};
435#endif 577#endif
436 578
579static struct irq_chip sun4v_virq = {
580 .typename = "vsun4v",
581 .enable = sun4v_virq_enable,
582 .disable = sun4v_virq_disable,
583 .end = sun4v_virq_end,
584 .set_affinity = sun4v_virt_set_affinity,
585};
586
587static struct irq_chip sun4v_virq_ack = {
588 .typename = "vsun4v+ack",
589 .enable = sun4v_virq_enable,
590 .disable = sun4v_virq_disable,
591 .ack = run_pre_handler,
592 .end = sun4v_virq_end,
593 .set_affinity = sun4v_virt_set_affinity,
594};
595
437void irq_install_pre_handler(int virt_irq, 596void irq_install_pre_handler(int virt_irq,
438 void (*func)(unsigned int, void *, void *), 597 void (*func)(unsigned int, void *, void *),
439 void *arg1, void *arg2) 598 void *arg1, void *arg2)
@@ -447,7 +606,8 @@ void irq_install_pre_handler(int virt_irq,
447 606
448 chip = get_irq_chip(virt_irq); 607 chip = get_irq_chip(virt_irq);
449 if (chip == &sun4u_irq_ack || 608 if (chip == &sun4u_irq_ack ||
450 chip == &sun4v_irq_ack 609 chip == &sun4v_irq_ack ||
610 chip == &sun4v_virq_ack
451#ifdef CONFIG_PCI_MSI 611#ifdef CONFIG_PCI_MSI
452 || chip == &sun4v_msi 612 || chip == &sun4v_msi
453#endif 613#endif
@@ -455,7 +615,9 @@ void irq_install_pre_handler(int virt_irq,
455 return; 615 return;
456 616
457 chip = (chip == &sun4u_irq ? 617 chip = (chip == &sun4u_irq ?
458 &sun4u_irq_ack : &sun4v_irq_ack); 618 &sun4u_irq_ack :
619 (chip == &sun4v_irq ?
620 &sun4v_irq_ack : &sun4v_virq_ack));
459 set_irq_chip(virt_irq, chip); 621 set_irq_chip(virt_irq, chip);
460} 622}
461 623
@@ -492,19 +654,18 @@ out:
492 return bucket->virt_irq; 654 return bucket->virt_irq;
493} 655}
494 656
495unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino) 657static unsigned int sun4v_build_common(unsigned long sysino,
658 struct irq_chip *chip)
496{ 659{
497 struct ino_bucket *bucket; 660 struct ino_bucket *bucket;
498 struct irq_handler_data *data; 661 struct irq_handler_data *data;
499 unsigned long sysino;
500 662
501 BUG_ON(tlb_type != hypervisor); 663 BUG_ON(tlb_type != hypervisor);
502 664
503 sysino = sun4v_devino_to_sysino(devhandle, devino);
504 bucket = &ivector_table[sysino]; 665 bucket = &ivector_table[sysino];
505 if (!bucket->virt_irq) { 666 if (!bucket->virt_irq) {
506 bucket->virt_irq = virt_irq_alloc(__irq(bucket)); 667 bucket->virt_irq = virt_irq_alloc(__irq(bucket));
507 set_irq_chip(bucket->virt_irq, &sun4v_irq); 668 set_irq_chip(bucket->virt_irq, chip);
508 } 669 }
509 670
510 data = get_irq_chip_data(bucket->virt_irq); 671 data = get_irq_chip_data(bucket->virt_irq);
@@ -529,6 +690,38 @@ out:
529 return bucket->virt_irq; 690 return bucket->virt_irq;
530} 691}
531 692
693unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino)
694{
695 unsigned long sysino = sun4v_devino_to_sysino(devhandle, devino);
696
697 return sun4v_build_common(sysino, &sun4v_irq);
698}
699
700unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino)
701{
702 unsigned long sysino, hv_err;
703 unsigned int virq;
704
705 BUG_ON(devhandle & devino);
706
707 sysino = devhandle | devino;
708 BUG_ON(sysino & ~(IMAP_IGN | IMAP_INO));
709
710 hv_err = sun4v_vintr_set_cookie(devhandle, devino, sysino);
711 if (hv_err) {
712 prom_printf("IRQ: Fatal, cannot set cookie for [%x:%x] "
713 "err=%lu\n", devhandle, devino, hv_err);
714 prom_halt();
715 }
716
717 virq = sun4v_build_common(sysino, &sun4v_virq);
718
719 virt_to_real_irq_table[virq].dev_handle = devhandle;
720 virt_to_real_irq_table[virq].dev_ino = devino;
721
722 return virq;
723}
724
532#ifdef CONFIG_PCI_MSI 725#ifdef CONFIG_PCI_MSI
533unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p, 726unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p,
534 unsigned int msi_start, unsigned int msi_end) 727 unsigned int msi_start, unsigned int msi_end)
@@ -616,6 +809,26 @@ void handler_irq(int irq, struct pt_regs *regs)
616 set_irq_regs(old_regs); 809 set_irq_regs(old_regs);
617} 810}
618 811
812#ifdef CONFIG_HOTPLUG_CPU
813void fixup_irqs(void)
814{
815 unsigned int irq;
816
817 for (irq = 0; irq < NR_IRQS; irq++) {
818 unsigned long flags;
819
820 spin_lock_irqsave(&irq_desc[irq].lock, flags);
821 if (irq_desc[irq].action &&
822 !(irq_desc[irq].status & IRQ_PER_CPU)) {
823 if (irq_desc[irq].chip->set_affinity)
824 irq_desc[irq].chip->set_affinity(irq,
825 irq_desc[irq].affinity);
826 }
827 spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
828 }
829}
830#endif
831
619struct sun5_timer { 832struct sun5_timer {
620 u64 count0; 833 u64 count0;
621 u64 limit0; 834 u64 limit0;
diff --git a/arch/sparc64/kernel/isa.c b/arch/sparc64/kernel/isa.c
index 6a6882e57ff2..1a1043fcf97d 100644
--- a/arch/sparc64/kernel/isa.c
+++ b/arch/sparc64/kernel/isa.c
@@ -79,6 +79,7 @@ static void __init isa_fill_devices(struct sparc_isa_bridge *isa_br)
79 79
80 while (dp) { 80 while (dp) {
81 struct sparc_isa_device *isa_dev; 81 struct sparc_isa_device *isa_dev;
82 struct dev_archdata *sd;
82 83
83 isa_dev = kzalloc(sizeof(*isa_dev), GFP_KERNEL); 84 isa_dev = kzalloc(sizeof(*isa_dev), GFP_KERNEL);
84 if (!isa_dev) { 85 if (!isa_dev) {
@@ -86,6 +87,10 @@ static void __init isa_fill_devices(struct sparc_isa_bridge *isa_br)
86 return; 87 return;
87 } 88 }
88 89
90 sd = &isa_dev->ofdev.dev.archdata;
91 sd->prom_node = dp;
92 sd->op = &isa_dev->ofdev;
93
89 isa_dev->ofdev.node = dp; 94 isa_dev->ofdev.node = dp;
90 isa_dev->ofdev.dev.parent = &isa_br->ofdev.dev; 95 isa_dev->ofdev.dev.parent = &isa_br->ofdev.dev;
91 isa_dev->ofdev.dev.bus = &isa_bus_type; 96 isa_dev->ofdev.dev.bus = &isa_bus_type;
diff --git a/arch/sparc64/kernel/ldc.c b/arch/sparc64/kernel/ldc.c
new file mode 100644
index 000000000000..85a2be0b0962
--- /dev/null
+++ b/arch/sparc64/kernel/ldc.c
@@ -0,0 +1,2373 @@
1/* ldc.c: Logical Domain Channel link-layer protocol driver.
2 *
3 * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
4 */
5
6#include <linux/kernel.h>
7#include <linux/module.h>
8#include <linux/slab.h>
9#include <linux/spinlock.h>
10#include <linux/delay.h>
11#include <linux/errno.h>
12#include <linux/string.h>
13#include <linux/scatterlist.h>
14#include <linux/interrupt.h>
15#include <linux/list.h>
16#include <linux/init.h>
17
18#include <asm/hypervisor.h>
19#include <asm/iommu.h>
20#include <asm/page.h>
21#include <asm/ldc.h>
22#include <asm/mdesc.h>
23
24#define DRV_MODULE_NAME "ldc"
25#define PFX DRV_MODULE_NAME ": "
26#define DRV_MODULE_VERSION "1.0"
27#define DRV_MODULE_RELDATE "June 25, 2007"
28
29static char version[] __devinitdata =
30 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
31#define LDC_PACKET_SIZE 64
32
33/* Packet header layout for unreliable and reliable mode frames.
34 * When in RAW mode, packets are simply straight 64-byte payloads
35 * with no headers.
36 */
37struct ldc_packet {
38 u8 type;
39#define LDC_CTRL 0x01
40#define LDC_DATA 0x02
41#define LDC_ERR 0x10
42
43 u8 stype;
44#define LDC_INFO 0x01
45#define LDC_ACK 0x02
46#define LDC_NACK 0x04
47
48 u8 ctrl;
49#define LDC_VERS 0x01 /* Link Version */
50#define LDC_RTS 0x02 /* Request To Send */
51#define LDC_RTR 0x03 /* Ready To Receive */
52#define LDC_RDX 0x04 /* Ready for Data eXchange */
53#define LDC_CTRL_MSK 0x0f
54
55 u8 env;
56#define LDC_LEN 0x3f
57#define LDC_FRAG_MASK 0xc0
58#define LDC_START 0x40
59#define LDC_STOP 0x80
60
61 u32 seqid;
62
63 union {
64 u8 u_data[LDC_PACKET_SIZE - 8];
65 struct {
66 u32 pad;
67 u32 ackid;
68 u8 r_data[LDC_PACKET_SIZE - 8 - 8];
69 } r;
70 } u;
71};
72
73struct ldc_version {
74 u16 major;
75 u16 minor;
76};
77
78/* Ordered from largest major to lowest. */
79static struct ldc_version ver_arr[] = {
80 { .major = 1, .minor = 0 },
81};
82
83#define LDC_DEFAULT_MTU (4 * LDC_PACKET_SIZE)
84#define LDC_DEFAULT_NUM_ENTRIES (PAGE_SIZE / LDC_PACKET_SIZE)
85
86struct ldc_channel;
87
88struct ldc_mode_ops {
89 int (*write)(struct ldc_channel *, const void *, unsigned int);
90 int (*read)(struct ldc_channel *, void *, unsigned int);
91};
92
93static const struct ldc_mode_ops raw_ops;
94static const struct ldc_mode_ops nonraw_ops;
95static const struct ldc_mode_ops stream_ops;
96
97int ldom_domaining_enabled;
98
99struct ldc_iommu {
100 /* Protects arena alloc/free. */
101 spinlock_t lock;
102 struct iommu_arena arena;
103 struct ldc_mtable_entry *page_table;
104};
105
106struct ldc_channel {
107 /* Protects all operations that depend upon channel state. */
108 spinlock_t lock;
109
110 unsigned long id;
111
112 u8 *mssbuf;
113 u32 mssbuf_len;
114 u32 mssbuf_off;
115
116 struct ldc_packet *tx_base;
117 unsigned long tx_head;
118 unsigned long tx_tail;
119 unsigned long tx_num_entries;
120 unsigned long tx_ra;
121
122 unsigned long tx_acked;
123
124 struct ldc_packet *rx_base;
125 unsigned long rx_head;
126 unsigned long rx_tail;
127 unsigned long rx_num_entries;
128 unsigned long rx_ra;
129
130 u32 rcv_nxt;
131 u32 snd_nxt;
132
133 unsigned long chan_state;
134
135 struct ldc_channel_config cfg;
136 void *event_arg;
137
138 const struct ldc_mode_ops *mops;
139
140 struct ldc_iommu iommu;
141
142 struct ldc_version ver;
143
144 u8 hs_state;
145#define LDC_HS_CLOSED 0x00
146#define LDC_HS_OPEN 0x01
147#define LDC_HS_GOTVERS 0x02
148#define LDC_HS_SENTRTR 0x03
149#define LDC_HS_GOTRTR 0x04
150#define LDC_HS_COMPLETE 0x10
151
152 u8 flags;
153#define LDC_FLAG_ALLOCED_QUEUES 0x01
154#define LDC_FLAG_REGISTERED_QUEUES 0x02
155#define LDC_FLAG_REGISTERED_IRQS 0x04
156#define LDC_FLAG_RESET 0x10
157
158 u8 mss;
159 u8 state;
160
161#define LDC_IRQ_NAME_MAX 32
162 char rx_irq_name[LDC_IRQ_NAME_MAX];
163 char tx_irq_name[LDC_IRQ_NAME_MAX];
164
165 struct hlist_head mh_list;
166
167 struct hlist_node list;
168};
169
170#define ldcdbg(TYPE, f, a...) \
171do { if (lp->cfg.debug & LDC_DEBUG_##TYPE) \
172 printk(KERN_INFO PFX "ID[%lu] " f, lp->id, ## a); \
173} while (0)
174
175static const char *state_to_str(u8 state)
176{
177 switch (state) {
178 case LDC_STATE_INVALID:
179 return "INVALID";
180 case LDC_STATE_INIT:
181 return "INIT";
182 case LDC_STATE_BOUND:
183 return "BOUND";
184 case LDC_STATE_READY:
185 return "READY";
186 case LDC_STATE_CONNECTED:
187 return "CONNECTED";
188 default:
189 return "<UNKNOWN>";
190 }
191}
192
193static void ldc_set_state(struct ldc_channel *lp, u8 state)
194{
195 ldcdbg(STATE, "STATE (%s) --> (%s)\n",
196 state_to_str(lp->state),
197 state_to_str(state));
198
199 lp->state = state;
200}
201
202static unsigned long __advance(unsigned long off, unsigned long num_entries)
203{
204 off += LDC_PACKET_SIZE;
205 if (off == (num_entries * LDC_PACKET_SIZE))
206 off = 0;
207
208 return off;
209}
210
211static unsigned long rx_advance(struct ldc_channel *lp, unsigned long off)
212{
213 return __advance(off, lp->rx_num_entries);
214}
215
216static unsigned long tx_advance(struct ldc_channel *lp, unsigned long off)
217{
218 return __advance(off, lp->tx_num_entries);
219}
220
221static struct ldc_packet *handshake_get_tx_packet(struct ldc_channel *lp,
222 unsigned long *new_tail)
223{
224 struct ldc_packet *p;
225 unsigned long t;
226
227 t = tx_advance(lp, lp->tx_tail);
228 if (t == lp->tx_head)
229 return NULL;
230
231 *new_tail = t;
232
233 p = lp->tx_base;
234 return p + (lp->tx_tail / LDC_PACKET_SIZE);
235}
236
237/* When we are in reliable or stream mode, have to track the next packet
238 * we haven't gotten an ACK for in the TX queue using tx_acked. We have
239 * to be careful not to stomp over the queue past that point. During
240 * the handshake, we don't have TX data packets pending in the queue
241 * and that's why handshake_get_tx_packet() need not be mindful of
242 * lp->tx_acked.
243 */
244static unsigned long head_for_data(struct ldc_channel *lp)
245{
246 if (lp->cfg.mode == LDC_MODE_STREAM)
247 return lp->tx_acked;
248 return lp->tx_head;
249}
250
251static int tx_has_space_for(struct ldc_channel *lp, unsigned int size)
252{
253 unsigned long limit, tail, new_tail, diff;
254 unsigned int mss;
255
256 limit = head_for_data(lp);
257 tail = lp->tx_tail;
258 new_tail = tx_advance(lp, tail);
259 if (new_tail == limit)
260 return 0;
261
262 if (limit > new_tail)
263 diff = limit - new_tail;
264 else
265 diff = (limit +
266 ((lp->tx_num_entries * LDC_PACKET_SIZE) - new_tail));
267 diff /= LDC_PACKET_SIZE;
268 mss = lp->mss;
269
270 if (diff * mss < size)
271 return 0;
272
273 return 1;
274}
275
276static struct ldc_packet *data_get_tx_packet(struct ldc_channel *lp,
277 unsigned long *new_tail)
278{
279 struct ldc_packet *p;
280 unsigned long h, t;
281
282 h = head_for_data(lp);
283 t = tx_advance(lp, lp->tx_tail);
284 if (t == h)
285 return NULL;
286
287 *new_tail = t;
288
289 p = lp->tx_base;
290 return p + (lp->tx_tail / LDC_PACKET_SIZE);
291}
292
293static int set_tx_tail(struct ldc_channel *lp, unsigned long tail)
294{
295 unsigned long orig_tail = lp->tx_tail;
296 int limit = 1000;
297
298 lp->tx_tail = tail;
299 while (limit-- > 0) {
300 unsigned long err;
301
302 err = sun4v_ldc_tx_set_qtail(lp->id, tail);
303 if (!err)
304 return 0;
305
306 if (err != HV_EWOULDBLOCK) {
307 lp->tx_tail = orig_tail;
308 return -EINVAL;
309 }
310 udelay(1);
311 }
312
313 lp->tx_tail = orig_tail;
314 return -EBUSY;
315}
316
317/* This just updates the head value in the hypervisor using
318 * a polling loop with a timeout. The caller takes care of
319 * upating software state representing the head change, if any.
320 */
321static int __set_rx_head(struct ldc_channel *lp, unsigned long head)
322{
323 int limit = 1000;
324
325 while (limit-- > 0) {
326 unsigned long err;
327
328 err = sun4v_ldc_rx_set_qhead(lp->id, head);
329 if (!err)
330 return 0;
331
332 if (err != HV_EWOULDBLOCK)
333 return -EINVAL;
334
335 udelay(1);
336 }
337
338 return -EBUSY;
339}
340
341static int send_tx_packet(struct ldc_channel *lp,
342 struct ldc_packet *p,
343 unsigned long new_tail)
344{
345 BUG_ON(p != (lp->tx_base + (lp->tx_tail / LDC_PACKET_SIZE)));
346
347 return set_tx_tail(lp, new_tail);
348}
349
350static struct ldc_packet *handshake_compose_ctrl(struct ldc_channel *lp,
351 u8 stype, u8 ctrl,
352 void *data, int dlen,
353 unsigned long *new_tail)
354{
355 struct ldc_packet *p = handshake_get_tx_packet(lp, new_tail);
356
357 if (p) {
358 memset(p, 0, sizeof(*p));
359 p->type = LDC_CTRL;
360 p->stype = stype;
361 p->ctrl = ctrl;
362 if (data)
363 memcpy(p->u.u_data, data, dlen);
364 }
365 return p;
366}
367
368static int start_handshake(struct ldc_channel *lp)
369{
370 struct ldc_packet *p;
371 struct ldc_version *ver;
372 unsigned long new_tail;
373
374 ver = &ver_arr[0];
375
376 ldcdbg(HS, "SEND VER INFO maj[%u] min[%u]\n",
377 ver->major, ver->minor);
378
379 p = handshake_compose_ctrl(lp, LDC_INFO, LDC_VERS,
380 ver, sizeof(*ver), &new_tail);
381 if (p) {
382 int err = send_tx_packet(lp, p, new_tail);
383 if (!err)
384 lp->flags &= ~LDC_FLAG_RESET;
385 return err;
386 }
387 return -EBUSY;
388}
389
390static int send_version_nack(struct ldc_channel *lp,
391 u16 major, u16 minor)
392{
393 struct ldc_packet *p;
394 struct ldc_version ver;
395 unsigned long new_tail;
396
397 ver.major = major;
398 ver.minor = minor;
399
400 p = handshake_compose_ctrl(lp, LDC_NACK, LDC_VERS,
401 &ver, sizeof(ver), &new_tail);
402 if (p) {
403 ldcdbg(HS, "SEND VER NACK maj[%u] min[%u]\n",
404 ver.major, ver.minor);
405
406 return send_tx_packet(lp, p, new_tail);
407 }
408 return -EBUSY;
409}
410
411static int send_version_ack(struct ldc_channel *lp,
412 struct ldc_version *vp)
413{
414 struct ldc_packet *p;
415 unsigned long new_tail;
416
417 p = handshake_compose_ctrl(lp, LDC_ACK, LDC_VERS,
418 vp, sizeof(*vp), &new_tail);
419 if (p) {
420 ldcdbg(HS, "SEND VER ACK maj[%u] min[%u]\n",
421 vp->major, vp->minor);
422
423 return send_tx_packet(lp, p, new_tail);
424 }
425 return -EBUSY;
426}
427
428static int send_rts(struct ldc_channel *lp)
429{
430 struct ldc_packet *p;
431 unsigned long new_tail;
432
433 p = handshake_compose_ctrl(lp, LDC_INFO, LDC_RTS, NULL, 0,
434 &new_tail);
435 if (p) {
436 p->env = lp->cfg.mode;
437 p->seqid = 0;
438 lp->rcv_nxt = 0;
439
440 ldcdbg(HS, "SEND RTS env[0x%x] seqid[0x%x]\n",
441 p->env, p->seqid);
442
443 return send_tx_packet(lp, p, new_tail);
444 }
445 return -EBUSY;
446}
447
448static int send_rtr(struct ldc_channel *lp)
449{
450 struct ldc_packet *p;
451 unsigned long new_tail;
452
453 p = handshake_compose_ctrl(lp, LDC_INFO, LDC_RTR, NULL, 0,
454 &new_tail);
455 if (p) {
456 p->env = lp->cfg.mode;
457 p->seqid = 0;
458
459 ldcdbg(HS, "SEND RTR env[0x%x] seqid[0x%x]\n",
460 p->env, p->seqid);
461
462 return send_tx_packet(lp, p, new_tail);
463 }
464 return -EBUSY;
465}
466
467static int send_rdx(struct ldc_channel *lp)
468{
469 struct ldc_packet *p;
470 unsigned long new_tail;
471
472 p = handshake_compose_ctrl(lp, LDC_INFO, LDC_RDX, NULL, 0,
473 &new_tail);
474 if (p) {
475 p->env = 0;
476 p->seqid = ++lp->snd_nxt;
477 p->u.r.ackid = lp->rcv_nxt;
478
479 ldcdbg(HS, "SEND RDX env[0x%x] seqid[0x%x] ackid[0x%x]\n",
480 p->env, p->seqid, p->u.r.ackid);
481
482 return send_tx_packet(lp, p, new_tail);
483 }
484 return -EBUSY;
485}
486
487static int send_data_nack(struct ldc_channel *lp, struct ldc_packet *data_pkt)
488{
489 struct ldc_packet *p;
490 unsigned long new_tail;
491 int err;
492
493 p = data_get_tx_packet(lp, &new_tail);
494 if (!p)
495 return -EBUSY;
496 memset(p, 0, sizeof(*p));
497 p->type = data_pkt->type;
498 p->stype = LDC_NACK;
499 p->ctrl = data_pkt->ctrl & LDC_CTRL_MSK;
500 p->seqid = lp->snd_nxt + 1;
501 p->u.r.ackid = lp->rcv_nxt;
502
503 ldcdbg(HS, "SEND DATA NACK type[0x%x] ctl[0x%x] seq[0x%x] ack[0x%x]\n",
504 p->type, p->ctrl, p->seqid, p->u.r.ackid);
505
506 err = send_tx_packet(lp, p, new_tail);
507 if (!err)
508 lp->snd_nxt++;
509
510 return err;
511}
512
513static int ldc_abort(struct ldc_channel *lp)
514{
515 unsigned long hv_err;
516
517 ldcdbg(STATE, "ABORT\n");
518
519 /* We report but do not act upon the hypervisor errors because
520 * there really isn't much we can do if they fail at this point.
521 */
522 hv_err = sun4v_ldc_tx_qconf(lp->id, lp->tx_ra, lp->tx_num_entries);
523 if (hv_err)
524 printk(KERN_ERR PFX "ldc_abort: "
525 "sun4v_ldc_tx_qconf(%lx,%lx,%lx) failed, err=%lu\n",
526 lp->id, lp->tx_ra, lp->tx_num_entries, hv_err);
527
528 hv_err = sun4v_ldc_tx_get_state(lp->id,
529 &lp->tx_head,
530 &lp->tx_tail,
531 &lp->chan_state);
532 if (hv_err)
533 printk(KERN_ERR PFX "ldc_abort: "
534 "sun4v_ldc_tx_get_state(%lx,...) failed, err=%lu\n",
535 lp->id, hv_err);
536
537 hv_err = sun4v_ldc_rx_qconf(lp->id, lp->rx_ra, lp->rx_num_entries);
538 if (hv_err)
539 printk(KERN_ERR PFX "ldc_abort: "
540 "sun4v_ldc_rx_qconf(%lx,%lx,%lx) failed, err=%lu\n",
541 lp->id, lp->rx_ra, lp->rx_num_entries, hv_err);
542
543 /* Refetch the RX queue state as well, because we could be invoked
544 * here in the queue processing context.
545 */
546 hv_err = sun4v_ldc_rx_get_state(lp->id,
547 &lp->rx_head,
548 &lp->rx_tail,
549 &lp->chan_state);
550 if (hv_err)
551 printk(KERN_ERR PFX "ldc_abort: "
552 "sun4v_ldc_rx_get_state(%lx,...) failed, err=%lu\n",
553 lp->id, hv_err);
554
555 return -ECONNRESET;
556}
557
558static struct ldc_version *find_by_major(u16 major)
559{
560 struct ldc_version *ret = NULL;
561 int i;
562
563 for (i = 0; i < ARRAY_SIZE(ver_arr); i++) {
564 struct ldc_version *v = &ver_arr[i];
565 if (v->major <= major) {
566 ret = v;
567 break;
568 }
569 }
570 return ret;
571}
572
573static int process_ver_info(struct ldc_channel *lp, struct ldc_version *vp)
574{
575 struct ldc_version *vap;
576 int err;
577
578 ldcdbg(HS, "GOT VERSION INFO major[%x] minor[%x]\n",
579 vp->major, vp->minor);
580
581 if (lp->hs_state == LDC_HS_GOTVERS) {
582 lp->hs_state = LDC_HS_OPEN;
583 memset(&lp->ver, 0, sizeof(lp->ver));
584 }
585
586 vap = find_by_major(vp->major);
587 if (!vap) {
588 err = send_version_nack(lp, 0, 0);
589 } else if (vap->major != vp->major) {
590 err = send_version_nack(lp, vap->major, vap->minor);
591 } else {
592 struct ldc_version ver = *vp;
593 if (ver.minor > vap->minor)
594 ver.minor = vap->minor;
595 err = send_version_ack(lp, &ver);
596 if (!err) {
597 lp->ver = ver;
598 lp->hs_state = LDC_HS_GOTVERS;
599 }
600 }
601 if (err)
602 return ldc_abort(lp);
603
604 return 0;
605}
606
607static int process_ver_ack(struct ldc_channel *lp, struct ldc_version *vp)
608{
609 ldcdbg(HS, "GOT VERSION ACK major[%x] minor[%x]\n",
610 vp->major, vp->minor);
611
612 if (lp->hs_state == LDC_HS_GOTVERS) {
613 if (lp->ver.major != vp->major ||
614 lp->ver.minor != vp->minor)
615 return ldc_abort(lp);
616 } else {
617 lp->ver = *vp;
618 lp->hs_state = LDC_HS_GOTVERS;
619 }
620 if (send_rts(lp))
621 return ldc_abort(lp);
622 return 0;
623}
624
625static int process_ver_nack(struct ldc_channel *lp, struct ldc_version *vp)
626{
627 struct ldc_version *vap;
628
629 if ((vp->major == 0 && vp->minor == 0) ||
630 !(vap = find_by_major(vp->major))) {
631 return ldc_abort(lp);
632 } else {
633 struct ldc_packet *p;
634 unsigned long new_tail;
635
636 p = handshake_compose_ctrl(lp, LDC_INFO, LDC_VERS,
637 vap, sizeof(*vap),
638 &new_tail);
639 if (p)
640 return send_tx_packet(lp, p, new_tail);
641 else
642 return ldc_abort(lp);
643 }
644}
645
646static int process_version(struct ldc_channel *lp,
647 struct ldc_packet *p)
648{
649 struct ldc_version *vp;
650
651 vp = (struct ldc_version *) p->u.u_data;
652
653 switch (p->stype) {
654 case LDC_INFO:
655 return process_ver_info(lp, vp);
656
657 case LDC_ACK:
658 return process_ver_ack(lp, vp);
659
660 case LDC_NACK:
661 return process_ver_nack(lp, vp);
662
663 default:
664 return ldc_abort(lp);
665 }
666}
667
668static int process_rts(struct ldc_channel *lp,
669 struct ldc_packet *p)
670{
671 ldcdbg(HS, "GOT RTS stype[%x] seqid[%x] env[%x]\n",
672 p->stype, p->seqid, p->env);
673
674 if (p->stype != LDC_INFO ||
675 lp->hs_state != LDC_HS_GOTVERS ||
676 p->env != lp->cfg.mode)
677 return ldc_abort(lp);
678
679 lp->snd_nxt = p->seqid;
680 lp->rcv_nxt = p->seqid;
681 lp->hs_state = LDC_HS_SENTRTR;
682 if (send_rtr(lp))
683 return ldc_abort(lp);
684
685 return 0;
686}
687
688static int process_rtr(struct ldc_channel *lp,
689 struct ldc_packet *p)
690{
691 ldcdbg(HS, "GOT RTR stype[%x] seqid[%x] env[%x]\n",
692 p->stype, p->seqid, p->env);
693
694 if (p->stype != LDC_INFO ||
695 p->env != lp->cfg.mode)
696 return ldc_abort(lp);
697
698 lp->snd_nxt = p->seqid;
699 lp->hs_state = LDC_HS_COMPLETE;
700 ldc_set_state(lp, LDC_STATE_CONNECTED);
701 send_rdx(lp);
702
703 return LDC_EVENT_UP;
704}
705
706static int rx_seq_ok(struct ldc_channel *lp, u32 seqid)
707{
708 return lp->rcv_nxt + 1 == seqid;
709}
710
711static int process_rdx(struct ldc_channel *lp,
712 struct ldc_packet *p)
713{
714 ldcdbg(HS, "GOT RDX stype[%x] seqid[%x] env[%x] ackid[%x]\n",
715 p->stype, p->seqid, p->env, p->u.r.ackid);
716
717 if (p->stype != LDC_INFO ||
718 !(rx_seq_ok(lp, p->seqid)))
719 return ldc_abort(lp);
720
721 lp->rcv_nxt = p->seqid;
722
723 lp->hs_state = LDC_HS_COMPLETE;
724 ldc_set_state(lp, LDC_STATE_CONNECTED);
725
726 return LDC_EVENT_UP;
727}
728
729static int process_control_frame(struct ldc_channel *lp,
730 struct ldc_packet *p)
731{
732 switch (p->ctrl) {
733 case LDC_VERS:
734 return process_version(lp, p);
735
736 case LDC_RTS:
737 return process_rts(lp, p);
738
739 case LDC_RTR:
740 return process_rtr(lp, p);
741
742 case LDC_RDX:
743 return process_rdx(lp, p);
744
745 default:
746 return ldc_abort(lp);
747 }
748}
749
750static int process_error_frame(struct ldc_channel *lp,
751 struct ldc_packet *p)
752{
753 return ldc_abort(lp);
754}
755
756static int process_data_ack(struct ldc_channel *lp,
757 struct ldc_packet *ack)
758{
759 unsigned long head = lp->tx_acked;
760 u32 ackid = ack->u.r.ackid;
761
762 while (1) {
763 struct ldc_packet *p = lp->tx_base + (head / LDC_PACKET_SIZE);
764
765 head = tx_advance(lp, head);
766
767 if (p->seqid == ackid) {
768 lp->tx_acked = head;
769 return 0;
770 }
771 if (head == lp->tx_tail)
772 return ldc_abort(lp);
773 }
774
775 return 0;
776}
777
778static void send_events(struct ldc_channel *lp, unsigned int event_mask)
779{
780 if (event_mask & LDC_EVENT_RESET)
781 lp->cfg.event(lp->event_arg, LDC_EVENT_RESET);
782 if (event_mask & LDC_EVENT_UP)
783 lp->cfg.event(lp->event_arg, LDC_EVENT_UP);
784 if (event_mask & LDC_EVENT_DATA_READY)
785 lp->cfg.event(lp->event_arg, LDC_EVENT_DATA_READY);
786}
787
788static irqreturn_t ldc_rx(int irq, void *dev_id)
789{
790 struct ldc_channel *lp = dev_id;
791 unsigned long orig_state, hv_err, flags;
792 unsigned int event_mask;
793
794 spin_lock_irqsave(&lp->lock, flags);
795
796 orig_state = lp->chan_state;
797 hv_err = sun4v_ldc_rx_get_state(lp->id,
798 &lp->rx_head,
799 &lp->rx_tail,
800 &lp->chan_state);
801
802 ldcdbg(RX, "RX state[0x%02lx:0x%02lx] head[0x%04lx] tail[0x%04lx]\n",
803 orig_state, lp->chan_state, lp->rx_head, lp->rx_tail);
804
805 event_mask = 0;
806
807 if (lp->cfg.mode == LDC_MODE_RAW &&
808 lp->chan_state == LDC_CHANNEL_UP) {
809 lp->hs_state = LDC_HS_COMPLETE;
810 ldc_set_state(lp, LDC_STATE_CONNECTED);
811
812 event_mask |= LDC_EVENT_UP;
813
814 orig_state = lp->chan_state;
815 }
816
817 /* If we are in reset state, flush the RX queue and ignore
818 * everything.
819 */
820 if (lp->flags & LDC_FLAG_RESET) {
821 (void) __set_rx_head(lp, lp->rx_tail);
822 goto out;
823 }
824
825 /* Once we finish the handshake, we let the ldc_read()
826 * paths do all of the control frame and state management.
827 * Just trigger the callback.
828 */
829 if (lp->hs_state == LDC_HS_COMPLETE) {
830handshake_complete:
831 if (lp->chan_state != orig_state) {
832 unsigned int event = LDC_EVENT_RESET;
833
834 if (lp->chan_state == LDC_CHANNEL_UP)
835 event = LDC_EVENT_UP;
836
837 event_mask |= event;
838 }
839 if (lp->rx_head != lp->rx_tail)
840 event_mask |= LDC_EVENT_DATA_READY;
841
842 goto out;
843 }
844
845 if (lp->chan_state != orig_state)
846 goto out;
847
848 while (lp->rx_head != lp->rx_tail) {
849 struct ldc_packet *p;
850 unsigned long new;
851 int err;
852
853 p = lp->rx_base + (lp->rx_head / LDC_PACKET_SIZE);
854
855 switch (p->type) {
856 case LDC_CTRL:
857 err = process_control_frame(lp, p);
858 if (err > 0)
859 event_mask |= err;
860 break;
861
862 case LDC_DATA:
863 event_mask |= LDC_EVENT_DATA_READY;
864 err = 0;
865 break;
866
867 case LDC_ERR:
868 err = process_error_frame(lp, p);
869 break;
870
871 default:
872 err = ldc_abort(lp);
873 break;
874 }
875
876 if (err < 0)
877 break;
878
879 new = lp->rx_head;
880 new += LDC_PACKET_SIZE;
881 if (new == (lp->rx_num_entries * LDC_PACKET_SIZE))
882 new = 0;
883 lp->rx_head = new;
884
885 err = __set_rx_head(lp, new);
886 if (err < 0) {
887 (void) ldc_abort(lp);
888 break;
889 }
890 if (lp->hs_state == LDC_HS_COMPLETE)
891 goto handshake_complete;
892 }
893
894out:
895 spin_unlock_irqrestore(&lp->lock, flags);
896
897 send_events(lp, event_mask);
898
899 return IRQ_HANDLED;
900}
901
902static irqreturn_t ldc_tx(int irq, void *dev_id)
903{
904 struct ldc_channel *lp = dev_id;
905 unsigned long flags, hv_err, orig_state;
906 unsigned int event_mask = 0;
907
908 spin_lock_irqsave(&lp->lock, flags);
909
910 orig_state = lp->chan_state;
911 hv_err = sun4v_ldc_tx_get_state(lp->id,
912 &lp->tx_head,
913 &lp->tx_tail,
914 &lp->chan_state);
915
916 ldcdbg(TX, " TX state[0x%02lx:0x%02lx] head[0x%04lx] tail[0x%04lx]\n",
917 orig_state, lp->chan_state, lp->tx_head, lp->tx_tail);
918
919 if (lp->cfg.mode == LDC_MODE_RAW &&
920 lp->chan_state == LDC_CHANNEL_UP) {
921 lp->hs_state = LDC_HS_COMPLETE;
922 ldc_set_state(lp, LDC_STATE_CONNECTED);
923
924 event_mask |= LDC_EVENT_UP;
925 }
926
927 spin_unlock_irqrestore(&lp->lock, flags);
928
929 send_events(lp, event_mask);
930
931 return IRQ_HANDLED;
932}
933
934/* XXX ldc_alloc() and ldc_free() needs to run under a mutex so
935 * XXX that addition and removal from the ldc_channel_list has
936 * XXX atomicity, otherwise the __ldc_channel_exists() check is
937 * XXX totally pointless as another thread can slip into ldc_alloc()
938 * XXX and add a channel with the same ID. There also needs to be
939 * XXX a spinlock for ldc_channel_list.
940 */
941static HLIST_HEAD(ldc_channel_list);
942
943static int __ldc_channel_exists(unsigned long id)
944{
945 struct ldc_channel *lp;
946 struct hlist_node *n;
947
948 hlist_for_each_entry(lp, n, &ldc_channel_list, list) {
949 if (lp->id == id)
950 return 1;
951 }
952 return 0;
953}
954
955static int alloc_queue(const char *name, unsigned long num_entries,
956 struct ldc_packet **base, unsigned long *ra)
957{
958 unsigned long size, order;
959 void *q;
960
961 size = num_entries * LDC_PACKET_SIZE;
962 order = get_order(size);
963
964 q = (void *) __get_free_pages(GFP_KERNEL, order);
965 if (!q) {
966 printk(KERN_ERR PFX "Alloc of %s queue failed with "
967 "size=%lu order=%lu\n", name, size, order);
968 return -ENOMEM;
969 }
970
971 memset(q, 0, PAGE_SIZE << order);
972
973 *base = q;
974 *ra = __pa(q);
975
976 return 0;
977}
978
979static void free_queue(unsigned long num_entries, struct ldc_packet *q)
980{
981 unsigned long size, order;
982
983 if (!q)
984 return;
985
986 size = num_entries * LDC_PACKET_SIZE;
987 order = get_order(size);
988
989 free_pages((unsigned long)q, order);
990}
991
992/* XXX Make this configurable... XXX */
993#define LDC_IOTABLE_SIZE (8 * 1024)
994
995static int ldc_iommu_init(struct ldc_channel *lp)
996{
997 unsigned long sz, num_tsb_entries, tsbsize, order;
998 struct ldc_iommu *iommu = &lp->iommu;
999 struct ldc_mtable_entry *table;
1000 unsigned long hv_err;
1001 int err;
1002
1003 num_tsb_entries = LDC_IOTABLE_SIZE;
1004 tsbsize = num_tsb_entries * sizeof(struct ldc_mtable_entry);
1005
1006 spin_lock_init(&iommu->lock);
1007
1008 sz = num_tsb_entries / 8;
1009 sz = (sz + 7UL) & ~7UL;
1010 iommu->arena.map = kzalloc(sz, GFP_KERNEL);
1011 if (!iommu->arena.map) {
1012 printk(KERN_ERR PFX "Alloc of arena map failed, sz=%lu\n", sz);
1013 return -ENOMEM;
1014 }
1015
1016 iommu->arena.limit = num_tsb_entries;
1017
1018 order = get_order(tsbsize);
1019
1020 table = (struct ldc_mtable_entry *)
1021 __get_free_pages(GFP_KERNEL, order);
1022 err = -ENOMEM;
1023 if (!table) {
1024 printk(KERN_ERR PFX "Alloc of MTE table failed, "
1025 "size=%lu order=%lu\n", tsbsize, order);
1026 goto out_free_map;
1027 }
1028
1029 memset(table, 0, PAGE_SIZE << order);
1030
1031 iommu->page_table = table;
1032
1033 hv_err = sun4v_ldc_set_map_table(lp->id, __pa(table),
1034 num_tsb_entries);
1035 err = -EINVAL;
1036 if (hv_err)
1037 goto out_free_table;
1038
1039 return 0;
1040
1041out_free_table:
1042 free_pages((unsigned long) table, order);
1043 iommu->page_table = NULL;
1044
1045out_free_map:
1046 kfree(iommu->arena.map);
1047 iommu->arena.map = NULL;
1048
1049 return err;
1050}
1051
1052static void ldc_iommu_release(struct ldc_channel *lp)
1053{
1054 struct ldc_iommu *iommu = &lp->iommu;
1055 unsigned long num_tsb_entries, tsbsize, order;
1056
1057 (void) sun4v_ldc_set_map_table(lp->id, 0, 0);
1058
1059 num_tsb_entries = iommu->arena.limit;
1060 tsbsize = num_tsb_entries * sizeof(struct ldc_mtable_entry);
1061 order = get_order(tsbsize);
1062
1063 free_pages((unsigned long) iommu->page_table, order);
1064 iommu->page_table = NULL;
1065
1066 kfree(iommu->arena.map);
1067 iommu->arena.map = NULL;
1068}
1069
1070struct ldc_channel *ldc_alloc(unsigned long id,
1071 const struct ldc_channel_config *cfgp,
1072 void *event_arg)
1073{
1074 struct ldc_channel *lp;
1075 const struct ldc_mode_ops *mops;
1076 unsigned long dummy1, dummy2, hv_err;
1077 u8 mss, *mssbuf;
1078 int err;
1079
1080 err = -ENODEV;
1081 if (!ldom_domaining_enabled)
1082 goto out_err;
1083
1084 err = -EINVAL;
1085 if (!cfgp)
1086 goto out_err;
1087
1088 switch (cfgp->mode) {
1089 case LDC_MODE_RAW:
1090 mops = &raw_ops;
1091 mss = LDC_PACKET_SIZE;
1092 break;
1093
1094 case LDC_MODE_UNRELIABLE:
1095 mops = &nonraw_ops;
1096 mss = LDC_PACKET_SIZE - 8;
1097 break;
1098
1099 case LDC_MODE_STREAM:
1100 mops = &stream_ops;
1101 mss = LDC_PACKET_SIZE - 8 - 8;
1102 break;
1103
1104 default:
1105 goto out_err;
1106 }
1107
1108 if (!cfgp->event || !event_arg || !cfgp->rx_irq || !cfgp->tx_irq)
1109 goto out_err;
1110
1111 hv_err = sun4v_ldc_tx_qinfo(id, &dummy1, &dummy2);
1112 err = -ENODEV;
1113 if (hv_err == HV_ECHANNEL)
1114 goto out_err;
1115
1116 err = -EEXIST;
1117 if (__ldc_channel_exists(id))
1118 goto out_err;
1119
1120 mssbuf = NULL;
1121
1122 lp = kzalloc(sizeof(*lp), GFP_KERNEL);
1123 err = -ENOMEM;
1124 if (!lp)
1125 goto out_err;
1126
1127 spin_lock_init(&lp->lock);
1128
1129 lp->id = id;
1130
1131 err = ldc_iommu_init(lp);
1132 if (err)
1133 goto out_free_ldc;
1134
1135 lp->mops = mops;
1136 lp->mss = mss;
1137
1138 lp->cfg = *cfgp;
1139 if (!lp->cfg.mtu)
1140 lp->cfg.mtu = LDC_DEFAULT_MTU;
1141
1142 if (lp->cfg.mode == LDC_MODE_STREAM) {
1143 mssbuf = kzalloc(lp->cfg.mtu, GFP_KERNEL);
1144 if (!mssbuf) {
1145 err = -ENOMEM;
1146 goto out_free_iommu;
1147 }
1148 lp->mssbuf = mssbuf;
1149 }
1150
1151 lp->event_arg = event_arg;
1152
1153 /* XXX allow setting via ldc_channel_config to override defaults
1154 * XXX or use some formula based upon mtu
1155 */
1156 lp->tx_num_entries = LDC_DEFAULT_NUM_ENTRIES;
1157 lp->rx_num_entries = LDC_DEFAULT_NUM_ENTRIES;
1158
1159 err = alloc_queue("TX", lp->tx_num_entries,
1160 &lp->tx_base, &lp->tx_ra);
1161 if (err)
1162 goto out_free_mssbuf;
1163
1164 err = alloc_queue("RX", lp->rx_num_entries,
1165 &lp->rx_base, &lp->rx_ra);
1166 if (err)
1167 goto out_free_txq;
1168
1169 lp->flags |= LDC_FLAG_ALLOCED_QUEUES;
1170
1171 lp->hs_state = LDC_HS_CLOSED;
1172 ldc_set_state(lp, LDC_STATE_INIT);
1173
1174 INIT_HLIST_NODE(&lp->list);
1175 hlist_add_head(&lp->list, &ldc_channel_list);
1176
1177 INIT_HLIST_HEAD(&lp->mh_list);
1178
1179 return lp;
1180
1181out_free_txq:
1182 free_queue(lp->tx_num_entries, lp->tx_base);
1183
1184out_free_mssbuf:
1185 if (mssbuf)
1186 kfree(mssbuf);
1187
1188out_free_iommu:
1189 ldc_iommu_release(lp);
1190
1191out_free_ldc:
1192 kfree(lp);
1193
1194out_err:
1195 return ERR_PTR(err);
1196}
1197EXPORT_SYMBOL(ldc_alloc);
1198
1199void ldc_free(struct ldc_channel *lp)
1200{
1201 if (lp->flags & LDC_FLAG_REGISTERED_IRQS) {
1202 free_irq(lp->cfg.rx_irq, lp);
1203 free_irq(lp->cfg.tx_irq, lp);
1204 }
1205
1206 if (lp->flags & LDC_FLAG_REGISTERED_QUEUES) {
1207 sun4v_ldc_tx_qconf(lp->id, 0, 0);
1208 sun4v_ldc_rx_qconf(lp->id, 0, 0);
1209 lp->flags &= ~LDC_FLAG_REGISTERED_QUEUES;
1210 }
1211 if (lp->flags & LDC_FLAG_ALLOCED_QUEUES) {
1212 free_queue(lp->tx_num_entries, lp->tx_base);
1213 free_queue(lp->rx_num_entries, lp->rx_base);
1214 lp->flags &= ~LDC_FLAG_ALLOCED_QUEUES;
1215 }
1216
1217 hlist_del(&lp->list);
1218
1219 if (lp->mssbuf)
1220 kfree(lp->mssbuf);
1221
1222 ldc_iommu_release(lp);
1223
1224 kfree(lp);
1225}
1226EXPORT_SYMBOL(ldc_free);
1227
1228/* Bind the channel. This registers the LDC queues with
1229 * the hypervisor and puts the channel into a pseudo-listening
1230 * state. This does not initiate a handshake, ldc_connect() does
1231 * that.
1232 */
1233int ldc_bind(struct ldc_channel *lp, const char *name)
1234{
1235 unsigned long hv_err, flags;
1236 int err = -EINVAL;
1237
1238 spin_lock_irqsave(&lp->lock, flags);
1239
1240 if (!name)
1241 goto out_err;
1242
1243 if (lp->state != LDC_STATE_INIT)
1244 goto out_err;
1245
1246 snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name);
1247 snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name);
1248
1249 err = request_irq(lp->cfg.rx_irq, ldc_rx,
1250 IRQF_SAMPLE_RANDOM | IRQF_SHARED,
1251 lp->rx_irq_name, lp);
1252 if (err)
1253 goto out_err;
1254
1255 err = request_irq(lp->cfg.tx_irq, ldc_tx,
1256 IRQF_SAMPLE_RANDOM | IRQF_SHARED,
1257 lp->tx_irq_name, lp);
1258 if (err)
1259 goto out_free_rx_irq;
1260
1261
1262 lp->flags |= LDC_FLAG_REGISTERED_IRQS;
1263
1264 err = -ENODEV;
1265 hv_err = sun4v_ldc_tx_qconf(lp->id, 0, 0);
1266 if (hv_err)
1267 goto out_free_tx_irq;
1268
1269 hv_err = sun4v_ldc_tx_qconf(lp->id, lp->tx_ra, lp->tx_num_entries);
1270 if (hv_err)
1271 goto out_free_tx_irq;
1272
1273 hv_err = sun4v_ldc_rx_qconf(lp->id, 0, 0);
1274 if (hv_err)
1275 goto out_unmap_tx;
1276
1277 hv_err = sun4v_ldc_rx_qconf(lp->id, lp->rx_ra, lp->rx_num_entries);
1278 if (hv_err)
1279 goto out_unmap_tx;
1280
1281 lp->flags |= LDC_FLAG_REGISTERED_QUEUES;
1282
1283 hv_err = sun4v_ldc_tx_get_state(lp->id,
1284 &lp->tx_head,
1285 &lp->tx_tail,
1286 &lp->chan_state);
1287 err = -EBUSY;
1288 if (hv_err)
1289 goto out_unmap_rx;
1290
1291 lp->tx_acked = lp->tx_head;
1292
1293 lp->hs_state = LDC_HS_OPEN;
1294 ldc_set_state(lp, LDC_STATE_BOUND);
1295
1296 spin_unlock_irqrestore(&lp->lock, flags);
1297
1298 return 0;
1299
1300out_unmap_rx:
1301 lp->flags &= ~LDC_FLAG_REGISTERED_QUEUES;
1302 sun4v_ldc_rx_qconf(lp->id, 0, 0);
1303
1304out_unmap_tx:
1305 sun4v_ldc_tx_qconf(lp->id, 0, 0);
1306
1307out_free_tx_irq:
1308 lp->flags &= ~LDC_FLAG_REGISTERED_IRQS;
1309 free_irq(lp->cfg.tx_irq, lp);
1310
1311out_free_rx_irq:
1312 free_irq(lp->cfg.rx_irq, lp);
1313
1314out_err:
1315 spin_unlock_irqrestore(&lp->lock, flags);
1316
1317 return err;
1318}
1319EXPORT_SYMBOL(ldc_bind);
1320
1321int ldc_connect(struct ldc_channel *lp)
1322{
1323 unsigned long flags;
1324 int err;
1325
1326 if (lp->cfg.mode == LDC_MODE_RAW)
1327 return -EINVAL;
1328
1329 spin_lock_irqsave(&lp->lock, flags);
1330
1331 if (!(lp->flags & LDC_FLAG_ALLOCED_QUEUES) ||
1332 !(lp->flags & LDC_FLAG_REGISTERED_QUEUES) ||
1333 lp->hs_state != LDC_HS_OPEN)
1334 err = -EINVAL;
1335 else
1336 err = start_handshake(lp);
1337
1338 spin_unlock_irqrestore(&lp->lock, flags);
1339
1340 return err;
1341}
1342EXPORT_SYMBOL(ldc_connect);
1343
1344int ldc_disconnect(struct ldc_channel *lp)
1345{
1346 unsigned long hv_err, flags;
1347 int err;
1348
1349 if (lp->cfg.mode == LDC_MODE_RAW)
1350 return -EINVAL;
1351
1352 if (!(lp->flags & LDC_FLAG_ALLOCED_QUEUES) ||
1353 !(lp->flags & LDC_FLAG_REGISTERED_QUEUES))
1354 return -EINVAL;
1355
1356 spin_lock_irqsave(&lp->lock, flags);
1357
1358 err = -ENODEV;
1359 hv_err = sun4v_ldc_tx_qconf(lp->id, 0, 0);
1360 if (hv_err)
1361 goto out_err;
1362
1363 hv_err = sun4v_ldc_tx_qconf(lp->id, lp->tx_ra, lp->tx_num_entries);
1364 if (hv_err)
1365 goto out_err;
1366
1367 hv_err = sun4v_ldc_rx_qconf(lp->id, 0, 0);
1368 if (hv_err)
1369 goto out_err;
1370
1371 hv_err = sun4v_ldc_rx_qconf(lp->id, lp->rx_ra, lp->rx_num_entries);
1372 if (hv_err)
1373 goto out_err;
1374
1375 ldc_set_state(lp, LDC_STATE_BOUND);
1376 lp->hs_state = LDC_HS_OPEN;
1377 lp->flags |= LDC_FLAG_RESET;
1378
1379 spin_unlock_irqrestore(&lp->lock, flags);
1380
1381 return 0;
1382
1383out_err:
1384 sun4v_ldc_tx_qconf(lp->id, 0, 0);
1385 sun4v_ldc_rx_qconf(lp->id, 0, 0);
1386 free_irq(lp->cfg.tx_irq, lp);
1387 free_irq(lp->cfg.rx_irq, lp);
1388 lp->flags &= ~(LDC_FLAG_REGISTERED_IRQS |
1389 LDC_FLAG_REGISTERED_QUEUES);
1390 ldc_set_state(lp, LDC_STATE_INIT);
1391
1392 spin_unlock_irqrestore(&lp->lock, flags);
1393
1394 return err;
1395}
1396EXPORT_SYMBOL(ldc_disconnect);
1397
1398int ldc_state(struct ldc_channel *lp)
1399{
1400 return lp->state;
1401}
1402EXPORT_SYMBOL(ldc_state);
1403
1404static int write_raw(struct ldc_channel *lp, const void *buf, unsigned int size)
1405{
1406 struct ldc_packet *p;
1407 unsigned long new_tail;
1408 int err;
1409
1410 if (size > LDC_PACKET_SIZE)
1411 return -EMSGSIZE;
1412
1413 p = data_get_tx_packet(lp, &new_tail);
1414 if (!p)
1415 return -EAGAIN;
1416
1417 memcpy(p, buf, size);
1418
1419 err = send_tx_packet(lp, p, new_tail);
1420 if (!err)
1421 err = size;
1422
1423 return err;
1424}
1425
1426static int read_raw(struct ldc_channel *lp, void *buf, unsigned int size)
1427{
1428 struct ldc_packet *p;
1429 unsigned long hv_err, new;
1430 int err;
1431
1432 if (size < LDC_PACKET_SIZE)
1433 return -EINVAL;
1434
1435 hv_err = sun4v_ldc_rx_get_state(lp->id,
1436 &lp->rx_head,
1437 &lp->rx_tail,
1438 &lp->chan_state);
1439 if (hv_err)
1440 return ldc_abort(lp);
1441
1442 if (lp->chan_state == LDC_CHANNEL_DOWN ||
1443 lp->chan_state == LDC_CHANNEL_RESETTING)
1444 return -ECONNRESET;
1445
1446 if (lp->rx_head == lp->rx_tail)
1447 return 0;
1448
1449 p = lp->rx_base + (lp->rx_head / LDC_PACKET_SIZE);
1450 memcpy(buf, p, LDC_PACKET_SIZE);
1451
1452 new = rx_advance(lp, lp->rx_head);
1453 lp->rx_head = new;
1454
1455 err = __set_rx_head(lp, new);
1456 if (err < 0)
1457 err = -ECONNRESET;
1458 else
1459 err = LDC_PACKET_SIZE;
1460
1461 return err;
1462}
1463
1464static const struct ldc_mode_ops raw_ops = {
1465 .write = write_raw,
1466 .read = read_raw,
1467};
1468
1469static int write_nonraw(struct ldc_channel *lp, const void *buf,
1470 unsigned int size)
1471{
1472 unsigned long hv_err, tail;
1473 unsigned int copied;
1474 u32 seq;
1475 int err;
1476
1477 hv_err = sun4v_ldc_tx_get_state(lp->id, &lp->tx_head, &lp->tx_tail,
1478 &lp->chan_state);
1479 if (unlikely(hv_err))
1480 return -EBUSY;
1481
1482 if (unlikely(lp->chan_state != LDC_CHANNEL_UP))
1483 return ldc_abort(lp);
1484
1485 if (!tx_has_space_for(lp, size))
1486 return -EAGAIN;
1487
1488 seq = lp->snd_nxt;
1489 copied = 0;
1490 tail = lp->tx_tail;
1491 while (copied < size) {
1492 struct ldc_packet *p = lp->tx_base + (tail / LDC_PACKET_SIZE);
1493 u8 *data = ((lp->cfg.mode == LDC_MODE_UNRELIABLE) ?
1494 p->u.u_data :
1495 p->u.r.r_data);
1496 int data_len;
1497
1498 p->type = LDC_DATA;
1499 p->stype = LDC_INFO;
1500 p->ctrl = 0;
1501
1502 data_len = size - copied;
1503 if (data_len > lp->mss)
1504 data_len = lp->mss;
1505
1506 BUG_ON(data_len > LDC_LEN);
1507
1508 p->env = (data_len |
1509 (copied == 0 ? LDC_START : 0) |
1510 (data_len == size - copied ? LDC_STOP : 0));
1511
1512 p->seqid = ++seq;
1513
1514 ldcdbg(DATA, "SENT DATA [%02x:%02x:%02x:%02x:%08x]\n",
1515 p->type,
1516 p->stype,
1517 p->ctrl,
1518 p->env,
1519 p->seqid);
1520
1521 memcpy(data, buf, data_len);
1522 buf += data_len;
1523 copied += data_len;
1524
1525 tail = tx_advance(lp, tail);
1526 }
1527
1528 err = set_tx_tail(lp, tail);
1529 if (!err) {
1530 lp->snd_nxt = seq;
1531 err = size;
1532 }
1533
1534 return err;
1535}
1536
1537static int rx_bad_seq(struct ldc_channel *lp, struct ldc_packet *p,
1538 struct ldc_packet *first_frag)
1539{
1540 int err;
1541
1542 if (first_frag)
1543 lp->rcv_nxt = first_frag->seqid - 1;
1544
1545 err = send_data_nack(lp, p);
1546 if (err)
1547 return err;
1548
1549 err = __set_rx_head(lp, lp->rx_tail);
1550 if (err < 0)
1551 return ldc_abort(lp);
1552
1553 return 0;
1554}
1555
1556static int data_ack_nack(struct ldc_channel *lp, struct ldc_packet *p)
1557{
1558 if (p->stype & LDC_ACK) {
1559 int err = process_data_ack(lp, p);
1560 if (err)
1561 return err;
1562 }
1563 if (p->stype & LDC_NACK)
1564 return ldc_abort(lp);
1565
1566 return 0;
1567}
1568
1569static int rx_data_wait(struct ldc_channel *lp, unsigned long cur_head)
1570{
1571 unsigned long dummy;
1572 int limit = 1000;
1573
1574 ldcdbg(DATA, "DATA WAIT cur_head[%lx] rx_head[%lx] rx_tail[%lx]\n",
1575 cur_head, lp->rx_head, lp->rx_tail);
1576 while (limit-- > 0) {
1577 unsigned long hv_err;
1578
1579 hv_err = sun4v_ldc_rx_get_state(lp->id,
1580 &dummy,
1581 &lp->rx_tail,
1582 &lp->chan_state);
1583 if (hv_err)
1584 return ldc_abort(lp);
1585
1586 if (lp->chan_state == LDC_CHANNEL_DOWN ||
1587 lp->chan_state == LDC_CHANNEL_RESETTING)
1588 return -ECONNRESET;
1589
1590 if (cur_head != lp->rx_tail) {
1591 ldcdbg(DATA, "DATA WAIT DONE "
1592 "head[%lx] tail[%lx] chan_state[%lx]\n",
1593 dummy, lp->rx_tail, lp->chan_state);
1594 return 0;
1595 }
1596
1597 udelay(1);
1598 }
1599 return -EAGAIN;
1600}
1601
1602static int rx_set_head(struct ldc_channel *lp, unsigned long head)
1603{
1604 int err = __set_rx_head(lp, head);
1605
1606 if (err < 0)
1607 return ldc_abort(lp);
1608
1609 lp->rx_head = head;
1610 return 0;
1611}
1612
1613static void send_data_ack(struct ldc_channel *lp)
1614{
1615 unsigned long new_tail;
1616 struct ldc_packet *p;
1617
1618 p = data_get_tx_packet(lp, &new_tail);
1619 if (likely(p)) {
1620 int err;
1621
1622 memset(p, 0, sizeof(*p));
1623 p->type = LDC_DATA;
1624 p->stype = LDC_ACK;
1625 p->ctrl = 0;
1626 p->seqid = lp->snd_nxt + 1;
1627 p->u.r.ackid = lp->rcv_nxt;
1628
1629 err = send_tx_packet(lp, p, new_tail);
1630 if (!err)
1631 lp->snd_nxt++;
1632 }
1633}
1634
1635static int read_nonraw(struct ldc_channel *lp, void *buf, unsigned int size)
1636{
1637 struct ldc_packet *first_frag;
1638 unsigned long hv_err, new;
1639 int err, copied;
1640
1641 hv_err = sun4v_ldc_rx_get_state(lp->id,
1642 &lp->rx_head,
1643 &lp->rx_tail,
1644 &lp->chan_state);
1645 if (hv_err)
1646 return ldc_abort(lp);
1647
1648 if (lp->chan_state == LDC_CHANNEL_DOWN ||
1649 lp->chan_state == LDC_CHANNEL_RESETTING)
1650 return -ECONNRESET;
1651
1652 if (lp->rx_head == lp->rx_tail)
1653 return 0;
1654
1655 first_frag = NULL;
1656 copied = err = 0;
1657 new = lp->rx_head;
1658 while (1) {
1659 struct ldc_packet *p;
1660 int pkt_len;
1661
1662 BUG_ON(new == lp->rx_tail);
1663 p = lp->rx_base + (new / LDC_PACKET_SIZE);
1664
1665 ldcdbg(RX, "RX read pkt[%02x:%02x:%02x:%02x:%08x:%08x] "
1666 "rcv_nxt[%08x]\n",
1667 p->type,
1668 p->stype,
1669 p->ctrl,
1670 p->env,
1671 p->seqid,
1672 p->u.r.ackid,
1673 lp->rcv_nxt);
1674
1675 if (unlikely(!rx_seq_ok(lp, p->seqid))) {
1676 err = rx_bad_seq(lp, p, first_frag);
1677 copied = 0;
1678 break;
1679 }
1680
1681 if (p->type & LDC_CTRL) {
1682 err = process_control_frame(lp, p);
1683 if (err < 0)
1684 break;
1685 err = 0;
1686 }
1687
1688 lp->rcv_nxt = p->seqid;
1689
1690 if (!(p->type & LDC_DATA)) {
1691 new = rx_advance(lp, new);
1692 goto no_data;
1693 }
1694 if (p->stype & (LDC_ACK | LDC_NACK)) {
1695 err = data_ack_nack(lp, p);
1696 if (err)
1697 break;
1698 }
1699 if (!(p->stype & LDC_INFO)) {
1700 new = rx_advance(lp, new);
1701 err = rx_set_head(lp, new);
1702 if (err)
1703 break;
1704 goto no_data;
1705 }
1706
1707 pkt_len = p->env & LDC_LEN;
1708
1709 /* Every initial packet starts with the START bit set.
1710 *
1711 * Singleton packets will have both START+STOP set.
1712 *
1713 * Fragments will have START set in the first frame, STOP
1714 * set in the last frame, and neither bit set in middle
1715 * frames of the packet.
1716 *
1717 * Therefore if we are at the beginning of a packet and
1718 * we don't see START, or we are in the middle of a fragmented
1719 * packet and do see START, we are unsynchronized and should
1720 * flush the RX queue.
1721 */
1722 if ((first_frag == NULL && !(p->env & LDC_START)) ||
1723 (first_frag != NULL && (p->env & LDC_START))) {
1724 if (!first_frag)
1725 new = rx_advance(lp, new);
1726
1727 err = rx_set_head(lp, new);
1728 if (err)
1729 break;
1730
1731 if (!first_frag)
1732 goto no_data;
1733 }
1734 if (!first_frag)
1735 first_frag = p;
1736
1737 if (pkt_len > size - copied) {
1738 /* User didn't give us a big enough buffer,
1739 * what to do? This is a pretty serious error.
1740 *
1741 * Since we haven't updated the RX ring head to
1742 * consume any of the packets, signal the error
1743 * to the user and just leave the RX ring alone.
1744 *
1745 * This seems the best behavior because this allows
1746 * a user of the LDC layer to start with a small
1747 * RX buffer for ldc_read() calls and use -EMSGSIZE
1748 * as a cue to enlarge it's read buffer.
1749 */
1750 err = -EMSGSIZE;
1751 break;
1752 }
1753
1754 /* Ok, we are gonna eat this one. */
1755 new = rx_advance(lp, new);
1756
1757 memcpy(buf,
1758 (lp->cfg.mode == LDC_MODE_UNRELIABLE ?
1759 p->u.u_data : p->u.r.r_data), pkt_len);
1760 buf += pkt_len;
1761 copied += pkt_len;
1762
1763 if (p->env & LDC_STOP)
1764 break;
1765
1766no_data:
1767 if (new == lp->rx_tail) {
1768 err = rx_data_wait(lp, new);
1769 if (err)
1770 break;
1771 }
1772 }
1773
1774 if (!err)
1775 err = rx_set_head(lp, new);
1776
1777 if (err && first_frag)
1778 lp->rcv_nxt = first_frag->seqid - 1;
1779
1780 if (!err) {
1781 err = copied;
1782 if (err > 0 && lp->cfg.mode != LDC_MODE_UNRELIABLE)
1783 send_data_ack(lp);
1784 }
1785
1786 return err;
1787}
1788
1789static const struct ldc_mode_ops nonraw_ops = {
1790 .write = write_nonraw,
1791 .read = read_nonraw,
1792};
1793
1794static int write_stream(struct ldc_channel *lp, const void *buf,
1795 unsigned int size)
1796{
1797 if (size > lp->cfg.mtu)
1798 size = lp->cfg.mtu;
1799 return write_nonraw(lp, buf, size);
1800}
1801
1802static int read_stream(struct ldc_channel *lp, void *buf, unsigned int size)
1803{
1804 if (!lp->mssbuf_len) {
1805 int err = read_nonraw(lp, lp->mssbuf, lp->cfg.mtu);
1806 if (err < 0)
1807 return err;
1808
1809 lp->mssbuf_len = err;
1810 lp->mssbuf_off = 0;
1811 }
1812
1813 if (size > lp->mssbuf_len)
1814 size = lp->mssbuf_len;
1815 memcpy(buf, lp->mssbuf + lp->mssbuf_off, size);
1816
1817 lp->mssbuf_off += size;
1818 lp->mssbuf_len -= size;
1819
1820 return size;
1821}
1822
1823static const struct ldc_mode_ops stream_ops = {
1824 .write = write_stream,
1825 .read = read_stream,
1826};
1827
1828int ldc_write(struct ldc_channel *lp, const void *buf, unsigned int size)
1829{
1830 unsigned long flags;
1831 int err;
1832
1833 if (!buf)
1834 return -EINVAL;
1835
1836 if (!size)
1837 return 0;
1838
1839 spin_lock_irqsave(&lp->lock, flags);
1840
1841 if (lp->hs_state != LDC_HS_COMPLETE)
1842 err = -ENOTCONN;
1843 else
1844 err = lp->mops->write(lp, buf, size);
1845
1846 spin_unlock_irqrestore(&lp->lock, flags);
1847
1848 return err;
1849}
1850EXPORT_SYMBOL(ldc_write);
1851
1852int ldc_read(struct ldc_channel *lp, void *buf, unsigned int size)
1853{
1854 unsigned long flags;
1855 int err;
1856
1857 if (!buf)
1858 return -EINVAL;
1859
1860 if (!size)
1861 return 0;
1862
1863 spin_lock_irqsave(&lp->lock, flags);
1864
1865 if (lp->hs_state != LDC_HS_COMPLETE)
1866 err = -ENOTCONN;
1867 else
1868 err = lp->mops->read(lp, buf, size);
1869
1870 spin_unlock_irqrestore(&lp->lock, flags);
1871
1872 return err;
1873}
1874EXPORT_SYMBOL(ldc_read);
1875
1876static long arena_alloc(struct ldc_iommu *iommu, unsigned long npages)
1877{
1878 struct iommu_arena *arena = &iommu->arena;
1879 unsigned long n, i, start, end, limit;
1880 int pass;
1881
1882 limit = arena->limit;
1883 start = arena->hint;
1884 pass = 0;
1885
1886again:
1887 n = find_next_zero_bit(arena->map, limit, start);
1888 end = n + npages;
1889 if (unlikely(end >= limit)) {
1890 if (likely(pass < 1)) {
1891 limit = start;
1892 start = 0;
1893 pass++;
1894 goto again;
1895 } else {
1896 /* Scanned the whole thing, give up. */
1897 return -1;
1898 }
1899 }
1900
1901 for (i = n; i < end; i++) {
1902 if (test_bit(i, arena->map)) {
1903 start = i + 1;
1904 goto again;
1905 }
1906 }
1907
1908 for (i = n; i < end; i++)
1909 __set_bit(i, arena->map);
1910
1911 arena->hint = end;
1912
1913 return n;
1914}
1915
1916#define COOKIE_PGSZ_CODE 0xf000000000000000ULL
1917#define COOKIE_PGSZ_CODE_SHIFT 60ULL
1918
1919static u64 pagesize_code(void)
1920{
1921 switch (PAGE_SIZE) {
1922 default:
1923 case (8ULL * 1024ULL):
1924 return 0;
1925 case (64ULL * 1024ULL):
1926 return 1;
1927 case (512ULL * 1024ULL):
1928 return 2;
1929 case (4ULL * 1024ULL * 1024ULL):
1930 return 3;
1931 case (32ULL * 1024ULL * 1024ULL):
1932 return 4;
1933 case (256ULL * 1024ULL * 1024ULL):
1934 return 5;
1935 }
1936}
1937
1938static u64 make_cookie(u64 index, u64 pgsz_code, u64 page_offset)
1939{
1940 return ((pgsz_code << COOKIE_PGSZ_CODE_SHIFT) |
1941 (index << PAGE_SHIFT) |
1942 page_offset);
1943}
1944
1945static u64 cookie_to_index(u64 cookie, unsigned long *shift)
1946{
1947 u64 szcode = cookie >> COOKIE_PGSZ_CODE_SHIFT;
1948
1949 cookie &= ~COOKIE_PGSZ_CODE;
1950
1951 *shift = szcode * 3;
1952
1953 return (cookie >> (13ULL + (szcode * 3ULL)));
1954}
1955
1956static struct ldc_mtable_entry *alloc_npages(struct ldc_iommu *iommu,
1957 unsigned long npages)
1958{
1959 long entry;
1960
1961 entry = arena_alloc(iommu, npages);
1962 if (unlikely(entry < 0))
1963 return NULL;
1964
1965 return iommu->page_table + entry;
1966}
1967
1968static u64 perm_to_mte(unsigned int map_perm)
1969{
1970 u64 mte_base;
1971
1972 mte_base = pagesize_code();
1973
1974 if (map_perm & LDC_MAP_SHADOW) {
1975 if (map_perm & LDC_MAP_R)
1976 mte_base |= LDC_MTE_COPY_R;
1977 if (map_perm & LDC_MAP_W)
1978 mte_base |= LDC_MTE_COPY_W;
1979 }
1980 if (map_perm & LDC_MAP_DIRECT) {
1981 if (map_perm & LDC_MAP_R)
1982 mte_base |= LDC_MTE_READ;
1983 if (map_perm & LDC_MAP_W)
1984 mte_base |= LDC_MTE_WRITE;
1985 if (map_perm & LDC_MAP_X)
1986 mte_base |= LDC_MTE_EXEC;
1987 }
1988 if (map_perm & LDC_MAP_IO) {
1989 if (map_perm & LDC_MAP_R)
1990 mte_base |= LDC_MTE_IOMMU_R;
1991 if (map_perm & LDC_MAP_W)
1992 mte_base |= LDC_MTE_IOMMU_W;
1993 }
1994
1995 return mte_base;
1996}
1997
1998static int pages_in_region(unsigned long base, long len)
1999{
2000 int count = 0;
2001
2002 do {
2003 unsigned long new = (base + PAGE_SIZE) & PAGE_MASK;
2004
2005 len -= (new - base);
2006 base = new;
2007 count++;
2008 } while (len > 0);
2009
2010 return count;
2011}
2012
2013struct cookie_state {
2014 struct ldc_mtable_entry *page_table;
2015 struct ldc_trans_cookie *cookies;
2016 u64 mte_base;
2017 u64 prev_cookie;
2018 u32 pte_idx;
2019 u32 nc;
2020};
2021
2022static void fill_cookies(struct cookie_state *sp, unsigned long pa,
2023 unsigned long off, unsigned long len)
2024{
2025 do {
2026 unsigned long tlen, new = pa + PAGE_SIZE;
2027 u64 this_cookie;
2028
2029 sp->page_table[sp->pte_idx].mte = sp->mte_base | pa;
2030
2031 tlen = PAGE_SIZE;
2032 if (off)
2033 tlen = PAGE_SIZE - off;
2034 if (tlen > len)
2035 tlen = len;
2036
2037 this_cookie = make_cookie(sp->pte_idx,
2038 pagesize_code(), off);
2039
2040 off = 0;
2041
2042 if (this_cookie == sp->prev_cookie) {
2043 sp->cookies[sp->nc - 1].cookie_size += tlen;
2044 } else {
2045 sp->cookies[sp->nc].cookie_addr = this_cookie;
2046 sp->cookies[sp->nc].cookie_size = tlen;
2047 sp->nc++;
2048 }
2049 sp->prev_cookie = this_cookie + tlen;
2050
2051 sp->pte_idx++;
2052
2053 len -= tlen;
2054 pa = new;
2055 } while (len > 0);
2056}
2057
2058static int sg_count_one(struct scatterlist *sg)
2059{
2060 unsigned long base = page_to_pfn(sg->page) << PAGE_SHIFT;
2061 long len = sg->length;
2062
2063 if ((sg->offset | len) & (8UL - 1))
2064 return -EFAULT;
2065
2066 return pages_in_region(base + sg->offset, len);
2067}
2068
2069static int sg_count_pages(struct scatterlist *sg, int num_sg)
2070{
2071 int count;
2072 int i;
2073
2074 count = 0;
2075 for (i = 0; i < num_sg; i++) {
2076 int err = sg_count_one(sg + i);
2077 if (err < 0)
2078 return err;
2079 count += err;
2080 }
2081
2082 return count;
2083}
2084
2085int ldc_map_sg(struct ldc_channel *lp,
2086 struct scatterlist *sg, int num_sg,
2087 struct ldc_trans_cookie *cookies, int ncookies,
2088 unsigned int map_perm)
2089{
2090 unsigned long i, npages, flags;
2091 struct ldc_mtable_entry *base;
2092 struct cookie_state state;
2093 struct ldc_iommu *iommu;
2094 int err;
2095
2096 if (map_perm & ~LDC_MAP_ALL)
2097 return -EINVAL;
2098
2099 err = sg_count_pages(sg, num_sg);
2100 if (err < 0)
2101 return err;
2102
2103 npages = err;
2104 if (err > ncookies)
2105 return -EMSGSIZE;
2106
2107 iommu = &lp->iommu;
2108
2109 spin_lock_irqsave(&iommu->lock, flags);
2110 base = alloc_npages(iommu, npages);
2111 spin_unlock_irqrestore(&iommu->lock, flags);
2112
2113 if (!base)
2114 return -ENOMEM;
2115
2116 state.page_table = iommu->page_table;
2117 state.cookies = cookies;
2118 state.mte_base = perm_to_mte(map_perm);
2119 state.prev_cookie = ~(u64)0;
2120 state.pte_idx = (base - iommu->page_table);
2121 state.nc = 0;
2122
2123 for (i = 0; i < num_sg; i++)
2124 fill_cookies(&state, page_to_pfn(sg[i].page) << PAGE_SHIFT,
2125 sg[i].offset, sg[i].length);
2126
2127 return state.nc;
2128}
2129EXPORT_SYMBOL(ldc_map_sg);
2130
2131int ldc_map_single(struct ldc_channel *lp,
2132 void *buf, unsigned int len,
2133 struct ldc_trans_cookie *cookies, int ncookies,
2134 unsigned int map_perm)
2135{
2136 unsigned long npages, pa, flags;
2137 struct ldc_mtable_entry *base;
2138 struct cookie_state state;
2139 struct ldc_iommu *iommu;
2140
2141 if ((map_perm & ~LDC_MAP_ALL) || (ncookies < 1))
2142 return -EINVAL;
2143
2144 pa = __pa(buf);
2145 if ((pa | len) & (8UL - 1))
2146 return -EFAULT;
2147
2148 npages = pages_in_region(pa, len);
2149
2150 iommu = &lp->iommu;
2151
2152 spin_lock_irqsave(&iommu->lock, flags);
2153 base = alloc_npages(iommu, npages);
2154 spin_unlock_irqrestore(&iommu->lock, flags);
2155
2156 if (!base)
2157 return -ENOMEM;
2158
2159 state.page_table = iommu->page_table;
2160 state.cookies = cookies;
2161 state.mte_base = perm_to_mte(map_perm);
2162 state.prev_cookie = ~(u64)0;
2163 state.pte_idx = (base - iommu->page_table);
2164 state.nc = 0;
2165 fill_cookies(&state, (pa & PAGE_MASK), (pa & ~PAGE_MASK), len);
2166 BUG_ON(state.nc != 1);
2167
2168 return state.nc;
2169}
2170EXPORT_SYMBOL(ldc_map_single);
2171
2172static void free_npages(unsigned long id, struct ldc_iommu *iommu,
2173 u64 cookie, u64 size)
2174{
2175 struct iommu_arena *arena = &iommu->arena;
2176 unsigned long i, shift, index, npages;
2177 struct ldc_mtable_entry *base;
2178
2179 npages = PAGE_ALIGN(((cookie & ~PAGE_MASK) + size)) >> PAGE_SHIFT;
2180 index = cookie_to_index(cookie, &shift);
2181 base = iommu->page_table + index;
2182
2183 BUG_ON(index > arena->limit ||
2184 (index + npages) > arena->limit);
2185
2186 for (i = 0; i < npages; i++) {
2187 if (base->cookie)
2188 sun4v_ldc_revoke(id, cookie + (i << shift),
2189 base->cookie);
2190 base->mte = 0;
2191 __clear_bit(index + i, arena->map);
2192 }
2193}
2194
2195void ldc_unmap(struct ldc_channel *lp, struct ldc_trans_cookie *cookies,
2196 int ncookies)
2197{
2198 struct ldc_iommu *iommu = &lp->iommu;
2199 unsigned long flags;
2200 int i;
2201
2202 spin_lock_irqsave(&iommu->lock, flags);
2203 for (i = 0; i < ncookies; i++) {
2204 u64 addr = cookies[i].cookie_addr;
2205 u64 size = cookies[i].cookie_size;
2206
2207 free_npages(lp->id, iommu, addr, size);
2208 }
2209 spin_unlock_irqrestore(&iommu->lock, flags);
2210}
2211EXPORT_SYMBOL(ldc_unmap);
2212
2213int ldc_copy(struct ldc_channel *lp, int copy_dir,
2214 void *buf, unsigned int len, unsigned long offset,
2215 struct ldc_trans_cookie *cookies, int ncookies)
2216{
2217 unsigned int orig_len;
2218 unsigned long ra;
2219 int i;
2220
2221 if (copy_dir != LDC_COPY_IN && copy_dir != LDC_COPY_OUT) {
2222 printk(KERN_ERR PFX "ldc_copy: ID[%lu] Bad copy_dir[%d]\n",
2223 lp->id, copy_dir);
2224 return -EINVAL;
2225 }
2226
2227 ra = __pa(buf);
2228 if ((ra | len | offset) & (8UL - 1)) {
2229 printk(KERN_ERR PFX "ldc_copy: ID[%lu] Unaligned buffer "
2230 "ra[%lx] len[%x] offset[%lx]\n",
2231 lp->id, ra, len, offset);
2232 return -EFAULT;
2233 }
2234
2235 if (lp->hs_state != LDC_HS_COMPLETE ||
2236 (lp->flags & LDC_FLAG_RESET)) {
2237 printk(KERN_ERR PFX "ldc_copy: ID[%lu] Link down hs_state[%x] "
2238 "flags[%x]\n", lp->id, lp->hs_state, lp->flags);
2239 return -ECONNRESET;
2240 }
2241
2242 orig_len = len;
2243 for (i = 0; i < ncookies; i++) {
2244 unsigned long cookie_raddr = cookies[i].cookie_addr;
2245 unsigned long this_len = cookies[i].cookie_size;
2246 unsigned long actual_len;
2247
2248 if (unlikely(offset)) {
2249 unsigned long this_off = offset;
2250
2251 if (this_off > this_len)
2252 this_off = this_len;
2253
2254 offset -= this_off;
2255 this_len -= this_off;
2256 if (!this_len)
2257 continue;
2258 cookie_raddr += this_off;
2259 }
2260
2261 if (this_len > len)
2262 this_len = len;
2263
2264 while (1) {
2265 unsigned long hv_err;
2266
2267 hv_err = sun4v_ldc_copy(lp->id, copy_dir,
2268 cookie_raddr, ra,
2269 this_len, &actual_len);
2270 if (unlikely(hv_err)) {
2271 printk(KERN_ERR PFX "ldc_copy: ID[%lu] "
2272 "HV error %lu\n",
2273 lp->id, hv_err);
2274 if (lp->hs_state != LDC_HS_COMPLETE ||
2275 (lp->flags & LDC_FLAG_RESET))
2276 return -ECONNRESET;
2277 else
2278 return -EFAULT;
2279 }
2280
2281 cookie_raddr += actual_len;
2282 ra += actual_len;
2283 len -= actual_len;
2284 if (actual_len == this_len)
2285 break;
2286
2287 this_len -= actual_len;
2288 }
2289
2290 if (!len)
2291 break;
2292 }
2293
2294 /* It is caller policy what to do about short copies.
2295 * For example, a networking driver can declare the
2296 * packet a runt and drop it.
2297 */
2298
2299 return orig_len - len;
2300}
2301EXPORT_SYMBOL(ldc_copy);
2302
2303void *ldc_alloc_exp_dring(struct ldc_channel *lp, unsigned int len,
2304 struct ldc_trans_cookie *cookies, int *ncookies,
2305 unsigned int map_perm)
2306{
2307 void *buf;
2308 int err;
2309
2310 if (len & (8UL - 1))
2311 return ERR_PTR(-EINVAL);
2312
2313 buf = kzalloc(len, GFP_KERNEL);
2314 if (!buf)
2315 return ERR_PTR(-ENOMEM);
2316
2317 err = ldc_map_single(lp, buf, len, cookies, *ncookies, map_perm);
2318 if (err < 0) {
2319 kfree(buf);
2320 return ERR_PTR(err);
2321 }
2322 *ncookies = err;
2323
2324 return buf;
2325}
2326EXPORT_SYMBOL(ldc_alloc_exp_dring);
2327
2328void ldc_free_exp_dring(struct ldc_channel *lp, void *buf, unsigned int len,
2329 struct ldc_trans_cookie *cookies, int ncookies)
2330{
2331 ldc_unmap(lp, cookies, ncookies);
2332 kfree(buf);
2333}
2334EXPORT_SYMBOL(ldc_free_exp_dring);
2335
2336static int __init ldc_init(void)
2337{
2338 unsigned long major, minor;
2339 struct mdesc_handle *hp;
2340 const u64 *v;
2341 u64 mp;
2342
2343 hp = mdesc_grab();
2344 if (!hp)
2345 return -ENODEV;
2346
2347 mp = mdesc_node_by_name(hp, MDESC_NODE_NULL, "platform");
2348 if (mp == MDESC_NODE_NULL)
2349 return -ENODEV;
2350
2351 v = mdesc_get_property(hp, mp, "domaining-enabled", NULL);
2352 if (!v)
2353 return -ENODEV;
2354
2355 major = 1;
2356 minor = 0;
2357 if (sun4v_hvapi_register(HV_GRP_LDOM, major, &minor)) {
2358 printk(KERN_INFO PFX "Could not register LDOM hvapi.\n");
2359 return -ENODEV;
2360 }
2361
2362 printk(KERN_INFO "%s", version);
2363
2364 if (!*v) {
2365 printk(KERN_INFO PFX "Domaining disabled.\n");
2366 return -ENODEV;
2367 }
2368 ldom_domaining_enabled = 1;
2369
2370 return 0;
2371}
2372
2373core_initcall(ldc_init);
diff --git a/arch/sparc64/kernel/mdesc.c b/arch/sparc64/kernel/mdesc.c
index 9246c2cf9574..cce4d0ddf5d5 100644
--- a/arch/sparc64/kernel/mdesc.c
+++ b/arch/sparc64/kernel/mdesc.c
@@ -6,6 +6,9 @@
6#include <linux/types.h> 6#include <linux/types.h>
7#include <linux/bootmem.h> 7#include <linux/bootmem.h>
8#include <linux/log2.h> 8#include <linux/log2.h>
9#include <linux/list.h>
10#include <linux/slab.h>
11#include <linux/mm.h>
9 12
10#include <asm/hypervisor.h> 13#include <asm/hypervisor.h>
11#include <asm/mdesc.h> 14#include <asm/mdesc.h>
@@ -29,7 +32,7 @@ struct mdesc_hdr {
29 u32 node_sz; /* node block size */ 32 u32 node_sz; /* node block size */
30 u32 name_sz; /* name block size */ 33 u32 name_sz; /* name block size */
31 u32 data_sz; /* data block size */ 34 u32 data_sz; /* data block size */
32}; 35} __attribute__((aligned(16)));
33 36
34struct mdesc_elem { 37struct mdesc_elem {
35 u8 tag; 38 u8 tag;
@@ -53,306 +56,516 @@ struct mdesc_elem {
53 } d; 56 } d;
54}; 57};
55 58
56static struct mdesc_hdr *main_mdesc; 59struct mdesc_mem_ops {
57static struct mdesc_node *allnodes; 60 struct mdesc_handle *(*alloc)(unsigned int mdesc_size);
61 void (*free)(struct mdesc_handle *handle);
62};
63
64struct mdesc_handle {
65 struct list_head list;
66 struct mdesc_mem_ops *mops;
67 void *self_base;
68 atomic_t refcnt;
69 unsigned int handle_size;
70 struct mdesc_hdr mdesc;
71};
58 72
59static struct mdesc_node *allnodes_tail; 73static void mdesc_handle_init(struct mdesc_handle *hp,
60static unsigned int unique_id; 74 unsigned int handle_size,
75 void *base)
76{
77 BUG_ON(((unsigned long)&hp->mdesc) & (16UL - 1));
61 78
62static struct mdesc_node **mdesc_hash; 79 memset(hp, 0, handle_size);
63static unsigned int mdesc_hash_size; 80 INIT_LIST_HEAD(&hp->list);
81 hp->self_base = base;
82 atomic_set(&hp->refcnt, 1);
83 hp->handle_size = handle_size;
84}
64 85
65static inline unsigned int node_hashfn(u64 node) 86static struct mdesc_handle * __init mdesc_bootmem_alloc(unsigned int mdesc_size)
66{ 87{
67 return ((unsigned int) (node ^ (node >> 8) ^ (node >> 16))) 88 struct mdesc_handle *hp;
68 & (mdesc_hash_size - 1); 89 unsigned int handle_size, alloc_size;
90
91 handle_size = (sizeof(struct mdesc_handle) -
92 sizeof(struct mdesc_hdr) +
93 mdesc_size);
94 alloc_size = PAGE_ALIGN(handle_size);
95
96 hp = __alloc_bootmem(alloc_size, PAGE_SIZE, 0UL);
97 if (hp)
98 mdesc_handle_init(hp, handle_size, hp);
99
100 return hp;
69} 101}
70 102
71static inline void hash_node(struct mdesc_node *mp) 103static void mdesc_bootmem_free(struct mdesc_handle *hp)
72{ 104{
73 struct mdesc_node **head = &mdesc_hash[node_hashfn(mp->node)]; 105 unsigned int alloc_size, handle_size = hp->handle_size;
106 unsigned long start, end;
74 107
75 mp->hash_next = *head; 108 BUG_ON(atomic_read(&hp->refcnt) != 0);
76 *head = mp; 109 BUG_ON(!list_empty(&hp->list));
77 110
78 if (allnodes_tail) { 111 alloc_size = PAGE_ALIGN(handle_size);
79 allnodes_tail->allnodes_next = mp; 112
80 allnodes_tail = mp; 113 start = (unsigned long) hp;
81 } else { 114 end = start + alloc_size;
82 allnodes = allnodes_tail = mp; 115
116 while (start < end) {
117 struct page *p;
118
119 p = virt_to_page(start);
120 ClearPageReserved(p);
121 __free_page(p);
122 start += PAGE_SIZE;
83 } 123 }
84} 124}
85 125
86static struct mdesc_node *find_node(u64 node) 126static struct mdesc_mem_ops bootmem_mdesc_ops = {
127 .alloc = mdesc_bootmem_alloc,
128 .free = mdesc_bootmem_free,
129};
130
131static struct mdesc_handle *mdesc_kmalloc(unsigned int mdesc_size)
87{ 132{
88 struct mdesc_node *mp = mdesc_hash[node_hashfn(node)]; 133 unsigned int handle_size;
134 void *base;
89 135
90 while (mp) { 136 handle_size = (sizeof(struct mdesc_handle) -
91 if (mp->node == node) 137 sizeof(struct mdesc_hdr) +
92 return mp; 138 mdesc_size);
93 139
94 mp = mp->hash_next; 140 base = kmalloc(handle_size + 15, GFP_KERNEL | __GFP_NOFAIL);
141 if (base) {
142 struct mdesc_handle *hp;
143 unsigned long addr;
144
145 addr = (unsigned long)base;
146 addr = (addr + 15UL) & ~15UL;
147 hp = (struct mdesc_handle *) addr;
148
149 mdesc_handle_init(hp, handle_size, base);
150 return hp;
95 } 151 }
152
96 return NULL; 153 return NULL;
97} 154}
98 155
99struct property *md_find_property(const struct mdesc_node *mp, 156static void mdesc_kfree(struct mdesc_handle *hp)
100 const char *name,
101 int *lenp)
102{ 157{
103 struct property *pp; 158 BUG_ON(atomic_read(&hp->refcnt) != 0);
159 BUG_ON(!list_empty(&hp->list));
104 160
105 for (pp = mp->properties; pp != 0; pp = pp->next) { 161 kfree(hp->self_base);
106 if (strcasecmp(pp->name, name) == 0) {
107 if (lenp)
108 *lenp = pp->length;
109 break;
110 }
111 }
112 return pp;
113} 162}
114EXPORT_SYMBOL(md_find_property);
115 163
116/* 164static struct mdesc_mem_ops kmalloc_mdesc_memops = {
117 * Find a property with a given name for a given node 165 .alloc = mdesc_kmalloc,
118 * and return the value. 166 .free = mdesc_kfree,
119 */ 167};
120const void *md_get_property(const struct mdesc_node *mp, const char *name, 168
121 int *lenp) 169static struct mdesc_handle *mdesc_alloc(unsigned int mdesc_size,
170 struct mdesc_mem_ops *mops)
122{ 171{
123 struct property *pp = md_find_property(mp, name, lenp); 172 struct mdesc_handle *hp = mops->alloc(mdesc_size);
124 return pp ? pp->value : NULL; 173
174 if (hp)
175 hp->mops = mops;
176
177 return hp;
125} 178}
126EXPORT_SYMBOL(md_get_property);
127 179
128struct mdesc_node *md_find_node_by_name(struct mdesc_node *from, 180static void mdesc_free(struct mdesc_handle *hp)
129 const char *name)
130{ 181{
131 struct mdesc_node *mp; 182 hp->mops->free(hp);
183}
132 184
133 mp = from ? from->allnodes_next : allnodes; 185static struct mdesc_handle *cur_mdesc;
134 for (; mp != NULL; mp = mp->allnodes_next) { 186static LIST_HEAD(mdesc_zombie_list);
135 if (strcmp(mp->name, name) == 0) 187static DEFINE_SPINLOCK(mdesc_lock);
136 break; 188
189struct mdesc_handle *mdesc_grab(void)
190{
191 struct mdesc_handle *hp;
192 unsigned long flags;
193
194 spin_lock_irqsave(&mdesc_lock, flags);
195 hp = cur_mdesc;
196 if (hp)
197 atomic_inc(&hp->refcnt);
198 spin_unlock_irqrestore(&mdesc_lock, flags);
199
200 return hp;
201}
202EXPORT_SYMBOL(mdesc_grab);
203
204void mdesc_release(struct mdesc_handle *hp)
205{
206 unsigned long flags;
207
208 spin_lock_irqsave(&mdesc_lock, flags);
209 if (atomic_dec_and_test(&hp->refcnt)) {
210 list_del_init(&hp->list);
211 hp->mops->free(hp);
137 } 212 }
138 return mp; 213 spin_unlock_irqrestore(&mdesc_lock, flags);
139} 214}
140EXPORT_SYMBOL(md_find_node_by_name); 215EXPORT_SYMBOL(mdesc_release);
141 216
142static unsigned int mdesc_early_allocated; 217static DEFINE_MUTEX(mdesc_mutex);
218static struct mdesc_notifier_client *client_list;
143 219
144static void * __init mdesc_early_alloc(unsigned long size) 220void mdesc_register_notifier(struct mdesc_notifier_client *client)
145{ 221{
146 void *ret; 222 u64 node;
147 223
148 ret = __alloc_bootmem(size, SMP_CACHE_BYTES, 0UL); 224 mutex_lock(&mdesc_mutex);
149 if (ret == NULL) { 225 client->next = client_list;
150 prom_printf("MDESC: alloc of %lu bytes failed.\n", size); 226 client_list = client;
151 prom_halt(); 227
228 mdesc_for_each_node_by_name(cur_mdesc, node, client->node_name)
229 client->add(cur_mdesc, node);
230
231 mutex_unlock(&mdesc_mutex);
232}
233
234static const u64 *parent_cfg_handle(struct mdesc_handle *hp, u64 node)
235{
236 const u64 *id;
237 u64 a;
238
239 id = NULL;
240 mdesc_for_each_arc(a, hp, node, MDESC_ARC_TYPE_BACK) {
241 u64 target;
242
243 target = mdesc_arc_target(hp, a);
244 id = mdesc_get_property(hp, target,
245 "cfg-handle", NULL);
246 if (id)
247 break;
152 } 248 }
153 249
154 memset(ret, 0, size); 250 return id;
251}
155 252
156 mdesc_early_allocated += size; 253/* Run 'func' on nodes which are in A but not in B. */
254static void invoke_on_missing(const char *name,
255 struct mdesc_handle *a,
256 struct mdesc_handle *b,
257 void (*func)(struct mdesc_handle *, u64))
258{
259 u64 node;
157 260
158 return ret; 261 mdesc_for_each_node_by_name(a, node, name) {
262 int found = 0, is_vdc_port = 0;
263 const char *name_prop;
264 const u64 *id;
265 u64 fnode;
266
267 name_prop = mdesc_get_property(a, node, "name", NULL);
268 if (name_prop && !strcmp(name_prop, "vdc-port")) {
269 is_vdc_port = 1;
270 id = parent_cfg_handle(a, node);
271 } else
272 id = mdesc_get_property(a, node, "id", NULL);
273
274 if (!id) {
275 printk(KERN_ERR "MD: Cannot find ID for %s node.\n",
276 (name_prop ? name_prop : name));
277 continue;
278 }
279
280 mdesc_for_each_node_by_name(b, fnode, name) {
281 const u64 *fid;
282
283 if (is_vdc_port) {
284 name_prop = mdesc_get_property(b, fnode,
285 "name", NULL);
286 if (!name_prop ||
287 strcmp(name_prop, "vdc-port"))
288 continue;
289 fid = parent_cfg_handle(b, fnode);
290 if (!fid) {
291 printk(KERN_ERR "MD: Cannot find ID "
292 "for vdc-port node.\n");
293 continue;
294 }
295 } else
296 fid = mdesc_get_property(b, fnode,
297 "id", NULL);
298
299 if (*id == *fid) {
300 found = 1;
301 break;
302 }
303 }
304 if (!found)
305 func(a, node);
306 }
159} 307}
160 308
161static unsigned int __init count_arcs(struct mdesc_elem *ep) 309static void notify_one(struct mdesc_notifier_client *p,
310 struct mdesc_handle *old_hp,
311 struct mdesc_handle *new_hp)
162{ 312{
163 unsigned int ret = 0; 313 invoke_on_missing(p->node_name, old_hp, new_hp, p->remove);
314 invoke_on_missing(p->node_name, new_hp, old_hp, p->add);
315}
164 316
165 ep++; 317static void mdesc_notify_clients(struct mdesc_handle *old_hp,
166 while (ep->tag != MD_NODE_END) { 318 struct mdesc_handle *new_hp)
167 if (ep->tag == MD_PROP_ARC) 319{
168 ret++; 320 struct mdesc_notifier_client *p = client_list;
169 ep++; 321
322 while (p) {
323 notify_one(p, old_hp, new_hp);
324 p = p->next;
170 } 325 }
171 return ret;
172} 326}
173 327
174static void __init mdesc_node_alloc(u64 node, struct mdesc_elem *ep, const char *names) 328void mdesc_update(void)
175{ 329{
176 unsigned int num_arcs = count_arcs(ep); 330 unsigned long len, real_len, status;
177 struct mdesc_node *mp; 331 struct mdesc_handle *hp, *orig_hp;
332 unsigned long flags;
333
334 mutex_lock(&mdesc_mutex);
335
336 (void) sun4v_mach_desc(0UL, 0UL, &len);
337
338 hp = mdesc_alloc(len, &kmalloc_mdesc_memops);
339 if (!hp) {
340 printk(KERN_ERR "MD: mdesc alloc fails\n");
341 goto out;
342 }
343
344 status = sun4v_mach_desc(__pa(&hp->mdesc), len, &real_len);
345 if (status != HV_EOK || real_len > len) {
346 printk(KERN_ERR "MD: mdesc reread fails with %lu\n",
347 status);
348 atomic_dec(&hp->refcnt);
349 mdesc_free(hp);
350 goto out;
351 }
352
353 spin_lock_irqsave(&mdesc_lock, flags);
354 orig_hp = cur_mdesc;
355 cur_mdesc = hp;
356 spin_unlock_irqrestore(&mdesc_lock, flags);
357
358 mdesc_notify_clients(orig_hp, hp);
178 359
179 mp = mdesc_early_alloc(sizeof(*mp) + 360 spin_lock_irqsave(&mdesc_lock, flags);
180 (num_arcs * sizeof(struct mdesc_arc))); 361 if (atomic_dec_and_test(&orig_hp->refcnt))
181 mp->name = names + ep->name_offset; 362 mdesc_free(orig_hp);
182 mp->node = node; 363 else
183 mp->unique_id = unique_id++; 364 list_add(&orig_hp->list, &mdesc_zombie_list);
184 mp->num_arcs = num_arcs; 365 spin_unlock_irqrestore(&mdesc_lock, flags);
185 366
186 hash_node(mp); 367out:
368 mutex_unlock(&mdesc_mutex);
187} 369}
188 370
189static inline struct mdesc_elem *node_block(struct mdesc_hdr *mdesc) 371static struct mdesc_elem *node_block(struct mdesc_hdr *mdesc)
190{ 372{
191 return (struct mdesc_elem *) (mdesc + 1); 373 return (struct mdesc_elem *) (mdesc + 1);
192} 374}
193 375
194static inline void *name_block(struct mdesc_hdr *mdesc) 376static void *name_block(struct mdesc_hdr *mdesc)
195{ 377{
196 return ((void *) node_block(mdesc)) + mdesc->node_sz; 378 return ((void *) node_block(mdesc)) + mdesc->node_sz;
197} 379}
198 380
199static inline void *data_block(struct mdesc_hdr *mdesc) 381static void *data_block(struct mdesc_hdr *mdesc)
200{ 382{
201 return ((void *) name_block(mdesc)) + mdesc->name_sz; 383 return ((void *) name_block(mdesc)) + mdesc->name_sz;
202} 384}
203 385
204/* In order to avoid recursion (the graph can be very deep) we use a 386u64 mdesc_node_by_name(struct mdesc_handle *hp,
205 * two pass algorithm. First we allocate all the nodes and hash them. 387 u64 from_node, const char *name)
206 * Then we iterate over each node, filling in the arcs and properties.
207 */
208static void __init build_all_nodes(struct mdesc_hdr *mdesc)
209{ 388{
210 struct mdesc_elem *start, *ep; 389 struct mdesc_elem *ep = node_block(&hp->mdesc);
211 struct mdesc_node *mp; 390 const char *names = name_block(&hp->mdesc);
212 const char *names; 391 u64 last_node = hp->mdesc.node_sz / 16;
213 void *data; 392 u64 ret;
214 u64 last_node; 393
394 if (from_node == MDESC_NODE_NULL) {
395 ret = from_node = 0;
396 } else if (from_node >= last_node) {
397 return MDESC_NODE_NULL;
398 } else {
399 ret = ep[from_node].d.val;
400 }
215 401
216 start = ep = node_block(mdesc); 402 while (ret < last_node) {
217 last_node = mdesc->node_sz / 16; 403 if (ep[ret].tag != MD_NODE)
404 return MDESC_NODE_NULL;
405 if (!strcmp(names + ep[ret].name_offset, name))
406 break;
407 ret = ep[ret].d.val;
408 }
409 if (ret >= last_node)
410 ret = MDESC_NODE_NULL;
411 return ret;
412}
413EXPORT_SYMBOL(mdesc_node_by_name);
218 414
219 names = name_block(mdesc); 415const void *mdesc_get_property(struct mdesc_handle *hp, u64 node,
416 const char *name, int *lenp)
417{
418 const char *names = name_block(&hp->mdesc);
419 u64 last_node = hp->mdesc.node_sz / 16;
420 void *data = data_block(&hp->mdesc);
421 struct mdesc_elem *ep;
220 422
221 while (1) { 423 if (node == MDESC_NODE_NULL || node >= last_node)
222 u64 node = ep - start; 424 return NULL;
223 425
224 if (ep->tag == MD_LIST_END) 426 ep = node_block(&hp->mdesc) + node;
427 ep++;
428 for (; ep->tag != MD_NODE_END; ep++) {
429 void *val = NULL;
430 int len = 0;
431
432 switch (ep->tag) {
433 case MD_PROP_VAL:
434 val = &ep->d.val;
435 len = 8;
225 break; 436 break;
226 437
227 if (ep->tag != MD_NODE) { 438 case MD_PROP_STR:
228 prom_printf("MDESC: Inconsistent element list.\n"); 439 case MD_PROP_DATA:
229 prom_halt(); 440 val = data + ep->d.data.data_offset;
230 } 441 len = ep->d.data.data_len;
231 442 break;
232 mdesc_node_alloc(node, ep, names);
233 443
234 if (ep->d.val >= last_node) { 444 default:
235 printk("MDESC: Warning, early break out of node scan.\n");
236 printk("MDESC: Next node [%lu] last_node [%lu].\n",
237 node, last_node);
238 break; 445 break;
239 } 446 }
447 if (!val)
448 continue;
240 449
241 ep = start + ep->d.val; 450 if (!strcmp(names + ep->name_offset, name)) {
451 if (lenp)
452 *lenp = len;
453 return val;
454 }
242 } 455 }
243 456
244 data = data_block(mdesc); 457 return NULL;
245 for (mp = allnodes; mp; mp = mp->allnodes_next) { 458}
246 struct mdesc_elem *ep = start + mp->node; 459EXPORT_SYMBOL(mdesc_get_property);
247 struct property **link = &mp->properties;
248 unsigned int this_arc = 0;
249
250 ep++;
251 while (ep->tag != MD_NODE_END) {
252 switch (ep->tag) {
253 case MD_PROP_ARC: {
254 struct mdesc_node *target;
255
256 if (this_arc >= mp->num_arcs) {
257 prom_printf("MDESC: ARC overrun [%u:%u]\n",
258 this_arc, mp->num_arcs);
259 prom_halt();
260 }
261 target = find_node(ep->d.val);
262 if (!target) {
263 printk("MDESC: Warning, arc points to "
264 "missing node, ignoring.\n");
265 break;
266 }
267 mp->arcs[this_arc].name =
268 (names + ep->name_offset);
269 mp->arcs[this_arc].arc = target;
270 this_arc++;
271 break;
272 }
273 460
274 case MD_PROP_VAL: 461u64 mdesc_next_arc(struct mdesc_handle *hp, u64 from, const char *arc_type)
275 case MD_PROP_STR: 462{
276 case MD_PROP_DATA: { 463 struct mdesc_elem *ep, *base = node_block(&hp->mdesc);
277 struct property *p = mdesc_early_alloc(sizeof(*p)); 464 const char *names = name_block(&hp->mdesc);
278 465 u64 last_node = hp->mdesc.node_sz / 16;
279 p->unique_id = unique_id++;
280 p->name = (char *) names + ep->name_offset;
281 if (ep->tag == MD_PROP_VAL) {
282 p->value = &ep->d.val;
283 p->length = 8;
284 } else {
285 p->value = data + ep->d.data.data_offset;
286 p->length = ep->d.data.data_len;
287 }
288 *link = p;
289 link = &p->next;
290 break;
291 }
292 466
293 case MD_NOOP: 467 if (from == MDESC_NODE_NULL || from >= last_node)
294 break; 468 return MDESC_NODE_NULL;
295 469
296 default: 470 ep = base + from;
297 printk("MDESC: Warning, ignoring unknown tag type %02x\n", 471
298 ep->tag); 472 ep++;
299 } 473 for (; ep->tag != MD_NODE_END; ep++) {
300 ep++; 474 if (ep->tag != MD_PROP_ARC)
301 } 475 continue;
476
477 if (strcmp(names + ep->name_offset, arc_type))
478 continue;
479
480 return ep - base;
302 } 481 }
482
483 return MDESC_NODE_NULL;
303} 484}
485EXPORT_SYMBOL(mdesc_next_arc);
304 486
305static unsigned int __init count_nodes(struct mdesc_hdr *mdesc) 487u64 mdesc_arc_target(struct mdesc_handle *hp, u64 arc)
306{ 488{
307 struct mdesc_elem *ep = node_block(mdesc); 489 struct mdesc_elem *ep, *base = node_block(&hp->mdesc);
308 struct mdesc_elem *end;
309 unsigned int cnt = 0;
310 490
311 end = ((void *)ep) + mdesc->node_sz; 491 ep = base + arc;
312 while (ep < end) { 492
313 if (ep->tag == MD_NODE) 493 return ep->d.val;
314 cnt++;
315 ep++;
316 }
317 return cnt;
318} 494}
495EXPORT_SYMBOL(mdesc_arc_target);
496
497const char *mdesc_node_name(struct mdesc_handle *hp, u64 node)
498{
499 struct mdesc_elem *ep, *base = node_block(&hp->mdesc);
500 const char *names = name_block(&hp->mdesc);
501 u64 last_node = hp->mdesc.node_sz / 16;
502
503 if (node == MDESC_NODE_NULL || node >= last_node)
504 return NULL;
505
506 ep = base + node;
507 if (ep->tag != MD_NODE)
508 return NULL;
509
510 return names + ep->name_offset;
511}
512EXPORT_SYMBOL(mdesc_node_name);
319 513
320static void __init report_platform_properties(void) 514static void __init report_platform_properties(void)
321{ 515{
322 struct mdesc_node *pn = md_find_node_by_name(NULL, "platform"); 516 struct mdesc_handle *hp = mdesc_grab();
517 u64 pn = mdesc_node_by_name(hp, MDESC_NODE_NULL, "platform");
323 const char *s; 518 const char *s;
324 const u64 *v; 519 const u64 *v;
325 520
326 if (!pn) { 521 if (pn == MDESC_NODE_NULL) {
327 prom_printf("No platform node in machine-description.\n"); 522 prom_printf("No platform node in machine-description.\n");
328 prom_halt(); 523 prom_halt();
329 } 524 }
330 525
331 s = md_get_property(pn, "banner-name", NULL); 526 s = mdesc_get_property(hp, pn, "banner-name", NULL);
332 printk("PLATFORM: banner-name [%s]\n", s); 527 printk("PLATFORM: banner-name [%s]\n", s);
333 s = md_get_property(pn, "name", NULL); 528 s = mdesc_get_property(hp, pn, "name", NULL);
334 printk("PLATFORM: name [%s]\n", s); 529 printk("PLATFORM: name [%s]\n", s);
335 530
336 v = md_get_property(pn, "hostid", NULL); 531 v = mdesc_get_property(hp, pn, "hostid", NULL);
337 if (v) 532 if (v)
338 printk("PLATFORM: hostid [%08lx]\n", *v); 533 printk("PLATFORM: hostid [%08lx]\n", *v);
339 v = md_get_property(pn, "serial#", NULL); 534 v = mdesc_get_property(hp, pn, "serial#", NULL);
340 if (v) 535 if (v)
341 printk("PLATFORM: serial# [%08lx]\n", *v); 536 printk("PLATFORM: serial# [%08lx]\n", *v);
342 v = md_get_property(pn, "stick-frequency", NULL); 537 v = mdesc_get_property(hp, pn, "stick-frequency", NULL);
343 printk("PLATFORM: stick-frequency [%08lx]\n", *v); 538 printk("PLATFORM: stick-frequency [%08lx]\n", *v);
344 v = md_get_property(pn, "mac-address", NULL); 539 v = mdesc_get_property(hp, pn, "mac-address", NULL);
345 if (v) 540 if (v)
346 printk("PLATFORM: mac-address [%lx]\n", *v); 541 printk("PLATFORM: mac-address [%lx]\n", *v);
347 v = md_get_property(pn, "watchdog-resolution", NULL); 542 v = mdesc_get_property(hp, pn, "watchdog-resolution", NULL);
348 if (v) 543 if (v)
349 printk("PLATFORM: watchdog-resolution [%lu ms]\n", *v); 544 printk("PLATFORM: watchdog-resolution [%lu ms]\n", *v);
350 v = md_get_property(pn, "watchdog-max-timeout", NULL); 545 v = mdesc_get_property(hp, pn, "watchdog-max-timeout", NULL);
351 if (v) 546 if (v)
352 printk("PLATFORM: watchdog-max-timeout [%lu ms]\n", *v); 547 printk("PLATFORM: watchdog-max-timeout [%lu ms]\n", *v);
353 v = md_get_property(pn, "max-cpus", NULL); 548 v = mdesc_get_property(hp, pn, "max-cpus", NULL);
354 if (v) 549 if (v)
355 printk("PLATFORM: max-cpus [%lu]\n", *v); 550 printk("PLATFORM: max-cpus [%lu]\n", *v);
551
552#ifdef CONFIG_SMP
553 {
554 int max_cpu, i;
555
556 if (v) {
557 max_cpu = *v;
558 if (max_cpu > NR_CPUS)
559 max_cpu = NR_CPUS;
560 } else {
561 max_cpu = NR_CPUS;
562 }
563 for (i = 0; i < max_cpu; i++)
564 cpu_set(i, cpu_possible_map);
565 }
566#endif
567
568 mdesc_release(hp);
356} 569}
357 570
358static int inline find_in_proplist(const char *list, const char *match, int len) 571static int inline find_in_proplist(const char *list, const char *match, int len)
@@ -369,15 +582,17 @@ static int inline find_in_proplist(const char *list, const char *match, int len)
369 return 0; 582 return 0;
370} 583}
371 584
372static void __init fill_in_one_cache(cpuinfo_sparc *c, struct mdesc_node *mp) 585static void __devinit fill_in_one_cache(cpuinfo_sparc *c,
586 struct mdesc_handle *hp,
587 u64 mp)
373{ 588{
374 const u64 *level = md_get_property(mp, "level", NULL); 589 const u64 *level = mdesc_get_property(hp, mp, "level", NULL);
375 const u64 *size = md_get_property(mp, "size", NULL); 590 const u64 *size = mdesc_get_property(hp, mp, "size", NULL);
376 const u64 *line_size = md_get_property(mp, "line-size", NULL); 591 const u64 *line_size = mdesc_get_property(hp, mp, "line-size", NULL);
377 const char *type; 592 const char *type;
378 int type_len; 593 int type_len;
379 594
380 type = md_get_property(mp, "type", &type_len); 595 type = mdesc_get_property(hp, mp, "type", &type_len);
381 596
382 switch (*level) { 597 switch (*level) {
383 case 1: 598 case 1:
@@ -400,48 +615,45 @@ static void __init fill_in_one_cache(cpuinfo_sparc *c, struct mdesc_node *mp)
400 } 615 }
401 616
402 if (*level == 1) { 617 if (*level == 1) {
403 unsigned int i; 618 u64 a;
404
405 for (i = 0; i < mp->num_arcs; i++) {
406 struct mdesc_node *t = mp->arcs[i].arc;
407 619
408 if (strcmp(mp->arcs[i].name, "fwd")) 620 mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_FWD) {
409 continue; 621 u64 target = mdesc_arc_target(hp, a);
622 const char *name = mdesc_node_name(hp, target);
410 623
411 if (!strcmp(t->name, "cache")) 624 if (!strcmp(name, "cache"))
412 fill_in_one_cache(c, t); 625 fill_in_one_cache(c, hp, target);
413 } 626 }
414 } 627 }
415} 628}
416 629
417static void __init mark_core_ids(struct mdesc_node *mp, int core_id) 630static void __devinit mark_core_ids(struct mdesc_handle *hp, u64 mp,
631 int core_id)
418{ 632{
419 unsigned int i; 633 u64 a;
420 634
421 for (i = 0; i < mp->num_arcs; i++) { 635 mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_BACK) {
422 struct mdesc_node *t = mp->arcs[i].arc; 636 u64 t = mdesc_arc_target(hp, a);
637 const char *name;
423 const u64 *id; 638 const u64 *id;
424 639
425 if (strcmp(mp->arcs[i].name, "back")) 640 name = mdesc_node_name(hp, t);
426 continue; 641 if (!strcmp(name, "cpu")) {
427 642 id = mdesc_get_property(hp, t, "id", NULL);
428 if (!strcmp(t->name, "cpu")) {
429 id = md_get_property(t, "id", NULL);
430 if (*id < NR_CPUS) 643 if (*id < NR_CPUS)
431 cpu_data(*id).core_id = core_id; 644 cpu_data(*id).core_id = core_id;
432 } else { 645 } else {
433 unsigned int j; 646 u64 j;
434 647
435 for (j = 0; j < t->num_arcs; j++) { 648 mdesc_for_each_arc(j, hp, t, MDESC_ARC_TYPE_BACK) {
436 struct mdesc_node *n = t->arcs[j].arc; 649 u64 n = mdesc_arc_target(hp, j);
650 const char *n_name;
437 651
438 if (strcmp(t->arcs[j].name, "back")) 652 n_name = mdesc_node_name(hp, n);
653 if (strcmp(n_name, "cpu"))
439 continue; 654 continue;
440 655
441 if (strcmp(n->name, "cpu")) 656 id = mdesc_get_property(hp, n, "id", NULL);
442 continue;
443
444 id = md_get_property(n, "id", NULL);
445 if (*id < NR_CPUS) 657 if (*id < NR_CPUS)
446 cpu_data(*id).core_id = core_id; 658 cpu_data(*id).core_id = core_id;
447 } 659 }
@@ -449,31 +661,81 @@ static void __init mark_core_ids(struct mdesc_node *mp, int core_id)
449 } 661 }
450} 662}
451 663
452static void __init set_core_ids(void) 664static void __devinit set_core_ids(struct mdesc_handle *hp)
453{ 665{
454 struct mdesc_node *mp;
455 int idx; 666 int idx;
667 u64 mp;
456 668
457 idx = 1; 669 idx = 1;
458 md_for_each_node_by_name(mp, "cache") { 670 mdesc_for_each_node_by_name(hp, mp, "cache") {
459 const u64 *level = md_get_property(mp, "level", NULL); 671 const u64 *level;
460 const char *type; 672 const char *type;
461 int len; 673 int len;
462 674
675 level = mdesc_get_property(hp, mp, "level", NULL);
463 if (*level != 1) 676 if (*level != 1)
464 continue; 677 continue;
465 678
466 type = md_get_property(mp, "type", &len); 679 type = mdesc_get_property(hp, mp, "type", &len);
467 if (!find_in_proplist(type, "instn", len)) 680 if (!find_in_proplist(type, "instn", len))
468 continue; 681 continue;
469 682
470 mark_core_ids(mp, idx); 683 mark_core_ids(hp, mp, idx);
684
685 idx++;
686 }
687}
688
689static void __devinit mark_proc_ids(struct mdesc_handle *hp, u64 mp,
690 int proc_id)
691{
692 u64 a;
693
694 mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_BACK) {
695 u64 t = mdesc_arc_target(hp, a);
696 const char *name;
697 const u64 *id;
698
699 name = mdesc_node_name(hp, t);
700 if (strcmp(name, "cpu"))
701 continue;
702
703 id = mdesc_get_property(hp, t, "id", NULL);
704 if (*id < NR_CPUS)
705 cpu_data(*id).proc_id = proc_id;
706 }
707}
708
709static void __devinit __set_proc_ids(struct mdesc_handle *hp,
710 const char *exec_unit_name)
711{
712 int idx;
713 u64 mp;
714
715 idx = 0;
716 mdesc_for_each_node_by_name(hp, mp, exec_unit_name) {
717 const char *type;
718 int len;
719
720 type = mdesc_get_property(hp, mp, "type", &len);
721 if (!find_in_proplist(type, "int", len) &&
722 !find_in_proplist(type, "integer", len))
723 continue;
724
725 mark_proc_ids(hp, mp, idx);
471 726
472 idx++; 727 idx++;
473 } 728 }
474} 729}
475 730
476static void __init get_one_mondo_bits(const u64 *p, unsigned int *mask, unsigned char def) 731static void __devinit set_proc_ids(struct mdesc_handle *hp)
732{
733 __set_proc_ids(hp, "exec_unit");
734 __set_proc_ids(hp, "exec-unit");
735}
736
737static void __devinit get_one_mondo_bits(const u64 *p, unsigned int *mask,
738 unsigned char def)
477{ 739{
478 u64 val; 740 u64 val;
479 741
@@ -491,35 +753,37 @@ use_default:
491 *mask = ((1U << def) * 64U) - 1U; 753 *mask = ((1U << def) * 64U) - 1U;
492} 754}
493 755
494static void __init get_mondo_data(struct mdesc_node *mp, struct trap_per_cpu *tb) 756static void __devinit get_mondo_data(struct mdesc_handle *hp, u64 mp,
757 struct trap_per_cpu *tb)
495{ 758{
496 const u64 *val; 759 const u64 *val;
497 760
498 val = md_get_property(mp, "q-cpu-mondo-#bits", NULL); 761 val = mdesc_get_property(hp, mp, "q-cpu-mondo-#bits", NULL);
499 get_one_mondo_bits(val, &tb->cpu_mondo_qmask, 7); 762 get_one_mondo_bits(val, &tb->cpu_mondo_qmask, 7);
500 763
501 val = md_get_property(mp, "q-dev-mondo-#bits", NULL); 764 val = mdesc_get_property(hp, mp, "q-dev-mondo-#bits", NULL);
502 get_one_mondo_bits(val, &tb->dev_mondo_qmask, 7); 765 get_one_mondo_bits(val, &tb->dev_mondo_qmask, 7);
503 766
504 val = md_get_property(mp, "q-resumable-#bits", NULL); 767 val = mdesc_get_property(hp, mp, "q-resumable-#bits", NULL);
505 get_one_mondo_bits(val, &tb->resum_qmask, 6); 768 get_one_mondo_bits(val, &tb->resum_qmask, 6);
506 769
507 val = md_get_property(mp, "q-nonresumable-#bits", NULL); 770 val = mdesc_get_property(hp, mp, "q-nonresumable-#bits", NULL);
508 get_one_mondo_bits(val, &tb->nonresum_qmask, 2); 771 get_one_mondo_bits(val, &tb->nonresum_qmask, 2);
509} 772}
510 773
511static void __init mdesc_fill_in_cpu_data(void) 774void __devinit mdesc_fill_in_cpu_data(cpumask_t mask)
512{ 775{
513 struct mdesc_node *mp; 776 struct mdesc_handle *hp = mdesc_grab();
777 u64 mp;
514 778
515 ncpus_probed = 0; 779 ncpus_probed = 0;
516 md_for_each_node_by_name(mp, "cpu") { 780 mdesc_for_each_node_by_name(hp, mp, "cpu") {
517 const u64 *id = md_get_property(mp, "id", NULL); 781 const u64 *id = mdesc_get_property(hp, mp, "id", NULL);
518 const u64 *cfreq = md_get_property(mp, "clock-frequency", NULL); 782 const u64 *cfreq = mdesc_get_property(hp, mp, "clock-frequency", NULL);
519 struct trap_per_cpu *tb; 783 struct trap_per_cpu *tb;
520 cpuinfo_sparc *c; 784 cpuinfo_sparc *c;
521 unsigned int i;
522 int cpuid; 785 int cpuid;
786 u64 a;
523 787
524 ncpus_probed++; 788 ncpus_probed++;
525 789
@@ -528,6 +792,8 @@ static void __init mdesc_fill_in_cpu_data(void)
528#ifdef CONFIG_SMP 792#ifdef CONFIG_SMP
529 if (cpuid >= NR_CPUS) 793 if (cpuid >= NR_CPUS)
530 continue; 794 continue;
795 if (!cpu_isset(cpuid, mask))
796 continue;
531#else 797#else
532 /* On uniprocessor we only want the values for the 798 /* On uniprocessor we only want the values for the
533 * real physical cpu the kernel booted onto, however 799 * real physical cpu the kernel booted onto, however
@@ -542,78 +808,77 @@ static void __init mdesc_fill_in_cpu_data(void)
542 c->clock_tick = *cfreq; 808 c->clock_tick = *cfreq;
543 809
544 tb = &trap_block[cpuid]; 810 tb = &trap_block[cpuid];
545 get_mondo_data(mp, tb); 811 get_mondo_data(hp, mp, tb);
546 812
547 for (i = 0; i < mp->num_arcs; i++) { 813 mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_FWD) {
548 struct mdesc_node *t = mp->arcs[i].arc; 814 u64 j, t = mdesc_arc_target(hp, a);
549 unsigned int j; 815 const char *t_name;
550 816
551 if (strcmp(mp->arcs[i].name, "fwd")) 817 t_name = mdesc_node_name(hp, t);
552 continue; 818 if (!strcmp(t_name, "cache")) {
553 819 fill_in_one_cache(c, hp, t);
554 if (!strcmp(t->name, "cache")) {
555 fill_in_one_cache(c, t);
556 continue; 820 continue;
557 } 821 }
558 822
559 for (j = 0; j < t->num_arcs; j++) { 823 mdesc_for_each_arc(j, hp, t, MDESC_ARC_TYPE_FWD) {
560 struct mdesc_node *n; 824 u64 n = mdesc_arc_target(hp, j);
825 const char *n_name;
561 826
562 n = t->arcs[j].arc; 827 n_name = mdesc_node_name(hp, n);
563 if (strcmp(t->arcs[j].name, "fwd")) 828 if (!strcmp(n_name, "cache"))
564 continue; 829 fill_in_one_cache(c, hp, n);
565
566 if (!strcmp(n->name, "cache"))
567 fill_in_one_cache(c, n);
568 } 830 }
569 } 831 }
570 832
571#ifdef CONFIG_SMP 833#ifdef CONFIG_SMP
572 cpu_set(cpuid, cpu_present_map); 834 cpu_set(cpuid, cpu_present_map);
573 cpu_set(cpuid, phys_cpu_present_map);
574#endif 835#endif
575 836
576 c->core_id = 0; 837 c->core_id = 0;
838 c->proc_id = -1;
577 } 839 }
578 840
579 set_core_ids(); 841#ifdef CONFIG_SMP
842 sparc64_multi_core = 1;
843#endif
844
845 set_core_ids(hp);
846 set_proc_ids(hp);
580 847
581 smp_fill_in_sib_core_maps(); 848 smp_fill_in_sib_core_maps();
849
850 mdesc_release(hp);
582} 851}
583 852
584void __init sun4v_mdesc_init(void) 853void __init sun4v_mdesc_init(void)
585{ 854{
855 struct mdesc_handle *hp;
586 unsigned long len, real_len, status; 856 unsigned long len, real_len, status;
857 cpumask_t mask;
587 858
588 (void) sun4v_mach_desc(0UL, 0UL, &len); 859 (void) sun4v_mach_desc(0UL, 0UL, &len);
589 860
590 printk("MDESC: Size is %lu bytes.\n", len); 861 printk("MDESC: Size is %lu bytes.\n", len);
591 862
592 main_mdesc = mdesc_early_alloc(len); 863 hp = mdesc_alloc(len, &bootmem_mdesc_ops);
864 if (hp == NULL) {
865 prom_printf("MDESC: alloc of %lu bytes failed.\n", len);
866 prom_halt();
867 }
593 868
594 status = sun4v_mach_desc(__pa(main_mdesc), len, &real_len); 869 status = sun4v_mach_desc(__pa(&hp->mdesc), len, &real_len);
595 if (status != HV_EOK || real_len > len) { 870 if (status != HV_EOK || real_len > len) {
596 prom_printf("sun4v_mach_desc fails, err(%lu), " 871 prom_printf("sun4v_mach_desc fails, err(%lu), "
597 "len(%lu), real_len(%lu)\n", 872 "len(%lu), real_len(%lu)\n",
598 status, len, real_len); 873 status, len, real_len);
874 mdesc_free(hp);
599 prom_halt(); 875 prom_halt();
600 } 876 }
601 877
602 len = count_nodes(main_mdesc); 878 cur_mdesc = hp;
603 printk("MDESC: %lu nodes.\n", len);
604
605 len = roundup_pow_of_two(len);
606
607 mdesc_hash = mdesc_early_alloc(len * sizeof(struct mdesc_node *));
608 mdesc_hash_size = len;
609
610 printk("MDESC: Hash size %lu entries.\n", len);
611
612 build_all_nodes(main_mdesc);
613
614 printk("MDESC: Built graph with %u bytes of memory.\n",
615 mdesc_early_allocated);
616 879
617 report_platform_properties(); 880 report_platform_properties();
618 mdesc_fill_in_cpu_data(); 881
882 cpus_setall(mask);
883 mdesc_fill_in_cpu_data(mask);
619} 884}
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
index 16cc46a71872..4cc77485f536 100644
--- a/arch/sparc64/kernel/of_device.c
+++ b/arch/sparc64/kernel/of_device.c
@@ -1,132 +1,13 @@
1#include <linux/string.h> 1#include <linux/string.h>
2#include <linux/kernel.h> 2#include <linux/kernel.h>
3#include <linux/of.h>
3#include <linux/init.h> 4#include <linux/init.h>
4#include <linux/module.h> 5#include <linux/module.h>
5#include <linux/mod_devicetable.h> 6#include <linux/mod_devicetable.h>
6#include <linux/slab.h> 7#include <linux/slab.h>
7 8#include <linux/errno.h>
8#include <asm/errno.h> 9#include <linux/of_device.h>
9#include <asm/of_device.h> 10#include <linux/of_platform.h>
10
11/**
12 * of_match_device - Tell if an of_device structure has a matching
13 * of_match structure
14 * @ids: array of of device match structures to search in
15 * @dev: the of device structure to match against
16 *
17 * Used by a driver to check whether an of_device present in the
18 * system is in its list of supported devices.
19 */
20const struct of_device_id *of_match_device(const struct of_device_id *matches,
21 const struct of_device *dev)
22{
23 if (!dev->node)
24 return NULL;
25 while (matches->name[0] || matches->type[0] || matches->compatible[0]) {
26 int match = 1;
27 if (matches->name[0])
28 match &= dev->node->name
29 && !strcmp(matches->name, dev->node->name);
30 if (matches->type[0])
31 match &= dev->node->type
32 && !strcmp(matches->type, dev->node->type);
33 if (matches->compatible[0])
34 match &= of_device_is_compatible(dev->node,
35 matches->compatible);
36 if (match)
37 return matches;
38 matches++;
39 }
40 return NULL;
41}
42
43static int of_platform_bus_match(struct device *dev, struct device_driver *drv)
44{
45 struct of_device * of_dev = to_of_device(dev);
46 struct of_platform_driver * of_drv = to_of_platform_driver(drv);
47 const struct of_device_id * matches = of_drv->match_table;
48
49 if (!matches)
50 return 0;
51
52 return of_match_device(matches, of_dev) != NULL;
53}
54
55struct of_device *of_dev_get(struct of_device *dev)
56{
57 struct device *tmp;
58
59 if (!dev)
60 return NULL;
61 tmp = get_device(&dev->dev);
62 if (tmp)
63 return to_of_device(tmp);
64 else
65 return NULL;
66}
67
68void of_dev_put(struct of_device *dev)
69{
70 if (dev)
71 put_device(&dev->dev);
72}
73
74
75static int of_device_probe(struct device *dev)
76{
77 int error = -ENODEV;
78 struct of_platform_driver *drv;
79 struct of_device *of_dev;
80 const struct of_device_id *match;
81
82 drv = to_of_platform_driver(dev->driver);
83 of_dev = to_of_device(dev);
84
85 if (!drv->probe)
86 return error;
87
88 of_dev_get(of_dev);
89
90 match = of_match_device(drv->match_table, of_dev);
91 if (match)
92 error = drv->probe(of_dev, match);
93 if (error)
94 of_dev_put(of_dev);
95
96 return error;
97}
98
99static int of_device_remove(struct device *dev)
100{
101 struct of_device * of_dev = to_of_device(dev);
102 struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
103
104 if (dev->driver && drv->remove)
105 drv->remove(of_dev);
106 return 0;
107}
108
109static int of_device_suspend(struct device *dev, pm_message_t state)
110{
111 struct of_device * of_dev = to_of_device(dev);
112 struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
113 int error = 0;
114
115 if (dev->driver && drv->suspend)
116 error = drv->suspend(of_dev, state);
117 return error;
118}
119
120static int of_device_resume(struct device * dev)
121{
122 struct of_device * of_dev = to_of_device(dev);
123 struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
124 int error = 0;
125
126 if (dev->driver && drv->resume)
127 error = drv->resume(of_dev);
128 return error;
129}
130 11
131void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name) 12void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name)
132{ 13{
@@ -163,7 +44,7 @@ static int node_match(struct device *dev, void *data)
163 44
164struct of_device *of_find_device_by_node(struct device_node *dp) 45struct of_device *of_find_device_by_node(struct device_node *dp)
165{ 46{
166 struct device *dev = bus_find_device(&of_bus_type, NULL, 47 struct device *dev = bus_find_device(&of_platform_bus_type, NULL,
167 dp, node_match); 48 dp, node_match);
168 49
169 if (dev) 50 if (dev)
@@ -174,48 +55,20 @@ struct of_device *of_find_device_by_node(struct device_node *dp)
174EXPORT_SYMBOL(of_find_device_by_node); 55EXPORT_SYMBOL(of_find_device_by_node);
175 56
176#ifdef CONFIG_PCI 57#ifdef CONFIG_PCI
177struct bus_type isa_bus_type = { 58struct bus_type isa_bus_type;
178 .name = "isa",
179 .match = of_platform_bus_match,
180 .probe = of_device_probe,
181 .remove = of_device_remove,
182 .suspend = of_device_suspend,
183 .resume = of_device_resume,
184};
185EXPORT_SYMBOL(isa_bus_type); 59EXPORT_SYMBOL(isa_bus_type);
186 60
187struct bus_type ebus_bus_type = { 61struct bus_type ebus_bus_type;
188 .name = "ebus",
189 .match = of_platform_bus_match,
190 .probe = of_device_probe,
191 .remove = of_device_remove,
192 .suspend = of_device_suspend,
193 .resume = of_device_resume,
194};
195EXPORT_SYMBOL(ebus_bus_type); 62EXPORT_SYMBOL(ebus_bus_type);
196#endif 63#endif
197 64
198#ifdef CONFIG_SBUS 65#ifdef CONFIG_SBUS
199struct bus_type sbus_bus_type = { 66struct bus_type sbus_bus_type;
200 .name = "sbus",
201 .match = of_platform_bus_match,
202 .probe = of_device_probe,
203 .remove = of_device_remove,
204 .suspend = of_device_suspend,
205 .resume = of_device_resume,
206};
207EXPORT_SYMBOL(sbus_bus_type); 67EXPORT_SYMBOL(sbus_bus_type);
208#endif 68#endif
209 69
210struct bus_type of_bus_type = { 70struct bus_type of_platform_bus_type;
211 .name = "of", 71EXPORT_SYMBOL(of_platform_bus_type);
212 .match = of_platform_bus_match,
213 .probe = of_device_probe,
214 .remove = of_device_remove,
215 .suspend = of_device_suspend,
216 .resume = of_device_resume,
217};
218EXPORT_SYMBOL(of_bus_type);
219 72
220static inline u64 of_read_addr(const u32 *cell, int size) 73static inline u64 of_read_addr(const u32 *cell, int size)
221{ 74{
@@ -343,6 +196,15 @@ static int of_bus_simba_match(struct device_node *np)
343 196
344 if (model && !strcmp(model, "SUNW,simba")) 197 if (model && !strcmp(model, "SUNW,simba"))
345 return 1; 198 return 1;
199
200 /* Treat PCI busses lacking ranges property just like
201 * simba.
202 */
203 if (!strcmp(np->type, "pci") || !strcmp(np->type, "pciex")) {
204 if (!of_find_property(np, "ranges", NULL))
205 return 1;
206 }
207
346 return 0; 208 return 0;
347} 209}
348 210
@@ -549,8 +411,6 @@ static int __init build_one_resource(struct device_node *parent,
549 411
550static int __init use_1to1_mapping(struct device_node *pp) 412static int __init use_1to1_mapping(struct device_node *pp)
551{ 413{
552 const char *model;
553
554 /* If this is on the PMU bus, don't try to translate it even 414 /* If this is on the PMU bus, don't try to translate it even
555 * if a ranges property exists. 415 * if a ranges property exists.
556 */ 416 */
@@ -567,9 +427,11 @@ static int __init use_1to1_mapping(struct device_node *pp)
567 if (!strcmp(pp->name, "dma")) 427 if (!strcmp(pp->name, "dma"))
568 return 0; 428 return 0;
569 429
570 /* Similarly for Simba PCI bridges. */ 430 /* Similarly for all PCI bridges, if we get this far
571 model = of_get_property(pp, "model", NULL); 431 * it lacks a ranges property, and this will include
572 if (model && !strcmp(model, "SUNW,simba")) 432 * cases like Simba.
433 */
434 if (!strcmp(pp->type, "pci") || !strcmp(pp->type, "pciex"))
573 return 0; 435 return 0;
574 436
575 return 1; 437 return 1;
@@ -890,11 +752,16 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
890{ 752{
891 struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL); 753 struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL);
892 const unsigned int *irq; 754 const unsigned int *irq;
755 struct dev_archdata *sd;
893 int len, i; 756 int len, i;
894 757
895 if (!op) 758 if (!op)
896 return NULL; 759 return NULL;
897 760
761 sd = &op->dev.archdata;
762 sd->prom_node = dp;
763 sd->op = op;
764
898 op->node = dp; 765 op->node = dp;
899 766
900 op->clock_freq = of_getintprop_default(dp, "clock-frequency", 767 op->clock_freq = of_getintprop_default(dp, "clock-frequency",
@@ -924,7 +791,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
924 op->irqs[i] = build_one_device_irq(op, parent, op->irqs[i]); 791 op->irqs[i] = build_one_device_irq(op, parent, op->irqs[i]);
925 792
926 op->dev.parent = parent; 793 op->dev.parent = parent;
927 op->dev.bus = &of_bus_type; 794 op->dev.bus = &of_platform_bus_type;
928 if (!parent) 795 if (!parent)
929 strcpy(op->dev.bus_id, "root"); 796 strcpy(op->dev.bus_id, "root");
930 else 797 else
@@ -968,16 +835,16 @@ static int __init of_bus_driver_init(void)
968{ 835{
969 int err; 836 int err;
970 837
971 err = bus_register(&of_bus_type); 838 err = of_bus_type_init(&of_platform_bus_type, "of");
972#ifdef CONFIG_PCI 839#ifdef CONFIG_PCI
973 if (!err) 840 if (!err)
974 err = bus_register(&isa_bus_type); 841 err = of_bus_type_init(&isa_bus_type, "isa");
975 if (!err) 842 if (!err)
976 err = bus_register(&ebus_bus_type); 843 err = of_bus_type_init(&ebus_bus_type, "ebus");
977#endif 844#endif
978#ifdef CONFIG_SBUS 845#ifdef CONFIG_SBUS
979 if (!err) 846 if (!err)
980 err = bus_register(&sbus_bus_type); 847 err = of_bus_type_init(&sbus_bus_type, "sbus");
981#endif 848#endif
982 849
983 if (!err) 850 if (!err)
@@ -1011,61 +878,13 @@ int of_register_driver(struct of_platform_driver *drv, struct bus_type *bus)
1011 /* register with core */ 878 /* register with core */
1012 return driver_register(&drv->driver); 879 return driver_register(&drv->driver);
1013} 880}
881EXPORT_SYMBOL(of_register_driver);
1014 882
1015void of_unregister_driver(struct of_platform_driver *drv) 883void of_unregister_driver(struct of_platform_driver *drv)
1016{ 884{
1017 driver_unregister(&drv->driver); 885 driver_unregister(&drv->driver);
1018} 886}
1019 887EXPORT_SYMBOL(of_unregister_driver);
1020
1021static ssize_t dev_show_devspec(struct device *dev, struct device_attribute *attr, char *buf)
1022{
1023 struct of_device *ofdev;
1024
1025 ofdev = to_of_device(dev);
1026 return sprintf(buf, "%s", ofdev->node->full_name);
1027}
1028
1029static DEVICE_ATTR(devspec, S_IRUGO, dev_show_devspec, NULL);
1030
1031/**
1032 * of_release_dev - free an of device structure when all users of it are finished.
1033 * @dev: device that's been disconnected
1034 *
1035 * Will be called only by the device core when all users of this of device are
1036 * done.
1037 */
1038void of_release_dev(struct device *dev)
1039{
1040 struct of_device *ofdev;
1041
1042 ofdev = to_of_device(dev);
1043
1044 kfree(ofdev);
1045}
1046
1047int of_device_register(struct of_device *ofdev)
1048{
1049 int rc;
1050
1051 BUG_ON(ofdev->node == NULL);
1052
1053 rc = device_register(&ofdev->dev);
1054 if (rc)
1055 return rc;
1056
1057 rc = device_create_file(&ofdev->dev, &dev_attr_devspec);
1058 if (rc)
1059 device_unregister(&ofdev->dev);
1060
1061 return rc;
1062}
1063
1064void of_device_unregister(struct of_device *ofdev)
1065{
1066 device_remove_file(&ofdev->dev, &dev_attr_devspec);
1067 device_unregister(&ofdev->dev);
1068}
1069 888
1070struct of_device* of_platform_device_create(struct device_node *np, 889struct of_device* of_platform_device_create(struct device_node *np,
1071 const char *bus_id, 890 const char *bus_id,
@@ -1091,13 +910,4 @@ struct of_device* of_platform_device_create(struct device_node *np,
1091 910
1092 return dev; 911 return dev;
1093} 912}
1094
1095EXPORT_SYMBOL(of_match_device);
1096EXPORT_SYMBOL(of_register_driver);
1097EXPORT_SYMBOL(of_unregister_driver);
1098EXPORT_SYMBOL(of_device_register);
1099EXPORT_SYMBOL(of_device_unregister);
1100EXPORT_SYMBOL(of_dev_get);
1101EXPORT_SYMBOL(of_dev_put);
1102EXPORT_SYMBOL(of_platform_device_create); 913EXPORT_SYMBOL(of_platform_device_create);
1103EXPORT_SYMBOL(of_release_dev);
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index 38a32bc95d22..55ad1b899bb8 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -448,6 +448,7 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
448 */ 448 */
449 pci_read_config_dword(dev, PCI_CLASS_REVISION, &class); 449 pci_read_config_dword(dev, PCI_CLASS_REVISION, &class);
450 dev->class = class >> 8; 450 dev->class = class >> 8;
451 dev->revision = class & 0xff;
451 452
452 sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), 453 sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus),
453 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); 454 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
@@ -522,6 +523,89 @@ static void pci_resource_adjust(struct resource *res,
522 res->end += root->start; 523 res->end += root->start;
523} 524}
524 525
526/* For PCI bus devices which lack a 'ranges' property we interrogate
527 * the config space values to set the resources, just like the generic
528 * Linux PCI probing code does.
529 */
530static void __devinit pci_cfg_fake_ranges(struct pci_dev *dev,
531 struct pci_bus *bus,
532 struct pci_pbm_info *pbm)
533{
534 struct resource *res;
535 u8 io_base_lo, io_limit_lo;
536 u16 mem_base_lo, mem_limit_lo;
537 unsigned long base, limit;
538
539 pci_read_config_byte(dev, PCI_IO_BASE, &io_base_lo);
540 pci_read_config_byte(dev, PCI_IO_LIMIT, &io_limit_lo);
541 base = (io_base_lo & PCI_IO_RANGE_MASK) << 8;
542 limit = (io_limit_lo & PCI_IO_RANGE_MASK) << 8;
543
544 if ((io_base_lo & PCI_IO_RANGE_TYPE_MASK) == PCI_IO_RANGE_TYPE_32) {
545 u16 io_base_hi, io_limit_hi;
546
547 pci_read_config_word(dev, PCI_IO_BASE_UPPER16, &io_base_hi);
548 pci_read_config_word(dev, PCI_IO_LIMIT_UPPER16, &io_limit_hi);
549 base |= (io_base_hi << 16);
550 limit |= (io_limit_hi << 16);
551 }
552
553 res = bus->resource[0];
554 if (base <= limit) {
555 res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) | IORESOURCE_IO;
556 if (!res->start)
557 res->start = base;
558 if (!res->end)
559 res->end = limit + 0xfff;
560 pci_resource_adjust(res, &pbm->io_space);
561 }
562
563 pci_read_config_word(dev, PCI_MEMORY_BASE, &mem_base_lo);
564 pci_read_config_word(dev, PCI_MEMORY_LIMIT, &mem_limit_lo);
565 base = (mem_base_lo & PCI_MEMORY_RANGE_MASK) << 16;
566 limit = (mem_limit_lo & PCI_MEMORY_RANGE_MASK) << 16;
567
568 res = bus->resource[1];
569 if (base <= limit) {
570 res->flags = ((mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) |
571 IORESOURCE_MEM);
572 res->start = base;
573 res->end = limit + 0xfffff;
574 pci_resource_adjust(res, &pbm->mem_space);
575 }
576
577 pci_read_config_word(dev, PCI_PREF_MEMORY_BASE, &mem_base_lo);
578 pci_read_config_word(dev, PCI_PREF_MEMORY_LIMIT, &mem_limit_lo);
579 base = (mem_base_lo & PCI_PREF_RANGE_MASK) << 16;
580 limit = (mem_limit_lo & PCI_PREF_RANGE_MASK) << 16;
581
582 if ((mem_base_lo & PCI_PREF_RANGE_TYPE_MASK) == PCI_PREF_RANGE_TYPE_64) {
583 u32 mem_base_hi, mem_limit_hi;
584
585 pci_read_config_dword(dev, PCI_PREF_BASE_UPPER32, &mem_base_hi);
586 pci_read_config_dword(dev, PCI_PREF_LIMIT_UPPER32, &mem_limit_hi);
587
588 /*
589 * Some bridges set the base > limit by default, and some
590 * (broken) BIOSes do not initialize them. If we find
591 * this, just assume they are not being used.
592 */
593 if (mem_base_hi <= mem_limit_hi) {
594 base |= ((long) mem_base_hi) << 32;
595 limit |= ((long) mem_limit_hi) << 32;
596 }
597 }
598
599 res = bus->resource[2];
600 if (base <= limit) {
601 res->flags = ((mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) |
602 IORESOURCE_MEM | IORESOURCE_PREFETCH);
603 res->start = base;
604 res->end = limit + 0xfffff;
605 pci_resource_adjust(res, &pbm->mem_space);
606 }
607}
608
525/* Cook up fake bus resources for SUNW,simba PCI bridges which lack 609/* Cook up fake bus resources for SUNW,simba PCI bridges which lack
526 * a proper 'ranges' property. 610 * a proper 'ranges' property.
527 */ 611 */
@@ -581,13 +665,8 @@ static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm,
581 simba = 0; 665 simba = 0;
582 if (ranges == NULL) { 666 if (ranges == NULL) {
583 const char *model = of_get_property(node, "model", NULL); 667 const char *model = of_get_property(node, "model", NULL);
584 if (model && !strcmp(model, "SUNW,simba")) { 668 if (model && !strcmp(model, "SUNW,simba"))
585 simba = 1; 669 simba = 1;
586 } else {
587 printk(KERN_DEBUG "Can't get ranges for PCI-PCI bridge %s\n",
588 node->full_name);
589 return;
590 }
591 } 670 }
592 671
593 bus = pci_add_new_bus(dev->bus, dev, busrange[0]); 672 bus = pci_add_new_bus(dev->bus, dev, busrange[0]);
@@ -611,7 +690,10 @@ static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm,
611 } 690 }
612 if (simba) { 691 if (simba) {
613 apb_fake_ranges(dev, bus, pbm); 692 apb_fake_ranges(dev, bus, pbm);
614 goto simba_cont; 693 goto after_ranges;
694 } else if (ranges == NULL) {
695 pci_cfg_fake_ranges(dev, bus, pbm);
696 goto after_ranges;
615 } 697 }
616 i = 1; 698 i = 1;
617 for (; len >= 32; len -= 32, ranges += 8) { 699 for (; len >= 32; len -= 32, ranges += 8) {
@@ -650,7 +732,7 @@ static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm,
650 */ 732 */
651 pci_resource_adjust(res, root); 733 pci_resource_adjust(res, root);
652 } 734 }
653simba_cont: 735after_ranges:
654 sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), 736 sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus),
655 bus->number); 737 bus->number);
656 if (ofpci_verbose) 738 if (ofpci_verbose)
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c
index f974fefc3ebc..4249214608af 100644
--- a/arch/sparc64/kernel/pci_common.c
+++ b/arch/sparc64/kernel/pci_common.c
@@ -291,8 +291,9 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
291 291
292 for (i = 0; i < num_pbm_ranges; i++) { 292 for (i = 0; i < num_pbm_ranges; i++) {
293 const struct linux_prom_pci_ranges *pr = &pbm_ranges[i]; 293 const struct linux_prom_pci_ranges *pr = &pbm_ranges[i];
294 unsigned long a; 294 unsigned long a, size;
295 u32 parent_phys_hi, parent_phys_lo; 295 u32 parent_phys_hi, parent_phys_lo;
296 u32 size_hi, size_lo;
296 int type; 297 int type;
297 298
298 parent_phys_hi = pr->parent_phys_hi; 299 parent_phys_hi = pr->parent_phys_hi;
@@ -300,9 +301,14 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
300 if (tlb_type == hypervisor) 301 if (tlb_type == hypervisor)
301 parent_phys_hi &= 0x0fffffff; 302 parent_phys_hi &= 0x0fffffff;
302 303
304 size_hi = pr->size_hi;
305 size_lo = pr->size_lo;
306
303 type = (pr->child_phys_hi >> 24) & 0x3; 307 type = (pr->child_phys_hi >> 24) & 0x3;
304 a = (((unsigned long)parent_phys_hi << 32UL) | 308 a = (((unsigned long)parent_phys_hi << 32UL) |
305 ((unsigned long)parent_phys_lo << 0UL)); 309 ((unsigned long)parent_phys_lo << 0UL));
310 size = (((unsigned long)size_hi << 32UL) |
311 ((unsigned long)size_lo << 0UL));
306 312
307 switch (type) { 313 switch (type) {
308 case 0: 314 case 0:
@@ -313,7 +319,7 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
313 case 1: 319 case 1:
314 /* 16-bit IO space, 16MB */ 320 /* 16-bit IO space, 16MB */
315 pbm->io_space.start = a; 321 pbm->io_space.start = a;
316 pbm->io_space.end = a + ((16UL*1024UL*1024UL) - 1UL); 322 pbm->io_space.end = a + size - 1UL;
317 pbm->io_space.flags = IORESOURCE_IO; 323 pbm->io_space.flags = IORESOURCE_IO;
318 saw_io = 1; 324 saw_io = 1;
319 break; 325 break;
@@ -321,7 +327,7 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
321 case 2: 327 case 2:
322 /* 32-bit MEM space, 2GB */ 328 /* 32-bit MEM space, 2GB */
323 pbm->mem_space.start = a; 329 pbm->mem_space.start = a;
324 pbm->mem_space.end = a + (0x80000000UL - 1UL); 330 pbm->mem_space.end = a + size - 1UL;
325 pbm->mem_space.flags = IORESOURCE_MEM; 331 pbm->mem_space.flags = IORESOURCE_MEM;
326 saw_mem = 1; 332 saw_mem = 1;
327 break; 333 break;
diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c
index 323d6c278518..22e1be5c7489 100644
--- a/arch/sparc64/kernel/pci_sabre.c
+++ b/arch/sparc64/kernel/pci_sabre.c
@@ -636,13 +636,18 @@ static void apb_init(struct pci_bus *sabre_bus)
636static void sabre_scan_bus(struct pci_pbm_info *pbm) 636static void sabre_scan_bus(struct pci_pbm_info *pbm)
637{ 637{
638 static int once; 638 static int once;
639 struct pci_bus *pbus;
640 639
641 /* The APB bridge speaks to the Sabre host PCI bridge 640 /* The APB bridge speaks to the Sabre host PCI bridge
642 * at 66Mhz, but the front side of APB runs at 33Mhz 641 * at 66Mhz, but the front side of APB runs at 33Mhz
643 * for both segments. 642 * for both segments.
643 *
644 * Hummingbird systems do not use APB, so they run
645 * at 66MHZ.
644 */ 646 */
645 pbm->is_66mhz_capable = 0; 647 if (hummingbird_p)
648 pbm->is_66mhz_capable = 1;
649 else
650 pbm->is_66mhz_capable = 0;
646 651
647 /* This driver has not been verified to handle 652 /* This driver has not been verified to handle
648 * multiple SABREs yet, so trap this. 653 * multiple SABREs yet, so trap this.
@@ -656,13 +661,13 @@ static void sabre_scan_bus(struct pci_pbm_info *pbm)
656 } 661 }
657 once++; 662 once++;
658 663
659 pbus = pci_scan_one_pbm(pbm); 664 pbm->pci_bus = pci_scan_one_pbm(pbm);
660 if (!pbus) 665 if (!pbm->pci_bus)
661 return; 666 return;
662 667
663 sabre_root_bus = pbus; 668 sabre_root_bus = pbm->pci_bus;
664 669
665 apb_init(pbus); 670 apb_init(pbm->pci_bus);
666 671
667 sabre_register_error_handlers(pbm); 672 sabre_register_error_handlers(pbm);
668} 673}
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c
index 6b3fe2c1d65e..639cf06ca372 100644
--- a/arch/sparc64/kernel/pci_sun4v.c
+++ b/arch/sparc64/kernel/pci_sun4v.c
@@ -1129,7 +1129,7 @@ static void pci_sun4v_msi_init(struct pci_pbm_info *pbm)
1129} 1129}
1130#endif /* !(CONFIG_PCI_MSI) */ 1130#endif /* !(CONFIG_PCI_MSI) */
1131 1131
1132static void pci_sun4v_pbm_init(struct pci_controller_info *p, struct device_node *dp, u32 devhandle) 1132static void __init pci_sun4v_pbm_init(struct pci_controller_info *p, struct device_node *dp, u32 devhandle)
1133{ 1133{
1134 struct pci_pbm_info *pbm; 1134 struct pci_pbm_info *pbm;
1135 1135
@@ -1163,7 +1163,7 @@ static void pci_sun4v_pbm_init(struct pci_controller_info *p, struct device_node
1163 pci_sun4v_msi_init(pbm); 1163 pci_sun4v_msi_init(pbm);
1164} 1164}
1165 1165
1166void sun4v_pci_init(struct device_node *dp, char *model_name) 1166void __init sun4v_pci_init(struct device_node *dp, char *model_name)
1167{ 1167{
1168 static int hvapi_negotiated = 0; 1168 static int hvapi_negotiated = 0;
1169 struct pci_controller_info *p; 1169 struct pci_controller_info *p;
diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c
index 5d6adea3967f..881a09ee4c4c 100644
--- a/arch/sparc64/kernel/power.c
+++ b/arch/sparc64/kernel/power.c
@@ -1,7 +1,6 @@
1/* $Id: power.c,v 1.10 2001/12/11 01:57:16 davem Exp $ 1/* power.c: Power management driver.
2 * power.c: Power management driver.
3 * 2 *
4 * Copyright (C) 1999 David S. Miller (davem@redhat.com) 3 * Copyright (C) 1999, 2007 David S. Miller (davem@davemloft.net)
5 */ 4 */
6 5
7#include <linux/kernel.h> 6#include <linux/kernel.h>
@@ -13,6 +12,7 @@
13#include <linux/interrupt.h> 12#include <linux/interrupt.h>
14#include <linux/pm.h> 13#include <linux/pm.h>
15#include <linux/syscalls.h> 14#include <linux/syscalls.h>
15#include <linux/reboot.h>
16 16
17#include <asm/system.h> 17#include <asm/system.h>
18#include <asm/auxio.h> 18#include <asm/auxio.h>
@@ -29,24 +29,15 @@
29 */ 29 */
30int scons_pwroff = 1; 30int scons_pwroff = 1;
31 31
32#ifdef CONFIG_PCI
33#include <linux/pci.h>
34static void __iomem *power_reg; 32static void __iomem *power_reg;
35 33
36static DECLARE_WAIT_QUEUE_HEAD(powerd_wait);
37static int button_pressed;
38
39static irqreturn_t power_handler(int irq, void *dev_id) 34static irqreturn_t power_handler(int irq, void *dev_id)
40{ 35{
41 if (button_pressed == 0) { 36 orderly_poweroff(true);
42 button_pressed = 1;
43 wake_up(&powerd_wait);
44 }
45 37
46 /* FIXME: Check registers for status... */ 38 /* FIXME: Check registers for status... */
47 return IRQ_HANDLED; 39 return IRQ_HANDLED;
48} 40}
49#endif /* CONFIG_PCI */
50 41
51extern void machine_halt(void); 42extern void machine_halt(void);
52extern void machine_alt_power_off(void); 43extern void machine_alt_power_off(void);
@@ -55,20 +46,19 @@ static void (*poweroff_method)(void) = machine_alt_power_off;
55void machine_power_off(void) 46void machine_power_off(void)
56{ 47{
57 sstate_poweroff(); 48 sstate_poweroff();
58 if (!serial_console || scons_pwroff) { 49 if (strcmp(of_console_device->type, "serial") || scons_pwroff) {
59#ifdef CONFIG_PCI
60 if (power_reg) { 50 if (power_reg) {
61 /* Both register bits seem to have the 51 /* Both register bits seem to have the
62 * same effect, so until I figure out 52 * same effect, so until I figure out
63 * what the difference is... 53 * what the difference is...
64 */ 54 */
65 writel(AUXIO_PCIO_CPWR_OFF | AUXIO_PCIO_SPWR_OFF, power_reg); 55 writel(AUXIO_PCIO_CPWR_OFF | AUXIO_PCIO_SPWR_OFF, power_reg);
66 } else 56 } else {
67#endif /* CONFIG_PCI */
68 if (poweroff_method != NULL) { 57 if (poweroff_method != NULL) {
69 poweroff_method(); 58 poweroff_method();
70 /* not reached */ 59 /* not reached */
71 } 60 }
61 }
72 } 62 }
73 machine_halt(); 63 machine_halt();
74} 64}
@@ -76,40 +66,9 @@ void machine_power_off(void)
76void (*pm_power_off)(void) = machine_power_off; 66void (*pm_power_off)(void) = machine_power_off;
77EXPORT_SYMBOL(pm_power_off); 67EXPORT_SYMBOL(pm_power_off);
78 68
79#ifdef CONFIG_PCI
80static int powerd(void *__unused)
81{
82 static char *envp[] = { "HOME=/", "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL };
83 char *argv[] = { "/sbin/shutdown", "-h", "now", NULL };
84 DECLARE_WAITQUEUE(wait, current);
85
86 daemonize("powerd");
87
88 add_wait_queue(&powerd_wait, &wait);
89again:
90 for (;;) {
91 set_task_state(current, TASK_INTERRUPTIBLE);
92 if (button_pressed)
93 break;
94 flush_signals(current);
95 schedule();
96 }
97 __set_current_state(TASK_RUNNING);
98 remove_wait_queue(&powerd_wait, &wait);
99
100 /* Ok, down we go... */
101 button_pressed = 0;
102 if (kernel_execve("/sbin/shutdown", argv, envp) < 0) {
103 printk("powerd: shutdown execution failed\n");
104 add_wait_queue(&powerd_wait, &wait);
105 goto again;
106 }
107 return 0;
108}
109
110static int __init has_button_interrupt(unsigned int irq, struct device_node *dp) 69static int __init has_button_interrupt(unsigned int irq, struct device_node *dp)
111{ 70{
112 if (irq == PCI_IRQ_NONE) 71 if (irq == 0xffffffff)
113 return 0; 72 return 0;
114 if (!of_find_property(dp, "button", NULL)) 73 if (!of_find_property(dp, "button", NULL))
115 return 0; 74 return 0;
@@ -124,23 +83,15 @@ static int __devinit power_probe(struct of_device *op, const struct of_device_id
124 83
125 power_reg = of_ioremap(res, 0, 0x4, "power"); 84 power_reg = of_ioremap(res, 0, 0x4, "power");
126 85
127 printk("%s: Control reg at %lx ... ", 86 printk(KERN_INFO "%s: Control reg at %lx\n",
128 op->node->name, res->start); 87 op->node->name, res->start);
129 88
130 poweroff_method = machine_halt; /* able to use the standard halt */ 89 poweroff_method = machine_halt; /* able to use the standard halt */
131 90
132 if (has_button_interrupt(irq, op->node)) { 91 if (has_button_interrupt(irq, op->node)) {
133 if (kernel_thread(powerd, NULL, CLONE_FS) < 0) {
134 printk("Failed to start power daemon.\n");
135 return 0;
136 }
137 printk("powerd running.\n");
138
139 if (request_irq(irq, 92 if (request_irq(irq,
140 power_handler, 0, "power", NULL) < 0) 93 power_handler, 0, "power", NULL) < 0)
141 printk("power: Error, cannot register IRQ handler.\n"); 94 printk(KERN_ERR "power: Cannot setup IRQ handler.\n");
142 } else {
143 printk("not using powerd.\n");
144 } 95 }
145 96
146 return 0; 97 return 0;
@@ -161,7 +112,6 @@ static struct of_platform_driver power_driver = {
161 112
162void __init power_init(void) 113void __init power_init(void)
163{ 114{
164 of_register_driver(&power_driver, &of_bus_type); 115 of_register_driver(&power_driver, &of_platform_bus_type);
165 return; 116 return;
166} 117}
167#endif /* CONFIG_PCI */
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index f5f97e2c669c..fd7899ba1d70 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -29,6 +29,7 @@
29#include <linux/compat.h> 29#include <linux/compat.h>
30#include <linux/tick.h> 30#include <linux/tick.h>
31#include <linux/init.h> 31#include <linux/init.h>
32#include <linux/cpu.h>
32 33
33#include <asm/oplib.h> 34#include <asm/oplib.h>
34#include <asm/uaccess.h> 35#include <asm/uaccess.h>
@@ -49,7 +50,7 @@
49 50
50/* #define VERBOSE_SHOWREGS */ 51/* #define VERBOSE_SHOWREGS */
51 52
52static void sparc64_yield(void) 53static void sparc64_yield(int cpu)
53{ 54{
54 if (tlb_type != hypervisor) 55 if (tlb_type != hypervisor)
55 return; 56 return;
@@ -57,7 +58,7 @@ static void sparc64_yield(void)
57 clear_thread_flag(TIF_POLLING_NRFLAG); 58 clear_thread_flag(TIF_POLLING_NRFLAG);
58 smp_mb__after_clear_bit(); 59 smp_mb__after_clear_bit();
59 60
60 while (!need_resched()) { 61 while (!need_resched() && !cpu_is_offline(cpu)) {
61 unsigned long pstate; 62 unsigned long pstate;
62 63
63 /* Disable interrupts. */ 64 /* Disable interrupts. */
@@ -68,7 +69,7 @@ static void sparc64_yield(void)
68 : "=&r" (pstate) 69 : "=&r" (pstate)
69 : "i" (PSTATE_IE)); 70 : "i" (PSTATE_IE));
70 71
71 if (!need_resched()) 72 if (!need_resched() && !cpu_is_offline(cpu))
72 sun4v_cpu_yield(); 73 sun4v_cpu_yield();
73 74
74 /* Re-enable interrupts. */ 75 /* Re-enable interrupts. */
@@ -86,15 +87,25 @@ static void sparc64_yield(void)
86/* The idle loop on sparc64. */ 87/* The idle loop on sparc64. */
87void cpu_idle(void) 88void cpu_idle(void)
88{ 89{
90 int cpu = smp_processor_id();
91
89 set_thread_flag(TIF_POLLING_NRFLAG); 92 set_thread_flag(TIF_POLLING_NRFLAG);
90 93
91 while(1) { 94 while(1) {
92 tick_nohz_stop_sched_tick(); 95 tick_nohz_stop_sched_tick();
93 while (!need_resched()) 96
94 sparc64_yield(); 97 while (!need_resched() && !cpu_is_offline(cpu))
98 sparc64_yield(cpu);
99
95 tick_nohz_restart_sched_tick(); 100 tick_nohz_restart_sched_tick();
96 101
97 preempt_enable_no_resched(); 102 preempt_enable_no_resched();
103
104#ifdef CONFIG_HOTPLUG_CPU
105 if (cpu_is_offline(cpu))
106 cpu_play_dead();
107#endif
108
98 schedule(); 109 schedule();
99 preempt_disable(); 110 preempt_disable();
100 } 111 }
@@ -108,7 +119,7 @@ extern void (*prom_keyboard)(void);
108void machine_halt(void) 119void machine_halt(void)
109{ 120{
110 sstate_halt(); 121 sstate_halt();
111 if (!serial_console && prom_palette) 122 if (prom_palette)
112 prom_palette (1); 123 prom_palette (1);
113 if (prom_keyboard) 124 if (prom_keyboard)
114 prom_keyboard(); 125 prom_keyboard();
@@ -119,7 +130,7 @@ void machine_halt(void)
119void machine_alt_power_off(void) 130void machine_alt_power_off(void)
120{ 131{
121 sstate_poweroff(); 132 sstate_poweroff();
122 if (!serial_console && prom_palette) 133 if (prom_palette)
123 prom_palette(1); 134 prom_palette(1);
124 if (prom_keyboard) 135 if (prom_keyboard)
125 prom_keyboard(); 136 prom_keyboard();
@@ -134,7 +145,7 @@ void machine_restart(char * cmd)
134 sstate_reboot(); 145 sstate_reboot();
135 p = strchr (reboot_command, '\n'); 146 p = strchr (reboot_command, '\n');
136 if (p) *p = 0; 147 if (p) *p = 0;
137 if (!serial_console && prom_palette) 148 if (prom_palette)
138 prom_palette (1); 149 prom_palette (1);
139 if (prom_keyboard) 150 if (prom_keyboard)
140 prom_keyboard(); 151 prom_keyboard();
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c
index dad4b3ba705f..f4e0a9ad9be3 100644
--- a/arch/sparc64/kernel/prom.c
+++ b/arch/sparc64/kernel/prom.c
@@ -30,73 +30,9 @@
30#include <asm/upa.h> 30#include <asm/upa.h>
31#include <asm/smp.h> 31#include <asm/smp.h>
32 32
33static struct device_node *allnodes; 33extern struct device_node *allnodes; /* temporary while merging */
34 34
35/* use when traversing tree through the allnext, child, sibling, 35extern rwlock_t devtree_lock; /* temporary while merging */
36 * or parent members of struct device_node.
37 */
38static DEFINE_RWLOCK(devtree_lock);
39
40int of_device_is_compatible(const struct device_node *device,
41 const char *compat)
42{
43 const char* cp;
44 int cplen, l;
45
46 cp = of_get_property(device, "compatible", &cplen);
47 if (cp == NULL)
48 return 0;
49 while (cplen > 0) {
50 if (strncmp(cp, compat, strlen(compat)) == 0)
51 return 1;
52 l = strlen(cp) + 1;
53 cp += l;
54 cplen -= l;
55 }
56
57 return 0;
58}
59EXPORT_SYMBOL(of_device_is_compatible);
60
61struct device_node *of_get_parent(const struct device_node *node)
62{
63 struct device_node *np;
64
65 if (!node)
66 return NULL;
67
68 np = node->parent;
69
70 return np;
71}
72EXPORT_SYMBOL(of_get_parent);
73
74struct device_node *of_get_next_child(const struct device_node *node,
75 struct device_node *prev)
76{
77 struct device_node *next;
78
79 next = prev ? prev->sibling : node->child;
80 for (; next != 0; next = next->sibling) {
81 break;
82 }
83
84 return next;
85}
86EXPORT_SYMBOL(of_get_next_child);
87
88struct device_node *of_find_node_by_path(const char *path)
89{
90 struct device_node *np = allnodes;
91
92 for (; np != 0; np = np->allnext) {
93 if (np->full_name != 0 && strcmp(np->full_name, path) == 0)
94 break;
95 }
96
97 return np;
98}
99EXPORT_SYMBOL(of_find_node_by_path);
100 36
101struct device_node *of_find_node_by_phandle(phandle handle) 37struct device_node *of_find_node_by_phandle(phandle handle)
102{ 38{
@@ -110,81 +46,6 @@ struct device_node *of_find_node_by_phandle(phandle handle)
110} 46}
111EXPORT_SYMBOL(of_find_node_by_phandle); 47EXPORT_SYMBOL(of_find_node_by_phandle);
112 48
113struct device_node *of_find_node_by_name(struct device_node *from,
114 const char *name)
115{
116 struct device_node *np;
117
118 np = from ? from->allnext : allnodes;
119 for (; np != NULL; np = np->allnext)
120 if (np->name != NULL && strcmp(np->name, name) == 0)
121 break;
122
123 return np;
124}
125EXPORT_SYMBOL(of_find_node_by_name);
126
127struct device_node *of_find_node_by_type(struct device_node *from,
128 const char *type)
129{
130 struct device_node *np;
131
132 np = from ? from->allnext : allnodes;
133 for (; np != 0; np = np->allnext)
134 if (np->type != 0 && strcmp(np->type, type) == 0)
135 break;
136
137 return np;
138}
139EXPORT_SYMBOL(of_find_node_by_type);
140
141struct device_node *of_find_compatible_node(struct device_node *from,
142 const char *type, const char *compatible)
143{
144 struct device_node *np;
145
146 np = from ? from->allnext : allnodes;
147 for (; np != 0; np = np->allnext) {
148 if (type != NULL
149 && !(np->type != 0 && strcmp(np->type, type) == 0))
150 continue;
151 if (of_device_is_compatible(np, compatible))
152 break;
153 }
154
155 return np;
156}
157EXPORT_SYMBOL(of_find_compatible_node);
158
159struct property *of_find_property(const struct device_node *np,
160 const char *name,
161 int *lenp)
162{
163 struct property *pp;
164
165 for (pp = np->properties; pp != 0; pp = pp->next) {
166 if (strcasecmp(pp->name, name) == 0) {
167 if (lenp != 0)
168 *lenp = pp->length;
169 break;
170 }
171 }
172 return pp;
173}
174EXPORT_SYMBOL(of_find_property);
175
176/*
177 * Find a property with a given name for a given node
178 * and return the value.
179 */
180const void *of_get_property(const struct device_node *np, const char *name,
181 int *lenp)
182{
183 struct property *pp = of_find_property(np,name,lenp);
184 return pp ? pp->value : NULL;
185}
186EXPORT_SYMBOL(of_get_property);
187
188int of_getintprop_default(struct device_node *np, const char *name, int def) 49int of_getintprop_default(struct device_node *np, const char *name, int def)
189{ 50{
190 struct property *prop; 51 struct property *prop;
@@ -198,36 +59,6 @@ int of_getintprop_default(struct device_node *np, const char *name, int def)
198} 59}
199EXPORT_SYMBOL(of_getintprop_default); 60EXPORT_SYMBOL(of_getintprop_default);
200 61
201int of_n_addr_cells(struct device_node *np)
202{
203 const int* ip;
204 do {
205 if (np->parent)
206 np = np->parent;
207 ip = of_get_property(np, "#address-cells", NULL);
208 if (ip != NULL)
209 return *ip;
210 } while (np->parent);
211 /* No #address-cells property for the root node, default to 2 */
212 return 2;
213}
214EXPORT_SYMBOL(of_n_addr_cells);
215
216int of_n_size_cells(struct device_node *np)
217{
218 const int* ip;
219 do {
220 if (np->parent)
221 np = np->parent;
222 ip = of_get_property(np, "#size-cells", NULL);
223 if (ip != NULL)
224 return *ip;
225 } while (np->parent);
226 /* No #size-cells property for the root node, default to 1 */
227 return 1;
228}
229EXPORT_SYMBOL(of_n_size_cells);
230
231int of_set_property(struct device_node *dp, const char *name, void *val, int len) 62int of_set_property(struct device_node *dp, const char *name, void *val, int len)
232{ 63{
233 struct property **prevp; 64 struct property **prevp;
@@ -933,29 +764,29 @@ static void __init fire_irq_trans_init(struct device_node *dp)
933 * This should conform to both Sunfire/Wildfire server and Fusion 764 * This should conform to both Sunfire/Wildfire server and Fusion
934 * desktop designs. 765 * desktop designs.
935 */ 766 */
936#define SYSIO_IMAP_SLOT0 0x2c04UL 767#define SYSIO_IMAP_SLOT0 0x2c00UL
937#define SYSIO_IMAP_SLOT1 0x2c0cUL 768#define SYSIO_IMAP_SLOT1 0x2c08UL
938#define SYSIO_IMAP_SLOT2 0x2c14UL 769#define SYSIO_IMAP_SLOT2 0x2c10UL
939#define SYSIO_IMAP_SLOT3 0x2c1cUL 770#define SYSIO_IMAP_SLOT3 0x2c18UL
940#define SYSIO_IMAP_SCSI 0x3004UL 771#define SYSIO_IMAP_SCSI 0x3000UL
941#define SYSIO_IMAP_ETH 0x300cUL 772#define SYSIO_IMAP_ETH 0x3008UL
942#define SYSIO_IMAP_BPP 0x3014UL 773#define SYSIO_IMAP_BPP 0x3010UL
943#define SYSIO_IMAP_AUDIO 0x301cUL 774#define SYSIO_IMAP_AUDIO 0x3018UL
944#define SYSIO_IMAP_PFAIL 0x3024UL 775#define SYSIO_IMAP_PFAIL 0x3020UL
945#define SYSIO_IMAP_KMS 0x302cUL 776#define SYSIO_IMAP_KMS 0x3028UL
946#define SYSIO_IMAP_FLPY 0x3034UL 777#define SYSIO_IMAP_FLPY 0x3030UL
947#define SYSIO_IMAP_SHW 0x303cUL 778#define SYSIO_IMAP_SHW 0x3038UL
948#define SYSIO_IMAP_KBD 0x3044UL 779#define SYSIO_IMAP_KBD 0x3040UL
949#define SYSIO_IMAP_MS 0x304cUL 780#define SYSIO_IMAP_MS 0x3048UL
950#define SYSIO_IMAP_SER 0x3054UL 781#define SYSIO_IMAP_SER 0x3050UL
951#define SYSIO_IMAP_TIM0 0x3064UL 782#define SYSIO_IMAP_TIM0 0x3060UL
952#define SYSIO_IMAP_TIM1 0x306cUL 783#define SYSIO_IMAP_TIM1 0x3068UL
953#define SYSIO_IMAP_UE 0x3074UL 784#define SYSIO_IMAP_UE 0x3070UL
954#define SYSIO_IMAP_CE 0x307cUL 785#define SYSIO_IMAP_CE 0x3078UL
955#define SYSIO_IMAP_SBERR 0x3084UL 786#define SYSIO_IMAP_SBERR 0x3080UL
956#define SYSIO_IMAP_PMGMT 0x308cUL 787#define SYSIO_IMAP_PMGMT 0x3088UL
957#define SYSIO_IMAP_GFX 0x3094UL 788#define SYSIO_IMAP_GFX 0x3090UL
958#define SYSIO_IMAP_EUPA 0x309cUL 789#define SYSIO_IMAP_EUPA 0x3098UL
959 790
960#define bogon ((unsigned long) -1) 791#define bogon ((unsigned long) -1)
961static unsigned long sysio_irq_offsets[] = { 792static unsigned long sysio_irq_offsets[] = {
@@ -1006,10 +837,10 @@ static unsigned long sysio_irq_offsets[] = {
1006 * Interrupt Clear register pointer, SYSIO specific version. 837 * Interrupt Clear register pointer, SYSIO specific version.
1007 */ 838 */
1008#define SYSIO_ICLR_UNUSED0 0x3400UL 839#define SYSIO_ICLR_UNUSED0 0x3400UL
1009#define SYSIO_ICLR_SLOT0 0x340cUL 840#define SYSIO_ICLR_SLOT0 0x3408UL
1010#define SYSIO_ICLR_SLOT1 0x344cUL 841#define SYSIO_ICLR_SLOT1 0x3448UL
1011#define SYSIO_ICLR_SLOT2 0x348cUL 842#define SYSIO_ICLR_SLOT2 0x3488UL
1012#define SYSIO_ICLR_SLOT3 0x34ccUL 843#define SYSIO_ICLR_SLOT3 0x34c8UL
1013static unsigned long sysio_imap_to_iclr(unsigned long imap) 844static unsigned long sysio_imap_to_iclr(unsigned long imap)
1014{ 845{
1015 unsigned long diff = SYSIO_ICLR_UNUSED0 - SYSIO_IMAP_SLOT0; 846 unsigned long diff = SYSIO_ICLR_UNUSED0 - SYSIO_IMAP_SLOT0;
@@ -1781,6 +1612,10 @@ static void __init of_fill_in_cpu_data(void)
1781 } 1612 }
1782 1613
1783 cpu_data(cpuid).core_id = portid + 1; 1614 cpu_data(cpuid).core_id = portid + 1;
1615 cpu_data(cpuid).proc_id = portid;
1616#ifdef CONFIG_SMP
1617 sparc64_multi_core = 1;
1618#endif
1784 } else { 1619 } else {
1785 cpu_data(cpuid).dcache_size = 1620 cpu_data(cpuid).dcache_size =
1786 of_getintprop_default(dp, "dcache-size", 16 * 1024); 1621 of_getintprop_default(dp, "dcache-size", 16 * 1024);
@@ -1799,17 +1634,72 @@ static void __init of_fill_in_cpu_data(void)
1799 of_getintprop_default(dp, "ecache-line-size", 64); 1634 of_getintprop_default(dp, "ecache-line-size", 64);
1800 1635
1801 cpu_data(cpuid).core_id = 0; 1636 cpu_data(cpuid).core_id = 0;
1637 cpu_data(cpuid).proc_id = -1;
1802 } 1638 }
1803 1639
1804#ifdef CONFIG_SMP 1640#ifdef CONFIG_SMP
1805 cpu_set(cpuid, cpu_present_map); 1641 cpu_set(cpuid, cpu_present_map);
1806 cpu_set(cpuid, phys_cpu_present_map); 1642 cpu_set(cpuid, cpu_possible_map);
1807#endif 1643#endif
1808 } 1644 }
1809 1645
1810 smp_fill_in_sib_core_maps(); 1646 smp_fill_in_sib_core_maps();
1811} 1647}
1812 1648
1649struct device_node *of_console_device;
1650EXPORT_SYMBOL(of_console_device);
1651
1652char *of_console_path;
1653EXPORT_SYMBOL(of_console_path);
1654
1655char *of_console_options;
1656EXPORT_SYMBOL(of_console_options);
1657
1658static void __init of_console_init(void)
1659{
1660 char *msg = "OF stdout device is: %s\n";
1661 struct device_node *dp;
1662 const char *type;
1663 phandle node;
1664
1665 of_console_path = prom_early_alloc(256);
1666 if (prom_ihandle2path(prom_stdout, of_console_path, 256) < 0) {
1667 prom_printf("Cannot obtain path of stdout.\n");
1668 prom_halt();
1669 }
1670 of_console_options = strrchr(of_console_path, ':');
1671 if (of_console_options) {
1672 of_console_options++;
1673 if (*of_console_options == '\0')
1674 of_console_options = NULL;
1675 }
1676
1677 node = prom_inst2pkg(prom_stdout);
1678 if (!node) {
1679 prom_printf("Cannot resolve stdout node from "
1680 "instance %08x.\n", prom_stdout);
1681 prom_halt();
1682 }
1683
1684 dp = of_find_node_by_phandle(node);
1685 type = of_get_property(dp, "device_type", NULL);
1686 if (!type) {
1687 prom_printf("Console stdout lacks device_type property.\n");
1688 prom_halt();
1689 }
1690
1691 if (strcmp(type, "display") && strcmp(type, "serial")) {
1692 prom_printf("Console device_type is neither display "
1693 "nor serial.\n");
1694 prom_halt();
1695 }
1696
1697 of_console_device = dp;
1698
1699 prom_printf(msg, of_console_path);
1700 printk(msg, of_console_path);
1701}
1702
1813void __init prom_build_devicetree(void) 1703void __init prom_build_devicetree(void)
1814{ 1704{
1815 struct device_node **nextp; 1705 struct device_node **nextp;
@@ -1822,6 +1712,8 @@ void __init prom_build_devicetree(void)
1822 allnodes->child = build_tree(allnodes, 1712 allnodes->child = build_tree(allnodes,
1823 prom_getchild(allnodes->node), 1713 prom_getchild(allnodes->node),
1824 &nextp); 1714 &nextp);
1715 of_console_init();
1716
1825 printk("PROM: Built device tree with %u bytes of memory.\n", 1717 printk("PROM: Built device tree with %u bytes of memory.\n",
1826 prom_early_allocated); 1718 prom_early_allocated);
1827 1719
diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c
index 91f6e2a74ad5..a1fd9bcc0b87 100644
--- a/arch/sparc64/kernel/sbus.c
+++ b/arch/sparc64/kernel/sbus.c
@@ -629,29 +629,29 @@ void sbus_set_sbus64(struct sbus_dev *sdev, int bursts)
629 * This should conform to both Sunfire/Wildfire server and Fusion 629 * This should conform to both Sunfire/Wildfire server and Fusion
630 * desktop designs. 630 * desktop designs.
631 */ 631 */
632#define SYSIO_IMAP_SLOT0 0x2c04UL 632#define SYSIO_IMAP_SLOT0 0x2c00UL
633#define SYSIO_IMAP_SLOT1 0x2c0cUL 633#define SYSIO_IMAP_SLOT1 0x2c08UL
634#define SYSIO_IMAP_SLOT2 0x2c14UL 634#define SYSIO_IMAP_SLOT2 0x2c10UL
635#define SYSIO_IMAP_SLOT3 0x2c1cUL 635#define SYSIO_IMAP_SLOT3 0x2c18UL
636#define SYSIO_IMAP_SCSI 0x3004UL 636#define SYSIO_IMAP_SCSI 0x3000UL
637#define SYSIO_IMAP_ETH 0x300cUL 637#define SYSIO_IMAP_ETH 0x3008UL
638#define SYSIO_IMAP_BPP 0x3014UL 638#define SYSIO_IMAP_BPP 0x3010UL
639#define SYSIO_IMAP_AUDIO 0x301cUL 639#define SYSIO_IMAP_AUDIO 0x3018UL
640#define SYSIO_IMAP_PFAIL 0x3024UL 640#define SYSIO_IMAP_PFAIL 0x3020UL
641#define SYSIO_IMAP_KMS 0x302cUL 641#define SYSIO_IMAP_KMS 0x3028UL
642#define SYSIO_IMAP_FLPY 0x3034UL 642#define SYSIO_IMAP_FLPY 0x3030UL
643#define SYSIO_IMAP_SHW 0x303cUL 643#define SYSIO_IMAP_SHW 0x3038UL
644#define SYSIO_IMAP_KBD 0x3044UL 644#define SYSIO_IMAP_KBD 0x3040UL
645#define SYSIO_IMAP_MS 0x304cUL 645#define SYSIO_IMAP_MS 0x3048UL
646#define SYSIO_IMAP_SER 0x3054UL 646#define SYSIO_IMAP_SER 0x3050UL
647#define SYSIO_IMAP_TIM0 0x3064UL 647#define SYSIO_IMAP_TIM0 0x3060UL
648#define SYSIO_IMAP_TIM1 0x306cUL 648#define SYSIO_IMAP_TIM1 0x3068UL
649#define SYSIO_IMAP_UE 0x3074UL 649#define SYSIO_IMAP_UE 0x3070UL
650#define SYSIO_IMAP_CE 0x307cUL 650#define SYSIO_IMAP_CE 0x3078UL
651#define SYSIO_IMAP_SBERR 0x3084UL 651#define SYSIO_IMAP_SBERR 0x3080UL
652#define SYSIO_IMAP_PMGMT 0x308cUL 652#define SYSIO_IMAP_PMGMT 0x3088UL
653#define SYSIO_IMAP_GFX 0x3094UL 653#define SYSIO_IMAP_GFX 0x3090UL
654#define SYSIO_IMAP_EUPA 0x309cUL 654#define SYSIO_IMAP_EUPA 0x3098UL
655 655
656#define bogon ((unsigned long) -1) 656#define bogon ((unsigned long) -1)
657static unsigned long sysio_irq_offsets[] = { 657static unsigned long sysio_irq_offsets[] = {
@@ -700,10 +700,10 @@ static unsigned long sysio_irq_offsets[] = {
700 * Interrupt Clear register pointer, SYSIO specific version. 700 * Interrupt Clear register pointer, SYSIO specific version.
701 */ 701 */
702#define SYSIO_ICLR_UNUSED0 0x3400UL 702#define SYSIO_ICLR_UNUSED0 0x3400UL
703#define SYSIO_ICLR_SLOT0 0x340cUL 703#define SYSIO_ICLR_SLOT0 0x3408UL
704#define SYSIO_ICLR_SLOT1 0x344cUL 704#define SYSIO_ICLR_SLOT1 0x3448UL
705#define SYSIO_ICLR_SLOT2 0x348cUL 705#define SYSIO_ICLR_SLOT2 0x3488UL
706#define SYSIO_ICLR_SLOT3 0x34ccUL 706#define SYSIO_ICLR_SLOT3 0x34c8UL
707static unsigned long sysio_imap_to_iclr(unsigned long imap) 707static unsigned long sysio_imap_to_iclr(unsigned long imap)
708{ 708{
709 unsigned long diff = SYSIO_ICLR_UNUSED0 - SYSIO_IMAP_SLOT0; 709 unsigned long diff = SYSIO_ICLR_UNUSED0 - SYSIO_IMAP_SLOT0;
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index de9b4c13f1c7..0f5be828ee92 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -133,33 +133,6 @@ static void __init process_switch(char c)
133 } 133 }
134} 134}
135 135
136static void __init process_console(char *commands)
137{
138 serial_console = 0;
139 commands += 8;
140 /* Linux-style serial */
141 if (!strncmp(commands, "ttyS", 4))
142 serial_console = simple_strtoul(commands + 4, NULL, 10) + 1;
143 else if (!strncmp(commands, "tty", 3)) {
144 char c = *(commands + 3);
145 /* Solaris-style serial */
146 if (c == 'a' || c == 'b') {
147 serial_console = c - 'a' + 1;
148 prom_printf ("Using /dev/tty%c as console.\n", c);
149 }
150 /* else Linux-style fbcon, not serial */
151 }
152#if defined(CONFIG_PROM_CONSOLE)
153 if (!strncmp(commands, "prom", 4)) {
154 char *p;
155
156 for (p = commands - 8; *p && *p != ' '; p++)
157 *p = ' ';
158 conswitchp = &prom_con;
159 }
160#endif
161}
162
163static void __init boot_flags_init(char *commands) 136static void __init boot_flags_init(char *commands)
164{ 137{
165 while (*commands) { 138 while (*commands) {
@@ -176,9 +149,7 @@ static void __init boot_flags_init(char *commands)
176 process_switch(*commands++); 149 process_switch(*commands++);
177 continue; 150 continue;
178 } 151 }
179 if (!strncmp(commands, "console=", 8)) { 152 if (!strncmp(commands, "mem=", 4)) {
180 process_console(commands);
181 } else if (!strncmp(commands, "mem=", 4)) {
182 /* 153 /*
183 * "mem=XXX[kKmM]" overrides the PROM-reported 154 * "mem=XXX[kKmM]" overrides the PROM-reported
184 * memory size. 155 * memory size.
@@ -378,44 +349,6 @@ void __init setup_arch(char **cmdline_p)
378 paging_init(); 349 paging_init();
379} 350}
380 351
381static int __init set_preferred_console(void)
382{
383 int idev, odev;
384
385 /* The user has requested a console so this is already set up. */
386 if (serial_console >= 0)
387 return -EBUSY;
388
389 idev = prom_query_input_device();
390 odev = prom_query_output_device();
391 if (idev == PROMDEV_IKBD && odev == PROMDEV_OSCREEN) {
392 serial_console = 0;
393 } else if (idev == PROMDEV_ITTYA && odev == PROMDEV_OTTYA) {
394 serial_console = 1;
395 } else if (idev == PROMDEV_ITTYB && odev == PROMDEV_OTTYB) {
396 serial_console = 2;
397 } else if (idev == PROMDEV_IRSC && odev == PROMDEV_ORSC) {
398 serial_console = 3;
399 } else if (idev == PROMDEV_IVCONS && odev == PROMDEV_OVCONS) {
400 /* sunhv_console_init() doesn't check the serial_console
401 * value anyways...
402 */
403 serial_console = 4;
404 return add_preferred_console("ttyHV", 0, NULL);
405 } else {
406 prom_printf("Inconsistent console: "
407 "input %d, output %d\n",
408 idev, odev);
409 prom_halt();
410 }
411
412 if (serial_console)
413 return add_preferred_console("ttyS", serial_console - 1, NULL);
414
415 return -ENODEV;
416}
417console_initcall(set_preferred_console);
418
419/* BUFFER is PAGE_SIZE bytes long. */ 352/* BUFFER is PAGE_SIZE bytes long. */
420 353
421extern char *sparc_cpu_type; 354extern char *sparc_cpu_type;
@@ -442,7 +375,6 @@ static int show_cpuinfo(struct seq_file *m, void *__unused)
442 "D$ parity tl1\t: %u\n" 375 "D$ parity tl1\t: %u\n"
443 "I$ parity tl1\t: %u\n" 376 "I$ parity tl1\t: %u\n"
444#ifndef CONFIG_SMP 377#ifndef CONFIG_SMP
445 "Cpu0Bogo\t: %lu.%02lu\n"
446 "Cpu0ClkTck\t: %016lx\n" 378 "Cpu0ClkTck\t: %016lx\n"
447#endif 379#endif
448 , 380 ,
@@ -457,9 +389,7 @@ static int show_cpuinfo(struct seq_file *m, void *__unused)
457 dcache_parity_tl1_occurred, 389 dcache_parity_tl1_occurred,
458 icache_parity_tl1_occurred 390 icache_parity_tl1_occurred
459#ifndef CONFIG_SMP 391#ifndef CONFIG_SMP
460 , cpu_data(0).udelay_val/(500000/HZ), 392 , cpu_data(0).clock_tick
461 (cpu_data(0).udelay_val/(5000/HZ)) % 100,
462 cpu_data(0).clock_tick
463#endif 393#endif
464 ); 394 );
465#ifdef CONFIG_SMP 395#ifdef CONFIG_SMP
@@ -511,24 +441,4 @@ void sun_do_break(void)
511 prom_cmdline(); 441 prom_cmdline();
512} 442}
513 443
514int serial_console = -1;
515int stop_a_enabled = 1; 444int stop_a_enabled = 1;
516
517static int __init topology_init(void)
518{
519 int i, err;
520
521 err = -ENOMEM;
522
523 for_each_possible_cpu(i) {
524 struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL);
525 if (p) {
526 register_cpu(p, i);
527 err = 0;
528 }
529 }
530
531 return err;
532}
533
534subsys_initcall(topology_init);
diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c
index 203e87301005..fb13775b3682 100644
--- a/arch/sparc64/kernel/signal.c
+++ b/arch/sparc64/kernel/signal.c
@@ -289,9 +289,7 @@ void do_rt_sigreturn(struct pt_regs *regs)
289 struct rt_signal_frame __user *sf; 289 struct rt_signal_frame __user *sf;
290 unsigned long tpc, tnpc, tstate; 290 unsigned long tpc, tnpc, tstate;
291 __siginfo_fpu_t __user *fpu_save; 291 __siginfo_fpu_t __user *fpu_save;
292 mm_segment_t old_fs;
293 sigset_t set; 292 sigset_t set;
294 stack_t st;
295 int err; 293 int err;
296 294
297 /* Always make any pending restarted system calls return -EINTR */ 295 /* Always make any pending restarted system calls return -EINTR */
@@ -327,20 +325,13 @@ void do_rt_sigreturn(struct pt_regs *regs)
327 err |= restore_fpu_state(regs, &sf->fpu_state); 325 err |= restore_fpu_state(regs, &sf->fpu_state);
328 326
329 err |= __copy_from_user(&set, &sf->mask, sizeof(sigset_t)); 327 err |= __copy_from_user(&set, &sf->mask, sizeof(sigset_t));
330 err |= __copy_from_user(&st, &sf->stack, sizeof(stack_t)); 328 err |= do_sigaltstack(&sf->stack, NULL, (unsigned long)sf);
331 329
332 if (err) 330 if (err)
333 goto segv; 331 goto segv;
334 332
335 regs->tpc = tpc; 333 regs->tpc = tpc;
336 regs->tnpc = tnpc; 334 regs->tnpc = tnpc;
337
338 /* It is more difficult to avoid calling this function than to
339 call it and ignore errors. */
340 old_fs = get_fs();
341 set_fs(KERNEL_DS);
342 do_sigaltstack((const stack_t __user *) &st, NULL, (unsigned long)sf);
343 set_fs(old_fs);
344 335
345 sigdelsetmask(&set, ~_BLOCKABLE); 336 sigdelsetmask(&set, ~_BLOCKABLE);
346 spin_lock_irq(&current->sighand->siglock); 337 spin_lock_irq(&current->sighand->siglock);
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index c550bba3490a..b448d33321c6 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -1,6 +1,6 @@
1/* smp.c: Sparc64 SMP support. 1/* smp.c: Sparc64 SMP support.
2 * 2 *
3 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1997, 2007 David S. Miller (davem@davemloft.net)
4 */ 4 */
5 5
6#include <linux/module.h> 6#include <linux/module.h>
@@ -28,6 +28,8 @@
28#include <asm/tlbflush.h> 28#include <asm/tlbflush.h>
29#include <asm/mmu_context.h> 29#include <asm/mmu_context.h>
30#include <asm/cpudata.h> 30#include <asm/cpudata.h>
31#include <asm/hvtramp.h>
32#include <asm/io.h>
31 33
32#include <asm/irq.h> 34#include <asm/irq.h>
33#include <asm/irq_regs.h> 35#include <asm/irq_regs.h>
@@ -41,18 +43,26 @@
41#include <asm/sections.h> 43#include <asm/sections.h>
42#include <asm/prom.h> 44#include <asm/prom.h>
43#include <asm/mdesc.h> 45#include <asm/mdesc.h>
46#include <asm/ldc.h>
47#include <asm/hypervisor.h>
44 48
45extern void calibrate_delay(void); 49extern void calibrate_delay(void);
46 50
47/* Please don't make this stuff initdata!!! --DaveM */ 51int sparc64_multi_core __read_mostly;
48unsigned char boot_cpu_id;
49 52
53cpumask_t cpu_possible_map __read_mostly = CPU_MASK_NONE;
50cpumask_t cpu_online_map __read_mostly = CPU_MASK_NONE; 54cpumask_t cpu_online_map __read_mostly = CPU_MASK_NONE;
51cpumask_t phys_cpu_present_map __read_mostly = CPU_MASK_NONE;
52cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly = 55cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly =
53 { [0 ... NR_CPUS-1] = CPU_MASK_NONE }; 56 { [0 ... NR_CPUS-1] = CPU_MASK_NONE };
57cpumask_t cpu_core_map[NR_CPUS] __read_mostly =
58 { [0 ... NR_CPUS-1] = CPU_MASK_NONE };
59
60EXPORT_SYMBOL(cpu_possible_map);
61EXPORT_SYMBOL(cpu_online_map);
62EXPORT_SYMBOL(cpu_sibling_map);
63EXPORT_SYMBOL(cpu_core_map);
64
54static cpumask_t smp_commenced_mask; 65static cpumask_t smp_commenced_mask;
55static cpumask_t cpu_callout_map;
56 66
57void smp_info(struct seq_file *m) 67void smp_info(struct seq_file *m)
58{ 68{
@@ -69,18 +79,17 @@ void smp_bogo(struct seq_file *m)
69 79
70 for_each_online_cpu(i) 80 for_each_online_cpu(i)
71 seq_printf(m, 81 seq_printf(m,
72 "Cpu%dBogo\t: %lu.%02lu\n"
73 "Cpu%dClkTck\t: %016lx\n", 82 "Cpu%dClkTck\t: %016lx\n",
74 i, cpu_data(i).udelay_val / (500000/HZ),
75 (cpu_data(i).udelay_val / (5000/HZ)) % 100,
76 i, cpu_data(i).clock_tick); 83 i, cpu_data(i).clock_tick);
77} 84}
78 85
86static __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock);
87
79extern void setup_sparc64_timer(void); 88extern void setup_sparc64_timer(void);
80 89
81static volatile unsigned long callin_flag = 0; 90static volatile unsigned long callin_flag = 0;
82 91
83void __init smp_callin(void) 92void __devinit smp_callin(void)
84{ 93{
85 int cpuid = hard_smp_processor_id(); 94 int cpuid = hard_smp_processor_id();
86 95
@@ -98,8 +107,6 @@ void __init smp_callin(void)
98 107
99 local_irq_enable(); 108 local_irq_enable();
100 109
101 calibrate_delay();
102 cpu_data(cpuid).udelay_val = loops_per_jiffy;
103 callin_flag = 1; 110 callin_flag = 1;
104 __asm__ __volatile__("membar #Sync\n\t" 111 __asm__ __volatile__("membar #Sync\n\t"
105 "flush %%g6" : : : "memory"); 112 "flush %%g6" : : : "memory");
@@ -116,7 +123,9 @@ void __init smp_callin(void)
116 while (!cpu_isset(cpuid, smp_commenced_mask)) 123 while (!cpu_isset(cpuid, smp_commenced_mask))
117 rmb(); 124 rmb();
118 125
126 spin_lock(&call_lock);
119 cpu_set(cpuid, cpu_online_map); 127 cpu_set(cpuid, cpu_online_map);
128 spin_unlock(&call_lock);
120 129
121 /* idle thread is expected to have preempt disabled */ 130 /* idle thread is expected to have preempt disabled */
122 preempt_disable(); 131 preempt_disable();
@@ -264,6 +273,67 @@ static void smp_synchronize_one_tick(int cpu)
264 spin_unlock_irqrestore(&itc_sync_lock, flags); 273 spin_unlock_irqrestore(&itc_sync_lock, flags);
265} 274}
266 275
276#if defined(CONFIG_SUN_LDOMS) && defined(CONFIG_HOTPLUG_CPU)
277/* XXX Put this in some common place. XXX */
278static unsigned long kimage_addr_to_ra(void *p)
279{
280 unsigned long val = (unsigned long) p;
281
282 return kern_base + (val - KERNBASE);
283}
284
285static void ldom_startcpu_cpuid(unsigned int cpu, unsigned long thread_reg)
286{
287 extern unsigned long sparc64_ttable_tl0;
288 extern unsigned long kern_locked_tte_data;
289 extern int bigkernel;
290 struct hvtramp_descr *hdesc;
291 unsigned long trampoline_ra;
292 struct trap_per_cpu *tb;
293 u64 tte_vaddr, tte_data;
294 unsigned long hv_err;
295
296 hdesc = kzalloc(sizeof(*hdesc), GFP_KERNEL);
297 if (!hdesc) {
298 printk(KERN_ERR "ldom_startcpu_cpuid: Cannot allocate "
299 "hvtramp_descr.\n");
300 return;
301 }
302
303 hdesc->cpu = cpu;
304 hdesc->num_mappings = (bigkernel ? 2 : 1);
305
306 tb = &trap_block[cpu];
307 tb->hdesc = hdesc;
308
309 hdesc->fault_info_va = (unsigned long) &tb->fault_info;
310 hdesc->fault_info_pa = kimage_addr_to_ra(&tb->fault_info);
311
312 hdesc->thread_reg = thread_reg;
313
314 tte_vaddr = (unsigned long) KERNBASE;
315 tte_data = kern_locked_tte_data;
316
317 hdesc->maps[0].vaddr = tte_vaddr;
318 hdesc->maps[0].tte = tte_data;
319 if (bigkernel) {
320 tte_vaddr += 0x400000;
321 tte_data += 0x400000;
322 hdesc->maps[1].vaddr = tte_vaddr;
323 hdesc->maps[1].tte = tte_data;
324 }
325
326 trampoline_ra = kimage_addr_to_ra(hv_cpu_startup);
327
328 hv_err = sun4v_cpu_start(cpu, trampoline_ra,
329 kimage_addr_to_ra(&sparc64_ttable_tl0),
330 __pa(hdesc));
331 if (hv_err)
332 printk(KERN_ERR "ldom_startcpu_cpuid: sun4v_cpu_start() "
333 "gives error %lu\n", hv_err);
334}
335#endif
336
267extern void sun4v_init_mondo_queues(int use_bootmem, int cpu, int alloc, int load); 337extern void sun4v_init_mondo_queues(int use_bootmem, int cpu, int alloc, int load);
268 338
269extern unsigned long sparc64_cpu_startup; 339extern unsigned long sparc64_cpu_startup;
@@ -276,6 +346,7 @@ static struct thread_info *cpu_new_thread = NULL;
276 346
277static int __devinit smp_boot_one_cpu(unsigned int cpu) 347static int __devinit smp_boot_one_cpu(unsigned int cpu)
278{ 348{
349 struct trap_per_cpu *tb = &trap_block[cpu];
279 unsigned long entry = 350 unsigned long entry =
280 (unsigned long)(&sparc64_cpu_startup); 351 (unsigned long)(&sparc64_cpu_startup);
281 unsigned long cookie = 352 unsigned long cookie =
@@ -286,20 +357,25 @@ static int __devinit smp_boot_one_cpu(unsigned int cpu)
286 p = fork_idle(cpu); 357 p = fork_idle(cpu);
287 callin_flag = 0; 358 callin_flag = 0;
288 cpu_new_thread = task_thread_info(p); 359 cpu_new_thread = task_thread_info(p);
289 cpu_set(cpu, cpu_callout_map);
290 360
291 if (tlb_type == hypervisor) { 361 if (tlb_type == hypervisor) {
292 /* Alloc the mondo queues, cpu will load them. */ 362 /* Alloc the mondo queues, cpu will load them. */
293 sun4v_init_mondo_queues(0, cpu, 1, 0); 363 sun4v_init_mondo_queues(0, cpu, 1, 0);
294 364
295 prom_startcpu_cpuid(cpu, entry, cookie); 365#if defined(CONFIG_SUN_LDOMS) && defined(CONFIG_HOTPLUG_CPU)
366 if (ldom_domaining_enabled)
367 ldom_startcpu_cpuid(cpu,
368 (unsigned long) cpu_new_thread);
369 else
370#endif
371 prom_startcpu_cpuid(cpu, entry, cookie);
296 } else { 372 } else {
297 struct device_node *dp = of_find_node_by_cpuid(cpu); 373 struct device_node *dp = of_find_node_by_cpuid(cpu);
298 374
299 prom_startcpu(dp->node, entry, cookie); 375 prom_startcpu(dp->node, entry, cookie);
300 } 376 }
301 377
302 for (timeout = 0; timeout < 5000000; timeout++) { 378 for (timeout = 0; timeout < 50000; timeout++) {
303 if (callin_flag) 379 if (callin_flag)
304 break; 380 break;
305 udelay(100); 381 udelay(100);
@@ -309,11 +385,15 @@ static int __devinit smp_boot_one_cpu(unsigned int cpu)
309 ret = 0; 385 ret = 0;
310 } else { 386 } else {
311 printk("Processor %d is stuck.\n", cpu); 387 printk("Processor %d is stuck.\n", cpu);
312 cpu_clear(cpu, cpu_callout_map);
313 ret = -ENODEV; 388 ret = -ENODEV;
314 } 389 }
315 cpu_new_thread = NULL; 390 cpu_new_thread = NULL;
316 391
392 if (tb->hdesc) {
393 kfree(tb->hdesc);
394 tb->hdesc = NULL;
395 }
396
317 return ret; 397 return ret;
318} 398}
319 399
@@ -716,7 +796,6 @@ struct call_data_struct {
716 int wait; 796 int wait;
717}; 797};
718 798
719static __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock);
720static struct call_data_struct *call_data; 799static struct call_data_struct *call_data;
721 800
722extern unsigned long xcall_call_function; 801extern unsigned long xcall_call_function;
@@ -1148,61 +1227,14 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs)
1148 preempt_enable(); 1227 preempt_enable();
1149} 1228}
1150 1229
1151void __init smp_tick_init(void)
1152{
1153 boot_cpu_id = hard_smp_processor_id();
1154}
1155
1156/* /proc/profile writes can call this, don't __init it please. */ 1230/* /proc/profile writes can call this, don't __init it please. */
1157int setup_profiling_timer(unsigned int multiplier) 1231int setup_profiling_timer(unsigned int multiplier)
1158{ 1232{
1159 return -EINVAL; 1233 return -EINVAL;
1160} 1234}
1161 1235
1162static void __init smp_tune_scheduling(void)
1163{
1164 unsigned int smallest = ~0U;
1165 int i;
1166
1167 for (i = 0; i < NR_CPUS; i++) {
1168 unsigned int val = cpu_data(i).ecache_size;
1169
1170 if (val && val < smallest)
1171 smallest = val;
1172 }
1173
1174 /* Any value less than 256K is nonsense. */
1175 if (smallest < (256U * 1024U))
1176 smallest = 256 * 1024;
1177
1178 max_cache_size = smallest;
1179
1180 if (smallest < 1U * 1024U * 1024U)
1181 printk(KERN_INFO "Using max_cache_size of %uKB\n",
1182 smallest / 1024U);
1183 else
1184 printk(KERN_INFO "Using max_cache_size of %uMB\n",
1185 smallest / 1024U / 1024U);
1186}
1187
1188/* Constrain the number of cpus to max_cpus. */
1189void __init smp_prepare_cpus(unsigned int max_cpus) 1236void __init smp_prepare_cpus(unsigned int max_cpus)
1190{ 1237{
1191 int i;
1192
1193 if (num_possible_cpus() > max_cpus) {
1194 for_each_possible_cpu(i) {
1195 if (i != boot_cpu_id) {
1196 cpu_clear(i, phys_cpu_present_map);
1197 cpu_clear(i, cpu_present_map);
1198 if (num_possible_cpus() <= max_cpus)
1199 break;
1200 }
1201 }
1202 }
1203
1204 cpu_data(boot_cpu_id).udelay_val = loops_per_jiffy;
1205 smp_tune_scheduling();
1206} 1238}
1207 1239
1208void __devinit smp_prepare_boot_cpu(void) 1240void __devinit smp_prepare_boot_cpu(void)
@@ -1213,17 +1245,34 @@ void __devinit smp_fill_in_sib_core_maps(void)
1213{ 1245{
1214 unsigned int i; 1246 unsigned int i;
1215 1247
1216 for_each_possible_cpu(i) { 1248 for_each_present_cpu(i) {
1217 unsigned int j; 1249 unsigned int j;
1218 1250
1251 cpus_clear(cpu_core_map[i]);
1219 if (cpu_data(i).core_id == 0) { 1252 if (cpu_data(i).core_id == 0) {
1220 cpu_set(i, cpu_sibling_map[i]); 1253 cpu_set(i, cpu_core_map[i]);
1221 continue; 1254 continue;
1222 } 1255 }
1223 1256
1224 for_each_possible_cpu(j) { 1257 for_each_present_cpu(j) {
1225 if (cpu_data(i).core_id == 1258 if (cpu_data(i).core_id ==
1226 cpu_data(j).core_id) 1259 cpu_data(j).core_id)
1260 cpu_set(j, cpu_core_map[i]);
1261 }
1262 }
1263
1264 for_each_present_cpu(i) {
1265 unsigned int j;
1266
1267 cpus_clear(cpu_sibling_map[i]);
1268 if (cpu_data(i).proc_id == -1) {
1269 cpu_set(i, cpu_sibling_map[i]);
1270 continue;
1271 }
1272
1273 for_each_present_cpu(j) {
1274 if (cpu_data(i).proc_id ==
1275 cpu_data(j).proc_id)
1227 cpu_set(j, cpu_sibling_map[i]); 1276 cpu_set(j, cpu_sibling_map[i]);
1228 } 1277 }
1229 } 1278 }
@@ -1250,18 +1299,112 @@ int __cpuinit __cpu_up(unsigned int cpu)
1250 return ret; 1299 return ret;
1251} 1300}
1252 1301
1253void __init smp_cpus_done(unsigned int max_cpus) 1302#ifdef CONFIG_HOTPLUG_CPU
1303void cpu_play_dead(void)
1254{ 1304{
1255 unsigned long bogosum = 0; 1305 int cpu = smp_processor_id();
1306 unsigned long pstate;
1307
1308 idle_task_exit();
1309
1310 if (tlb_type == hypervisor) {
1311 struct trap_per_cpu *tb = &trap_block[cpu];
1312
1313 sun4v_cpu_qconf(HV_CPU_QUEUE_CPU_MONDO,
1314 tb->cpu_mondo_pa, 0);
1315 sun4v_cpu_qconf(HV_CPU_QUEUE_DEVICE_MONDO,
1316 tb->dev_mondo_pa, 0);
1317 sun4v_cpu_qconf(HV_CPU_QUEUE_RES_ERROR,
1318 tb->resum_mondo_pa, 0);
1319 sun4v_cpu_qconf(HV_CPU_QUEUE_NONRES_ERROR,
1320 tb->nonresum_mondo_pa, 0);
1321 }
1322
1323 cpu_clear(cpu, smp_commenced_mask);
1324 membar_safe("#Sync");
1325
1326 local_irq_disable();
1327
1328 __asm__ __volatile__(
1329 "rdpr %%pstate, %0\n\t"
1330 "wrpr %0, %1, %%pstate"
1331 : "=r" (pstate)
1332 : "i" (PSTATE_IE));
1333
1334 while (1)
1335 barrier();
1336}
1337
1338int __cpu_disable(void)
1339{
1340 int cpu = smp_processor_id();
1341 cpuinfo_sparc *c;
1256 int i; 1342 int i;
1257 1343
1258 for_each_online_cpu(i) 1344 for_each_cpu_mask(i, cpu_core_map[cpu])
1259 bogosum += cpu_data(i).udelay_val; 1345 cpu_clear(cpu, cpu_core_map[i]);
1260 printk("Total of %ld processors activated " 1346 cpus_clear(cpu_core_map[cpu]);
1261 "(%lu.%02lu BogoMIPS).\n", 1347
1262 (long) num_online_cpus(), 1348 for_each_cpu_mask(i, cpu_sibling_map[cpu])
1263 bogosum/(500000/HZ), 1349 cpu_clear(cpu, cpu_sibling_map[i]);
1264 (bogosum/(5000/HZ))%100); 1350 cpus_clear(cpu_sibling_map[cpu]);
1351
1352 c = &cpu_data(cpu);
1353
1354 c->core_id = 0;
1355 c->proc_id = -1;
1356
1357 spin_lock(&call_lock);
1358 cpu_clear(cpu, cpu_online_map);
1359 spin_unlock(&call_lock);
1360
1361 smp_wmb();
1362
1363 /* Make sure no interrupts point to this cpu. */
1364 fixup_irqs();
1365
1366 local_irq_enable();
1367 mdelay(1);
1368 local_irq_disable();
1369
1370 return 0;
1371}
1372
1373void __cpu_die(unsigned int cpu)
1374{
1375 int i;
1376
1377 for (i = 0; i < 100; i++) {
1378 smp_rmb();
1379 if (!cpu_isset(cpu, smp_commenced_mask))
1380 break;
1381 msleep(100);
1382 }
1383 if (cpu_isset(cpu, smp_commenced_mask)) {
1384 printk(KERN_ERR "CPU %u didn't die...\n", cpu);
1385 } else {
1386#if defined(CONFIG_SUN_LDOMS)
1387 unsigned long hv_err;
1388 int limit = 100;
1389
1390 do {
1391 hv_err = sun4v_cpu_stop(cpu);
1392 if (hv_err == HV_EOK) {
1393 cpu_clear(cpu, cpu_present_map);
1394 break;
1395 }
1396 } while (--limit > 0);
1397 if (limit <= 0) {
1398 printk(KERN_ERR "sun4v_cpu_stop() fails err=%lu\n",
1399 hv_err);
1400 }
1401#endif
1402 }
1403}
1404#endif
1405
1406void __init smp_cpus_done(unsigned int max_cpus)
1407{
1265} 1408}
1266 1409
1267void smp_send_reschedule(int cpu) 1410void smp_send_reschedule(int cpu)
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index d00f51a5683f..d270c2f0be0f 100644
--- a/arch/sparc64/kernel/sparc64_ksyms.c
+++ b/arch/sparc64/kernel/sparc64_ksyms.c
@@ -1,7 +1,6 @@
1/* $Id: sparc64_ksyms.c,v 1.121 2002/02/09 19:49:31 davem Exp $ 1/* arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
2 * arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
3 * 2 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net)
5 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
6 * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz) 5 * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz)
7 */ 6 */
@@ -24,10 +23,10 @@
24#include <linux/syscalls.h> 23#include <linux/syscalls.h>
25#include <linux/percpu.h> 24#include <linux/percpu.h>
26#include <linux/init.h> 25#include <linux/init.h>
26#include <linux/rwsem.h>
27#include <net/compat.h> 27#include <net/compat.h>
28 28
29#include <asm/oplib.h> 29#include <asm/oplib.h>
30#include <asm/delay.h>
31#include <asm/system.h> 30#include <asm/system.h>
32#include <asm/auxio.h> 31#include <asm/auxio.h>
33#include <asm/pgtable.h> 32#include <asm/pgtable.h>
@@ -58,7 +57,6 @@
58#include <asm/ns87303.h> 57#include <asm/ns87303.h>
59#include <asm/timer.h> 58#include <asm/timer.h>
60#include <asm/cpudata.h> 59#include <asm/cpudata.h>
61#include <asm/rwsem.h>
62 60
63struct poll { 61struct poll {
64 int fd; 62 int fd;
@@ -124,10 +122,6 @@ EXPORT_SYMBOL(__write_lock);
124EXPORT_SYMBOL(__write_unlock); 122EXPORT_SYMBOL(__write_unlock);
125EXPORT_SYMBOL(__write_trylock); 123EXPORT_SYMBOL(__write_trylock);
126 124
127/* CPU online map and active count. */
128EXPORT_SYMBOL(cpu_online_map);
129EXPORT_SYMBOL(phys_cpu_present_map);
130
131EXPORT_SYMBOL(smp_call_function); 125EXPORT_SYMBOL(smp_call_function);
132#endif /* CONFIG_SMP */ 126#endif /* CONFIG_SMP */
133 127
@@ -286,6 +280,7 @@ EXPORT_SYMBOL(sys_getgid);
286EXPORT_SYMBOL(svr4_getcontext); 280EXPORT_SYMBOL(svr4_getcontext);
287EXPORT_SYMBOL(svr4_setcontext); 281EXPORT_SYMBOL(svr4_setcontext);
288EXPORT_SYMBOL(compat_sys_ioctl); 282EXPORT_SYMBOL(compat_sys_ioctl);
283EXPORT_SYMBOL(sys_ioctl);
289EXPORT_SYMBOL(sparc32_open); 284EXPORT_SYMBOL(sparc32_open);
290#endif 285#endif
291 286
@@ -330,19 +325,12 @@ EXPORT_SYMBOL(memset);
330EXPORT_SYMBOL(memmove); 325EXPORT_SYMBOL(memmove);
331EXPORT_SYMBOL(strncmp); 326EXPORT_SYMBOL(strncmp);
332 327
333/* Delay routines. */
334EXPORT_SYMBOL(__udelay);
335EXPORT_SYMBOL(__ndelay);
336EXPORT_SYMBOL(__const_udelay);
337EXPORT_SYMBOL(__delay);
338
339void VISenter(void); 328void VISenter(void);
340/* RAID code needs this */ 329/* RAID code needs this */
341EXPORT_SYMBOL(VISenter); 330EXPORT_SYMBOL(VISenter);
342 331
343/* for input/keybdev */ 332/* for input/keybdev */
344EXPORT_SYMBOL(sun_do_break); 333EXPORT_SYMBOL(sun_do_break);
345EXPORT_SYMBOL(serial_console);
346EXPORT_SYMBOL(stop_a_enabled); 334EXPORT_SYMBOL(stop_a_enabled);
347 335
348#ifdef CONFIG_DEBUG_BUGVERBOSE 336#ifdef CONFIG_DEBUG_BUGVERBOSE
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
index abd83129b2e7..e8dce90d05d4 100644
--- a/arch/sparc64/kernel/sys_sparc32.c
+++ b/arch/sparc64/kernel/sys_sparc32.c
@@ -1,8 +1,7 @@
1/* $Id: sys_sparc32.c,v 1.184 2002/02/09 19:49:31 davem Exp $ 1/* sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
2 * sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
3 * 2 *
4 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 3 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
5 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1997, 2007 David S. Miller (davem@davemloft.net)
6 * 5 *
7 * These routines maintain argument size conversion between 32bit and 64bit 6 * These routines maintain argument size conversion between 32bit and 64bit
8 * environment. 7 * environment.
@@ -1028,3 +1027,10 @@ long compat_sync_file_range(int fd, unsigned long off_high, unsigned long off_lo
1028 (nb_high << 32) | nb_low, 1027 (nb_high << 32) | nb_low,
1029 flags); 1028 flags);
1030} 1029}
1030
1031asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offhi, u32 offlo,
1032 u32 lenhi, u32 lenlo)
1033{
1034 return sys_fallocate(fd, mode, ((loff_t)offhi << 32) | offlo,
1035 ((loff_t)lenhi << 32) | lenlo);
1036}
diff --git a/arch/sparc64/kernel/sysfs.c b/arch/sparc64/kernel/sysfs.c
new file mode 100644
index 000000000000..52816c7be0b9
--- /dev/null
+++ b/arch/sparc64/kernel/sysfs.c
@@ -0,0 +1,295 @@
1/* sysfs.c: Toplogy sysfs support code for sparc64.
2 *
3 * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
4 */
5#include <linux/sysdev.h>
6#include <linux/cpu.h>
7#include <linux/smp.h>
8#include <linux/percpu.h>
9#include <linux/init.h>
10
11#include <asm/hypervisor.h>
12#include <asm/spitfire.h>
13
14static DEFINE_PER_CPU(struct hv_mmu_statistics, mmu_stats) __attribute__((aligned(64)));
15
16#define SHOW_MMUSTAT_ULONG(NAME) \
17static ssize_t show_##NAME(struct sys_device *dev, char *buf) \
18{ \
19 struct hv_mmu_statistics *p = &per_cpu(mmu_stats, dev->id); \
20 return sprintf(buf, "%lu\n", p->NAME); \
21} \
22static SYSDEV_ATTR(NAME, 0444, show_##NAME, NULL)
23
24SHOW_MMUSTAT_ULONG(immu_tsb_hits_ctx0_8k_tte);
25SHOW_MMUSTAT_ULONG(immu_tsb_ticks_ctx0_8k_tte);
26SHOW_MMUSTAT_ULONG(immu_tsb_hits_ctx0_64k_tte);
27SHOW_MMUSTAT_ULONG(immu_tsb_ticks_ctx0_64k_tte);
28SHOW_MMUSTAT_ULONG(immu_tsb_hits_ctx0_4mb_tte);
29SHOW_MMUSTAT_ULONG(immu_tsb_ticks_ctx0_4mb_tte);
30SHOW_MMUSTAT_ULONG(immu_tsb_hits_ctx0_256mb_tte);
31SHOW_MMUSTAT_ULONG(immu_tsb_ticks_ctx0_256mb_tte);
32SHOW_MMUSTAT_ULONG(immu_tsb_hits_ctxnon0_8k_tte);
33SHOW_MMUSTAT_ULONG(immu_tsb_ticks_ctxnon0_8k_tte);
34SHOW_MMUSTAT_ULONG(immu_tsb_hits_ctxnon0_64k_tte);
35SHOW_MMUSTAT_ULONG(immu_tsb_ticks_ctxnon0_64k_tte);
36SHOW_MMUSTAT_ULONG(immu_tsb_hits_ctxnon0_4mb_tte);
37SHOW_MMUSTAT_ULONG(immu_tsb_ticks_ctxnon0_4mb_tte);
38SHOW_MMUSTAT_ULONG(immu_tsb_hits_ctxnon0_256mb_tte);
39SHOW_MMUSTAT_ULONG(immu_tsb_ticks_ctxnon0_256mb_tte);
40SHOW_MMUSTAT_ULONG(dmmu_tsb_hits_ctx0_8k_tte);
41SHOW_MMUSTAT_ULONG(dmmu_tsb_ticks_ctx0_8k_tte);
42SHOW_MMUSTAT_ULONG(dmmu_tsb_hits_ctx0_64k_tte);
43SHOW_MMUSTAT_ULONG(dmmu_tsb_ticks_ctx0_64k_tte);
44SHOW_MMUSTAT_ULONG(dmmu_tsb_hits_ctx0_4mb_tte);
45SHOW_MMUSTAT_ULONG(dmmu_tsb_ticks_ctx0_4mb_tte);
46SHOW_MMUSTAT_ULONG(dmmu_tsb_hits_ctx0_256mb_tte);
47SHOW_MMUSTAT_ULONG(dmmu_tsb_ticks_ctx0_256mb_tte);
48SHOW_MMUSTAT_ULONG(dmmu_tsb_hits_ctxnon0_8k_tte);
49SHOW_MMUSTAT_ULONG(dmmu_tsb_ticks_ctxnon0_8k_tte);
50SHOW_MMUSTAT_ULONG(dmmu_tsb_hits_ctxnon0_64k_tte);
51SHOW_MMUSTAT_ULONG(dmmu_tsb_ticks_ctxnon0_64k_tte);
52SHOW_MMUSTAT_ULONG(dmmu_tsb_hits_ctxnon0_4mb_tte);
53SHOW_MMUSTAT_ULONG(dmmu_tsb_ticks_ctxnon0_4mb_tte);
54SHOW_MMUSTAT_ULONG(dmmu_tsb_hits_ctxnon0_256mb_tte);
55SHOW_MMUSTAT_ULONG(dmmu_tsb_ticks_ctxnon0_256mb_tte);
56
57static struct attribute *mmu_stat_attrs[] = {
58 &attr_immu_tsb_hits_ctx0_8k_tte.attr,
59 &attr_immu_tsb_ticks_ctx0_8k_tte.attr,
60 &attr_immu_tsb_hits_ctx0_64k_tte.attr,
61 &attr_immu_tsb_ticks_ctx0_64k_tte.attr,
62 &attr_immu_tsb_hits_ctx0_4mb_tte.attr,
63 &attr_immu_tsb_ticks_ctx0_4mb_tte.attr,
64 &attr_immu_tsb_hits_ctx0_256mb_tte.attr,
65 &attr_immu_tsb_ticks_ctx0_256mb_tte.attr,
66 &attr_immu_tsb_hits_ctxnon0_8k_tte.attr,
67 &attr_immu_tsb_ticks_ctxnon0_8k_tte.attr,
68 &attr_immu_tsb_hits_ctxnon0_64k_tte.attr,
69 &attr_immu_tsb_ticks_ctxnon0_64k_tte.attr,
70 &attr_immu_tsb_hits_ctxnon0_4mb_tte.attr,
71 &attr_immu_tsb_ticks_ctxnon0_4mb_tte.attr,
72 &attr_immu_tsb_hits_ctxnon0_256mb_tte.attr,
73 &attr_immu_tsb_ticks_ctxnon0_256mb_tte.attr,
74 &attr_dmmu_tsb_hits_ctx0_8k_tte.attr,
75 &attr_dmmu_tsb_ticks_ctx0_8k_tte.attr,
76 &attr_dmmu_tsb_hits_ctx0_64k_tte.attr,
77 &attr_dmmu_tsb_ticks_ctx0_64k_tte.attr,
78 &attr_dmmu_tsb_hits_ctx0_4mb_tte.attr,
79 &attr_dmmu_tsb_ticks_ctx0_4mb_tte.attr,
80 &attr_dmmu_tsb_hits_ctx0_256mb_tte.attr,
81 &attr_dmmu_tsb_ticks_ctx0_256mb_tte.attr,
82 &attr_dmmu_tsb_hits_ctxnon0_8k_tte.attr,
83 &attr_dmmu_tsb_ticks_ctxnon0_8k_tte.attr,
84 &attr_dmmu_tsb_hits_ctxnon0_64k_tte.attr,
85 &attr_dmmu_tsb_ticks_ctxnon0_64k_tte.attr,
86 &attr_dmmu_tsb_hits_ctxnon0_4mb_tte.attr,
87 &attr_dmmu_tsb_ticks_ctxnon0_4mb_tte.attr,
88 &attr_dmmu_tsb_hits_ctxnon0_256mb_tte.attr,
89 &attr_dmmu_tsb_ticks_ctxnon0_256mb_tte.attr,
90 NULL,
91};
92
93static struct attribute_group mmu_stat_group = {
94 .attrs = mmu_stat_attrs,
95 .name = "mmu_stats",
96};
97
98/* XXX convert to rusty's on_one_cpu */
99static unsigned long run_on_cpu(unsigned long cpu,
100 unsigned long (*func)(unsigned long),
101 unsigned long arg)
102{
103 cpumask_t old_affinity = current->cpus_allowed;
104 unsigned long ret;
105
106 /* should return -EINVAL to userspace */
107 if (set_cpus_allowed(current, cpumask_of_cpu(cpu)))
108 return 0;
109
110 ret = func(arg);
111
112 set_cpus_allowed(current, old_affinity);
113
114 return ret;
115}
116
117static unsigned long read_mmustat_enable(unsigned long junk)
118{
119 unsigned long ra = 0;
120
121 sun4v_mmustat_info(&ra);
122
123 return ra != 0;
124}
125
126static unsigned long write_mmustat_enable(unsigned long val)
127{
128 unsigned long ra, orig_ra;
129
130 if (val)
131 ra = __pa(&per_cpu(mmu_stats, smp_processor_id()));
132 else
133 ra = 0UL;
134
135 return sun4v_mmustat_conf(ra, &orig_ra);
136}
137
138static ssize_t show_mmustat_enable(struct sys_device *s, char *buf)
139{
140 unsigned long val = run_on_cpu(s->id, read_mmustat_enable, 0);
141 return sprintf(buf, "%lx\n", val);
142}
143
144static ssize_t store_mmustat_enable(struct sys_device *s, const char *buf, size_t count)
145{
146 unsigned long val, err;
147 int ret = sscanf(buf, "%ld", &val);
148
149 if (ret != 1)
150 return -EINVAL;
151
152 err = run_on_cpu(s->id, write_mmustat_enable, val);
153 if (err)
154 return -EIO;
155
156 return count;
157}
158
159static SYSDEV_ATTR(mmustat_enable, 0644, show_mmustat_enable, store_mmustat_enable);
160
161static int mmu_stats_supported;
162
163static int register_mmu_stats(struct sys_device *s)
164{
165 if (!mmu_stats_supported)
166 return 0;
167 sysdev_create_file(s, &attr_mmustat_enable);
168 return sysfs_create_group(&s->kobj, &mmu_stat_group);
169}
170
171#ifdef CONFIG_HOTPLUG_CPU
172static void unregister_mmu_stats(struct sys_device *s)
173{
174 if (!mmu_stats_supported)
175 return;
176 sysfs_remove_group(&s->kobj, &mmu_stat_group);
177 sysdev_remove_file(s, &attr_mmustat_enable);
178}
179#endif
180
181#define SHOW_CPUDATA_ULONG_NAME(NAME, MEMBER) \
182static ssize_t show_##NAME(struct sys_device *dev, char *buf) \
183{ \
184 cpuinfo_sparc *c = &cpu_data(dev->id); \
185 return sprintf(buf, "%lu\n", c->MEMBER); \
186}
187
188#define SHOW_CPUDATA_UINT_NAME(NAME, MEMBER) \
189static ssize_t show_##NAME(struct sys_device *dev, char *buf) \
190{ \
191 cpuinfo_sparc *c = &cpu_data(dev->id); \
192 return sprintf(buf, "%u\n", c->MEMBER); \
193}
194
195SHOW_CPUDATA_ULONG_NAME(clock_tick, clock_tick);
196SHOW_CPUDATA_UINT_NAME(l1_dcache_size, dcache_size);
197SHOW_CPUDATA_UINT_NAME(l1_dcache_line_size, dcache_line_size);
198SHOW_CPUDATA_UINT_NAME(l1_icache_size, icache_size);
199SHOW_CPUDATA_UINT_NAME(l1_icache_line_size, icache_line_size);
200SHOW_CPUDATA_UINT_NAME(l2_cache_size, ecache_size);
201SHOW_CPUDATA_UINT_NAME(l2_cache_line_size, ecache_line_size);
202
203static struct sysdev_attribute cpu_core_attrs[] = {
204 _SYSDEV_ATTR(clock_tick, 0444, show_clock_tick, NULL),
205 _SYSDEV_ATTR(l1_dcache_size, 0444, show_l1_dcache_size, NULL),
206 _SYSDEV_ATTR(l1_dcache_line_size, 0444, show_l1_dcache_line_size, NULL),
207 _SYSDEV_ATTR(l1_icache_size, 0444, show_l1_icache_size, NULL),
208 _SYSDEV_ATTR(l1_icache_line_size, 0444, show_l1_icache_line_size, NULL),
209 _SYSDEV_ATTR(l2_cache_size, 0444, show_l2_cache_size, NULL),
210 _SYSDEV_ATTR(l2_cache_line_size, 0444, show_l2_cache_line_size, NULL),
211};
212
213static DEFINE_PER_CPU(struct cpu, cpu_devices);
214
215static void register_cpu_online(unsigned int cpu)
216{
217 struct cpu *c = &per_cpu(cpu_devices, cpu);
218 struct sys_device *s = &c->sysdev;
219 int i;
220
221 for (i = 0; i < ARRAY_SIZE(cpu_core_attrs); i++)
222 sysdev_create_file(s, &cpu_core_attrs[i]);
223
224 register_mmu_stats(s);
225}
226
227#ifdef CONFIG_HOTPLUG_CPU
228static void unregister_cpu_online(unsigned int cpu)
229{
230 struct cpu *c = &per_cpu(cpu_devices, cpu);
231 struct sys_device *s = &c->sysdev;
232 int i;
233
234 unregister_mmu_stats(s);
235 for (i = 0; i < ARRAY_SIZE(cpu_core_attrs); i++)
236 sysdev_remove_file(s, &cpu_core_attrs[i]);
237}
238#endif
239
240static int __cpuinit sysfs_cpu_notify(struct notifier_block *self,
241 unsigned long action, void *hcpu)
242{
243 unsigned int cpu = (unsigned int)(long)hcpu;
244
245 switch (action) {
246 case CPU_ONLINE:
247 case CPU_ONLINE_FROZEN:
248 register_cpu_online(cpu);
249 break;
250#ifdef CONFIG_HOTPLUG_CPU
251 case CPU_DEAD:
252 case CPU_DEAD_FROZEN:
253 unregister_cpu_online(cpu);
254 break;
255#endif
256 }
257 return NOTIFY_OK;
258}
259
260static struct notifier_block __cpuinitdata sysfs_cpu_nb = {
261 .notifier_call = sysfs_cpu_notify,
262};
263
264static void __init check_mmu_stats(void)
265{
266 unsigned long dummy1, err;
267
268 if (tlb_type != hypervisor)
269 return;
270
271 err = sun4v_mmustat_info(&dummy1);
272 if (!err)
273 mmu_stats_supported = 1;
274}
275
276static int __init topology_init(void)
277{
278 int cpu;
279
280 check_mmu_stats();
281
282 register_cpu_notifier(&sysfs_cpu_nb);
283
284 for_each_possible_cpu(cpu) {
285 struct cpu *c = &per_cpu(cpu_devices, cpu);
286
287 register_cpu(c, cpu);
288 if (cpu_online(cpu))
289 register_cpu_online(cpu);
290 }
291
292 return 0;
293}
294
295subsys_initcall(topology_init);
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S
index 8765e32155a0..06d10907d8ce 100644
--- a/arch/sparc64/kernel/systbls.S
+++ b/arch/sparc64/kernel/systbls.S
@@ -1,8 +1,7 @@
1/* $Id: systbls.S,v 1.81 2002/02/08 03:57:14 davem Exp $ 1/* systbls.S: System call entry point tables for OS compatibility.
2 * systbls.S: System call entry point tables for OS compatibility.
3 * The native Linux system call table lives here also. 2 * The native Linux system call table lives here also.
4 * 3 *
5 * Copyright (C) 1995, 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995, 1996, 2007 David S. Miller (davem@davemloft.net)
6 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 5 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
7 * 6 *
8 * Based upon preliminary work which is: 7 * Based upon preliminary work which is:
@@ -81,7 +80,7 @@ sys_call_table32:
81 .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll, sys_unshare 80 .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll, sys_unshare
82/*300*/ .word compat_sys_set_robust_list, compat_sys_get_robust_list, compat_sys_migrate_pages, compat_sys_mbind, compat_sys_get_mempolicy 81/*300*/ .word compat_sys_set_robust_list, compat_sys_get_robust_list, compat_sys_migrate_pages, compat_sys_mbind, compat_sys_get_mempolicy
83 .word compat_sys_set_mempolicy, compat_sys_kexec_load, compat_sys_move_pages, sys_getcpu, compat_sys_epoll_pwait 82 .word compat_sys_set_mempolicy, compat_sys_kexec_load, compat_sys_move_pages, sys_getcpu, compat_sys_epoll_pwait
84/*310*/ .word compat_sys_utimensat, compat_sys_signalfd, compat_sys_timerfd, sys_eventfd 83/*310*/ .word compat_sys_utimensat, compat_sys_signalfd, compat_sys_timerfd, sys_eventfd, compat_sys_fallocate
85 84
86#endif /* CONFIG_COMPAT */ 85#endif /* CONFIG_COMPAT */
87 86
@@ -153,7 +152,7 @@ sys_call_table:
153 .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare 152 .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare
154/*300*/ .word sys_set_robust_list, sys_get_robust_list, sys_migrate_pages, sys_mbind, sys_get_mempolicy 153/*300*/ .word sys_set_robust_list, sys_get_robust_list, sys_migrate_pages, sys_mbind, sys_get_mempolicy
155 .word sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait 154 .word sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait
156/*310*/ .word sys_utimensat, sys_signalfd, sys_timerfd, sys_eventfd 155/*310*/ .word sys_utimensat, sys_signalfd, sys_timerfd, sys_eventfd, sys_fallocate
157 156
158#if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ 157#if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \
159 defined(CONFIG_SOLARIS_EMUL_MODULE) 158 defined(CONFIG_SOLARIS_EMUL_MODULE)
@@ -272,6 +271,6 @@ sunos_sys_table:
272 .word sunos_nosys, sunos_nosys, sunos_nosys 271 .word sunos_nosys, sunos_nosys, sunos_nosys
273 .word sunos_nosys 272 .word sunos_nosys
274/*310*/ .word sunos_nosys, sunos_nosys, sunos_nosys 273/*310*/ .word sunos_nosys, sunos_nosys, sunos_nosys
275 .word sunos_nosys 274 .word sunos_nosys, sunos_nosys
276 275
277#endif 276#endif
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index a31a0439244f..49063ca2efcd 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -403,58 +403,9 @@ static struct sparc64_tick_ops hbtick_operations __read_mostly = {
403 403
404static unsigned long timer_ticks_per_nsec_quotient __read_mostly; 404static unsigned long timer_ticks_per_nsec_quotient __read_mostly;
405 405
406#define TICK_SIZE (tick_nsec / 1000) 406int update_persistent_clock(struct timespec now)
407
408#define USEC_AFTER 500000
409#define USEC_BEFORE 500000
410
411static void sync_cmos_clock(unsigned long dummy);
412
413static DEFINE_TIMER(sync_cmos_timer, sync_cmos_clock, 0, 0);
414
415static void sync_cmos_clock(unsigned long dummy)
416{ 407{
417 struct timeval now, next; 408 return set_rtc_mmss(now.tv_sec);
418 int fail = 1;
419
420 /*
421 * If we have an externally synchronized Linux clock, then update
422 * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
423 * called as close as possible to 500 ms before the new second starts.
424 * This code is run on a timer. If the clock is set, that timer
425 * may not expire at the correct time. Thus, we adjust...
426 */
427 if (!ntp_synced())
428 /*
429 * Not synced, exit, do not restart a timer (if one is
430 * running, let it run out).
431 */
432 return;
433
434 do_gettimeofday(&now);
435 if (now.tv_usec >= USEC_AFTER - ((unsigned) TICK_SIZE) / 2 &&
436 now.tv_usec <= USEC_BEFORE + ((unsigned) TICK_SIZE) / 2)
437 fail = set_rtc_mmss(now.tv_sec);
438
439 next.tv_usec = USEC_AFTER - now.tv_usec;
440 if (next.tv_usec <= 0)
441 next.tv_usec += USEC_PER_SEC;
442
443 if (!fail)
444 next.tv_sec = 659;
445 else
446 next.tv_sec = 0;
447
448 if (next.tv_usec >= USEC_PER_SEC) {
449 next.tv_sec++;
450 next.tv_usec -= USEC_PER_SEC;
451 }
452 mod_timer(&sync_cmos_timer, jiffies + timeval_to_jiffies(&next));
453}
454
455void notify_arch_cmos_timer(void)
456{
457 mod_timer(&sync_cmos_timer, jiffies + 1);
458} 409}
459 410
460/* Kick start a stopped clock (procedure from the Sun NVRAM/hostid FAQ). */ 411/* Kick start a stopped clock (procedure from the Sun NVRAM/hostid FAQ). */
@@ -835,7 +786,7 @@ static int __init clock_init(void)
835 return 0; 786 return 0;
836 } 787 }
837 788
838 return of_register_driver(&clock_driver, &of_bus_type); 789 return of_register_driver(&clock_driver, &of_platform_bus_type);
839} 790}
840 791
841/* Must be after subsys_initcall() so that busses are probed. Must 792/* Must be after subsys_initcall() so that busses are probed. Must
@@ -849,9 +800,6 @@ static unsigned long sparc64_init_timers(void)
849{ 800{
850 struct device_node *dp; 801 struct device_node *dp;
851 unsigned long clock; 802 unsigned long clock;
852#ifdef CONFIG_SMP
853 extern void smp_tick_init(void);
854#endif
855 803
856 dp = of_find_node_by_path("/"); 804 dp = of_find_node_by_path("/");
857 if (tlb_type == spitfire) { 805 if (tlb_type == spitfire) {
@@ -874,10 +822,6 @@ static unsigned long sparc64_init_timers(void)
874 clock = of_getintprop_default(dp, "stick-frequency", 0); 822 clock = of_getintprop_default(dp, "stick-frequency", 0);
875 } 823 }
876 824
877#ifdef CONFIG_SMP
878 smp_tick_init();
879#endif
880
881 return clock; 825 return clock;
882} 826}
883 827
@@ -938,6 +882,7 @@ static void sparc64_timer_setup(enum clock_event_mode mode,
938{ 882{
939 switch (mode) { 883 switch (mode) {
940 case CLOCK_EVT_MODE_ONESHOT: 884 case CLOCK_EVT_MODE_ONESHOT:
885 case CLOCK_EVT_MODE_RESUME:
941 break; 886 break;
942 887
943 case CLOCK_EVT_MODE_SHUTDOWN: 888 case CLOCK_EVT_MODE_SHUTDOWN:
@@ -1038,10 +983,31 @@ static void __init setup_clockevent_multiplier(unsigned long hz)
1038 sparc64_clockevent.mult = mult; 983 sparc64_clockevent.mult = mult;
1039} 984}
1040 985
986static unsigned long tb_ticks_per_usec __read_mostly;
987
988void __delay(unsigned long loops)
989{
990 unsigned long bclock, now;
991
992 bclock = tick_ops->get_tick();
993 do {
994 now = tick_ops->get_tick();
995 } while ((now-bclock) < loops);
996}
997EXPORT_SYMBOL(__delay);
998
999void udelay(unsigned long usecs)
1000{
1001 __delay(tb_ticks_per_usec * usecs);
1002}
1003EXPORT_SYMBOL(udelay);
1004
1041void __init time_init(void) 1005void __init time_init(void)
1042{ 1006{
1043 unsigned long clock = sparc64_init_timers(); 1007 unsigned long clock = sparc64_init_timers();
1044 1008
1009 tb_ticks_per_usec = clock / USEC_PER_SEC;
1010
1045 timer_ticks_per_nsec_quotient = 1011 timer_ticks_per_nsec_quotient =
1046 clocksource_hz2mult(clock, SPARC64_NSEC_PER_CYC_SHIFT); 1012 clocksource_hz2mult(clock, SPARC64_NSEC_PER_CYC_SHIFT);
1047 1013
@@ -1420,6 +1386,78 @@ static int bq4802_set_rtc_time(struct rtc_time *time)
1420 1386
1421 return 0; 1387 return 0;
1422} 1388}
1389
1390static void cmos_get_rtc_time(struct rtc_time *rtc_tm)
1391{
1392 unsigned char ctrl;
1393
1394 rtc_tm->tm_sec = CMOS_READ(RTC_SECONDS);
1395 rtc_tm->tm_min = CMOS_READ(RTC_MINUTES);
1396 rtc_tm->tm_hour = CMOS_READ(RTC_HOURS);
1397 rtc_tm->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH);
1398 rtc_tm->tm_mon = CMOS_READ(RTC_MONTH);
1399 rtc_tm->tm_year = CMOS_READ(RTC_YEAR);
1400 rtc_tm->tm_wday = CMOS_READ(RTC_DAY_OF_WEEK);
1401
1402 ctrl = CMOS_READ(RTC_CONTROL);
1403 if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
1404 BCD_TO_BIN(rtc_tm->tm_sec);
1405 BCD_TO_BIN(rtc_tm->tm_min);
1406 BCD_TO_BIN(rtc_tm->tm_hour);
1407 BCD_TO_BIN(rtc_tm->tm_mday);
1408 BCD_TO_BIN(rtc_tm->tm_mon);
1409 BCD_TO_BIN(rtc_tm->tm_year);
1410 BCD_TO_BIN(rtc_tm->tm_wday);
1411 }
1412
1413 if (rtc_tm->tm_year <= 69)
1414 rtc_tm->tm_year += 100;
1415
1416 rtc_tm->tm_mon--;
1417}
1418
1419static int cmos_set_rtc_time(struct rtc_time *rtc_tm)
1420{
1421 unsigned char mon, day, hrs, min, sec;
1422 unsigned char save_control, save_freq_select;
1423 unsigned int yrs;
1424
1425 yrs = rtc_tm->tm_year;
1426 mon = rtc_tm->tm_mon + 1;
1427 day = rtc_tm->tm_mday;
1428 hrs = rtc_tm->tm_hour;
1429 min = rtc_tm->tm_min;
1430 sec = rtc_tm->tm_sec;
1431
1432 if (yrs >= 100)
1433 yrs -= 100;
1434
1435 if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
1436 BIN_TO_BCD(sec);
1437 BIN_TO_BCD(min);
1438 BIN_TO_BCD(hrs);
1439 BIN_TO_BCD(day);
1440 BIN_TO_BCD(mon);
1441 BIN_TO_BCD(yrs);
1442 }
1443
1444 save_control = CMOS_READ(RTC_CONTROL);
1445 CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL);
1446 save_freq_select = CMOS_READ(RTC_FREQ_SELECT);
1447 CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT);
1448
1449 CMOS_WRITE(yrs, RTC_YEAR);
1450 CMOS_WRITE(mon, RTC_MONTH);
1451 CMOS_WRITE(day, RTC_DAY_OF_MONTH);
1452 CMOS_WRITE(hrs, RTC_HOURS);
1453 CMOS_WRITE(min, RTC_MINUTES);
1454 CMOS_WRITE(sec, RTC_SECONDS);
1455
1456 CMOS_WRITE(save_control, RTC_CONTROL);
1457 CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
1458
1459 return 0;
1460}
1423#endif /* CONFIG_PCI */ 1461#endif /* CONFIG_PCI */
1424 1462
1425struct mini_rtc_ops { 1463struct mini_rtc_ops {
@@ -1442,6 +1480,11 @@ static struct mini_rtc_ops bq4802_rtc_ops = {
1442 .get_rtc_time = bq4802_get_rtc_time, 1480 .get_rtc_time = bq4802_get_rtc_time,
1443 .set_rtc_time = bq4802_set_rtc_time, 1481 .set_rtc_time = bq4802_set_rtc_time,
1444}; 1482};
1483
1484static struct mini_rtc_ops cmos_rtc_ops = {
1485 .get_rtc_time = cmos_get_rtc_time,
1486 .set_rtc_time = cmos_set_rtc_time,
1487};
1445#endif /* CONFIG_PCI */ 1488#endif /* CONFIG_PCI */
1446 1489
1447static struct mini_rtc_ops *mini_rtc_ops; 1490static struct mini_rtc_ops *mini_rtc_ops;
@@ -1569,6 +1612,8 @@ static int __init rtc_mini_init(void)
1569#ifdef CONFIG_PCI 1612#ifdef CONFIG_PCI
1570 else if (bq4802_regs) 1613 else if (bq4802_regs)
1571 mini_rtc_ops = &bq4802_rtc_ops; 1614 mini_rtc_ops = &bq4802_rtc_ops;
1615 else if (ds1287_regs)
1616 mini_rtc_ops = &cmos_rtc_ops;
1572#endif /* CONFIG_PCI */ 1617#endif /* CONFIG_PCI */
1573 else 1618 else
1574 return -ENODEV; 1619 return -ENODEV;
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index 00a9e3286c83..6ef2d299fb10 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -2225,6 +2225,7 @@ void die_if_kernel(char *str, struct pt_regs *regs)
2225 notify_die(DIE_OOPS, str, regs, 0, 255, SIGSEGV); 2225 notify_die(DIE_OOPS, str, regs, 0, 255, SIGSEGV);
2226 __asm__ __volatile__("flushw"); 2226 __asm__ __volatile__("flushw");
2227 __show_regs(regs); 2227 __show_regs(regs);
2228 add_taint(TAINT_DIE);
2228 if (regs->tstate & TSTATE_PRIV) { 2229 if (regs->tstate & TSTATE_PRIV) {
2229 struct reg_window *rw = (struct reg_window *) 2230 struct reg_window *rw = (struct reg_window *)
2230 (regs->u_regs[UREG_FP] + STACK_BIAS); 2231 (regs->u_regs[UREG_FP] + STACK_BIAS);
diff --git a/arch/sparc64/kernel/vio.c b/arch/sparc64/kernel/vio.c
new file mode 100644
index 000000000000..3685daf5157f
--- /dev/null
+++ b/arch/sparc64/kernel/vio.c
@@ -0,0 +1,443 @@
1/* vio.c: Virtual I/O channel devices probing infrastructure.
2 *
3 * Copyright (c) 2003-2005 IBM Corp.
4 * Dave Engebretsen engebret@us.ibm.com
5 * Santiago Leon santil@us.ibm.com
6 * Hollis Blanchard <hollisb@us.ibm.com>
7 * Stephen Rothwell
8 *
9 * Adapted to sparc64 by David S. Miller davem@davemloft.net
10 */
11
12#include <linux/kernel.h>
13#include <linux/irq.h>
14#include <linux/init.h>
15
16#include <asm/mdesc.h>
17#include <asm/vio.h>
18
19static inline int find_in_proplist(const char *list, const char *match,
20 int len)
21{
22 while (len > 0) {
23 int l;
24
25 if (!strcmp(list, match))
26 return 1;
27 l = strlen(list) + 1;
28 list += l;
29 len -= l;
30 }
31 return 0;
32}
33
34static const struct vio_device_id *vio_match_device(
35 const struct vio_device_id *matches,
36 const struct vio_dev *dev)
37{
38 const char *type, *compat;
39 int len;
40
41 type = dev->type;
42 compat = dev->compat;
43 len = dev->compat_len;
44
45 while (matches->type[0] || matches->compat[0]) {
46 int match = 1;
47 if (matches->type[0])
48 match &= !strcmp(matches->type, type);
49
50 if (matches->compat[0]) {
51 match &= len &&
52 find_in_proplist(compat, matches->compat, len);
53 }
54 if (match)
55 return matches;
56 matches++;
57 }
58 return NULL;
59}
60
61static int vio_bus_match(struct device *dev, struct device_driver *drv)
62{
63 struct vio_dev *vio_dev = to_vio_dev(dev);
64 struct vio_driver *vio_drv = to_vio_driver(drv);
65 const struct vio_device_id *matches = vio_drv->id_table;
66
67 if (!matches)
68 return 0;
69
70 return vio_match_device(matches, vio_dev) != NULL;
71}
72
73static int vio_device_probe(struct device *dev)
74{
75 struct vio_dev *vdev = to_vio_dev(dev);
76 struct vio_driver *drv = to_vio_driver(dev->driver);
77 const struct vio_device_id *id;
78 int error = -ENODEV;
79
80 if (drv->probe) {
81 id = vio_match_device(drv->id_table, vdev);
82 if (id)
83 error = drv->probe(vdev, id);
84 }
85
86 return error;
87}
88
89static int vio_device_remove(struct device *dev)
90{
91 struct vio_dev *vdev = to_vio_dev(dev);
92 struct vio_driver *drv = to_vio_driver(dev->driver);
93
94 if (drv->remove)
95 return drv->remove(vdev);
96
97 return 1;
98}
99
100static ssize_t devspec_show(struct device *dev,
101 struct device_attribute *attr, char *buf)
102{
103 struct vio_dev *vdev = to_vio_dev(dev);
104 const char *str = "none";
105
106 if (!strcmp(vdev->type, "vnet-port"))
107 str = "vnet";
108 else if (!strcmp(vdev->type, "vdc-port"))
109 str = "vdisk";
110
111 return sprintf(buf, "%s\n", str);
112}
113
114static ssize_t type_show(struct device *dev,
115 struct device_attribute *attr, char *buf)
116{
117 struct vio_dev *vdev = to_vio_dev(dev);
118 return sprintf(buf, "%s\n", vdev->type);
119}
120
121static struct device_attribute vio_dev_attrs[] = {
122 __ATTR_RO(devspec),
123 __ATTR_RO(type),
124 __ATTR_NULL
125};
126
127static struct bus_type vio_bus_type = {
128 .name = "vio",
129 .dev_attrs = vio_dev_attrs,
130 .match = vio_bus_match,
131 .probe = vio_device_probe,
132 .remove = vio_device_remove,
133};
134
135int vio_register_driver(struct vio_driver *viodrv)
136{
137 viodrv->driver.bus = &vio_bus_type;
138
139 return driver_register(&viodrv->driver);
140}
141EXPORT_SYMBOL(vio_register_driver);
142
143void vio_unregister_driver(struct vio_driver *viodrv)
144{
145 driver_unregister(&viodrv->driver);
146}
147EXPORT_SYMBOL(vio_unregister_driver);
148
149static void __devinit vio_dev_release(struct device *dev)
150{
151 kfree(to_vio_dev(dev));
152}
153
154static ssize_t
155show_pciobppath_attr(struct device *dev, struct device_attribute *attr,
156 char *buf)
157{
158 struct vio_dev *vdev;
159 struct device_node *dp;
160
161 vdev = to_vio_dev(dev);
162 dp = vdev->dp;
163
164 return snprintf (buf, PAGE_SIZE, "%s\n", dp->full_name);
165}
166
167static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH,
168 show_pciobppath_attr, NULL);
169
170struct device_node *cdev_node;
171
172static struct vio_dev *root_vdev;
173static u64 cdev_cfg_handle;
174
175static void vio_fill_channel_info(struct mdesc_handle *hp, u64 mp,
176 struct vio_dev *vdev)
177{
178 u64 a;
179
180 mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_FWD) {
181 const u64 *chan_id;
182 const u64 *irq;
183 u64 target;
184
185 target = mdesc_arc_target(hp, a);
186
187 irq = mdesc_get_property(hp, target, "tx-ino", NULL);
188 if (irq)
189 vdev->tx_irq = sun4v_build_virq(cdev_cfg_handle, *irq);
190
191 irq = mdesc_get_property(hp, target, "rx-ino", NULL);
192 if (irq)
193 vdev->rx_irq = sun4v_build_virq(cdev_cfg_handle, *irq);
194
195 chan_id = mdesc_get_property(hp, target, "id", NULL);
196 if (chan_id)
197 vdev->channel_id = *chan_id;
198 }
199}
200
201static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp,
202 struct device *parent)
203{
204 const char *type, *compat, *bus_id_name;
205 struct device_node *dp;
206 struct vio_dev *vdev;
207 int err, tlen, clen;
208 const u64 *id, *cfg_handle;
209 u64 a;
210
211 type = mdesc_get_property(hp, mp, "device-type", &tlen);
212 if (!type) {
213 type = mdesc_get_property(hp, mp, "name", &tlen);
214 if (!type) {
215 type = mdesc_node_name(hp, mp);
216 tlen = strlen(type) + 1;
217 }
218 }
219 if (tlen > VIO_MAX_TYPE_LEN) {
220 printk(KERN_ERR "VIO: Type string [%s] is too long.\n",
221 type);
222 return NULL;
223 }
224
225 id = mdesc_get_property(hp, mp, "id", NULL);
226
227 cfg_handle = NULL;
228 mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_BACK) {
229 u64 target;
230
231 target = mdesc_arc_target(hp, a);
232 cfg_handle = mdesc_get_property(hp, target,
233 "cfg-handle", NULL);
234 if (cfg_handle)
235 break;
236 }
237
238 bus_id_name = type;
239 if (!strcmp(type, "domain-services-port"))
240 bus_id_name = "ds";
241
242 if (strlen(bus_id_name) >= KOBJ_NAME_LEN - 4) {
243 printk(KERN_ERR "VIO: bus_id_name [%s] is too long.\n",
244 bus_id_name);
245 return NULL;
246 }
247
248 compat = mdesc_get_property(hp, mp, "device-type", &clen);
249 if (!compat) {
250 clen = 0;
251 } else if (clen > VIO_MAX_COMPAT_LEN) {
252 printk(KERN_ERR "VIO: Compat len %d for [%s] is too long.\n",
253 clen, type);
254 return NULL;
255 }
256
257 vdev = kzalloc(sizeof(*vdev), GFP_KERNEL);
258 if (!vdev) {
259 printk(KERN_ERR "VIO: Could not allocate vio_dev\n");
260 return NULL;
261 }
262
263 vdev->mp = mp;
264 memcpy(vdev->type, type, tlen);
265 if (compat)
266 memcpy(vdev->compat, compat, clen);
267 else
268 memset(vdev->compat, 0, sizeof(vdev->compat));
269 vdev->compat_len = clen;
270
271 vdev->channel_id = ~0UL;
272 vdev->tx_irq = ~0;
273 vdev->rx_irq = ~0;
274
275 vio_fill_channel_info(hp, mp, vdev);
276
277 if (!id) {
278 snprintf(vdev->dev.bus_id, BUS_ID_SIZE, "%s",
279 bus_id_name);
280 vdev->dev_no = ~(u64)0;
281 } else if (!cfg_handle) {
282 snprintf(vdev->dev.bus_id, BUS_ID_SIZE, "%s-%lu",
283 bus_id_name, *id);
284 vdev->dev_no = *id;
285 } else {
286 snprintf(vdev->dev.bus_id, BUS_ID_SIZE, "%s-%lu-%lu",
287 bus_id_name, *cfg_handle, *id);
288 vdev->dev_no = *cfg_handle;
289 }
290
291 vdev->dev.parent = parent;
292 vdev->dev.bus = &vio_bus_type;
293 vdev->dev.release = vio_dev_release;
294
295 if (parent == NULL) {
296 dp = cdev_node;
297 } else if (to_vio_dev(parent) == root_vdev) {
298 dp = of_get_next_child(cdev_node, NULL);
299 while (dp) {
300 if (!strcmp(dp->type, type))
301 break;
302
303 dp = of_get_next_child(cdev_node, dp);
304 }
305 } else {
306 dp = to_vio_dev(parent)->dp;
307 }
308 vdev->dp = dp;
309
310 printk(KERN_ERR "VIO: Adding device %s\n", vdev->dev.bus_id);
311
312 err = device_register(&vdev->dev);
313 if (err) {
314 printk(KERN_ERR "VIO: Could not register device %s, err=%d\n",
315 vdev->dev.bus_id, err);
316 kfree(vdev);
317 return NULL;
318 }
319 if (vdev->dp)
320 err = sysfs_create_file(&vdev->dev.kobj,
321 &dev_attr_obppath.attr);
322
323 return vdev;
324}
325
326static void vio_add(struct mdesc_handle *hp, u64 node)
327{
328 (void) vio_create_one(hp, node, &root_vdev->dev);
329}
330
331static int vio_md_node_match(struct device *dev, void *arg)
332{
333 struct vio_dev *vdev = to_vio_dev(dev);
334
335 if (vdev->mp == (u64) arg)
336 return 1;
337
338 return 0;
339}
340
341static void vio_remove(struct mdesc_handle *hp, u64 node)
342{
343 struct device *dev;
344
345 dev = device_find_child(&root_vdev->dev, (void *) node,
346 vio_md_node_match);
347 if (dev) {
348 printk(KERN_INFO "VIO: Removing device %s\n", dev->bus_id);
349
350 device_unregister(dev);
351 }
352}
353
354static struct mdesc_notifier_client vio_device_notifier = {
355 .add = vio_add,
356 .remove = vio_remove,
357 .node_name = "virtual-device-port",
358};
359
360static struct mdesc_notifier_client vio_ds_notifier = {
361 .add = vio_add,
362 .remove = vio_remove,
363 .node_name = "domain-services-port",
364};
365
366const char *channel_devices_node = "channel-devices";
367const char *channel_devices_compat = "SUNW,sun4v-channel-devices";
368const char *cfg_handle_prop = "cfg-handle";
369
370static int __init vio_init(void)
371{
372 struct mdesc_handle *hp;
373 const char *compat;
374 const u64 *cfg_handle;
375 int err, len;
376 u64 root;
377
378 err = bus_register(&vio_bus_type);
379 if (err) {
380 printk(KERN_ERR "VIO: Could not register bus type err=%d\n",
381 err);
382 return err;
383 }
384
385 hp = mdesc_grab();
386 if (!hp)
387 return 0;
388
389 root = mdesc_node_by_name(hp, MDESC_NODE_NULL, channel_devices_node);
390 if (root == MDESC_NODE_NULL) {
391 printk(KERN_INFO "VIO: No channel-devices MDESC node.\n");
392 mdesc_release(hp);
393 return 0;
394 }
395
396 cdev_node = of_find_node_by_name(NULL, "channel-devices");
397 err = -ENODEV;
398 if (!cdev_node) {
399 printk(KERN_INFO "VIO: No channel-devices OBP node.\n");
400 goto out_release;
401 }
402
403 compat = mdesc_get_property(hp, root, "compatible", &len);
404 if (!compat) {
405 printk(KERN_ERR "VIO: Channel devices lacks compatible "
406 "property\n");
407 goto out_release;
408 }
409 if (!find_in_proplist(compat, channel_devices_compat, len)) {
410 printk(KERN_ERR "VIO: Channel devices node lacks (%s) "
411 "compat entry.\n", channel_devices_compat);
412 goto out_release;
413 }
414
415 cfg_handle = mdesc_get_property(hp, root, cfg_handle_prop, NULL);
416 if (!cfg_handle) {
417 printk(KERN_ERR "VIO: Channel devices lacks %s property\n",
418 cfg_handle_prop);
419 goto out_release;
420 }
421
422 cdev_cfg_handle = *cfg_handle;
423
424 root_vdev = vio_create_one(hp, root, NULL);
425 err = -ENODEV;
426 if (!root_vdev) {
427 printk(KERN_ERR "VIO: Coult not create root device.\n");
428 goto out_release;
429 }
430
431 mdesc_register_notifier(&vio_device_notifier);
432 mdesc_register_notifier(&vio_ds_notifier);
433
434 mdesc_release(hp);
435
436 return err;
437
438out_release:
439 mdesc_release(hp);
440 return err;
441}
442
443postcore_initcall(vio_init);
diff --git a/arch/sparc64/kernel/viohs.c b/arch/sparc64/kernel/viohs.c
new file mode 100644
index 000000000000..09126fc338ba
--- /dev/null
+++ b/arch/sparc64/kernel/viohs.c
@@ -0,0 +1,822 @@
1/* viohs.c: LDOM Virtual I/O handshake helper layer.
2 *
3 * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
4 */
5
6#include <linux/kernel.h>
7#include <linux/module.h>
8#include <linux/string.h>
9#include <linux/delay.h>
10#include <linux/sched.h>
11#include <linux/slab.h>
12
13#include <asm/ldc.h>
14#include <asm/vio.h>
15
16int vio_ldc_send(struct vio_driver_state *vio, void *data, int len)
17{
18 int err, limit = 1000;
19
20 err = -EINVAL;
21 while (limit-- > 0) {
22 err = ldc_write(vio->lp, data, len);
23 if (!err || (err != -EAGAIN))
24 break;
25 udelay(1);
26 }
27
28 return err;
29}
30EXPORT_SYMBOL(vio_ldc_send);
31
32static int send_ctrl(struct vio_driver_state *vio,
33 struct vio_msg_tag *tag, int len)
34{
35 tag->sid = vio_send_sid(vio);
36 return vio_ldc_send(vio, tag, len);
37}
38
39static void init_tag(struct vio_msg_tag *tag, u8 type, u8 stype, u16 stype_env)
40{
41 tag->type = type;
42 tag->stype = stype;
43 tag->stype_env = stype_env;
44}
45
46static int send_version(struct vio_driver_state *vio, u16 major, u16 minor)
47{
48 struct vio_ver_info pkt;
49
50 vio->_local_sid = (u32) sched_clock();
51
52 memset(&pkt, 0, sizeof(pkt));
53 init_tag(&pkt.tag, VIO_TYPE_CTRL, VIO_SUBTYPE_INFO, VIO_VER_INFO);
54 pkt.major = major;
55 pkt.minor = minor;
56 pkt.dev_class = vio->dev_class;
57
58 viodbg(HS, "SEND VERSION INFO maj[%u] min[%u] devclass[%u]\n",
59 major, minor, vio->dev_class);
60
61 return send_ctrl(vio, &pkt.tag, sizeof(pkt));
62}
63
64static int start_handshake(struct vio_driver_state *vio)
65{
66 int err;
67
68 viodbg(HS, "START HANDSHAKE\n");
69
70 vio->hs_state = VIO_HS_INVALID;
71
72 err = send_version(vio,
73 vio->ver_table[0].major,
74 vio->ver_table[0].minor);
75 if (err < 0)
76 return err;
77
78 return 0;
79}
80
81static void flush_rx_dring(struct vio_driver_state *vio)
82{
83 struct vio_dring_state *dr;
84 u64 ident;
85
86 BUG_ON(!(vio->dr_state & VIO_DR_STATE_RXREG));
87
88 dr = &vio->drings[VIO_DRIVER_RX_RING];
89 ident = dr->ident;
90
91 BUG_ON(!vio->desc_buf);
92 kfree(vio->desc_buf);
93 vio->desc_buf = NULL;
94
95 memset(dr, 0, sizeof(*dr));
96 dr->ident = ident;
97}
98
99void vio_link_state_change(struct vio_driver_state *vio, int event)
100{
101 if (event == LDC_EVENT_UP) {
102 vio->hs_state = VIO_HS_INVALID;
103
104 switch (vio->dev_class) {
105 case VDEV_NETWORK:
106 case VDEV_NETWORK_SWITCH:
107 vio->dr_state = (VIO_DR_STATE_TXREQ |
108 VIO_DR_STATE_RXREQ);
109 break;
110
111 case VDEV_DISK:
112 vio->dr_state = VIO_DR_STATE_TXREQ;
113 break;
114 case VDEV_DISK_SERVER:
115 vio->dr_state = VIO_DR_STATE_RXREQ;
116 break;
117 }
118 start_handshake(vio);
119 } else if (event == LDC_EVENT_RESET) {
120 vio->hs_state = VIO_HS_INVALID;
121
122 if (vio->dr_state & VIO_DR_STATE_RXREG)
123 flush_rx_dring(vio);
124
125 vio->dr_state = 0x00;
126 memset(&vio->ver, 0, sizeof(vio->ver));
127
128 ldc_disconnect(vio->lp);
129 }
130}
131EXPORT_SYMBOL(vio_link_state_change);
132
133static int handshake_failure(struct vio_driver_state *vio)
134{
135 struct vio_dring_state *dr;
136
137 /* XXX Put policy here... Perhaps start a timer to fire
138 * XXX in 100 ms, which will bring the link up and retry
139 * XXX the handshake.
140 */
141
142 viodbg(HS, "HANDSHAKE FAILURE\n");
143
144 vio->dr_state &= ~(VIO_DR_STATE_TXREG |
145 VIO_DR_STATE_RXREG);
146
147 dr = &vio->drings[VIO_DRIVER_RX_RING];
148 memset(dr, 0, sizeof(*dr));
149
150 kfree(vio->desc_buf);
151 vio->desc_buf = NULL;
152 vio->desc_buf_len = 0;
153
154 vio->hs_state = VIO_HS_INVALID;
155
156 return -ECONNRESET;
157}
158
159static int process_unknown(struct vio_driver_state *vio, void *arg)
160{
161 struct vio_msg_tag *pkt = arg;
162
163 viodbg(HS, "UNKNOWN CONTROL [%02x:%02x:%04x:%08x]\n",
164 pkt->type, pkt->stype, pkt->stype_env, pkt->sid);
165
166 printk(KERN_ERR "vio: ID[%lu] Resetting connection.\n",
167 vio->vdev->channel_id);
168
169 ldc_disconnect(vio->lp);
170
171 return -ECONNRESET;
172}
173
174static int send_dreg(struct vio_driver_state *vio)
175{
176 struct vio_dring_state *dr = &vio->drings[VIO_DRIVER_TX_RING];
177 union {
178 struct vio_dring_register pkt;
179 char all[sizeof(struct vio_dring_register) +
180 (sizeof(struct ldc_trans_cookie) *
181 dr->ncookies)];
182 } u;
183 int i;
184
185 memset(&u, 0, sizeof(u));
186 init_tag(&u.pkt.tag, VIO_TYPE_CTRL, VIO_SUBTYPE_INFO, VIO_DRING_REG);
187 u.pkt.dring_ident = 0;
188 u.pkt.num_descr = dr->num_entries;
189 u.pkt.descr_size = dr->entry_size;
190 u.pkt.options = VIO_TX_DRING;
191 u.pkt.num_cookies = dr->ncookies;
192
193 viodbg(HS, "SEND DRING_REG INFO ndesc[%u] dsz[%u] opt[0x%x] "
194 "ncookies[%u]\n",
195 u.pkt.num_descr, u.pkt.descr_size, u.pkt.options,
196 u.pkt.num_cookies);
197
198 for (i = 0; i < dr->ncookies; i++) {
199 u.pkt.cookies[i] = dr->cookies[i];
200
201 viodbg(HS, "DRING COOKIE(%d) [%016llx:%016llx]\n",
202 i,
203 (unsigned long long) u.pkt.cookies[i].cookie_addr,
204 (unsigned long long) u.pkt.cookies[i].cookie_size);
205 }
206
207 return send_ctrl(vio, &u.pkt.tag, sizeof(u));
208}
209
210static int send_rdx(struct vio_driver_state *vio)
211{
212 struct vio_rdx pkt;
213
214 memset(&pkt, 0, sizeof(pkt));
215
216 init_tag(&pkt.tag, VIO_TYPE_CTRL, VIO_SUBTYPE_INFO, VIO_RDX);
217
218 viodbg(HS, "SEND RDX INFO\n");
219
220 return send_ctrl(vio, &pkt.tag, sizeof(pkt));
221}
222
223static int send_attr(struct vio_driver_state *vio)
224{
225 return vio->ops->send_attr(vio);
226}
227
228static struct vio_version *find_by_major(struct vio_driver_state *vio,
229 u16 major)
230{
231 struct vio_version *ret = NULL;
232 int i;
233
234 for (i = 0; i < vio->ver_table_entries; i++) {
235 struct vio_version *v = &vio->ver_table[i];
236 if (v->major <= major) {
237 ret = v;
238 break;
239 }
240 }
241 return ret;
242}
243
244static int process_ver_info(struct vio_driver_state *vio,
245 struct vio_ver_info *pkt)
246{
247 struct vio_version *vap;
248 int err;
249
250 viodbg(HS, "GOT VERSION INFO maj[%u] min[%u] devclass[%u]\n",
251 pkt->major, pkt->minor, pkt->dev_class);
252
253 if (vio->hs_state != VIO_HS_INVALID) {
254 /* XXX Perhaps invoke start_handshake? XXX */
255 memset(&vio->ver, 0, sizeof(vio->ver));
256 vio->hs_state = VIO_HS_INVALID;
257 }
258
259 vap = find_by_major(vio, pkt->major);
260
261 vio->_peer_sid = pkt->tag.sid;
262
263 if (!vap) {
264 pkt->tag.stype = VIO_SUBTYPE_NACK;
265 pkt->major = 0;
266 pkt->minor = 0;
267 viodbg(HS, "SEND VERSION NACK maj[0] min[0]\n");
268 err = send_ctrl(vio, &pkt->tag, sizeof(*pkt));
269 } else if (vap->major != pkt->major) {
270 pkt->tag.stype = VIO_SUBTYPE_NACK;
271 pkt->major = vap->major;
272 pkt->minor = vap->minor;
273 viodbg(HS, "SEND VERSION NACK maj[%u] min[%u]\n",
274 pkt->major, pkt->minor);
275 err = send_ctrl(vio, &pkt->tag, sizeof(*pkt));
276 } else {
277 struct vio_version ver = {
278 .major = pkt->major,
279 .minor = pkt->minor,
280 };
281 if (ver.minor > vap->minor)
282 ver.minor = vap->minor;
283 pkt->minor = ver.minor;
284 pkt->tag.stype = VIO_SUBTYPE_ACK;
285 viodbg(HS, "SEND VERSION ACK maj[%u] min[%u]\n",
286 pkt->major, pkt->minor);
287 err = send_ctrl(vio, &pkt->tag, sizeof(*pkt));
288 if (err > 0) {
289 vio->ver = ver;
290 vio->hs_state = VIO_HS_GOTVERS;
291 }
292 }
293 if (err < 0)
294 return handshake_failure(vio);
295
296 return 0;
297}
298
299static int process_ver_ack(struct vio_driver_state *vio,
300 struct vio_ver_info *pkt)
301{
302 viodbg(HS, "GOT VERSION ACK maj[%u] min[%u] devclass[%u]\n",
303 pkt->major, pkt->minor, pkt->dev_class);
304
305 if (vio->hs_state & VIO_HS_GOTVERS) {
306 if (vio->ver.major != pkt->major ||
307 vio->ver.minor != pkt->minor) {
308 pkt->tag.stype = VIO_SUBTYPE_NACK;
309 (void) send_ctrl(vio, &pkt->tag, sizeof(*pkt));
310 return handshake_failure(vio);
311 }
312 } else {
313 vio->ver.major = pkt->major;
314 vio->ver.minor = pkt->minor;
315 vio->hs_state = VIO_HS_GOTVERS;
316 }
317
318 switch (vio->dev_class) {
319 case VDEV_NETWORK:
320 case VDEV_DISK:
321 if (send_attr(vio) < 0)
322 return handshake_failure(vio);
323 break;
324
325 default:
326 break;
327 }
328
329 return 0;
330}
331
332static int process_ver_nack(struct vio_driver_state *vio,
333 struct vio_ver_info *pkt)
334{
335 struct vio_version *nver;
336
337 viodbg(HS, "GOT VERSION NACK maj[%u] min[%u] devclass[%u]\n",
338 pkt->major, pkt->minor, pkt->dev_class);
339
340 if ((pkt->major == 0 && pkt->minor == 0) ||
341 !(nver = find_by_major(vio, pkt->major)))
342 return handshake_failure(vio);
343
344 if (send_version(vio, nver->major, nver->minor) < 0)
345 return handshake_failure(vio);
346
347 return 0;
348}
349
350static int process_ver(struct vio_driver_state *vio, struct vio_ver_info *pkt)
351{
352 switch (pkt->tag.stype) {
353 case VIO_SUBTYPE_INFO:
354 return process_ver_info(vio, pkt);
355
356 case VIO_SUBTYPE_ACK:
357 return process_ver_ack(vio, pkt);
358
359 case VIO_SUBTYPE_NACK:
360 return process_ver_nack(vio, pkt);
361
362 default:
363 return handshake_failure(vio);
364 };
365}
366
367static int process_attr(struct vio_driver_state *vio, void *pkt)
368{
369 int err;
370
371 if (!(vio->hs_state & VIO_HS_GOTVERS))
372 return handshake_failure(vio);
373
374 err = vio->ops->handle_attr(vio, pkt);
375 if (err < 0) {
376 return handshake_failure(vio);
377 } else {
378 vio->hs_state |= VIO_HS_GOT_ATTR;
379
380 if ((vio->dr_state & VIO_DR_STATE_TXREQ) &&
381 !(vio->hs_state & VIO_HS_SENT_DREG)) {
382 if (send_dreg(vio) < 0)
383 return handshake_failure(vio);
384
385 vio->hs_state |= VIO_HS_SENT_DREG;
386 }
387 }
388 return 0;
389}
390
391static int all_drings_registered(struct vio_driver_state *vio)
392{
393 int need_rx, need_tx;
394
395 need_rx = (vio->dr_state & VIO_DR_STATE_RXREQ);
396 need_tx = (vio->dr_state & VIO_DR_STATE_TXREQ);
397
398 if (need_rx &&
399 !(vio->dr_state & VIO_DR_STATE_RXREG))
400 return 0;
401
402 if (need_tx &&
403 !(vio->dr_state & VIO_DR_STATE_TXREG))
404 return 0;
405
406 return 1;
407}
408
409static int process_dreg_info(struct vio_driver_state *vio,
410 struct vio_dring_register *pkt)
411{
412 struct vio_dring_state *dr;
413 int i, len;
414
415 viodbg(HS, "GOT DRING_REG INFO ident[%llx] "
416 "ndesc[%u] dsz[%u] opt[0x%x] ncookies[%u]\n",
417 (unsigned long long) pkt->dring_ident,
418 pkt->num_descr, pkt->descr_size, pkt->options,
419 pkt->num_cookies);
420
421 if (!(vio->dr_state & VIO_DR_STATE_RXREQ))
422 goto send_nack;
423
424 if (vio->dr_state & VIO_DR_STATE_RXREG)
425 goto send_nack;
426
427 BUG_ON(vio->desc_buf);
428
429 vio->desc_buf = kzalloc(pkt->descr_size, GFP_ATOMIC);
430 if (!vio->desc_buf)
431 goto send_nack;
432
433 vio->desc_buf_len = pkt->descr_size;
434
435 dr = &vio->drings[VIO_DRIVER_RX_RING];
436
437 dr->num_entries = pkt->num_descr;
438 dr->entry_size = pkt->descr_size;
439 dr->ncookies = pkt->num_cookies;
440 for (i = 0; i < dr->ncookies; i++) {
441 dr->cookies[i] = pkt->cookies[i];
442
443 viodbg(HS, "DRING COOKIE(%d) [%016llx:%016llx]\n",
444 i,
445 (unsigned long long)
446 pkt->cookies[i].cookie_addr,
447 (unsigned long long)
448 pkt->cookies[i].cookie_size);
449 }
450
451 pkt->tag.stype = VIO_SUBTYPE_ACK;
452 pkt->dring_ident = ++dr->ident;
453
454 viodbg(HS, "SEND DRING_REG ACK ident[%llx]\n",
455 (unsigned long long) pkt->dring_ident);
456
457 len = (sizeof(*pkt) +
458 (dr->ncookies * sizeof(struct ldc_trans_cookie)));
459 if (send_ctrl(vio, &pkt->tag, len) < 0)
460 goto send_nack;
461
462 vio->dr_state |= VIO_DR_STATE_RXREG;
463
464 return 0;
465
466send_nack:
467 pkt->tag.stype = VIO_SUBTYPE_NACK;
468 viodbg(HS, "SEND DRING_REG NACK\n");
469 (void) send_ctrl(vio, &pkt->tag, sizeof(*pkt));
470
471 return handshake_failure(vio);
472}
473
474static int process_dreg_ack(struct vio_driver_state *vio,
475 struct vio_dring_register *pkt)
476{
477 struct vio_dring_state *dr;
478
479 viodbg(HS, "GOT DRING_REG ACK ident[%llx] "
480 "ndesc[%u] dsz[%u] opt[0x%x] ncookies[%u]\n",
481 (unsigned long long) pkt->dring_ident,
482 pkt->num_descr, pkt->descr_size, pkt->options,
483 pkt->num_cookies);
484
485 dr = &vio->drings[VIO_DRIVER_TX_RING];
486
487 if (!(vio->dr_state & VIO_DR_STATE_TXREQ))
488 return handshake_failure(vio);
489
490 dr->ident = pkt->dring_ident;
491 vio->dr_state |= VIO_DR_STATE_TXREG;
492
493 if (all_drings_registered(vio)) {
494 if (send_rdx(vio) < 0)
495 return handshake_failure(vio);
496 vio->hs_state = VIO_HS_SENT_RDX;
497 }
498 return 0;
499}
500
501static int process_dreg_nack(struct vio_driver_state *vio,
502 struct vio_dring_register *pkt)
503{
504 viodbg(HS, "GOT DRING_REG NACK ident[%llx] "
505 "ndesc[%u] dsz[%u] opt[0x%x] ncookies[%u]\n",
506 (unsigned long long) pkt->dring_ident,
507 pkt->num_descr, pkt->descr_size, pkt->options,
508 pkt->num_cookies);
509
510 return handshake_failure(vio);
511}
512
513static int process_dreg(struct vio_driver_state *vio,
514 struct vio_dring_register *pkt)
515{
516 if (!(vio->hs_state & VIO_HS_GOTVERS))
517 return handshake_failure(vio);
518
519 switch (pkt->tag.stype) {
520 case VIO_SUBTYPE_INFO:
521 return process_dreg_info(vio, pkt);
522
523 case VIO_SUBTYPE_ACK:
524 return process_dreg_ack(vio, pkt);
525
526 case VIO_SUBTYPE_NACK:
527 return process_dreg_nack(vio, pkt);
528
529 default:
530 return handshake_failure(vio);
531 }
532}
533
534static int process_dunreg(struct vio_driver_state *vio,
535 struct vio_dring_unregister *pkt)
536{
537 struct vio_dring_state *dr = &vio->drings[VIO_DRIVER_RX_RING];
538
539 viodbg(HS, "GOT DRING_UNREG\n");
540
541 if (pkt->dring_ident != dr->ident)
542 return 0;
543
544 vio->dr_state &= ~VIO_DR_STATE_RXREG;
545
546 memset(dr, 0, sizeof(*dr));
547
548 kfree(vio->desc_buf);
549 vio->desc_buf = NULL;
550 vio->desc_buf_len = 0;
551
552 return 0;
553}
554
555static int process_rdx_info(struct vio_driver_state *vio, struct vio_rdx *pkt)
556{
557 viodbg(HS, "GOT RDX INFO\n");
558
559 pkt->tag.stype = VIO_SUBTYPE_ACK;
560 viodbg(HS, "SEND RDX ACK\n");
561 if (send_ctrl(vio, &pkt->tag, sizeof(*pkt)) < 0)
562 return handshake_failure(vio);
563
564 vio->hs_state |= VIO_HS_SENT_RDX_ACK;
565 return 0;
566}
567
568static int process_rdx_ack(struct vio_driver_state *vio, struct vio_rdx *pkt)
569{
570 viodbg(HS, "GOT RDX ACK\n");
571
572 if (!(vio->hs_state & VIO_HS_SENT_RDX))
573 return handshake_failure(vio);
574
575 vio->hs_state |= VIO_HS_GOT_RDX_ACK;
576 return 0;
577}
578
579static int process_rdx_nack(struct vio_driver_state *vio, struct vio_rdx *pkt)
580{
581 viodbg(HS, "GOT RDX NACK\n");
582
583 return handshake_failure(vio);
584}
585
586static int process_rdx(struct vio_driver_state *vio, struct vio_rdx *pkt)
587{
588 if (!all_drings_registered(vio))
589 handshake_failure(vio);
590
591 switch (pkt->tag.stype) {
592 case VIO_SUBTYPE_INFO:
593 return process_rdx_info(vio, pkt);
594
595 case VIO_SUBTYPE_ACK:
596 return process_rdx_ack(vio, pkt);
597
598 case VIO_SUBTYPE_NACK:
599 return process_rdx_nack(vio, pkt);
600
601 default:
602 return handshake_failure(vio);
603 }
604}
605
606int vio_control_pkt_engine(struct vio_driver_state *vio, void *pkt)
607{
608 struct vio_msg_tag *tag = pkt;
609 u8 prev_state = vio->hs_state;
610 int err;
611
612 switch (tag->stype_env) {
613 case VIO_VER_INFO:
614 err = process_ver(vio, pkt);
615 break;
616
617 case VIO_ATTR_INFO:
618 err = process_attr(vio, pkt);
619 break;
620
621 case VIO_DRING_REG:
622 err = process_dreg(vio, pkt);
623 break;
624
625 case VIO_DRING_UNREG:
626 err = process_dunreg(vio, pkt);
627 break;
628
629 case VIO_RDX:
630 err = process_rdx(vio, pkt);
631 break;
632
633 default:
634 err = process_unknown(vio, pkt);
635 break;
636 }
637 if (!err &&
638 vio->hs_state != prev_state &&
639 (vio->hs_state & VIO_HS_COMPLETE))
640 vio->ops->handshake_complete(vio);
641
642 return err;
643}
644EXPORT_SYMBOL(vio_control_pkt_engine);
645
646void vio_conn_reset(struct vio_driver_state *vio)
647{
648}
649EXPORT_SYMBOL(vio_conn_reset);
650
651/* The issue is that the Solaris virtual disk server just mirrors the
652 * SID values it gets from the client peer. So we work around that
653 * here in vio_{validate,send}_sid() so that the drivers don't need
654 * to be aware of this crap.
655 */
656int vio_validate_sid(struct vio_driver_state *vio, struct vio_msg_tag *tp)
657{
658 u32 sid;
659
660 /* Always let VERSION+INFO packets through unchecked, they
661 * define the new SID.
662 */
663 if (tp->type == VIO_TYPE_CTRL &&
664 tp->stype == VIO_SUBTYPE_INFO &&
665 tp->stype_env == VIO_VER_INFO)
666 return 0;
667
668 /* Ok, now figure out which SID to use. */
669 switch (vio->dev_class) {
670 case VDEV_NETWORK:
671 case VDEV_NETWORK_SWITCH:
672 case VDEV_DISK_SERVER:
673 default:
674 sid = vio->_peer_sid;
675 break;
676
677 case VDEV_DISK:
678 sid = vio->_local_sid;
679 break;
680 }
681
682 if (sid == tp->sid)
683 return 0;
684 viodbg(DATA, "BAD SID tag->sid[%08x] peer_sid[%08x] local_sid[%08x]\n",
685 tp->sid, vio->_peer_sid, vio->_local_sid);
686 return -EINVAL;
687}
688EXPORT_SYMBOL(vio_validate_sid);
689
690u32 vio_send_sid(struct vio_driver_state *vio)
691{
692 switch (vio->dev_class) {
693 case VDEV_NETWORK:
694 case VDEV_NETWORK_SWITCH:
695 case VDEV_DISK:
696 default:
697 return vio->_local_sid;
698
699 case VDEV_DISK_SERVER:
700 return vio->_peer_sid;
701 }
702}
703EXPORT_SYMBOL(vio_send_sid);
704
705extern int vio_ldc_alloc(struct vio_driver_state *vio,
706 struct ldc_channel_config *base_cfg,
707 void *event_arg)
708{
709 struct ldc_channel_config cfg = *base_cfg;
710 struct ldc_channel *lp;
711
712 cfg.tx_irq = vio->vdev->tx_irq;
713 cfg.rx_irq = vio->vdev->rx_irq;
714
715 lp = ldc_alloc(vio->vdev->channel_id, &cfg, event_arg);
716 if (IS_ERR(lp))
717 return PTR_ERR(lp);
718
719 vio->lp = lp;
720
721 return 0;
722}
723EXPORT_SYMBOL(vio_ldc_alloc);
724
725void vio_ldc_free(struct vio_driver_state *vio)
726{
727 ldc_free(vio->lp);
728 vio->lp = NULL;
729
730 kfree(vio->desc_buf);
731 vio->desc_buf = NULL;
732 vio->desc_buf_len = 0;
733}
734EXPORT_SYMBOL(vio_ldc_free);
735
736void vio_port_up(struct vio_driver_state *vio)
737{
738 unsigned long flags;
739 int err, state;
740
741 spin_lock_irqsave(&vio->lock, flags);
742
743 state = ldc_state(vio->lp);
744
745 err = 0;
746 if (state == LDC_STATE_INIT) {
747 err = ldc_bind(vio->lp, vio->name);
748 if (err)
749 printk(KERN_WARNING "%s: Port %lu bind failed, "
750 "err=%d\n",
751 vio->name, vio->vdev->channel_id, err);
752 }
753
754 if (!err) {
755 err = ldc_connect(vio->lp);
756 if (err)
757 printk(KERN_WARNING "%s: Port %lu connect failed, "
758 "err=%d\n",
759 vio->name, vio->vdev->channel_id, err);
760 }
761 if (err) {
762 unsigned long expires = jiffies + HZ;
763
764 expires = round_jiffies(expires);
765 mod_timer(&vio->timer, expires);
766 }
767
768 spin_unlock_irqrestore(&vio->lock, flags);
769}
770EXPORT_SYMBOL(vio_port_up);
771
772static void vio_port_timer(unsigned long _arg)
773{
774 struct vio_driver_state *vio = (struct vio_driver_state *) _arg;
775
776 vio_port_up(vio);
777}
778
779int vio_driver_init(struct vio_driver_state *vio, struct vio_dev *vdev,
780 u8 dev_class, struct vio_version *ver_table,
781 int ver_table_size, struct vio_driver_ops *ops,
782 char *name)
783{
784 switch (dev_class) {
785 case VDEV_NETWORK:
786 case VDEV_NETWORK_SWITCH:
787 case VDEV_DISK:
788 case VDEV_DISK_SERVER:
789 break;
790
791 default:
792 return -EINVAL;
793 }
794
795 if (!ops->send_attr ||
796 !ops->handle_attr ||
797 !ops->handshake_complete)
798 return -EINVAL;
799
800 if (!ver_table || ver_table_size < 0)
801 return -EINVAL;
802
803 if (!name)
804 return -EINVAL;
805
806 spin_lock_init(&vio->lock);
807
808 vio->name = name;
809
810 vio->dev_class = dev_class;
811 vio->vdev = vdev;
812
813 vio->ver_table = ver_table;
814 vio->ver_table_entries = ver_table_size;
815
816 vio->ops = ops;
817
818 setup_timer(&vio->timer, vio_port_timer, (unsigned long) vio);
819
820 return 0;
821}
822EXPORT_SYMBOL(vio_driver_init);
diff --git a/arch/sparc64/kernel/vmlinux.lds.S b/arch/sparc64/kernel/vmlinux.lds.S
index 3ad10f3027e4..481861764deb 100644
--- a/arch/sparc64/kernel/vmlinux.lds.S
+++ b/arch/sparc64/kernel/vmlinux.lds.S
@@ -90,10 +90,8 @@ SECTIONS
90 __initramfs_end = .; 90 __initramfs_end = .;
91#endif 91#endif
92 92
93 . = ALIGN(PAGE_SIZE); 93 PERCPU(PAGE_SIZE)
94 __per_cpu_start = .; 94
95 .data.percpu : { *(.data.percpu) }
96 __per_cpu_end = .;
97 . = ALIGN(PAGE_SIZE); 95 . = ALIGN(PAGE_SIZE);
98 __init_end = .; 96 __init_end = .;
99 __bss_start = .; 97 __bss_start = .;
diff --git a/arch/sparc64/lib/Makefile b/arch/sparc64/lib/Makefile
index 4a725d8985f1..c4a6d6e7d03c 100644
--- a/arch/sparc64/lib/Makefile
+++ b/arch/sparc64/lib/Makefile
@@ -14,6 +14,6 @@ lib-y := PeeCeeI.o copy_page.o clear_page.o strlen.o strncmp.o \
14 NGmemcpy.o NGcopy_from_user.o NGcopy_to_user.o NGpatch.o \ 14 NGmemcpy.o NGcopy_from_user.o NGcopy_to_user.o NGpatch.o \
15 NGpage.o NGbzero.o \ 15 NGpage.o NGbzero.o \
16 copy_in_user.o user_fixup.o memmove.o \ 16 copy_in_user.o user_fixup.o memmove.o \
17 mcount.o ipcsum.o rwsem.o xor.o delay.o 17 mcount.o ipcsum.o rwsem.o xor.o
18 18
19obj-y += iomap.o 19obj-y += iomap.o
diff --git a/arch/sparc64/lib/delay.c b/arch/sparc64/lib/delay.c
deleted file mode 100644
index fb27e54a03ee..000000000000
--- a/arch/sparc64/lib/delay.c
+++ /dev/null
@@ -1,46 +0,0 @@
1/* delay.c: Delay loops for sparc64
2 *
3 * Copyright (C) 2004, 2006 David S. Miller <davem@davemloft.net>
4 *
5 * Based heavily upon x86 variant which is:
6 * Copyright (C) 1993 Linus Torvalds
7 * Copyright (C) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
8 */
9
10#include <linux/delay.h>
11#include <asm/timer.h>
12
13void __delay(unsigned long loops)
14{
15 unsigned long bclock, now;
16
17 bclock = tick_ops->get_tick();
18 do {
19 now = tick_ops->get_tick();
20 } while ((now-bclock) < loops);
21}
22
23/* We used to multiply by HZ after shifting down by 32 bits
24 * but that runs into problems for higher values of HZ and
25 * slow cpus.
26 */
27void __const_udelay(unsigned long n)
28{
29 n *= 4;
30
31 n *= (cpu_data(raw_smp_processor_id()).udelay_val * (HZ/4));
32 n >>= 32;
33
34 __delay(n + 1);
35}
36
37void __udelay(unsigned long n)
38{
39 __const_udelay(n * 0x10c7UL);
40}
41
42
43void __ndelay(unsigned long n)
44{
45 __const_udelay(n * 0x5UL);
46}
diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c
index b582024d2199..17123e9ecf78 100644
--- a/arch/sparc64/mm/fault.c
+++ b/arch/sparc64/mm/fault.c
@@ -278,7 +278,7 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
278 struct mm_struct *mm = current->mm; 278 struct mm_struct *mm = current->mm;
279 struct vm_area_struct *vma; 279 struct vm_area_struct *vma;
280 unsigned int insn = 0; 280 unsigned int insn = 0;
281 int si_code, fault_code; 281 int si_code, fault_code, fault;
282 unsigned long address, mm_rss; 282 unsigned long address, mm_rss;
283 283
284 fault_code = get_thread_fault_code(); 284 fault_code = get_thread_fault_code();
@@ -415,20 +415,18 @@ good_area:
415 goto bad_area; 415 goto bad_area;
416 } 416 }
417 417
418 switch (handle_mm_fault(mm, vma, address, (fault_code & FAULT_CODE_WRITE))) { 418 fault = handle_mm_fault(mm, vma, address, (fault_code & FAULT_CODE_WRITE));
419 case VM_FAULT_MINOR: 419 if (unlikely(fault & VM_FAULT_ERROR)) {
420 current->min_flt++; 420 if (fault & VM_FAULT_OOM)
421 break; 421 goto out_of_memory;
422 case VM_FAULT_MAJOR: 422 else if (fault & VM_FAULT_SIGBUS)
423 current->maj_flt++; 423 goto do_sigbus;
424 break;
425 case VM_FAULT_SIGBUS:
426 goto do_sigbus;
427 case VM_FAULT_OOM:
428 goto out_of_memory;
429 default:
430 BUG(); 424 BUG();
431 } 425 }
426 if (fault & VM_FAULT_MAJOR)
427 current->maj_flt++;
428 else
429 current->min_flt++;
432 430
433 up_read(&mm->mmap_sem); 431 up_read(&mm->mmap_sem);
434 432
diff --git a/arch/sparc64/mm/tsb.c b/arch/sparc64/mm/tsb.c
index 8eb8a7c76ec9..7ff0a02f5813 100644
--- a/arch/sparc64/mm/tsb.c
+++ b/arch/sparc64/mm/tsb.c
@@ -262,8 +262,7 @@ void __init pgtable_cache_init(void)
262 262
263 tsb_caches[i] = kmem_cache_create(name, 263 tsb_caches[i] = kmem_cache_create(name,
264 size, size, 264 size, size,
265 0, 265 0, NULL);
266 NULL, NULL);
267 if (!tsb_caches[i]) { 266 if (!tsb_caches[i]) {
268 prom_printf("Could not create %s cache\n", name); 267 prom_printf("Could not create %s cache\n", name);
269 prom_halt(); 268 prom_halt();
diff --git a/arch/sparc64/prom/console.c b/arch/sparc64/prom/console.c
index 7c25c54cefdc..3fafa9a8b50b 100644
--- a/arch/sparc64/prom/console.c
+++ b/arch/sparc64/prom/console.c
@@ -73,88 +73,3 @@ prom_puts(const char *s, int len)
73 P1275_INOUT(3,1), 73 P1275_INOUT(3,1),
74 prom_stdout, s, P1275_SIZE(len)); 74 prom_stdout, s, P1275_SIZE(len));
75} 75}
76
77/* Query for input device type */
78enum prom_input_device
79prom_query_input_device(void)
80{
81 int st_p;
82 char propb[64];
83
84 st_p = prom_inst2pkg(prom_stdin);
85 if(prom_node_has_property(st_p, "keyboard"))
86 return PROMDEV_IKBD;
87 prom_getproperty(st_p, "device_type", propb, sizeof(propb));
88 if(strncmp(propb, "serial", 6))
89 return PROMDEV_I_UNK;
90 /* FIXME: Is there any better way how to find out? */
91 memset(propb, 0, sizeof(propb));
92 st_p = prom_finddevice ("/options");
93 prom_getproperty(st_p, "input-device", propb, sizeof(propb));
94
95 /*
96 * If we get here with propb == 'keyboard', we are on ttya, as
97 * the PROM defaulted to this due to 'no input device'.
98 */
99 if (!strncmp(propb, "keyboard", 8))
100 return PROMDEV_ITTYA;
101
102 if (!strncmp (propb, "rsc", 3))
103 return PROMDEV_IRSC;
104
105 if (!strncmp (propb, "virtual-console", 3))
106 return PROMDEV_IVCONS;
107
108 if (strncmp (propb, "tty", 3) || !propb[3])
109 return PROMDEV_I_UNK;
110
111 switch (propb[3]) {
112 case 'a': return PROMDEV_ITTYA;
113 case 'b': return PROMDEV_ITTYB;
114 default: return PROMDEV_I_UNK;
115 }
116}
117
118/* Query for output device type */
119
120enum prom_output_device
121prom_query_output_device(void)
122{
123 int st_p;
124 char propb[64];
125 int propl;
126
127 st_p = prom_inst2pkg(prom_stdout);
128 propl = prom_getproperty(st_p, "device_type", propb, sizeof(propb));
129 if (propl >= 0 && propl == sizeof("display") &&
130 strncmp("display", propb, sizeof("display")) == 0)
131 return PROMDEV_OSCREEN;
132 if(strncmp("serial", propb, 6))
133 return PROMDEV_O_UNK;
134 /* FIXME: Is there any better way how to find out? */
135 memset(propb, 0, sizeof(propb));
136 st_p = prom_finddevice ("/options");
137 prom_getproperty(st_p, "output-device", propb, sizeof(propb));
138
139 /*
140 * If we get here with propb == 'screen', we are on ttya, as
141 * the PROM defaulted to this due to 'no input device'.
142 */
143 if (!strncmp(propb, "screen", 6))
144 return PROMDEV_OTTYA;
145
146 if (!strncmp (propb, "rsc", 3))
147 return PROMDEV_ORSC;
148
149 if (!strncmp (propb, "virtual-console", 3))
150 return PROMDEV_OVCONS;
151
152 if (strncmp (propb, "tty", 3) || !propb[3])
153 return PROMDEV_O_UNK;
154
155 switch (propb[3]) {
156 case 'a': return PROMDEV_OTTYA;
157 case 'b': return PROMDEV_OTTYB;
158 default: return PROMDEV_O_UNK;
159 }
160}
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c
index f3e0c14e9eef..68c83ad04ad9 100644
--- a/arch/sparc64/prom/misc.c
+++ b/arch/sparc64/prom/misc.c
@@ -14,6 +14,7 @@
14#include <asm/openprom.h> 14#include <asm/openprom.h>
15#include <asm/oplib.h> 15#include <asm/oplib.h>
16#include <asm/system.h> 16#include <asm/system.h>
17#include <asm/ldc.h>
17 18
18int prom_service_exists(const char *service_name) 19int prom_service_exists(const char *service_name)
19{ 20{
@@ -37,6 +38,10 @@ void prom_sun4v_guest_soft_state(void)
37/* Reset and reboot the machine with the command 'bcommand'. */ 38/* Reset and reboot the machine with the command 'bcommand'. */
38void prom_reboot(const char *bcommand) 39void prom_reboot(const char *bcommand)
39{ 40{
41#ifdef CONFIG_SUN_LDOMS
42 if (ldom_domaining_enabled)
43 ldom_reboot(bcommand);
44#endif
40 p1275_cmd("boot", P1275_ARG(0, P1275_ARG_IN_STRING) | 45 p1275_cmd("boot", P1275_ARG(0, P1275_ARG_IN_STRING) |
41 P1275_INOUT(1, 0), bcommand); 46 P1275_INOUT(1, 0), bcommand);
42} 47}
@@ -67,7 +72,7 @@ void prom_cmdline(void)
67 72
68 local_irq_save(flags); 73 local_irq_save(flags);
69 74
70 if (!serial_console && prom_palette) 75 if (prom_palette)
71 prom_palette(1); 76 prom_palette(1);
72 77
73#ifdef CONFIG_SMP 78#ifdef CONFIG_SMP
@@ -80,7 +85,7 @@ void prom_cmdline(void)
80 smp_release(); 85 smp_release();
81#endif 86#endif
82 87
83 if (!serial_console && prom_palette) 88 if (prom_palette)
84 prom_palette(0); 89 prom_palette(0);
85 90
86 local_irq_restore(flags); 91 local_irq_restore(flags);
@@ -91,6 +96,10 @@ void prom_cmdline(void)
91 */ 96 */
92void prom_halt(void) 97void prom_halt(void)
93{ 98{
99#ifdef CONFIG_SUN_LDOMS
100 if (ldom_domaining_enabled)
101 ldom_power_off();
102#endif
94again: 103again:
95 p1275_cmd("exit", P1275_INOUT(0, 0)); 104 p1275_cmd("exit", P1275_INOUT(0, 0));
96 goto again; /* PROM is out to get me -DaveM */ 105 goto again; /* PROM is out to get me -DaveM */
@@ -98,6 +107,10 @@ again:
98 107
99void prom_halt_power_off(void) 108void prom_halt_power_off(void)
100{ 109{
110#ifdef CONFIG_SUN_LDOMS
111 if (ldom_domaining_enabled)
112 ldom_power_off();
113#endif
101 p1275_cmd("SUNW,power-off", P1275_INOUT(0, 0)); 114 p1275_cmd("SUNW,power-off", P1275_INOUT(0, 0));
102 115
103 /* if nothing else helps, we just halt */ 116 /* if nothing else helps, we just halt */
diff --git a/arch/sparc64/prom/p1275.c b/arch/sparc64/prom/p1275.c
index 2b32c489860c..7fcccc0e19cf 100644
--- a/arch/sparc64/prom/p1275.c
+++ b/arch/sparc64/prom/p1275.c
@@ -16,6 +16,7 @@
16#include <asm/system.h> 16#include <asm/system.h>
17#include <asm/spitfire.h> 17#include <asm/spitfire.h>
18#include <asm/pstate.h> 18#include <asm/pstate.h>
19#include <asm/ldc.h>
19 20
20struct { 21struct {
21 long prom_callback; /* 0x00 */ 22 long prom_callback; /* 0x00 */
diff --git a/arch/sparc64/prom/tree.c b/arch/sparc64/prom/tree.c
index 500f05e2cfcb..b2c5b12c9818 100644
--- a/arch/sparc64/prom/tree.c
+++ b/arch/sparc64/prom/tree.c
@@ -13,6 +13,7 @@
13 13
14#include <asm/openprom.h> 14#include <asm/openprom.h>
15#include <asm/oplib.h> 15#include <asm/oplib.h>
16#include <asm/ldc.h>
16 17
17/* Return the child of node 'node' or zero if no this node has no 18/* Return the child of node 'node' or zero if no this node has no
18 * direct descendent. 19 * direct descendent.
@@ -261,9 +262,17 @@ int prom_node_has_property(int node, const char *prop)
261int 262int
262prom_setprop(int node, const char *pname, char *value, int size) 263prom_setprop(int node, const char *pname, char *value, int size)
263{ 264{
264 if(size == 0) return 0; 265 if (size == 0)
265 if((pname == 0) || (value == 0)) return 0; 266 return 0;
267 if ((pname == 0) || (value == 0))
268 return 0;
266 269
270#ifdef CONFIG_SUN_LDOMS
271 if (ldom_domaining_enabled) {
272 ldom_set_var(pname, value);
273 return 0;
274 }
275#endif
267 return p1275_cmd ("setprop", P1275_ARG(1,P1275_ARG_IN_STRING)| 276 return p1275_cmd ("setprop", P1275_ARG(1,P1275_ARG_IN_STRING)|
268 P1275_ARG(2,P1275_ARG_IN_BUF)| 277 P1275_ARG(2,P1275_ARG_IN_BUF)|
269 P1275_INOUT(4, 1), 278 P1275_INOUT(4, 1),
@@ -295,3 +304,11 @@ prom_pathtoinode(const char *path)
295 if (node == -1) return 0; 304 if (node == -1) return 0;
296 return node; 305 return node;
297} 306}
307
308int prom_ihandle2path(int handle, char *buffer, int bufsize)
309{
310 return p1275_cmd("instance-to-path",
311 P1275_ARG(1,P1275_ARG_OUT_BUF)|
312 P1275_INOUT(3, 1),
313 handle, buffer, P1275_SIZE(bufsize));
314}
diff --git a/arch/sparc64/solaris/socksys.c b/arch/sparc64/solaris/socksys.c
index e94f6e5d9455..7736411f244f 100644
--- a/arch/sparc64/solaris/socksys.c
+++ b/arch/sparc64/solaris/socksys.c
@@ -199,6 +199,5 @@ int __init init_socksys(void)
199 199
200void __exit cleanup_socksys(void) 200void __exit cleanup_socksys(void)
201{ 201{
202 if (unregister_chrdev(30, "socksys")) 202 unregister_chrdev(30, "socksys");
203 printk ("Couldn't unregister socksys character device\n");
204} 203}
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index c504312219b4..e6ff30266542 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -278,6 +278,7 @@ config HIGHMEM
278config KERNEL_STACK_ORDER 278config KERNEL_STACK_ORDER
279 int "Kernel stack size order" 279 int "Kernel stack size order"
280 default 1 if 64BIT 280 default 1 if 64BIT
281 range 1 10 if 64BIT
281 default 0 if !64BIT 282 default 0 if !64BIT
282 help 283 help
283 This option determines the size of UML kernel stacks. They will 284 This option determines the size of UML kernel stacks. They will
diff --git a/arch/um/Kconfig.debug b/arch/um/Kconfig.debug
index 09c1aca6339f..c86f5eb29fd5 100644
--- a/arch/um/Kconfig.debug
+++ b/arch/um/Kconfig.debug
@@ -47,4 +47,13 @@ config GCOV
47 If you're involved in UML kernel development and want to use gcov, 47 If you're involved in UML kernel development and want to use gcov,
48 say Y. If you're unsure, say N. 48 say Y. If you're unsure, say N.
49 49
50config DEBUG_STACK_USAGE
51 bool "Stack utilization instrumentation"
52 default N
53 help
54 Track the maximum kernel stack usage - this will look at each
55 kernel stack at process exit and log it if it's the deepest
56 stack seen so far.
57
58 This option will slow down process creation and destruction somewhat.
50endmenu 59endmenu
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 5d5ed726faa0..989224f21346 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -146,7 +146,7 @@ define cmd_vmlinux__
146 -Wl,-T,$(vmlinux-lds) $(vmlinux-init) \ 146 -Wl,-T,$(vmlinux-lds) $(vmlinux-init) \
147 -Wl,--start-group $(vmlinux-main) -Wl,--end-group \ 147 -Wl,--start-group $(vmlinux-main) -Wl,--end-group \
148 -lutil \ 148 -lutil \
149 $(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) \ 149 $(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) vmlinux.o \
150 FORCE ,$^) ; rm -f linux 150 FORCE ,$^) ; rm -f linux
151endef 151endef
152 152
diff --git a/arch/um/config.release b/arch/um/config.release
deleted file mode 100644
index fc68bcb9294e..000000000000
--- a/arch/um/config.release
+++ /dev/null
@@ -1,333 +0,0 @@
1#
2# Automatically generated make config: don't edit
3#
4CONFIG_USERMODE=y
5# CONFIG_ISA is not set
6# CONFIG_SBUS is not set
7# CONFIG_PCI is not set
8CONFIG_UID16=y
9CONFIG_RWSEM_XCHGADD_ALGORITHM=y
10
11#
12# Code maturity level options
13#
14CONFIG_EXPERIMENTAL=y
15
16#
17# General Setup
18#
19CONFIG_STDIO_CONSOLE=y
20CONFIG_NET=y
21CONFIG_SYSVIPC=y
22CONFIG_BSD_PROCESS_ACCT=y
23CONFIG_SYSCTL=y
24CONFIG_BINFMT_AOUT=y
25CONFIG_BINFMT_ELF=y
26CONFIG_BINFMT_MISC=y
27CONFIG_UNIX98_PTYS=y
28CONFIG_UNIX98_PTY_COUNT=256
29CONFIG_SSL=y
30CONFIG_HOSTFS=y
31CONFIG_MCONSOLE=y
32CONFIG_MAGIC_SYSRQ=y
33# CONFIG_HOST_2G_2G is not set
34# CONFIG_UML_SMP is not set
35# CONFIG_SMP is not set
36CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
37CONFIG_CON_CHAN="xterm"
38CONFIG_SSL_CHAN="pty"
39CONFIG_NEST_LEVEL=0
40CONFIG_KERNEL_HALF_GIGS=1
41
42#
43# Loadable module support
44#
45CONFIG_MODULES=y
46CONFIG_KMOD=y
47
48#
49# Devices
50#
51CONFIG_BLK_DEV_UBD=y
52# CONFIG_BLK_DEV_UBD_SYNC is not set
53CONFIG_BLK_DEV_LOOP=y
54CONFIG_BLK_DEV_NBD=y
55CONFIG_BLK_DEV_RAM=y
56CONFIG_BLK_DEV_RAM_SIZE=4096
57CONFIG_BLK_DEV_INITRD=y
58# CONFIG_MMAPPER is not set
59CONFIG_UML_SOUND=y
60CONFIG_SOUND=y
61CONFIG_HOSTAUDIO=y
62# CONFIG_UML_WATCHDOG is not set
63# CONFIG_TTY_LOG is not set
64CONFIG_FD_CHAN=y
65# CONFIG_NULL_CHAN is not set
66CONFIG_PORT_CHAN=y
67CONFIG_PTY_CHAN=y
68CONFIG_TTY_CHAN=y
69CONFIG_XTERM_CHAN=y
70
71#
72# Networking options
73#
74CONFIG_PACKET=y
75CONFIG_PACKET_MMAP=y
76# CONFIG_NETLINK_DEV is not set
77# CONFIG_NETFILTER is not set
78# CONFIG_FILTER is not set
79CONFIG_UNIX=y
80CONFIG_INET=y
81# CONFIG_IP_MULTICAST is not set
82# CONFIG_IP_ADVANCED_ROUTER is not set
83# CONFIG_IP_PNP is not set
84# CONFIG_NET_IPIP is not set
85# CONFIG_NET_IPGRE is not set
86# CONFIG_ARPD is not set
87# CONFIG_INET_ECN is not set
88# CONFIG_SYN_COOKIES is not set
89# CONFIG_IPV6 is not set
90# CONFIG_KHTTPD is not set
91# CONFIG_ATM is not set
92# CONFIG_VLAN_8021Q is not set
93
94#
95#
96#
97# CONFIG_IPX is not set
98# CONFIG_ATALK is not set
99# CONFIG_DECNET is not set
100# CONFIG_BRIDGE is not set
101# CONFIG_X25 is not set
102# CONFIG_LAPB is not set
103# CONFIG_LLC is not set
104# CONFIG_NET_DIVERT is not set
105# CONFIG_ECONET is not set
106# CONFIG_WAN_ROUTER is not set
107# CONFIG_NET_HW_FLOWCONTROL is not set
108
109#
110# QoS and/or fair queueing
111#
112# CONFIG_NET_SCHED is not set
113
114#
115# Network device support
116#
117CONFIG_UML_NET=y
118CONFIG_UML_NET_ETHERTAP=y
119CONFIG_UML_NET_TUNTAP=y
120CONFIG_UML_NET_SLIP=y
121CONFIG_UML_NET_DAEMON=y
122CONFIG_UML_NET_MCAST=y
123CONFIG_NETDEVICES=y
124
125#
126# ARCnet devices
127#
128# CONFIG_ARCNET is not set
129CONFIG_DUMMY=y
130CONFIG_BONDING=m
131CONFIG_EQUALIZER=m
132CONFIG_TUN=y
133# CONFIG_ETHERTAP is not set
134
135#
136# Ethernet (10 or 100Mbit)
137#
138# CONFIG_NET_ETHERNET is not set
139
140#
141# Ethernet (1000 Mbit)
142#
143# CONFIG_ACENIC is not set
144# CONFIG_DL2K is not set
145# CONFIG_MYRI_SBUS is not set
146# CONFIG_NS83820 is not set
147# CONFIG_HAMACHI is not set
148# CONFIG_YELLOWFIN is not set
149# CONFIG_SK98LIN is not set
150# CONFIG_FDDI is not set
151# CONFIG_HIPPI is not set
152CONFIG_PLIP=m
153CONFIG_PPP=m
154CONFIG_PPP_MULTILINK=y
155# CONFIG_PPP_FILTER is not set
156# CONFIG_PPP_ASYNC is not set
157CONFIG_PPP_SYNC_TTY=m
158CONFIG_PPP_DEFLATE=m
159CONFIG_PPP_BSDCOMP=m
160CONFIG_PPPOE=m
161CONFIG_SLIP=m
162CONFIG_SLIP_COMPRESSED=y
163CONFIG_SLIP_SMART=y
164# CONFIG_SLIP_MODE_SLIP6 is not set
165
166#
167# Wireless LAN (non-hamradio)
168#
169# CONFIG_NET_RADIO is not set
170
171#
172# Token Ring devices
173#
174# CONFIG_TR is not set
175# CONFIG_NET_FC is not set
176# CONFIG_RCPCI is not set
177CONFIG_SHAPER=m
178
179#
180# Wan interfaces
181#
182# CONFIG_WAN is not set
183
184#
185# File systems
186#
187CONFIG_QUOTA=y
188CONFIG_AUTOFS_FS=m
189CONFIG_AUTOFS4_FS=m
190CONFIG_REISERFS_FS=m
191# CONFIG_REISERFS_CHECK is not set
192# CONFIG_REISERFS_PROC_INFO is not set
193CONFIG_ADFS_FS=m
194# CONFIG_ADFS_FS_RW is not set
195CONFIG_AFFS_FS=m
196CONFIG_HFS_FS=m
197CONFIG_BFS_FS=m
198CONFIG_EXT3_FS=y
199CONFIG_JBD=y
200# CONFIG_JBD_DEBUG is not set
201CONFIG_FAT_FS=y
202CONFIG_MSDOS_FS=y
203CONFIG_UMSDOS_FS=y
204CONFIG_VFAT_FS=y
205CONFIG_EFS_FS=m
206# CONFIG_JFFS_FS is not set
207# CONFIG_JFFS2_FS is not set
208CONFIG_CRAMFS=m
209CONFIG_TMPFS=y
210CONFIG_RAMFS=m
211CONFIG_ISO9660_FS=y
212# CONFIG_JOLIET is not set
213# CONFIG_ZISOFS is not set
214CONFIG_MINIX_FS=m
215CONFIG_VXFS_FS=m
216# CONFIG_NTFS_FS is not set
217# CONFIG_NTFS_RW is not set
218CONFIG_HPFS_FS=m
219CONFIG_PROC_FS=y
220CONFIG_DEVFS_FS=y
221CONFIG_DEVFS_MOUNT=y
222# CONFIG_DEVFS_DEBUG is not set
223CONFIG_DEVPTS_FS=y
224CONFIG_QNX4FS_FS=m
225# CONFIG_QNX4FS_RW is not set
226CONFIG_ROMFS_FS=m
227CONFIG_EXT2_FS=y
228CONFIG_SYSV_FS=m
229CONFIG_UDF_FS=m
230CONFIG_UFS_FS=m
231# CONFIG_UFS_FS_WRITE is not set
232
233#
234# Network File Systems
235#
236# CONFIG_CODA_FS is not set
237# CONFIG_INTERMEZZO_FS is not set
238CONFIG_NFS_FS=y
239CONFIG_NFS_V3=y
240# CONFIG_ROOT_NFS is not set
241CONFIG_NFSD=y
242CONFIG_NFSD_V3=y
243CONFIG_SUNRPC=y
244CONFIG_LOCKD=y
245CONFIG_LOCKD_V4=y
246# CONFIG_SMB_FS is not set
247# CONFIG_NCP_FS is not set
248# CONFIG_NCPFS_PACKET_SIGNING is not set
249# CONFIG_NCPFS_IOCTL_LOCKING is not set
250# CONFIG_NCPFS_STRONG is not set
251# CONFIG_NCPFS_NFS_NS is not set
252# CONFIG_NCPFS_OS2_NS is not set
253# CONFIG_NCPFS_SMALLDOS is not set
254# CONFIG_NCPFS_NLS is not set
255# CONFIG_NCPFS_EXTRAS is not set
256# CONFIG_ZISOFS_FS is not set
257CONFIG_ZLIB_FS_INFLATE=m
258
259#
260# Partition Types
261#
262# CONFIG_PARTITION_ADVANCED is not set
263CONFIG_MSDOS_PARTITION=y
264# CONFIG_SMB_NLS is not set
265CONFIG_NLS=y
266
267#
268# Native Language Support
269#
270CONFIG_NLS_DEFAULT="iso8859-1"
271# CONFIG_NLS_CODEPAGE_437 is not set
272# CONFIG_NLS_CODEPAGE_737 is not set
273# CONFIG_NLS_CODEPAGE_775 is not set
274# CONFIG_NLS_CODEPAGE_850 is not set
275# CONFIG_NLS_CODEPAGE_852 is not set
276# CONFIG_NLS_CODEPAGE_855 is not set
277# CONFIG_NLS_CODEPAGE_857 is not set
278# CONFIG_NLS_CODEPAGE_860 is not set
279# CONFIG_NLS_CODEPAGE_861 is not set
280# CONFIG_NLS_CODEPAGE_862 is not set
281# CONFIG_NLS_CODEPAGE_863 is not set
282# CONFIG_NLS_CODEPAGE_864 is not set
283# CONFIG_NLS_CODEPAGE_865 is not set
284# CONFIG_NLS_CODEPAGE_866 is not set
285# CONFIG_NLS_CODEPAGE_869 is not set
286# CONFIG_NLS_CODEPAGE_936 is not set
287# CONFIG_NLS_CODEPAGE_950 is not set
288# CONFIG_NLS_CODEPAGE_932 is not set
289# CONFIG_NLS_CODEPAGE_949 is not set
290# CONFIG_NLS_CODEPAGE_874 is not set
291# CONFIG_NLS_ISO8859_8 is not set
292# CONFIG_NLS_CODEPAGE_1250 is not set
293# CONFIG_NLS_CODEPAGE_1251 is not set
294# CONFIG_NLS_ISO8859_1 is not set
295# CONFIG_NLS_ISO8859_2 is not set
296# CONFIG_NLS_ISO8859_3 is not set
297# CONFIG_NLS_ISO8859_4 is not set
298# CONFIG_NLS_ISO8859_5 is not set
299# CONFIG_NLS_ISO8859_6 is not set
300# CONFIG_NLS_ISO8859_7 is not set
301# CONFIG_NLS_ISO8859_9 is not set
302# CONFIG_NLS_ISO8859_13 is not set
303# CONFIG_NLS_ISO8859_14 is not set
304# CONFIG_NLS_ISO8859_15 is not set
305# CONFIG_NLS_KOI8_R is not set
306# CONFIG_NLS_KOI8_U is not set
307# CONFIG_NLS_UTF8 is not set
308
309#
310# Multi-device support (RAID and LVM)
311#
312# CONFIG_MD is not set
313# CONFIG_BLK_DEV_MD is not set
314# CONFIG_MD_LINEAR is not set
315# CONFIG_MD_RAID0 is not set
316# CONFIG_MD_RAID1 is not set
317# CONFIG_MD_RAID5 is not set
318# CONFIG_MD_MULTIPATH is not set
319# CONFIG_BLK_DEV_LVM is not set
320
321#
322# Memory Technology Devices (MTD)
323#
324# CONFIG_MTD is not set
325
326#
327# Kernel hacking
328#
329# CONFIG_DEBUG_SLAB is not set
330# CONFIG_DEBUG_INFO is not set
331# CONFIG_PT_PROXY is not set
332# CONFIG_GPROF is not set
333# CONFIG_GCOV is not set
diff --git a/arch/um/defconfig b/arch/um/defconfig
index a54d0efecae1..1e0f677c2f46 100644
--- a/arch/um/defconfig
+++ b/arch/um/defconfig
@@ -52,7 +52,6 @@ CONFIG_X86_WP_WORKS_OK=y
52CONFIG_X86_INVLPG=y 52CONFIG_X86_INVLPG=y
53CONFIG_X86_BSWAP=y 53CONFIG_X86_BSWAP=y
54CONFIG_X86_POPAD_OK=y 54CONFIG_X86_POPAD_OK=y
55CONFIG_X86_CMPXCHG64=y
56CONFIG_X86_GOOD_APIC=y 55CONFIG_X86_GOOD_APIC=y
57CONFIG_X86_USE_PPRO_CHECKSUM=y 56CONFIG_X86_USE_PPRO_CHECKSUM=y
58CONFIG_X86_TSC=y 57CONFIG_X86_TSC=y
@@ -189,7 +188,7 @@ CONFIG_XTERM_CHAN=y
189# CONFIG_NOCONFIG_CHAN is not set 188# CONFIG_NOCONFIG_CHAN is not set
190CONFIG_CON_ZERO_CHAN="fd:0,fd:1" 189CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
191CONFIG_CON_CHAN="xterm" 190CONFIG_CON_CHAN="xterm"
192CONFIG_SSL_CHAN="pty" 191CONFIG_SSL_CHAN="pts"
193CONFIG_UNIX98_PTYS=y 192CONFIG_UNIX98_PTYS=y
194CONFIG_LEGACY_PTYS=y 193CONFIG_LEGACY_PTYS=y
195CONFIG_LEGACY_PTY_COUNT=256 194CONFIG_LEGACY_PTY_COUNT=256
@@ -527,3 +526,4 @@ CONFIG_FORCED_INLINING=y
527# CONFIG_RCU_TORTURE_TEST is not set 526# CONFIG_RCU_TORTURE_TEST is not set
528# CONFIG_GPROF is not set 527# CONFIG_GPROF is not set
529# CONFIG_GCOV is not set 528# CONFIG_GCOV is not set
529# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c
index 3aa351611763..368d3e97dfd9 100644
--- a/arch/um/drivers/chan_kern.c
+++ b/arch/um/drivers/chan_kern.c
@@ -203,22 +203,37 @@ void chan_enable_winch(struct list_head *chans, struct tty_struct *tty)
203 } 203 }
204} 204}
205 205
206void enable_chan(struct line *line) 206int enable_chan(struct line *line)
207{ 207{
208 struct list_head *ele; 208 struct list_head *ele;
209 struct chan *chan; 209 struct chan *chan;
210 int err;
210 211
211 list_for_each(ele, &line->chan_list){ 212 list_for_each(ele, &line->chan_list){
212 chan = list_entry(ele, struct chan, list); 213 chan = list_entry(ele, struct chan, list);
213 if(open_one_chan(chan)) 214 err = open_one_chan(chan);
215 if (err) {
216 if (chan->primary)
217 goto out_close;
218
214 continue; 219 continue;
220 }
215 221
216 if(chan->enabled) 222 if(chan->enabled)
217 continue; 223 continue;
218 line_setup_irq(chan->fd, chan->input, chan->output, line, 224 err = line_setup_irq(chan->fd, chan->input, chan->output, line,
219 chan); 225 chan);
226 if (err)
227 goto out_close;
228
220 chan->enabled = 1; 229 chan->enabled = 1;
221 } 230 }
231
232 return 0;
233
234 out_close:
235 close_chan(&line->chan_list, 0);
236 return err;
222} 237}
223 238
224/* Items are added in IRQ context, when free_irq can't be called, and 239/* Items are added in IRQ context, when free_irq can't be called, and
diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c
index 13f0bf852b2a..4d438f36ea2e 100644
--- a/arch/um/drivers/chan_user.c
+++ b/arch/um/drivers/chan_user.c
@@ -51,19 +51,21 @@ error:
51/* 51/*
52 * UML SIGWINCH handling 52 * UML SIGWINCH handling
53 * 53 *
54 * The point of this is to handle SIGWINCH on consoles which have host ttys and 54 * The point of this is to handle SIGWINCH on consoles which have host
55 * relay them inside UML to whatever might be running on the console and cares 55 * ttys and relay them inside UML to whatever might be running on the
56 * about the window size (since SIGWINCH notifies about terminal size changes). 56 * console and cares about the window size (since SIGWINCH notifies
57 * about terminal size changes).
57 * 58 *
58 * So, we have a separate thread for each host tty attached to a UML device 59 * So, we have a separate thread for each host tty attached to a UML
59 * (side-issue - I'm annoyed that one thread can't have multiple controlling 60 * device (side-issue - I'm annoyed that one thread can't have
60 * ttys for purposed of handling SIGWINCH, but I imagine there are other reasons 61 * multiple controlling ttys for the purpose of handling SIGWINCH, but
61 * that doesn't make any sense). 62 * I imagine there are other reasons that doesn't make any sense).
62 * 63 *
63 * SIGWINCH can't be received synchronously, so you have to set up to receive it 64 * SIGWINCH can't be received synchronously, so you have to set up to
64 * as a signal. That being the case, if you are going to wait for it, it is 65 * receive it as a signal. That being the case, if you are going to
65 * convenient to sit in sigsuspend() and wait for the signal to bounce you out of 66 * wait for it, it is convenient to sit in sigsuspend() and wait for
66 * it (see below for how we make sure to exit only on SIGWINCH). 67 * the signal to bounce you out of it (see below for how we make sure
68 * to exit only on SIGWINCH).
67 */ 69 */
68 70
69static void winch_handler(int sig) 71static void winch_handler(int sig)
@@ -112,7 +114,8 @@ static int winch_thread(void *arg)
112 114
113 err = os_new_tty_pgrp(pty_fd, os_getpid()); 115 err = os_new_tty_pgrp(pty_fd, os_getpid());
114 if(err < 0){ 116 if(err < 0){
115 printk("winch_thread : new_tty_pgrp failed, err = %d\n", -err); 117 printk("winch_thread : new_tty_pgrp failed on fd %d, "
118 "err = %d\n", pty_fd, -err);
116 exit(1); 119 exit(1);
117 } 120 }
118 121
@@ -126,8 +129,9 @@ static int winch_thread(void *arg)
126 "err = %d\n", -count); 129 "err = %d\n", -count);
127 130
128 while(1){ 131 while(1){
129 /* This will be interrupted by SIGWINCH only, since other signals 132 /* This will be interrupted by SIGWINCH only, since
130 * are blocked.*/ 133 * other signals are blocked.
134 */
131 sigsuspend(&sigs); 135 sigsuspend(&sigs);
132 136
133 count = os_write_file(pipe_fd, &c, sizeof(c)); 137 count = os_write_file(pipe_fd, &c, sizeof(c));
@@ -137,10 +141,10 @@ static int winch_thread(void *arg)
137 } 141 }
138} 142}
139 143
140static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out) 144static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out,
145 unsigned long *stack_out)
141{ 146{
142 struct winch_data data; 147 struct winch_data data;
143 unsigned long stack;
144 int fds[2], n, err; 148 int fds[2], n, err;
145 char c; 149 char c;
146 150
@@ -153,9 +157,11 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out)
153 data = ((struct winch_data) { .pty_fd = fd, 157 data = ((struct winch_data) { .pty_fd = fd,
154 .pipe_fd = fds[1] } ); 158 .pipe_fd = fds[1] } );
155 /* CLONE_FILES so this thread doesn't hold open files which are open 159 /* CLONE_FILES so this thread doesn't hold open files which are open
156 * now, but later closed. This is a problem with /dev/net/tun. 160 * now, but later closed in a different thread. This is a
161 * problem with /dev/net/tun, which if held open by this
162 * thread, prevents the TUN/TAP device from being reused.
157 */ 163 */
158 err = run_helper_thread(winch_thread, &data, CLONE_FILES, &stack, 0); 164 err = run_helper_thread(winch_thread, &data, CLONE_FILES, stack_out);
159 if(err < 0){ 165 if(err < 0){
160 printk("fork of winch_thread failed - errno = %d\n", -err); 166 printk("fork of winch_thread failed - errno = %d\n", -err);
161 goto out_close; 167 goto out_close;
@@ -170,7 +176,13 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out)
170 err = -EINVAL; 176 err = -EINVAL;
171 goto out_close; 177 goto out_close;
172 } 178 }
173 return err ; 179
180 if (os_set_fd_block(*fd_out, 0)) {
181 printk("winch_tramp: failed to set thread_fd non-blocking.\n");
182 goto out_close;
183 }
184
185 return err;
174 186
175 out_close: 187 out_close:
176 os_close_file(fds[1]); 188 os_close_file(fds[1]);
@@ -181,25 +193,25 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out)
181 193
182void register_winch(int fd, struct tty_struct *tty) 194void register_winch(int fd, struct tty_struct *tty)
183{ 195{
184 int pid, thread, thread_fd = -1; 196 unsigned long stack;
185 int count; 197 int pid, thread, count, thread_fd = -1;
186 char c = 1; 198 char c = 1;
187 199
188 if(!isatty(fd)) 200 if(!isatty(fd))
189 return; 201 return;
190 202
191 pid = tcgetpgrp(fd); 203 pid = tcgetpgrp(fd);
192 if(!CHOOSE_MODE_PROC(is_tracer_winch, is_skas_winch, pid, fd, 204 if (!CHOOSE_MODE_PROC(is_tracer_winch, is_skas_winch, pid, fd, tty) &&
193 tty) && (pid == -1)){ 205 (pid == -1)) {
194 thread = winch_tramp(fd, tty, &thread_fd); 206 thread = winch_tramp(fd, tty, &thread_fd, &stack);
195 if(thread > 0){ 207 if (thread < 0)
196 register_winch_irq(thread_fd, fd, thread, tty); 208 return;
197 209
198 count = os_write_file(thread_fd, &c, sizeof(c)); 210 register_winch_irq(thread_fd, fd, thread, tty, stack);
199 if(count != sizeof(c)) 211
200 printk("register_winch : failed to write " 212 count = os_write_file(thread_fd, &c, sizeof(c));
201 "synchronization byte, err = %d\n", 213 if(count != sizeof(c))
202 -count); 214 printk("register_winch : failed to write "
203 } 215 "synchronization byte, err = %d\n", -count);
204 } 216 }
205} 217}
diff --git a/arch/um/drivers/cow_sys.h b/arch/um/drivers/cow_sys.h
index 15453845d2ba..ca8c9e11a39b 100644
--- a/arch/um/drivers/cow_sys.h
+++ b/arch/um/drivers/cow_sys.h
@@ -8,7 +8,7 @@
8 8
9static inline void *cow_malloc(int size) 9static inline void *cow_malloc(int size)
10{ 10{
11 return um_kmalloc(size); 11 return kmalloc(size, UM_GFP_KERNEL);
12} 12}
13 13
14static inline void cow_free(void *ptr) 14static inline void cow_free(void *ptr)
diff --git a/arch/um/drivers/daemon_user.c b/arch/um/drivers/daemon_user.c
index b869e3899683..8d2008f06682 100644
--- a/arch/um/drivers/daemon_user.c
+++ b/arch/um/drivers/daemon_user.c
@@ -35,7 +35,7 @@ static struct sockaddr_un *new_addr(void *name, int len)
35{ 35{
36 struct sockaddr_un *sun; 36 struct sockaddr_un *sun;
37 37
38 sun = um_kmalloc(sizeof(struct sockaddr_un)); 38 sun = kmalloc(sizeof(struct sockaddr_un), UM_GFP_KERNEL);
39 if(sun == NULL){ 39 if(sun == NULL){
40 printk("new_addr: allocation of sockaddr_un failed\n"); 40 printk("new_addr: allocation of sockaddr_un failed\n");
41 return NULL; 41 return NULL;
@@ -83,7 +83,7 @@ static int connect_to_switch(struct daemon_data *pri)
83 goto out_close; 83 goto out_close;
84 } 84 }
85 85
86 sun = um_kmalloc(sizeof(struct sockaddr_un)); 86 sun = kmalloc(sizeof(struct sockaddr_un), UM_GFP_KERNEL);
87 if(sun == NULL){ 87 if(sun == NULL){
88 printk("new_addr: allocation of sockaddr_un failed\n"); 88 printk("new_addr: allocation of sockaddr_un failed\n");
89 err = -ENOMEM; 89 err = -ENOMEM;
diff --git a/arch/um/drivers/fd.c b/arch/um/drivers/fd.c
index 7f083ec47a4f..39c01ffd45c9 100644
--- a/arch/um/drivers/fd.c
+++ b/arch/um/drivers/fd.c
@@ -37,7 +37,7 @@ static void *fd_init(char *str, int device, const struct chan_opts *opts)
37 printk("fd_init : couldn't parse file descriptor '%s'\n", str); 37 printk("fd_init : couldn't parse file descriptor '%s'\n", str);
38 return(NULL); 38 return(NULL);
39 } 39 }
40 data = um_kmalloc(sizeof(*data)); 40 data = kmalloc(sizeof(*data), UM_GFP_KERNEL);
41 if(data == NULL) return(NULL); 41 if(data == NULL) return(NULL);
42 *data = ((struct fd_chan) { .fd = n, 42 *data = ((struct fd_chan) { .fd = n,
43 .raw = opts->raw }); 43 .raw = opts->raw });
diff --git a/arch/um/drivers/harddog_user.c b/arch/um/drivers/harddog_user.c
index 5eeecf8917c3..1171790f742c 100644
--- a/arch/um/drivers/harddog_user.c
+++ b/arch/um/drivers/harddog_user.c
@@ -68,7 +68,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
68 args = pid_args; 68 args = pid_args;
69 } 69 }
70 70
71 pid = run_helper(pre_exec, &data, args, NULL); 71 pid = run_helper(pre_exec, &data, args);
72 72
73 os_close_file(out_fds[0]); 73 os_close_file(out_fds[0]);
74 os_close_file(in_fds[1]); 74 os_close_file(in_fds[1]);
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index ced99106f798..3e0b68e297f2 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -3,6 +3,7 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/kernel.h"
6#include "linux/sched.h" 7#include "linux/sched.h"
7#include "linux/slab.h" 8#include "linux/slab.h"
8#include "linux/list.h" 9#include "linux/list.h"
@@ -453,7 +454,10 @@ int line_open(struct line *lines, struct tty_struct *tty)
453 tty->driver_data = line; 454 tty->driver_data = line;
454 line->tty = tty; 455 line->tty = tty;
455 456
456 enable_chan(line); 457 err = enable_chan(line);
458 if (err)
459 return err;
460
457 INIT_DELAYED_WORK(&line->task, line_timer_cb); 461 INIT_DELAYED_WORK(&line->task, line_timer_cb);
458 462
459 if(!line->sigio){ 463 if(!line->sigio){
@@ -745,8 +749,24 @@ struct winch {
745 int tty_fd; 749 int tty_fd;
746 int pid; 750 int pid;
747 struct tty_struct *tty; 751 struct tty_struct *tty;
752 unsigned long stack;
748}; 753};
749 754
755static void free_winch(struct winch *winch, int free_irq_ok)
756{
757 list_del(&winch->list);
758
759 if (winch->pid != -1)
760 os_kill_process(winch->pid, 1);
761 if (winch->fd != -1)
762 os_close_file(winch->fd);
763 if (winch->stack != 0)
764 free_stack(winch->stack, 0);
765 if (free_irq_ok)
766 free_irq(WINCH_IRQ, winch);
767 kfree(winch);
768}
769
750static irqreturn_t winch_interrupt(int irq, void *data) 770static irqreturn_t winch_interrupt(int irq, void *data)
751{ 771{
752 struct winch *winch = data; 772 struct winch *winch = data;
@@ -763,12 +783,13 @@ static irqreturn_t winch_interrupt(int irq, void *data)
763 "errno = %d\n", -err); 783 "errno = %d\n", -err);
764 printk("fd %d is losing SIGWINCH support\n", 784 printk("fd %d is losing SIGWINCH support\n",
765 winch->tty_fd); 785 winch->tty_fd);
786 free_winch(winch, 0);
766 return IRQ_HANDLED; 787 return IRQ_HANDLED;
767 } 788 }
768 goto out; 789 goto out;
769 } 790 }
770 } 791 }
771 tty = winch->tty; 792 tty = winch->tty;
772 if (tty != NULL) { 793 if (tty != NULL) {
773 line = tty->driver_data; 794 line = tty->driver_data;
774 chan_window_size(&line->chan_list, &tty->winsize.ws_row, 795 chan_window_size(&line->chan_list, &tty->winsize.ws_row,
@@ -781,43 +802,44 @@ static irqreturn_t winch_interrupt(int irq, void *data)
781 return IRQ_HANDLED; 802 return IRQ_HANDLED;
782} 803}
783 804
784void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty) 805void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty,
806 unsigned long stack)
785{ 807{
786 struct winch *winch; 808 struct winch *winch;
787 809
788 winch = kmalloc(sizeof(*winch), GFP_KERNEL); 810 winch = kmalloc(sizeof(*winch), GFP_KERNEL);
789 if (winch == NULL) { 811 if (winch == NULL) {
790 printk("register_winch_irq - kmalloc failed\n"); 812 printk("register_winch_irq - kmalloc failed\n");
791 return; 813 goto cleanup;
792 } 814 }
793 815
794 *winch = ((struct winch) { .list = LIST_HEAD_INIT(winch->list), 816 *winch = ((struct winch) { .list = LIST_HEAD_INIT(winch->list),
795 .fd = fd, 817 .fd = fd,
796 .tty_fd = tty_fd, 818 .tty_fd = tty_fd,
797 .pid = pid, 819 .pid = pid,
798 .tty = tty }); 820 .tty = tty,
821 .stack = stack });
822
823 if (um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt,
824 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
825 "winch", winch) < 0) {
826 printk("register_winch_irq - failed to register IRQ\n");
827 goto out_free;
828 }
799 829
800 spin_lock(&winch_handler_lock); 830 spin_lock(&winch_handler_lock);
801 list_add(&winch->list, &winch_handlers); 831 list_add(&winch->list, &winch_handlers);
802 spin_unlock(&winch_handler_lock); 832 spin_unlock(&winch_handler_lock);
803 833
804 if(um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt, 834 return;
805 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
806 "winch", winch) < 0)
807 printk("register_winch_irq - failed to register IRQ\n");
808}
809
810static void free_winch(struct winch *winch)
811{
812 list_del(&winch->list);
813
814 if(winch->pid != -1)
815 os_kill_process(winch->pid, 1);
816 if(winch->fd != -1)
817 os_close_file(winch->fd);
818 835
819 free_irq(WINCH_IRQ, winch); 836 out_free:
820 kfree(winch); 837 kfree(winch);
838 cleanup:
839 os_kill_process(pid, 1);
840 os_close_file(fd);
841 if (stack != 0)
842 free_stack(stack, 0);
821} 843}
822 844
823static void unregister_winch(struct tty_struct *tty) 845static void unregister_winch(struct tty_struct *tty)
@@ -830,7 +852,7 @@ static void unregister_winch(struct tty_struct *tty)
830 list_for_each(ele, &winch_handlers){ 852 list_for_each(ele, &winch_handlers){
831 winch = list_entry(ele, struct winch, list); 853 winch = list_entry(ele, struct winch, list);
832 if(winch->tty == tty){ 854 if(winch->tty == tty){
833 free_winch(winch); 855 free_winch(winch, 1);
834 break; 856 break;
835 } 857 }
836 } 858 }
@@ -846,7 +868,7 @@ static void winch_cleanup(void)
846 868
847 list_for_each_safe(ele, next, &winch_handlers){ 869 list_for_each_safe(ele, next, &winch_handlers){
848 winch = list_entry(ele, struct winch, list); 870 winch = list_entry(ele, struct winch, list);
849 free_winch(winch); 871 free_winch(winch, 1);
850 } 872 }
851 873
852 spin_unlock(&winch_handler_lock); 874 spin_unlock(&winch_handler_lock);
diff --git a/arch/um/drivers/mcast_user.c b/arch/um/drivers/mcast_user.c
index d319db16d4ec..236a3dfc297d 100644
--- a/arch/um/drivers/mcast_user.c
+++ b/arch/um/drivers/mcast_user.c
@@ -30,7 +30,7 @@ static struct sockaddr_in *new_addr(char *addr, unsigned short port)
30{ 30{
31 struct sockaddr_in *sin; 31 struct sockaddr_in *sin;
32 32
33 sin = um_kmalloc(sizeof(struct sockaddr_in)); 33 sin = kmalloc(sizeof(struct sockaddr_in), UM_GFP_KERNEL);
34 if(sin == NULL){ 34 if(sin == NULL){
35 printk("new_addr: allocation of sockaddr_in failed\n"); 35 printk("new_addr: allocation of sockaddr_in failed\n");
36 return NULL; 36 return NULL;
diff --git a/arch/um/drivers/mconsole_user.c b/arch/um/drivers/mconsole_user.c
index 62e5ad63181a..f31e71546e52 100644
--- a/arch/um/drivers/mconsole_user.c
+++ b/arch/um/drivers/mconsole_user.c
@@ -86,8 +86,9 @@ int mconsole_get_request(int fd, struct mc_request *req)
86 int len; 86 int len;
87 87
88 req->originlen = sizeof(req->origin); 88 req->originlen = sizeof(req->origin);
89 req->len = recvfrom(fd, &req->request, sizeof(req->request), 0, 89 req->len = recvfrom(fd, &req->request, sizeof(req->request),
90 (struct sockaddr *) req->origin, &req->originlen); 90 MSG_DONTWAIT, (struct sockaddr *) req->origin,
91 &req->originlen);
91 if (req->len < 0) 92 if (req->len < 0)
92 return 0; 93 return 0;
93 94
diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c
index 3503cff867c3..da946e3e1bf2 100644
--- a/arch/um/drivers/net_user.c
+++ b/arch/um/drivers/net_user.c
@@ -187,7 +187,7 @@ static int change_tramp(char **argv, char *output, int output_len)
187 } 187 }
188 pe_data.close_me = fds[0]; 188 pe_data.close_me = fds[0];
189 pe_data.stdout = fds[1]; 189 pe_data.stdout = fds[1];
190 pid = run_helper(change_pre_exec, &pe_data, argv, NULL); 190 pid = run_helper(change_pre_exec, &pe_data, argv);
191 191
192 if (pid > 0) /* Avoid hang as we won't get data in failure case. */ 192 if (pid > 0) /* Avoid hang as we won't get data in failure case. */
193 read_output(fds[0], output, output_len); 193 read_output(fds[0], output, output_len);
@@ -217,7 +217,7 @@ static void change(char *dev, char *what, unsigned char *addr,
217 netmask[2], netmask[3]); 217 netmask[2], netmask[3]);
218 218
219 output_len = UM_KERN_PAGE_SIZE; 219 output_len = UM_KERN_PAGE_SIZE;
220 output = um_kmalloc(output_len); 220 output = kmalloc(output_len, UM_GFP_KERNEL);
221 if(output == NULL) 221 if(output == NULL)
222 printk("change : failed to allocate output buffer\n"); 222 printk("change : failed to allocate output buffer\n");
223 223
diff --git a/arch/um/drivers/pcap_user.c b/arch/um/drivers/pcap_user.c
index 483aa15222a4..1316456e2a28 100644
--- a/arch/um/drivers/pcap_user.c
+++ b/arch/um/drivers/pcap_user.c
@@ -53,7 +53,7 @@ static int pcap_open(void *data)
53 return -EIO; 53 return -EIO;
54 } 54 }
55 55
56 pri->compiled = um_kmalloc(sizeof(struct bpf_program)); 56 pri->compiled = kmalloc(sizeof(struct bpf_program), UM_GFP_KERNEL);
57 if(pri->compiled == NULL){ 57 if(pri->compiled == NULL){
58 printk(UM_KERN_ERR "pcap_open : kmalloc failed\n"); 58 printk(UM_KERN_ERR "pcap_open : kmalloc failed\n");
59 return -ENOMEM; 59 return -ENOMEM;
diff --git a/arch/um/drivers/port_user.c b/arch/um/drivers/port_user.c
index 3f6357d24bee..c799b00012c7 100644
--- a/arch/um/drivers/port_user.c
+++ b/arch/um/drivers/port_user.c
@@ -50,7 +50,7 @@ static void *port_init(char *str, int device, const struct chan_opts *opts)
50 if(kern_data == NULL) 50 if(kern_data == NULL)
51 return NULL; 51 return NULL;
52 52
53 data = um_kmalloc(sizeof(*data)); 53 data = kmalloc(sizeof(*data), UM_GFP_KERNEL);
54 if(data == NULL) 54 if(data == NULL)
55 goto err; 55 goto err;
56 56
@@ -188,7 +188,7 @@ int port_connection(int fd, int *socket, int *pid_out)
188 { .sock_fd = new, 188 { .sock_fd = new,
189 .pipe_fd = socket[1] }); 189 .pipe_fd = socket[1] });
190 190
191 err = run_helper(port_pre_exec, &data, argv, NULL); 191 err = run_helper(port_pre_exec, &data, argv);
192 if(err < 0) 192 if(err < 0)
193 goto out_shutdown; 193 goto out_shutdown;
194 194
diff --git a/arch/um/drivers/pty.c b/arch/um/drivers/pty.c
index df4976c9eef2..1e3fd619a837 100644
--- a/arch/um/drivers/pty.c
+++ b/arch/um/drivers/pty.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
@@ -7,12 +7,14 @@
7#include <stdlib.h> 7#include <stdlib.h>
8#include <unistd.h> 8#include <unistd.h>
9#include <string.h> 9#include <string.h>
10#include <fcntl.h>
10#include <errno.h> 11#include <errno.h>
11#include <termios.h> 12#include <termios.h>
13#include <sys/stat.h>
12#include "chan_user.h" 14#include "chan_user.h"
13#include "user.h"
14#include "kern_util.h"
15#include "os.h" 15#include "os.h"
16#include "user.h"
17#include "kern_constants.h"
16#include "um_malloc.h" 18#include "um_malloc.h"
17 19
18struct pty_chan { 20struct pty_chan {
@@ -27,12 +29,14 @@ static void *pty_chan_init(char *str, int device, const struct chan_opts *opts)
27{ 29{
28 struct pty_chan *data; 30 struct pty_chan *data;
29 31
30 data = um_kmalloc(sizeof(*data)); 32 data = kmalloc(sizeof(*data), UM_GFP_KERNEL);
31 if(data == NULL) return(NULL); 33 if (data == NULL)
34 return NULL;
35
32 *data = ((struct pty_chan) { .announce = opts->announce, 36 *data = ((struct pty_chan) { .announce = opts->announce,
33 .dev = device, 37 .dev = device,
34 .raw = opts->raw }); 38 .raw = opts->raw });
35 return(data); 39 return data;
36} 40}
37 41
38static int pts_open(int input, int output, int primary, void *d, 42static int pts_open(int input, int output, int primary, void *d,
@@ -43,31 +47,35 @@ static int pts_open(int input, int output, int primary, void *d,
43 int fd, err; 47 int fd, err;
44 48
45 fd = get_pty(); 49 fd = get_pty();
46 if(fd < 0){ 50 if (fd < 0) {
47 err = -errno; 51 err = -errno;
48 printk("open_pts : Failed to open pts\n"); 52 printk(UM_KERN_ERR "open_pts : Failed to open pts\n");
49 return err; 53 return err;
50 } 54 }
51 if(data->raw){ 55
56 if (data->raw) {
52 CATCH_EINTR(err = tcgetattr(fd, &data->tt)); 57 CATCH_EINTR(err = tcgetattr(fd, &data->tt));
53 if(err) 58 if (err)
54 return(err); 59 return err;
55 60
56 err = raw(fd); 61 err = raw(fd);
57 if(err) 62 if (err)
58 return(err); 63 return err;
59 } 64 }
60 65
61 dev = ptsname(fd); 66 dev = ptsname(fd);
62 sprintf(data->dev_name, "%s", dev); 67 sprintf(data->dev_name, "%s", dev);
63 *dev_out = data->dev_name; 68 *dev_out = data->dev_name;
69
64 if (data->announce) 70 if (data->announce)
65 (*data->announce)(dev, data->dev); 71 (*data->announce)(dev, data->dev);
66 return(fd); 72
73 return fd;
67} 74}
68 75
69static int getmaster(char *line) 76static int getmaster(char *line)
70{ 77{
78 struct stat buf;
71 char *pty, *bank, *cp; 79 char *pty, *bank, *cp;
72 int master, err; 80 int master, err;
73 81
@@ -75,24 +83,29 @@ static int getmaster(char *line)
75 for (bank = "pqrs"; *bank; bank++) { 83 for (bank = "pqrs"; *bank; bank++) {
76 line[strlen("/dev/pty")] = *bank; 84 line[strlen("/dev/pty")] = *bank;
77 *pty = '0'; 85 *pty = '0';
78 if (os_stat_file(line, NULL) < 0) 86 /* Did we hit the end ? */
87 if ((stat(line, &buf) < 0) && (errno == ENOENT))
79 break; 88 break;
89
80 for (cp = "0123456789abcdef"; *cp; cp++) { 90 for (cp = "0123456789abcdef"; *cp; cp++) {
81 *pty = *cp; 91 *pty = *cp;
82 master = os_open_file(line, of_rdwr(OPENFLAGS()), 0); 92 master = open(line, O_RDWR);
83 if (master >= 0) { 93 if (master >= 0) {
84 char *tp = &line[strlen("/dev/")]; 94 char *tp = &line[strlen("/dev/")];
85 95
86 /* verify slave side is usable */ 96 /* verify slave side is usable */
87 *tp = 't'; 97 *tp = 't';
88 err = os_access(line, OS_ACC_RW_OK); 98 err = access(line, R_OK | W_OK);
89 *tp = 'p'; 99 *tp = 'p';
90 if(err == 0) return(master); 100 if(!err)
91 (void) os_close_file(master); 101 return master;
102 close(master);
92 } 103 }
93 } 104 }
94 } 105 }
95 return(-1); 106
107 printk(UM_KERN_ERR "getmaster - no usable host pty devices\n");
108 return -ENOENT;
96} 109}
97 110
98static int pty_open(int input, int output, int primary, void *d, 111static int pty_open(int input, int output, int primary, void *d,
@@ -103,20 +116,22 @@ static int pty_open(int input, int output, int primary, void *d,
103 char dev[sizeof("/dev/ptyxx\0")] = "/dev/ptyxx"; 116 char dev[sizeof("/dev/ptyxx\0")] = "/dev/ptyxx";
104 117
105 fd = getmaster(dev); 118 fd = getmaster(dev);
106 if(fd < 0) 119 if (fd < 0)
107 return(-errno); 120 return fd;
108 121
109 if(data->raw){ 122 if(data->raw){
110 err = raw(fd); 123 err = raw(fd);
111 if(err) 124 if (err)
112 return(err); 125 return err;
113 } 126 }
114 127
115 if(data->announce) (*data->announce)(dev, data->dev); 128 if (data->announce)
129 (*data->announce)(dev, data->dev);
116 130
117 sprintf(data->dev_name, "%s", dev); 131 sprintf(data->dev_name, "%s", dev);
118 *dev_out = data->dev_name; 132 *dev_out = data->dev_name;
119 return(fd); 133
134 return fd;
120} 135}
121 136
122const struct chan_ops pty_ops = { 137const struct chan_ops pty_ops = {
@@ -144,14 +159,3 @@ const struct chan_ops pts_ops = {
144 .free = generic_free, 159 .free = generic_free,
145 .winch = 0, 160 .winch = 0,
146}; 161};
147
148/*
149 * Overrides for Emacs so that we follow Linus's tabbing style.
150 * Emacs will notice this stuff at the end of the file and automatically
151 * adjust the settings for this buffer only. This must remain at the end
152 * of the file.
153 * ---------------------------------------------------------------------------
154 * Local variables:
155 * c-file-style: "linux"
156 * End:
157 */
diff --git a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c
index 78f0e515da8f..c0b73c28cff0 100644
--- a/arch/um/drivers/slip_user.c
+++ b/arch/um/drivers/slip_user.c
@@ -85,13 +85,13 @@ static int slip_tramp(char **argv, int fd)
85 pe_data.stdin = fd; 85 pe_data.stdin = fd;
86 pe_data.stdout = fds[1]; 86 pe_data.stdout = fds[1];
87 pe_data.close_me = fds[0]; 87 pe_data.close_me = fds[0];
88 err = run_helper(slip_pre_exec, &pe_data, argv, NULL); 88 err = run_helper(slip_pre_exec, &pe_data, argv);
89 if(err < 0) 89 if(err < 0)
90 goto out_close; 90 goto out_close;
91 pid = err; 91 pid = err;
92 92
93 output_len = UM_KERN_PAGE_SIZE; 93 output_len = UM_KERN_PAGE_SIZE;
94 output = um_kmalloc(output_len); 94 output = kmalloc(output_len, UM_GFP_KERNEL);
95 if(output == NULL){ 95 if(output == NULL){
96 printk("slip_tramp : failed to allocate output buffer\n"); 96 printk("slip_tramp : failed to allocate output buffer\n");
97 os_kill_process(pid, 1); 97 os_kill_process(pid, 1);
diff --git a/arch/um/drivers/slirp_user.c b/arch/um/drivers/slirp_user.c
index 39f889fe9949..0e462f64f227 100644
--- a/arch/um/drivers/slirp_user.c
+++ b/arch/um/drivers/slirp_user.c
@@ -42,7 +42,7 @@ static int slirp_tramp(char **argv, int fd)
42 42
43 pe_data.stdin = fd; 43 pe_data.stdin = fd;
44 pe_data.stdout = fd; 44 pe_data.stdout = fd;
45 pid = run_helper(slirp_pre_exec, &pe_data, argv, NULL); 45 pid = run_helper(slirp_pre_exec, &pe_data, argv);
46 46
47 return(pid); 47 return(pid);
48} 48}
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c
index fd09ad9e9c0a..875d60d0c6a2 100644
--- a/arch/um/drivers/ssl.c
+++ b/arch/um/drivers/ssl.c
@@ -42,8 +42,6 @@ static struct chan_opts opts = {
42 .announce = ssl_announce, 42 .announce = ssl_announce,
43 .xterm_title = "Serial Line #%d", 43 .xterm_title = "Serial Line #%d",
44 .raw = 1, 44 .raw = 1,
45 .tramp_stack = 0,
46 .in_kernel = 1,
47}; 45};
48 46
49static int ssl_config(char *str, char **error_out); 47static int ssl_config(char *str, char **error_out);
@@ -99,7 +97,13 @@ static int ssl_remove(int n, char **error_out)
99 97
100static int ssl_open(struct tty_struct *tty, struct file *filp) 98static int ssl_open(struct tty_struct *tty, struct file *filp)
101{ 99{
102 return line_open(serial_lines, tty); 100 int err = line_open(serial_lines, tty);
101
102 if (err)
103 printk(KERN_ERR "Failed to open serial line %d, err = %d\n",
104 tty->index, err);
105
106 return err;
103} 107}
104 108
105#if 0 109#if 0
diff --git a/arch/um/drivers/stderr_console.c b/arch/um/drivers/stderr_console.c
index 911539293871..4739dd527b43 100644
--- a/arch/um/drivers/stderr_console.c
+++ b/arch/um/drivers/stderr_console.c
@@ -1,3 +1,4 @@
1#include <linux/kernel.h>
1#include <linux/init.h> 2#include <linux/init.h>
2#include <linux/console.h> 3#include <linux/console.h>
3 4
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c
index 2bb4193ac1aa..656036e90b19 100644
--- a/arch/um/drivers/stdio_console.c
+++ b/arch/um/drivers/stdio_console.c
@@ -46,8 +46,6 @@ static struct chan_opts opts = {
46 .announce = stdio_announce, 46 .announce = stdio_announce,
47 .xterm_title = "Virtual Console #%d", 47 .xterm_title = "Virtual Console #%d",
48 .raw = 1, 48 .raw = 1,
49 .tramp_stack = 0,
50 .in_kernel = 1,
51}; 49};
52 50
53static int con_config(char *str, char **error_out); 51static int con_config(char *str, char **error_out);
@@ -101,7 +99,12 @@ static int con_remove(int n, char **error_out)
101 99
102static int con_open(struct tty_struct *tty, struct file *filp) 100static int con_open(struct tty_struct *tty, struct file *filp)
103{ 101{
104 return line_open(vts, tty); 102 int err = line_open(vts, tty);
103 if (err)
104 printk(KERN_ERR "Failed to open console %d, err = %d\n",
105 tty->index, err);
106
107 return err;
105} 108}
106 109
107/* Set in an initcall, checked in an exitcall */ 110/* Set in an initcall, checked in an exitcall */
diff --git a/arch/um/drivers/tty.c b/arch/um/drivers/tty.c
index c07d0d562780..a9f87e19c5bf 100644
--- a/arch/um/drivers/tty.c
+++ b/arch/um/drivers/tty.c
@@ -29,7 +29,7 @@ static void *tty_chan_init(char *str, int device, const struct chan_opts *opts)
29 } 29 }
30 str++; 30 str++;
31 31
32 data = um_kmalloc(sizeof(*data)); 32 data = kmalloc(sizeof(*data), UM_GFP_KERNEL);
33 if(data == NULL) 33 if(data == NULL)
34 return NULL; 34 return NULL;
35 *data = ((struct tty_chan) { .dev = str, 35 *data = ((struct tty_chan) { .dev = str,
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 70509ddaac03..fc27f6c72b41 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -20,6 +20,7 @@
20#define MAJOR_NR UBD_MAJOR 20#define MAJOR_NR UBD_MAJOR
21#define UBD_SHIFT 4 21#define UBD_SHIFT 4
22 22
23#include "linux/kernel.h"
23#include "linux/module.h" 24#include "linux/module.h"
24#include "linux/blkdev.h" 25#include "linux/blkdev.h"
25#include "linux/hdreg.h" 26#include "linux/hdreg.h"
@@ -711,6 +712,8 @@ static int ubd_add(int n, char **error_out)
711 ubd_dev->queue->queuedata = ubd_dev; 712 ubd_dev->queue->queuedata = ubd_dev;
712 713
713 blk_queue_max_hw_segments(ubd_dev->queue, MAX_SG); 714 blk_queue_max_hw_segments(ubd_dev->queue, MAX_SG);
715 if(ubd_dev->cow.file != NULL)
716 blk_queue_max_sectors(ubd_dev->queue, 8 * sizeof(long));
714 err = ubd_disk_register(MAJOR_NR, ubd_dev->size, n, &ubd_gendisk[n]); 717 err = ubd_disk_register(MAJOR_NR, ubd_dev->size, n, &ubd_gendisk[n]);
715 if(err){ 718 if(err){
716 *error_out = "Failed to register device"; 719 *error_out = "Failed to register device";
@@ -1082,7 +1085,7 @@ static void do_ubd_request(request_queue_t *q)
1082{ 1085{
1083 struct io_thread_req *io_req; 1086 struct io_thread_req *io_req;
1084 struct request *req; 1087 struct request *req;
1085 int n; 1088 int n, last_sectors;
1086 1089
1087 while(1){ 1090 while(1){
1088 struct ubd *dev = q->queuedata; 1091 struct ubd *dev = q->queuedata;
@@ -1098,9 +1101,11 @@ static void do_ubd_request(request_queue_t *q)
1098 } 1101 }
1099 1102
1100 req = dev->request; 1103 req = dev->request;
1104 last_sectors = 0;
1101 while(dev->start_sg < dev->end_sg){ 1105 while(dev->start_sg < dev->end_sg){
1102 struct scatterlist *sg = &dev->sg[dev->start_sg]; 1106 struct scatterlist *sg = &dev->sg[dev->start_sg];
1103 1107
1108 req->sector += last_sectors;
1104 io_req = kmalloc(sizeof(struct io_thread_req), 1109 io_req = kmalloc(sizeof(struct io_thread_req),
1105 GFP_ATOMIC); 1110 GFP_ATOMIC);
1106 if(io_req == NULL){ 1111 if(io_req == NULL){
@@ -1112,6 +1117,7 @@ static void do_ubd_request(request_queue_t *q)
1112 (unsigned long long) req->sector << 9, 1117 (unsigned long long) req->sector << 9,
1113 sg->offset, sg->length, sg->page); 1118 sg->offset, sg->length, sg->page);
1114 1119
1120 last_sectors = sg->length >> 9;
1115 n = os_write_file(thread_fd, &io_req, 1121 n = os_write_file(thread_fd, &io_req,
1116 sizeof(struct io_thread_req *)); 1122 sizeof(struct io_thread_req *));
1117 if(n != sizeof(struct io_thread_req *)){ 1123 if(n != sizeof(struct io_thread_req *)){
@@ -1123,7 +1129,6 @@ static void do_ubd_request(request_queue_t *q)
1123 return; 1129 return;
1124 } 1130 }
1125 1131
1126 req->sector += sg->length >> 9;
1127 dev->start_sg++; 1132 dev->start_sg++;
1128 } 1133 }
1129 dev->end_sg = 0; 1134 dev->end_sg = 0;
diff --git a/arch/um/drivers/ubd_user.c b/arch/um/drivers/ubd_user.c
index 4707b3f14c2f..41d254bd38df 100644
--- a/arch/um/drivers/ubd_user.c
+++ b/arch/um/drivers/ubd_user.c
@@ -43,6 +43,12 @@ int start_io_thread(unsigned long sp, int *fd_out)
43 kernel_fd = fds[0]; 43 kernel_fd = fds[0];
44 *fd_out = fds[1]; 44 *fd_out = fds[1];
45 45
46 err = os_set_fd_block(*fd_out, 0);
47 if (err) {
48 printk("start_io_thread - failed to set nonblocking I/O.\n");
49 goto out_close;
50 }
51
46 pid = clone(io_thread, (void *) sp, CLONE_FILES | CLONE_VM | SIGCHLD, 52 pid = clone(io_thread, (void *) sp, CLONE_FILES | CLONE_VM | SIGCHLD,
47 NULL); 53 NULL);
48 if(pid < 0){ 54 if(pid < 0){
diff --git a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c
index 571c2b3325d5..fd817e541543 100644
--- a/arch/um/drivers/xterm.c
+++ b/arch/um/drivers/xterm.c
@@ -1,22 +1,20 @@
1/* 1/*
2 * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include <stdio.h>
7#include <stdlib.h> 6#include <stdlib.h>
7#include <stdio.h>
8#include <unistd.h> 8#include <unistd.h>
9#include <string.h> 9#include <string.h>
10#include <errno.h> 10#include <errno.h>
11#include <termios.h> 11#include <termios.h>
12#include <signal.h>
13#include <sched.h>
14#include <sys/socket.h>
15#include "kern_util.h"
16#include "chan_user.h" 12#include "chan_user.h"
17#include "user.h"
18#include "os.h" 13#include "os.h"
14#include "init.h"
15#include "user.h"
19#include "xterm.h" 16#include "xterm.h"
17#include "kern_constants.h"
20 18
21struct xterm_chan { 19struct xterm_chan {
22 int pid; 20 int pid;
@@ -25,25 +23,21 @@ struct xterm_chan {
25 int device; 23 int device;
26 int raw; 24 int raw;
27 struct termios tt; 25 struct termios tt;
28 unsigned long stack;
29 int direct_rcv;
30}; 26};
31 27
32/* Not static because it's called directly by the tt mode gdb code */ 28static void *xterm_init(char *str, int device, const struct chan_opts *opts)
33void *xterm_init(char *str, int device, const struct chan_opts *opts)
34{ 29{
35 struct xterm_chan *data; 30 struct xterm_chan *data;
36 31
37 data = malloc(sizeof(*data)); 32 data = malloc(sizeof(*data));
38 if(data == NULL) return(NULL); 33 if (data == NULL)
39 *data = ((struct xterm_chan) { .pid = -1, 34 return NULL;
35 *data = ((struct xterm_chan) { .pid = -1,
40 .helper_pid = -1, 36 .helper_pid = -1,
41 .device = device, 37 .device = device,
42 .title = opts->xterm_title, 38 .title = opts->xterm_title,
43 .raw = opts->raw, 39 .raw = opts->raw } );
44 .stack = opts->tramp_stack, 40 return data;
45 .direct_rcv = !opts->in_kernel } );
46 return(data);
47} 41}
48 42
49/* Only changed by xterm_setup, which is a setup */ 43/* Only changed by xterm_setup, which is a setup */
@@ -57,16 +51,22 @@ static int __init xterm_setup(char *line, int *add)
57 terminal_emulator = line; 51 terminal_emulator = line;
58 52
59 line = strchr(line, ','); 53 line = strchr(line, ',');
60 if(line == NULL) return(0); 54 if (line == NULL)
55 return 0;
56
61 *line++ = '\0'; 57 *line++ = '\0';
62 if(*line) title_switch = line; 58 if (*line)
59 title_switch = line;
63 60
64 line = strchr(line, ','); 61 line = strchr(line, ',');
65 if(line == NULL) return(0); 62 if (line == NULL)
63 return 0;
64
66 *line++ = '\0'; 65 *line++ = '\0';
67 if(*line) exec_switch = line; 66 if (*line)
67 exec_switch = line;
68 68
69 return(0); 69 return 0;
70} 70}
71 71
72__uml_setup("xterm=", xterm_setup, 72__uml_setup("xterm=", xterm_setup,
@@ -82,107 +82,128 @@ __uml_setup("xterm=", xterm_setup,
82" are 'xterm=gnome-terminal,-t,-x'.\n\n" 82" are 'xterm=gnome-terminal,-t,-x'.\n\n"
83); 83);
84 84
85/* XXX This badly needs some cleaning up in the error paths 85static int xterm_open(int input, int output, int primary, void *d,
86 * Not static because it's called directly by the tt mode gdb code
87 */
88int xterm_open(int input, int output, int primary, void *d,
89 char **dev_out) 86 char **dev_out)
90{ 87{
91 struct xterm_chan *data = d; 88 struct xterm_chan *data = d;
92 unsigned long stack;
93 int pid, fd, new, err; 89 int pid, fd, new, err;
94 char title[256], file[] = "/tmp/xterm-pipeXXXXXX"; 90 char title[256], file[] = "/tmp/xterm-pipeXXXXXX";
95 char *argv[] = { terminal_emulator, title_switch, title, exec_switch, 91 char *argv[] = { terminal_emulator, title_switch, title, exec_switch,
96 "/usr/lib/uml/port-helper", "-uml-socket", 92 "/usr/lib/uml/port-helper", "-uml-socket",
97 file, NULL }; 93 file, NULL };
98 94
99 if(os_access(argv[4], OS_ACC_X_OK) < 0) 95 if (access(argv[4], X_OK) < 0)
100 argv[4] = "port-helper"; 96 argv[4] = "port-helper";
101 97
102 /* Check that DISPLAY is set, this doesn't guarantee the xterm 98 /* Check that DISPLAY is set, this doesn't guarantee the xterm
103 * will work but w/o it we can be pretty sure it won't. */ 99 * will work but w/o it we can be pretty sure it won't. */
104 if (!getenv("DISPLAY")) { 100 if (getenv("DISPLAY") == NULL) {
105 printk("xterm_open: $DISPLAY not set.\n"); 101 printk(UM_KERN_ERR "xterm_open: $DISPLAY not set.\n");
106 return -ENODEV; 102 return -ENODEV;
107 } 103 }
108 104
105 /*
106 * This business of getting a descriptor to a temp file,
107 * deleting the file and closing the descriptor is just to get
108 * a known-unused name for the Unix socket that we really
109 * want.
110 */
109 fd = mkstemp(file); 111 fd = mkstemp(file);
110 if(fd < 0){ 112 if (fd < 0) {
111 err = -errno; 113 err = -errno;
112 printk("xterm_open : mkstemp failed, errno = %d\n", errno); 114 printk(UM_KERN_ERR "xterm_open : mkstemp failed, errno = %d\n",
115 errno);
113 return err; 116 return err;
114 } 117 }
115 118
116 if(unlink(file)){ 119 if (unlink(file)) {
117 err = -errno; 120 err = -errno;
118 printk("xterm_open : unlink failed, errno = %d\n", errno); 121 printk(UM_KERN_ERR "xterm_open : unlink failed, errno = %d\n",
122 errno);
119 return err; 123 return err;
120 } 124 }
121 os_close_file(fd); 125 close(fd);
122 126
123 fd = os_create_unix_socket(file, sizeof(file), 1); 127 fd = os_create_unix_socket(file, sizeof(file), 1);
124 if(fd < 0){ 128 if (fd < 0) {
125 printk("xterm_open : create_unix_socket failed, errno = %d\n", 129 printk(UM_KERN_ERR "xterm_open : create_unix_socket failed, "
126 -fd); 130 "errno = %d\n", -fd);
127 return(fd); 131 return fd;
128 } 132 }
129 133
130 sprintf(title, data->title, data->device); 134 sprintf(title, data->title, data->device);
131 stack = data->stack; 135 pid = run_helper(NULL, NULL, argv);
132 pid = run_helper(NULL, NULL, argv, &stack); 136 if (pid < 0) {
133 if(pid < 0){ 137 err = pid;
134 printk("xterm_open : run_helper failed, errno = %d\n", -pid); 138 printk(UM_KERN_ERR "xterm_open : run_helper failed, "
135 return(pid); 139 "errno = %d\n", -err);
140 goto out_close1;
136 } 141 }
137 142
138 if (data->direct_rcv) { 143 err = os_set_fd_block(fd, 0);
139 new = os_rcv_fd(fd, &data->helper_pid); 144 if (err < 0) {
140 } else { 145 printk(UM_KERN_ERR "xterm_open : failed to set descriptor "
141 err = os_set_fd_block(fd, 0); 146 "non-blocking, err = %d\n", -err);
142 if(err < 0){ 147 goto out_kill;
143 printk("xterm_open : failed to set descriptor "
144 "non-blocking, err = %d\n", -err);
145 return(err);
146 }
147 new = xterm_fd(fd, &data->helper_pid);
148 } 148 }
149 if(new < 0){ 149
150 printk("xterm_open : os_rcv_fd failed, err = %d\n", -new); 150 new = xterm_fd(fd, &data->helper_pid);
151 goto out; 151 if (new < 0) {
152 err = new;
153 printk(UM_KERN_ERR "xterm_open : os_rcv_fd failed, err = %d\n",
154 -err);
155 goto out_kill;
156 }
157
158 err = os_set_fd_block(new, 0);
159 if (err) {
160 printk(UM_KERN_ERR "xterm_open : failed to set xterm "
161 "descriptor non-blocking, err = %d\n", -err);
162 goto out_close2;
152 } 163 }
153 164
154 CATCH_EINTR(err = tcgetattr(new, &data->tt)); 165 CATCH_EINTR(err = tcgetattr(new, &data->tt));
155 if(err){ 166 if (err) {
156 new = err; 167 new = err;
157 goto out; 168 goto out_close2;
158 } 169 }
159 170
160 if(data->raw){ 171 if (data->raw) {
161 err = raw(new); 172 err = raw(new);
162 if(err){ 173 if (err) {
163 new = err; 174 new = err;
164 goto out; 175 goto out_close2;
165 } 176 }
166 } 177 }
167 178
179 unlink(file);
168 data->pid = pid; 180 data->pid = pid;
169 *dev_out = NULL; 181 *dev_out = NULL;
170 out: 182
171 unlink(file); 183 return new;
172 return(new); 184
185 out_close2:
186 close(new);
187 out_kill:
188 os_kill_process(pid, 1);
189 out_close1:
190 close(fd);
191
192 return err;
173} 193}
174 194
175/* Not static because it's called directly by the tt mode gdb code */ 195static void xterm_close(int fd, void *d)
176void xterm_close(int fd, void *d)
177{ 196{
178 struct xterm_chan *data = d; 197 struct xterm_chan *data = d;
179 198
180 if(data->pid != -1) 199 if (data->pid != -1)
181 os_kill_process(data->pid, 1); 200 os_kill_process(data->pid, 1);
182 data->pid = -1; 201 data->pid = -1;
183 if(data->helper_pid != -1) 202
203 if (data->helper_pid != -1)
184 os_kill_process(data->helper_pid, 0); 204 os_kill_process(data->helper_pid, 0);
185 data->helper_pid = -1; 205 data->helper_pid = -1;
206
186 os_close_file(fd); 207 os_close_file(fd);
187} 208}
188 209
@@ -203,14 +224,3 @@ const struct chan_ops xterm_ops = {
203 .free = xterm_free, 224 .free = xterm_free,
204 .winch = 1, 225 .winch = 1,
205}; 226};
206
207/*
208 * Overrides for Emacs so that we follow Linus's tabbing style.
209 * Emacs will notice this stuff at the end of the file and automatically
210 * adjust the settings for this buffer only. This must remain at the end
211 * of the file.
212 * ---------------------------------------------------------------------------
213 * Local variables:
214 * c-file-style: "linux"
215 * End:
216 */
diff --git a/arch/um/drivers/xterm_kern.c b/arch/um/drivers/xterm_kern.c
index a4ce7058e10e..b646bccef37a 100644
--- a/arch/um/drivers/xterm_kern.c
+++ b/arch/um/drivers/xterm_kern.c
@@ -1,18 +1,14 @@
1/* 1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/errno.h" 6#include <linux/slab.h>
7#include "linux/slab.h" 7#include <linux/completion.h>
8#include "linux/signal.h" 8#include <linux/irqreturn.h>
9#include "linux/interrupt.h" 9#include <asm/irq.h>
10#include "asm/irq.h"
11#include "irq_user.h"
12#include "irq_kern.h" 10#include "irq_kern.h"
13#include "kern_util.h"
14#include "os.h" 11#include "os.h"
15#include "xterm.h"
16 12
17struct xterm_wait { 13struct xterm_wait {
18 struct completion ready; 14 struct completion ready;
@@ -27,12 +23,13 @@ static irqreturn_t xterm_interrupt(int irq, void *data)
27 int fd; 23 int fd;
28 24
29 fd = os_rcv_fd(xterm->fd, &xterm->pid); 25 fd = os_rcv_fd(xterm->fd, &xterm->pid);
30 if(fd == -EAGAIN) 26 if (fd == -EAGAIN)
31 return(IRQ_NONE); 27 return IRQ_NONE;
32 28
33 xterm->new_fd = fd; 29 xterm->new_fd = fd;
34 complete(&xterm->ready); 30 complete(&xterm->ready);
35 return(IRQ_HANDLED); 31
32 return IRQ_HANDLED;
36} 33}
37 34
38int xterm_fd(int socket, int *pid_out) 35int xterm_fd(int socket, int *pid_out)
@@ -41,22 +38,21 @@ int xterm_fd(int socket, int *pid_out)
41 int err, ret; 38 int err, ret;
42 39
43 data = kmalloc(sizeof(*data), GFP_KERNEL); 40 data = kmalloc(sizeof(*data), GFP_KERNEL);
44 if(data == NULL){ 41 if (data == NULL) {
45 printk(KERN_ERR "xterm_fd : failed to allocate xterm_wait\n"); 42 printk(KERN_ERR "xterm_fd : failed to allocate xterm_wait\n");
46 return(-ENOMEM); 43 return -ENOMEM;
47 } 44 }
48 45
49 /* This is a locked semaphore... */ 46 /* This is a locked semaphore... */
50 *data = ((struct xterm_wait) 47 *data = ((struct xterm_wait) { .fd = socket,
51 { .fd = socket, 48 .pid = -1,
52 .pid = -1, 49 .new_fd = -1 });
53 .new_fd = -1 });
54 init_completion(&data->ready); 50 init_completion(&data->ready);
55 51
56 err = um_request_irq(XTERM_IRQ, socket, IRQ_READ, xterm_interrupt, 52 err = um_request_irq(XTERM_IRQ, socket, IRQ_READ, xterm_interrupt,
57 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, 53 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
58 "xterm", data); 54 "xterm", data);
59 if (err){ 55 if (err) {
60 printk(KERN_ERR "xterm_fd : failed to get IRQ for xterm, " 56 printk(KERN_ERR "xterm_fd : failed to get IRQ for xterm, "
61 "err = %d\n", err); 57 "err = %d\n", err);
62 ret = err; 58 ret = err;
@@ -76,16 +72,5 @@ int xterm_fd(int socket, int *pid_out)
76 out: 72 out:
77 kfree(data); 73 kfree(data);
78 74
79 return(ret); 75 return ret;
80} 76}
81
82/*
83 * Overrides for Emacs so that we follow Linus's tabbing style.
84 * Emacs will notice this stuff at the end of the file and automatically
85 * adjust the settings for this buffer only. This must remain at the end
86 * of the file.
87 * ---------------------------------------------------------------------------
88 * Local variables:
89 * c-file-style: "linux"
90 * End:
91 */
diff --git a/arch/um/include/chan_kern.h b/arch/um/include/chan_kern.h
index c4b41bb1035f..624b5100a3cd 100644
--- a/arch/um/include/chan_kern.h
+++ b/arch/um/include/chan_kern.h
@@ -40,7 +40,7 @@ extern int console_open_chan(struct line *line, struct console *co);
40extern void deactivate_chan(struct list_head *chans, int irq); 40extern void deactivate_chan(struct list_head *chans, int irq);
41extern void reactivate_chan(struct list_head *chans, int irq); 41extern void reactivate_chan(struct list_head *chans, int irq);
42extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty); 42extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty);
43extern void enable_chan(struct line *line); 43extern int enable_chan(struct line *line);
44extern void close_chan(struct list_head *chans, int delay_free_irq); 44extern void close_chan(struct list_head *chans, int delay_free_irq);
45extern int chan_window_size(struct list_head *chans, 45extern int chan_window_size(struct list_head *chans,
46 unsigned short *rows_out, 46 unsigned short *rows_out,
diff --git a/arch/um/include/chan_user.h b/arch/um/include/chan_user.h
index 38f16d812e7c..5a2263e05bb2 100644
--- a/arch/um/include/chan_user.h
+++ b/arch/um/include/chan_user.h
@@ -12,8 +12,6 @@ struct chan_opts {
12 void (*const announce)(char *dev_name, int dev); 12 void (*const announce)(char *dev_name, int dev);
13 char *xterm_title; 13 char *xterm_title;
14 const int raw; 14 const int raw;
15 const unsigned long tramp_stack;
16 const int in_kernel;
17}; 15};
18 16
19enum chan_init_pri { INIT_STATIC, INIT_ALL, INIT_ONE }; 17enum chan_init_pri { INIT_STATIC, INIT_ALL, INIT_ONE };
@@ -44,7 +42,8 @@ extern void generic_free(void *data);
44 42
45struct tty_struct; 43struct tty_struct;
46extern void register_winch(int fd, struct tty_struct *tty); 44extern void register_winch(int fd, struct tty_struct *tty);
47extern void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty); 45extern void register_winch_irq(int fd, int tty_fd, int pid,
46 struct tty_struct *tty, unsigned long stack);
48 47
49#define __channel_help(fn, prefix) \ 48#define __channel_help(fn, prefix) \
50__uml_help(fn, prefix "[0-9]*=<channel description>\n" \ 49__uml_help(fn, prefix "[0-9]*=<channel description>\n" \
diff --git a/arch/um/include/common-offsets.h b/arch/um/include/common-offsets.h
index 541f4a8ca512..6eee343e53eb 100644
--- a/arch/um/include/common-offsets.h
+++ b/arch/um/include/common-offsets.h
@@ -9,6 +9,7 @@ OFFSET(HOST_TASK_REGS, task_struct, thread.regs);
9OFFSET(HOST_TASK_PID, task_struct, pid); 9OFFSET(HOST_TASK_PID, task_struct, pid);
10 10
11DEFINE(UM_KERN_PAGE_SIZE, PAGE_SIZE); 11DEFINE(UM_KERN_PAGE_SIZE, PAGE_SIZE);
12DEFINE(UM_KERN_PAGE_MASK, PAGE_MASK);
12DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC); 13DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC);
13 14
14DEFINE_STR(UM_KERN_EMERG, KERN_EMERG); 15DEFINE_STR(UM_KERN_EMERG, KERN_EMERG);
@@ -26,6 +27,9 @@ DEFINE(UM_ELFCLASS64, ELFCLASS64);
26 27
27DEFINE(UM_NR_CPUS, NR_CPUS); 28DEFINE(UM_NR_CPUS, NR_CPUS);
28 29
30DEFINE(UM_GFP_KERNEL, GFP_KERNEL);
31DEFINE(UM_GFP_ATOMIC, GFP_ATOMIC);
32
29/* For crypto assembler code. */ 33/* For crypto assembler code. */
30DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); 34DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx));
31 35
diff --git a/arch/um/include/os.h b/arch/um/include/os.h
index 4d9fb26387d5..930b261ea483 100644
--- a/arch/um/include/os.h
+++ b/arch/um/include/os.h
@@ -239,11 +239,9 @@ extern unsigned long __do_user_copy(void *to, const void *from, int n,
239/* execvp.c */ 239/* execvp.c */
240extern int execvp_noalloc(char *buf, const char *file, char *const argv[]); 240extern int execvp_noalloc(char *buf, const char *file, char *const argv[]);
241/* helper.c */ 241/* helper.c */
242extern int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv, 242extern int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv);
243 unsigned long *stack_out);
244extern int run_helper_thread(int (*proc)(void *), void *arg, 243extern int run_helper_thread(int (*proc)(void *), void *arg,
245 unsigned int flags, unsigned long *stack_out, 244 unsigned int flags, unsigned long *stack_out);
246 int stack_order);
247extern int helper_wait(int pid); 245extern int helper_wait(int pid);
248 246
249 247
diff --git a/arch/um/include/um_malloc.h b/arch/um/include/um_malloc.h
index e6d7c5aa3f4e..0ad17cb83d96 100644
--- a/arch/um/include/um_malloc.h
+++ b/arch/um/include/um_malloc.h
@@ -6,11 +6,17 @@
6#ifndef __UM_MALLOC_H__ 6#ifndef __UM_MALLOC_H__
7#define __UM_MALLOC_H__ 7#define __UM_MALLOC_H__
8 8
9extern void *um_kmalloc(int size); 9#include "kern_constants.h"
10extern void *um_kmalloc_atomic(int size); 10
11extern void *__kmalloc(int size, int flags);
12static inline void *kmalloc(int size, int flags)
13{
14 return __kmalloc(size, flags);
15}
16
11extern void kfree(const void *ptr); 17extern void kfree(const void *ptr);
12 18
13extern void *um_vmalloc(int size); 19extern void *vmalloc(unsigned long size);
14extern void vfree(void *ptr); 20extern void vfree(void *ptr);
15 21
16#endif /* __UM_MALLOC_H__ */ 22#endif /* __UM_MALLOC_H__ */
diff --git a/arch/um/kernel/exitcode.c b/arch/um/kernel/exitcode.c
index 8b7f2cdedf94..c716b5a6db13 100644
--- a/arch/um/kernel/exitcode.c
+++ b/arch/um/kernel/exitcode.c
@@ -1,8 +1,9 @@
1/* 1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/kernel.h"
6#include "linux/init.h" 7#include "linux/init.h"
7#include "linux/ctype.h" 8#include "linux/ctype.h"
8#include "linux/proc_fs.h" 9#include "linux/proc_fs.h"
@@ -24,11 +25,14 @@ static int read_proc_exitcode(char *page, char **start, off_t off,
24 val = uml_exitcode; 25 val = uml_exitcode;
25 len = sprintf(page, "%d\n", val); 26 len = sprintf(page, "%d\n", val);
26 len -= off; 27 len -= off;
27 if(len <= off+count) *eof = 1; 28 if(len <= off+count)
29 *eof = 1;
28 *start = page + off; 30 *start = page + off;
29 if(len > count) len = count; 31 if(len > count)
30 if(len < 0) len = 0; 32 len = count;
31 return(len); 33 if(len < 0)
34 len = 0;
35 return len;
32} 36}
33 37
34static int write_proc_exitcode(struct file *file, const char __user *buffer, 38static int write_proc_exitcode(struct file *file, const char __user *buffer,
@@ -38,12 +42,14 @@ static int write_proc_exitcode(struct file *file, const char __user *buffer,
38 int tmp; 42 int tmp;
39 43
40 if(copy_from_user(buf, buffer, count)) 44 if(copy_from_user(buf, buffer, count))
41 return(-EFAULT); 45 return -EFAULT;
46
42 tmp = simple_strtol(buf, &end, 0); 47 tmp = simple_strtol(buf, &end, 0);
43 if((*end != '\0') && !isspace(*end)) 48 if((*end != '\0') && !isspace(*end))
44 return(-EINVAL); 49 return -EINVAL;
50
45 uml_exitcode = tmp; 51 uml_exitcode = tmp;
46 return(count); 52 return count;
47} 53}
48 54
49static int make_proc_exitcode(void) 55static int make_proc_exitcode(void)
@@ -54,24 +60,13 @@ static int make_proc_exitcode(void)
54 if(ent == NULL){ 60 if(ent == NULL){
55 printk(KERN_WARNING "make_proc_exitcode : Failed to register " 61 printk(KERN_WARNING "make_proc_exitcode : Failed to register "
56 "/proc/exitcode\n"); 62 "/proc/exitcode\n");
57 return(0); 63 return 0;
58 } 64 }
59 65
60 ent->read_proc = read_proc_exitcode; 66 ent->read_proc = read_proc_exitcode;
61 ent->write_proc = write_proc_exitcode; 67 ent->write_proc = write_proc_exitcode;
62 68
63 return(0); 69 return 0;
64} 70}
65 71
66__initcall(make_proc_exitcode); 72__initcall(make_proc_exitcode);
67
68/*
69 * Overrides for Emacs so that we follow Linus's tabbing style.
70 * Emacs will notice this stuff at the end of the file and automatically
71 * adjust the settings for this buffer only. This must remain at the end
72 * of the file.
73 * ---------------------------------------------------------------------------
74 * Local variables:
75 * c-file-style: "linux"
76 * End:
77 */
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index dba04d88b432..9870febdbead 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -30,7 +30,6 @@
30#include "irq_kern.h" 30#include "irq_kern.h"
31#include "os.h" 31#include "os.h"
32#include "sigio.h" 32#include "sigio.h"
33#include "um_malloc.h"
34#include "misc_constants.h" 33#include "misc_constants.h"
35#include "as-layout.h" 34#include "as-layout.h"
36 35
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index 8d2c5496532b..bfa52f206bb6 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -46,7 +46,6 @@
46#include "mode.h" 46#include "mode.h"
47#include "mode_kern.h" 47#include "mode_kern.h"
48#include "choose-mode.h" 48#include "choose-mode.h"
49#include "um_malloc.h"
50 49
51/* This is a per-cpu array. A processor only modifies its entry and it only 50/* This is a per-cpu array. A processor only modifies its entry and it only
52 * cares about its entry, so it's OK if another processor is modifying its 51 * cares about its entry, so it's OK if another processor is modifying its
@@ -262,21 +261,6 @@ void dump_thread(struct pt_regs *regs, struct user *u)
262{ 261{
263} 262}
264 263
265void *um_kmalloc(int size)
266{
267 return kmalloc(size, GFP_KERNEL);
268}
269
270void *um_kmalloc_atomic(int size)
271{
272 return kmalloc(size, GFP_ATOMIC);
273}
274
275void *um_vmalloc(int size)
276{
277 return vmalloc(size);
278}
279
280int __cant_sleep(void) { 264int __cant_sleep(void) {
281 return in_atomic() || irqs_disabled() || in_interrupt(); 265 return in_atomic() || irqs_disabled() || in_interrupt();
282 /* Is in_interrupt() really needed? */ 266 /* Is in_interrupt() really needed? */
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c
index 627742d89434..6916c8888dba 100644
--- a/arch/um/kernel/ptrace.c
+++ b/arch/um/kernel/ptrace.c
@@ -52,17 +52,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
52 switch (request) { 52 switch (request) {
53 /* when I and D space are separate, these will need to be fixed. */ 53 /* when I and D space are separate, these will need to be fixed. */
54 case PTRACE_PEEKTEXT: /* read word at location addr. */ 54 case PTRACE_PEEKTEXT: /* read word at location addr. */
55 case PTRACE_PEEKDATA: { 55 case PTRACE_PEEKDATA:
56 unsigned long tmp; 56 ret = generic_ptrace_peekdata(child, addr, data);
57 int copied;
58
59 ret = -EIO;
60 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
61 if (copied != sizeof(tmp))
62 break;
63 ret = put_user(tmp, p);
64 break; 57 break;
65 }
66 58
67 /* read the word at location addr in the USER area. */ 59 /* read the word at location addr in the USER area. */
68 case PTRACE_PEEKUSR: 60 case PTRACE_PEEKUSR:
@@ -72,11 +64,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
72 /* when I and D space are separate, this will have to be fixed. */ 64 /* when I and D space are separate, this will have to be fixed. */
73 case PTRACE_POKETEXT: /* write the word at location addr. */ 65 case PTRACE_POKETEXT: /* write the word at location addr. */
74 case PTRACE_POKEDATA: 66 case PTRACE_POKEDATA:
75 ret = -EIO; 67 ret = generic_ptrace_pokedata(child, addr, data);
76 if (access_process_vm(child, addr, &data, sizeof(data),
77 1) != sizeof(data))
78 break;
79 ret = 0;
80 break; 68 break;
81 69
82 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 70 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c
index abab90c3803f..3850d53f79fd 100644
--- a/arch/um/kernel/trap.c
+++ b/arch/um/kernel/trap.c
@@ -76,23 +76,24 @@ good_area:
76 goto out; 76 goto out;
77 77
78 do { 78 do {
79 int fault;
79survive: 80survive:
80 switch (handle_mm_fault(mm, vma, address, is_write)){ 81 fault = handle_mm_fault(mm, vma, address, is_write);
81 case VM_FAULT_MINOR: 82 if (unlikely(fault & VM_FAULT_ERROR)) {
82 current->min_flt++; 83 if (fault & VM_FAULT_OOM) {
83 break; 84 err = -ENOMEM;
84 case VM_FAULT_MAJOR: 85 goto out_of_memory;
85 current->maj_flt++; 86 } else if (fault & VM_FAULT_SIGBUS) {
86 break; 87 err = -EACCES;
87 case VM_FAULT_SIGBUS: 88 goto out;
88 err = -EACCES; 89 }
89 goto out;
90 case VM_FAULT_OOM:
91 err = -ENOMEM;
92 goto out_of_memory;
93 default:
94 BUG(); 90 BUG();
95 } 91 }
92 if (fault & VM_FAULT_MAJOR)
93 current->maj_flt++;
94 else
95 current->min_flt++;
96
96 pgd = pgd_offset(mm, address); 97 pgd = pgd_offset(mm, address);
97 pud = pud_offset(pgd, address); 98 pud = pud_offset(pgd, address);
98 pmd = pmd_offset(pud, address); 99 pmd = pmd_offset(pud, address);
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c
index 9bf944f6a1db..b126df4ea168 100644
--- a/arch/um/os-Linux/aio.c
+++ b/arch/um/os-Linux/aio.c
@@ -177,6 +177,7 @@ static int do_not_aio(struct aio_thread_req *req)
177static int aio_req_fd_r = -1; 177static int aio_req_fd_r = -1;
178static int aio_req_fd_w = -1; 178static int aio_req_fd_w = -1;
179static int aio_pid = -1; 179static int aio_pid = -1;
180static unsigned long aio_stack;
180 181
181static int not_aio_thread(void *arg) 182static int not_aio_thread(void *arg)
182{ 183{
@@ -212,7 +213,6 @@ static int not_aio_thread(void *arg)
212 213
213static int init_aio_24(void) 214static int init_aio_24(void)
214{ 215{
215 unsigned long stack;
216 int fds[2], err; 216 int fds[2], err;
217 217
218 err = os_pipe(fds, 1, 1); 218 err = os_pipe(fds, 1, 1);
@@ -227,7 +227,7 @@ static int init_aio_24(void)
227 goto out_close_pipe; 227 goto out_close_pipe;
228 228
229 err = run_helper_thread(not_aio_thread, NULL, 229 err = run_helper_thread(not_aio_thread, NULL,
230 CLONE_FILES | CLONE_VM | SIGCHLD, &stack, 0); 230 CLONE_FILES | CLONE_VM | SIGCHLD, &aio_stack);
231 if(err < 0) 231 if(err < 0)
232 goto out_close_pipe; 232 goto out_close_pipe;
233 233
@@ -252,7 +252,6 @@ out:
252#define DEFAULT_24_AIO 0 252#define DEFAULT_24_AIO 0
253static int init_aio_26(void) 253static int init_aio_26(void)
254{ 254{
255 unsigned long stack;
256 int err; 255 int err;
257 256
258 if(io_setup(256, &ctx)){ 257 if(io_setup(256, &ctx)){
@@ -263,7 +262,7 @@ static int init_aio_26(void)
263 } 262 }
264 263
265 err = run_helper_thread(aio_thread, NULL, 264 err = run_helper_thread(aio_thread, NULL,
266 CLONE_FILES | CLONE_VM | SIGCHLD, &stack, 0); 265 CLONE_FILES | CLONE_VM | SIGCHLD, &aio_stack);
267 if(err < 0) 266 if(err < 0)
268 return err; 267 return err;
269 268
@@ -365,8 +364,10 @@ __initcall(init_aio);
365 364
366static void exit_aio(void) 365static void exit_aio(void)
367{ 366{
368 if(aio_pid != -1) 367 if (aio_pid != -1) {
369 os_kill_process(aio_pid, 1); 368 os_kill_process(aio_pid, 1);
369 free_stack(aio_stack, 0);
370 }
370} 371}
371 372
372__uml_exitcall(exit_aio); 373__uml_exitcall(exit_aio);
diff --git a/arch/um/os-Linux/drivers/ethertap_user.c b/arch/um/os-Linux/drivers/ethertap_user.c
index acba30161287..61d3953c7ac9 100644
--- a/arch/um/os-Linux/drivers/ethertap_user.c
+++ b/arch/um/os-Linux/drivers/ethertap_user.c
@@ -54,7 +54,7 @@ static void etap_change(int op, unsigned char *addr, unsigned char *netmask,
54 return; 54 return;
55 } 55 }
56 56
57 output = um_kmalloc(UM_KERN_PAGE_SIZE); 57 output = kmalloc(UM_KERN_PAGE_SIZE, UM_GFP_KERNEL);
58 if(output == NULL) 58 if(output == NULL)
59 printk("etap_change : Failed to allocate output buffer\n"); 59 printk("etap_change : Failed to allocate output buffer\n");
60 read_output(fd, output, UM_KERN_PAGE_SIZE); 60 read_output(fd, output, UM_KERN_PAGE_SIZE);
@@ -117,7 +117,7 @@ static int etap_tramp(char *dev, char *gate, int control_me,
117 pe_data.control_remote = control_remote; 117 pe_data.control_remote = control_remote;
118 pe_data.control_me = control_me; 118 pe_data.control_me = control_me;
119 pe_data.data_me = data_me; 119 pe_data.data_me = data_me;
120 pid = run_helper(etap_pre_exec, &pe_data, args, NULL); 120 pid = run_helper(etap_pre_exec, &pe_data, args);
121 121
122 if(pid < 0) 122 if(pid < 0)
123 err = pid; 123 err = pid;
@@ -166,7 +166,7 @@ static int etap_open(void *data)
166 err = etap_tramp(pri->dev_name, pri->gate_addr, control_fds[0], 166 err = etap_tramp(pri->dev_name, pri->gate_addr, control_fds[0],
167 control_fds[1], data_fds[0], data_fds[1]); 167 control_fds[1], data_fds[0], data_fds[1]);
168 output_len = UM_KERN_PAGE_SIZE; 168 output_len = UM_KERN_PAGE_SIZE;
169 output = um_kmalloc(output_len); 169 output = kmalloc(output_len, UM_GFP_KERNEL);
170 read_output(control_fds[0], output, output_len); 170 read_output(control_fds[0], output, output_len);
171 171
172 if(output == NULL) 172 if(output == NULL)
diff --git a/arch/um/os-Linux/drivers/tuntap_user.c b/arch/um/os-Linux/drivers/tuntap_user.c
index 11a9779dc9f1..f848b4ea9343 100644
--- a/arch/um/os-Linux/drivers/tuntap_user.c
+++ b/arch/um/os-Linux/drivers/tuntap_user.c
@@ -83,7 +83,7 @@ static int tuntap_open_tramp(char *gate, int *fd_out, int me, int remote,
83 data.stdout = remote; 83 data.stdout = remote;
84 data.close_me = me; 84 data.close_me = me;
85 85
86 pid = run_helper(tuntap_pre_exec, &data, argv, NULL); 86 pid = run_helper(tuntap_pre_exec, &data, argv);
87 87
88 if(pid < 0) 88 if(pid < 0)
89 return -pid; 89 return -pid;
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c
index 97bed16bf4c7..d81af7b8587a 100644
--- a/arch/um/os-Linux/helper.c
+++ b/arch/um/os-Linux/helper.c
@@ -44,17 +44,13 @@ static int helper_child(void *arg)
44/* Returns either the pid of the child process we run or -E* on failure. 44/* Returns either the pid of the child process we run or -E* on failure.
45 * XXX The alloc_stack here breaks if this is called in the tracing thread, so 45 * XXX The alloc_stack here breaks if this is called in the tracing thread, so
46 * we need to receive a preallocated stack (a local buffer is ok). */ 46 * we need to receive a preallocated stack (a local buffer is ok). */
47int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv, 47int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv)
48 unsigned long *stack_out)
49{ 48{
50 struct helper_data data; 49 struct helper_data data;
51 unsigned long stack, sp; 50 unsigned long stack, sp;
52 int pid, fds[2], ret, n; 51 int pid, fds[2], ret, n;
53 52
54 if ((stack_out != NULL) && (*stack_out != 0)) 53 stack = alloc_stack(0, __cant_sleep());
55 stack = *stack_out;
56 else
57 stack = alloc_stack(0, __cant_sleep());
58 if (stack == 0) 54 if (stack == 0)
59 return -ENOMEM; 55 return -ENOMEM;
60 56
@@ -76,8 +72,8 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv,
76 data.pre_data = pre_data; 72 data.pre_data = pre_data;
77 data.argv = argv; 73 data.argv = argv;
78 data.fd = fds[1]; 74 data.fd = fds[1];
79 data.buf = __cant_sleep() ? um_kmalloc_atomic(PATH_MAX) : 75 data.buf = __cant_sleep() ? kmalloc(PATH_MAX, UM_GFP_ATOMIC) :
80 um_kmalloc(PATH_MAX); 76 kmalloc(PATH_MAX, UM_GFP_KERNEL);
81 pid = clone(helper_child, (void *) sp, CLONE_VM | SIGCHLD, &data); 77 pid = clone(helper_child, (void *) sp, CLONE_VM | SIGCHLD, &data);
82 if (pid < 0) { 78 if (pid < 0) {
83 ret = -errno; 79 ret = -errno;
@@ -113,22 +109,21 @@ out_close:
113 close(fds[1]); 109 close(fds[1]);
114 close(fds[0]); 110 close(fds[0]);
115out_free: 111out_free:
116 if ((stack_out == NULL) || (*stack_out == 0)) 112 free_stack(stack, 0);
117 free_stack(stack, 0);
118 return ret; 113 return ret;
119} 114}
120 115
121int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags, 116int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags,
122 unsigned long *stack_out, int stack_order) 117 unsigned long *stack_out)
123{ 118{
124 unsigned long stack, sp; 119 unsigned long stack, sp;
125 int pid, status, err; 120 int pid, status, err;
126 121
127 stack = alloc_stack(stack_order, __cant_sleep()); 122 stack = alloc_stack(0, __cant_sleep());
128 if (stack == 0) 123 if (stack == 0)
129 return -ENOMEM; 124 return -ENOMEM;
130 125
131 sp = stack + (UM_KERN_PAGE_SIZE << stack_order) - sizeof(void *); 126 sp = stack + UM_KERN_PAGE_SIZE - sizeof(void *);
132 pid = clone(proc, (void *) sp, flags | SIGCHLD, arg); 127 pid = clone(proc, (void *) sp, flags | SIGCHLD, arg);
133 if (pid < 0) { 128 if (pid < 0) {
134 err = -errno; 129 err = -errno;
@@ -147,7 +142,7 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags,
147 if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) 142 if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0))
148 printk("run_helper_thread - thread returned status " 143 printk("run_helper_thread - thread returned status "
149 "0x%x\n", status); 144 "0x%x\n", status);
150 free_stack(stack, stack_order); 145 free_stack(stack, 0);
151 } else 146 } else
152 *stack_out = stack; 147 *stack_out = stack;
153 return pid; 148 return pid;
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
index ea9a23696f36..e85f4995a011 100644
--- a/arch/um/os-Linux/main.c
+++ b/arch/um/os-Linux/main.c
@@ -24,6 +24,7 @@
24#include "uml-config.h" 24#include "uml-config.h"
25#include "os.h" 25#include "os.h"
26#include "um_malloc.h" 26#include "um_malloc.h"
27#include "kern_constants.h"
27 28
28/* Set in main, unchanged thereafter */ 29/* Set in main, unchanged thereafter */
29char *linux_prog; 30char *linux_prog;
@@ -232,9 +233,10 @@ void *__wrap_malloc(int size)
232 233
233 if(!CAN_KMALLOC()) 234 if(!CAN_KMALLOC())
234 return __real_malloc(size); 235 return __real_malloc(size);
235 else if(size <= PAGE_SIZE) /* finding contiguos pages can be hard*/ 236 else if(size <= UM_KERN_PAGE_SIZE)
236 ret = um_kmalloc(size); 237 /* finding contiguous pages can be hard*/
237 else ret = um_vmalloc(size); 238 ret = kmalloc(size, UM_GFP_KERNEL);
239 else ret = vmalloc(size);
238 240
239 /* glibc people insist that if malloc fails, errno should be 241 /* glibc people insist that if malloc fails, errno should be
240 * set by malloc as well. So we do. 242 * set by malloc as well. So we do.
diff --git a/arch/um/os-Linux/sigio.c b/arch/um/os-Linux/sigio.c
index 8d4e0c6b8c92..dc03e9cccb63 100644
--- a/arch/um/os-Linux/sigio.c
+++ b/arch/um/os-Linux/sigio.c
@@ -26,6 +26,7 @@
26 * exitcall. 26 * exitcall.
27 */ 27 */
28static int write_sigio_pid = -1; 28static int write_sigio_pid = -1;
29static unsigned long write_sigio_stack;
29 30
30/* These arrays are initialized before the sigio thread is started, and 31/* These arrays are initialized before the sigio thread is started, and
31 * the descriptors closed after it is killed. So, it can't see them change. 32 * the descriptors closed after it is killed. So, it can't see them change.
@@ -104,7 +105,7 @@ static int need_poll(struct pollfds *polls, int n)
104 if(n <= polls->size) 105 if(n <= polls->size)
105 return 0; 106 return 0;
106 107
107 new = um_kmalloc_atomic(n * sizeof(struct pollfd)); 108 new = kmalloc(n * sizeof(struct pollfd), UM_GFP_ATOMIC);
108 if(new == NULL){ 109 if(new == NULL){
109 printk("need_poll : failed to allocate new pollfds\n"); 110 printk("need_poll : failed to allocate new pollfds\n");
110 return -ENOMEM; 111 return -ENOMEM;
@@ -144,8 +145,10 @@ static void update_thread(void)
144 return; 145 return;
145 fail: 146 fail:
146 /* Critical section start */ 147 /* Critical section start */
147 if(write_sigio_pid != -1) 148 if (write_sigio_pid != -1) {
148 os_kill_process(write_sigio_pid, 1); 149 os_kill_process(write_sigio_pid, 1);
150 free_stack(write_sigio_stack, 0);
151 }
149 write_sigio_pid = -1; 152 write_sigio_pid = -1;
150 close(sigio_private[0]); 153 close(sigio_private[0]);
151 close(sigio_private[1]); 154 close(sigio_private[1]);
@@ -230,7 +233,7 @@ static struct pollfd *setup_initial_poll(int fd)
230{ 233{
231 struct pollfd *p; 234 struct pollfd *p;
232 235
233 p = um_kmalloc(sizeof(struct pollfd)); 236 p = kmalloc(sizeof(struct pollfd), UM_GFP_KERNEL);
234 if (p == NULL) { 237 if (p == NULL) {
235 printk("setup_initial_poll : failed to allocate poll\n"); 238 printk("setup_initial_poll : failed to allocate poll\n");
236 return NULL; 239 return NULL;
@@ -243,7 +246,6 @@ static struct pollfd *setup_initial_poll(int fd)
243 246
244static void write_sigio_workaround(void) 247static void write_sigio_workaround(void)
245{ 248{
246 unsigned long stack;
247 struct pollfd *p; 249 struct pollfd *p;
248 int err; 250 int err;
249 int l_write_sigio_fds[2]; 251 int l_write_sigio_fds[2];
@@ -293,7 +295,8 @@ static void write_sigio_workaround(void)
293 memcpy(sigio_private, l_sigio_private, sizeof(l_sigio_private)); 295 memcpy(sigio_private, l_sigio_private, sizeof(l_sigio_private));
294 296
295 write_sigio_pid = run_helper_thread(write_sigio_thread, NULL, 297 write_sigio_pid = run_helper_thread(write_sigio_thread, NULL,
296 CLONE_FILES | CLONE_VM, &stack, 0); 298 CLONE_FILES | CLONE_VM,
299 &write_sigio_stack);
297 300
298 if (write_sigio_pid < 0) 301 if (write_sigio_pid < 0)
299 goto out_clear; 302 goto out_clear;
@@ -356,10 +359,12 @@ out:
356 359
357static void sigio_cleanup(void) 360static void sigio_cleanup(void)
358{ 361{
359 if(write_sigio_pid != -1){ 362 if (write_sigio_pid == -1)
360 os_kill_process(write_sigio_pid, 1); 363 return;
361 write_sigio_pid = -1; 364
362 } 365 os_kill_process(write_sigio_pid, 1);
366 free_stack(write_sigio_stack, 0);
367 write_sigio_pid = -1;
363} 368}
364 369
365__uml_exitcall(sigio_cleanup); 370__uml_exitcall(sigio_cleanup);
diff --git a/arch/um/os-Linux/skas/mem.c b/arch/um/os-Linux/skas/mem.c
index 5c8946320799..0f7df4eb903f 100644
--- a/arch/um/os-Linux/skas/mem.c
+++ b/arch/um/os-Linux/skas/mem.c
@@ -25,6 +25,7 @@
25#include "sysdep/ptrace.h" 25#include "sysdep/ptrace.h"
26#include "sysdep/stub.h" 26#include "sysdep/stub.h"
27#include "init.h" 27#include "init.h"
28#include "kern_constants.h"
28 29
29extern unsigned long batch_syscall_stub, __syscall_stub_start; 30extern unsigned long batch_syscall_stub, __syscall_stub_start;
30 31
@@ -149,8 +150,8 @@ long run_syscall_stub(struct mm_id * mm_idp, int syscall,
149 *stack = 0; 150 *stack = 0;
150 multi_op_count++; 151 multi_op_count++;
151 152
152 if(!done && ((((unsigned long) stack) & ~PAGE_MASK) < 153 if(!done && ((((unsigned long) stack) & ~UM_KERN_PAGE_MASK) <
153 PAGE_SIZE - 10 * sizeof(long))){ 154 UM_KERN_PAGE_SIZE - 10 * sizeof(long))){
154 *addr = stack; 155 *addr = stack;
155 return 0; 156 return 0;
156 } 157 }
@@ -168,8 +169,8 @@ long syscall_stub_data(struct mm_id * mm_idp,
168 /* If *addr still is uninitialized, it *must* contain NULL. 169 /* If *addr still is uninitialized, it *must* contain NULL.
169 * Thus in this case do_syscall_stub correctly won't be called. 170 * Thus in this case do_syscall_stub correctly won't be called.
170 */ 171 */
171 if((((unsigned long) *addr) & ~PAGE_MASK) >= 172 if((((unsigned long) *addr) & ~UM_KERN_PAGE_MASK) >=
172 PAGE_SIZE - (10 + data_count) * sizeof(long)) { 173 UM_KERN_PAGE_SIZE - (10 + data_count) * sizeof(long)) {
173 ret = do_syscall_stub(mm_idp, addr); 174 ret = do_syscall_stub(mm_idp, addr);
174 /* in case of error, don't overwrite data on stack */ 175 /* in case of error, don't overwrite data on stack */
175 if(ret) 176 if(ret)
@@ -183,8 +184,8 @@ long syscall_stub_data(struct mm_id * mm_idp,
183 184
184 memcpy(stack + 1, data, data_count * sizeof(long)); 185 memcpy(stack + 1, data, data_count * sizeof(long));
185 186
186 *stub_addr = (void *)(((unsigned long)(stack + 1) & ~PAGE_MASK) + 187 *stub_addr = (void *)(((unsigned long)(stack + 1) &
187 UML_CONFIG_STUB_DATA); 188 ~UM_KERN_PAGE_MASK) + UML_CONFIG_STUB_DATA);
188 189
189 return 0; 190 return 0;
190} 191}
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index f9d2f8545afe..ba9af8d62055 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -41,7 +41,7 @@ int is_skas_winch(int pid, int fd, void *data)
41 if(pid != os_getpgrp()) 41 if(pid != os_getpgrp())
42 return(0); 42 return(0);
43 43
44 register_winch_irq(-1, fd, -1, data); 44 register_winch_irq(-1, fd, -1, data, 0);
45 return(1); 45 return(1);
46} 46}
47 47
@@ -252,11 +252,12 @@ int start_userspace(unsigned long stub_stack)
252 unsigned long sp; 252 unsigned long sp;
253 int pid, status, n, flags; 253 int pid, status, n, flags;
254 254
255 stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, 255 stack = mmap(NULL, UM_KERN_PAGE_SIZE,
256 PROT_READ | PROT_WRITE | PROT_EXEC,
256 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 257 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
257 if(stack == MAP_FAILED) 258 if(stack == MAP_FAILED)
258 panic("start_userspace : mmap failed, errno = %d", errno); 259 panic("start_userspace : mmap failed, errno = %d", errno);
259 sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *); 260 sp = (unsigned long) stack + UM_KERN_PAGE_SIZE - sizeof(void *);
260 261
261 flags = CLONE_FILES | SIGCHLD; 262 flags = CLONE_FILES | SIGCHLD;
262 if(proc_mm) flags |= CLONE_VM; 263 if(proc_mm) flags |= CLONE_VM;
@@ -279,7 +280,7 @@ int start_userspace(unsigned long stub_stack)
279 panic("start_userspace : PTRACE_OLDSETOPTIONS failed, errno=%d\n", 280 panic("start_userspace : PTRACE_OLDSETOPTIONS failed, errno=%d\n",
280 errno); 281 errno);
281 282
282 if(munmap(stack, PAGE_SIZE) < 0) 283 if(munmap(stack, UM_KERN_PAGE_SIZE) < 0)
283 panic("start_userspace : munmap failed, errno = %d\n", errno); 284 panic("start_userspace : munmap failed, errno = %d\n", errno);
284 285
285 return(pid); 286 return(pid);
@@ -365,7 +366,7 @@ static int __init init_thread_regs(void)
365 thread_regs[REGS_IP_INDEX] = UML_CONFIG_STUB_CODE + 366 thread_regs[REGS_IP_INDEX] = UML_CONFIG_STUB_CODE +
366 (unsigned long) stub_clone_handler - 367 (unsigned long) stub_clone_handler -
367 (unsigned long) &__syscall_stub_start; 368 (unsigned long) &__syscall_stub_start;
368 thread_regs[REGS_SP_INDEX] = UML_CONFIG_STUB_DATA + PAGE_SIZE - 369 thread_regs[REGS_SP_INDEX] = UML_CONFIG_STUB_DATA + UM_KERN_PAGE_SIZE -
369 sizeof(void *); 370 sizeof(void *);
370#ifdef __SIGNAL_FRAMESIZE 371#ifdef __SIGNAL_FRAMESIZE
371 thread_regs[REGS_SP_INDEX] -= __SIGNAL_FRAMESIZE; 372 thread_regs[REGS_SP_INDEX] -= __SIGNAL_FRAMESIZE;
@@ -453,7 +454,7 @@ void map_stub_pages(int fd, unsigned long code,
453 .u = 454 .u =
454 { .mmap = 455 { .mmap =
455 { .addr = code, 456 { .addr = code,
456 .len = PAGE_SIZE, 457 .len = UM_KERN_PAGE_SIZE,
457 .prot = PROT_EXEC, 458 .prot = PROT_EXEC,
458 .flags = MAP_FIXED | MAP_PRIVATE, 459 .flags = MAP_FIXED | MAP_PRIVATE,
459 .fd = code_fd, 460 .fd = code_fd,
@@ -476,7 +477,7 @@ void map_stub_pages(int fd, unsigned long code,
476 .u = 477 .u =
477 { .mmap = 478 { .mmap =
478 { .addr = data, 479 { .addr = data,
479 .len = PAGE_SIZE, 480 .len = UM_KERN_PAGE_SIZE,
480 .prot = PROT_READ | PROT_WRITE, 481 .prot = PROT_READ | PROT_WRITE,
481 .flags = MAP_FIXED | MAP_SHARED, 482 .flags = MAP_FIXED | MAP_SHARED,
482 .fd = map_fd, 483 .fd = map_fd,
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c
index 3fc13fa8729d..46f613975c19 100644
--- a/arch/um/os-Linux/start_up.c
+++ b/arch/um/os-Linux/start_up.c
@@ -107,11 +107,12 @@ static int start_ptraced_child(void **stack_out)
107 unsigned long sp; 107 unsigned long sp;
108 int pid, n, status; 108 int pid, n, status;
109 109
110 stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, 110 stack = mmap(NULL, UM_KERN_PAGE_SIZE,
111 PROT_READ | PROT_WRITE | PROT_EXEC,
111 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 112 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
112 if(stack == MAP_FAILED) 113 if(stack == MAP_FAILED)
113 fatal_perror("check_ptrace : mmap failed"); 114 fatal_perror("check_ptrace : mmap failed");
114 sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *); 115 sp = (unsigned long) stack + UM_KERN_PAGE_SIZE - sizeof(void *);
115 pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL); 116 pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL);
116 if(pid < 0) 117 if(pid < 0)
117 fatal_perror("start_ptraced_child : clone failed"); 118 fatal_perror("start_ptraced_child : clone failed");
@@ -153,7 +154,7 @@ static int stop_ptraced_child(int pid, void *stack, int exitcode,
153 ret = -1; 154 ret = -1;
154 } 155 }
155 156
156 if(munmap(stack, PAGE_SIZE) < 0) 157 if(munmap(stack, UM_KERN_PAGE_SIZE) < 0)
157 fatal_perror("check_ptrace : munmap failed"); 158 fatal_perror("check_ptrace : munmap failed");
158 return ret; 159 return ret;
159} 160}
diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c
index 3f33165ada68..419b2d5ff6de 100644
--- a/arch/um/os-Linux/user_syms.c
+++ b/arch/um/os-Linux/user_syms.c
@@ -5,7 +5,8 @@
5 * so I *must* declare good prototypes for them and then EXPORT them. 5 * so I *must* declare good prototypes for them and then EXPORT them.
6 * The kernel code uses the macro defined by include/linux/string.h, 6 * The kernel code uses the macro defined by include/linux/string.h,
7 * so I undef macros; the userspace code does not include that and I 7 * so I undef macros; the userspace code does not include that and I
8 * add an EXPORT for the glibc one.*/ 8 * add an EXPORT for the glibc one.
9 */
9 10
10#undef strlen 11#undef strlen
11#undef strstr 12#undef strstr
@@ -61,12 +62,18 @@ EXPORT_SYMBOL_PROTO(dup2);
61EXPORT_SYMBOL_PROTO(__xstat); 62EXPORT_SYMBOL_PROTO(__xstat);
62EXPORT_SYMBOL_PROTO(__lxstat); 63EXPORT_SYMBOL_PROTO(__lxstat);
63EXPORT_SYMBOL_PROTO(__lxstat64); 64EXPORT_SYMBOL_PROTO(__lxstat64);
65EXPORT_SYMBOL_PROTO(__fxstat64);
64EXPORT_SYMBOL_PROTO(lseek); 66EXPORT_SYMBOL_PROTO(lseek);
65EXPORT_SYMBOL_PROTO(lseek64); 67EXPORT_SYMBOL_PROTO(lseek64);
66EXPORT_SYMBOL_PROTO(chown); 68EXPORT_SYMBOL_PROTO(chown);
69EXPORT_SYMBOL_PROTO(fchown);
67EXPORT_SYMBOL_PROTO(truncate); 70EXPORT_SYMBOL_PROTO(truncate);
71EXPORT_SYMBOL_PROTO(ftruncate64);
68EXPORT_SYMBOL_PROTO(utime); 72EXPORT_SYMBOL_PROTO(utime);
73EXPORT_SYMBOL_PROTO(utimes);
74EXPORT_SYMBOL_PROTO(futimes);
69EXPORT_SYMBOL_PROTO(chmod); 75EXPORT_SYMBOL_PROTO(chmod);
76EXPORT_SYMBOL_PROTO(fchmod);
70EXPORT_SYMBOL_PROTO(rename); 77EXPORT_SYMBOL_PROTO(rename);
71EXPORT_SYMBOL_PROTO(__xmknod); 78EXPORT_SYMBOL_PROTO(__xmknod);
72 79
@@ -102,14 +109,3 @@ EXPORT_SYMBOL(__stack_smash_handler);
102 109
103extern long __guard __attribute__((weak)); 110extern long __guard __attribute__((weak));
104EXPORT_SYMBOL(__guard); 111EXPORT_SYMBOL(__guard);
105
106/*
107 * Overrides for Emacs so that we follow Linus's tabbing style.
108 * Emacs will notice this stuff at the end of the file and automatically
109 * adjust the settings for this buffer only. This must remain at the end
110 * of the file.
111 * ---------------------------------------------------------------------------
112 * Local variables:
113 * c-file-style: "linux"
114 * End:
115 */
diff --git a/arch/v850/kernel/ptrace.c b/arch/v850/kernel/ptrace.c
index a9b09343097d..a458ac941b25 100644
--- a/arch/v850/kernel/ptrace.c
+++ b/arch/v850/kernel/ptrace.c
@@ -117,24 +117,16 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
117 int rval; 117 int rval;
118 118
119 switch (request) { 119 switch (request) {
120 unsigned long val, copied; 120 unsigned long val;
121 121
122 case PTRACE_PEEKTEXT: /* read word at location addr. */ 122 case PTRACE_PEEKTEXT: /* read word at location addr. */
123 case PTRACE_PEEKDATA: 123 case PTRACE_PEEKDATA:
124 copied = access_process_vm(child, addr, &val, sizeof(val), 0); 124 rval = generic_ptrace_peekdata(child, addr, data);
125 rval = -EIO;
126 if (copied != sizeof(val))
127 break;
128 rval = put_user(val, (unsigned long *)data);
129 goto out; 125 goto out;
130 126
131 case PTRACE_POKETEXT: /* write the word at location addr. */ 127 case PTRACE_POKETEXT: /* write the word at location addr. */
132 case PTRACE_POKEDATA: 128 case PTRACE_POKEDATA:
133 rval = 0; 129 rval = generic_ptrace_pokedata(child, addr, data);
134 if (access_process_vm(child, addr, &data, sizeof(data), 1)
135 == sizeof(data))
136 break;
137 rval = -EIO;
138 goto out; 130 goto out;
139 131
140 /* Read/write the word at location ADDR in the registers. */ 132 /* Read/write the word at location ADDR in the registers. */
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
index 5ce94430c019..45f82ae6d389 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86_64/Kconfig
@@ -32,6 +32,10 @@ config GENERIC_TIME_VSYSCALL
32 bool 32 bool
33 default y 33 default y
34 34
35config GENERIC_CMOS_UPDATE
36 bool
37 default y
38
35config ZONE_DMA32 39config ZONE_DMA32
36 bool 40 bool
37 default y 41 default y
@@ -56,6 +60,14 @@ config ZONE_DMA
56 bool 60 bool
57 default y 61 default y
58 62
63config QUICKLIST
64 bool
65 default y
66
67config NR_QUICK
68 int
69 default 2
70
59config ISA 71config ISA
60 bool 72 bool
61 73
@@ -427,6 +439,10 @@ config NR_CPUS
427 This is purely to save memory - each supported CPU requires 439 This is purely to save memory - each supported CPU requires
428 memory in the static kernel configuration. 440 memory in the static kernel configuration.
429 441
442config PHYSICAL_ALIGN
443 hex
444 default "0x200000"
445
430config HOTPLUG_CPU 446config HOTPLUG_CPU
431 bool "Support for suspend on SMP and hot-pluggable CPUs (EXPERIMENTAL)" 447 bool "Support for suspend on SMP and hot-pluggable CPUs (EXPERIMENTAL)"
432 depends on SMP && HOTPLUG && EXPERIMENTAL 448 depends on SMP && HOTPLUG && EXPERIMENTAL
@@ -770,8 +786,8 @@ menu "Instrumentation Support"
770source "arch/x86_64/oprofile/Kconfig" 786source "arch/x86_64/oprofile/Kconfig"
771 787
772config KPROBES 788config KPROBES
773 bool "Kprobes (EXPERIMENTAL)" 789 bool "Kprobes"
774 depends on KALLSYMS && EXPERIMENTAL && MODULES 790 depends on KALLSYMS && MODULES
775 help 791 help
776 Kprobes allows you to trap at almost any kernel address and 792 Kprobes allows you to trap at almost any kernel address and
777 execute a callback function. register_kprobe() establishes 793 execute a callback function. register_kprobe() establishes
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile
index 29617ae3926d..128561d3e876 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86_64/Makefile
@@ -76,7 +76,8 @@ head-y := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kern
76libs-y += arch/x86_64/lib/ 76libs-y += arch/x86_64/lib/
77core-y += arch/x86_64/kernel/ \ 77core-y += arch/x86_64/kernel/ \
78 arch/x86_64/mm/ \ 78 arch/x86_64/mm/ \
79 arch/x86_64/crypto/ 79 arch/x86_64/crypto/ \
80 arch/x86_64/vdso/
80core-$(CONFIG_IA32_EMULATION) += arch/x86_64/ia32/ 81core-$(CONFIG_IA32_EMULATION) += arch/x86_64/ia32/
81drivers-$(CONFIG_PCI) += arch/x86_64/pci/ 82drivers-$(CONFIG_PCI) += arch/x86_64/pci/
82drivers-$(CONFIG_OPROFILE) += arch/x86_64/oprofile/ 83drivers-$(CONFIG_OPROFILE) += arch/x86_64/oprofile/
diff --git a/arch/x86_64/boot/.gitignore b/arch/x86_64/boot/.gitignore
index 495f20c085de..18465143cfa2 100644
--- a/arch/x86_64/boot/.gitignore
+++ b/arch/x86_64/boot/.gitignore
@@ -1,3 +1,5 @@
1bootsect 1bootsect
2bzImage 2bzImage
3setup 3setup
4setup.bin
5setup.elf
diff --git a/arch/x86_64/boot/Makefile b/arch/x86_64/boot/Makefile
index ee6f6505f95f..67096389de1f 100644
--- a/arch/x86_64/boot/Makefile
+++ b/arch/x86_64/boot/Makefile
@@ -1,135 +1,9 @@
1# 1#
2# arch/x86_64/boot/Makefile 2# arch/x86_64/boot/Makefile
3# 3#
4# This file is subject to the terms and conditions of the GNU General Public 4# The actual boot code is shared with i386 including the Makefile.
5# License. See the file "COPYING" in the main directory of this archive 5# So tell kbuild that we fetch the code from i386 and include the
6# for more details. 6# Makefile from i386 too.
7#
8# Copyright (C) 1994 by Linus Torvalds
9#
10
11# 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# the default of FLOPPY is used by 'build'.
14
15ROOT_DEV := CURRENT
16
17# If you want to preset the SVGA mode, uncomment the next line and
18# 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# The number is the same as you would ordinarily press at bootup.
21
22SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
23
24# If you want the RAM disk device, define this to be the size in blocks.
25
26#RAMDISK := -DRAMDISK=512
27
28targets := vmlinux.bin bootsect bootsect.o \
29 setup setup.o bzImage mtools.conf
30
31EXTRA_CFLAGS := -m32
32
33hostprogs-y := tools/build
34HOST_EXTRACFLAGS += $(LINUXINCLUDE)
35subdir- := compressed/ #Let make clean descend in compressed/
36# ---------------------------------------------------------------------------
37
38$(obj)/bzImage: IMAGE_OFFSET := 0x100000
39$(obj)/bzImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
40$(obj)/bzImage: BUILDFLAGS := -b
41
42quiet_cmd_image = BUILD $@
43cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/bootsect $(obj)/setup \
44 $(obj)/vmlinux.bin $(ROOT_DEV) > $@
45
46$(obj)/bzImage: $(obj)/bootsect $(obj)/setup \
47 $(obj)/vmlinux.bin $(obj)/tools/build FORCE
48 $(call if_changed,image)
49 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
50
51$(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE
52 $(call if_changed,objcopy)
53
54LDFLAGS_bootsect := -Ttext 0x0 -s --oformat binary
55LDFLAGS_setup := -Ttext 0x0 -s --oformat binary -e begtext
56
57$(obj)/setup $(obj)/bootsect: %: %.o FORCE
58 $(call if_changed,ld)
59
60$(obj)/compressed/vmlinux: FORCE
61 $(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@
62
63# Set this if you want to pass append arguments to the zdisk/fdimage/isoimage kernel
64FDARGS =
65# Set this if you want an initrd included with the zdisk/fdimage/isoimage kernel
66FDINITRD =
67
68image_cmdline = default linux $(FDARGS) $(if $(FDINITRD),initrd=initrd.img,)
69
70$(obj)/mtools.conf: $(src)/mtools.conf.in
71 sed -e 's|@OBJ@|$(obj)|g' < $< > $@
72
73# This requires write access to /dev/fd0
74zdisk: $(BOOTIMAGE) $(obj)/mtools.conf
75 MTOOLSRC=$(obj)/mtools.conf mformat a: ; sync
76 syslinux /dev/fd0 ; sync
77 echo '$(image_cmdline)' | \
78 MTOOLSRC=$(obj)/mtools.conf mcopy - a:syslinux.cfg
79 if [ -f '$(FDINITRD)' ] ; then \
80 MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' a:initrd.img ; \
81 fi
82 MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) a:linux ; sync
83
84# These require being root or having syslinux 2.02 or higher installed
85fdimage fdimage144: $(BOOTIMAGE) $(obj)/mtools.conf
86 dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=1440
87 MTOOLSRC=$(obj)/mtools.conf mformat v: ; sync
88 syslinux $(obj)/fdimage ; sync
89 echo '$(image_cmdline)' | \
90 MTOOLSRC=$(obj)/mtools.conf mcopy - v:syslinux.cfg
91 if [ -f '$(FDINITRD)' ] ; then \
92 MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' v:initrd.img ; \
93 fi
94 MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) v:linux ; sync
95
96fdimage288: $(BOOTIMAGE) $(obj)/mtools.conf
97 dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=2880
98 MTOOLSRC=$(obj)/mtools.conf mformat w: ; sync
99 syslinux $(obj)/fdimage ; sync
100 echo '$(image_cmdline)' | \
101 MTOOLSRC=$(obj)/mtools.conf mcopy - w:syslinux.cfg
102 if [ -f '$(FDINITRD)' ] ; then \
103 MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' w:initrd.img ; \
104 fi
105 MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) w:linux ; sync
106
107isoimage: $(BOOTIMAGE)
108 -rm -rf $(obj)/isoimage
109 mkdir $(obj)/isoimage
110 for i in lib lib64 share end ; do \
111 if [ -f /usr/$$i/syslinux/isolinux.bin ] ; then \
112 cp /usr/$$i/syslinux/isolinux.bin $(obj)/isoimage ; \
113 break ; \
114 fi ; \
115 if [ $$i = end ] ; then exit 1 ; fi ; \
116 done
117 cp $(BOOTIMAGE) $(obj)/isoimage/linux
118 echo '$(image_cmdline)' > $(obj)/isoimage/isolinux.cfg
119 if [ -f '$(FDINITRD)' ] ; then \
120 cp '$(FDINITRD)' $(obj)/isoimage/initrd.img ; \
121 fi
122 mkisofs -J -r -o $(obj)/image.iso -b isolinux.bin -c boot.cat \
123 -no-emul-boot -boot-load-size 4 -boot-info-table \
124 $(obj)/isoimage
125 rm -rf $(obj)/isoimage
126
127zlilo: $(BOOTIMAGE)
128 if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz $(INSTALL_PATH)/vmlinuz.old; fi
129 if [ -f $(INSTALL_PATH)/System.map ]; then mv $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
130 cat $(BOOTIMAGE) > $(INSTALL_PATH)/vmlinuz
131 cp System.map $(INSTALL_PATH)/
132 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
133 7
134install: 8src := arch/i386/boot
135 sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)" 9include $(src)/Makefile
diff --git a/arch/x86_64/boot/bootsect.S b/arch/x86_64/boot/bootsect.S
deleted file mode 100644
index 011b7a4993d4..000000000000
--- a/arch/x86_64/boot/bootsect.S
+++ /dev/null
@@ -1,98 +0,0 @@
1/*
2 * bootsect.S Copyright (C) 1991, 1992 Linus Torvalds
3 *
4 * modified by Drew Eckhardt
5 * modified by Bruce Evans (bde)
6 * modified by Chris Noe (May 1999) (as86 -> gas)
7 * gutted by H. Peter Anvin (Jan 2003)
8 *
9 * BIG FAT NOTE: We're in real mode using 64k segments. Therefore segment
10 * addresses must be multiplied by 16 to obtain their respective linear
11 * addresses. To avoid confusion, linear addresses are written using leading
12 * hex while segment addresses are written as segment:offset.
13 *
14 */
15
16#include <asm/boot.h>
17
18SETUPSECTS = 4 /* default nr of setup-sectors */
19BOOTSEG = 0x07C0 /* original address of boot-sector */
20INITSEG = DEF_INITSEG /* we move boot here - out of the way */
21SETUPSEG = DEF_SETUPSEG /* setup starts here */
22SYSSEG = DEF_SYSSEG /* system loaded at 0x10000 (65536) */
23SYSSIZE = DEF_SYSSIZE /* system size: # of 16-byte clicks */
24 /* to be loaded */
25ROOT_DEV = 0 /* ROOT_DEV is now written by "build" */
26SWAP_DEV = 0 /* SWAP_DEV is now written by "build" */
27
28#ifndef SVGA_MODE
29#define SVGA_MODE ASK_VGA
30#endif
31
32#ifndef RAMDISK
33#define RAMDISK 0
34#endif
35
36#ifndef ROOT_RDONLY
37#define ROOT_RDONLY 1
38#endif
39
40.code16
41.text
42
43.global _start
44_start:
45
46 # Normalize the start address
47 jmpl $BOOTSEG, $start2
48
49start2:
50 movw %cs, %ax
51 movw %ax, %ds
52 movw %ax, %es
53 movw %ax, %ss
54 movw $0x7c00, %sp
55 sti
56 cld
57
58 movw $bugger_off_msg, %si
59
60msg_loop:
61 lodsb
62 andb %al, %al
63 jz die
64 movb $0xe, %ah
65 movw $7, %bx
66 int $0x10
67 jmp msg_loop
68
69die:
70 # Allow the user to press a key, then reboot
71 xorw %ax, %ax
72 int $0x16
73 int $0x19
74
75 # int 0x19 should never return. In case it does anyway,
76 # invoke the BIOS reset code...
77 ljmp $0xf000,$0xfff0
78
79
80bugger_off_msg:
81 .ascii "Direct booting from floppy is no longer supported.\r\n"
82 .ascii "Please use a boot loader program instead.\r\n"
83 .ascii "\n"
84 .ascii "Remove disk and press any key to reboot . . .\r\n"
85 .byte 0
86
87
88 # Kernel attributes; used by setup
89
90 .org 497
91setup_sects: .byte SETUPSECTS
92root_flags: .word ROOT_RDONLY
93syssize: .word SYSSIZE
94swap_dev: .word SWAP_DEV
95ram_size: .word RAMDISK
96vid_mode: .word SVGA_MODE
97root_dev: .word ROOT_DEV
98boot_flag: .word 0xAA55
diff --git a/arch/x86_64/boot/compressed/Makefile b/arch/x86_64/boot/compressed/Makefile
index 705a3e33d7e1..c9f2da7496c1 100644
--- a/arch/x86_64/boot/compressed/Makefile
+++ b/arch/x86_64/boot/compressed/Makefile
@@ -7,11 +7,12 @@
7# 7#
8 8
9targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o 9targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o
10EXTRA_AFLAGS := -traditional
11 10
12# cannot use EXTRA_CFLAGS because base CFLAGS contains -mkernel which conflicts with 11CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2 \
13# -m32 12 -fno-strict-aliasing -fPIC -mcmodel=small \
14CFLAGS := -m64 -D__KERNEL__ -Iinclude -O2 -fno-strict-aliasing -fPIC -mcmodel=small -fno-builtin 13 $(call cc-option, -ffreestanding) \
14 $(call cc-option, -fno-stack-protector)
15AFLAGS := $(CFLAGS) -D__ASSEMBLY__
15LDFLAGS := -m elf_x86_64 16LDFLAGS := -m elf_x86_64
16 17
17LDFLAGS_vmlinux := -T 18LDFLAGS_vmlinux := -T
diff --git a/arch/x86_64/boot/compressed/head.S b/arch/x86_64/boot/compressed/head.S
index f9d5692a0106..1312bfaff306 100644
--- a/arch/x86_64/boot/compressed/head.S
+++ b/arch/x86_64/boot/compressed/head.S
@@ -46,10 +46,10 @@ startup_32:
46 * at and where we were actually loaded at. This can only be done 46 * at and where we were actually loaded at. This can only be done
47 * with a short local call on x86. Nothing else will tell us what 47 * with a short local call on x86. Nothing else will tell us what
48 * address we are running at. The reserved chunk of the real-mode 48 * address we are running at. The reserved chunk of the real-mode
49 * data at 0x34-0x3f are used as the stack for this calculation. 49 * data at 0x1e4 (defined as a scratch field) are used as the stack
50 * Only 4 bytes are needed. 50 * for this calculation. Only 4 bytes are needed.
51 */ 51 */
52 leal 0x40(%esi), %esp 52 leal (0x1e4+4)(%esi), %esp
53 call 1f 53 call 1f
541: popl %ebp 541: popl %ebp
55 subl $1b, %ebp 55 subl $1b, %ebp
diff --git a/arch/x86_64/boot/install.sh b/arch/x86_64/boot/install.sh
deleted file mode 100644
index baaa2369bdb8..000000000000
--- a/arch/x86_64/boot/install.sh
+++ /dev/null
@@ -1,2 +0,0 @@
1#!/bin/sh
2. $srctree/arch/i386/boot/install.sh
diff --git a/arch/x86_64/boot/mtools.conf.in b/arch/x86_64/boot/mtools.conf.in
deleted file mode 100644
index efd6d2490c1d..000000000000
--- a/arch/x86_64/boot/mtools.conf.in
+++ /dev/null
@@ -1,17 +0,0 @@
1#
2# mtools configuration file for "make (b)zdisk"
3#
4
5# Actual floppy drive
6drive a:
7 file="/dev/fd0"
8
9# 1.44 MB floppy disk image
10drive v:
11 file="@OBJ@/fdimage" cylinders=80 heads=2 sectors=18 filter
12
13# 2.88 MB floppy disk image (mostly for virtual uses)
14drive w:
15 file="@OBJ@/fdimage" cylinders=80 heads=2 sectors=36 filter
16
17
diff --git a/arch/x86_64/boot/setup.S b/arch/x86_64/boot/setup.S
deleted file mode 100644
index e9e33f949697..000000000000
--- a/arch/x86_64/boot/setup.S
+++ /dev/null
@@ -1,826 +0,0 @@
1/*
2 * setup.S Copyright (C) 1991, 1992 Linus Torvalds
3 *
4 * setup.s is responsible for getting the system data from the BIOS,
5 * and putting them into the appropriate places in system memory.
6 * both setup.s and system has been loaded by the bootblock.
7 *
8 * This code asks the bios for memory/disk/other parameters, and
9 * puts them in a "safe" place: 0x90000-0x901FF, ie where the
10 * boot-block used to be. It is then up to the protected mode
11 * system to read them from there before the area is overwritten
12 * for buffer-blocks.
13 *
14 * Move PS/2 aux init code to psaux.c
15 * (troyer@saifr00.cfsat.Honeywell.COM) 03Oct92
16 *
17 * some changes and additional features by Christoph Niemann,
18 * March 1993/June 1994 (Christoph.Niemann@linux.org)
19 *
20 * add APM BIOS checking by Stephen Rothwell, May 1994
21 * (sfr@canb.auug.org.au)
22 *
23 * High load stuff, initrd support and position independency
24 * by Hans Lermen & Werner Almesberger, February 1996
25 * <lermen@elserv.ffm.fgan.de>, <almesber@lrc.epfl.ch>
26 *
27 * Video handling moved to video.S by Martin Mares, March 1996
28 * <mj@k332.feld.cvut.cz>
29 *
30 * Extended memory detection scheme retwiddled by orc@pell.chi.il.us (david
31 * parsons) to avoid loadlin confusion, July 1997
32 *
33 * Transcribed from Intel (as86) -> AT&T (gas) by Chris Noe, May 1999.
34 * <stiker@northlink.com>
35 *
36 * Fix to work around buggy BIOSes which don't use carry bit correctly
37 * and/or report extended memory in CX/DX for e801h memory size detection
38 * call. As a result the kernel got wrong figures. The int15/e801h docs
39 * from Ralf Brown interrupt list seem to indicate AX/BX should be used
40 * anyway. So to avoid breaking many machines (presumably there was a reason
41 * to orginally use CX/DX instead of AX/BX), we do a kludge to see
42 * if CX/DX have been changed in the e801 call and if so use AX/BX .
43 * Michael Miller, April 2001 <michaelm@mjmm.org>
44 *
45 * Added long mode checking and SSE force. March 2003, Andi Kleen.
46 */
47
48#include <asm/segment.h>
49#include <linux/utsrelease.h>
50#include <linux/compile.h>
51#include <asm/boot.h>
52#include <asm/e820.h>
53#include <asm/page.h>
54#include <asm/setup.h>
55
56/* Signature words to ensure LILO loaded us right */
57#define SIG1 0xAA55
58#define SIG2 0x5A5A
59
60INITSEG = DEF_INITSEG # 0x9000, we move boot here, out of the way
61SYSSEG = DEF_SYSSEG # 0x1000, system loaded at 0x10000 (65536).
62SETUPSEG = DEF_SETUPSEG # 0x9020, this is the current segment
63 # ... and the former contents of CS
64
65DELTA_INITSEG = SETUPSEG - INITSEG # 0x0020
66
67.code16
68.globl begtext, begdata, begbss, endtext, enddata, endbss
69
70.text
71begtext:
72.data
73begdata:
74.bss
75begbss:
76.text
77
78start:
79 jmp trampoline
80
81# This is the setup header, and it must start at %cs:2 (old 0x9020:2)
82
83 .ascii "HdrS" # header signature
84 .word 0x0206 # header version number (>= 0x0105)
85 # or else old loadlin-1.5 will fail)
86realmode_swtch: .word 0, 0 # default_switch, SETUPSEG
87start_sys_seg: .word SYSSEG
88 .word kernel_version # pointing to kernel version string
89 # above section of header is compatible
90 # with loadlin-1.5 (header v1.5). Don't
91 # change it.
92
93type_of_loader: .byte 0 # = 0, old one (LILO, Loadlin,
94 # Bootlin, SYSLX, bootsect...)
95 # See Documentation/i386/boot.txt for
96 # assigned ids
97
98# flags, unused bits must be zero (RFU) bit within loadflags
99loadflags:
100LOADED_HIGH = 1 # If set, the kernel is loaded high
101CAN_USE_HEAP = 0x80 # If set, the loader also has set
102 # heap_end_ptr to tell how much
103 # space behind setup.S can be used for
104 # heap purposes.
105 # Only the loader knows what is free
106#ifndef __BIG_KERNEL__
107 .byte 0
108#else
109 .byte LOADED_HIGH
110#endif
111
112setup_move_size: .word 0x8000 # size to move, when setup is not
113 # loaded at 0x90000. We will move setup
114 # to 0x90000 then just before jumping
115 # into the kernel. However, only the
116 # loader knows how much data behind
117 # us also needs to be loaded.
118
119code32_start: # here loaders can put a different
120 # start address for 32-bit code.
121#ifndef __BIG_KERNEL__
122 .long 0x1000 # 0x1000 = default for zImage
123#else
124 .long 0x100000 # 0x100000 = default for big kernel
125#endif
126
127ramdisk_image: .long 0 # address of loaded ramdisk image
128 # Here the loader puts the 32-bit
129 # address where it loaded the image.
130 # This only will be read by the kernel.
131
132ramdisk_size: .long 0 # its size in bytes
133
134bootsect_kludge:
135 .long 0 # obsolete
136
137heap_end_ptr: .word modelist+1024 # (Header version 0x0201 or later)
138 # space from here (exclusive) down to
139 # end of setup code can be used by setup
140 # for local heap purposes.
141
142pad1: .word 0
143cmd_line_ptr: .long 0 # (Header version 0x0202 or later)
144 # If nonzero, a 32-bit pointer
145 # to the kernel command line.
146 # The command line should be
147 # located between the start of
148 # setup and the end of low
149 # memory (0xa0000), or it may
150 # get overwritten before it
151 # gets read. If this field is
152 # used, there is no longer
153 # anything magical about the
154 # 0x90000 segment; the setup
155 # can be located anywhere in
156 # low memory 0x10000 or higher.
157
158ramdisk_max: .long 0xffffffff
159kernel_alignment: .long 0x200000 # physical addr alignment required for
160 # protected mode relocatable kernel
161#ifdef CONFIG_RELOCATABLE
162relocatable_kernel: .byte 1
163#else
164relocatable_kernel: .byte 0
165#endif
166pad2: .byte 0
167pad3: .word 0
168
169cmdline_size: .long COMMAND_LINE_SIZE-1 #length of the command line,
170 #added with boot protocol
171 #version 2.06
172
173trampoline: call start_of_setup
174 .align 16
175 # The offset at this point is 0x240
176 .space (0xeff-0x240+1) # E820 & EDD space (ending at 0xeff)
177# End of setup header #####################################################
178
179start_of_setup:
180# Bootlin depends on this being done early
181 movw $0x01500, %ax
182 movb $0x81, %dl
183 int $0x13
184
185#ifdef SAFE_RESET_DISK_CONTROLLER
186# Reset the disk controller.
187 movw $0x0000, %ax
188 movb $0x80, %dl
189 int $0x13
190#endif
191
192# Set %ds = %cs, we know that SETUPSEG = %cs at this point
193 movw %cs, %ax # aka SETUPSEG
194 movw %ax, %ds
195# Check signature at end of setup
196 cmpw $SIG1, setup_sig1
197 jne bad_sig
198
199 cmpw $SIG2, setup_sig2
200 jne bad_sig
201
202 jmp good_sig1
203
204# Routine to print asciiz string at ds:si
205prtstr:
206 lodsb
207 andb %al, %al
208 jz fin
209
210 call prtchr
211 jmp prtstr
212
213fin: ret
214
215# Space printing
216prtsp2: call prtspc # Print double space
217prtspc: movb $0x20, %al # Print single space (note: fall-thru)
218
219prtchr:
220 pushw %ax
221 pushw %cx
222 movw $0007,%bx
223 movw $0x01, %cx
224 movb $0x0e, %ah
225 int $0x10
226 popw %cx
227 popw %ax
228 ret
229
230beep: movb $0x07, %al
231 jmp prtchr
232
233no_sig_mess: .string "No setup signature found ..."
234
235good_sig1:
236 jmp good_sig
237
238# We now have to find the rest of the setup code/data
239bad_sig:
240 movw %cs, %ax # SETUPSEG
241 subw $DELTA_INITSEG, %ax # INITSEG
242 movw %ax, %ds
243 xorb %bh, %bh
244 movb (497), %bl # get setup sect from bootsect
245 subw $4, %bx # LILO loads 4 sectors of setup
246 shlw $8, %bx # convert to words (1sect=2^8 words)
247 movw %bx, %cx
248 shrw $3, %bx # convert to segment
249 addw $SYSSEG, %bx
250 movw %bx, %cs:start_sys_seg
251# Move rest of setup code/data to here
252 movw $2048, %di # four sectors loaded by LILO
253 subw %si, %si
254 movw %cs, %ax # aka SETUPSEG
255 movw %ax, %es
256 movw $SYSSEG, %ax
257 movw %ax, %ds
258 rep
259 movsw
260 movw %cs, %ax # aka SETUPSEG
261 movw %ax, %ds
262 cmpw $SIG1, setup_sig1
263 jne no_sig
264
265 cmpw $SIG2, setup_sig2
266 jne no_sig
267
268 jmp good_sig
269
270no_sig:
271 lea no_sig_mess, %si
272 call prtstr
273
274no_sig_loop:
275 jmp no_sig_loop
276
277good_sig:
278 movw %cs, %ax # aka SETUPSEG
279 subw $DELTA_INITSEG, %ax # aka INITSEG
280 movw %ax, %ds
281# Check if an old loader tries to load a big-kernel
282 testb $LOADED_HIGH, %cs:loadflags # Do we have a big kernel?
283 jz loader_ok # No, no danger for old loaders.
284
285 cmpb $0, %cs:type_of_loader # Do we have a loader that
286 # can deal with us?
287 jnz loader_ok # Yes, continue.
288
289 pushw %cs # No, we have an old loader,
290 popw %ds # die.
291 lea loader_panic_mess, %si
292 call prtstr
293
294 jmp no_sig_loop
295
296loader_panic_mess: .string "Wrong loader, giving up..."
297
298loader_ok:
299 /* check for long mode. */
300 /* we have to do this before the VESA setup, otherwise the user
301 can't see the error message. */
302
303 pushw %ds
304 movw %cs,%ax
305 movw %ax,%ds
306
307 call verify_cpu
308 testl %eax,%eax
309 jz sse_ok
310
311no_longmode:
312 call beep
313 lea long_mode_panic,%si
314 call prtstr
315no_longmode_loop:
316 jmp no_longmode_loop
317long_mode_panic:
318 .string "Your CPU does not support long mode. Use a 32bit distribution."
319 .byte 0
320
321#include "../kernel/verify_cpu.S"
322sse_ok:
323 popw %ds
324
325# tell BIOS we want to go to long mode
326 movl $0xec00,%eax # declare target operating mode
327 movl $2,%ebx # long mode
328 int $0x15
329
330# Get memory size (extended mem, kB)
331
332 xorl %eax, %eax
333 movl %eax, (0x1e0)
334#ifndef STANDARD_MEMORY_BIOS_CALL
335 movb %al, (E820NR)
336# Try three different memory detection schemes. First, try
337# e820h, which lets us assemble a memory map, then try e801h,
338# which returns a 32-bit memory size, and finally 88h, which
339# returns 0-64m
340
341# method E820H:
342# the memory map from hell. e820h returns memory classified into
343# a whole bunch of different types, and allows memory holes and
344# everything. We scan through this memory map and build a list
345# of the first 32 memory areas, which we return at [E820MAP].
346# This is documented at http://www.acpi.info/, in the ACPI 2.0 specification.
347
348#define SMAP 0x534d4150
349
350meme820:
351 xorl %ebx, %ebx # continuation counter
352 movw $E820MAP, %di # point into the whitelist
353 # so we can have the bios
354 # directly write into it.
355
356jmpe820:
357 movl $0x0000e820, %eax # e820, upper word zeroed
358 movl $SMAP, %edx # ascii 'SMAP'
359 movl $20, %ecx # size of the e820rec
360 pushw %ds # data record.
361 popw %es
362 int $0x15 # make the call
363 jc bail820 # fall to e801 if it fails
364
365 cmpl $SMAP, %eax # check the return is `SMAP'
366 jne bail820 # fall to e801 if it fails
367
368# cmpl $1, 16(%di) # is this usable memory?
369# jne again820
370
371 # If this is usable memory, we save it by simply advancing %di by
372 # sizeof(e820rec).
373 #
374good820:
375 movb (E820NR), %al # up to 128 entries
376 cmpb $E820MAX, %al
377 jae bail820
378
379 incb (E820NR)
380 movw %di, %ax
381 addw $20, %ax
382 movw %ax, %di
383again820:
384 cmpl $0, %ebx # check to see if
385 jne jmpe820 # %ebx is set to EOF
386bail820:
387
388
389# method E801H:
390# memory size is in 1k chunksizes, to avoid confusing loadlin.
391# we store the 0xe801 memory size in a completely different place,
392# because it will most likely be longer than 16 bits.
393# (use 1e0 because that's what Larry Augustine uses in his
394# alternative new memory detection scheme, and it's sensible
395# to write everything into the same place.)
396
397meme801:
398 stc # fix to work around buggy
399 xorw %cx,%cx # BIOSes which don't clear/set
400 xorw %dx,%dx # carry on pass/error of
401 # e801h memory size call
402 # or merely pass cx,dx though
403 # without changing them.
404 movw $0xe801, %ax
405 int $0x15
406 jc mem88
407
408 cmpw $0x0, %cx # Kludge to handle BIOSes
409 jne e801usecxdx # which report their extended
410 cmpw $0x0, %dx # memory in AX/BX rather than
411 jne e801usecxdx # CX/DX. The spec I have read
412 movw %ax, %cx # seems to indicate AX/BX
413 movw %bx, %dx # are more reasonable anyway...
414
415e801usecxdx:
416 andl $0xffff, %edx # clear sign extend
417 shll $6, %edx # and go from 64k to 1k chunks
418 movl %edx, (0x1e0) # store extended memory size
419 andl $0xffff, %ecx # clear sign extend
420 addl %ecx, (0x1e0) # and add lower memory into
421 # total size.
422
423# Ye Olde Traditional Methode. Returns the memory size (up to 16mb or
424# 64mb, depending on the bios) in ax.
425mem88:
426
427#endif
428 movb $0x88, %ah
429 int $0x15
430 movw %ax, (2)
431
432# Set the keyboard repeat rate to the max
433 movw $0x0305, %ax
434 xorw %bx, %bx
435 int $0x16
436
437# Check for video adapter and its parameters and allow the
438# user to browse video modes.
439 call video # NOTE: we need %ds pointing
440 # to bootsector
441
442# Get hd0 data...
443 xorw %ax, %ax
444 movw %ax, %ds
445 ldsw (4 * 0x41), %si
446 movw %cs, %ax # aka SETUPSEG
447 subw $DELTA_INITSEG, %ax # aka INITSEG
448 pushw %ax
449 movw %ax, %es
450 movw $0x0080, %di
451 movw $0x10, %cx
452 pushw %cx
453 cld
454 rep
455 movsb
456# Get hd1 data...
457 xorw %ax, %ax
458 movw %ax, %ds
459 ldsw (4 * 0x46), %si
460 popw %cx
461 popw %es
462 movw $0x0090, %di
463 rep
464 movsb
465# Check that there IS a hd1 :-)
466 movw $0x01500, %ax
467 movb $0x81, %dl
468 int $0x13
469 jc no_disk1
470
471 cmpb $3, %ah
472 je is_disk1
473
474no_disk1:
475 movw %cs, %ax # aka SETUPSEG
476 subw $DELTA_INITSEG, %ax # aka INITSEG
477 movw %ax, %es
478 movw $0x0090, %di
479 movw $0x10, %cx
480 xorw %ax, %ax
481 cld
482 rep
483 stosb
484is_disk1:
485
486# Check for PS/2 pointing device
487 movw %cs, %ax # aka SETUPSEG
488 subw $DELTA_INITSEG, %ax # aka INITSEG
489 movw %ax, %ds
490 movb $0, (0x1ff) # default is no pointing device
491 int $0x11 # int 0x11: equipment list
492 testb $0x04, %al # check if mouse installed
493 jz no_psmouse
494
495 movb $0xAA, (0x1ff) # device present
496no_psmouse:
497
498#include "../../i386/boot/edd.S"
499
500# Now we want to move to protected mode ...
501 cmpw $0, %cs:realmode_swtch
502 jz rmodeswtch_normal
503
504 lcall *%cs:realmode_swtch
505
506 jmp rmodeswtch_end
507
508rmodeswtch_normal:
509 pushw %cs
510 call default_switch
511
512rmodeswtch_end:
513# we get the code32 start address and modify the below 'jmpi'
514# (loader may have changed it)
515 movl %cs:code32_start, %eax
516 movl %eax, %cs:code32
517
518# Now we move the system to its rightful place ... but we check if we have a
519# big-kernel. In that case we *must* not move it ...
520 testb $LOADED_HIGH, %cs:loadflags
521 jz do_move0 # .. then we have a normal low
522 # loaded zImage
523 # .. or else we have a high
524 # loaded bzImage
525 jmp end_move # ... and we skip moving
526
527do_move0:
528 movw $0x100, %ax # start of destination segment
529 movw %cs, %bp # aka SETUPSEG
530 subw $DELTA_INITSEG, %bp # aka INITSEG
531 movw %cs:start_sys_seg, %bx # start of source segment
532 cld
533do_move:
534 movw %ax, %es # destination segment
535 incb %ah # instead of add ax,#0x100
536 movw %bx, %ds # source segment
537 addw $0x100, %bx
538 subw %di, %di
539 subw %si, %si
540 movw $0x800, %cx
541 rep
542 movsw
543 cmpw %bp, %bx # assume start_sys_seg > 0x200,
544 # so we will perhaps read one
545 # page more than needed, but
546 # never overwrite INITSEG
547 # because destination is a
548 # minimum one page below source
549 jb do_move
550
551end_move:
552# then we load the segment descriptors
553 movw %cs, %ax # aka SETUPSEG
554 movw %ax, %ds
555
556# Check whether we need to be downward compatible with version <=201
557 cmpl $0, cmd_line_ptr
558 jne end_move_self # loader uses version >=202 features
559 cmpb $0x20, type_of_loader
560 je end_move_self # bootsect loader, we know of it
561
562# Boot loader doesnt support boot protocol version 2.02.
563# If we have our code not at 0x90000, we need to move it there now.
564# We also then need to move the params behind it (commandline)
565# Because we would overwrite the code on the current IP, we move
566# it in two steps, jumping high after the first one.
567 movw %cs, %ax
568 cmpw $SETUPSEG, %ax
569 je end_move_self
570
571 cli # make sure we really have
572 # interrupts disabled !
573 # because after this the stack
574 # should not be used
575 subw $DELTA_INITSEG, %ax # aka INITSEG
576 movw %ss, %dx
577 cmpw %ax, %dx
578 jb move_self_1
579
580 addw $INITSEG, %dx
581 subw %ax, %dx # this will go into %ss after
582 # the move
583move_self_1:
584 movw %ax, %ds
585 movw $INITSEG, %ax # real INITSEG
586 movw %ax, %es
587 movw %cs:setup_move_size, %cx
588 std # we have to move up, so we use
589 # direction down because the
590 # areas may overlap
591 movw %cx, %di
592 decw %di
593 movw %di, %si
594 subw $move_self_here+0x200, %cx
595 rep
596 movsb
597 ljmp $SETUPSEG, $move_self_here
598
599move_self_here:
600 movw $move_self_here+0x200, %cx
601 rep
602 movsb
603 movw $SETUPSEG, %ax
604 movw %ax, %ds
605 movw %dx, %ss
606end_move_self: # now we are at the right place
607 lidt idt_48 # load idt with 0,0
608 xorl %eax, %eax # Compute gdt_base
609 movw %ds, %ax # (Convert %ds:gdt to a linear ptr)
610 shll $4, %eax
611 addl $gdt, %eax
612 movl %eax, (gdt_48+2)
613 lgdt gdt_48 # load gdt with whatever is
614 # appropriate
615
616# that was painless, now we enable a20
617 call empty_8042
618
619 movb $0xD1, %al # command write
620 outb %al, $0x64
621 call empty_8042
622
623 movb $0xDF, %al # A20 on
624 outb %al, $0x60
625 call empty_8042
626
627#
628# You must preserve the other bits here. Otherwise embarrasing things
629# like laptops powering off on boot happen. Corrected version by Kira
630# Brown from Linux 2.2
631#
632 inb $0x92, %al #
633 orb $02, %al # "fast A20" version
634 outb %al, $0x92 # some chips have only this
635
636# wait until a20 really *is* enabled; it can take a fair amount of
637# time on certain systems; Toshiba Tecras are known to have this
638# problem. The memory location used here (0x200) is the int 0x80
639# vector, which should be safe to use.
640
641 xorw %ax, %ax # segment 0x0000
642 movw %ax, %fs
643 decw %ax # segment 0xffff (HMA)
644 movw %ax, %gs
645a20_wait:
646 incw %ax # unused memory location <0xfff0
647 movw %ax, %fs:(0x200) # we use the "int 0x80" vector
648 cmpw %gs:(0x210), %ax # and its corresponding HMA addr
649 je a20_wait # loop until no longer aliased
650
651# make sure any possible coprocessor is properly reset..
652 xorw %ax, %ax
653 outb %al, $0xf0
654 call delay
655
656 outb %al, $0xf1
657 call delay
658
659# well, that went ok, I hope. Now we mask all interrupts - the rest
660# is done in init_IRQ().
661 movb $0xFF, %al # mask all interrupts for now
662 outb %al, $0xA1
663 call delay
664
665 movb $0xFB, %al # mask all irq's but irq2 which
666 outb %al, $0x21 # is cascaded
667
668# Well, that certainly wasn't fun :-(. Hopefully it works, and we don't
669# need no steenking BIOS anyway (except for the initial loading :-).
670# The BIOS-routine wants lots of unnecessary data, and it's less
671# "interesting" anyway. This is how REAL programmers do it.
672#
673# Well, now's the time to actually move into protected mode. To make
674# things as simple as possible, we do no register set-up or anything,
675# we let the gnu-compiled 32-bit programs do that. We just jump to
676# absolute address 0x1000 (or the loader supplied one),
677# in 32-bit protected mode.
678#
679# Note that the short jump isn't strictly needed, although there are
680# reasons why it might be a good idea. It won't hurt in any case.
681 movw $1, %ax # protected mode (PE) bit
682 lmsw %ax # This is it!
683 jmp flush_instr
684
685flush_instr:
686 xorw %bx, %bx # Flag to indicate a boot
687 xorl %esi, %esi # Pointer to real-mode code
688 movw %cs, %si
689 subw $DELTA_INITSEG, %si
690 shll $4, %esi # Convert to 32-bit pointer
691# NOTE: For high loaded big kernels we need a
692# jmpi 0x100000,__KERNEL_CS
693#
694# but we yet haven't reloaded the CS register, so the default size
695# of the target offset still is 16 bit.
696# However, using an operand prefix (0x66), the CPU will properly
697# take our 48 bit far pointer. (INTeL 80386 Programmer's Reference
698# Manual, Mixing 16-bit and 32-bit code, page 16-6)
699
700 .byte 0x66, 0xea # prefix + jmpi-opcode
701code32: .long 0x1000 # will be set to 0x100000
702 # for big kernels
703 .word __KERNEL_CS
704
705# Here's a bunch of information about your current kernel..
706kernel_version: .ascii UTS_RELEASE
707 .ascii " ("
708 .ascii LINUX_COMPILE_BY
709 .ascii "@"
710 .ascii LINUX_COMPILE_HOST
711 .ascii ") "
712 .ascii UTS_VERSION
713 .byte 0
714
715# This is the default real mode switch routine.
716# to be called just before protected mode transition
717default_switch:
718 cli # no interrupts allowed !
719 movb $0x80, %al # disable NMI for bootup
720 # sequence
721 outb %al, $0x70
722 lret
723
724
725# This routine checks that the keyboard command queue is empty
726# (after emptying the output buffers)
727#
728# Some machines have delusions that the keyboard buffer is always full
729# with no keyboard attached...
730#
731# If there is no keyboard controller, we will usually get 0xff
732# to all the reads. With each IO taking a microsecond and
733# a timeout of 100,000 iterations, this can take about half a
734# second ("delay" == outb to port 0x80). That should be ok,
735# and should also be plenty of time for a real keyboard controller
736# to empty.
737#
738
739empty_8042:
740 pushl %ecx
741 movl $100000, %ecx
742
743empty_8042_loop:
744 decl %ecx
745 jz empty_8042_end_loop
746
747 call delay
748
749 inb $0x64, %al # 8042 status port
750 testb $1, %al # output buffer?
751 jz no_output
752
753 call delay
754 inb $0x60, %al # read it
755 jmp empty_8042_loop
756
757no_output:
758 testb $2, %al # is input buffer full?
759 jnz empty_8042_loop # yes - loop
760empty_8042_end_loop:
761 popl %ecx
762 ret
763
764# Read the cmos clock. Return the seconds in al
765gettime:
766 pushw %cx
767 movb $0x02, %ah
768 int $0x1a
769 movb %dh, %al # %dh contains the seconds
770 andb $0x0f, %al
771 movb %dh, %ah
772 movb $0x04, %cl
773 shrb %cl, %ah
774 aad
775 popw %cx
776 ret
777
778# Delay is needed after doing I/O
779delay:
780 outb %al,$0x80
781 ret
782
783# Descriptor tables
784gdt:
785 .word 0, 0, 0, 0 # dummy
786
787 .word 0, 0, 0, 0 # unused
788
789 .word 0xFFFF # 4Gb - (0x100000*0x1000 = 4Gb)
790 .word 0 # base address = 0
791 .word 0x9A00 # code read/exec
792 .word 0x00CF # granularity = 4096, 386
793 # (+5th nibble of limit)
794
795 .word 0xFFFF # 4Gb - (0x100000*0x1000 = 4Gb)
796 .word 0 # base address = 0
797 .word 0x9200 # data read/write
798 .word 0x00CF # granularity = 4096, 386
799 # (+5th nibble of limit)
800gdt_end:
801idt_48:
802 .word 0 # idt limit = 0
803 .word 0, 0 # idt base = 0L
804gdt_48:
805 .word gdt_end-gdt-1 # gdt limit
806 .word 0, 0 # gdt base (filled in later)
807
808# Include video setup & detection code
809
810#include "../../i386/boot/video.S"
811
812# Setup signature -- must be last
813setup_sig1: .word SIG1
814setup_sig2: .word SIG2
815
816# After this point, there is some free space which is used by the video mode
817# handling code to store the temporary mode table (not used by the kernel).
818
819modelist:
820
821.text
822endtext:
823.data
824enddata:
825.bss
826endbss:
diff --git a/arch/x86_64/boot/tools/build.c b/arch/x86_64/boot/tools/build.c
deleted file mode 100644
index eae86691709a..000000000000
--- a/arch/x86_64/boot/tools/build.c
+++ /dev/null
@@ -1,185 +0,0 @@
1/*
2 * Copyright (C) 1991, 1992 Linus Torvalds
3 * Copyright (C) 1997 Martin Mares
4 */
5
6/*
7 * This file builds a disk-image from three different files:
8 *
9 * - bootsect: compatibility mbr which prints an error message if
10 * someone tries to boot the kernel directly.
11 * - setup: 8086 machine code, sets up system parm
12 * - system: 80386 code for actual system
13 *
14 * It does some checking that all files are of the correct type, and
15 * just writes the result to stdout, removing headers and padding to
16 * the right amount. It also writes some system data to stderr.
17 */
18
19/*
20 * Changes by tytso to allow root device specification
21 * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996
22 * Cross compiling fixes by Gertjan van Wingerde, July 1996
23 * Rewritten by Martin Mares, April 1997
24 */
25
26#include <stdio.h>
27#include <string.h>
28#include <stdlib.h>
29#include <stdarg.h>
30#include <sys/types.h>
31#include <sys/stat.h>
32#include <sys/sysmacros.h>
33#include <unistd.h>
34#include <fcntl.h>
35#include <asm/boot.h>
36
37typedef unsigned char byte;
38typedef unsigned short word;
39typedef unsigned long u32;
40
41#define DEFAULT_MAJOR_ROOT 0
42#define DEFAULT_MINOR_ROOT 0
43
44/* Minimal number of setup sectors (see also bootsect.S) */
45#define SETUP_SECTS 4
46
47byte buf[1024];
48int fd;
49int is_big_kernel;
50
51void die(const char * str, ...)
52{
53 va_list args;
54 va_start(args, str);
55 vfprintf(stderr, str, args);
56 fputc('\n', stderr);
57 exit(1);
58}
59
60void file_open(const char *name)
61{
62 if ((fd = open(name, O_RDONLY, 0)) < 0)
63 die("Unable to open `%s': %m", name);
64}
65
66void usage(void)
67{
68 die("Usage: build [-b] bootsect setup system [rootdev] [> image]");
69}
70
71int main(int argc, char ** argv)
72{
73 unsigned int i, c, sz, setup_sectors;
74 u32 sys_size;
75 byte major_root, minor_root;
76 struct stat sb;
77
78 if (argc > 2 && !strcmp(argv[1], "-b"))
79 {
80 is_big_kernel = 1;
81 argc--, argv++;
82 }
83 if ((argc < 4) || (argc > 5))
84 usage();
85 if (argc > 4) {
86 if (!strcmp(argv[4], "CURRENT")) {
87 if (stat("/", &sb)) {
88 perror("/");
89 die("Couldn't stat /");
90 }
91 major_root = major(sb.st_dev);
92 minor_root = minor(sb.st_dev);
93 } else if (strcmp(argv[4], "FLOPPY")) {
94 if (stat(argv[4], &sb)) {
95 perror(argv[4]);
96 die("Couldn't stat root device.");
97 }
98 major_root = major(sb.st_rdev);
99 minor_root = minor(sb.st_rdev);
100 } else {
101 major_root = 0;
102 minor_root = 0;
103 }
104 } else {
105 major_root = DEFAULT_MAJOR_ROOT;
106 minor_root = DEFAULT_MINOR_ROOT;
107 }
108 fprintf(stderr, "Root device is (%d, %d)\n", major_root, minor_root);
109
110 file_open(argv[1]);
111 i = read(fd, buf, sizeof(buf));
112 fprintf(stderr,"Boot sector %d bytes.\n",i);
113 if (i != 512)
114 die("Boot block must be exactly 512 bytes");
115 if (buf[510] != 0x55 || buf[511] != 0xaa)
116 die("Boot block hasn't got boot flag (0xAA55)");
117 buf[508] = minor_root;
118 buf[509] = major_root;
119 if (write(1, buf, 512) != 512)
120 die("Write call failed");
121 close (fd);
122
123 file_open(argv[2]); /* Copy the setup code */
124 for (i=0 ; (c=read(fd, buf, sizeof(buf)))>0 ; i+=c )
125 if (write(1, buf, c) != c)
126 die("Write call failed");
127 if (c != 0)
128 die("read-error on `setup'");
129 close (fd);
130
131 setup_sectors = (i + 511) / 512; /* Pad unused space with zeros */
132 /* for compatibility with ancient versions of LILO. */
133 if (setup_sectors < SETUP_SECTS)
134 setup_sectors = SETUP_SECTS;
135 fprintf(stderr, "Setup is %d bytes.\n", i);
136 memset(buf, 0, sizeof(buf));
137 while (i < setup_sectors * 512) {
138 c = setup_sectors * 512 - i;
139 if (c > sizeof(buf))
140 c = sizeof(buf);
141 if (write(1, buf, c) != c)
142 die("Write call failed");
143 i += c;
144 }
145
146 file_open(argv[3]);
147 if (fstat (fd, &sb))
148 die("Unable to stat `%s': %m", argv[3]);
149 sz = sb.st_size;
150 fprintf (stderr, "System is %d kB\n", sz/1024);
151 sys_size = (sz + 15) / 16;
152 if (!is_big_kernel && sys_size > DEF_SYSSIZE)
153 die("System is too big. Try using bzImage or modules.");
154 while (sz > 0) {
155 int l, n;
156
157 l = (sz > sizeof(buf)) ? sizeof(buf) : sz;
158 if ((n=read(fd, buf, l)) != l) {
159 if (n < 0)
160 die("Error reading %s: %m", argv[3]);
161 else
162 die("%s: Unexpected EOF", argv[3]);
163 }
164 if (write(1, buf, l) != l)
165 die("Write failed");
166 sz -= l;
167 }
168 close(fd);
169
170 if (lseek(1, 497, SEEK_SET) != 497) /* Write sizes to the bootsector */
171 die("Output: seek failed");
172 buf[0] = setup_sectors;
173 if (write(1, buf, 1) != 1)
174 die("Write of setup sector count failed");
175 if (lseek(1, 500, SEEK_SET) != 500)
176 die("Output: seek failed");
177 buf[0] = (sys_size & 0xff);
178 buf[1] = ((sys_size >> 8) & 0xff);
179 buf[2] = ((sys_size >> 16) & 0xff);
180 buf[3] = ((sys_size >> 24) & 0xff);
181 if (write(1, buf, 4) != 4)
182 die("Write of image length failed");
183
184 return 0; /* Everything is OK */
185}
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig
index 40178e5c3104..b7c4cd04bfc3 100644
--- a/arch/x86_64/defconfig
+++ b/arch/x86_64/defconfig
@@ -1,19 +1,22 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc2 3# Linux kernel version: 2.6.22-git14
4# Mon May 21 13:23:40 2007 4# Fri Jul 20 09:53:15 2007
5# 5#
6CONFIG_X86_64=y 6CONFIG_X86_64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
8CONFIG_X86=y 8CONFIG_X86=y
9CONFIG_GENERIC_TIME=y 9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_TIME_VSYSCALL=y 10CONFIG_GENERIC_TIME_VSYSCALL=y
11CONFIG_GENERIC_CMOS_UPDATE=y
11CONFIG_ZONE_DMA32=y 12CONFIG_ZONE_DMA32=y
12CONFIG_LOCKDEP_SUPPORT=y 13CONFIG_LOCKDEP_SUPPORT=y
13CONFIG_STACKTRACE_SUPPORT=y 14CONFIG_STACKTRACE_SUPPORT=y
14CONFIG_SEMAPHORE_SLEEPERS=y 15CONFIG_SEMAPHORE_SLEEPERS=y
15CONFIG_MMU=y 16CONFIG_MMU=y
16CONFIG_ZONE_DMA=y 17CONFIG_ZONE_DMA=y
18CONFIG_QUICKLIST=y
19CONFIG_NR_QUICK=2
17CONFIG_RWSEM_GENERIC_SPINLOCK=y 20CONFIG_RWSEM_GENERIC_SPINLOCK=y
18CONFIG_GENERIC_HWEIGHT=y 21CONFIG_GENERIC_HWEIGHT=y
19CONFIG_GENERIC_CALIBRATE_DELAY=y 22CONFIG_GENERIC_CALIBRATE_DELAY=y
@@ -44,19 +47,18 @@ CONFIG_LOCALVERSION=""
44CONFIG_LOCALVERSION_AUTO=y 47CONFIG_LOCALVERSION_AUTO=y
45CONFIG_SWAP=y 48CONFIG_SWAP=y
46CONFIG_SYSVIPC=y 49CONFIG_SYSVIPC=y
47# CONFIG_IPC_NS is not set
48CONFIG_SYSVIPC_SYSCTL=y 50CONFIG_SYSVIPC_SYSCTL=y
49CONFIG_POSIX_MQUEUE=y 51CONFIG_POSIX_MQUEUE=y
50# CONFIG_BSD_PROCESS_ACCT is not set 52# CONFIG_BSD_PROCESS_ACCT is not set
51# CONFIG_TASKSTATS is not set 53# CONFIG_TASKSTATS is not set
52# CONFIG_UTS_NS is not set 54# CONFIG_USER_NS is not set
53# CONFIG_AUDIT is not set 55# CONFIG_AUDIT is not set
54CONFIG_IKCONFIG=y 56CONFIG_IKCONFIG=y
55CONFIG_IKCONFIG_PROC=y 57CONFIG_IKCONFIG_PROC=y
56CONFIG_LOG_BUF_SHIFT=18 58CONFIG_LOG_BUF_SHIFT=18
57# CONFIG_CPUSETS is not set 59# CONFIG_CPUSETS is not set
58CONFIG_SYSFS_DEPRECATED=y 60CONFIG_SYSFS_DEPRECATED=y
59# CONFIG_RELAY is not set 61CONFIG_RELAY=y
60CONFIG_BLK_DEV_INITRD=y 62CONFIG_BLK_DEV_INITRD=y
61CONFIG_INITRAMFS_SOURCE="" 63CONFIG_INITRAMFS_SOURCE=""
62CONFIG_CC_OPTIMIZE_FOR_SIZE=y 64CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -86,10 +88,6 @@ CONFIG_SLAB=y
86CONFIG_RT_MUTEXES=y 88CONFIG_RT_MUTEXES=y
87# CONFIG_TINY_SHMEM is not set 89# CONFIG_TINY_SHMEM is not set
88CONFIG_BASE_SMALL=0 90CONFIG_BASE_SMALL=0
89
90#
91# Loadable module support
92#
93CONFIG_MODULES=y 91CONFIG_MODULES=y
94CONFIG_MODULE_UNLOAD=y 92CONFIG_MODULE_UNLOAD=y
95CONFIG_MODULE_FORCE_UNLOAD=y 93CONFIG_MODULE_FORCE_UNLOAD=y
@@ -97,12 +95,9 @@ CONFIG_MODULE_FORCE_UNLOAD=y
97# CONFIG_MODULE_SRCVERSION_ALL is not set 95# CONFIG_MODULE_SRCVERSION_ALL is not set
98# CONFIG_KMOD is not set 96# CONFIG_KMOD is not set
99CONFIG_STOP_MACHINE=y 97CONFIG_STOP_MACHINE=y
100
101#
102# Block layer
103#
104CONFIG_BLOCK=y 98CONFIG_BLOCK=y
105# CONFIG_BLK_DEV_IO_TRACE is not set 99# CONFIG_BLK_DEV_IO_TRACE is not set
100# CONFIG_BLK_DEV_BSG is not set
106 101
107# 102#
108# IO Schedulers 103# IO Schedulers
@@ -165,9 +160,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
165CONFIG_MIGRATION=y 160CONFIG_MIGRATION=y
166CONFIG_RESOURCES_64BIT=y 161CONFIG_RESOURCES_64BIT=y
167CONFIG_ZONE_DMA_FLAG=1 162CONFIG_ZONE_DMA_FLAG=1
163CONFIG_BOUNCE=y
164CONFIG_VIRT_TO_BUS=y
168CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y 165CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
169CONFIG_OUT_OF_LINE_PFN_TO_PAGE=y 166CONFIG_OUT_OF_LINE_PFN_TO_PAGE=y
170CONFIG_NR_CPUS=32 167CONFIG_NR_CPUS=32
168CONFIG_PHYSICAL_ALIGN=0x200000
171CONFIG_HOTPLUG_CPU=y 169CONFIG_HOTPLUG_CPU=y
172CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 170CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
173CONFIG_HPET_TIMER=y 171CONFIG_HPET_TIMER=y
@@ -180,7 +178,7 @@ CONFIG_X86_MCE_INTEL=y
180CONFIG_X86_MCE_AMD=y 178CONFIG_X86_MCE_AMD=y
181# CONFIG_KEXEC is not set 179# CONFIG_KEXEC is not set
182# CONFIG_CRASH_DUMP is not set 180# CONFIG_CRASH_DUMP is not set
183CONFIG_RELOCATABLE=y 181# CONFIG_RELOCATABLE is not set
184CONFIG_PHYSICAL_START=0x200000 182CONFIG_PHYSICAL_START=0x200000
185CONFIG_SECCOMP=y 183CONFIG_SECCOMP=y
186# CONFIG_CC_STACKPROTECTOR is not set 184# CONFIG_CC_STACKPROTECTOR is not set
@@ -201,7 +199,6 @@ CONFIG_GENERIC_PENDING_IRQ=y
201CONFIG_PM=y 199CONFIG_PM=y
202# CONFIG_PM_LEGACY is not set 200# CONFIG_PM_LEGACY is not set
203# CONFIG_PM_DEBUG is not set 201# CONFIG_PM_DEBUG is not set
204# CONFIG_PM_SYSFS_DEPRECATED is not set
205CONFIG_SOFTWARE_SUSPEND=y 202CONFIG_SOFTWARE_SUSPEND=y
206CONFIG_PM_STD_PARTITION="" 203CONFIG_PM_STD_PARTITION=""
207CONFIG_SUSPEND_SMP=y 204CONFIG_SUSPEND_SMP=y
@@ -248,7 +245,7 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
248# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set 245# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
249CONFIG_CPU_FREQ_GOV_USERSPACE=y 246CONFIG_CPU_FREQ_GOV_USERSPACE=y
250CONFIG_CPU_FREQ_GOV_ONDEMAND=y 247CONFIG_CPU_FREQ_GOV_ONDEMAND=y
251# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set 248CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
252 249
253# 250#
254# CPUFreq processor drivers 251# CPUFreq processor drivers
@@ -351,20 +348,8 @@ CONFIG_IPV6_SIT=y
351# CONFIG_IPV6_MULTIPLE_TABLES is not set 348# CONFIG_IPV6_MULTIPLE_TABLES is not set
352# CONFIG_NETWORK_SECMARK is not set 349# CONFIG_NETWORK_SECMARK is not set
353# CONFIG_NETFILTER is not set 350# CONFIG_NETFILTER is not set
354
355#
356# DCCP Configuration (EXPERIMENTAL)
357#
358# CONFIG_IP_DCCP is not set 351# CONFIG_IP_DCCP is not set
359
360#
361# SCTP Configuration (EXPERIMENTAL)
362#
363# CONFIG_IP_SCTP is not set 352# CONFIG_IP_SCTP is not set
364
365#
366# TIPC Configuration (EXPERIMENTAL)
367#
368# CONFIG_TIPC is not set 353# CONFIG_TIPC is not set
369# CONFIG_ATM is not set 354# CONFIG_ATM is not set
370# CONFIG_BRIDGE is not set 355# CONFIG_BRIDGE is not set
@@ -401,6 +386,7 @@ CONFIG_IPV6_SIT=y
401# CONFIG_MAC80211 is not set 386# CONFIG_MAC80211 is not set
402# CONFIG_IEEE80211 is not set 387# CONFIG_IEEE80211 is not set
403# CONFIG_RFKILL is not set 388# CONFIG_RFKILL is not set
389# CONFIG_NET_9P is not set
404 390
405# 391#
406# Device Drivers 392# Device Drivers
@@ -415,21 +401,9 @@ CONFIG_FW_LOADER=y
415# CONFIG_DEBUG_DRIVER is not set 401# CONFIG_DEBUG_DRIVER is not set
416# CONFIG_DEBUG_DEVRES is not set 402# CONFIG_DEBUG_DEVRES is not set
417# CONFIG_SYS_HYPERVISOR is not set 403# CONFIG_SYS_HYPERVISOR is not set
418
419#
420# Connector - unified userspace <-> kernelspace linker
421#
422# CONFIG_CONNECTOR is not set 404# CONFIG_CONNECTOR is not set
423# CONFIG_MTD is not set 405# CONFIG_MTD is not set
424
425#
426# Parallel port support
427#
428# CONFIG_PARPORT is not set 406# CONFIG_PARPORT is not set
429
430#
431# Plug and Play support
432#
433CONFIG_PNP=y 407CONFIG_PNP=y
434# CONFIG_PNP_DEBUG is not set 408# CONFIG_PNP_DEBUG is not set
435 409
@@ -437,10 +411,7 @@ CONFIG_PNP=y
437# Protocols 411# Protocols
438# 412#
439CONFIG_PNPACPI=y 413CONFIG_PNPACPI=y
440 414CONFIG_BLK_DEV=y
441#
442# Block devices
443#
444CONFIG_BLK_DEV_FD=y 415CONFIG_BLK_DEV_FD=y
445# CONFIG_BLK_CPQ_DA is not set 416# CONFIG_BLK_CPQ_DA is not set
446# CONFIG_BLK_CPQ_CISS_DA is not set 417# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -458,17 +429,14 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
458CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 429CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
459# CONFIG_CDROM_PKTCDVD is not set 430# CONFIG_CDROM_PKTCDVD is not set
460# CONFIG_ATA_OVER_ETH is not set 431# CONFIG_ATA_OVER_ETH is not set
461 432CONFIG_MISC_DEVICES=y
462#
463# Misc devices
464#
465# CONFIG_IBM_ASM is not set 433# CONFIG_IBM_ASM is not set
466# CONFIG_PHANTOM is not set 434# CONFIG_PHANTOM is not set
435# CONFIG_EEPROM_93CX6 is not set
467# CONFIG_SGI_IOC4 is not set 436# CONFIG_SGI_IOC4 is not set
468# CONFIG_TIFM_CORE is not set 437# CONFIG_TIFM_CORE is not set
469# CONFIG_SONY_LAPTOP is not set 438# CONFIG_SONY_LAPTOP is not set
470# CONFIG_THINKPAD_ACPI is not set 439# CONFIG_THINKPAD_ACPI is not set
471# CONFIG_BLINK is not set
472CONFIG_IDE=y 440CONFIG_IDE=y
473CONFIG_BLK_DEV_IDE=y 441CONFIG_BLK_DEV_IDE=y
474 442
@@ -539,6 +507,7 @@ CONFIG_BLK_DEV_IDEDMA=y
539# 507#
540# CONFIG_RAID_ATTRS is not set 508# CONFIG_RAID_ATTRS is not set
541CONFIG_SCSI=y 509CONFIG_SCSI=y
510CONFIG_SCSI_DMA=y
542# CONFIG_SCSI_TGT is not set 511# CONFIG_SCSI_TGT is not set
543CONFIG_SCSI_NETLINK=y 512CONFIG_SCSI_NETLINK=y
544# CONFIG_SCSI_PROC_FS is not set 513# CONFIG_SCSI_PROC_FS is not set
@@ -590,11 +559,9 @@ CONFIG_AIC79XX_DEBUG_MASK=0
590# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set 559# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
591# CONFIG_SCSI_AIC94XX is not set 560# CONFIG_SCSI_AIC94XX is not set
592# CONFIG_SCSI_ARCMSR is not set 561# CONFIG_SCSI_ARCMSR is not set
593CONFIG_MEGARAID_NEWGEN=y 562# CONFIG_MEGARAID_NEWGEN is not set
594CONFIG_MEGARAID_MM=y
595CONFIG_MEGARAID_MAILBOX=y
596# CONFIG_MEGARAID_LEGACY is not set 563# CONFIG_MEGARAID_LEGACY is not set
597CONFIG_MEGARAID_SAS=y 564# CONFIG_MEGARAID_SAS is not set
598# CONFIG_SCSI_HPTIOP is not set 565# CONFIG_SCSI_HPTIOP is not set
599# CONFIG_SCSI_BUSLOGIC is not set 566# CONFIG_SCSI_BUSLOGIC is not set
600# CONFIG_SCSI_DMX3191D is not set 567# CONFIG_SCSI_DMX3191D is not set
@@ -614,7 +581,6 @@ CONFIG_MEGARAID_SAS=y
614# CONFIG_SCSI_DC395x is not set 581# CONFIG_SCSI_DC395x is not set
615# CONFIG_SCSI_DC390T is not set 582# CONFIG_SCSI_DC390T is not set
616# CONFIG_SCSI_DEBUG is not set 583# CONFIG_SCSI_DEBUG is not set
617# CONFIG_SCSI_ESP_CORE is not set
618# CONFIG_SCSI_SRP is not set 584# CONFIG_SCSI_SRP is not set
619CONFIG_ATA=y 585CONFIG_ATA=y
620# CONFIG_ATA_NONSTANDARD is not set 586# CONFIG_ATA_NONSTANDARD is not set
@@ -671,10 +637,6 @@ CONFIG_SATA_VIA=y
671# CONFIG_PATA_SIS is not set 637# CONFIG_PATA_SIS is not set
672# CONFIG_PATA_VIA is not set 638# CONFIG_PATA_VIA is not set
673# CONFIG_PATA_WINBOND is not set 639# CONFIG_PATA_WINBOND is not set
674
675#
676# Multi-device support (RAID and LVM)
677#
678CONFIG_MD=y 640CONFIG_MD=y
679# CONFIG_BLK_DEV_MD is not set 641# CONFIG_BLK_DEV_MD is not set
680CONFIG_BLK_DEV_DM=y 642CONFIG_BLK_DEV_DM=y
@@ -692,7 +654,7 @@ CONFIG_BLK_DEV_DM=y
692CONFIG_FUSION=y 654CONFIG_FUSION=y
693CONFIG_FUSION_SPI=y 655CONFIG_FUSION_SPI=y
694# CONFIG_FUSION_FC is not set 656# CONFIG_FUSION_FC is not set
695CONFIG_FUSION_SAS=y 657# CONFIG_FUSION_SAS is not set
696CONFIG_FUSION_MAX_SGE=128 658CONFIG_FUSION_MAX_SGE=128
697# CONFIG_FUSION_CTL is not set 659# CONFIG_FUSION_CTL is not set
698 660
@@ -710,7 +672,10 @@ CONFIG_IEEE1394=y
710# 672#
711# Controllers 673# Controllers
712# 674#
713# CONFIG_IEEE1394_PCILYNX is not set 675
676#
677# Texas Instruments PCILynx requires I2C
678#
714CONFIG_IEEE1394_OHCI1394=y 679CONFIG_IEEE1394_OHCI1394=y
715 680
716# 681#
@@ -722,32 +687,19 @@ CONFIG_IEEE1394_OHCI1394=y
722# CONFIG_IEEE1394_ETH1394 is not set 687# CONFIG_IEEE1394_ETH1394 is not set
723# CONFIG_IEEE1394_DV1394 is not set 688# CONFIG_IEEE1394_DV1394 is not set
724CONFIG_IEEE1394_RAWIO=y 689CONFIG_IEEE1394_RAWIO=y
725
726#
727# I2O device support
728#
729# CONFIG_I2O is not set 690# CONFIG_I2O is not set
730# CONFIG_MACINTOSH_DRIVERS is not set 691CONFIG_MACINTOSH_DRIVERS=y
731 692# CONFIG_MAC_EMUMOUSEBTN is not set
732#
733# Network device support
734#
735CONFIG_NETDEVICES=y 693CONFIG_NETDEVICES=y
694CONFIG_NETDEVICES_MULTIQUEUE=y
736# CONFIG_DUMMY is not set 695# CONFIG_DUMMY is not set
737# CONFIG_BONDING is not set 696# CONFIG_BONDING is not set
697# CONFIG_MACVLAN is not set
738# CONFIG_EQUALIZER is not set 698# CONFIG_EQUALIZER is not set
739CONFIG_TUN=y 699CONFIG_TUN=y
740# CONFIG_NET_SB1000 is not set 700# CONFIG_NET_SB1000 is not set
741
742#
743# ARCnet devices
744#
745# CONFIG_ARCNET is not set 701# CONFIG_ARCNET is not set
746# CONFIG_PHYLIB is not set 702# CONFIG_PHYLIB is not set
747
748#
749# Ethernet (10 or 100Mbit)
750#
751CONFIG_NET_ETHERNET=y 703CONFIG_NET_ETHERNET=y
752CONFIG_MII=y 704CONFIG_MII=y
753# CONFIG_HAPPYMEAL is not set 705# CONFIG_HAPPYMEAL is not set
@@ -756,10 +708,6 @@ CONFIG_MII=y
756CONFIG_NET_VENDOR_3COM=y 708CONFIG_NET_VENDOR_3COM=y
757CONFIG_VORTEX=y 709CONFIG_VORTEX=y
758# CONFIG_TYPHOON is not set 710# CONFIG_TYPHOON is not set
759
760#
761# Tulip family network device support
762#
763CONFIG_NET_TULIP=y 711CONFIG_NET_TULIP=y
764# CONFIG_DE2104X is not set 712# CONFIG_DE2104X is not set
765CONFIG_TULIP=y 713CONFIG_TULIP=y
@@ -773,7 +721,8 @@ CONFIG_TULIP=y
773# CONFIG_HP100 is not set 721# CONFIG_HP100 is not set
774CONFIG_NET_PCI=y 722CONFIG_NET_PCI=y
775# CONFIG_PCNET32 is not set 723# CONFIG_PCNET32 is not set
776# CONFIG_AMD8111_ETH is not set 724CONFIG_AMD8111_ETH=y
725# CONFIG_AMD8111E_NAPI is not set
777# CONFIG_ADAPTEC_STARFIRE is not set 726# CONFIG_ADAPTEC_STARFIRE is not set
778CONFIG_B44=y 727CONFIG_B44=y
779CONFIG_FORCEDETH=y 728CONFIG_FORCEDETH=y
@@ -808,7 +757,6 @@ CONFIG_E1000=y
808# CONFIG_SIS190 is not set 757# CONFIG_SIS190 is not set
809# CONFIG_SKGE is not set 758# CONFIG_SKGE is not set
810# CONFIG_SKY2 is not set 759# CONFIG_SKY2 is not set
811# CONFIG_SK98LIN is not set
812# CONFIG_VIA_VELOCITY is not set 760# CONFIG_VIA_VELOCITY is not set
813CONFIG_TIGON3=y 761CONFIG_TIGON3=y
814CONFIG_BNX2=y 762CONFIG_BNX2=y
@@ -823,10 +771,6 @@ CONFIG_S2IO=m
823# CONFIG_MYRI10GE is not set 771# CONFIG_MYRI10GE is not set
824# CONFIG_NETXEN_NIC is not set 772# CONFIG_NETXEN_NIC is not set
825# CONFIG_MLX4_CORE is not set 773# CONFIG_MLX4_CORE is not set
826
827#
828# Token Ring devices
829#
830# CONFIG_TR is not set 774# CONFIG_TR is not set
831 775
832# 776#
@@ -855,15 +799,7 @@ CONFIG_NETCONSOLE=y
855CONFIG_NETPOLL=y 799CONFIG_NETPOLL=y
856# CONFIG_NETPOLL_TRAP is not set 800# CONFIG_NETPOLL_TRAP is not set
857CONFIG_NET_POLL_CONTROLLER=y 801CONFIG_NET_POLL_CONTROLLER=y
858
859#
860# ISDN subsystem
861#
862# CONFIG_ISDN is not set 802# CONFIG_ISDN is not set
863
864#
865# Telephony Support
866#
867# CONFIG_PHONE is not set 803# CONFIG_PHONE is not set
868 804
869# 805#
@@ -871,6 +807,7 @@ CONFIG_NET_POLL_CONTROLLER=y
871# 807#
872CONFIG_INPUT=y 808CONFIG_INPUT=y
873# CONFIG_INPUT_FF_MEMLESS is not set 809# CONFIG_INPUT_FF_MEMLESS is not set
810# CONFIG_INPUT_POLLDEV is not set
874 811
875# 812#
876# Userland interfaces 813# Userland interfaces
@@ -936,6 +873,7 @@ CONFIG_HW_CONSOLE=y
936# 873#
937CONFIG_SERIAL_8250=y 874CONFIG_SERIAL_8250=y
938CONFIG_SERIAL_8250_CONSOLE=y 875CONFIG_SERIAL_8250_CONSOLE=y
876CONFIG_FIX_EARLYCON_MEM=y
939CONFIG_SERIAL_8250_PCI=y 877CONFIG_SERIAL_8250_PCI=y
940CONFIG_SERIAL_8250_PNP=y 878CONFIG_SERIAL_8250_PNP=y
941CONFIG_SERIAL_8250_NR_UARTS=4 879CONFIG_SERIAL_8250_NR_UARTS=4
@@ -951,16 +889,11 @@ CONFIG_SERIAL_CORE_CONSOLE=y
951CONFIG_UNIX98_PTYS=y 889CONFIG_UNIX98_PTYS=y
952CONFIG_LEGACY_PTYS=y 890CONFIG_LEGACY_PTYS=y
953CONFIG_LEGACY_PTY_COUNT=256 891CONFIG_LEGACY_PTY_COUNT=256
954
955#
956# IPMI
957#
958# CONFIG_IPMI_HANDLER is not set 892# CONFIG_IPMI_HANDLER is not set
959# CONFIG_WATCHDOG is not set 893# CONFIG_WATCHDOG is not set
960CONFIG_HW_RANDOM=y 894CONFIG_HW_RANDOM=y
961CONFIG_HW_RANDOM_INTEL=y 895CONFIG_HW_RANDOM_INTEL=y
962CONFIG_HW_RANDOM_AMD=y 896CONFIG_HW_RANDOM_AMD=y
963# CONFIG_HW_RANDOM_GEODE is not set
964# CONFIG_NVRAM is not set 897# CONFIG_NVRAM is not set
965CONFIG_RTC=y 898CONFIG_RTC=y
966# CONFIG_R3964 is not set 899# CONFIG_R3964 is not set
@@ -979,127 +912,19 @@ CONFIG_HPET=y
979# CONFIG_HPET_RTC_IRQ is not set 912# CONFIG_HPET_RTC_IRQ is not set
980CONFIG_HPET_MMAP=y 913CONFIG_HPET_MMAP=y
981# CONFIG_HANGCHECK_TIMER is not set 914# CONFIG_HANGCHECK_TIMER is not set
982
983#
984# TPM devices
985#
986# CONFIG_TCG_TPM is not set 915# CONFIG_TCG_TPM is not set
987# CONFIG_TELCLOCK is not set 916# CONFIG_TELCLOCK is not set
988CONFIG_DEVPORT=y 917CONFIG_DEVPORT=y
989CONFIG_I2C=m 918# CONFIG_I2C is not set
990CONFIG_I2C_BOARDINFO=y
991CONFIG_I2C_CHARDEV=m
992
993#
994# I2C Algorithms
995#
996# CONFIG_I2C_ALGOBIT is not set
997# CONFIG_I2C_ALGOPCF is not set
998# CONFIG_I2C_ALGOPCA is not set
999
1000#
1001# I2C Hardware Bus support
1002#
1003# CONFIG_I2C_ALI1535 is not set
1004# CONFIG_I2C_ALI1563 is not set
1005# CONFIG_I2C_ALI15X3 is not set
1006# CONFIG_I2C_AMD756 is not set
1007# CONFIG_I2C_AMD8111 is not set
1008# CONFIG_I2C_I801 is not set
1009# CONFIG_I2C_I810 is not set
1010# CONFIG_I2C_PIIX4 is not set
1011# CONFIG_I2C_NFORCE2 is not set
1012# CONFIG_I2C_OCORES is not set
1013# CONFIG_I2C_PARPORT_LIGHT is not set
1014# CONFIG_I2C_PROSAVAGE is not set
1015# CONFIG_I2C_SAVAGE4 is not set
1016# CONFIG_I2C_SIMTEC is not set
1017# CONFIG_I2C_SIS5595 is not set
1018# CONFIG_I2C_SIS630 is not set
1019# CONFIG_I2C_SIS96X is not set
1020# CONFIG_I2C_STUB is not set
1021# CONFIG_I2C_TINY_USB is not set
1022# CONFIG_I2C_VIA is not set
1023# CONFIG_I2C_VIAPRO is not set
1024# CONFIG_I2C_VOODOO3 is not set
1025
1026#
1027# Miscellaneous I2C Chip support
1028#
1029# CONFIG_SENSORS_DS1337 is not set
1030# CONFIG_SENSORS_DS1374 is not set
1031# CONFIG_SENSORS_EEPROM is not set
1032# CONFIG_SENSORS_PCF8574 is not set
1033# CONFIG_SENSORS_PCA9539 is not set
1034# CONFIG_SENSORS_PCF8591 is not set
1035# CONFIG_SENSORS_MAX6875 is not set
1036# CONFIG_I2C_DEBUG_CORE is not set
1037# CONFIG_I2C_DEBUG_ALGO is not set
1038# CONFIG_I2C_DEBUG_BUS is not set
1039# CONFIG_I2C_DEBUG_CHIP is not set
1040 919
1041# 920#
1042# SPI support 921# SPI support
1043# 922#
1044# CONFIG_SPI is not set 923# CONFIG_SPI is not set
1045# CONFIG_SPI_MASTER is not set 924# CONFIG_SPI_MASTER is not set
1046
1047#
1048# Dallas's 1-wire bus
1049#
1050# CONFIG_W1 is not set 925# CONFIG_W1 is not set
1051CONFIG_HWMON=y 926# CONFIG_POWER_SUPPLY is not set
1052# CONFIG_HWMON_VID is not set 927# CONFIG_HWMON is not set
1053# CONFIG_SENSORS_ABITUGURU is not set
1054# CONFIG_SENSORS_AD7418 is not set
1055# CONFIG_SENSORS_ADM1021 is not set
1056# CONFIG_SENSORS_ADM1025 is not set
1057# CONFIG_SENSORS_ADM1026 is not set
1058# CONFIG_SENSORS_ADM1029 is not set
1059# CONFIG_SENSORS_ADM1031 is not set
1060# CONFIG_SENSORS_ADM9240 is not set
1061# CONFIG_SENSORS_K8TEMP is not set
1062# CONFIG_SENSORS_ASB100 is not set
1063# CONFIG_SENSORS_ATXP1 is not set
1064# CONFIG_SENSORS_DS1621 is not set
1065# CONFIG_SENSORS_F71805F is not set
1066# CONFIG_SENSORS_FSCHER is not set
1067# CONFIG_SENSORS_FSCPOS is not set
1068# CONFIG_SENSORS_GL518SM is not set
1069# CONFIG_SENSORS_GL520SM is not set
1070CONFIG_SENSORS_CORETEMP=y
1071# CONFIG_SENSORS_IT87 is not set
1072# CONFIG_SENSORS_LM63 is not set
1073# CONFIG_SENSORS_LM75 is not set
1074# CONFIG_SENSORS_LM77 is not set
1075# CONFIG_SENSORS_LM78 is not set
1076# CONFIG_SENSORS_LM80 is not set
1077# CONFIG_SENSORS_LM83 is not set
1078# CONFIG_SENSORS_LM85 is not set
1079# CONFIG_SENSORS_LM87 is not set
1080# CONFIG_SENSORS_LM90 is not set
1081# CONFIG_SENSORS_LM92 is not set
1082# CONFIG_SENSORS_MAX1619 is not set
1083# CONFIG_SENSORS_MAX6650 is not set
1084# CONFIG_SENSORS_PC87360 is not set
1085# CONFIG_SENSORS_PC87427 is not set
1086# CONFIG_SENSORS_SIS5595 is not set
1087# CONFIG_SENSORS_SMSC47M1 is not set
1088# CONFIG_SENSORS_SMSC47M192 is not set
1089CONFIG_SENSORS_SMSC47B397=m
1090# CONFIG_SENSORS_VIA686A is not set
1091# CONFIG_SENSORS_VT1211 is not set
1092# CONFIG_SENSORS_VT8231 is not set
1093# CONFIG_SENSORS_W83781D is not set
1094# CONFIG_SENSORS_W83791D is not set
1095# CONFIG_SENSORS_W83792D is not set
1096# CONFIG_SENSORS_W83793 is not set
1097# CONFIG_SENSORS_W83L785TS is not set
1098# CONFIG_SENSORS_W83627HF is not set
1099# CONFIG_SENSORS_W83627EHF is not set
1100# CONFIG_SENSORS_HDAPS is not set
1101# CONFIG_SENSORS_APPLESMC is not set
1102# CONFIG_HWMON_DEBUG_CHIP is not set
1103 928
1104# 929#
1105# Multifunction device drivers 930# Multifunction device drivers
@@ -1149,15 +974,11 @@ CONFIG_SOUND=y
1149# Open Sound System 974# Open Sound System
1150# 975#
1151CONFIG_SOUND_PRIME=y 976CONFIG_SOUND_PRIME=y
1152# CONFIG_OSS_OBSOLETE is not set
1153# CONFIG_SOUND_TRIDENT is not set 977# CONFIG_SOUND_TRIDENT is not set
1154# CONFIG_SOUND_MSNDCLAS is not set 978# CONFIG_SOUND_MSNDCLAS is not set
1155# CONFIG_SOUND_MSNDPIN is not set 979# CONFIG_SOUND_MSNDPIN is not set
1156# CONFIG_SOUND_OSS is not set 980# CONFIG_SOUND_OSS is not set
1157 981CONFIG_HID_SUPPORT=y
1158#
1159# HID Devices
1160#
1161CONFIG_HID=y 982CONFIG_HID=y
1162# CONFIG_HID_DEBUG is not set 983# CONFIG_HID_DEBUG is not set
1163 984
@@ -1168,10 +989,7 @@ CONFIG_USB_HID=y
1168# CONFIG_USB_HIDINPUT_POWERBOOK is not set 989# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1169# CONFIG_HID_FF is not set 990# CONFIG_HID_FF is not set
1170# CONFIG_USB_HIDDEV is not set 991# CONFIG_USB_HIDDEV is not set
1171 992CONFIG_USB_SUPPORT=y
1172#
1173# USB support
1174#
1175CONFIG_USB_ARCH_HAS_HCD=y 993CONFIG_USB_ARCH_HAS_HCD=y
1176CONFIG_USB_ARCH_HAS_OHCI=y 994CONFIG_USB_ARCH_HAS_OHCI=y
1177CONFIG_USB_ARCH_HAS_EHCI=y 995CONFIG_USB_ARCH_HAS_EHCI=y
@@ -1185,6 +1003,7 @@ CONFIG_USB_DEVICEFS=y
1185# CONFIG_USB_DEVICE_CLASS is not set 1003# CONFIG_USB_DEVICE_CLASS is not set
1186# CONFIG_USB_DYNAMIC_MINORS is not set 1004# CONFIG_USB_DYNAMIC_MINORS is not set
1187# CONFIG_USB_SUSPEND is not set 1005# CONFIG_USB_SUSPEND is not set
1006# CONFIG_USB_PERSIST is not set
1188# CONFIG_USB_OTG is not set 1007# CONFIG_USB_OTG is not set
1189 1008
1190# 1009#
@@ -1194,7 +1013,6 @@ CONFIG_USB_EHCI_HCD=y
1194# CONFIG_USB_EHCI_SPLIT_ISO is not set 1013# CONFIG_USB_EHCI_SPLIT_ISO is not set
1195# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1014# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1196# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1015# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1197# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1198# CONFIG_USB_ISP116X_HCD is not set 1016# CONFIG_USB_ISP116X_HCD is not set
1199CONFIG_USB_OHCI_HCD=y 1017CONFIG_USB_OHCI_HCD=y
1200# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1018# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -1202,6 +1020,7 @@ CONFIG_USB_OHCI_HCD=y
1202CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1020CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1203CONFIG_USB_UHCI_HCD=y 1021CONFIG_USB_UHCI_HCD=y
1204# CONFIG_USB_SL811_HCD is not set 1022# CONFIG_USB_SL811_HCD is not set
1023# CONFIG_USB_R8A66597_HCD is not set
1205 1024
1206# 1025#
1207# USB Device Class drivers 1026# USB Device Class drivers
@@ -1292,15 +1111,7 @@ CONFIG_USB_MON=y
1292# 1111#
1293# LED Triggers 1112# LED Triggers
1294# 1113#
1295
1296#
1297# InfiniBand support
1298#
1299# CONFIG_INFINIBAND is not set 1114# CONFIG_INFINIBAND is not set
1300
1301#
1302# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1303#
1304# CONFIG_EDAC is not set 1115# CONFIG_EDAC is not set
1305 1116
1306# 1117#
@@ -1320,11 +1131,13 @@ CONFIG_USB_MON=y
1320# 1131#
1321# DMA Devices 1132# DMA Devices
1322# 1133#
1134CONFIG_VIRTUALIZATION=y
1135# CONFIG_KVM is not set
1323 1136
1324# 1137#
1325# Virtualization 1138# Userspace I/O
1326# 1139#
1327# CONFIG_KVM is not set 1140# CONFIG_UIO is not set
1328 1141
1329# 1142#
1330# Firmware Drivers 1143# Firmware Drivers
@@ -1332,6 +1145,7 @@ CONFIG_USB_MON=y
1332# CONFIG_EDD is not set 1145# CONFIG_EDD is not set
1333# CONFIG_DELL_RBU is not set 1146# CONFIG_DELL_RBU is not set
1334# CONFIG_DCDBAS is not set 1147# CONFIG_DCDBAS is not set
1148CONFIG_DMIID=y
1335 1149
1336# 1150#
1337# File systems 1151# File systems
@@ -1447,7 +1261,6 @@ CONFIG_SUNRPC=y
1447# CONFIG_NCP_FS is not set 1261# CONFIG_NCP_FS is not set
1448# CONFIG_CODA_FS is not set 1262# CONFIG_CODA_FS is not set
1449# CONFIG_AFS_FS is not set 1263# CONFIG_AFS_FS is not set
1450# CONFIG_9P_FS is not set
1451 1264
1452# 1265#
1453# Partition Types 1266# Partition Types
@@ -1524,8 +1337,9 @@ CONFIG_DEBUG_FS=y
1524CONFIG_DEBUG_KERNEL=y 1337CONFIG_DEBUG_KERNEL=y
1525# CONFIG_DEBUG_SHIRQ is not set 1338# CONFIG_DEBUG_SHIRQ is not set
1526CONFIG_DETECT_SOFTLOCKUP=y 1339CONFIG_DETECT_SOFTLOCKUP=y
1340# CONFIG_SCHED_DEBUG is not set
1527# CONFIG_SCHEDSTATS is not set 1341# CONFIG_SCHEDSTATS is not set
1528# CONFIG_TIMER_STATS is not set 1342CONFIG_TIMER_STATS=y
1529# CONFIG_DEBUG_SLAB is not set 1343# CONFIG_DEBUG_SLAB is not set
1530# CONFIG_DEBUG_RT_MUTEXES is not set 1344# CONFIG_DEBUG_RT_MUTEXES is not set
1531# CONFIG_RT_MUTEX_TESTER is not set 1345# CONFIG_RT_MUTEX_TESTER is not set
@@ -1533,6 +1347,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1533# CONFIG_DEBUG_MUTEXES is not set 1347# CONFIG_DEBUG_MUTEXES is not set
1534# CONFIG_DEBUG_LOCK_ALLOC is not set 1348# CONFIG_DEBUG_LOCK_ALLOC is not set
1535# CONFIG_PROVE_LOCKING is not set 1349# CONFIG_PROVE_LOCKING is not set
1350# CONFIG_LOCK_STAT is not set
1536# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1351# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1537# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1352# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1538# CONFIG_DEBUG_KOBJECT is not set 1353# CONFIG_DEBUG_KOBJECT is not set
@@ -1541,8 +1356,6 @@ CONFIG_DEBUG_BUGVERBOSE=y
1541# CONFIG_DEBUG_VM is not set 1356# CONFIG_DEBUG_VM is not set
1542# CONFIG_DEBUG_LIST is not set 1357# CONFIG_DEBUG_LIST is not set
1543# CONFIG_FRAME_POINTER is not set 1358# CONFIG_FRAME_POINTER is not set
1544CONFIG_UNWIND_INFO=y
1545CONFIG_STACK_UNWIND=y
1546# CONFIG_FORCED_INLINING is not set 1359# CONFIG_FORCED_INLINING is not set
1547# CONFIG_RCU_TORTURE_TEST is not set 1360# CONFIG_RCU_TORTURE_TEST is not set
1548# CONFIG_LKDTM is not set 1361# CONFIG_LKDTM is not set
@@ -1557,10 +1370,6 @@ CONFIG_DEBUG_STACKOVERFLOW=y
1557# 1370#
1558# CONFIG_KEYS is not set 1371# CONFIG_KEYS is not set
1559# CONFIG_SECURITY is not set 1372# CONFIG_SECURITY is not set
1560
1561#
1562# Cryptographic options
1563#
1564# CONFIG_CRYPTO is not set 1373# CONFIG_CRYPTO is not set
1565 1374
1566# 1375#
@@ -1571,6 +1380,7 @@ CONFIG_BITREVERSE=y
1571# CONFIG_CRC16 is not set 1380# CONFIG_CRC16 is not set
1572# CONFIG_CRC_ITU_T is not set 1381# CONFIG_CRC_ITU_T is not set
1573CONFIG_CRC32=y 1382CONFIG_CRC32=y
1383# CONFIG_CRC7 is not set
1574# CONFIG_LIBCRC32C is not set 1384# CONFIG_LIBCRC32C is not set
1575CONFIG_ZLIB_INFLATE=y 1385CONFIG_ZLIB_INFLATE=y
1576CONFIG_PLIST=y 1386CONFIG_PLIST=y
diff --git a/arch/x86_64/ia32/ia32_aout.c b/arch/x86_64/ia32/ia32_aout.c
index fe83edb93c10..08781370256d 100644
--- a/arch/x86_64/ia32/ia32_aout.c
+++ b/arch/x86_64/ia32/ia32_aout.c
@@ -404,7 +404,7 @@ beyond_if:
404 404
405 set_brk(current->mm->start_brk, current->mm->brk); 405 set_brk(current->mm->start_brk, current->mm->brk);
406 406
407 retval = ia32_setup_arg_pages(bprm, IA32_STACK_TOP, EXSTACK_DEFAULT); 407 retval = setup_arg_pages(bprm, IA32_STACK_TOP, EXSTACK_DEFAULT);
408 if (retval < 0) { 408 if (retval < 0) {
409 /* Someone check-me: is this error path enough? */ 409 /* Someone check-me: is this error path enough? */
410 send_sig(SIGKILL, current, 0); 410 send_sig(SIGKILL, current, 0);
diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c
index 185399baaf6d..b70f3e7cf06c 100644
--- a/arch/x86_64/ia32/ia32_binfmt.c
+++ b/arch/x86_64/ia32/ia32_binfmt.c
@@ -38,6 +38,7 @@
38 38
39int sysctl_vsyscall32 = 1; 39int sysctl_vsyscall32 = 1;
40 40
41#undef ARCH_DLINFO
41#define ARCH_DLINFO do { \ 42#define ARCH_DLINFO do { \
42 if (sysctl_vsyscall32) { \ 43 if (sysctl_vsyscall32) { \
43 NEW_AUX_ENT(AT_SYSINFO, (u32)(u64)VSYSCALL32_VSYSCALL); \ 44 NEW_AUX_ENT(AT_SYSINFO, (u32)(u64)VSYSCALL32_VSYSCALL); \
@@ -232,9 +233,6 @@ do { \
232#define load_elf_binary load_elf32_binary 233#define load_elf_binary load_elf32_binary
233 234
234#define ELF_PLAT_INIT(r, load_addr) elf32_init(r) 235#define ELF_PLAT_INIT(r, load_addr) elf32_init(r)
235#define setup_arg_pages(bprm, stack_top, exec_stack) \
236 ia32_setup_arg_pages(bprm, stack_top, exec_stack)
237int ia32_setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top, int executable_stack);
238 236
239#undef start_thread 237#undef start_thread
240#define start_thread(regs,new_rip,new_rsp) do { \ 238#define start_thread(regs,new_rip,new_rsp) do { \
@@ -286,61 +284,6 @@ static void elf32_init(struct pt_regs *regs)
286 me->thread.es = __USER_DS; 284 me->thread.es = __USER_DS;
287} 285}
288 286
289int ia32_setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top,
290 int executable_stack)
291{
292 unsigned long stack_base;
293 struct vm_area_struct *mpnt;
294 struct mm_struct *mm = current->mm;
295 int i, ret;
296
297 stack_base = stack_top - MAX_ARG_PAGES * PAGE_SIZE;
298 mm->arg_start = bprm->p + stack_base;
299
300 bprm->p += stack_base;
301 if (bprm->loader)
302 bprm->loader += stack_base;
303 bprm->exec += stack_base;
304
305 mpnt = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
306 if (!mpnt)
307 return -ENOMEM;
308
309 down_write(&mm->mmap_sem);
310 {
311 mpnt->vm_mm = mm;
312 mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p;
313 mpnt->vm_end = stack_top;
314 if (executable_stack == EXSTACK_ENABLE_X)
315 mpnt->vm_flags = VM_STACK_FLAGS | VM_EXEC;
316 else if (executable_stack == EXSTACK_DISABLE_X)
317 mpnt->vm_flags = VM_STACK_FLAGS & ~VM_EXEC;
318 else
319 mpnt->vm_flags = VM_STACK_FLAGS;
320 mpnt->vm_page_prot = (mpnt->vm_flags & VM_EXEC) ?
321 PAGE_COPY_EXEC : PAGE_COPY;
322 if ((ret = insert_vm_struct(mm, mpnt))) {
323 up_write(&mm->mmap_sem);
324 kmem_cache_free(vm_area_cachep, mpnt);
325 return ret;
326 }
327 mm->stack_vm = mm->total_vm = vma_pages(mpnt);
328 }
329
330 for (i = 0 ; i < MAX_ARG_PAGES ; i++) {
331 struct page *page = bprm->page[i];
332 if (page) {
333 bprm->page[i] = NULL;
334 install_arg_page(mpnt, page, stack_base);
335 }
336 stack_base += PAGE_SIZE;
337 }
338 up_write(&mm->mmap_sem);
339
340 return 0;
341}
342EXPORT_SYMBOL(ia32_setup_arg_pages);
343
344#ifdef CONFIG_SYSCTL 287#ifdef CONFIG_SYSCTL
345/* Register vsyscall32 into the ABI table */ 288/* Register vsyscall32 into the ABI table */
346#include <linux/sysctl.h> 289#include <linux/sysctl.h>
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S
index 21868f9bed7c..938278697e20 100644
--- a/arch/x86_64/ia32/ia32entry.S
+++ b/arch/x86_64/ia32/ia32entry.S
@@ -104,7 +104,7 @@ ENTRY(ia32_sysenter_target)
104 pushq %rax 104 pushq %rax
105 CFI_ADJUST_CFA_OFFSET 8 105 CFI_ADJUST_CFA_OFFSET 8
106 cld 106 cld
107 SAVE_ARGS 0,0,0 107 SAVE_ARGS 0,0,1
108 /* no need to do an access_ok check here because rbp has been 108 /* no need to do an access_ok check here because rbp has been
109 32bit zero extended */ 109 32bit zero extended */
1101: movl (%rbp),%r9d 1101: movl (%rbp),%r9d
@@ -294,7 +294,7 @@ ia32_badarg:
294 */ 294 */
295 295
296ENTRY(ia32_syscall) 296ENTRY(ia32_syscall)
297 CFI_STARTPROC simple 297 CFI_STARTPROC32 simple
298 CFI_SIGNAL_FRAME 298 CFI_SIGNAL_FRAME
299 CFI_DEF_CFA rsp,SS+8-RIP 299 CFI_DEF_CFA rsp,SS+8-RIP
300 /*CFI_REL_OFFSET ss,SS-RIP*/ 300 /*CFI_REL_OFFSET ss,SS-RIP*/
@@ -330,6 +330,7 @@ ia32_sysret:
330 330
331ia32_tracesys: 331ia32_tracesys:
332 SAVE_REST 332 SAVE_REST
333 CLEAR_RREGS
333 movq $-ENOSYS,RAX(%rsp) /* really needed? */ 334 movq $-ENOSYS,RAX(%rsp) /* really needed? */
334 movq %rsp,%rdi /* &pt_regs -> arg1 */ 335 movq %rsp,%rdi /* &pt_regs -> arg1 */
335 call syscall_trace_enter 336 call syscall_trace_enter
@@ -526,7 +527,7 @@ ia32_sys_call_table:
526 .quad sys_init_module 527 .quad sys_init_module
527 .quad sys_delete_module 528 .quad sys_delete_module
528 .quad quiet_ni_syscall /* 130 get_kernel_syms */ 529 .quad quiet_ni_syscall /* 130 get_kernel_syms */
529 .quad sys_quotactl 530 .quad sys32_quotactl
530 .quad sys_getpgid 531 .quad sys_getpgid
531 .quad sys_fchdir 532 .quad sys_fchdir
532 .quad quiet_ni_syscall /* bdflush */ 533 .quad quiet_ni_syscall /* bdflush */
@@ -620,7 +621,7 @@ ia32_sys_call_table:
620 .quad quiet_ni_syscall /* tux */ 621 .quad quiet_ni_syscall /* tux */
621 .quad quiet_ni_syscall /* security */ 622 .quad quiet_ni_syscall /* security */
622 .quad sys_gettid 623 .quad sys_gettid
623 .quad sys_readahead /* 225 */ 624 .quad sys32_readahead /* 225 */
624 .quad sys_setxattr 625 .quad sys_setxattr
625 .quad sys_lsetxattr 626 .quad sys_lsetxattr
626 .quad sys_fsetxattr 627 .quad sys_fsetxattr
@@ -645,7 +646,7 @@ ia32_sys_call_table:
645 .quad compat_sys_io_getevents 646 .quad compat_sys_io_getevents
646 .quad compat_sys_io_submit 647 .quad compat_sys_io_submit
647 .quad sys_io_cancel 648 .quad sys_io_cancel
648 .quad sys_fadvise64 /* 250 */ 649 .quad sys32_fadvise64 /* 250 */
649 .quad quiet_ni_syscall /* free_huge_pages */ 650 .quad quiet_ni_syscall /* free_huge_pages */
650 .quad sys_exit_group 651 .quad sys_exit_group
651 .quad sys32_lookup_dcookie 652 .quad sys32_lookup_dcookie
@@ -709,7 +710,7 @@ ia32_sys_call_table:
709 .quad compat_sys_set_robust_list 710 .quad compat_sys_set_robust_list
710 .quad compat_sys_get_robust_list 711 .quad compat_sys_get_robust_list
711 .quad sys_splice 712 .quad sys_splice
712 .quad sys_sync_file_range 713 .quad sys32_sync_file_range
713 .quad sys_tee /* 315 */ 714 .quad sys_tee /* 315 */
714 .quad compat_sys_vmsplice 715 .quad compat_sys_vmsplice
715 .quad compat_sys_move_pages 716 .quad compat_sys_move_pages
@@ -719,4 +720,5 @@ ia32_sys_call_table:
719 .quad compat_sys_signalfd 720 .quad compat_sys_signalfd
720 .quad compat_sys_timerfd 721 .quad compat_sys_timerfd
721 .quad sys_eventfd 722 .quad sys_eventfd
723 .quad sys32_fallocate
722ia32_syscall_end: 724ia32_syscall_end:
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c
index 200fdde18d96..bee96d614432 100644
--- a/arch/x86_64/ia32/sys_ia32.c
+++ b/arch/x86_64/ia32/sys_ia32.c
@@ -860,3 +860,30 @@ long sys32_lookup_dcookie(u32 addr_low, u32 addr_high,
860 return sys_lookup_dcookie(((u64)addr_high << 32) | addr_low, buf, len); 860 return sys_lookup_dcookie(((u64)addr_high << 32) | addr_low, buf, len);
861} 861}
862 862
863asmlinkage ssize_t sys32_readahead(int fd, unsigned off_lo, unsigned off_hi, size_t count)
864{
865 return sys_readahead(fd, ((u64)off_hi << 32) | off_lo, count);
866}
867
868asmlinkage long sys32_sync_file_range(int fd, unsigned off_low, unsigned off_hi,
869 unsigned n_low, unsigned n_hi, int flags)
870{
871 return sys_sync_file_range(fd,
872 ((u64)off_hi << 32) | off_low,
873 ((u64)n_hi << 32) | n_low, flags);
874}
875
876asmlinkage long sys32_fadvise64(int fd, unsigned offset_lo, unsigned offset_hi, size_t len,
877 int advice)
878{
879 return sys_fadvise64_64(fd, ((u64)offset_hi << 32) | offset_lo,
880 len, advice);
881}
882
883asmlinkage long sys32_fallocate(int fd, int mode, unsigned offset_lo,
884 unsigned offset_hi, unsigned len_lo,
885 unsigned len_hi)
886{
887 return sys_fallocate(fd, mode, ((u64)offset_hi << 32) | offset_lo,
888 ((u64)len_hi << 32) | len_lo);
889}
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index de1de8a2fd84..47f1dc30bf56 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -44,6 +44,7 @@ obj-$(CONFIG_PCI) += early-quirks.o
44 44
45obj-y += topology.o 45obj-y += topology.o
46obj-y += intel_cacheinfo.o 46obj-y += intel_cacheinfo.o
47obj-y += addon_cpuid_features.o
47obj-y += pcspeaker.o 48obj-y += pcspeaker.o
48 49
49CFLAGS_vsyscall.o := $(PROFILING) -g0 50CFLAGS_vsyscall.o := $(PROFILING) -g0
@@ -55,6 +56,7 @@ cpuid-$(subst m,y,$(CONFIG_X86_CPUID)) += ../../i386/kernel/cpuid.o
55topology-y += ../../i386/kernel/topology.o 56topology-y += ../../i386/kernel/topology.o
56microcode-$(subst m,y,$(CONFIG_MICROCODE)) += ../../i386/kernel/microcode.o 57microcode-$(subst m,y,$(CONFIG_MICROCODE)) += ../../i386/kernel/microcode.o
57intel_cacheinfo-y += ../../i386/kernel/cpu/intel_cacheinfo.o 58intel_cacheinfo-y += ../../i386/kernel/cpu/intel_cacheinfo.o
59addon_cpuid_features-y += ../../i386/kernel/cpu/addon_cpuid_features.o
58quirks-y += ../../i386/kernel/quirks.o 60quirks-y += ../../i386/kernel/quirks.o
59i8237-y += ../../i386/kernel/i8237.o 61i8237-y += ../../i386/kernel/i8237.o
60msr-$(subst m,y,$(CONFIG_X86_MSR)) += ../../i386/kernel/msr.o 62msr-$(subst m,y,$(CONFIG_X86_MSR)) += ../../i386/kernel/msr.o
diff --git a/arch/x86_64/kernel/acpi/sleep.c b/arch/x86_64/kernel/acpi/sleep.c
index 195b7034a148..4277f2b27e6d 100644
--- a/arch/x86_64/kernel/acpi/sleep.c
+++ b/arch/x86_64/kernel/acpi/sleep.c
@@ -55,7 +55,7 @@
55 55
56/* address in low memory of the wakeup routine. */ 56/* address in low memory of the wakeup routine. */
57unsigned long acpi_wakeup_address = 0; 57unsigned long acpi_wakeup_address = 0;
58unsigned long acpi_video_flags; 58unsigned long acpi_realmode_flags;
59extern char wakeup_start, wakeup_end; 59extern char wakeup_start, wakeup_end;
60 60
61extern unsigned long acpi_copy_wakeup_routine(unsigned long); 61extern unsigned long acpi_copy_wakeup_routine(unsigned long);
@@ -103,9 +103,11 @@ static int __init acpi_sleep_setup(char *str)
103{ 103{
104 while ((str != NULL) && (*str != '\0')) { 104 while ((str != NULL) && (*str != '\0')) {
105 if (strncmp(str, "s3_bios", 7) == 0) 105 if (strncmp(str, "s3_bios", 7) == 0)
106 acpi_video_flags = 1; 106 acpi_realmode_flags |= 1;
107 if (strncmp(str, "s3_mode", 7) == 0) 107 if (strncmp(str, "s3_mode", 7) == 0)
108 acpi_video_flags |= 2; 108 acpi_realmode_flags |= 2;
109 if (strncmp(str, "s3_beep", 7) == 0)
110 acpi_realmode_flags |= 4;
109 str = strchr(str, ','); 111 str = strchr(str, ',');
110 if (str != NULL) 112 if (str != NULL)
111 str += strspn(str, ", \t"); 113 str += strspn(str, ", \t");
diff --git a/arch/x86_64/kernel/acpi/wakeup.S b/arch/x86_64/kernel/acpi/wakeup.S
index 8550a6ffa275..13f1480cbec9 100644
--- a/arch/x86_64/kernel/acpi/wakeup.S
+++ b/arch/x86_64/kernel/acpi/wakeup.S
@@ -16,6 +16,21 @@
16# cs = 0x1234, eip = 0x05 16# cs = 0x1234, eip = 0x05
17# 17#
18 18
19#define BEEP \
20 inb $97, %al; \
21 outb %al, $0x80; \
22 movb $3, %al; \
23 outb %al, $97; \
24 outb %al, $0x80; \
25 movb $-74, %al; \
26 outb %al, $67; \
27 outb %al, $0x80; \
28 movb $-119, %al; \
29 outb %al, $66; \
30 outb %al, $0x80; \
31 movb $15, %al; \
32 outb %al, $66;
33
19 34
20ALIGN 35ALIGN
21 .align 16 36 .align 16
@@ -33,6 +48,13 @@ wakeup_code:
33 movw %cs, %ax 48 movw %cs, %ax
34 movw %ax, %ds # Make ds:0 point to wakeup_start 49 movw %ax, %ds # Make ds:0 point to wakeup_start
35 movw %ax, %ss 50 movw %ax, %ss
51
52 # Data segment must be set up before we can see whether to beep.
53 testl $4, realmode_flags - wakeup_code
54 jz 1f
55 BEEP
561:
57
36 # Private stack is needed for ASUS board 58 # Private stack is needed for ASUS board
37 mov $(wakeup_stack - wakeup_code), %sp 59 mov $(wakeup_stack - wakeup_code), %sp
38 60
@@ -48,7 +70,7 @@ wakeup_code:
48 testl %eax, %eax 70 testl %eax, %eax
49 jnz no_longmode 71 jnz no_longmode
50 72
51 testl $1, video_flags - wakeup_code 73 testl $1, realmode_flags - wakeup_code
52 jz 1f 74 jz 1f
53 lcall $0xc000,$3 75 lcall $0xc000,$3
54 movw %cs, %ax 76 movw %cs, %ax
@@ -56,7 +78,7 @@ wakeup_code:
56 movw %ax, %ss 78 movw %ax, %ss
571: 791:
58 80
59 testl $2, video_flags - wakeup_code 81 testl $2, realmode_flags - wakeup_code
60 jz 1f 82 jz 1f
61 mov video_mode - wakeup_code, %ax 83 mov video_mode - wakeup_code, %ax
62 call mode_seta 84 call mode_seta
@@ -230,7 +252,7 @@ gdt_48a:
230 252
231real_magic: .quad 0 253real_magic: .quad 0
232video_mode: .quad 0 254video_mode: .quad 0
233video_flags: .quad 0 255realmode_flags: .quad 0
234 256
235.code16 257.code16
236bogus_real_magic: 258bogus_real_magic:
@@ -346,8 +368,8 @@ ENTRY(acpi_copy_wakeup_routine)
346 368
347 movl saved_video_mode, %edx 369 movl saved_video_mode, %edx
348 movl %edx, video_mode - wakeup_start (,%rdi) 370 movl %edx, video_mode - wakeup_start (,%rdi)
349 movl acpi_video_flags, %edx 371 movl acpi_realmode_flags, %edx
350 movl %edx, video_flags - wakeup_start (,%rdi) 372 movl %edx, realmode_flags - wakeup_start (,%rdi)
351 movq $0x12345678, real_magic - wakeup_start (,%rdi) 373 movq $0x12345678, real_magic - wakeup_start (,%rdi)
352 movq $0x123456789abcdef0, %rdx 374 movq $0x123456789abcdef0, %rdx
353 movq %rdx, saved_magic 375 movq %rdx, saved_magic
diff --git a/arch/x86_64/kernel/aperture.c b/arch/x86_64/kernel/aperture.c
index a3d450d6c15b..8f681cae7bf7 100644
--- a/arch/x86_64/kernel/aperture.c
+++ b/arch/x86_64/kernel/aperture.c
@@ -20,7 +20,7 @@
20#include <linux/ioport.h> 20#include <linux/ioport.h>
21#include <asm/e820.h> 21#include <asm/e820.h>
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/proto.h> 23#include <asm/iommu.h>
24#include <asm/pci-direct.h> 24#include <asm/pci-direct.h>
25#include <asm/dma.h> 25#include <asm/dma.h>
26#include <asm/k8.h> 26#include <asm/k8.h>
@@ -214,7 +214,7 @@ void __init iommu_hole_init(void)
214 if (iommu_aperture_disabled || !fix_aperture || !early_pci_allowed()) 214 if (iommu_aperture_disabled || !fix_aperture || !early_pci_allowed())
215 return; 215 return;
216 216
217 printk("Checking aperture...\n"); 217 printk(KERN_INFO "Checking aperture...\n");
218 218
219 fix = 0; 219 fix = 0;
220 for (num = 24; num < 32; num++) { 220 for (num = 24; num < 32; num++) {
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c
index 1b0e07bb8728..900ff38d68de 100644
--- a/arch/x86_64/kernel/apic.c
+++ b/arch/x86_64/kernel/apic.c
@@ -92,8 +92,9 @@ unsigned int safe_apic_wait_icr_idle(void)
92void enable_NMI_through_LVT0 (void * dummy) 92void enable_NMI_through_LVT0 (void * dummy)
93{ 93{
94 unsigned int v; 94 unsigned int v;
95 95
96 v = APIC_DM_NMI; /* unmask and set to NMI */ 96 /* unmask and set to NMI */
97 v = APIC_DM_NMI;
97 apic_write(APIC_LVT0, v); 98 apic_write(APIC_LVT0, v);
98} 99}
99 100
@@ -120,7 +121,7 @@ void ack_bad_irq(unsigned int irq)
120 * holds up an irq slot - in excessive cases (when multiple 121 * holds up an irq slot - in excessive cases (when multiple
121 * unexpected vectors occur) that might lock up the APIC 122 * unexpected vectors occur) that might lock up the APIC
122 * completely. 123 * completely.
123 * But don't ack when the APIC is disabled. -AK 124 * But don't ack when the APIC is disabled. -AK
124 */ 125 */
125 if (!disable_apic) 126 if (!disable_apic)
126 ack_APIC_irq(); 127 ack_APIC_irq();
@@ -616,7 +617,7 @@ early_param("apic", apic_set_verbosity);
616 * Detect and enable local APICs on non-SMP boards. 617 * Detect and enable local APICs on non-SMP boards.
617 * Original code written by Keir Fraser. 618 * Original code written by Keir Fraser.
618 * On AMD64 we trust the BIOS - if it says no APIC it is likely 619 * On AMD64 we trust the BIOS - if it says no APIC it is likely
619 * not correctly set up (usually the APIC timer won't work etc.) 620 * not correctly set up (usually the APIC timer won't work etc.)
620 */ 621 */
621 622
622static int __init detect_init_APIC (void) 623static int __init detect_init_APIC (void)
@@ -789,13 +790,13 @@ static void setup_APIC_timer(unsigned int clocks)
789 local_irq_save(flags); 790 local_irq_save(flags);
790 791
791 /* wait for irq slice */ 792 /* wait for irq slice */
792 if (hpet_address && hpet_use_timer) { 793 if (hpet_address && hpet_use_timer) {
793 int trigger = hpet_readl(HPET_T0_CMP); 794 int trigger = hpet_readl(HPET_T0_CMP);
794 while (hpet_readl(HPET_COUNTER) >= trigger) 795 while (hpet_readl(HPET_COUNTER) >= trigger)
795 /* do nothing */ ; 796 /* do nothing */ ;
796 while (hpet_readl(HPET_COUNTER) < trigger) 797 while (hpet_readl(HPET_COUNTER) < trigger)
797 /* do nothing */ ; 798 /* do nothing */ ;
798 } else { 799 } else {
799 int c1, c2; 800 int c1, c2;
800 outb_p(0x00, 0x43); 801 outb_p(0x00, 0x43);
801 c2 = inb_p(0x40); 802 c2 = inb_p(0x40);
@@ -881,10 +882,10 @@ static unsigned int calibration_result;
881 882
882void __init setup_boot_APIC_clock (void) 883void __init setup_boot_APIC_clock (void)
883{ 884{
884 if (disable_apic_timer) { 885 if (disable_apic_timer) {
885 printk(KERN_INFO "Disabling APIC timer\n"); 886 printk(KERN_INFO "Disabling APIC timer\n");
886 return; 887 return;
887 } 888 }
888 889
889 printk(KERN_INFO "Using local APIC timer interrupts.\n"); 890 printk(KERN_INFO "Using local APIC timer interrupts.\n");
890 using_apic_timer = 1; 891 using_apic_timer = 1;
@@ -990,8 +991,8 @@ int setup_profiling_timer(unsigned int multiplier)
990 return -EINVAL; 991 return -EINVAL;
991} 992}
992 993
993void setup_APIC_extened_lvt(unsigned char lvt_off, unsigned char vector, 994void setup_APIC_extended_lvt(unsigned char lvt_off, unsigned char vector,
994 unsigned char msg_type, unsigned char mask) 995 unsigned char msg_type, unsigned char mask)
995{ 996{
996 unsigned long reg = (lvt_off << 4) + K8_APIC_EXT_LVT_BASE; 997 unsigned long reg = (lvt_off << 4) + K8_APIC_EXT_LVT_BASE;
997 unsigned int v = (mask << 16) | (msg_type << 8) | vector; 998 unsigned int v = (mask << 16) | (msg_type << 8) | vector;
@@ -1128,20 +1129,6 @@ asmlinkage void smp_spurious_interrupt(void)
1128 if (v & (1 << (SPURIOUS_APIC_VECTOR & 0x1f))) 1129 if (v & (1 << (SPURIOUS_APIC_VECTOR & 0x1f)))
1129 ack_APIC_irq(); 1130 ack_APIC_irq();
1130 1131
1131#if 0
1132 static unsigned long last_warning;
1133 static unsigned long skipped;
1134
1135 /* see sw-dev-man vol 3, chapter 7.4.13.5 */
1136 if (time_before(last_warning+30*HZ,jiffies)) {
1137 printk(KERN_INFO "spurious APIC interrupt on CPU#%d, %ld skipped.\n",
1138 smp_processor_id(), skipped);
1139 last_warning = jiffies;
1140 skipped = 0;
1141 } else {
1142 skipped++;
1143 }
1144#endif
1145 irq_exit(); 1132 irq_exit();
1146} 1133}
1147 1134
@@ -1173,11 +1160,11 @@ asmlinkage void smp_error_interrupt(void)
1173 7: Illegal register address 1160 7: Illegal register address
1174 */ 1161 */
1175 printk (KERN_DEBUG "APIC error on CPU%d: %02x(%02x)\n", 1162 printk (KERN_DEBUG "APIC error on CPU%d: %02x(%02x)\n",
1176 smp_processor_id(), v , v1); 1163 smp_processor_id(), v , v1);
1177 irq_exit(); 1164 irq_exit();
1178} 1165}
1179 1166
1180int disable_apic; 1167int disable_apic;
1181 1168
1182/* 1169/*
1183 * This initializes the IO-APIC and APIC hardware if this is 1170 * This initializes the IO-APIC and APIC hardware if this is
@@ -1185,11 +1172,11 @@ int disable_apic;
1185 */ 1172 */
1186int __init APIC_init_uniprocessor (void) 1173int __init APIC_init_uniprocessor (void)
1187{ 1174{
1188 if (disable_apic) { 1175 if (disable_apic) {
1189 printk(KERN_INFO "Apic disabled\n"); 1176 printk(KERN_INFO "Apic disabled\n");
1190 return -1; 1177 return -1;
1191 } 1178 }
1192 if (!cpu_has_apic) { 1179 if (!cpu_has_apic) {
1193 disable_apic = 1; 1180 disable_apic = 1;
1194 printk(KERN_INFO "Apic disabled by BIOS\n"); 1181 printk(KERN_INFO "Apic disabled by BIOS\n");
1195 return -1; 1182 return -1;
@@ -1211,8 +1198,8 @@ int __init APIC_init_uniprocessor (void)
1211 return 0; 1198 return 0;
1212} 1199}
1213 1200
1214static __init int setup_disableapic(char *str) 1201static __init int setup_disableapic(char *str)
1215{ 1202{
1216 disable_apic = 1; 1203 disable_apic = 1;
1217 clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability); 1204 clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability);
1218 return 0; 1205 return 0;
@@ -1220,10 +1207,10 @@ static __init int setup_disableapic(char *str)
1220early_param("disableapic", setup_disableapic); 1207early_param("disableapic", setup_disableapic);
1221 1208
1222/* same as disableapic, for compatibility */ 1209/* same as disableapic, for compatibility */
1223static __init int setup_nolapic(char *str) 1210static __init int setup_nolapic(char *str)
1224{ 1211{
1225 return setup_disableapic(str); 1212 return setup_disableapic(str);
1226} 1213}
1227early_param("nolapic", setup_nolapic); 1214early_param("nolapic", setup_nolapic);
1228 1215
1229static int __init parse_lapic_timer_c2_ok(char *arg) 1216static int __init parse_lapic_timer_c2_ok(char *arg)
@@ -1233,13 +1220,13 @@ static int __init parse_lapic_timer_c2_ok(char *arg)
1233} 1220}
1234early_param("lapic_timer_c2_ok", parse_lapic_timer_c2_ok); 1221early_param("lapic_timer_c2_ok", parse_lapic_timer_c2_ok);
1235 1222
1236static __init int setup_noapictimer(char *str) 1223static __init int setup_noapictimer(char *str)
1237{ 1224{
1238 if (str[0] != ' ' && str[0] != 0) 1225 if (str[0] != ' ' && str[0] != 0)
1239 return 0; 1226 return 0;
1240 disable_apic_timer = 1; 1227 disable_apic_timer = 1;
1241 return 1; 1228 return 1;
1242} 1229}
1243 1230
1244static __init int setup_apicmaintimer(char *str) 1231static __init int setup_apicmaintimer(char *str)
1245{ 1232{
@@ -1264,5 +1251,5 @@ static __init int setup_apicpmtimer(char *s)
1264} 1251}
1265__setup("apicpmtimer", setup_apicpmtimer); 1252__setup("apicpmtimer", setup_apicpmtimer);
1266 1253
1267__setup("noapictimer", setup_noapictimer); 1254__setup("noapictimer", setup_noapictimer);
1268 1255
diff --git a/arch/x86_64/kernel/cpufreq/Kconfig b/arch/x86_64/kernel/cpufreq/Kconfig
index c0749d2479f5..a3fd51926cbd 100644
--- a/arch/x86_64/kernel/cpufreq/Kconfig
+++ b/arch/x86_64/kernel/cpufreq/Kconfig
@@ -48,10 +48,6 @@ config X86_SPEEDSTEP_CENTRINO
48 48
49 If in doubt, say N. 49 If in doubt, say N.
50 50
51config X86_SPEEDSTEP_CENTRINO_ACPI
52 bool
53 depends on X86_SPEEDSTEP_CENTRINO
54
55config X86_ACPI_CPUFREQ 51config X86_ACPI_CPUFREQ
56 tristate "ACPI Processor P-States driver" 52 tristate "ACPI Processor P-States driver"
57 select CPU_FREQ_TABLE 53 select CPU_FREQ_TABLE
@@ -73,7 +69,7 @@ comment "shared options"
73config X86_ACPI_CPUFREQ_PROC_INTF 69config X86_ACPI_CPUFREQ_PROC_INTF
74 bool "/proc/acpi/processor/../performance interface (deprecated)" 70 bool "/proc/acpi/processor/../performance interface (deprecated)"
75 depends on PROC_FS 71 depends on PROC_FS
76 depends on X86_ACPI_CPUFREQ || X86_SPEEDSTEP_CENTRINO_ACPI || X86_POWERNOW_K8_ACPI 72 depends on X86_ACPI_CPUFREQ || X86_POWERNOW_K8_ACPI
77 help 73 help
78 This enables the deprecated /proc/acpi/processor/../performance 74 This enables the deprecated /proc/acpi/processor/../performance
79 interface. While it is helpful for debugging, the generic, 75 interface. While it is helpful for debugging, the generic,
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
index 13c6c37610e0..0f4d5e209e9b 100644
--- a/arch/x86_64/kernel/e820.c
+++ b/arch/x86_64/kernel/e820.c
@@ -194,37 +194,6 @@ unsigned long __init e820_end_of_ram(void)
194} 194}
195 195
196/* 196/*
197 * Find the hole size in the range.
198 */
199unsigned long __init e820_hole_size(unsigned long start, unsigned long end)
200{
201 unsigned long ram = 0;
202 int i;
203
204 for (i = 0; i < e820.nr_map; i++) {
205 struct e820entry *ei = &e820.map[i];
206 unsigned long last, addr;
207
208 if (ei->type != E820_RAM ||
209 ei->addr+ei->size <= start ||
210 ei->addr >= end)
211 continue;
212
213 addr = round_up(ei->addr, PAGE_SIZE);
214 if (addr < start)
215 addr = start;
216
217 last = round_down(ei->addr + ei->size, PAGE_SIZE);
218 if (last >= end)
219 last = end;
220
221 if (last > addr)
222 ram += last - addr;
223 }
224 return ((end - start) - ram);
225}
226
227/*
228 * Mark e820 reserved areas as busy for the resource manager. 197 * Mark e820 reserved areas as busy for the resource manager.
229 */ 198 */
230void __init e820_reserve_resources(void) 199void __init e820_reserve_resources(void)
@@ -289,47 +258,61 @@ void __init e820_mark_nosave_regions(void)
289 } 258 }
290} 259}
291 260
292/* Walk the e820 map and register active regions within a node */ 261/*
293void __init 262 * Finds an active region in the address range from start_pfn to end_pfn and
294e820_register_active_regions(int nid, unsigned long start_pfn, 263 * returns its range in ei_startpfn and ei_endpfn for the e820 entry.
295 unsigned long end_pfn) 264 */
265static int __init e820_find_active_region(const struct e820entry *ei,
266 unsigned long start_pfn,
267 unsigned long end_pfn,
268 unsigned long *ei_startpfn,
269 unsigned long *ei_endpfn)
296{ 270{
297 int i; 271 *ei_startpfn = round_up(ei->addr, PAGE_SIZE) >> PAGE_SHIFT;
298 unsigned long ei_startpfn, ei_endpfn; 272 *ei_endpfn = round_down(ei->addr + ei->size, PAGE_SIZE) >> PAGE_SHIFT;
299 for (i = 0; i < e820.nr_map; i++) {
300 struct e820entry *ei = &e820.map[i];
301 ei_startpfn = round_up(ei->addr, PAGE_SIZE) >> PAGE_SHIFT;
302 ei_endpfn = round_down(ei->addr + ei->size, PAGE_SIZE)
303 >> PAGE_SHIFT;
304 273
305 /* Skip map entries smaller than a page */ 274 /* Skip map entries smaller than a page */
306 if (ei_startpfn >= ei_endpfn) 275 if (*ei_startpfn >= *ei_endpfn)
307 continue; 276 return 0;
308 277
309 /* Check if end_pfn_map should be updated */ 278 /* Check if end_pfn_map should be updated */
310 if (ei->type != E820_RAM && ei_endpfn > end_pfn_map) 279 if (ei->type != E820_RAM && *ei_endpfn > end_pfn_map)
311 end_pfn_map = ei_endpfn; 280 end_pfn_map = *ei_endpfn;
312 281
313 /* Skip if map is outside the node */ 282 /* Skip if map is outside the node */
314 if (ei->type != E820_RAM || 283 if (ei->type != E820_RAM || *ei_endpfn <= start_pfn ||
315 ei_endpfn <= start_pfn || 284 *ei_startpfn >= end_pfn)
316 ei_startpfn >= end_pfn) 285 return 0;
317 continue;
318 286
319 /* Check for overlaps */ 287 /* Check for overlaps */
320 if (ei_startpfn < start_pfn) 288 if (*ei_startpfn < start_pfn)
321 ei_startpfn = start_pfn; 289 *ei_startpfn = start_pfn;
322 if (ei_endpfn > end_pfn) 290 if (*ei_endpfn > end_pfn)
323 ei_endpfn = end_pfn; 291 *ei_endpfn = end_pfn;
324 292
325 /* Obey end_user_pfn to save on memmap */ 293 /* Obey end_user_pfn to save on memmap */
326 if (ei_startpfn >= end_user_pfn) 294 if (*ei_startpfn >= end_user_pfn)
327 continue; 295 return 0;
328 if (ei_endpfn > end_user_pfn) 296 if (*ei_endpfn > end_user_pfn)
329 ei_endpfn = end_user_pfn; 297 *ei_endpfn = end_user_pfn;
330 298
331 add_active_range(nid, ei_startpfn, ei_endpfn); 299 return 1;
332 } 300}
301
302/* Walk the e820 map and register active regions within a node */
303void __init
304e820_register_active_regions(int nid, unsigned long start_pfn,
305 unsigned long end_pfn)
306{
307 unsigned long ei_startpfn;
308 unsigned long ei_endpfn;
309 int i;
310
311 for (i = 0; i < e820.nr_map; i++)
312 if (e820_find_active_region(&e820.map[i],
313 start_pfn, end_pfn,
314 &ei_startpfn, &ei_endpfn))
315 add_active_range(nid, ei_startpfn, ei_endpfn);
333} 316}
334 317
335/* 318/*
@@ -350,12 +333,35 @@ void __init add_memory_region(unsigned long start, unsigned long size, int type)
350 e820.nr_map++; 333 e820.nr_map++;
351} 334}
352 335
336/*
337 * Find the hole size (in bytes) in the memory range.
338 * @start: starting address of the memory range to scan
339 * @end: ending address of the memory range to scan
340 */
341unsigned long __init e820_hole_size(unsigned long start, unsigned long end)
342{
343 unsigned long start_pfn = start >> PAGE_SHIFT;
344 unsigned long end_pfn = end >> PAGE_SHIFT;
345 unsigned long ei_startpfn;
346 unsigned long ei_endpfn;
347 unsigned long ram = 0;
348 int i;
349
350 for (i = 0; i < e820.nr_map; i++) {
351 if (e820_find_active_region(&e820.map[i],
352 start_pfn, end_pfn,
353 &ei_startpfn, &ei_endpfn))
354 ram += ei_endpfn - ei_startpfn;
355 }
356 return end - start - (ram << PAGE_SHIFT);
357}
358
353void __init e820_print_map(char *who) 359void __init e820_print_map(char *who)
354{ 360{
355 int i; 361 int i;
356 362
357 for (i = 0; i < e820.nr_map; i++) { 363 for (i = 0; i < e820.nr_map; i++) {
358 printk(" %s: %016Lx - %016Lx ", who, 364 printk(KERN_INFO " %s: %016Lx - %016Lx ", who,
359 (unsigned long long) e820.map[i].addr, 365 (unsigned long long) e820.map[i].addr,
360 (unsigned long long) (e820.map[i].addr + e820.map[i].size)); 366 (unsigned long long) (e820.map[i].addr + e820.map[i].size));
361 switch (e820.map[i].type) { 367 switch (e820.map[i].type) {
diff --git a/arch/x86_64/kernel/early-quirks.c b/arch/x86_64/kernel/early-quirks.c
index 990d9c218a5d..13aa4fd728f3 100644
--- a/arch/x86_64/kernel/early-quirks.c
+++ b/arch/x86_64/kernel/early-quirks.c
@@ -14,6 +14,7 @@
14#include <linux/pci_ids.h> 14#include <linux/pci_ids.h>
15#include <asm/pci-direct.h> 15#include <asm/pci-direct.h>
16#include <asm/proto.h> 16#include <asm/proto.h>
17#include <asm/iommu.h>
17#include <asm/dma.h> 18#include <asm/dma.h>
18 19
19static void __init via_bugs(void) 20static void __init via_bugs(void)
diff --git a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c
index 296d2b0c5d88..fd9aff3f3890 100644
--- a/arch/x86_64/kernel/early_printk.c
+++ b/arch/x86_64/kernel/early_printk.c
@@ -6,6 +6,7 @@
6#include <asm/io.h> 6#include <asm/io.h>
7#include <asm/processor.h> 7#include <asm/processor.h>
8#include <asm/fcntl.h> 8#include <asm/fcntl.h>
9#include <xen/hvc-console.h>
9 10
10/* Simple VGA output */ 11/* Simple VGA output */
11 12
@@ -242,6 +243,10 @@ static int __init setup_early_printk(char *buf)
242 simnow_init(buf + 6); 243 simnow_init(buf + 6);
243 early_console = &simnow_console; 244 early_console = &simnow_console;
244 keep_early = 1; 245 keep_early = 1;
246#ifdef CONFIG_HVC_XEN
247 } else if (!strncmp(buf, "xen", 3)) {
248 early_console = &xenboot_console;
249#endif
245 } 250 }
246 251
247 if (keep_early) 252 if (keep_early)
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S
index fa984b53e7e6..830cfc6ee8cb 100644
--- a/arch/x86_64/kernel/entry.S
+++ b/arch/x86_64/kernel/entry.S
@@ -282,7 +282,7 @@ sysret_careful:
282sysret_signal: 282sysret_signal:
283 TRACE_IRQS_ON 283 TRACE_IRQS_ON
284 sti 284 sti
285 testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx 285 testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY),%edx
286 jz 1f 286 jz 1f
287 287
288 /* Really a signal */ 288 /* Really a signal */
@@ -375,7 +375,7 @@ int_very_careful:
375 jmp int_restore_rest 375 jmp int_restore_rest
376 376
377int_signal: 377int_signal:
378 testl $(_TIF_NOTIFY_RESUME|_TIF_SIGPENDING|_TIF_SINGLESTEP),%edx 378 testl $(_TIF_NOTIFY_RESUME|_TIF_SIGPENDING|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY),%edx
379 jz 1f 379 jz 1f
380 movq %rsp,%rdi # &ptregs -> arg1 380 movq %rsp,%rdi # &ptregs -> arg1
381 xorl %esi,%esi # oldset -> arg2 381 xorl %esi,%esi # oldset -> arg2
@@ -599,7 +599,7 @@ retint_careful:
599 jmp retint_check 599 jmp retint_check
600 600
601retint_signal: 601retint_signal:
602 testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx 602 testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY),%edx
603 jz retint_swapgs 603 jz retint_swapgs
604 TRACE_IRQS_ON 604 TRACE_IRQS_ON
605 sti 605 sti
@@ -1163,3 +1163,10 @@ ENTRY(call_softirq)
1163 ret 1163 ret
1164 CFI_ENDPROC 1164 CFI_ENDPROC
1165ENDPROC(call_softirq) 1165ENDPROC(call_softirq)
1166
1167KPROBE_ENTRY(ignore_sysret)
1168 CFI_STARTPROC
1169 mov $-ENOSYS,%eax
1170 sysret
1171 CFI_ENDPROC
1172ENDPROC(ignore_sysret)
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S
index 1fab487dee86..941c84baecc8 100644
--- a/arch/x86_64/kernel/head.S
+++ b/arch/x86_64/kernel/head.S
@@ -73,7 +73,11 @@ startup_64:
73 addq %rbp, init_level4_pgt + (511*8)(%rip) 73 addq %rbp, init_level4_pgt + (511*8)(%rip)
74 74
75 addq %rbp, level3_ident_pgt + 0(%rip) 75 addq %rbp, level3_ident_pgt + 0(%rip)
76
76 addq %rbp, level3_kernel_pgt + (510*8)(%rip) 77 addq %rbp, level3_kernel_pgt + (510*8)(%rip)
78 addq %rbp, level3_kernel_pgt + (511*8)(%rip)
79
80 addq %rbp, level2_fixmap_pgt + (506*8)(%rip)
77 81
78 /* Add an Identity mapping if I am above 1G */ 82 /* Add an Identity mapping if I am above 1G */
79 leaq _text(%rip), %rdi 83 leaq _text(%rip), %rdi
@@ -314,7 +318,16 @@ NEXT_PAGE(level3_kernel_pgt)
314 .fill 510,8,0 318 .fill 510,8,0
315 /* (2^48-(2*1024*1024*1024)-((2^39)*511))/(2^30) = 510 */ 319 /* (2^48-(2*1024*1024*1024)-((2^39)*511))/(2^30) = 510 */
316 .quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE 320 .quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE
317 .fill 1,8,0 321 .quad level2_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE
322
323NEXT_PAGE(level2_fixmap_pgt)
324 .fill 506,8,0
325 .quad level1_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE
326 /* 8MB reserved for vsyscalls + a 2MB hole = 4 + 1 entries */
327 .fill 5,8,0
328
329NEXT_PAGE(level1_fixmap_pgt)
330 .fill 512,8,0
318 331
319NEXT_PAGE(level2_ident_pgt) 332NEXT_PAGE(level2_ident_pgt)
320 /* Since I easily can, map the first 1G. 333 /* Since I easily can, map the first 1G.
diff --git a/arch/x86_64/kernel/hpet.c b/arch/x86_64/kernel/hpet.c
index b8286968662d..636f4f9fc6bb 100644
--- a/arch/x86_64/kernel/hpet.c
+++ b/arch/x86_64/kernel/hpet.c
@@ -190,7 +190,7 @@ int hpet_reenable(void)
190 */ 190 */
191 191
192#define TICK_COUNT 100000000 192#define TICK_COUNT 100000000
193#define TICK_MIN 5000 193#define SMI_THRESHOLD 50000
194#define MAX_TRIES 5 194#define MAX_TRIES 5
195 195
196/* 196/*
@@ -205,7 +205,7 @@ static void __init read_hpet_tsc(int *hpet, int *tsc)
205 tsc1 = get_cycles_sync(); 205 tsc1 = get_cycles_sync();
206 hpet1 = hpet_readl(HPET_COUNTER); 206 hpet1 = hpet_readl(HPET_COUNTER);
207 tsc2 = get_cycles_sync(); 207 tsc2 = get_cycles_sync();
208 if (tsc2 - tsc1 > TICK_MIN) 208 if ((tsc2 - tsc1) < SMI_THRESHOLD)
209 break; 209 break;
210 } 210 }
211 *hpet = hpet1; 211 *hpet = hpet1;
@@ -439,7 +439,7 @@ int hpet_rtc_dropped_irq(void)
439 return 1; 439 return 1;
440} 440}
441 441
442irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs) 442irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
443{ 443{
444 struct rtc_time curr_time; 444 struct rtc_time curr_time;
445 unsigned long rtc_int_flag = 0; 445 unsigned long rtc_int_flag = 0;
diff --git a/arch/x86_64/kernel/i8259.c b/arch/x86_64/kernel/i8259.c
index 4b326655b208..948cae646099 100644
--- a/arch/x86_64/kernel/i8259.c
+++ b/arch/x86_64/kernel/i8259.c
@@ -444,24 +444,6 @@ void __init init_ISA_irqs (void)
444 } 444 }
445} 445}
446 446
447void apic_timer_interrupt(void);
448void spurious_interrupt(void);
449void error_interrupt(void);
450void reschedule_interrupt(void);
451void call_function_interrupt(void);
452void irq_move_cleanup_interrupt(void);
453void invalidate_interrupt0(void);
454void invalidate_interrupt1(void);
455void invalidate_interrupt2(void);
456void invalidate_interrupt3(void);
457void invalidate_interrupt4(void);
458void invalidate_interrupt5(void);
459void invalidate_interrupt6(void);
460void invalidate_interrupt7(void);
461void thermal_interrupt(void);
462void threshold_interrupt(void);
463void i8254_timer_resume(void);
464
465static void setup_timer_hardware(void) 447static void setup_timer_hardware(void)
466{ 448{
467 outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */ 449 outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */
diff --git a/arch/x86_64/kernel/init_task.c b/arch/x86_64/kernel/init_task.c
index 3dc5854ba21e..4ff33d4f8551 100644
--- a/arch/x86_64/kernel/init_task.c
+++ b/arch/x86_64/kernel/init_task.c
@@ -44,7 +44,7 @@ EXPORT_SYMBOL(init_task);
44 * section. Since TSS's are completely CPU-local, we want them 44 * section. Since TSS's are completely CPU-local, we want them
45 * on exact cacheline boundaries, to eliminate cacheline ping-pong. 45 * on exact cacheline boundaries, to eliminate cacheline ping-pong.
46 */ 46 */
47DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_internodealigned_in_smp = INIT_TSS; 47DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS;
48 48
49/* Copies of the original ist values from the tss are only accessed during 49/* Copies of the original ist values from the tss are only accessed during
50 * debugging, no special alignment required. 50 * debugging, no special alignment required.
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index d8bfe315471c..050141c0602b 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -152,6 +152,32 @@ static inline void io_apic_modify(unsigned int apic, unsigned int value)
152 writel(value, &io_apic->data); 152 writel(value, &io_apic->data);
153} 153}
154 154
155static int io_apic_level_ack_pending(unsigned int irq)
156{
157 struct irq_pin_list *entry;
158 unsigned long flags;
159 int pending = 0;
160
161 spin_lock_irqsave(&ioapic_lock, flags);
162 entry = irq_2_pin + irq;
163 for (;;) {
164 unsigned int reg;
165 int pin;
166
167 pin = entry->pin;
168 if (pin == -1)
169 break;
170 reg = io_apic_read(entry->apic, 0x10 + pin*2);
171 /* Is the remote IRR bit set? */
172 pending |= (reg >> 14) & 1;
173 if (!entry->next)
174 break;
175 entry = irq_2_pin + entry->next;
176 }
177 spin_unlock_irqrestore(&ioapic_lock, flags);
178 return pending;
179}
180
155/* 181/*
156 * Synchronize the IO-APIC and the CPU by doing 182 * Synchronize the IO-APIC and the CPU by doing
157 * a dummy read from the IO-APIC 183 * a dummy read from the IO-APIC
@@ -1418,9 +1444,37 @@ static void ack_apic_level(unsigned int irq)
1418 ack_APIC_irq(); 1444 ack_APIC_irq();
1419 1445
1420 /* Now we can move and renable the irq */ 1446 /* Now we can move and renable the irq */
1421 move_masked_irq(irq); 1447 if (unlikely(do_unmask_irq)) {
1422 if (unlikely(do_unmask_irq)) 1448 /* Only migrate the irq if the ack has been received.
1449 *
1450 * On rare occasions the broadcast level triggered ack gets
1451 * delayed going to ioapics, and if we reprogram the
1452 * vector while Remote IRR is still set the irq will never
1453 * fire again.
1454 *
1455 * To prevent this scenario we read the Remote IRR bit
1456 * of the ioapic. This has two effects.
1457 * - On any sane system the read of the ioapic will
1458 * flush writes (and acks) going to the ioapic from
1459 * this cpu.
1460 * - We get to see if the ACK has actually been delivered.
1461 *
1462 * Based on failed experiments of reprogramming the
1463 * ioapic entry from outside of irq context starting
1464 * with masking the ioapic entry and then polling until
1465 * Remote IRR was clear before reprogramming the
1466 * ioapic I don't trust the Remote IRR bit to be
1467 * completey accurate.
1468 *
1469 * However there appears to be no other way to plug
1470 * this race, so if the Remote IRR bit is not
1471 * accurate and is causing problems then it is a hardware bug
1472 * and you can go talk to the chipset vendor about it.
1473 */
1474 if (!io_apic_level_ack_pending(irq))
1475 move_masked_irq(irq);
1423 unmask_IO_APIC_irq(irq); 1476 unmask_IO_APIC_irq(irq);
1477 }
1424} 1478}
1425 1479
1426static struct irq_chip ioapic_chip __read_mostly = { 1480static struct irq_chip ioapic_chip __read_mostly = {
@@ -1492,6 +1546,7 @@ static void ack_lapic_irq (unsigned int irq)
1492static void end_lapic_irq (unsigned int i) { /* nothing */ } 1546static void end_lapic_irq (unsigned int i) { /* nothing */ }
1493 1547
1494static struct hw_interrupt_type lapic_irq_type __read_mostly = { 1548static struct hw_interrupt_type lapic_irq_type __read_mostly = {
1549 .name = "local-APIC",
1495 .typename = "local-APIC-edge", 1550 .typename = "local-APIC-edge",
1496 .startup = NULL, /* startup_irq() not used for IRQ0 */ 1551 .startup = NULL, /* startup_irq() not used for IRQ0 */
1497 .shutdown = NULL, /* shutdown_irq() not used for IRQ0 */ 1552 .shutdown = NULL, /* shutdown_irq() not used for IRQ0 */
diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c
index 3eaceac32481..39cb3fa83ebb 100644
--- a/arch/x86_64/kernel/irq.c
+++ b/arch/x86_64/kernel/irq.c
@@ -144,17 +144,43 @@ void fixup_irqs(cpumask_t map)
144 144
145 for (irq = 0; irq < NR_IRQS; irq++) { 145 for (irq = 0; irq < NR_IRQS; irq++) {
146 cpumask_t mask; 146 cpumask_t mask;
147 int break_affinity = 0;
148 int set_affinity = 1;
149
147 if (irq == 2) 150 if (irq == 2)
148 continue; 151 continue;
149 152
153 /* interrupt's are disabled at this point */
154 spin_lock(&irq_desc[irq].lock);
155
156 if (!irq_has_action(irq) ||
157 cpus_equal(irq_desc[irq].affinity, map)) {
158 spin_unlock(&irq_desc[irq].lock);
159 continue;
160 }
161
150 cpus_and(mask, irq_desc[irq].affinity, map); 162 cpus_and(mask, irq_desc[irq].affinity, map);
151 if (any_online_cpu(mask) == NR_CPUS) { 163 if (cpus_empty(mask)) {
152 printk("Breaking affinity for irq %i\n", irq); 164 break_affinity = 1;
153 mask = map; 165 mask = map;
154 } 166 }
167
168 if (irq_desc[irq].chip->mask)
169 irq_desc[irq].chip->mask(irq);
170
155 if (irq_desc[irq].chip->set_affinity) 171 if (irq_desc[irq].chip->set_affinity)
156 irq_desc[irq].chip->set_affinity(irq, mask); 172 irq_desc[irq].chip->set_affinity(irq, mask);
157 else if (irq_desc[irq].action && !(warned++)) 173 else if (!(warned++))
174 set_affinity = 0;
175
176 if (irq_desc[irq].chip->unmask)
177 irq_desc[irq].chip->unmask(irq);
178
179 spin_unlock(&irq_desc[irq].lock);
180
181 if (break_affinity && set_affinity)
182 printk("Broke affinity for irq %i\n", irq);
183 else if (!set_affinity)
158 printk("Cannot set affinity for irq %i\n", irq); 184 printk("Cannot set affinity for irq %i\n", irq);
159 } 185 }
160 186
diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c
index a14375dd5425..4d8450ee3635 100644
--- a/arch/x86_64/kernel/mce.c
+++ b/arch/x86_64/kernel/mce.c
@@ -18,6 +18,8 @@
18#include <linux/capability.h> 18#include <linux/capability.h>
19#include <linux/cpu.h> 19#include <linux/cpu.h>
20#include <linux/percpu.h> 20#include <linux/percpu.h>
21#include <linux/poll.h>
22#include <linux/thread_info.h>
21#include <linux/ctype.h> 23#include <linux/ctype.h>
22#include <linux/kmod.h> 24#include <linux/kmod.h>
23#include <linux/kdebug.h> 25#include <linux/kdebug.h>
@@ -26,6 +28,7 @@
26#include <asm/mce.h> 28#include <asm/mce.h>
27#include <asm/uaccess.h> 29#include <asm/uaccess.h>
28#include <asm/smp.h> 30#include <asm/smp.h>
31#include <asm/idle.h>
29 32
30#define MISC_MCELOG_MINOR 227 33#define MISC_MCELOG_MINOR 227
31#define NR_BANKS 6 34#define NR_BANKS 6
@@ -34,13 +37,17 @@ atomic_t mce_entry;
34 37
35static int mce_dont_init; 38static int mce_dont_init;
36 39
37/* 0: always panic, 1: panic if deadlock possible, 2: try to avoid panic, 40/*
38 3: never panic or exit (for testing only) */ 41 * Tolerant levels:
42 * 0: always panic on uncorrected errors, log corrected errors
43 * 1: panic or SIGBUS on uncorrected errors, log corrected errors
44 * 2: SIGBUS or log uncorrected errors (if possible), log corrected errors
45 * 3: never panic or SIGBUS, log all errors (for testing only)
46 */
39static int tolerant = 1; 47static int tolerant = 1;
40static int banks; 48static int banks;
41static unsigned long bank[NR_BANKS] = { [0 ... NR_BANKS-1] = ~0UL }; 49static unsigned long bank[NR_BANKS] = { [0 ... NR_BANKS-1] = ~0UL };
42static unsigned long console_logged; 50static unsigned long notify_user;
43static int notify_user;
44static int rip_msr; 51static int rip_msr;
45static int mce_bootlog = 1; 52static int mce_bootlog = 1;
46static atomic_t mce_events; 53static atomic_t mce_events;
@@ -48,6 +55,8 @@ static atomic_t mce_events;
48static char trigger[128]; 55static char trigger[128];
49static char *trigger_argv[2] = { trigger, NULL }; 56static char *trigger_argv[2] = { trigger, NULL };
50 57
58static DECLARE_WAIT_QUEUE_HEAD(mce_wait);
59
51/* 60/*
52 * Lockless MCE logging infrastructure. 61 * Lockless MCE logging infrastructure.
53 * This avoids deadlocks on printk locks without having to break locks. Also 62 * This avoids deadlocks on printk locks without having to break locks. Also
@@ -94,8 +103,7 @@ void mce_log(struct mce *mce)
94 mcelog.entry[entry].finished = 1; 103 mcelog.entry[entry].finished = 1;
95 wmb(); 104 wmb();
96 105
97 if (!test_and_set_bit(0, &console_logged)) 106 set_bit(0, &notify_user);
98 notify_user = 1;
99} 107}
100 108
101static void print_mce(struct mce *m) 109static void print_mce(struct mce *m)
@@ -128,6 +136,7 @@ static void print_mce(struct mce *m)
128static void mce_panic(char *msg, struct mce *backup, unsigned long start) 136static void mce_panic(char *msg, struct mce *backup, unsigned long start)
129{ 137{
130 int i; 138 int i;
139
131 oops_begin(); 140 oops_begin();
132 for (i = 0; i < MCE_LOG_LEN; i++) { 141 for (i = 0; i < MCE_LOG_LEN; i++) {
133 unsigned long tsc = mcelog.entry[i].tsc; 142 unsigned long tsc = mcelog.entry[i].tsc;
@@ -139,10 +148,7 @@ static void mce_panic(char *msg, struct mce *backup, unsigned long start)
139 } 148 }
140 if (backup) 149 if (backup)
141 print_mce(backup); 150 print_mce(backup);
142 if (tolerant >= 3) 151 panic(msg);
143 printk("Fake panic: %s\n", msg);
144 else
145 panic(msg);
146} 152}
147 153
148static int mce_available(struct cpuinfo_x86 *c) 154static int mce_available(struct cpuinfo_x86 *c)
@@ -167,17 +173,6 @@ static inline void mce_get_rip(struct mce *m, struct pt_regs *regs)
167 } 173 }
168} 174}
169 175
170static void do_mce_trigger(void)
171{
172 static atomic_t mce_logged;
173 int events = atomic_read(&mce_events);
174 if (events != atomic_read(&mce_logged) && trigger[0]) {
175 /* Small race window, but should be harmless. */
176 atomic_set(&mce_logged, events);
177 call_usermodehelper(trigger, trigger_argv, NULL, -1);
178 }
179}
180
181/* 176/*
182 * The actual machine check handler 177 * The actual machine check handler
183 */ 178 */
@@ -185,11 +180,19 @@ static void do_mce_trigger(void)
185void do_machine_check(struct pt_regs * regs, long error_code) 180void do_machine_check(struct pt_regs * regs, long error_code)
186{ 181{
187 struct mce m, panicm; 182 struct mce m, panicm;
188 int nowayout = (tolerant < 1);
189 int kill_it = 0;
190 u64 mcestart = 0; 183 u64 mcestart = 0;
191 int i; 184 int i;
192 int panicm_found = 0; 185 int panicm_found = 0;
186 /*
187 * If no_way_out gets set, there is no safe way to recover from this
188 * MCE. If tolerant is cranked up, we'll try anyway.
189 */
190 int no_way_out = 0;
191 /*
192 * If kill_it gets set, there might be a way to recover from this
193 * error.
194 */
195 int kill_it = 0;
193 196
194 atomic_inc(&mce_entry); 197 atomic_inc(&mce_entry);
195 198
@@ -201,8 +204,9 @@ void do_machine_check(struct pt_regs * regs, long error_code)
201 memset(&m, 0, sizeof(struct mce)); 204 memset(&m, 0, sizeof(struct mce));
202 m.cpu = smp_processor_id(); 205 m.cpu = smp_processor_id();
203 rdmsrl(MSR_IA32_MCG_STATUS, m.mcgstatus); 206 rdmsrl(MSR_IA32_MCG_STATUS, m.mcgstatus);
207 /* if the restart IP is not valid, we're done for */
204 if (!(m.mcgstatus & MCG_STATUS_RIPV)) 208 if (!(m.mcgstatus & MCG_STATUS_RIPV))
205 kill_it = 1; 209 no_way_out = 1;
206 210
207 rdtscll(mcestart); 211 rdtscll(mcestart);
208 barrier(); 212 barrier();
@@ -221,10 +225,18 @@ void do_machine_check(struct pt_regs * regs, long error_code)
221 continue; 225 continue;
222 226
223 if (m.status & MCI_STATUS_EN) { 227 if (m.status & MCI_STATUS_EN) {
224 /* In theory _OVER could be a nowayout too, but 228 /* if PCC was set, there's no way out */
225 assume any overflowed errors were no fatal. */ 229 no_way_out |= !!(m.status & MCI_STATUS_PCC);
226 nowayout |= !!(m.status & MCI_STATUS_PCC); 230 /*
227 kill_it |= !!(m.status & MCI_STATUS_UC); 231 * If this error was uncorrectable and there was
232 * an overflow, we're in trouble. If no overflow,
233 * we might get away with just killing a task.
234 */
235 if (m.status & MCI_STATUS_UC) {
236 if (tolerant < 1 || m.status & MCI_STATUS_OVER)
237 no_way_out = 1;
238 kill_it = 1;
239 }
228 } 240 }
229 241
230 if (m.status & MCI_STATUS_MISCV) 242 if (m.status & MCI_STATUS_MISCV)
@@ -235,7 +247,6 @@ void do_machine_check(struct pt_regs * regs, long error_code)
235 mce_get_rip(&m, regs); 247 mce_get_rip(&m, regs);
236 if (error_code >= 0) 248 if (error_code >= 0)
237 rdtscll(m.tsc); 249 rdtscll(m.tsc);
238 wrmsrl(MSR_IA32_MC0_STATUS + i*4, 0);
239 if (error_code != -2) 250 if (error_code != -2)
240 mce_log(&m); 251 mce_log(&m);
241 252
@@ -251,45 +262,59 @@ void do_machine_check(struct pt_regs * regs, long error_code)
251 } 262 }
252 263
253 /* Never do anything final in the polling timer */ 264 /* Never do anything final in the polling timer */
254 if (!regs) { 265 if (!regs)
255 /* Normal interrupt context here. Call trigger for any new
256 events. */
257 do_mce_trigger();
258 goto out; 266 goto out;
259 }
260 267
261 /* If we didn't find an uncorrectable error, pick 268 /* If we didn't find an uncorrectable error, pick
262 the last one (shouldn't happen, just being safe). */ 269 the last one (shouldn't happen, just being safe). */
263 if (!panicm_found) 270 if (!panicm_found)
264 panicm = m; 271 panicm = m;
265 if (nowayout) 272
273 /*
274 * If we have decided that we just CAN'T continue, and the user
275 * has not set tolerant to an insane level, give up and die.
276 */
277 if (no_way_out && tolerant < 3)
266 mce_panic("Machine check", &panicm, mcestart); 278 mce_panic("Machine check", &panicm, mcestart);
267 if (kill_it) { 279
280 /*
281 * If the error seems to be unrecoverable, something should be
282 * done. Try to kill as little as possible. If we can kill just
283 * one task, do that. If the user has set the tolerance very
284 * high, don't try to do anything at all.
285 */
286 if (kill_it && tolerant < 3) {
268 int user_space = 0; 287 int user_space = 0;
269 288
270 if (m.mcgstatus & MCG_STATUS_RIPV) 289 /*
290 * If the EIPV bit is set, it means the saved IP is the
291 * instruction which caused the MCE.
292 */
293 if (m.mcgstatus & MCG_STATUS_EIPV)
271 user_space = panicm.rip && (panicm.cs & 3); 294 user_space = panicm.rip && (panicm.cs & 3);
272 295
273 /* When the machine was in user space and the CPU didn't get 296 /*
274 confused it's normally not necessary to panic, unless you 297 * If we know that the error was in user space, send a
275 are paranoid (tolerant == 0) 298 * SIGBUS. Otherwise, panic if tolerance is low.
276 299 *
277 RED-PEN could be more tolerant for MCEs in idle, 300 * do_exit() takes an awful lot of locks and has a slight
278 but most likely they occur at boot anyways, where 301 * risk of deadlocking.
279 it is best to just halt the machine. */ 302 */
280 if ((!user_space && (panic_on_oops || tolerant < 2)) || 303 if (user_space) {
281 (unsigned)current->pid <= 1)
282 mce_panic("Uncorrected machine check", &panicm, mcestart);
283
284 /* do_exit takes an awful lot of locks and has as
285 slight risk of deadlocking. If you don't want that
286 don't set tolerant >= 2 */
287 if (tolerant < 3)
288 do_exit(SIGBUS); 304 do_exit(SIGBUS);
305 } else if (panic_on_oops || tolerant < 2) {
306 mce_panic("Uncorrected machine check",
307 &panicm, mcestart);
308 }
289 } 309 }
290 310
311 /* notify userspace ASAP */
312 set_thread_flag(TIF_MCE_NOTIFY);
313
291 out: 314 out:
292 /* Last thing done in the machine check exception to clear state. */ 315 /* the last thing we do is clear state */
316 for (i = 0; i < banks; i++)
317 wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0);
293 wrmsrl(MSR_IA32_MCG_STATUS, 0); 318 wrmsrl(MSR_IA32_MCG_STATUS, 0);
294 out2: 319 out2:
295 atomic_dec(&mce_entry); 320 atomic_dec(&mce_entry);
@@ -344,37 +369,69 @@ static void mcheck_timer(struct work_struct *work)
344 on_each_cpu(mcheck_check_cpu, NULL, 1, 1); 369 on_each_cpu(mcheck_check_cpu, NULL, 1, 1);
345 370
346 /* 371 /*
347 * It's ok to read stale data here for notify_user and 372 * Alert userspace if needed. If we logged an MCE, reduce the
348 * console_logged as we'll simply get the updated versions 373 * polling interval, otherwise increase the polling interval.
349 * on the next mcheck_timer execution and atomic operations
350 * on console_logged act as synchronization for notify_user
351 * writes.
352 */ 374 */
353 if (notify_user && console_logged) { 375 if (mce_notify_user()) {
376 next_interval = max(next_interval/2, HZ/100);
377 } else {
378 next_interval = min(next_interval*2,
379 (int)round_jiffies_relative(check_interval*HZ));
380 }
381
382 schedule_delayed_work(&mcheck_work, next_interval);
383}
384
385/*
386 * This is only called from process context. This is where we do
387 * anything we need to alert userspace about new MCEs. This is called
388 * directly from the poller and also from entry.S and idle, thanks to
389 * TIF_MCE_NOTIFY.
390 */
391int mce_notify_user(void)
392{
393 clear_thread_flag(TIF_MCE_NOTIFY);
394 if (test_and_clear_bit(0, &notify_user)) {
354 static unsigned long last_print; 395 static unsigned long last_print;
355 unsigned long now = jiffies; 396 unsigned long now = jiffies;
356 397
357 /* if we logged an MCE, reduce the polling interval */ 398 wake_up_interruptible(&mce_wait);
358 next_interval = max(next_interval/2, HZ/100); 399 if (trigger[0])
359 notify_user = 0; 400 call_usermodehelper(trigger, trigger_argv, NULL,
360 clear_bit(0, &console_logged); 401 UMH_NO_WAIT);
402
361 if (time_after_eq(now, last_print + (check_interval*HZ))) { 403 if (time_after_eq(now, last_print + (check_interval*HZ))) {
362 last_print = now; 404 last_print = now;
363 printk(KERN_INFO "Machine check events logged\n"); 405 printk(KERN_INFO "Machine check events logged\n");
364 } 406 }
365 } else { 407
366 next_interval = min(next_interval*2, check_interval*HZ); 408 return 1;
367 } 409 }
410 return 0;
411}
368 412
369 schedule_delayed_work(&mcheck_work, next_interval); 413/* see if the idle task needs to notify userspace */
414static int
415mce_idle_callback(struct notifier_block *nfb, unsigned long action, void *junk)
416{
417 /* IDLE_END should be safe - interrupts are back on */
418 if (action == IDLE_END && test_thread_flag(TIF_MCE_NOTIFY))
419 mce_notify_user();
420
421 return NOTIFY_OK;
370} 422}
371 423
424static struct notifier_block mce_idle_notifier = {
425 .notifier_call = mce_idle_callback,
426};
372 427
373static __init int periodic_mcheck_init(void) 428static __init int periodic_mcheck_init(void)
374{ 429{
375 next_interval = check_interval * HZ; 430 next_interval = check_interval * HZ;
376 if (next_interval) 431 if (next_interval)
377 schedule_delayed_work(&mcheck_work, next_interval); 432 schedule_delayed_work(&mcheck_work,
433 round_jiffies_relative(next_interval));
434 idle_notifier_register(&mce_idle_notifier);
378 return 0; 435 return 0;
379} 436}
380__initcall(periodic_mcheck_init); 437__initcall(periodic_mcheck_init);
@@ -465,6 +522,40 @@ void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
465 * Character device to read and clear the MCE log. 522 * Character device to read and clear the MCE log.
466 */ 523 */
467 524
525static DEFINE_SPINLOCK(mce_state_lock);
526static int open_count; /* #times opened */
527static int open_exclu; /* already open exclusive? */
528
529static int mce_open(struct inode *inode, struct file *file)
530{
531 spin_lock(&mce_state_lock);
532
533 if (open_exclu || (open_count && (file->f_flags & O_EXCL))) {
534 spin_unlock(&mce_state_lock);
535 return -EBUSY;
536 }
537
538 if (file->f_flags & O_EXCL)
539 open_exclu = 1;
540 open_count++;
541
542 spin_unlock(&mce_state_lock);
543
544 return nonseekable_open(inode, file);
545}
546
547static int mce_release(struct inode *inode, struct file *file)
548{
549 spin_lock(&mce_state_lock);
550
551 open_count--;
552 open_exclu = 0;
553
554 spin_unlock(&mce_state_lock);
555
556 return 0;
557}
558
468static void collect_tscs(void *data) 559static void collect_tscs(void *data)
469{ 560{
470 unsigned long *cpu_tsc = (unsigned long *)data; 561 unsigned long *cpu_tsc = (unsigned long *)data;
@@ -497,15 +588,17 @@ static ssize_t mce_read(struct file *filp, char __user *ubuf, size_t usize, loff
497 for (i = 0; i < next; i++) { 588 for (i = 0; i < next; i++) {
498 unsigned long start = jiffies; 589 unsigned long start = jiffies;
499 while (!mcelog.entry[i].finished) { 590 while (!mcelog.entry[i].finished) {
500 if (!time_before(jiffies, start + 2)) { 591 if (time_after_eq(jiffies, start + 2)) {
501 memset(mcelog.entry + i,0, sizeof(struct mce)); 592 memset(mcelog.entry + i,0, sizeof(struct mce));
502 continue; 593 goto timeout;
503 } 594 }
504 cpu_relax(); 595 cpu_relax();
505 } 596 }
506 smp_rmb(); 597 smp_rmb();
507 err |= copy_to_user(buf, mcelog.entry + i, sizeof(struct mce)); 598 err |= copy_to_user(buf, mcelog.entry + i, sizeof(struct mce));
508 buf += sizeof(struct mce); 599 buf += sizeof(struct mce);
600 timeout:
601 ;
509 } 602 }
510 603
511 memset(mcelog.entry, 0, next * sizeof(struct mce)); 604 memset(mcelog.entry, 0, next * sizeof(struct mce));
@@ -530,6 +623,14 @@ static ssize_t mce_read(struct file *filp, char __user *ubuf, size_t usize, loff
530 return err ? -EFAULT : buf - ubuf; 623 return err ? -EFAULT : buf - ubuf;
531} 624}
532 625
626static unsigned int mce_poll(struct file *file, poll_table *wait)
627{
628 poll_wait(file, &mce_wait, wait);
629 if (rcu_dereference(mcelog.next))
630 return POLLIN | POLLRDNORM;
631 return 0;
632}
633
533static int mce_ioctl(struct inode *i, struct file *f,unsigned int cmd, unsigned long arg) 634static int mce_ioctl(struct inode *i, struct file *f,unsigned int cmd, unsigned long arg)
534{ 635{
535 int __user *p = (int __user *)arg; 636 int __user *p = (int __user *)arg;
@@ -553,7 +654,10 @@ static int mce_ioctl(struct inode *i, struct file *f,unsigned int cmd, unsigned
553} 654}
554 655
555static const struct file_operations mce_chrdev_ops = { 656static const struct file_operations mce_chrdev_ops = {
657 .open = mce_open,
658 .release = mce_release,
556 .read = mce_read, 659 .read = mce_read,
660 .poll = mce_poll,
557 .ioctl = mce_ioctl, 661 .ioctl = mce_ioctl,
558}; 662};
559 663
@@ -618,7 +722,8 @@ static void mce_restart(void)
618 on_each_cpu(mce_init, NULL, 1, 1); 722 on_each_cpu(mce_init, NULL, 1, 1);
619 next_interval = check_interval * HZ; 723 next_interval = check_interval * HZ;
620 if (next_interval) 724 if (next_interval)
621 schedule_delayed_work(&mcheck_work, next_interval); 725 schedule_delayed_work(&mcheck_work,
726 round_jiffies_relative(next_interval));
622} 727}
623 728
624static struct sysdev_class mce_sysclass = { 729static struct sysdev_class mce_sysclass = {
diff --git a/arch/x86_64/kernel/mce_amd.c b/arch/x86_64/kernel/mce_amd.c
index 03356e64f9c8..2f8a7f18b0fe 100644
--- a/arch/x86_64/kernel/mce_amd.c
+++ b/arch/x86_64/kernel/mce_amd.c
@@ -157,9 +157,9 @@ void __cpuinit mce_amd_feature_init(struct cpuinfo_x86 *c)
157 high |= K8_APIC_EXT_LVT_ENTRY_THRESHOLD << 20; 157 high |= K8_APIC_EXT_LVT_ENTRY_THRESHOLD << 20;
158 wrmsr(address, low, high); 158 wrmsr(address, low, high);
159 159
160 setup_APIC_extened_lvt(K8_APIC_EXT_LVT_ENTRY_THRESHOLD, 160 setup_APIC_extended_lvt(K8_APIC_EXT_LVT_ENTRY_THRESHOLD,
161 THRESHOLD_APIC_VECTOR, 161 THRESHOLD_APIC_VECTOR,
162 K8_APIC_EXT_INT_MSG_FIX, 0); 162 K8_APIC_EXT_INT_MSG_FIX, 0);
163 163
164 threshold_defaults.address = address; 164 threshold_defaults.address = address;
165 threshold_restart_bank(&threshold_defaults, 0, 0); 165 threshold_restart_bank(&threshold_defaults, 0, 0);
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c
index 61ae57eb9e4c..8bf0ca03ac8e 100644
--- a/arch/x86_64/kernel/mpparse.c
+++ b/arch/x86_64/kernel/mpparse.c
@@ -32,7 +32,6 @@
32 32
33/* Have we found an MP table */ 33/* Have we found an MP table */
34int smp_found_config; 34int smp_found_config;
35unsigned int __initdata maxcpus = NR_CPUS;
36 35
37/* 36/*
38 * Various Linux-internal data structures created from the 37 * Various Linux-internal data structures created from the
@@ -649,6 +648,20 @@ static int mp_find_ioapic(int gsi)
649 return -1; 648 return -1;
650} 649}
651 650
651static u8 uniq_ioapic_id(u8 id)
652{
653 int i;
654 DECLARE_BITMAP(used, 256);
655 bitmap_zero(used, 256);
656 for (i = 0; i < nr_ioapics; i++) {
657 struct mpc_config_ioapic *ia = &mp_ioapics[i];
658 __set_bit(ia->mpc_apicid, used);
659 }
660 if (!test_bit(id, used))
661 return id;
662 return find_first_zero_bit(used, 256);
663}
664
652void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base) 665void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base)
653{ 666{
654 int idx = 0; 667 int idx = 0;
@@ -656,14 +669,14 @@ void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base)
656 if (bad_ioapic(address)) 669 if (bad_ioapic(address))
657 return; 670 return;
658 671
659 idx = nr_ioapics++; 672 idx = nr_ioapics;
660 673
661 mp_ioapics[idx].mpc_type = MP_IOAPIC; 674 mp_ioapics[idx].mpc_type = MP_IOAPIC;
662 mp_ioapics[idx].mpc_flags = MPC_APIC_USABLE; 675 mp_ioapics[idx].mpc_flags = MPC_APIC_USABLE;
663 mp_ioapics[idx].mpc_apicaddr = address; 676 mp_ioapics[idx].mpc_apicaddr = address;
664 677
665 set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); 678 set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address);
666 mp_ioapics[idx].mpc_apicid = id; 679 mp_ioapics[idx].mpc_apicid = uniq_ioapic_id(id);
667 mp_ioapics[idx].mpc_apicver = 0; 680 mp_ioapics[idx].mpc_apicver = 0;
668 681
669 /* 682 /*
@@ -680,6 +693,8 @@ void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base)
680 mp_ioapics[idx].mpc_apicaddr, 693 mp_ioapics[idx].mpc_apicaddr,
681 mp_ioapic_routing[idx].gsi_start, 694 mp_ioapic_routing[idx].gsi_start,
682 mp_ioapic_routing[idx].gsi_end); 695 mp_ioapic_routing[idx].gsi_end);
696
697 nr_ioapics++;
683} 698}
684 699
685void __init 700void __init
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c
index 931c64bad5e6..edbbc59b7523 100644
--- a/arch/x86_64/kernel/nmi.c
+++ b/arch/x86_64/kernel/nmi.c
@@ -296,7 +296,7 @@ static DEFINE_PER_CPU(unsigned, last_irq_sum);
296static DEFINE_PER_CPU(local_t, alert_counter); 296static DEFINE_PER_CPU(local_t, alert_counter);
297static DEFINE_PER_CPU(int, nmi_touch); 297static DEFINE_PER_CPU(int, nmi_touch);
298 298
299void touch_nmi_watchdog (void) 299void touch_nmi_watchdog(void)
300{ 300{
301 if (nmi_watchdog > 0) { 301 if (nmi_watchdog > 0) {
302 unsigned cpu; 302 unsigned cpu;
@@ -306,8 +306,10 @@ void touch_nmi_watchdog (void)
306 * do it ourselves because the alert count increase is not 306 * do it ourselves because the alert count increase is not
307 * atomic. 307 * atomic.
308 */ 308 */
309 for_each_present_cpu (cpu) 309 for_each_present_cpu(cpu) {
310 per_cpu(nmi_touch, cpu) = 1; 310 if (per_cpu(nmi_touch, cpu) != 1)
311 per_cpu(nmi_touch, cpu) = 1;
312 }
311 } 313 }
312 314
313 touch_softlockup_watchdog(); 315 touch_softlockup_watchdog();
diff --git a/arch/x86_64/kernel/pci-calgary.c b/arch/x86_64/kernel/pci-calgary.c
index 5bd20b542c1e..ba16c968ca3f 100644
--- a/arch/x86_64/kernel/pci-calgary.c
+++ b/arch/x86_64/kernel/pci-calgary.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Derived from arch/powerpc/kernel/iommu.c 2 * Derived from arch/powerpc/kernel/iommu.c
3 * 3 *
4 * Copyright (C) IBM Corporation, 2006 4 * Copyright IBM Corporation, 2006-2007
5 * Copyright (C) 2006 Jon Mason <jdmason@kudzu.us> 5 * Copyright (C) 2006 Jon Mason <jdmason@kudzu.us>
6 * 6 *
7 * Author: Jon Mason <jdmason@kudzu.us> 7 * Author: Jon Mason <jdmason@kudzu.us>
@@ -35,7 +35,7 @@
35#include <linux/pci_ids.h> 35#include <linux/pci_ids.h>
36#include <linux/pci.h> 36#include <linux/pci.h>
37#include <linux/delay.h> 37#include <linux/delay.h>
38#include <asm/proto.h> 38#include <asm/iommu.h>
39#include <asm/calgary.h> 39#include <asm/calgary.h>
40#include <asm/tce.h> 40#include <asm/tce.h>
41#include <asm/pci-direct.h> 41#include <asm/pci-direct.h>
@@ -50,13 +50,7 @@ int use_calgary __read_mostly = 0;
50#endif /* CONFIG_CALGARY_DEFAULT_ENABLED */ 50#endif /* CONFIG_CALGARY_DEFAULT_ENABLED */
51 51
52#define PCI_DEVICE_ID_IBM_CALGARY 0x02a1 52#define PCI_DEVICE_ID_IBM_CALGARY 0x02a1
53#define PCI_VENDOR_DEVICE_ID_CALGARY \ 53#define PCI_DEVICE_ID_IBM_CALIOC2 0x0308
54 (PCI_VENDOR_ID_IBM | PCI_DEVICE_ID_IBM_CALGARY << 16)
55
56/* we need these for register space address calculation */
57#define START_ADDRESS 0xfe000000
58#define CHASSIS_BASE 0
59#define ONE_BASED_CHASSIS_NUM 1
60 54
61/* register offsets inside the host bridge space */ 55/* register offsets inside the host bridge space */
62#define CALGARY_CONFIG_REG 0x0108 56#define CALGARY_CONFIG_REG 0x0108
@@ -80,6 +74,12 @@ int use_calgary __read_mostly = 0;
80#define PHB_MEM_2_SIZE_LOW 0x02E0 74#define PHB_MEM_2_SIZE_LOW 0x02E0
81#define PHB_DOSHOLE_OFFSET 0x08E0 75#define PHB_DOSHOLE_OFFSET 0x08E0
82 76
77/* CalIOC2 specific */
78#define PHB_SAVIOR_L2 0x0DB0
79#define PHB_PAGE_MIG_CTRL 0x0DA8
80#define PHB_PAGE_MIG_DEBUG 0x0DA0
81#define PHB_ROOT_COMPLEX_STATUS 0x0CB0
82
83/* PHB_CONFIG_RW */ 83/* PHB_CONFIG_RW */
84#define PHB_TCE_ENABLE 0x20000000 84#define PHB_TCE_ENABLE 0x20000000
85#define PHB_SLOT_DISABLE 0x1C000000 85#define PHB_SLOT_DISABLE 0x1C000000
@@ -92,7 +92,11 @@ int use_calgary __read_mostly = 0;
92/* CSR (Channel/DMA Status Register) */ 92/* CSR (Channel/DMA Status Register) */
93#define CSR_AGENT_MASK 0xffe0ffff 93#define CSR_AGENT_MASK 0xffe0ffff
94/* CCR (Calgary Configuration Register) */ 94/* CCR (Calgary Configuration Register) */
95#define CCR_2SEC_TIMEOUT 0x000000000000000EUL 95#define CCR_2SEC_TIMEOUT 0x000000000000000EUL
96/* PMCR/PMDR (Page Migration Control/Debug Registers */
97#define PMR_SOFTSTOP 0x80000000
98#define PMR_SOFTSTOPFAULT 0x40000000
99#define PMR_HARDSTOP 0x20000000
96 100
97#define MAX_NUM_OF_PHBS 8 /* how many PHBs in total? */ 101#define MAX_NUM_OF_PHBS 8 /* how many PHBs in total? */
98#define MAX_NUM_CHASSIS 8 /* max number of chassis */ 102#define MAX_NUM_CHASSIS 8 /* max number of chassis */
@@ -155,9 +159,26 @@ struct calgary_bus_info {
155 void __iomem *bbar; 159 void __iomem *bbar;
156}; 160};
157 161
158static struct calgary_bus_info bus_info[MAX_PHB_BUS_NUM] = { { NULL, 0, 0 }, }; 162static void calgary_handle_quirks(struct iommu_table *tbl, struct pci_dev *dev);
163static void calgary_tce_cache_blast(struct iommu_table *tbl);
164static void calgary_dump_error_regs(struct iommu_table *tbl);
165static void calioc2_handle_quirks(struct iommu_table *tbl, struct pci_dev *dev);
166static void calioc2_tce_cache_blast(struct iommu_table *tbl);
167static void calioc2_dump_error_regs(struct iommu_table *tbl);
168
169static struct cal_chipset_ops calgary_chip_ops = {
170 .handle_quirks = calgary_handle_quirks,
171 .tce_cache_blast = calgary_tce_cache_blast,
172 .dump_error_regs = calgary_dump_error_regs
173};
159 174
160static void tce_cache_blast(struct iommu_table *tbl); 175static struct cal_chipset_ops calioc2_chip_ops = {
176 .handle_quirks = calioc2_handle_quirks,
177 .tce_cache_blast = calioc2_tce_cache_blast,
178 .dump_error_regs = calioc2_dump_error_regs
179};
180
181static struct calgary_bus_info bus_info[MAX_PHB_BUS_NUM] = { { NULL, 0, 0 }, };
161 182
162/* enable this to stress test the chip's TCE cache */ 183/* enable this to stress test the chip's TCE cache */
163#ifdef CONFIG_IOMMU_DEBUG 184#ifdef CONFIG_IOMMU_DEBUG
@@ -187,6 +208,7 @@ static inline unsigned long verify_bit_range(unsigned long* bitmap,
187{ 208{
188 return ~0UL; 209 return ~0UL;
189} 210}
211
190#endif /* CONFIG_IOMMU_DEBUG */ 212#endif /* CONFIG_IOMMU_DEBUG */
191 213
192static inline unsigned int num_dma_pages(unsigned long dma, unsigned int dmalen) 214static inline unsigned int num_dma_pages(unsigned long dma, unsigned int dmalen)
@@ -206,11 +228,12 @@ static inline int translate_phb(struct pci_dev* dev)
206} 228}
207 229
208static void iommu_range_reserve(struct iommu_table *tbl, 230static void iommu_range_reserve(struct iommu_table *tbl,
209 unsigned long start_addr, unsigned int npages) 231 unsigned long start_addr, unsigned int npages)
210{ 232{
211 unsigned long index; 233 unsigned long index;
212 unsigned long end; 234 unsigned long end;
213 unsigned long badbit; 235 unsigned long badbit;
236 unsigned long flags;
214 237
215 index = start_addr >> PAGE_SHIFT; 238 index = start_addr >> PAGE_SHIFT;
216 239
@@ -222,6 +245,8 @@ static void iommu_range_reserve(struct iommu_table *tbl,
222 if (end > tbl->it_size) /* don't go off the table */ 245 if (end > tbl->it_size) /* don't go off the table */
223 end = tbl->it_size; 246 end = tbl->it_size;
224 247
248 spin_lock_irqsave(&tbl->it_lock, flags);
249
225 badbit = verify_bit_range(tbl->it_map, 0, index, end); 250 badbit = verify_bit_range(tbl->it_map, 0, index, end);
226 if (badbit != ~0UL) { 251 if (badbit != ~0UL) {
227 if (printk_ratelimit()) 252 if (printk_ratelimit())
@@ -231,23 +256,29 @@ static void iommu_range_reserve(struct iommu_table *tbl,
231 } 256 }
232 257
233 set_bit_string(tbl->it_map, index, npages); 258 set_bit_string(tbl->it_map, index, npages);
259
260 spin_unlock_irqrestore(&tbl->it_lock, flags);
234} 261}
235 262
236static unsigned long iommu_range_alloc(struct iommu_table *tbl, 263static unsigned long iommu_range_alloc(struct iommu_table *tbl,
237 unsigned int npages) 264 unsigned int npages)
238{ 265{
266 unsigned long flags;
239 unsigned long offset; 267 unsigned long offset;
240 268
241 BUG_ON(npages == 0); 269 BUG_ON(npages == 0);
242 270
271 spin_lock_irqsave(&tbl->it_lock, flags);
272
243 offset = find_next_zero_string(tbl->it_map, tbl->it_hint, 273 offset = find_next_zero_string(tbl->it_map, tbl->it_hint,
244 tbl->it_size, npages); 274 tbl->it_size, npages);
245 if (offset == ~0UL) { 275 if (offset == ~0UL) {
246 tce_cache_blast(tbl); 276 tbl->chip_ops->tce_cache_blast(tbl);
247 offset = find_next_zero_string(tbl->it_map, 0, 277 offset = find_next_zero_string(tbl->it_map, 0,
248 tbl->it_size, npages); 278 tbl->it_size, npages);
249 if (offset == ~0UL) { 279 if (offset == ~0UL) {
250 printk(KERN_WARNING "Calgary: IOMMU full.\n"); 280 printk(KERN_WARNING "Calgary: IOMMU full.\n");
281 spin_unlock_irqrestore(&tbl->it_lock, flags);
251 if (panic_on_overflow) 282 if (panic_on_overflow)
252 panic("Calgary: fix the allocator.\n"); 283 panic("Calgary: fix the allocator.\n");
253 else 284 else
@@ -259,17 +290,17 @@ static unsigned long iommu_range_alloc(struct iommu_table *tbl,
259 tbl->it_hint = offset + npages; 290 tbl->it_hint = offset + npages;
260 BUG_ON(tbl->it_hint > tbl->it_size); 291 BUG_ON(tbl->it_hint > tbl->it_size);
261 292
293 spin_unlock_irqrestore(&tbl->it_lock, flags);
294
262 return offset; 295 return offset;
263} 296}
264 297
265static dma_addr_t iommu_alloc(struct iommu_table *tbl, void *vaddr, 298static dma_addr_t iommu_alloc(struct iommu_table *tbl, void *vaddr,
266 unsigned int npages, int direction) 299 unsigned int npages, int direction)
267{ 300{
268 unsigned long entry, flags; 301 unsigned long entry;
269 dma_addr_t ret = bad_dma_address; 302 dma_addr_t ret = bad_dma_address;
270 303
271 spin_lock_irqsave(&tbl->it_lock, flags);
272
273 entry = iommu_range_alloc(tbl, npages); 304 entry = iommu_range_alloc(tbl, npages);
274 305
275 if (unlikely(entry == bad_dma_address)) 306 if (unlikely(entry == bad_dma_address))
@@ -282,23 +313,21 @@ static dma_addr_t iommu_alloc(struct iommu_table *tbl, void *vaddr,
282 tce_build(tbl, entry, npages, (unsigned long)vaddr & PAGE_MASK, 313 tce_build(tbl, entry, npages, (unsigned long)vaddr & PAGE_MASK,
283 direction); 314 direction);
284 315
285 spin_unlock_irqrestore(&tbl->it_lock, flags);
286
287 return ret; 316 return ret;
288 317
289error: 318error:
290 spin_unlock_irqrestore(&tbl->it_lock, flags);
291 printk(KERN_WARNING "Calgary: failed to allocate %u pages in " 319 printk(KERN_WARNING "Calgary: failed to allocate %u pages in "
292 "iommu %p\n", npages, tbl); 320 "iommu %p\n", npages, tbl);
293 return bad_dma_address; 321 return bad_dma_address;
294} 322}
295 323
296static void __iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, 324static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,
297 unsigned int npages) 325 unsigned int npages)
298{ 326{
299 unsigned long entry; 327 unsigned long entry;
300 unsigned long badbit; 328 unsigned long badbit;
301 unsigned long badend; 329 unsigned long badend;
330 unsigned long flags;
302 331
303 /* were we called with bad_dma_address? */ 332 /* were we called with bad_dma_address? */
304 badend = bad_dma_address + (EMERGENCY_PAGES * PAGE_SIZE); 333 badend = bad_dma_address + (EMERGENCY_PAGES * PAGE_SIZE);
@@ -315,6 +344,8 @@ static void __iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,
315 344
316 tce_free(tbl, entry, npages); 345 tce_free(tbl, entry, npages);
317 346
347 spin_lock_irqsave(&tbl->it_lock, flags);
348
318 badbit = verify_bit_range(tbl->it_map, 1, entry, entry + npages); 349 badbit = verify_bit_range(tbl->it_map, 1, entry, entry + npages);
319 if (badbit != ~0UL) { 350 if (badbit != ~0UL) {
320 if (printk_ratelimit()) 351 if (printk_ratelimit())
@@ -324,23 +355,40 @@ static void __iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,
324 } 355 }
325 356
326 __clear_bit_string(tbl->it_map, entry, npages); 357 __clear_bit_string(tbl->it_map, entry, npages);
358
359 spin_unlock_irqrestore(&tbl->it_lock, flags);
327} 360}
328 361
329static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, 362static inline struct iommu_table *find_iommu_table(struct device *dev)
330 unsigned int npages)
331{ 363{
332 unsigned long flags; 364 struct pci_dev *pdev;
365 struct pci_bus *pbus;
366 struct iommu_table *tbl;
333 367
334 spin_lock_irqsave(&tbl->it_lock, flags); 368 pdev = to_pci_dev(dev);
335 369
336 __iommu_free(tbl, dma_addr, npages); 370 /* is the device behind a bridge? */
371 if (unlikely(pdev->bus->parent))
372 pbus = pdev->bus->parent;
373 else
374 pbus = pdev->bus;
337 375
338 spin_unlock_irqrestore(&tbl->it_lock, flags); 376 tbl = pci_iommu(pbus);
377
378 BUG_ON(pdev->bus->parent &&
379 (tbl->it_busno != pdev->bus->parent->number));
380
381 return tbl;
339} 382}
340 383
341static void __calgary_unmap_sg(struct iommu_table *tbl, 384static void calgary_unmap_sg(struct device *dev,
342 struct scatterlist *sglist, int nelems, int direction) 385 struct scatterlist *sglist, int nelems, int direction)
343{ 386{
387 struct iommu_table *tbl = find_iommu_table(dev);
388
389 if (!translate_phb(to_pci_dev(dev)))
390 return;
391
344 while (nelems--) { 392 while (nelems--) {
345 unsigned int npages; 393 unsigned int npages;
346 dma_addr_t dma = sglist->dma_address; 394 dma_addr_t dma = sglist->dma_address;
@@ -350,33 +398,17 @@ static void __calgary_unmap_sg(struct iommu_table *tbl,
350 break; 398 break;
351 399
352 npages = num_dma_pages(dma, dmalen); 400 npages = num_dma_pages(dma, dmalen);
353 __iommu_free(tbl, dma, npages); 401 iommu_free(tbl, dma, npages);
354 sglist++; 402 sglist++;
355 } 403 }
356} 404}
357 405
358void calgary_unmap_sg(struct device *dev, struct scatterlist *sglist,
359 int nelems, int direction)
360{
361 unsigned long flags;
362 struct iommu_table *tbl = to_pci_dev(dev)->bus->self->sysdata;
363
364 if (!translate_phb(to_pci_dev(dev)))
365 return;
366
367 spin_lock_irqsave(&tbl->it_lock, flags);
368
369 __calgary_unmap_sg(tbl, sglist, nelems, direction);
370
371 spin_unlock_irqrestore(&tbl->it_lock, flags);
372}
373
374static int calgary_nontranslate_map_sg(struct device* dev, 406static int calgary_nontranslate_map_sg(struct device* dev,
375 struct scatterlist *sg, int nelems, int direction) 407 struct scatterlist *sg, int nelems, int direction)
376{ 408{
377 int i; 409 int i;
378 410
379 for (i = 0; i < nelems; i++ ) { 411 for (i = 0; i < nelems; i++ ) {
380 struct scatterlist *s = &sg[i]; 412 struct scatterlist *s = &sg[i];
381 BUG_ON(!s->page); 413 BUG_ON(!s->page);
382 s->dma_address = virt_to_bus(page_address(s->page) +s->offset); 414 s->dma_address = virt_to_bus(page_address(s->page) +s->offset);
@@ -385,11 +417,10 @@ static int calgary_nontranslate_map_sg(struct device* dev,
385 return nelems; 417 return nelems;
386} 418}
387 419
388int calgary_map_sg(struct device *dev, struct scatterlist *sg, 420static int calgary_map_sg(struct device *dev, struct scatterlist *sg,
389 int nelems, int direction) 421 int nelems, int direction)
390{ 422{
391 struct iommu_table *tbl = to_pci_dev(dev)->bus->self->sysdata; 423 struct iommu_table *tbl = find_iommu_table(dev);
392 unsigned long flags;
393 unsigned long vaddr; 424 unsigned long vaddr;
394 unsigned int npages; 425 unsigned int npages;
395 unsigned long entry; 426 unsigned long entry;
@@ -398,8 +429,6 @@ int calgary_map_sg(struct device *dev, struct scatterlist *sg,
398 if (!translate_phb(to_pci_dev(dev))) 429 if (!translate_phb(to_pci_dev(dev)))
399 return calgary_nontranslate_map_sg(dev, sg, nelems, direction); 430 return calgary_nontranslate_map_sg(dev, sg, nelems, direction);
400 431
401 spin_lock_irqsave(&tbl->it_lock, flags);
402
403 for (i = 0; i < nelems; i++ ) { 432 for (i = 0; i < nelems; i++ ) {
404 struct scatterlist *s = &sg[i]; 433 struct scatterlist *s = &sg[i];
405 BUG_ON(!s->page); 434 BUG_ON(!s->page);
@@ -423,26 +452,23 @@ int calgary_map_sg(struct device *dev, struct scatterlist *sg,
423 s->dma_length = s->length; 452 s->dma_length = s->length;
424 } 453 }
425 454
426 spin_unlock_irqrestore(&tbl->it_lock, flags);
427
428 return nelems; 455 return nelems;
429error: 456error:
430 __calgary_unmap_sg(tbl, sg, nelems, direction); 457 calgary_unmap_sg(dev, sg, nelems, direction);
431 for (i = 0; i < nelems; i++) { 458 for (i = 0; i < nelems; i++) {
432 sg[i].dma_address = bad_dma_address; 459 sg[i].dma_address = bad_dma_address;
433 sg[i].dma_length = 0; 460 sg[i].dma_length = 0;
434 } 461 }
435 spin_unlock_irqrestore(&tbl->it_lock, flags);
436 return 0; 462 return 0;
437} 463}
438 464
439dma_addr_t calgary_map_single(struct device *dev, void *vaddr, 465static dma_addr_t calgary_map_single(struct device *dev, void *vaddr,
440 size_t size, int direction) 466 size_t size, int direction)
441{ 467{
442 dma_addr_t dma_handle = bad_dma_address; 468 dma_addr_t dma_handle = bad_dma_address;
443 unsigned long uaddr; 469 unsigned long uaddr;
444 unsigned int npages; 470 unsigned int npages;
445 struct iommu_table *tbl = to_pci_dev(dev)->bus->self->sysdata; 471 struct iommu_table *tbl = find_iommu_table(dev);
446 472
447 uaddr = (unsigned long)vaddr; 473 uaddr = (unsigned long)vaddr;
448 npages = num_dma_pages(uaddr, size); 474 npages = num_dma_pages(uaddr, size);
@@ -455,10 +481,10 @@ dma_addr_t calgary_map_single(struct device *dev, void *vaddr,
455 return dma_handle; 481 return dma_handle;
456} 482}
457 483
458void calgary_unmap_single(struct device *dev, dma_addr_t dma_handle, 484static void calgary_unmap_single(struct device *dev, dma_addr_t dma_handle,
459 size_t size, int direction) 485 size_t size, int direction)
460{ 486{
461 struct iommu_table *tbl = to_pci_dev(dev)->bus->self->sysdata; 487 struct iommu_table *tbl = find_iommu_table(dev);
462 unsigned int npages; 488 unsigned int npages;
463 489
464 if (!translate_phb(to_pci_dev(dev))) 490 if (!translate_phb(to_pci_dev(dev)))
@@ -468,15 +494,13 @@ void calgary_unmap_single(struct device *dev, dma_addr_t dma_handle,
468 iommu_free(tbl, dma_handle, npages); 494 iommu_free(tbl, dma_handle, npages);
469} 495}
470 496
471void* calgary_alloc_coherent(struct device *dev, size_t size, 497static void* calgary_alloc_coherent(struct device *dev, size_t size,
472 dma_addr_t *dma_handle, gfp_t flag) 498 dma_addr_t *dma_handle, gfp_t flag)
473{ 499{
474 void *ret = NULL; 500 void *ret = NULL;
475 dma_addr_t mapping; 501 dma_addr_t mapping;
476 unsigned int npages, order; 502 unsigned int npages, order;
477 struct iommu_table *tbl; 503 struct iommu_table *tbl = find_iommu_table(dev);
478
479 tbl = to_pci_dev(dev)->bus->self->sysdata;
480 504
481 size = PAGE_ALIGN(size); /* size rounded up to full pages */ 505 size = PAGE_ALIGN(size); /* size rounded up to full pages */
482 npages = size >> PAGE_SHIFT; 506 npages = size >> PAGE_SHIFT;
@@ -552,7 +576,22 @@ static inline void __iomem* calgary_reg(void __iomem *bar, unsigned long offset)
552 return (void __iomem*)target; 576 return (void __iomem*)target;
553} 577}
554 578
555static void tce_cache_blast(struct iommu_table *tbl) 579static inline int is_calioc2(unsigned short device)
580{
581 return (device == PCI_DEVICE_ID_IBM_CALIOC2);
582}
583
584static inline int is_calgary(unsigned short device)
585{
586 return (device == PCI_DEVICE_ID_IBM_CALGARY);
587}
588
589static inline int is_cal_pci_dev(unsigned short device)
590{
591 return (is_calgary(device) || is_calioc2(device));
592}
593
594static void calgary_tce_cache_blast(struct iommu_table *tbl)
556{ 595{
557 u64 val; 596 u64 val;
558 u32 aer; 597 u32 aer;
@@ -589,6 +628,85 @@ static void tce_cache_blast(struct iommu_table *tbl)
589 (void)readl(target); /* flush */ 628 (void)readl(target); /* flush */
590} 629}
591 630
631static void calioc2_tce_cache_blast(struct iommu_table *tbl)
632{
633 void __iomem *bbar = tbl->bbar;
634 void __iomem *target;
635 u64 val64;
636 u32 val;
637 int i = 0;
638 int count = 1;
639 unsigned char bus = tbl->it_busno;
640
641begin:
642 printk(KERN_DEBUG "Calgary: CalIOC2 bus 0x%x entering tce cache blast "
643 "sequence - count %d\n", bus, count);
644
645 /* 1. using the Page Migration Control reg set SoftStop */
646 target = calgary_reg(bbar, phb_offset(bus) | PHB_PAGE_MIG_CTRL);
647 val = be32_to_cpu(readl(target));
648 printk(KERN_DEBUG "1a. read 0x%x [LE] from %p\n", val, target);
649 val |= PMR_SOFTSTOP;
650 printk(KERN_DEBUG "1b. writing 0x%x [LE] to %p\n", val, target);
651 writel(cpu_to_be32(val), target);
652
653 /* 2. poll split queues until all DMA activity is done */
654 printk(KERN_DEBUG "2a. starting to poll split queues\n");
655 target = calgary_reg(bbar, split_queue_offset(bus));
656 do {
657 val64 = readq(target);
658 i++;
659 } while ((val64 & 0xff) != 0xff && i < 100);
660 if (i == 100)
661 printk(KERN_WARNING "CalIOC2: PCI bus not quiesced, "
662 "continuing anyway\n");
663
664 /* 3. poll Page Migration DEBUG for SoftStopFault */
665 target = calgary_reg(bbar, phb_offset(bus) | PHB_PAGE_MIG_DEBUG);
666 val = be32_to_cpu(readl(target));
667 printk(KERN_DEBUG "3. read 0x%x [LE] from %p\n", val, target);
668
669 /* 4. if SoftStopFault - goto (1) */
670 if (val & PMR_SOFTSTOPFAULT) {
671 if (++count < 100)
672 goto begin;
673 else {
674 printk(KERN_WARNING "CalIOC2: too many SoftStopFaults, "
675 "aborting TCE cache flush sequence!\n");
676 return; /* pray for the best */
677 }
678 }
679
680 /* 5. Slam into HardStop by reading PHB_PAGE_MIG_CTRL */
681 target = calgary_reg(bbar, phb_offset(bus) | PHB_PAGE_MIG_CTRL);
682 printk(KERN_DEBUG "5a. slamming into HardStop by reading %p\n", target);
683 val = be32_to_cpu(readl(target));
684 printk(KERN_DEBUG "5b. read 0x%x [LE] from %p\n", val, target);
685 target = calgary_reg(bbar, phb_offset(bus) | PHB_PAGE_MIG_DEBUG);
686 val = be32_to_cpu(readl(target));
687 printk(KERN_DEBUG "5c. read 0x%x [LE] from %p (debug)\n", val, target);
688
689 /* 6. invalidate TCE cache */
690 printk(KERN_DEBUG "6. invalidating TCE cache\n");
691 target = calgary_reg(bbar, tar_offset(bus));
692 writeq(tbl->tar_val, target);
693
694 /* 7. Re-read PMCR */
695 printk(KERN_DEBUG "7a. Re-reading PMCR\n");
696 target = calgary_reg(bbar, phb_offset(bus) | PHB_PAGE_MIG_CTRL);
697 val = be32_to_cpu(readl(target));
698 printk(KERN_DEBUG "7b. read 0x%x [LE] from %p\n", val, target);
699
700 /* 8. Remove HardStop */
701 printk(KERN_DEBUG "8a. removing HardStop from PMCR\n");
702 target = calgary_reg(bbar, phb_offset(bus) | PHB_PAGE_MIG_CTRL);
703 val = 0;
704 printk(KERN_DEBUG "8b. writing 0x%x [LE] to %p\n", val, target);
705 writel(cpu_to_be32(val), target);
706 val = be32_to_cpu(readl(target));
707 printk(KERN_DEBUG "8c. read 0x%x [LE] from %p\n", val, target);
708}
709
592static void __init calgary_reserve_mem_region(struct pci_dev *dev, u64 start, 710static void __init calgary_reserve_mem_region(struct pci_dev *dev, u64 start,
593 u64 limit) 711 u64 limit)
594{ 712{
@@ -598,7 +716,7 @@ static void __init calgary_reserve_mem_region(struct pci_dev *dev, u64 start,
598 limit++; 716 limit++;
599 717
600 numpages = ((limit - start) >> PAGE_SHIFT); 718 numpages = ((limit - start) >> PAGE_SHIFT);
601 iommu_range_reserve(dev->sysdata, start, numpages); 719 iommu_range_reserve(pci_iommu(dev->bus), start, numpages);
602} 720}
603 721
604static void __init calgary_reserve_peripheral_mem_1(struct pci_dev *dev) 722static void __init calgary_reserve_peripheral_mem_1(struct pci_dev *dev)
@@ -606,7 +724,7 @@ static void __init calgary_reserve_peripheral_mem_1(struct pci_dev *dev)
606 void __iomem *target; 724 void __iomem *target;
607 u64 low, high, sizelow; 725 u64 low, high, sizelow;
608 u64 start, limit; 726 u64 start, limit;
609 struct iommu_table *tbl = dev->sysdata; 727 struct iommu_table *tbl = pci_iommu(dev->bus);
610 unsigned char busnum = dev->bus->number; 728 unsigned char busnum = dev->bus->number;
611 void __iomem *bbar = tbl->bbar; 729 void __iomem *bbar = tbl->bbar;
612 730
@@ -630,7 +748,7 @@ static void __init calgary_reserve_peripheral_mem_2(struct pci_dev *dev)
630 u32 val32; 748 u32 val32;
631 u64 low, high, sizelow, sizehigh; 749 u64 low, high, sizelow, sizehigh;
632 u64 start, limit; 750 u64 start, limit;
633 struct iommu_table *tbl = dev->sysdata; 751 struct iommu_table *tbl = pci_iommu(dev->bus);
634 unsigned char busnum = dev->bus->number; 752 unsigned char busnum = dev->bus->number;
635 void __iomem *bbar = tbl->bbar; 753 void __iomem *bbar = tbl->bbar;
636 754
@@ -666,14 +784,20 @@ static void __init calgary_reserve_regions(struct pci_dev *dev)
666{ 784{
667 unsigned int npages; 785 unsigned int npages;
668 u64 start; 786 u64 start;
669 struct iommu_table *tbl = dev->sysdata; 787 struct iommu_table *tbl = pci_iommu(dev->bus);
670 788
671 /* reserve EMERGENCY_PAGES from bad_dma_address and up */ 789 /* reserve EMERGENCY_PAGES from bad_dma_address and up */
672 iommu_range_reserve(tbl, bad_dma_address, EMERGENCY_PAGES); 790 iommu_range_reserve(tbl, bad_dma_address, EMERGENCY_PAGES);
673 791
674 /* avoid the BIOS/VGA first 640KB-1MB region */ 792 /* avoid the BIOS/VGA first 640KB-1MB region */
675 start = (640 * 1024); 793 /* for CalIOC2 - avoid the entire first MB */
676 npages = ((1024 - 640) * 1024) >> PAGE_SHIFT; 794 if (is_calgary(dev->device)) {
795 start = (640 * 1024);
796 npages = ((1024 - 640) * 1024) >> PAGE_SHIFT;
797 } else { /* calioc2 */
798 start = 0;
799 npages = (1 * 1024 * 1024) >> PAGE_SHIFT;
800 }
677 iommu_range_reserve(tbl, start, npages); 801 iommu_range_reserve(tbl, start, npages);
678 802
679 /* reserve the two PCI peripheral memory regions in IO space */ 803 /* reserve the two PCI peripheral memory regions in IO space */
@@ -694,10 +818,17 @@ static int __init calgary_setup_tar(struct pci_dev *dev, void __iomem *bbar)
694 if (ret) 818 if (ret)
695 return ret; 819 return ret;
696 820
697 tbl = dev->sysdata; 821 tbl = pci_iommu(dev->bus);
698 tbl->it_base = (unsigned long)bus_info[dev->bus->number].tce_space; 822 tbl->it_base = (unsigned long)bus_info[dev->bus->number].tce_space;
699 tce_free(tbl, 0, tbl->it_size); 823 tce_free(tbl, 0, tbl->it_size);
700 824
825 if (is_calgary(dev->device))
826 tbl->chip_ops = &calgary_chip_ops;
827 else if (is_calioc2(dev->device))
828 tbl->chip_ops = &calioc2_chip_ops;
829 else
830 BUG();
831
701 calgary_reserve_regions(dev); 832 calgary_reserve_regions(dev);
702 833
703 /* set TARs for each PHB */ 834 /* set TARs for each PHB */
@@ -706,15 +837,15 @@ static int __init calgary_setup_tar(struct pci_dev *dev, void __iomem *bbar)
706 837
707 /* zero out all TAR bits under sw control */ 838 /* zero out all TAR bits under sw control */
708 val64 &= ~TAR_SW_BITS; 839 val64 &= ~TAR_SW_BITS;
709
710 tbl = dev->sysdata;
711 table_phys = (u64)__pa(tbl->it_base); 840 table_phys = (u64)__pa(tbl->it_base);
841
712 val64 |= table_phys; 842 val64 |= table_phys;
713 843
714 BUG_ON(specified_table_size > TCE_TABLE_SIZE_8M); 844 BUG_ON(specified_table_size > TCE_TABLE_SIZE_8M);
715 val64 |= (u64) specified_table_size; 845 val64 |= (u64) specified_table_size;
716 846
717 tbl->tar_val = cpu_to_be64(val64); 847 tbl->tar_val = cpu_to_be64(val64);
848
718 writeq(tbl->tar_val, target); 849 writeq(tbl->tar_val, target);
719 readq(target); /* flush */ 850 readq(target); /* flush */
720 851
@@ -724,7 +855,7 @@ static int __init calgary_setup_tar(struct pci_dev *dev, void __iomem *bbar)
724static void __init calgary_free_bus(struct pci_dev *dev) 855static void __init calgary_free_bus(struct pci_dev *dev)
725{ 856{
726 u64 val64; 857 u64 val64;
727 struct iommu_table *tbl = dev->sysdata; 858 struct iommu_table *tbl = pci_iommu(dev->bus);
728 void __iomem *target; 859 void __iomem *target;
729 unsigned int bitmapsz; 860 unsigned int bitmapsz;
730 861
@@ -739,16 +870,81 @@ static void __init calgary_free_bus(struct pci_dev *dev)
739 tbl->it_map = NULL; 870 tbl->it_map = NULL;
740 871
741 kfree(tbl); 872 kfree(tbl);
742 dev->sysdata = NULL; 873
874 set_pci_iommu(dev->bus, NULL);
743 875
744 /* Can't free bootmem allocated memory after system is up :-( */ 876 /* Can't free bootmem allocated memory after system is up :-( */
745 bus_info[dev->bus->number].tce_space = NULL; 877 bus_info[dev->bus->number].tce_space = NULL;
746} 878}
747 879
880static void calgary_dump_error_regs(struct iommu_table *tbl)
881{
882 void __iomem *bbar = tbl->bbar;
883 void __iomem *target;
884 u32 csr, plssr;
885
886 target = calgary_reg(bbar, phb_offset(tbl->it_busno) | PHB_CSR_OFFSET);
887 csr = be32_to_cpu(readl(target));
888
889 target = calgary_reg(bbar, phb_offset(tbl->it_busno) | PHB_PLSSR_OFFSET);
890 plssr = be32_to_cpu(readl(target));
891
892 /* If no error, the agent ID in the CSR is not valid */
893 printk(KERN_EMERG "Calgary: DMA error on Calgary PHB 0x%x, "
894 "0x%08x@CSR 0x%08x@PLSSR\n", tbl->it_busno, csr, plssr);
895}
896
897static void calioc2_dump_error_regs(struct iommu_table *tbl)
898{
899 void __iomem *bbar = tbl->bbar;
900 u32 csr, csmr, plssr, mck, rcstat;
901 void __iomem *target;
902 unsigned long phboff = phb_offset(tbl->it_busno);
903 unsigned long erroff;
904 u32 errregs[7];
905 int i;
906
907 /* dump CSR */
908 target = calgary_reg(bbar, phboff | PHB_CSR_OFFSET);
909 csr = be32_to_cpu(readl(target));
910 /* dump PLSSR */
911 target = calgary_reg(bbar, phboff | PHB_PLSSR_OFFSET);
912 plssr = be32_to_cpu(readl(target));
913 /* dump CSMR */
914 target = calgary_reg(bbar, phboff | 0x290);
915 csmr = be32_to_cpu(readl(target));
916 /* dump mck */
917 target = calgary_reg(bbar, phboff | 0x800);
918 mck = be32_to_cpu(readl(target));
919
920 printk(KERN_EMERG "Calgary: DMA error on CalIOC2 PHB 0x%x\n",
921 tbl->it_busno);
922
923 printk(KERN_EMERG "Calgary: 0x%08x@CSR 0x%08x@PLSSR 0x%08x@CSMR 0x%08x@MCK\n",
924 csr, plssr, csmr, mck);
925
926 /* dump rest of error regs */
927 printk(KERN_EMERG "Calgary: ");
928 for (i = 0; i < ARRAY_SIZE(errregs); i++) {
929 /* err regs are at 0x810 - 0x870 */
930 erroff = (0x810 + (i * 0x10));
931 target = calgary_reg(bbar, phboff | erroff);
932 errregs[i] = be32_to_cpu(readl(target));
933 printk("0x%08x@0x%lx ", errregs[i], erroff);
934 }
935 printk("\n");
936
937 /* root complex status */
938 target = calgary_reg(bbar, phboff | PHB_ROOT_COMPLEX_STATUS);
939 rcstat = be32_to_cpu(readl(target));
940 printk(KERN_EMERG "Calgary: 0x%08x@0x%x\n", rcstat,
941 PHB_ROOT_COMPLEX_STATUS);
942}
943
748static void calgary_watchdog(unsigned long data) 944static void calgary_watchdog(unsigned long data)
749{ 945{
750 struct pci_dev *dev = (struct pci_dev *)data; 946 struct pci_dev *dev = (struct pci_dev *)data;
751 struct iommu_table *tbl = dev->sysdata; 947 struct iommu_table *tbl = pci_iommu(dev->bus);
752 void __iomem *bbar = tbl->bbar; 948 void __iomem *bbar = tbl->bbar;
753 u32 val32; 949 u32 val32;
754 void __iomem *target; 950 void __iomem *target;
@@ -758,13 +954,14 @@ static void calgary_watchdog(unsigned long data)
758 954
759 /* If no error, the agent ID in the CSR is not valid */ 955 /* If no error, the agent ID in the CSR is not valid */
760 if (val32 & CSR_AGENT_MASK) { 956 if (val32 & CSR_AGENT_MASK) {
761 printk(KERN_EMERG "calgary_watchdog: DMA error on PHB %#x, " 957 tbl->chip_ops->dump_error_regs(tbl);
762 "CSR = %#x\n", dev->bus->number, val32); 958
959 /* reset error */
763 writel(0, target); 960 writel(0, target);
764 961
765 /* Disable bus that caused the error */ 962 /* Disable bus that caused the error */
766 target = calgary_reg(bbar, phb_offset(tbl->it_busno) | 963 target = calgary_reg(bbar, phb_offset(tbl->it_busno) |
767 PHB_CONFIG_RW_OFFSET); 964 PHB_CONFIG_RW_OFFSET);
768 val32 = be32_to_cpu(readl(target)); 965 val32 = be32_to_cpu(readl(target));
769 val32 |= PHB_SLOT_DISABLE; 966 val32 |= PHB_SLOT_DISABLE;
770 writel(cpu_to_be32(val32), target); 967 writel(cpu_to_be32(val32), target);
@@ -775,8 +972,8 @@ static void calgary_watchdog(unsigned long data)
775 } 972 }
776} 973}
777 974
778static void __init calgary_increase_split_completion_timeout(void __iomem *bbar, 975static void __init calgary_set_split_completion_timeout(void __iomem *bbar,
779 unsigned char busnum) 976 unsigned char busnum, unsigned long timeout)
780{ 977{
781 u64 val64; 978 u64 val64;
782 void __iomem *target; 979 void __iomem *target;
@@ -802,11 +999,40 @@ static void __init calgary_increase_split_completion_timeout(void __iomem *bbar,
802 /* zero out this PHB's timer bits */ 999 /* zero out this PHB's timer bits */
803 mask = ~(0xFUL << phb_shift); 1000 mask = ~(0xFUL << phb_shift);
804 val64 &= mask; 1001 val64 &= mask;
805 val64 |= (CCR_2SEC_TIMEOUT << phb_shift); 1002 val64 |= (timeout << phb_shift);
806 writeq(cpu_to_be64(val64), target); 1003 writeq(cpu_to_be64(val64), target);
807 readq(target); /* flush */ 1004 readq(target); /* flush */
808} 1005}
809 1006
1007static void calioc2_handle_quirks(struct iommu_table *tbl, struct pci_dev *dev)
1008{
1009 unsigned char busnum = dev->bus->number;
1010 void __iomem *bbar = tbl->bbar;
1011 void __iomem *target;
1012 u32 val;
1013
1014 /*
1015 * CalIOC2 designers recommend setting bit 8 in 0xnDB0 to 1
1016 */
1017 target = calgary_reg(bbar, phb_offset(busnum) | PHB_SAVIOR_L2);
1018 val = cpu_to_be32(readl(target));
1019 val |= 0x00800000;
1020 writel(cpu_to_be32(val), target);
1021}
1022
1023static void calgary_handle_quirks(struct iommu_table *tbl, struct pci_dev *dev)
1024{
1025 unsigned char busnum = dev->bus->number;
1026
1027 /*
1028 * Give split completion a longer timeout on bus 1 for aic94xx
1029 * http://bugzilla.kernel.org/show_bug.cgi?id=7180
1030 */
1031 if (is_calgary(dev->device) && (busnum == 1))
1032 calgary_set_split_completion_timeout(tbl->bbar, busnum,
1033 CCR_2SEC_TIMEOUT);
1034}
1035
810static void __init calgary_enable_translation(struct pci_dev *dev) 1036static void __init calgary_enable_translation(struct pci_dev *dev)
811{ 1037{
812 u32 val32; 1038 u32 val32;
@@ -816,7 +1042,7 @@ static void __init calgary_enable_translation(struct pci_dev *dev)
816 struct iommu_table *tbl; 1042 struct iommu_table *tbl;
817 1043
818 busnum = dev->bus->number; 1044 busnum = dev->bus->number;
819 tbl = dev->sysdata; 1045 tbl = pci_iommu(dev->bus);
820 bbar = tbl->bbar; 1046 bbar = tbl->bbar;
821 1047
822 /* enable TCE in PHB Config Register */ 1048 /* enable TCE in PHB Config Register */
@@ -824,20 +1050,15 @@ static void __init calgary_enable_translation(struct pci_dev *dev)
824 val32 = be32_to_cpu(readl(target)); 1050 val32 = be32_to_cpu(readl(target));
825 val32 |= PHB_TCE_ENABLE | PHB_DAC_DISABLE | PHB_MCSR_ENABLE; 1051 val32 |= PHB_TCE_ENABLE | PHB_DAC_DISABLE | PHB_MCSR_ENABLE;
826 1052
827 printk(KERN_INFO "Calgary: enabling translation on PHB %#x\n", busnum); 1053 printk(KERN_INFO "Calgary: enabling translation on %s PHB %#x\n",
1054 (dev->device == PCI_DEVICE_ID_IBM_CALGARY) ?
1055 "Calgary" : "CalIOC2", busnum);
828 printk(KERN_INFO "Calgary: errant DMAs will now be prevented on this " 1056 printk(KERN_INFO "Calgary: errant DMAs will now be prevented on this "
829 "bus.\n"); 1057 "bus.\n");
830 1058
831 writel(cpu_to_be32(val32), target); 1059 writel(cpu_to_be32(val32), target);
832 readl(target); /* flush */ 1060 readl(target); /* flush */
833 1061
834 /*
835 * Give split completion a longer timeout on bus 1 for aic94xx
836 * http://bugzilla.kernel.org/show_bug.cgi?id=7180
837 */
838 if (busnum == 1)
839 calgary_increase_split_completion_timeout(bbar, busnum);
840
841 init_timer(&tbl->watchdog_timer); 1062 init_timer(&tbl->watchdog_timer);
842 tbl->watchdog_timer.function = &calgary_watchdog; 1063 tbl->watchdog_timer.function = &calgary_watchdog;
843 tbl->watchdog_timer.data = (unsigned long)dev; 1064 tbl->watchdog_timer.data = (unsigned long)dev;
@@ -853,7 +1074,7 @@ static void __init calgary_disable_translation(struct pci_dev *dev)
853 struct iommu_table *tbl; 1074 struct iommu_table *tbl;
854 1075
855 busnum = dev->bus->number; 1076 busnum = dev->bus->number;
856 tbl = dev->sysdata; 1077 tbl = pci_iommu(dev->bus);
857 bbar = tbl->bbar; 1078 bbar = tbl->bbar;
858 1079
859 /* disable TCE in PHB Config Register */ 1080 /* disable TCE in PHB Config Register */
@@ -871,13 +1092,19 @@ static void __init calgary_disable_translation(struct pci_dev *dev)
871static void __init calgary_init_one_nontraslated(struct pci_dev *dev) 1092static void __init calgary_init_one_nontraslated(struct pci_dev *dev)
872{ 1093{
873 pci_dev_get(dev); 1094 pci_dev_get(dev);
874 dev->sysdata = NULL; 1095 set_pci_iommu(dev->bus, NULL);
875 dev->bus->self = dev; 1096
1097 /* is the device behind a bridge? */
1098 if (dev->bus->parent)
1099 dev->bus->parent->self = dev;
1100 else
1101 dev->bus->self = dev;
876} 1102}
877 1103
878static int __init calgary_init_one(struct pci_dev *dev) 1104static int __init calgary_init_one(struct pci_dev *dev)
879{ 1105{
880 void __iomem *bbar; 1106 void __iomem *bbar;
1107 struct iommu_table *tbl;
881 int ret; 1108 int ret;
882 1109
883 BUG_ON(dev->bus->number >= MAX_PHB_BUS_NUM); 1110 BUG_ON(dev->bus->number >= MAX_PHB_BUS_NUM);
@@ -888,7 +1115,18 @@ static int __init calgary_init_one(struct pci_dev *dev)
888 goto done; 1115 goto done;
889 1116
890 pci_dev_get(dev); 1117 pci_dev_get(dev);
891 dev->bus->self = dev; 1118
1119 if (dev->bus->parent) {
1120 if (dev->bus->parent->self)
1121 printk(KERN_WARNING "Calgary: IEEEE, dev %p has "
1122 "bus->parent->self!\n", dev);
1123 dev->bus->parent->self = dev;
1124 } else
1125 dev->bus->self = dev;
1126
1127 tbl = pci_iommu(dev->bus);
1128 tbl->chip_ops->handle_quirks(tbl, dev);
1129
892 calgary_enable_translation(dev); 1130 calgary_enable_translation(dev);
893 1131
894 return 0; 1132 return 0;
@@ -924,11 +1162,18 @@ static int __init calgary_locate_bbars(void)
924 target = calgary_reg(bbar, offset); 1162 target = calgary_reg(bbar, offset);
925 1163
926 val = be32_to_cpu(readl(target)); 1164 val = be32_to_cpu(readl(target));
1165
927 start_bus = (u8)((val & 0x00FF0000) >> 16); 1166 start_bus = (u8)((val & 0x00FF0000) >> 16);
928 end_bus = (u8)((val & 0x0000FF00) >> 8); 1167 end_bus = (u8)((val & 0x0000FF00) >> 8);
929 for (bus = start_bus; bus <= end_bus; bus++) { 1168
930 bus_info[bus].bbar = bbar; 1169 if (end_bus) {
931 bus_info[bus].phbid = phb; 1170 for (bus = start_bus; bus <= end_bus; bus++) {
1171 bus_info[bus].bbar = bbar;
1172 bus_info[bus].phbid = phb;
1173 }
1174 } else {
1175 bus_info[start_bus].bbar = bbar;
1176 bus_info[start_bus].phbid = phb;
932 } 1177 }
933 } 1178 }
934 } 1179 }
@@ -948,22 +1193,24 @@ static int __init calgary_init(void)
948{ 1193{
949 int ret; 1194 int ret;
950 struct pci_dev *dev = NULL; 1195 struct pci_dev *dev = NULL;
1196 void *tce_space;
951 1197
952 ret = calgary_locate_bbars(); 1198 ret = calgary_locate_bbars();
953 if (ret) 1199 if (ret)
954 return ret; 1200 return ret;
955 1201
956 do { 1202 do {
957 dev = pci_get_device(PCI_VENDOR_ID_IBM, 1203 dev = pci_get_device(PCI_VENDOR_ID_IBM, PCI_ANY_ID, dev);
958 PCI_DEVICE_ID_IBM_CALGARY,
959 dev);
960 if (!dev) 1204 if (!dev)
961 break; 1205 break;
1206 if (!is_cal_pci_dev(dev->device))
1207 continue;
962 if (!translate_phb(dev)) { 1208 if (!translate_phb(dev)) {
963 calgary_init_one_nontraslated(dev); 1209 calgary_init_one_nontraslated(dev);
964 continue; 1210 continue;
965 } 1211 }
966 if (!bus_info[dev->bus->number].tce_space && !translate_empty_slots) 1212 tce_space = bus_info[dev->bus->number].tce_space;
1213 if (!tce_space && !translate_empty_slots)
967 continue; 1214 continue;
968 1215
969 ret = calgary_init_one(dev); 1216 ret = calgary_init_one(dev);
@@ -976,10 +1223,11 @@ static int __init calgary_init(void)
976error: 1223error:
977 do { 1224 do {
978 dev = pci_get_device_reverse(PCI_VENDOR_ID_IBM, 1225 dev = pci_get_device_reverse(PCI_VENDOR_ID_IBM,
979 PCI_DEVICE_ID_IBM_CALGARY, 1226 PCI_ANY_ID, dev);
980 dev);
981 if (!dev) 1227 if (!dev)
982 break; 1228 break;
1229 if (!is_cal_pci_dev(dev->device))
1230 continue;
983 if (!translate_phb(dev)) { 1231 if (!translate_phb(dev)) {
984 pci_dev_put(dev); 1232 pci_dev_put(dev);
985 continue; 1233 continue;
@@ -1057,9 +1305,29 @@ static int __init build_detail_arrays(void)
1057 return 0; 1305 return 0;
1058} 1306}
1059 1307
1060void __init detect_calgary(void) 1308static int __init calgary_bus_has_devices(int bus, unsigned short pci_dev)
1061{ 1309{
1310 int dev;
1062 u32 val; 1311 u32 val;
1312
1313 if (pci_dev == PCI_DEVICE_ID_IBM_CALIOC2) {
1314 /*
1315 * FIXME: properly scan for devices accross the
1316 * PCI-to-PCI bridge on every CalIOC2 port.
1317 */
1318 return 1;
1319 }
1320
1321 for (dev = 1; dev < 8; dev++) {
1322 val = read_pci_config(bus, dev, 0, 0);
1323 if (val != 0xffffffff)
1324 break;
1325 }
1326 return (val != 0xffffffff);
1327}
1328
1329void __init detect_calgary(void)
1330{
1063 int bus; 1331 int bus;
1064 void *tbl; 1332 void *tbl;
1065 int calgary_found = 0; 1333 int calgary_found = 0;
@@ -1116,29 +1384,26 @@ void __init detect_calgary(void)
1116 specified_table_size = determine_tce_table_size(end_pfn * PAGE_SIZE); 1384 specified_table_size = determine_tce_table_size(end_pfn * PAGE_SIZE);
1117 1385
1118 for (bus = 0; bus < MAX_PHB_BUS_NUM; bus++) { 1386 for (bus = 0; bus < MAX_PHB_BUS_NUM; bus++) {
1119 int dev;
1120 struct calgary_bus_info *info = &bus_info[bus]; 1387 struct calgary_bus_info *info = &bus_info[bus];
1388 unsigned short pci_device;
1389 u32 val;
1390
1391 val = read_pci_config(bus, 0, 0, 0);
1392 pci_device = (val & 0xFFFF0000) >> 16;
1121 1393
1122 if (read_pci_config(bus, 0, 0, 0) != PCI_VENDOR_DEVICE_ID_CALGARY) 1394 if (!is_cal_pci_dev(pci_device))
1123 continue; 1395 continue;
1124 1396
1125 if (info->translation_disabled) 1397 if (info->translation_disabled)
1126 continue; 1398 continue;
1127 1399
1128 /* 1400 if (calgary_bus_has_devices(bus, pci_device) ||
1129 * Scan the slots of the PCI bus to see if there is a device present. 1401 translate_empty_slots) {
1130 * The parent bus will be the zero-ith device, so start at 1. 1402 tbl = alloc_tce_table();
1131 */ 1403 if (!tbl)
1132 for (dev = 1; dev < 8; dev++) { 1404 goto cleanup;
1133 val = read_pci_config(bus, dev, 0, 0); 1405 info->tce_space = tbl;
1134 if (val != 0xffffffff || translate_empty_slots) { 1406 calgary_found = 1;
1135 tbl = alloc_tce_table();
1136 if (!tbl)
1137 goto cleanup;
1138 info->tce_space = tbl;
1139 calgary_found = 1;
1140 break;
1141 }
1142 } 1407 }
1143 } 1408 }
1144 1409
@@ -1249,3 +1514,66 @@ static int __init calgary_parse_options(char *p)
1249 return 1; 1514 return 1;
1250} 1515}
1251__setup("calgary=", calgary_parse_options); 1516__setup("calgary=", calgary_parse_options);
1517
1518static void __init calgary_fixup_one_tce_space(struct pci_dev *dev)
1519{
1520 struct iommu_table *tbl;
1521 unsigned int npages;
1522 int i;
1523
1524 tbl = pci_iommu(dev->bus);
1525
1526 for (i = 0; i < 4; i++) {
1527 struct resource *r = &dev->resource[PCI_BRIDGE_RESOURCES + i];
1528
1529 /* Don't give out TCEs that map MEM resources */
1530 if (!(r->flags & IORESOURCE_MEM))
1531 continue;
1532
1533 /* 0-based? we reserve the whole 1st MB anyway */
1534 if (!r->start)
1535 continue;
1536
1537 /* cover the whole region */
1538 npages = (r->end - r->start) >> PAGE_SHIFT;
1539 npages++;
1540
1541 iommu_range_reserve(tbl, r->start, npages);
1542 }
1543}
1544
1545static int __init calgary_fixup_tce_spaces(void)
1546{
1547 struct pci_dev *dev = NULL;
1548 void *tce_space;
1549
1550 if (no_iommu || swiotlb || !calgary_detected)
1551 return -ENODEV;
1552
1553 printk(KERN_DEBUG "Calgary: fixing up tce spaces\n");
1554
1555 do {
1556 dev = pci_get_device(PCI_VENDOR_ID_IBM, PCI_ANY_ID, dev);
1557 if (!dev)
1558 break;
1559 if (!is_cal_pci_dev(dev->device))
1560 continue;
1561 if (!translate_phb(dev))
1562 continue;
1563
1564 tce_space = bus_info[dev->bus->number].tce_space;
1565 if (!tce_space)
1566 continue;
1567
1568 calgary_fixup_one_tce_space(dev);
1569
1570 } while (1);
1571
1572 return 0;
1573}
1574
1575/*
1576 * We need to be call after pcibios_assign_resources (fs_initcall level)
1577 * and before device_initcall.
1578 */
1579rootfs_initcall(calgary_fixup_tce_spaces);
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c
index 651ccfb06697..05d745ede561 100644
--- a/arch/x86_64/kernel/pci-dma.c
+++ b/arch/x86_64/kernel/pci-dma.c
@@ -8,7 +8,7 @@
8#include <linux/pci.h> 8#include <linux/pci.h>
9#include <linux/module.h> 9#include <linux/module.h>
10#include <asm/io.h> 10#include <asm/io.h>
11#include <asm/proto.h> 11#include <asm/iommu.h>
12#include <asm/calgary.h> 12#include <asm/calgary.h>
13 13
14int iommu_merge __read_mostly = 0; 14int iommu_merge __read_mostly = 0;
@@ -22,8 +22,7 @@ EXPORT_SYMBOL(bad_dma_address);
22int iommu_bio_merge __read_mostly = 0; 22int iommu_bio_merge __read_mostly = 0;
23EXPORT_SYMBOL(iommu_bio_merge); 23EXPORT_SYMBOL(iommu_bio_merge);
24 24
25int iommu_sac_force __read_mostly = 0; 25static int iommu_sac_force __read_mostly = 0;
26EXPORT_SYMBOL(iommu_sac_force);
27 26
28int no_iommu __read_mostly; 27int no_iommu __read_mostly;
29#ifdef CONFIG_IOMMU_DEBUG 28#ifdef CONFIG_IOMMU_DEBUG
@@ -322,5 +321,22 @@ static int __init pci_iommu_init(void)
322 return 0; 321 return 0;
323} 322}
324 323
324void pci_iommu_shutdown(void)
325{
326 gart_iommu_shutdown();
327}
328
329#ifdef CONFIG_PCI
330/* Many VIA bridges seem to corrupt data for DAC. Disable it here */
331
332static __devinit void via_no_dac(struct pci_dev *dev)
333{
334 if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) {
335 printk(KERN_INFO "PCI: VIA PCI bridge detected. Disabling DAC.\n");
336 forbid_dac = 1;
337 }
338}
339DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac);
340#endif
325/* Must execute after PCI subsystem */ 341/* Must execute after PCI subsystem */
326fs_initcall(pci_iommu_init); 342fs_initcall(pci_iommu_init);
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c
index ae091cdc1a4d..4918c575d582 100644
--- a/arch/x86_64/kernel/pci-gart.c
+++ b/arch/x86_64/kernel/pci-gart.c
@@ -28,6 +28,7 @@
28#include <asm/mtrr.h> 28#include <asm/mtrr.h>
29#include <asm/pgtable.h> 29#include <asm/pgtable.h>
30#include <asm/proto.h> 30#include <asm/proto.h>
31#include <asm/iommu.h>
31#include <asm/cacheflush.h> 32#include <asm/cacheflush.h>
32#include <asm/swiotlb.h> 33#include <asm/swiotlb.h>
33#include <asm/dma.h> 34#include <asm/dma.h>
@@ -235,7 +236,7 @@ static dma_addr_t gart_map_simple(struct device *dev, char *buf,
235} 236}
236 237
237/* Map a single area into the IOMMU */ 238/* Map a single area into the IOMMU */
238dma_addr_t gart_map_single(struct device *dev, void *addr, size_t size, int dir) 239static dma_addr_t gart_map_single(struct device *dev, void *addr, size_t size, int dir)
239{ 240{
240 unsigned long phys_mem, bus; 241 unsigned long phys_mem, bus;
241 242
@@ -253,7 +254,7 @@ dma_addr_t gart_map_single(struct device *dev, void *addr, size_t size, int dir)
253/* 254/*
254 * Free a DMA mapping. 255 * Free a DMA mapping.
255 */ 256 */
256void gart_unmap_single(struct device *dev, dma_addr_t dma_addr, 257static void gart_unmap_single(struct device *dev, dma_addr_t dma_addr,
257 size_t size, int direction) 258 size_t size, int direction)
258{ 259{
259 unsigned long iommu_page; 260 unsigned long iommu_page;
@@ -275,7 +276,7 @@ void gart_unmap_single(struct device *dev, dma_addr_t dma_addr,
275/* 276/*
276 * Wrapper for pci_unmap_single working with scatterlists. 277 * Wrapper for pci_unmap_single working with scatterlists.
277 */ 278 */
278void gart_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, int dir) 279static void gart_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, int dir)
279{ 280{
280 int i; 281 int i;
281 282
@@ -571,6 +572,26 @@ static const struct dma_mapping_ops gart_dma_ops = {
571 .unmap_sg = gart_unmap_sg, 572 .unmap_sg = gart_unmap_sg,
572}; 573};
573 574
575void gart_iommu_shutdown(void)
576{
577 struct pci_dev *dev;
578 int i;
579
580 if (no_agp && (dma_ops != &gart_dma_ops))
581 return;
582
583 for (i = 0; i < num_k8_northbridges; i++) {
584 u32 ctl;
585
586 dev = k8_northbridges[i];
587 pci_read_config_dword(dev, 0x90, &ctl);
588
589 ctl &= ~1;
590
591 pci_write_config_dword(dev, 0x90, ctl);
592 }
593}
594
574void __init gart_iommu_init(void) 595void __init gart_iommu_init(void)
575{ 596{
576 struct agp_kern_info info; 597 struct agp_kern_info info;
diff --git a/arch/x86_64/kernel/pci-nommu.c b/arch/x86_64/kernel/pci-nommu.c
index 6dade0c867cc..2a34c6c025a9 100644
--- a/arch/x86_64/kernel/pci-nommu.c
+++ b/arch/x86_64/kernel/pci-nommu.c
@@ -6,7 +6,7 @@
6#include <linux/string.h> 6#include <linux/string.h>
7#include <linux/dma-mapping.h> 7#include <linux/dma-mapping.h>
8 8
9#include <asm/proto.h> 9#include <asm/iommu.h>
10#include <asm/processor.h> 10#include <asm/processor.h>
11#include <asm/dma.h> 11#include <asm/dma.h>
12 12
@@ -34,7 +34,7 @@ nommu_map_single(struct device *hwdev, void *ptr, size_t size,
34 return bus; 34 return bus;
35} 35}
36 36
37void nommu_unmap_single(struct device *dev, dma_addr_t addr,size_t size, 37static void nommu_unmap_single(struct device *dev, dma_addr_t addr,size_t size,
38 int direction) 38 int direction)
39{ 39{
40} 40}
@@ -54,7 +54,7 @@ void nommu_unmap_single(struct device *dev, dma_addr_t addr,size_t size,
54 * Device ownership issues as mentioned above for pci_map_single are 54 * Device ownership issues as mentioned above for pci_map_single are
55 * the same here. 55 * the same here.
56 */ 56 */
57int nommu_map_sg(struct device *hwdev, struct scatterlist *sg, 57static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,
58 int nents, int direction) 58 int nents, int direction)
59{ 59{
60 int i; 60 int i;
@@ -74,7 +74,7 @@ int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,
74 * Again, cpu read rules concerning calls here are the same as for 74 * Again, cpu read rules concerning calls here are the same as for
75 * pci_unmap_single() above. 75 * pci_unmap_single() above.
76 */ 76 */
77void nommu_unmap_sg(struct device *dev, struct scatterlist *sg, 77static void nommu_unmap_sg(struct device *dev, struct scatterlist *sg,
78 int nents, int dir) 78 int nents, int dir)
79{ 79{
80} 80}
diff --git a/arch/x86_64/kernel/pci-swiotlb.c b/arch/x86_64/kernel/pci-swiotlb.c
index 4b4569abc60c..b2f405ea7c85 100644
--- a/arch/x86_64/kernel/pci-swiotlb.c
+++ b/arch/x86_64/kernel/pci-swiotlb.c
@@ -5,7 +5,7 @@
5#include <linux/module.h> 5#include <linux/module.h>
6#include <linux/dma-mapping.h> 6#include <linux/dma-mapping.h>
7 7
8#include <asm/proto.h> 8#include <asm/iommu.h>
9#include <asm/swiotlb.h> 9#include <asm/swiotlb.h>
10#include <asm/dma.h> 10#include <asm/dma.h>
11 11
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c
index 5909039f37aa..92fade4a62cf 100644
--- a/arch/x86_64/kernel/process.c
+++ b/arch/x86_64/kernel/process.c
@@ -207,6 +207,7 @@ void cpu_idle (void)
207 if (__get_cpu_var(cpu_idle_state)) 207 if (__get_cpu_var(cpu_idle_state))
208 __get_cpu_var(cpu_idle_state) = 0; 208 __get_cpu_var(cpu_idle_state) = 0;
209 209
210 check_pgt_cache();
210 rmb(); 211 rmb();
211 idle = pm_idle; 212 idle = pm_idle;
212 if (!idle) 213 if (!idle)
@@ -278,7 +279,7 @@ void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c)
278 */ 279 */
279 if (!pm_idle) { 280 if (!pm_idle) {
280 if (!printed) { 281 if (!printed) {
281 printk("using mwait in idle threads.\n"); 282 printk(KERN_INFO "using mwait in idle threads.\n");
282 printed = 1; 283 printed = 1;
283 } 284 }
284 pm_idle = mwait_idle; 285 pm_idle = mwait_idle;
@@ -305,6 +306,7 @@ early_param("idle", idle_setup);
305void __show_regs(struct pt_regs * regs) 306void __show_regs(struct pt_regs * regs)
306{ 307{
307 unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L, fs, gs, shadowgs; 308 unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L, fs, gs, shadowgs;
309 unsigned long d0, d1, d2, d3, d6, d7;
308 unsigned int fsindex,gsindex; 310 unsigned int fsindex,gsindex;
309 unsigned int ds,cs,es; 311 unsigned int ds,cs,es;
310 312
@@ -349,6 +351,15 @@ void __show_regs(struct pt_regs * regs)
349 fs,fsindex,gs,gsindex,shadowgs); 351 fs,fsindex,gs,gsindex,shadowgs);
350 printk("CS: %04x DS: %04x ES: %04x CR0: %016lx\n", cs, ds, es, cr0); 352 printk("CS: %04x DS: %04x ES: %04x CR0: %016lx\n", cs, ds, es, cr0);
351 printk("CR2: %016lx CR3: %016lx CR4: %016lx\n", cr2, cr3, cr4); 353 printk("CR2: %016lx CR3: %016lx CR4: %016lx\n", cr2, cr3, cr4);
354
355 get_debugreg(d0, 0);
356 get_debugreg(d1, 1);
357 get_debugreg(d2, 2);
358 printk("DR0: %016lx DR1: %016lx DR2: %016lx\n", d0, d1, d2);
359 get_debugreg(d3, 3);
360 get_debugreg(d6, 6);
361 get_debugreg(d7, 7);
362 printk("DR3: %016lx DR6: %016lx DR7: %016lx\n", d3, d6, d7);
352} 363}
353 364
354void show_regs(struct pt_regs *regs) 365void show_regs(struct pt_regs *regs)
diff --git a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c
index 9409117b9f19..e83cc67155ac 100644
--- a/arch/x86_64/kernel/ptrace.c
+++ b/arch/x86_64/kernel/ptrace.c
@@ -102,16 +102,25 @@ unsigned long convert_rip_to_linear(struct task_struct *child, struct pt_regs *r
102 u32 *desc; 102 u32 *desc;
103 unsigned long base; 103 unsigned long base;
104 104
105 down(&child->mm->context.sem); 105 seg &= ~7UL;
106 desc = child->mm->context.ldt + (seg & ~7);
107 base = (desc[0] >> 16) | ((desc[1] & 0xff) << 16) | (desc[1] & 0xff000000);
108 106
109 /* 16-bit code segment? */ 107 down(&child->mm->context.sem);
110 if (!((desc[1] >> 22) & 1)) 108 if (unlikely((seg >> 3) >= child->mm->context.size))
111 addr &= 0xffff; 109 addr = -1L; /* bogus selector, access would fault */
112 addr += base; 110 else {
111 desc = child->mm->context.ldt + seg;
112 base = ((desc[0] >> 16) |
113 ((desc[1] & 0xff) << 16) |
114 (desc[1] & 0xff000000));
115
116 /* 16-bit code segment? */
117 if (!((desc[1] >> 22) & 1))
118 addr &= 0xffff;
119 addr += base;
120 }
113 up(&child->mm->context.sem); 121 up(&child->mm->context.sem);
114 } 122 }
123
115 return addr; 124 return addr;
116} 125}
117 126
@@ -313,17 +322,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
313 switch (request) { 322 switch (request) {
314 /* when I and D space are separate, these will need to be fixed. */ 323 /* when I and D space are separate, these will need to be fixed. */
315 case PTRACE_PEEKTEXT: /* read word at location addr. */ 324 case PTRACE_PEEKTEXT: /* read word at location addr. */
316 case PTRACE_PEEKDATA: { 325 case PTRACE_PEEKDATA:
317 unsigned long tmp; 326 ret = generic_ptrace_peekdata(child, addr, data);
318 int copied;
319
320 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
321 ret = -EIO;
322 if (copied != sizeof(tmp))
323 break;
324 ret = put_user(tmp,(unsigned long __user *) data);
325 break; 327 break;
326 }
327 328
328 /* read the word at location addr in the USER area. */ 329 /* read the word at location addr in the USER area. */
329 case PTRACE_PEEKUSR: { 330 case PTRACE_PEEKUSR: {
@@ -367,10 +368,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
367 /* when I and D space are separate, this will have to be fixed. */ 368 /* when I and D space are separate, this will have to be fixed. */
368 case PTRACE_POKETEXT: /* write the word at location addr. */ 369 case PTRACE_POKETEXT: /* write the word at location addr. */
369 case PTRACE_POKEDATA: 370 case PTRACE_POKEDATA:
370 ret = 0; 371 ret = generic_ptrace_pokedata(child, addr, data);
371 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
372 break;
373 ret = -EIO;
374 break; 372 break;
375 373
376 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 374 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
diff --git a/arch/x86_64/kernel/reboot.c b/arch/x86_64/kernel/reboot.c
index 7503068e788d..368db2b9c5ac 100644
--- a/arch/x86_64/kernel/reboot.c
+++ b/arch/x86_64/kernel/reboot.c
@@ -16,6 +16,7 @@
16#include <asm/pgtable.h> 16#include <asm/pgtable.h>
17#include <asm/tlbflush.h> 17#include <asm/tlbflush.h>
18#include <asm/apic.h> 18#include <asm/apic.h>
19#include <asm/iommu.h>
19 20
20/* 21/*
21 * Power off function, if any 22 * Power off function, if any
@@ -81,6 +82,7 @@ static inline void kb_wait(void)
81void machine_shutdown(void) 82void machine_shutdown(void)
82{ 83{
83 unsigned long flags; 84 unsigned long flags;
85
84 /* Stop the cpus and apics */ 86 /* Stop the cpus and apics */
85#ifdef CONFIG_SMP 87#ifdef CONFIG_SMP
86 int reboot_cpu_id; 88 int reboot_cpu_id;
@@ -111,6 +113,8 @@ void machine_shutdown(void)
111 disable_IO_APIC(); 113 disable_IO_APIC();
112 114
113 local_irq_restore(flags); 115 local_irq_restore(flags);
116
117 pci_iommu_shutdown();
114} 118}
115 119
116void machine_emergency_restart(void) 120void machine_emergency_restart(void)
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index eb6524f3ac29..6fa0a302e2aa 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -575,6 +575,8 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
575 level = cpuid_eax(1); 575 level = cpuid_eax(1);
576 if (c->x86 == 15 && ((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58)) 576 if (c->x86 == 15 && ((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58))
577 set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability); 577 set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability);
578 if (c->x86 == 0x10)
579 set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability);
578 580
579 /* Enable workaround for FXSAVE leak */ 581 /* Enable workaround for FXSAVE leak */
580 if (c->x86 >= 6) 582 if (c->x86 >= 6)
@@ -600,8 +602,11 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
600 if (c->extended_cpuid_level >= 0x80000008) 602 if (c->extended_cpuid_level >= 0x80000008)
601 amd_detect_cmp(c); 603 amd_detect_cmp(c);
602 604
603 /* Fix cpuid4 emulation for more */ 605 if (c->extended_cpuid_level >= 0x80000006 &&
604 num_cache_leaves = 3; 606 (cpuid_edx(0x80000006) & 0xf000))
607 num_cache_leaves = 4;
608 else
609 num_cache_leaves = 3;
605 610
606 /* RDTSC can be speculated around */ 611 /* RDTSC can be speculated around */
607 clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); 612 clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
@@ -846,6 +851,8 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
846 c->x86_capability[2] = cpuid_edx(0x80860001); 851 c->x86_capability[2] = cpuid_edx(0x80860001);
847 } 852 }
848 853
854 init_scattered_cpuid_features(c);
855
849 c->apicid = phys_pkg_id(0); 856 c->apicid = phys_pkg_id(0);
850 857
851 /* 858 /*
@@ -931,7 +938,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
931 "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", 938 "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce",
932 "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov", 939 "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov",
933 "pat", "pse36", "pn", "clflush", NULL, "dts", "acpi", "mmx", 940 "pat", "pse36", "pn", "clflush", NULL, "dts", "acpi", "mmx",
934 "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", NULL, 941 "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", "pbe",
935 942
936 /* AMD-defined */ 943 /* AMD-defined */
937 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 944 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -947,10 +954,11 @@ static int show_cpuinfo(struct seq_file *m, void *v)
947 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 954 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
948 955
949 /* Other (Linux-defined) */ 956 /* Other (Linux-defined) */
950 "cxmmx", NULL, "cyrix_arr", "centaur_mcr", NULL, 957 "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr",
951 "constant_tsc", NULL, NULL, 958 NULL, NULL, NULL, NULL,
952 "up", NULL, NULL, NULL, NULL, NULL, NULL, NULL, 959 "constant_tsc", "up", NULL, "arch_perfmon",
953 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 960 "pebs", "bts", NULL, "sync_rdtsc",
961 "rep_good", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
954 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 962 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
955 963
956 /* Intel-defined (#2) */ 964 /* Intel-defined (#2) */
@@ -961,7 +969,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
961 969
962 /* VIA/Cyrix/Centaur-defined */ 970 /* VIA/Cyrix/Centaur-defined */
963 NULL, NULL, "rng", "rng_en", NULL, NULL, "ace", "ace_en", 971 NULL, NULL, "rng", "rng_en", NULL, NULL, "ace", "ace_en",
964 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 972 "ace2", "ace2_en", "phe", "phe_en", "pmm", "pmm_en", NULL, NULL,
965 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 973 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
966 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 974 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
967 975
@@ -972,6 +980,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)
972 "osvw", "ibs", NULL, NULL, NULL, NULL, 980 "osvw", "ibs", NULL, NULL, NULL, NULL,
973 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 981 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
974 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 982 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
983
984 /* Auxiliary (Linux-defined) */
985 "ida", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
986 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
987 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
988 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
975 }; 989 };
976 static char *x86_power_flags[] = { 990 static char *x86_power_flags[] = {
977 "ts", /* temperature sensor */ 991 "ts", /* temperature sensor */
diff --git a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c
index 64379a80d763..1200aaac403e 100644
--- a/arch/x86_64/kernel/setup64.c
+++ b/arch/x86_64/kernel/setup64.c
@@ -150,6 +150,8 @@ void pda_init(int cpu)
150char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ] 150char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ]
151__attribute__((section(".bss.page_aligned"))); 151__attribute__((section(".bss.page_aligned")));
152 152
153extern asmlinkage void ignore_sysret(void);
154
153/* May not be marked __init: used by software suspend */ 155/* May not be marked __init: used by software suspend */
154void syscall_init(void) 156void syscall_init(void)
155{ 157{
@@ -160,6 +162,7 @@ void syscall_init(void)
160 */ 162 */
161 wrmsrl(MSR_STAR, ((u64)__USER32_CS)<<48 | ((u64)__KERNEL_CS)<<32); 163 wrmsrl(MSR_STAR, ((u64)__USER32_CS)<<48 | ((u64)__KERNEL_CS)<<32);
162 wrmsrl(MSR_LSTAR, system_call); 164 wrmsrl(MSR_LSTAR, system_call);
165 wrmsrl(MSR_CSTAR, ignore_sysret);
163 166
164#ifdef CONFIG_IA32_EMULATION 167#ifdef CONFIG_IA32_EMULATION
165 syscall32_cpu_init (); 168 syscall32_cpu_init ();
diff --git a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c
index 290f5d8037cd..4886afcd6287 100644
--- a/arch/x86_64/kernel/signal.c
+++ b/arch/x86_64/kernel/signal.c
@@ -26,6 +26,7 @@
26#include <asm/i387.h> 26#include <asm/i387.h>
27#include <asm/proto.h> 27#include <asm/proto.h>
28#include <asm/ia32_unistd.h> 28#include <asm/ia32_unistd.h>
29#include <asm/mce.h>
29 30
30/* #define DEBUG_SIG 1 */ 31/* #define DEBUG_SIG 1 */
31 32
@@ -472,6 +473,12 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)
472 clear_thread_flag(TIF_SINGLESTEP); 473 clear_thread_flag(TIF_SINGLESTEP);
473 } 474 }
474 475
476#ifdef CONFIG_X86_MCE
477 /* notify userspace of pending MCEs */
478 if (thread_info_flags & _TIF_MCE_NOTIFY)
479 mce_notify_user();
480#endif /* CONFIG_X86_MCE */
481
475 /* deal with pending signal delivery */ 482 /* deal with pending signal delivery */
476 if (thread_info_flags & (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK)) 483 if (thread_info_flags & (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK))
477 do_signal(regs); 484 do_signal(regs);
diff --git a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c
index 2ff468591625..673a300b5944 100644
--- a/arch/x86_64/kernel/smp.c
+++ b/arch/x86_64/kernel/smp.c
@@ -241,7 +241,7 @@ void flush_tlb_mm (struct mm_struct * mm)
241 } 241 }
242 if (!cpus_empty(cpu_mask)) 242 if (!cpus_empty(cpu_mask))
243 flush_tlb_others(cpu_mask, mm, FLUSH_ALL); 243 flush_tlb_others(cpu_mask, mm, FLUSH_ALL);
244 244 check_pgt_cache();
245 preempt_enable(); 245 preempt_enable();
246} 246}
247EXPORT_SYMBOL(flush_tlb_mm); 247EXPORT_SYMBOL(flush_tlb_mm);
@@ -357,7 +357,7 @@ __smp_call_function_single(int cpu, void (*func) (void *info), void *info,
357} 357}
358 358
359/* 359/*
360 * smp_call_function_single - Run a function on another CPU 360 * smp_call_function_single - Run a function on a specific CPU
361 * @func: The function to run. This must be fast and non-blocking. 361 * @func: The function to run. This must be fast and non-blocking.
362 * @info: An arbitrary pointer to pass to the function. 362 * @info: An arbitrary pointer to pass to the function.
363 * @nonatomic: Currently unused. 363 * @nonatomic: Currently unused.
@@ -374,17 +374,21 @@ int smp_call_function_single (int cpu, void (*func) (void *info), void *info,
374{ 374{
375 /* prevent preemption and reschedule on another processor */ 375 /* prevent preemption and reschedule on another processor */
376 int me = get_cpu(); 376 int me = get_cpu();
377
378 /* Can deadlock when called with interrupts disabled */
379 WARN_ON(irqs_disabled());
380
377 if (cpu == me) { 381 if (cpu == me) {
382 local_irq_disable();
383 func(info);
384 local_irq_enable();
378 put_cpu(); 385 put_cpu();
379 return 0; 386 return 0;
380 } 387 }
381 388
382 /* Can deadlock when called with interrupts disabled */ 389 spin_lock(&call_lock);
383 WARN_ON(irqs_disabled());
384
385 spin_lock_bh(&call_lock);
386 __smp_call_function_single(cpu, func, info, nonatomic, wait); 390 __smp_call_function_single(cpu, func, info, nonatomic, wait);
387 spin_unlock_bh(&call_lock); 391 spin_unlock(&call_lock);
388 put_cpu(); 392 put_cpu();
389 return 0; 393 return 0;
390} 394}
diff --git a/arch/x86_64/kernel/tce.c b/arch/x86_64/kernel/tce.c
index f61fb8e4f129..3aeae2fa2e24 100644
--- a/arch/x86_64/kernel/tce.c
+++ b/arch/x86_64/kernel/tce.c
@@ -136,9 +136,9 @@ int build_tce_table(struct pci_dev *dev, void __iomem *bbar)
136 struct iommu_table *tbl; 136 struct iommu_table *tbl;
137 int ret; 137 int ret;
138 138
139 if (dev->sysdata) { 139 if (pci_iommu(dev->bus)) {
140 printk(KERN_ERR "Calgary: dev %p has sysdata %p\n", 140 printk(KERN_ERR "Calgary: dev %p has sysdata->iommu %p\n",
141 dev, dev->sysdata); 141 dev, pci_iommu(dev->bus));
142 BUG(); 142 BUG();
143 } 143 }
144 144
@@ -155,11 +155,7 @@ int build_tce_table(struct pci_dev *dev, void __iomem *bbar)
155 155
156 tbl->bbar = bbar; 156 tbl->bbar = bbar;
157 157
158 /* 158 set_pci_iommu(dev->bus, tbl);
159 * NUMA is already using the bus's sysdata pointer, so we use
160 * the bus's pci_dev's sysdata instead.
161 */
162 dev->sysdata = tbl;
163 159
164 return 0; 160 return 0;
165 161
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
index 4a0895bacf51..6d48a4e826d9 100644
--- a/arch/x86_64/kernel/time.c
+++ b/arch/x86_64/kernel/time.c
@@ -33,6 +33,7 @@
33#include <acpi/acpi_bus.h> 33#include <acpi/acpi_bus.h>
34#endif 34#endif
35#include <asm/8253pit.h> 35#include <asm/8253pit.h>
36#include <asm/i8253.h>
36#include <asm/pgtable.h> 37#include <asm/pgtable.h>
37#include <asm/vsyscall.h> 38#include <asm/vsyscall.h>
38#include <asm/timex.h> 39#include <asm/timex.h>
@@ -44,12 +45,14 @@
44#include <asm/hpet.h> 45#include <asm/hpet.h>
45#include <asm/mpspec.h> 46#include <asm/mpspec.h>
46#include <asm/nmi.h> 47#include <asm/nmi.h>
48#include <asm/vgtod.h>
47 49
48static char *timename = NULL; 50static char *timename = NULL;
49 51
50DEFINE_SPINLOCK(rtc_lock); 52DEFINE_SPINLOCK(rtc_lock);
51EXPORT_SYMBOL(rtc_lock); 53EXPORT_SYMBOL(rtc_lock);
52DEFINE_SPINLOCK(i8253_lock); 54DEFINE_SPINLOCK(i8253_lock);
55EXPORT_SYMBOL(i8253_lock);
53 56
54volatile unsigned long __jiffies __section_jiffies = INITIAL_JIFFIES; 57volatile unsigned long __jiffies __section_jiffies = INITIAL_JIFFIES;
55 58
@@ -79,8 +82,9 @@ EXPORT_SYMBOL(profile_pc);
79 * sheet for details. 82 * sheet for details.
80 */ 83 */
81 84
82static void set_rtc_mmss(unsigned long nowtime) 85static int set_rtc_mmss(unsigned long nowtime)
83{ 86{
87 int retval = 0;
84 int real_seconds, real_minutes, cmos_minutes; 88 int real_seconds, real_minutes, cmos_minutes;
85 unsigned char control, freq_select; 89 unsigned char control, freq_select;
86 90
@@ -120,6 +124,7 @@ static void set_rtc_mmss(unsigned long nowtime)
120 if (abs(real_minutes - cmos_minutes) >= 30) { 124 if (abs(real_minutes - cmos_minutes) >= 30) {
121 printk(KERN_WARNING "time.c: can't update CMOS clock " 125 printk(KERN_WARNING "time.c: can't update CMOS clock "
122 "from %d to %d\n", cmos_minutes, real_minutes); 126 "from %d to %d\n", cmos_minutes, real_minutes);
127 retval = -1;
123 } else { 128 } else {
124 BIN_TO_BCD(real_seconds); 129 BIN_TO_BCD(real_seconds);
125 BIN_TO_BCD(real_minutes); 130 BIN_TO_BCD(real_minutes);
@@ -139,12 +144,17 @@ static void set_rtc_mmss(unsigned long nowtime)
139 CMOS_WRITE(freq_select, RTC_FREQ_SELECT); 144 CMOS_WRITE(freq_select, RTC_FREQ_SELECT);
140 145
141 spin_unlock(&rtc_lock); 146 spin_unlock(&rtc_lock);
147
148 return retval;
142} 149}
143 150
151int update_persistent_clock(struct timespec now)
152{
153 return set_rtc_mmss(now.tv_sec);
154}
144 155
145void main_timer_handler(void) 156void main_timer_handler(void)
146{ 157{
147 static unsigned long rtc_update = 0;
148/* 158/*
149 * Here we are in the timer irq handler. We have irqs locally disabled (so we 159 * Here we are in the timer irq handler. We have irqs locally disabled (so we
150 * don't need spin_lock_irqsave()) but we don't know if the timer_bh is running 160 * don't need spin_lock_irqsave()) but we don't know if the timer_bh is running
@@ -172,20 +182,6 @@ void main_timer_handler(void)
172 if (!using_apic_timer) 182 if (!using_apic_timer)
173 smp_local_timer_interrupt(); 183 smp_local_timer_interrupt();
174 184
175/*
176 * If we have an externally synchronized Linux clock, then update CMOS clock
177 * accordingly every ~11 minutes. set_rtc_mmss() will be called in the jiffy
178 * closest to exactly 500 ms before the next second. If the update fails, we
179 * don't care, as it'll be updated on the next turn, and the problem (time way
180 * off) isn't likely to go away much sooner anyway.
181 */
182
183 if (ntp_synced() && xtime.tv_sec > rtc_update &&
184 abs(xtime.tv_nsec - 500000000) <= tick_nsec / 2) {
185 set_rtc_mmss(xtime.tv_sec);
186 rtc_update = xtime.tv_sec + 660;
187 }
188
189 write_sequnlock(&xtime_lock); 185 write_sequnlock(&xtime_lock);
190} 186}
191 187
@@ -199,7 +195,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
199 return IRQ_HANDLED; 195 return IRQ_HANDLED;
200} 196}
201 197
202static unsigned long get_cmos_time(void) 198unsigned long read_persistent_clock(void)
203{ 199{
204 unsigned int year, mon, day, hour, min, sec; 200 unsigned int year, mon, day, hour, min, sec;
205 unsigned long flags; 201 unsigned long flags;
@@ -226,7 +222,7 @@ static unsigned long get_cmos_time(void)
226 /* 222 /*
227 * We know that x86-64 always uses BCD format, no need to check the 223 * We know that x86-64 always uses BCD format, no need to check the
228 * config register. 224 * config register.
229 */ 225 */
230 226
231 BCD_TO_BIN(sec); 227 BCD_TO_BIN(sec);
232 BCD_TO_BIN(min); 228 BCD_TO_BIN(min);
@@ -239,11 +235,11 @@ static unsigned long get_cmos_time(void)
239 BCD_TO_BIN(century); 235 BCD_TO_BIN(century);
240 year += century * 100; 236 year += century * 100;
241 printk(KERN_INFO "Extended CMOS year: %d\n", century * 100); 237 printk(KERN_INFO "Extended CMOS year: %d\n", century * 100);
242 } else { 238 } else {
243 /* 239 /*
244 * x86-64 systems only exists since 2002. 240 * x86-64 systems only exists since 2002.
245 * This will work up to Dec 31, 2100 241 * This will work up to Dec 31, 2100
246 */ 242 */
247 year += 2000; 243 year += 2000;
248 } 244 }
249 245
@@ -255,45 +251,45 @@ static unsigned long get_cmos_time(void)
255#define TICK_COUNT 100000000 251#define TICK_COUNT 100000000
256static unsigned int __init tsc_calibrate_cpu_khz(void) 252static unsigned int __init tsc_calibrate_cpu_khz(void)
257{ 253{
258 int tsc_start, tsc_now; 254 int tsc_start, tsc_now;
259 int i, no_ctr_free; 255 int i, no_ctr_free;
260 unsigned long evntsel3 = 0, pmc3 = 0, pmc_now = 0; 256 unsigned long evntsel3 = 0, pmc3 = 0, pmc_now = 0;
261 unsigned long flags; 257 unsigned long flags;
262 258
263 for (i = 0; i < 4; i++) 259 for (i = 0; i < 4; i++)
264 if (avail_to_resrv_perfctr_nmi_bit(i)) 260 if (avail_to_resrv_perfctr_nmi_bit(i))
265 break; 261 break;
266 no_ctr_free = (i == 4); 262 no_ctr_free = (i == 4);
267 if (no_ctr_free) { 263 if (no_ctr_free) {
268 i = 3; 264 i = 3;
269 rdmsrl(MSR_K7_EVNTSEL3, evntsel3); 265 rdmsrl(MSR_K7_EVNTSEL3, evntsel3);
270 wrmsrl(MSR_K7_EVNTSEL3, 0); 266 wrmsrl(MSR_K7_EVNTSEL3, 0);
271 rdmsrl(MSR_K7_PERFCTR3, pmc3); 267 rdmsrl(MSR_K7_PERFCTR3, pmc3);
272 } else { 268 } else {
273 reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i); 269 reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i);
274 reserve_evntsel_nmi(MSR_K7_EVNTSEL0 + i); 270 reserve_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
275 } 271 }
276 local_irq_save(flags); 272 local_irq_save(flags);
277 /* start meauring cycles, incrementing from 0 */ 273 /* start meauring cycles, incrementing from 0 */
278 wrmsrl(MSR_K7_PERFCTR0 + i, 0); 274 wrmsrl(MSR_K7_PERFCTR0 + i, 0);
279 wrmsrl(MSR_K7_EVNTSEL0 + i, 1 << 22 | 3 << 16 | 0x76); 275 wrmsrl(MSR_K7_EVNTSEL0 + i, 1 << 22 | 3 << 16 | 0x76);
280 rdtscl(tsc_start); 276 rdtscl(tsc_start);
281 do { 277 do {
282 rdmsrl(MSR_K7_PERFCTR0 + i, pmc_now); 278 rdmsrl(MSR_K7_PERFCTR0 + i, pmc_now);
283 tsc_now = get_cycles_sync(); 279 tsc_now = get_cycles_sync();
284 } while ((tsc_now - tsc_start) < TICK_COUNT); 280 } while ((tsc_now - tsc_start) < TICK_COUNT);
285 281
286 local_irq_restore(flags); 282 local_irq_restore(flags);
287 if (no_ctr_free) { 283 if (no_ctr_free) {
288 wrmsrl(MSR_K7_EVNTSEL3, 0); 284 wrmsrl(MSR_K7_EVNTSEL3, 0);
289 wrmsrl(MSR_K7_PERFCTR3, pmc3); 285 wrmsrl(MSR_K7_PERFCTR3, pmc3);
290 wrmsrl(MSR_K7_EVNTSEL3, evntsel3); 286 wrmsrl(MSR_K7_EVNTSEL3, evntsel3);
291 } else { 287 } else {
292 release_perfctr_nmi(MSR_K7_PERFCTR0 + i); 288 release_perfctr_nmi(MSR_K7_PERFCTR0 + i);
293 release_evntsel_nmi(MSR_K7_EVNTSEL0 + i); 289 release_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
294 } 290 }
295 291
296 return pmc_now * tsc_khz / (tsc_now - tsc_start); 292 return pmc_now * tsc_khz / (tsc_now - tsc_start);
297} 293}
298 294
299/* 295/*
@@ -321,7 +317,7 @@ static unsigned int __init pit_calibrate_tsc(void)
321 end = get_cycles_sync(); 317 end = get_cycles_sync();
322 318
323 spin_unlock_irqrestore(&i8253_lock, flags); 319 spin_unlock_irqrestore(&i8253_lock, flags);
324 320
325 return (end - start) / 50; 321 return (end - start) / 50;
326} 322}
327 323
@@ -366,25 +362,20 @@ static struct irqaction irq0 = {
366 .handler = timer_interrupt, 362 .handler = timer_interrupt,
367 .flags = IRQF_DISABLED | IRQF_IRQPOLL, 363 .flags = IRQF_DISABLED | IRQF_IRQPOLL,
368 .mask = CPU_MASK_NONE, 364 .mask = CPU_MASK_NONE,
369 .name = "timer" 365 .name = "timer"
370}; 366};
371 367
372void __init time_init(void) 368void __init time_init(void)
373{ 369{
374 if (nohpet) 370 if (nohpet)
375 hpet_address = 0; 371 hpet_address = 0;
376 xtime.tv_sec = get_cmos_time();
377 xtime.tv_nsec = 0;
378
379 set_normalized_timespec(&wall_to_monotonic,
380 -xtime.tv_sec, -xtime.tv_nsec);
381 372
382 if (hpet_arch_init()) 373 if (hpet_arch_init())
383 hpet_address = 0; 374 hpet_address = 0;
384 375
385 if (hpet_use_timer) { 376 if (hpet_use_timer) {
386 /* set tick_nsec to use the proper rate for HPET */ 377 /* set tick_nsec to use the proper rate for HPET */
387 tick_nsec = TICK_NSEC_HPET; 378 tick_nsec = TICK_NSEC_HPET;
388 tsc_khz = hpet_calibrate_tsc(); 379 tsc_khz = hpet_calibrate_tsc();
389 timename = "HPET"; 380 timename = "HPET";
390 } else { 381 } else {
@@ -415,54 +406,21 @@ void __init time_init(void)
415 setup_irq(0, &irq0); 406 setup_irq(0, &irq0);
416} 407}
417 408
418
419static long clock_cmos_diff;
420static unsigned long sleep_start;
421
422/* 409/*
423 * sysfs support for the timer. 410 * sysfs support for the timer.
424 */ 411 */
425 412
426static int timer_suspend(struct sys_device *dev, pm_message_t state) 413static int timer_suspend(struct sys_device *dev, pm_message_t state)
427{ 414{
428 /*
429 * Estimate time zone so that set_time can update the clock
430 */
431 long cmos_time = get_cmos_time();
432
433 clock_cmos_diff = -cmos_time;
434 clock_cmos_diff += get_seconds();
435 sleep_start = cmos_time;
436 return 0; 415 return 0;
437} 416}
438 417
439static int timer_resume(struct sys_device *dev) 418static int timer_resume(struct sys_device *dev)
440{ 419{
441 unsigned long flags;
442 unsigned long sec;
443 unsigned long ctime = get_cmos_time();
444 long sleep_length = (ctime - sleep_start) * HZ;
445
446 if (sleep_length < 0) {
447 printk(KERN_WARNING "Time skew detected in timer resume!\n");
448 /* The time after the resume must not be earlier than the time
449 * before the suspend or some nasty things will happen
450 */
451 sleep_length = 0;
452 ctime = sleep_start;
453 }
454 if (hpet_address) 420 if (hpet_address)
455 hpet_reenable(); 421 hpet_reenable();
456 else 422 else
457 i8254_timer_resume(); 423 i8254_timer_resume();
458
459 sec = ctime + clock_cmos_diff;
460 write_seqlock_irqsave(&xtime_lock,flags);
461 xtime.tv_sec = sec;
462 xtime.tv_nsec = 0;
463 jiffies += sleep_length;
464 write_sequnlock_irqrestore(&xtime_lock,flags);
465 touch_softlockup_watchdog();
466 return 0; 424 return 0;
467} 425}
468 426
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
index cb29fb96948d..8713ad4a4db1 100644
--- a/arch/x86_64/kernel/traps.c
+++ b/arch/x86_64/kernel/traps.c
@@ -34,6 +34,10 @@
34#include <linux/bug.h> 34#include <linux/bug.h>
35#include <linux/kdebug.h> 35#include <linux/kdebug.h>
36 36
37#if defined(CONFIG_EDAC)
38#include <linux/edac.h>
39#endif
40
37#include <asm/system.h> 41#include <asm/system.h>
38#include <asm/io.h> 42#include <asm/io.h>
39#include <asm/atomic.h> 43#include <asm/atomic.h>
@@ -330,6 +334,7 @@ static int print_trace_stack(void *data, char *name)
330 334
331static void print_trace_address(void *data, unsigned long addr) 335static void print_trace_address(void *data, unsigned long addr)
332{ 336{
337 touch_nmi_watchdog();
333 printk_address(addr); 338 printk_address(addr);
334} 339}
335 340
@@ -465,13 +470,14 @@ static unsigned int die_nest_count;
465 470
466unsigned __kprobes long oops_begin(void) 471unsigned __kprobes long oops_begin(void)
467{ 472{
468 int cpu = smp_processor_id(); 473 int cpu;
469 unsigned long flags; 474 unsigned long flags;
470 475
471 oops_enter(); 476 oops_enter();
472 477
473 /* racy, but better than risking deadlock. */ 478 /* racy, but better than risking deadlock. */
474 local_irq_save(flags); 479 local_irq_save(flags);
480 cpu = smp_processor_id();
475 if (!spin_trylock(&die_lock)) { 481 if (!spin_trylock(&die_lock)) {
476 if (cpu == die_owner) 482 if (cpu == die_owner)
477 /* nested oops. should stop eventually */; 483 /* nested oops. should stop eventually */;
@@ -517,6 +523,7 @@ void __kprobes __die(const char * str, struct pt_regs * regs, long err)
517 printk("\n"); 523 printk("\n");
518 notify_die(DIE_OOPS, str, regs, err, current->thread.trap_no, SIGSEGV); 524 notify_die(DIE_OOPS, str, regs, err, current->thread.trap_no, SIGSEGV);
519 show_registers(regs); 525 show_registers(regs);
526 add_taint(TAINT_DIE);
520 /* Executive summary in case the oops scrolled away */ 527 /* Executive summary in case the oops scrolled away */
521 printk(KERN_ALERT "RIP "); 528 printk(KERN_ALERT "RIP ");
522 printk_address(regs->rip); 529 printk_address(regs->rip);
@@ -530,7 +537,7 @@ void die(const char * str, struct pt_regs * regs, long err)
530 unsigned long flags = oops_begin(); 537 unsigned long flags = oops_begin();
531 538
532 if (!user_mode(regs)) 539 if (!user_mode(regs))
533 report_bug(regs->rip); 540 report_bug(regs->rip, regs);
534 541
535 __die(str, regs, err); 542 __die(str, regs, err);
536 oops_end(flags); 543 oops_end(flags);
@@ -716,6 +723,13 @@ mem_parity_error(unsigned char reason, struct pt_regs * regs)
716 reason); 723 reason);
717 printk(KERN_EMERG "You have some hardware problem, likely on the PCI bus.\n"); 724 printk(KERN_EMERG "You have some hardware problem, likely on the PCI bus.\n");
718 725
726#if defined(CONFIG_EDAC)
727 if(edac_handler_set()) {
728 edac_atomic_assert_error();
729 return;
730 }
731#endif
732
719 if (panic_on_unrecovered_nmi) 733 if (panic_on_unrecovered_nmi)
720 panic("NMI: Not continuing"); 734 panic("NMI: Not continuing");
721 735
diff --git a/arch/x86_64/kernel/tsc.c b/arch/x86_64/kernel/tsc.c
index 48f9a8e6aa91..9b76b03d0600 100644
--- a/arch/x86_64/kernel/tsc.c
+++ b/arch/x86_64/kernel/tsc.c
@@ -44,7 +44,7 @@ unsigned long long sched_clock(void)
44 44
45static int tsc_unstable; 45static int tsc_unstable;
46 46
47static inline int check_tsc_unstable(void) 47inline int check_tsc_unstable(void)
48{ 48{
49 return tsc_unstable; 49 return tsc_unstable;
50} 50}
@@ -61,25 +61,9 @@ static inline int check_tsc_unstable(void)
61 * first tick after the change will be slightly wrong. 61 * first tick after the change will be slightly wrong.
62 */ 62 */
63 63
64#include <linux/workqueue.h> 64static unsigned int ref_freq;
65 65static unsigned long loops_per_jiffy_ref;
66static unsigned int cpufreq_delayed_issched = 0; 66static unsigned long tsc_khz_ref;
67static unsigned int cpufreq_init = 0;
68static struct work_struct cpufreq_delayed_get_work;
69
70static void handle_cpufreq_delayed_get(struct work_struct *v)
71{
72 unsigned int cpu;
73 for_each_online_cpu(cpu) {
74 cpufreq_get(cpu);
75 }
76 cpufreq_delayed_issched = 0;
77}
78
79static unsigned int ref_freq = 0;
80static unsigned long loops_per_jiffy_ref = 0;
81
82static unsigned long tsc_khz_ref = 0;
83 67
84static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, 68static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
85 void *data) 69 void *data)
@@ -125,10 +109,8 @@ static struct notifier_block time_cpufreq_notifier_block = {
125 109
126static int __init cpufreq_tsc(void) 110static int __init cpufreq_tsc(void)
127{ 111{
128 INIT_WORK(&cpufreq_delayed_get_work, handle_cpufreq_delayed_get); 112 cpufreq_register_notifier(&time_cpufreq_notifier_block,
129 if (!cpufreq_register_notifier(&time_cpufreq_notifier_block, 113 CPUFREQ_TRANSITION_NOTIFIER);
130 CPUFREQ_TRANSITION_NOTIFIER))
131 cpufreq_init = 1;
132 return 0; 114 return 0;
133} 115}
134 116
@@ -153,17 +135,18 @@ __cpuinit int unsynchronized_tsc(void)
153#endif 135#endif
154 /* Most intel systems have synchronized TSCs except for 136 /* Most intel systems have synchronized TSCs except for
155 multi node systems */ 137 multi node systems */
156 if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) { 138 if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) {
157#ifdef CONFIG_ACPI 139#ifdef CONFIG_ACPI
158 /* But TSC doesn't tick in C3 so don't use it there */ 140 /* But TSC doesn't tick in C3 so don't use it there */
159 if (acpi_gbl_FADT.header.length > 0 && acpi_gbl_FADT.C3latency < 1000) 141 if (acpi_gbl_FADT.header.length > 0 &&
142 acpi_gbl_FADT.C3latency < 1000)
160 return 1; 143 return 1;
161#endif 144#endif
162 return 0; 145 return 0;
163 } 146 }
164 147
165 /* Assume multi socket systems are not synchronized */ 148 /* Assume multi socket systems are not synchronized */
166 return num_present_cpus() > 1; 149 return num_present_cpus() > 1;
167} 150}
168 151
169int __init notsc_setup(char *s) 152int __init notsc_setup(char *s)
diff --git a/arch/x86_64/kernel/verify_cpu.S b/arch/x86_64/kernel/verify_cpu.S
index e035f5948199..45b6f8a975a1 100644
--- a/arch/x86_64/kernel/verify_cpu.S
+++ b/arch/x86_64/kernel/verify_cpu.S
@@ -37,20 +37,6 @@ verify_cpu:
37 pushl $0 # Kill any dangerous flags 37 pushl $0 # Kill any dangerous flags
38 popfl 38 popfl
39 39
40 /* minimum CPUID flags for x86-64 as defined by AMD */
41#define M(x) (1<<(x))
42#define M2(a,b) M(a)|M(b)
43#define M4(a,b,c,d) M(a)|M(b)|M(c)|M(d)
44
45#define SSE_MASK \
46 (M2(X86_FEATURE_XMM,X86_FEATURE_XMM2))
47#define REQUIRED_MASK1 \
48 (M4(X86_FEATURE_FPU,X86_FEATURE_PSE,X86_FEATURE_TSC,X86_FEATURE_MSR)|\
49 M4(X86_FEATURE_PAE,X86_FEATURE_CX8,X86_FEATURE_PGE,X86_FEATURE_CMOV)|\
50 M(X86_FEATURE_FXSR))
51#define REQUIRED_MASK2 \
52 (M(X86_FEATURE_LM - 32))
53
54 pushfl # standard way to check for cpuid 40 pushfl # standard way to check for cpuid
55 popl %eax 41 popl %eax
56 movl %eax,%ebx 42 movl %eax,%ebx
@@ -79,8 +65,8 @@ verify_cpu:
79verify_cpu_noamd: 65verify_cpu_noamd:
80 movl $0x1,%eax # Does the cpu have what it takes 66 movl $0x1,%eax # Does the cpu have what it takes
81 cpuid 67 cpuid
82 andl $REQUIRED_MASK1,%edx 68 andl $REQUIRED_MASK0,%edx
83 xorl $REQUIRED_MASK1,%edx 69 xorl $REQUIRED_MASK0,%edx
84 jnz verify_cpu_no_longmode 70 jnz verify_cpu_no_longmode
85 71
86 movl $0x80000000,%eax # See if extended cpuid is implemented 72 movl $0x80000000,%eax # See if extended cpuid is implemented
@@ -90,8 +76,8 @@ verify_cpu_noamd:
90 76
91 movl $0x80000001,%eax # Does the cpu have what it takes 77 movl $0x80000001,%eax # Does the cpu have what it takes
92 cpuid 78 cpuid
93 andl $REQUIRED_MASK2,%edx 79 andl $REQUIRED_MASK1,%edx
94 xorl $REQUIRED_MASK2,%edx 80 xorl $REQUIRED_MASK1,%edx
95 jnz verify_cpu_no_longmode 81 jnz verify_cpu_no_longmode
96 82
97verify_cpu_sse_test: 83verify_cpu_sse_test:
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S
index dbccfda8364f..e7a5eb6cd785 100644
--- a/arch/x86_64/kernel/vmlinux.lds.S
+++ b/arch/x86_64/kernel/vmlinux.lds.S
@@ -48,10 +48,19 @@ SECTIONS
48 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { *(__ex_table) } 48 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { *(__ex_table) }
49 __stop___ex_table = .; 49 __stop___ex_table = .;
50 50
51 BUG_TABLE 51 NOTES :text :note
52
53 BUG_TABLE :text
52 54
53 RODATA 55 RODATA
54 56
57 . = ALIGN(4);
58 .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) {
59 __tracedata_start = .;
60 *(.tracedata)
61 __tracedata_end = .;
62 }
63
55 . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */ 64 . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */
56 /* Data */ 65 /* Data */
57 .data : AT(ADDR(.data) - LOAD_OFFSET) { 66 .data : AT(ADDR(.data) - LOAD_OFFSET) {
@@ -91,6 +100,9 @@ SECTIONS
91 .vsyscall_gtod_data : AT(VLOAD(.vsyscall_gtod_data)) 100 .vsyscall_gtod_data : AT(VLOAD(.vsyscall_gtod_data))
92 { *(.vsyscall_gtod_data) } 101 { *(.vsyscall_gtod_data) }
93 vsyscall_gtod_data = VVIRT(.vsyscall_gtod_data); 102 vsyscall_gtod_data = VVIRT(.vsyscall_gtod_data);
103 .vsyscall_clock : AT(VLOAD(.vsyscall_clock))
104 { *(.vsyscall_clock) }
105 vsyscall_clock = VVIRT(.vsyscall_clock);
94 106
95 107
96 .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT(VLOAD(.vsyscall_1)) 108 .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT(VLOAD(.vsyscall_1))
@@ -131,20 +143,11 @@ SECTIONS
131 /* might get freed after init */ 143 /* might get freed after init */
132 . = ALIGN(4096); 144 . = ALIGN(4096);
133 __smp_alt_begin = .; 145 __smp_alt_begin = .;
134 __smp_alt_instructions = .;
135 .smp_altinstructions : AT(ADDR(.smp_altinstructions) - LOAD_OFFSET) {
136 *(.smp_altinstructions)
137 }
138 __smp_alt_instructions_end = .;
139 . = ALIGN(8);
140 __smp_locks = .; 146 __smp_locks = .;
141 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { 147 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
142 *(.smp_locks) 148 *(.smp_locks)
143 } 149 }
144 __smp_locks_end = .; 150 __smp_locks_end = .;
145 .smp_altinstr_replacement : AT(ADDR(.smp_altinstr_replacement) - LOAD_OFFSET) {
146 *(.smp_altinstr_replacement)
147 }
148 . = ALIGN(4096); 151 . = ALIGN(4096);
149 __smp_alt_end = .; 152 __smp_alt_end = .;
150 153
@@ -187,6 +190,12 @@ SECTIONS
187 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) } 190 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) }
188 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) } 191 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) }
189 192
193/* vdso blob that is mapped into user space */
194 vdso_start = . ;
195 .vdso : AT(ADDR(.vdso) - LOAD_OFFSET) { *(.vdso) }
196 . = ALIGN(4096);
197 vdso_end = .;
198
190#ifdef CONFIG_BLK_DEV_INITRD 199#ifdef CONFIG_BLK_DEV_INITRD
191 . = ALIGN(4096); 200 . = ALIGN(4096);
192 __initramfs_start = .; 201 __initramfs_start = .;
@@ -194,10 +203,8 @@ SECTIONS
194 __initramfs_end = .; 203 __initramfs_end = .;
195#endif 204#endif
196 205
197 . = ALIGN(4096); 206 PERCPU(4096)
198 __per_cpu_start = .; 207
199 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) }
200 __per_cpu_end = .;
201 . = ALIGN(4096); 208 . = ALIGN(4096);
202 __init_end = .; 209 __init_end = .;
203 210
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c
index 57660d58d500..06c34949bfdc 100644
--- a/arch/x86_64/kernel/vsyscall.c
+++ b/arch/x86_64/kernel/vsyscall.c
@@ -42,6 +42,7 @@
42#include <asm/segment.h> 42#include <asm/segment.h>
43#include <asm/desc.h> 43#include <asm/desc.h>
44#include <asm/topology.h> 44#include <asm/topology.h>
45#include <asm/vgtod.h>
45 46
46#define __vsyscall(nr) __attribute__ ((unused,__section__(".vsyscall_" #nr))) 47#define __vsyscall(nr) __attribute__ ((unused,__section__(".vsyscall_" #nr)))
47#define __syscall_clobber "r11","rcx","memory" 48#define __syscall_clobber "r11","rcx","memory"
@@ -57,26 +58,9 @@
57 * - writen by timer interrupt or systcl (/proc/sys/kernel/vsyscall64) 58 * - writen by timer interrupt or systcl (/proc/sys/kernel/vsyscall64)
58 * Try to keep this structure as small as possible to avoid cache line ping pongs 59 * Try to keep this structure as small as possible to avoid cache line ping pongs
59 */ 60 */
60struct vsyscall_gtod_data_t {
61 seqlock_t lock;
62
63 /* open coded 'struct timespec' */
64 time_t wall_time_sec;
65 u32 wall_time_nsec;
66
67 int sysctl_enabled;
68 struct timezone sys_tz;
69 struct { /* extract of a clocksource struct */
70 cycle_t (*vread)(void);
71 cycle_t cycle_last;
72 cycle_t mask;
73 u32 mult;
74 u32 shift;
75 } clock;
76};
77int __vgetcpu_mode __section_vgetcpu_mode; 61int __vgetcpu_mode __section_vgetcpu_mode;
78 62
79struct vsyscall_gtod_data_t __vsyscall_gtod_data __section_vsyscall_gtod_data = 63struct vsyscall_gtod_data __vsyscall_gtod_data __section_vsyscall_gtod_data =
80{ 64{
81 .lock = SEQLOCK_UNLOCKED, 65 .lock = SEQLOCK_UNLOCKED,
82 .sysctl_enabled = 1, 66 .sysctl_enabled = 1,
@@ -96,6 +80,8 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock)
96 vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec; 80 vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec;
97 vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec; 81 vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec;
98 vsyscall_gtod_data.sys_tz = sys_tz; 82 vsyscall_gtod_data.sys_tz = sys_tz;
83 vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec;
84 vsyscall_gtod_data.wall_to_monotonic = wall_to_monotonic;
99 write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags); 85 write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags);
100} 86}
101 87
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
index bfb62a13d7ee..2074bddd4f04 100644
--- a/arch/x86_64/mm/fault.c
+++ b/arch/x86_64/mm/fault.c
@@ -301,7 +301,7 @@ static int vmalloc_fault(unsigned long address)
301 return 0; 301 return 0;
302} 302}
303 303
304int page_fault_trace = 0; 304static int page_fault_trace;
305int exception_trace = 1; 305int exception_trace = 1;
306 306
307/* 307/*
@@ -317,7 +317,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
317 struct vm_area_struct * vma; 317 struct vm_area_struct * vma;
318 unsigned long address; 318 unsigned long address;
319 const struct exception_table_entry *fixup; 319 const struct exception_table_entry *fixup;
320 int write; 320 int write, fault;
321 unsigned long flags; 321 unsigned long flags;
322 siginfo_t info; 322 siginfo_t info;
323 323
@@ -450,19 +450,18 @@ good_area:
450 * make sure we exit gracefully rather than endlessly redo 450 * make sure we exit gracefully rather than endlessly redo
451 * the fault. 451 * the fault.
452 */ 452 */
453 switch (handle_mm_fault(mm, vma, address, write)) { 453 fault = handle_mm_fault(mm, vma, address, write);
454 case VM_FAULT_MINOR: 454 if (unlikely(fault & VM_FAULT_ERROR)) {
455 tsk->min_flt++; 455 if (fault & VM_FAULT_OOM)
456 break; 456 goto out_of_memory;
457 case VM_FAULT_MAJOR: 457 else if (fault & VM_FAULT_SIGBUS)
458 tsk->maj_flt++; 458 goto do_sigbus;
459 break; 459 BUG();
460 case VM_FAULT_SIGBUS:
461 goto do_sigbus;
462 default:
463 goto out_of_memory;
464 } 460 }
465 461 if (fault & VM_FAULT_MAJOR)
462 tsk->maj_flt++;
463 else
464 tsk->min_flt++;
466 up_read(&mm->mmap_sem); 465 up_read(&mm->mmap_sem);
467 return; 466 return;
468 467
@@ -476,6 +475,12 @@ bad_area:
476bad_area_nosemaphore: 475bad_area_nosemaphore:
477 /* User mode accesses just cause a SIGSEGV */ 476 /* User mode accesses just cause a SIGSEGV */
478 if (error_code & PF_USER) { 477 if (error_code & PF_USER) {
478
479 /*
480 * It's possible to have interrupts off here.
481 */
482 local_irq_enable();
483
479 if (is_prefetch(regs, address, error_code)) 484 if (is_prefetch(regs, address, error_code))
480 return; 485 return;
481 486
@@ -563,7 +568,7 @@ out_of_memory:
563 } 568 }
564 printk("VM: killing process %s\n", tsk->comm); 569 printk("VM: killing process %s\n", tsk->comm);
565 if (error_code & 4) 570 if (error_code & 4)
566 do_exit(SIGKILL); 571 do_group_exit(SIGKILL);
567 goto no_context; 572 goto no_context;
568 573
569do_sigbus: 574do_sigbus:
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index 1ad5111aec38..381c2ecd407e 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -79,6 +79,8 @@ void show_mem(void)
79 if (unlikely(i % MAX_ORDER_NR_PAGES == 0)) { 79 if (unlikely(i % MAX_ORDER_NR_PAGES == 0)) {
80 touch_nmi_watchdog(); 80 touch_nmi_watchdog();
81 } 81 }
82 if (!pfn_valid(pgdat->node_start_pfn + i))
83 continue;
82 page = pfn_to_page(pgdat->node_start_pfn + i); 84 page = pfn_to_page(pgdat->node_start_pfn + i);
83 total++; 85 total++;
84 if (PageReserved(page)) 86 if (PageReserved(page))
@@ -603,6 +605,11 @@ void mark_rodata_ro(void)
603 if (num_possible_cpus() > 1) 605 if (num_possible_cpus() > 1)
604 start = (unsigned long)_etext; 606 start = (unsigned long)_etext;
605#endif 607#endif
608
609#ifdef CONFIG_KPROBES
610 start = (unsigned long)__start_rodata;
611#endif
612
606 end = (unsigned long)__end_rodata; 613 end = (unsigned long)__end_rodata;
607 start = (start + PAGE_SIZE - 1) & PAGE_MASK; 614 start = (start + PAGE_SIZE - 1) & PAGE_MASK;
608 end &= PAGE_MASK; 615 end &= PAGE_MASK;
@@ -693,8 +700,6 @@ int kern_addr_valid(unsigned long addr)
693#ifdef CONFIG_SYSCTL 700#ifdef CONFIG_SYSCTL
694#include <linux/sysctl.h> 701#include <linux/sysctl.h>
695 702
696extern int exception_trace, page_fault_trace;
697
698static ctl_table debug_table2[] = { 703static ctl_table debug_table2[] = {
699 { 704 {
700 .ctl_name = 99, 705 .ctl_name = 99,
@@ -767,3 +772,12 @@ void *alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size)
767 return __alloc_bootmem_core(pgdat->bdata, size, 772 return __alloc_bootmem_core(pgdat->bdata, size,
768 SMP_CACHE_BYTES, (4UL*1024*1024*1024), 0); 773 SMP_CACHE_BYTES, (4UL*1024*1024*1024), 0);
769} 774}
775
776const char *arch_vma_name(struct vm_area_struct *vma)
777{
778 if (vma->vm_mm && vma->vm_start == (long)vma->vm_mm->context.vdso)
779 return "[vdso]";
780 if (vma == &gate_vma)
781 return "[vsyscall]";
782 return NULL;
783}
diff --git a/arch/x86_64/mm/k8topology.c b/arch/x86_64/mm/k8topology.c
index f983c75825d0..a96006f7ae0c 100644
--- a/arch/x86_64/mm/k8topology.c
+++ b/arch/x86_64/mm/k8topology.c
@@ -44,12 +44,12 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
44{ 44{
45 unsigned long prevbase; 45 unsigned long prevbase;
46 struct bootnode nodes[8]; 46 struct bootnode nodes[8];
47 int nodeid, i, nb; 47 int nodeid, i, j, nb;
48 unsigned char nodeids[8]; 48 unsigned char nodeids[8];
49 int found = 0; 49 int found = 0;
50 u32 reg; 50 u32 reg;
51 unsigned numnodes; 51 unsigned numnodes;
52 unsigned dualcore = 0; 52 unsigned num_cores;
53 53
54 if (!early_pci_allowed()) 54 if (!early_pci_allowed())
55 return -1; 55 return -1;
@@ -60,6 +60,9 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
60 60
61 printk(KERN_INFO "Scanning NUMA topology in Northbridge %d\n", nb); 61 printk(KERN_INFO "Scanning NUMA topology in Northbridge %d\n", nb);
62 62
63 num_cores = (cpuid_ecx(0x80000008) & 0xff) + 1;
64 printk(KERN_INFO "CPU has %d num_cores\n", num_cores);
65
63 reg = read_pci_config(0, nb, 0, 0x60); 66 reg = read_pci_config(0, nb, 0, 0x60);
64 numnodes = ((reg >> 4) & 0xF) + 1; 67 numnodes = ((reg >> 4) & 0xF) + 1;
65 if (numnodes <= 1) 68 if (numnodes <= 1)
@@ -73,8 +76,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
73 unsigned long base,limit; 76 unsigned long base,limit;
74 u32 nodeid; 77 u32 nodeid;
75 78
76 /* Undefined before E stepping, but hopefully 0 */
77 dualcore |= ((read_pci_config(0, nb, 3, 0xe8) >> 12) & 3) == 1;
78 base = read_pci_config(0, nb, 1, 0x40 + i*8); 79 base = read_pci_config(0, nb, 1, 0x40 + i*8);
79 limit = read_pci_config(0, nb, 1, 0x44 + i*8); 80 limit = read_pci_config(0, nb, 1, 0x44 + i*8);
80 81
@@ -170,8 +171,8 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
170 for (i = 0; i < 8; i++) { 171 for (i = 0; i < 8; i++) {
171 if (nodes[i].start != nodes[i].end) { 172 if (nodes[i].start != nodes[i].end) {
172 nodeid = nodeids[i]; 173 nodeid = nodeids[i];
173 apicid_to_node[nodeid << dualcore] = i; 174 for (j = 0; j < num_cores; j++)
174 apicid_to_node[(nodeid << dualcore) + dualcore] = i; 175 apicid_to_node[(nodeid * num_cores) + j] = i;
175 setup_node_bootmem(i, nodes[i].start, nodes[i].end); 176 setup_node_bootmem(i, nodes[i].start, nodes[i].end);
176 } 177 }
177 } 178 }
diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c
index 51548947ad3b..6da235522269 100644
--- a/arch/x86_64/mm/numa.c
+++ b/arch/x86_64/mm/numa.c
@@ -273,9 +273,6 @@ void __init numa_init_array(void)
273 273
274#ifdef CONFIG_NUMA_EMU 274#ifdef CONFIG_NUMA_EMU
275/* Numa emulation */ 275/* Numa emulation */
276#define E820_ADDR_HOLE_SIZE(start, end) \
277 (e820_hole_size((start) >> PAGE_SHIFT, (end) >> PAGE_SHIFT) << \
278 PAGE_SHIFT)
279char *cmdline __initdata; 276char *cmdline __initdata;
280 277
281/* 278/*
@@ -319,7 +316,7 @@ static int __init split_nodes_equally(struct bootnode *nodes, u64 *addr,
319 return -1; 316 return -1;
320 if (num_nodes > MAX_NUMNODES) 317 if (num_nodes > MAX_NUMNODES)
321 num_nodes = MAX_NUMNODES; 318 num_nodes = MAX_NUMNODES;
322 size = (max_addr - *addr - E820_ADDR_HOLE_SIZE(*addr, max_addr)) / 319 size = (max_addr - *addr - e820_hole_size(*addr, max_addr)) /
323 num_nodes; 320 num_nodes;
324 /* 321 /*
325 * Calculate the number of big nodes that can be allocated as a result 322 * Calculate the number of big nodes that can be allocated as a result
@@ -347,7 +344,7 @@ static int __init split_nodes_equally(struct bootnode *nodes, u64 *addr,
347 if (i == num_nodes + node_start - 1) 344 if (i == num_nodes + node_start - 1)
348 end = max_addr; 345 end = max_addr;
349 else 346 else
350 while (end - *addr - E820_ADDR_HOLE_SIZE(*addr, end) < 347 while (end - *addr - e820_hole_size(*addr, end) <
351 size) { 348 size) {
352 end += FAKE_NODE_MIN_SIZE; 349 end += FAKE_NODE_MIN_SIZE;
353 if (end > max_addr) { 350 if (end > max_addr) {
@@ -476,18 +473,22 @@ out:
476 473
477 /* 474 /*
478 * We need to vacate all active ranges that may have been registered by 475 * We need to vacate all active ranges that may have been registered by
479 * SRAT. 476 * SRAT and set acpi_numa to -1 so that srat_disabled() always returns
477 * true. NUMA emulation has succeeded so we will not scan ACPI nodes.
480 */ 478 */
481 remove_all_active_ranges(); 479 remove_all_active_ranges();
480#ifdef CONFIG_ACPI_NUMA
481 acpi_numa = -1;
482#endif
482 for_each_node_mask(i, node_possible_map) { 483 for_each_node_mask(i, node_possible_map) {
483 e820_register_active_regions(i, nodes[i].start >> PAGE_SHIFT, 484 e820_register_active_regions(i, nodes[i].start >> PAGE_SHIFT,
484 nodes[i].end >> PAGE_SHIFT); 485 nodes[i].end >> PAGE_SHIFT);
485 setup_node_bootmem(i, nodes[i].start, nodes[i].end); 486 setup_node_bootmem(i, nodes[i].start, nodes[i].end);
486 } 487 }
488 acpi_fake_nodes(nodes, num_nodes);
487 numa_init_array(); 489 numa_init_array();
488 return 0; 490 return 0;
489} 491}
490#undef E820_ADDR_HOLE_SIZE
491#endif /* CONFIG_NUMA_EMU */ 492#endif /* CONFIG_NUMA_EMU */
492 493
493void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn) 494void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)
diff --git a/arch/x86_64/mm/pageattr.c b/arch/x86_64/mm/pageattr.c
index d653d0bf3df6..36377b6b8efe 100644
--- a/arch/x86_64/mm/pageattr.c
+++ b/arch/x86_64/mm/pageattr.c
@@ -74,13 +74,12 @@ static void flush_kernel_map(void *arg)
74 struct page *pg; 74 struct page *pg;
75 75
76 /* When clflush is available always use it because it is 76 /* When clflush is available always use it because it is
77 much cheaper than WBINVD */ 77 much cheaper than WBINVD. */
78 if (!cpu_has_clflush) 78 if (!cpu_has_clflush)
79 asm volatile("wbinvd" ::: "memory"); 79 asm volatile("wbinvd" ::: "memory");
80 list_for_each_entry(pg, l, lru) { 80 else list_for_each_entry(pg, l, lru) {
81 void *adr = page_address(pg); 81 void *adr = page_address(pg);
82 if (cpu_has_clflush) 82 cache_flush_page(adr);
83 cache_flush_page(adr);
84 } 83 }
85 __flush_tlb_all(); 84 __flush_tlb_all();
86} 85}
@@ -94,7 +93,8 @@ static LIST_HEAD(deferred_pages); /* protected by init_mm.mmap_sem */
94 93
95static inline void save_page(struct page *fpage) 94static inline void save_page(struct page *fpage)
96{ 95{
97 list_add(&fpage->lru, &deferred_pages); 96 if (!test_and_set_bit(PG_arch_1, &fpage->flags))
97 list_add(&fpage->lru, &deferred_pages);
98} 98}
99 99
100/* 100/*
@@ -128,9 +128,12 @@ __change_page_attr(unsigned long address, unsigned long pfn, pgprot_t prot,
128 pte_t *kpte; 128 pte_t *kpte;
129 struct page *kpte_page; 129 struct page *kpte_page;
130 pgprot_t ref_prot2; 130 pgprot_t ref_prot2;
131
131 kpte = lookup_address(address); 132 kpte = lookup_address(address);
132 if (!kpte) return 0; 133 if (!kpte) return 0;
133 kpte_page = virt_to_page(((unsigned long)kpte) & PAGE_MASK); 134 kpte_page = virt_to_page(((unsigned long)kpte) & PAGE_MASK);
135 BUG_ON(PageLRU(kpte_page));
136 BUG_ON(PageCompound(kpte_page));
134 if (pgprot_val(prot) != pgprot_val(ref_prot)) { 137 if (pgprot_val(prot) != pgprot_val(ref_prot)) {
135 if (!pte_huge(*kpte)) { 138 if (!pte_huge(*kpte)) {
136 set_pte(kpte, pfn_pte(pfn, prot)); 139 set_pte(kpte, pfn_pte(pfn, prot));
@@ -158,10 +161,9 @@ __change_page_attr(unsigned long address, unsigned long pfn, pgprot_t prot,
158 /* on x86-64 the direct mapping set at boot is not using 4k pages */ 161 /* on x86-64 the direct mapping set at boot is not using 4k pages */
159 BUG_ON(PageReserved(kpte_page)); 162 BUG_ON(PageReserved(kpte_page));
160 163
161 if (page_private(kpte_page) == 0) { 164 save_page(kpte_page);
162 save_page(kpte_page); 165 if (page_private(kpte_page) == 0)
163 revert_page(address, ref_prot); 166 revert_page(address, ref_prot);
164 }
165 return 0; 167 return 0;
166} 168}
167 169
@@ -233,6 +235,10 @@ void global_flush_tlb(void)
233 flush_map(&l); 235 flush_map(&l);
234 236
235 list_for_each_entry_safe(pg, next, &l, lru) { 237 list_for_each_entry_safe(pg, next, &l, lru) {
238 list_del(&pg->lru);
239 clear_bit(PG_arch_1, &pg->flags);
240 if (page_private(pg) != 0)
241 continue;
236 ClearPagePrivate(pg); 242 ClearPagePrivate(pg);
237 __free_page(pg); 243 __free_page(pg);
238 } 244 }
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c
index 1e76bb0a7277..acdf03e19146 100644
--- a/arch/x86_64/mm/srat.c
+++ b/arch/x86_64/mm/srat.c
@@ -106,9 +106,9 @@ static __init int slit_valid(struct acpi_table_slit *slit)
106 for (j = 0; j < d; j++) { 106 for (j = 0; j < d; j++) {
107 u8 val = slit->entry[d*i + j]; 107 u8 val = slit->entry[d*i + j];
108 if (i == j) { 108 if (i == j) {
109 if (val != 10) 109 if (val != LOCAL_DISTANCE)
110 return 0; 110 return 0;
111 } else if (val <= 10) 111 } else if (val <= LOCAL_DISTANCE)
112 return 0; 112 return 0;
113 } 113 }
114 } 114 }
@@ -350,7 +350,7 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
350 350
351/* Sanity check to catch more bad SRATs (they are amazingly common). 351/* Sanity check to catch more bad SRATs (they are amazingly common).
352 Make sure the PXMs cover all memory. */ 352 Make sure the PXMs cover all memory. */
353static int nodes_cover_memory(void) 353static int __init nodes_cover_memory(const struct bootnode *nodes)
354{ 354{
355 int i; 355 int i;
356 unsigned long pxmram, e820ram; 356 unsigned long pxmram, e820ram;
@@ -394,6 +394,9 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
394{ 394{
395 int i; 395 int i;
396 396
397 if (acpi_numa <= 0)
398 return -1;
399
397 /* First clean up the node list */ 400 /* First clean up the node list */
398 for (i = 0; i < MAX_NUMNODES; i++) { 401 for (i = 0; i < MAX_NUMNODES; i++) {
399 cutoff_node(i, start, end); 402 cutoff_node(i, start, end);
@@ -403,10 +406,7 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
403 } 406 }
404 } 407 }
405 408
406 if (acpi_numa <= 0) 409 if (!nodes_cover_memory(nodes)) {
407 return -1;
408
409 if (!nodes_cover_memory()) {
410 bad_srat(); 410 bad_srat();
411 return -1; 411 return -1;
412 } 412 }
@@ -440,6 +440,86 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
440 return 0; 440 return 0;
441} 441}
442 442
443#ifdef CONFIG_NUMA_EMU
444static int __init find_node_by_addr(unsigned long addr)
445{
446 int ret = NUMA_NO_NODE;
447 int i;
448
449 for_each_node_mask(i, nodes_parsed) {
450 /*
451 * Find the real node that this emulated node appears on. For
452 * the sake of simplicity, we only use a real node's starting
453 * address to determine which emulated node it appears on.
454 */
455 if (addr >= nodes[i].start && addr < nodes[i].end) {
456 ret = i;
457 break;
458 }
459 }
460 return i;
461}
462
463/*
464 * In NUMA emulation, we need to setup proximity domain (_PXM) to node ID
465 * mappings that respect the real ACPI topology but reflect our emulated
466 * environment. For each emulated node, we find which real node it appears on
467 * and create PXM to NID mappings for those fake nodes which mirror that
468 * locality. SLIT will now represent the correct distances between emulated
469 * nodes as a result of the real topology.
470 */
471void __init acpi_fake_nodes(const struct bootnode *fake_nodes, int num_nodes)
472{
473 int i, j;
474 int fake_node_to_pxm_map[MAX_NUMNODES] = {
475 [0 ... MAX_NUMNODES-1] = PXM_INVAL
476 };
477 unsigned char fake_apicid_to_node[MAX_LOCAL_APIC] = {
478 [0 ... MAX_LOCAL_APIC-1] = NUMA_NO_NODE
479 };
480
481 printk(KERN_INFO "Faking PXM affinity for fake nodes on real "
482 "topology.\n");
483 for (i = 0; i < num_nodes; i++) {
484 int nid, pxm;
485
486 nid = find_node_by_addr(fake_nodes[i].start);
487 if (nid == NUMA_NO_NODE)
488 continue;
489 pxm = node_to_pxm(nid);
490 if (pxm == PXM_INVAL)
491 continue;
492 fake_node_to_pxm_map[i] = pxm;
493 /*
494 * For each apicid_to_node mapping that exists for this real
495 * node, it must now point to the fake node ID.
496 */
497 for (j = 0; j < MAX_LOCAL_APIC; j++)
498 if (apicid_to_node[j] == nid)
499 fake_apicid_to_node[j] = i;
500 }
501 for (i = 0; i < num_nodes; i++)
502 __acpi_map_pxm_to_node(fake_node_to_pxm_map[i], i);
503 memcpy(apicid_to_node, fake_apicid_to_node, sizeof(apicid_to_node));
504
505 nodes_clear(nodes_parsed);
506 for (i = 0; i < num_nodes; i++)
507 if (fake_nodes[i].start != fake_nodes[i].end)
508 node_set(i, nodes_parsed);
509 WARN_ON(!nodes_cover_memory(fake_nodes));
510}
511
512static int null_slit_node_compare(int a, int b)
513{
514 return node_to_pxm(a) == node_to_pxm(b);
515}
516#else
517static int null_slit_node_compare(int a, int b)
518{
519 return a == b;
520}
521#endif /* CONFIG_NUMA_EMU */
522
443void __init srat_reserve_add_area(int nodeid) 523void __init srat_reserve_add_area(int nodeid)
444{ 524{
445 if (found_add_area && nodes_add[nodeid].end) { 525 if (found_add_area && nodes_add[nodeid].end) {
@@ -464,7 +544,8 @@ int __node_distance(int a, int b)
464 int index; 544 int index;
465 545
466 if (!acpi_slit) 546 if (!acpi_slit)
467 return a == b ? 10 : 20; 547 return null_slit_node_compare(a, b) ? LOCAL_DISTANCE :
548 REMOTE_DISTANCE;
468 index = acpi_slit->locality_count * node_to_pxm(a); 549 index = acpi_slit->locality_count * node_to_pxm(a);
469 return acpi_slit->entry[index + node_to_pxm(b)]; 550 return acpi_slit->entry[index + node_to_pxm(b)];
470} 551}
diff --git a/arch/x86_64/pci/k8-bus.c b/arch/x86_64/pci/k8-bus.c
index 3acf60ded2a0..9cc813e29706 100644
--- a/arch/x86_64/pci/k8-bus.c
+++ b/arch/x86_64/pci/k8-bus.c
@@ -59,6 +59,8 @@ fill_mp_bus_to_cpumask(void)
59 j <= SUBORDINATE_LDT_BUS_NUMBER(ldtbus); 59 j <= SUBORDINATE_LDT_BUS_NUMBER(ldtbus);
60 j++) { 60 j++) {
61 struct pci_bus *bus; 61 struct pci_bus *bus;
62 struct pci_sysdata *sd;
63
62 long node = NODE_ID(nid); 64 long node = NODE_ID(nid);
63 /* Algorithm a bit dumb, but 65 /* Algorithm a bit dumb, but
64 it shouldn't matter here */ 66 it shouldn't matter here */
@@ -67,7 +69,9 @@ fill_mp_bus_to_cpumask(void)
67 continue; 69 continue;
68 if (!node_online(node)) 70 if (!node_online(node))
69 node = 0; 71 node = 0;
70 bus->sysdata = (void *)node; 72
73 sd = bus->sysdata;
74 sd->node = node;
71 } 75 }
72 } 76 }
73 } 77 }
diff --git a/arch/x86_64/vdso/Makefile b/arch/x86_64/vdso/Makefile
new file mode 100644
index 000000000000..faaa72fb250c
--- /dev/null
+++ b/arch/x86_64/vdso/Makefile
@@ -0,0 +1,49 @@
1#
2# x86-64 vDSO.
3#
4
5# files to link into the vdso
6# vdso-start.o has to be first
7vobjs-y := vdso-start.o vdso-note.o vclock_gettime.o vgetcpu.o vvar.o
8
9# files to link into kernel
10obj-y := vma.o vdso.o vdso-syms.o
11
12vobjs := $(foreach F,$(vobjs-y),$(obj)/$F)
13
14$(obj)/vdso.o: $(obj)/vdso.so
15
16targets += vdso.so vdso.lds $(vobjs-y) vdso-syms.o
17
18# The DSO images are built using a special linker script.
19quiet_cmd_syscall = SYSCALL $@
20 cmd_syscall = $(CC) -m elf_x86_64 -nostdlib $(SYSCFLAGS_$(@F)) \
21 -Wl,-T,$(filter-out FORCE,$^) -o $@
22
23export CPPFLAGS_vdso.lds += -P -C -U$(ARCH)
24
25vdso-flags = -fPIC -shared -Wl,-soname=linux-vdso.so.1 \
26 $(call ld-option, -Wl$(comma)--hash-style=sysv) \
27 -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
28SYSCFLAGS_vdso.so = $(vdso-flags)
29
30$(obj)/vdso.o: $(src)/vdso.S $(obj)/vdso.so
31
32$(obj)/vdso.so: $(src)/vdso.lds $(vobjs) FORCE
33 $(call if_changed,syscall)
34
35CF := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64
36
37$(obj)/vclock_gettime.o: CFLAGS = $(CF)
38$(obj)/vgetcpu.o: CFLAGS = $(CF)
39
40# We also create a special relocatable object that should mirror the symbol
41# table and layout of the linked DSO. With ld -R we can then refer to
42# these symbols in the kernel code rather than hand-coded addresses.
43extra-y += vdso-syms.o
44$(obj)/built-in.o: $(obj)/vdso-syms.o
45$(obj)/built-in.o: ld_flags += -R $(obj)/vdso-syms.o
46
47SYSCFLAGS_vdso-syms.o = -r -d
48$(obj)/vdso-syms.o: $(src)/vdso.lds $(vobjs) FORCE
49 $(call if_changed,syscall)
diff --git a/arch/x86_64/vdso/vclock_gettime.c b/arch/x86_64/vdso/vclock_gettime.c
new file mode 100644
index 000000000000..17f6a00de712
--- /dev/null
+++ b/arch/x86_64/vdso/vclock_gettime.c
@@ -0,0 +1,120 @@
1/*
2 * Copyright 2006 Andi Kleen, SUSE Labs.
3 * Subject to the GNU Public License, v.2
4 *
5 * Fast user context implementation of clock_gettime and gettimeofday.
6 *
7 * The code should have no internal unresolved relocations.
8 * Check with readelf after changing.
9 * Also alternative() doesn't work.
10 */
11
12#include <linux/kernel.h>
13#include <linux/posix-timers.h>
14#include <linux/time.h>
15#include <linux/string.h>
16#include <asm/vsyscall.h>
17#include <asm/vgtod.h>
18#include <asm/timex.h>
19#include <asm/hpet.h>
20#include <asm/unistd.h>
21#include <asm/io.h>
22#include <asm/vgtod.h>
23#include "vextern.h"
24
25#define gtod vdso_vsyscall_gtod_data
26
27static long vdso_fallback_gettime(long clock, struct timespec *ts)
28{
29 long ret;
30 asm("syscall" : "=a" (ret) :
31 "0" (__NR_clock_gettime),"D" (clock), "S" (ts) : "memory");
32 return ret;
33}
34
35static inline long vgetns(void)
36{
37 cycles_t (*vread)(void);
38 vread = gtod->clock.vread;
39 return ((vread() - gtod->clock.cycle_last) * gtod->clock.mult) >>
40 gtod->clock.shift;
41}
42
43static noinline int do_realtime(struct timespec *ts)
44{
45 unsigned long seq, ns;
46 do {
47 seq = read_seqbegin(&gtod->lock);
48 ts->tv_sec = gtod->wall_time_sec;
49 ts->tv_nsec = gtod->wall_time_nsec;
50 ns = vgetns();
51 } while (unlikely(read_seqretry(&gtod->lock, seq)));
52 timespec_add_ns(ts, ns);
53 return 0;
54}
55
56/* Copy of the version in kernel/time.c which we cannot directly access */
57static void vset_normalized_timespec(struct timespec *ts, long sec, long nsec)
58{
59 while (nsec >= NSEC_PER_SEC) {
60 nsec -= NSEC_PER_SEC;
61 ++sec;
62 }
63 while (nsec < 0) {
64 nsec += NSEC_PER_SEC;
65 --sec;
66 }
67 ts->tv_sec = sec;
68 ts->tv_nsec = nsec;
69}
70
71static noinline int do_monotonic(struct timespec *ts)
72{
73 unsigned long seq, ns, secs;
74 do {
75 seq = read_seqbegin(&gtod->lock);
76 secs = gtod->wall_time_sec;
77 ns = gtod->wall_time_nsec + vgetns();
78 secs += gtod->wall_to_monotonic.tv_sec;
79 ns += gtod->wall_to_monotonic.tv_nsec;
80 } while (unlikely(read_seqretry(&gtod->lock, seq)));
81 vset_normalized_timespec(ts, secs, ns);
82 return 0;
83}
84
85int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
86{
87 if (likely(gtod->sysctl_enabled && gtod->clock.vread))
88 switch (clock) {
89 case CLOCK_REALTIME:
90 return do_realtime(ts);
91 case CLOCK_MONOTONIC:
92 return do_monotonic(ts);
93 }
94 return vdso_fallback_gettime(clock, ts);
95}
96int clock_gettime(clockid_t, struct timespec *)
97 __attribute__((weak, alias("__vdso_clock_gettime")));
98
99int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
100{
101 long ret;
102 if (likely(gtod->sysctl_enabled && gtod->clock.vread)) {
103 BUILD_BUG_ON(offsetof(struct timeval, tv_usec) !=
104 offsetof(struct timespec, tv_nsec) ||
105 sizeof(*tv) != sizeof(struct timespec));
106 do_realtime((struct timespec *)tv);
107 tv->tv_usec /= 1000;
108 if (unlikely(tz != NULL)) {
109 /* This relies on gcc inlining the memcpy. We'll notice
110 if it ever fails to do so. */
111 memcpy(tz, &gtod->sys_tz, sizeof(struct timezone));
112 }
113 return 0;
114 }
115 asm("syscall" : "=a" (ret) :
116 "0" (__NR_gettimeofday), "D" (tv), "S" (tz) : "memory");
117 return ret;
118}
119int gettimeofday(struct timeval *, struct timezone *)
120 __attribute__((weak, alias("__vdso_gettimeofday")));
diff --git a/arch/x86_64/vdso/vdso-note.S b/arch/x86_64/vdso/vdso-note.S
new file mode 100644
index 000000000000..79a071e4357e
--- /dev/null
+++ b/arch/x86_64/vdso/vdso-note.S
@@ -0,0 +1,12 @@
1/*
2 * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
3 * Here we can supply some information useful to userland.
4 */
5
6#include <linux/uts.h>
7#include <linux/version.h>
8#include <linux/elfnote.h>
9
10ELFNOTE_START(Linux, 0, "a")
11 .long LINUX_VERSION_CODE
12ELFNOTE_END
diff --git a/arch/x86_64/vdso/vdso-start.S b/arch/x86_64/vdso/vdso-start.S
new file mode 100644
index 000000000000..2dc2cdb84d67
--- /dev/null
+++ b/arch/x86_64/vdso/vdso-start.S
@@ -0,0 +1,2 @@
1 .globl vdso_kernel_start
2vdso_kernel_start:
diff --git a/arch/x86_64/vdso/vdso.S b/arch/x86_64/vdso/vdso.S
new file mode 100644
index 000000000000..92e80c1972a7
--- /dev/null
+++ b/arch/x86_64/vdso/vdso.S
@@ -0,0 +1,2 @@
1 .section ".vdso","a"
2 .incbin "arch/x86_64/vdso/vdso.so"
diff --git a/arch/x86_64/vdso/vdso.lds.S b/arch/x86_64/vdso/vdso.lds.S
new file mode 100644
index 000000000000..b9a60e665d08
--- /dev/null
+++ b/arch/x86_64/vdso/vdso.lds.S
@@ -0,0 +1,77 @@
1/*
2 * Linker script for vsyscall DSO. The vsyscall page is an ELF shared
3 * object prelinked to its virtual address, and with only one read-only
4 * segment (that fits in one page). This script controls its layout.
5 */
6#include <asm/asm-offsets.h>
7#include "voffset.h"
8
9#define VDSO_PRELINK 0xffffffffff700000
10
11SECTIONS
12{
13 . = VDSO_PRELINK + SIZEOF_HEADERS;
14
15 .hash : { *(.hash) } :text
16 .gnu.hash : { *(.gnu.hash) }
17 .dynsym : { *(.dynsym) }
18 .dynstr : { *(.dynstr) }
19 .gnu.version : { *(.gnu.version) }
20 .gnu.version_d : { *(.gnu.version_d) }
21 .gnu.version_r : { *(.gnu.version_r) }
22
23 /* This linker script is used both with -r and with -shared.
24 For the layouts to match, we need to skip more than enough
25 space for the dynamic symbol table et al. If this amount
26 is insufficient, ld -shared will barf. Just increase it here. */
27 . = VDSO_PRELINK + VDSO_TEXT_OFFSET;
28
29 .text : { *(.text) } :text
30 .text.ptr : { *(.text.ptr) } :text
31 . = VDSO_PRELINK + 0x900;
32 .data : { *(.data) } :text
33 .bss : { *(.bss) } :text
34
35 .altinstructions : { *(.altinstructions) } :text
36 .altinstr_replacement : { *(.altinstr_replacement) } :text
37
38 .note : { *(.note.*) } :text :note
39 .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
40 .eh_frame : { KEEP (*(.eh_frame)) } :text
41 .dynamic : { *(.dynamic) } :text :dynamic
42 .useless : {
43 *(.got.plt) *(.got)
44 *(.gnu.linkonce.d.*)
45 *(.dynbss)
46 *(.gnu.linkonce.b.*)
47 } :text
48}
49
50/*
51 * We must supply the ELF program headers explicitly to get just one
52 * PT_LOAD segment, and set the flags explicitly to make segments read-only.
53 */
54PHDRS
55{
56 text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
57 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
58 note PT_NOTE FLAGS(4); /* PF_R */
59 eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */
60}
61
62/*
63 * This controls what symbols we export from the DSO.
64 */
65VERSION
66{
67 LINUX_2.6 {
68 global:
69 clock_gettime;
70 __vdso_clock_gettime;
71 gettimeofday;
72 __vdso_gettimeofday;
73 getcpu;
74 __vdso_getcpu;
75 local: *;
76 };
77}
diff --git a/arch/x86_64/vdso/vextern.h b/arch/x86_64/vdso/vextern.h
new file mode 100644
index 000000000000..1683ba2ae3e8
--- /dev/null
+++ b/arch/x86_64/vdso/vextern.h
@@ -0,0 +1,16 @@
1#ifndef VEXTERN
2#include <asm/vsyscall.h>
3#define VEXTERN(x) \
4 extern typeof(x) *vdso_ ## x __attribute__((visibility("hidden")));
5#endif
6
7#define VMAGIC 0xfeedbabeabcdefabUL
8
9/* Any kernel variables used in the vDSO must be exported in the main
10 kernel's vmlinux.lds.S/vsyscall.h/proper __section and
11 put into vextern.h and be referenced as a pointer with vdso prefix.
12 The main kernel later fills in the values. */
13
14VEXTERN(jiffies)
15VEXTERN(vgetcpu_mode)
16VEXTERN(vsyscall_gtod_data)
diff --git a/arch/x86_64/vdso/vgetcpu.c b/arch/x86_64/vdso/vgetcpu.c
new file mode 100644
index 000000000000..91f6e85d0fc2
--- /dev/null
+++ b/arch/x86_64/vdso/vgetcpu.c
@@ -0,0 +1,50 @@
1/*
2 * Copyright 2006 Andi Kleen, SUSE Labs.
3 * Subject to the GNU Public License, v.2
4 *
5 * Fast user context implementation of getcpu()
6 */
7
8#include <linux/kernel.h>
9#include <linux/getcpu.h>
10#include <linux/jiffies.h>
11#include <linux/time.h>
12#include <asm/vsyscall.h>
13#include <asm/vgtod.h>
14#include "vextern.h"
15
16long __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache)
17{
18 unsigned int dummy, p;
19 unsigned long j = 0;
20
21 /* Fast cache - only recompute value once per jiffies and avoid
22 relatively costly rdtscp/cpuid otherwise.
23 This works because the scheduler usually keeps the process
24 on the same CPU and this syscall doesn't guarantee its
25 results anyways.
26 We do this here because otherwise user space would do it on
27 its own in a likely inferior way (no access to jiffies).
28 If you don't like it pass NULL. */
29 if (tcache && tcache->blob[0] == (j = *vdso_jiffies)) {
30 p = tcache->blob[1];
31 } else if (*vdso_vgetcpu_mode == VGETCPU_RDTSCP) {
32 /* Load per CPU data from RDTSCP */
33 rdtscp(dummy, dummy, p);
34 } else {
35 /* Load per CPU data from GDT */
36 asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG));
37 }
38 if (tcache) {
39 tcache->blob[0] = j;
40 tcache->blob[1] = p;
41 }
42 if (cpu)
43 *cpu = p & 0xfff;
44 if (node)
45 *node = p >> 12;
46 return 0;
47}
48
49long getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache)
50 __attribute__((weak, alias("__vdso_getcpu")));
diff --git a/arch/x86_64/vdso/vma.c b/arch/x86_64/vdso/vma.c
new file mode 100644
index 000000000000..d4cb83a6c066
--- /dev/null
+++ b/arch/x86_64/vdso/vma.c
@@ -0,0 +1,139 @@
1/*
2 * Set up the VMAs to tell the VM about the vDSO.
3 * Copyright 2007 Andi Kleen, SUSE Labs.
4 * Subject to the GPL, v.2
5 */
6#include <linux/mm.h>
7#include <linux/sched.h>
8#include <linux/init.h>
9#include <linux/random.h>
10#include <asm/vsyscall.h>
11#include <asm/vgtod.h>
12#include <asm/proto.h>
13#include "voffset.h"
14
15int vdso_enabled = 1;
16
17#define VEXTERN(x) extern typeof(__ ## x) *vdso_ ## x;
18#include "vextern.h"
19#undef VEXTERN
20
21extern char vdso_kernel_start[], vdso_start[], vdso_end[];
22extern unsigned short vdso_sync_cpuid;
23
24struct page **vdso_pages;
25
26static inline void *var_ref(void *vbase, char *var, char *name)
27{
28 unsigned offset = var - &vdso_kernel_start[0] + VDSO_TEXT_OFFSET;
29 void *p = vbase + offset;
30 if (*(void **)p != (void *)VMAGIC) {
31 printk("VDSO: variable %s broken\n", name);
32 vdso_enabled = 0;
33 }
34 return p;
35}
36
37static int __init init_vdso_vars(void)
38{
39 int npages = (vdso_end - vdso_start + PAGE_SIZE - 1) / PAGE_SIZE;
40 int i;
41 char *vbase;
42
43 vdso_pages = kmalloc(sizeof(struct page *) * npages, GFP_KERNEL);
44 if (!vdso_pages)
45 goto oom;
46 for (i = 0; i < npages; i++) {
47 struct page *p;
48 p = alloc_page(GFP_KERNEL);
49 if (!p)
50 goto oom;
51 vdso_pages[i] = p;
52 copy_page(page_address(p), vdso_start + i*PAGE_SIZE);
53 }
54
55 vbase = vmap(vdso_pages, npages, 0, PAGE_KERNEL);
56 if (!vbase)
57 goto oom;
58
59 if (memcmp(vbase, "\177ELF", 4)) {
60 printk("VDSO: I'm broken; not ELF\n");
61 vdso_enabled = 0;
62 }
63
64#define V(x) *(typeof(x) *) var_ref(vbase, (char *)RELOC_HIDE(&x, 0), #x)
65#define VEXTERN(x) \
66 V(vdso_ ## x) = &__ ## x;
67#include "vextern.h"
68#undef VEXTERN
69 return 0;
70
71 oom:
72 printk("Cannot allocate vdso\n");
73 vdso_enabled = 0;
74 return -ENOMEM;
75}
76__initcall(init_vdso_vars);
77
78struct linux_binprm;
79
80/* Put the vdso above the (randomized) stack with another randomized offset.
81 This way there is no hole in the middle of address space.
82 To save memory make sure it is still in the same PTE as the stack top.
83 This doesn't give that many random bits */
84static unsigned long vdso_addr(unsigned long start, unsigned len)
85{
86 unsigned long addr, end;
87 unsigned offset;
88 end = (start + PMD_SIZE - 1) & PMD_MASK;
89 if (end >= TASK_SIZE64)
90 end = TASK_SIZE64;
91 end -= len;
92 /* This loses some more bits than a modulo, but is cheaper */
93 offset = get_random_int() & (PTRS_PER_PTE - 1);
94 addr = start + (offset << PAGE_SHIFT);
95 if (addr >= end)
96 addr = end;
97 return addr;
98}
99
100/* Setup a VMA at program startup for the vsyscall page.
101 Not called for compat tasks */
102int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack)
103{
104 struct mm_struct *mm = current->mm;
105 unsigned long addr;
106 int ret;
107 unsigned len = round_up(vdso_end - vdso_start, PAGE_SIZE);
108
109 if (!vdso_enabled)
110 return 0;
111
112 down_write(&mm->mmap_sem);
113 addr = vdso_addr(mm->start_stack, len);
114 addr = get_unmapped_area(NULL, addr, len, 0, 0);
115 if (IS_ERR_VALUE(addr)) {
116 ret = addr;
117 goto up_fail;
118 }
119
120 ret = install_special_mapping(mm, addr, len,
121 VM_READ|VM_EXEC|
122 VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC|
123 VM_ALWAYSDUMP,
124 vdso_pages);
125 if (ret)
126 goto up_fail;
127
128 current->mm->context.vdso = (void *)addr;
129up_fail:
130 up_write(&mm->mmap_sem);
131 return ret;
132}
133
134static __init int vdso_setup(char *s)
135{
136 vdso_enabled = simple_strtoul(s, NULL, 0);
137 return 0;
138}
139__setup("vdso=", vdso_setup);
diff --git a/arch/x86_64/vdso/voffset.h b/arch/x86_64/vdso/voffset.h
new file mode 100644
index 000000000000..5304204911f2
--- /dev/null
+++ b/arch/x86_64/vdso/voffset.h
@@ -0,0 +1 @@
#define VDSO_TEXT_OFFSET 0x500
diff --git a/arch/x86_64/vdso/vvar.c b/arch/x86_64/vdso/vvar.c
new file mode 100644
index 000000000000..6fc22219a472
--- /dev/null
+++ b/arch/x86_64/vdso/vvar.c
@@ -0,0 +1,12 @@
1/* Define pointer to external vDSO variables.
2 These are part of the vDSO. The kernel fills in the real addresses
3 at boot time. This is done because when the vdso is linked the
4 kernel isn't yet and we don't know the final addresses. */
5#include <linux/kernel.h>
6#include <linux/time.h>
7#include <asm/vsyscall.h>
8#include <asm/timex.h>
9#include <asm/vgtod.h>
10
11#define VEXTERN(x) typeof (__ ## x) *vdso_ ## x = (void *)VMAGIC;
12#include "vextern.h"
diff --git a/arch/xtensa/kernel/asm-offsets.c b/arch/xtensa/kernel/asm-offsets.c
index 698079b3a336..d0323cd6a2ea 100644
--- a/arch/xtensa/kernel/asm-offsets.c
+++ b/arch/xtensa/kernel/asm-offsets.c
@@ -39,6 +39,7 @@ int main(void)
39 DEFINE(PT_LEND, offsetof (struct pt_regs, lend)); 39 DEFINE(PT_LEND, offsetof (struct pt_regs, lend));
40 DEFINE(PT_LCOUNT, offsetof (struct pt_regs, lcount)); 40 DEFINE(PT_LCOUNT, offsetof (struct pt_regs, lcount));
41 DEFINE(PT_SAR, offsetof (struct pt_regs, sar)); 41 DEFINE(PT_SAR, offsetof (struct pt_regs, sar));
42 DEFINE(PT_ICOUNTLEVEL, offsetof (struct pt_regs, icountlevel));
42 DEFINE(PT_SYSCALL, offsetof (struct pt_regs, syscall)); 43 DEFINE(PT_SYSCALL, offsetof (struct pt_regs, syscall));
43 DEFINE(PT_AREG, offsetof (struct pt_regs, areg[0])); 44 DEFINE(PT_AREG, offsetof (struct pt_regs, areg[0]));
44 DEFINE(PT_AREG0, offsetof (struct pt_regs, areg[0])); 45 DEFINE(PT_AREG0, offsetof (struct pt_regs, areg[0]));
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S
index 9e271ba009bf..8dc7a2c26ff9 100644
--- a/arch/xtensa/kernel/entry.S
+++ b/arch/xtensa/kernel/entry.S
@@ -125,8 +125,9 @@ _user_exception:
125 125
126 movi a2, 0 126 movi a2, 0
127 rsr a3, SAR 127 rsr a3, SAR
128 wsr a2, ICOUNTLEVEL 128 xsr a2, ICOUNTLEVEL
129 s32i a3, a1, PT_SAR 129 s32i a3, a1, PT_SAR
130 s32i a2, a1, PT_ICOUNTLEVEL
130 131
131 /* Rotate ws so that the current windowbase is at bit0. */ 132 /* Rotate ws so that the current windowbase is at bit0. */
132 /* Assume ws = xxwww1yyyy. Rotate ws right, so that a2 = yyyyxxwww1 */ 133 /* Assume ws = xxwww1yyyy. Rotate ws right, so that a2 = yyyyxxwww1 */
@@ -276,8 +277,9 @@ _kernel_exception:
276 277
277 movi a2, 0 278 movi a2, 0
278 rsr a3, SAR 279 rsr a3, SAR
279 wsr a2, ICOUNTLEVEL 280 xsr a2, ICOUNTLEVEL
280 s32i a3, a1, PT_SAR 281 s32i a3, a1, PT_SAR
282 s32i a2, a1, PT_ICOUNTLEVEL
281 283
282 /* Rotate ws so that the current windowbase is at bit0. */ 284 /* Rotate ws so that the current windowbase is at bit0. */
283 /* Assume ws = xxwww1yyyy. Rotate ws right, so that a2 = yyyyxxwww1 */ 285 /* Assume ws = xxwww1yyyy. Rotate ws right, so that a2 = yyyyxxwww1 */
@@ -330,14 +332,16 @@ _kernel_exception:
330 332
331common_exception: 333common_exception:
332 334
333 /* Save EXCVADDR, DEBUGCAUSE, and PC, and clear LCOUNT */ 335 /* Save some registers, disable loops and clear the syscall flag. */
334 336
335 rsr a2, DEBUGCAUSE 337 rsr a2, DEBUGCAUSE
336 rsr a3, EPC_1 338 rsr a3, EPC_1
337 s32i a2, a1, PT_DEBUGCAUSE 339 s32i a2, a1, PT_DEBUGCAUSE
338 s32i a3, a1, PT_PC 340 s32i a3, a1, PT_PC
339 341
342 movi a2, -1
340 rsr a3, EXCVADDR 343 rsr a3, EXCVADDR
344 s32i a2, a1, PT_SYSCALL
341 movi a2, 0 345 movi a2, 0
342 s32i a3, a1, PT_EXCVADDR 346 s32i a3, a1, PT_EXCVADDR
343 xsr a2, LCOUNT 347 xsr a2, LCOUNT
@@ -450,27 +454,8 @@ common_exception_return:
450 454
451 /* Restore the state of the task and return from the exception. */ 455 /* Restore the state of the task and return from the exception. */
452 456
453
454 /* If we are returning from a user exception, and the process
455 * to run next has PT_SINGLESTEP set, we want to setup
456 * ICOUNT and ICOUNTLEVEL to step one instruction.
457 * PT_SINGLESTEP is set by sys_ptrace (ptrace.c)
458 */
459
4604: /* a2 holds GET_CURRENT(a2,a1) */ 4574: /* a2 holds GET_CURRENT(a2,a1) */
461 458
462 l32i a3, a2, TI_TASK
463 l32i a3, a3, TASK_PTRACE
464 bbci.l a3, PT_SINGLESTEP_BIT, 1f # jump if single-step flag is not set
465
466 movi a3, -2 # PT_SINGLESTEP flag is set,
467 movi a4, 1 # icountlevel of 1 means it won't
468 wsr a3, ICOUNT # start counting until after rfe
469 wsr a4, ICOUNTLEVEL # so setup icount & icountlevel.
470 isync
471
4721:
473
474#if XCHAL_EXTRA_SA_SIZE 459#if XCHAL_EXTRA_SA_SIZE
475 460
476 /* For user exceptions, restore the extra state from the user's TCB. */ 461 /* For user exceptions, restore the extra state from the user's TCB. */
@@ -665,6 +650,13 @@ common_exception_exit:
665 wsr a3, LEND 650 wsr a3, LEND
666 wsr a2, LCOUNT 651 wsr a2, LCOUNT
667 652
653 /* We control single stepping through the ICOUNTLEVEL register. */
654
655 l32i a2, a1, PT_ICOUNTLEVEL
656 movi a3, -2
657 wsr a2, ICOUNTLEVEL
658 wsr a3, ICOUNT
659
668 /* Check if it was double exception. */ 660 /* Check if it was double exception. */
669 661
670 l32i a0, a1, PT_DEPC 662 l32i a0, a1, PT_DEPC
diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S
index ea89910efa44..67e69139520b 100644
--- a/arch/xtensa/kernel/head.S
+++ b/arch/xtensa/kernel/head.S
@@ -19,6 +19,8 @@
19#include <asm/page.h> 19#include <asm/page.h>
20#include <asm/cacheasm.h> 20#include <asm/cacheasm.h>
21 21
22#include <linux/linkage.h>
23
22/* 24/*
23 * This module contains the entry code for kernel images. It performs the 25 * This module contains the entry code for kernel images. It performs the
24 * minimal setup needed to call the generic C routines. 26 * minimal setup needed to call the generic C routines.
@@ -227,13 +229,14 @@ _startup:
227should_never_return: 229should_never_return:
228 j should_never_return 230 j should_never_return
229 231
230 /* Define some common data structures here. We define them
231 * here in this assembly file due to their unusual alignment
232 * requirements.
233 */
234 232
235 .comm swapper_pg_dir,PAGE_SIZE,PAGE_SIZE 233/*
236 .comm empty_bad_page_table,PAGE_SIZE,PAGE_SIZE 234 * BSS section
237 .comm empty_bad_page,PAGE_SIZE,PAGE_SIZE 235 */
238 .comm empty_zero_page,PAGE_SIZE,PAGE_SIZE 236
237.section ".bss.page_aligned", "w"
238ENTRY(swapper_pg_dir)
239 .fill PAGE_SIZE, 1, 0
240ENTRY(empty_zero_page)
241 .fill PAGE_SIZE, 1, 0
239 242
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c
index 45571ccb72d6..77deae5290f0 100644
--- a/arch/xtensa/kernel/pci.c
+++ b/arch/xtensa/kernel/pci.c
@@ -401,7 +401,7 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
401 * Also, think for a moment about likes of floppy.c that 401 * Also, think for a moment about likes of floppy.c that
402 * include architecture specific parts. They may want to redefine ins/outs. 402 * include architecture specific parts. They may want to redefine ins/outs.
403 * 403 *
404 * We do not use horroble macroses here because we want to 404 * We do not use horrible macros here because we want to
405 * advance pointer by sizeof(size). 405 * advance pointer by sizeof(size).
406 */ 406 */
407void outsb(unsigned long addr, const void *src, unsigned long count) { 407void outsb(unsigned long addr, const void *src, unsigned long count) {
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c
index 14104ff63093..06a13d9b69db 100644
--- a/arch/xtensa/kernel/ptrace.c
+++ b/arch/xtensa/kernel/ptrace.c
@@ -50,18 +50,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
50 switch (request) { 50 switch (request) {
51 case PTRACE_PEEKTEXT: /* read word at location addr. */ 51 case PTRACE_PEEKTEXT: /* read word at location addr. */
52 case PTRACE_PEEKDATA: 52 case PTRACE_PEEKDATA:
53 { 53 ret = generic_ptrace_peekdata(child, addr, data);
54 unsigned long tmp;
55 int copied;
56
57 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
58 ret = -EIO;
59 if (copied != sizeof(tmp))
60 break;
61 ret = put_user(tmp,(unsigned long *) data);
62
63 goto out; 54 goto out;
64 }
65 55
66 /* Read the word at location addr in the USER area. */ 56 /* Read the word at location addr in the USER area. */
67 57
@@ -138,10 +128,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
138 128
139 case PTRACE_POKETEXT: /* write the word at location addr. */ 129 case PTRACE_POKETEXT: /* write the word at location addr. */
140 case PTRACE_POKEDATA: 130 case PTRACE_POKEDATA:
141 if (access_process_vm(child, addr, &data, sizeof(data), 1) 131 ret = generic_ptrace_pokedata(child, addr, data);
142 == sizeof(data))
143 break;
144 ret = -EIO;
145 goto out; 132 goto out;
146 133
147 case PTRACE_POKEUSR: 134 case PTRACE_POKEUSR:
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 1ecf6716c327..2e8d398cf196 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -41,6 +41,7 @@
41#include <asm/platform.h> 41#include <asm/platform.h>
42#include <asm/page.h> 42#include <asm/page.h>
43#include <asm/setup.h> 43#include <asm/setup.h>
44#include <asm/param.h>
44 45
45#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) 46#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
46struct screen_info screen_info = { 0, 24, 0, 0, 0, 80, 0, 0, 0, 24, 1, 16}; 47struct screen_info screen_info = { 0, 24, 0, 0, 0, 80, 0, 0, 0, 24, 1, 16};
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c
index 58107672a619..033aae0336d2 100644
--- a/arch/xtensa/kernel/signal.c
+++ b/arch/xtensa/kernel/signal.c
@@ -1,397 +1,239 @@
1// TODO coprocessor stuff
2/* 1/*
3 * linux/arch/xtensa/kernel/signal.c 2 * arch/xtensa/kernel/signal.c
4 * 3 *
5 * Copyright (C) 1991, 1992 Linus Torvalds 4 * Default platform functions.
6 * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson
7 *
8 * Joe Taylor <joe@tensilica.com>
9 * Chris Zankel <chris@zankel.net>
10 * 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.
11 * 9 *
10 * Copyright (C) 2005, 2006 Tensilica Inc.
11 * Copyright (C) 1991, 1992 Linus Torvalds
12 * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson
12 * 13 *
14 * Chris Zankel <chris@zankel.net>
15 * Joe Taylor <joe@tensilica.com>
13 */ 16 */
14 17
15#include <asm/variant/core.h>
16#include <asm/coprocessor.h>
17#include <linux/sched.h>
18#include <linux/mm.h>
19#include <linux/smp.h>
20#include <linux/kernel.h>
21#include <linux/signal.h> 18#include <linux/signal.h>
22#include <linux/errno.h> 19#include <linux/errno.h>
23#include <linux/wait.h>
24#include <linux/ptrace.h> 20#include <linux/ptrace.h>
25#include <linux/unistd.h>
26#include <linux/stddef.h>
27#include <linux/personality.h> 21#include <linux/personality.h>
22#include <linux/freezer.h>
23
28#include <asm/ucontext.h> 24#include <asm/ucontext.h>
29#include <asm/uaccess.h> 25#include <asm/uaccess.h>
30#include <asm/pgtable.h>
31#include <asm/cacheflush.h> 26#include <asm/cacheflush.h>
27#include <asm/coprocessor.h>
28#include <asm/unistd.h>
32 29
33#define DEBUG_SIG 0 30#define DEBUG_SIG 0
34 31
35#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 32#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
36 33
37asmlinkage long sys_wait4(pid_t pid,unsigned int * stat_addr, int options,
38 struct rusage * ru);
39asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset); 34asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset);
40 35
41extern struct task_struct *coproc_owners[]; 36extern struct task_struct *coproc_owners[];
42 37
38extern void release_all_cp (struct task_struct *);
43 39
44/* 40struct rt_sigframe
45 * Atomically swap in the new signal mask, and wait for a signal. 41{
42 struct siginfo info;
43 struct ucontext uc;
44 cp_state_t cpstate;
45 unsigned char retcode[6];
46 unsigned int window[4];
47};
48
49/*
50 * Flush register windows stored in pt_regs to stack.
51 * Returns 1 for errors.
52 *
53 * Note that windowbase, windowstart, and wmask are not updated!
46 */ 54 */
47 55
48int xtensa_sigsuspend(struct pt_regs *regs) 56int
57flush_window_regs_user(struct pt_regs *regs)
49{ 58{
50 old_sigset_t mask = (old_sigset_t) regs->areg[3]; 59 const unsigned long ws = regs->windowstart;
51 sigset_t saveset; 60 const unsigned long wb = regs->windowbase;
61 unsigned long sp = 0;
62 unsigned long wm;
63 int err = 1;
64 int base;
52 65
53 mask &= _BLOCKABLE; 66 /* Return if no other frames. */
54 spin_lock_irq(&current->sighand->siglock);
55 saveset = current->blocked;
56 siginitset(&current->blocked, mask);
57 recalc_sigpending();
58 spin_unlock_irq(&current->sighand->siglock);
59 67
60 regs->areg[2] = -EINTR; 68 if (regs->wmask == 1)
61 while (1) { 69 return 0;
62 current->state = TASK_INTERRUPTIBLE;
63 schedule();
64 if (do_signal(regs, &saveset))
65 return -EINTR;
66 }
67}
68 70
69asmlinkage int 71 /* Rotate windowmask and skip empty frames. */
70xtensa_rt_sigsuspend(struct pt_regs *regs)
71{
72 sigset_t *unewset = (sigset_t *) regs->areg[4];
73 size_t sigsetsize = (size_t) regs->areg[3];
74 sigset_t saveset, newset;
75 /* XXX: Don't preclude handling different sized sigset_t's. */
76 if (sigsetsize != sizeof(sigset_t))
77 return -EINVAL;
78 72
79 if (copy_from_user(&newset, unewset, sizeof(newset))) 73 wm = (ws >> wb) | (ws << (XCHAL_NUM_AREGS / 4 - wb));
80 return -EFAULT; 74 base = (XCHAL_NUM_AREGS / 4) - (regs->wmask >> 4);
81 sigdelsetmask(&newset, ~_BLOCKABLE); 75
82 spin_lock_irq(&current->sighand->siglock); 76 /* For call8 or call12 frames, we need the previous stack pointer. */
83 saveset = current->blocked;
84 current->blocked = newset;
85 recalc_sigpending();
86 spin_unlock_irq(&current->sighand->siglock);
87 77
88 regs->areg[2] = -EINTR; 78 if ((regs->wmask & 2) == 0)
89 while (1) { 79 if (__get_user(sp, (int*)(regs->areg[base * 4 + 1] - 12)))
90 current->state = TASK_INTERRUPTIBLE; 80 goto errout;
91 schedule();
92 if (do_signal(regs, &saveset))
93 return -EINTR;
94 }
95}
96 81
97asmlinkage int 82 /* Spill frames to stack. */
98xtensa_sigaction(int sig, const struct old_sigaction *act,
99 struct old_sigaction *oact)
100{
101 struct k_sigaction new_ka, old_ka;
102 int ret;
103 83
104 if (act) { 84 while (base < XCHAL_NUM_AREGS / 4) {
105 old_sigset_t mask;
106 if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
107 __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
108 __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
109 return -EFAULT;
110 __get_user(new_ka.sa.sa_flags, &act->sa_flags);
111 __get_user(mask, &act->sa_mask);
112 siginitset(&new_ka.sa.sa_mask, mask);
113 }
114 85
115 ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); 86 int m = (wm >> base);
87 int inc = 0;
116 88
117 if (!ret && oact) { 89 /* Save registers a4..a7 (call8) or a4...a11 (call12) */
118 if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
119 __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
120 __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
121 return -EFAULT;
122 __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
123 __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
124 }
125 90
126 return ret; 91 if (m & 2) { /* call4 */
127} 92 inc = 1;
128 93
129asmlinkage int 94 } else if (m & 4) { /* call8 */
130xtensa_sigaltstack(struct pt_regs *regs) 95 if (copy_to_user((void*)(sp - 32),
131{ 96 &regs->areg[(base + 1) * 4], 16))
132 const stack_t *uss = (stack_t *) regs->areg[4]; 97 goto errout;
133 stack_t *uoss = (stack_t *) regs->areg[3]; 98 inc = 2;
134 99
135 if (regs->depc > 64) 100 } else if (m & 8) { /* call12 */
136 panic ("Double exception sys_sigreturn\n"); 101 if (copy_to_user((void*)(sp - 48),
102 &regs->areg[(base + 1) * 4], 32))
103 goto errout;
104 inc = 3;
105 }
137 106
107 /* Save current frame a0..a3 under next SP */
138 108
139 return do_sigaltstack(uss, uoss, regs->areg[1]); 109 sp = regs->areg[((base + inc) * 4 + 1) % XCHAL_NUM_AREGS];
140} 110 if (copy_to_user((void*)(sp - 16), &regs->areg[base * 4], 16))
111 goto errout;
112
113 /* Get current stack pointer for next loop iteration. */
114
115 sp = regs->areg[base * 4 + 1];
116 base += inc;
117 }
118
119 return 0;
141 120
121errout:
122 return err;
123}
142 124
143/* 125/*
144 * Do a signal return; undo the signal stack. 126 * Note: We don't copy double exception 'regs', we have to finish double exc.
127 * first before we return to signal handler! This dbl.exc.handler might cause
128 * another double exception, but I think we are fine as the situation is the
129 * same as if we had returned to the signal handerl and got an interrupt
130 * immediately...
145 */ 131 */
146 132
147struct sigframe 133static int
148{ 134setup_sigcontext(struct sigcontext __user *sc, cp_state_t *cpstate,
149 struct sigcontext sc; 135 struct pt_regs *regs, unsigned long mask)
150 struct _cpstate cpstate;
151 unsigned long extramask[_NSIG_WORDS-1];
152 unsigned char retcode[6];
153 unsigned int reserved[4]; /* Reserved area for chaining */
154 unsigned int window[4]; /* Window of 4 registers for initial context */
155};
156
157struct rt_sigframe
158{ 136{
159 struct siginfo info; 137 int err = 0;
160 struct ucontext uc;
161 struct _cpstate cpstate;
162 unsigned char retcode[6];
163 unsigned int reserved[4]; /* Reserved area for chaining */
164 unsigned int window[4]; /* Window of 4 registers for initial context */
165};
166 138
167extern void release_all_cp (struct task_struct *); 139#define COPY(x) err |= __put_user(regs->x, &sc->sc_##x)
140 COPY(pc);
141 COPY(ps);
142 COPY(lbeg);
143 COPY(lend);
144 COPY(lcount);
145 COPY(sar);
146#undef COPY
168 147
148 err |= flush_window_regs_user(regs);
149 err |= __copy_to_user (sc->sc_a, regs->areg, 16 * 4);
169 150
170// FIXME restore_cpextra 151 // err |= __copy_to_user (sc->sc_a, regs->areg, XCHAL_NUM_AREGS * 4)
171static inline int
172restore_cpextra (struct _cpstate *buf)
173{
174#if 0
175 /* The signal handler may have used coprocessors in which
176 * case they are still enabled. We disable them to force a
177 * reloading of the original task's CP state by the lazy
178 * context-switching mechanisms of CP exception handling.
179 * Also, we essentially discard any coprocessor state that the
180 * signal handler created. */
181 152
182 struct task_struct *tsk = current; 153#if XCHAL_HAVE_CP
183 release_all_cp(tsk); 154# error Coprocessors unsupported
184 return __copy_from_user(tsk->thread.cpextra, buf, XTENSA_CP_EXTRA_SIZE); 155 err |= save_cpextra(cpstate);
156 err |= __put_user(err ? NULL : cpstate, &sc->sc_cpstate);
185#endif 157#endif
186 return 0; 158 /* non-iBCS2 extensions.. */
187} 159 err |= __put_user(mask, &sc->oldmask);
188
189/* Note: We don't copy double exception 'tregs', we have to finish double exc. first before we return to signal handler! This dbl.exc.handler might cause another double exception, but I think we are fine as the situation is the same as if we had returned to the signal handerl and got an interrupt immediately...
190 */
191 160
161 return err;
162}
192 163
193static int 164static int
194restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc) 165restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
195{ 166{
196 struct thread_struct *thread;
197 unsigned int err = 0; 167 unsigned int err = 0;
198 unsigned long ps; 168 unsigned long ps;
199 struct _cpstate *buf;
200 169
201#define COPY(x) err |= __get_user(regs->x, &sc->sc_##x) 170#define COPY(x) err |= __get_user(regs->x, &sc->sc_##x)
202 COPY(pc); 171 COPY(pc);
203 COPY(depc);
204 COPY(wmask);
205 COPY(lbeg); 172 COPY(lbeg);
206 COPY(lend); 173 COPY(lend);
207 COPY(lcount); 174 COPY(lcount);
208 COPY(sar); 175 COPY(sar);
209 COPY(windowbase);
210 COPY(windowstart);
211#undef COPY 176#undef COPY
212 177
178 /* All registers were flushed to stack. Start with a prestine frame. */
179
180 regs->wmask = 1;
181 regs->windowbase = 0;
182 regs->windowstart = 1;
183
213 /* For PS, restore only PS.CALLINC. 184 /* For PS, restore only PS.CALLINC.
214 * Assume that all other bits are either the same as for the signal 185 * Assume that all other bits are either the same as for the signal
215 * handler, or the user mode value doesn't matter (e.g. PS.OWB). 186 * handler, or the user mode value doesn't matter (e.g. PS.OWB).
216 */ 187 */
217 err |= __get_user(ps, &sc->sc_ps); 188 err |= __get_user(ps, &sc->sc_ps);
218 regs->ps = (regs->ps & ~PS_CALLINC_MASK) 189 regs->ps = (regs->ps & ~PS_CALLINC_MASK) | (ps & PS_CALLINC_MASK);
219 | (ps & PS_CALLINC_MASK);
220 190
221 /* Additional corruption checks */ 191 /* Additional corruption checks */
222 192
223 if ((regs->windowbase >= (XCHAL_NUM_AREGS/4))
224 || ((regs->windowstart & ~((1<<(XCHAL_NUM_AREGS/4)) - 1)) != 0) )
225 err = 1;
226 if ((regs->lcount > 0) 193 if ((regs->lcount > 0)
227 && ((regs->lbeg > TASK_SIZE) || (regs->lend > TASK_SIZE)) ) 194 && ((regs->lbeg > TASK_SIZE) || (regs->lend > TASK_SIZE)) )
228 err = 1; 195 err = 1;
229 196
230 /* Restore extended register state. 197 err |= __copy_from_user(regs->areg, sc->sc_a, 16 * 4);
231 * See struct thread_struct in processor.h.
232 */
233 thread = &current->thread;
234
235 err |= __copy_from_user (regs->areg, sc->sc_areg, XCHAL_NUM_AREGS*4);
236 err |= __get_user(buf, &sc->sc_cpstate);
237 if (buf) {
238 if (!access_ok(VERIFY_READ, buf, sizeof(*buf)))
239 goto badframe;
240 err |= restore_cpextra(buf);
241 }
242
243 regs->syscall = -1; /* disable syscall checks */
244 return err;
245
246badframe:
247 return 1;
248}
249
250static inline void
251flush_my_cpstate(struct task_struct *tsk)
252{
253 unsigned long flags;
254 local_irq_save(flags);
255
256#if 0 // FIXME
257 for (i = 0; i < XCHAL_CP_NUM; i++) {
258 if (tsk == coproc_owners[i]) {
259 xthal_validate_cp(i);
260 xthal_save_cpregs(tsk->thread.cpregs_ptr[i], i);
261 198
262 /* Invalidate and "disown" the cp to allow 199#if XCHAL_HAVE_CP
263 * callers the chance to reset cp state in the 200# error Coprocessors unsupported
264 * task_struct. */ 201 /* The signal handler may have used coprocessors in which
202 * case they are still enabled. We disable them to force a
203 * reloading of the original task's CP state by the lazy
204 * context-switching mechanisms of CP exception handling.
205 * Also, we essentially discard any coprocessor state that the
206 * signal handler created. */
265 207
266 xthal_invalidate_cp(i); 208 if (!err) {
267 coproc_owners[i] = 0; 209 struct task_struct *tsk = current;
268 } 210 release_all_cp(tsk);
211 err |= __copy_from_user(tsk->thread.cpextra, sc->sc_cpstate,
212 XTENSA_CP_EXTRA_SIZE);
269 } 213 }
270#endif 214#endif
271 local_irq_restore(flags);
272}
273
274/* Return codes:
275 0: nothing saved
276 1: stuff to save, successful
277 -1: stuff to save, error happened
278*/
279static int
280save_cpextra (struct _cpstate *buf)
281{
282#if XCHAL_CP_NUM == 0
283 return 0;
284#else
285
286 /* FIXME: If a task has never used a coprocessor, there is
287 * no need to save and restore anything. Tracking this
288 * information would allow us to optimize this section.
289 * Perhaps we can use current->used_math or (current->flags &
290 * PF_USEDFPU) or define a new field in the thread
291 * structure. */
292
293 /* We flush any live, task-owned cp state to the task_struct,
294 * then copy it all to the sigframe. Then we clear all
295 * cp/extra state in the task_struct, effectively
296 * clearing/resetting all cp/extra state for the signal
297 * handler (cp-exception handling will load these new values
298 * into the cp/extra registers.) This step is important for
299 * things like a floating-point cp, where the OS must reset
300 * the FCR to the default rounding mode. */
301
302 int err = 0;
303 struct task_struct *tsk = current;
304
305 flush_my_cpstate(tsk);
306 /* Note that we just copy everything: 'extra' and 'cp' state together.*/
307 err |= __copy_to_user(buf, tsk->thread.cp_save, XTENSA_CP_EXTRA_SIZE);
308 memset(tsk->thread.cp_save, 0, XTENSA_CP_EXTRA_SIZE);
309
310#if (XTENSA_CP_EXTRA_SIZE == 0)
311#error Sanity check on memset above, cpextra_size should not be zero.
312#endif
313
314 return err ? -1 : 1;
315#endif
316}
317
318static int
319setup_sigcontext(struct sigcontext *sc, struct _cpstate *cpstate,
320 struct pt_regs *regs, unsigned long mask)
321{
322 struct thread_struct *thread;
323 int err = 0;
324
325//printk("setup_sigcontext\n");
326#define COPY(x) err |= __put_user(regs->x, &sc->sc_##x)
327 COPY(pc);
328 COPY(ps);
329 COPY(depc);
330 COPY(wmask);
331 COPY(lbeg);
332 COPY(lend);
333 COPY(lcount);
334 COPY(sar);
335 COPY(windowbase);
336 COPY(windowstart);
337#undef COPY
338
339 /* Save extended register state.
340 * See struct thread_struct in processor.h.
341 */
342 thread = &current->thread;
343 err |= __copy_to_user (sc->sc_areg, regs->areg, XCHAL_NUM_AREGS * 4);
344 err |= save_cpextra(cpstate);
345 err |= __put_user(err ? NULL : cpstate, &sc->sc_cpstate);
346 /* non-iBCS2 extensions.. */
347 err |= __put_user(mask, &sc->oldmask);
348 215
216 regs->syscall = -1; /* disable syscall checks */
349 return err; 217 return err;
350} 218}
351 219
352asmlinkage int xtensa_sigreturn(struct pt_regs *regs)
353{
354 struct sigframe *frame = (struct sigframe *)regs->areg[1];
355 sigset_t set;
356 if (regs->depc > 64)
357 panic ("Double exception sys_sigreturn\n");
358
359 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
360 goto badframe;
361
362 if (__get_user(set.sig[0], &frame->sc.oldmask)
363 || (_NSIG_WORDS > 1
364 && __copy_from_user(&set.sig[1], &frame->extramask,
365 sizeof(frame->extramask))))
366 goto badframe;
367
368 sigdelsetmask(&set, ~_BLOCKABLE);
369
370 spin_lock_irq(&current->sighand->siglock);
371 current->blocked = set;
372 recalc_sigpending();
373 spin_unlock_irq(&current->sighand->siglock);
374 220
375 if (restore_sigcontext(regs, &frame->sc))
376 goto badframe;
377 return regs->areg[2];
378 221
379badframe: 222/*
380 force_sig(SIGSEGV, current); 223 * Do a signal return; undo the signal stack.
381 return 0; 224 */
382}
383 225
384asmlinkage int xtensa_rt_sigreturn(struct pt_regs *regs) 226asmlinkage long xtensa_rt_sigreturn(long a0, long a1, long a2, long a3,
227 long a4, long a5, struct pt_regs *regs)
385{ 228{
386 struct rt_sigframe *frame = (struct rt_sigframe *)regs->areg[1]; 229 struct rt_sigframe __user *frame;
387 sigset_t set; 230 sigset_t set;
388 stack_t st;
389 int ret; 231 int ret;
232
390 if (regs->depc > 64) 233 if (regs->depc > 64)
391 { 234 panic("rt_sigreturn in double exception!\n");
392 printk("!!!!!!! DEPC !!!!!!!\n"); 235
393 return 0; 236 frame = (struct rt_sigframe __user *) regs->areg[1];
394 }
395 237
396 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 238 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
397 goto badframe; 239 goto badframe;
@@ -407,13 +249,11 @@ asmlinkage int xtensa_rt_sigreturn(struct pt_regs *regs)
407 249
408 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) 250 if (restore_sigcontext(regs, &frame->uc.uc_mcontext))
409 goto badframe; 251 goto badframe;
252
410 ret = regs->areg[2]; 253 ret = regs->areg[2];
411 254
412 if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st))) 255 if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->areg[1]) == -EFAULT)
413 goto badframe; 256 goto badframe;
414 /* It is more difficult to avoid calling this function than to
415 call it and ignore errors. */
416 do_sigaltstack(&st, NULL, regs->areg[1]);
417 257
418 return ret; 258 return ret;
419 259
@@ -422,77 +262,50 @@ badframe:
422 return 0; 262 return 0;
423} 263}
424 264
425/* 265
426 * Set up a signal frame.
427 */
428 266
429/* 267/*
430 * Determine which stack to use.. 268 * Set up a signal frame.
431 */ 269 */
432static inline void *
433get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
434{
435 if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp))
436 sp = current->sas_ss_sp + current->sas_ss_size;
437
438 return (void *)((sp - frame_size) & -16ul);
439}
440
441#define USE_SIGRETURN 0
442#define USE_RT_SIGRETURN 1
443 270
444static int 271static int
445gen_return_code(unsigned char *codemem, unsigned int use_rt_sigreturn) 272gen_return_code(unsigned char *codemem)
446{ 273{
447 unsigned int retcall;
448 int err = 0; 274 int err = 0;
449 275
450#if 0 276 /*
451 /* Ignoring SA_RESTORER for now; it's supposed to be obsolete, 277 * The 12-bit immediate is really split up within the 24-bit MOVI
452 * and the xtensa glibc doesn't use it. 278 * instruction. As long as the above system call numbers fit within
279 * 8-bits, the following code works fine. See the Xtensa ISA for
280 * details.
453 */ 281 */
454 if (ka->sa.sa_flags & SA_RESTORER) {
455 regs->pr = (unsigned long) ka->sa.sa_restorer;
456 } else
457#endif /* 0 */
458 {
459
460#if (__NR_sigreturn > 255) || (__NR_rt_sigreturn > 255)
461
462/* The 12-bit immediate is really split up within the 24-bit MOVI
463 * instruction. As long as the above system call numbers fit within
464 * 8-bits, the following code works fine. See the Xtensa ISA for
465 * details.
466 */
467 282
468#error Generating the MOVI instruction below breaks! 283#if __NR_rt_sigreturn > 255
284# error Generating the MOVI instruction below breaks!
469#endif 285#endif
470 286
471 retcall = use_rt_sigreturn ? __NR_rt_sigreturn : __NR_sigreturn;
472
473#ifdef __XTENSA_EB__ /* Big Endian version */ 287#ifdef __XTENSA_EB__ /* Big Endian version */
474 /* Generate instruction: MOVI a2, retcall */ 288 /* Generate instruction: MOVI a2, __NR_rt_sigreturn */
475 err |= __put_user(0x22, &codemem[0]); 289 err |= __put_user(0x22, &codemem[0]);
476 err |= __put_user(0x0a, &codemem[1]); 290 err |= __put_user(0x0a, &codemem[1]);
477 err |= __put_user(retcall, &codemem[2]); 291 err |= __put_user(__NR_rt_sigreturn, &codemem[2]);
478 /* Generate instruction: SYSCALL */ 292 /* Generate instruction: SYSCALL */
479 err |= __put_user(0x00, &codemem[3]); 293 err |= __put_user(0x00, &codemem[3]);
480 err |= __put_user(0x05, &codemem[4]); 294 err |= __put_user(0x05, &codemem[4]);
481 err |= __put_user(0x00, &codemem[5]); 295 err |= __put_user(0x00, &codemem[5]);
482 296
483#elif defined __XTENSA_EL__ /* Little Endian version */ 297#elif defined __XTENSA_EL__ /* Little Endian version */
484 /* Generate instruction: MOVI a2, retcall */ 298 /* Generate instruction: MOVI a2, __NR_rt_sigreturn */
485 err |= __put_user(0x22, &codemem[0]); 299 err |= __put_user(0x22, &codemem[0]);
486 err |= __put_user(0xa0, &codemem[1]); 300 err |= __put_user(0xa0, &codemem[1]);
487 err |= __put_user(retcall, &codemem[2]); 301 err |= __put_user(__NR_rt_sigreturn, &codemem[2]);
488 /* Generate instruction: SYSCALL */ 302 /* Generate instruction: SYSCALL */
489 err |= __put_user(0x00, &codemem[3]); 303 err |= __put_user(0x00, &codemem[3]);
490 err |= __put_user(0x50, &codemem[4]); 304 err |= __put_user(0x50, &codemem[4]);
491 err |= __put_user(0x00, &codemem[5]); 305 err |= __put_user(0x00, &codemem[5]);
492#else 306#else
493#error Must use compiler for Xtensa processors. 307# error Must use compiler for Xtensa processors.
494#endif 308#endif
495 }
496 309
497 /* Flush generated code out of the data cache */ 310 /* Flush generated code out of the data cache */
498 311
@@ -504,97 +317,29 @@ gen_return_code(unsigned char *codemem, unsigned int use_rt_sigreturn)
504 return err; 317 return err;
505} 318}
506 319
507static void
508set_thread_state(struct pt_regs *regs, void *stack, unsigned char *retaddr,
509 void *handler, unsigned long arg1, void *arg2, void *arg3)
510{
511 /* Set up registers for signal handler */
512 start_thread(regs, (unsigned long) handler, (unsigned long) stack);
513
514 /* Set up a stack frame for a call4
515 * Note: PS.CALLINC is set to one by start_thread
516 */
517 regs->areg[4] = (((unsigned long) retaddr) & 0x3fffffff) | 0x40000000;
518 regs->areg[6] = arg1;
519 regs->areg[7] = (unsigned long) arg2;
520 regs->areg[8] = (unsigned long) arg3;
521}
522 320
523static void setup_frame(int sig, struct k_sigaction *ka, 321static void setup_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
524 sigset_t *set, struct pt_regs *regs) 322 sigset_t *set, struct pt_regs *regs)
525{ 323{
526 struct sigframe *frame; 324 struct rt_sigframe *frame;
527 int err = 0; 325 int err = 0;
528 int signal; 326 int signal;
327 unsigned long sp, ra;
529 328
530 frame = get_sigframe(ka, regs->areg[1], sizeof(*frame)); 329 sp = regs->areg[1];
531 if (regs->depc > 64)
532 {
533 printk("!!!!!!! DEPC !!!!!!!\n");
534 return;
535 }
536
537
538 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
539 goto give_sigsegv;
540
541 signal = current_thread_info()->exec_domain
542 && current_thread_info()->exec_domain->signal_invmap
543 && sig < 32
544 ? current_thread_info()->exec_domain->signal_invmap[sig]
545 : sig;
546
547 err |= setup_sigcontext(&frame->sc, &frame->cpstate, regs, set->sig[0]);
548 330
549 if (_NSIG_WORDS > 1) { 331 if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! on_sig_stack(sp)) {
550 err |= __copy_to_user(frame->extramask, &set->sig[1], 332 sp = current->sas_ss_sp + current->sas_ss_size;
551 sizeof(frame->extramask));
552 } 333 }
553 334
554 /* Create sys_sigreturn syscall in stack frame */ 335 frame = (void *)((sp - sizeof(*frame)) & -16ul);
555 err |= gen_return_code(frame->retcode, USE_SIGRETURN);
556
557 if (err)
558 goto give_sigsegv;
559
560 /* Create signal handler execution context.
561 * Return context not modified until this point.
562 */
563 set_thread_state(regs, frame, frame->retcode,
564 ka->sa.sa_handler, signal, &frame->sc, NULL);
565
566 /* Set access mode to USER_DS. Nomenclature is outdated, but
567 * functionality is used in uaccess.h
568 */
569 set_fs(USER_DS);
570
571
572#if DEBUG_SIG
573 printk("SIG deliver (%s:%d): signal=%d sp=%p pc=%08x\n",
574 current->comm, current->pid, signal, frame, regs->pc);
575#endif
576
577 return;
578
579give_sigsegv:
580 if (sig == SIGSEGV)
581 ka->sa.sa_handler = SIG_DFL;
582 force_sig(SIGSEGV, current);
583}
584
585static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
586 sigset_t *set, struct pt_regs *regs)
587{
588 struct rt_sigframe *frame;
589 int err = 0;
590 int signal;
591 336
592 frame = get_sigframe(ka, regs->areg[1], sizeof(*frame));
593 if (regs->depc > 64) 337 if (regs->depc > 64)
594 panic ("Double exception sys_sigreturn\n"); 338 panic ("Double exception sys_sigreturn\n");
595 339
596 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) 340 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) {
597 goto give_sigsegv; 341 goto give_sigsegv;
342 }
598 343
599 signal = current_thread_info()->exec_domain 344 signal = current_thread_info()->exec_domain
600 && current_thread_info()->exec_domain->signal_invmap 345 && current_thread_info()->exec_domain->signal_invmap
@@ -602,9 +347,12 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
602 ? current_thread_info()->exec_domain->signal_invmap[sig] 347 ? current_thread_info()->exec_domain->signal_invmap[sig]
603 : sig; 348 : sig;
604 349
605 err |= copy_siginfo_to_user(&frame->info, info); 350 if (ka->sa.sa_flags & SA_SIGINFO) {
351 err |= copy_siginfo_to_user(&frame->info, info);
352 }
353
354 /* Create the user context. */
606 355
607 /* Create the ucontext. */
608 err |= __put_user(0, &frame->uc.uc_flags); 356 err |= __put_user(0, &frame->uc.uc_flags);
609 err |= __put_user(0, &frame->uc.uc_link); 357 err |= __put_user(0, &frame->uc.uc_link);
610 err |= __put_user((void *)current->sas_ss_sp, 358 err |= __put_user((void *)current->sas_ss_sp,
@@ -617,16 +365,31 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
617 err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); 365 err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
618 366
619 /* Create sys_rt_sigreturn syscall in stack frame */ 367 /* Create sys_rt_sigreturn syscall in stack frame */
620 err |= gen_return_code(frame->retcode, USE_RT_SIGRETURN);
621 368
622 if (err) 369 err |= gen_return_code(frame->retcode);
370
371 if (err) {
623 goto give_sigsegv; 372 goto give_sigsegv;
373 }
374
624 375
625 /* Create signal handler execution context. 376 /*
377 * Create signal handler execution context.
626 * Return context not modified until this point. 378 * Return context not modified until this point.
627 */ 379 */
628 set_thread_state(regs, frame, frame->retcode, 380
629 ka->sa.sa_handler, signal, &frame->info, &frame->uc); 381 /* Set up registers for signal handler */
382 start_thread(regs, (unsigned long) ka->sa.sa_handler,
383 (unsigned long) frame);
384
385 /* Set up a stack frame for a call4
386 * Note: PS.CALLINC is set to one by start_thread
387 */
388 ra = (unsigned long) frame->retcode;
389 regs->areg[4] = (((unsigned long) ra) & 0x3fffffff) | 0x40000000;
390 regs->areg[6] = (unsigned long) signal;
391 regs->areg[7] = (unsigned long) &frame->info;
392 regs->areg[8] = (unsigned long) &frame->uc;
630 393
631 /* Set access mode to USER_DS. Nomenclature is outdated, but 394 /* Set access mode to USER_DS. Nomenclature is outdated, but
632 * functionality is used in uaccess.h 395 * functionality is used in uaccess.h
@@ -646,6 +409,48 @@ give_sigsegv:
646 force_sig(SIGSEGV, current); 409 force_sig(SIGSEGV, current);
647} 410}
648 411
412/*
413 * Atomically swap in the new signal mask, and wait for a signal.
414 */
415
416asmlinkage long xtensa_rt_sigsuspend(sigset_t __user *unewset,
417 size_t sigsetsize,
418 long a2, long a3, long a4, long a5,
419 struct pt_regs *regs)
420{
421 sigset_t saveset, newset;
422
423 /* XXX: Don't preclude handling different sized sigset_t's. */
424 if (sigsetsize != sizeof(sigset_t))
425 return -EINVAL;
426
427 if (copy_from_user(&newset, unewset, sizeof(newset)))
428 return -EFAULT;
429
430 sigdelsetmask(&newset, ~_BLOCKABLE);
431 spin_lock_irq(&current->sighand->siglock);
432 saveset = current->blocked;
433 current->blocked = newset;
434 recalc_sigpending();
435 spin_unlock_irq(&current->sighand->siglock);
436
437 regs->areg[2] = -EINTR;
438 while (1) {
439 current->state = TASK_INTERRUPTIBLE;
440 schedule();
441 if (do_signal(regs, &saveset))
442 return -EINTR;
443 }
444}
445
446asmlinkage long xtensa_sigaltstack(const stack_t __user *uss,
447 stack_t __user *uoss,
448 long a2, long a3, long a4, long a5,
449 struct pt_regs *regs)
450{
451 return do_sigaltstack(uss, uoss, regs->areg[1]);
452}
453
649 454
650 455
651/* 456/*
@@ -663,51 +468,89 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
663 int signr; 468 int signr;
664 struct k_sigaction ka; 469 struct k_sigaction ka;
665 470
471 if (!user_mode(regs))
472 return 0;
473
474 if (try_to_freeze())
475 goto no_signal;
476
666 if (!oldset) 477 if (!oldset)
667 oldset = &current->blocked; 478 oldset = &current->blocked;
668 479
480 task_pt_regs(current)->icountlevel = 0;
481
669 signr = get_signal_to_deliver(&info, &ka, regs, NULL); 482 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
670 483
671 /* Are we from a system call? */ 484 if (signr > 0) {
672 if (regs->syscall >= 0) { 485
673 /* If so, check system call restarting.. */ 486 /* Are we from a system call? */
674 switch (regs->areg[2]) { 487
675 case ERESTARTNOHAND: 488 if ((signed)regs->syscall >= 0) {
676 case ERESTART_RESTARTBLOCK:
677 regs->areg[2] = -EINTR;
678 break;
679 489
680 case ERESTARTSYS: 490 /* If so, check system call restarting.. */
681 if (!(ka.sa.sa_flags & SA_RESTART)) { 491
492 switch (regs->areg[2]) {
493 case -ERESTARTNOHAND:
494 case -ERESTART_RESTARTBLOCK:
682 regs->areg[2] = -EINTR; 495 regs->areg[2] = -EINTR;
683 break; 496 break;
684 } 497
685 /* fallthrough */ 498 case -ERESTARTSYS:
686 case ERESTARTNOINTR: 499 if (!(ka.sa.sa_flags & SA_RESTART)) {
687 regs->areg[2] = regs->syscall; 500 regs->areg[2] = -EINTR;
688 regs->pc -= 3; 501 break;
502 }
503 /* fallthrough */
504 case -ERESTARTNOINTR:
505 regs->areg[2] = regs->syscall;
506 regs->pc -= 3;
507 break;
508
509 default:
510 /* nothing to do */
511 if (regs->areg[2] != 0)
512 break;
513 }
689 } 514 }
690 }
691 515
692 if (signr == 0) 516 /* Whee! Actually deliver the signal. */
693 return 0; /* no signals delivered */ 517 /* Set up the stack frame */
518 setup_frame(signr, &ka, &info, oldset, regs);
694 519
695 /* Whee! Actually deliver the signal. */ 520 if (ka.sa.sa_flags & SA_ONESHOT)
521 ka.sa.sa_handler = SIG_DFL;
696 522
697 /* Set up the stack frame */ 523 spin_lock_irq(&current->sighand->siglock);
698 if (ka.sa.sa_flags & SA_SIGINFO) 524 sigorsets(&current->blocked, &current->blocked, &ka.sa.sa_mask);
699 setup_rt_frame(signr, &ka, &info, oldset, regs); 525 if (!(ka.sa.sa_flags & SA_NODEFER))
700 else 526 sigaddset(&current->blocked, signr);
701 setup_frame(signr, &ka, oldset, regs); 527 recalc_sigpending();
528 spin_unlock_irq(&current->sighand->siglock);
529 if (current->ptrace & PT_SINGLESTEP)
530 task_pt_regs(current)->icountlevel = 1;
702 531
703 if (ka.sa.sa_flags & SA_ONESHOT) 532 return 1;
704 ka.sa.sa_handler = SIG_DFL; 533 }
705 534
706 spin_lock_irq(&current->sighand->siglock); 535no_signal:
707 sigorsets(&current->blocked, &current->blocked, &ka.sa.sa_mask); 536 /* Did we come from a system call? */
708 if (!(ka.sa.sa_flags & SA_NODEFER)) 537 if ((signed) regs->syscall >= 0) {
709 sigaddset(&current->blocked, signr); 538 /* Restart the system call - no handlers present */
710 recalc_sigpending(); 539 switch (regs->areg[2]) {
711 spin_unlock_irq(&current->sighand->siglock); 540 case -ERESTARTNOHAND:
712 return 1; 541 case -ERESTARTSYS:
542 case -ERESTARTNOINTR:
543 regs->areg[2] = regs->syscall;
544 regs->pc -= 3;
545 break;
546 case -ERESTART_RESTARTBLOCK:
547 regs->areg[2] = __NR_restart_syscall;
548 regs->pc -= 3;
549 break;
550 }
551 }
552 if (current->ptrace & PT_SINGLESTEP)
553 task_pt_regs(current)->icountlevel = 1;
554 return 0;
713} 555}
556
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c
index 693ab268485e..c5e62f9d9f50 100644
--- a/arch/xtensa/kernel/traps.c
+++ b/arch/xtensa/kernel/traps.c
@@ -482,6 +482,7 @@ void die(const char * str, struct pt_regs * regs, long err)
482 if (!user_mode(regs)) 482 if (!user_mode(regs))
483 show_stack(NULL, (unsigned long*)regs->areg[1]); 483 show_stack(NULL, (unsigned long*)regs->areg[1]);
484 484
485 add_taint(TAINT_DIE);
485 spin_unlock_irq(&die_lock); 486 spin_unlock_irq(&die_lock);
486 487
487 if (in_interrupt()) 488 if (in_interrupt())
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S
index 4b7b4ff79973..ac4ed52034db 100644
--- a/arch/xtensa/kernel/vmlinux.lds.S
+++ b/arch/xtensa/kernel/vmlinux.lds.S
@@ -84,9 +84,7 @@ SECTIONS
84 { 84 {
85 /* The .head.text section must be the first section! */ 85 /* The .head.text section must be the first section! */
86 *(.head.text) 86 *(.head.text)
87 *(.literal) 87 *(.literal .text)
88 TEXT_TEXT
89 *(.srom.text)
90 VMLINUX_SYMBOL(__sched_text_start) = .; 88 VMLINUX_SYMBOL(__sched_text_start) = .;
91 *(.sched.literal .sched.text) 89 *(.sched.literal .sched.text)
92 VMLINUX_SYMBOL(__sched_text_end) = .; 90 VMLINUX_SYMBOL(__sched_text_end) = .;
@@ -96,6 +94,7 @@ SECTIONS
96 94
97 } 95 }
98 _etext = .; 96 _etext = .;
97 PROVIDE (etext = .);
99 98
100 . = ALIGN(16); 99 . = ALIGN(16);
101 100
@@ -103,32 +102,6 @@ SECTIONS
103 102
104 /* Relocation table */ 103 /* Relocation table */
105 104
106 . = ALIGN(16);
107 __boot_reloc_table_start = ABSOLUTE(.);
108
109 __relocate : {
110
111 RELOCATE_ENTRY(_WindowVectors_text,
112 .WindowVectors.text);
113#if 0
114 RELOCATE_ENTRY(_KernelExceptionVector_literal,
115 .KernelExceptionVector.literal);
116#endif
117 RELOCATE_ENTRY(_KernelExceptionVector_text,
118 .KernelExceptionVector.text);
119#if 0
120 RELOCATE_ENTRY(_UserExceptionVector_literal,
121 .UserExceptionVector.literal);
122#endif
123 RELOCATE_ENTRY(_UserExceptionVector_text,
124 .UserExceptionVector.text);
125 RELOCATE_ENTRY(_DoubleExceptionVector_literal,
126 .DoubleExceptionVector.literal);
127 RELOCATE_ENTRY(_DoubleExceptionVector_text,
128 .DoubleExceptionVector.text);
129 }
130 __boot_reloc_table_end = ABSOLUTE(.) ;
131
132 .fixup : { *(.fixup) } 105 .fixup : { *(.fixup) }
133 106
134 . = ALIGN(16); 107 . = ALIGN(16);
@@ -174,6 +147,22 @@ SECTIONS
174 __tagtable_begin = .; 147 __tagtable_begin = .;
175 *(.taglist) 148 *(.taglist)
176 __tagtable_end = .; 149 __tagtable_end = .;
150
151 . = ALIGN(16);
152 __boot_reloc_table_start = ABSOLUTE(.);
153
154 RELOCATE_ENTRY(_WindowVectors_text,
155 .WindowVectors.text);
156 RELOCATE_ENTRY(_KernelExceptionVector_text,
157 .KernelExceptionVector.text);
158 RELOCATE_ENTRY(_UserExceptionVector_text,
159 .UserExceptionVector.text);
160 RELOCATE_ENTRY(_DoubleExceptionVector_literal,
161 .DoubleExceptionVector.literal);
162 RELOCATE_ENTRY(_DoubleExceptionVector_text,
163 .DoubleExceptionVector.text);
164
165 __boot_reloc_table_end = ABSOLUTE(.) ;
177 } 166 }
178 167
179 . = ALIGN(XCHAL_ICACHE_LINESIZE); 168 . = ALIGN(XCHAL_ICACHE_LINESIZE);
@@ -194,16 +183,6 @@ SECTIONS
194 183
195 SECURITY_INIT 184 SECURITY_INIT
196 185
197 . = ALIGN(4);
198
199 __start___ftr_fixup = .;
200 __ftr_fixup : { *(__ftr_fixup) }
201 __stop___ftr_fixup = .;
202
203 . = ALIGN(4096);
204 __per_cpu_start = .;
205 .data.percpu : { *(.data.percpu) }
206 __per_cpu_end = .;
207 186
208#ifdef CONFIG_BLK_DEV_INITRD 187#ifdef CONFIG_BLK_DEV_INITRD
209 . = ALIGN(4096); 188 . = ALIGN(4096);
@@ -212,6 +191,9 @@ SECTIONS
212 __initramfs_end = .; 191 __initramfs_end = .;
213#endif 192#endif
214 193
194 PERCPU(4096)
195
196
215 /* We need this dummy segment here */ 197 /* We need this dummy segment here */
216 198
217 . = ALIGN(4); 199 . = ALIGN(4);
@@ -273,9 +255,9 @@ SECTIONS
273 255
274 /* BSS section */ 256 /* BSS section */
275 _bss_start = .; 257 _bss_start = .;
276 .sbss : { *(.sbss) *(.scommon) } 258 .bss : { *(.bss.page_aligned) *(.bss) }
277 .bss : { *(COMMON) *(.bss) }
278 _bss_end = .; 259 _bss_end = .;
260
279 _end = .; 261 _end = .;
280 262
281 /* only used by the boot loader */ 263 /* only used by the boot loader */
@@ -293,16 +275,16 @@ SECTIONS
293 *(.ResetVector.text) 275 *(.ResetVector.text)
294 } 276 }
295 277
296
297 /* Sections to be discarded */ 278 /* Sections to be discarded */
298 /DISCARD/ : 279 /DISCARD/ :
299 { 280 {
300 *(.text.exit) 281 *(.exit.literal .exit.text)
301 *(.text.exit.literal) 282 *(.exit.data)
302 *(.data.exit)
303 *(.exitcall.exit) 283 *(.exitcall.exit)
304 } 284 }
305 285
286 .xt.lit : { *(.xt.lit) }
287 .xt.prop : { *(.xt.prop) }
306 288
307 .debug 0 : { *(.debug) } 289 .debug 0 : { *(.debug) }
308 .line 0 : { *(.line) } 290 .line 0 : { *(.line) }
diff --git a/arch/xtensa/kernel/xtensa_ksyms.c b/arch/xtensa/kernel/xtensa_ksyms.c
index cd7e6a020602..60dbdb43fb4c 100644
--- a/arch/xtensa/kernel/xtensa_ksyms.c
+++ b/arch/xtensa/kernel/xtensa_ksyms.c
@@ -38,21 +38,10 @@
38/* 38/*
39 * String functions 39 * String functions
40 */ 40 */
41EXPORT_SYMBOL(memcmp);
42EXPORT_SYMBOL(memset); 41EXPORT_SYMBOL(memset);
43EXPORT_SYMBOL(memcpy); 42EXPORT_SYMBOL(memcpy);
44EXPORT_SYMBOL(memmove); 43EXPORT_SYMBOL(memmove);
45EXPORT_SYMBOL(memchr);
46EXPORT_SYMBOL(strcat);
47EXPORT_SYMBOL(strchr);
48EXPORT_SYMBOL(strlen);
49EXPORT_SYMBOL(strncat);
50EXPORT_SYMBOL(strnlen);
51EXPORT_SYMBOL(strrchr);
52EXPORT_SYMBOL(strstr);
53 44
54EXPORT_SYMBOL(enable_irq);
55EXPORT_SYMBOL(disable_irq);
56EXPORT_SYMBOL(kernel_thread); 45EXPORT_SYMBOL(kernel_thread);
57 46
58/* 47/*
diff --git a/arch/xtensa/lib/strncpy_user.S b/arch/xtensa/lib/strncpy_user.S
index a834057bda6b..b2655d94558d 100644
--- a/arch/xtensa/lib/strncpy_user.S
+++ b/arch/xtensa/lib/strncpy_user.S
@@ -25,18 +25,18 @@
25/* 25/*
26 * char *__strncpy_user(char *dst, const char *src, size_t len) 26 * char *__strncpy_user(char *dst, const char *src, size_t len)
27 */ 27 */
28.text 28
29.begin literal 29#ifdef __XTENSA_EB__
30.align 4 30# define MASK0 0xff000000
31.Lmask0: 31# define MASK1 0x00ff0000
32 .byte 0xff, 0x00, 0x00, 0x00 32# define MASK2 0x0000ff00
33.Lmask1: 33# define MASK3 0x000000ff
34 .byte 0x00, 0xff, 0x00, 0x00 34#else
35.Lmask2: 35# define MASK0 0x000000ff
36 .byte 0x00, 0x00, 0xff, 0x00 36# define MASK1 0x0000ff00
37.Lmask3: 37# define MASK2 0x00ff0000
38 .byte 0x00, 0x00, 0x00, 0xff 38# define MASK3 0xff000000
39.end literal 39#endif
40 40
41# Register use 41# Register use
42# a0/ return address 42# a0/ return address
@@ -53,6 +53,7 @@
53# a11/ dst 53# a11/ dst
54# a12/ tmp 54# a12/ tmp
55 55
56.text
56.align 4 57.align 4
57.global __strncpy_user 58.global __strncpy_user
58.type __strncpy_user,@function 59.type __strncpy_user,@function
@@ -61,10 +62,10 @@ __strncpy_user:
61 # a2/ dst, a3/ src, a4/ len 62 # a2/ dst, a3/ src, a4/ len
62 mov a11, a2 # leave dst in return value register 63 mov a11, a2 # leave dst in return value register
63 beqz a4, .Lret # if len is zero 64 beqz a4, .Lret # if len is zero
64 l32r a5, .Lmask0 # mask for byte 0 65 movi a5, MASK0 # mask for byte 0
65 l32r a6, .Lmask1 # mask for byte 1 66 movi a6, MASK1 # mask for byte 1
66 l32r a7, .Lmask2 # mask for byte 2 67 movi a7, MASK2 # mask for byte 2
67 l32r a8, .Lmask3 # mask for byte 3 68 movi a8, MASK3 # mask for byte 3
68 bbsi.l a3, 0, .Lsrc1mod2 # if only 8-bit aligned 69 bbsi.l a3, 0, .Lsrc1mod2 # if only 8-bit aligned
69 bbsi.l a3, 1, .Lsrc2mod4 # if only 16-bit aligned 70 bbsi.l a3, 1, .Lsrc2mod4 # if only 16-bit aligned
70.Lsrcaligned: # return here when src is word-aligned 71.Lsrcaligned: # return here when src is word-aligned
diff --git a/arch/xtensa/lib/strnlen_user.S b/arch/xtensa/lib/strnlen_user.S
index 5e9c1e709b2e..ad3f616322ca 100644
--- a/arch/xtensa/lib/strnlen_user.S
+++ b/arch/xtensa/lib/strnlen_user.S
@@ -24,18 +24,18 @@
24/* 24/*
25 * size_t __strnlen_user(const char *s, size_t len) 25 * size_t __strnlen_user(const char *s, size_t len)
26 */ 26 */
27.text 27
28.begin literal 28#ifdef __XTENSA_EB__
29.align 4 29# define MASK0 0xff000000
30.Lmask0: 30# define MASK1 0x00ff0000
31 .byte 0xff, 0x00, 0x00, 0x00 31# define MASK2 0x0000ff00
32.Lmask1: 32# define MASK3 0x000000ff
33 .byte 0x00, 0xff, 0x00, 0x00 33#else
34.Lmask2: 34# define MASK0 0x000000ff
35 .byte 0x00, 0x00, 0xff, 0x00 35# define MASK1 0x0000ff00
36.Lmask3: 36# define MASK2 0x00ff0000
37 .byte 0x00, 0x00, 0x00, 0xff 37# define MASK3 0xff000000
38.end literal 38#endif
39 39
40# Register use: 40# Register use:
41# a2/ src 41# a2/ src
@@ -48,6 +48,7 @@
48# a9/ tmp 48# a9/ tmp
49# a10/ tmp 49# a10/ tmp
50 50
51.text
51.align 4 52.align 4
52.global __strnlen_user 53.global __strnlen_user
53.type __strnlen_user,@function 54.type __strnlen_user,@function
@@ -56,10 +57,10 @@ __strnlen_user:
56 # a2/ s, a3/ len 57 # a2/ s, a3/ len
57 addi a4, a2, -4 # because we overincrement at the end; 58 addi a4, a2, -4 # because we overincrement at the end;
58 # we compensate with load offsets of 4 59 # we compensate with load offsets of 4
59 l32r a5, .Lmask0 # mask for byte 0 60 movi a5, MASK0 # mask for byte 0
60 l32r a6, .Lmask1 # mask for byte 1 61 movi a6, MASK1 # mask for byte 1
61 l32r a7, .Lmask2 # mask for byte 2 62 movi a7, MASK2 # mask for byte 2
62 l32r a8, .Lmask3 # mask for byte 3 63 movi a8, MASK3 # mask for byte 3
63 bbsi.l a2, 0, .L1mod2 # if only 8-bit aligned 64 bbsi.l a2, 0, .L1mod2 # if only 8-bit aligned
64 bbsi.l a2, 1, .L2mod4 # if only 16-bit aligned 65 bbsi.l a2, 1, .L2mod4 # if only 16-bit aligned
65 66
diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c
index 3dc6f2f07bbe..16004067add3 100644
--- a/arch/xtensa/mm/fault.c
+++ b/arch/xtensa/mm/fault.c
@@ -41,6 +41,7 @@ void do_page_fault(struct pt_regs *regs)
41 siginfo_t info; 41 siginfo_t info;
42 42
43 int is_write, is_exec; 43 int is_write, is_exec;
44 int fault;
44 45
45 info.si_code = SEGV_MAPERR; 46 info.si_code = SEGV_MAPERR;
46 47
@@ -102,20 +103,18 @@ good_area:
102 * the fault. 103 * the fault.
103 */ 104 */
104survive: 105survive:
105 switch (handle_mm_fault(mm, vma, address, is_write)) { 106 fault = handle_mm_fault(mm, vma, address, is_write);
106 case VM_FAULT_MINOR: 107 if (unlikely(fault & VM_FAULT_ERROR)) {
107 current->min_flt++; 108 if (fault & VM_FAULT_OOM)
108 break; 109 goto out_of_memory;
109 case VM_FAULT_MAJOR: 110 else if (fault & VM_FAULT_SIGBUS)
110 current->maj_flt++; 111 goto do_sigbus;
111 break;
112 case VM_FAULT_SIGBUS:
113 goto do_sigbus;
114 case VM_FAULT_OOM:
115 goto out_of_memory;
116 default:
117 BUG(); 112 BUG();
118 } 113 }
114 if (fault & VM_FAULT_MAJOR)
115 current->maj_flt++;
116 else
117 current->min_flt++;
119 118
120 up_read(&mm->mmap_sem); 119 up_read(&mm->mmap_sem);
121 return; 120 return;
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c
index e1ec2d1e8189..8415c76f11c2 100644
--- a/arch/xtensa/mm/init.c
+++ b/arch/xtensa/mm/init.c
@@ -205,7 +205,7 @@ void __init init_mmu (void)
205 /* Writing zeros to the <t>TLBCFG special registers ensure 205 /* Writing zeros to the <t>TLBCFG special registers ensure
206 * that valid values exist in the register. For existing 206 * that valid values exist in the register. For existing
207 * PGSZID<w> fields, zero selects the first element of the 207 * PGSZID<w> fields, zero selects the first element of the
208 * page-size array. For nonexistant PGSZID<w> fields, zero is 208 * page-size array. For nonexistent PGSZID<w> fields, zero is
209 * the best value to write. Also, when changing PGSZID<w> 209 * the best value to write. Also, when changing PGSZID<w>
210 * fields, the corresponding TLB must be flushed. 210 * fields, the corresponding TLB must be flushed.
211 */ 211 */
diff --git a/arch/xtensa/platform-iss/network.c b/arch/xtensa/platform-iss/network.c
index 4bfe333be229..f09962fa98c0 100644
--- a/arch/xtensa/platform-iss/network.c
+++ b/arch/xtensa/platform-iss/network.c
@@ -473,7 +473,7 @@ static int iss_net_open(struct net_device *dev)
473 netif_start_queue(dev); 473 netif_start_queue(dev);
474 474
475 /* clear buffer - it can happen that the host side of the interface 475 /* clear buffer - it can happen that the host side of the interface
476 * is full when we gethere. In this case, new data is never queued, 476 * is full when we get here. In this case, new data is never queued,
477 * SIGIOs never arrive, and the net never works. 477 * SIGIOs never arrive, and the net never works.
478 */ 478 */
479 while ((err = iss_net_rx(dev)) > 0) 479 while ((err = iss_net_rx(dev)) > 0)